@vkontakte/videoplayer-statistics 1.0.51-dev.d7acf2ac.0 → 1.0.51-dev.f47bf7bc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015.cjs.js +3 -3
- package/es2015.esm.js +3 -3
- package/es2018.cjs.js +3 -3
- package/es2018.esm.js +3 -3
- package/esnext.cjs.js +3 -3
- package/esnext.esm.js +3 -3
- package/evergreen.esm.js +3 -3
- package/package.json +3 -3
- package/types/OneStat.d.ts +1 -0
package/es2018.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-statistics v1.0.51-dev.
|
|
3
|
-
* Wed,
|
|
2
|
+
* @vkontakte/videoplayer-statistics v1.0.51-dev.f47bf7bc.0
|
|
3
|
+
* Wed, 10 Jul 2024 00:43:28 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-51/doc/
|
|
5
5
|
*/
|
|
6
|
-
var Il=Object.create;var Ki=Object.defineProperty;var El=Object.getOwnPropertyDescriptor;var ql=Object.getOwnPropertyNames;var Pl=Object.getPrototypeOf,Tl=Object.prototype.hasOwnProperty;var n=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Ol=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ql(e))!Tl.call(r,o)&&o!==t&&Ki(r,o,{get:()=>e[o],enumerable:!(i=El(e,o))||i.enumerable});return r};var Lr=(r,e,t)=>(t=r!=null?Il(Pl(r)):{},Ol(e||!r||!r.__esModule?Ki(t,"default",{value:r,enumerable:!0}):t,r));var Wi=n(()=>{"use strict"});var Hi=n(()=>{"use strict"});var I=n((zi,Qi)=>{"use strict";var Be=function(r){return r&&r.Math==Math&&r};Qi.exports=Be(typeof globalThis=="object"&&globalThis)||Be(typeof window=="object"&&window)||Be(typeof self=="object"&&self)||Be(typeof global=="object"&&global)||function(){return this}()||zi||Function("return this")()});var T=n((Kb,Yi)=>{"use strict";Yi.exports=function(r){try{return!!r()}catch(e){return!0}}});var me=n((Wb,Ji)=>{"use strict";var _l=T();Ji.exports=!_l(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")})});var Dr=n((Hb,ro)=>{"use strict";var xl=me(),eo=Function.prototype,Xi=eo.apply,Zi=eo.call;ro.exports=typeof Reflect=="object"&&Reflect.apply||(xl?Zi.bind(Xi):function(){return Zi.apply(Xi,arguments)})});var q=n((zb,oo)=>{"use strict";var to=me(),io=Function.prototype,kr=io.call,Rl=to&&io.bind.bind(kr,kr);oo.exports=to?Rl:function(r){return function(){return kr.apply(r,arguments)}}});var J=n((Qb,ao)=>{"use strict";var no=q(),wl=no({}.toString),Al=no("".slice);ao.exports=function(r){return Al(wl(r),8,-1)}});var $r=n((Yb,so)=>{"use strict";var Cl=J(),Nl=q();so.exports=function(r){if(Cl(r)==="Function")return Nl(r)}});var jr=n((Jb,uo)=>{"use strict";var Mr=typeof document=="object"&&document.all,Ll=typeof Mr=="undefined"&&Mr!==void 0;uo.exports={all:Mr,IS_HTMLDDA:Ll}});var b=n((Xb,lo)=>{"use strict";var co=jr(),Dl=co.all;lo.exports=co.IS_HTMLDDA?function(r){return typeof r=="function"||r===Dl}:function(r){return typeof r=="function"}});var L=n((Zb,fo)=>{"use strict";var kl=T();fo.exports=!kl(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var P=n((ey,po)=>{"use strict";var $l=me(),Ue=Function.prototype.call;po.exports=$l?Ue.bind(Ue):function(){return Ue.apply(Ue,arguments)}});var mo=n(go=>{"use strict";var vo={}.propertyIsEnumerable,ho=Object.getOwnPropertyDescriptor,Ml=ho&&!vo.call({1:2},1);go.f=Ml?function(e){var t=ho(this,e);return!!t&&t.enumerable}:vo});var be=n((ty,bo)=>{"use strict";bo.exports=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}});var So=n((iy,yo)=>{"use strict";var jl=q(),Fl=T(),Bl=J(),Fr=Object,Ul=jl("".split);yo.exports=Fl(function(){return!Fr("z").propertyIsEnumerable(0)})?function(r){return Bl(r)=="String"?Ul(r,""):Fr(r)}:Fr});var X=n((oy,Io)=>{"use strict";Io.exports=function(r){return r==null}});var Ve=n((ny,Eo)=>{"use strict";var Vl=X(),Gl=TypeError;Eo.exports=function(r){if(Vl(r))throw Gl("Can't call method on "+r);return r}});var Z=n((ay,qo)=>{"use strict";var Kl=So(),Wl=Ve();qo.exports=function(r){return Kl(Wl(r))}});var D=n((sy,Oo)=>{"use strict";var Po=b(),To=jr(),Hl=To.all;Oo.exports=To.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:Po(r)||r===Hl}:function(r){return typeof r=="object"?r!==null:Po(r)}});var Ge=n((uy,_o)=>{"use strict";_o.exports={}});var $=n((cy,Ro)=>{"use strict";var Br=Ge(),Ur=I(),zl=b(),xo=function(r){return zl(r)?r:void 0};Ro.exports=function(r,e){return arguments.length<2?xo(Br[r])||xo(Ur[r]):Br[r]&&Br[r][e]||Ur[r]&&Ur[r][e]}});var ye=n((ly,wo)=>{"use strict";var Ql=q();wo.exports=Ql({}.isPrototypeOf)});var Se=n((fy,Ao)=>{"use strict";Ao.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""});var Gr=n((dy,$o)=>{"use strict";var ko=I(),Vr=Se(),Co=ko.process,No=ko.Deno,Lo=Co&&Co.versions||No&&No.version,Do=Lo&&Lo.v8,x,Ke;Do&&(x=Do.split("."),Ke=x[0]>0&&x[0]<4?1:+(x[0]+x[1]));!Ke&&Vr&&(x=Vr.match(/Edge\/(\d+)/),(!x||x[1]>=74)&&(x=Vr.match(/Chrome\/(\d+)/),x&&(Ke=+x[1])));$o.exports=Ke});var Kr=n((py,jo)=>{"use strict";var Mo=Gr(),Yl=T(),Jl=I(),Xl=Jl.String;jo.exports=!!Object.getOwnPropertySymbols&&!Yl(function(){var r=Symbol();return!Xl(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Mo&&Mo<41})});var Wr=n((vy,Fo)=>{"use strict";var Zl=Kr();Fo.exports=Zl&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Hr=n((hy,Bo)=>{"use strict";var ef=$(),rf=b(),tf=ye(),of=Wr(),nf=Object;Bo.exports=of?function(r){return typeof r=="symbol"}:function(r){var e=ef("Symbol");return rf(e)&&tf(e.prototype,nf(r))}});var Ie=n((gy,Uo)=>{"use strict";var af=String;Uo.exports=function(r){try{return af(r)}catch(e){return"Object"}}});var M=n((my,Vo)=>{"use strict";var sf=b(),uf=Ie(),cf=TypeError;Vo.exports=function(r){if(sf(r))return r;throw cf(uf(r)+" is not a function")}});var Ee=n((by,Go)=>{"use strict";var lf=M(),ff=X();Go.exports=function(r,e){var t=r[e];return ff(t)?void 0:lf(t)}});var Wo=n((yy,Ko)=>{"use strict";var zr=P(),Qr=b(),Yr=D(),df=TypeError;Ko.exports=function(r,e){var t,i;if(e==="string"&&Qr(t=r.toString)&&!Yr(i=zr(t,r))||Qr(t=r.valueOf)&&!Yr(i=zr(t,r))||e!=="string"&&Qr(t=r.toString)&&!Yr(i=zr(t,r)))return i;throw df("Can't convert object to primitive value")}});var R=n((Sy,Ho)=>{"use strict";Ho.exports=!0});var Yo=n((Iy,Qo)=>{"use strict";var zo=I(),pf=Object.defineProperty;Qo.exports=function(r,e){try{pf(zo,r,{value:e,configurable:!0,writable:!0})}catch(t){zo[r]=e}return e}});var We=n((Ey,Xo)=>{"use strict";var vf=I(),hf=Yo(),Jo="__core-js_shared__",gf=vf[Jo]||hf(Jo,{});Xo.exports=gf});var Jr=n((qy,en)=>{"use strict";var mf=R(),Zo=We();(en.exports=function(r,e){return Zo[r]||(Zo[r]=e!==void 0?e:{})})("versions",[]).push({version:"3.31.0",mode:mf?"pure":"global",copyright:"\xA9 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.31.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var He=n((Py,rn)=>{"use strict";var bf=Ve(),yf=Object;rn.exports=function(r){return yf(bf(r))}});var w=n((Ty,tn)=>{"use strict";var Sf=q(),If=He(),Ef=Sf({}.hasOwnProperty);tn.exports=Object.hasOwn||function(e,t){return Ef(If(e),t)}});var Xr=n((Oy,on)=>{"use strict";var qf=q(),Pf=0,Tf=Math.random(),Of=qf(1 .toString);on.exports=function(r){return"Symbol("+(r===void 0?"":r)+")_"+Of(++Pf+Tf,36)}});var E=n((_y,an)=>{"use strict";var _f=I(),xf=Jr(),nn=w(),Rf=Xr(),wf=Kr(),Af=Wr(),ee=_f.Symbol,Zr=xf("wks"),Cf=Af?ee.for||ee:ee&&ee.withoutSetter||Rf;an.exports=function(r){return nn(Zr,r)||(Zr[r]=wf&&nn(ee,r)?ee[r]:Cf("Symbol."+r)),Zr[r]}});var ln=n((xy,cn)=>{"use strict";var Nf=P(),sn=D(),un=Hr(),Lf=Ee(),Df=Wo(),kf=E(),$f=TypeError,Mf=kf("toPrimitive");cn.exports=function(r,e){if(!sn(r)||un(r))return r;var t=Lf(r,Mf),i;if(t){if(e===void 0&&(e="default"),i=Nf(t,r,e),!sn(i)||un(i))return i;throw $f("Can't convert object to primitive value")}return e===void 0&&(e="number"),Df(r,e)}});var ze=n((Ry,fn)=>{"use strict";var jf=ln(),Ff=Hr();fn.exports=function(r){var e=jf(r,"string");return Ff(e)?e:e+""}});var Qe=n((wy,pn)=>{"use strict";var Bf=I(),dn=D(),et=Bf.document,Uf=dn(et)&&dn(et.createElement);pn.exports=function(r){return Uf?et.createElement(r):{}}});var rt=n((Ay,vn)=>{"use strict";var Vf=L(),Gf=T(),Kf=Qe();vn.exports=!Vf&&!Gf(function(){return Object.defineProperty(Kf("div"),"a",{get:function(){return 7}}).a!=7})});var tt=n(gn=>{"use strict";var Wf=L(),Hf=P(),zf=mo(),Qf=be(),Yf=Z(),Jf=ze(),Xf=w(),Zf=rt(),hn=Object.getOwnPropertyDescriptor;gn.f=Wf?hn:function(e,t){if(e=Yf(e),t=Jf(t),Zf)try{return hn(e,t)}catch(i){}if(Xf(e,t))return Qf(!Hf(zf.f,e,t),e[t])}});var it=n((Ny,mn)=>{"use strict";var ed=T(),rd=b(),td=/#|\.prototype\./,qe=function(r,e){var t=od[id(r)];return t==ad?!0:t==nd?!1:rd(e)?ed(e):!!e},id=qe.normalize=function(r){return String(r).replace(td,".").toLowerCase()},od=qe.data={},nd=qe.NATIVE="N",ad=qe.POLYFILL="P";mn.exports=qe});var Pe=n((Ly,yn)=>{"use strict";var bn=$r(),sd=M(),ud=me(),cd=bn(bn.bind);yn.exports=function(r,e){return sd(r),e===void 0?r:ud?cd(r,e):function(){return r.apply(e,arguments)}}});var ot=n((Dy,Sn)=>{"use strict";var ld=L(),fd=T();Sn.exports=ld&&fd(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var A=n((ky,In)=>{"use strict";var dd=D(),pd=String,vd=TypeError;In.exports=function(r){if(dd(r))return r;throw vd(pd(r)+" is not an object")}});var V=n(qn=>{"use strict";var hd=L(),gd=rt(),md=ot(),Ye=A(),En=ze(),bd=TypeError,nt=Object.defineProperty,yd=Object.getOwnPropertyDescriptor,at="enumerable",st="configurable",ut="writable";qn.f=hd?md?function(e,t,i){if(Ye(e),t=En(t),Ye(i),typeof e=="function"&&t==="prototype"&&"value"in i&&ut in i&&!i[ut]){var o=yd(e,t);o&&o[ut]&&(e[t]=i.value,i={configurable:st in i?i[st]:o[st],enumerable:at in i?i[at]:o[at],writable:!1})}return nt(e,t,i)}:nt:function(e,t,i){if(Ye(e),t=En(t),Ye(i),gd)try{return nt(e,t,i)}catch(o){}if("get"in i||"set"in i)throw bd("Accessors not supported");return"value"in i&&(e[t]=i.value),e}});var G=n((My,Pn)=>{"use strict";var Sd=L(),Id=V(),Ed=be();Pn.exports=Sd?function(r,e,t){return Id.f(r,e,Ed(1,t))}:function(r,e,t){return r[e]=t,r}});var C=n((jy,On)=>{"use strict";var Je=I(),qd=Dr(),Pd=$r(),Td=b(),Od=tt().f,_d=it(),re=Ge(),xd=Pe(),te=G(),Tn=w(),Rd=function(r){var e=function(t,i,o){if(this instanceof e){switch(arguments.length){case 0:return new r;case 1:return new r(t);case 2:return new r(t,i)}return new r(t,i,o)}return qd(r,this,arguments)};return e.prototype=r.prototype,e};On.exports=function(r,e){var t=r.target,i=r.global,o=r.stat,s=r.proto,u=i?Je:o?Je[t]:(Je[t]||{}).prototype,l=i?re:re[t]||te(re,t,{})[t],p=l.prototype,c,a,f,v,d,h,g,y,m;for(v in e)c=_d(i?v:t+(o?".":"#")+v,r.forced),a=!c&&u&&Tn(u,v),h=l[v],a&&(r.dontCallGetSet?(m=Od(u,v),g=m&&m.value):g=u[v]),d=a&&g?g:e[v],!(a&&typeof h==typeof d)&&(r.bind&&a?y=xd(d,Je):r.wrap&&a?y=Rd(d):s&&Td(d)?y=Pd(d):y=d,(r.sham||d&&d.sham||h&&h.sham)&&te(y,"sham",!0),te(l,v,y),s&&(f=t+"Prototype",Tn(re,f)||te(re,f,{}),te(re[f],v,d),r.real&&p&&(c||!p[v])&&te(p,v,d)))}});var xn=n((Fy,_n)=>{"use strict";var wd=D(),Ad=J(),Cd=E(),Nd=Cd("match");_n.exports=function(r){var e;return wd(r)&&((e=r[Nd])!==void 0?!!e:Ad(r)=="RegExp")}});var Xe=n((By,wn)=>{"use strict";var Ld=E(),Dd=Ld("toStringTag"),Rn={};Rn[Dd]="z";wn.exports=String(Rn)==="[object z]"});var ie=n((Uy,An)=>{"use strict";var kd=Xe(),$d=b(),Ze=J(),Md=E(),jd=Md("toStringTag"),Fd=Object,Bd=Ze(function(){return arguments}())=="Arguments",Ud=function(r,e){try{return r[e]}catch(t){}};An.exports=kd?Ze:function(r){var e,t,i;return r===void 0?"Undefined":r===null?"Null":typeof(t=Ud(e=Fd(r),jd))=="string"?t:Bd?Ze(e):(i=Ze(e))=="Object"&&$d(e.callee)?"Arguments":i}});var Nn=n((Vy,Cn)=>{"use strict";var Vd=ie(),Gd=String;Cn.exports=function(r){if(Vd(r)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Gd(r)}});var Dn=n((Gy,Ln)=>{"use strict";var Kd=A();Ln.exports=function(){var r=Kd(this),e="";return r.hasIndices&&(e+="d"),r.global&&(e+="g"),r.ignoreCase&&(e+="i"),r.multiline&&(e+="m"),r.dotAll&&(e+="s"),r.unicode&&(e+="u"),r.unicodeSets&&(e+="v"),r.sticky&&(e+="y"),e}});var Mn=n((Ky,$n)=>{"use strict";var Wd=P(),Hd=w(),zd=ye(),Qd=Dn(),kn=RegExp.prototype;$n.exports=function(r){var e=r.flags;return e===void 0&&!("flags"in kn)&&!Hd(r,"flags")&&zd(kn,r)?Wd(Qd,r):e}});var Fn=n((Wy,jn)=>{"use strict";var ft=q(),Yd=He(),Jd=Math.floor,ct=ft("".charAt),Xd=ft("".replace),lt=ft("".slice),Zd=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ep=/\$([$&'`]|\d{1,2})/g;jn.exports=function(r,e,t,i,o,s){var u=t+r.length,l=i.length,p=ep;return o!==void 0&&(o=Yd(o),p=Zd),Xd(s,p,function(c,a){var f;switch(ct(a,0)){case"$":return"$";case"&":return r;case"`":return lt(e,0,t);case"'":return lt(e,u);case"<":f=o[lt(a,1,-1)];break;default:var v=+a;if(v===0)return c;if(v>l){var d=Jd(v/10);return d===0?c:d<=l?i[d-1]===void 0?ct(a,1):i[d-1]+ct(a,1):c}f=i[v-1]}return f===void 0?"":f})}});var Kn=n(()=>{"use strict";var rp=C(),tp=P(),dt=q(),Bn=Ve(),ip=b(),op=X(),np=xn(),oe=Nn(),ap=Ee(),sp=Mn(),up=Fn(),cp=E(),lp=R(),fp=cp("replace"),dp=TypeError,Gn=dt("".indexOf),pp=dt("".replace),Un=dt("".slice),vp=Math.max,Vn=function(r,e,t){return t>r.length?-1:e===""?t:Gn(r,e,t)};rp({target:"String",proto:!0},{replaceAll:function(e,t){var i=Bn(this),o,s,u,l,p,c,a,f,v,d=0,h=0,g="";if(!op(e)){if(o=np(e),o&&(s=oe(Bn(sp(e))),!~Gn(s,"g")))throw dp("`.replaceAll` does not allow non-global regexes");if(u=ap(e,fp),u)return tp(u,e,i,t);if(lp&&o)return pp(oe(i),e,t)}for(l=oe(i),p=oe(e),c=ip(t),c||(t=oe(t)),a=p.length,f=vp(1,a),d=Vn(l,p,0);d!==-1;)v=c?oe(t(p,d,l)):up(p,l,d,[],void 0,t),g+=Un(l,h,d)+v,h=d+a,d=Vn(l,p,d+f);return h<l.length&&(g+=Un(l,h)),g}})});var pt=n((Qy,Wn)=>{"use strict";var hp=$();Wn.exports=hp});var zn=n((Yy,Hn)=>{"use strict";Wi();Hi();Kn();var gp=pt();Hn.exports=gp("String","replaceAll")});var Yn=n((Jy,Qn)=>{"use strict";var mp=zn();Qn.exports=mp});var Xn=n((Xy,Jn)=>{"use strict";var bp=Yn();Jn.exports=bp});var na=n(()=>{"use strict"});var Oe=n((uS,aa)=>{"use strict";var Ip=J();aa.exports=typeof process!="undefined"&&Ip(process)=="process"});var ne=n((cS,sa)=>{"use strict";var Ep=G();sa.exports=function(r,e,t,i){return i&&i.enumerable?r[e]=t:Ep(r,e,t),r}});var ca=n((lS,ua)=>{"use strict";var qp=q(),Pp=M();ua.exports=function(r,e,t){try{return qp(Pp(Object.getOwnPropertyDescriptor(r,e)[t]))}catch(i){}}});var fa=n((fS,la)=>{"use strict";var Tp=b(),Op=String,_p=TypeError;la.exports=function(r){if(typeof r=="object"||Tp(r))return r;throw _p("Can't set "+Op(r)+" as a prototype")}});var yt=n((dS,da)=>{"use strict";var xp=ca(),Rp=A(),wp=fa();da.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=xp(Object.prototype,"__proto__","set"),t(e,[]),r=e instanceof Array}catch(i){}return function(o,s){return Rp(o),wp(s),r?t(o,s):o.__proto__=s,o}}():void 0)});var va=n((pS,pa)=>{"use strict";var Ap=Xe(),Cp=ie();pa.exports=Ap?{}.toString:function(){return"[object "+Cp(this)+"]"}});var er=n((vS,ga)=>{"use strict";var Np=Xe(),Lp=V().f,Dp=G(),kp=w(),$p=va(),Mp=E(),ha=Mp("toStringTag");ga.exports=function(r,e,t,i){if(r){var o=t?r:r.prototype;kp(o,ha)||Lp(o,ha,{configurable:!0,value:e}),i&&!Np&&Dp(o,"toString",$p)}}});var ba=n((hS,ma)=>{"use strict";var jp=V();ma.exports=function(r,e,t){return jp.f(r,e,t)}});var Ia=n((gS,Sa)=>{"use strict";var Fp=$(),Bp=ba(),Up=E(),Vp=L(),ya=Up("species");Sa.exports=function(r){var e=Fp(r);Vp&&e&&!e[ya]&&Bp(e,ya,{configurable:!0,get:function(){return this}})}});var qa=n((mS,Ea)=>{"use strict";var Gp=ye(),Kp=TypeError;Ea.exports=function(r,e){if(Gp(e,r))return r;throw Kp("Incorrect invocation")}});var It=n((bS,Pa)=>{"use strict";var Wp=q(),Hp=b(),St=We(),zp=Wp(Function.toString);Hp(St.inspectSource)||(St.inspectSource=function(r){return zp(r)});Pa.exports=St.inspectSource});var wa=n((yS,Ra)=>{"use strict";var Qp=q(),Yp=T(),Ta=b(),Jp=ie(),Xp=$(),Zp=It(),Oa=function(){},ev=[],_a=Xp("Reflect","construct"),Et=/^\s*(?:class|function)\b/,rv=Qp(Et.exec),tv=!Et.exec(Oa),_e=function(e){if(!Ta(e))return!1;try{return _a(Oa,ev,e),!0}catch(t){return!1}},xa=function(e){if(!Ta(e))return!1;switch(Jp(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return tv||!!rv(Et,Zp(e))}catch(t){return!0}};xa.sham=!0;Ra.exports=!_a||Yp(function(){var r;return _e(_e.call)||!_e(Object)||!_e(function(){r=!0})||r})?xa:_e});var Ca=n((SS,Aa)=>{"use strict";var iv=wa(),ov=Ie(),nv=TypeError;Aa.exports=function(r){if(iv(r))return r;throw nv(ov(r)+" is not a constructor")}});var qt=n((IS,La)=>{"use strict";var Na=A(),av=Ca(),sv=X(),uv=E(),cv=uv("species");La.exports=function(r,e){var t=Na(r).constructor,i;return t===void 0||sv(i=Na(t)[cv])?e:av(i)}});var Pt=n((ES,Da)=>{"use strict";var lv=$();Da.exports=lv("document","documentElement")});var $a=n((qS,ka)=>{"use strict";var fv=q();ka.exports=fv([].slice)});var ja=n((PS,Ma)=>{"use strict";var dv=TypeError;Ma.exports=function(r,e){if(r<e)throw dv("Not enough arguments");return r}});var Tt=n((TS,Fa)=>{"use strict";var pv=Se();Fa.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(pv)});var Lt=n((OS,Qa)=>{"use strict";var O=I(),vv=Dr(),hv=Pe(),Ba=b(),gv=w(),za=T(),Ua=Pt(),mv=$a(),Va=Qe(),bv=ja(),yv=Tt(),Sv=Oe(),At=O.setImmediate,Ct=O.clearImmediate,Iv=O.process,Ot=O.Dispatch,Ev=O.Function,Ga=O.MessageChannel,qv=O.String,_t=0,xe={},Ka="onreadystatechange",Re,K,xt,Rt;za(function(){Re=O.location});var Nt=function(r){if(gv(xe,r)){var e=xe[r];delete xe[r],e()}},wt=function(r){return function(){Nt(r)}},Wa=function(r){Nt(r.data)},Ha=function(r){O.postMessage(qv(r),Re.protocol+"//"+Re.host)};(!At||!Ct)&&(At=function(e){bv(arguments.length,1);var t=Ba(e)?e:Ev(e),i=mv(arguments,1);return xe[++_t]=function(){vv(t,void 0,i)},K(_t),_t},Ct=function(e){delete xe[e]},Sv?K=function(r){Iv.nextTick(wt(r))}:Ot&&Ot.now?K=function(r){Ot.now(wt(r))}:Ga&&!yv?(xt=new Ga,Rt=xt.port2,xt.port1.onmessage=Wa,K=hv(Rt.postMessage,Rt)):O.addEventListener&&Ba(O.postMessage)&&!O.importScripts&&Re&&Re.protocol!=="file:"&&!za(Ha)?(K=Ha,O.addEventListener("message",Wa,!1)):Ka in Va("script")?K=function(r){Ua.appendChild(Va("script"))[Ka]=function(){Ua.removeChild(this),Nt(r)}}:K=function(r){setTimeout(wt(r),0)});Qa.exports={set:At,clear:Ct}});var Dt=n((_S,Ja)=>{"use strict";var Ya=function(){this.head=null,this.tail=null};Ya.prototype={add:function(r){var e={item:r,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var r=this.head;if(r){var e=this.head=r.next;return e===null&&(this.tail=null),r.item}}};Ja.exports=Ya});var Za=n((xS,Xa)=>{"use strict";var Pv=Se();Xa.exports=/ipad|iphone|ipod/i.test(Pv)&&typeof Pebble!="undefined"});var rs=n((RS,es)=>{"use strict";var Tv=Se();es.exports=/web0s(?!.*chrome)/i.test(Tv)});var cs=n((wS,us)=>{"use strict";var W=I(),ts=Pe(),Ov=tt().f,kt=Lt().set,_v=Dt(),xv=Tt(),Rv=Za(),wv=rs(),$t=Oe(),is=W.MutationObserver||W.WebKitMutationObserver,os=W.document,ns=W.process,rr=W.Promise,as=Ov(W,"queueMicrotask"),Ft=as&&as.value,ae,Mt,jt,tr,ss;Ft||(we=new _v,Ae=function(){var r,e;for($t&&(r=ns.domain)&&r.exit();e=we.get();)try{e()}catch(t){throw we.head&&ae(),t}r&&r.enter()},!xv&&!$t&&!wv&&is&&os?(Mt=!0,jt=os.createTextNode(""),new is(Ae).observe(jt,{characterData:!0}),ae=function(){jt.data=Mt=!Mt}):!Rv&&rr&&rr.resolve?(tr=rr.resolve(void 0),tr.constructor=rr,ss=ts(tr.then,tr),ae=function(){ss(Ae)}):$t?ae=function(){ns.nextTick(Ae)}:(kt=ts(kt,W),ae=function(){kt(Ae)}),Ft=function(r){we.head||ae(),we.add(r)});var we,Ae;us.exports=Ft});var fs=n((AS,ls)=>{"use strict";ls.exports=function(r,e){try{arguments.length==1?console.error(r):console.error(r,e)}catch(t){}}});var ir=n((CS,ds)=>{"use strict";ds.exports=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}}});var hs=n((NS,vs)=>{"use strict";var Av=I(),Cv=b(),ps=Av.WeakMap;vs.exports=Cv(ps)&&/native code/.test(String(ps))});var or=n((LS,ms)=>{"use strict";var Nv=Jr(),Lv=Xr(),gs=Nv("keys");ms.exports=function(r){return gs[r]||(gs[r]=Lv(r))}});var nr=n((DS,bs)=>{"use strict";bs.exports={}});var Gt=n((kS,Is)=>{"use strict";var Dv=hs(),Ss=I(),kv=D(),$v=G(),Bt=w(),Ut=We(),Mv=or(),jv=nr(),ys="Object already initialized",Vt=Ss.TypeError,Fv=Ss.WeakMap,ar,Ce,sr,Bv=function(r){return sr(r)?Ce(r):ar(r,{})},Uv=function(r){return function(e){var t;if(!kv(e)||(t=Ce(e)).type!==r)throw Vt("Incompatible receiver, "+r+" required");return t}};Dv||Ut.state?(N=Ut.state||(Ut.state=new Fv),N.get=N.get,N.has=N.has,N.set=N.set,ar=function(r,e){if(N.has(r))throw Vt(ys);return e.facade=r,N.set(r,e),e},Ce=function(r){return N.get(r)||{}},sr=function(r){return N.has(r)}):(H=Mv("state"),jv[H]=!0,ar=function(r,e){if(Bt(r,H))throw Vt(ys);return e.facade=r,$v(r,H,e),e},Ce=function(r){return Bt(r,H)?r[H]:{}},sr=function(r){return Bt(r,H)});var N,H;Is.exports={set:ar,get:Ce,has:sr,enforce:Bv,getterFor:Uv}});var z=n(($S,Es)=>{"use strict";var Vv=I();Es.exports=Vv.Promise});var Kt=n((MS,qs)=>{"use strict";qs.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"});var Ts=n((jS,Ps)=>{"use strict";var Gv=Kt(),Kv=Oe();Ps.exports=!Gv&&!Kv&&typeof window=="object"&&typeof document=="object"});var se=n((FS,xs)=>{"use strict";var Wv=I(),Ne=z(),Hv=b(),zv=it(),Qv=It(),Yv=E(),Jv=Ts(),Xv=Kt(),Zv=R(),Wt=Gr(),Os=Ne&&Ne.prototype,eh=Yv("species"),Ht=!1,_s=Hv(Wv.PromiseRejectionEvent),rh=zv("Promise",function(){var r=Qv(Ne),e=r!==String(Ne);if(!e&&Wt===66||Zv&&!(Os.catch&&Os.finally))return!0;if(!Wt||Wt<51||!/native code/.test(r)){var t=new Ne(function(s){s(1)}),i=function(s){s(function(){},function(){})},o=t.constructor={};if(o[eh]=i,Ht=t.then(function(){})instanceof i,!Ht)return!0}return!e&&(Jv||Xv)&&!_s});xs.exports={CONSTRUCTOR:rh,REJECTION_EVENT:_s,SUBCLASSING:Ht}});var ue=n((BS,ws)=>{"use strict";var Rs=M(),th=TypeError,ih=function(r){var e,t;this.promise=new r(function(i,o){if(e!==void 0||t!==void 0)throw th("Bad Promise constructor");e=i,t=o}),this.resolve=Rs(e),this.reject=Rs(t)};ws.exports.f=function(r){return new ih(r)}});var Qs=n(()=>{"use strict";var oh=C(),nh=R(),fr=Oe(),U=I(),de=P(),As=ne(),Cs=yt(),ah=er(),sh=Ia(),uh=M(),lr=b(),ch=D(),lh=qa(),fh=qt(),$s=Lt().set,Xt=cs(),dh=fs(),ph=ir(),vh=Dt(),Ms=Gt(),dr=z(),Zt=se(),js=ue(),pr="Promise",Fs=Zt.CONSTRUCTOR,hh=Zt.REJECTION_EVENT,gh=Zt.SUBCLASSING,zt=Ms.getterFor(pr),mh=Ms.set,ce=dr&&dr.prototype,Q=dr,ur=ce,Bs=U.TypeError,Qt=U.document,ei=U.process,Yt=js.f,bh=Yt,yh=!!(Qt&&Qt.createEvent&&U.dispatchEvent),Us="unhandledrejection",Sh="rejectionhandled",Ns=0,Vs=1,Ih=2,ri=1,Gs=2,cr,Ls,Eh,Ds,Ks=function(r){var e;return ch(r)&&lr(e=r.then)?e:!1},Ws=function(r,e){var t=e.value,i=e.state==Vs,o=i?r.ok:r.fail,s=r.resolve,u=r.reject,l=r.domain,p,c,a;try{o?(i||(e.rejection===Gs&&Ph(e),e.rejection=ri),o===!0?p=t:(l&&l.enter(),p=o(t),l&&(l.exit(),a=!0)),p===r.promise?u(Bs("Promise-chain cycle")):(c=Ks(p))?de(c,p,s,u):s(p)):u(t)}catch(f){l&&!a&&l.exit(),u(f)}},Hs=function(r,e){r.notified||(r.notified=!0,Xt(function(){for(var t=r.reactions,i;i=t.get();)Ws(i,r);r.notified=!1,e&&!r.rejection&&qh(r)}))},zs=function(r,e,t){var i,o;yh?(i=Qt.createEvent("Event"),i.promise=e,i.reason=t,i.initEvent(r,!1,!0),U.dispatchEvent(i)):i={promise:e,reason:t},!hh&&(o=U["on"+r])?o(i):r===Us&&dh("Unhandled promise rejection",t)},qh=function(r){de($s,U,function(){var e=r.facade,t=r.value,i=ks(r),o;if(i&&(o=ph(function(){fr?ei.emit("unhandledRejection",t,e):zs(Us,e,t)}),r.rejection=fr||ks(r)?Gs:ri,o.error))throw o.value})},ks=function(r){return r.rejection!==ri&&!r.parent},Ph=function(r){de($s,U,function(){var e=r.facade;fr?ei.emit("rejectionHandled",e):zs(Sh,e,r.value)})},le=function(r,e,t){return function(i){r(e,i,t)}},fe=function(r,e,t){r.done||(r.done=!0,t&&(r=t),r.value=e,r.state=Ih,Hs(r,!0))},Jt=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw Bs("Promise can't be resolved itself");var i=Ks(e);i?Xt(function(){var o={done:!1};try{de(i,e,le(Jt,o,r),le(fe,o,r))}catch(s){fe(o,s,r)}}):(r.value=e,r.state=Vs,Hs(r,!1))}catch(o){fe({done:!1},o,r)}}};if(Fs&&(Q=function(e){lh(this,ur),uh(e),de(cr,this);var t=zt(this);try{e(le(Jt,t),le(fe,t))}catch(i){fe(t,i)}},ur=Q.prototype,cr=function(e){mh(this,{type:pr,done:!1,notified:!1,parent:!1,reactions:new vh,rejection:!1,state:Ns,value:void 0})},cr.prototype=As(ur,"then",function(e,t){var i=zt(this),o=Yt(fh(this,Q));return i.parent=!0,o.ok=lr(e)?e:!0,o.fail=lr(t)&&t,o.domain=fr?ei.domain:void 0,i.state==Ns?i.reactions.add(o):Xt(function(){Ws(o,i)}),o.promise}),Ls=function(){var r=new cr,e=zt(r);this.promise=r,this.resolve=le(Jt,e),this.reject=le(fe,e)},js.f=Yt=function(r){return r===Q||r===Eh?new Ls(r):bh(r)},!nh&&lr(dr)&&ce!==Object.prototype)){Ds=ce.then,gh||As(ce,"then",function(e,t){var i=this;return new Q(function(o,s){de(Ds,i,o,s)}).then(e,t)},{unsafe:!0});try{delete ce.constructor}catch(r){}Cs&&Cs(ce,ur)}oh({global:!0,constructor:!0,wrap:!0,forced:Fs},{Promise:Q});ah(Q,pr,!1,!0);sh(pr)});var Y=n((GS,Ys)=>{"use strict";Ys.exports={}});var Xs=n((KS,Js)=>{"use strict";var Th=E(),Oh=Y(),_h=Th("iterator"),xh=Array.prototype;Js.exports=function(r){return r!==void 0&&(Oh.Array===r||xh[_h]===r)}});var eu=n((WS,Zs)=>{"use strict";var Rh=Math.ceil,wh=Math.floor;Zs.exports=Math.trunc||function(e){var t=+e;return(t>0?wh:Rh)(t)}});var ti=n((HS,ru)=>{"use strict";var Ah=eu();ru.exports=function(r){var e=+r;return e!==e||e===0?0:Ah(e)}});var iu=n((zS,tu)=>{"use strict";var Ch=ti(),Nh=Math.min;tu.exports=function(r){return r>0?Nh(Ch(r),9007199254740991):0}});var ii=n((QS,ou)=>{"use strict";var Lh=iu();ou.exports=function(r){return Lh(r.length)}});var oi=n((YS,au)=>{"use strict";var Dh=ie(),nu=Ee(),kh=X(),$h=Y(),Mh=E(),jh=Mh("iterator");au.exports=function(r){if(!kh(r))return nu(r,jh)||nu(r,"@@iterator")||$h[Dh(r)]}});var uu=n((JS,su)=>{"use strict";var Fh=P(),Bh=M(),Uh=A(),Vh=Ie(),Gh=oi(),Kh=TypeError;su.exports=function(r,e){var t=arguments.length<2?Gh(r):e;if(Bh(t))return Uh(Fh(t,r));throw Kh(Vh(r)+" is not iterable")}});var fu=n((XS,lu)=>{"use strict";var Wh=P(),cu=A(),Hh=Ee();lu.exports=function(r,e,t){var i,o;cu(r);try{if(i=Hh(r,"return"),!i){if(e==="throw")throw t;return t}i=Wh(i,r)}catch(s){o=!0,i=s}if(e==="throw")throw t;if(o)throw i;return cu(i),t}});var hr=n((ZS,hu)=>{"use strict";var zh=Pe(),Qh=P(),Yh=A(),Jh=Ie(),Xh=Xs(),Zh=ii(),du=ye(),eg=uu(),rg=oi(),pu=fu(),tg=TypeError,vr=function(r,e){this.stopped=r,this.result=e},vu=vr.prototype;hu.exports=function(r,e,t){var i=t&&t.that,o=!!(t&&t.AS_ENTRIES),s=!!(t&&t.IS_RECORD),u=!!(t&&t.IS_ITERATOR),l=!!(t&&t.INTERRUPTED),p=zh(e,i),c,a,f,v,d,h,g,y=function(S){return c&&pu(c,"normal",S),new vr(!0,S)},m=function(S){return o?(Yh(S),l?p(S[0],S[1],y):p(S[0],S[1])):l?p(S,y):p(S)};if(s)c=r.iterator;else if(u)c=r;else{if(a=rg(r),!a)throw tg(Jh(r)+" is not iterable");if(Xh(a)){for(f=0,v=Zh(r);v>f;f++)if(d=m(r[f]),d&&du(vu,d))return d;return new vr(!1)}c=eg(r,a)}for(h=s?r.next:c.next;!(g=Qh(h,c)).done;){try{d=m(g.value)}catch(S){pu(c,"throw",S)}if(typeof d=="object"&&d&&du(vu,d))return d}return new vr(!1)}});var Su=n((eI,yu)=>{"use strict";var ig=E(),mu=ig("iterator"),bu=!1;try{gu=0,ni={next:function(){return{done:!!gu++}},return:function(){bu=!0}},ni[mu]=function(){return this},Array.from(ni,function(){throw 2})}catch(r){}var gu,ni;yu.exports=function(r,e){if(!e&&!bu)return!1;var t=!1;try{var i={};i[mu]=function(){return{next:function(){return{done:t=!0}}}},r(i)}catch(o){}return t}});var ai=n((rI,Iu)=>{"use strict";var og=z(),ng=Su(),ag=se().CONSTRUCTOR;Iu.exports=ag||!ng(function(r){og.all(r).then(void 0,function(){})})});var Eu=n(()=>{"use strict";var sg=C(),ug=P(),cg=M(),lg=ue(),fg=ir(),dg=hr(),pg=ai();sg({target:"Promise",stat:!0,forced:pg},{all:function(e){var t=this,i=lg.f(t),o=i.resolve,s=i.reject,u=fg(function(){var l=cg(t.resolve),p=[],c=0,a=1;dg(e,function(f){var v=c++,d=!1;a++,ug(l,t,f).then(function(h){d||(d=!0,p[v]=h,--a||o(p))},s)}),--a||o(p)});return u.error&&s(u.value),i.promise}})});var Pu=n(()=>{"use strict";var vg=C(),hg=R(),gg=se().CONSTRUCTOR,ui=z(),mg=$(),bg=b(),yg=ne(),qu=ui&&ui.prototype;vg({target:"Promise",proto:!0,forced:gg,real:!0},{catch:function(r){return this.then(void 0,r)}});!hg&&bg(ui)&&(si=mg("Promise").prototype.catch,qu.catch!==si&&yg(qu,"catch",si,{unsafe:!0}));var si});var Tu=n(()=>{"use strict";var Sg=C(),Ig=P(),Eg=M(),qg=ue(),Pg=ir(),Tg=hr(),Og=ai();Sg({target:"Promise",stat:!0,forced:Og},{race:function(e){var t=this,i=qg.f(t),o=i.reject,s=Pg(function(){var u=Eg(t.resolve);Tg(e,function(l){Ig(u,t,l).then(i.resolve,o)})});return s.error&&o(s.value),i.promise}})});var Ou=n(()=>{"use strict";var _g=C(),xg=P(),Rg=ue(),wg=se().CONSTRUCTOR;_g({target:"Promise",stat:!0,forced:wg},{reject:function(e){var t=Rg.f(this);return xg(t.reject,void 0,e),t.promise}})});var ci=n((lI,_u)=>{"use strict";var Ag=A(),Cg=D(),Ng=ue();_u.exports=function(r,e){if(Ag(r),Cg(e)&&e.constructor===r)return e;var t=Ng.f(r),i=t.resolve;return i(e),t.promise}});var wu=n(()=>{"use strict";var Lg=C(),Dg=$(),xu=R(),kg=z(),Ru=se().CONSTRUCTOR,$g=ci(),Mg=Dg("Promise"),jg=xu&&!Ru;Lg({target:"Promise",stat:!0,forced:xu||Ru},{resolve:function(e){return $g(jg&&this===Mg?kg:this,e)}})});var Au=n(()=>{"use strict";Qs();Eu();Pu();Tu();Ou();wu()});var Du=n(()=>{"use strict";var Fg=C(),Bg=R(),gr=z(),Ug=T(),Nu=$(),Lu=b(),Vg=qt(),Cu=ci(),Gg=ne(),fi=gr&&gr.prototype,Kg=!!gr&&Ug(function(){fi.finally.call({then:function(){}},function(){})});Fg({target:"Promise",proto:!0,real:!0,forced:Kg},{finally:function(r){var e=Vg(this,Nu("Promise")),t=Lu(r);return this.then(t?function(i){return Cu(e,r()).then(function(){return i})}:r,t?function(i){return Cu(e,r()).then(function(){throw i})}:r)}});!Bg&&Lu(gr)&&(li=Nu("Promise").prototype.finally,fi.finally!==li&&Gg(fi,"finally",li,{unsafe:!0}));var li});var $u=n((mI,ku)=>{"use strict";na();Au();Du();var Wg=pt();ku.exports=Wg("Promise","finally")});var ju=n((bI,Mu)=>{"use strict";var Hg=$u();Mu.exports=Hg});var Bu=n((yI,Fu)=>{"use strict";var zg=ju();Fu.exports=zg});var Vu=n((SI,Uu)=>{"use strict";Uu.exports=function(){}});var Wu=n((II,Ku)=>{"use strict";var di=L(),Qg=w(),Gu=Function.prototype,Yg=di&&Object.getOwnPropertyDescriptor,pi=Qg(Gu,"name"),Jg=pi&&function(){}.name==="something",Xg=pi&&(!di||di&&Yg(Gu,"name").configurable);Ku.exports={EXISTS:pi,PROPER:Jg,CONFIGURABLE:Xg}});var zu=n((EI,Hu)=>{"use strict";var Zg=ti(),em=Math.max,rm=Math.min;Hu.exports=function(r,e){var t=Zg(r);return t<0?em(t+e,0):rm(t,e)}});var Ju=n((qI,Yu)=>{"use strict";var tm=Z(),im=zu(),om=ii(),Qu=function(r){return function(e,t,i){var o=tm(e),s=om(o),u=im(i,s),l;if(r&&t!=t){for(;s>u;)if(l=o[u++],l!=l)return!0}else for(;s>u;u++)if((r||u in o)&&o[u]===t)return r||u||0;return!r&&-1}};Yu.exports={includes:Qu(!0),indexOf:Qu(!1)}});var ec=n((PI,Zu)=>{"use strict";var nm=q(),vi=w(),am=Z(),sm=Ju().indexOf,um=nr(),Xu=nm([].push);Zu.exports=function(r,e){var t=am(r),i=0,o=[],s;for(s in t)!vi(um,s)&&vi(t,s)&&Xu(o,s);for(;e.length>i;)vi(t,s=e[i++])&&(~sm(o,s)||Xu(o,s));return o}});var hi=n((TI,rc)=>{"use strict";rc.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var ic=n((OI,tc)=>{"use strict";var cm=ec(),lm=hi();tc.exports=Object.keys||function(e){return cm(e,lm)}});var nc=n(oc=>{"use strict";var fm=L(),dm=ot(),pm=V(),vm=A(),hm=Z(),gm=ic();oc.f=fm&&!dm?Object.defineProperties:function(e,t){vm(e);for(var i=hm(t),o=gm(t),s=o.length,u=0,l;s>u;)pm.f(e,l=o[u++],i[l]);return e}});var yi=n((xI,dc)=>{"use strict";var mm=A(),bm=nc(),ac=hi(),ym=nr(),Sm=Pt(),Im=Qe(),Em=or(),sc=">",uc="<",mi="prototype",bi="script",lc=Em("IE_PROTO"),gi=function(){},fc=function(r){return uc+bi+sc+r+uc+"/"+bi+sc},cc=function(r){r.write(fc("")),r.close();var e=r.parentWindow.Object;return r=null,e},qm=function(){var r=Im("iframe"),e="java"+bi+":",t;return r.style.display="none",Sm.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(fc("document.F=Object")),t.close(),t.F},mr,br=function(){try{mr=new ActiveXObject("htmlfile")}catch(e){}br=typeof document!="undefined"?document.domain&&mr?cc(mr):qm():cc(mr);for(var r=ac.length;r--;)delete br[mi][ac[r]];return br()};ym[lc]=!0;dc.exports=Object.create||function(e,t){var i;return e!==null?(gi[mi]=mm(e),i=new gi,gi[mi]=null,i[lc]=e):i=br(),t===void 0?i:bm.f(i,t)}});var vc=n((RI,pc)=>{"use strict";var Pm=T();pc.exports=!Pm(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype})});var Ii=n((wI,gc)=>{"use strict";var Tm=w(),Om=b(),_m=He(),xm=or(),Rm=vc(),hc=xm("IE_PROTO"),Si=Object,wm=Si.prototype;gc.exports=Rm?Si.getPrototypeOf:function(r){var e=_m(r);if(Tm(e,hc))return e[hc];var t=e.constructor;return Om(t)&&e instanceof t?t.prototype:e instanceof Si?wm:null}});var Ti=n((AI,yc)=>{"use strict";var Am=T(),Cm=b(),Nm=D(),Lm=yi(),mc=Ii(),Dm=ne(),km=E(),$m=R(),Pi=km("iterator"),bc=!1,j,Ei,qi;[].keys&&(qi=[].keys(),"next"in qi?(Ei=mc(mc(qi)),Ei!==Object.prototype&&(j=Ei)):bc=!0);var Mm=!Nm(j)||Am(function(){var r={};return j[Pi].call(r)!==r});Mm?j={}:$m&&(j=Lm(j));Cm(j[Pi])||Dm(j,Pi,function(){return this});yc.exports={IteratorPrototype:j,BUGGY_SAFARI_ITERATORS:bc}});var Ic=n((CI,Sc)=>{"use strict";var jm=Ti().IteratorPrototype,Fm=yi(),Bm=be(),Um=er(),Vm=Y(),Gm=function(){return this};Sc.exports=function(r,e,t,i){var o=e+" Iterator";return r.prototype=Fm(jm,{next:Bm(+!i,t)}),Um(r,o,!1,!0),Vm[o]=Gm,r}});var Cc=n((NI,Ac)=>{"use strict";var Km=C(),Wm=P(),yr=R(),Rc=Wu(),Hm=b(),zm=Ic(),Ec=Ii(),qc=yt(),Qm=er(),Ym=G(),Oi=ne(),Jm=E(),Pc=Y(),wc=Ti(),Xm=Rc.PROPER,Zm=Rc.CONFIGURABLE,Tc=wc.IteratorPrototype,Sr=wc.BUGGY_SAFARI_ITERATORS,Le=Jm("iterator"),Oc="keys",De="values",_c="entries",xc=function(){return this};Ac.exports=function(r,e,t,i,o,s,u){zm(t,e,i);var l=function(m){if(m===o&&v)return v;if(!Sr&&m in a)return a[m];switch(m){case Oc:return function(){return new t(this,m)};case De:return function(){return new t(this,m)};case _c:return function(){return new t(this,m)}}return function(){return new t(this)}},p=e+" Iterator",c=!1,a=r.prototype,f=a[Le]||a["@@iterator"]||o&&a[o],v=!Sr&&f||l(o),d=e=="Array"&&a.entries||f,h,g,y;if(d&&(h=Ec(d.call(new r)),h!==Object.prototype&&h.next&&(!yr&&Ec(h)!==Tc&&(qc?qc(h,Tc):Hm(h[Le])||Oi(h,Le,xc)),Qm(h,p,!0,!0),yr&&(Pc[p]=xc))),Xm&&o==De&&f&&f.name!==De&&(!yr&&Zm?Ym(a,"name",De):(c=!0,v=function(){return Wm(f,this)})),o)if(g={values:l(De),keys:s?v:l(Oc),entries:l(_c)},u)for(y in g)(Sr||c||!(y in a))&&Oi(a,y,g[y]);else Km({target:e,proto:!0,forced:Sr||c},g);return(!yr||u)&&a[Le]!==v&&Oi(a,Le,v,{name:o}),Pc[e]=v,g}});var Lc=n((LI,Nc)=>{"use strict";Nc.exports=function(r,e){return{value:r,done:e}}});var xi=n((DI,jc)=>{"use strict";var eb=Z(),_i=Vu(),Dc=Y(),$c=Gt(),rb=V().f,tb=Cc(),Ir=Lc(),ib=R(),ob=L(),Mc="Array Iterator",nb=$c.set,ab=$c.getterFor(Mc);jc.exports=tb(Array,"Array",function(r,e){nb(this,{type:Mc,target:eb(r),index:0,kind:e})},function(){var r=ab(this),e=r.target,t=r.kind,i=r.index++;return!e||i>=e.length?(r.target=void 0,Ir(void 0,!0)):t=="keys"?Ir(i,!1):t=="values"?Ir(e[i],!1):Ir([i,e[i]],!1)},"values");var kc=Dc.Arguments=Dc.Array;_i("keys");_i("values");_i("entries");if(!ib&&ob&&kc.name!=="values")try{rb(kc,"name",{value:"values"})}catch(r){}});var Bc=n((kI,Fc)=>{"use strict";var sb=ze(),ub=V(),cb=be();Fc.exports=function(r,e,t){var i=sb(e);i in r?ub.f(r,i,cb(0,t)):r[i]=t}});var Uc=n(()=>{"use strict";var lb=C(),fb=hr(),db=Bc();lb({target:"Object",stat:!0},{fromEntries:function(e){var t={};return fb(e,function(i,o){db(t,i,o)},{AS_ENTRIES:!0}),t}})});var Gc=n((jI,Vc)=>{"use strict";xi();Uc();var pb=Ge();Vc.exports=pb.Object.fromEntries});var Wc=n((FI,Kc)=>{"use strict";Kc.exports={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}});var Qc=n(()=>{"use strict";xi();var vb=Wc(),hb=I(),gb=ie(),mb=G(),Hc=Y(),bb=E(),zc=bb("toStringTag");for(Er in vb)Ri=hb[Er],qr=Ri&&Ri.prototype,qr&&gb(qr)!==zc&&mb(qr,zc,Er),Hc[Er]=Hc.Array;var Ri,qr,Er});var Jc=n((VI,Yc)=>{"use strict";var yb=Gc();Qc();Yc.exports=yb});var Zc=n((GI,Xc)=>{"use strict";var Sb=Jc();Xc.exports=Sb});var bl=Lr(Xn(),1);var Te=(s=>(s.PROD="prod",s.VK_ALIAS="vk_alias",s.VIDEOTEST="videotest",s.TEST="test",s.AUTO="auto",s))(Te||{}),vt=(c=>(c.Q144P="mobile",c.Q240P="lowest",c.Q360P="low",c.Q480P="medium",c.Q720P="high",c.Q1080P="fullhd",c.Q1440P="quadhd",c.Q2160P="ultrahd",c.UNKNOWN="unknown",c))(vt||{}),ht=(d=>(d.MP4="mp4",d.DASH="dash",d.DASH_SEP="dash_sep",d.ONDEMAND_DASH="ondemand_dash",d.HLS="hls",d.ONDEMAND_HLS="ondemand_hls",d.WEBM="webm",d.AV1="av1",d.ONDEMAND_DASH_LIVE="ondemand_dash_live",d.ONDEMAND_HLS_LIVE="ondemand_hls_live",d.WEBRTC="webrtc",d.UNKNOWN="unknown",d.RTMP="rtmp",d))(ht||{});var gt=(i=>(i.HTTP1="http1",i.HTTP2="http2",i.HTTP3="http3",i))(gt||{});var mt=(l=>(l.SLIDER="slider",l.DOUBLE_TAP="double_tap",l.TIME_CODE="time_code",l.EPISODE="episode",l.REWIND="rewind",l.LIVE="live",l.UNKNOWN="unknown",l))(mt||{}),Zn=(s=>(s.GRAPH_SHOW="iGraphShow",s.GRAPH_HIDE="iGraphHide",s.NEXT_AREA="iNextChapterArea",s.NEXT_BUTTON="iNextChapterBtn",s.WATCH_AGAIN="iWatchAgainBtn",s))(Zn||{}),ea={action_play:"ap",action_play_interactive:"api",first_bytes:"fb",player_ready:"pr",first_frame:"ff",seek:"sk",watch_coverage_record:"wr",watch_coverage_live:"wl",empty_buffer:"eb",action_stop:"as",close_at_empty_buffer:"cb",content_error:"er",player_interface_click:"pc",next_movie:"nm",track_switch:"ts",failover:"fo"},ra={vsid:"si",isid:"is",vid:"vi",place:"pl",quality:"qt",cdn_host:"ch",stat_type:"st",param:"pm",vk_app_id:"va",track_code:"tc",connection_type:"cnt",connection_reused:"cr",cached_data:"cd",live:"lv",muted:"mu",mode:"mo",subtitles:"sb",failover:"fo",download_speed:"ds",manual_quality:"mq",ref_domain:"rd",direct_url:"du"},ta={unknown:"un",mobile:"m",lowest:"ls",low:"l",medium:"md",high:"h",fullhd:"f",quadhd:"q",ultrahd:"u"},ia={pip:"pi",fullscreen:"fs",external:"ex",prefetch:"pr",airplay:"ap",chromecast:"cc",invisible:"iv"};import{fillWithDefault as yp}from"@vkontakte/videoplayer-shared";var Sp={apiEnv:"vk_alias",requestRetryCount:1,firstFlushTime:5e3,flushDebounceTime:1e4,flushMaxWait:6e4,storageExpiration:36*60*60*1e3,watchCoverageInterval:15e3,disabledOperations:[],disabledCustomFields:[],shorten:!0,maxLoops:100,embedUrlParams:[],useBeacon:!0,synchronizeTime:!0,debugLog:!1,backoff:{start:1e3,factor:1.5,max:5*60*1e3,random:.1}},oa=r=>yp(r,Sp);function bt(){let r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),e=new Array(36),t=0,i,o;for(o=0;o<36;o++)o===8||o===13||o===18||o===23?e[o]="-":o===14?e[o]="4":(t<=2&&(t=33554432+Math.random()*16777216|0),i=t&15,t=t>>4,e[o]=r[o===19?i&3|8:i]);return e.join("")}import{assertNonNullable as Cb,combine as hl,fromEvent as gl,isNonNullable as ge,isNullable as ml,merge as Nb,now as F,observableFrom as Lb,once as Db,safeStorage as ji,Subject as kb,Subscription as Vi,ValueSubject as Fi}from"@vkontakte/videoplayer-shared";import{Logger as $b,detectEmbed as Mb}from"@vkontakte/videoplayer-shared";var Tr=Lr(Bu(),1);var el=Lr(Zc(),1);var rl=r=>{var o;let{operation:e,custom:t}=r,i=(0,el.default)(Object.entries(t).map(([s,u])=>{var c,a,f;let l=(c=ra[s])!=null?c:s,p=u;return u&&(s==="mode"?p=(a=ia[u])!=null?a:u:s==="quality"&&(p=(f=ta[u])!=null?f:u)),[l,p]}));return{...r,operation:(o=ea[e])!=null?o:e,custom:i}};var Pr="__VERSION__",tl="CIOPGQJGDIHBABABA",wi={prod:"https://api.ok.ru",vk_alias:"https://api.mycdn.me",videotest:"https://videotestapi.ok.ru/api",test:"https://apitest.ok.ru",auto:""};import{ValueSubject as Ib,getExponentialDelay as Eb,ErrorCategory as pe}from"@vkontakte/videoplayer-shared";var ke=class{constructor(e){this.consequentAuthErrors=0;this.authorized$=new Ib(!1);this.params=e}async authorize(e){return this.authToken=e!=null?e:await this.refreshAuthToken(),this._authorizeWithBackoff()}logBeacon(e){let t="log.externalLog",i=this.createLogParams(e),o=this.sessionKey;if(!o)return;this.params.apiTransport.sendBeacon(t,i,o)||this.logRequest(e)}async logRequest(e){var u;let t="log.externalLog",i=this.createLogParams(e),o=(u=this.sessionKey)!=null?u:await this._authorizeWithBackoff();if(!o)return;let s=async(l,p=this.params.config.requestRetryCount)=>{try{return await this.params.apiTransport.sendRequest(t,i,o)}catch(c){if(!c||!("error_code"in c)){this.params.error$.next({id:"logRequestUnknown",category:pe.NETWORK,message:`Unknown ${t} error`,thrown:c});return}let a=c==null?void 0:c.error_code;switch(a){case 102:case 103:case 104:return this.authorized$.next(!1),this.sessionKey=await this._authorizeWithBackoff(),p>0?s(l,p-1):void 0;case 401:return this.authorized$.next(!1),this.authToken=await this.refreshAuthToken(),this.sessionKey=await this._authorizeWithBackoff(),p>0?s(l,p-1):void 0;default:{this.params.error$.next({id:`LogRequest#${a}`,category:pe.EXTERNAL_API,message:`${t} error`,data:c});return}}}};return s(e)}destroy(){window.clearTimeout(this.backoffTimeoutId),this.backoffTimeoutId=0}async refreshAuthToken(){if(this.params.refreshAuthToken)return this.refreshAuthTokenPromise||(this.refreshAuthTokenPromise=(0,Tr.default)(this.params.refreshAuthToken(),()=>{this.refreshAuthTokenPromise=void 0})),this.refreshAuthTokenPromise}createLogParams(e){return{collector:"ok.mobile.apps.video",data:JSON.stringify({application:`@vkontakte/videoplayer-statistics:${Pr}`,platform:this.params.mobile?"M_WEB":"WEB",items:this.params.config.shorten?e.map(rl):e})}}_authorizeWithBackoff(){if(!this.consequentAuthErrors)return this._authorize();let e=Eb(this.consequentAuthErrors,this.params.config.backoff);return new Promise(t=>{this.backoffTimeoutId||(this.backoffTimeoutId=window.setTimeout(()=>{(0,Tr.default)(this._authorize().then(t).catch(i=>this.params.error$.next({id:"AuthorizeBackoff",category:pe.NETWORK,message:"Otherwise unhandled error in authorization",thrown:i})),()=>this.backoffTimeoutId=0)},e))})}async _authorize(){if(this.authorizePromise)return this.authorizePromise;this.sessionKey=void 0,this.authorized$.next(!1);let e="auth.anonymLogin",t={session_data:{version:2,device_id:this.params.uuid,client_version:Pr.split("-")[0],client_type:"SDK_JS"}};return this.authToken!==void 0&&(t.session_data.auth_token=this.authToken,t.session_data.version=3),this.authorizePromise=(0,Tr.default)(this.params.apiTransport.sendRequest(e,t).then(i=>{var o;return(!i||!i.session_key)&&this.params.error$.next({id:"AuthorizeFailed",category:pe.EXTERNAL_API,message:"No session key",data:i}),this.sessionKey=(o=i==null?void 0:i.session_key)!=null?o:void 0,this.sessionKey}).catch(async i=>{this.sessionKey=void 0;let o=i==null?void 0:i.error_code;switch(o){case 401:return this.authToken=await this.refreshAuthToken(),this._authorizeWithBackoff()}o?this.params.error$.next({id:`Authorize#${o}`,category:pe.EXTERNAL_API,message:"authorize error",data:i}):this.params.error$.next({id:"AuthorizeUnknown",category:pe.NETWORK,message:"authorize error",thrown:i})}),()=>{this.authorizePromise=void 0,this.consequentAuthErrors=this.sessionKey?0:this.consequentAuthErrors+1,this.authorized$.next(this.sessionKey!==void 0)}),this.authorizePromise}};var Or=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(e,t,i){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:i})}removeEventListener(e,t){if(!(e in this.listeners))return;let i=this.listeners[e];for(let o=0,s=i.length;o<s;o++)if(i[o].callback===t){i.splice(o,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let i=this.listeners[e.type].slice();for(let o=0,s=i.length;o<s;o++){let u=i[o];try{u.callback.call(this,e)}catch(l){Promise.resolve().then(()=>{throw l})}u.options&&u.options.once&&this.removeEventListener(e.type,u.callback)}return!e.defaultPrevented}},ve=class extends Or{constructor(){super(),this.listeners||Or.call(this),Object.defineProperty(this,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,"reason",{value:void 0,writable:!0,configurable:!0})}toString(){return"[object AbortSignal]"}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,e)),super.dispatchEvent(e)}},$e=class{constructor(){Object.defineProperty(this,"signal",{value:new ve,writable:!0,configurable:!0})}abort(e){let t;try{t=new Event("abort")}catch(o){typeof document!="undefined"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}let i=e;if(i===void 0)if(typeof document=="undefined")i=new Error("This operation was aborted"),i.name="AbortError";else try{i=new DOMException("signal is aborted without reason")}catch(o){i=new Error("This operation was aborted"),i.name="AbortError"}this.signal.reason=i,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol!="undefined"&&Symbol.toStringTag&&($e.prototype[Symbol.toStringTag]="AbortController",ve.prototype[Symbol.toStringTag]="AbortSignal");function _r(r){return r.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof r.Request=="function"&&!r.Request.prototype.hasOwnProperty("signal")||!r.AbortController}function Ai(r){typeof r=="function"&&(r={fetch:r});let{fetch:e,Request:t=e.Request,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o=!1}=r;if(!_r({fetch:e,Request:t,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o}))return{fetch:e,Request:s};let s=t;(s&&!s.prototype.hasOwnProperty("signal")||o)&&(s=function(c,a){let f;a&&a.signal&&(f=a.signal,delete a.signal);let v=new t(c,a);return f&&Object.defineProperty(v,"signal",{writable:!1,enumerable:!1,configurable:!0,value:f}),v},s.prototype=t.prototype);let u=e;return{fetch:(p,c)=>{let a=s&&s.prototype.isPrototypeOf(p)?p.signal:c?c.signal:void 0;if(a){let f;try{f=new DOMException("Aborted","AbortError")}catch(d){f=new Error("Aborted"),f.name="AbortError"}if(a.aborted)return Promise.reject(f);let v=new Promise((d,h)=>{a.addEventListener("abort",()=>h(f),{once:!0})});return c&&c.signal&&delete c.signal,Promise.race([v,u(p,c)])}return u(p,c)},Request:s}}var Me=_r({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),il=Me?Ai({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,Ci=Me?il.fetch:window.fetch,fE=Me?il.Request:window.Request,dE=Me?$e:window.AbortController,pE=Me?ve:window.AbortSignal;import{ErrorCategory as xr,now as Ni}from"@vkontakte/videoplayer-shared";var je=class{constructor(e){this.params=e,this.apiKey=e.apiKey,this.apiEnv=e.config.apiEnv,this.apiBaseUrl=wi[this.apiEnv],this.timeSynchronisation=e.timeSynchronisation,this.isApiBaseUrlFetched=!1}async resolveApiBaseUrl(){var e;if(this.apiEnv!=="auto"||this.isApiBaseUrlFetched)return this.apiBaseUrl;try{let t=atob("aHR0cHM6Ly9kbnMuZ29vZ2xlL3Jlc29sdmU/bmFtZT12aWRlby5fZW5kcG9pbnQub2sucnUmdHlwZT1UWFQ="),o=await(await Ci(t,{method:"GET",mode:"cors",cache:"no-cache"})).json(),s=(e=o==null?void 0:o.Answer[0])==null?void 0:e.data;if(!s)throw new Error("Wrong DNS response");return s}catch(t){return this.params.error$.next({id:"OneStat:ApiTransport:resolveApiBaseUrl",category:xr.NETWORK,message:"Unhandled resolve api base url error",thrown:t}),wi.vk_alias}finally{this.isApiBaseUrlFetched=!0}}sendBeacon(e,t,i){if(!window.Blob||!window.navigator.sendBeacon)return!1;let o=this._prepareQueryParams({method:e,queryParams:t,sessionKey:i}),s=new window.Blob([o.toString()],{type:"application/x-www-form-urlencoded"});try{return window.navigator.sendBeacon(`${this.apiBaseUrl}/fb.do`,s)}catch(u){this.params.error$.next({id:"OneStat:ApiTransport:sendBeacon",category:xr.NETWORK,message:"Unhandled beacon error",thrown:u,data:{method:e,params:t}})}return!1}async sendRequest(e,t,i){let o=Ni(),s=u=>{if(u instanceof TypeError&&["Failed to fetch","NetworkError when attempting to fetch resource."].includes(u.message)){this.params.error$.next({id:"Network",category:xr.NETWORK,message:"Request failed",thrown:u});return}this.params.error$.next({id:"OneStat:ApiTransport:sendRequest",category:xr.NETWORK,message:"Unhandled request error",thrown:u,data:{method:e,params:t,sessionKey:i,time:Ni()-o}})};return this.apiBaseUrl=await this.resolveApiBaseUrl(),Ci(`${this.apiBaseUrl}/fb.do`,{method:"post",headers:{"Content-type":"application/x-www-form-urlencoded"},body:this._prepareQueryParams({method:e,queryParams:t,sessionKey:i})}).then(u=>{var a,f;let l=Number(u.headers.get("content-length"))===0,p=new Date((a=u.headers.get("date"))!=null?a:"").getTime(),c=Ni()-o;if(isFinite(p)&&((f=this.timeSynchronisation)==null||f.addServerTime(p,c)),!l)return u.json().then(v=>Object.prototype.hasOwnProperty.call(v,"error_msg")?Promise.reject(v):v,s)},s)}_prepareQueryParams(e){let t=new URLSearchParams({format:"JSON",method:e.method,application_key:this.apiKey});return e.sessionKey!==void 0&&t.append("session_key",e.sessionKey),Object.entries(e.queryParams).forEach(([i,o])=>t.append(i,typeof o=="string"?o:JSON.stringify(o))),t}};import{ErrorCategory as qb,now as Pb,safeStorage as Fe,debounceFn as ol}from"@vkontakte/videoplayer-shared";var Rr="onestat_events",Li=r=>e=>e.timestamp+r>=Pb(),wr=class{constructor(e){this.unsaltedStorage=[];this.isPaused=!1;this.isUrgent=e=>{let{operation:t}=e;return["action_play","watch_coverage_record","watch_coverage_live"].includes(t)};this.params=e,this.api=e.api,this.error$=e.error$,this.userSalt=e.userSalt,this.loggerDebugLog=e.debugLogger.createComponentLog("stat logger"),this.firstFlush=ol(()=>this.safeFlush(),this.params.config.firstFlushTime,{maxWait:this.params.config.firstFlushTime});let t=Fe.isPersistent()?this.params.config.flushMaxWait:0;this.debouncedFlush=ol(()=>this.safeFlush(),this.params.config.flushDebounceTime,{maxWait:t}),this.subscription=this.api.authorized$.subscribe(i=>{i&&this.debouncedFlush()}),this.housekeepStorage()}safeFlush(){var e;try{this.flush()}catch(t){this.error$.next({id:"LoggerError",category:qb.WTF,message:(e=String(t))!=null?e:"Unknown logger error",thrown:t})}}readFromStorage(){let e=Fe.get(Rr);try{return e?JSON.parse(e):{}}catch(t){}return{}}addToStorage(e){var s;if(!this.userSalt){this.unsaltedStorage.push(e);return}let t=this.readFromStorage(),o=((s=t[this.userSalt])!=null?s:[]).filter(Li(this.params.config.storageExpiration));Fe.set(Rr,JSON.stringify({...t,[this.userSalt]:[...o,e]}))}getFromStorage(){var i;return this.userSalt?((i=this.readFromStorage()[this.userSalt])!=null?i:[]).filter(Li(this.params.config.storageExpiration)):this.unsaltedStorage}markStorageSent(){if(!this.userSalt){this.unsaltedStorage=[];return}let e=this.readFromStorage();delete e[this.userSalt],Fe.set(Rr,JSON.stringify(e))}housekeepStorage(){let e=this.readFromStorage();for(let[t,i]of Object.entries(e)){let o=i.filter(Li(this.params.config.storageExpiration));o.length?e[t]=o:delete e[t],this.loggerDebugLog({message:`${i.length} retrieved from storage, ${o.length} of them actual`})}Fe.set(Rr,JSON.stringify(e))}log(e){this.addToStorage(e),!this.isPaused&&(this.isUrgent(e)?this.flush():this.lastVsid!==e.custom.vsid?this.firstFlush():this.debouncedFlush(),this.lastVsid=e.custom.vsid)}flush(e=!1){let t=this.getFromStorage();t.length!==0&&(this.api.authorized$.getValue()?(e&&this.params.config.useBeacon?(this.loggerDebugLog({message:`Flushing ${t.length} events through beacon`}),this.api.logBeacon(t)):(this.loggerDebugLog({message:`Flushing ${t.length} events`}),this.api.logRequest(t)),this.markStorageSent()):this.api.authorize(),this.firstFlush.cancel(),this.debouncedFlush.cancel())}pause(){this.isPaused=!0,this.debouncedFlush.cancel()}resume(){this.isPaused=!1,this.debouncedFlush()}destroy(){this.subscription.unsubscribe(),this.firstFlush.cancel(),this.debouncedFlush.cancel()}};import{HttpConnectionType as Di,Surface as he,VideoFormat as _,VideoQuality as k}from"@vkontakte/videoplayer-core";import{assertNever as nl}from"@vkontakte/videoplayer-shared";var al=r=>r&&{[k.INVARIANT]:"unknown",[k.Q_144P]:"mobile",[k.Q_240P]:"lowest",[k.Q_360P]:"low",[k.Q_480P]:"medium",[k.Q_720P]:"high",[k.Q_1080P]:"fullhd",[k.Q_1440P]:"quadhd",[k.Q_2160P]:"ultrahd",[k.Q_4320P]:"unknown"}[r],ki=r=>r&&{[Di.HTTP1]:"http1",[Di.HTTP2]:"http2",[Di.QUIC]:"http3"}[r],sl=r=>{if(r!==void 0)switch(r){case _.MPEG:return"mp4";case _.DASH_LIVE:return"dash";case _.DASH_SEP:return"dash_sep";case _.DASH_ONDEMAND:return"ondemand_dash";case _.DASH_WEBM:case _.DASH_LIVE_WEBM:return"webm";case _.DASH_WEBM_AV1:return"av1";case _.DASH_LIVE_CMAF:return"ondemand_dash_live";case _.HLS:case _.HLS_LIVE:return"hls";case _.HLS_ONDEMAND:return"ondemand_hls";case _.HLS_LIVE_CMAF:return"ondemand_hls_live";case _.WEB_RTC_LIVE:return"webrtc";default:return nl(r)}},Ar=r=>{if(r!==void 0)switch(r){case he.NONE:case he.INLINE:return;case he.FULLSCREEN:return"fullscreen";case he.SECOND_SCREEN:return"chromecast";case he.PIP:return"pip";case he.INVISIBLE:return"invisible";default:return nl(r)}},ul=r=>{switch(r){case"slow-2g":return"poor";case"2g":return"poor";case"3g":return"good";case"4g":return"excellent"}};var Cr=class{constructor(e){this.offset=void 0;this.offset=e}getOffset(){var e;return(e=this.offset)!=null?e:0}setOffset(e){this.offset=e}now(){var e;return Date.now()+((e=this.offset)!=null?e:0)}date(e=new Date){var t;return e.setTime(e.getTime()+((t=this.offset)!=null?t:0)),e}addServerTime(e,t){let i=Date.now(),o=e-i-t/2;if(Math.abs(o)<1e3){this.offset=0;return}this.offset===void 0?this.offset=Math.round(o):this.offset=Math.round(.2*o+(1-.2)*this.offset)}};var cl=()=>Math.floor(Math.random()*4294967296).toString(36).padStart(7,"0"),ll=()=>Math.floor(Math.random()*18446744073709552e3).toString(36).padStart(13,"0");import{PlaybackState as fl}from"@vkontakte/videoplayer-core";import{filter as dl,filterChanged as Ob,fromEvent as _b,isNullable as pl,map as xb,merge as $i,Observable as Rb,Subject as Mi,Subscription as wb,ValueSubject as Ab}from"@vkontakte/videoplayer-shared";var vl=(r,e)=>new Rb(t=>{let i=new wb,o=$i(_b(window,"beforeunload"),r.events.willDestruct$),s=new Ab(void 0),u;i.add(r.info.isLive$.pipe(Ob()).subscribe(B=>{u&&(u.unsubscribe(),s.next(void 0)),B?u=r.info.liveTime$.pipe(xb(Nr=>Nr&&Nr/1e3)).subscribe(s):u=r.info.position$.subscribe(s),i.add(u)}));let{playing$:l,paused$:p}=r.events,c=r.events.willSeek$.pipe(dl(()=>r.info.playbackState$.getValue()===fl.PLAYING)),a=r.events.seeked$.pipe(dl(()=>r.info.playbackState$.getValue()===fl.PLAYING)),f=!1,v=new Mi;i.add(c.subscribe(()=>{f||v.next(),f=!0})),i.add(a.subscribe(()=>f=!1));let d=new Mi,h=new Mi,g=$i(l,a,d),y=$i(p,v,o,r.events.looped$,h),m,S=()=>m=s.getValue(),yl=()=>{let B=s.getValue();pl(m)||m===B||pl(B)||(t.next({from:m,to:B}),m=void 0)},Sl=()=>{h.next(),d.next()};if(i.add(g.subscribe(S)),i.add(y.subscribe(yl)),e.forceInterval&&isFinite(e.forceInterval)){let B=0;i.add(g.subscribe(()=>B=window.setTimeout(Sl,e.forceInterval))),i.add(y.subscribe(()=>window.clearTimeout(B)))}return i});var jb="_one-stat_",Bi=`${jb}uuid`,Ui=()=>{let r=new Vi;return{subscription:r,subscribe:(e,t)=>{e&&r.add(e.subscribe(t))}}},Gi=class{constructor(e,t){this.subscription=new Vi;this.debugLogger=new $b;this.oneStatDebugLog=this.debugLogger.createComponentLog("onestat");this.loopCounter=0;this.disabled=!1;this.vsid$=new Fi(void 0);this.isid$=new Fi(void 0);this.seekAction$=new Fi("unknown");var p,c,a;this.statContext=e,this.config=oa((p=t.config)!=null?p:{}),ge(t.apiEnv)&&(this.config.apiEnv=t.apiEnv),this.config.synchronizeTime&&(this.timeSynchronisation=new Cr);let i=new kb;this.experimental={error$:i};let o=ji.get(Bi);o?o.startsWith('"')&&o.endsWith('"')?(this.uuid=(0,bl.default)(o,'"',""),ji.set(Bi,this.uuid)):this.uuid=o:(this.uuid=bt(),ji.set(Bi,this.uuid)),this.resetViewSession(),t.useIsid&&this.isid$.next((c=t.isid)!=null?c:ll());let s=new je({apiKey:tl,config:this.config,error$:i,timeSynchronisation:this.timeSynchronisation});this.api=new ke({config:this.config,apiTransport:s,refreshAuthToken:t.refreshAuthToken,mobile:(a=this.statContext.mobile)!=null?a:!1,uuid:this.uuid,error$:i}),this.logger=new wr({config:this.config,debugLogger:this.debugLogger,api:this.api,error$:i,userSalt:t.userSalt});let{isEmbed:u,host:l}=Mb();this.isEmbed=u,this.embedParent=l,this.subscribe()}updateContext(e){this.statContext={...this.statContext,...e}}attachTo(e){let t=new Vi,i=(a,f)=>t.add(a.subscribe(f));i(e.events.willStart$,()=>{let a=e.info.position$.getValue();this.logActionPlay({position:a}),this.statContext.projectId&&this.logActionPlayInteractive({position:a})}),i(e.events.looped$,()=>{this.resetViewSession(),++this.loopCounter>this.config.maxLoops&&(this.disabled=!0),this.logActionPlay({position:e.info.position$.getValue()})}),i(e.events.seeked$,()=>{this.logSeek({action:this.seekAction$.getValue(),time:e.info.position$.getValue()}),this.seekAction$.next("unknown")}),i(e.events.paused$,()=>{this.logPause({position:e.info.position$.getValue()})}),i(e.events.willResume$,()=>{this.logPlay()}),i(e.events.started$,()=>{this.statContext.clip&&this.logWatchCoverageRecord({start:0,end:0})}),i(vl(e,{forceInterval:this.config.watchCoverageInterval}),a=>{let f=e.info.isLive$.getValue(),v={start:parseFloat(a.from.toFixed(3)),end:parseFloat(a.to.toFixed(3))};f?this.logWatchCoverageLive(v):this.logWatchCoverageRecord(v)});let o;i(e.info.isStalled$,a=>{a?o=F():(ge(o)&&this.logEmptyBuffer({duration:F()-o}),o=void 0)});let s=!1;t.add(e.events.fatalError$.pipe(Db()).subscribe(()=>s=!0)),i(e.events.willStop$,()=>{if(e.info.isStalled$.getValue()){let f=ge(o)?F()-o:void 0;this.logCloseAtEmptyBuffer({duration:f!=null?f:0}),o=void 0}else s||this.logActionStop()}),i(e.events.managedError$,({id:a})=>{this.logError({fatal:!1,errorType:a})}),i(e.events.fatalError$,({id:a})=>{this.logError({fatal:!0,errorType:a})});let u,l,p=!1;i(e.events.firstBytes$,a=>{u=F(),this.logFirstBytes({time:a})}),i(e.events.willStart$,()=>l=F()),i(e.info.currentBuffer$,a=>{!p&&a&&a.end-a.start>0&&ge(u)&&(this.logPlayerReady({duration:F()-u}),p=!0)}),i(e.events.firstFrame$,()=>{ge(u)&&!p&&(this.logPlayerReady({duration:F()-u}),p=!0),ge(l)&&this.logFirstFrame({time:F()-l})}),i(e.info.atLiveEdge$,a=>this.updateContext({liveEdge:a})),i(hl({muted:e.info.muted$,volume:e.info.volume$}),({muted:a,volume:f})=>this.updateContext({audible:!a&&f>0})),i(e.info.currentQuality$,a=>this.updateContext({quality:al(a)})),i(e.info.isAutoQualityEnabled$,a=>this.updateContext({autoQuality:a})),i(e.info.currentFormat$,a=>this.updateContext({contentType:sl(a)})),i(e.info.currentPlaybackRate$,a=>this.updateContext({rate:a})),i(e.info.is3DVideo$,a=>this.updateContext({is3d:a}));let c;return i(e.info.hostname$,a=>{let f=c!==void 0&&c!==a;this.updateContext({cdnHostname:a,failover:f}),f&&this.logFailover(a),c=a}),i(e.info.throughputEstimation$,a=>this.updateContext({downloadSpeed:a})),i(e.info.httpConnectionType$,a=>{this.statContext.firstConnectionType||this.updateContext({firstConnectionType:ki(a)}),this.updateContext({connectionType:ki(a)})}),i(e.info.httpConnectionReused$,a=>{ml(this.statContext.firstConnectionReused)&&this.updateContext({firstConnectionReused:a}),this.updateContext({connectionReused:a})}),i(e.info.surface$,a=>this.updateContext({mode:Ar(a)})),i(hl({current:e.info.currentTextTrack$,available:e.info.availableTextTracks$}),({current:a,available:f})=>{let v=f.find(({id:h})=>h===a),d=v&&(v.isAuto?`${v.language}_auto`:v.language);this.updateContext({subtitles:d})}),this.player=e,this.uiEvents&&this.attachToUi(this.uiEvents),this.resubscribeBeforeunload(),this.subscription.add(t),t}attachToUi(e){this.uiEvents=e;let{subscription:t,subscribe:i}=Ui();return this.player&&(i(e.actionRewind$,()=>{this.player&&(this.resetViewSession(),this.logActionPlay({position:this.player.info.position$.getValue()}))}),i(e.actionSeek$,this.seekAction$),i(e.inPiP$,o=>{var u;let s=o?"pip":Ar((u=this.player)==null?void 0:u.info.surface$.getValue());this.updateContext({mode:s})}),i(e.inFullscreen$,o=>{var u;let s=o?"fullscreen":Ar((u=this.player)==null?void 0:u.info.surface$.getValue());this.updateContext({mode:s})}),i(e.actionSetSubtitle$,o=>this.updateContext({subtitles:o})),i(e.nextMovie$,o=>this.logNextMovie(o)),this.resubscribeBeforeunload(),this.subscription.add(t)),t}attachToAds(e){let{subscription:t,subscribe:i}=Ui();return i(e.slotRequested$,()=>this.logAdSlotRequest()),i(e.started$,o=>this.logAdStarted(o)),i(e.paused$,()=>this.logAdPaused()),i(e.resumed$,()=>this.logAdResumed()),i(e.ended$,()=>this.logAdEnded()),i(e.skipped$,()=>this.logAdSkipped()),i(e.clicked$,()=>this.logAdClicked()),this.resubscribeBeforeunload(),this.subscription.add(t),t}attachToInteractive(e){let{subscription:t,subscribe:i}=Ui();return i(e.click$,o=>this.logInterfaceClick(o)),i(e.nextMovie$,o=>this.logNextMovie(o)),this.resubscribeBeforeunload(),this.subscription.add(t),t}authorize(e){return this.api.authorize(e)}pause(){this.logger.pause(),this.oneStatDebugLog({message:"paused"})}resume(){this.logger.resume(),this.oneStatDebugLog({message:"resumed"})}destroy(){this.logger.flush(),this.subscription.unsubscribe(),this.api.destroy(),this.logger.destroy()}resetViewSession(){this.oneStatDebugLog({message:"VSID reset"}),this.vsid$.next(cl())}getDeviceId(){return this.uuid}setFieldBlacklist(){}logInited(){}logReady(e){this.log({operation:"player_ready",param:String(e.time)})}logStarted(...e){this.logActionPlay(...e)}logPlay(){this.log({operation:"play_toggle"})}logPause(e){this.log({operation:"pause",param:String(Math.round(e.position))})}logSeek(e){this.log({operation:"seek",param:e.action,time:e.time})}logFirstBytes(e){this.log({operation:"first_bytes",param:String(e.time)})}logFirstFrame(e){this.log({operation:"first_frame",param:String(e.time)})}logError(e){this.log({operation:"content_error",param:`${e.fatal?"fatal":"recoverable"}_${e.errorType}`})}logWatchCoverageRecord(e){this.log({operation:"watch_coverage_record",param:`${e.start}-${e.end}`})}logWatchCoverageLive(e){var s,u;let t=(u=(s=this.timeSynchronisation)==null?void 0:s.getOffset())!=null?u:0,i=e.start+t,o=e.end+t;this.log({operation:"watch_coverage_live",param:`${i}-${o}`})}logEmptyBuffer(e){this.log({operation:"empty_buffer",param:String(e.duration)})}logDownloadSpeed(){}logAdSlotRequest(){this.log({operation:"adv",param:"slot_request"})}logAdStarted(e){this.log({operation:"adv",param:e})}logAdPaused(){this.log({operation:"adv",param:"pause"})}logAdResumed(){this.log({operation:"adv",param:"resume"})}logAdEnded(){this.log({operation:"adv",param:"ended"})}logAdSkipped(){this.log({operation:"adv",param:"skip"})}logAdClicked(){this.log({operation:"adv",param:"click"})}logInterfaceClick(e){this.log({operation:"player_interface_click",param:e})}logNextMovie(e){this.log({operation:"next_movie",param:String(e)})}subscribe(){this.resubscribeBeforeunload();let e=window.navigator.connection;e&&"onchange"in e&&"effectiveType"in e&&this.subscription.add(Nb(gl(e,"change"),Lb(["init"])).subscribe(()=>this.updateContext({network:ul(e.effectiveType)}))),this.config.debugLog&&this.debugLogger.log$.subscribe(t=>{console.debug("%c stat ","background:#fa6470;",`component: ${t.component}.`,t.message)})}resubscribeBeforeunload(){var e;(e=this.beforeunloadSubscription)==null||e.unsubscribe(),this.beforeunloadSubscription=gl(window,"beforeunload").subscribe(()=>this.logger.flush(!0)),this.subscription.add(this.beforeunloadSubscription)}logPlayerReady(e){this.log({operation:"player_ready",param:String(Math.round(e.duration))})}logActionPlay(e){this.log({operation:"action_play",param:String(Math.round(e.position))})}logActionPlayInteractive(e){this.statContext.projectId&&this.log({operation:"action_play_interactive",param:String(Math.round(e.position))},{vid:this.statContext.projectId})}logFailover(e){this.log({operation:"failover",param:e})}logCloseAtEmptyBuffer(e){this.log({operation:"close_at_empty_buffer",param:String(Math.round(e.duration))})}logActionStop(){this.log({operation:"action_stop"})}log(e,t={}){if(this.disabled){this.oneStatDebugLog({message:`operation ${e.operation} but statistics is disabled`});return}if(this.config.disabledOperations.includes(e.operation)){this.oneStatDebugLog({message:`operation ${e.operation} but it is disabled`});return}this.oneStatDebugLog({message:`operation ${e.operation} ${e.param}`});let i=this.createLogItem(e,t);this.logger.log(i)}createLogItem({operation:e,param:t,time:i},o={}){var d,h;let s=(h=(d=this.timeSynchronisation)==null?void 0:d.now())!=null?h:F(),u=this.vsid$.getValue();Cb(u);let l=this.isid$.getValue(),p=e==="empty_buffer"||e==="close_at_empty_buffer"?this.statContext.connectionType:this.statContext.firstConnectionType,c=this.statContext.firstConnectionReused,a,f;if(this.isEmbed){a=this.embedParent;let g=[...new URLSearchParams(location.search).entries()].filter(([y,m])=>this.config.embedUrlParams.includes(y));f=new URLSearchParams(g).toString()}else this.statContext.place==="direct"&&((this.statContext.refDomain||document.referrer)&&(a=new URL(this.statContext.refDomain||document.referrer).hostname),f=location.href.substring(0,1024));let v={vsid:u,isid:l,vid:this.statContext.movieId,ct:this.statContext.contentType,place:this.isEmbed?"embed":this.statContext.place,quality:this.statContext.quality,cdn_host:this.statContext.cdnHostname,stat_type:this.statContext.autoplay===!0?"auto":this.statContext.autoplay===!1?"":void 0,param:t,vk_app_id:this.statContext.vkAppId,track_code:this.statContext.trackCode,connection_type:p,connection_reused:c===!0?1:c===!1?0:void 0,cached_data:this.statContext.cached===!0?1:this.statContext.cached===!1?0:void 0,live:this.statContext.liveEdge?1:void 0,muted:this.statContext.audible===!1?1:void 0,mode:this.statContext.mode,subtitles:this.statContext.subtitles,download_speed:this.statContext.downloadSpeed,manual_quality:this.statContext.autoQuality?void 0:1,ref_domain:a,direct_url:f,rate:this.statContext.rate===1||ml(this.statContext.rate)?void 0:this.statContext.rate.toFixed(2),view_360:this.statContext.is3d?1:void 0,aid:this.statContext.albumId,vk_playlist_id:this.statContext.vkPlaylistId,...o};for(let g of this.config.disabledCustomFields)delete v[g];return{operation:e,type:1,time:i,network:this.statContext.network,timestamp:s,custom:v}}};export{Te as ApiEnv,gt as ConnectionType,ht as ContentType,Zn as InteractiveInterfaceClick,Gi as OneStat,vt as Quality,mt as SeekAction,Pr as VERSION};
|
|
6
|
+
var Il=Object.create;var Ki=Object.defineProperty;var El=Object.getOwnPropertyDescriptor;var ql=Object.getOwnPropertyNames;var Pl=Object.getPrototypeOf,Tl=Object.prototype.hasOwnProperty;var n=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Ol=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ql(e))!Tl.call(r,o)&&o!==t&&Ki(r,o,{get:()=>e[o],enumerable:!(i=El(e,o))||i.enumerable});return r};var Lr=(r,e,t)=>(t=r!=null?Il(Pl(r)):{},Ol(e||!r||!r.__esModule?Ki(t,"default",{value:r,enumerable:!0}):t,r));var Wi=n(()=>{"use strict"});var Hi=n(()=>{"use strict"});var I=n((zi,Qi)=>{"use strict";var Be=function(r){return r&&r.Math==Math&&r};Qi.exports=Be(typeof globalThis=="object"&&globalThis)||Be(typeof window=="object"&&window)||Be(typeof self=="object"&&self)||Be(typeof global=="object"&&global)||function(){return this}()||zi||Function("return this")()});var O=n((Kb,Yi)=>{"use strict";Yi.exports=function(r){try{return!!r()}catch(e){return!0}}});var me=n((Wb,Ji)=>{"use strict";var _l=O();Ji.exports=!_l(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")})});var kr=n((Hb,ro)=>{"use strict";var xl=me(),eo=Function.prototype,Xi=eo.apply,Zi=eo.call;ro.exports=typeof Reflect=="object"&&Reflect.apply||(xl?Zi.bind(Xi):function(){return Zi.apply(Xi,arguments)})});var P=n((zb,oo)=>{"use strict";var to=me(),io=Function.prototype,Dr=io.call,Rl=to&&io.bind.bind(Dr,Dr);oo.exports=to?Rl:function(r){return function(){return Dr.apply(r,arguments)}}});var J=n((Qb,ao)=>{"use strict";var no=P(),wl=no({}.toString),Al=no("".slice);ao.exports=function(r){return Al(wl(r),8,-1)}});var $r=n((Yb,so)=>{"use strict";var Cl=J(),Nl=P();so.exports=function(r){if(Cl(r)==="Function")return Nl(r)}});var jr=n((Jb,uo)=>{"use strict";var Mr=typeof document=="object"&&document.all,Ll=typeof Mr=="undefined"&&Mr!==void 0;uo.exports={all:Mr,IS_HTMLDDA:Ll}});var b=n((Xb,lo)=>{"use strict";var co=jr(),kl=co.all;lo.exports=co.IS_HTMLDDA?function(r){return typeof r=="function"||r===kl}:function(r){return typeof r=="function"}});var L=n((Zb,fo)=>{"use strict";var Dl=O();fo.exports=!Dl(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var T=n((ey,po)=>{"use strict";var $l=me(),Ue=Function.prototype.call;po.exports=$l?Ue.bind(Ue):function(){return Ue.apply(Ue,arguments)}});var mo=n(go=>{"use strict";var vo={}.propertyIsEnumerable,ho=Object.getOwnPropertyDescriptor,Ml=ho&&!vo.call({1:2},1);go.f=Ml?function(e){var t=ho(this,e);return!!t&&t.enumerable}:vo});var be=n((ty,bo)=>{"use strict";bo.exports=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}});var So=n((iy,yo)=>{"use strict";var jl=P(),Fl=O(),Bl=J(),Fr=Object,Ul=jl("".split);yo.exports=Fl(function(){return!Fr("z").propertyIsEnumerable(0)})?function(r){return Bl(r)=="String"?Ul(r,""):Fr(r)}:Fr});var X=n((oy,Io)=>{"use strict";Io.exports=function(r){return r==null}});var Ve=n((ny,Eo)=>{"use strict";var Vl=X(),Gl=TypeError;Eo.exports=function(r){if(Vl(r))throw Gl("Can't call method on "+r);return r}});var Z=n((ay,qo)=>{"use strict";var Kl=So(),Wl=Ve();qo.exports=function(r){return Kl(Wl(r))}});var k=n((sy,Oo)=>{"use strict";var Po=b(),To=jr(),Hl=To.all;Oo.exports=To.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:Po(r)||r===Hl}:function(r){return typeof r=="object"?r!==null:Po(r)}});var Ge=n((uy,_o)=>{"use strict";_o.exports={}});var $=n((cy,Ro)=>{"use strict";var Br=Ge(),Ur=I(),zl=b(),xo=function(r){return zl(r)?r:void 0};Ro.exports=function(r,e){return arguments.length<2?xo(Br[r])||xo(Ur[r]):Br[r]&&Br[r][e]||Ur[r]&&Ur[r][e]}});var ye=n((ly,wo)=>{"use strict";var Ql=P();wo.exports=Ql({}.isPrototypeOf)});var Se=n((fy,Ao)=>{"use strict";Ao.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""});var Gr=n((dy,$o)=>{"use strict";var Do=I(),Vr=Se(),Co=Do.process,No=Do.Deno,Lo=Co&&Co.versions||No&&No.version,ko=Lo&&Lo.v8,x,Ke;ko&&(x=ko.split("."),Ke=x[0]>0&&x[0]<4?1:+(x[0]+x[1]));!Ke&&Vr&&(x=Vr.match(/Edge\/(\d+)/),(!x||x[1]>=74)&&(x=Vr.match(/Chrome\/(\d+)/),x&&(Ke=+x[1])));$o.exports=Ke});var Kr=n((py,jo)=>{"use strict";var Mo=Gr(),Yl=O(),Jl=I(),Xl=Jl.String;jo.exports=!!Object.getOwnPropertySymbols&&!Yl(function(){var r=Symbol();return!Xl(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Mo&&Mo<41})});var Wr=n((vy,Fo)=>{"use strict";var Zl=Kr();Fo.exports=Zl&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Hr=n((hy,Bo)=>{"use strict";var ef=$(),rf=b(),tf=ye(),of=Wr(),nf=Object;Bo.exports=of?function(r){return typeof r=="symbol"}:function(r){var e=ef("Symbol");return rf(e)&&tf(e.prototype,nf(r))}});var Ie=n((gy,Uo)=>{"use strict";var af=String;Uo.exports=function(r){try{return af(r)}catch(e){return"Object"}}});var M=n((my,Vo)=>{"use strict";var sf=b(),uf=Ie(),cf=TypeError;Vo.exports=function(r){if(sf(r))return r;throw cf(uf(r)+" is not a function")}});var Ee=n((by,Go)=>{"use strict";var lf=M(),ff=X();Go.exports=function(r,e){var t=r[e];return ff(t)?void 0:lf(t)}});var Wo=n((yy,Ko)=>{"use strict";var zr=T(),Qr=b(),Yr=k(),df=TypeError;Ko.exports=function(r,e){var t,i;if(e==="string"&&Qr(t=r.toString)&&!Yr(i=zr(t,r))||Qr(t=r.valueOf)&&!Yr(i=zr(t,r))||e!=="string"&&Qr(t=r.toString)&&!Yr(i=zr(t,r)))return i;throw df("Can't convert object to primitive value")}});var R=n((Sy,Ho)=>{"use strict";Ho.exports=!0});var Yo=n((Iy,Qo)=>{"use strict";var zo=I(),pf=Object.defineProperty;Qo.exports=function(r,e){try{pf(zo,r,{value:e,configurable:!0,writable:!0})}catch(t){zo[r]=e}return e}});var We=n((Ey,Xo)=>{"use strict";var vf=I(),hf=Yo(),Jo="__core-js_shared__",gf=vf[Jo]||hf(Jo,{});Xo.exports=gf});var Jr=n((qy,en)=>{"use strict";var mf=R(),Zo=We();(en.exports=function(r,e){return Zo[r]||(Zo[r]=e!==void 0?e:{})})("versions",[]).push({version:"3.31.0",mode:mf?"pure":"global",copyright:"\xA9 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.31.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var He=n((Py,rn)=>{"use strict";var bf=Ve(),yf=Object;rn.exports=function(r){return yf(bf(r))}});var w=n((Ty,tn)=>{"use strict";var Sf=P(),If=He(),Ef=Sf({}.hasOwnProperty);tn.exports=Object.hasOwn||function(e,t){return Ef(If(e),t)}});var Xr=n((Oy,on)=>{"use strict";var qf=P(),Pf=0,Tf=Math.random(),Of=qf(1 .toString);on.exports=function(r){return"Symbol("+(r===void 0?"":r)+")_"+Of(++Pf+Tf,36)}});var E=n((_y,an)=>{"use strict";var _f=I(),xf=Jr(),nn=w(),Rf=Xr(),wf=Kr(),Af=Wr(),ee=_f.Symbol,Zr=xf("wks"),Cf=Af?ee.for||ee:ee&&ee.withoutSetter||Rf;an.exports=function(r){return nn(Zr,r)||(Zr[r]=wf&&nn(ee,r)?ee[r]:Cf("Symbol."+r)),Zr[r]}});var ln=n((xy,cn)=>{"use strict";var Nf=T(),sn=k(),un=Hr(),Lf=Ee(),kf=Wo(),Df=E(),$f=TypeError,Mf=Df("toPrimitive");cn.exports=function(r,e){if(!sn(r)||un(r))return r;var t=Lf(r,Mf),i;if(t){if(e===void 0&&(e="default"),i=Nf(t,r,e),!sn(i)||un(i))return i;throw $f("Can't convert object to primitive value")}return e===void 0&&(e="number"),kf(r,e)}});var ze=n((Ry,fn)=>{"use strict";var jf=ln(),Ff=Hr();fn.exports=function(r){var e=jf(r,"string");return Ff(e)?e:e+""}});var Qe=n((wy,pn)=>{"use strict";var Bf=I(),dn=k(),et=Bf.document,Uf=dn(et)&&dn(et.createElement);pn.exports=function(r){return Uf?et.createElement(r):{}}});var rt=n((Ay,vn)=>{"use strict";var Vf=L(),Gf=O(),Kf=Qe();vn.exports=!Vf&&!Gf(function(){return Object.defineProperty(Kf("div"),"a",{get:function(){return 7}}).a!=7})});var tt=n(gn=>{"use strict";var Wf=L(),Hf=T(),zf=mo(),Qf=be(),Yf=Z(),Jf=ze(),Xf=w(),Zf=rt(),hn=Object.getOwnPropertyDescriptor;gn.f=Wf?hn:function(e,t){if(e=Yf(e),t=Jf(t),Zf)try{return hn(e,t)}catch(i){}if(Xf(e,t))return Qf(!Hf(zf.f,e,t),e[t])}});var it=n((Ny,mn)=>{"use strict";var ed=O(),rd=b(),td=/#|\.prototype\./,qe=function(r,e){var t=od[id(r)];return t==ad?!0:t==nd?!1:rd(e)?ed(e):!!e},id=qe.normalize=function(r){return String(r).replace(td,".").toLowerCase()},od=qe.data={},nd=qe.NATIVE="N",ad=qe.POLYFILL="P";mn.exports=qe});var Pe=n((Ly,yn)=>{"use strict";var bn=$r(),sd=M(),ud=me(),cd=bn(bn.bind);yn.exports=function(r,e){return sd(r),e===void 0?r:ud?cd(r,e):function(){return r.apply(e,arguments)}}});var ot=n((ky,Sn)=>{"use strict";var ld=L(),fd=O();Sn.exports=ld&&fd(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var A=n((Dy,In)=>{"use strict";var dd=k(),pd=String,vd=TypeError;In.exports=function(r){if(dd(r))return r;throw vd(pd(r)+" is not an object")}});var V=n(qn=>{"use strict";var hd=L(),gd=rt(),md=ot(),Ye=A(),En=ze(),bd=TypeError,nt=Object.defineProperty,yd=Object.getOwnPropertyDescriptor,at="enumerable",st="configurable",ut="writable";qn.f=hd?md?function(e,t,i){if(Ye(e),t=En(t),Ye(i),typeof e=="function"&&t==="prototype"&&"value"in i&&ut in i&&!i[ut]){var o=yd(e,t);o&&o[ut]&&(e[t]=i.value,i={configurable:st in i?i[st]:o[st],enumerable:at in i?i[at]:o[at],writable:!1})}return nt(e,t,i)}:nt:function(e,t,i){if(Ye(e),t=En(t),Ye(i),gd)try{return nt(e,t,i)}catch(o){}if("get"in i||"set"in i)throw bd("Accessors not supported");return"value"in i&&(e[t]=i.value),e}});var G=n((My,Pn)=>{"use strict";var Sd=L(),Id=V(),Ed=be();Pn.exports=Sd?function(r,e,t){return Id.f(r,e,Ed(1,t))}:function(r,e,t){return r[e]=t,r}});var C=n((jy,On)=>{"use strict";var Je=I(),qd=kr(),Pd=$r(),Td=b(),Od=tt().f,_d=it(),re=Ge(),xd=Pe(),te=G(),Tn=w(),Rd=function(r){var e=function(t,i,o){if(this instanceof e){switch(arguments.length){case 0:return new r;case 1:return new r(t);case 2:return new r(t,i)}return new r(t,i,o)}return qd(r,this,arguments)};return e.prototype=r.prototype,e};On.exports=function(r,e){var t=r.target,i=r.global,o=r.stat,a=r.proto,u=i?Je:o?Je[t]:(Je[t]||{}).prototype,d=i?re:re[t]||te(re,t,{})[t],p=d.prototype,l,f,v,s,c,h,g,y,m;for(s in e)l=_d(i?s:t+(o?".":"#")+s,r.forced),f=!l&&u&&Tn(u,s),h=d[s],f&&(r.dontCallGetSet?(m=Od(u,s),g=m&&m.value):g=u[s]),c=f&&g?g:e[s],!(f&&typeof h==typeof c)&&(r.bind&&f?y=xd(c,Je):r.wrap&&f?y=Rd(c):a&&Td(c)?y=Pd(c):y=c,(r.sham||c&&c.sham||h&&h.sham)&&te(y,"sham",!0),te(d,s,y),a&&(v=t+"Prototype",Tn(re,v)||te(re,v,{}),te(re[v],s,c),r.real&&p&&(l||!p[s])&&te(p,s,c)))}});var xn=n((Fy,_n)=>{"use strict";var wd=k(),Ad=J(),Cd=E(),Nd=Cd("match");_n.exports=function(r){var e;return wd(r)&&((e=r[Nd])!==void 0?!!e:Ad(r)=="RegExp")}});var Xe=n((By,wn)=>{"use strict";var Ld=E(),kd=Ld("toStringTag"),Rn={};Rn[kd]="z";wn.exports=String(Rn)==="[object z]"});var ie=n((Uy,An)=>{"use strict";var Dd=Xe(),$d=b(),Ze=J(),Md=E(),jd=Md("toStringTag"),Fd=Object,Bd=Ze(function(){return arguments}())=="Arguments",Ud=function(r,e){try{return r[e]}catch(t){}};An.exports=Dd?Ze:function(r){var e,t,i;return r===void 0?"Undefined":r===null?"Null":typeof(t=Ud(e=Fd(r),jd))=="string"?t:Bd?Ze(e):(i=Ze(e))=="Object"&&$d(e.callee)?"Arguments":i}});var Nn=n((Vy,Cn)=>{"use strict";var Vd=ie(),Gd=String;Cn.exports=function(r){if(Vd(r)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Gd(r)}});var kn=n((Gy,Ln)=>{"use strict";var Kd=A();Ln.exports=function(){var r=Kd(this),e="";return r.hasIndices&&(e+="d"),r.global&&(e+="g"),r.ignoreCase&&(e+="i"),r.multiline&&(e+="m"),r.dotAll&&(e+="s"),r.unicode&&(e+="u"),r.unicodeSets&&(e+="v"),r.sticky&&(e+="y"),e}});var Mn=n((Ky,$n)=>{"use strict";var Wd=T(),Hd=w(),zd=ye(),Qd=kn(),Dn=RegExp.prototype;$n.exports=function(r){var e=r.flags;return e===void 0&&!("flags"in Dn)&&!Hd(r,"flags")&&zd(Dn,r)?Wd(Qd,r):e}});var Fn=n((Wy,jn)=>{"use strict";var ft=P(),Yd=He(),Jd=Math.floor,ct=ft("".charAt),Xd=ft("".replace),lt=ft("".slice),Zd=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ep=/\$([$&'`]|\d{1,2})/g;jn.exports=function(r,e,t,i,o,a){var u=t+r.length,d=i.length,p=ep;return o!==void 0&&(o=Yd(o),p=Zd),Xd(a,p,function(l,f){var v;switch(ct(f,0)){case"$":return"$";case"&":return r;case"`":return lt(e,0,t);case"'":return lt(e,u);case"<":v=o[lt(f,1,-1)];break;default:var s=+f;if(s===0)return l;if(s>d){var c=Jd(s/10);return c===0?l:c<=d?i[c-1]===void 0?ct(f,1):i[c-1]+ct(f,1):l}v=i[s-1]}return v===void 0?"":v})}});var Kn=n(()=>{"use strict";var rp=C(),tp=T(),dt=P(),Bn=Ve(),ip=b(),op=X(),np=xn(),oe=Nn(),ap=Ee(),sp=Mn(),up=Fn(),cp=E(),lp=R(),fp=cp("replace"),dp=TypeError,Gn=dt("".indexOf),pp=dt("".replace),Un=dt("".slice),vp=Math.max,Vn=function(r,e,t){return t>r.length?-1:e===""?t:Gn(r,e,t)};rp({target:"String",proto:!0},{replaceAll:function(e,t){var i=Bn(this),o,a,u,d,p,l,f,v,s,c=0,h=0,g="";if(!op(e)){if(o=np(e),o&&(a=oe(Bn(sp(e))),!~Gn(a,"g")))throw dp("`.replaceAll` does not allow non-global regexes");if(u=ap(e,fp),u)return tp(u,e,i,t);if(lp&&o)return pp(oe(i),e,t)}for(d=oe(i),p=oe(e),l=ip(t),l||(t=oe(t)),f=p.length,v=vp(1,f),c=Vn(d,p,0);c!==-1;)s=l?oe(t(p,c,d)):up(p,d,c,[],void 0,t),g+=Un(d,h,c)+s,h=c+f,c=Vn(d,p,c+v);return h<d.length&&(g+=Un(d,h)),g}})});var pt=n((Qy,Wn)=>{"use strict";var hp=$();Wn.exports=hp});var zn=n((Yy,Hn)=>{"use strict";Wi();Hi();Kn();var gp=pt();Hn.exports=gp("String","replaceAll")});var Yn=n((Jy,Qn)=>{"use strict";var mp=zn();Qn.exports=mp});var Xn=n((Xy,Jn)=>{"use strict";var bp=Yn();Jn.exports=bp});var na=n(()=>{"use strict"});var Oe=n((uS,aa)=>{"use strict";var Ip=J();aa.exports=typeof process!="undefined"&&Ip(process)=="process"});var ne=n((cS,sa)=>{"use strict";var Ep=G();sa.exports=function(r,e,t,i){return i&&i.enumerable?r[e]=t:Ep(r,e,t),r}});var ca=n((lS,ua)=>{"use strict";var qp=P(),Pp=M();ua.exports=function(r,e,t){try{return qp(Pp(Object.getOwnPropertyDescriptor(r,e)[t]))}catch(i){}}});var fa=n((fS,la)=>{"use strict";var Tp=b(),Op=String,_p=TypeError;la.exports=function(r){if(typeof r=="object"||Tp(r))return r;throw _p("Can't set "+Op(r)+" as a prototype")}});var yt=n((dS,da)=>{"use strict";var xp=ca(),Rp=A(),wp=fa();da.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=xp(Object.prototype,"__proto__","set"),t(e,[]),r=e instanceof Array}catch(i){}return function(o,a){return Rp(o),wp(a),r?t(o,a):o.__proto__=a,o}}():void 0)});var va=n((pS,pa)=>{"use strict";var Ap=Xe(),Cp=ie();pa.exports=Ap?{}.toString:function(){return"[object "+Cp(this)+"]"}});var er=n((vS,ga)=>{"use strict";var Np=Xe(),Lp=V().f,kp=G(),Dp=w(),$p=va(),Mp=E(),ha=Mp("toStringTag");ga.exports=function(r,e,t,i){if(r){var o=t?r:r.prototype;Dp(o,ha)||Lp(o,ha,{configurable:!0,value:e}),i&&!Np&&kp(o,"toString",$p)}}});var ba=n((hS,ma)=>{"use strict";var jp=V();ma.exports=function(r,e,t){return jp.f(r,e,t)}});var Ia=n((gS,Sa)=>{"use strict";var Fp=$(),Bp=ba(),Up=E(),Vp=L(),ya=Up("species");Sa.exports=function(r){var e=Fp(r);Vp&&e&&!e[ya]&&Bp(e,ya,{configurable:!0,get:function(){return this}})}});var qa=n((mS,Ea)=>{"use strict";var Gp=ye(),Kp=TypeError;Ea.exports=function(r,e){if(Gp(e,r))return r;throw Kp("Incorrect invocation")}});var It=n((bS,Pa)=>{"use strict";var Wp=P(),Hp=b(),St=We(),zp=Wp(Function.toString);Hp(St.inspectSource)||(St.inspectSource=function(r){return zp(r)});Pa.exports=St.inspectSource});var wa=n((yS,Ra)=>{"use strict";var Qp=P(),Yp=O(),Ta=b(),Jp=ie(),Xp=$(),Zp=It(),Oa=function(){},ev=[],_a=Xp("Reflect","construct"),Et=/^\s*(?:class|function)\b/,rv=Qp(Et.exec),tv=!Et.exec(Oa),_e=function(e){if(!Ta(e))return!1;try{return _a(Oa,ev,e),!0}catch(t){return!1}},xa=function(e){if(!Ta(e))return!1;switch(Jp(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return tv||!!rv(Et,Zp(e))}catch(t){return!0}};xa.sham=!0;Ra.exports=!_a||Yp(function(){var r;return _e(_e.call)||!_e(Object)||!_e(function(){r=!0})||r})?xa:_e});var Ca=n((SS,Aa)=>{"use strict";var iv=wa(),ov=Ie(),nv=TypeError;Aa.exports=function(r){if(iv(r))return r;throw nv(ov(r)+" is not a constructor")}});var qt=n((IS,La)=>{"use strict";var Na=A(),av=Ca(),sv=X(),uv=E(),cv=uv("species");La.exports=function(r,e){var t=Na(r).constructor,i;return t===void 0||sv(i=Na(t)[cv])?e:av(i)}});var Pt=n((ES,ka)=>{"use strict";var lv=$();ka.exports=lv("document","documentElement")});var $a=n((qS,Da)=>{"use strict";var fv=P();Da.exports=fv([].slice)});var ja=n((PS,Ma)=>{"use strict";var dv=TypeError;Ma.exports=function(r,e){if(r<e)throw dv("Not enough arguments");return r}});var Tt=n((TS,Fa)=>{"use strict";var pv=Se();Fa.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(pv)});var Lt=n((OS,Qa)=>{"use strict";var _=I(),vv=kr(),hv=Pe(),Ba=b(),gv=w(),za=O(),Ua=Pt(),mv=$a(),Va=Qe(),bv=ja(),yv=Tt(),Sv=Oe(),At=_.setImmediate,Ct=_.clearImmediate,Iv=_.process,Ot=_.Dispatch,Ev=_.Function,Ga=_.MessageChannel,qv=_.String,_t=0,xe={},Ka="onreadystatechange",Re,K,xt,Rt;za(function(){Re=_.location});var Nt=function(r){if(gv(xe,r)){var e=xe[r];delete xe[r],e()}},wt=function(r){return function(){Nt(r)}},Wa=function(r){Nt(r.data)},Ha=function(r){_.postMessage(qv(r),Re.protocol+"//"+Re.host)};(!At||!Ct)&&(At=function(e){bv(arguments.length,1);var t=Ba(e)?e:Ev(e),i=mv(arguments,1);return xe[++_t]=function(){vv(t,void 0,i)},K(_t),_t},Ct=function(e){delete xe[e]},Sv?K=function(r){Iv.nextTick(wt(r))}:Ot&&Ot.now?K=function(r){Ot.now(wt(r))}:Ga&&!yv?(xt=new Ga,Rt=xt.port2,xt.port1.onmessage=Wa,K=hv(Rt.postMessage,Rt)):_.addEventListener&&Ba(_.postMessage)&&!_.importScripts&&Re&&Re.protocol!=="file:"&&!za(Ha)?(K=Ha,_.addEventListener("message",Wa,!1)):Ka in Va("script")?K=function(r){Ua.appendChild(Va("script"))[Ka]=function(){Ua.removeChild(this),Nt(r)}}:K=function(r){setTimeout(wt(r),0)});Qa.exports={set:At,clear:Ct}});var kt=n((_S,Ja)=>{"use strict";var Ya=function(){this.head=null,this.tail=null};Ya.prototype={add:function(r){var e={item:r,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var r=this.head;if(r){var e=this.head=r.next;return e===null&&(this.tail=null),r.item}}};Ja.exports=Ya});var Za=n((xS,Xa)=>{"use strict";var Pv=Se();Xa.exports=/ipad|iphone|ipod/i.test(Pv)&&typeof Pebble!="undefined"});var rs=n((RS,es)=>{"use strict";var Tv=Se();es.exports=/web0s(?!.*chrome)/i.test(Tv)});var cs=n((wS,us)=>{"use strict";var W=I(),ts=Pe(),Ov=tt().f,Dt=Lt().set,_v=kt(),xv=Tt(),Rv=Za(),wv=rs(),$t=Oe(),is=W.MutationObserver||W.WebKitMutationObserver,os=W.document,ns=W.process,rr=W.Promise,as=Ov(W,"queueMicrotask"),Ft=as&&as.value,ae,Mt,jt,tr,ss;Ft||(we=new _v,Ae=function(){var r,e;for($t&&(r=ns.domain)&&r.exit();e=we.get();)try{e()}catch(t){throw we.head&&ae(),t}r&&r.enter()},!xv&&!$t&&!wv&&is&&os?(Mt=!0,jt=os.createTextNode(""),new is(Ae).observe(jt,{characterData:!0}),ae=function(){jt.data=Mt=!Mt}):!Rv&&rr&&rr.resolve?(tr=rr.resolve(void 0),tr.constructor=rr,ss=ts(tr.then,tr),ae=function(){ss(Ae)}):$t?ae=function(){ns.nextTick(Ae)}:(Dt=ts(Dt,W),ae=function(){Dt(Ae)}),Ft=function(r){we.head||ae(),we.add(r)});var we,Ae;us.exports=Ft});var fs=n((AS,ls)=>{"use strict";ls.exports=function(r,e){try{arguments.length==1?console.error(r):console.error(r,e)}catch(t){}}});var ir=n((CS,ds)=>{"use strict";ds.exports=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}}});var hs=n((NS,vs)=>{"use strict";var Av=I(),Cv=b(),ps=Av.WeakMap;vs.exports=Cv(ps)&&/native code/.test(String(ps))});var or=n((LS,ms)=>{"use strict";var Nv=Jr(),Lv=Xr(),gs=Nv("keys");ms.exports=function(r){return gs[r]||(gs[r]=Lv(r))}});var nr=n((kS,bs)=>{"use strict";bs.exports={}});var Gt=n((DS,Is)=>{"use strict";var kv=hs(),Ss=I(),Dv=k(),$v=G(),Bt=w(),Ut=We(),Mv=or(),jv=nr(),ys="Object already initialized",Vt=Ss.TypeError,Fv=Ss.WeakMap,ar,Ce,sr,Bv=function(r){return sr(r)?Ce(r):ar(r,{})},Uv=function(r){return function(e){var t;if(!Dv(e)||(t=Ce(e)).type!==r)throw Vt("Incompatible receiver, "+r+" required");return t}};kv||Ut.state?(N=Ut.state||(Ut.state=new Fv),N.get=N.get,N.has=N.has,N.set=N.set,ar=function(r,e){if(N.has(r))throw Vt(ys);return e.facade=r,N.set(r,e),e},Ce=function(r){return N.get(r)||{}},sr=function(r){return N.has(r)}):(H=Mv("state"),jv[H]=!0,ar=function(r,e){if(Bt(r,H))throw Vt(ys);return e.facade=r,$v(r,H,e),e},Ce=function(r){return Bt(r,H)?r[H]:{}},sr=function(r){return Bt(r,H)});var N,H;Is.exports={set:ar,get:Ce,has:sr,enforce:Bv,getterFor:Uv}});var z=n(($S,Es)=>{"use strict";var Vv=I();Es.exports=Vv.Promise});var Kt=n((MS,qs)=>{"use strict";qs.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"});var Ts=n((jS,Ps)=>{"use strict";var Gv=Kt(),Kv=Oe();Ps.exports=!Gv&&!Kv&&typeof window=="object"&&typeof document=="object"});var se=n((FS,xs)=>{"use strict";var Wv=I(),Ne=z(),Hv=b(),zv=it(),Qv=It(),Yv=E(),Jv=Ts(),Xv=Kt(),Zv=R(),Wt=Gr(),Os=Ne&&Ne.prototype,eh=Yv("species"),Ht=!1,_s=Hv(Wv.PromiseRejectionEvent),rh=zv("Promise",function(){var r=Qv(Ne),e=r!==String(Ne);if(!e&&Wt===66||Zv&&!(Os.catch&&Os.finally))return!0;if(!Wt||Wt<51||!/native code/.test(r)){var t=new Ne(function(a){a(1)}),i=function(a){a(function(){},function(){})},o=t.constructor={};if(o[eh]=i,Ht=t.then(function(){})instanceof i,!Ht)return!0}return!e&&(Jv||Xv)&&!_s});xs.exports={CONSTRUCTOR:rh,REJECTION_EVENT:_s,SUBCLASSING:Ht}});var ue=n((BS,ws)=>{"use strict";var Rs=M(),th=TypeError,ih=function(r){var e,t;this.promise=new r(function(i,o){if(e!==void 0||t!==void 0)throw th("Bad Promise constructor");e=i,t=o}),this.resolve=Rs(e),this.reject=Rs(t)};ws.exports.f=function(r){return new ih(r)}});var Qs=n(()=>{"use strict";var oh=C(),nh=R(),fr=Oe(),U=I(),de=T(),As=ne(),Cs=yt(),ah=er(),sh=Ia(),uh=M(),lr=b(),ch=k(),lh=qa(),fh=qt(),$s=Lt().set,Xt=cs(),dh=fs(),ph=ir(),vh=kt(),Ms=Gt(),dr=z(),Zt=se(),js=ue(),pr="Promise",Fs=Zt.CONSTRUCTOR,hh=Zt.REJECTION_EVENT,gh=Zt.SUBCLASSING,zt=Ms.getterFor(pr),mh=Ms.set,ce=dr&&dr.prototype,Q=dr,ur=ce,Bs=U.TypeError,Qt=U.document,ei=U.process,Yt=js.f,bh=Yt,yh=!!(Qt&&Qt.createEvent&&U.dispatchEvent),Us="unhandledrejection",Sh="rejectionhandled",Ns=0,Vs=1,Ih=2,ri=1,Gs=2,cr,Ls,Eh,ks,Ks=function(r){var e;return ch(r)&&lr(e=r.then)?e:!1},Ws=function(r,e){var t=e.value,i=e.state==Vs,o=i?r.ok:r.fail,a=r.resolve,u=r.reject,d=r.domain,p,l,f;try{o?(i||(e.rejection===Gs&&Ph(e),e.rejection=ri),o===!0?p=t:(d&&d.enter(),p=o(t),d&&(d.exit(),f=!0)),p===r.promise?u(Bs("Promise-chain cycle")):(l=Ks(p))?de(l,p,a,u):a(p)):u(t)}catch(v){d&&!f&&d.exit(),u(v)}},Hs=function(r,e){r.notified||(r.notified=!0,Xt(function(){for(var t=r.reactions,i;i=t.get();)Ws(i,r);r.notified=!1,e&&!r.rejection&&qh(r)}))},zs=function(r,e,t){var i,o;yh?(i=Qt.createEvent("Event"),i.promise=e,i.reason=t,i.initEvent(r,!1,!0),U.dispatchEvent(i)):i={promise:e,reason:t},!hh&&(o=U["on"+r])?o(i):r===Us&&dh("Unhandled promise rejection",t)},qh=function(r){de($s,U,function(){var e=r.facade,t=r.value,i=Ds(r),o;if(i&&(o=ph(function(){fr?ei.emit("unhandledRejection",t,e):zs(Us,e,t)}),r.rejection=fr||Ds(r)?Gs:ri,o.error))throw o.value})},Ds=function(r){return r.rejection!==ri&&!r.parent},Ph=function(r){de($s,U,function(){var e=r.facade;fr?ei.emit("rejectionHandled",e):zs(Sh,e,r.value)})},le=function(r,e,t){return function(i){r(e,i,t)}},fe=function(r,e,t){r.done||(r.done=!0,t&&(r=t),r.value=e,r.state=Ih,Hs(r,!0))},Jt=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw Bs("Promise can't be resolved itself");var i=Ks(e);i?Xt(function(){var o={done:!1};try{de(i,e,le(Jt,o,r),le(fe,o,r))}catch(a){fe(o,a,r)}}):(r.value=e,r.state=Vs,Hs(r,!1))}catch(o){fe({done:!1},o,r)}}};if(Fs&&(Q=function(e){lh(this,ur),uh(e),de(cr,this);var t=zt(this);try{e(le(Jt,t),le(fe,t))}catch(i){fe(t,i)}},ur=Q.prototype,cr=function(e){mh(this,{type:pr,done:!1,notified:!1,parent:!1,reactions:new vh,rejection:!1,state:Ns,value:void 0})},cr.prototype=As(ur,"then",function(e,t){var i=zt(this),o=Yt(fh(this,Q));return i.parent=!0,o.ok=lr(e)?e:!0,o.fail=lr(t)&&t,o.domain=fr?ei.domain:void 0,i.state==Ns?i.reactions.add(o):Xt(function(){Ws(o,i)}),o.promise}),Ls=function(){var r=new cr,e=zt(r);this.promise=r,this.resolve=le(Jt,e),this.reject=le(fe,e)},js.f=Yt=function(r){return r===Q||r===Eh?new Ls(r):bh(r)},!nh&&lr(dr)&&ce!==Object.prototype)){ks=ce.then,gh||As(ce,"then",function(e,t){var i=this;return new Q(function(o,a){de(ks,i,o,a)}).then(e,t)},{unsafe:!0});try{delete ce.constructor}catch(r){}Cs&&Cs(ce,ur)}oh({global:!0,constructor:!0,wrap:!0,forced:Fs},{Promise:Q});ah(Q,pr,!1,!0);sh(pr)});var Y=n((GS,Ys)=>{"use strict";Ys.exports={}});var Xs=n((KS,Js)=>{"use strict";var Th=E(),Oh=Y(),_h=Th("iterator"),xh=Array.prototype;Js.exports=function(r){return r!==void 0&&(Oh.Array===r||xh[_h]===r)}});var eu=n((WS,Zs)=>{"use strict";var Rh=Math.ceil,wh=Math.floor;Zs.exports=Math.trunc||function(e){var t=+e;return(t>0?wh:Rh)(t)}});var ti=n((HS,ru)=>{"use strict";var Ah=eu();ru.exports=function(r){var e=+r;return e!==e||e===0?0:Ah(e)}});var iu=n((zS,tu)=>{"use strict";var Ch=ti(),Nh=Math.min;tu.exports=function(r){return r>0?Nh(Ch(r),9007199254740991):0}});var ii=n((QS,ou)=>{"use strict";var Lh=iu();ou.exports=function(r){return Lh(r.length)}});var oi=n((YS,au)=>{"use strict";var kh=ie(),nu=Ee(),Dh=X(),$h=Y(),Mh=E(),jh=Mh("iterator");au.exports=function(r){if(!Dh(r))return nu(r,jh)||nu(r,"@@iterator")||$h[kh(r)]}});var uu=n((JS,su)=>{"use strict";var Fh=T(),Bh=M(),Uh=A(),Vh=Ie(),Gh=oi(),Kh=TypeError;su.exports=function(r,e){var t=arguments.length<2?Gh(r):e;if(Bh(t))return Uh(Fh(t,r));throw Kh(Vh(r)+" is not iterable")}});var fu=n((XS,lu)=>{"use strict";var Wh=T(),cu=A(),Hh=Ee();lu.exports=function(r,e,t){var i,o;cu(r);try{if(i=Hh(r,"return"),!i){if(e==="throw")throw t;return t}i=Wh(i,r)}catch(a){o=!0,i=a}if(e==="throw")throw t;if(o)throw i;return cu(i),t}});var hr=n((ZS,hu)=>{"use strict";var zh=Pe(),Qh=T(),Yh=A(),Jh=Ie(),Xh=Xs(),Zh=ii(),du=ye(),eg=uu(),rg=oi(),pu=fu(),tg=TypeError,vr=function(r,e){this.stopped=r,this.result=e},vu=vr.prototype;hu.exports=function(r,e,t){var i=t&&t.that,o=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_RECORD),u=!!(t&&t.IS_ITERATOR),d=!!(t&&t.INTERRUPTED),p=zh(e,i),l,f,v,s,c,h,g,y=function(S){return l&&pu(l,"normal",S),new vr(!0,S)},m=function(S){return o?(Yh(S),d?p(S[0],S[1],y):p(S[0],S[1])):d?p(S,y):p(S)};if(a)l=r.iterator;else if(u)l=r;else{if(f=rg(r),!f)throw tg(Jh(r)+" is not iterable");if(Xh(f)){for(v=0,s=Zh(r);s>v;v++)if(c=m(r[v]),c&&du(vu,c))return c;return new vr(!1)}l=eg(r,f)}for(h=a?r.next:l.next;!(g=Qh(h,l)).done;){try{c=m(g.value)}catch(S){pu(l,"throw",S)}if(typeof c=="object"&&c&&du(vu,c))return c}return new vr(!1)}});var Su=n((eI,yu)=>{"use strict";var ig=E(),mu=ig("iterator"),bu=!1;try{gu=0,ni={next:function(){return{done:!!gu++}},return:function(){bu=!0}},ni[mu]=function(){return this},Array.from(ni,function(){throw 2})}catch(r){}var gu,ni;yu.exports=function(r,e){if(!e&&!bu)return!1;var t=!1;try{var i={};i[mu]=function(){return{next:function(){return{done:t=!0}}}},r(i)}catch(o){}return t}});var ai=n((rI,Iu)=>{"use strict";var og=z(),ng=Su(),ag=se().CONSTRUCTOR;Iu.exports=ag||!ng(function(r){og.all(r).then(void 0,function(){})})});var Eu=n(()=>{"use strict";var sg=C(),ug=T(),cg=M(),lg=ue(),fg=ir(),dg=hr(),pg=ai();sg({target:"Promise",stat:!0,forced:pg},{all:function(e){var t=this,i=lg.f(t),o=i.resolve,a=i.reject,u=fg(function(){var d=cg(t.resolve),p=[],l=0,f=1;dg(e,function(v){var s=l++,c=!1;f++,ug(d,t,v).then(function(h){c||(c=!0,p[s]=h,--f||o(p))},a)}),--f||o(p)});return u.error&&a(u.value),i.promise}})});var Pu=n(()=>{"use strict";var vg=C(),hg=R(),gg=se().CONSTRUCTOR,ui=z(),mg=$(),bg=b(),yg=ne(),qu=ui&&ui.prototype;vg({target:"Promise",proto:!0,forced:gg,real:!0},{catch:function(r){return this.then(void 0,r)}});!hg&&bg(ui)&&(si=mg("Promise").prototype.catch,qu.catch!==si&&yg(qu,"catch",si,{unsafe:!0}));var si});var Tu=n(()=>{"use strict";var Sg=C(),Ig=T(),Eg=M(),qg=ue(),Pg=ir(),Tg=hr(),Og=ai();Sg({target:"Promise",stat:!0,forced:Og},{race:function(e){var t=this,i=qg.f(t),o=i.reject,a=Pg(function(){var u=Eg(t.resolve);Tg(e,function(d){Ig(u,t,d).then(i.resolve,o)})});return a.error&&o(a.value),i.promise}})});var Ou=n(()=>{"use strict";var _g=C(),xg=T(),Rg=ue(),wg=se().CONSTRUCTOR;_g({target:"Promise",stat:!0,forced:wg},{reject:function(e){var t=Rg.f(this);return xg(t.reject,void 0,e),t.promise}})});var ci=n((lI,_u)=>{"use strict";var Ag=A(),Cg=k(),Ng=ue();_u.exports=function(r,e){if(Ag(r),Cg(e)&&e.constructor===r)return e;var t=Ng.f(r),i=t.resolve;return i(e),t.promise}});var wu=n(()=>{"use strict";var Lg=C(),kg=$(),xu=R(),Dg=z(),Ru=se().CONSTRUCTOR,$g=ci(),Mg=kg("Promise"),jg=xu&&!Ru;Lg({target:"Promise",stat:!0,forced:xu||Ru},{resolve:function(e){return $g(jg&&this===Mg?Dg:this,e)}})});var Au=n(()=>{"use strict";Qs();Eu();Pu();Tu();Ou();wu()});var ku=n(()=>{"use strict";var Fg=C(),Bg=R(),gr=z(),Ug=O(),Nu=$(),Lu=b(),Vg=qt(),Cu=ci(),Gg=ne(),fi=gr&&gr.prototype,Kg=!!gr&&Ug(function(){fi.finally.call({then:function(){}},function(){})});Fg({target:"Promise",proto:!0,real:!0,forced:Kg},{finally:function(r){var e=Vg(this,Nu("Promise")),t=Lu(r);return this.then(t?function(i){return Cu(e,r()).then(function(){return i})}:r,t?function(i){return Cu(e,r()).then(function(){throw i})}:r)}});!Bg&&Lu(gr)&&(li=Nu("Promise").prototype.finally,fi.finally!==li&&Gg(fi,"finally",li,{unsafe:!0}));var li});var $u=n((mI,Du)=>{"use strict";na();Au();ku();var Wg=pt();Du.exports=Wg("Promise","finally")});var ju=n((bI,Mu)=>{"use strict";var Hg=$u();Mu.exports=Hg});var Bu=n((yI,Fu)=>{"use strict";var zg=ju();Fu.exports=zg});var Vu=n((SI,Uu)=>{"use strict";Uu.exports=function(){}});var Wu=n((II,Ku)=>{"use strict";var di=L(),Qg=w(),Gu=Function.prototype,Yg=di&&Object.getOwnPropertyDescriptor,pi=Qg(Gu,"name"),Jg=pi&&function(){}.name==="something",Xg=pi&&(!di||di&&Yg(Gu,"name").configurable);Ku.exports={EXISTS:pi,PROPER:Jg,CONFIGURABLE:Xg}});var zu=n((EI,Hu)=>{"use strict";var Zg=ti(),em=Math.max,rm=Math.min;Hu.exports=function(r,e){var t=Zg(r);return t<0?em(t+e,0):rm(t,e)}});var Ju=n((qI,Yu)=>{"use strict";var tm=Z(),im=zu(),om=ii(),Qu=function(r){return function(e,t,i){var o=tm(e),a=om(o),u=im(i,a),d;if(r&&t!=t){for(;a>u;)if(d=o[u++],d!=d)return!0}else for(;a>u;u++)if((r||u in o)&&o[u]===t)return r||u||0;return!r&&-1}};Yu.exports={includes:Qu(!0),indexOf:Qu(!1)}});var ec=n((PI,Zu)=>{"use strict";var nm=P(),vi=w(),am=Z(),sm=Ju().indexOf,um=nr(),Xu=nm([].push);Zu.exports=function(r,e){var t=am(r),i=0,o=[],a;for(a in t)!vi(um,a)&&vi(t,a)&&Xu(o,a);for(;e.length>i;)vi(t,a=e[i++])&&(~sm(o,a)||Xu(o,a));return o}});var hi=n((TI,rc)=>{"use strict";rc.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var ic=n((OI,tc)=>{"use strict";var cm=ec(),lm=hi();tc.exports=Object.keys||function(e){return cm(e,lm)}});var nc=n(oc=>{"use strict";var fm=L(),dm=ot(),pm=V(),vm=A(),hm=Z(),gm=ic();oc.f=fm&&!dm?Object.defineProperties:function(e,t){vm(e);for(var i=hm(t),o=gm(t),a=o.length,u=0,d;a>u;)pm.f(e,d=o[u++],i[d]);return e}});var yi=n((xI,dc)=>{"use strict";var mm=A(),bm=nc(),ac=hi(),ym=nr(),Sm=Pt(),Im=Qe(),Em=or(),sc=">",uc="<",mi="prototype",bi="script",lc=Em("IE_PROTO"),gi=function(){},fc=function(r){return uc+bi+sc+r+uc+"/"+bi+sc},cc=function(r){r.write(fc("")),r.close();var e=r.parentWindow.Object;return r=null,e},qm=function(){var r=Im("iframe"),e="java"+bi+":",t;return r.style.display="none",Sm.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(fc("document.F=Object")),t.close(),t.F},mr,br=function(){try{mr=new ActiveXObject("htmlfile")}catch(e){}br=typeof document!="undefined"?document.domain&&mr?cc(mr):qm():cc(mr);for(var r=ac.length;r--;)delete br[mi][ac[r]];return br()};ym[lc]=!0;dc.exports=Object.create||function(e,t){var i;return e!==null?(gi[mi]=mm(e),i=new gi,gi[mi]=null,i[lc]=e):i=br(),t===void 0?i:bm.f(i,t)}});var vc=n((RI,pc)=>{"use strict";var Pm=O();pc.exports=!Pm(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype})});var Ii=n((wI,gc)=>{"use strict";var Tm=w(),Om=b(),_m=He(),xm=or(),Rm=vc(),hc=xm("IE_PROTO"),Si=Object,wm=Si.prototype;gc.exports=Rm?Si.getPrototypeOf:function(r){var e=_m(r);if(Tm(e,hc))return e[hc];var t=e.constructor;return Om(t)&&e instanceof t?t.prototype:e instanceof Si?wm:null}});var Ti=n((AI,yc)=>{"use strict";var Am=O(),Cm=b(),Nm=k(),Lm=yi(),mc=Ii(),km=ne(),Dm=E(),$m=R(),Pi=Dm("iterator"),bc=!1,j,Ei,qi;[].keys&&(qi=[].keys(),"next"in qi?(Ei=mc(mc(qi)),Ei!==Object.prototype&&(j=Ei)):bc=!0);var Mm=!Nm(j)||Am(function(){var r={};return j[Pi].call(r)!==r});Mm?j={}:$m&&(j=Lm(j));Cm(j[Pi])||km(j,Pi,function(){return this});yc.exports={IteratorPrototype:j,BUGGY_SAFARI_ITERATORS:bc}});var Ic=n((CI,Sc)=>{"use strict";var jm=Ti().IteratorPrototype,Fm=yi(),Bm=be(),Um=er(),Vm=Y(),Gm=function(){return this};Sc.exports=function(r,e,t,i){var o=e+" Iterator";return r.prototype=Fm(jm,{next:Bm(+!i,t)}),Um(r,o,!1,!0),Vm[o]=Gm,r}});var Cc=n((NI,Ac)=>{"use strict";var Km=C(),Wm=T(),yr=R(),Rc=Wu(),Hm=b(),zm=Ic(),Ec=Ii(),qc=yt(),Qm=er(),Ym=G(),Oi=ne(),Jm=E(),Pc=Y(),wc=Ti(),Xm=Rc.PROPER,Zm=Rc.CONFIGURABLE,Tc=wc.IteratorPrototype,Sr=wc.BUGGY_SAFARI_ITERATORS,Le=Jm("iterator"),Oc="keys",ke="values",_c="entries",xc=function(){return this};Ac.exports=function(r,e,t,i,o,a,u){zm(t,e,i);var d=function(m){if(m===o&&s)return s;if(!Sr&&m in f)return f[m];switch(m){case Oc:return function(){return new t(this,m)};case ke:return function(){return new t(this,m)};case _c:return function(){return new t(this,m)}}return function(){return new t(this)}},p=e+" Iterator",l=!1,f=r.prototype,v=f[Le]||f["@@iterator"]||o&&f[o],s=!Sr&&v||d(o),c=e=="Array"&&f.entries||v,h,g,y;if(c&&(h=Ec(c.call(new r)),h!==Object.prototype&&h.next&&(!yr&&Ec(h)!==Tc&&(qc?qc(h,Tc):Hm(h[Le])||Oi(h,Le,xc)),Qm(h,p,!0,!0),yr&&(Pc[p]=xc))),Xm&&o==ke&&v&&v.name!==ke&&(!yr&&Zm?Ym(f,"name",ke):(l=!0,s=function(){return Wm(v,this)})),o)if(g={values:d(ke),keys:a?s:d(Oc),entries:d(_c)},u)for(y in g)(Sr||l||!(y in f))&&Oi(f,y,g[y]);else Km({target:e,proto:!0,forced:Sr||l},g);return(!yr||u)&&f[Le]!==s&&Oi(f,Le,s,{name:o}),Pc[e]=s,g}});var Lc=n((LI,Nc)=>{"use strict";Nc.exports=function(r,e){return{value:r,done:e}}});var xi=n((kI,jc)=>{"use strict";var eb=Z(),_i=Vu(),kc=Y(),$c=Gt(),rb=V().f,tb=Cc(),Ir=Lc(),ib=R(),ob=L(),Mc="Array Iterator",nb=$c.set,ab=$c.getterFor(Mc);jc.exports=tb(Array,"Array",function(r,e){nb(this,{type:Mc,target:eb(r),index:0,kind:e})},function(){var r=ab(this),e=r.target,t=r.kind,i=r.index++;return!e||i>=e.length?(r.target=void 0,Ir(void 0,!0)):t=="keys"?Ir(i,!1):t=="values"?Ir(e[i],!1):Ir([i,e[i]],!1)},"values");var Dc=kc.Arguments=kc.Array;_i("keys");_i("values");_i("entries");if(!ib&&ob&&Dc.name!=="values")try{rb(Dc,"name",{value:"values"})}catch(r){}});var Bc=n((DI,Fc)=>{"use strict";var sb=ze(),ub=V(),cb=be();Fc.exports=function(r,e,t){var i=sb(e);i in r?ub.f(r,i,cb(0,t)):r[i]=t}});var Uc=n(()=>{"use strict";var lb=C(),fb=hr(),db=Bc();lb({target:"Object",stat:!0},{fromEntries:function(e){var t={};return fb(e,function(i,o){db(t,i,o)},{AS_ENTRIES:!0}),t}})});var Gc=n((jI,Vc)=>{"use strict";xi();Uc();var pb=Ge();Vc.exports=pb.Object.fromEntries});var Wc=n((FI,Kc)=>{"use strict";Kc.exports={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}});var Qc=n(()=>{"use strict";xi();var vb=Wc(),hb=I(),gb=ie(),mb=G(),Hc=Y(),bb=E(),zc=bb("toStringTag");for(Er in vb)Ri=hb[Er],qr=Ri&&Ri.prototype,qr&&gb(qr)!==zc&&mb(qr,zc,Er),Hc[Er]=Hc.Array;var Ri,qr,Er});var Jc=n((VI,Yc)=>{"use strict";var yb=Gc();Qc();Yc.exports=yb});var Zc=n((GI,Xc)=>{"use strict";var Sb=Jc();Xc.exports=Sb});var bl=Lr(Xn(),1);var Te=(a=>(a.PROD="prod",a.VK_ALIAS="vk_alias",a.VIDEOTEST="videotest",a.TEST="test",a.AUTO="auto",a))(Te||{}),vt=(l=>(l.Q144P="mobile",l.Q240P="lowest",l.Q360P="low",l.Q480P="medium",l.Q720P="high",l.Q1080P="fullhd",l.Q1440P="quadhd",l.Q2160P="ultrahd",l.UNKNOWN="unknown",l))(vt||{}),ht=(c=>(c.MP4="mp4",c.DASH="dash",c.DASH_SEP="dash_sep",c.ONDEMAND_DASH="ondemand_dash",c.HLS="hls",c.ONDEMAND_HLS="ondemand_hls",c.WEBM="webm",c.AV1="av1",c.ONDEMAND_DASH_LIVE="ondemand_dash_live",c.ONDEMAND_HLS_LIVE="ondemand_hls_live",c.WEBRTC="webrtc",c.UNKNOWN="unknown",c.RTMP="rtmp",c))(ht||{});var gt=(i=>(i.HTTP1="http1",i.HTTP2="http2",i.HTTP3="http3",i))(gt||{});var mt=(d=>(d.SLIDER="slider",d.DOUBLE_TAP="double_tap",d.TIME_CODE="time_code",d.EPISODE="episode",d.REWIND="rewind",d.LIVE="live",d.UNKNOWN="unknown",d))(mt||{}),Zn=(a=>(a.GRAPH_SHOW="iGraphShow",a.GRAPH_HIDE="iGraphHide",a.NEXT_AREA="iNextChapterArea",a.NEXT_BUTTON="iNextChapterBtn",a.WATCH_AGAIN="iWatchAgainBtn",a))(Zn||{}),ea={action_play:"ap",action_play_interactive:"api",first_bytes:"fb",player_ready:"pr",first_frame:"ff",seek:"sk",watch_coverage_record:"wr",watch_coverage_live:"wl",empty_buffer:"eb",action_stop:"as",close_at_empty_buffer:"cb",content_error:"er",player_interface_click:"pc",next_movie:"nm",track_switch:"ts",failover:"fo"},ra={vsid:"si",isid:"is",vid:"vi",place:"pl",quality:"qt",cdn_host:"ch",stat_type:"st",param:"pm",vk_app_id:"va",track_code:"tc",connection_type:"cnt",connection_reused:"cr",cached_data:"cd",live:"lv",muted:"mu",mode:"mo",subtitles:"sb",failover:"fo",download_speed:"ds",manual_quality:"mq",ref_domain:"rd",direct_url:"du"},ta={unknown:"un",mobile:"m",lowest:"ls",low:"l",medium:"md",high:"h",fullhd:"f",quadhd:"q",ultrahd:"u"},ia={pip:"pi",fullscreen:"fs",external:"ex",prefetch:"pr",airplay:"ap",chromecast:"cc",invisible:"iv"};import{fillWithDefault as yp}from"@vkontakte/videoplayer-shared";var Sp={apiEnv:"vk_alias",requestRetryCount:1,firstFlushTime:5e3,flushDebounceTime:1e4,flushMaxWait:6e4,storageExpiration:36*60*60*1e3,watchCoverageInterval:15e3,disabledOperations:[],disabledCustomFields:[],shorten:!0,maxLoops:100,embedUrlParams:[],useBeacon:!0,synchronizeTime:!0,debugLog:!1,backoff:{start:1e3,factor:1.5,max:5*60*1e3,random:.1}},oa=r=>yp(r,Sp);function bt(){let r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),e=new Array(36),t=0,i,o;for(o=0;o<36;o++)o===8||o===13||o===18||o===23?e[o]="-":o===14?e[o]="4":(t<=2&&(t=33554432+Math.random()*16777216|0),i=t&15,t=t>>4,e[o]=r[o===19?i&3|8:i]);return e.join("")}import{assertNonNullable as Cb,combine as hl,fromEvent as gl,isNonNullable as ge,isNullable as ml,merge as Nb,now as F,observableFrom as Lb,once as kb,safeStorage as ji,Subject as Db,Subscription as Vi,ValueSubject as Fi}from"@vkontakte/videoplayer-shared";import{Logger as $b,detectEmbed as Mb}from"@vkontakte/videoplayer-shared";var Tr=Lr(Bu(),1);var el=Lr(Zc(),1);var rl=r=>{var o;let{operation:e,custom:t}=r,i=(0,el.default)(Object.entries(t).map(([a,u])=>{var l,f,v;let d=(l=ra[a])!=null?l:a,p=u;return u&&(a==="mode"?p=(f=ia[u])!=null?f:u:a==="quality"&&(p=(v=ta[u])!=null?v:u)),[d,p]}));return{...r,operation:(o=ea[e])!=null?o:e,custom:i}};var Pr="__VERSION__",tl="CIOPGQJGDIHBABABA",wi={prod:"https://api.ok.ru",vk_alias:"https://api.mycdn.me",videotest:"https://videotestapi.ok.ru/api",test:"https://apitest.ok.ru",auto:""};import{ValueSubject as Ib,getExponentialDelay as Eb,ErrorCategory as pe}from"@vkontakte/videoplayer-shared";var De=class{constructor(e){this.consequentAuthErrors=0;this.authorized$=new Ib(!1);this.params=e}async authorize(e){return this.authToken=e!=null?e:await this.refreshAuthToken(),this._authorizeWithBackoff()}logBeacon(e){let t="log.externalLog",i=this.createLogParams(e),o=this.sessionKey;if(!o)return;this.params.apiTransport.sendBeacon(t,i,o)||this.logRequest(e)}async logRequest(e){var u;let t="log.externalLog",i=this.createLogParams(e),o=(u=this.sessionKey)!=null?u:await this._authorizeWithBackoff();if(!o)return;let a=async(d,p=this.params.config.requestRetryCount)=>{try{return await this.params.apiTransport.sendRequest(t,i,o)}catch(l){if(!l||!("error_code"in l)){this.params.error$.next({id:"logRequestUnknown",category:pe.NETWORK,message:`Unknown ${t} error`,thrown:l});return}let f=l==null?void 0:l.error_code;switch(f){case 102:case 103:case 104:return this.authorized$.next(!1),this.sessionKey=await this._authorizeWithBackoff(),p>0?a(d,p-1):void 0;case 401:return this.authorized$.next(!1),this.authToken=await this.refreshAuthToken(),this.sessionKey=await this._authorizeWithBackoff(),p>0?a(d,p-1):void 0;default:{this.params.error$.next({id:`LogRequest#${f}`,category:pe.EXTERNAL_API,message:`${t} error`,data:l});return}}}};return a(e)}destroy(){window.clearTimeout(this.backoffTimeoutId),this.backoffTimeoutId=0}async refreshAuthToken(){if(this.params.refreshAuthToken)return this.refreshAuthTokenPromise||(this.refreshAuthTokenPromise=(0,Tr.default)(this.params.refreshAuthToken(),()=>{this.refreshAuthTokenPromise=void 0})),this.refreshAuthTokenPromise}createLogParams(e){return{collector:"ok.mobile.apps.video",data:JSON.stringify({application:`@vkontakte/videoplayer-statistics:${Pr}`,platform:this.params.mobile?"M_WEB":"WEB",items:this.params.config.shorten?e.map(rl):e})}}_authorizeWithBackoff(){if(!this.consequentAuthErrors)return this._authorize();let e=Eb(this.consequentAuthErrors,this.params.config.backoff);return new Promise(t=>{this.backoffTimeoutId||(this.backoffTimeoutId=window.setTimeout(()=>{(0,Tr.default)(this._authorize().then(t).catch(i=>this.params.error$.next({id:"AuthorizeBackoff",category:pe.NETWORK,message:"Otherwise unhandled error in authorization",thrown:i})),()=>this.backoffTimeoutId=0)},e))})}async _authorize(){if(this.authorizePromise)return this.authorizePromise;this.sessionKey=void 0,this.authorized$.next(!1);let e="auth.anonymLogin",t={session_data:{version:2,device_id:this.params.uuid,client_version:Pr.split("-")[0],client_type:"SDK_JS"}};return this.authToken!==void 0&&(t.session_data.auth_token=this.authToken,t.session_data.version=3),this.authorizePromise=(0,Tr.default)(this.params.apiTransport.sendRequest(e,t).then(i=>{var o;return(!i||!i.session_key)&&this.params.error$.next({id:"AuthorizeFailed",category:pe.EXTERNAL_API,message:"No session key",data:i}),this.sessionKey=(o=i==null?void 0:i.session_key)!=null?o:void 0,this.sessionKey}).catch(async i=>{this.sessionKey=void 0;let o=i==null?void 0:i.error_code;switch(o){case 401:return this.authToken=await this.refreshAuthToken(),this._authorizeWithBackoff()}o?this.params.error$.next({id:`Authorize#${o}`,category:pe.EXTERNAL_API,message:"authorize error",data:i}):this.params.error$.next({id:"AuthorizeUnknown",category:pe.NETWORK,message:"authorize error",thrown:i})}),()=>{this.authorizePromise=void 0,this.consequentAuthErrors=this.sessionKey?0:this.consequentAuthErrors+1,this.authorized$.next(this.sessionKey!==void 0)}),this.authorizePromise}};var Or=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(e,t,i){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:i})}removeEventListener(e,t){if(!(e in this.listeners))return;let i=this.listeners[e];for(let o=0,a=i.length;o<a;o++)if(i[o].callback===t){i.splice(o,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let i=this.listeners[e.type].slice();for(let o=0,a=i.length;o<a;o++){let u=i[o];try{u.callback.call(this,e)}catch(d){Promise.resolve().then(()=>{throw d})}u.options&&u.options.once&&this.removeEventListener(e.type,u.callback)}return!e.defaultPrevented}},ve=class extends Or{constructor(){super(),this.listeners||Or.call(this),Object.defineProperty(this,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,"reason",{value:void 0,writable:!0,configurable:!0})}toString(){return"[object AbortSignal]"}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,e)),super.dispatchEvent(e)}},$e=class{constructor(){Object.defineProperty(this,"signal",{value:new ve,writable:!0,configurable:!0})}abort(e){let t;try{t=new Event("abort")}catch(o){typeof document!="undefined"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}let i=e;if(i===void 0)if(typeof document=="undefined")i=new Error("This operation was aborted"),i.name="AbortError";else try{i=new DOMException("signal is aborted without reason")}catch(o){i=new Error("This operation was aborted"),i.name="AbortError"}this.signal.reason=i,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol!="undefined"&&Symbol.toStringTag&&($e.prototype[Symbol.toStringTag]="AbortController",ve.prototype[Symbol.toStringTag]="AbortSignal");function _r(r){return r.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof r.Request=="function"&&!r.Request.prototype.hasOwnProperty("signal")||!r.AbortController}function Ai(r){typeof r=="function"&&(r={fetch:r});let{fetch:e,Request:t=e.Request,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o=!1}=r;if(!_r({fetch:e,Request:t,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o}))return{fetch:e,Request:a};let a=t;(a&&!a.prototype.hasOwnProperty("signal")||o)&&(a=function(l,f){let v;f&&f.signal&&(v=f.signal,delete f.signal);let s=new t(l,f);return v&&Object.defineProperty(s,"signal",{writable:!1,enumerable:!1,configurable:!0,value:v}),s},a.prototype=t.prototype);let u=e;return{fetch:(p,l)=>{let f=a&&a.prototype.isPrototypeOf(p)?p.signal:l?l.signal:void 0;if(f){let v;try{v=new DOMException("Aborted","AbortError")}catch(c){v=new Error("Aborted"),v.name="AbortError"}if(f.aborted)return Promise.reject(v);let s=new Promise((c,h)=>{f.addEventListener("abort",()=>h(v),{once:!0})});return l&&l.signal&&delete l.signal,Promise.race([s,u(p,l)])}return u(p,l)},Request:a}}var Me=_r({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),il=Me?Ai({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,Ci=Me?il.fetch:window.fetch,fE=Me?il.Request:window.Request,dE=Me?$e:window.AbortController,pE=Me?ve:window.AbortSignal;import{ErrorCategory as xr,now as Ni}from"@vkontakte/videoplayer-shared";var je=class{constructor(e){this.params=e,this.apiKey=e.apiKey,this.apiEnv=e.config.apiEnv,this.apiBaseUrl=wi[this.apiEnv],this.timeSynchronisation=e.timeSynchronisation,this.isApiBaseUrlFetched=!1}async resolveApiBaseUrl(){var e;if(this.apiEnv!=="auto"||this.isApiBaseUrlFetched)return this.apiBaseUrl;try{let t=atob("aHR0cHM6Ly9kbnMuZ29vZ2xlL3Jlc29sdmU/bmFtZT12aWRlby5fZW5kcG9pbnQub2sucnUmdHlwZT1UWFQ="),o=await(await Ci(t,{method:"GET",mode:"cors",cache:"no-cache"})).json(),a=(e=o==null?void 0:o.Answer[0])==null?void 0:e.data;if(!a)throw new Error("Wrong DNS response");return a}catch(t){return this.params.error$.next({id:"OneStat:ApiTransport:resolveApiBaseUrl",category:xr.NETWORK,message:"Unhandled resolve api base url error",thrown:t}),wi.vk_alias}finally{this.isApiBaseUrlFetched=!0}}sendBeacon(e,t,i){if(!window.Blob||!window.navigator.sendBeacon)return!1;let o=this._prepareQueryParams({method:e,queryParams:t,sessionKey:i}),a=new window.Blob([o.toString()],{type:"application/x-www-form-urlencoded"});try{return window.navigator.sendBeacon(`${this.apiBaseUrl}/fb.do`,a)}catch(u){this.params.error$.next({id:"OneStat:ApiTransport:sendBeacon",category:xr.NETWORK,message:"Unhandled beacon error",thrown:u,data:{method:e,params:t}})}return!1}async sendRequest(e,t,i){let o=Ni(),a=u=>{if(u instanceof TypeError&&["Failed to fetch","NetworkError when attempting to fetch resource."].includes(u.message)){this.params.error$.next({id:"Network",category:xr.NETWORK,message:"Request failed",thrown:u});return}this.params.error$.next({id:"OneStat:ApiTransport:sendRequest",category:xr.NETWORK,message:"Unhandled request error",thrown:u,data:{method:e,params:t,sessionKey:i,time:Ni()-o}})};return this.apiBaseUrl=await this.resolveApiBaseUrl(),Ci(`${this.apiBaseUrl}/fb.do`,{method:"post",headers:{"Content-type":"application/x-www-form-urlencoded"},body:this._prepareQueryParams({method:e,queryParams:t,sessionKey:i})}).then(u=>{var f,v;let d=Number(u.headers.get("content-length"))===0,p=new Date((f=u.headers.get("date"))!=null?f:"").getTime(),l=Ni()-o;if(isFinite(p)&&((v=this.timeSynchronisation)==null||v.addServerTime(p,l)),!d)return u.json().then(s=>Object.prototype.hasOwnProperty.call(s,"error_msg")?Promise.reject(s):s,a)},a)}_prepareQueryParams(e){let t=new URLSearchParams({format:"JSON",method:e.method,application_key:this.apiKey});return e.sessionKey!==void 0&&t.append("session_key",e.sessionKey),Object.entries(e.queryParams).forEach(([i,o])=>t.append(i,typeof o=="string"?o:JSON.stringify(o))),t}};import{ErrorCategory as qb,now as Pb,safeStorage as Fe,debounceFn as ol}from"@vkontakte/videoplayer-shared";var Rr="onestat_events",Li=r=>e=>e.timestamp+r>=Pb(),wr=class{constructor(e){this.unsaltedStorage=[];this.isPaused=!1;this.isUrgent=e=>{let{operation:t}=e;return["action_play","watch_coverage_record","watch_coverage_live"].includes(t)};this.params=e,this.api=e.api,this.error$=e.error$,this.userSalt=e.userSalt,this.loggerDebugLog=e.debugLogger.createComponentLog("stat logger"),this.firstFlush=ol(()=>this.safeFlush(),this.params.config.firstFlushTime,{maxWait:this.params.config.firstFlushTime});let t=Fe.isPersistent()?this.params.config.flushMaxWait:0;this.debouncedFlush=ol(()=>this.safeFlush(),this.params.config.flushDebounceTime,{maxWait:t}),this.subscription=this.api.authorized$.subscribe(i=>{i&&this.debouncedFlush()}),this.housekeepStorage()}safeFlush(){var e;try{this.flush()}catch(t){this.error$.next({id:"LoggerError",category:qb.WTF,message:(e=String(t))!=null?e:"Unknown logger error",thrown:t})}}readFromStorage(){let e=Fe.get(Rr);try{return e?JSON.parse(e):{}}catch(t){}return{}}addToStorage(e){var a;if(!this.userSalt){this.unsaltedStorage.push(e);return}let t=this.readFromStorage(),o=((a=t[this.userSalt])!=null?a:[]).filter(Li(this.params.config.storageExpiration));Fe.set(Rr,JSON.stringify({...t,[this.userSalt]:[...o,e]}))}getFromStorage(){var i;return this.userSalt?((i=this.readFromStorage()[this.userSalt])!=null?i:[]).filter(Li(this.params.config.storageExpiration)):this.unsaltedStorage}markStorageSent(){if(!this.userSalt){this.unsaltedStorage=[];return}let e=this.readFromStorage();delete e[this.userSalt],Fe.set(Rr,JSON.stringify(e))}housekeepStorage(){let e=this.readFromStorage();for(let[t,i]of Object.entries(e)){let o=i.filter(Li(this.params.config.storageExpiration));o.length?e[t]=o:delete e[t],this.loggerDebugLog({message:`${i.length} retrieved from storage, ${o.length} of them actual`})}Fe.set(Rr,JSON.stringify(e))}log(e){this.addToStorage(e),!this.isPaused&&(this.isUrgent(e)?this.flush():this.lastVsid!==e.custom.vsid?this.firstFlush():this.debouncedFlush(),this.lastVsid=e.custom.vsid)}flush(e=!1){let t=this.getFromStorage();t.length!==0&&(this.api.authorized$.getValue()?(e&&this.params.config.useBeacon?(this.loggerDebugLog({message:`Flushing ${t.length} events through beacon`}),this.api.logBeacon(t)):(this.loggerDebugLog({message:`Flushing ${t.length} events`}),this.api.logRequest(t)),this.markStorageSent()):this.api.authorize(),this.firstFlush.cancel(),this.debouncedFlush.cancel())}pause(){this.isPaused=!0,this.debouncedFlush.cancel()}resume(){this.isPaused=!1,this.debouncedFlush()}destroy(){this.subscription.unsubscribe(),this.firstFlush.cancel(),this.debouncedFlush.cancel()}};import{HttpConnectionType as ki,Surface as he,VideoFormat as q,VideoQuality as D}from"@vkontakte/videoplayer-core";import{assertNever as nl}from"@vkontakte/videoplayer-shared";var al=r=>r&&{[D.INVARIANT]:"unknown",[D.Q_144P]:"mobile",[D.Q_240P]:"lowest",[D.Q_360P]:"low",[D.Q_480P]:"medium",[D.Q_720P]:"high",[D.Q_1080P]:"fullhd",[D.Q_1440P]:"quadhd",[D.Q_2160P]:"ultrahd",[D.Q_4320P]:"unknown"}[r],Di=r=>r&&{[ki.HTTP1]:"http1",[ki.HTTP2]:"http2",[ki.QUIC]:"http3"}[r],sl=r=>{if(r!==void 0)switch(r){case q.MPEG:return"mp4";case q.DASH:case q.DASH_LIVE:case q.DASH_STREAMS:return"dash";case q.DASH_SEP:return"dash_sep";case q.DASH_ONDEMAND:return"ondemand_dash";case q.DASH_WEBM:case q.DASH_LIVE_WEBM:return"webm";case q.DASH_WEBM_AV1:return"av1";case q.DASH_LIVE_CMAF:return"ondemand_dash_live";case q.HLS:case q.HLS_LIVE:return"hls";case q.HLS_ONDEMAND:return"ondemand_hls";case q.HLS_LIVE_CMAF:return"ondemand_hls_live";case q.WEB_RTC_LIVE:return"webrtc";default:return nl(r)}},Ar=r=>{if(r!==void 0)switch(r){case he.NONE:case he.INLINE:return;case he.FULLSCREEN:return"fullscreen";case he.SECOND_SCREEN:return"chromecast";case he.PIP:return"pip";case he.INVISIBLE:return"invisible";default:return nl(r)}},ul=r=>{switch(r){case"slow-2g":return"poor";case"2g":return"poor";case"3g":return"good";case"4g":return"excellent"}};var Cr=class{constructor(e){this.offset=void 0;this.offset=e}getOffset(){var e;return(e=this.offset)!=null?e:0}setOffset(e){this.offset=e}now(){var e;return Date.now()+((e=this.offset)!=null?e:0)}date(e=new Date){var t;return e.setTime(e.getTime()+((t=this.offset)!=null?t:0)),e}addServerTime(e,t){let i=Date.now(),o=e-i-t/2;if(Math.abs(o)<1e3){this.offset=0;return}this.offset===void 0?this.offset=Math.round(o):this.offset=Math.round(.2*o+(1-.2)*this.offset)}};var cl=()=>Math.floor(Math.random()*4294967296).toString(36).padStart(7,"0"),ll=()=>Math.floor(Math.random()*18446744073709552e3).toString(36).padStart(13,"0");import{PlaybackState as fl}from"@vkontakte/videoplayer-core";import{filter as dl,filterChanged as Ob,fromEvent as _b,isNullable as pl,map as xb,merge as $i,Observable as Rb,Subject as Mi,Subscription as wb,ValueSubject as Ab}from"@vkontakte/videoplayer-shared";var vl=(r,e)=>new Rb(t=>{let i=new wb,o=$i(_b(window,"beforeunload"),r.events.willDestruct$),a=new Ab(void 0),u;i.add(r.info.isLive$.pipe(Ob()).subscribe(B=>{u&&(u.unsubscribe(),a.next(void 0)),B?u=r.info.liveTime$.pipe(xb(Nr=>Nr&&Nr/1e3)).subscribe(a):u=r.info.position$.subscribe(a),i.add(u)}));let{playing$:d,paused$:p}=r.events,l=r.events.willSeek$.pipe(dl(()=>r.info.playbackState$.getValue()===fl.PLAYING)),f=r.events.seeked$.pipe(dl(()=>r.info.playbackState$.getValue()===fl.PLAYING)),v=!1,s=new Mi;i.add(l.subscribe(()=>{v||s.next(),v=!0})),i.add(f.subscribe(()=>v=!1));let c=new Mi,h=new Mi,g=$i(d,f,c),y=$i(p,s,o,r.events.looped$,h),m,S=()=>m=a.getValue(),yl=()=>{let B=a.getValue();pl(m)||m===B||pl(B)||(t.next({from:m,to:B}),m=void 0)},Sl=()=>{h.next(),c.next()};if(i.add(g.subscribe(S)),i.add(y.subscribe(yl)),e.forceInterval&&isFinite(e.forceInterval)){let B=0;i.add(g.subscribe(()=>B=window.setTimeout(Sl,e.forceInterval))),i.add(y.subscribe(()=>window.clearTimeout(B)))}return i});var jb="_one-stat_",Bi=`${jb}uuid`,Ui=()=>{let r=new Vi;return{subscription:r,subscribe:(e,t)=>{e&&r.add(e.subscribe(t))}}},Gi=class{constructor(e,t){this.subscription=new Vi;this.debugLogger=new $b;this.oneStatDebugLog=this.debugLogger.createComponentLog("onestat");this.loopCounter=0;this.disabled=!1;this.vsid$=new Fi(void 0);this.isid$=new Fi(void 0);this.seekAction$=new Fi("unknown");var p,l,f;this.statContext=e,this.config=oa((p=t.config)!=null?p:{}),ge(t.apiEnv)&&(this.config.apiEnv=t.apiEnv),this.config.synchronizeTime&&(this.timeSynchronisation=new Cr);let i=new Db;this.experimental={error$:i};let o=ji.get(Bi);o?o.startsWith('"')&&o.endsWith('"')?(this.uuid=(0,bl.default)(o,'"',""),ji.set(Bi,this.uuid)):this.uuid=o:(this.uuid=bt(),ji.set(Bi,this.uuid)),this.resetViewSession(),t.useIsid&&this.isid$.next((l=t.isid)!=null?l:ll());let a=new je({apiKey:tl,config:this.config,error$:i,timeSynchronisation:this.timeSynchronisation});this.api=new De({config:this.config,apiTransport:a,refreshAuthToken:t.refreshAuthToken,mobile:(f=this.statContext.mobile)!=null?f:!1,uuid:this.uuid,error$:i}),this.logger=new wr({config:this.config,debugLogger:this.debugLogger,api:this.api,error$:i,userSalt:t.userSalt});let{isEmbed:u,host:d}=Mb();this.isEmbed=u,this.embedParent=d,this.subscribe()}updateContext(e){this.statContext={...this.statContext,...e}}attachTo(e){let t=new Vi,i=(s,c)=>t.add(s.subscribe(c));i(e.events.willStart$,()=>{let s=e.info.position$.getValue();this.logActionPlay({position:s}),this.statContext.projectId&&this.logActionPlayInteractive({position:s})}),i(e.events.looped$,()=>{this.resetViewSession(),++this.loopCounter>this.config.maxLoops&&(this.disabled=!0),this.logActionPlay({position:e.info.position$.getValue()})}),i(e.events.seeked$,()=>{this.logSeek({action:this.seekAction$.getValue(),time:e.info.position$.getValue()}),this.seekAction$.next("unknown")}),i(e.events.paused$,()=>{this.logPause({position:e.info.position$.getValue()})}),i(e.events.willResume$,()=>{this.logPlay()}),i(e.events.started$,()=>{this.statContext.clip&&this.logWatchCoverageRecord({start:0,end:0})}),i(vl(e,{forceInterval:this.config.watchCoverageInterval}),s=>{let c=e.info.isLive$.getValue(),h={start:parseFloat(s.from.toFixed(3)),end:parseFloat(s.to.toFixed(3))};c?this.logWatchCoverageLive(h):this.logWatchCoverageRecord(h)});let o;i(e.info.isStalled$,s=>{s?o=F():(ge(o)&&this.logEmptyBuffer({duration:F()-o}),o=void 0)});let a=!1;t.add(e.events.fatalError$.pipe(kb()).subscribe(()=>a=!0)),i(e.events.willStop$,()=>{if(e.info.isStalled$.getValue()){let c=ge(o)?F()-o:void 0;this.logCloseAtEmptyBuffer({duration:c!=null?c:0}),o=void 0}else a||this.logActionStop()}),i(e.events.managedError$,({id:s})=>{this.logError({fatal:!1,errorType:s})}),i(e.events.fatalError$,({id:s})=>{this.logError({fatal:!0,errorType:s})});let u,d,p=!1;i(e.events.firstBytes$,s=>{u=F(),this.logFirstBytes({time:s})}),i(e.events.willStart$,()=>d=F()),i(e.info.currentBuffer$,s=>{!p&&s&&s.end-s.start>0&&ge(u)&&(this.logPlayerReady({duration:F()-u}),p=!0)}),i(e.events.firstFrame$,()=>{ge(u)&&!p&&(this.logPlayerReady({duration:F()-u}),p=!0),ge(d)&&this.logFirstFrame({time:F()-d})});let l;i(e.info.currentVideoStream$,s=>{s&&(l&&s.id!==l&&this.logTrackSwitch(s),l=s.id)});let f;i(e.info.currentAudioStream$,s=>{s&&(f&&s.id!==f&&this.logTrackSwitch(s),f=s.id)}),i(e.info.atLiveEdge$,s=>this.updateContext({liveEdge:s})),i(hl({muted:e.info.muted$,volume:e.info.volume$}),({muted:s,volume:c})=>this.updateContext({audible:!s&&c>0})),i(e.info.currentQuality$,s=>this.updateContext({quality:al(s)})),i(e.info.isAutoQualityEnabled$,s=>this.updateContext({autoQuality:s})),i(e.info.currentFormat$,s=>this.updateContext({contentType:sl(s)})),i(e.info.currentPlaybackRate$,s=>this.updateContext({rate:s})),i(e.info.is3DVideo$,s=>this.updateContext({is3d:s}));let v;return i(e.info.hostname$,s=>{let c=v!==void 0&&v!==s;this.updateContext({cdnHostname:s,failover:c}),c&&this.logFailover(s),v=s}),i(e.info.throughputEstimation$,s=>this.updateContext({downloadSpeed:s})),i(e.info.httpConnectionType$,s=>{this.statContext.firstConnectionType||this.updateContext({firstConnectionType:Di(s)}),this.updateContext({connectionType:Di(s)})}),i(e.info.httpConnectionReused$,s=>{ml(this.statContext.firstConnectionReused)&&this.updateContext({firstConnectionReused:s}),this.updateContext({connectionReused:s})}),i(e.info.surface$,s=>this.updateContext({mode:Ar(s)})),i(hl({current:e.info.currentTextTrack$,available:e.info.availableTextTracks$}),({current:s,available:c})=>{let h=c.find(({id:y})=>y===s),g=h&&(h.isAuto?`${h.language}_auto`:h.language);this.updateContext({subtitles:g})}),this.player=e,this.uiEvents&&this.attachToUi(this.uiEvents),this.resubscribeBeforeunload(),this.subscription.add(t),t}attachToUi(e){this.uiEvents=e;let{subscription:t,subscribe:i}=Ui();return this.player&&(i(e.actionRewind$,()=>{this.player&&(this.resetViewSession(),this.logActionPlay({position:this.player.info.position$.getValue()}))}),i(e.actionSeek$,this.seekAction$),i(e.inPiP$,o=>{var u;let a=o?"pip":Ar((u=this.player)==null?void 0:u.info.surface$.getValue());this.updateContext({mode:a})}),i(e.inFullscreen$,o=>{var u;let a=o?"fullscreen":Ar((u=this.player)==null?void 0:u.info.surface$.getValue());this.updateContext({mode:a})}),i(e.actionSetSubtitle$,o=>this.updateContext({subtitles:o})),i(e.nextMovie$,o=>this.logNextMovie(o)),this.resubscribeBeforeunload(),this.subscription.add(t)),t}attachToAds(e){let{subscription:t,subscribe:i}=Ui();return i(e.slotRequested$,()=>this.logAdSlotRequest()),i(e.started$,o=>this.logAdStarted(o)),i(e.paused$,()=>this.logAdPaused()),i(e.resumed$,()=>this.logAdResumed()),i(e.ended$,()=>this.logAdEnded()),i(e.skipped$,()=>this.logAdSkipped()),i(e.clicked$,()=>this.logAdClicked()),this.resubscribeBeforeunload(),this.subscription.add(t),t}attachToInteractive(e){let{subscription:t,subscribe:i}=Ui();return i(e.click$,o=>this.logInterfaceClick(o)),i(e.nextMovie$,o=>this.logNextMovie(o)),this.resubscribeBeforeunload(),this.subscription.add(t),t}authorize(e){return this.api.authorize(e)}pause(){this.logger.pause(),this.oneStatDebugLog({message:"paused"})}resume(){this.logger.resume(),this.oneStatDebugLog({message:"resumed"})}destroy(){this.logger.flush(),this.subscription.unsubscribe(),this.api.destroy(),this.logger.destroy()}resetViewSession(){this.oneStatDebugLog({message:"VSID reset"}),this.vsid$.next(cl())}getDeviceId(){return this.uuid}setFieldBlacklist(){}logInited(){}logReady(e){this.log({operation:"player_ready",param:String(e.time)})}logStarted(...e){this.logActionPlay(...e)}logPlay(){this.log({operation:"play_toggle"})}logPause(e){this.log({operation:"pause",param:String(Math.round(e.position))})}logSeek(e){this.log({operation:"seek",param:e.action,time:e.time})}logFirstBytes(e){this.log({operation:"first_bytes",param:String(e.time)})}logFirstFrame(e){this.log({operation:"first_frame",param:String(e.time)})}logError(e){this.log({operation:"content_error",param:`${e.fatal?"fatal":"recoverable"}_${e.errorType}`})}logWatchCoverageRecord(e){this.log({operation:"watch_coverage_record",param:`${e.start}-${e.end}`})}logWatchCoverageLive(e){var a,u;let t=(u=(a=this.timeSynchronisation)==null?void 0:a.getOffset())!=null?u:0,i=e.start+t,o=e.end+t;this.log({operation:"watch_coverage_live",param:`${i}-${o}`})}logEmptyBuffer(e){this.log({operation:"empty_buffer",param:String(e.duration)})}logDownloadSpeed(){}logAdSlotRequest(){this.log({operation:"adv",param:"slot_request"})}logAdStarted(e){this.log({operation:"adv",param:e})}logAdPaused(){this.log({operation:"adv",param:"pause"})}logAdResumed(){this.log({operation:"adv",param:"resume"})}logAdEnded(){this.log({operation:"adv",param:"ended"})}logAdSkipped(){this.log({operation:"adv",param:"skip"})}logAdClicked(){this.log({operation:"adv",param:"click"})}logInterfaceClick(e){this.log({operation:"player_interface_click",param:e})}logNextMovie(e){this.log({operation:"next_movie",param:String(e)})}subscribe(){this.resubscribeBeforeunload();let e=window.navigator.connection;e&&"onchange"in e&&"effectiveType"in e&&this.subscription.add(Nb(gl(e,"change"),Lb(["init"])).subscribe(()=>this.updateContext({network:ul(e.effectiveType)}))),this.config.debugLog&&this.debugLogger.log$.subscribe(t=>{console.debug("%c stat ","background:#fa6470;",`component: ${t.component}.`,t.message)})}resubscribeBeforeunload(){var e;(e=this.beforeunloadSubscription)==null||e.unsubscribe(),this.beforeunloadSubscription=gl(window,"beforeunload").subscribe(()=>this.logger.flush(!0)),this.subscription.add(this.beforeunloadSubscription)}logPlayerReady(e){this.log({operation:"player_ready",param:String(Math.round(e.duration))})}logActionPlay(e){this.log({operation:"action_play",param:String(Math.round(e.position))})}logActionPlayInteractive(e){this.statContext.projectId&&this.log({operation:"action_play_interactive",param:String(Math.round(e.position))},{vid:this.statContext.projectId})}logFailover(e){this.log({operation:"failover",param:e})}logCloseAtEmptyBuffer(e){this.log({operation:"close_at_empty_buffer",param:String(Math.round(e.duration))})}logActionStop(){this.log({operation:"action_stop"})}logTrackSwitch(e){this.log({operation:"track_switch",param:e.id})}log(e,t={}){if(this.disabled){this.oneStatDebugLog({message:`operation ${e.operation} but statistics is disabled`});return}if(this.config.disabledOperations.includes(e.operation)){this.oneStatDebugLog({message:`operation ${e.operation} but it is disabled`});return}this.oneStatDebugLog({message:`operation ${e.operation} ${e.param}`});let i=this.createLogItem(e,t);this.logger.log(i)}createLogItem({operation:e,param:t,time:i},o={}){var c,h;let a=(h=(c=this.timeSynchronisation)==null?void 0:c.now())!=null?h:F(),u=this.vsid$.getValue();Cb(u);let d=this.isid$.getValue(),p=e==="empty_buffer"||e==="close_at_empty_buffer"?this.statContext.connectionType:this.statContext.firstConnectionType,l=this.statContext.firstConnectionReused,f,v;if(this.isEmbed){f=this.embedParent;let g=[...new URLSearchParams(location.search).entries()].filter(([y,m])=>this.config.embedUrlParams.includes(y));v=new URLSearchParams(g).toString()}else this.statContext.place==="direct"&&((this.statContext.refDomain||document.referrer)&&(f=new URL(this.statContext.refDomain||document.referrer).hostname),v=location.href.substring(0,1024));let s={vsid:u,isid:d,vid:this.statContext.movieId,ct:this.statContext.contentType,place:this.isEmbed?"embed":this.statContext.place,quality:this.statContext.quality,cdn_host:this.statContext.cdnHostname,stat_type:this.statContext.autoplay===!0?"auto":this.statContext.autoplay===!1?"":void 0,param:t,vk_app_id:this.statContext.vkAppId,track_code:this.statContext.trackCode,connection_type:p,connection_reused:l===!0?1:l===!1?0:void 0,cached_data:this.statContext.cached===!0?1:this.statContext.cached===!1?0:void 0,live:this.statContext.liveEdge?1:void 0,muted:this.statContext.audible===!1?1:void 0,mode:this.statContext.mode,subtitles:this.statContext.subtitles,download_speed:this.statContext.downloadSpeed,manual_quality:this.statContext.autoQuality?void 0:1,ref_domain:f,direct_url:v,rate:this.statContext.rate===1||ml(this.statContext.rate)?void 0:this.statContext.rate.toFixed(2),view_360:this.statContext.is3d?1:void 0,aid:this.statContext.albumId,vk_playlist_id:this.statContext.vkPlaylistId,...o};for(let g of this.config.disabledCustomFields)delete s[g];return{operation:e,type:1,time:i,network:this.statContext.network,timestamp:a,custom:s}}};export{Te as ApiEnv,gt as ConnectionType,ht as ContentType,Zn as InteractiveInterfaceClick,Gi as OneStat,vt as Quality,mt as SeekAction,Pr as VERSION};
|