Greasy Fork is available in English.

PageSpy-2

一个网页调试的脚本做成的库

Този скрипт не може да бъде инсталиран директно. Това е библиотека за други скриптове и може да бъде използвана с мета-директива // @require https://update.greasyfork.org/scripts/483696/1444454/PageSpy-2.js

/**
 * @desc 初始化PageSpy
 * @version 1.9.9
 * @latestTime 2024.9.9
 * @link https://fastly.jsdelivr.net/npm/@huolala-tech/page-spy-browser
 */
/* prettier-ignore */
class initPageSpy {
  constructor(window = globalThis || self) {
    return function(){"use strict";function e(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function t(t,n,r){return(n=e(n))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o=function(e){return e&&e.Math==Math&&e},i=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof n&&n)||function(){return this}()||n||Function("return this")(),s={},a=function(e){try{return!!e()}catch(e){return!0}},c=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=!a((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),l=u,d=Function.prototype.call,f=l?d.bind(d):function(){return d.apply(d,arguments)},h={},p={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,m=g&&!p.call({1:2},1);h.f=m?function(e){var t=g(this,e);return!!t&&t.enumerable}:p;var y,v,A=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},b=u,w=Function.prototype,S=w.call,E=b&&w.bind.bind(S,S),x=b?E:function(e){return function(){return S.apply(e,arguments)}},k=x,T=k({}.toString),P=k("".slice),R=function(e){return P(T(e),8,-1)},C=a,I=R,O=Object,L=x("".split),B=C((function(){return!O("z").propertyIsEnumerable(0)}))?function(e){return"String"==I(e)?L(e,""):O(e)}:O,j=function(e){return null==e},D=j,M=TypeError,U=function(e){if(D(e))throw M("Can't call method on "+e);return e},N=B,q=U,_=function(e){return N(q(e))},H="object"==typeof document&&document.all,z={all:H,IS_HTMLDDA:void 0===H&&void 0!==H},Q=z.all,F=z.IS_HTMLDDA?function(e){return"function"==typeof e||e===Q}:function(e){return"function"==typeof e},W=F,G=z.all,V=z.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:W(e)||e===G}:function(e){return"object"==typeof e?null!==e:W(e)},$=i,J=F,X=function(e,t){return arguments.length<2?(n=$[e],J(n)?n:void 0):$[e]&&$[e][t];var n},Y=x({}.isPrototypeOf),K=i,Z="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ee=K.process,te=K.Deno,ne=ee&&ee.versions||te&&te.version,re=ne&&ne.v8;re&&(v=(y=re.split("."))[0]>0&&y[0]<4?1:+(y[0]+y[1])),!v&&Z&&(!(y=Z.match(/Edge\/(\d+)/))||y[1]>=74)&&(y=Z.match(/Chrome\/(\d+)/))&&(v=+y[1]);var oe=v,ie=oe,se=a,ae=i.String,ce=!!Object.getOwnPropertySymbols&&!se((function(){var e=Symbol();return!ae(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ie&&ie<41})),ue=ce&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,le=X,de=F,fe=Y,he=Object,pe=ue?function(e){return"symbol"==typeof e}:function(e){var t=le("Symbol");return de(t)&&fe(t.prototype,he(e))},ge=String,me=function(e){try{return ge(e)}catch(e){return"Object"}},ye=F,ve=me,Ae=TypeError,be=function(e){if(ye(e))return e;throw Ae(ve(e)+" is not a function")},we=be,Se=j,Ee=function(e,t){var n=e[t];return Se(n)?void 0:we(n)},xe=f,ke=F,Te=V,Pe=TypeError,Re={exports:{}},Ce=i,Ie=Object.defineProperty,Oe=function(e,t){try{Ie(Ce,e,{value:t,configurable:!0,writable:!0})}catch(n){Ce[e]=t}return t},Le=Oe,Be="__core-js_shared__",je=i[Be]||Le(Be,{}),De=je;(Re.exports=function(e,t){return De[e]||(De[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var Me=Re.exports,Ue=U,Ne=Object,qe=function(e){return Ne(Ue(e))},_e=qe,He=x({}.hasOwnProperty),ze=Object.hasOwn||function(e,t){return He(_e(e),t)},Qe=x,Fe=0,We=Math.random(),Ge=Qe(1..toString),Ve=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ge(++Fe+We,36)},$e=Me,Je=ze,Xe=Ve,Ye=ce,Ke=ue,Ze=i.Symbol,et=$e("wks"),tt=Ke?Ze.for||Ze:Ze&&Ze.withoutSetter||Xe,nt=function(e){return Je(et,e)||(et[e]=Ye&&Je(Ze,e)?Ze[e]:tt("Symbol."+e)),et[e]},rt=f,ot=V,it=pe,st=Ee,at=function(e,t){var n,r;if("string"===t&&ke(n=e.toString)&&!Te(r=xe(n,e)))return r;if(ke(n=e.valueOf)&&!Te(r=xe(n,e)))return r;if("string"!==t&&ke(n=e.toString)&&!Te(r=xe(n,e)))return r;throw Pe("Can't convert object to primitive value")},ct=TypeError,ut=nt("toPrimitive"),lt=function(e,t){if(!ot(e)||it(e))return e;var n,r=st(e,ut);if(r){if(void 0===t&&(t="default"),n=rt(r,e,t),!ot(n)||it(n))return n;throw ct("Can't convert object to primitive value")}return void 0===t&&(t="number"),at(e,t)},dt=pe,ft=function(e){var t=lt(e,"string");return dt(t)?t:t+""},ht=V,pt=i.document,gt=ht(pt)&&ht(pt.createElement),mt=function(e){return gt?pt.createElement(e):{}},yt=mt,vt=!c&&!a((function(){return 7!=Object.defineProperty(yt("div"),"a",{get:function(){return 7}}).a})),At=c,bt=f,wt=h,St=A,Et=_,xt=ft,kt=ze,Tt=vt,Pt=Object.getOwnPropertyDescriptor;s.f=At?Pt:function(e,t){if(e=Et(e),t=xt(t),Tt)try{return Pt(e,t)}catch(e){}if(kt(e,t))return St(!bt(wt.f,e,t),e[t])};var Rt={},Ct=c&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),It=V,Ot=String,Lt=TypeError,Bt=function(e){if(It(e))return e;throw Lt(Ot(e)+" is not an object")},jt=c,Dt=vt,Mt=Ct,Ut=Bt,Nt=ft,qt=TypeError,_t=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,zt="enumerable",Qt="configurable",Ft="writable";Rt.f=jt?Mt?function(e,t,n){if(Ut(e),t=Nt(t),Ut(n),"function"==typeof e&&"prototype"===t&&"value"in n&&Ft in n&&!n[Ft]){var r=Ht(e,t);r&&r[Ft]&&(e[t]=n.value,n={configurable:Qt in n?n[Qt]:r[Qt],enumerable:zt in n?n[zt]:r[zt],writable:!1})}return _t(e,t,n)}:_t:function(e,t,n){if(Ut(e),t=Nt(t),Ut(n),Dt)try{return _t(e,t,n)}catch(e){}if("get"in n||"set"in n)throw qt("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Wt=Rt,Gt=A,Vt=c?function(e,t,n){return Wt.f(e,t,Gt(1,n))}:function(e,t,n){return e[t]=n,e},$t={exports:{}},Jt=c,Xt=ze,Yt=Function.prototype,Kt=Jt&&Object.getOwnPropertyDescriptor,Zt=Xt(Yt,"name"),en={EXISTS:Zt,PROPER:Zt&&"something"===function(){}.name,CONFIGURABLE:Zt&&(!Jt||Jt&&Kt(Yt,"name").configurable)},tn=F,nn=je,rn=x(Function.toString);tn(nn.inspectSource)||(nn.inspectSource=function(e){return rn(e)});var on,sn,an,cn=nn.inspectSource,un=F,ln=i.WeakMap,dn=un(ln)&&/native code/.test(String(ln)),fn=Ve,hn=Me("keys"),pn=function(e){return hn[e]||(hn[e]=fn(e))},gn={},mn=dn,yn=i,vn=V,An=Vt,bn=ze,wn=je,Sn=pn,En=gn,xn="Object already initialized",kn=yn.TypeError,Tn=yn.WeakMap;if(mn||wn.state){var Pn=wn.state||(wn.state=new Tn);Pn.get=Pn.get,Pn.has=Pn.has,Pn.set=Pn.set,on=function(e,t){if(Pn.has(e))throw kn(xn);return t.facade=e,Pn.set(e,t),t},sn=function(e){return Pn.get(e)||{}},an=function(e){return Pn.has(e)}}else{var Rn=Sn("state");En[Rn]=!0,on=function(e,t){if(bn(e,Rn))throw kn(xn);return t.facade=e,An(e,Rn,t),t},sn=function(e){return bn(e,Rn)?e[Rn]:{}},an=function(e){return bn(e,Rn)}}var Cn={set:on,get:sn,has:an,enforce:function(e){return an(e)?sn(e):on(e,{})},getterFor:function(e){return function(t){var n;if(!vn(t)||(n=sn(t)).type!==e)throw kn("Incompatible receiver, "+e+" required");return n}}},In=x,On=a,Ln=F,Bn=ze,jn=c,Dn=en.CONFIGURABLE,Mn=cn,Un=Cn.enforce,Nn=Cn.get,qn=String,_n=Object.defineProperty,Hn=In("".slice),zn=In("".replace),Qn=In([].join),Fn=jn&&!On((function(){return 8!==_n((function(){}),"length",{value:8}).length})),Wn=String(String).split("String"),Gn=$t.exports=function(e,t,n){"Symbol("===Hn(qn(t),0,7)&&(t="["+zn(qn(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Bn(e,"name")||Dn&&e.name!==t)&&(jn?_n(e,"name",{value:t,configurable:!0}):e.name=t),Fn&&n&&Bn(n,"arity")&&e.length!==n.arity&&_n(e,"length",{value:n.arity});try{n&&Bn(n,"constructor")&&n.constructor?jn&&_n(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=Un(e);return Bn(r,"source")||(r.source=Qn(Wn,"string"==typeof t?t:"")),e};Function.prototype.toString=Gn((function(){return Ln(this)&&Nn(this).source||Mn(this)}),"toString");var Vn=$t.exports,$n=F,Jn=Rt,Xn=Vn,Yn=Oe,Kn=function(e,t,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:t;if($n(n)&&Xn(n,i,r),r.global)o?e[t]=n:Yn(t,n);else{try{r.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=n:Jn.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},Zn={},er=Math.ceil,tr=Math.floor,nr=Math.trunc||function(e){var t=+e;return(t>0?tr:er)(t)},rr=function(e){var t=+e;return t!=t||0===t?0:nr(t)},or=rr,ir=Math.max,sr=Math.min,ar=function(e,t){var n=or(e);return n<0?ir(n+t,0):sr(n,t)},cr=rr,ur=Math.min,lr=function(e){return e>0?ur(cr(e),9007199254740991):0},dr=lr,fr=function(e){return dr(e.length)},hr=_,pr=ar,gr=fr,mr=function(e){return function(t,n,r){var o,i=hr(t),s=gr(i),a=pr(r,s);if(e&&n!=n){for(;s>a;)if((o=i[a++])!=o)return!0}else for(;s>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},yr={includes:mr(!0),indexOf:mr(!1)},vr=ze,Ar=_,br=yr.indexOf,wr=gn,Sr=x([].push),Er=function(e,t){var n,r=Ar(e),o=0,i=[];for(n in r)!vr(wr,n)&&vr(r,n)&&Sr(i,n);for(;t.length>o;)vr(r,n=t[o++])&&(~br(i,n)||Sr(i,n));return i},xr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kr=Er,Tr=xr.concat("length","prototype");Zn.f=Object.getOwnPropertyNames||function(e){return kr(e,Tr)};var Pr={};Pr.f=Object.getOwnPropertySymbols;var Rr=X,Cr=Zn,Ir=Pr,Or=Bt,Lr=x([].concat),Br=Rr("Reflect","ownKeys")||function(e){var t=Cr.f(Or(e)),n=Ir.f;return n?Lr(t,n(e)):t},jr=ze,Dr=Br,Mr=s,Ur=Rt,Nr=function(e,t,n){for(var r=Dr(t),o=Ur.f,i=Mr.f,s=0;s<r.length;s++){var a=r[s];jr(e,a)||n&&jr(n,a)||o(e,a,i(t,a))}},qr=a,_r=F,Hr=/#|\.prototype\./,zr=function(e,t){var n=Fr[Qr(e)];return n==Gr||n!=Wr&&(_r(t)?qr(t):!!t)},Qr=zr.normalize=function(e){return String(e).replace(Hr,".").toLowerCase()},Fr=zr.data={},Wr=zr.NATIVE="N",Gr=zr.POLYFILL="P",Vr=zr,$r=i,Jr=s.f,Xr=Vt,Yr=Kn,Kr=Oe,Zr=Nr,eo=Vr,to=function(e,t){var n,r,o,i,s,a=e.target,c=e.global,u=e.stat;if(n=c?$r:u?$r[a]||Kr(a,{}):($r[a]||{}).prototype)for(r in t){if(i=t[r],o=e.dontCallGetSet?(s=Jr(n,r))&&s.value:n[r],!eo(c?r:a+(u?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Zr(i,o)}(e.sham||o&&o.sham)&&Xr(i,"sham",!0),Yr(n,r,i,e)}},no=R,ro=c,oo=Array.isArray||function(e){return"Array"==no(e)},io=TypeError,so=Object.getOwnPropertyDescriptor,ao=ro&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),co=TypeError,uo=qe,lo=fr,fo=ao?function(e,t){if(oo(e)&&!so(e,"length").writable)throw io("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},ho=function(e){if(e>9007199254740991)throw co("Maximum allowed index exceeded");return e};to({target:"Array",proto:!0,arity:1,forced:a((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=uo(this),n=lo(t),r=arguments.length;ho(n+r);for(var o=0;o<r;o++)t[n]=arguments[o],n++;return fo(t,n),n}});var po=mt("span").classList,go=po&&po.constructor&&po.constructor.prototype,mo=go===Object.prototype?void 0:go,yo={},vo=Er,Ao=xr,bo=Object.keys||function(e){return vo(e,Ao)},wo=c,So=Ct,Eo=Rt,xo=Bt,ko=_,To=bo;yo.f=wo&&!So?Object.defineProperties:function(e,t){xo(e);for(var n,r=ko(t),o=To(t),i=o.length,s=0;i>s;)Eo.f(e,n=o[s++],r[n]);return e};var Po,Ro=X("document","documentElement"),Co=Bt,Io=yo,Oo=xr,Lo=gn,Bo=Ro,jo=mt,Do="prototype",Mo="script",Uo=pn("IE_PROTO"),No=function(){},qo=function(e){return"<"+Mo+">"+e+"</"+Mo+">"},_o=function(e){e.write(qo("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ho=function(){try{Po=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Ho="undefined"!=typeof document?document.domain&&Po?_o(Po):(t=jo("iframe"),n="java"+Mo+":",t.style.display="none",Bo.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(qo("document.F=Object")),e.close(),e.F):_o(Po);for(var r=Oo.length;r--;)delete Ho[Do][Oo[r]];return Ho()};Lo[Uo]=!0;var zo=Object.create||function(e,t){var n;return null!==e?(No[Do]=Co(e),n=new No,No[Do]=null,n[Uo]=e):n=Ho(),void 0===t?n:Io.f(n,t)},Qo=nt,Fo=zo,Wo=Rt.f,Go=Qo("unscopables"),Vo=Array.prototype;null==Vo[Go]&&Wo(Vo,Go,{configurable:!0,value:Fo(null)});var $o,Jo,Xo,Yo={},Ko=!a((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Zo=ze,ei=F,ti=qe,ni=Ko,ri=pn("IE_PROTO"),oi=Object,ii=oi.prototype,si=ni?oi.getPrototypeOf:function(e){var t=ti(e);if(Zo(t,ri))return t[ri];var n=t.constructor;return ei(n)&&t instanceof n?n.prototype:t instanceof oi?ii:null},ai=a,ci=F,ui=V,li=si,di=Kn,fi=nt("iterator"),hi=!1;[].keys&&("next"in(Xo=[].keys())?(Jo=li(li(Xo)))!==Object.prototype&&($o=Jo):hi=!0);var pi=!ui($o)||ai((function(){var e={};return $o[fi].call(e)!==e}));pi&&($o={}),ci($o[fi])||di($o,fi,(function(){return this}));var gi={IteratorPrototype:$o,BUGGY_SAFARI_ITERATORS:hi},mi=Rt.f,yi=ze,vi=nt("toStringTag"),Ai=function(e,t,n){e&&!n&&(e=e.prototype),e&&!yi(e,vi)&&mi(e,vi,{configurable:!0,value:t})},bi=gi.IteratorPrototype,wi=zo,Si=A,Ei=Ai,xi=Yo,ki=function(){return this},Ti=function(e,t,n,r){var o=t+" Iterator";return e.prototype=wi(bi,{next:Si(+!r,n)}),Ei(e,o,!1),xi[o]=ki,e},Pi=x,Ri=be,Ci=function(e,t,n){try{return Pi(Ri(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},Ii=F,Oi=String,Li=TypeError,Bi=Ci,ji=Bt,Di=function(e){if("object"==typeof e||Ii(e))return e;throw Li("Can't set "+Oi(e)+" as a prototype")},Mi=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Bi(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return ji(n),Di(r),t?e(n,r):n.__proto__=r,n}}():void 0),Ui=to,Ni=f,qi=F,_i=Ti,Hi=si,zi=Mi,Qi=Ai,Fi=Vt,Wi=Kn,Gi=Yo,Vi=en.PROPER,$i=en.CONFIGURABLE,Ji=gi.IteratorPrototype,Xi=gi.BUGGY_SAFARI_ITERATORS,Yi=nt("iterator"),Ki="keys",Zi="values",es="entries",ts=function(){return this},ns=function(e,t,n,r,o,i,s){_i(n,t,r);var a,c,u,l=function(e){if(e===o&&g)return g;if(!Xi&&e in h)return h[e];switch(e){case Ki:case Zi:case es:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+" Iterator",f=!1,h=e.prototype,p=h[Yi]||h["@@iterator"]||o&&h[o],g=!Xi&&p||l(o),m="Array"==t&&h.entries||p;if(m&&(a=Hi(m.call(new e)))!==Object.prototype&&a.next&&(Hi(a)!==Ji&&(zi?zi(a,Ji):qi(a[Yi])||Wi(a,Yi,ts)),Qi(a,d,!0)),Vi&&o==Zi&&p&&p.name!==Zi&&($i?Fi(h,"name",Zi):(f=!0,g=function(){return Ni(p,this)})),o)if(c={values:l(Zi),keys:i?g:l(Ki),entries:l(es)},s)for(u in c)(Xi||f||!(u in h))&&Wi(h,u,c[u]);else Ui({target:t,proto:!0,forced:Xi||f},c);return h[Yi]!==g&&Wi(h,Yi,g,{name:o}),Gi[t]=g,c},rs=function(e,t){return{value:e,done:t}},os=_,is=function(e){Vo[Go][e]=!0},ss=Yo,as=Cn,cs=Rt.f,us=ns,ls=rs,ds=c,fs="Array Iterator",hs=as.set,ps=as.getterFor(fs),gs=us(Array,"Array",(function(e,t){hs(this,{type:fs,target:os(e),index:0,kind:t})}),(function(){var e=ps(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,ls(void 0,!0)):ls("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),ms=ss.Arguments=ss.Array;if(is("keys"),is("values"),is("entries"),ds&&"values"!==ms.name)try{cs(ms,"name",{value:"values"})}catch(e){}var ys=i,vs={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},As=mo,bs=gs,ws=Vt,Ss=nt,Es=Ss("iterator"),xs=Ss("toStringTag"),ks=bs.values,Ts=function(e,t){if(e){if(e[Es]!==ks)try{ws(e,Es,ks)}catch(t){e[Es]=ks}if(e[xs]||ws(e,xs,t),vs[t])for(var n in bs)if(e[n]!==bs[n])try{ws(e,n,bs[n])}catch(t){e[n]=bs[n]}}};for(var Ps in vs)Ts(ys[Ps]&&ys[Ps].prototype,Ps);Ts(As,"DOMTokenList");var Rs=u,Cs=Function.prototype,Is=Cs.apply,Os=Cs.call,Ls="object"==typeof Reflect&&Reflect.apply||(Rs?Os.bind(Is):function(){return Os.apply(Is,arguments)}),Bs=Rt.f,js=F,Ds=V,Ms=Mi,Us={};Us[nt("toStringTag")]="z";var Ns="[object z]"===String(Us),qs=F,_s=R,Hs=nt("toStringTag"),zs=Object,Qs="Arguments"==_s(function(){return arguments}()),Fs=Ns?_s:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=zs(e),Hs))?n:Qs?_s(t):"Object"==(r=_s(t))&&qs(t.callee)?"Arguments":r},Ws=Fs,Gs=String,Vs=function(e){if("Symbol"===Ws(e))throw TypeError("Cannot convert a Symbol value to a string");return Gs(e)},$s=Vs,Js=V,Xs=Vt,Ys=Error,Ks=x("".replace),Zs=String(Ys("zxcasd").stack),ea=/\n\s*at [^:]*:[^\n]*/,ta=ea.test(Zs),na=A,ra=!a((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",na(1,7)),7!==e.stack)})),oa=Vt,ia=function(e,t){if(ta&&"string"==typeof e&&!Ys.prepareStackTrace)for(;t--;)e=Ks(e,ea,"");return e},sa=ra,aa=Error.captureStackTrace,ca=X,ua=ze,la=Vt,da=Y,fa=Mi,ha=Nr,pa=function(e,t,n){n in e||Bs(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},ga=function(e,t,n){var r,o;return Ms&&js(r=t.constructor)&&r!==n&&Ds(o=r.prototype)&&o!==n.prototype&&Ms(e,o),e},ma=function(e,t){return void 0===e?arguments.length<2?"":t:$s(e)},ya=function(e,t){Js(t)&&"cause"in t&&Xs(e,"cause",t.cause)},va=function(e,t,n,r){sa&&(aa?aa(e,t):oa(e,"stack",ia(n,r)))},Aa=c,ba=to,wa=Ls,Sa=function(e,t,n,r){var o="stackTraceLimit",i=r?2:1,s=e.split("."),a=s[s.length-1],c=ca.apply(null,s);if(c){var u=c.prototype;if(ua(u,"cause")&&delete u.cause,!n)return c;var l=ca("Error"),d=t((function(e,t){var n=ma(r?t:e,void 0),o=r?new c(e):new c;return void 0!==n&&la(o,"message",n),va(o,d,o.stack,2),this&&da(u,this)&&ga(o,this,d),arguments.length>i&&ya(o,arguments[i]),o}));d.prototype=u,"Error"!==a?fa?fa(d,l):ha(d,l,{name:!0}):Aa&&o in c&&(pa(d,c,o),pa(d,c,"prepareStackTrace")),ha(d,c);try{u.name!==a&&la(u,"name",a),u.constructor=d}catch(e){}return d}},Ea="WebAssembly",xa=i[Ea],ka=7!==Error("e",{cause:7}).cause,Ta=function(e,t){var n={};n[e]=Sa(e,t,ka),ba({global:!0,constructor:!0,arity:1,forced:ka},n)},Pa=function(e,t){if(xa&&xa[e]){var n={};n[e]=Sa(Ea+"."+e,t,ka),ba({target:Ea,stat:!0,constructor:!0,arity:1,forced:ka},n)}};Ta("Error",(function(e){return function(t){return wa(e,this,arguments)}})),Ta("EvalError",(function(e){return function(t){return wa(e,this,arguments)}})),Ta("RangeError",(function(e){return function(t){return wa(e,this,arguments)}})),Ta("ReferenceError",(function(e){return function(t){return wa(e,this,arguments)}})),Ta("SyntaxError",(function(e){return function(t){return wa(e,this,arguments)}})),Ta("TypeError",(function(e){return function(t){return wa(e,this,arguments)}})),Ta("URIError",(function(e){return function(t){return wa(e,this,arguments)}})),Pa("CompileError",(function(e){return function(t){return wa(e,this,arguments)}})),Pa("LinkError",(function(e){return function(t){return wa(e,this,arguments)}})),Pa("RuntimeError",(function(e){return function(t){return wa(e,this,arguments)}}));var Ra,Ca,Ia=Bt,Oa=a,La=i.RegExp,Ba=Oa((function(){var e=La("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),ja=Ba||Oa((function(){return!La("a","y").sticky})),Da={BROKEN_CARET:Ba||Oa((function(){var e=La("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:ja,UNSUPPORTED_Y:Ba},Ma=a,Ua=i.RegExp,Na=Ma((function(){var e=Ua(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),qa=a,_a=i.RegExp,Ha=qa((function(){var e=_a("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),za=f,Qa=x,Fa=Vs,Wa=function(){var e=Ia(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Ga=Da,Va=zo,$a=Cn.get,Ja=Na,Xa=Ha,Ya=Me("native-string-replace",String.prototype.replace),Ka=RegExp.prototype.exec,Za=Ka,ec=Qa("".charAt),tc=Qa("".indexOf),nc=Qa("".replace),rc=Qa("".slice),oc=(Ca=/b*/g,za(Ka,Ra=/a/,"a"),za(Ka,Ca,"a"),0!==Ra.lastIndex||0!==Ca.lastIndex),ic=Ga.BROKEN_CARET,sc=void 0!==/()??/.exec("")[1];(oc||sc||ic||Ja||Xa)&&(Za=function(e){var t,n,r,o,i,s,a,c=this,u=$a(c),l=Fa(e),d=u.raw;if(d)return d.lastIndex=c.lastIndex,t=za(Za,d,l),c.lastIndex=d.lastIndex,t;var f=u.groups,h=ic&&c.sticky,p=za(Wa,c),g=c.source,m=0,y=l;if(h&&(p=nc(p,"y",""),-1===tc(p,"g")&&(p+="g"),y=rc(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==ec(l,c.lastIndex-1))&&(g="(?: "+g+")",y=" "+y,m++),n=new RegExp("^(?:"+g+")",p)),sc&&(n=new RegExp("^"+g+"$(?!\\s)",p)),oc&&(r=c.lastIndex),o=za(Ka,h?n:c,y),h?o?(o.input=rc(o.input,m),o[0]=rc(o[0],m),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:oc&&o&&(c.lastIndex=c.global?o.index+o[0].length:r),sc&&o&&o.length>1&&za(Ya,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&f)for(o.groups=s=Va(null),i=0;i<f.length;i++)s[(a=f[i])[0]]=o[a[1]];return o});var ac=Za;to({target:"RegExp",proto:!0,forced:/./.exec!==ac},{exec:ac});var cc=R,uc=x,lc=function(e){if("Function"===cc(e))return uc(e)},dc=lc,fc=Kn,hc=ac,pc=a,gc=nt,mc=Vt,yc=gc("species"),vc=RegExp.prototype,Ac=x,bc=rr,wc=Vs,Sc=U,Ec=Ac("".charAt),xc=Ac("".charCodeAt),kc=Ac("".slice),Tc=function(e){return function(t,n){var r,o,i=wc(Sc(t)),s=bc(n),a=i.length;return s<0||s>=a?e?"":void 0:(r=xc(i,s))<55296||r>56319||s+1===a||(o=xc(i,s+1))<56320||o>57343?e?Ec(i,s):r:e?kc(i,s,s+2):o-56320+(r-55296<<10)+65536}},Pc={codeAt:Tc(!1),charAt:Tc(!0)},Rc=Pc.charAt,Cc=x,Ic=qe,Oc=Math.floor,Lc=Cc("".charAt),Bc=Cc("".replace),jc=Cc("".slice),Dc=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Mc=/\$([$&'`]|\d{1,2})/g,Uc=f,Nc=Bt,qc=F,_c=R,Hc=ac,zc=TypeError,Qc=Ls,Fc=f,Wc=x,Gc=function(e,t,n,r){var o=gc(e),i=!pc((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),s=i&&!pc((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[yc]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!s||n){var a=dc(/./[o]),c=t(o,""[e],(function(e,t,n,r,o){var s=dc(e),c=t.exec;return c===hc||c===vc.exec?i&&!o?{done:!0,value:a(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));fc(String.prototype,e,c[0]),fc(vc,o,c[1])}r&&mc(vc[o],"sham",!0)},Vc=a,$c=Bt,Jc=F,Xc=j,Yc=rr,Kc=lr,Zc=Vs,eu=U,tu=function(e,t,n){return t+(n?Rc(e,t).length:1)},nu=Ee,ru=function(e,t,n,r,o,i){var s=n+e.length,a=r.length,c=Mc;return void 0!==o&&(o=Ic(o),c=Dc),Bc(i,c,(function(i,c){var u;switch(Lc(c,0)){case"$":return"$";case"&":return e;case"`":return jc(t,0,n);case"'":return jc(t,s);case"<":u=o[jc(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>a){var d=Oc(l/10);return 0===d?i:d<=a?void 0===r[d-1]?Lc(c,1):r[d-1]+Lc(c,1):i}u=r[l-1]}return void 0===u?"":u}))},ou=function(e,t){var n=e.exec;if(qc(n)){var r=Uc(n,e,t);return null!==r&&Nc(r),r}if("RegExp"===_c(e))return Uc(Hc,e,t);throw zc("RegExp#exec called on incompatible receiver")},iu=nt("replace"),su=Math.max,au=Math.min,cu=Wc([].concat),uu=Wc([].push),lu=Wc("".indexOf),du=Wc("".slice),fu="$0"==="a".replace(/./,"$0"),hu=!!/./[iu]&&""===/./[iu]("a","$0");Gc("replace",(function(e,t,n){var r=hu?"$":"$0";return[function(e,n){var r=eu(this),o=Xc(e)?void 0:nu(e,iu);return o?Fc(o,e,r,n):Fc(t,Zc(r),e,n)},function(e,o){var i=$c(this),s=Zc(e);if("string"==typeof o&&-1===lu(o,r)&&-1===lu(o,"$<")){var a=n(t,i,s,o);if(a.done)return a.value}var c=Jc(o);c||(o=Zc(o));var u=i.global;if(u){var l=i.unicode;i.lastIndex=0}for(var d=[];;){var f=ou(i,s);if(null===f)break;if(uu(d,f),!u)break;""===Zc(f[0])&&(i.lastIndex=tu(s,Kc(i.lastIndex),l))}for(var h,p="",g=0,m=0;m<d.length;m++){for(var y=Zc((f=d[m])[0]),v=su(au(Yc(f.index),s.length),0),A=[],b=1;b<f.length;b++)uu(A,void 0===(h=f[b])?h:String(h));var w=f.groups;if(c){var S=cu([y],A,v,s);void 0!==w&&uu(S,w);var E=Zc(Qc(o,void 0,S))}else E=ru(y,s,v,A,w,o);v>=g&&(p+=du(s,g,v)+E,g=v+y.length)}return p+du(s,g)}]}),!!Vc((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!fu||hu);var pu=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}},gu={"text/plain":"Text","text/html":"Url",default:"Text"};var mu=function(e,t){var n,r,o,i,s,a,c=!1;t||(t={}),n=t.debug||!1;try{if(o=pu(),i=document.createRange(),s=document.getSelection(),(a=document.createElement("span")).textContent=e,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=gu[t.format]||gu.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(a),i.selectNodeContents(a),s.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(o){n&&console.error("unable to copy using execCommand: ",o),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(o){n&&console.error("unable to copy using clipboardData: ",o),n&&console.error("falling back to prompt"),r=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(r,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(i):s.removeAllRanges()),a&&document.body.removeChild(a),o()}return c},yu=r(mu),vu=be,Au=qe,bu=B,wu=fr,Su=TypeError,Eu=function(e){return function(t,n,r,o){vu(n);var i=Au(t),s=bu(i),a=wu(i),c=e?a-1:0,u=e?-1:1;if(r<2)for(;;){if(c in s){o=s[c],c+=u;break}if(c+=u,e?c<0:a<=c)throw Su("Reduce of empty array with no initial value")}for(;e?c>=0:a>c;c+=u)c in s&&(o=n(o,s[c],c,i));return o}},xu={left:Eu(!1),right:Eu(!0)},ku=a,Tu="undefined"!=typeof process&&"process"==R(process),Pu=xu.left,Ru=function(e,t){var n=[][e];return!!n&&ku((function(){n.call(null,t||function(){return 1},1)}))};to({target:"Array",proto:!0,forced:!Tu&&oe>79&&oe<83||!Ru("reduce")},{reduce:function(e){var t=arguments.length;return Pu(this,e,t,t>1?arguments[1]:void 0)}});var Cu=Vn,Iu=Rt,Ou=function(e,t,n){return n.get&&Cu(n.get,t,{getter:!0}),n.set&&Cu(n.set,t,{setter:!0}),Iu.f(e,t,n)},Lu=R,Bu=TypeError,ju=Ci(ArrayBuffer.prototype,"byteLength","get")||function(e){if("ArrayBuffer"!=Lu(e))throw Bu("ArrayBuffer expected");return e.byteLength},Du=ju,Mu=x(ArrayBuffer.prototype.slice),Uu=function(e){if(0!==Du(e))return!1;try{return Mu(e,0,0),!1}catch(e){return!0}},Nu=c,qu=Ou,_u=Uu,Hu=ArrayBuffer.prototype;Nu&&!("detached"in Hu)&&qu(Hu,"detached",{configurable:!0,get:function(){return _u(this)}});var zu=rr,Qu=lr,Fu=RangeError,Wu="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Gu=!Wu&&!Tu&&"object"==typeof window&&"object"==typeof document,Vu=a,$u=oe,Ju=Gu,Xu=Wu,Yu=Tu,Ku=i.structuredClone,Zu=!!Ku&&!Vu((function(){if(Xu&&$u>92||Yu&&$u>94||Ju&&$u>97)return!1;var e=new ArrayBuffer(8),t=Ku(e,{transfer:[e]});return 0!=e.byteLength||8!=t.byteLength})),el=i,tl=x,nl=Ci,rl=function(e){if(void 0===e)return 0;var t=zu(e),n=Qu(t);if(t!==n)throw Fu("Wrong length or index");return n},ol=Uu,il=ju,sl=Zu,al=el.TypeError,cl=el.structuredClone,ul=el.ArrayBuffer,ll=el.DataView,dl=Math.min,fl=ul.prototype,hl=ll.prototype,pl=tl(fl.slice),gl=nl(fl,"resizable","get"),ml=nl(fl,"maxByteLength","get"),yl=tl(hl.getInt8),vl=tl(hl.setInt8),Al=sl&&function(e,t,n){var r=il(e),o=void 0===t?r:dl(rl(t),r),i=!gl||!gl(e);if(ol(e))throw al("ArrayBuffer is detached");var s=cl(e,{transfer:[e]});if(r==o&&(n||i))return s;if(!n||i)return pl(s,0,o);for(var a=new ul(o,ml&&{maxByteLength:ml(s)}),c=new ll(s),u=new ll(a),l=0;l<o;l++)vl(u,l,yl(c,l));return a},bl=Al;bl&&to({target:"ArrayBuffer",proto:!0},{transfer:function(){return bl(this,arguments.length?arguments[0]:void 0,!0)}});var wl=Al;wl&&to({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return wl(this,arguments.length?arguments[0]:void 0,!1)}});var Sl=Pc.charAt,El=Vs,xl=Cn,kl=ns,Tl=rs,Pl="String Iterator",Rl=xl.set,Cl=xl.getterFor(Pl);kl(String,"String",(function(e){Rl(this,{type:Pl,string:El(e),index:0})}),(function(){var e,t=Cl(this),n=t.string,r=t.index;return r>=n.length?Tl(void 0,!0):(e=Sl(n,r),t.index+=e.length,Tl(e,!1))}));var Il=a,Ol=c,Ll=nt("iterator"),Bl=!Il((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.size&&!Ol||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Ll]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),jl=be,Dl=u,Ml=lc(lc.bind),Ul=function(e,t){return jl(e),void 0===t?e:Dl?Ml(e,t):function(){return e.apply(t,arguments)}},Nl=Y,ql=TypeError,_l=function(e,t){if(Nl(t,e))return e;throw ql("Incorrect invocation")},Hl=c,zl=x,Ql=f,Fl=a,Wl=bo,Gl=Pr,Vl=h,$l=qe,Jl=B,Xl=Object.assign,Yl=Object.defineProperty,Kl=zl([].concat),Zl=!Xl||Fl((function(){if(Hl&&1!==Xl({b:1},Xl(Yl({},"a",{enumerable:!0,get:function(){Yl(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=Xl({},e)[n]||Wl(Xl({},t)).join("")!=r}))?function(e,t){for(var n=$l(e),r=arguments.length,o=1,i=Gl.f,s=Vl.f;r>o;)for(var a,c=Jl(arguments[o++]),u=i?Kl(Wl(c),i(c)):Wl(c),l=u.length,d=0;l>d;)a=u[d++],Hl&&!Ql(s,c,a)||(n[a]=c[a]);return n}:Xl,ed=f,td=Bt,nd=Ee,rd=function(e,t,n){var r,o;td(e);try{if(!(r=nd(e,"return"))){if("throw"===t)throw n;return n}r=ed(r,e)}catch(e){o=!0,r=e}if("throw"===t)throw n;if(o)throw r;return td(r),n},od=Bt,id=rd,sd=Yo,ad=nt("iterator"),cd=Array.prototype,ud=x,ld=a,dd=F,fd=Fs,hd=cn,pd=function(){},gd=[],md=X("Reflect","construct"),yd=/^\s*(?:class|function)\b/,vd=ud(yd.exec),Ad=!yd.exec(pd),bd=function(e){if(!dd(e))return!1;try{return md(pd,gd,e),!0}catch(e){return!1}},wd=function(e){if(!dd(e))return!1;switch(fd(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ad||!!vd(yd,hd(e))}catch(e){return!0}};wd.sham=!0;var Sd=!md||ld((function(){var e;return bd(bd.call)||!bd(Object)||!bd((function(){e=!0}))||e}))?wd:bd,Ed=ft,xd=Rt,kd=A,Td=function(e,t,n){var r=Ed(t);r in e?xd.f(e,r,kd(0,n)):e[r]=n},Pd=Fs,Rd=Ee,Cd=j,Id=Yo,Od=nt("iterator"),Ld=function(e){if(!Cd(e))return Rd(e,Od)||Rd(e,"@@iterator")||Id[Pd(e)]},Bd=f,jd=be,Dd=Bt,Md=me,Ud=Ld,Nd=TypeError,qd=function(e,t){var n=arguments.length<2?Ud(e):t;if(jd(n))return Dd(Bd(n,e));throw Nd(Md(e)+" is not iterable")},_d=Ul,Hd=f,zd=qe,Qd=function(e,t,n,r){try{return r?t(od(n)[0],n[1]):t(n)}catch(t){id(e,"throw",t)}},Fd=function(e){return void 0!==e&&(sd.Array===e||cd[ad]===e)},Wd=Sd,Gd=fr,Vd=Td,$d=qd,Jd=Ld,Xd=Array,Yd=ar,Kd=fr,Zd=Td,ef=Array,tf=Math.max,nf=function(e,t,n){for(var r=Kd(e),o=Yd(t,r),i=Yd(void 0===n?r:n,r),s=ef(tf(i-o,0)),a=0;o<i;o++,a++)Zd(s,a,e[o]);return s.length=a,s},rf=x,of=2147483647,sf=/[^\0-\u007E]/,af=/[.\u3002\uFF0E\uFF61]/g,cf="Overflow: input needs wider integers to process",uf=RangeError,lf=rf(af.exec),df=Math.floor,ff=String.fromCharCode,hf=rf("".charCodeAt),pf=rf([].join),gf=rf([].push),mf=rf("".replace),yf=rf("".split),vf=rf("".toLowerCase),Af=function(e){return e+22+75*(e<26)},bf=function(e,t,n){var r=0;for(e=n?df(e/700):e>>1,e+=df(e/t);e>455;)e=df(e/35),r+=36;return df(r+36*e/(e+38))},wf=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=hf(e,n++);if(o>=55296&&o<=56319&&n<r){var i=hf(e,n++);56320==(64512&i)?gf(t,((1023&o)<<10)+(1023&i)+65536):(gf(t,o),n--)}else gf(t,o)}return t}(e);var n,r,o=e.length,i=128,s=0,a=72;for(n=0;n<e.length;n++)(r=e[n])<128&&gf(t,ff(r));var c=t.length,u=c;for(c&&gf(t,"-");u<o;){var l=of;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<l&&(l=r);var d=u+1;if(l-i>df((of-s)/d))throw uf(cf);for(s+=(l-i)*d,i=l,n=0;n<e.length;n++){if((r=e[n])<i&&++s>of)throw uf(cf);if(r==i){for(var f=s,h=36;;){var p=h<=a?1:h>=a+26?26:h-a;if(f<p)break;var g=f-p,m=36-p;gf(t,ff(Af(p+g%m))),f=df(g/m),h+=36}gf(t,ff(Af(f))),a=bf(s,d,u==c),s=0,u++}}s++,i++}return pf(t,"")},Sf=TypeError,Ef=function(e,t){if(e<t)throw Sf("Not enough arguments");return e},xf=Kn,kf=nf,Tf=Math.floor,Pf=function(e,t){var n=e.length,r=Tf(n/2);return n<8?Rf(e,t):Cf(e,Pf(kf(e,0,r),t),Pf(kf(e,r),t),t)},Rf=function(e,t){for(var n,r,o=e.length,i=1;i<o;){for(r=i,n=e[i];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},Cf=function(e,t,n,r){for(var o=t.length,i=n.length,s=0,a=0;s<o||a<i;)e[s+a]=s<o&&a<i?r(t[s],n[a])<=0?t[s++]:n[a++]:s<o?t[s++]:n[a++];return e},If=to,Of=i,Lf=f,Bf=x,jf=c,Df=Bl,Mf=Kn,Uf=Ou,Nf=function(e,t,n){for(var r in t)xf(e,r,t[r],n);return e},qf=Ai,_f=Ti,Hf=Cn,zf=_l,Qf=F,Ff=ze,Wf=Ul,Gf=Fs,Vf=Bt,$f=V,Jf=Vs,Xf=zo,Yf=A,Kf=qd,Zf=Ld,eh=Ef,th=Pf,nh=nt("iterator"),rh="URLSearchParams",oh=rh+"Iterator",ih=Hf.set,sh=Hf.getterFor(rh),ah=Hf.getterFor(oh),ch=Object.getOwnPropertyDescriptor,uh=function(e){if(!jf)return Of[e];var t=ch(Of,e);return t&&t.value},lh=uh("fetch"),dh=uh("Request"),fh=uh("Headers"),hh=dh&&dh.prototype,ph=fh&&fh.prototype,gh=Of.RegExp,mh=Of.TypeError,yh=Of.decodeURIComponent,vh=Of.encodeURIComponent,Ah=Bf("".charAt),bh=Bf([].join),wh=Bf([].push),Sh=Bf("".replace),Eh=Bf([].shift),xh=Bf([].splice),kh=Bf("".split),Th=Bf("".slice),Ph=/\+/g,Rh=Array(4),Ch=function(e){return Rh[e-1]||(Rh[e-1]=gh("((?:%[\\da-f]{2}){"+e+"})","gi"))},Ih=function(e){try{return yh(e)}catch(t){return e}},Oh=function(e){var t=Sh(e,Ph," "),n=4;try{return yh(t)}catch(e){for(;n;)t=Sh(t,Ch(n--),Ih);return t}},Lh=/[!'()~]|%20/g,Bh={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},jh=function(e){return Bh[e]},Dh=function(e){return Sh(vh(e),Lh,jh)},Mh=_f((function(e,t){ih(this,{type:oh,iterator:Kf(sh(e).entries),kind:t})}),"Iterator",(function(){var e=ah(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),Uh=function(e){this.entries=[],this.url=null,void 0!==e&&($f(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Ah(e,0)?Th(e,1):e:Jf(e)))};Uh.prototype={type:rh,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,o,i,s,a,c=Zf(e);if(c)for(n=(t=Kf(e,c)).next;!(r=Lf(n,t)).done;){if(i=(o=Kf(Vf(r.value))).next,(s=Lf(i,o)).done||(a=Lf(i,o)).done||!Lf(i,o).done)throw mh("Expected sequence with length 2");wh(this.entries,{key:Jf(s.value),value:Jf(a.value)})}else for(var u in e)Ff(e,u)&&wh(this.entries,{key:u,value:Jf(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=kh(e,"&"),o=0;o<r.length;)(t=r[o++]).length&&(n=kh(t,"="),wh(this.entries,{key:Oh(Eh(n)),value:Oh(bh(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],wh(n,Dh(e.key)+"="+Dh(e.value));return bh(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Nh=function(){zf(this,qh);var e=ih(this,new Uh(arguments.length>0?arguments[0]:void 0));jf||(this.length=e.entries.length)},qh=Nh.prototype;if(Nf(qh,{append:function(e,t){eh(arguments.length,2);var n=sh(this);wh(n.entries,{key:Jf(e),value:Jf(t)}),jf||this.length++,n.updateURL()},delete:function(e){eh(arguments.length,1);for(var t=sh(this),n=t.entries,r=Jf(e),o=0;o<n.length;)n[o].key===r?xh(n,o,1):o++;jf||(this.length=n.length),t.updateURL()},get:function(e){eh(arguments.length,1);for(var t=sh(this).entries,n=Jf(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){eh(arguments.length,1);for(var t=sh(this).entries,n=Jf(e),r=[],o=0;o<t.length;o++)t[o].key===n&&wh(r,t[o].value);return r},has:function(e){eh(arguments.length,1);for(var t=sh(this).entries,n=Jf(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){eh(arguments.length,1);for(var n,r=sh(this),o=r.entries,i=!1,s=Jf(e),a=Jf(t),c=0;c<o.length;c++)(n=o[c]).key===s&&(i?xh(o,c--,1):(i=!0,n.value=a));i||wh(o,{key:s,value:a}),jf||(this.length=o.length),r.updateURL()},sort:function(){var e=sh(this);th(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=sh(this).entries,r=Wf(e,arguments.length>1?arguments[1]:void 0),o=0;o<n.length;)r((t=n[o++]).value,t.key,this)},keys:function(){return new Mh(this,"keys")},values:function(){return new Mh(this,"values")},entries:function(){return new Mh(this,"entries")}},{enumerable:!0}),Mf(qh,nh,qh.entries,{name:"entries"}),Mf(qh,"toString",(function(){return sh(this).serialize()}),{enumerable:!0}),jf&&Uf(qh,"size",{get:function(){return sh(this).entries.length},configurable:!0,enumerable:!0}),qf(Nh,rh),If({global:!0,constructor:!0,forced:!Df},{URLSearchParams:Nh}),!Df&&Qf(fh)){var _h=Bf(ph.has),Hh=Bf(ph.set),zh=function(e){if($f(e)){var t,n=e.body;if(Gf(n)===rh)return t=e.headers?new fh(e.headers):new fh,_h(t,"content-type")||Hh(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Xf(e,{body:Yf(0,Jf(n)),headers:Yf(0,t)})}return e};if(Qf(lh)&&If({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return lh(e,arguments.length>1?zh(arguments[1]):{})}}),Qf(dh)){var Qh=function(e){return zf(this,hh),new dh(e,arguments.length>1?zh(arguments[1]):{})};hh.constructor=Qh,Qh.prototype=hh,If({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Qh})}}var Fh,Wh=to,Gh=c,Vh=Bl,$h=i,Jh=Ul,Xh=x,Yh=Kn,Kh=Ou,Zh=_l,ep=ze,tp=Zl,np=function(e){var t=zd(e),n=Wd(this),r=arguments.length,o=r>1?arguments[1]:void 0,i=void 0!==o;i&&(o=_d(o,r>2?arguments[2]:void 0));var s,a,c,u,l,d,f=Jd(t),h=0;if(!f||this===Xd&&Fd(f))for(s=Gd(t),a=n?new this(s):Xd(s);s>h;h++)d=i?o(t[h],h):t[h],Vd(a,h,d);else for(l=(u=$d(t,f)).next,a=n?new this:[];!(c=Hd(l,u)).done;h++)d=i?Qd(u,o,[c.value,h],!0):c.value,Vd(a,h,d);return a.length=h,a},rp=nf,op=Pc.codeAt,ip=function(e){var t,n,r=[],o=yf(mf(vf(e),af,"."),".");for(t=0;t<o.length;t++)n=o[t],gf(r,lf(sf,n)?"xn--"+wf(n):n);return pf(r,".")},sp=Vs,ap=Ai,cp=Ef,up={URLSearchParams:Nh,getState:sh},lp=Cn,dp=lp.set,fp=lp.getterFor("URL"),hp=up.URLSearchParams,pp=up.getState,gp=$h.URL,mp=$h.TypeError,yp=$h.parseInt,vp=Math.floor,Ap=Math.pow,bp=Xh("".charAt),wp=Xh(/./.exec),Sp=Xh([].join),Ep=Xh(1..toString),xp=Xh([].pop),kp=Xh([].push),Tp=Xh("".replace),Pp=Xh([].shift),Rp=Xh("".split),Cp=Xh("".slice),Ip=Xh("".toLowerCase),Op=Xh([].unshift),Lp="Invalid scheme",Bp="Invalid host",jp="Invalid port",Dp=/[a-z]/i,Mp=/[\d+-.a-z]/i,Up=/\d/,Np=/^0x/i,qp=/^[0-7]+$/,_p=/^\d+$/,Hp=/^[\da-f]+$/i,zp=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Qp=/[\0\t\n\r #/:<>?@[\\\]^|]/,Fp=/^[\u0000-\u0020]+/,Wp=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Gp=/[\t\n\r]/g,Vp=function(e){var t,n,r,o;if("number"==typeof e){for(t=[],n=0;n<4;n++)Op(t,e%256),e=vp(e/256);return Sp(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,o=0,i=0;i<8;i++)0!==e[i]?(o>n&&(t=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(t=r,n=o),t}(e),n=0;n<8;n++)o&&0===e[n]||(o&&(o=!1),r===n?(t+=n?":":"::",o=!0):(t+=Ep(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},$p={},Jp=tp({},$p,{" ":1,'"':1,"<":1,">":1,"`":1}),Xp=tp({},Jp,{"#":1,"?":1,"{":1,"}":1}),Yp=tp({},Xp,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Kp=function(e,t){var n=op(e,0);return n>32&&n<127&&!ep(t,e)?e:encodeURIComponent(e)},Zp={ftp:21,file:null,http:80,https:443,ws:80,wss:443},eg=function(e,t){var n;return 2==e.length&&wp(Dp,bp(e,0))&&(":"==(n=bp(e,1))||!t&&"|"==n)},tg=function(e){var t;return e.length>1&&eg(Cp(e,0,2))&&(2==e.length||"/"===(t=bp(e,2))||"\\"===t||"?"===t||"#"===t)},ng=function(e){return"."===e||"%2e"===Ip(e)},rg={},og={},ig={},sg={},ag={},cg={},ug={},lg={},dg={},fg={},hg={},pg={},gg={},mg={},yg={},vg={},Ag={},bg={},wg={},Sg={},Eg={},xg=function(e,t,n){var r,o,i,s=sp(e);if(t){if(o=this.parse(s))throw mp(o);this.searchParams=null}else{if(void 0!==n&&(r=new xg(n,!0)),o=this.parse(s,null,r))throw mp(o);(i=pp(new hp)).bindURL(this),this.searchParams=i}};xg.prototype={type:"URL",parse:function(e,t,n){var r,o,i,s,a,c=this,u=t||rg,l=0,d="",f=!1,h=!1,p=!1;for(e=sp(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=Tp(e,Fp,""),e=Tp(e,Wp,"$1")),e=Tp(e,Gp,""),r=np(e);l<=r.length;){switch(o=r[l],u){case rg:if(!o||!wp(Dp,o)){if(t)return Lp;u=ig;continue}d+=Ip(o),u=og;break;case og:if(o&&(wp(Mp,o)||"+"==o||"-"==o||"."==o))d+=Ip(o);else{if(":"!=o){if(t)return Lp;d="",u=ig,l=0;continue}if(t&&(c.isSpecial()!=ep(Zp,d)||"file"==d&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=d,t)return void(c.isSpecial()&&Zp[c.scheme]==c.port&&(c.port=null));d="","file"==c.scheme?u=mg:c.isSpecial()&&n&&n.scheme==c.scheme?u=sg:c.isSpecial()?u=lg:"/"==r[l+1]?(u=ag,l++):(c.cannotBeABaseURL=!0,kp(c.path,""),u=wg)}break;case ig:if(!n||n.cannotBeABaseURL&&"#"!=o)return Lp;if(n.cannotBeABaseURL&&"#"==o){c.scheme=n.scheme,c.path=rp(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,u=Eg;break}u="file"==n.scheme?mg:cg;continue;case sg:if("/"!=o||"/"!=r[l+1]){u=cg;continue}u=dg,l++;break;case ag:if("/"==o){u=fg;break}u=bg;continue;case cg:if(c.scheme=n.scheme,o==Fh)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=rp(n.path),c.query=n.query;else if("/"==o||"\\"==o&&c.isSpecial())u=ug;else if("?"==o)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=rp(n.path),c.query="",u=Sg;else{if("#"!=o){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=rp(n.path),c.path.length--,u=bg;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=rp(n.path),c.query=n.query,c.fragment="",u=Eg}break;case ug:if(!c.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,u=bg;continue}u=fg}else u=dg;break;case lg:if(u=dg,"/"!=o||"/"!=bp(d,l+1))continue;l++;break;case dg:if("/"!=o&&"\\"!=o){u=fg;continue}break;case fg:if("@"==o){f&&(d="%40"+d),f=!0,i=np(d);for(var g=0;g<i.length;g++){var m=i[g];if(":"!=m||p){var y=Kp(m,Yp);p?c.password+=y:c.username+=y}else p=!0}d=""}else if(o==Fh||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()){if(f&&""==d)return"Invalid authority";l-=np(d).length+1,d="",u=hg}else d+=o;break;case hg:case pg:if(t&&"file"==c.scheme){u=vg;continue}if(":"!=o||h){if(o==Fh||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()){if(c.isSpecial()&&""==d)return Bp;if(t&&""==d&&(c.includesCredentials()||null!==c.port))return;if(s=c.parseHost(d))return s;if(d="",u=Ag,t)return;continue}"["==o?h=!0:"]"==o&&(h=!1),d+=o}else{if(""==d)return Bp;if(s=c.parseHost(d))return s;if(d="",u=gg,t==pg)return}break;case gg:if(!wp(Up,o)){if(o==Fh||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()||t){if(""!=d){var v=yp(d,10);if(v>65535)return jp;c.port=c.isSpecial()&&v===Zp[c.scheme]?null:v,d=""}if(t)return;u=Ag;continue}return jp}d+=o;break;case mg:if(c.scheme="file","/"==o||"\\"==o)u=yg;else{if(!n||"file"!=n.scheme){u=bg;continue}if(o==Fh)c.host=n.host,c.path=rp(n.path),c.query=n.query;else if("?"==o)c.host=n.host,c.path=rp(n.path),c.query="",u=Sg;else{if("#"!=o){tg(Sp(rp(r,l),""))||(c.host=n.host,c.path=rp(n.path),c.shortenPath()),u=bg;continue}c.host=n.host,c.path=rp(n.path),c.query=n.query,c.fragment="",u=Eg}}break;case yg:if("/"==o||"\\"==o){u=vg;break}n&&"file"==n.scheme&&!tg(Sp(rp(r,l),""))&&(eg(n.path[0],!0)?kp(c.path,n.path[0]):c.host=n.host),u=bg;continue;case vg:if(o==Fh||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&eg(d))u=bg;else if(""==d){if(c.host="",t)return;u=Ag}else{if(s=c.parseHost(d))return s;if("localhost"==c.host&&(c.host=""),t)return;d="",u=Ag}continue}d+=o;break;case Ag:if(c.isSpecial()){if(u=bg,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=Fh&&(u=bg,"/"!=o))continue}else c.fragment="",u=Eg;else c.query="",u=Sg;break;case bg:if(o==Fh||"/"==o||"\\"==o&&c.isSpecial()||!t&&("?"==o||"#"==o)){if(".."===(a=Ip(a=d))||"%2e."===a||".%2e"===a||"%2e%2e"===a?(c.shortenPath(),"/"==o||"\\"==o&&c.isSpecial()||kp(c.path,"")):ng(d)?"/"==o||"\\"==o&&c.isSpecial()||kp(c.path,""):("file"==c.scheme&&!c.path.length&&eg(d)&&(c.host&&(c.host=""),d=bp(d,0)+":"),kp(c.path,d)),d="","file"==c.scheme&&(o==Fh||"?"==o||"#"==o))for(;c.path.length>1&&""===c.path[0];)Pp(c.path);"?"==o?(c.query="",u=Sg):"#"==o&&(c.fragment="",u=Eg)}else d+=Kp(o,Xp);break;case wg:"?"==o?(c.query="",u=Sg):"#"==o?(c.fragment="",u=Eg):o!=Fh&&(c.path[0]+=Kp(o,$p));break;case Sg:t||"#"!=o?o!=Fh&&("'"==o&&c.isSpecial()?c.query+="%27":c.query+="#"==o?"%23":Kp(o,$p)):(c.fragment="",u=Eg);break;case Eg:o!=Fh&&(c.fragment+=Kp(o,Jp))}l++}},parseHost:function(e){var t,n,r;if("["==bp(e,0)){if("]"!=bp(e,e.length-1))return Bp;if(t=function(e){var t,n,r,o,i,s,a,c=[0,0,0,0,0,0,0,0],u=0,l=null,d=0,f=function(){return bp(e,d)};if(":"==f()){if(":"!=bp(e,1))return;d+=2,l=++u}for(;f();){if(8==u)return;if(":"!=f()){for(t=n=0;n<4&&wp(Hp,f());)t=16*t+yp(f(),16),d++,n++;if("."==f()){if(0==n)return;if(d-=n,u>6)return;for(r=0;f();){if(o=null,r>0){if(!("."==f()&&r<4))return;d++}if(!wp(Up,f()))return;for(;wp(Up,f());){if(i=yp(f(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;d++}c[u]=256*c[u]+o,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==f()){if(d++,!f())return}else if(f())return;c[u++]=t}else{if(null!==l)return;d++,l=++u}}if(null!==l)for(s=u-l,u=7;0!=u&&s>0;)a=c[u],c[u--]=c[l+s-1],c[l+--s]=a;else if(8!=u)return;return c}(Cp(e,1,-1)),!t)return Bp;this.host=t}else if(this.isSpecial()){if(e=ip(e),wp(zp,e))return Bp;if(t=function(e){var t,n,r,o,i,s,a,c=Rp(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(o=c[r]))return e;if(i=10,o.length>1&&"0"==bp(o,0)&&(i=wp(Np,o)?16:8,o=Cp(o,8==i?1:2)),""===o)s=0;else{if(!wp(10==i?_p:8==i?qp:Hp,o))return e;s=yp(o,i)}kp(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=Ap(256,5-t))return null}else if(s>255)return null;for(a=xp(n),r=0;r<n.length;r++)a+=n[r]*Ap(256,3-r);return a}(e),null===t)return Bp;this.host=t}else{if(wp(Qp,e))return Bp;for(t="",n=np(e),r=0;r<n.length;r++)t+=Kp(n[r],$p);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return ep(Zp,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&eg(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,o=e.host,i=e.port,s=e.path,a=e.query,c=e.fragment,u=t+":";return null!==o?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=Vp(o),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?s[0]:s.length?"/"+Sp(s,"/"):"",null!==a&&(u+="?"+a),null!==c&&(u+="#"+c),u},setHref:function(e){var t=this.parse(e);if(t)throw mp(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new kg(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Vp(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(sp(e)+":",rg)},getUsername:function(){return this.username},setUsername:function(e){var t=np(sp(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Kp(t[n],Yp)}},getPassword:function(){return this.password},setPassword:function(e){var t=np(sp(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Kp(t[n],Yp)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Vp(e):Vp(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,hg)},getHostname:function(){var e=this.host;return null===e?"":Vp(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,pg)},getPort:function(){var e=this.port;return null===e?"":sp(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=sp(e))?this.port=null:this.parse(e,gg))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Sp(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Ag))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=sp(e))?this.query=null:("?"==bp(e,0)&&(e=Cp(e,1)),this.query="",this.parse(e,Sg)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=sp(e))?("#"==bp(e,0)&&(e=Cp(e,1)),this.fragment="",this.parse(e,Eg)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var kg=function(e){var t=Zh(this,Tg),n=cp(arguments.length,1)>1?arguments[1]:void 0,r=dp(t,new xg(e,!1,n));Gh||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},Tg=kg.prototype,Pg=function(e,t){return{get:function(){return fp(this)[e]()},set:t&&function(e){return fp(this)[t](e)},configurable:!0,enumerable:!0}};if(Gh&&(Kh(Tg,"href",Pg("serialize","setHref")),Kh(Tg,"origin",Pg("getOrigin")),Kh(Tg,"protocol",Pg("getProtocol","setProtocol")),Kh(Tg,"username",Pg("getUsername","setUsername")),Kh(Tg,"password",Pg("getPassword","setPassword")),Kh(Tg,"host",Pg("getHost","setHost")),Kh(Tg,"hostname",Pg("getHostname","setHostname")),Kh(Tg,"port",Pg("getPort","setPort")),Kh(Tg,"pathname",Pg("getPathname","setPathname")),Kh(Tg,"search",Pg("getSearch","setSearch")),Kh(Tg,"searchParams",Pg("getSearchParams")),Kh(Tg,"hash",Pg("getHash","setHash"))),Yh(Tg,"toJSON",(function(){return fp(this).serialize()}),{enumerable:!0}),Yh(Tg,"toString",(function(){return fp(this).serialize()}),{enumerable:!0}),gp){var Rg=gp.createObjectURL,Cg=gp.revokeObjectURL;Rg&&Yh(kg,"createObjectURL",Jh(Rg,gp)),Cg&&Yh(kg,"revokeObjectURL",Jh(Cg,gp))}ap(kg,"URL"),Wh({global:!0,constructor:!0,forced:!Vh,sham:!Gh},{URL:kg});var Ig=f;to({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return Ig(URL.prototype.toString,this)}});var Og=c,Lg=x,Bg=Ou,jg=URLSearchParams.prototype,Dg=Lg(jg.forEach);function Mg(){return Math.random().toString(36).slice(2)}function Ug(e){return Object.keys(e)}function Ng(e){return Object.prototype.toString.call(e)}function qg(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _g(e){return"string"==typeof e}function Hg(e){return"[object BigInt]"===Ng(e)}function zg(e){return e instanceof Array}function Qg(e){return"object"==typeof e&&null!==e}function Fg(e){return e instanceof Blob}function Wg(e){return e instanceof URLSearchParams}function Gg(e){return e instanceof FormData}function Vg(e){return e instanceof File}function $g(e){return e instanceof Document}Og&&!("size"in jg)&&Bg(jg,"size",{get:function(){var e=0;return Dg(this,(function(){e++})),e},configurable:!0,enumerable:!0});const Jg=e=>"".concat(e),Xg=e=>({ok:!0,value:e});function Yg(e){return void 0===e?Xg(Jg(e)):null===e?Xg(e):function(e){return"number"==typeof e}(e)&&(e===-1/0||e===1/0||Number.isNaN(e))?Xg(Jg(e)):Hg(e)?Xg("".concat(e,"n")):"symbol"==typeof e||"function"==typeof e?Xg(Jg(e.toString())):e instanceof Error?Xg(Jg(e.stack)):e===Object.prototype?{value:null,ok:!1}:e instanceof Object||"object"==typeof e?{value:e,ok:!1}:Xg(e)}function Kg(e){const{ok:t,value:n}=Yg(e);return t?n:JSON.stringify(e,((e,t)=>Yg(t).value),2)}function Zg(e){return void 0===e?"undefined":null===e?"null":Hg(e)?"bigint":e instanceof Object?e instanceof Error?"error":"function"==typeof e?"function":"object":typeof e}const em=Object.assign({},console),tm=["log","info","error","warn","debug"].reduce(((e,t)=>(e[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];console[t]("[PageSpy] [".concat(t.toLocaleUpperCase(),"] "),...n)},e.unproxy[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];em[t]("[PageSpy] [".concat(t.toLocaleUpperCase(),"] "),...n)},e)),{unproxy:{}});const nm=e=>{if("object"!=typeof e)return null;const{name:t,message:n,stack:r}=Object(e);return!1===[t,n,r].every(Boolean)?null:{name:t,message:n,stack:r}},rm=e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=e=>{var n;t(null===(n=e.target)||void 0===n?void 0:n.result)},r.onerror=()=>{n(new Error("blob2base64Async: can not convert"))},r.readAsDataURL(e)})),om="message",im="broadcast",sm="ping",am="updateRoomInfo";var cm=Object.freeze({__proto__:null,BROADCAST:im,CLOSE:"close",CONNECT:"connect",ERROR:"error",JOIN:"join",LEAVE:"leave",MESSAGE:om,PING:sm,PONG:"pong",UPDATE_ROOM_INFO:am});function um(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{role:"client",type:e,data:Object.assign(Object.assign({},n&&{id:Mg()}),t)}}class lm{constructor(e){this.id="",this.method="",this.url="",this.requestType="xhr",this.requestHeader=null,this.status=0,this.statusText="",this.readyState=0,this.responseReason=null,this.responseType="",this.responseHeader=null,this.startTime=0,this.endTime=0,this.costTime=0,this.postData=null,this.requestPayload=null,this.withCredentials=!1,this.id=e}}function dm(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const fm=2097152,hm="Exceed maximum limit";var pm;!function(e){e[e.UNSENT=0]="UNSENT",e[e.OPENED=1]="OPENED",e[e.HEADERS_RECEIVED=2]="HEADERS_RECEIVED",e[e.LOADING=3]="LOADING",e[e.DONE=4]="DONE"}(pm||(pm={}));const gm="(file)";const mm="Content-Type";function ym(e,t){if(!t)return e;const n=function(e){return e?Gg(e)?"multipart/form-data":Wg(e)?"application/x-www-form-urlencoded;charset=UTF-8":$g(e)?"application/xml":Fg(e)?e.type:"text/plain;charset=UTF-8":null}(t);if(!n)return e;const r=[mm,n];if(!e)return[r];for(let t=0;t<e.length;t++){const[n]=e[t];if(n.toUpperCase()===mm.toUpperCase())return e}return[...e,r]}function vm(e){return dm(this,void 0,void 0,(function*(){if(!e)return null;if(Wg(e)||Gg(e))return function(e){const t=[];let n=e.next();for(;!n.done;){const[r,o]=n.value;let i;i=Vg(o)?gm:String(o),t.push([r,i]),n=e.next()}return t}(e.entries());if(Fg(e))return"[object Blob]";if(t=e,ArrayBuffer.isView(t))return"[object TypedArray]";var t;if($g(e)){return(new XMLSerializer).serializeToString(e)}return _g(e)?e:Ng(e)}))}class Am{constructor(e){this.socketStore=e,this.reqMap=Object.create(null)}getRequestMap(){return this.reqMap}getRequest(e){return this.reqMap[e]}removeRequest(e){delete this.reqMap[e]}createRequest(e){return e?this.reqMap[e]?(tm.warn("The request object has been in store, disallow duplicate create"),!1):(this.reqMap[e]=new lm(e),!0):(tm.warn('The "id" is required when init request object'),!1)}setRequest(e,t){return!(!e||!t)&&(this.reqMap[e]=t,!0)}sendRequestItem(e,t){var n;if(!1!==(null===(n=Am.dataProcessor)||void 0===n?void 0:n.call(Am,t)))try{this.reqMap[e]||(this.reqMap[e]=t);const n=um("network",Object.assign({},t),!1);this.socketStore.dispatchEvent("public-data",n),this.socketStore.broadcastMessage(n,t.readyState!==pm.DONE),this.deferDeleteRequest(e)}catch(e){tm.error(e.message)}}deferDeleteRequest(e){const t=this.getRequest(e);t&&t.readyState===pm.DONE&&setTimeout((()=>{delete this.reqMap[e]}),3e3)}}var bm=x,wm=Set.prototype,Sm={Set:Set,add:bm(wm.add),has:bm(wm.has),remove:bm(wm.delete),proto:wm},Em=Sm.has,xm=function(e){return Em(e),e},km=f,Tm=function(e,t,n){for(var r,o,i=n||e.next;!(r=km(i,e)).done;)if(void 0!==(o=t(r.value)))return o},Pm=x,Rm=Tm,Cm=Sm.Set,Im=Sm.proto,Om=Pm(Im.forEach),Lm=Pm(Im.keys),Bm=Lm(new Cm).next,jm=function(e,t,n){return n?Rm(Lm(e),t,Bm):Om(e,t)},Dm=jm,Mm=Sm.Set,Um=Sm.add,Nm=function(e){var t=new Mm;return Dm(e,(function(e){Um(t,e)})),t},qm=Ci(Sm.proto,"size","get")||function(e){return e.size},_m=be,Hm=Bt,zm=f,Qm=rr,Fm=TypeError,Wm=Math.max,Gm=function(e,t,n,r){this.set=e,this.size=t,this.has=n,this.keys=r};Gm.prototype={getIterator:function(){return Hm(zm(this.keys,this.set))},includes:function(e){return zm(this.has,this.set,e)}};var Vm=function(e){Hm(e);var t=+e.size;if(t!=t)throw Fm("Invalid size");return new Gm(e,Wm(Qm(t),0),_m(e.has),_m(e.keys))},$m=xm,Jm=Nm,Xm=qm,Ym=Vm,Km=jm,Zm=Tm,ey=Sm.has,ty=Sm.remove,ny=X,ry=function(e){try{return(new(ny("Set")))[e]({size:0,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}),!0}catch(e){return!1}},oy=function(e){var t=$m(this),n=Ym(e),r=Jm(t);return Xm(t)<=n.size?Km(t,(function(e){n.includes(e)&&ty(r,e)})):Zm(n.getIterator(),(function(e){ey(t,e)&&ty(r,e)})),r};to({target:"Set",proto:!0,real:!0,forced:!ry("difference")},{difference:oy});var iy=xm,sy=qm,ay=Vm,cy=jm,uy=Tm,ly=Sm.Set,dy=Sm.add,fy=Sm.has,hy=a,py=function(e){var t=iy(this),n=ay(e),r=new ly;return sy(t)>n.size?uy(n.getIterator(),(function(e){fy(t,e)&&dy(r,e)})):cy(t,(function(e){n.includes(e)&&dy(r,e)})),r};to({target:"Set",proto:!0,real:!0,forced:!ry("intersection")||hy((function(){return"3,2"!=Array.from(new Set([1,2,3]).intersection(new Set([3,2])))}))},{intersection:py});var gy=xm,my=Sm.has,yy=qm,vy=Vm,Ay=jm,by=Tm,wy=rd,Sy=function(e){var t=gy(this),n=vy(e);if(yy(t)<=n.size)return!1!==Ay(t,(function(e){if(n.includes(e))return!1}),!0);var r=n.getIterator();return!1!==by(r,(function(e){if(my(t,e))return wy(r,"normal",!1)}))};to({target:"Set",proto:!0,real:!0,forced:!ry("isDisjointFrom")},{isDisjointFrom:Sy});var Ey=xm,xy=qm,ky=jm,Ty=Vm,Py=function(e){var t=Ey(this),n=Ty(e);return!(xy(t)>n.size)&&!1!==ky(t,(function(e){if(!n.includes(e))return!1}),!0)};to({target:"Set",proto:!0,real:!0,forced:!ry("isSubsetOf")},{isSubsetOf:Py});var Ry=xm,Cy=Sm.has,Iy=qm,Oy=Vm,Ly=Tm,By=rd,jy=function(e){var t=Ry(this),n=Oy(e);if(Iy(t)<n.size)return!1;var r=n.getIterator();return!1!==Ly(r,(function(e){if(!Cy(t,e))return By(r,"normal",!1)}))};to({target:"Set",proto:!0,real:!0,forced:!ry("isSupersetOf")},{isSupersetOf:jy});var Dy=xm,My=Nm,Uy=Vm,Ny=Tm,qy=Sm.add,_y=Sm.has,Hy=Sm.remove,zy=function(e){var t=Dy(this),n=Uy(e).getIterator(),r=My(t);return Ny(n,(function(e){_y(t,e)?Hy(r,e):qy(r,e)})),r};to({target:"Set",proto:!0,real:!0,forced:!ry("symmetricDifference")},{symmetricDifference:zy});var Qy=xm,Fy=Sm.add,Wy=Nm,Gy=Vm,Vy=Tm,$y=function(e){var t=Qy(this),n=Gy(e).getIterator(),r=Wy(t);return Vy(n,(function(e){Fy(r,e)})),r};to({target:"Set",proto:!0,real:!0,forced:!ry("union")},{union:$y});class Jy{constructor(){this.store={},this.instanceStore={}}getStore(){return this.store}resetStore(){this.store={}}getInstanceStore(){return this.instanceStore}resetInstanceStore(){this.instanceStore={}}transformToAtom(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{value:n,ok:r}=Yg(e),o=Mg();if(r)return{id:o,type:Zg(e),value:n};if(t)try{return{id:o,type:"json",value:JSON.stringify(e)}}catch(e){return{id:o,type:"json",value:null}}return this.add(e)}get(e){const t=this.store[e],n=this.instanceStore[e];if(!t)return null;const r={},o=Object.getOwnPropertyDescriptors(t);Object.keys(o).forEach((e=>{const t=o[e];qg(t,"value")&&(t.value=this.transformToAtom(t.value)),r[e]=Jy.getAtomOverview({atomId:Mg(),instanceId:n,value:t})}));const i=this.addExtraProperty(e);return Object.assign(Object.assign({},r),i)}getOrigin(e){const t=this.store[e];return t||null}add(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=Mg();let r=n;var o;Qg(o=e)&&qg(o,"constructor")&&"function"==typeof o.constructor&&(r=t),this.store[n]=e,this.instanceStore[n]=r;const i=Jy.getSemanticValue(e);return Jy.getAtomOverview({atomId:n,value:i,instanceId:r})}static getAtomOverview(e){let{instanceId:t="",atomId:n,value:r}=e;return{id:Mg(),type:"atom",__atomId:n,instanceId:t,value:r}}static getSemanticValue(e){if(Qg(t=e)&&"[object Object]"===Ng(t))return"Object {...}";var t;if(zg(e))return"Array (".concat(e.length,")");return e.constructor.name}addExtraProperty(e){const t=this.store[e],n=this.instanceStore[e],r={};if((t instanceof String||t instanceof Number||t instanceof Boolean)&&(r["[[PrimitiveValue]]"]=this.transformToAtom(t.valueOf())),t instanceof Set){const e={};let n=0;for(const r of t)e[n++]=r;e.size=t.size,r["[[Entries]]"]=this.transformToAtom(e)}if(t instanceof Map){const e={};let n=0;for(const[r,o]of t.entries())e[n++]={key:r,value:o};e.size=t.size,r["[[Entries]]"]=this.transformToAtom(e)}var o;return(zg(t)||(o=t,"function"==typeof NodeList&&"NodeList"===NodeList.name&&o instanceof NodeList||"function"==typeof HTMLCollection&&"HTMLCollection"===HTMLCollection.name&&o instanceof HTMLCollection))&&(r.length=this.transformToAtom(t.length)),null!==Object.getPrototypeOf(t)?r["[[Prototype]]"]=this.add(Object.getPrototypeOf(t),n):r.___proto___=this.transformToAtom(null),r}}const Xy=new Jy;class Yy{static makeClientInfoMsg(){return{sdk:Yy.info.sdk,isDevTools:Yy.info.isDevTools,ua:Yy.getName(),plugins:Yy.plugins}}static getName(){if(!Yy._name){const{ua:e,osType:t,osVersion:n,browserType:r,browserVersion:o}=Yy.info;Yy._name=e||"".concat(t,"/").concat(n," ").concat(r,"/").concat(o)}return Yy._name}}Yy.info={osType:"unknown",osVersion:"unknown",browserType:"unknown",browserVersion:"unknown",framework:"unknown",isDevTools:!1,sdk:"browser"},Yy.plugins=[];class Ky{defaultConfig(){return{}}constructor(){this.mergeConfig=e=>{const t=Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return this.privateKeys.includes(n)||(e[n]=r),e}),{});return this.value=Object.assign(Object.assign({},this.defaultConfig()),t),this.value},this.value=this.defaultConfig()}get(){return this.value}set(e,t){this.value[e]=t}}const Zy="page-spy-room";var ev;!function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSING=2]="CLOSING",e[e.CLOSED=3]="CLOSED"}(ev||(ev={}));const tv=2e3,nv=Math.pow(1.5,4)*tv;class rv{constructor(){this.events={open:[],close:[],error:[],message:[]}}emit(e,t){this.events[e].forEach((e=>{e(t)})),"close"!==e&&"error"!==e||this.clearListeners()}onOpen(e){this.events.open.push(e)}onClose(e){this.events.close.push(e)}onError(e){this.events.error.push(e)}onMessage(e){this.events.message.push(e)}clearListeners(){Object.entries(this.events).forEach((e=>{let[,t]=e;t.splice(0)}))}}class ov{getSocket(){return this.socketWrapper}updateRoomInfo(){if(this.getPageSpyConfig){const{project:e,title:t}=this.getPageSpyConfig(),n=Yy.getName();this.send({type:am,content:{info:{name:n,group:e,tags:{title:t,name:n,group:e}}}},!0)}}constructor(){this.socketUrl="",this.socketConnection=null,this.debuggerConnection=null,this.pingTimer=null,this.pongTimer=null,this.retryTimer=null,this.isOffline=!1,this.messageCapacity=0,this.messages=[],this.events={debug:[],refresh:[],"atom-detail":[],"atom-getter":[],"debugger-online":[],"database-pagination":[],"public-data":[],"harbor-clear":[]},this.retryInterval=tv,this.connectable=!0,this.getPageSpyConfig=null,this.addListener("atom-detail",ov.handleResolveAtom),this.addListener("atom-getter",ov.handleAtomPropertyGetter),this.addListener("debugger-online",this.handleFlushBuffer)}init(e){return dm(this,void 0,void 0,(function*(){var t,n,r,o,i;try{if(!e)throw Error("WebSocket url cannot be empty");this.socketWrapper.clearListeners(),this.socketWrapper.getState()===ev.OPEN&&(yield new Promise((e=>{this.socketWrapper.onClose((()=>{this.socketWrapper.clearListeners(),e()})),this.socketWrapper.close()}))),null===(t=this.socketWrapper)||void 0===t||t.onOpen((()=>{this.connectOnline()})),null===(n=this.socketWrapper)||void 0===n||n.onMessage((e=>{this.handleMessage(e)})),null===(r=this.socketWrapper)||void 0===r||r.onClose((()=>{this.connectOffline()})),null===(o=this.socketWrapper)||void 0===o||o.onError((()=>{this.connectOffline()})),this.socketUrl=e,null===(i=this.socketWrapper)||void 0===i||i.init(e)}catch(e){tm.error(e.message)}}))}addListener(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t)}removeListener(e,t){const n=this.events[e]||[],r=n.indexOf(t);r>-1&&n.splice(r,1)}broadcastMessage(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=function(e){return{type:im,content:{data:e}}}(e);this.send(n,t)}close(){var e;this.connectable=!1,this.clearPing(),null===(e=this.socketWrapper)||void 0===e||e.close(),this.messages=[],Object.entries(this.events).forEach((e=>{let[t,n]=e;["atom-detail","atom-getter","debugger-online"].includes(t)||n.splice(0)}))}connectOnline(){this.retryInterval=tv,this.updateRoomInfo(),this.ping()}connectOffline(){this.socketConnection=null,this.debuggerConnection=null,this.clearPing(),this.retryTimer&&clearTimeout(this.retryTimer),this.connectable&&(this.retryTimer=setTimeout((()=>{this.retryInterval<nv&&(this.retryInterval*=1.5),this.retryTimer=null,this.tryReconnect()}),this.retryInterval))}tryReconnect(){this.init(this.socketUrl)}ping(){this.pingTimer&&clearTimeout(this.pingTimer),this.pongTimer&&clearTimeout(this.pongTimer),this.pingTimer=setTimeout((()=>{this.send({type:"ping",content:null}),this.pingTimer=null,this.pongTimer=setTimeout((()=>{this.connectOffline(),this.pongTimer=null}),5e3)}),5e3)}clearPing(){this.pingTimer&&(clearTimeout(this.pingTimer),this.pingTimer=null),this.pongTimer&&(clearTimeout(this.pongTimer),this.pongTimer=null)}handlePong(){clearTimeout(this.pongTimer),this.pongTimer=null,this.ping()}handleMessage(e){var t;ov.messageFilters.length&&ov.messageFilters.forEach((t=>{e=t(e)}));const{CONNECT:n,MESSAGE:r,ERROR:o,JOIN:i,PING:s,PONG:a,LEAVE:c,CLOSE:u,BROADCAST:l}=cm,d=JSON.parse(e.data),{type:f}=d;switch(f){case n:const{selfConnection:e,roomConnections:s}=d.content;this.socketConnection=e,this.debuggerConnection=s.find((e=>"Debugger"===e.userId))||null;break;case i:case c:const{connection:a}=d.content;"Debugger"===a.userId&&(f===i?(this.debuggerConnection=a,this.sendClientInfo()):this.debuggerConnection=null);break;case r:const{data:l,from:h,to:p}=d.content;p.address===(null===(t=this.socketConnection)||void 0===t?void 0:t.address)&&this.dispatchEvent(l.type,{source:l,from:h,to:p});break;case u:case o:this.connectOffline()}this.handlePong()}dispatchEvent(e,t){var n;["public-data"].includes(e)?this.events["public-data"].forEach((e=>{e(t)})):null===(n=this.events[e])||void 0===n||n.forEach((e=>{e.call(this,t,(e=>{this.unicastMessage(e,t.from)}))}))}unicastMessage(e,t){const n=function(e,t,n){return{type:om,content:{data:e,from:t,to:n}}}(e,this.socketConnection,t);this.send(n)}handleFlushBuffer(e){const{latestId:t}=e.source.data,n=this.messages.findIndex((e=>e.content.data.data.id===t));this.messages.slice(n+1).forEach((t=>{const n={type:om,content:{data:t.content.data,from:this.socketConnection,to:e.from}};this.send(n,!0)}))}static handleResolveAtom(e,t){let{source:n}=e;const{type:r,data:o}=n;if("atom-detail"===r){const e=Xy.get(o)||{};t(um("atom-detail-".concat(o),e,!1))}}static handleAtomPropertyGetter(e,t){let{source:n}=e;var r,o;const{type:i,data:s}=n;if("atom-getter"===i){const{id:e,parentId:n,key:i,instanceId:a}=s,c=Xy.getOrigin(a),u=Xy.getOrigin(n);let l={};l=c&&u?null===(o=null===(r=Object.getOwnPropertyDescriptor(u,i))||void 0===r?void 0:r.get)||void 0===o?void 0:o.call(c):new Error("Getter computed failed");t(um("atom-getter-".concat(e),Xy.transformToAtom(l)))}}send(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var n;if(this.checkIfSend(e))try{const t=e;t.createdAt=Date.now(),t.requestId=Mg();const r=Kg(t);null===(n=this.socketWrapper)||void 0===n||n.send(r)}catch(e){tm.error("Incompatible: ".concat(e.message)),this.connectOffline()}this.checkIfCache(e,t)&&(0!==this.messageCapacity&&this.messages.length>=this.messageCapacity&&this.messages.shift(),this.messages.push(e))}checkIfSend(e){return this.socketWrapper.getState()===ev.OPEN&&(!![am,sm].includes(e.type)||!!this.debuggerConnection)}checkIfCache(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.isOffline&&!t&&![om,sm].includes(e.type)}sendClientInfo(){const e=Yy.makeClientInfoMsg();this.broadcastMessage({role:"client",type:"client-info",data:e},!0)}}ov.messageFilters=[];class iv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{className:t="",el:n="div"}=e,r=document.createElement(n);r.dataset.testid="modal",r.className=["page-spy-modal",t].join(" "),r.style.display="none",r.onclick=e=>{e.stopPropagation(),e.preventDefault(),this.close()},this.el=r}show(){this.el.style.display="flex",setTimeout((()=>{this.el.classList.add("show")}),50)}close(){this.el.classList.remove("show"),setTimeout((()=>{this.el.style.display="none"}),300)}appendNode(e){this.el.insertAdjacentElement("beforeend",e)}}class sv{constructor(e){this.options={...e};const t=document.createElement("div");t.dataset.testid="content",t.className=["page-spy-content",e.className].join(" "),t.onclick=e=>{e.stopPropagation()},this.el=t,this.render()}render(){const{content:e="",onOk:t}=this.options,n=document.createElement("div");n.className="page-spy-content__info",n.innerHTML=e;const r=document.createElement("div");r.dataset.testid="copy-button",r.className="page-spy-content__btn",r.textContent=function(){const e=navigator.languages;return["zh-CN","zh-HK","zh-TW","zh","zh-Hans-CN"].some((t=>e.includes(t)))}()?"复制在线调试链接":"Copy debug link",r.onclick=e=>{e.stopPropagation(),t&&t()},this.el.insertAdjacentElement("beforeend",n),this.el.insertAdjacentElement("beforeend",r)}}class av extends rv{constructor(){super(...arguments),t(this,"socketInstance",null)}init(e){this.socketInstance=new WebSocket(e);["open","close","error","message"].forEach((e=>{this.socketInstance.addEventListener(e,(t=>{this.events[e].forEach((e=>{e(t)}))}))}))}send(e){var t;null===(t=this.socketInstance)||void 0===t||t.send(Kg(e))}close(){var e;null===(e=this.socketInstance)||void 0===e||e.close()}getState(){var e;return null===(e=this.socketInstance)||void 0===e?void 0:e.readyState}}var cv=new class extends ov{constructor(){super(...arguments),t(this,"socketWrapper",new av)}onOffline(){window.dispatchEvent(new CustomEvent("sdk-inactive")),sessionStorage.removeItem(Zy)}};class uv{constructor(){t(this,"name","ConsolePlugin"),t(this,"proxyTypes",["log","info","error","warn","debug"]),t(this,"console",{}),t(this,"$pageSpyConfig",null)}async onInit(e){let{config:t}=e;uv.hasInitd||(uv.hasInitd=!0,cv.addListener("debug",uv.handleDebugger),this.$pageSpyConfig=t,this.init())}init(){var e=this;this.proxyTypes.forEach((t=>{this.console[t]=window.console[t]||window.console.log||(()=>{}),window.console[t]=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.printLog({logType:t,logs:r,url:window.location.href})}}))}reset(){this.proxyTypes.forEach((e=>{window.console[e]=this.console[e]}))}onReset(){this.reset(),uv.hasInitd=!1}static handleDebugger(e,t){let{source:n}=e;const{type:r,data:o}=n;if("debug"===r){t(um("console",{logType:"debug-origin",logs:[{id:Mg(),type:"debug-origin",value:o}]}));try{const e=new Function("return ".concat(o))();t(um("console",{logType:"debug-eval",logs:[Xy.transformToAtom(e)]}))}catch(e){t(um("console",{logType:"error",logs:[{type:"error",value:e.stack}]}))}}}printLog(e){if(e.logs&&e.logs.length){var t,n;const r=null===(t=this.$pageSpyConfig)||void 0===t||null===(t=t.dataProcessor)||void 0===t?void 0:t.console;if(r){this.reset();const t=r(e);if(this.init(),!1===t)return}this.console[e.logType](...e.logs);const o=um("console",{...e,time:Date.now(),logs:e.logs.map((e=>Xy.transformToAtom(e,!1)))});if(cv.broadcastMessage(o),null!==(n=this.$pageSpyConfig)&&void 0!==n&&n.serializeData){const t={...o,data:{...o.data,logs:e.logs.map((e=>Xy.transformToAtom(e,!0)))}};cv.dispatchEvent("public-data",t)}else cv.dispatchEvent("public-data",o)}}}t(uv,"hasInitd",!1);class lv{constructor(){t(this,"name","ErrorPlugin"),t(this,"$pageSpyConfig",null),t(this,"uncaughtErrorListener",(e=>{if(e.error){const{message:t,stack:n}=e.error,r=nm(e.error);this.sendMessage(n||t,r)}else{const e="[PageSpy] An unknown error occurred and no stack trace available";this.sendMessage(e,null)}})),t(this,"resourceLoadErrorListener",(e=>{if(!(e instanceof ErrorEvent)){const{target:t}=e;this.sendMessage("[PageSpy] Resource Load Error: Cannot load resource of (".concat(t.src||t.href,")"),null)}})),t(this,"rejectionListener",(e=>{const t=nm(e.reason);this.sendMessage(e.reason,t)}))}onInit(e){let{config:t}=e;lv.hasInitd||(lv.hasInitd=!0,this.$pageSpyConfig=t,this.onUncaughtError(),this.onResourceLoadError(),this.onUnhandledRejectionError())}onReset(){window.removeEventListener("error",this.uncaughtErrorListener),window.removeEventListener("error",this.resourceLoadErrorListener),window.removeEventListener("unhandledrejection",this.rejectionListener),lv.hasInitd=!1}onUncaughtError(){window.addEventListener("error",this.uncaughtErrorListener)}onResourceLoadError(){window.addEventListener("error",this.resourceLoadErrorListener,!0)}onUnhandledRejectionError(){window.addEventListener("unhandledrejection",this.rejectionListener)}sendMessage(e,t){var n,r;const o={logType:"error",logs:[e],time:Date.now(),url:window.location.href,errorDetail:t};if(!1===(null===(n=this.$pageSpyConfig)||void 0===n||null===(n=n.dataProcessor)||void 0===n||null===(r=n.console)||void 0===r?void 0:r.call(n,o)))return;o.logs=o.logs.map((e=>Xy.transformToAtom(e)));const i=um("console",o);cv.dispatchEvent("public-data",i),cv.broadcastMessage(i)}}t(lv,"hasInitd",!1);class dv extends Am{constructor(){super(cv)}}class fv extends dv{constructor(){super(),t(this,"xhrOpen",null),t(this,"xhrSend",null),t(this,"xhrSetRequestHeader",null),this.initProxyHandler()}initProxyHandler(){const e=this;if(!window.XMLHttpRequest)return;const{open:t,send:n,setRequestHeader:r}=window.XMLHttpRequest.prototype;this.xhrOpen=t,this.xhrSend=n,this.xhrSetRequestHeader=r,window.XMLHttpRequest.prototype.open=function(){const n=this;for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];const s=o[0],a=o[1],c=Mg();e.createRequest(c);const u=e.getRequest(c);return u&&(u.url=new URL(a,window.location.href).toString(),u.method=s.toUpperCase(),u.requestType="xhr"),this.pageSpyRequestId=c,this.pageSpyRequestMethod=s,this.pageSpyRequestUrl=a,n.addEventListener("readystatechange",(async()=>{if(u){switch(u.readyState=n.readyState,n.readyState){case n.UNSENT:case n.OPENED:u.status=n.status,u.statusText="Pending",u.startTime||(u.startTime=Date.now());break;case n.HEADERS_RECEIVED:u.status=n.status,u.statusText="Loading";const t=(n.getAllResponseHeaders()||"").trim().split(/[\r\n]+/);u.responseHeader=t.reduce(((e,t)=>{const[n,...r]=t.split(": ");return e.push([n,r.join(": ")]),e}),[]);break;case n.LOADING:u.status=n.status,u.statusText="Loading";break;case n.DONE:u.status=n.status,u.statusText="Done",u.endTime=Date.now(),u.costTime=u.endTime-(u.startTime||u.endTime);const r=await e.formatResponse(n);Ug(r).forEach((e=>{u[e]=r[e]}));break;default:u.status=n.status,u.statusText="Unknown"}e.sendRequestItem(n.pageSpyRequestId,u)}else tm.warn("The request object is not found on XMLHttpRequest's readystatechange event")})),t.apply(n,o)},window.XMLHttpRequest.prototype.setRequestHeader=function(t,n){const o=e.getRequest(this.pageSpyRequestId);return o?(o.requestHeader||(o.requestHeader=[]),o.requestHeader.push([String(t),String(n)])):tm.warn("The request object is not found on XMLHttpRequest's setRequestHeader event"),r.apply(this,[t,n])},window.XMLHttpRequest.prototype.send=function(t){const r=this,{pageSpyRequestId:o}=r,i=e.getRequest(o);return i?(i.responseType=r.responseType,i.withCredentials=r.withCredentials,"GET"!==i.method&&(i.requestHeader=ym(i.requestHeader,t),vm(t).then((t=>{i.requestPayload=t,e.sendRequestItem(r.pageSpyRequestId,i)})))):tm.warn("The request object is not found on XMLHttpRequest's send event"),n.apply(r,[t])}}reset(){this.xhrOpen&&(window.XMLHttpRequest.prototype.open=this.xhrOpen),this.xhrSend&&(window.XMLHttpRequest.prototype.send=this.xhrSend),this.xhrSetRequestHeader&&(window.XMLHttpRequest.prototype.setRequestHeader=this.xhrSetRequestHeader)}async formatResponse(e){const t={response:"",responseReason:null};switch(e.responseType){case"":case"text":if(_g(e.response))try{t.response=JSON.parse(e.response)}catch(n){t.response=e.response}else void 0!==e.response&&(t.response=Ng(e.response));break;case"json":void 0!==e.response&&(t.response=e.response);break;case"blob":case"arraybuffer":if(e.response){let n=e.response;if(n instanceof ArrayBuffer){const t=e.getResponseHeader("content-type");t&&(n=new Blob([n],{type:t}))}if(Fg(n))if(n.size<=fm)try{t.response=await rm(n)}catch(e){t.response=await n.text(),tm.error(e.message)}else t.response="[object Blob]",t.responseReason=hm}break;default:void 0!==e.response&&(t.response=Object.prototype.toString.call(e.response))}return t}}var hv=i.Promise,pv=Sd,gv=me,mv=TypeError,yv=Bt,vv=function(e){if(pv(e))return e;throw mv(gv(e)+" is not a constructor")},Av=j,bv=nt("species"),wv={},Sv=be,Ev=TypeError,xv=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Ev("Bad Promise constructor");t=e,n=r})),this.resolve=Sv(t),this.reject=Sv(n)};wv.f=function(e){return new xv(e)};var kv=Bt,Tv=V,Pv=wv,Rv=to,Cv=hv,Iv=a,Ov=X,Lv=F,Bv=function(e,t){var n,r=yv(e).constructor;return void 0===r||Av(n=yv(r)[bv])?t:vv(n)},jv=function(e,t){if(kv(e),Tv(t)&&t.constructor===e)return t;var n=Pv.f(e);return(0,n.resolve)(t),n.promise},Dv=Kn,Mv=Cv&&Cv.prototype;if(Rv({target:"Promise",proto:!0,real:!0,forced:!!Cv&&Iv((function(){Mv.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Bv(this,Ov("Promise")),n=Lv(e);return this.then(n?function(n){return jv(t,e()).then((function(){return n}))}:e,n?function(n){return jv(t,e()).then((function(){throw n}))}:e)}}),Lv(Cv)){var Uv=Ov("Promise").prototype.finally;Mv.finally!==Uv&&Dv(Mv,"finally",Uv,{unsafe:!0})}class Nv extends dv{constructor(){super(),t(this,"fetch",null),this.initProxyHandler()}reset(){this.fetch&&(window.fetch=this.fetch)}initProxyHandler(){const e=this,t=window.fetch;t&&(this.fetch=t,window.fetch=function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=t(n,r),i=Mg();e.createRequest(i);const s=e.getRequest(i);if(s){let t,a="GET",c=null;_g(n)||n instanceof URL?(a=r.method||"GET",t=n,c=r.headers||null):(a=n.method,t=n.url,c=n.headers),s.url=new URL(t,window.location.href).toString(),s.method=a.toUpperCase(),s.requestType="fetch",s.status=0,s.statusText="Pending",s.startTime=Date.now(),s.readyState=XMLHttpRequest.UNSENT,r.credentials&&"omit"!==r.credentials&&(s.withCredentials=!0),c&&(!function(e){return e instanceof Headers}(c)?Qg(c)?s.requestHeader=Object.entries(c).map((e=>{let[t,n]=e;return[String(t),String(n)]})):s.requestHeader=c.map((e=>{let[t,n]=e;return[String(t),String(n)]})):s.requestHeader=[...c.entries()]),"GET"!==s.method&&(s.requestHeader=ym(s.requestHeader,r.body),vm(r.body).then((t=>{s.requestPayload=t,e.sendRequestItem(i,s)}))),e.sendRequestItem(i,s),o.then((t=>{s.endTime=Date.now(),s.costTime=s.endTime-(s.startTime||s.endTime),s.status=t.status||200,s.statusText=t.statusText||"Done",s.responseHeader=[...t.headers.entries()],s.readyState=XMLHttpRequest.HEADERS_RECEIVED,e.sendRequestItem(i,s);const n=t.headers.get("content-type");if(n){if(n.includes("application/json"))return s.responseType="json",t.clone().text();if(n.includes("text/html")||n.includes("text/plain"))return s.responseType="text",t.clone().text()}return s.responseType="blob",t.clone().blob()})).then((async e=>{switch(s.responseType){case"text":case"json":try{s.response=JSON.parse(e)}catch(t){s.response=e,s.responseType="text"}break;case"blob":const t=e;if(t.size<=fm)try{s.response=await rm(t)}catch(e){s.response=await t.text(),tm.error(e.message)}else s.response="[object Blob]",s.responseReason=hm}})).finally((()=>{s.readyState=XMLHttpRequest.DONE,e.sendRequestItem(i,s)}))}else tm.warn("The request object is not found on window.fetch event");return o})}}class qv extends dv{constructor(){super(),t(this,"sendBeacon",null),this.initProxyHandler()}reset(){this.sendBeacon&&(window.navigator.sendBeacon=this.sendBeacon)}initProxyHandler(){const e=window.navigator.sendBeacon;if(!e)return;const t=this;this.sendBeacon=e,window.navigator.sendBeacon=function(n,r){const o=e.call(window.navigator,n,r),i=Mg();t.createRequest(i);const s=t.getRequest(i);return s?(s.url=new URL(n,window.location.href).toString(),s.method="POST",s.status=0,s.statusText="Pending",s.requestType="ping",s.requestHeader=ym(s.requestHeader,r),s.startTime=Date.now(),vm(r).then((e=>{s.requestPayload=e,t.sendRequestItem(i,s)})),s.response="",o?(s.status=200,s.statusText="Sent",s.endTime=Date.now(),s.costTime=s.endTime-(s.startTime||s.endTime)):(s.status=500,s.statusText="Unknown"),s.readyState=XMLHttpRequest.DONE,t.sendRequestItem(i,s)):tm.warn("The request object is not on navigator.sendBeacon event"),o}}}const _v=window.EventSource;class Hv extends dv{constructor(){super(),this.initProxyHandler()}initProxyHandler(){if(!window.EventSource)return;const e=this;window.EventSource=class{constructor(n,r){t(this,"content",'The "window.EventSource" is being proxied by PageSpy\'s NetworkPlugin.');const o=Mg(),i=new lm(o);i.url=new URL(n,window.location.href).toString(),i.method="GET",i.requestType="eventsource",i.requestHeader=[["Accept","text/event-stream"],["Cache-Control","no-cache"]],i.readyState=pm.UNSENT,i.withCredentials=Boolean(null==r?void 0:r.withCredentials),i.responseHeader=[["Content-Type","text/event-stream"]],i.responseType="text",i.startTime=Date.now(),this.es=new _v(n,r),this.es.addEventListener("open",(()=>{i.readyState=pm.OPENED,i.endTime=Date.now(),i.costTime=i.endTime-i.startTime,e.sendRequestItem(o,i)})),this.es.addEventListener("message",(t=>{let{data:n}=t;i.status=200,i.statusText="Done",i.readyState=pm.DONE,i.response=n,i.endTime=Date.now(),i.costTime=i.endTime-i.startTime,e.sendRequestItem(o,i)})),this.es.addEventListener("error",(()=>{i.status=400,i.readyState=pm.DONE,i.endTime=Date.now(),i.costTime=i.endTime-i.startTime,e.sendRequestItem(o,i)}));const s=this;return new Proxy(s,{get(e,t){if(t in e)return e[t];const n=e.es[t];return"function"==typeof n?n.bind(s.es):n}})}}}reset(){window.EventSource=_v}}class zv{constructor(){t(this,"name","NetworkPlugin"),t(this,"xhrProxy",null),t(this,"fetchProxy",null),t(this,"beaconProxy",null),t(this,"sseProxy",null)}onInit(e){let{config:t}=e;zv.hasInitd||(zv.hasInitd=!0,Am.dataProcessor=t.dataProcessor.network,this.xhrProxy=new fv,this.fetchProxy=new Nv,this.beaconProxy=new qv,this.sseProxy=new Hv)}onReset(){var e,t,n,r;null===(e=this.xhrProxy)||void 0===e||e.reset(),null===(t=this.fetchProxy)||void 0===t||t.reset(),null===(n=this.beaconProxy)||void 0===n||n.reset(),null===(r=this.sseProxy)||void 0===r||r.reset(),zv.hasInitd=!1}}t(zv,"hasInitd",!1);var Qv=i,Fv=Ai;to({global:!0},{Reflect:{}}),Fv(Qv.Reflect,"Reflect",!0);var Wv;
/*! modernizr 4.0.0-alpha (Custom Build) | MIT *
   * https://modernizr.com/download/?-apng-arrow-avif-beacon-blobworkers-clipboard-contextmenu-cookies-cors-customevent-datachannel-dataworkers-es6array-es6class-es6collections-es6math-es6number-es6object-es6string-es6symbol-es7array-es8object-eventlistener-exiforientation-fetch-forcetouch-generators-getusermedia-hashchange-history-imgcrossorigin-indexeddb-jpeg2000-lazyloading-localstorage-messagechannel-oninput-peerconnection-performance-pointerevents-postmessage-prefetch-promises-proxy-queryselector-requestanimationframe-resizeobserver-restdestructuringarray_restdestructuringobject-restparameters-sandbox-scriptasync-scriptdefer-seamless-serviceworker-sessionstorage-sharedworkers-spreadarray-spreadobject-srcdoc-stringtemplate-transferables-webanimations-webgl-webp-websqldatabase-webworkers-addtest-atrule-domprefixes-hasevent-load-mq-prefixed-prefixedcss-prefixes-printshiv-setclasses-testallprops-testprop-teststyles !*/Wv={exports:{}},function(e,t,n,r){function o(e,t){return typeof e===t}function i(e){var t=E.className,n=A._config.classPrefix||"";if(x&&(t=t.baseVal),A._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}A._config.enableClasses&&(e.length>0&&(t+=" "+n+e.join(" "+n)),x?E.className.baseVal=t:E.className=t)}function s(e,t){if("object"==typeof e)for(var n in e)b(e,n)&&s(n,e[n]);else{var r=(e=e.toLowerCase()).split("."),o=A[r[0]];if(2===r.length&&(o=o[r[1]]),void 0!==o)return A;t="function"==typeof t?t():t,1===r.length?A[r[0]]=t:(!A[r[0]]||A[r[0]]instanceof Boolean||(A[r[0]]=new Boolean(A[r[0]])),A[r[0]][r[1]]=t),i([(t&&!1!==t?"":"no-")+r.join("-")]),A._trigger(e,t)}return A}function a(){return"function"!=typeof n.createElement?n.createElement(arguments[0]):x?n.createElementNS.call(n,"http://www.w3.org/2000/svg",arguments[0]):n.createElement.apply(n,arguments)}function c(e,t,r,o){var i,s,c,u,l="modernizr",d=a("div"),f=function(){var e=n.body;return e||((e=a(x?"svg":"body")).fake=!0),e}();if(parseInt(r,10))for(;r--;)(c=a("div")).id=o?o[r]:l+(r+1),d.appendChild(c);return(i=a("style")).type="text/css",i.id="s"+l,(f.fake?f:d).appendChild(i),f.appendChild(d),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(n.createTextNode(e)),d.id=l,f.fake&&(f.style.background="",f.style.overflow="hidden",u=E.style.overflow,E.style.overflow="hidden",E.appendChild(f)),s=t(d,e),f.fake&&f.parentNode?(f.parentNode.removeChild(f),E.style.overflow=u,E.offsetHeight):d.parentNode.removeChild(d),!!s}function u(e,n,r){var o;if("getComputedStyle"in t){o=getComputedStyle.call(t,e,n);var i=t.console;null!==o?r&&(o=o.getPropertyValue(r)):i&&i[i.error?"error":"log"].call(i,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}else o=!n&&e.currentStyle&&e.currentStyle[r];return o}function l(e,t){return!!~(""+e).indexOf(t)}function d(e){return e.replace(/([A-Z])/g,(function(e,t){return"-"+t.toLowerCase()})).replace(/^ms-/,"-ms-")}function f(e){return e.replace(/([a-z])-([a-z])/g,(function(e,t,n){return t+n.toUpperCase()})).replace(/^-/,"")}function h(e,n,i,s){function h(){g&&(delete D.style,delete D.modElem)}if(s=!o(s,"undefined")&&s,!o(i,"undefined")){var p=function(e,n){var o=e.length;if("CSS"in t&&"supports"in t.CSS){for(;o--;)if(t.CSS.supports(d(e[o]),n))return!0;return!1}if("CSSSupportsRule"in t){for(var i=[];o--;)i.push("("+d(e[o])+":"+n+")");return c("@supports ("+(i=i.join(" or "))+") { #modernizr { position: absolute; } }",(function(e){return"absolute"===u(e,null,"position")}))}return r}(e,i);if(!o(p,"undefined"))return p}for(var g,m,y,v,A,b=["modernizr","tspan","samp"];!D.style&&b.length;)g=!0,D.modElem=a(b.shift()),D.style=D.modElem.style;for(y=e.length,m=0;m<y;m++)if(v=e[m],A=D.style[v],l(v,"-")&&(v=f(v)),D.style[v]!==r){if(s||o(i,"undefined"))return h(),"pfx"!==n||v;try{D.style[v]=i}catch(e){}if(D.style[v]!==A)return h(),"pfx"!==n||v}return h(),!1}function p(e,t){return function(){return e.apply(t,arguments)}}function g(e,t,n,r,i){var s=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+T.join(s+" ")+s).split(" ");return o(t,"string")||o(t,"undefined")?h(a,t,r,i):function(e,t,n){var r;for(var i in e)if(e[i]in t)return!1===n?e[i]:o(r=t[e[i]],"function")?p(r,n||t):r;return!1}(a=(e+" "+R.join(s+" ")+s).split(" "),t,n)}function m(e,t){var n=e.deleteDatabase(t);n.onsuccess=function(){s("indexeddb.deletedatabase",!0)},n.onerror=function(){s("indexeddb.deletedatabase",!1)}}var y=[],v={_version:"4.0.0-alpha",_config:{classPrefix:"",enableClasses:!1,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout((function(){t(n[e])}),0)},addTest:function(e,t,n){y.push({name:e,fn:t,options:n})},addAsyncTest:function(e){y.push({name:null,fn:e})}},A=function(){};A.prototype=v,A=new A;var b,w,S=[],E=n.documentElement,x="svg"===E.nodeName.toLowerCase();b=o(w={}.hasOwnProperty,"undefined")||o(w.call,"undefined")?function(e,t){return t in e&&o(e.constructor.prototype[t],"undefined")}:function(e,t){return w.call(e,t)},v._l={},v.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),A.hasOwnProperty(e)&&setTimeout((function(){A._trigger(e,A[e])}),0)},v._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout((function(){var e;for(e=0;e<n.length;e++)(0,n[e])(t)}),0),delete this._l[e]}},A._q.push((function(){v.addTest=s}));var k="Moz O ms Webkit",T=v._config.usePrefixes?k.split(" "):[];v._cssomPrefixes=T;var P=function(e){var n,o=U.length,i=t.CSSRule;if(void 0===i)return r;if(!e)return!1;if((n=(e=e.replace(/^@/,"")).replace(/-/g,"_").toUpperCase()+"_RULE")in i)return"@"+e;for(var s=0;s<o;s++){var a=U[s];if(a.toUpperCase()+"_"+n in i)return"@-"+a.toLowerCase()+"-"+e}return!1};v.atRule=P;var R=v._config.usePrefixes?k.toLowerCase().split(" "):[];v._domPrefixes=R;var C,I=(C=!("onblur"in E),function(e,t){var n;return!!e&&(t&&"string"!=typeof t||(t=a(t||"div")),!(n=(e="on"+e)in t)&&C&&(t.setAttribute||(t=a("div")),t.setAttribute(e,""),n="function"==typeof t[e],t[e]!==r&&(t[e]=r),t.removeAttribute(e)),n)});v.hasEvent=I,x||function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=b.elements;return"string"==typeof e?e.split(" "):e}function o(e){var t=A[e[y]];return t||(t={},v++,e[y]=v,A[v]=t),t}function i(e,n,r){return n||(n=t),h?n.createElement(e):(r||(r=o(n)),!(i=r.cache[e]?r.cache[e].cloneNode():m.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e)).canHaveChildren||g.test(e)||i.tagUrn?i:r.frag.appendChild(i));var i}function s(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return b.shivMethods?i(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,(function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'}))+");return n}")(b,t.frag)}function a(e){e||(e=t);var r=o(e);return!b.shivCSS||f||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),h||s(e,r),e}function c(e){for(var t,n=e.getElementsByTagName("*"),o=n.length,i=RegExp("^(?:"+r().join("|")+")$","i"),s=[];o--;)t=n[o],i.test(t.nodeName)&&s.push(t.applyElement(u(t)));return s}function u(e){for(var t,n=e.attributes,r=n.length,o=e.ownerDocument.createElement(S+":"+e.nodeName);r--;)(t=n[r]).specified&&o.setAttribute(t.nodeName,t.nodeValue);return o.style.cssText=e.style.cssText,o}function l(e){for(var t,n=e.split("{"),o=n.length,i=RegExp("(^|[\\s,>+~])("+r().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),s="$1"+S+"\\:$2";o--;)(t=n[o]=n[o].split("}"))[t.length-1]=t[t.length-1].replace(i,s),n[o]=t.join("}");return n.join("{")}function d(e){function t(){clearTimeout(s._removeSheetTimer),r&&r.removeNode(!0),r=null}var r,i,s=o(e),a=e.namespaces,u=e.parentWindow;return!E||e.printShived||(void 0===a[S]&&a.add(S),u.attachEvent("onbeforeprint",(function(){t();for(var o,s,a,u=e.styleSheets,d=[],f=u.length,h=Array(f);f--;)h[f]=u[f];for(;a=h.pop();)if(!a.disabled&&w.test(a.media)){try{s=(o=a.imports).length}catch(e){s=0}for(f=0;f<s;f++)h.push(o[f]);try{d.push(a.cssText)}catch(e){}}d=l(d.reverse().join("")),i=c(e),r=n(e,d)})),u.attachEvent("onafterprint",(function(){(function(e){for(var t=e.length;t--;)e[t].removeNode()})(i),clearTimeout(s._removeSheetTimer),s._removeSheetTimer=setTimeout(t,500)})),e.printShived=!0),e}var f,h,p=e.html5||{},g=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,m=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,y="_html5shiv",v=0,A={};!function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",f="hidden"in e,h=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return void 0===e.cloneNode||void 0===e.createDocumentFragment||void 0===e.createElement}()}catch(e){f=!0,h=!0}}();var b={elements:p.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:"3.7.3",shivCSS:!1!==p.shivCSS,supportsUnknownElements:h,shivMethods:!1!==p.shivMethods,type:"default",shivDocument:a,createElement:i,createDocumentFragment:function(e,n){if(e||(e=t),h)return e.createDocumentFragment();for(var i=(n=n||o(e)).frag.cloneNode(),s=0,a=r(),c=a.length;s<c;s++)i.createElement(a[s]);return i},addElements:function(e,t){var n=b.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),b.elements=n+" "+e,a(t)}};e.html5=b,a(t);var w=/^$|\b(?:all|print)\b/,S="html5shiv",E=!h&&function(){var n=t.documentElement;return!(void 0===t.namespaces||void 0===t.parentWindow||void 0===n.applyElement||void 0===n.removeNode||void 0===e.attachEvent)}();b.type+=" print",b.shivPrint=d,d(t),Wv.exports&&(Wv.exports=b)}(void 0!==t?t:this,n);var O=function(){},L=function(){};t.console&&(O=function(){var e=console.error?"error":"log";t.console[e].apply(t.console,Array.prototype.slice.call(arguments))},L=function(){var e=console.warn?"warn":"log";t.console[e].apply(t.console,Array.prototype.slice.call(arguments))}),v.load=function(){"yepnope"in t?(L("yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. yepnope appears to be available on the page, so we’ll use it to handle this call to Modernizr.load, but please update your code to use yepnope directly.\n See http://github.com/Modernizr/Modernizr/issues/1182 for more information."),t.yepnope.apply(t,[].slice.call(arguments,0))):O("yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. Get it from http://yepnopejs.com. See http://github.com/Modernizr/Modernizr/issues/1182 for more information.")};var B=function(){var e=t.matchMedia||t.msMatchMedia;return e?function(t){var n=e(t);return n&&n.matches||!1}:function(e){var t=!1;return c("@media "+e+" { #modernizr { position: absolute; } }",(function(e){t="absolute"===u(e,null,"position")})),t}}();v.mq=B;var j={elem:a("modernizr")};A._q.push((function(){delete j.elem}));var D={style:j.elem.style};A._q.unshift((function(){delete D.style})),v.testAllProps=g;var M=v.prefixed=function(e,t,n){return 0===e.indexOf("@")?P(e):(-1!==e.indexOf("-")&&(e=f(e)),t?g(e,t,n):g(e,"pfx"))},U=v._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];v._prefixes=U,v.prefixedCSS=function(e){var t=M(e);return t&&d(t)},v.testAllProps=function(e,t,n){return g(e,r,r,t,n)},v.testProp=function(e,t,n){return h([e],r,t,n)},v.testStyles=c,A.addAsyncTest((function(){var e,t=["read","readText","write","writeText"];if(navigator.clipboard){s("clipboard",!0);for(var n=0;n<t.length;n++)e=!!navigator.clipboard[t[n]],s("clipboard."+t[n].toLowerCase(),e)}else s("clipboard",!1)})),A.addTest("contextmenu","contextMenu"in E&&"HTMLMenuItemElement"in t),A.addTest("cors","XMLHttpRequest"in t&&"withCredentials"in new XMLHttpRequest),A.addTest("es6array",!!(Array.prototype&&Array.prototype.copyWithin&&Array.prototype.fill&&Array.prototype.find&&Array.prototype.findIndex&&Array.prototype.keys&&Array.prototype.entries&&Array.prototype.values&&Array.from&&Array.of)),A.addTest("arrow",(function(){try{(0,eval)("()=>{}")}catch(e){return!1}return!0})),A.addTest("es6class",(function(){try{(0,eval)("class A{}")}catch(e){return!1}return!0})),A.addTest("es6collections",!!(t.Map&&t.Set&&t.WeakMap&&t.WeakSet)),A.addTest("generators",(function(){try{new Function("function* test() {}")()}catch(e){return!1}return!0})),A.addTest("es6math",!!(Math&&Math.clz32&&Math.cbrt&&Math.imul&&Math.sign&&Math.log10&&Math.log2&&Math.log1p&&Math.expm1&&Math.cosh&&Math.sinh&&Math.tanh&&Math.acosh&&Math.asinh&&Math.atanh&&Math.hypot&&Math.trunc&&Math.fround)),A.addTest("es6number",!!(Number.isFinite&&Number.isInteger&&Number.isSafeInteger&&Number.isNaN&&Number.parseInt&&Number.parseFloat&&Number.isInteger(Number.MAX_SAFE_INTEGER)&&Number.isInteger(Number.MIN_SAFE_INTEGER)&&Number.isFinite(Number.EPSILON))),A.addTest("es6object",!!(Object.assign&&Object.is&&Object.setPrototypeOf)),A.addTest("promises",(function(){return"Promise"in t&&"resolve"in t.Promise&&"reject"in t.Promise&&"all"in t.Promise&&"race"in t.Promise&&function(){var e;return new t.Promise((function(t){e=t})),"function"==typeof e}()})),A.addTest("restparameters",(function(){try{(0,eval)("function f(...rest) {}")}catch(e){return!1}return!0})),A.addTest("spreadarray",(function(){try{(0,eval)("(function f(){})(...[1])")}catch(e){return!1}return!0})),A.addTest("stringtemplate",(function(){try{return"-1-"===(0,eval)("(function(){var a=1; return `-${a}-`;})()")}catch(e){return!1}})),A.addTest("es6string",!!(String.fromCodePoint&&String.raw&&String.prototype.codePointAt&&String.prototype.repeat&&String.prototype.startsWith&&String.prototype.endsWith&&String.prototype.includes)),A.addTest("es6symbol",!!("function"==typeof Symbol&&Symbol.for&&Symbol.hasInstance&&Symbol.isConcatSpreadable&&Symbol.iterator&&Symbol.keyFor&&Symbol.match&&Symbol.prototype&&Symbol.replace&&Symbol.search&&Symbol.species&&Symbol.split&&Symbol.toPrimitive&&Symbol.toStringTag&&Symbol.unscopables)),A.addTest("es7array",!(!Array.prototype||!Array.prototype.includes)),A.addTest("restdestructuringarray",(function(){try{(0,eval)("var [...rest]=[1]")}catch(e){return!1}return!0})),A.addTest("restdestructuringobject",(function(){try{(0,eval)("var {...rest}={a:1}")}catch(e){return!1}return!0})),A.addTest("spreadobject",(function(){try{(0,eval)("var a={...{b:1}}")}catch(e){return!1}return!0})),A.addTest("es8object",!(!Object.entries||!Object.values)),A.addTest("customevent","CustomEvent"in t&&"function"==typeof t.CustomEvent),A.addTest("eventlistener","addEventListener"in t),A.addTest("forcetouch",(function(){return!!I(M("mouseforcewillbegin",t,!1),t)&&MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN&&MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN})),A.addTest("hashchange",(function(){return!1!==I("hashchange",t)&&(n.documentMode===r||n.documentMode>7)})),A.addTest("oninput",(function(){var e,r=a("input");if(r.setAttribute("oninput","return"),r.style.cssText="position:fixed;top:0;",I("oninput",E)||"function"==typeof r.oninput)return!0;try{var o=n.createEvent("KeyboardEvent");e=!1;var i=function(t){e=!0,t.preventDefault(),t.stopPropagation()};o.initKeyEvent("keypress",!0,!0,t,!1,!1,!1,!1,0,"e".charCodeAt(0)),E.appendChild(r),r.addEventListener("input",i,!1),r.focus(),r.dispatchEvent(o),r.removeEventListener("input",i,!1),E.removeChild(r)}catch(r){e=!1}return e}));var N=[""].concat(R);v._domPrefixesAll=N,A.addTest("pointerevents",(function(){for(var e=0,t=N.length;e<t;e++)if(I(N[e]+"pointerdown"))return!0;return!1})),A.addTest("history",(function(){var e=navigator.userAgent;return!!e&&(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone")||"file:"===location.protocol)&&t.history&&"pushState"in t.history})),A.addTest("sandbox","sandbox"in a("iframe")),A.addTest("seamless","seamless"in a("iframe")),A.addTest("srcdoc","srcdoc"in a("iframe")),A.addTest("canvas",(function(){var e=a("canvas");return!(!e.getContext||!e.getContext("2d"))})),A.addAsyncTest((function(){if(!A.canvas)return!1;var e=new Image,t=a("canvas"),n=t.getContext("2d");e.onload=function(){s("apng",(function(){return void 0!==t.getContext&&(n.drawImage(e,0,0),0===n.getImageData(0,0,1,1).data[3])}))},e.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg=="})),A.addAsyncTest((function(){var e=new Image;e.onload=e.onerror=function(){s("avif",1===e.width)},e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAAEcbWV0YQAAAAAAAABIaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGNhdmlmIC0gaHR0cHM6Ly9naXRodWIuY29tL2xpbmstdS9jYXZpZgAAAAAeaWxvYwAAAAAEQAABAAEAAAAAAUQAAQAAABcAAAAqaWluZgEAAAAAAAABAAAAGmluZmUCAAAAAAEAAGF2MDFJbWFnZQAAAAAOcGl0bQAAAAAAAQAAAHJpcHJwAAAAUmlwY28AAAAQcGFzcAAAAAEAAAABAAAAFGlzcGUAAAAAAAAAAQAAAAEAAAAQcGl4aQAAAAADCAgIAAAAFmF2MUOBAAwACggYAAYICGgIIAAAABhpcG1hAAAAAAAAAAEAAQUBAoMDhAAAAB9tZGF0CggYAAYICGgIIBoFHiAAAEQiBACwDoA="})),A.addTest("imgcrossorigin","crossOrigin"in a("img")),A.addAsyncTest((function(){var e=new Image;e.onerror=function(){s("exiforientation",!1)},e.onload=function(){s("exiforientation",2!==e.width)},e.src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QAiRXhpZgAASUkqAAgAAAABABIBAwABAAAABgASAAAAAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAABAAIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+/iiiigD/2Q=="})),A.addAsyncTest((function(){var e=new Image;e.onload=e.onerror=function(){s("jpeg2000",1===e.width)},e.src="data:image/jp2;base64,/0//UQAyAAAAAAABAAAAAgAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAEBwEBBwEBBwEBBwEB/1IADAAAAAEAAAQEAAH/XAAEQED/ZAAlAAFDcmVhdGVkIGJ5IE9wZW5KUEVHIHZlcnNpb24gMi4wLjD/kAAKAAAAAABYAAH/UwAJAQAABAQAAf9dAAUBQED/UwAJAgAABAQAAf9dAAUCQED/UwAJAwAABAQAAf9dAAUDQED/k8+kEAGvz6QQAa/PpBABr994EAk//9k="})),A.addTest("lazyloading","loading"in HTMLImageElement.prototype),A.addAsyncTest((function(){function e(e,t,n){function r(t){var r=!(!t||"load"!==t.type)&&1===o.width;s(e,"webp"===e&&r?new Boolean(r):r),n&&n(t)}var o=new Image;o.onerror=r,o.onload=r,o.src=t}var t=[{uri:"data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=",name:"webp"},{uri:"data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==",name:"webp.alpha"},{uri:"data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA",name:"webp.animation"},{uri:"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=",name:"webp.lossless"}],n=t.shift();e(n.name,n.uri,(function(n){if(n&&"load"===n.type)for(var r=0;r<t.length;r++)e(t[r].name,t[r].uri)}))})),A.addTest("messagechannel","MessageChannel"in t),A.addTest("beacon","sendBeacon"in navigator),A.addTest("fetch","fetch"in t),A.addTest("performance",!!M("performance",t));var q=!0;try{t.postMessage({toString:function(){q=!1}},"*")}catch(w){}A.addTest("postmessage",new Boolean("postMessage"in t)),A.addTest("postmessage.structuredclones",q),A.addTest("proxy","Proxy"in t),A.addTest("queryselector","querySelector"in n&&"querySelectorAll"in n),A.addTest("prefetch",(function(){if(11===n.documentMode)return!0;var e=a("link").relList;return!(!e||!e.supports)&&e.supports("prefetch")})),A.addTest("requestanimationframe",!!M("requestAnimationFrame",t),{aliases:["raf"]}),A.addTest("scriptasync","async"in a("script")),A.addTest("scriptdefer","defer"in a("script")),A.addTest("serviceworker","serviceWorker"in navigator),A.addTest("cookies",(function(){try{n.cookie="cookietest=1";var e=-1!==n.cookie.indexOf("cookietest=");return n.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}})),A.addAsyncTest((function(){var e;try{e=M("indexedDB",t)}catch(e){}if(e){var n,r="modernizr-"+Math.random();try{n=e.open(r)}catch(e){return void s("indexeddb",!1)}n.onerror=function(t){!n.error||"InvalidStateError"!==n.error.name&&"UnknownError"!==n.error.name?(s("indexeddb",!0),m(e,r)):(s("indexeddb",!1),t.preventDefault())},n.onsuccess=function(){s("indexeddb",!0),m(e,r)}}else s("indexeddb",!1)})),A.addTest("localstorage",(function(){var e="modernizr";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}})),A.addTest("sessionstorage",(function(){var e="modernizr";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){return!1}})),A.addTest("websqldatabase","openDatabase"in t),A.addTest("webanimations","animate"in a("div")),A.addTest("webgl",(function(){return"WebGLRenderingContext"in t})),A.addTest("peerconnection",!!M("RTCPeerConnection",t)),A.addTest("datachannel",(function(){if(!A.peerconnection)return!1;for(var e=0,n=N.length;e<n;e++){var r=t[N[e]+"RTCPeerConnection"];if(r)try{return"createDataChannel"in new r({})}catch(e){}}return!1})),A.addTest("getUserMedia","mediaDevices"in navigator&&"getUserMedia"in navigator.mediaDevices),A.addTest("resizeobserver","ResizeObserver"in t),A.addAsyncTest((function(){function e(){s("blobworkers",!1),n()}function n(){u&&o.revokeObjectURL(u),c&&c.terminate(),l&&clearTimeout(l)}try{var r=t.BlobBuilder,o=t.URL;A._config.usePrefix&&(r=r||t.MozBlobBuilder||t.WebKitBlobBuilder||t.MSBlobBuilder||t.OBlobBuilder,o=o||t.MozURL||t.webkitURL||t.MSURL||t.OURL);var i,a,c,u,l,d="this.onmessage=function(e){postMessage(e.data)}";try{i=new Blob([d],{type:"text/javascript"})}catch(e){}i||((a=new r).append(d),i=a.getBlob()),u=o.createObjectURL(i),(c=new Worker(u)).onmessage=function(e){s("blobworkers","Modernizr"===e.data),n()},c.onerror=e,l=setTimeout(e,200),c.postMessage("Modernizr")}catch(n){e()}})),A.addAsyncTest((function(){try{var e=new Worker("data:text/javascript;base64,dGhpcy5vbm1lc3NhZ2U9ZnVuY3Rpb24oZSl7cG9zdE1lc3NhZ2UoZS5kYXRhKX0=");e.onmessage=function(t){e.terminate(),s("dataworkers","Modernizr"===t.data),e=null},e.onerror=function(){s("dataworkers",!1),e=null},setTimeout((function(){s("dataworkers",!1)}),200),e.postMessage("Modernizr")}catch(e){setTimeout((function(){s("dataworkers",!1)}),0)}})),A.addTest("sharedworkers","SharedWorker"in t),A.addTest("blobconstructor",(function(){try{return!!new Blob}catch(e){return!1}}),{aliases:["blob-constructor"]});var _=M("URL",t,!1);_=_&&t[_],A.addTest("bloburls",_&&"revokeObjectURL"in _&&"createObjectURL"in _),A.addTest("webworkers","Worker"in t),A.addTest("typedarrays","ArrayBuffer"in t),A.addAsyncTest((function(){function e(){s("transferables",!1),t()}function t(){i&&URL.revokeObjectURL(i),a&&a.terminate(),r&&clearTimeout(r)}if(!(A.blobconstructor&&A.bloburls&&A.webworkers&&A.typedarrays))return s("transferables",!1);try{var n,r,o=new Blob(['var hello = "world"'],{type:"text/javascript"}),i=URL.createObjectURL(o),a=new Worker(i);a.onerror=e,r=setTimeout(e,200),n=new ArrayBuffer(1),a.postMessage(n,[n]),s("transferables",0===n.byteLength),t()}catch(t){e()}})),function(){var e,t,n,r,i,s;for(var a in y)if(y.hasOwnProperty(a)){if(e=[],(t=y[a]).name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(r=o(t.fn,"function")?t.fn():t.fn,i=0;i<e.length;i++)1===(s=e[i].split(".")).length?A[s[0]]=r:(A[s[0]]&&(!A[s[0]]||A[s[0]]instanceof Boolean)||(A[s[0]]=new Boolean(A[s[0]])),A[s[0]][s[1]]=r),S.push((r?"":"no-")+s.join("-"))}}(),i(S),delete v.addTest,delete v.addAsyncTest;for(var H=0;H<A._q.length;H++)A._q[H]();e.Modernizr=A}(window,window,document);const Gv={Element:{sandbox:{title:"iframe/sandbox",keyPath:"iframe/sandbox"},srcdoc:{title:"iframe/srcdoc",keyPath:"iframe/srcdoc"},apng:{title:"img/apng",keyPath:"img/apng"},avif:{title:"img/avif",keyPath:"img/avif"},imgcrossorigin:{title:"img/crossorigin",keyPath:"img/crossorigin"},exiforientation:{title:"img/exif-orientation",keyPath:"img/exif-orientation"},lazyloading:{title:"img/lazyloading",keyPath:"img/lazyloading"},webp:{title:"img/webp",keyPath:"img/webp"},prefetch:{title:"link/prefetch",keyPath:"link/prefetch"},scriptasync:{title:"script/async",keyPath:"script/async"},scriptdefer:{title:"script/defer",keyPath:"script/defer"}},Feature:{clipboard:{title:"Clipboard",keyPath:"clipboard"},customevent:{title:"Custom Event",keyPath:"event/customevent"},eventlistener:{title:"Eventlistener",keyPath:"event/eventlistener"},forcetouch:{title:"Force Touch",keyPath:"event/forcetouch"},hashchange:{title:"Hash Change",keyPath:"event/hashchange"},oninput:{title:"Input Event",keyPath:"event/oninput"},pointerevents:{title:"Pointer Event",keyPath:"event/forcetouch"},history:{title:"History",keyPath:"history"},messagechannel:{title:"Message Channel",keyPath:"messagechannel"},postmessage:{title:"Postmessage",keyPath:"postmessage"},performance:{title:"Performance API",keyPath:"performance"},queryselector:{title:"queryselector",keyPath:"queryselector"},requestanimationframe:{title:"requestanimationframe",keyPath:"requestanimationframe"},serviceworker:{title:"Service Worker",keyPath:"serviceworker"},webanimations:{title:"Web Animation",keyPath:"webanimations"},webgl:{title:"WebGL",keyPath:"webgl/webgl"},datachannel:{title:"WebRTC/datachannel",keyPath:"webrtc/datachannel"},getusermedia:{title:"WebRTC/getusermedia",keyPath:"webrtc/getusermedia"},peerconnection:{title:"WebRTC/peerconnection",keyPath:"webrtc/peerconnection"},resizeobserver:{title:"Resizeobserver",keyPath:"window/resizeobserver"},sharedworkers:{title:"Shared Worker",keyPath:"workers/sharedworkers"},webworkers:{title:"Web Worker",keyPath:"workers/webworkers"}},Network:{cors:{title:"Cors",keyPath:"cors"},beacon:{title:"Beacon",keyPath:"network/beacon"},fetch:{title:"Fetch",keyPath:"network/fetch"}},Javascript:{es6array:{title:"ES6 Array",keyPath:"es6/array"},arrow:{title:"ES6 Arrow Function",keyPath:"es6/arrow"},es6class:{title:"ES6 Class",keyPath:"es6/class"},es6collections:{title:"ES6 Collections",keyPath:"es6/collections"},generators:{title:"ES6 Generators",keyPath:"es6/generators"},es6math:{title:"ES6 Math",keyPath:"es6/math"},es6number:{title:"ES6 Number",keyPath:"es6/number"},es6object:{title:"ES6 Object",keyPath:"es6/object"},promises:{title:"ES6 Promise",keyPath:"es6/promises"},restparameters:{title:"ES6 Rest Parameters",keyPath:"es6/rest-parameters"},spreadarray:{title:"ES6 Array Spread",keyPath:"es6/spread-array"},stringtemplate:{title:"ES6 String Template",keyPath:"es6/string-template"},es6string:{title:"ES6 String",keyPath:"es6/string"},es6symbol:{title:"ES6 Symbol",keyPath:"es6/symbol"},proxy:{title:"ES6 Proxy",keyPath:"proxy"},reflect:{title:"ES6 Reflect",customTest:"\"Reflect\" in window &&\n      typeof window.Reflect === 'object' &&\n      typeof Reflect.has === 'function' &&\n      [\n        'apply',\n        'construct',\n        'defineProperty',\n        'deleteProperty',\n        'getOwnPropertyDescriptor',\n        'getPrototypeOf',\n        'has',\n        'isExtensible',\n        'ownKeys',\n        'preventExtensions',\n        'setPrototypeOf',\n      ].every((i) => Reflect.has(Reflect, i))"},es7array:{title:"ES7 Array",keyPath:"es7/array"},restdestructuringarray:{title:"ES7 Rest Destructuring",keyPath:"es7/rest-destructuring"},spreadobject:{title:"ES7 Object Spread",keyPath:"es7/spread-object"},es8object:{title:"ES8 Object",keyPath:"es8/object"},finally:{title:"ES9 Promise Finally",customTest:"<ES6 Promise> && !!Promise.prototype.finally"}},Storage:{cookies:{title:"Cookies",keyPath:"storage/cookies"},indexeddb:{title:"IndexedDB",keyPath:"storage/indexeddb"},localstorage:{title:"LocalStorage",keyPath:"storage/localstorage"},sessionstorage:{title:"SessionStorage",keyPath:"storage/sessionstorage"},websqldatabase:{title:"Web SQL Database",keyPath:"storage/websqldatabase"}}},Vv=["indexeddb","apng","avif","exiforientation","webp"];async function $v(){const e={Element:[],Feature:[],Network:[],Javascript:[],Storage:[]};Ug(Gv).forEach((t=>{const n=Gv[t],r=Ug(n).map((async e=>{const t=n[e];return t.keyPath&&(t.keyPath="".concat("https://github.com/Modernizr/Modernizr/tree/master/feature-detects","/").concat(t.keyPath,".js")),Vv.indexOf(e)>-1?t.supported=await function(e){return new Promise((t=>{Modernizr.on(e,(e=>{t(e)}))}))}(e):t.supported=Modernizr[e],t}));e[t]=r}));for(const t in e)qg(e,t)&&(e[t]=await Promise.all(e[t]));return e}window.Modernizr.addTest("finally",Modernizr.promises&&!!Promise.prototype.finally),window.Modernizr.addTest("reflect","Reflect"in window&&"object"==typeof window.Reflect&&"function"==typeof Reflect.has&&["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","setPrototypeOf"].every((e=>Reflect.has(Reflect,e))));class Jv{constructor(){t(this,"name","SystemPlugin"),t(this,"$pageSpyConfig",null)}onInit(e){let{config:t}=e;Jv.hasInitd||(Jv.hasInitd=!0,this.$pageSpyConfig=t,this.onceInitPublicData(),cv.addListener("refresh",(async(e,t)=>{let{source:n}=e;const{data:r}=n;if("system"===r){const e=await this.getSystemInfo();if(null===e)return;t(e)}})))}async onceInitPublicData(){const e=await this.getSystemInfo();null!==e&&cv.dispatchEvent("public-data",e)}onReset(){Jv.hasInitd=!1}async getSystemInfo(){var e,t;const n=await $v(),r={system:{ua:navigator.userAgent},features:n};return!1===(null===(e=this.$pageSpyConfig)||void 0===e||null===(e=e.dataProcessor)||void 0===e||null===(t=e.system)||void 0===t?void 0:t.call(e,r))?null:um("system",r)}}t(Jv,"hasInitd",!1);class Xv{constructor(){t(this,"name","PagePlugin"),t(this,"$pageSpyConfig",null)}onInit(e){let{config:t}=e;Xv.hasInitd||(Xv.hasInitd=!0,this.$pageSpyConfig=t,cv.addListener("refresh",((e,t)=>{let{source:n}=e;const{data:r}=n;if("page"===r){var o,i;const e=Xv.collectHtml();if(!1===(null===(o=this.$pageSpyConfig)||void 0===o||null===(o=o.dataProcessor)||void 0===o||null===(i=o.page)||void 0===i?void 0:i.call(o,e)))return;const n=um("page",e);cv.dispatchEvent("public-data",n),t(n)}})))}onReset(){Xv.hasInitd=!1}static collectHtml(){return{html:document.documentElement.outerHTML,location:window.location}}}t(Xv,"hasInitd",!1);class Yv{constructor(){t(this,"name","StoragePlugin"),t(this,"originSetItem",null),t(this,"originRemoveItem",null),t(this,"originClear",null),t(this,"cookieStoreChangeListener",null),t(this,"$pageSpyConfig",null)}onInit(e){let{config:t}=e;Yv.hasInitd||(Yv.hasInitd=!0,this.$pageSpyConfig=t,this.listenRefreshEvent(),this.onceInitPublicData(),this.initStorageProxy())}onReset(){this.originClear&&(Storage.prototype.clear=this.originClear),this.originRemoveItem&&(Storage.prototype.removeItem=this.originRemoveItem),this.originSetItem&&(Storage.prototype.setItem=this.originSetItem),this.cookieStoreChangeListener&&window.cookieStore&&window.cookieStore.removeEventListener("change",this.cookieStoreChangeListener),Yv.hasInitd=!1}async sendRefresh(e){let t=null;switch(e){case"localStorage":case"sessionStorage":t=this.takeStorage(e);break;case"cookie":t=await this.takeCookie()}t&&this.sendStorageItem(t)}listenRefreshEvent(){cv.addListener("refresh",(async e=>{let{source:t}=e;const{data:n}=t;this.sendRefresh(n)}))}takeStorage(e){const t={type:e,action:"get",data:[]},n=window[e],r=n.length;if(!r)return t;for(let e=0;e<=r-1;e++){const r=n.key(e);if(r){const e=n.getItem(r)||"";t.data.push({name:r,value:e})}}return t}async takeCookie(){const e={type:"cookie",action:"get",data:[]};return window.cookieStore?e.data=await window.cookieStore.getAll():e.data=document.cookie.split("; ").map((e=>{const[t,n]=e.split("=");return{name:t,value:n}})),e}initStorageProxy(){const{clear:e,removeItem:t,setItem:n}=Storage.prototype;this.originClear=e,this.originRemoveItem=t,this.originSetItem=n;const r=this;Storage.prototype.clear=function(){e.call(this);const t={type:r.getStorageType(this),action:"clear"};r.sendStorageItem(t)},Storage.prototype.removeItem=function(e){t.call(this,e);const n={type:r.getStorageType(this),action:"remove",name:String(e)};r.sendStorageItem(n)},Storage.prototype.setItem=function(e,t){n.call(this,e,t);const o={type:r.getStorageType(this),action:"set",name:String(e),value:String(t)};r.sendStorageItem(o)},window.cookieStore&&(this.cookieStoreChangeListener=e=>{const{changed:t,deleted:n}=e;t.length>0&&t.forEach((e=>{const t={type:"cookie",action:"set",...e};this.sendStorageItem(t)})),n.length>0&&n.forEach((e=>{const t={type:"cookie",action:"remove",name:e.name};this.sendStorageItem(t)}))},window.cookieStore.addEventListener("change",this.cookieStoreChangeListener))}async onceInitPublicData(){(await Promise.all([this.takeStorage("localStorage"),this.takeStorage("sessionStorage"),this.takeCookie()])).forEach((e=>{var t,n;if(!1===(null===(t=this.$pageSpyConfig)||void 0===t||null===(t=t.dataProcessor)||void 0===t||null===(n=t.storage)||void 0===n?void 0:n.call(t,e)))return;const r=um("storage",e);cv.dispatchEvent("public-data",r)}))}getStorageType(e){return e===localStorage?"localStorage":e===sessionStorage?"sessionStorage":e.constructor.name}sendStorageItem(e){var t,n;if(!1===(null===(t=this.$pageSpyConfig)||void 0===t||null===(t=t.dataProcessor)||void 0===t||null===(n=t.storage)||void 0===n?void 0:n.call(t,e)))return;const r=um("storage",e);cv.dispatchEvent("public-data",r),cv.broadcastMessage(r,!0)}}function Kv(e){return new Promise(((t,n)=>{e.addEventListener("success",(()=>{t(e.result)})),e.addEventListener("error",(()=>{n()}))}))}t(Yv,"hasInitd",!1);class Zv{constructor(){t(this,"name","DatabasePlugin"),t(this,"originAdd",null),t(this,"originPut",null),t(this,"originDelete",null),t(this,"originClear",null),t(this,"originDrop",null),t(this,"$pageSpyConfig",null)}static get isSupport(){return!!(IDBFactory&&IDBObjectStore&&window.indexedDB&&window.indexedDB.databases)}onInit(e){let{config:t}=e;Zv.isSupport&&(Zv.hasInitd||(Zv.hasInitd=!0,this.$pageSpyConfig=t,this.listenEvents(),this.initIndexedDBProxy()))}onReset(){this.originAdd&&(IDBObjectStore.prototype.add=this.originAdd),this.originPut&&(IDBObjectStore.prototype.put=this.originPut),this.originClear&&(IDBObjectStore.prototype.clear=this.originClear),this.originDelete&&(IDBObjectStore.prototype.delete=this.originDelete),this.originDrop&&(IDBFactory.prototype.deleteDatabase=this.originDrop),Zv.hasInitd=!1}listenEvents(){cv.addListener("refresh",(async e=>{let{source:t}=e;if("indexedDB"===t.data){const e={action:"basic",result:await this.takeBasicInfo()};this.sendData(e)}})),cv.addListener("database-pagination",(async e=>{let{source:t}=e;const{db:n,store:r,page:o}=t.data,i=await this.getStoreDataWithPagination({db:n,store:r,page:o});this.sendData(i)}))}initIndexedDBProxy(){const{put:e,add:t,delete:n,clear:r}=IDBObjectStore.prototype;this.originAdd=t,this.originPut=e,this.originDelete=n,this.originClear=r;const o=this;[{origin:e,method:"put"},{origin:t,method:"add"},{origin:n,method:"delete"},{origin:r,method:"clear"}].forEach((e=>{let{origin:t,method:n}=e;IDBObjectStore.prototype[n]=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];const s=t.apply(this,r),a={action:"clear"===n?"clear":"update",database:this.transaction.db.name,store:this.name};return s.addEventListener("success",(()=>{o.sendData(a)})),s}}));const i=IDBFactory.prototype.deleteDatabase;this.originDrop=i,IDBFactory.prototype.deleteDatabase=function(e){const t=i.call(this,e),n={action:"drop",database:e};return t.addEventListener("success",(()=>{o.sendData(n)})),t}}async takeBasicInfo(){const e=await window.indexedDB.databases();if(!e.length)return null;const t=e.filter((e=>e.name&&e.version));if(!t.length)return null;return(await Promise.all(t.map((e=>this.getDBData(e))))).filter(Boolean)}async getDBData(e){try{const t={name:e.name,version:e.version,stores:[]},n=await Kv(window.indexedDB.open(e.name,e.version));if(n.objectStoreNames.length){const e=[...n.objectStoreNames].map((e=>n.transaction(e,"readonly").objectStore(e)));t.stores=e.map((e=>{const{name:t,keyPath:n,autoIncrement:r,indexNames:o}=e;return{name:t,keyPath:n,autoIncrement:r,indexes:[...o]}}))}return t}catch(e){return tm.error("Failed to get indexedDB data, more info: ".concat(e.message)),null}}async getStoreDataWithPagination(e){let{db:t,store:n,page:r}=e;const o={action:"get",database:null,store:null,page:{current:r,prev:null,next:null},total:0,data:[]};if(r<1)return o;const i=await Kv(window.indexedDB.open(t)),s=i.transaction(n,"readonly").objectStore(n);o.database={name:i.name,version:i.version},o.store={name:s.name,keyPath:s.keyPath,autoIncrement:s.autoIncrement,indexes:[...s.indexNames]},o.total=await Kv(s.count());const a=50*(r-1),c=50*r;o.page.prev=r>1?r-1:null,o.page.next=a+50<o.total?r+1:null;let u=0;const l=s.openCursor();return new Promise(((e,t)=>{l.addEventListener("success",(()=>{const t=l.result;t?(u>=a&&u<c&&o.data.push({key:t.key,value:t.value}),u++,t.continue()):e(o)})),l.addEventListener("error",t)}))}sendData(e){var t,n;if(!1===(null===(t=this.$pageSpyConfig)||void 0===t||null===(t=t.dataProcessor)||void 0===t||null===(n=t.database)||void 0===n?void 0:n.call(t,e)))return;const r=um("database",e);cv.broadcastMessage(r,!0),["update","clear","drop"].includes(e.action)&&cv.dispatchEvent("public-data",r)}}t(Zv,"hasInitd",!1);const eA=e=>{const t=new URLSearchParams;return Object.entries(e).forEach((e=>{let[n,r]=e;t.append(n,String(r))})),t.toString()};class tA{constructor(e){if(this.config=e,!e.api)throw Error("The api base url cannot be empty")}get base(){return this.config.api}getScheme(){return this.config.enableSSL?["https://","wss://"]:["http://","ws://"]}createRoom(){const{project:e,title:t,useSecret:n,secret:r}=this.config,o=this.getScheme(),i=eA({name:navigator.userAgent,group:e,title:t});return fetch("".concat(o[0]).concat(this.base,"/api/v1/room/create?").concat(i),{method:"POST",body:JSON.stringify({useSecret:n,secret:r})}).then((e=>e.json())).then((e=>{const{name:t,address:n}=e.data||{};return{roomUrl:this.getRoomUrl(n),address:n,name:t}})).catch((e=>{throw Error("Request create room failed: ".concat(e.message))}))}getRoomUrl(e){const t=this.getScheme(),{useSecret:n,secret:r}=this.config;return"".concat(t[1]).concat(this.base,"/api/v1/ws/room/join?").concat(eA({address:e,name:"client:".concat(Mg()),userId:"Client",forceCreate:!0,useSecret:n,secret:r}))}}const nA="50%",rA="100%";function oA(e){return window.TouchEvent&&e instanceof TouchEvent?e.touches[0]:e}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("#__pageSpy {\n  font-size: 14px;\n}\n#__pageSpy .page-spy-logo {\n  --top-radius: 100%;\n  --right-radius: 100%;\n  --bottom-radius: 100%;\n  --left-radius: 100%;\n  position: fixed;\n  right: 2.85714286em;\n  bottom: 5.71428571em;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  width: 5.71428571em;\n  height: 5.71428571em;\n  font-size: 1em;\n  border-radius: 5.71428571em;\n  background-color: #fff;\n  box-shadow: 0px 4px 8px 2px rgba(0, 0, 0, 0.2);\n  cursor: pointer;\n  z-index: 13000;\n  transition: opacity ease-in-out 0.3s, transform ease-in-out 0.3s, background-color ease-in-out 0.3s, filter ease-in-out 0.3s;\n}\n#__pageSpy .page-spy-logo.inactive {\n  background-color: #a2a2a2;\n  filter: grayscale(1);\n}\n#__pageSpy .page-spy-logo::after {\n  content: '';\n  display: block;\n  position: absolute;\n  left: 0;\n  top: 0;\n  width: 100%;\n  height: 100%;\n  transform: rotateZ(45deg);\n  background-color: white;\n  border-top-left-radius: var(--top-radius);\n  border-top-right-radius: var(--right-radius);\n  border-bottom-right-radius: var(--bottom-radius);\n  border-bottom-left-radius: var(--left-radius);\n  transition: border-radius linear 0.15s;\n}\n#__pageSpy .page-spy-logo .hidden-mixin {\n  opacity: 0.35;\n}\n#__pageSpy .page-spy-logo.hidden-in-top {\n  opacity: 0.35;\n  transform: translateY(-65%);\n}\n#__pageSpy .page-spy-logo.hidden-in-top img {\n  transform: translateY(30%);\n}\n#__pageSpy .page-spy-logo.hidden-in-right {\n  opacity: 0.35;\n  transform: translateX(65%);\n}\n#__pageSpy .page-spy-logo.hidden-in-right img {\n  transform: translateX(-30%);\n}\n#__pageSpy .page-spy-logo.hidden-in-bottom {\n  opacity: 0.35;\n  transform: translateY(65%);\n}\n#__pageSpy .page-spy-logo.hidden-in-bottom img {\n  transform: translateY(-30%);\n}\n#__pageSpy .page-spy-logo.hidden-in-left {\n  opacity: 0.35;\n  transform: translateX(-65%);\n}\n#__pageSpy .page-spy-logo.hidden-in-left img {\n  transform: translateX(30%);\n}\n#__pageSpy .page-spy-logo img {\n  position: relative;\n  display: block;\n  z-index: 100;\n  transition: transform ease-in-out 0.1s 0.4s;\n}\n#__pageSpy .page-spy-modal {\n  position: fixed;\n  left: 0;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  background-color: rgba(0, 0, 0, 0.5);\n  opacity: 0;\n  transition: all ease-out 0.3s;\n  z-index: 13000;\n}\n#__pageSpy .page-spy-modal.show {\n  opacity: 1;\n}\n#__pageSpy .page-spy-content {\n  width: 75%;\n  max-width: 25em;\n  background-color: #fafafa;\n  border-radius: 0.28571429em;\n  text-align: center;\n}\n#__pageSpy .page-spy-content__info {\n  padding: 1.71428571em 1.14285714em;\n  font-size: 1.14285714em;\n  line-height: 1.5;\n  text-align: left;\n  color: #202124;\n  letter-spacing: 2px;\n}\n#__pageSpy .page-spy-content__info > p {\n  margin: 0;\n  padding: 0;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n#__pageSpy .page-spy-content__info > p b {\n  display: inline-block;\n  width: 6.57142857em;\n  text-align: right;\n  margin-right: 10px;\n}\n#__pageSpy .page-spy-content__btn {\n  padding: 0.57142857em 0;\n  border-top: 1px solid #eee;\n  font-size: 1.14285714em;\n  line-height: 1.5;\n  color: transparent;\n  -webkit-background-clip: text;\n          background-clip: text;\n  background-image: linear-gradient(45deg, #efdfff, #4e00b1 52%, #3d0c7c);\n  cursor: pointer;\n}\n.page-spy-toast {\n  position: fixed;\n  left: 50%;\n  top: 10%;\n  transform: translateX(-50%);\n  max-width: 50vw;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  padding: 6px 12px;\n  color: #9a62e4;\n  font-size: 14px;\n  background-color: #fafafa;\n  border-radius: 4px;\n  box-shadow: 0px 4px 8px 2px rgba(0, 0, 0, 0.2);\n  z-index: 99999;\n}\n");var iA;class sA extends Ky{constructor(){super(...arguments),t(this,"privateKeys",["secret"]),t(this,"defaultConfig",(()=>{const e={api:"",clientOrigin:"",project:"default",autoRender:!0,title:"--",enableSSL:null,disabledPlugins:[],offline:!1,logo:"data:image/svg+xml,%3csvg width='255' height='255' viewBox='0 0 255 255' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M183 24L81 126V141.5L90 150.5H105L145 110.5H160.5L169.5 119.5V133.5L72 231' stroke='url(%23paint0_linear_106_8)' stroke-width='25' stroke-linecap='round' /%3e %3cdefs%3e %3clinearGradient id='paint0_linear_106_8' x1='127.5' y1='24' x2='127.5' y2='231' gradientUnits='userSpaceOnUse'%3e %3cstop stop-color='%233D0C7C' /%3e %3cstop offset='0.519204' stop-color='%234E00B1' /%3e %3cstop offset='1' stop-color='%23EFDFFF' /%3e %3c/linearGradient%3e %3c/defs%3e%3c/svg%3e",logoStyle:{},messageCapacity:1e3,useSecret:!1,secret:"",serializeData:!1,dataProcessor:{}};if(!sA.scriptLink)return e;try{const{host:t,origin:n,protocol:r}=new URL(sA.scriptLink);return{...e,api:t,clientOrigin:n,enableSSL:r.startsWith("https")}}catch(t){return e}}))}}t(sA,"scriptLink",null===(iA=document.currentScript)||void 0===iA?void 0:iA.src);class aA{static message(e){const t=document.createElement("div");t.classList.add("page-spy-toast"),t.innerText=String(e),document.documentElement.appendChild(t);const n=setTimeout((()=>{document.contains(t)&&document.documentElement.removeChild(t),aA.timer===n&&(aA.timer=null)}),1500);aA.timer=n}static destroy(){const e=document.querySelectorAll(".page-spy-toast");e.length&&([...e].forEach((e=>{document.contains(e)&&document.documentElement.removeChild(e)})),aA.timer&&clearTimeout(aA.timer)),aA.timer=null}}t(aA,"timer",null);const cA="__pageSpy";Yy.info.sdk="browser",Yy.info.ua=navigator.userAgent;class uA{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t(this,"root",null),t(this,"version","1.9.9"),t(this,"request",null),t(this,"name",""),t(this,"address",""),t(this,"roomUrl",""),t(this,"socketStore",cv),t(this,"config",new sA),t(this,"cacheTimer",null),uA.instance)return tm.warn("Cannot initialize PageSpy multiple times"),uA.instance;uA.instance=this;const n=this.config.mergeConfig(e);this.updateConfiguration(),this.triggerPlugins("onInit",{config:n,socketStore:cv}),this.init()}updateConfiguration(){const{messageCapacity:e,offline:t,useSecret:n}=this.config.get();if(!0===n){const e=JSON.parse(sessionStorage.getItem(Zy));this.config.set("secret",(null==e?void 0:e.secret)||function(){const e=Math.floor(1e6*Math.random());return String(e).padStart(6,"0")}())}cv.connectable=!0,cv.getPageSpyConfig=()=>this.config.get(),cv.isOffline=t,cv.messageCapacity=e}async init(){const e=this.config.get();if(!1===e.offline){this.request=new tA(e);const t=sessionStorage.getItem(Zy);if(null===t)await this.createNewConnection();else{const{name:n,address:r,roomUrl:o,project:i}=JSON.parse(t);e.project!==i?await this.createNewConnection():(this.name=n,this.address=r,this.roomUrl=o,this.useOldConnection())}document.addEventListener("visibilitychange",(()=>{!document.hidden&&cv.getSocket().getState()!==ev.OPEN&&cv.connectable&&this.useOldConnection()}))}tm.log("Plugins inited"),e.autoRender&&this.render()}async createNewConnection(){if(!this.request)return void tm.error("Cannot get the Request");const e=await this.request.createRoom();this.name=e.name,this.address=e.address,this.roomUrl=e.roomUrl,this.refreshRoomInfo(),cv.init(e.roomUrl)}useOldConnection(){this.refreshRoomInfo(),cv.init(this.roomUrl)}refreshRoomInfo(){this.saveSession(),this.cacheTimer=setInterval((()=>{cv.getSocket().getState()===ev.OPEN&&this.saveSession()}),15e3)}saveSession(){const{name:e,address:t,roomUrl:n,config:r}=this,{useSecret:o,secret:i,project:s}=r.get(),a=JSON.stringify({name:e,address:t,roomUrl:n,project:s,useSecret:o,secret:i});sessionStorage.setItem(Zy,a)}startRender(){const{project:e,clientOrigin:t,title:n,logo:r,logoStyle:o,useSecret:i,secret:s}=this.config.get(),a=document.createElement("div");a.id=cA,this.root=a;const c=document.createElement("div");c.className="page-spy-logo";const u=document.createElement("img");u.alt="PageSpy Logo",u.src=r,u.width=50,u.height=50,Object.entries(o).forEach((e=>{let[t,n]=e;u.style[t]=n})),c.insertAdjacentElement("beforeend",u),a.insertAdjacentElement("beforeend",c),window.addEventListener("sdk-inactive",(()=>{c.classList.add("inactive")}));const l=new iv,d=new sv({content:"\n      ".concat(i?'<p><b>Secret:</b> <span class="page-spy-secret">'.concat(s,"</span></p>"):"",'\n      <p>\n        <b>Device ID:</b>\n        <span style="font-family: \'Monaco\'" class="page-spy-device-id">\n          ').concat(this.address.slice(0,4)||"--",'\n        </span>\n      </p>\n      <p><b>Project:</b> <span class="page-spy-project">').concat(e,'</span></p>\n      <p><b>Title:</b> <span class="page-spy-title">').concat(n,"</span></p>\n      "),onOk:()=>{let e="".concat(t,"/#/devtools?address=").concat(encodeURIComponent(this.address));i&&(e+="&secret=".concat(s));const n=yu(e);let r="";const o=navigator.languages;r=["zh-CN","zh-HK","zh-TW","zh"].some((e=>o.includes(e)))?n?"拷贝成功!":"拷贝失败!":n?"Copy successfully!":"Copy failed!",aA.message(r),l.close()}});function f(e){const{isMoveEvent:t,isHidden:n}=c;t||n||(e.stopPropagation(),l.show())}l.appendNode(d.el),a.insertAdjacentElement("beforeend",l.el),c.addEventListener("click",f,!1),c.addEventListener("touchend",f,!1),document.documentElement.insertAdjacentElement("beforeend",a),function(e){let t,n;const r={xAxis:0,yAxis:0},o={x:0,y:0};function i(){if(!r.xAxis&&!r.yAxis)return;const{left:n,top:o}=e.getBoundingClientRect();n>=0&&n<=r.xAxis&&(e.isHidden=!1),t&&clearTimeout(t),t=setTimeout((()=>{t=null,e.disableHidden||(n<=0?e.classList.add("hidden-in-left"):n>=r.xAxis&&e.classList.add("hidden-in-right"),o<=0?e.classList.add("hidden-in-top"):o>=r.yAxis&&e.classList.add("hidden-in-bottom"),e.isHidden=!0)}),1e3)}function s(t){t.preventDefault(),e.isMoveEvent=!0;const{clientX:i,clientY:s}=oA(t),a=i-o.x,c=s-o.y;let u=n.x+a;u<=0?(u=0,e.style.setProperty("--left-radius",nA)):u>=r.xAxis?(u=r.xAxis,e.style.setProperty("--right-radius",nA)):(e.style.setProperty("--left-radius",rA),e.style.setProperty("--right-radius",rA));let l=n.y+c;l<=0?(l=0,e.style.setProperty("--top-radius",nA)):l>r.yAxis?(l=r.yAxis,e.style.setProperty("--bottom-radius",nA)):(e.style.setProperty("--top-radius",rA),e.style.setProperty("--bottom-radius",rA)),e.style.left="".concat(u,"px"),e.style.top="".concat(l,"px")}function a(){o.x=0,o.y=0,i(),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",a),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",a)}function c(i){i.preventDefault(),t&&clearTimeout(t),e.isHidden&&e.classList.remove("hidden-in-top","hidden-in-right","hidden-in-bottom","hidden-in-left"),e.isMoveEvent=!1,n=e.getBoundingClientRect(),r.xAxis=window.innerWidth-n.width,r.yAxis=window.innerHeight-n.height;const{clientX:c,clientY:u}=oA(i);o.x=c,o.y=u,document.addEventListener("mousemove",s,!1),document.addEventListener("mouseup",a,!1),document.addEventListener("touchmove",s,{capture:!1,passive:!1}),document.addEventListener("touchend",a,!1)}e.addEventListener("mousedown",c,!1),e.addEventListener("touchstart",c,{capture:!1,passive:!1}),e.addEventListener("mouseover",(()=>{e.disableHidden=!0,e.isHidden&&e.classList.remove("hidden-in-top","hidden-in-right","hidden-in-bottom","hidden-in-left")}),!1),e.addEventListener("mouseleave",(()=>{e.disableHidden=!1,i()}),!1)}(c),this.triggerPlugins("onMounted",{root:a,content:d.el,socketStore:cv}),this.handleDeviceDPR(),tm.log("Render success")}handleDeviceDPR(){const e=window.devicePixelRatio||1,t=document.querySelector('[name="viewport"]');if(t){const n=(t.getAttribute("content")||"").match(/initial-scale=\d+(\.\d+)?/);(n?parseFloat(n[0].split("=")[1]):1)<1&&(this.root.style.fontSize="".concat(14*e,"px"))}}triggerPlugins(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const{disabledPlugins:o}=this.config.get();uA.pluginsWithOrder.forEach((t=>{var r;zg(o)&&o.length&&o.includes(t.name)||null===(r=t[e])||void 0===r||r.apply(t,n)}))}abort(){this.triggerPlugins("onReset"),cv.close(),uA.instance=null;const e=document.querySelector("#".concat(cA));e&&document.documentElement.removeChild(e)}render(){if(document.querySelector("#".concat(cA)))tm.warn("Cannot render the widget because it has been in the DOM");else if(void 0!==document)"loading"===document.readyState?window.addEventListener("DOMContentLoaded",this.render.bind(this)):this.startRender();else{let e;const t=()=>{document&&"complete"===document.readyState?(e&&clearTimeout(e),this.startRender()):e=setTimeout(t,1)};e=setTimeout(t,1)}}updateRoomInfo(e){if(!e)return;const{project:t,title:n}=e;if(t){this.config.set("project",String(t));const e=document.querySelector(".page-spy-project");e&&(e.textContent=String(t))}if(n){this.config.set("title",String(n));const e=document.querySelector(".page-spy-title");e&&(e.textContent=String(n))}cv.updateRoomInfo()}static get pluginsWithOrder(){return[...uA.plugins.pre,...uA.plugins.normal,...uA.plugins.post]}static registerPlugin(e){if(!e)return;if("function"==typeof(t=e)&&void 0!==t.prototype)return void tm.error("PageSpy.registerPlugin() expect to pass an instance, not a class");var t;if(!e.name)return void tm.error("The ".concat(e.constructor.name,' plugin should provide a "name" property'));if(uA.pluginsWithOrder.some((t=>t.name===e.name)))return void tm.error("The ".concat(e.name,' has registered. Consider the following reasons:\n      - Duplicate register one same plugin;\n      - Plugin\'s "name" conflict with others, you can print all registered plugins by "PageSpy.plugins";'));uA.plugins[e.enforce||"normal"].push(e)}}t(uA,"instance",null),t(uA,"plugins",{pre:[],normal:[],post:[]});return[new uv,new lv,new zv,new Yv,new Zv,new Xv,new Jv].forEach((e=>{uA.registerPlugin(e)})),uA}();
//# sourceMappingURL=index.min.js.map
  }
}