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