@vkontakte/videoplayer-statistics 1.0.96-dev.93671684.0 → 1.0.96-dev.9ccdb215.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es2015.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-statistics v1.0.96-dev.93671684.0
3
- * Fri, 16 Jan 2026 09:29:28 GMT
2
+ * @vkontakte/videoplayer-statistics v1.0.96-dev.9ccdb215.0
3
+ * Thu, 22 Jan 2026 13:49:03 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-96/doc/
5
5
  */
6
- "use strict";var af=Object.create;var Qe=Object.defineProperty,sf=Object.defineProperties,uf=Object.getOwnPropertyDescriptor,cf=Object.getOwnPropertyDescriptors,lf=Object.getOwnPropertyNames,Bo=Object.getOwnPropertySymbols,df=Object.getPrototypeOf,jo=Object.prototype.hasOwnProperty,ff=Object.prototype.propertyIsEnumerable;var xe=Math.pow,Uo=(t,e,r)=>e in t?Qe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e||(e={}))jo.call(e,r)&&Uo(t,r,e[r]);if(Bo)for(var r of Bo(e))ff.call(e,r)&&Uo(t,r,e[r]);return t},le=(t,e)=>sf(t,cf(e));var s=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ho=(t,e)=>{for(var r in e)Qe(t,r,{get:e[r],enumerable:!0})},Wo=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of lf(e))!jo.call(t,o)&&o!==r&&Qe(t,o,{get:()=>e[o],enumerable:!(i=uf(e,o))||i.enumerable});return t};var R=(t,e,r)=>(r=t!=null?af(df(t)):{},Wo(e||!t||!t.__esModule?Qe(r,"default",{value:t,enumerable:!0}):r,t)),pf=t=>Wo(Qe({},"__esModule",{value:!0}),t);var A=(t,e,r)=>new Promise((i,o)=>{var n=f=>{try{l(r.next(f))}catch(a){o(a)}},c=f=>{try{l(r.throw(f))}catch(a){o(a)}},l=f=>f.done?i(f.value):Promise.resolve(f.value).then(n,c);l((r=r.apply(t,e)).next())});var O=s((Or,Ko)=>{"use strict";var Ge=function(t){return t&&t.Math===Math&&t};Ko.exports=Ge(typeof globalThis=="object"&&globalThis)||Ge(typeof window=="object"&&window)||Ge(typeof self=="object"&&self)||Ge(typeof global=="object"&&global)||Ge(typeof Or=="object"&&Or)||function(){return this}()||Function("return this")()});var k=s((EI,Qo)=>{"use strict";Qo.exports=function(t){try{return!!t()}catch(e){return!0}}});var ze=s((TI,Go)=>{"use strict";var hf=k();Go.exports=!hf(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")})});var qr=s((wI,Xo)=>{"use strict";var vf=ze(),Jo=Function.prototype,zo=Jo.apply,Yo=Jo.call;Xo.exports=typeof Reflect=="object"&&Reflect.apply||(vf?Yo.bind(zo):function(){return Yo.apply(zo,arguments)})});var N=s((xI,tn)=>{"use strict";var Zo=ze(),en=Function.prototype,Cr=en.call,gf=Zo&&en.bind.bind(Cr,Cr);tn.exports=Zo?gf:function(t){return function(){return Cr.apply(t,arguments)}}});var Ye=s((AI,on)=>{"use strict";var rn=N(),mf=rn({}.toString),bf=rn("".slice);on.exports=function(t){return bf(mf(t),8,-1)}});var Rr=s((OI,nn)=>{"use strict";var yf=Ye(),If=N();nn.exports=function(t){if(yf(t)==="Function")return If(t)}});var q=s((qI,an)=>{"use strict";var Lr=typeof document=="object"&&document.all;an.exports=typeof Lr=="undefined"&&Lr!==void 0?function(t){return typeof t=="function"||t===Lr}:function(t){return typeof t=="function"}});var M=s((CI,sn)=>{"use strict";var Sf=k();sn.exports=!Sf(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var W=s((RI,un)=>{"use strict";var _f=ze(),It=Function.prototype.call;un.exports=_f?It.bind(It):function(){return It.apply(It,arguments)}});var kr=s(dn=>{"use strict";var cn={}.propertyIsEnumerable,ln=Object.getOwnPropertyDescriptor,Pf=ln&&!cn.call({1:2},1);dn.f=Pf?function(e){var r=ln(this,e);return!!r&&r.enumerable}:cn});var Je=s((kI,fn)=>{"use strict";fn.exports=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}});var hn=s((NI,pn)=>{"use strict";var Ef=N(),Tf=k(),wf=Ye(),Nr=Object,xf=Ef("".split);pn.exports=Tf(function(){return!Nr("z").propertyIsEnumerable(0)})?function(t){return wf(t)==="String"?xf(t,""):Nr(t)}:Nr});var Xe=s(($I,vn)=>{"use strict";vn.exports=function(t){return t==null}});var Ae=s((DI,gn)=>{"use strict";var Af=Xe(),Of=TypeError;gn.exports=function(t){if(Af(t))throw new Of("Can't call method on "+t);return t}});var ve=s((MI,mn)=>{"use strict";var qf=hn(),Cf=Ae();mn.exports=function(t){return qf(Cf(t))}});var K=s((VI,bn)=>{"use strict";var Rf=q();bn.exports=function(t){return typeof t=="object"?t!==null:Rf(t)}});var ge=s((FI,yn)=>{"use strict";yn.exports={}});var ie=s((BI,Sn)=>{"use strict";var $r=ge(),Dr=O(),Lf=q(),In=function(t){return Lf(t)?t:void 0};Sn.exports=function(t,e){return arguments.length<2?In($r[t])||In(Dr[t]):$r[t]&&$r[t][e]||Dr[t]&&Dr[t][e]}});var St=s((UI,_n)=>{"use strict";var kf=N();_n.exports=kf({}.isPrototypeOf)});var me=s((jI,Tn)=>{"use strict";var Nf=O(),Pn=Nf.navigator,En=Pn&&Pn.userAgent;Tn.exports=En?String(En):""});var Vr=s((HI,Cn)=>{"use strict";var qn=O(),Mr=me(),wn=qn.process,xn=qn.Deno,An=wn&&wn.versions||xn&&xn.version,On=An&&An.v8,Q,_t;On&&(Q=On.split("."),_t=Q[0]>0&&Q[0]<4?1:+(Q[0]+Q[1]));!_t&&Mr&&(Q=Mr.match(/Edge\/(\d+)/),(!Q||Q[1]>=74)&&(Q=Mr.match(/Chrome\/(\d+)/),Q&&(_t=+Q[1])));Cn.exports=_t});var Fr=s((WI,Ln)=>{"use strict";var Rn=Vr(),$f=k(),Df=O(),Mf=Df.String;Ln.exports=!!Object.getOwnPropertySymbols&&!$f(function(){var t=Symbol("symbol detection");return!Mf(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Rn&&Rn<41})});var Br=s((KI,kn)=>{"use strict";var Vf=Fr();kn.exports=Vf&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Ur=s((QI,Nn)=>{"use strict";var Ff=ie(),Bf=q(),Uf=St(),jf=Br(),Hf=Object;Nn.exports=jf?function(t){return typeof t=="symbol"}:function(t){var e=Ff("Symbol");return Bf(e)&&Uf(e.prototype,Hf(t))}});var Ze=s((GI,$n)=>{"use strict";var Wf=String;$n.exports=function(t){try{return Wf(t)}catch(e){return"Object"}}});var oe=s((zI,Dn)=>{"use strict";var Kf=q(),Qf=Ze(),Gf=TypeError;Dn.exports=function(t){if(Kf(t))return t;throw new Gf(Qf(t)+" is not a function")}});var Pt=s((YI,Mn)=>{"use strict";var zf=oe(),Yf=Xe();Mn.exports=function(t,e){var r=t[e];return Yf(r)?void 0:zf(r)}});var Fn=s((JI,Vn)=>{"use strict";var jr=W(),Hr=q(),Wr=K(),Jf=TypeError;Vn.exports=function(t,e){var r,i;if(e==="string"&&Hr(r=t.toString)&&!Wr(i=jr(r,t))||Hr(r=t.valueOf)&&!Wr(i=jr(r,t))||e!=="string"&&Hr(r=t.toString)&&!Wr(i=jr(r,t)))return i;throw new Jf("Can't convert object to primitive value")}});var ee=s((XI,Bn)=>{"use strict";Bn.exports=!0});var Hn=s((ZI,jn)=>{"use strict";var Un=O(),Xf=Object.defineProperty;jn.exports=function(t,e){try{Xf(Un,t,{value:e,configurable:!0,writable:!0})}catch(r){Un[t]=e}return e}});var et=s((eS,Qn)=>{"use strict";var Zf=ee(),ep=O(),tp=Hn(),Wn="__core-js_shared__",Kn=Qn.exports=ep[Wn]||tp(Wn,{});(Kn.versions||(Kn.versions=[])).push({version:"3.43.0",mode:Zf?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var Kr=s((tS,zn)=>{"use strict";var Gn=et();zn.exports=function(t,e){return Gn[t]||(Gn[t]=e||{})}});var Qr=s((rS,Yn)=>{"use strict";var rp=Ae(),ip=Object;Yn.exports=function(t){return ip(rp(t))}});var te=s((iS,Jn)=>{"use strict";var op=N(),np=Qr(),ap=op({}.hasOwnProperty);Jn.exports=Object.hasOwn||function(e,r){return ap(np(e),r)}});var Gr=s((oS,Xn)=>{"use strict";var sp=N(),up=0,cp=Math.random(),lp=sp(1.1.toString);Xn.exports=function(t){return"Symbol("+(t===void 0?"":t)+")_"+lp(++up+cp,36)}});var V=s((nS,ea)=>{"use strict";var dp=O(),fp=Kr(),Zn=te(),pp=Gr(),hp=Fr(),vp=Br(),Oe=dp.Symbol,zr=fp("wks"),gp=vp?Oe.for||Oe:Oe&&Oe.withoutSetter||pp;ea.exports=function(t){return Zn(zr,t)||(zr[t]=hp&&Zn(Oe,t)?Oe[t]:gp("Symbol."+t)),zr[t]}});var oa=s((aS,ia)=>{"use strict";var mp=W(),ta=K(),ra=Ur(),bp=Pt(),yp=Fn(),Ip=V(),Sp=TypeError,_p=Ip("toPrimitive");ia.exports=function(t,e){if(!ta(t)||ra(t))return t;var r=bp(t,_p),i;if(r){if(e===void 0&&(e="default"),i=mp(r,t,e),!ta(i)||ra(i))return i;throw new Sp("Can't convert object to primitive value")}return e===void 0&&(e="number"),yp(t,e)}});var Yr=s((sS,na)=>{"use strict";var Pp=oa(),Ep=Ur();na.exports=function(t){var e=Pp(t,"string");return Ep(e)?e:e+""}});var Et=s((uS,sa)=>{"use strict";var Tp=O(),aa=K(),Jr=Tp.document,wp=aa(Jr)&&aa(Jr.createElement);sa.exports=function(t){return wp?Jr.createElement(t):{}}});var Xr=s((cS,ua)=>{"use strict";var xp=M(),Ap=k(),Op=Et();ua.exports=!xp&&!Ap(function(){return Object.defineProperty(Op("div"),"a",{get:function(){return 7}}).a!==7})});var da=s(la=>{"use strict";var qp=M(),Cp=W(),Rp=kr(),Lp=Je(),kp=ve(),Np=Yr(),$p=te(),Dp=Xr(),ca=Object.getOwnPropertyDescriptor;la.f=qp?ca:function(e,r){if(e=kp(e),r=Np(r),Dp)try{return ca(e,r)}catch(i){}if($p(e,r))return Lp(!Cp(Rp.f,e,r),e[r])}});var Zr=s((dS,fa)=>{"use strict";var Mp=k(),Vp=q(),Fp=/#|\.prototype\./,tt=function(t,e){var r=Up[Bp(t)];return r===Hp?!0:r===jp?!1:Vp(e)?Mp(e):!!e},Bp=tt.normalize=function(t){return String(t).replace(Fp,".").toLowerCase()},Up=tt.data={},jp=tt.NATIVE="N",Hp=tt.POLYFILL="P";fa.exports=tt});var rt=s((fS,ha)=>{"use strict";var pa=Rr(),Wp=oe(),Kp=ze(),Qp=pa(pa.bind);ha.exports=function(t,e){return Wp(t),e===void 0?t:Kp?Qp(t,e):function(){return t.apply(e,arguments)}}});var ei=s((pS,va)=>{"use strict";var Gp=M(),zp=k();va.exports=Gp&&zp(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var ne=s((hS,ga)=>{"use strict";var Yp=K(),Jp=String,Xp=TypeError;ga.exports=function(t){if(Yp(t))return t;throw new Xp(Jp(t)+" is not an object")}});var be=s(ba=>{"use strict";var Zp=M(),eh=Xr(),th=ei(),Tt=ne(),ma=Yr(),rh=TypeError,ti=Object.defineProperty,ih=Object.getOwnPropertyDescriptor,ri="enumerable",ii="configurable",oi="writable";ba.f=Zp?th?function(e,r,i){if(Tt(e),r=ma(r),Tt(i),typeof e=="function"&&r==="prototype"&&"value"in i&&oi in i&&!i[oi]){var o=ih(e,r);o&&o[oi]&&(e[r]=i.value,i={configurable:ii in i?i[ii]:o[ii],enumerable:ri in i?i[ri]:o[ri],writable:!1})}return ti(e,r,i)}:ti:function(e,r,i){if(Tt(e),r=ma(r),Tt(i),eh)try{return ti(e,r,i)}catch(o){}if("get"in i||"set"in i)throw new rh("Accessors not supported");return"value"in i&&(e[r]=i.value),e}});var qe=s((gS,ya)=>{"use strict";var oh=M(),nh=be(),ah=Je();ya.exports=oh?function(t,e,r){return nh.f(t,e,ah(1,r))}:function(t,e,r){return t[e]=r,t}});var $=s((mS,Sa)=>{"use strict";var it=O(),sh=qr(),uh=Rr(),ch=q(),lh=da().f,dh=Zr(),Ce=ge(),fh=rt(),Re=qe(),Ia=te();et();var ph=function(t){var e=function(r,i,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(r);case 2:return new t(r,i)}return new t(r,i,o)}return sh(t,this,arguments)};return e.prototype=t.prototype,e};Sa.exports=function(t,e){var r=t.target,i=t.global,o=t.stat,n=t.proto,c=i?it:o?it[r]:it[r]&&it[r].prototype,l=i?Ce:Ce[r]||Re(Ce,r,{})[r],f=l.prototype,a,d,p,u,h,v,m,I,_;for(u in e)a=dh(i?u:r+(o?".":"#")+u,t.forced),d=!a&&c&&Ia(c,u),v=l[u],d&&(t.dontCallGetSet?(_=lh(c,u),m=_&&_.value):m=c[u]),h=d&&m?m:e[u],!(!a&&!n&&typeof v==typeof h)&&(t.bind&&d?I=fh(h,it):t.wrap&&d?I=ph(h):n&&ch(h)?I=uh(h):I=h,(t.sham||h&&h.sham||v&&v.sham)&&Re(I,"sham",!0),Re(l,u,I),n&&(p=r+"Prototype",Ia(Ce,p)||Re(Ce,p,{}),Re(Ce[p],u,h),t.real&&f&&(a||!f[u])&&Re(f,u,h)))}});var Pa=s((bS,_a)=>{"use strict";var hh=Math.ceil,vh=Math.floor;_a.exports=Math.trunc||function(e){var r=+e;return(r>0?vh:hh)(r)}});var wt=s((yS,Ea)=>{"use strict";var gh=Pa();Ea.exports=function(t){var e=+t;return e!==e||e===0?0:gh(e)}});var wa=s((IS,Ta)=>{"use strict";var mh=wt(),bh=Math.max,yh=Math.min;Ta.exports=function(t,e){var r=mh(t);return r<0?bh(r+e,0):yh(r,e)}});var ni=s((SS,xa)=>{"use strict";var Ih=wt(),Sh=Math.min;xa.exports=function(t){var e=Ih(t);return e>0?Sh(e,9007199254740991):0}});var ai=s((_S,Aa)=>{"use strict";var _h=ni();Aa.exports=function(t){return _h(t.length)}});var si=s((PS,qa)=>{"use strict";var Ph=ve(),Eh=wa(),Th=ai(),Oa=function(t){return function(e,r,i){var o=Ph(e),n=Th(o);if(n===0)return!t&&-1;var c=Eh(i,n),l;if(t&&r!==r){for(;n>c;)if(l=o[c++],l!==l)return!0}else for(;n>c;c++)if((t||c in o)&&o[c]===r)return t||c||0;return!t&&-1}};qa.exports={includes:Oa(!0),indexOf:Oa(!1)}});var ui=s((ES,Ca)=>{"use strict";Ca.exports=function(){}});var Ra=s(()=>{"use strict";var wh=$(),xh=si().includes,Ah=k(),Oh=ui(),qh=Ah(function(){return!Array(1).includes()});wh({target:"Array",proto:!0,forced:qh},{includes:function(e){return xh(this,e,arguments.length>1?arguments[1]:void 0)}});Oh("includes")});var xt=s((xS,La)=>{"use strict";var Ch=ie();La.exports=Ch});var Na=s((AS,ka)=>{"use strict";Ra();var Rh=xt();ka.exports=Rh("Array","includes")});var Da=s((OS,$a)=>{"use strict";var Lh=Na();$a.exports=Lh});var ye=s((qS,Ma)=>{"use strict";var kh=Da();Ma.exports=kh});var Rt=s((BS,Ga)=>{"use strict";var Dh=V(),Mh=Dh("toStringTag"),Qa={};Qa[Mh]="z";Ga.exports=String(Qa)==="[object z]"});var ot=s((US,za)=>{"use strict";var Vh=Rt(),Fh=q(),Lt=Ye(),Bh=V(),Uh=Bh("toStringTag"),jh=Object,Hh=Lt(function(){return arguments}())==="Arguments",Wh=function(t,e){try{return t[e]}catch(r){}};za.exports=Vh?Lt:function(t){var e,r,i;return t===void 0?"Undefined":t===null?"Null":typeof(r=Wh(e=jh(t),Uh))=="string"?r:Hh?Lt(e):(i=Lt(e))==="Object"&&Fh(e.callee)?"Arguments":i}});var fi=s((jS,Ya)=>{"use strict";var Kh=ot(),Qh=String;Ya.exports=function(t){if(Kh(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Qh(t)}});var Xa=s((HS,Ja)=>{"use strict";var Gh=wt(),zh=fi(),Yh=Ae(),Jh=RangeError;Ja.exports=function(e){var r=zh(Yh(this)),i="",o=Gh(e);if(o<0||o===1/0)throw new Jh("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(r+=r))o&1&&(i+=r);return i}});var is=s((WS,rs)=>{"use strict";var ts=N(),Xh=ni(),Za=fi(),Zh=Xa(),ev=Ae(),tv=ts(Zh),rv=ts("".slice),iv=Math.ceil,es=function(t){return function(e,r,i){var o=Za(ev(e)),n=Xh(r),c=o.length,l=i===void 0?" ":Za(i),f,a;return n<=c||l===""?o:(f=n-c,a=tv(l,iv(f/l.length)),a.length>f&&(a=rv(a,0,f)),t?o+a:a+o)}};rs.exports={start:es(!1),end:es(!0)}});var ns=s((KS,os)=>{"use strict";var ov=me();os.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(ov)});var as=s(()=>{"use strict";var nv=$(),av=is().start,sv=ns();nv({target:"String",proto:!0,forced:sv},{padStart:function(e){return av(this,e,arguments.length>1?arguments[1]:void 0)}})});var us=s((zS,ss)=>{"use strict";as();var uv=xt();ss.exports=uv("String","padStart")});var ls=s((YS,cs)=>{"use strict";var cv=us();cs.exports=cv});var kt=s((JS,ds)=>{"use strict";var lv=ls();ds.exports=lv});var ps=s(()=>{"use strict"});var pi=s((r_,hs)=>{"use strict";var nt=O(),fv=me(),pv=Ye(),Nt=function(t){return fv.slice(0,t.length)===t};hs.exports=function(){return Nt("Bun/")?"BUN":Nt("Cloudflare-Workers")?"CLOUDFLARE":Nt("Deno/")?"DENO":Nt("Node.js/")?"NODE":nt.Bun&&typeof Bun.version=="string"?"BUN":nt.Deno&&typeof Deno.version=="object"?"DENO":pv(nt.process)==="process"?"NODE":nt.window&&nt.document?"BROWSER":"REST"}()});var $t=s((i_,vs)=>{"use strict";var hv=pi();vs.exports=hv==="NODE"});var ke=s((o_,gs)=>{"use strict";var vv=qe();gs.exports=function(t,e,r,i){return i&&i.enumerable?t[e]=r:vv(t,e,r),t}});var bs=s((n_,ms)=>{"use strict";var gv=N(),mv=oe();ms.exports=function(t,e,r){try{return gv(mv(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(i){}}});var Is=s((a_,ys)=>{"use strict";var bv=K();ys.exports=function(t){return bv(t)||t===null}});var _s=s((s_,Ss)=>{"use strict";var yv=Is(),Iv=String,Sv=TypeError;Ss.exports=function(t){if(yv(t))return t;throw new Sv("Can't set "+Iv(t)+" as a prototype")}});var hi=s((u_,Ps)=>{"use strict";var _v=bs(),Pv=K(),Ev=Ae(),Tv=_s();Ps.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},r;try{r=_v(Object.prototype,"__proto__","set"),r(e,[]),t=e instanceof Array}catch(i){}return function(o,n){return Ev(o),Tv(n),Pv(o)&&(t?r(o,n):o.__proto__=n),o}}():void 0)});var Ts=s((c_,Es)=>{"use strict";var wv=Rt(),xv=ot();Es.exports=wv?{}.toString:function(){return"[object "+xv(this)+"]"}});var at=s((l_,xs)=>{"use strict";var Av=Rt(),Ov=be().f,qv=qe(),Cv=te(),Rv=Ts(),Lv=V(),ws=Lv("toStringTag");xs.exports=function(t,e,r,i){var o=r?t:t&&t.prototype;o&&(Cv(o,ws)||Ov(o,ws,{configurable:!0,value:e}),i&&!Av&&qv(o,"toString",Rv))}});var Os=s((d_,As)=>{"use strict";var kv=be();As.exports=function(t,e,r){return kv.f(t,e,r)}});var Rs=s((f_,Cs)=>{"use strict";var Nv=ie(),$v=Os(),Dv=V(),Mv=M(),qs=Dv("species");Cs.exports=function(t){var e=Nv(t);Mv&&e&&!e[qs]&&$v(e,qs,{configurable:!0,get:function(){return this}})}});var ks=s((p_,Ls)=>{"use strict";var Vv=St(),Fv=TypeError;Ls.exports=function(t,e){if(Vv(e,t))return t;throw new Fv("Incorrect invocation")}});var gi=s((h_,Ns)=>{"use strict";var Bv=N(),Uv=q(),vi=et(),jv=Bv(Function.toString);Uv(vi.inspectSource)||(vi.inspectSource=function(t){return jv(t)});Ns.exports=vi.inspectSource});var Bs=s((v_,Fs)=>{"use strict";var Hv=N(),Wv=k(),$s=q(),Kv=ot(),Qv=ie(),Gv=gi(),Ds=function(){},Ms=Qv("Reflect","construct"),mi=/^\s*(?:class|function)\b/,zv=Hv(mi.exec),Yv=!mi.test(Ds),st=function(e){if(!$s(e))return!1;try{return Ms(Ds,[],e),!0}catch(r){return!1}},Vs=function(e){if(!$s(e))return!1;switch(Kv(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Yv||!!zv(mi,Gv(e))}catch(r){return!0}};Vs.sham=!0;Fs.exports=!Ms||Wv(function(){var t;return st(st.call)||!st(Object)||!st(function(){t=!0})||t})?Vs:st});var js=s((g_,Us)=>{"use strict";var Jv=Bs(),Xv=Ze(),Zv=TypeError;Us.exports=function(t){if(Jv(t))return t;throw new Zv(Xv(t)+" is not a constructor")}});var bi=s((m_,Ws)=>{"use strict";var Hs=ne(),eg=js(),tg=Xe(),rg=V(),ig=rg("species");Ws.exports=function(t,e){var r=Hs(t).constructor,i;return r===void 0||tg(i=Hs(r)[ig])?e:eg(i)}});var yi=s((b_,Ks)=>{"use strict";var og=ie();Ks.exports=og("document","documentElement")});var Gs=s((y_,Qs)=>{"use strict";var ng=N();Qs.exports=ng([].slice)});var Ys=s((I_,zs)=>{"use strict";var ag=TypeError;zs.exports=function(t,e){if(t<e)throw new ag("Not enough arguments");return t}});var Ii=s((S_,Js)=>{"use strict";var sg=me();Js.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(sg)});var Oi=s((__,au)=>{"use strict";var F=O(),ug=qr(),cg=rt(),Xs=q(),lg=te(),nu=k(),Zs=yi(),dg=Gs(),eu=Et(),fg=Ys(),pg=Ii(),hg=$t(),wi=F.setImmediate,xi=F.clearImmediate,vg=F.process,Si=F.Dispatch,gg=F.Function,tu=F.MessageChannel,mg=F.String,_i=0,ut={},ru="onreadystatechange",ct,Ie,Pi,Ei;nu(function(){ct=F.location});var Ai=function(t){if(lg(ut,t)){var e=ut[t];delete ut[t],e()}},Ti=function(t){return function(){Ai(t)}},iu=function(t){Ai(t.data)},ou=function(t){F.postMessage(mg(t),ct.protocol+"//"+ct.host)};(!wi||!xi)&&(wi=function(e){fg(arguments.length,1);var r=Xs(e)?e:gg(e),i=dg(arguments,1);return ut[++_i]=function(){ug(r,void 0,i)},Ie(_i),_i},xi=function(e){delete ut[e]},hg?Ie=function(t){vg.nextTick(Ti(t))}:Si&&Si.now?Ie=function(t){Si.now(Ti(t))}:tu&&!pg?(Pi=new tu,Ei=Pi.port2,Pi.port1.onmessage=iu,Ie=cg(Ei.postMessage,Ei)):F.addEventListener&&Xs(F.postMessage)&&!F.importScripts&&ct&&ct.protocol!=="file:"&&!nu(ou)?(Ie=ou,F.addEventListener("message",iu,!1)):ru in eu("script")?Ie=function(t){Zs.appendChild(eu("script"))[ru]=function(){Zs.removeChild(this),Ai(t)}}:Ie=function(t){setTimeout(Ti(t),0)});au.exports={set:wi,clear:xi}});var cu=s((P_,uu)=>{"use strict";var su=O(),bg=M(),yg=Object.getOwnPropertyDescriptor;uu.exports=function(t){if(!bg)return su[t];var e=yg(su,t);return e&&e.value}});var qi=s((E_,du)=>{"use strict";var lu=function(){this.head=null,this.tail=null};lu.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}};du.exports=lu});var pu=s((T_,fu)=>{"use strict";var Ig=me();fu.exports=/ipad|iphone|ipod/i.test(Ig)&&typeof Pebble!="undefined"});var vu=s((w_,hu)=>{"use strict";var Sg=me();hu.exports=/web0s(?!.*chrome)/i.test(Sg)});var _u=s((x_,Su)=>{"use strict";var $e=O(),_g=cu(),gu=rt(),Ci=Oi().set,Pg=qi(),Eg=Ii(),Tg=pu(),wg=vu(),Ri=$t(),mu=$e.MutationObserver||$e.WebKitMutationObserver,bu=$e.document,yu=$e.process,Dt=$e.Promise,Ni=_g("queueMicrotask"),Ne,Li,ki,Mt,Iu;Ni||(lt=new Pg,dt=function(){var t,e;for(Ri&&(t=yu.domain)&&t.exit();e=lt.get();)try{e()}catch(r){throw lt.head&&Ne(),r}t&&t.enter()},!Eg&&!Ri&&!wg&&mu&&bu?(Li=!0,ki=bu.createTextNode(""),new mu(dt).observe(ki,{characterData:!0}),Ne=function(){ki.data=Li=!Li}):!Tg&&Dt&&Dt.resolve?(Mt=Dt.resolve(void 0),Mt.constructor=Dt,Iu=gu(Mt.then,Mt),Ne=function(){Iu(dt)}):Ri?Ne=function(){yu.nextTick(dt)}:(Ci=gu(Ci,$e),Ne=function(){Ci(dt)}),Ni=function(t){lt.head||Ne(),lt.add(t)});var lt,dt;Su.exports=Ni});var Eu=s((A_,Pu)=>{"use strict";Pu.exports=function(t,e){try{arguments.length===1?console.error(t):console.error(t,e)}catch(r){}}});var Vt=s((O_,Tu)=>{"use strict";Tu.exports=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}});var Au=s((q_,xu)=>{"use strict";var xg=O(),Ag=q(),wu=xg.WeakMap;xu.exports=Ag(wu)&&/native code/.test(String(wu))});var Ft=s((C_,qu)=>{"use strict";var Og=Kr(),qg=Gr(),Ou=Og("keys");qu.exports=function(t){return Ou[t]||(Ou[t]=qg(t))}});var Bt=s((R_,Cu)=>{"use strict";Cu.exports={}});var Vi=s((L_,ku)=>{"use strict";var Cg=Au(),Lu=O(),Rg=K(),Lg=qe(),$i=te(),Di=et(),kg=Ft(),Ng=Bt(),Ru="Object already initialized",Mi=Lu.TypeError,$g=Lu.WeakMap,Ut,ft,jt,Dg=function(t){return jt(t)?ft(t):Ut(t,{})},Mg=function(t){return function(e){var r;if(!Rg(e)||(r=ft(e)).type!==t)throw new Mi("Incompatible receiver, "+t+" required");return r}};Cg||Di.state?(G=Di.state||(Di.state=new $g),G.get=G.get,G.has=G.has,G.set=G.set,Ut=function(t,e){if(G.has(t))throw new Mi(Ru);return e.facade=t,G.set(t,e),e},ft=function(t){return G.get(t)||{}},jt=function(t){return G.has(t)}):(Se=kg("state"),Ng[Se]=!0,Ut=function(t,e){if($i(t,Se))throw new Mi(Ru);return e.facade=t,Lg(t,Se,e),e},ft=function(t){return $i(t,Se)?t[Se]:{}},jt=function(t){return $i(t,Se)});var G,Se;ku.exports={set:Ut,get:ft,has:jt,enforce:Dg,getterFor:Mg}});var _e=s((k_,Nu)=>{"use strict";var Vg=O();Nu.exports=Vg.Promise});var De=s((N_,Vu)=>{"use strict";var Fg=O(),pt=_e(),Bg=q(),Ug=Zr(),jg=gi(),Hg=V(),$u=pi(),Wg=ee(),Fi=Vr(),Du=pt&&pt.prototype,Kg=Hg("species"),Bi=!1,Mu=Bg(Fg.PromiseRejectionEvent),Qg=Ug("Promise",function(){var t=jg(pt),e=t!==String(pt);if(!e&&Fi===66||Wg&&!(Du.catch&&Du.finally))return!0;if(!Fi||Fi<51||!/native code/.test(t)){var r=new pt(function(n){n(1)}),i=function(n){n(function(){},function(){})},o=r.constructor={};if(o[Kg]=i,Bi=r.then(function(){})instanceof i,!Bi)return!0}return!e&&($u==="BROWSER"||$u==="DENO")&&!Mu});Vu.exports={CONSTRUCTOR:Qg,REJECTION_EVENT:Mu,SUBCLASSING:Bi}});var Me=s(($_,Bu)=>{"use strict";var Fu=oe(),Gg=TypeError,zg=function(t){var e,r;this.promise=new t(function(i,o){if(e!==void 0||r!==void 0)throw new Gg("Bad Promise constructor");e=i,r=o}),this.resolve=Fu(e),this.reject=Fu(r)};Bu.exports.f=function(t){return new zg(t)}});var sc=s(()=>{"use strict";var Yg=$(),Jg=ee(),Qt=$t(),fe=O(),Xg=ge(),Ue=W(),Uu=ke(),ju=hi(),Zg=at(),em=Rs(),tm=oe(),Kt=q(),rm=K(),im=ks(),om=bi(),Gu=Oi().set,Ki=_u(),nm=Eu(),am=Vt(),sm=qi(),zu=Vi(),Gt=_e(),Qi=De(),Yu=Me(),zt="Promise",Ju=Qi.CONSTRUCTOR,um=Qi.REJECTION_EVENT,cm=Qi.SUBCLASSING,Ui=zu.getterFor(zt),lm=zu.set,Ve=Gt&&Gt.prototype,Pe=Gt,Ht=Ve,Xu=fe.TypeError,ji=fe.document,Gi=fe.process,Hi=Yu.f,dm=Hi,fm=!!(ji&&ji.createEvent&&fe.dispatchEvent),Zu="unhandledrejection",pm="rejectionhandled",Hu=0,ec=1,hm=2,zi=1,tc=2,Wt,Wu,rc,Ku,ic=function(t){var e;return rm(t)&&Kt(e=t.then)?e:!1},oc=function(t,e){var r=e.value,i=e.state===ec,o=i?t.ok:t.fail,n=t.resolve,c=t.reject,l=t.domain,f,a,d;try{o?(i||(e.rejection===tc&&gm(e),e.rejection=zi),o===!0?f=r:(l&&l.enter(),f=o(r),l&&(l.exit(),d=!0)),f===t.promise?c(new Xu("Promise-chain cycle")):(a=ic(f))?Ue(a,f,n,c):n(f)):c(r)}catch(p){l&&!d&&l.exit(),c(p)}},nc=function(t,e){t.notified||(t.notified=!0,Ki(function(){for(var r=t.reactions,i;i=r.get();)oc(i,t);t.notified=!1,e&&!t.rejection&&vm(t)}))},ac=function(t,e,r){var i,o;fm?(i=ji.createEvent("Event"),i.promise=e,i.reason=r,i.initEvent(t,!1,!0),fe.dispatchEvent(i)):i={promise:e,reason:r},!um&&(o=fe["on"+t])?o(i):t===Zu&&nm("Unhandled promise rejection",r)},vm=function(t){Ue(Gu,fe,function(){var e=t.facade,r=t.value,i=Qu(t),o;if(i&&(o=am(function(){Qt?Gi.emit("unhandledRejection",r,e):ac(Zu,e,r)}),t.rejection=Qt||Qu(t)?tc:zi,o.error))throw o.value})},Qu=function(t){return t.rejection!==zi&&!t.parent},gm=function(t){Ue(Gu,fe,function(){var e=t.facade;Qt?Gi.emit("rejectionHandled",e):ac(pm,e,t.value)})},Fe=function(t,e,r){return function(i){t(e,i,r)}},Be=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=hm,nc(t,!0))},Wi=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new Xu("Promise can't be resolved itself");var i=ic(e);i?Ki(function(){var o={done:!1};try{Ue(i,e,Fe(Wi,o,t),Fe(Be,o,t))}catch(n){Be(o,n,t)}}):(t.value=e,t.state=ec,nc(t,!1))}catch(o){Be({done:!1},o,t)}}};if(Ju&&(Pe=function(e){im(this,Ht),tm(e),Ue(Wt,this);var r=Ui(this);try{e(Fe(Wi,r),Fe(Be,r))}catch(i){Be(r,i)}},Ht=Pe.prototype,Wt=function(e){lm(this,{type:zt,done:!1,notified:!1,parent:!1,reactions:new sm,rejection:!1,state:Hu,value:null})},Wt.prototype=Uu(Ht,"then",function(e,r){var i=Ui(this),o=Hi(om(this,Pe));return i.parent=!0,o.ok=Kt(e)?e:!0,o.fail=Kt(r)&&r,o.domain=Qt?Gi.domain:void 0,i.state===Hu?i.reactions.add(o):Ki(function(){oc(o,i)}),o.promise}),Wu=function(){var t=new Wt,e=Ui(t);this.promise=t,this.resolve=Fe(Wi,e),this.reject=Fe(Be,e)},Yu.f=Hi=function(t){return t===Pe||t===rc?new Wu(t):dm(t)},!Jg&&Kt(Gt)&&Ve!==Object.prototype)){Ku=Ve.then,cm||Uu(Ve,"then",function(e,r){var i=this;return new Pe(function(o,n){Ue(Ku,i,o,n)}).then(e,r)},{unsafe:!0});try{delete Ve.constructor}catch(t){}ju&&ju(Ve,Ht)}Yg({global:!0,constructor:!0,wrap:!0,forced:Ju},{Promise:Pe});rc=Xg.Promise;Zg(Pe,zt,!1,!0);em(zt)});var Ee=s((V_,uc)=>{"use strict";uc.exports={}});var lc=s((F_,cc)=>{"use strict";var mm=V(),bm=Ee(),ym=mm("iterator"),Im=Array.prototype;cc.exports=function(t){return t!==void 0&&(bm.Array===t||Im[ym]===t)}});var Yi=s((B_,fc)=>{"use strict";var Sm=ot(),dc=Pt(),_m=Xe(),Pm=Ee(),Em=V(),Tm=Em("iterator");fc.exports=function(t){if(!_m(t))return dc(t,Tm)||dc(t,"@@iterator")||Pm[Sm(t)]}});var hc=s((U_,pc)=>{"use strict";var wm=W(),xm=oe(),Am=ne(),Om=Ze(),qm=Yi(),Cm=TypeError;pc.exports=function(t,e){var r=arguments.length<2?qm(t):e;if(xm(r))return Am(wm(r,t));throw new Cm(Om(t)+" is not iterable")}});var mc=s((j_,gc)=>{"use strict";var Rm=W(),vc=ne(),Lm=Pt();gc.exports=function(t,e,r){var i,o;vc(t);try{if(i=Lm(t,"return"),!i){if(e==="throw")throw r;return r}i=Rm(i,t)}catch(n){o=!0,i=n}if(e==="throw")throw r;if(o)throw i;return vc(i),r}});var Jt=s((H_,Sc)=>{"use strict";var km=rt(),Nm=W(),$m=ne(),Dm=Ze(),Mm=lc(),Vm=ai(),bc=St(),Fm=hc(),Bm=Yi(),yc=mc(),Um=TypeError,Yt=function(t,e){this.stopped=t,this.result=e},Ic=Yt.prototype;Sc.exports=function(t,e,r){var i=r&&r.that,o=!!(r&&r.AS_ENTRIES),n=!!(r&&r.IS_RECORD),c=!!(r&&r.IS_ITERATOR),l=!!(r&&r.INTERRUPTED),f=km(e,i),a,d,p,u,h,v,m,I=function(w){return a&&yc(a,"normal"),new Yt(!0,w)},_=function(w){return o?($m(w),l?f(w[0],w[1],I):f(w[0],w[1])):l?f(w,I):f(w)};if(n)a=t.iterator;else if(c)a=t;else{if(d=Bm(t),!d)throw new Um(Dm(t)+" is not iterable");if(Mm(d)){for(p=0,u=Vm(t);u>p;p++)if(h=_(t[p]),h&&bc(Ic,h))return h;return new Yt(!1)}a=Fm(t,d)}for(v=n?t.next:a.next;!(m=Nm(v,a)).done;){try{h=_(m.value)}catch(w){yc(a,"throw",w)}if(typeof h=="object"&&h&&bc(Ic,h))return h}return new Yt(!1)}});var wc=s((W_,Tc)=>{"use strict";var jm=V(),Pc=jm("iterator"),Ec=!1;try{_c=0,Ji={next:function(){return{done:!!_c++}},return:function(){Ec=!0}},Ji[Pc]=function(){return this},Array.from(Ji,function(){throw 2})}catch(t){}var _c,Ji;Tc.exports=function(t,e){try{if(!e&&!Ec)return!1}catch(o){return!1}var r=!1;try{var i={};i[Pc]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(o){}return r}});var Xi=s((K_,xc)=>{"use strict";var Hm=_e(),Wm=wc(),Km=De().CONSTRUCTOR;xc.exports=Km||!Wm(function(t){Hm.all(t).then(void 0,function(){})})});var Ac=s(()=>{"use strict";var Qm=$(),Gm=W(),zm=oe(),Ym=Me(),Jm=Vt(),Xm=Jt(),Zm=Xi();Qm({target:"Promise",stat:!0,forced:Zm},{all:function(e){var r=this,i=Ym.f(r),o=i.resolve,n=i.reject,c=Jm(function(){var l=zm(r.resolve),f=[],a=0,d=1;Xm(e,function(p){var u=a++,h=!1;d++,Gm(l,r,p).then(function(v){h||(h=!0,f[u]=v,--d||o(f))},n)}),--d||o(f)});return c.error&&n(c.value),i.promise}})});var qc=s(()=>{"use strict";var eb=$(),tb=ee(),rb=De().CONSTRUCTOR,eo=_e(),ib=ie(),ob=q(),nb=ke(),Oc=eo&&eo.prototype;eb({target:"Promise",proto:!0,forced:rb,real:!0},{catch:function(t){return this.then(void 0,t)}});!tb&&ob(eo)&&(Zi=ib("Promise").prototype.catch,Oc.catch!==Zi&&nb(Oc,"catch",Zi,{unsafe:!0}));var Zi});var Cc=s(()=>{"use strict";var ab=$(),sb=W(),ub=oe(),cb=Me(),lb=Vt(),db=Jt(),fb=Xi();ab({target:"Promise",stat:!0,forced:fb},{race:function(e){var r=this,i=cb.f(r),o=i.reject,n=lb(function(){var c=ub(r.resolve);db(e,function(l){sb(c,r,l).then(i.resolve,o)})});return n.error&&o(n.value),i.promise}})});var Rc=s(()=>{"use strict";var pb=$(),hb=Me(),vb=De().CONSTRUCTOR;pb({target:"Promise",stat:!0,forced:vb},{reject:function(e){var r=hb.f(this),i=r.reject;return i(e),r.promise}})});var to=s((tP,Lc)=>{"use strict";var gb=ne(),mb=K(),bb=Me();Lc.exports=function(t,e){if(gb(t),mb(e)&&e.constructor===t)return e;var r=bb.f(t),i=r.resolve;return i(e),r.promise}});var $c=s(()=>{"use strict";var yb=$(),Ib=ie(),kc=ee(),Sb=_e(),Nc=De().CONSTRUCTOR,_b=to(),Pb=Ib("Promise"),Eb=kc&&!Nc;yb({target:"Promise",stat:!0,forced:kc||Nc},{resolve:function(e){return _b(Eb&&this===Pb?Sb:this,e)}})});var Dc=s(()=>{"use strict";sc();Ac();qc();Cc();Rc();$c()});var Bc=s(()=>{"use strict";var Tb=$(),wb=ee(),Xt=_e(),xb=k(),Vc=ie(),Fc=q(),Ab=bi(),Mc=to(),Ob=ke(),io=Xt&&Xt.prototype,qb=!!Xt&&xb(function(){io.finally.call({then:function(){}},function(){})});Tb({target:"Promise",proto:!0,real:!0,forced:qb},{finally:function(t){var e=Ab(this,Vc("Promise")),r=Fc(t);return this.then(r?function(i){return Mc(e,t()).then(function(){return i})}:t,r?function(i){return Mc(e,t()).then(function(){throw i})}:t)}});!wb&&Fc(Xt)&&(ro=Vc("Promise").prototype.finally,io.finally!==ro&&Ob(io,"finally",ro,{unsafe:!0}));var ro});var jc=s((uP,Uc)=>{"use strict";ps();Dc();Bc();var Cb=xt();Uc.exports=Cb("Promise","finally")});var Wc=s((cP,Hc)=>{"use strict";var Rb=jc();Hc.exports=Rb});var oo=s((lP,Kc)=>{"use strict";var Lb=Wc();Kc.exports=Lb});var Gc=s((dP,Qc)=>{"use strict";var kb=k();Qc.exports=!kb(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})});var Zt=s((fP,Yc)=>{"use strict";var Nb=te(),$b=q(),Db=Qr(),Mb=Ft(),Vb=Gc(),zc=Mb("IE_PROTO"),no=Object,Fb=no.prototype;Yc.exports=Vb?no.getPrototypeOf:function(t){var e=Db(t);if(Nb(e,zc))return e[zc];var r=e.constructor;return $b(r)&&e instanceof r?r.prototype:e instanceof no?Fb:null}});var Zc=s((pP,Xc)=>{"use strict";var Bb=N(),ao=te(),Ub=ve(),jb=si().indexOf,Hb=Bt(),Jc=Bb([].push);Xc.exports=function(t,e){var r=Ub(t),i=0,o=[],n;for(n in r)!ao(Hb,n)&&ao(r,n)&&Jc(o,n);for(;e.length>i;)ao(r,n=e[i++])&&(~jb(o,n)||Jc(o,n));return o}});var so=s((hP,el)=>{"use strict";el.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var uo=s((vP,tl)=>{"use strict";var Wb=Zc(),Kb=so();tl.exports=Object.keys||function(e){return Wb(e,Kb)}});var co=s((gP,al)=>{"use strict";var il=M(),Qb=k(),ol=N(),Gb=Zt(),zb=uo(),Yb=ve(),Jb=kr().f,nl=ol(Jb),Xb=ol([].push),Zb=il&&Qb(function(){var t=Object.create(null);return t[2]=2,!nl(t,2)}),rl=function(t){return function(e){for(var r=Yb(e),i=zb(r),o=Zb&&Gb(r)===null,n=i.length,c=0,l=[],f;n>c;)f=i[c++],(!il||(o?f in r:nl(r,f)))&&Xb(l,t?[f,r[f]]:r[f]);return l}};al.exports={entries:rl(!0),values:rl(!1)}});var sl=s(()=>{"use strict";var ey=$(),ty=co().entries;ey({target:"Object",stat:!0},{entries:function(e){return ty(e)}})});var cl=s((yP,ul)=>{"use strict";sl();var ry=ge();ul.exports=ry.Object.entries});var dl=s((IP,ll)=>{"use strict";var iy=cl();ll.exports=iy});var je=s((SP,fl)=>{"use strict";var oy=dl();fl.exports=oy});var vl=s((_P,hl)=>{"use strict";var lo=M(),ny=te(),pl=Function.prototype,ay=lo&&Object.getOwnPropertyDescriptor,fo=ny(pl,"name"),sy=fo&&function(){}.name==="something",uy=fo&&(!lo||lo&&ay(pl,"name").configurable);hl.exports={EXISTS:fo,PROPER:sy,CONFIGURABLE:uy}});var ml=s(gl=>{"use strict";var cy=M(),ly=ei(),dy=be(),fy=ne(),py=ve(),hy=uo();gl.f=cy&&!ly?Object.defineProperties:function(e,r){fy(e);for(var i=py(r),o=hy(r),n=o.length,c=0,l;n>c;)dy.f(e,l=o[c++],i[l]);return e}});var go=s((EP,El)=>{"use strict";var vy=ne(),gy=ml(),bl=so(),my=Bt(),by=yi(),yy=Et(),Iy=Ft(),yl=">",Il="<",ho="prototype",vo="script",_l=Iy("IE_PROTO"),po=function(){},Pl=function(t){return Il+vo+yl+t+Il+"/"+vo+yl},Sl=function(t){t.write(Pl("")),t.close();var e=t.parentWindow.Object;return t=null,e},Sy=function(){var t=yy("iframe"),e="java"+vo+":",r;return t.style.display="none",by.appendChild(t),t.src=String(e),r=t.contentWindow.document,r.open(),r.write(Pl("document.F=Object")),r.close(),r.F},er,tr=function(){try{er=new ActiveXObject("htmlfile")}catch(e){}tr=typeof document!="undefined"?document.domain&&er?Sl(er):Sy():Sl(er);for(var t=bl.length;t--;)delete tr[ho][bl[t]];return tr()};my[_l]=!0;El.exports=Object.create||function(e,r){var i;return e!==null?(po[ho]=vy(e),i=new po,po[ho]=null,i[_l]=e):i=tr(),r===void 0?i:gy.f(i,r)}});var Io=s((TP,xl)=>{"use strict";var _y=k(),Py=q(),Ey=K(),Ty=go(),Tl=Zt(),wy=ke(),xy=V(),Ay=ee(),yo=xy("iterator"),wl=!1,ae,mo,bo;[].keys&&(bo=[].keys(),"next"in bo?(mo=Tl(Tl(bo)),mo!==Object.prototype&&(ae=mo)):wl=!0);var Oy=!Ey(ae)||_y(function(){var t={};return ae[yo].call(t)!==t});Oy?ae={}:Ay&&(ae=Ty(ae));Py(ae[yo])||wy(ae,yo,function(){return this});xl.exports={IteratorPrototype:ae,BUGGY_SAFARI_ITERATORS:wl}});var Ol=s((wP,Al)=>{"use strict";var qy=Io().IteratorPrototype,Cy=go(),Ry=Je(),Ly=at(),ky=Ee(),Ny=function(){return this};Al.exports=function(t,e,r,i){var o=e+" Iterator";return t.prototype=Cy(qy,{next:Ry(+!i,r)}),Ly(t,o,!1,!0),ky[o]=Ny,t}});var Fl=s((xP,Vl)=>{"use strict";var $y=$(),Dy=W(),rr=ee(),Dl=vl(),My=q(),Vy=Ol(),ql=Zt(),Cl=hi(),Fy=at(),By=qe(),So=ke(),Uy=V(),Rl=Ee(),Ml=Io(),jy=Dl.PROPER,Hy=Dl.CONFIGURABLE,Ll=Ml.IteratorPrototype,ir=Ml.BUGGY_SAFARI_ITERATORS,ht=Uy("iterator"),kl="keys",vt="values",Nl="entries",$l=function(){return this};Vl.exports=function(t,e,r,i,o,n,c){Vy(r,e,i);var l=function(_){if(_===o&&u)return u;if(!ir&&_&&_ in d)return d[_];switch(_){case kl:return function(){return new r(this,_)};case vt:return function(){return new r(this,_)};case Nl:return function(){return new r(this,_)}}return function(){return new r(this)}},f=e+" Iterator",a=!1,d=t.prototype,p=d[ht]||d["@@iterator"]||o&&d[o],u=!ir&&p||l(o),h=e==="Array"&&d.entries||p,v,m,I;if(h&&(v=ql(h.call(new t)),v!==Object.prototype&&v.next&&(!rr&&ql(v)!==Ll&&(Cl?Cl(v,Ll):My(v[ht])||So(v,ht,$l)),Fy(v,f,!0,!0),rr&&(Rl[f]=$l))),jy&&o===vt&&p&&p.name!==vt&&(!rr&&Hy?By(d,"name",vt):(a=!0,u=function(){return Dy(p,this)})),o)if(m={values:l(vt),keys:n?u:l(kl),entries:l(Nl)},c)for(I in m)(ir||a||!(I in d))&&So(d,I,m[I]);else $y({target:e,proto:!0,forced:ir||a},m);return(!rr||c)&&d[ht]!==u&&So(d,ht,u,{name:o}),Rl[e]=u,m}});var Ul=s((AP,Bl)=>{"use strict";Bl.exports=function(t,e){return{value:t,done:e}}});var Po=s((OP,Ql)=>{"use strict";var Wy=ve(),_o=ui(),jl=Ee(),Wl=Vi(),Ky=be().f,Qy=Fl(),or=Ul(),Gy=ee(),zy=M(),Kl="Array Iterator",Yy=Wl.set,Jy=Wl.getterFor(Kl);Ql.exports=Qy(Array,"Array",function(t,e){Yy(this,{type:Kl,target:Wy(t),index:0,kind:e})},function(){var t=Jy(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,or(void 0,!0);switch(t.kind){case"keys":return or(r,!1);case"values":return or(e[r],!1)}return or([r,e[r]],!1)},"values");var Hl=jl.Arguments=jl.Array;_o("keys");_o("values");_o("entries");if(!Gy&&zy&&Hl.name!=="values")try{Ky(Hl,"name",{value:"values"})}catch(t){}});var zl=s((qP,Gl)=>{"use strict";var Xy=M(),Zy=be(),eI=Je();Gl.exports=function(t,e,r){Xy?Zy.f(t,e,eI(0,r)):t[e]=r}});var Yl=s(()=>{"use strict";var tI=$(),rI=Jt(),iI=zl();tI({target:"Object",stat:!0},{fromEntries:function(e){var r={};return rI(e,function(i,o){iI(r,i,o)},{AS_ENTRIES:!0}),r}})});var Xl=s((LP,Jl)=>{"use strict";Po();Yl();var oI=ge();Jl.exports=oI.Object.fromEntries});var ed=s((kP,Zl)=>{"use strict";Zl.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 rd=s(()=>{"use strict";Po();var nI=ed(),aI=O(),sI=at(),td=Ee();for(nr in nI)sI(aI[nr],nr),td[nr]=td.Array;var nr});var od=s((DP,id)=>{"use strict";var uI=Xl();rd();id.exports=uI});var ad=s((MP,nd)=>{"use strict";var cI=od();nd.exports=cI});var Ed=s(()=>{"use strict";var pI=$(),hI=co().values;pI({target:"Object",stat:!0},{values:function(e){return hI(e)}})});var wd=s((jT,Td)=>{"use strict";Ed();var vI=ge();Td.exports=vI.Object.values});var Ad=s((HT,xd)=>{"use strict";var gI=wd();xd.exports=gI});var qd=s((WT,Od)=>{"use strict";var mI=Ad();Od.exports=mI});var _I={};Ho(_I,{ApiEnv:()=>Le,ConnectionType:()=>qt,ContentType:()=>Ot,InteractiveInterfaceClick:()=>ci,MediascopePixel:()=>xr,MediascopePixelTypes:()=>Fo,OneStat:()=>pr,Quality:()=>At,SeekAction:()=>Ct,ThinOneStat:()=>Tr,VERSION:()=>B});module.exports=pf(_I);var Co=R(ye(),1);var Nh=(t,e,r)=>{if(typeof t.canParse=="function")return t.canParse(e,r);try{return new t(e,r),!0}catch(i){return!1}},Va=Nh;var Le=(c=>(c.PROD="prod",c.VK_ALIAS="vk_alias",c.VIDEOTEST="videotest",c.TEST="test",c.OKCDN="okcdn",c.AUTO="auto",c))(Le||{}),At=(a=>(a.Q144P="mobile",a.Q240P="lowest",a.Q360P="low",a.Q480P="medium",a.Q720P="high",a.Q1080P="fullhd",a.Q1440P="quadhd",a.Q2160P="ultrahd",a.UNKNOWN="unknown",a))(At||{}),Ot=(v=>(v.MP4="mp4",v.DASH="dash",v.DASH_SEP="dash_sep",v.ONDEMAND_DASH="ondemand_dash",v.HLS="hls",v.HLS_FMP4="hls_fmp4",v.ONDEMAND_HLS="ondemand_hls",v.WEBM="webm",v.AV1="av1",v.ONDEMAND_DASH_LIVE="ondemand_dash_live",v.ONDEMAND_HLS_LIVE="ondemand_hls_live",v.WEBRTC="webrtc",v.UNKNOWN="unknown",v.RTMP="rtmp",v))(Ot||{});var qt=(i=>(i.HTTP1="http1",i.HTTP2="http2",i.HTTP3="http3",i))(qt||{});var Ct=(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))(Ct||{}),ci=(n=>(n.GRAPH_SHOW="iGraphShow",n.GRAPH_HIDE="iGraphHide",n.NEXT_AREA="iNextChapterArea",n.NEXT_BUTTON="iNextChapterBtn",n.WATCH_AGAIN="iWatchAgainBtn",n))(ci||{}),Fa={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"},Ba={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"},Ua={unknown:"un",mobile:"m",lowest:"ls",low:"l",medium:"md",high:"h",fullhd:"f",quadhd:"q",ultrahd:"u"},ja={pip:"pi",fullscreen:"fs",external:"ex",prefetch:"pr",airplay:"ap",chromecast:"cc",invisible:"iv",minimal:"minimal"};var Wa=require("@vkontakte/videoplayer-shared/es2015");var Ha="CIOPGQJGDIHBABABA",li={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 $h={apiEnv:"vk_alias",apiKey:Ha,apiBaseUrl:null,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,useVKComIsMobileLogic:!1,backoff:{start:1e3,factor:1.5,max:5*60*1e3,random:.1},useKeepalive:!1,watchCoverageTimeoutFix:!1},Ka=t=>(0,Wa.fillWithDefault)(t,$h);function di(){let t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),e=new Array(36),r=0,i,o;for(o=0;o<36;o++)o===8||o===13||o===18||o===23?e[o]="-":o===14?e[o]="4":(r<=2&&(r=33554432+Math.random()*16777216|0),i=r&15,r=r>>4,e[o]=t[o===19?i&3|8:i]);return e.join("")}var g=require("@vkontakte/videoplayer-shared/es2015"),hr=require("@vkontakte/videoplayer-shared/es2015");var fs=R(kt(),1);var dv=()=>(0,fs.default)(Math.floor(Math.random()*xe(2,32)).toString(36),13,"0"),de=class t{static getVSID(){return t.vsid}static generateVSID(){return t.vsid=dv(),t.vsid}};var ar=R(oo(),1);var sd=R(je(),1),ud=R(ad(),1);var cd=t=>{var o;let{operation:e,custom:r}=t,i=(0,ud.default)((0,sd.default)(r).map(([n,c])=>{var a,d,p;let l=(a=Ba[n])!=null?a:n,f=c;return c&&(n==="mode"?f=(d=ja[c])!=null?d:c:n==="quality"&&(f=(p=Ua[c])!=null?p:c)),[l,f]}));return le(x({},t),{operation:(o=Fa[e])!=null?o:e,custom:i})};var B="1.0.96-dev.93671684.0";var z=require("@vkontakte/videoplayer-shared/es2015");var lI=/Mobile|mini|Fennec|Android|iP(ad|od|hone)|opera (mini|mobi)/i,gt=class{constructor(e){this.consequentAuthErrors=0;this.authorized$=new z.ValueSubject(!1);this.params=e}authorize(e){return A(this,null,function*(){return this.authToken=e!=null?e:yield this.refreshAuthToken(),this._authorizeWithBackoff()})}logBeacon(e){let r="log.externalLog",i=this.createLogParams(e),o=this.sessionKey;if(!o)return;this.params.apiTransport.sendBeacon(r,i,o)||this.logRequest(e).catch(()=>{})}logRequest(e){return A(this,null,function*(){var c;let r="log.externalLog",i=this.createLogParams(e),o=(c=this.sessionKey)!=null?c:yield this._authorizeWithBackoff();if(!o)return;let n=(a,...d)=>A(this,[a,...d],function*(l,f=this.params.config.requestRetryCount){try{return yield this.params.apiTransport.sendRequest(r,i,o)}catch(p){if(!p||!("error_code"in p)){this.params.error$.next({id:"logRequestUnknown",category:z.ErrorCategory.NETWORK,message:`Unknown ${r} error`,thrown:p});return}let u=p==null?void 0:p.error_code;switch(u){case 102:case 103:case 104:return this.authorized$.next(!1),this.sessionKey=yield this._authorizeWithBackoff(),f>0?n(l,f-1):void 0;case 401:return this.authorized$.next(!1),this.authToken=yield this.refreshAuthToken(),this.sessionKey=yield this._authorizeWithBackoff(),f>0?n(l,f-1):void 0;default:{this.params.error$.next({id:`LogRequest#${u}`,category:z.ErrorCategory.EXTERNAL_API,message:`${r} error`,data:p});return}}}});return n(e)})}destroy(){window.clearTimeout(this.backoffTimeoutId),this.backoffTimeoutId=0}refreshAuthToken(){return A(this,null,function*(){if(this.params.refreshAuthToken)return this.refreshAuthTokenPromise||(this.refreshAuthTokenPromise=(0,ar.default)(this.params.refreshAuthToken(),()=>{this.refreshAuthTokenPromise=void 0})),this.refreshAuthTokenPromise})}createLogParams(e){let r="WEB",i=!1,o=`@vkontakte/videoplayer-statistics:${B}`;if(this.params.config.useVKComIsMobileLogic){let{appVersion:n}=window.navigator;i=lI.test(n)}else this.params.mobile&&(i=!0);return i&&(r="M_WEB"),this.params.vktvVersion&&(r="SMART_TV",o=this.params.vktvVersion),{collector:"ok.mobile.apps.video",data:JSON.stringify({application:o,platform:r,items:this.params.config.shorten?e.map(cd):e})}}_authorizeWithBackoff(){if(!this.consequentAuthErrors)return this._authorize();let e=(0,z.getExponentialDelay)(this.consequentAuthErrors,this.params.config.backoff);return new Promise(r=>{this.backoffTimeoutId||(this.backoffTimeoutId=window.setTimeout(()=>{(0,ar.default)(this._authorize().then(r).catch(i=>this.params.error$.next({id:"AuthorizeBackoff",category:z.ErrorCategory.NETWORK,message:"Otherwise unhandled error in authorization",thrown:i})),()=>this.backoffTimeoutId=0)},e))})}_authorize(){return A(this,null,function*(){if(this.authorizePromise)return this.authorizePromise;this.sessionKey=void 0,this.authorized$.next(!1);let e="auth.anonymLogin",r={session_data:{version:2,device_id:this.params.deviceId,client_version:B.split("-")[0],client_type:"SDK_JS"}};return this.authToken!==void 0&&(r.session_data.auth_token=this.authToken,r.session_data.version=3),this.authorizePromise=(0,ar.default)(this.params.apiTransport.sendRequest(e,r).then(i=>{var o;return(!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=>A(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})})),()=>{this.authorizePromise=void 0,this.consequentAuthErrors=this.sessionKey?0:this.consequentAuthErrors+1,this.authorized$.next(this.sessionKey!==void 0)}),this.authorizePromise})}};var{NativeAbortSignal:XP,NativeAbortController:ZP}=function(t){return{NativeAbortSignal:t.AbortSignal,NativeAbortController:t.AbortController}}(typeof self!="undefined"?self:global);function ld(t){let e;try{e=new Event("abort")}catch(r){typeof document!="undefined"?document.createEvent?(e=document.createEvent("Event"),e.initEvent("abort",!1,!1)):(e=document.createEventObject(),e.type="abort"):e={type:"abort",bubbles:!1,cancelable:!1}}return e.reason=t,e}function dd(t){if(t===void 0)if(typeof document=="undefined")t=new Error("This operation was aborted"),t.name="AbortError";else try{t=new DOMException("signal is aborted without reason"),Object.defineProperty(t,"name",{value:"AbortError"})}catch(e){t=new Error("This operation was aborted"),t.name="AbortError"}return t}var sr=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(e,r,i){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:r,options:i})}removeEventListener(e,r){if(!(e in this.listeners))return;let i=this.listeners[e];for(let o=0,n=i.length;o<n;o++)if(i[o].callback===r){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,n=i.length;o<n;o++){let c=i[o];try{c.callback.call(this,e)}catch(l){Promise.resolve().then(()=>{throw l})}c.options&&c.options.once&&this.removeEventListener(e.type,c.callback)}return!e.defaultPrevented}},He=class extends sr{constructor(){super(),this.listeners||sr.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)}throwIfAborted(){let{aborted:e,reason:r="Aborted"}=this;if(e)throw r}static timeout(e){let r=new Te;return setTimeout(()=>r.abort(new DOMException(`This signal is timeout in ${e}ms`,"TimeoutError")),e),r.signal}static any(e){let r=new Te;function i(){r.abort(this.reason),o()}function o(){for(let n of e)n.removeEventListener("abort",i)}for(let n of e)if(n.aborted){r.abort(n.reason);break}else n.addEventListener("abort",i);return r.signal}},Te=class{constructor(){Object.defineProperty(this,"signal",{value:new He,writable:!0,configurable:!0})}abort(e){let r=dd(e),i=ld(r);this.signal.reason=r,this.signal.dispatchEvent(i)}toString(){return"[object AbortController]"}};typeof Symbol!="undefined"&&Symbol.toStringTag&&(Te.prototype[Symbol.toStringTag]="AbortController",He.prototype[Symbol.toStringTag]="AbortSignal");function ur(t){return t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof t.Request=="function"&&!t.Request.prototype.hasOwnProperty("signal")||!t.AbortController}function Eo(t){typeof t=="function"&&(t={fetch:t});let{fetch:e,Request:r=e.Request,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o=!1}=t;if(!ur({fetch:e,Request:r,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o}))return{fetch:e,Request:n};let n=r;(n&&!n.prototype.hasOwnProperty("signal")||o)&&(n=function(a,d){let p;d&&d.signal&&(p=d.signal,delete d.signal);let u=new r(a,d);return p&&Object.defineProperty(u,"signal",{writable:!1,enumerable:!1,configurable:!0,value:p}),u},n.prototype=r.prototype);let c=e;return{fetch:(f,a)=>{let d=n&&n.prototype.isPrototypeOf(f)?f.signal:a?a.signal:void 0;if(d){let p;try{p=new DOMException("Aborted","AbortError")}catch(h){p=new Error("Aborted"),p.name="AbortError"}if(d.aborted)return Promise.reject(p);let u=new Promise((h,v)=>{d.addEventListener("abort",()=>v(p),{once:!0})});return a&&a.signal&&delete a.signal,Promise.race([u,c(f,a)])}return c(f,a)},Request:n}}var C=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window;var dI=()=>"fetch"in C,mt=dI()&&ur({fetch:C.fetch,Request:C.Request,AbortController:C.AbortController}),fd=mt?Eo({fetch:C.fetch,Request:C.Request,AbortController:C.AbortController}):void 0,We=mt?fd.fetch:C.fetch,dE=mt?fd.Request:C.Request,fE=mt?Te:C.AbortController,pE=mt?He:C.AbortSignal;var pd=R(ye(),1),hd=R(je(),1),se=require("@vkontakte/videoplayer-shared/es2015");var bt=class{constructor(e){var r;this.params=e,this.apiKey=e.config.apiKey,this.apiEnv=e.config.apiEnv,this.apiBaseUrl=(r=e.config.apiBaseUrl)!=null?r:li[this.apiEnv],this.timeSynchronisation=e.timeSynchronisation,this.isApiBaseUrlFetched=!1}resolveApiBaseUrl(){return A(this,null,function*(){var e;if(this.apiEnv!=="auto"||this.isApiBaseUrlFetched)return this.apiBaseUrl;try{let r=atob("aHR0cHM6Ly9kbnMuZ29vZ2xlL3Jlc29sdmU/bmFtZT12aWRlby5fZW5kcG9pbnQub2sucnUmdHlwZT1UWFQ="),o=yield(yield We(r,{method:"GET",mode:"cors",cache:"no-cache"})).json(),n=(e=o==null?void 0:o.Answer[0])==null?void 0:e.data;if(!n)throw new Error("Wrong DNS response");return n}catch(r){return this.params.error$.next({id:"OneStat:ApiTransport:resolveApiBaseUrl",category:se.ErrorCategory.NETWORK,message:"Unhandled resolve api base url error",thrown:r}),li.vk_alias}finally{this.isApiBaseUrlFetched=!0}})}sendBeacon(e,r,i){if(!window.Blob||!window.navigator.sendBeacon)return!1;let o=this._prepareQueryParams({method:e,queryParams:r,sessionKey:i}),n=new window.Blob([o.toString()],{type:"application/x-www-form-urlencoded"});try{return window.navigator.sendBeacon(`${this.apiBaseUrl}/fb.do`,n)}catch(c){this.params.error$.next({id:"OneStat:ApiTransport:sendBeacon",category:se.ErrorCategory.NETWORK,message:"Unhandled beacon error",thrown:c,data:{method:e,params:r}})}return!1}sendRequest(e,r,i){return A(this,null,function*(){let o=(0,se.now)(),n=l=>{if(l instanceof TypeError&&(0,pd.default)(["Failed to fetch","NetworkError when attempting to fetch resource."],l.message)){this.params.error$.next({id:"Network",category:se.ErrorCategory.NETWORK,message:"Request failed",thrown:l});return}this.params.error$.next({id:"OneStat:ApiTransport:sendRequest",category:se.ErrorCategory.NETWORK,message:"Unhandled request error",thrown:l,data:{method:e,params:r,sessionKey:i,time:(0,se.now)()-o}})};this.apiBaseUrl=yield this.resolveApiBaseUrl();let c={method:"post",headers:{"Content-type":"application/x-www-form-urlencoded"},body:this._prepareQueryParams({method:e,queryParams:r,sessionKey:i})};return this.params.config.useKeepalive&&(c.keepalive=!0),We(`${this.apiBaseUrl}/fb.do`,c).then(l=>{var p,u;let f=Number(l.headers.get("content-length"))===0,a=new Date((p=l.headers.get("date"))!=null?p:"").getTime(),d=(0,se.now)()-o;if(isFinite(a)&&((u=this.timeSynchronisation)==null||u.addServerTime(a,d)),!f)return l.json().then(h=>Object.prototype.hasOwnProperty.call(h,"error_msg")?Promise.reject(h):h,n)},n)})}_prepareQueryParams(e){let r=new URLSearchParams({format:"JSON",method:e.method,application_key:this.apiKey});return e.sessionKey!==void 0&&r.append("session_key",e.sessionKey),(0,hd.default)(e.queryParams).forEach(([i,o])=>r.append(i,typeof o=="string"?o:JSON.stringify(o))),r}};var vd=R(ye(),1),gd=R(je(),1),U=require("@vkontakte/videoplayer-shared/es2015");var cr="onestat_events",To=t=>e=>e.timestamp+t>=(0,U.now)(),lr=class{constructor(e){this.unsaltedStorage=[];this.isPaused=!1;this.isUrgent=e=>{let{operation:r}=e;return(0,vd.default)(["action_play","watch_coverage_record","watch_coverage_live"],r)};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 r=U.safeStorage.isPersistent()?this.params.config.flushMaxWait:0;this.debouncedFlush=(0,U.debounceFn)(()=>this.safeFlush(),this.params.config.flushDebounceTime,{maxWait:r}),this.subscription=this.api.authorized$.subscribe(i=>{i&&this.debouncedFlush()}),this.housekeepStorage()}safeFlush(){try{this.flush()}catch(e){this.error$.next({id:"LoggerError",category:U.ErrorCategory.WTF,message:e?String(e):"Unknown logger error",thrown:e})}}readFromStorage(){let e=U.safeStorage.get(cr);try{return e?JSON.parse(e):{}}catch(r){}return{}}addToStorage(e){var n;if(!this.userSalt){this.unsaltedStorage.push(e);return}let r=this.readFromStorage(),o=((n=r[this.userSalt])!=null?n:[]).filter(To(this.params.config.storageExpiration));U.safeStorage.set(cr,JSON.stringify(le(x({},r),{[this.userSalt]:[...o,e]})))}getFromStorage(){var i;return this.userSalt?((i=this.readFromStorage()[this.userSalt])!=null?i:[]).filter(To(this.params.config.storageExpiration)):this.unsaltedStorage}markStorageSent(){if(!this.userSalt){this.unsaltedStorage=[];return}let e=this.readFromStorage();delete e[this.userSalt],U.safeStorage.set(cr,JSON.stringify(e))}housekeepStorage(){let e=this.readFromStorage();for(let[r,i]of(0,gd.default)(e)){let o=i.filter(To(this.params.config.storageExpiration));o.length?e[r]=o:delete e[r],this.loggerDebugLog({message:`${i.length} retrieved from storage, ${o.length} of them actual`})}U.safeStorage.set(cr,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:r}={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)),r&&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 y=require("@vkontakte/videoplayer-core/es2015"),wo=require("@vkontakte/videoplayer-shared/es2015");var md=t=>t&&{[y.VideoQuality.INVARIANT]:"unknown",[y.VideoQuality.Q_144P]:"mobile",[y.VideoQuality.Q_240P]:"lowest",[y.VideoQuality.Q_360P]:"low",[y.VideoQuality.Q_480P]:"medium",[y.VideoQuality.Q_576P]:"unknown",[y.VideoQuality.Q_720P]:"high",[y.VideoQuality.Q_1080P]:"fullhd",[y.VideoQuality.Q_1440P]:"quadhd",[y.VideoQuality.Q_2160P]:"ultrahd",[y.VideoQuality.Q_4320P]:"unknown"}[t],xo=t=>t&&{[y.HttpConnectionType.HTTP1]:"http1",[y.HttpConnectionType.HTTP2]:"http2",[y.HttpConnectionType.QUIC]:"http3"}[t],bd=t=>{if(t!==void 0)switch(t){case y.VideoFormat.MPEG:return"mp4";case y.VideoFormat.DASH:case y.VideoFormat.DASH_LIVE:case y.VideoFormat.DASH_STREAMS:return"dash";case y.VideoFormat.DASH_SEP:return"dash_sep";case y.VideoFormat.DASH_ONDEMAND:return"ondemand_dash";case y.VideoFormat.DASH_WEBM:case y.VideoFormat.DASH_LIVE_WEBM:return"webm";case y.VideoFormat.DASH_WEBM_AV1:return"av1";case y.VideoFormat.DASH_LIVE_CMAF:return"ondemand_dash_live";case y.VideoFormat.HLS:case y.VideoFormat.HLS_LIVE:return"hls";case y.VideoFormat.HLS_FMP4:return"hls_fmp4";case y.VideoFormat.HLS_ONDEMAND:return"ondemand_hls";case y.VideoFormat.HLS_LIVE_CMAF:return"ondemand_hls_live";case y.VideoFormat.WEB_RTC_LIVE:return"webrtc";default:return(0,wo.assertNever)(t)}},Ao=(t,e)=>{if(e)return"minimal";switch(t){case void 0:case y.Surface.NONE:case y.Surface.INLINE:return;case y.Surface.FULLSCREEN:return"fullscreen";case y.Surface.SECOND_SCREEN:return"chromecast";case y.Surface.PIP:return"pip";case y.Surface.INVISIBLE:return"invisible";default:return(0,wo.assertNever)(t)}},yd=t=>{switch(t){case"slow-2g":return"poor";case"2g":return"poor";case"3g":return"good";case"4g":return"excellent"}};var dr=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 r;return e.setTime(e.getTime()+((r=this.offset)!=null?r:0)),e}addServerTime(e,r){let i=Date.now(),o=e-i-r/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 Id=R(kt(),1);var Sd=()=>(0,Id.default)(Math.floor(Math.random()*xe(2,64)).toString(36),13,"0");var Oo=require("@vkontakte/videoplayer-core/es2015"),T=require("@vkontakte/videoplayer-shared/es2015"),_d=(t,e)=>new T.Observable(r=>{let i=new T.Subscription,o=(0,T.merge)((0,T.fromEvent)(window,"beforeunload"),t.events.willDestruct$),n=new T.ValueSubject(void 0),c;i.add(t.info.isLive$.pipe((0,T.filterChanged)()).subscribe(P=>{c&&(c.unsubscribe(),n.next(void 0)),P?c=t.info.liveTime$.pipe((0,T.map)(L=>L&&L/1e3)).subscribe(n):c=t.info.position$.subscribe(n),i.add(c)}));let{playing$:l,paused$:f}=t.events,a=t.events.willSeek$.pipe((0,T.filter)(()=>t.info.playbackState$.getValue()===Oo.PlaybackState.PLAYING)),d=t.events.seeked$.pipe((0,T.filter)(()=>t.info.playbackState$.getValue()===Oo.PlaybackState.PLAYING)),p=!1,u=new T.Subject;i.add(a.subscribe(()=>{p||u.next(),p=!0})),i.add(d.subscribe(()=>p=!1));let h=new T.Subject,v=new T.Subject,m=(0,T.merge)(l,d,h),I=(0,T.merge)(f,u,o,t.events.looped$,v),_,w=()=>_=n.getValue(),H=()=>{let P=n.getValue();(0,T.isNullable)(_)||_===P||(0,T.isNullable)(P)||(r.next({from:_,to:P}),_=void 0)},D=()=>{v.next(),h.next()};if(i.add(m.subscribe(w)),i.add(I.subscribe(H)),e.forceInterval&&isFinite(e.forceInterval))if(e.watchCoverageTimeoutFix){let P,L=()=>{P!==void 0&&(window.clearTimeout(P),P=void 0)};i.add(m.subscribe(()=>{L(),P=window.setTimeout(D,e.forceInterval)})),i.add(I.subscribe(()=>L())),i.add(()=>L())}else{let P=0;i.add(m.subscribe(()=>P=window.setTimeout(D,e.forceInterval))),i.add(I.subscribe(()=>window.clearTimeout(P)))}return i});var Y=require("@vkontakte/videoplayer-core/es2015"),Ke=require("@vkontakte/videoplayer-shared/es2015"),fr=(t,e,r)=>{let i=new Ke.Subject,o=i.pipe((0,Ke.debounce)(0),(0,Ke.filterChanged)()),n=!1,c=!1,l=!1;return e(t.inPiP$,f=>{n=f,i.next(f?Y.Surface.PIP:c?Y.Surface.FULLSCREEN:l?Y.Surface.INLINE:void 0)}),e(t.inFullscreen$,f=>{c=f,i.next(f?Y.Surface.FULLSCREEN:n?Y.Surface.PIP:l?Y.Surface.INLINE:void 0)}),r&&e(r.info.surface$,f=>{switch(f){case Y.Surface.SECOND_SCREEN:case Y.Surface.NONE:case Y.Surface.INLINE:{!c&&!n&&(f===Y.Surface.INLINE&&(l=!0),i.next(f));break}}}),{surface$:o}};var fI="_one-stat_",Pd=`${fI}deviceId`,qo=()=>{let t=new g.Subscription;return{subscription:t,subscribe:(e,r)=>{e&&t.add(e.subscribe(r))}}},pr=class{constructor(e,r){this.subscription=new g.Subscription;this.debugLogger=new hr.Logger;this.oneStatDebugLog=this.debugLogger.createComponentLog("onestat");this.loopCounter=0;this.disabled=!1;this.isid$=new g.ValueSubject(void 0);this.zenUid$=new g.ValueSubject(void 0);this.seekAction$=new g.ValueSubject("unknown");var f,a,d;this.statContext=e,this.config=Ka((f=r.config)!=null?f:{}),(0,g.isNonNullable)(r.apiEnv)&&(this.config.apiEnv=r.apiEnv),this.config.synchronizeTime&&(this.timeSynchronisation=new dr);let i=new g.Subject;this.experimental={error$:i};let o=g.safeStorage.get(Pd);this.statContext.deviceId?this.deviceId=this.statContext.deviceId:o?this.deviceId=o:(this.deviceId=di(),g.safeStorage.set(Pd,this.deviceId)),this.resetViewSession(),r.useIsid&&this.isid$.next((a=r.isid)!=null?a:Sd()),this.zenUid$.next(r.zenUid);let n=new bt({config:this.config,error$:i,timeSynchronisation:this.timeSynchronisation});this.api=new gt({config:this.config,apiTransport:n,refreshAuthToken:r.refreshAuthToken,mobile:(d=this.statContext.mobile)!=null?d:!1,deviceId:this.deviceId,error$:i,vktvVersion:r.vktvVersion}),this.logger=new lr({config:this.config,debugLogger:this.debugLogger,api:this.api,error$:i,userSalt:r.userSalt});let{isEmbed:c,topOrigin:l}=(0,hr.detectEmbed)();this.isEmbed=c,this.embedParent=l?new URL(l).hostname:void 0,this.subscribe()}get vsid$(){return new g.ValueSubject(de.getVSID())}updateContext(e){this.statContext=x(x({},this.statContext),e)}attachTo(e){let r=new g.Subscription,i=(u,h)=>r.add(u.subscribe(h));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(_d(e,{forceInterval:this.config.watchCoverageInterval,watchCoverageTimeoutFix:this.config.watchCoverageTimeoutFix}),u=>{var I,_,w,H;let h=e.info.isLive$.getValue(),v=e.info.atLiveEdge$.getValue(),m={start:parseFloat(u.from.toFixed(3)),end:parseFloat(u.to.toFixed(3))};if(v){let D=(I=e.info.liveLatency$.getValue())!=null?I:0,P=(w=(_=e.info.currentBuffer$.getValue())==null?void 0:_.end)!=null?w:0,L=(H=e.info.liveBufferTime$.getValue())!=null?H:0,ce=Math.round((D-(P-L))*1e3),he=Math.round(D*1e3);ce&&he&&(m.latency=ce,m.bufferLatency=he)}h?this.logWatchCoverageLive(m):this.logWatchCoverageRecord(m)});let o;i(e.info.isStalled$,u=>{u?o=(0,g.now)():((0,g.isNonNullable)(o)&&this.logEmptyBuffer({duration:(0,g.now)()-o}),o=void 0)});let n=!1;r.add(e.events.fatalError$.pipe((0,g.once)()).subscribe(()=>n=!0)),i(e.events.willStop$,()=>{if(e.info.isStalled$.getValue()){let h=(0,g.isNonNullable)(o)?(0,g.now)()-o:void 0;this.logCloseAtEmptyBuffer({duration:h!=null?h:0}),o=void 0}else n||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 c,l,f=!1;i(e.events.firstBytes$,u=>{c=(0,g.now)(),this.logFirstBytes({time:u})}),i(e.events.willStart$,()=>l=(0,g.now)()),i(e.info.currentBuffer$,u=>{!f&&u&&u.end-u.start>0&&(0,g.isNonNullable)(c)&&(this.logPlayerReady({duration:(0,g.now)()-c}),f=!0)}),i(e.events.firstFrame$,()=>{(0,g.isNonNullable)(c)&&!f&&(this.logPlayerReady({duration:(0,g.now)()-c}),f=!0),(0,g.isNonNullable)(l)&&this.logFirstFrame({time:(0,g.now)()-l})});let a;i(e.info.currentVideoStream$,u=>{u&&(a&&u.id!==a&&this.logTrackSwitch(u),a=u.id)});let d;i(e.info.currentAudioStream$,u=>{u&&(d&&u.id!==d&&this.logTrackSwitch(u),d=u.id)}),i(e.info.atLiveEdge$,u=>this.updateContext({liveEdge:u})),i((0,g.combine)({muted:e.info.muted$,volume:e.info.volume$}),({muted:u,volume:h})=>this.updateContext({audible:!u&&h>0})),i(e.info.currentQuality$,u=>{let h=md(u);this.updateContext({quality:h}),h&&this.logQuality(h)}),i(e.info.isAutoQualityEnabled$,u=>this.updateContext({autoQuality:u})),i(e.info.currentFormat$,u=>this.updateContext({contentType:bd(u)})),i(e.info.currentPlaybackRate$,u=>this.updateContext({rate:u})),i(e.info.is3DVideo$,u=>this.updateContext({is3d:u}));let p;return i(e.info.hostname$,u=>{let h=p!==void 0&&p!==u;this.updateContext({cdnHostname:u,failover:h}),h&&this.logFailover(u),p=u}),i(e.info.throughputEstimation$,u=>this.updateContext({downloadSpeed:u})),i(e.info.httpConnectionType$,u=>{this.statContext.firstConnectionType||this.updateContext({firstConnectionType:xo(u)}),this.updateContext({connectionType:xo(u)})}),i(e.info.httpConnectionReused$,u=>{(0,g.isNullable)(this.statContext.firstConnectionReused)&&this.updateContext({firstConnectionReused:u}),this.updateContext({connectionReused:u})}),i(e.info.surface$,u=>{this.uiEvents||this.updateContext({mode:Ao(u,this.statContext.isPreviewPlayerView)})}),i((0,g.combine)({current:e.info.currentTextTrack$,available:e.info.availableTextTracks$}),({current:u,available:h})=>{let v=h.find(({id:I})=>I===u),m=v&&(v.isAuto?`${v.language}_auto`:v.language);this.updateContext({subtitles:m==null?void 0:m.split(".")[0]})}),this.player=e,this.uiEvents&&this.attachToUi(this.uiEvents),this.resubscribeBeforeunload(),this.subscription.add(r),r}attachToUi(e){this.uiEvents=e;let{subscription:r,subscribe:i}=qo();if(!this.player)return r;i(e.actionRewind$,()=>{this.player&&(this.resetViewSession(),this.logActionPlay({position:this.player.info.position$.getValue()}))}),i(e.actionSeek$,this.seekAction$);let{surface$:o}=fr(this.uiEvents,i,this.player);return i(o,n=>{this.updateContext({mode:Ao(n,this.statContext.isPreviewPlayerView)})}),i(e.actionSetSubtitle$,n=>this.updateContext({subtitles:n==null?void 0:n.split(".")[0]})),i(e.nextMovie$,n=>this.logNextMovie(n)),this.resubscribeBeforeunload(),this.subscription.add(r),r}attachToAds(e){let{subscription:r,subscribe:i}=qo();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(r),r}attachToInteractive(e){let{subscription:r,subscribe:i}=qo();return i(e.click$,o=>this.logInterfaceClick(o)),i(e.nextMovie$,o=>this.logNextMovie(o)),this.resubscribeBeforeunload(),this.subscription.add(r),r}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"}),de.generateVSID()}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 n,c;let r=(c=(n=this.timeSynchronisation)==null?void 0:n.getOffset())!=null?c:0,i=e.start+r,o=e.end+r;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,g.merge)((0,g.fromEvent)(e,"change"),(0,g.observableFrom)(["init"])).subscribe(()=>this.updateContext({network:yd(e.effectiveType)}))),this.config.debugLog&&this.debugLogger.log$.subscribe(r=>{console.debug("%c stat ","background:#fa6470;",`component: ${r.component}.`,r.message)})}resubscribeBeforeunload(){var e;(e=this.beforeunloadSubscription)==null||e.unsubscribe(),this.beforeunloadSubscription=(0,g.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,r={}){if(this.disabled){this.oneStatDebugLog({message:`operation ${e.operation} but statistics is disabled`});return}if((0,Co.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,r);this.logger.log(i)}createLogItem({operation:e,param:r,time:i},o={}){var h,v;let n=(v=(h=this.timeSynchronisation)==null?void 0:h.now())!=null?v:(0,g.now)(),c=this.vsid$.getValue();(0,g.assertNonNullable)(c);let l=this.isid$.getValue(),f=e==="empty_buffer"||e==="close_at_empty_buffer"?this.statContext.connectionType:this.statContext.firstConnectionType,a=this.statContext.firstConnectionReused,d,p;if(this.isEmbed||this.statContext.place==="embed"){d=this.embedParent;let m=[...new URLSearchParams(location.search).entries()].filter(([I,_])=>(0,Co.default)(this.config.embedUrlParams,I));p=new URLSearchParams(m).toString()}else if(this.statContext.place==="direct"){let m=this.statContext.refDomain||document.referrer;m&&Va(URL,m)?d=new URL(m).hostname:d=m,p=location.href.substring(0,1024)}let u=x({vsid:c,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:r,vk_app_id:this.statContext.vkAppId,track_code:this.statContext.trackCode,connection_type:f,connection_reused:a===!0?1:a===!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:d,direct_url:p,rate:this.statContext.rate===1||(0,g.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 m of this.config.disabledCustomFields)delete u[m];return{operation:e,type:1,time:i,network:this.statContext.network,timestamp:n,custom:u}}};var Tr={};Ho(Tr,{ActionSeekType:()=>vr,ThinOneStat:()=>Er,VERSION:()=>B});var zd=R(qd(),1),Yd=R(ye(),1),S=require("@vkontakte/videoplayer-shared/es2015"),Z=require("@vkontakte/videoplayer-core/es2015");var Ld=require("@vkontakte/videoplayer-shared/es2015");var Ro=(i=>(i.AUTO="auto",i.AUTO_POOR="auto_poor",i.AUTO_RICH="auto_rich",i))(Ro||{});var vr=(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))(vr||{});var Rd="CIOPGQJGDIHBABABA",Lo={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 bI={apiKey:Rd,apiEnv:"okcdn",apiBaseUrl:null,requestRetryCount:1,firstFlushTime:5e3,flushDebounceTime:1e4,flushMaxWait:6e4,storageExpiration:36*60*60*1e3,watchCoverageHeartbeatInterval:30,synchronizeTime:!0,useBeacon:!1,alwaysSendDesktop:!1,watchedNFirstTvtLog:1e3,watchedNDefaultTargetDuration:1e4},kd=t=>(0,Ld.fillWithDefault)(t,bI);var ko=R(oo(),1),J=require("@vkontakte/videoplayer-shared/es2015");var gr=class{constructor(e){this.params=e,this.authorized$=new J.ValueSubject(!1),this.consequentAuthErrors=0}authorize(e){return A(this,null,function*(){return this.authToken=e!=null?e:yield this.refreshAuthToken(),this.authorizeWithBackoff()})}logBeacon(e){let r="log.logUvStat",i=this.createLogParams(e),o=this.sessionKey;if(!o)return;this.params.apiTransport.sendBeacon(r,i,o)||this.logRequest(e).catch(()=>{})}logRequest(e){return A(this,null,function*(){var l;let r="log.logUvStat",i=this.createLogParams(e),o={},n=(l=this.sessionKey)!=null?l:yield this.authorizeWithBackoff();if(!n)return;let c=(d,...p)=>A(this,[d,...p],function*(f,a=this.params.config.requestRetryCount){try{return yield this.params.apiTransport.sendRequest(r,i,n,o)}catch(u){if(!u||!("error_code"in u)){this.params.error$.next({id:"logRequestUnknown",category:J.ErrorCategory.NETWORK,message:`Unknown ${r} error`,thrown:u});return}let h=u==null?void 0:u.error_code;switch(h){case 102:case 103:case 104:return this.authorized$.next(!1),this.sessionKey=yield this.authorizeWithBackoff(),a>0?c(f,a-1):void 0;case 401:return this.authorized$.next(!1),this.authToken=yield this.refreshAuthToken(),this.sessionKey=yield this.authorizeWithBackoff(),a>0?c(f,a-1):void 0;default:{this.params.error$.next({id:`LogRequest#${h}`,category:J.ErrorCategory.EXTERNAL_API,message:`${r} error`,data:u});return}}}});return c(e)})}destroy(){window.clearTimeout(this.backoffTimeoutId),this.backoffTimeoutId=0}refreshAuthToken(){return A(this,null,function*(){if(this.params.refreshAuthToken)return this.refreshAuthTokenPromise||(this.refreshAuthTokenPromise=(0,ko.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:${B}`,platform:e[0].platform,product:e[0].product,events:e})}}authorizeWithBackoff(){if(!this.consequentAuthErrors)return this.doAuthorize();let e=(0,J.getExponentialDelay)(this.consequentAuthErrors);return new Promise(r=>{this.backoffTimeoutId||(this.backoffTimeoutId=window.setTimeout(()=>A(this,null,function*(){try{let i=yield this.doAuthorize();r(i)}catch(i){this.params.error$.next({id:"AuthorizeBackoff",category:J.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",r={session_data:{version:2,device_id:this.params.deviceId,client_version:B.split("-")[0],client_type:"SDK_JS"}};return this.authToken!==void 0&&(r.session_data.auth_token=this.authToken,r.session_data.version=3),this.authorizePromise=(0,ko.default)(this.params.apiTransport.sendRequest(e,r).then(i=>{var o;return(!i||!i.session_key)&&this.params.error$.next({id:"AuthorizeFailed",category:J.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=>A(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:J.ErrorCategory.EXTERNAL_API,message:"authorize error",data:i}):this.params.error$.next({id:"AuthorizeUnknown",category:J.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 Nd=R(ye(),1);var $d=R(je(),1),ue=require("@vkontakte/videoplayer-shared/es2015");var mr=class{constructor(e){var r;this.params=e,this.apiKey=e.config.apiKey,this.apiEnv=e.config.apiEnv,this.apiBaseUrl=(r=e.config.apiBaseUrl)!=null?r:Lo[this.apiEnv],this.timeSynchronisation=e.timeSynchronisation,this.isApiBaseUrlFetched=!1}sendBeacon(e,r,i){if(!window.Blob||!window.navigator.sendBeacon)return!1;let o=this.prepareQueryParams({method:e,queryParams:r,sessionKey:i}),n=new window.Blob([o.toString()],{type:"application/x-www-form-urlencoded"});try{return window.navigator.sendBeacon(`${this.apiBaseUrl}/fb.do`,n)}catch(c){this.params.error$.next({id:"OneStat:ApiTransport:sendBeacon",category:ue.ErrorCategory.NETWORK,message:"Unhandled beacon error",thrown:c,data:{method:e,params:r}})}return!1}sendRequest(e,r,i,o){return A(this,null,function*(){let n=(0,ue.now)(),c=l=>{if(l instanceof TypeError&&(0,Nd.default)(["Failed to fetch","NetworkError when attempting to fetch resource."],l.message)){this.params.error$.next({id:"Network",category:ue.ErrorCategory.NETWORK,message:"Request failed",thrown:l});return}this.params.error$.next({id:"ThinOneStat:ApiTransport:sendRequest",category:ue.ErrorCategory.NETWORK,message:"Unhandled request error",thrown:l,data:{method:e,params:r,sessionKey:i,time:(0,ue.now)()-n}})};return this.apiBaseUrl=yield this.resolveApiBaseUrl(),We(`${this.apiBaseUrl}/fb.do`,{method:"post",headers:x({"Content-type":"application/x-www-form-urlencoded"},o),body:this.prepareQueryParams({method:e,queryParams:r,sessionKey:i})}).then(l=>{var p,u;let f=Number(l.headers.get("content-length"))===0,a=new Date((p=l.headers.get("date"))!=null?p:"").getTime(),d=(0,ue.now)()-n;if(isFinite(a)&&((u=this.timeSynchronisation)==null||u.addServerTime(a,d)),!f)return l.json().then(h=>Object.prototype.hasOwnProperty.call(h,"error_msg")?Promise.reject(h):h,c)},c)})}resolveApiBaseUrl(){return A(this,null,function*(){var e;if(this.apiEnv!=="auto"||this.isApiBaseUrlFetched)return this.apiBaseUrl;try{let r=atob("aHR0cHM6Ly9kbnMuZ29vZ2xlL3Jlc29sdmU/bmFtZT12aWRlby5fZW5kcG9pbnQub2sucnUmdHlwZT1UWFQ="),o=yield(yield We(r,{method:"GET",mode:"cors",cache:"no-cache"})).json(),n=(e=o==null?void 0:o.Answer[0])==null?void 0:e.data;if(!n)throw new Error("Wrong DNS response");return n}catch(r){return this.params.error$.next({id:"ThinOneStat:ApiTransport:resolveApiBaseUrl",category:ue.ErrorCategory.NETWORK,message:"Unhandled resolve api base url error",thrown:r}),Lo.vk_alias}finally{this.isApiBaseUrlFetched=!0}})}prepareQueryParams(e){let r=new URLSearchParams({format:"JSON",method:e.method,application_key:this.apiKey});return e.sessionKey!==void 0&&r.append("session_key",e.sessionKey),(0,$d.default)(e.queryParams).forEach(([i,o])=>r.append(i,typeof o=="string"?o:JSON.stringify(o))),r}};var Dd=R(ye(),1),Md=R(je(),1),j=require("@vkontakte/videoplayer-shared/es2015");var br="thinonestat_events",No=t=>e=>e.client_time+t>=(0,j.now)(),yr=class{constructor(e){this.unsaltedStorage=[];this.isPaused=!1;this.isUrgent=e=>{let{event_name:r}=e;return(0,Dd.default)(["watch_coverage","watch_coverage_live","watched_n","playback_started"],r)};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,j.debounceFn)(()=>this.safeFlush(),this.params.config.firstFlushTime,{maxWait:this.params.config.firstFlushTime});let r=j.safeStorage.isPersistent()?this.params.config.flushMaxWait:0;this.debouncedFlush=(0,j.debounceFn)(()=>this.safeFlush(),this.params.config.flushDebounceTime,{maxWait:r}),this.subscription=this.api.authorized$.subscribe(i=>{i&&this.debouncedFlush()}),this.housekeepStorage()}safeFlush(){try{this.flush()}catch(e){this.error$.next({id:"LoggerError",category:j.ErrorCategory.WTF,message:String(e)||"Unknown logger error",thrown:e})}}readFromStorage(){let e=j.safeStorage.get(br);try{return e?JSON.parse(e):{}}catch(r){}return{}}addToStorage(e){var n;if(!this.userSalt){this.unsaltedStorage.push(e);return}let r=this.readFromStorage(),o=((n=r[this.userSalt])!=null?n:[]).filter(No(this.params.config.storageExpiration));j.safeStorage.set(br,JSON.stringify(le(x({},r),{[this.userSalt]:[...o,e]})))}getFromStorage(){var i;return this.userSalt?((i=this.readFromStorage()[this.userSalt])!=null?i:[]).filter(No(this.params.config.storageExpiration)):this.unsaltedStorage}markStorageSent(){if(!this.userSalt){this.unsaltedStorage=[];return}let e=this.readFromStorage();delete e[this.userSalt],j.safeStorage.set(br,JSON.stringify(e))}housekeepStorage(){let e=this.readFromStorage();for(let[r,i]of(0,Md.default)(e)){let o=i.filter(No(this.params.config.storageExpiration));o.length?e[r]=o:delete e[r],this.loggerDebugLog({message:`${i.length} retrieved from storage, ${o.length} of them actual`})}j.safeStorage.set(br,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:r}={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)),r&&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 $o(){let t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),e=new Array(36),r=0,i,o;for(o=0;o<36;o++)o===8||o===13||o===18||o===23?e[o]="-":o===14?e[o]="4":(r<=2&&(r=33554432+Math.random()*16777216|0),i=r&15,r=r>>4,e[o]=t[o===19?i&3|8:i]);return e.join("")}var Ir=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 r;return e.setTime(e.getTime()+((r=this.offset)!=null?r:0)),e}addServerTime(e,r){let i=Date.now(),o=e-i-r/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 Do=require("@vkontakte/videoplayer-core/es2015"),E=require("@vkontakte/videoplayer-shared/es2015"),Vd=(t,e,r)=>new E.Observable(i=>{let o=new E.Subscription,n=new E.ValueSubject(void 0),c;o.add(t.info.isLive$.pipe((0,E.filterChanged)()).subscribe(re=>{c&&(c.unsubscribe(),n.next(void 0)),re?c=t.info.liveTime$.pipe((0,E.filterChanged)()).subscribe(n):c=t.info.position$.subscribe(n),o.add(c)}));let{playing$:l,paused$:f,ended$:a,looped$:d}=t.events,p=t.events.willSeek$.pipe((0,E.filter)(()=>t.info.playbackState$.getValue()===Do.PlaybackState.PLAYING)),u=t.events.seeked$.pipe((0,E.filter)(()=>t.info.playbackState$.getValue()===Do.PlaybackState.PLAYING)),h=!1,v=new E.Subject;o.add(p.subscribe(()=>{h||v.next(),h=!0})).add(u.subscribe(()=>h=!1));let m=(0,E.merge)((0,E.fromEvent)(window,"beforeunload"),t.events.willDestruct$),I,_=()=>I=n.getValue(),w=()=>{let re=n.getValue();(0,E.isNullable)(I)||(0,E.isNullable)(re)||I===re||(i.next({from:I,to:re}),I=void 0)},H=new E.Subject,D=new E.Subject,P=(0,E.merge)(l,v,H),L=(0,E.merge)(f,u,m,a,d,D),ce=e.started$&&e.ended$?(0,E.merge)(P,e.ended$):P,he=e.started$&&e.ended$?(0,E.merge)(L,e.started$):L;if(o.add(ce.subscribe(_)).add(he.subscribe(w)),r.heartbeatInterval&&isFinite(r.heartbeatInterval)){let re=[],of=r.heartbeatInterval*1e3,nf=()=>{D.next(),H.next()};o.add(ce.subscribe(()=>{let Ar=window.setTimeout(nf,of);re.push(Ar)})).add(he.subscribe(()=>{re.forEach(Ar=>{window.clearTimeout(Ar)}),re=[]}))}return o});var Fd=require("@vkontakte/videoplayer-core/es2015"),Bd=require("@vkontakte/videoplayer-shared/es2015"),Ud=(t,e)=>new Bd.Observable(r=>{let i=new Fd.Subscription,o=0;return i.add(t.info.position$.subscribe(()=>{let n=e.getTotalViewTime()*1e3;n>o&&(n===e.firstTvtLog||n%e.targetDuration===0)&&(o=n,r.next({target_duration:e.targetDuration,current_tvt:n}))})),i});var we=require("@vkontakte/videoplayer-shared/es2015"),jd=t=>new we.Observable(e=>{let r=new we.Subscription,i=0,o=1,n=0,c=!1,l=!1,f=()=>{if(!c)return;let P=Date.now();n+=(P-i)*o,i=P},a=()=>{(!c||l)&&(i=Date.now(),c=!0,l=!1)},d=()=>{c&&(f(),c=!1)},p=()=>{c&&(f(),c=!1,l=!0)},u=P=>{c&&f(),o=P,i=Date.now()},{started$:h,playing$:v,paused$:m,willSeek$:I,ended$:_,willDestruct$:w}=t.events,{currentPlaybackRate$:H}=t.info;r.add(I.subscribe(p)).add((0,we.merge)(h,v).subscribe(a)).add((0,we.merge)(m,_,w).subscribe(d)).add(H.subscribe(u));let D=()=>{let P=n;return c&&(P+=(Date.now()-i)*o),P};return e.next(D),r});var Mo=require("@vkontakte/videoplayer-shared/es2015"),b=require("@vkontakte/videoplayer-core/es2015");var Vo=t=>t&&{[b.HttpConnectionType.HTTP1]:"http1",[b.HttpConnectionType.HTTP2]:"http2",[b.HttpConnectionType.QUIC]:"http3"}[t],Sr=t=>{if(t!==void 0)switch(t){case b.VideoFormat.MPEG:return"MP4";case b.VideoFormat.DASH:case b.VideoFormat.DASH_LIVE:return"DASH";case b.VideoFormat.DASH_SEP:return"DASH_SEP";case b.VideoFormat.DASH_ONDEMAND:return"ONDEMAND_DASH";case b.VideoFormat.HLS_ONDEMAND:return"ONDEMAND_HLS";case b.VideoFormat.HLS:case b.VideoFormat.HLS_LIVE:return"HLS";case b.VideoFormat.HLS_FMP4:return"HLS_FMP4";case b.VideoFormat.DASH_WEBM:case b.VideoFormat.DASH_LIVE_WEBM:return"WEBM";case b.VideoFormat.DASH_LIVE_CMAF:return"ONDEMAND_DASH_LIVE";case b.VideoFormat.HLS_LIVE_CMAF:return"ONDEMAND_HLS_LIVE";case b.VideoFormat.WEB_RTC_LIVE:return"WEBRTC";case b.VideoFormat.DASH_WEBM_AV1:return"AV1";case b.VideoFormat.DASH_STREAMS:return"MULTI_DASH";default:return(0,Mo.assertNever)(t)}},X=t=>{if(t!==void 0)switch(t){case b.VideoQuality.Q_144P:return"144p";case b.VideoQuality.Q_240P:return"240p";case b.VideoQuality.Q_360P:return"360p";case b.VideoQuality.Q_480P:return"480p";case b.VideoQuality.Q_720P:return"720p";case b.VideoQuality.Q_1080P:return"1080p";case b.VideoQuality.Q_1440P:return"1440p";case b.VideoQuality.Q_2160P:return"2160p";case b.VideoQuality.INVARIANT:case b.VideoQuality.Q_576P:case b.VideoQuality.Q_4320P:return"UNKNOWN";default:return(0,Mo.assertNever)(t)}},Hd=t=>{if(t!==void 0)switch(t){case"MP4":case"ONDEMAND_DASH":case"ONDEMAND_DASH_LIVE":case"ONDEMAND_HLS":case"ONDEMAND_HLS_LIVE":case"MULTI_DASH":case"WEBM":case"AV1":return"vod";case"DASH":case"HLS":case"HLS_FMP4":case"WEBRTC":return"live";default:return}},pe=(t,e,r)=>{var i;if(t&&e)switch(t){case b.VideoFormat.MPEG:return r&&e[t]&&e[t][r];default:return(i=e[t])==null?void 0:i.url}},_r=(t,e=!1)=>{if(e)return"minimal";switch(t){case void 0:case b.Surface.NONE:return;case b.Surface.INLINE:return"inline";case b.Surface.FULLSCREEN:return"fullscreen";case b.Surface.SECOND_SCREEN:return"chromecast";case b.Surface.PIP:return"pip_external"}},Pr=t=>{switch(t){case void 0:return;case b.Surface.INVISIBLE:return"background";default:return"foreground"}};var Wd=R(kt(),1);var Kd=()=>(0,Wd.default)(Math.floor(Math.random()*xe(2,64)).toString(36),13,"0");var yI="_thin-one-stat_",Qd=`${yI}deviceId`,Gd=()=>{let t=new S.Subscription;return{subscription:t,subscribe:(e,r)=>{e&&t.add(e.subscribe(r))}}},Er=class{constructor(e,r){this.debugLogger=new S.Logger;this.thinOneStatDebugLog=this.debugLogger.createComponentLog("ThinOneStat");this.eventNumber=1;this.playerSize={width:0,height:0};this.seekAction$=new S.ValueSubject("unknown");this.isid$=new S.ValueSubject(void 0);var f,a;this.statContext=e,this.config=kd((f=r.config)!=null?f:{}),this.subscription=new S.Subscription,this.config.synchronizeTime&&(this.timeSynchronisation=new Ir);let i=new S.Subject,o=S.safeStorage.get(Qd);this.statContext.deviceId?this.deviceId=this.statContext.deviceId:o?this.deviceId=o:(this.deviceId=$o(),S.safeStorage.set(Qd,this.deviceId)),this.statContext.targetDuration?this.targetDuration=this.statContext.targetDuration:this.targetDuration=this.config.watchedNDefaultTargetDuration,this.resetViewSession(),r.useIsid&&this.isid$.next((a=r.isid)!=null?a:Kd());let n=new mr({error$:i,config:this.config,timeSynchronisation:this.timeSynchronisation});this.api=new gr({config:this.config,apiTransport:n,error$:i,deviceId:this.deviceId,refreshAuthToken:r.refreshAuthToken}),this.logger=new yr({config:this.config,debugLogger:this.debugLogger,api:this.api,error$:i,userSalt:r.userSalt});let{isEmbed:c,topOrigin:l}=(0,S.detectEmbed)();this.isEmbed=c,this.embedHostname=l?new URL(l).hostname:void 0}get vsid$(){return new S.ValueSubject(de.getVSID())}authorize(e){return this.api.authorize(e)}updateContext(e){this.statContext=x(x({},this.statContext),e)}attachTo(e,r){let i=new S.Subscription,o=(a,d)=>i.add(a.subscribe(d));o(jd(e),a=>{this.getTotalViewTime=a}),o(e.info.isLive$,a=>this.isLive=a);let n;o((0,S.combine)({hostname:e.info.hostname$,connectionType:e.info.httpConnectionType$,connectionReused:e.info.httpConnectionReused$}).pipe((0,S.filter)(({hostname:a})=>a!==void 0),(0,S.filter)(({connectionType:a})=>a!==void 0),(0,S.filter)(({connectionReused:a})=>a!==void 0)),({hostname:a,connectionType:d,connectionReused:p})=>{if(n!==void 0&&n!==a){let h={cdn_host:a,connection_type:Vo(d),connection_reused:p,content_type:Sr(e.info.currentFormat$.getValue())};this.logFailover(h)}this.cdnHostname=n=a}),o(e.info.httpConnectionType$,a=>{this.connectionType=Vo(a)}),o(e.info.httpConnectionReused$,a=>{this.connectionReused=a}),o(Vd(e,r,{heartbeatInterval:this.config.watchCoverageHeartbeatInterval}),a=>{let d=Math.round(a.from*1e3),p=Math.round(a.to*1e3),u={watch_interval:`${d}-${p}`,in_history:!!this.statContext.inHistory,content_type:Sr(e.info.currentFormat$.getValue()),playback_quality:X(e.info.currentQuality$.getValue()),recom_info:this.statContext.recomInfo};if(!e.info.isLive$.getValue())this.logWatchCoverage(u);else{let v=e.info.atLiveEdge$.getValue();this.logWatchCoverageLive(le(x({},u),{live:!!v}))}}),o(Ud(e,{targetDuration:this.targetDuration,firstTvtLog:this.config.watchedNFirstTvtLog,getTotalViewTime:this.getTotalViewTime}),a=>{this.logWatchedN(a)}),o(e.events.willReady$,()=>{if(this.statContext.preload){let a=e.info.currentFormat$.getValue(),d=e.info.availableSources$.getValue(),p=e.info.currentBuffer$.getValue(),u=e.info.currentQuality$.getValue(),h={target_buffer_time:this.calcBufferTime(p),playback_url:pe(a,d,u),playback_quality:X(u)};this.logPreloadStarted(h)}}),o(e.events.ready$,()=>{let a=e.info.currentBuffer$.getValue();if(this.statContext.preload){let d={buffer_time:this.calcBufferTime(a)};this.logPreloadEnded(d)}this.logReady({buffer_time:this.calcBufferTime(a)})}),o(e.events.manifestRequested$,()=>{let a=e.info.currentFormat$.getValue(),d=e.info.availableSources$.getValue(),p=e.info.currentQuality$.getValue(),u={playback_url:pe(a,d,p),cdn_host:this.cdnHostname,connection_type:this.connectionType,connection_reused:this.connectionReused};this.logManifestRequest(u)}),o(e.events.firstBytesManifest$,()=>{let a=e.info.currentFormat$.getValue(),d=e.info.availableSources$.getValue(),p=e.info.currentQuality$.getValue(),u={playback_url:pe(a,d,p),cdn_host:this.cdnHostname,connection_type:this.connectionType,connection_reused:this.connectionReused};this.logFirstByteManifest(u)}),o(e.events.manifestReceived$,()=>{let a=e.info.currentFormat$.getValue(),d=e.info.availableSources$.getValue(),p=e.info.currentQuality$.getValue(),u={playback_url:pe(a,d,p),cdn_host:this.cdnHostname,connection_type:this.connectionType,connection_reused:this.connectionReused};this.logManifestReceived(u)}),o(e.events.firstBytesRequested$,()=>{let a=e.info.currentFormat$.getValue(),d=e.info.availableSources$.getValue(),p=e.info.currentQuality$.getValue(),u={playback_url:pe(a,d,p),cdn_host:this.cdnHostname,connection_type:this.connectionType,connection_reused:this.connectionReused};this.logFirstMediaRequest(u)}),o(e.events.firstBytesReceived$,()=>{let a=e.info.currentFormat$.getValue(),d=e.info.availableSources$.getValue(),p=e.info.currentQuality$.getValue(),u={playback_url:pe(a,d,p),cdn_host:this.cdnHostname,connection_type:this.connectionType,connection_reused:this.connectionReused};this.logFirstByteMedia(u)}),o((0,S.merge)(e.events.willStart$,e.events.looped$),a=>{var u;a&&this.resetViewSession();let p={isid:this.isid$.getValue(),stream_profile:Hd(Sr(e.info.currentFormat$.getValue())),dpi:96*Z.clientChecker.display.pixelRatio,web_layout:this.statContext.isMobile||Z.clientChecker.device.isMobile?"mobile":"desktop",preloaded:this.statContext.preload,navigation:this.statContext.navigation,recom_info:this.statContext.recomInfo};this.isEmbed&&(p.iframe_host=(u=this.embedHostname)!=null?u:"unknown"),this.logStartSession(p)}),o(e.events.started$,()=>{var D,P,L,ce;this.isStarted=!0;let a=e.info.currentBuffer$.getValue(),d=e.info.currentQuality$.getValue(),p=e.info.isAutoQualityEnabled$.getValue(),u=e.info.muted$.getValue(),h=e.info.volume$.getValue(),v=e.info.surface$.getValue(),m=e.info.availableTextTracks$.getValue(),I=e.info.currentTextTrack$.getValue(),_=e.info.currentAudioStream$.getValue(),w=e.info.currentPlaybackRate$.getValue(),H={playback_quality:X(d),user_quality:p?"auto":X(d),player_width:this.playerSize.width,player_height:this.playerSize.height,muted:u,sound_volume:Math.round(h*100),buffer_time:this.calcBufferTime(a),mode:_r(v,this.statContext.isPreviewPlayerView),visibility:Pr(v),subtitles_enabled:I?!!I:(D=this.currentSubtitle)==null?void 0:D.enabled,auto_subtitles:(ce=(P=m.find(({id:he})=>he===I))==null?void 0:P.isAuto)!=null?ce:(L=this.currentSubtitle)==null?void 0:L.auto,audio_track_lang:_==null?void 0:_.language,playback_rate:w,recom_info:this.statContext.recomInfo};this.logPlaybackStarted(H)}),o((0,S.merge)(e.events.willStart$,e.events.willResume$),()=>{this.logPlay()}),o(e.events.playing$,()=>{let a=e.info.currentBuffer$.getValue(),d={buffer_time:this.calcBufferTime(a)};this.logPlaying(d),this.wasPaused&&this.logResume()}),o(e.events.paused$,()=>{this.wasPaused=!0,this.logPause()}),o(e.events.willStop$,()=>{this.logStop()}),o((0,S.merge)(e.events.fetcherRecoverableError$,e.events.fatalError$),()=>{this.statContext.preload&&this.logPreloadError()}),o((0,S.combine)({connectionType:e.info.httpConnectionType$,connectionReused:e.info.httpConnectionReused$}).pipe((0,S.filter)(({connectionReused:a})=>a!==void 0),(0,S.filterChanged)((a,d)=>a.connectionType===d.connectionType)),()=>{let a=e.info.currentFormat$.getValue(),d=e.info.availableSources$.getValue(),p=e.info.currentQuality$.getValue(),u=e.info.rttEstimation$.getValue(),h={playback_url:pe(a,d,p),cdn_host:this.cdnHostname,connection_type:this.connectionType,connection_reused:this.connectionReused,rtt:u?Math.round(u):void 0};this.logConnectionEstablished(h)}),o(e.events.firstFrame$,()=>{this.logFirstVideoFrameDecoded()}),o(e.events.willSeek$,()=>{let a={seek_type:this.seekAction$.getValue()};this.logSeeking(a)}),o(e.events.seeked$,()=>{let a={seek_type:this.seekAction$.getValue()};this.logSeeked(a),this.seekAction$.next("unknown")}),o(e.info.isStalled$,a=>{let d=e.info.currentBuffer$.getValue(),p=this.calcBufferTime(d);a&&p&&p>0&&this.logBufferStarvation({buffer_time:p})});let c;o((0,S.combine)({videoStream:e.info.currentVideoStream$,audioStream:e.info.currentAudioStream$,quality:e.info.currentQuality$}).pipe((0,S.filter)(({videoStream:a,audioStream:d})=>a!==void 0&&d!==void 0),(0,S.filter)(({quality:a})=>a!==void 0)),({videoStream:a,audioStream:d,quality:p})=>{if(c!==p){let u=e.info.isAutoQualityEnabled$.getValue(),h=a==null?void 0:a.codec,v=d==null?void 0:d.codec,m={user_quality:u?"auto":X(p),playback_quality:X(p),download_quality:X(p),codec_info:h&&v?`${h},${v}`:void 0};c=p,this.logQualityChanged(m)}});let l,f;return o(e.info.surface$,a=>{let d=_r(a,this.statContext.isPreviewPlayerView);d&&!this.uiEvents&&this.isStarted&&this.logModeChanged({mode:d}),f=Pr(a),l!==f&&this.isStarted&&(l=Pr(a),this.logVisibilityChanged({visibility:f}))}),o((0,S.combine)({muted:e.info.muted$,volume:e.info.volume$}),({muted:a,volume:d})=>{if(this.isStarted){let p={muted:a,sound_volume:Math.round(d*100)};this.logSoundChanged(p)}}),this.player=e,this.resubscribeBeforeunload(),this.subscription.add(i),i}attachToUi(e){this.uiEvents=e;let{subscribe:r,subscription:i}=Gd();r(e.actionSeek$,this.seekAction$),r(e.playerSize$,({width:n,height:c})=>{n&&c&&(this.playerSize={width:n,height:c},this.logViewPortChanged({player_width:n,player_height:c}))}),r(e.isLoaderVisible$,n=>{n&&this.isStarted&&this.logShowLoader()}),r(e.actionSubtitlesSwitched$,n=>{if(this.currentSubtitle=x({},n),this.isStarted){let c={subtitles_enabled:n.enabled,subtitles_track_lang:n.lang,auto_subtitles:n.auto};this.logSubtitlesSwitched(c)}});let{surface$:o}=fr(this.uiEvents,r,this.player);return r(o,n=>{this.isStarted&&this.logModeChanged({mode:_r(n)})}),r(e.actionQuality$,n=>{var d,p,u,h,v,m;let c=I=>(0,Yd.default)((0,zd.default)(Ro),I),l=(p=(d=this.player)==null?void 0:d.info.currentVideoStream$.getValue())==null?void 0:p.codec,f=(h=(u=this.player)==null?void 0:u.info.currentAudioStream$.getValue())==null?void 0:h.codec,a={user_quality:c(n)?"auto":X(n),playback_quality:X((v=this.player)==null?void 0:v.info.currentQuality$.getValue()),download_quality:X((m=this.player)==null?void 0:m.info.currentQuality$.getValue()),codec_info:l&&f?`${l},${f}`:void 0};this.logQualityChangeRequested(a)}),this.resubscribeBeforeunload(),this.subscription.add(i),i}attachToAds(e){let{subscription:r,subscribe:i}=Gd();return i(e.init$,o=>{let n={slot:o};this.logAdvConfiguration(n)}),i(e.slotRequested$,()=>{this.logAdvRequest()}),i(e.started$,o=>{let n={adv_section:o};this.logAdvBreakStarted(n)}),i(e.ended$,o=>{let n={adv_section:o};this.logAdvBreakEnded(n)}),i(e.error$,o=>{let n={error_message:o};this.logAdvError(n)}),this.resubscribeBeforeunload(),this.subscription.add(r),r}getDeviceId(){return this.deviceId}resetViewSession(){this.thinOneStatDebugLog({message:"VSID reset"}),de.generateVSID(),this.eventNumber=0}destroy(){this.api.destroy()}calcBufferTime(e){var r,i;return e?Math.round(((r=e.end)!=null?r:0)-((i=e.start)!=null?i:0))*1e3:void 0}createRequiredParams(e){var n,c,l,f,a;let r=this.vsid$.getValue();(0,S.assertNonNullable)(r);let i=this.eventNumber++,o=((l=this.isLive?(n=this.player)==null?void 0:n.info.liveTime$.getValue():(c=this.player)==null?void 0:c.info.position$.getValue())!=null?l:0)*1e3;return{vsid:r,uv_movie_id:this.statContext.movieId,event_name:e,client_time:Date.now(),application:(f=this.statContext.application)!=null?f:`@vkontakte/videoplayer-statistics:${B}`,platform:(a=this.statContext.platform)!=null?a:`web:${this.statContext.isMobile||Z.clientChecker.device.isMobile?"mobile":"desktop"}`,product:this.statContext.product,event_number:i,playback_position:o,current_tvt:this.getTotalViewTime(),cdn_host:this.cdnHostname}}createRequiredFatParams(){var e,r,i,o,n,c,l;return{stats_version:"2.1.1",browser:(e=this.statContext.browser)!=null?e:Z.clientChecker.browser.current,browser_version:(r=this.statContext.browserVersion)!=null?r:String(Z.clientChecker.browser.currentVersion),os:(i=this.statContext.os)!=null?i:Z.clientChecker.device.os.name,os_version:(o=this.statContext.osVersion)!=null?o:Z.clientChecker.device.os.version,device_type:(n=this.statContext.deviceType)!=null?n:this.statContext.isMobile||Z.clientChecker.device.isMobile?"mobile":"desktop",device_manufacturer:(c=this.statContext.deviceManufacturer)!=null?c:Z.clientChecker.device.details.vendor,device_model:(l=this.statContext.deviceModel)!=null?l:Z.clientChecker.device.details.model,navigation:this.statContext.navigation}}log(e,r,i=!1){let o=this.createRequiredParams(e),n={};i&&(n=this.createRequiredFatParams()),this.logger.log(x(x(x({},o),n),r))}logWatchCoverage(e){this.log("watch_coverage",e,!0)}logWatchCoverageLive(e){this.log("watch_coverage_live",e,!0)}logWatchedN(e){this.log("watched_n",e,!0)}logStartSession(e){this.log("start_session",e,!0)}logPreloadStarted(e){this.log("preload_started",e)}logPreloadEnded(e){this.log("preload_ended",e)}logPreloadError(){this.log("preload_error")}logPlaybackStarted(e){this.log("playback_started",e,!0)}logPlay(){this.log("play")}logManifestRequest(e){this.log("manifest_request",e)}logFirstByteManifest(e){this.log("first_byte_manifest",e)}logFirstMediaRequest(e){this.log("first_media_request",e)}logFirstByteMedia(e){this.log("first_byte_media",e)}logManifestReceived(e){this.log("manifest_received",e)}logConnectionEstablished(e){this.log("connection_established",e)}logFirstVideoFrameDecoded(){this.log("first_video_frame_decoded")}logReady(e){this.log("ready",e)}logPlaying(e){this.log("playing",e)}logPause(){this.log("pause")}logResume(){this.log("resume")}logSeeking(e){this.log("seeking",e)}logSeeked(e){this.log("seeked",e)}logStop(){this.log("stop")}logBufferStarvation(e){this.log("buffer_starvation",e)}logShowLoader(){this.log("show_loader")}logQualityChangeRequested(e){this.log("quality_change_requested",e)}logQualityChanged(e){this.log("quality_changed",e)}logCdnHostChanged(e){this.log("cdn_host_changed",e)}logViewPortChanged(e){this.log("view_port_changed",e)}logModeChanged(e){this.log("mode_changed",e)}logVisibilityChanged(e){this.log("visibility_changed",e)}logSubtitlesSwitched(e){this.log("subtitles_switched",e)}logSoundChanged(e){this.log("sound_changed",e)}logFailover(e){this.log("failover",e)}logAdvConfiguration(e){this.log("adv_configuration",e)}logAdvRequest(){this.log("adv_request")}logAdvBreakStarted(e){this.log("adv_break_started",e)}logAdvBreakEnded(e){this.log("adv_break_ended",e)}logAdvError(e){this.log("adv_error",e)}resubscribeBeforeunload(){var e;(e=this.beforeunloadSubscription)==null||e.unsubscribe(),this.beforeunloadSubscription=(0,S.fromEvent)(window,"beforeunload").subscribe(()=>{}),this.subscription.add(this.beforeunloadSubscription)}};var Fo={};var II=(t,e={})=>{let i=e.timeout||1,o=performance.now();return C.setTimeout(()=>{t({get didTimeout(){return e.timeout?!1:performance.now()-o-1>i},timeRemaining(){return Math.max(0,1+(performance.now()-o))}})},1)},SI=t=>C.clearTimeout(t),Jd=t=>typeof t=="function"&&(t==null?void 0:t.toString().endsWith("{ [native code] }")),Xd=!Jd(C.requestIdleCallback)||!Jd(C.cancelIdleCallback),Zd=Xd?II:C.requestIdleCallback,ef=Xd?SI:C.cancelIdleCallback;var yt=require("@vkontakte/videoplayer-core/es2015"),rf=require("@vkontakte/videoplayer-shared/es2015");var wr=class{constructor(){this.startTime=null;this.stopTime=null;this.accumulatedTime=0}get time(){return Math.floor(this.timeMs/1e3)}get timeMs(){var r;return this.startTime===null?0:((r=this.stopTime)!=null?r:this.now())-this.startTime-this.accumulatedTime}get isRunning(){return this.startTime!==null&&this.stopTime===null}start(){this.isRunning||(this.stopTime!==null?(this.accumulatedTime+=this.now()-this.stopTime,this.stopTime=null):this.startTime=this.now())}stop(){this.isRunning&&(this.stopTime=this.now())}reset(){this.startTime=null,this.stopTime=null,this.accumulatedTime=0}now(){return Date.now()}};var tf=()=>window.Image?new Image:document.createElement("img");var xr=class{constructor(e){this.position=0;this.started=!1;this.heartbeatPixels=[];this.heartbeatLastTimeSent={};this.idleCallbackIds=[];this.stopwatch=new wr;this.subscription=new yt.Subscription;this.params=e;let r=new rf.Logger;this.log=r.createComponentLog("MediascopePixel")}attachTo(e){this.subscription.add(e.info.playbackState$.subscribe(r=>this.onPlaybackState(r))).add(e.info.position$.subscribe(r=>this.onPosition(r))).add(e.info.atLiveEdge$.subscribe(r=>this.isActiveLive=r)),this.subscription.add(e.events.willSeek$.subscribe(()=>this.onWillSeek())).add(e.events.seeked$.subscribe(()=>this.onSeeked())).add(e.events.ended$.subscribe(()=>this.onEnded()))}destroy(){this.stopwatch.reset(),this.subscription.unsubscribe(),window.clearTimeout(this.heartbeatFirstTimeoutId),this.idleCallbackIds.forEach(e=>ef(e)),this.send("stop")}onPlaybackState(e){e===yt.PlaybackState.PLAYING?this.started?this.play():this.start():e===yt.PlaybackState.PAUSED&&this.pause()}start(){var i,o,n;this.started=!0,this.stopwatch.start(),this.send("start"),this.heartbeatPixels=this.prepareHeartbeatPixels(),this.heartbeatInterval=(i=this.heartbeatPixels[0])==null?void 0:i.interval;let e=(o=this.heartbeatPixels[0])==null?void 0:o.url,r=(n=this.heartbeatPixels[0])==null?void 0:n.delay;if(r!==void 0&&e)try{this.heartbeatFirstTimeoutId=window.setTimeout(()=>{this.sendHeartbeat(e)},r*1e3)}catch(c){this.log({message:c.message})}}play(){this.stopwatch.start(),this.send("resume")}pause(){this.stopwatch.stop(),this.send("pause")}onPosition(e){if(this.position=e,this.heartbeatInterval&&this.stopwatch.time!==0&&this.stopwatch.time%this.heartbeatInterval===0)for(let[r,{url:i}]of this.heartbeatPixels.entries())this.heartbeatLastTimeSent[r]!==this.stopwatch.time&&(this.heartbeatLastTimeSent[r]=this.stopwatch.time,this.sendHeartbeat(i))}onWillSeek(){this.started&&this.send("stop")}onSeeked(){this.started&&this.send("start")}onEnded(){this.stopwatch.stop(),this.send("stop")}validatePixels(e,r){return e==null?void 0:e.filter(i=>i.event===r.event&&r.keys.every(o=>!!i[o]))}getFrameTimestamp(){let e;if(this.isActiveLive){let r=Math.floor(Math.random()*25)+5;e=Date.now()/1e3-r}else e=this.position||0;return Math.floor(e)}getUTC(){return Math.floor(Date.now()/1e3)}prepareUrl(e){return e.replace("{@fts_fake_sec}",String(this.getFrameTimestamp())).replace("{@utc_sec}",String(this.getUTC())).split("&").filter(r=>!/={@[a-zA-Z_]+}/.test(r)).join("&")}preparePixels(e){return this.validatePixels(this.params.pixels,{event:e,keys:["url"]})}prepareHeartbeatPixels(){return this.validatePixels(this.params.pixels,{event:"heartbeat",keys:["url","interval"]})}call(e){try{this.idleCallbackIds.push(Zd(()=>tf().src=this.prepareUrl(e)))}catch(r){this.log({message:r.message})}}send(e){let r=this.preparePixels(e);for(let{url:i}of r)this.call(i)}sendHeartbeat(e){this.call(e)}};
6
+ "use strict";var cf=Object.create;var Ge=Object.defineProperty,lf=Object.defineProperties,df=Object.getOwnPropertyDescriptor,ff=Object.getOwnPropertyDescriptors,pf=Object.getOwnPropertyNames,Ho=Object.getOwnPropertySymbols,hf=Object.getPrototypeOf,Ko=Object.prototype.hasOwnProperty,vf=Object.prototype.propertyIsEnumerable;var Ae=Math.pow,Wo=(t,e,r)=>e in t?Ge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e||(e={}))Ko.call(e,r)&&Wo(t,r,e[r]);if(Ho)for(var r of Ho(e))vf.call(e,r)&&Wo(t,r,e[r]);return t},de=(t,e)=>lf(t,ff(e));var u=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Qo=(t,e)=>{for(var r in e)Ge(t,r,{get:e[r],enumerable:!0})},Go=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of pf(e))!Ko.call(t,o)&&o!==r&&Ge(t,o,{get:()=>e[o],enumerable:!(i=df(e,o))||i.enumerable});return t};var R=(t,e,r)=>(r=t!=null?cf(hf(t)):{},Go(e||!t||!t.__esModule?Ge(r,"default",{value:t,enumerable:!0}):r,t)),gf=t=>Go(Ge({},"__esModule",{value:!0}),t);var A=(t,e,r)=>new Promise((i,o)=>{var n=f=>{try{l(r.next(f))}catch(p){o(p)}},c=f=>{try{l(r.throw(f))}catch(p){o(p)}},l=f=>f.done?i(f.value):Promise.resolve(f.value).then(n,c);l((r=r.apply(t,e)).next())});var O=u((Rr,zo)=>{"use strict";var ze=function(t){return t&&t.Math===Math&&t};zo.exports=ze(typeof globalThis=="object"&&globalThis)||ze(typeof window=="object"&&window)||ze(typeof self=="object"&&self)||ze(typeof global=="object"&&global)||ze(typeof Rr=="object"&&Rr)||function(){return this}()||Function("return this")()});var L=u((xI,Yo)=>{"use strict";Yo.exports=function(t){try{return!!t()}catch(e){return!0}}});var Ye=u((AI,Jo)=>{"use strict";var mf=L();Jo.exports=!mf(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")})});var kr=u((OI,tn)=>{"use strict";var bf=Ye(),en=Function.prototype,Xo=en.apply,Zo=en.call;tn.exports=typeof Reflect=="object"&&Reflect.apply||(bf?Zo.bind(Xo):function(){return Zo.apply(Xo,arguments)})});var N=u((CI,nn)=>{"use strict";var rn=Ye(),on=Function.prototype,Lr=on.call,yf=rn&&on.bind.bind(Lr,Lr);nn.exports=rn?yf:function(t){return function(){return Lr.apply(t,arguments)}}});var Je=u((qI,sn)=>{"use strict";var an=N(),If=an({}.toString),_f=an("".slice);sn.exports=function(t){return _f(If(t),8,-1)}});var Nr=u((RI,un)=>{"use strict";var Sf=Je(),Pf=N();un.exports=function(t){if(Sf(t)==="Function")return Pf(t)}});var C=u((kI,cn)=>{"use strict";var $r=typeof document=="object"&&document.all;cn.exports=typeof $r=="undefined"&&$r!==void 0?function(t){return typeof t=="function"||t===$r}:function(t){return typeof t=="function"}});var M=u((LI,ln)=>{"use strict";var Tf=L();ln.exports=!Tf(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var K=u((NI,dn)=>{"use strict";var Ef=Ye(),St=Function.prototype.call;dn.exports=Ef?St.bind(St):function(){return St.apply(St,arguments)}});var Dr=u(hn=>{"use strict";var fn={}.propertyIsEnumerable,pn=Object.getOwnPropertyDescriptor,wf=pn&&!fn.call({1:2},1);hn.f=wf?function(e){var r=pn(this,e);return!!r&&r.enumerable}:fn});var Xe=u((DI,vn)=>{"use strict";vn.exports=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}});var mn=u((MI,gn)=>{"use strict";var xf=N(),Af=L(),Of=Je(),Mr=Object,Cf=xf("".split);gn.exports=Af(function(){return!Mr("z").propertyIsEnumerable(0)})?function(t){return Of(t)==="String"?Cf(t,""):Mr(t)}:Mr});var Ze=u((VI,bn)=>{"use strict";bn.exports=function(t){return t==null}});var Oe=u((FI,yn)=>{"use strict";var qf=Ze(),Rf=TypeError;yn.exports=function(t){if(qf(t))throw new Rf("Can't call method on "+t);return t}});var ve=u((BI,In)=>{"use strict";var kf=mn(),Lf=Oe();In.exports=function(t){return kf(Lf(t))}});var Q=u((UI,_n)=>{"use strict";var Nf=C();_n.exports=function(t){return typeof t=="object"?t!==null:Nf(t)}});var ge=u((jI,Sn)=>{"use strict";Sn.exports={}});var ie=u((HI,Tn)=>{"use strict";var Vr=ge(),Fr=O(),$f=C(),Pn=function(t){return $f(t)?t:void 0};Tn.exports=function(t,e){return arguments.length<2?Pn(Vr[t])||Pn(Fr[t]):Vr[t]&&Vr[t][e]||Fr[t]&&Fr[t][e]}});var Pt=u((WI,En)=>{"use strict";var Df=N();En.exports=Df({}.isPrototypeOf)});var me=u((KI,An)=>{"use strict";var Mf=O(),wn=Mf.navigator,xn=wn&&wn.userAgent;An.exports=xn?String(xn):""});var Ur=u((QI,Ln)=>{"use strict";var kn=O(),Br=me(),On=kn.process,Cn=kn.Deno,qn=On&&On.versions||Cn&&Cn.version,Rn=qn&&qn.v8,G,Tt;Rn&&(G=Rn.split("."),Tt=G[0]>0&&G[0]<4?1:+(G[0]+G[1]));!Tt&&Br&&(G=Br.match(/Edge\/(\d+)/),(!G||G[1]>=74)&&(G=Br.match(/Chrome\/(\d+)/),G&&(Tt=+G[1])));Ln.exports=Tt});var jr=u((GI,$n)=>{"use strict";var Nn=Ur(),Vf=L(),Ff=O(),Bf=Ff.String;$n.exports=!!Object.getOwnPropertySymbols&&!Vf(function(){var t=Symbol("symbol detection");return!Bf(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Nn&&Nn<41})});var Hr=u((zI,Dn)=>{"use strict";var Uf=jr();Dn.exports=Uf&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Wr=u((YI,Mn)=>{"use strict";var jf=ie(),Hf=C(),Wf=Pt(),Kf=Hr(),Qf=Object;Mn.exports=Kf?function(t){return typeof t=="symbol"}:function(t){var e=jf("Symbol");return Hf(e)&&Wf(e.prototype,Qf(t))}});var et=u((JI,Vn)=>{"use strict";var Gf=String;Vn.exports=function(t){try{return Gf(t)}catch(e){return"Object"}}});var oe=u((XI,Fn)=>{"use strict";var zf=C(),Yf=et(),Jf=TypeError;Fn.exports=function(t){if(zf(t))return t;throw new Jf(Yf(t)+" is not a function")}});var Et=u((ZI,Bn)=>{"use strict";var Xf=oe(),Zf=Ze();Bn.exports=function(t,e){var r=t[e];return Zf(r)?void 0:Xf(r)}});var jn=u((e_,Un)=>{"use strict";var Kr=K(),Qr=C(),Gr=Q(),ep=TypeError;Un.exports=function(t,e){var r,i;if(e==="string"&&Qr(r=t.toString)&&!Gr(i=Kr(r,t))||Qr(r=t.valueOf)&&!Gr(i=Kr(r,t))||e!=="string"&&Qr(r=t.toString)&&!Gr(i=Kr(r,t)))return i;throw new ep("Can't convert object to primitive value")}});var te=u((t_,Hn)=>{"use strict";Hn.exports=!0});var Qn=u((r_,Kn)=>{"use strict";var Wn=O(),tp=Object.defineProperty;Kn.exports=function(t,e){try{tp(Wn,t,{value:e,configurable:!0,writable:!0})}catch(r){Wn[t]=e}return e}});var tt=u((i_,Yn)=>{"use strict";var rp=te(),ip=O(),op=Qn(),Gn="__core-js_shared__",zn=Yn.exports=ip[Gn]||op(Gn,{});(zn.versions||(zn.versions=[])).push({version:"3.43.0",mode:rp?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var zr=u((o_,Xn)=>{"use strict";var Jn=tt();Xn.exports=function(t,e){return Jn[t]||(Jn[t]=e||{})}});var Yr=u((n_,Zn)=>{"use strict";var np=Oe(),ap=Object;Zn.exports=function(t){return ap(np(t))}});var re=u((a_,ea)=>{"use strict";var sp=N(),up=Yr(),cp=sp({}.hasOwnProperty);ea.exports=Object.hasOwn||function(e,r){return cp(up(e),r)}});var Jr=u((s_,ta)=>{"use strict";var lp=N(),dp=0,fp=Math.random(),pp=lp(1.1.toString);ta.exports=function(t){return"Symbol("+(t===void 0?"":t)+")_"+pp(++dp+fp,36)}});var V=u((u_,ia)=>{"use strict";var hp=O(),vp=zr(),ra=re(),gp=Jr(),mp=jr(),bp=Hr(),Ce=hp.Symbol,Xr=vp("wks"),yp=bp?Ce.for||Ce:Ce&&Ce.withoutSetter||gp;ia.exports=function(t){return ra(Xr,t)||(Xr[t]=mp&&ra(Ce,t)?Ce[t]:yp("Symbol."+t)),Xr[t]}});var sa=u((c_,aa)=>{"use strict";var Ip=K(),oa=Q(),na=Wr(),_p=Et(),Sp=jn(),Pp=V(),Tp=TypeError,Ep=Pp("toPrimitive");aa.exports=function(t,e){if(!oa(t)||na(t))return t;var r=_p(t,Ep),i;if(r){if(e===void 0&&(e="default"),i=Ip(r,t,e),!oa(i)||na(i))return i;throw new Tp("Can't convert object to primitive value")}return e===void 0&&(e="number"),Sp(t,e)}});var Zr=u((l_,ua)=>{"use strict";var wp=sa(),xp=Wr();ua.exports=function(t){var e=wp(t,"string");return xp(e)?e:e+""}});var wt=u((d_,la)=>{"use strict";var Ap=O(),ca=Q(),ei=Ap.document,Op=ca(ei)&&ca(ei.createElement);la.exports=function(t){return Op?ei.createElement(t):{}}});var ti=u((f_,da)=>{"use strict";var Cp=M(),qp=L(),Rp=wt();da.exports=!Cp&&!qp(function(){return Object.defineProperty(Rp("div"),"a",{get:function(){return 7}}).a!==7})});var ha=u(pa=>{"use strict";var kp=M(),Lp=K(),Np=Dr(),$p=Xe(),Dp=ve(),Mp=Zr(),Vp=re(),Fp=ti(),fa=Object.getOwnPropertyDescriptor;pa.f=kp?fa:function(e,r){if(e=Dp(e),r=Mp(r),Fp)try{return fa(e,r)}catch(i){}if(Vp(e,r))return $p(!Lp(Np.f,e,r),e[r])}});var ri=u((h_,va)=>{"use strict";var Bp=L(),Up=C(),jp=/#|\.prototype\./,rt=function(t,e){var r=Wp[Hp(t)];return r===Qp?!0:r===Kp?!1:Up(e)?Bp(e):!!e},Hp=rt.normalize=function(t){return String(t).replace(jp,".").toLowerCase()},Wp=rt.data={},Kp=rt.NATIVE="N",Qp=rt.POLYFILL="P";va.exports=rt});var it=u((v_,ma)=>{"use strict";var ga=Nr(),Gp=oe(),zp=Ye(),Yp=ga(ga.bind);ma.exports=function(t,e){return Gp(t),e===void 0?t:zp?Yp(t,e):function(){return t.apply(e,arguments)}}});var ii=u((g_,ba)=>{"use strict";var Jp=M(),Xp=L();ba.exports=Jp&&Xp(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var ne=u((m_,ya)=>{"use strict";var Zp=Q(),eh=String,th=TypeError;ya.exports=function(t){if(Zp(t))return t;throw new th(eh(t)+" is not an object")}});var be=u(_a=>{"use strict";var rh=M(),ih=ti(),oh=ii(),xt=ne(),Ia=Zr(),nh=TypeError,oi=Object.defineProperty,ah=Object.getOwnPropertyDescriptor,ni="enumerable",ai="configurable",si="writable";_a.f=rh?oh?function(e,r,i){if(xt(e),r=Ia(r),xt(i),typeof e=="function"&&r==="prototype"&&"value"in i&&si in i&&!i[si]){var o=ah(e,r);o&&o[si]&&(e[r]=i.value,i={configurable:ai in i?i[ai]:o[ai],enumerable:ni in i?i[ni]:o[ni],writable:!1})}return oi(e,r,i)}:oi:function(e,r,i){if(xt(e),r=Ia(r),xt(i),ih)try{return oi(e,r,i)}catch(o){}if("get"in i||"set"in i)throw new nh("Accessors not supported");return"value"in i&&(e[r]=i.value),e}});var qe=u((y_,Sa)=>{"use strict";var sh=M(),uh=be(),ch=Xe();Sa.exports=sh?function(t,e,r){return uh.f(t,e,ch(1,r))}:function(t,e,r){return t[e]=r,t}});var $=u((I_,Ta)=>{"use strict";var ot=O(),lh=kr(),dh=Nr(),fh=C(),ph=ha().f,hh=ri(),Re=ge(),vh=it(),ke=qe(),Pa=re();tt();var gh=function(t){var e=function(r,i,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(r);case 2:return new t(r,i)}return new t(r,i,o)}return lh(t,this,arguments)};return e.prototype=t.prototype,e};Ta.exports=function(t,e){var r=t.target,i=t.global,o=t.stat,n=t.proto,c=i?ot:o?ot[r]:ot[r]&&ot[r].prototype,l=i?Re:Re[r]||ke(Re,r,{})[r],f=l.prototype,p,v,a,s,d,h,g,y,S;for(s in e)p=hh(i?s:r+(o?".":"#")+s,t.forced),v=!p&&c&&Pa(c,s),h=l[s],v&&(t.dontCallGetSet?(S=ph(c,s),g=S&&S.value):g=c[s]),d=v&&g?g:e[s],!(!p&&!n&&typeof h==typeof d)&&(t.bind&&v?y=vh(d,ot):t.wrap&&v?y=gh(d):n&&fh(d)?y=dh(d):y=d,(t.sham||d&&d.sham||h&&h.sham)&&ke(y,"sham",!0),ke(l,s,y),n&&(a=r+"Prototype",Pa(Re,a)||ke(Re,a,{}),ke(Re[a],s,d),t.real&&f&&(p||!f[s])&&ke(f,s,d)))}});var wa=u((__,Ea)=>{"use strict";var mh=Math.ceil,bh=Math.floor;Ea.exports=Math.trunc||function(e){var r=+e;return(r>0?bh:mh)(r)}});var At=u((S_,xa)=>{"use strict";var yh=wa();xa.exports=function(t){var e=+t;return e!==e||e===0?0:yh(e)}});var Oa=u((P_,Aa)=>{"use strict";var Ih=At(),_h=Math.max,Sh=Math.min;Aa.exports=function(t,e){var r=Ih(t);return r<0?_h(r+e,0):Sh(r,e)}});var ui=u((T_,Ca)=>{"use strict";var Ph=At(),Th=Math.min;Ca.exports=function(t){var e=Ph(t);return e>0?Th(e,9007199254740991):0}});var ci=u((E_,qa)=>{"use strict";var Eh=ui();qa.exports=function(t){return Eh(t.length)}});var li=u((w_,ka)=>{"use strict";var wh=ve(),xh=Oa(),Ah=ci(),Ra=function(t){return function(e,r,i){var o=wh(e),n=Ah(o);if(n===0)return!t&&-1;var c=xh(i,n),l;if(t&&r!==r){for(;n>c;)if(l=o[c++],l!==l)return!0}else for(;n>c;c++)if((t||c in o)&&o[c]===r)return t||c||0;return!t&&-1}};ka.exports={includes:Ra(!0),indexOf:Ra(!1)}});var di=u((x_,La)=>{"use strict";La.exports=function(){}});var Na=u(()=>{"use strict";var Oh=$(),Ch=li().includes,qh=L(),Rh=di(),kh=qh(function(){return!Array(1).includes()});Oh({target:"Array",proto:!0,forced:kh},{includes:function(e){return Ch(this,e,arguments.length>1?arguments[1]:void 0)}});Rh("includes")});var Ot=u((C_,$a)=>{"use strict";var Lh=ie();$a.exports=Lh});var Ma=u((q_,Da)=>{"use strict";Na();var Nh=Ot();Da.exports=Nh("Array","includes")});var Fa=u((R_,Va)=>{"use strict";var $h=Ma();Va.exports=$h});var ye=u((k_,Ba)=>{"use strict";var Dh=Fa();Ba.exports=Dh});var Lt=u((H_,Ja)=>{"use strict";var Fh=V(),Bh=Fh("toStringTag"),Ya={};Ya[Bh]="z";Ja.exports=String(Ya)==="[object z]"});var nt=u((W_,Xa)=>{"use strict";var Uh=Lt(),jh=C(),Nt=Je(),Hh=V(),Wh=Hh("toStringTag"),Kh=Object,Qh=Nt(function(){return arguments}())==="Arguments",Gh=function(t,e){try{return t[e]}catch(r){}};Xa.exports=Uh?Nt:function(t){var e,r,i;return t===void 0?"Undefined":t===null?"Null":typeof(r=Gh(e=Kh(t),Wh))=="string"?r:Qh?Nt(e):(i=Nt(e))==="Object"&&jh(e.callee)?"Arguments":i}});var vi=u((K_,Za)=>{"use strict";var zh=nt(),Yh=String;Za.exports=function(t){if(zh(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Yh(t)}});var ts=u((Q_,es)=>{"use strict";var Jh=At(),Xh=vi(),Zh=Oe(),ev=RangeError;es.exports=function(e){var r=Xh(Zh(this)),i="",o=Jh(e);if(o<0||o===1/0)throw new ev("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(r+=r))o&1&&(i+=r);return i}});var as=u((G_,ns)=>{"use strict";var os=N(),tv=ui(),rs=vi(),rv=ts(),iv=Oe(),ov=os(rv),nv=os("".slice),av=Math.ceil,is=function(t){return function(e,r,i){var o=rs(iv(e)),n=tv(r),c=o.length,l=i===void 0?" ":rs(i),f,p;return n<=c||l===""?o:(f=n-c,p=ov(l,av(f/l.length)),p.length>f&&(p=nv(p,0,f)),t?o+p:p+o)}};ns.exports={start:is(!1),end:is(!0)}});var us=u((z_,ss)=>{"use strict";var sv=me();ss.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(sv)});var cs=u(()=>{"use strict";var uv=$(),cv=as().start,lv=us();uv({target:"String",proto:!0,forced:lv},{padStart:function(e){return cv(this,e,arguments.length>1?arguments[1]:void 0)}})});var ds=u((X_,ls)=>{"use strict";cs();var dv=Ot();ls.exports=dv("String","padStart")});var ps=u((Z_,fs)=>{"use strict";var fv=ds();fs.exports=fv});var $t=u((eS,hs)=>{"use strict";var pv=ps();hs.exports=pv});var gs=u(()=>{"use strict"});var gi=u((nS,ms)=>{"use strict";var at=O(),vv=me(),gv=Je(),Dt=function(t){return vv.slice(0,t.length)===t};ms.exports=function(){return Dt("Bun/")?"BUN":Dt("Cloudflare-Workers")?"CLOUDFLARE":Dt("Deno/")?"DENO":Dt("Node.js/")?"NODE":at.Bun&&typeof Bun.version=="string"?"BUN":at.Deno&&typeof Deno.version=="object"?"DENO":gv(at.process)==="process"?"NODE":at.window&&at.document?"BROWSER":"REST"}()});var Mt=u((aS,bs)=>{"use strict";var mv=gi();bs.exports=mv==="NODE"});var Ne=u((sS,ys)=>{"use strict";var bv=qe();ys.exports=function(t,e,r,i){return i&&i.enumerable?t[e]=r:bv(t,e,r),t}});var _s=u((uS,Is)=>{"use strict";var yv=N(),Iv=oe();Is.exports=function(t,e,r){try{return yv(Iv(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(i){}}});var Ps=u((cS,Ss)=>{"use strict";var _v=Q();Ss.exports=function(t){return _v(t)||t===null}});var Es=u((lS,Ts)=>{"use strict";var Sv=Ps(),Pv=String,Tv=TypeError;Ts.exports=function(t){if(Sv(t))return t;throw new Tv("Can't set "+Pv(t)+" as a prototype")}});var mi=u((dS,ws)=>{"use strict";var Ev=_s(),wv=Q(),xv=Oe(),Av=Es();ws.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},r;try{r=Ev(Object.prototype,"__proto__","set"),r(e,[]),t=e instanceof Array}catch(i){}return function(o,n){return xv(o),Av(n),wv(o)&&(t?r(o,n):o.__proto__=n),o}}():void 0)});var As=u((fS,xs)=>{"use strict";var Ov=Lt(),Cv=nt();xs.exports=Ov?{}.toString:function(){return"[object "+Cv(this)+"]"}});var st=u((pS,Cs)=>{"use strict";var qv=Lt(),Rv=be().f,kv=qe(),Lv=re(),Nv=As(),$v=V(),Os=$v("toStringTag");Cs.exports=function(t,e,r,i){var o=r?t:t&&t.prototype;o&&(Lv(o,Os)||Rv(o,Os,{configurable:!0,value:e}),i&&!qv&&kv(o,"toString",Nv))}});var Rs=u((hS,qs)=>{"use strict";var Dv=be();qs.exports=function(t,e,r){return Dv.f(t,e,r)}});var Ns=u((vS,Ls)=>{"use strict";var Mv=ie(),Vv=Rs(),Fv=V(),Bv=M(),ks=Fv("species");Ls.exports=function(t){var e=Mv(t);Bv&&e&&!e[ks]&&Vv(e,ks,{configurable:!0,get:function(){return this}})}});var Ds=u((gS,$s)=>{"use strict";var Uv=Pt(),jv=TypeError;$s.exports=function(t,e){if(Uv(e,t))return t;throw new jv("Incorrect invocation")}});var yi=u((mS,Ms)=>{"use strict";var Hv=N(),Wv=C(),bi=tt(),Kv=Hv(Function.toString);Wv(bi.inspectSource)||(bi.inspectSource=function(t){return Kv(t)});Ms.exports=bi.inspectSource});var Hs=u((bS,js)=>{"use strict";var Qv=N(),Gv=L(),Vs=C(),zv=nt(),Yv=ie(),Jv=yi(),Fs=function(){},Bs=Yv("Reflect","construct"),Ii=/^\s*(?:class|function)\b/,Xv=Qv(Ii.exec),Zv=!Ii.test(Fs),ut=function(e){if(!Vs(e))return!1;try{return Bs(Fs,[],e),!0}catch(r){return!1}},Us=function(e){if(!Vs(e))return!1;switch(zv(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Zv||!!Xv(Ii,Jv(e))}catch(r){return!0}};Us.sham=!0;js.exports=!Bs||Gv(function(){var t;return ut(ut.call)||!ut(Object)||!ut(function(){t=!0})||t})?Us:ut});var Ks=u((yS,Ws)=>{"use strict";var eg=Hs(),tg=et(),rg=TypeError;Ws.exports=function(t){if(eg(t))return t;throw new rg(tg(t)+" is not a constructor")}});var _i=u((IS,Gs)=>{"use strict";var Qs=ne(),ig=Ks(),og=Ze(),ng=V(),ag=ng("species");Gs.exports=function(t,e){var r=Qs(t).constructor,i;return r===void 0||og(i=Qs(r)[ag])?e:ig(i)}});var Si=u((_S,zs)=>{"use strict";var sg=ie();zs.exports=sg("document","documentElement")});var Js=u((SS,Ys)=>{"use strict";var ug=N();Ys.exports=ug([].slice)});var Zs=u((PS,Xs)=>{"use strict";var cg=TypeError;Xs.exports=function(t,e){if(t<e)throw new cg("Not enough arguments");return t}});var Pi=u((TS,eu)=>{"use strict";var lg=me();eu.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(lg)});var Ri=u((ES,cu)=>{"use strict";var F=O(),dg=kr(),fg=it(),tu=C(),pg=re(),uu=L(),ru=Si(),hg=Js(),iu=wt(),vg=Zs(),gg=Pi(),mg=Mt(),Oi=F.setImmediate,Ci=F.clearImmediate,bg=F.process,Ti=F.Dispatch,yg=F.Function,ou=F.MessageChannel,Ig=F.String,Ei=0,ct={},nu="onreadystatechange",lt,Ie,wi,xi;uu(function(){lt=F.location});var qi=function(t){if(pg(ct,t)){var e=ct[t];delete ct[t],e()}},Ai=function(t){return function(){qi(t)}},au=function(t){qi(t.data)},su=function(t){F.postMessage(Ig(t),lt.protocol+"//"+lt.host)};(!Oi||!Ci)&&(Oi=function(e){vg(arguments.length,1);var r=tu(e)?e:yg(e),i=hg(arguments,1);return ct[++Ei]=function(){dg(r,void 0,i)},Ie(Ei),Ei},Ci=function(e){delete ct[e]},mg?Ie=function(t){bg.nextTick(Ai(t))}:Ti&&Ti.now?Ie=function(t){Ti.now(Ai(t))}:ou&&!gg?(wi=new ou,xi=wi.port2,wi.port1.onmessage=au,Ie=fg(xi.postMessage,xi)):F.addEventListener&&tu(F.postMessage)&&!F.importScripts&&lt&&lt.protocol!=="file:"&&!uu(su)?(Ie=su,F.addEventListener("message",au,!1)):nu in iu("script")?Ie=function(t){ru.appendChild(iu("script"))[nu]=function(){ru.removeChild(this),qi(t)}}:Ie=function(t){setTimeout(Ai(t),0)});cu.exports={set:Oi,clear:Ci}});var fu=u((wS,du)=>{"use strict";var lu=O(),_g=M(),Sg=Object.getOwnPropertyDescriptor;du.exports=function(t){if(!_g)return lu[t];var e=Sg(lu,t);return e&&e.value}});var ki=u((xS,hu)=>{"use strict";var pu=function(){this.head=null,this.tail=null};pu.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}};hu.exports=pu});var gu=u((AS,vu)=>{"use strict";var Pg=me();vu.exports=/ipad|iphone|ipod/i.test(Pg)&&typeof Pebble!="undefined"});var bu=u((OS,mu)=>{"use strict";var Tg=me();mu.exports=/web0s(?!.*chrome)/i.test(Tg)});var Eu=u((CS,Tu)=>{"use strict";var De=O(),Eg=fu(),yu=it(),Li=Ri().set,wg=ki(),xg=Pi(),Ag=gu(),Og=bu(),Ni=Mt(),Iu=De.MutationObserver||De.WebKitMutationObserver,_u=De.document,Su=De.process,Vt=De.Promise,Mi=Eg("queueMicrotask"),$e,$i,Di,Ft,Pu;Mi||(dt=new wg,ft=function(){var t,e;for(Ni&&(t=Su.domain)&&t.exit();e=dt.get();)try{e()}catch(r){throw dt.head&&$e(),r}t&&t.enter()},!xg&&!Ni&&!Og&&Iu&&_u?($i=!0,Di=_u.createTextNode(""),new Iu(ft).observe(Di,{characterData:!0}),$e=function(){Di.data=$i=!$i}):!Ag&&Vt&&Vt.resolve?(Ft=Vt.resolve(void 0),Ft.constructor=Vt,Pu=yu(Ft.then,Ft),$e=function(){Pu(ft)}):Ni?$e=function(){Su.nextTick(ft)}:(Li=yu(Li,De),$e=function(){Li(ft)}),Mi=function(t){dt.head||$e(),dt.add(t)});var dt,ft;Tu.exports=Mi});var xu=u((qS,wu)=>{"use strict";wu.exports=function(t,e){try{arguments.length===1?console.error(t):console.error(t,e)}catch(r){}}});var Bt=u((RS,Au)=>{"use strict";Au.exports=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}});var qu=u((kS,Cu)=>{"use strict";var Cg=O(),qg=C(),Ou=Cg.WeakMap;Cu.exports=qg(Ou)&&/native code/.test(String(Ou))});var Ut=u((LS,ku)=>{"use strict";var Rg=zr(),kg=Jr(),Ru=Rg("keys");ku.exports=function(t){return Ru[t]||(Ru[t]=kg(t))}});var jt=u((NS,Lu)=>{"use strict";Lu.exports={}});var Ui=u(($S,Du)=>{"use strict";var Lg=qu(),$u=O(),Ng=Q(),$g=qe(),Vi=re(),Fi=tt(),Dg=Ut(),Mg=jt(),Nu="Object already initialized",Bi=$u.TypeError,Vg=$u.WeakMap,Ht,pt,Wt,Fg=function(t){return Wt(t)?pt(t):Ht(t,{})},Bg=function(t){return function(e){var r;if(!Ng(e)||(r=pt(e)).type!==t)throw new Bi("Incompatible receiver, "+t+" required");return r}};Lg||Fi.state?(z=Fi.state||(Fi.state=new Vg),z.get=z.get,z.has=z.has,z.set=z.set,Ht=function(t,e){if(z.has(t))throw new Bi(Nu);return e.facade=t,z.set(t,e),e},pt=function(t){return z.get(t)||{}},Wt=function(t){return z.has(t)}):(_e=Dg("state"),Mg[_e]=!0,Ht=function(t,e){if(Vi(t,_e))throw new Bi(Nu);return e.facade=t,$g(t,_e,e),e},pt=function(t){return Vi(t,_e)?t[_e]:{}},Wt=function(t){return Vi(t,_e)});var z,_e;Du.exports={set:Ht,get:pt,has:Wt,enforce:Fg,getterFor:Bg}});var Se=u((DS,Mu)=>{"use strict";var Ug=O();Mu.exports=Ug.Promise});var Me=u((MS,Uu)=>{"use strict";var jg=O(),ht=Se(),Hg=C(),Wg=ri(),Kg=yi(),Qg=V(),Vu=gi(),Gg=te(),ji=Ur(),Fu=ht&&ht.prototype,zg=Qg("species"),Hi=!1,Bu=Hg(jg.PromiseRejectionEvent),Yg=Wg("Promise",function(){var t=Kg(ht),e=t!==String(ht);if(!e&&ji===66||Gg&&!(Fu.catch&&Fu.finally))return!0;if(!ji||ji<51||!/native code/.test(t)){var r=new ht(function(n){n(1)}),i=function(n){n(function(){},function(){})},o=r.constructor={};if(o[zg]=i,Hi=r.then(function(){})instanceof i,!Hi)return!0}return!e&&(Vu==="BROWSER"||Vu==="DENO")&&!Bu});Uu.exports={CONSTRUCTOR:Yg,REJECTION_EVENT:Bu,SUBCLASSING:Hi}});var Ve=u((VS,Hu)=>{"use strict";var ju=oe(),Jg=TypeError,Xg=function(t){var e,r;this.promise=new t(function(i,o){if(e!==void 0||r!==void 0)throw new Jg("Bad Promise constructor");e=i,r=o}),this.resolve=ju(e),this.reject=ju(r)};Hu.exports.f=function(t){return new Xg(t)}});var lc=u(()=>{"use strict";var Zg=$(),em=te(),zt=Mt(),pe=O(),tm=ge(),je=K(),Wu=Ne(),Ku=mi(),rm=st(),im=Ns(),om=oe(),Gt=C(),nm=Q(),am=Ds(),sm=_i(),Ju=Ri().set,zi=Eu(),um=xu(),cm=Bt(),lm=ki(),Xu=Ui(),Yt=Se(),Yi=Me(),Zu=Ve(),Jt="Promise",ec=Yi.CONSTRUCTOR,dm=Yi.REJECTION_EVENT,fm=Yi.SUBCLASSING,Wi=Xu.getterFor(Jt),pm=Xu.set,Fe=Yt&&Yt.prototype,Pe=Yt,Kt=Fe,tc=pe.TypeError,Ki=pe.document,Ji=pe.process,Qi=Zu.f,hm=Qi,vm=!!(Ki&&Ki.createEvent&&pe.dispatchEvent),rc="unhandledrejection",gm="rejectionhandled",Qu=0,ic=1,mm=2,Xi=1,oc=2,Qt,Gu,nc,zu,ac=function(t){var e;return nm(t)&&Gt(e=t.then)?e:!1},sc=function(t,e){var r=e.value,i=e.state===ic,o=i?t.ok:t.fail,n=t.resolve,c=t.reject,l=t.domain,f,p,v;try{o?(i||(e.rejection===oc&&ym(e),e.rejection=Xi),o===!0?f=r:(l&&l.enter(),f=o(r),l&&(l.exit(),v=!0)),f===t.promise?c(new tc("Promise-chain cycle")):(p=ac(f))?je(p,f,n,c):n(f)):c(r)}catch(a){l&&!v&&l.exit(),c(a)}},uc=function(t,e){t.notified||(t.notified=!0,zi(function(){for(var r=t.reactions,i;i=r.get();)sc(i,t);t.notified=!1,e&&!t.rejection&&bm(t)}))},cc=function(t,e,r){var i,o;vm?(i=Ki.createEvent("Event"),i.promise=e,i.reason=r,i.initEvent(t,!1,!0),pe.dispatchEvent(i)):i={promise:e,reason:r},!dm&&(o=pe["on"+t])?o(i):t===rc&&um("Unhandled promise rejection",r)},bm=function(t){je(Ju,pe,function(){var e=t.facade,r=t.value,i=Yu(t),o;if(i&&(o=cm(function(){zt?Ji.emit("unhandledRejection",r,e):cc(rc,e,r)}),t.rejection=zt||Yu(t)?oc:Xi,o.error))throw o.value})},Yu=function(t){return t.rejection!==Xi&&!t.parent},ym=function(t){je(Ju,pe,function(){var e=t.facade;zt?Ji.emit("rejectionHandled",e):cc(gm,e,t.value)})},Be=function(t,e,r){return function(i){t(e,i,r)}},Ue=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=mm,uc(t,!0))},Gi=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new tc("Promise can't be resolved itself");var i=ac(e);i?zi(function(){var o={done:!1};try{je(i,e,Be(Gi,o,t),Be(Ue,o,t))}catch(n){Ue(o,n,t)}}):(t.value=e,t.state=ic,uc(t,!1))}catch(o){Ue({done:!1},o,t)}}};if(ec&&(Pe=function(e){am(this,Kt),om(e),je(Qt,this);var r=Wi(this);try{e(Be(Gi,r),Be(Ue,r))}catch(i){Ue(r,i)}},Kt=Pe.prototype,Qt=function(e){pm(this,{type:Jt,done:!1,notified:!1,parent:!1,reactions:new lm,rejection:!1,state:Qu,value:null})},Qt.prototype=Wu(Kt,"then",function(e,r){var i=Wi(this),o=Qi(sm(this,Pe));return i.parent=!0,o.ok=Gt(e)?e:!0,o.fail=Gt(r)&&r,o.domain=zt?Ji.domain:void 0,i.state===Qu?i.reactions.add(o):zi(function(){sc(o,i)}),o.promise}),Gu=function(){var t=new Qt,e=Wi(t);this.promise=t,this.resolve=Be(Gi,e),this.reject=Be(Ue,e)},Zu.f=Qi=function(t){return t===Pe||t===nc?new Gu(t):hm(t)},!em&&Gt(Yt)&&Fe!==Object.prototype)){zu=Fe.then,fm||Wu(Fe,"then",function(e,r){var i=this;return new Pe(function(o,n){je(zu,i,o,n)}).then(e,r)},{unsafe:!0});try{delete Fe.constructor}catch(t){}Ku&&Ku(Fe,Kt)}Zg({global:!0,constructor:!0,wrap:!0,forced:ec},{Promise:Pe});nc=tm.Promise;rm(Pe,Jt,!1,!0);im(Jt)});var Te=u((US,dc)=>{"use strict";dc.exports={}});var pc=u((jS,fc)=>{"use strict";var Im=V(),_m=Te(),Sm=Im("iterator"),Pm=Array.prototype;fc.exports=function(t){return t!==void 0&&(_m.Array===t||Pm[Sm]===t)}});var Zi=u((HS,vc)=>{"use strict";var Tm=nt(),hc=Et(),Em=Ze(),wm=Te(),xm=V(),Am=xm("iterator");vc.exports=function(t){if(!Em(t))return hc(t,Am)||hc(t,"@@iterator")||wm[Tm(t)]}});var mc=u((WS,gc)=>{"use strict";var Om=K(),Cm=oe(),qm=ne(),Rm=et(),km=Zi(),Lm=TypeError;gc.exports=function(t,e){var r=arguments.length<2?km(t):e;if(Cm(r))return qm(Om(r,t));throw new Lm(Rm(t)+" is not iterable")}});var Ic=u((KS,yc)=>{"use strict";var Nm=K(),bc=ne(),$m=Et();yc.exports=function(t,e,r){var i,o;bc(t);try{if(i=$m(t,"return"),!i){if(e==="throw")throw r;return r}i=Nm(i,t)}catch(n){o=!0,i=n}if(e==="throw")throw r;if(o)throw i;return bc(i),r}});var Zt=u((QS,Tc)=>{"use strict";var Dm=it(),Mm=K(),Vm=ne(),Fm=et(),Bm=pc(),Um=ci(),_c=Pt(),jm=mc(),Hm=Zi(),Sc=Ic(),Wm=TypeError,Xt=function(t,e){this.stopped=t,this.result=e},Pc=Xt.prototype;Tc.exports=function(t,e,r){var i=r&&r.that,o=!!(r&&r.AS_ENTRIES),n=!!(r&&r.IS_RECORD),c=!!(r&&r.IS_ITERATOR),l=!!(r&&r.INTERRUPTED),f=Dm(e,i),p,v,a,s,d,h,g,y=function(T){return p&&Sc(p,"normal"),new Xt(!0,T)},S=function(T){return o?(Vm(T),l?f(T[0],T[1],y):f(T[0],T[1])):l?f(T,y):f(T)};if(n)p=t.iterator;else if(c)p=t;else{if(v=Hm(t),!v)throw new Wm(Fm(t)+" is not iterable");if(Bm(v)){for(a=0,s=Um(t);s>a;a++)if(d=S(t[a]),d&&_c(Pc,d))return d;return new Xt(!1)}p=jm(t,v)}for(h=n?t.next:p.next;!(g=Mm(h,p)).done;){try{d=S(g.value)}catch(T){Sc(p,"throw",T)}if(typeof d=="object"&&d&&_c(Pc,d))return d}return new Xt(!1)}});var Oc=u((GS,Ac)=>{"use strict";var Km=V(),wc=Km("iterator"),xc=!1;try{Ec=0,eo={next:function(){return{done:!!Ec++}},return:function(){xc=!0}},eo[wc]=function(){return this},Array.from(eo,function(){throw 2})}catch(t){}var Ec,eo;Ac.exports=function(t,e){try{if(!e&&!xc)return!1}catch(o){return!1}var r=!1;try{var i={};i[wc]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(o){}return r}});var to=u((zS,Cc)=>{"use strict";var Qm=Se(),Gm=Oc(),zm=Me().CONSTRUCTOR;Cc.exports=zm||!Gm(function(t){Qm.all(t).then(void 0,function(){})})});var qc=u(()=>{"use strict";var Ym=$(),Jm=K(),Xm=oe(),Zm=Ve(),eb=Bt(),tb=Zt(),rb=to();Ym({target:"Promise",stat:!0,forced:rb},{all:function(e){var r=this,i=Zm.f(r),o=i.resolve,n=i.reject,c=eb(function(){var l=Xm(r.resolve),f=[],p=0,v=1;tb(e,function(a){var s=p++,d=!1;v++,Jm(l,r,a).then(function(h){d||(d=!0,f[s]=h,--v||o(f))},n)}),--v||o(f)});return c.error&&n(c.value),i.promise}})});var kc=u(()=>{"use strict";var ib=$(),ob=te(),nb=Me().CONSTRUCTOR,io=Se(),ab=ie(),sb=C(),ub=Ne(),Rc=io&&io.prototype;ib({target:"Promise",proto:!0,forced:nb,real:!0},{catch:function(t){return this.then(void 0,t)}});!ob&&sb(io)&&(ro=ab("Promise").prototype.catch,Rc.catch!==ro&&ub(Rc,"catch",ro,{unsafe:!0}));var ro});var Lc=u(()=>{"use strict";var cb=$(),lb=K(),db=oe(),fb=Ve(),pb=Bt(),hb=Zt(),vb=to();cb({target:"Promise",stat:!0,forced:vb},{race:function(e){var r=this,i=fb.f(r),o=i.reject,n=pb(function(){var c=db(r.resolve);hb(e,function(l){lb(c,r,l).then(i.resolve,o)})});return n.error&&o(n.value),i.promise}})});var Nc=u(()=>{"use strict";var gb=$(),mb=Ve(),bb=Me().CONSTRUCTOR;gb({target:"Promise",stat:!0,forced:bb},{reject:function(e){var r=mb.f(this),i=r.reject;return i(e),r.promise}})});var oo=u((oP,$c)=>{"use strict";var yb=ne(),Ib=Q(),_b=Ve();$c.exports=function(t,e){if(yb(t),Ib(e)&&e.constructor===t)return e;var r=_b.f(t),i=r.resolve;return i(e),r.promise}});var Vc=u(()=>{"use strict";var Sb=$(),Pb=ie(),Dc=te(),Tb=Se(),Mc=Me().CONSTRUCTOR,Eb=oo(),wb=Pb("Promise"),xb=Dc&&!Mc;Sb({target:"Promise",stat:!0,forced:Dc||Mc},{resolve:function(e){return Eb(xb&&this===wb?Tb:this,e)}})});var Fc=u(()=>{"use strict";lc();qc();kc();Lc();Nc();Vc()});var Hc=u(()=>{"use strict";var Ab=$(),Ob=te(),er=Se(),Cb=L(),Uc=ie(),jc=C(),qb=_i(),Bc=oo(),Rb=Ne(),ao=er&&er.prototype,kb=!!er&&Cb(function(){ao.finally.call({then:function(){}},function(){})});Ab({target:"Promise",proto:!0,real:!0,forced:kb},{finally:function(t){var e=qb(this,Uc("Promise")),r=jc(t);return this.then(r?function(i){return Bc(e,t()).then(function(){return i})}:t,r?function(i){return Bc(e,t()).then(function(){throw i})}:t)}});!Ob&&jc(er)&&(no=Uc("Promise").prototype.finally,ao.finally!==no&&Rb(ao,"finally",no,{unsafe:!0}));var no});var Kc=u((dP,Wc)=>{"use strict";gs();Fc();Hc();var Lb=Ot();Wc.exports=Lb("Promise","finally")});var Gc=u((fP,Qc)=>{"use strict";var Nb=Kc();Qc.exports=Nb});var so=u((pP,zc)=>{"use strict";var $b=Gc();zc.exports=$b});var Jc=u((hP,Yc)=>{"use strict";var Db=L();Yc.exports=!Db(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})});var tr=u((vP,Zc)=>{"use strict";var Mb=re(),Vb=C(),Fb=Yr(),Bb=Ut(),Ub=Jc(),Xc=Bb("IE_PROTO"),uo=Object,jb=uo.prototype;Zc.exports=Ub?uo.getPrototypeOf:function(t){var e=Fb(t);if(Mb(e,Xc))return e[Xc];var r=e.constructor;return Vb(r)&&e instanceof r?r.prototype:e instanceof uo?jb:null}});var rl=u((gP,tl)=>{"use strict";var Hb=N(),co=re(),Wb=ve(),Kb=li().indexOf,Qb=jt(),el=Hb([].push);tl.exports=function(t,e){var r=Wb(t),i=0,o=[],n;for(n in r)!co(Qb,n)&&co(r,n)&&el(o,n);for(;e.length>i;)co(r,n=e[i++])&&(~Kb(o,n)||el(o,n));return o}});var lo=u((mP,il)=>{"use strict";il.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var fo=u((bP,ol)=>{"use strict";var Gb=rl(),zb=lo();ol.exports=Object.keys||function(e){return Gb(e,zb)}});var po=u((yP,cl)=>{"use strict";var al=M(),Yb=L(),sl=N(),Jb=tr(),Xb=fo(),Zb=ve(),ey=Dr().f,ul=sl(ey),ty=sl([].push),ry=al&&Yb(function(){var t=Object.create(null);return t[2]=2,!ul(t,2)}),nl=function(t){return function(e){for(var r=Zb(e),i=Xb(r),o=ry&&Jb(r)===null,n=i.length,c=0,l=[],f;n>c;)f=i[c++],(!al||(o?f in r:ul(r,f)))&&ty(l,t?[f,r[f]]:r[f]);return l}};cl.exports={entries:nl(!0),values:nl(!1)}});var ll=u(()=>{"use strict";var iy=$(),oy=po().entries;iy({target:"Object",stat:!0},{entries:function(e){return oy(e)}})});var fl=u((SP,dl)=>{"use strict";ll();var ny=ge();dl.exports=ny.Object.entries});var hl=u((PP,pl)=>{"use strict";var ay=fl();pl.exports=ay});var He=u((TP,vl)=>{"use strict";var sy=hl();vl.exports=sy});var bl=u((EP,ml)=>{"use strict";var ho=M(),uy=re(),gl=Function.prototype,cy=ho&&Object.getOwnPropertyDescriptor,vo=uy(gl,"name"),ly=vo&&function(){}.name==="something",dy=vo&&(!ho||ho&&cy(gl,"name").configurable);ml.exports={EXISTS:vo,PROPER:ly,CONFIGURABLE:dy}});var Il=u(yl=>{"use strict";var fy=M(),py=ii(),hy=be(),vy=ne(),gy=ve(),my=fo();yl.f=fy&&!py?Object.defineProperties:function(e,r){vy(e);for(var i=gy(r),o=my(r),n=o.length,c=0,l;n>c;)hy.f(e,l=o[c++],i[l]);return e}});var yo=u((xP,xl)=>{"use strict";var by=ne(),yy=Il(),_l=lo(),Iy=jt(),_y=Si(),Sy=wt(),Py=Ut(),Sl=">",Pl="<",mo="prototype",bo="script",El=Py("IE_PROTO"),go=function(){},wl=function(t){return Pl+bo+Sl+t+Pl+"/"+bo+Sl},Tl=function(t){t.write(wl("")),t.close();var e=t.parentWindow.Object;return t=null,e},Ty=function(){var t=Sy("iframe"),e="java"+bo+":",r;return t.style.display="none",_y.appendChild(t),t.src=String(e),r=t.contentWindow.document,r.open(),r.write(wl("document.F=Object")),r.close(),r.F},rr,ir=function(){try{rr=new ActiveXObject("htmlfile")}catch(e){}ir=typeof document!="undefined"?document.domain&&rr?Tl(rr):Ty():Tl(rr);for(var t=_l.length;t--;)delete ir[mo][_l[t]];return ir()};Iy[El]=!0;xl.exports=Object.create||function(e,r){var i;return e!==null?(go[mo]=by(e),i=new go,go[mo]=null,i[El]=e):i=ir(),r===void 0?i:yy.f(i,r)}});var Po=u((AP,Cl)=>{"use strict";var Ey=L(),wy=C(),xy=Q(),Ay=yo(),Al=tr(),Oy=Ne(),Cy=V(),qy=te(),So=Cy("iterator"),Ol=!1,ae,Io,_o;[].keys&&(_o=[].keys(),"next"in _o?(Io=Al(Al(_o)),Io!==Object.prototype&&(ae=Io)):Ol=!0);var Ry=!xy(ae)||Ey(function(){var t={};return ae[So].call(t)!==t});Ry?ae={}:qy&&(ae=Ay(ae));wy(ae[So])||Oy(ae,So,function(){return this});Cl.exports={IteratorPrototype:ae,BUGGY_SAFARI_ITERATORS:Ol}});var Rl=u((OP,ql)=>{"use strict";var ky=Po().IteratorPrototype,Ly=yo(),Ny=Xe(),$y=st(),Dy=Te(),My=function(){return this};ql.exports=function(t,e,r,i){var o=e+" Iterator";return t.prototype=Ly(ky,{next:Ny(+!i,r)}),$y(t,o,!1,!0),Dy[o]=My,t}});var jl=u((CP,Ul)=>{"use strict";var Vy=$(),Fy=K(),or=te(),Fl=bl(),By=C(),Uy=Rl(),kl=tr(),Ll=mi(),jy=st(),Hy=qe(),To=Ne(),Wy=V(),Nl=Te(),Bl=Po(),Ky=Fl.PROPER,Qy=Fl.CONFIGURABLE,$l=Bl.IteratorPrototype,nr=Bl.BUGGY_SAFARI_ITERATORS,vt=Wy("iterator"),Dl="keys",gt="values",Ml="entries",Vl=function(){return this};Ul.exports=function(t,e,r,i,o,n,c){Uy(r,e,i);var l=function(S){if(S===o&&s)return s;if(!nr&&S&&S in v)return v[S];switch(S){case Dl:return function(){return new r(this,S)};case gt:return function(){return new r(this,S)};case Ml:return function(){return new r(this,S)}}return function(){return new r(this)}},f=e+" Iterator",p=!1,v=t.prototype,a=v[vt]||v["@@iterator"]||o&&v[o],s=!nr&&a||l(o),d=e==="Array"&&v.entries||a,h,g,y;if(d&&(h=kl(d.call(new t)),h!==Object.prototype&&h.next&&(!or&&kl(h)!==$l&&(Ll?Ll(h,$l):By(h[vt])||To(h,vt,Vl)),jy(h,f,!0,!0),or&&(Nl[f]=Vl))),Ky&&o===gt&&a&&a.name!==gt&&(!or&&Qy?Hy(v,"name",gt):(p=!0,s=function(){return Fy(a,this)})),o)if(g={values:l(gt),keys:n?s:l(Dl),entries:l(Ml)},c)for(y in g)(nr||p||!(y in v))&&To(v,y,g[y]);else Vy({target:e,proto:!0,forced:nr||p},g);return(!or||c)&&v[vt]!==s&&To(v,vt,s,{name:o}),Nl[e]=s,g}});var Wl=u((qP,Hl)=>{"use strict";Hl.exports=function(t,e){return{value:t,done:e}}});var wo=u((RP,Yl)=>{"use strict";var Gy=ve(),Eo=di(),Kl=Te(),Gl=Ui(),zy=be().f,Yy=jl(),ar=Wl(),Jy=te(),Xy=M(),zl="Array Iterator",Zy=Gl.set,eI=Gl.getterFor(zl);Yl.exports=Yy(Array,"Array",function(t,e){Zy(this,{type:zl,target:Gy(t),index:0,kind:e})},function(){var t=eI(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,ar(void 0,!0);switch(t.kind){case"keys":return ar(r,!1);case"values":return ar(e[r],!1)}return ar([r,e[r]],!1)},"values");var Ql=Kl.Arguments=Kl.Array;Eo("keys");Eo("values");Eo("entries");if(!Jy&&Xy&&Ql.name!=="values")try{zy(Ql,"name",{value:"values"})}catch(t){}});var Xl=u((kP,Jl)=>{"use strict";var tI=M(),rI=be(),iI=Xe();Jl.exports=function(t,e,r){tI?rI.f(t,e,iI(0,r)):t[e]=r}});var Zl=u(()=>{"use strict";var oI=$(),nI=Zt(),aI=Xl();oI({target:"Object",stat:!0},{fromEntries:function(e){var r={};return nI(e,function(i,o){aI(r,i,o)},{AS_ENTRIES:!0}),r}})});var td=u(($P,ed)=>{"use strict";wo();Zl();var sI=ge();ed.exports=sI.Object.fromEntries});var id=u((DP,rd)=>{"use strict";rd.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 nd=u(()=>{"use strict";wo();var uI=id(),cI=O(),lI=st(),od=Te();for(sr in uI)lI(cI[sr],sr),od[sr]=od.Array;var sr});var sd=u((FP,ad)=>{"use strict";var dI=td();nd();ad.exports=dI});var cd=u((BP,ud)=>{"use strict";var fI=sd();ud.exports=fI});var xd=u(()=>{"use strict";var gI=$(),mI=po().values;gI({target:"Object",stat:!0},{values:function(e){return mI(e)}})});var Od=u((KE,Ad)=>{"use strict";xd();var bI=ge();Ad.exports=bI.Object.values});var qd=u((QE,Cd)=>{"use strict";var yI=Od();Cd.exports=yI});var kd=u((GE,Rd)=>{"use strict";var II=qd();Rd.exports=II});var EI={};Qo(EI,{ApiEnv:()=>Le,ConnectionType:()=>Rt,ContentType:()=>qt,InteractiveInterfaceClick:()=>fi,MediascopePixel:()=>Or,MediascopePixelTypes:()=>jo,OneStat:()=>vr,Quality:()=>Ct,SeekAction:()=>kt,ThinOneStat:()=>xr,VERSION:()=>B});module.exports=gf(EI);var Lo=R(ye(),1);var Mh=(t,e,r)=>{if(typeof t.canParse=="function")return t.canParse(e,r);try{return new t(e,r),!0}catch(i){return!1}},Ua=Mh;var Le=(c=>(c.PROD="prod",c.VK_ALIAS="vk_alias",c.VIDEOTEST="videotest",c.TEST="test",c.OKCDN="okcdn",c.AUTO="auto",c))(Le||{}),Ct=(p=>(p.Q144P="mobile",p.Q240P="lowest",p.Q360P="low",p.Q480P="medium",p.Q720P="high",p.Q1080P="fullhd",p.Q1440P="quadhd",p.Q2160P="ultrahd",p.UNKNOWN="unknown",p))(Ct||{}),qt=(h=>(h.MP4="mp4",h.DASH="dash",h.DASH_SEP="dash_sep",h.ONDEMAND_DASH="ondemand_dash",h.HLS="hls",h.HLS_FMP4="hls_fmp4",h.ONDEMAND_HLS="ondemand_hls",h.WEBM="webm",h.AV1="av1",h.ONDEMAND_DASH_LIVE="ondemand_dash_live",h.ONDEMAND_HLS_LIVE="ondemand_hls_live",h.WEBRTC="webrtc",h.UNKNOWN="unknown",h.RTMP="rtmp",h))(qt||{});var Rt=(i=>(i.HTTP1="http1",i.HTTP2="http2",i.HTTP3="http3",i))(Rt||{});var kt=(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))(kt||{}),fi=(n=>(n.GRAPH_SHOW="iGraphShow",n.GRAPH_HIDE="iGraphHide",n.NEXT_AREA="iNextChapterArea",n.NEXT_BUTTON="iNextChapterBtn",n.WATCH_AGAIN="iWatchAgainBtn",n))(fi||{}),ja={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"},Ha={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"},Wa={unknown:"un",mobile:"m",lowest:"ls",low:"l",medium:"md",high:"h",fullhd:"f",quadhd:"q",ultrahd:"u"},Ka={pip:"pi",fullscreen:"fs",external:"ex",prefetch:"pr",airplay:"ap",chromecast:"cc",invisible:"iv",minimal:"minimal"};var Ga=require("@vkontakte/videoplayer-shared/es2015");var Qa="CIOPGQJGDIHBABABA",pi={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 Vh={apiEnv:"vk_alias",apiKey:Qa,apiBaseUrl:null,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,useVKComIsMobileLogic:!1,backoff:{start:1e3,factor:1.5,max:5*60*1e3,random:.1},useKeepalive:!1,watchCoverageTimeoutFix:!1},za=t=>(0,Ga.fillWithDefault)(t,Vh);function hi(){let t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),e=new Array(36),r=0,i,o;for(o=0;o<36;o++)o===8||o===13||o===18||o===23?e[o]="-":o===14?e[o]="4":(r<=2&&(r=33554432+Math.random()*16777216|0),i=r&15,r=r>>4,e[o]=t[o===19?i&3|8:i]);return e.join("")}var b=require("@vkontakte/videoplayer-shared/es2015"),gr=require("@vkontakte/videoplayer-shared/es2015");var vs=R($t(),1);var hv=()=>(0,vs.default)(Math.floor(Math.random()*Ae(2,32)).toString(36),13,"0"),fe=class t{static getVSID(){return t.vsid}static generateVSID(){return t.vsid=hv(),t.vsid}};var ur=R(so(),1);var ld=R(He(),1),dd=R(cd(),1);var fd=t=>{var o;let{operation:e,custom:r}=t,i=(0,dd.default)((0,ld.default)(r).map(([n,c])=>{var p,v,a;let l=(p=Ha[n])!=null?p:n,f=c;return c&&(n==="mode"?f=(v=Ka[c])!=null?v:c:n==="quality"&&(f=(a=Wa[c])!=null?a:c)),[l,f]}));return de(x({},t),{operation:(o=ja[e])!=null?o:e,custom:i})};var B="1.0.96-dev.9ccdb215.0";var Y=require("@vkontakte/videoplayer-shared/es2015");var pI=/Mobile|mini|Fennec|Android|iP(ad|od|hone)|opera (mini|mobi)/i,mt=class{constructor(e){this.consequentAuthErrors=0;this.authorized$=new Y.ValueSubject(!1);this.params=e}authorize(e){return A(this,null,function*(){return this.authToken=e!=null?e:yield this.refreshAuthToken(),this._authorizeWithBackoff()})}logBeacon(e){let r="log.externalLog",i=this.createLogParams(e),o=this.sessionKey;if(!o)return;this.params.apiTransport.sendBeacon(r,i,o)||this.logRequest(e).catch(()=>{})}logRequest(e){return A(this,null,function*(){var c;let r="log.externalLog",i=this.createLogParams(e),o=(c=this.sessionKey)!=null?c:yield this._authorizeWithBackoff();if(!o)return;let n=(p,...v)=>A(this,[p,...v],function*(l,f=this.params.config.requestRetryCount){try{return yield this.params.apiTransport.sendRequest(r,i,o)}catch(a){if(!a||!("error_code"in a)){this.params.error$.next({id:"logRequestUnknown",category:Y.ErrorCategory.NETWORK,message:`Unknown ${r} error`,thrown:a});return}let s=a==null?void 0:a.error_code;switch(s){case 102:case 103:case 104:return this.authorized$.next(!1),this.sessionKey=yield this._authorizeWithBackoff(),f>0?n(l,f-1):void 0;case 401:return this.authorized$.next(!1),this.authToken=yield this.refreshAuthToken(),this.sessionKey=yield this._authorizeWithBackoff(),f>0?n(l,f-1):void 0;default:{this.params.error$.next({id:`LogRequest#${s}`,category:Y.ErrorCategory.EXTERNAL_API,message:`${r} error`,data:a});return}}}});return n(e)})}destroy(){window.clearTimeout(this.backoffTimeoutId),this.backoffTimeoutId=0}refreshAuthToken(){return A(this,null,function*(){if(this.params.refreshAuthToken)return this.refreshAuthTokenPromise||(this.refreshAuthTokenPromise=(0,ur.default)(this.params.refreshAuthToken(),()=>{this.refreshAuthTokenPromise=void 0})),this.refreshAuthTokenPromise})}createLogParams(e){let r="WEB",i=!1,o=`@vkontakte/videoplayer-statistics:${B}`;if(this.params.config.useVKComIsMobileLogic){let{appVersion:n}=window.navigator;i=pI.test(n)}else this.params.mobile&&(i=!0);return i&&(r="M_WEB"),this.params.vktvVersion&&(r="SMART_TV",o=this.params.vktvVersion),{collector:"ok.mobile.apps.video",data:JSON.stringify({application:o,platform:r,items:this.params.config.shorten?e.map(fd):e})}}_authorizeWithBackoff(){if(!this.consequentAuthErrors)return this._authorize();let e=(0,Y.getExponentialDelay)(this.consequentAuthErrors,this.params.config.backoff);return new Promise(r=>{this.backoffTimeoutId||(this.backoffTimeoutId=window.setTimeout(()=>{(0,ur.default)(this._authorize().then(r).catch(i=>this.params.error$.next({id:"AuthorizeBackoff",category:Y.ErrorCategory.NETWORK,message:"Otherwise unhandled error in authorization",thrown:i})),()=>this.backoffTimeoutId=0)},e))})}_authorize(){return A(this,null,function*(){if(this.authorizePromise)return this.authorizePromise;this.sessionKey=void 0,this.authorized$.next(!1);let e="auth.anonymLogin",r={session_data:{version:2,device_id:this.params.deviceId,client_version:B.split("-")[0],client_type:"SDK_JS"}};return this.authToken!==void 0&&(r.session_data.auth_token=this.authToken,r.session_data.version=3),this.authorizePromise=(0,ur.default)(this.params.apiTransport.sendRequest(e,r).then(i=>{var o;return(!i||!i.session_key)&&this.params.error$.next({id:"AuthorizeFailed",category:Y.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=>A(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:Y.ErrorCategory.EXTERNAL_API,message:"authorize error",data:i}):this.params.error$.next({id:"AuthorizeUnknown",category:Y.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{NativeAbortSignal:tT,NativeAbortController:rT}=function(t){return{NativeAbortSignal:t.AbortSignal,NativeAbortController:t.AbortController}}(typeof self!="undefined"?self:global);function pd(t){let e;try{e=new Event("abort")}catch(r){typeof document!="undefined"?document.createEvent?(e=document.createEvent("Event"),e.initEvent("abort",!1,!1)):(e=document.createEventObject(),e.type="abort"):e={type:"abort",bubbles:!1,cancelable:!1}}return e.reason=t,e}function hd(t){if(t===void 0)if(typeof document=="undefined")t=new Error("This operation was aborted"),t.name="AbortError";else try{t=new DOMException("signal is aborted without reason"),Object.defineProperty(t,"name",{value:"AbortError"})}catch(e){t=new Error("This operation was aborted"),t.name="AbortError"}return t}var cr=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(e,r,i){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:r,options:i})}removeEventListener(e,r){if(!(e in this.listeners))return;let i=this.listeners[e];for(let o=0,n=i.length;o<n;o++)if(i[o].callback===r){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,n=i.length;o<n;o++){let c=i[o];try{c.callback.call(this,e)}catch(l){Promise.resolve().then(()=>{throw l})}c.options&&c.options.once&&this.removeEventListener(e.type,c.callback)}return!e.defaultPrevented}},We=class extends cr{constructor(){super(),this.listeners||cr.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)}throwIfAborted(){let{aborted:e,reason:r="Aborted"}=this;if(e)throw r}static timeout(e){let r=new Ee;return setTimeout(()=>r.abort(new DOMException(`This signal is timeout in ${e}ms`,"TimeoutError")),e),r.signal}static any(e){let r=new Ee;function i(){r.abort(this.reason),o()}function o(){for(let n of e)n.removeEventListener("abort",i)}for(let n of e)if(n.aborted){r.abort(n.reason);break}else n.addEventListener("abort",i);return r.signal}},Ee=class{constructor(){Object.defineProperty(this,"signal",{value:new We,writable:!0,configurable:!0})}abort(e){let r=hd(e),i=pd(r);this.signal.reason=r,this.signal.dispatchEvent(i)}toString(){return"[object AbortController]"}};typeof Symbol!="undefined"&&Symbol.toStringTag&&(Ee.prototype[Symbol.toStringTag]="AbortController",We.prototype[Symbol.toStringTag]="AbortSignal");function lr(t){return t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof t.Request=="function"&&!t.Request.prototype.hasOwnProperty("signal")||!t.AbortController}function xo(t){typeof t=="function"&&(t={fetch:t});let{fetch:e,Request:r=e.Request,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o=!1}=t;if(!lr({fetch:e,Request:r,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o}))return{fetch:e,Request:n};let n=r;(n&&!n.prototype.hasOwnProperty("signal")||o)&&(n=function(p,v){let a;v&&v.signal&&(a=v.signal,delete v.signal);let s=new r(p,v);return a&&Object.defineProperty(s,"signal",{writable:!1,enumerable:!1,configurable:!0,value:a}),s},n.prototype=r.prototype);let c=e;return{fetch:(f,p)=>{let v=n&&n.prototype.isPrototypeOf(f)?f.signal:p?p.signal:void 0;if(v){let a;try{a=new DOMException("Aborted","AbortError")}catch(d){a=new Error("Aborted"),a.name="AbortError"}if(v.aborted)return Promise.reject(a);let s=new Promise((d,h)=>{v.addEventListener("abort",()=>h(a),{once:!0})});return p&&p.signal&&delete p.signal,Promise.race([s,c(f,p)])}return c(f,p)},Request:n}}var q=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window;var hI=()=>"fetch"in q,bt=hI()&&lr({fetch:q.fetch,Request:q.Request,AbortController:q.AbortController}),vd=bt?xo({fetch:q.fetch,Request:q.Request,AbortController:q.AbortController}):void 0,Ke=bt?vd.fetch:q.fetch,hT=bt?vd.Request:q.Request,vT=bt?Ee:q.AbortController,gT=bt?We:q.AbortSignal;var gd=R(ye(),1),md=R(He(),1),se=require("@vkontakte/videoplayer-shared/es2015");var yt=class{constructor(e){var r;this.params=e,this.apiKey=e.config.apiKey,this.apiEnv=e.config.apiEnv,this.apiBaseUrl=(r=e.config.apiBaseUrl)!=null?r:pi[this.apiEnv],this.timeSynchronisation=e.timeSynchronisation,this.isApiBaseUrlFetched=!1}resolveApiBaseUrl(){return A(this,null,function*(){var e;if(this.apiEnv!=="auto"||this.isApiBaseUrlFetched)return this.apiBaseUrl;try{let r=atob("aHR0cHM6Ly9kbnMuZ29vZ2xlL3Jlc29sdmU/bmFtZT12aWRlby5fZW5kcG9pbnQub2sucnUmdHlwZT1UWFQ="),o=yield(yield Ke(r,{method:"GET",mode:"cors",cache:"no-cache"})).json(),n=(e=o==null?void 0:o.Answer[0])==null?void 0:e.data;if(!n)throw new Error("Wrong DNS response");return n}catch(r){return this.params.error$.next({id:"OneStat:ApiTransport:resolveApiBaseUrl",category:se.ErrorCategory.NETWORK,message:"Unhandled resolve api base url error",thrown:r}),pi.vk_alias}finally{this.isApiBaseUrlFetched=!0}})}sendBeacon(e,r,i){if(!window.Blob||!window.navigator.sendBeacon)return!1;let o=this._prepareQueryParams({method:e,queryParams:r,sessionKey:i}),n=new window.Blob([o.toString()],{type:"application/x-www-form-urlencoded"});try{return window.navigator.sendBeacon(`${this.apiBaseUrl}/fb.do`,n)}catch(c){this.params.error$.next({id:"OneStat:ApiTransport:sendBeacon",category:se.ErrorCategory.NETWORK,message:"Unhandled beacon error",thrown:c,data:{method:e,params:r}})}return!1}sendRequest(e,r,i){return A(this,null,function*(){let o=(0,se.now)(),n=l=>{if(l instanceof TypeError&&(0,gd.default)(["Failed to fetch","NetworkError when attempting to fetch resource."],l.message)){this.params.error$.next({id:"Network",category:se.ErrorCategory.NETWORK,message:"Request failed",thrown:l});return}this.params.error$.next({id:"OneStat:ApiTransport:sendRequest",category:se.ErrorCategory.NETWORK,message:"Unhandled request error",thrown:l,data:{method:e,params:r,sessionKey:i,time:(0,se.now)()-o}})};this.apiBaseUrl=yield this.resolveApiBaseUrl();let c={method:"post",headers:{"Content-type":"application/x-www-form-urlencoded"},body:this._prepareQueryParams({method:e,queryParams:r,sessionKey:i})};return this.params.config.useKeepalive&&(c.keepalive=!0),Ke(`${this.apiBaseUrl}/fb.do`,c).then(l=>{var a,s;let f=Number(l.headers.get("content-length"))===0,p=new Date((a=l.headers.get("date"))!=null?a:"").getTime(),v=(0,se.now)()-o;if(isFinite(p)&&((s=this.timeSynchronisation)==null||s.addServerTime(p,v)),!f)return l.json().then(d=>Object.prototype.hasOwnProperty.call(d,"error_msg")?Promise.reject(d):d,n)},n)})}_prepareQueryParams(e){let r=new URLSearchParams({format:"JSON",method:e.method,application_key:this.apiKey});return e.sessionKey!==void 0&&r.append("session_key",e.sessionKey),(0,md.default)(e.queryParams).forEach(([i,o])=>r.append(i,typeof o=="string"?o:JSON.stringify(o))),r}};var bd=R(ye(),1),yd=R(He(),1),U=require("@vkontakte/videoplayer-shared/es2015");var dr="onestat_events",Ao=t=>e=>e.timestamp+t>=(0,U.now)(),fr=class{constructor(e){this.unsaltedStorage=[];this.isPaused=!1;this.isUrgent=e=>{let{operation:r}=e;return(0,bd.default)(["action_play","watch_coverage_record","watch_coverage_live"],r)};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 r=U.safeStorage.isPersistent()?this.params.config.flushMaxWait:0;this.debouncedFlush=(0,U.debounceFn)(()=>this.safeFlush(),this.params.config.flushDebounceTime,{maxWait:r}),this.subscription=this.api.authorized$.subscribe(i=>{i&&this.debouncedFlush()}),this.housekeepStorage()}safeFlush(){try{this.flush()}catch(e){this.error$.next({id:"LoggerError",category:U.ErrorCategory.WTF,message:e?String(e):"Unknown logger error",thrown:e})}}readFromStorage(){let e=U.safeStorage.get(dr);try{return e?JSON.parse(e):{}}catch(r){}return{}}addToStorage(e){var n;if(!this.userSalt){this.unsaltedStorage.push(e);return}let r=this.readFromStorage(),o=((n=r[this.userSalt])!=null?n:[]).filter(Ao(this.params.config.storageExpiration));U.safeStorage.set(dr,JSON.stringify(de(x({},r),{[this.userSalt]:[...o,e]})))}getFromStorage(){var i;return this.userSalt?((i=this.readFromStorage()[this.userSalt])!=null?i:[]).filter(Ao(this.params.config.storageExpiration)):this.unsaltedStorage}markStorageSent(){if(!this.userSalt){this.unsaltedStorage=[];return}let e=this.readFromStorage();delete e[this.userSalt],U.safeStorage.set(dr,JSON.stringify(e))}housekeepStorage(){let e=this.readFromStorage();for(let[r,i]of(0,yd.default)(e)){let o=i.filter(Ao(this.params.config.storageExpiration));o.length?e[r]=o:delete e[r],this.loggerDebugLog({message:`${i.length} retrieved from storage, ${o.length} of them actual`})}U.safeStorage.set(dr,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:r}={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)),r&&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 _=require("@vkontakte/videoplayer-core/es2015"),Oo=require("@vkontakte/videoplayer-shared/es2015");var Id=t=>t&&{[_.VideoQuality.INVARIANT]:"unknown",[_.VideoQuality.Q_144P]:"mobile",[_.VideoQuality.Q_240P]:"lowest",[_.VideoQuality.Q_360P]:"low",[_.VideoQuality.Q_480P]:"medium",[_.VideoQuality.Q_576P]:"unknown",[_.VideoQuality.Q_720P]:"high",[_.VideoQuality.Q_1080P]:"fullhd",[_.VideoQuality.Q_1440P]:"quadhd",[_.VideoQuality.Q_2160P]:"ultrahd",[_.VideoQuality.Q_4320P]:"unknown"}[t],Co=t=>t&&{[_.HttpConnectionType.HTTP1]:"http1",[_.HttpConnectionType.HTTP2]:"http2",[_.HttpConnectionType.QUIC]:"http3"}[t],_d=t=>{if(t!==void 0)switch(t){case _.VideoFormat.MPEG:return"mp4";case _.VideoFormat.DASH:case _.VideoFormat.DASH_LIVE:case _.VideoFormat.DASH_STREAMS:return"dash";case _.VideoFormat.DASH_SEP:return"dash_sep";case _.VideoFormat.DASH_ONDEMAND:return"ondemand_dash";case _.VideoFormat.DASH_WEBM:case _.VideoFormat.DASH_LIVE_WEBM:return"webm";case _.VideoFormat.DASH_WEBM_AV1:return"av1";case _.VideoFormat.DASH_LIVE_CMAF:return"ondemand_dash_live";case _.VideoFormat.HLS:case _.VideoFormat.HLS_LIVE:return"hls";case _.VideoFormat.HLS_FMP4:return"hls_fmp4";case _.VideoFormat.HLS_ONDEMAND:return"ondemand_hls";case _.VideoFormat.HLS_LIVE_CMAF:return"ondemand_hls_live";case _.VideoFormat.WEB_RTC_LIVE:return"webrtc";default:return(0,Oo.assertNever)(t)}},qo=(t,e)=>{if(e)return"minimal";switch(t){case void 0:case _.Surface.NONE:case _.Surface.INLINE:return;case _.Surface.FULLSCREEN:return"fullscreen";case _.Surface.SECOND_SCREEN:return"chromecast";case _.Surface.PIP:return"pip";case _.Surface.INVISIBLE:return"invisible";default:return(0,Oo.assertNever)(t)}},Sd=t=>{switch(t){case"slow-2g":return"poor";case"2g":return"poor";case"3g":return"good";case"4g":return"excellent"}};var pr=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 r;return e.setTime(e.getTime()+((r=this.offset)!=null?r:0)),e}addServerTime(e,r){let i=Date.now(),o=e-i-r/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 Pd=R($t(),1);var Td=()=>(0,Pd.default)(Math.floor(Math.random()*Ae(2,64)).toString(36),13,"0");var Ro=require("@vkontakte/videoplayer-core/es2015"),w=require("@vkontakte/videoplayer-shared/es2015"),Ed=(t,e)=>new w.Observable(r=>{let i=new w.Subscription,o=(0,w.merge)((0,w.fromEvent)(window,"beforeunload"),t.events.willDestruct$),n=new w.ValueSubject(void 0),c;i.add(t.info.isLive$.pipe((0,w.filterChanged)()).subscribe(P=>{c&&(c.unsubscribe(),n.next(void 0)),P?c=t.info.liveTime$.pipe((0,w.map)(k=>k&&k/1e3)).subscribe(n):c=t.info.position$.subscribe(n),i.add(c)}));let{playing$:l,paused$:f}=t.events,p=t.events.willSeek$.pipe((0,w.filter)(()=>t.info.playbackState$.getValue()===Ro.PlaybackState.PLAYING)),v=t.events.seeked$.pipe((0,w.filter)(()=>t.info.playbackState$.getValue()===Ro.PlaybackState.PLAYING)),a=!1,s=new w.Subject;i.add(p.subscribe(()=>{a||s.next(),a=!0})),i.add(v.subscribe(()=>a=!1));let d=new w.Subject,h=new w.Subject,g=(0,w.merge)(l,v,d),y=(0,w.merge)(f,s,o,t.events.looped$,h),S,T=()=>S=n.getValue(),D=()=>{let P=n.getValue();(0,w.isNullable)(S)||S===P||(0,w.isNullable)(P)||(r.next({from:S,to:P}),S=void 0)},H=()=>{h.next(),d.next()};if(i.add(g.subscribe(T)),i.add(y.subscribe(D)),e.forceInterval&&isFinite(e.forceInterval))if(e.watchCoverageTimeoutFix){let P,k=()=>{P!==void 0&&(window.clearTimeout(P),P=void 0)};i.add(g.subscribe(()=>{k(),P=window.setTimeout(H,e.forceInterval)})),i.add(y.subscribe(()=>k())),i.add(()=>k())}else{let P=0;i.add(g.subscribe(()=>P=window.setTimeout(H,e.forceInterval))),i.add(y.subscribe(()=>window.clearTimeout(P)))}return i});var J=require("@vkontakte/videoplayer-core/es2015"),Qe=require("@vkontakte/videoplayer-shared/es2015"),hr=(t,e,r)=>{let i=new Qe.Subject,o=i.pipe((0,Qe.debounce)(0),(0,Qe.filterChanged)()),n=!1,c=!1,l=!1;return e(t.inPiP$,f=>{n=f,i.next(f?J.Surface.PIP:c?J.Surface.FULLSCREEN:l?J.Surface.INLINE:void 0)}),e(t.inFullscreen$,f=>{c=f,i.next(f?J.Surface.FULLSCREEN:n?J.Surface.PIP:l?J.Surface.INLINE:void 0)}),r&&e(r.info.surface$,f=>{switch(f){case J.Surface.SECOND_SCREEN:case J.Surface.NONE:case J.Surface.INLINE:{!c&&!n&&(f===J.Surface.INLINE&&(l=!0),i.next(f));break}}}),{surface$:o}};var vI="_one-stat_",wd=`${vI}deviceId`,ko=()=>{let t=new b.Subscription;return{subscription:t,subscribe:(e,r)=>{e&&t.add(e.subscribe(r))}}},vr=class{constructor(e,r){this.subscription=new b.Subscription;this.debugLogger=new gr.Logger;this.oneStatDebugLog=this.debugLogger.createComponentLog("onestat");this.loopCounter=0;this.disabled=!1;this.isid$=new b.ValueSubject(void 0);this.zenUid$=new b.ValueSubject(void 0);this.seekAction$=new b.ValueSubject("unknown");var f,p,v;this.statContext=e,this.config=za((f=r.config)!=null?f:{}),(0,b.isNonNullable)(r.apiEnv)&&(this.config.apiEnv=r.apiEnv),this.config.synchronizeTime&&(this.timeSynchronisation=new pr);let i=new b.Subject;this.experimental={error$:i};let o=b.safeStorage.get(wd);this.statContext.deviceId?this.deviceId=this.statContext.deviceId:o?this.deviceId=o:(this.deviceId=hi(),b.safeStorage.set(wd,this.deviceId)),this.resetViewSession(),r.useIsid&&this.isid$.next((p=r.isid)!=null?p:Td()),this.zenUid$.next(r.zenUid);let n=new yt({config:this.config,error$:i,timeSynchronisation:this.timeSynchronisation});this.api=new mt({config:this.config,apiTransport:n,refreshAuthToken:r.refreshAuthToken,mobile:(v=this.statContext.mobile)!=null?v:!1,deviceId:this.deviceId,error$:i,vktvVersion:r.vktvVersion}),this.logger=new fr({config:this.config,debugLogger:this.debugLogger,api:this.api,error$:i,userSalt:r.userSalt});let{isEmbed:c,topOrigin:l}=(0,gr.detectEmbed)();this.isEmbed=c,this.embedParent=l?new URL(l).hostname:void 0,this.subscribe()}get vsid$(){return new b.ValueSubject(fe.getVSID())}updateContext(e){this.statContext=x(x({},this.statContext),e)}attachTo(e){let r=new b.Subscription,i=(s,d)=>r.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(Ed(e,{forceInterval:this.config.watchCoverageInterval,watchCoverageTimeoutFix:this.config.watchCoverageTimeoutFix}),s=>{var y,S,T,D;let d=e.info.isLive$.getValue(),h=e.info.atLiveEdge$.getValue(),g={start:parseFloat(s.from.toFixed(3)),end:parseFloat(s.to.toFixed(3))};if(h){let H=(y=e.info.liveLatency$.getValue())!=null?y:0,P=(T=(S=e.info.currentBuffer$.getValue())==null?void 0:S.end)!=null?T:0,k=(D=e.info.liveBufferTime$.getValue())!=null?D:0,ce=Math.round((H-(P-k))*1e3),le=Math.round(H*1e3);ce&&le&&(g.latency=ce,g.bufferLatency=le)}d?this.logWatchCoverageLive(g):this.logWatchCoverageRecord(g)});let o;i(e.info.isStalled$,s=>{s?o=(0,b.now)():((0,b.isNonNullable)(o)&&this.logEmptyBuffer({duration:(0,b.now)()-o}),o=void 0)});let n=!1;r.add(e.events.fatalError$.pipe((0,b.once)()).subscribe(()=>n=!0)),i(e.events.willStop$,()=>{if(e.info.isStalled$.getValue()){let d=(0,b.isNonNullable)(o)?(0,b.now)()-o:void 0;this.logCloseAtEmptyBuffer({duration:d!=null?d:0}),o=void 0}else n||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 c,l,f=!1;i(e.events.firstBytes$,s=>{c=(0,b.now)(),this.logFirstBytes({time:s})}),i(e.events.willStart$,()=>l=(0,b.now)()),i(e.info.currentBuffer$,s=>{!f&&s&&s.end-s.start>0&&(0,b.isNonNullable)(c)&&(this.logPlayerReady({duration:(0,b.now)()-c}),f=!0)}),i(e.events.firstFrame$,()=>{(0,b.isNonNullable)(c)&&!f&&(this.logPlayerReady({duration:(0,b.now)()-c}),f=!0),(0,b.isNonNullable)(l)&&this.logFirstFrame({time:(0,b.now)()-l})});let p;i(e.info.currentVideoStream$,s=>{s&&(p&&s.id!==p&&this.logTrackSwitch(s),p=s.id)});let v;i(e.info.currentAudioStream$,s=>{s&&(v&&s.id!==v&&this.logTrackSwitch(s),v=s.id)}),i(e.info.atLiveEdge$,s=>this.updateContext({liveEdge:s})),i((0,b.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=Id(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:_d(s)})),i(e.info.currentPlaybackRate$,s=>this.updateContext({rate:s})),i(e.info.is3DVideo$,s=>this.updateContext({is3d:s}));let a;return i(e.info.hostname$,s=>{let d=a!==void 0&&a!==s;this.updateContext({cdnHostname:s,failover:d}),d&&this.logFailover(s),a=s}),i(e.info.throughputEstimation$,s=>this.updateContext({downloadSpeed:s})),i(e.info.httpConnectionType$,s=>{this.statContext.firstConnectionType||this.updateContext({firstConnectionType:Co(s)}),this.updateContext({connectionType:Co(s)})}),i(e.info.httpConnectionReused$,s=>{(0,b.isNullable)(this.statContext.firstConnectionReused)&&this.updateContext({firstConnectionReused:s}),this.updateContext({connectionReused:s})}),i(e.info.surface$,s=>{this.uiEvents||this.updateContext({mode:qo(s,this.statContext.isPreviewPlayerView)})}),i((0,b.combine)({current:e.info.currentTextTrack$,available:e.info.availableTextTracks$}),({current:s,available:d})=>{let h=d.find(({id:y})=>y===s),g=h&&(h.isAuto?`${h.language}_auto`:h.language);this.updateContext({subtitles:g==null?void 0:g.split(".")[0]})}),this.player=e,this.uiEvents&&this.attachToUi(this.uiEvents),this.resubscribeBeforeunload(),this.subscription.add(r),r}attachToUi(e){this.uiEvents=e;let{subscription:r,subscribe:i}=ko();if(!this.player)return r;i(e.actionRewind$,()=>{this.player&&(this.resetViewSession(),this.logActionPlay({position:this.player.info.position$.getValue()}))}),i(e.actionSeek$,this.seekAction$);let{surface$:o}=hr(this.uiEvents,i,this.player);return i(o,n=>{this.updateContext({mode:qo(n,this.statContext.isPreviewPlayerView)})}),i(e.actionSetSubtitle$,n=>this.updateContext({subtitles:n==null?void 0:n.split(".")[0]})),i(e.nextMovie$,n=>this.logNextMovie(n)),this.resubscribeBeforeunload(),this.subscription.add(r),r}attachToAds(e){let{subscription:r,subscribe:i}=ko();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(r),r}attachToInteractive(e){let{subscription:r,subscribe:i}=ko();return i(e.click$,o=>this.logInterfaceClick(o)),i(e.nextMovie$,o=>this.logNextMovie(o)),this.resubscribeBeforeunload(),this.subscription.add(r),r}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"}),fe.generateVSID()}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 n,c;let r=(c=(n=this.timeSynchronisation)==null?void 0:n.getOffset())!=null?c:0,i=e.start+r,o=e.end+r;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,b.merge)((0,b.fromEvent)(e,"change"),(0,b.observableFrom)(["init"])).subscribe(()=>this.updateContext({network:Sd(e.effectiveType)}))),this.config.debugLog&&this.debugLogger.log$.subscribe(r=>{console.debug("%c stat ","background:#fa6470;",`component: ${r.component}.`,r.message)})}resubscribeBeforeunload(){var e;(e=this.beforeunloadSubscription)==null||e.unsubscribe(),this.beforeunloadSubscription=(0,b.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,r={}){if(this.disabled){this.oneStatDebugLog({message:`operation ${e.operation} but statistics is disabled`});return}if((0,Lo.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,r);this.logger.log(i)}createLogItem({operation:e,param:r,time:i},o={}){var d,h;let n=(h=(d=this.timeSynchronisation)==null?void 0:d.now())!=null?h:(0,b.now)(),c=this.vsid$.getValue();(0,b.assertNonNullable)(c);let l=this.isid$.getValue(),f=e==="empty_buffer"||e==="close_at_empty_buffer"?this.statContext.connectionType:this.statContext.firstConnectionType,p=this.statContext.firstConnectionReused,v,a;if(this.isEmbed||this.statContext.place==="embed"){v=this.embedParent;let g=[...new URLSearchParams(location.search).entries()].filter(([y,S])=>(0,Lo.default)(this.config.embedUrlParams,y));a=new URLSearchParams(g).toString()}else if(this.statContext.place==="direct"){let g=this.statContext.refDomain||document.referrer;g&&Ua(URL,g)?v=new URL(g).hostname:v=g,a=location.href.substring(0,1024)}let s=x({vsid:c,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:r,vk_app_id:this.statContext.vkAppId,track_code:this.statContext.trackCode,connection_type:f,connection_reused:p===!0?1:p===!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:v,direct_url:a,rate:this.statContext.rate===1||(0,b.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 g of this.config.disabledCustomFields)delete s[g];return{operation:e,type:1,time:i,network:this.statContext.network,timestamp:n,custom:s}}};var xr={};Qo(xr,{ActionSeekType:()=>mr,ThinOneStat:()=>wr,VERSION:()=>B});var Zd=R(kd(),1),ef=R(ye(),1),m=require("@vkontakte/videoplayer-shared/es2015"),ee=require("@vkontakte/videoplayer-core/es2015");var $d=require("@vkontakte/videoplayer-shared/es2015");var No=(i=>(i.AUTO="auto",i.AUTO_POOR="auto_poor",i.AUTO_RICH="auto_rich",i))(No||{});var mr=(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))(mr||{});var Nd="CIOPGQJGDIHBABABA",$o={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 _I={apiKey:Nd,apiEnv:"okcdn",apiBaseUrl:null,requestRetryCount:1,firstFlushTime:5e3,flushDebounceTime:1e4,flushMaxWait:6e4,storageExpiration:36*60*60*1e3,watchCoverageHeartbeatInterval:30,synchronizeTime:!0,useBeacon:!1,alwaysSendDesktop:!1,watchedNFirstTvtLog:1e3,watchedNDefaultTargetDuration:1e4},Dd=t=>(0,$d.fillWithDefault)(t,_I);var Do=R(so(),1),X=require("@vkontakte/videoplayer-shared/es2015");var br=class{constructor(e){this.params=e,this.authorized$=new X.ValueSubject(!1),this.consequentAuthErrors=0}authorize(e){return A(this,null,function*(){return this.authToken=e!=null?e:yield this.refreshAuthToken(),this.authorizeWithBackoff()})}logBeacon(e){let r="log.logUvStat",i=this.createLogParams(e),o=this.sessionKey;if(!o)return;this.params.apiTransport.sendBeacon(r,i,o)||this.logRequest(e).catch(()=>{})}logRequest(e){return A(this,null,function*(){var l;let r="log.logUvStat",i=this.createLogParams(e),o={},n=(l=this.sessionKey)!=null?l:yield this.authorizeWithBackoff();if(!n)return;let c=(v,...a)=>A(this,[v,...a],function*(f,p=this.params.config.requestRetryCount){try{return yield this.params.apiTransport.sendRequest(r,i,n,o)}catch(s){if(!s||!("error_code"in s)){this.params.error$.next({id:"logRequestUnknown",category:X.ErrorCategory.NETWORK,message:`Unknown ${r} error`,thrown:s});return}let d=s==null?void 0:s.error_code;switch(d){case 102:case 103:case 104:return this.authorized$.next(!1),this.sessionKey=yield this.authorizeWithBackoff(),p>0?c(f,p-1):void 0;case 401:return this.authorized$.next(!1),this.authToken=yield this.refreshAuthToken(),this.sessionKey=yield this.authorizeWithBackoff(),p>0?c(f,p-1):void 0;default:{this.params.error$.next({id:`LogRequest#${d}`,category:X.ErrorCategory.EXTERNAL_API,message:`${r} error`,data:s});return}}}});return c(e)})}destroy(){window.clearTimeout(this.backoffTimeoutId),this.backoffTimeoutId=0}refreshAuthToken(){return A(this,null,function*(){if(this.params.refreshAuthToken)return this.refreshAuthTokenPromise||(this.refreshAuthTokenPromise=(0,Do.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:${B}`,platform:e[0].platform,product:e[0].product,events:e})}}authorizeWithBackoff(){if(!this.consequentAuthErrors)return this.doAuthorize();let e=(0,X.getExponentialDelay)(this.consequentAuthErrors);return new Promise(r=>{this.backoffTimeoutId||(this.backoffTimeoutId=window.setTimeout(()=>A(this,null,function*(){try{let i=yield this.doAuthorize();r(i)}catch(i){this.params.error$.next({id:"AuthorizeBackoff",category:X.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",r={session_data:{version:2,device_id:this.params.deviceId,client_version:B.split("-")[0],client_type:"SDK_JS"}};return this.authToken!==void 0&&(r.session_data.auth_token=this.authToken,r.session_data.version=3),this.authorizePromise=(0,Do.default)(this.params.apiTransport.sendRequest(e,r).then(i=>{var o;return(!i||!i.session_key)&&this.params.error$.next({id:"AuthorizeFailed",category:X.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=>A(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:X.ErrorCategory.EXTERNAL_API,message:"authorize error",data:i}):this.params.error$.next({id:"AuthorizeUnknown",category:X.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 Md=R(ye(),1);var Vd=R(He(),1),ue=require("@vkontakte/videoplayer-shared/es2015");var yr=class{constructor(e){var r;this.params=e,this.apiKey=e.config.apiKey,this.apiEnv=e.config.apiEnv,this.apiBaseUrl=(r=e.config.apiBaseUrl)!=null?r:$o[this.apiEnv],this.timeSynchronisation=e.timeSynchronisation,this.isApiBaseUrlFetched=!1}sendBeacon(e,r,i){if(!window.Blob||!window.navigator.sendBeacon)return!1;let o=this.prepareQueryParams({method:e,queryParams:r,sessionKey:i}),n=new window.Blob([o.toString()],{type:"application/x-www-form-urlencoded"});try{return window.navigator.sendBeacon(`${this.apiBaseUrl}/fb.do`,n)}catch(c){this.params.error$.next({id:"OneStat:ApiTransport:sendBeacon",category:ue.ErrorCategory.NETWORK,message:"Unhandled beacon error",thrown:c,data:{method:e,params:r}})}return!1}sendRequest(e,r,i,o){return A(this,null,function*(){let n=(0,ue.now)(),c=l=>{if(l instanceof TypeError&&(0,Md.default)(["Failed to fetch","NetworkError when attempting to fetch resource."],l.message)){this.params.error$.next({id:"Network",category:ue.ErrorCategory.NETWORK,message:"Request failed",thrown:l});return}this.params.error$.next({id:"ThinOneStat:ApiTransport:sendRequest",category:ue.ErrorCategory.NETWORK,message:"Unhandled request error",thrown:l,data:{method:e,params:r,sessionKey:i,time:(0,ue.now)()-n}})};return this.apiBaseUrl=yield this.resolveApiBaseUrl(),Ke(`${this.apiBaseUrl}/fb.do`,{method:"post",headers:x({"Content-type":"application/x-www-form-urlencoded"},o),body:this.prepareQueryParams({method:e,queryParams:r,sessionKey:i})}).then(l=>{var a,s;let f=Number(l.headers.get("content-length"))===0,p=new Date((a=l.headers.get("date"))!=null?a:"").getTime(),v=(0,ue.now)()-n;if(isFinite(p)&&((s=this.timeSynchronisation)==null||s.addServerTime(p,v)),!f)return l.json().then(d=>Object.prototype.hasOwnProperty.call(d,"error_msg")?Promise.reject(d):d,c)},c)})}resolveApiBaseUrl(){return A(this,null,function*(){var e;if(this.apiEnv!=="auto"||this.isApiBaseUrlFetched)return this.apiBaseUrl;try{let r=atob("aHR0cHM6Ly9kbnMuZ29vZ2xlL3Jlc29sdmU/bmFtZT12aWRlby5fZW5kcG9pbnQub2sucnUmdHlwZT1UWFQ="),o=yield(yield Ke(r,{method:"GET",mode:"cors",cache:"no-cache"})).json(),n=(e=o==null?void 0:o.Answer[0])==null?void 0:e.data;if(!n)throw new Error("Wrong DNS response");return n}catch(r){return this.params.error$.next({id:"ThinOneStat:ApiTransport:resolveApiBaseUrl",category:ue.ErrorCategory.NETWORK,message:"Unhandled resolve api base url error",thrown:r}),$o.vk_alias}finally{this.isApiBaseUrlFetched=!0}})}prepareQueryParams(e){let r=new URLSearchParams({format:"JSON",method:e.method,application_key:this.apiKey});return e.sessionKey!==void 0&&r.append("session_key",e.sessionKey),(0,Vd.default)(e.queryParams).forEach(([i,o])=>r.append(i,typeof o=="string"?o:JSON.stringify(o))),r}};var Fd=R(ye(),1),Bd=R(He(),1),j=require("@vkontakte/videoplayer-shared/es2015");var Ir="thinonestat_events",Mo=t=>e=>e.client_time+t>=(0,j.now)(),_r=class{constructor(e){this.unsaltedStorage=[];this.isPaused=!1;this.isUrgent=e=>{let{event_name:r}=e;return(0,Fd.default)(["watch_coverage","watch_coverage_live","watched_n","playback_started"],r)};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,j.debounceFn)(()=>this.safeFlush(),this.params.config.firstFlushTime,{maxWait:this.params.config.firstFlushTime});let r=j.safeStorage.isPersistent()?this.params.config.flushMaxWait:0;this.debouncedFlush=(0,j.debounceFn)(()=>this.safeFlush(),this.params.config.flushDebounceTime,{maxWait:r}),this.subscription=this.api.authorized$.subscribe(i=>{i&&this.debouncedFlush()}),this.housekeepStorage()}safeFlush(){try{this.flush()}catch(e){this.error$.next({id:"LoggerError",category:j.ErrorCategory.WTF,message:String(e)||"Unknown logger error",thrown:e})}}readFromStorage(){let e=j.safeStorage.get(Ir);try{return e?JSON.parse(e):{}}catch(r){}return{}}addToStorage(e){var n;if(!this.userSalt){this.unsaltedStorage.push(e);return}let r=this.readFromStorage(),o=((n=r[this.userSalt])!=null?n:[]).filter(Mo(this.params.config.storageExpiration));j.safeStorage.set(Ir,JSON.stringify(de(x({},r),{[this.userSalt]:[...o,e]})))}getFromStorage(){var i;return this.userSalt?((i=this.readFromStorage()[this.userSalt])!=null?i:[]).filter(Mo(this.params.config.storageExpiration)):this.unsaltedStorage}markStorageSent(){if(!this.userSalt){this.unsaltedStorage=[];return}let e=this.readFromStorage();delete e[this.userSalt],j.safeStorage.set(Ir,JSON.stringify(e))}housekeepStorage(){let e=this.readFromStorage();for(let[r,i]of(0,Bd.default)(e)){let o=i.filter(Mo(this.params.config.storageExpiration));o.length?e[r]=o:delete e[r],this.loggerDebugLog({message:`${i.length} retrieved from storage, ${o.length} of them actual`})}j.safeStorage.set(Ir,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:r}={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)),r&&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 Vo(){let t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),e=new Array(36),r=0,i,o;for(o=0;o<36;o++)o===8||o===13||o===18||o===23?e[o]="-":o===14?e[o]="4":(r<=2&&(r=33554432+Math.random()*16777216|0),i=r&15,r=r>>4,e[o]=t[o===19?i&3|8:i]);return e.join("")}var Sr=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 r;return e.setTime(e.getTime()+((r=this.offset)!=null?r:0)),e}addServerTime(e,r){let i=Date.now(),o=e-i-r/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 Fo=require("@vkontakte/videoplayer-core/es2015"),E=require("@vkontakte/videoplayer-shared/es2015"),Ud=(t,e,r)=>new E.Observable(i=>{let o=new E.Subscription,n=new E.ValueSubject(void 0),c;o.add(t.info.isLive$.pipe((0,E.filterChanged)()).subscribe(W=>{c&&(c.unsubscribe(),n.next(void 0)),W?c=t.info.liveTime$.pipe((0,E.filterChanged)()).subscribe(n):c=t.info.position$.subscribe(n),o.add(c)}));let{playing$:l,paused$:f,ended$:p,looped$:v}=t.events,a=t.events.willSeek$.pipe((0,E.filter)(()=>t.info.playbackState$.getValue()===Fo.PlaybackState.PLAYING)),s=t.events.seeked$.pipe((0,E.filter)(()=>t.info.playbackState$.getValue()===Fo.PlaybackState.PLAYING)),d=!1,h=new E.Subject;o.add(a.subscribe(()=>{d||h.next(),d=!0})).add(s.subscribe(()=>d=!1));let g=(0,E.merge)((0,E.fromEvent)(window,"beforeunload"),t.events.willDestruct$),y,S=()=>y=n.getValue(),T=()=>{let W=n.getValue();(0,E.isNullable)(y)||(0,E.isNullable)(W)||y===W||(i.next({from:y,to:W}),y=void 0)},D=new E.Subject,H=new E.Subject,P=(0,E.merge)(l,h,D),k=(0,E.merge)(f,s,g,p,v,H),ce=e.started$&&e.ended$?(0,E.merge)(P,e.ended$):P,le=e.started$&&e.ended$?(0,E.merge)(k,e.started$):k;if(o.add(ce.subscribe(S)).add(le.subscribe(T)),r.heartbeatInterval&&isFinite(r.heartbeatInterval)){let W=[],Cr=r.heartbeatInterval*1e3,uf=()=>{H.next(),D.next()};o.add(ce.subscribe(()=>{let qr=window.setTimeout(uf,Cr);W.push(qr)})).add(le.subscribe(()=>{W.forEach(qr=>{window.clearTimeout(qr)}),W=[]}))}return o});var jd=require("@vkontakte/videoplayer-core/es2015"),Pr=require("@vkontakte/videoplayer-shared/es2015"),Hd=(t,e)=>new Pr.Observable(r=>{let i=new jd.Subscription,o=0;return i.add((0,Pr.merge)(t.info.position$,t.info.liveTime$).subscribe(()=>{let n=e.getTotalViewTime();if(n>o){let c=e.firstTvtLog>o&&e.firstTvtLog<=n,l=Math.floor(n/e.targetDuration)>Math.floor(o/e.targetDuration);(c||l)&&(o=n,r.next({target_duration:e.targetDuration,current_tvt:n}))}})),i});var Wd=require("@vkontakte/videoplayer-core/es2015"),we=require("@vkontakte/videoplayer-shared/es2015"),Kd=t=>new we.Observable(e=>{let r=new Wd.Subscription,i={maxBytesThreshold:10*1024*1024,minBytesThreshold:100*1024,maxTimeWindow:1e4,minTimeWindow:2e3},o={bytes:0,startTime:0,lastEmitTime:0,timeoutId:0},n=()=>{o.timeoutId&&((0,we.getWindow)().clearTimeout(o.timeoutId),o.timeoutId=null)},c=()=>{o.bytes=0,o.startTime=0,o.lastEmitTime=0,n()},l=v=>{if(o.bytes<i.minBytesThreshold||v-o.lastEmitTime<i.minTimeWindow&&o.lastEmitTime>0)return!1;let s=o.startTime>0?v-o.startTime:0,d=o.bytes>=i.maxBytesThreshold,h=s>=i.maxTimeWindow;return d||h},f=(v=!1)=>{let a=Date.now();if(!v&&!l(a))return;n();let s=o.startTime>0?a-o.startTime:Math.max(i.minTimeWindow,1),d=o.bytes/(s/1e3);e.next({download_bytes:Math.round(o.bytes),download_speed:Math.round(d)}),o.lastEmitTime=a,c()},p=()=>{if(n(),o.startTime>0&&o.bytes>=i.minBytesThreshold){let a=Date.now()-o.startTime,s=i.maxTimeWindow-a;s>100?o.timeoutId=(0,we.getWindow)().setTimeout(()=>{o.timeoutId=null,f()},s):s>0&&f()}};return r.add(t.info.httpDownloadMetrics$.pipe((0,we.filter)(v=>v!==void 0)).subscribe(v=>{let a=Date.now();o.startTime===0&&(o.startTime=a),o.bytes+=v.bytes,l(a)?f():p()})),r.add(()=>{if(n(),o.bytes>0){let v=Date.now(),a=o.startTime>0?v-o.startTime:i.minTimeWindow,s=o.bytes/(a/1e3);e.next({download_bytes:Math.round(o.bytes),download_speed:Math.round(s)})}c()}),r});var xe=require("@vkontakte/videoplayer-shared/es2015"),Qd=t=>new xe.Observable(e=>{let r=new xe.Subscription,i=0,o=1,n=0,c=!1,l=!1,f=()=>{if(!c)return;let P=Date.now();n+=(P-i)*o,i=P},p=()=>{(!c||l)&&(i=Date.now(),c=!0,l=!1)},v=()=>{c&&(f(),c=!1)},a=()=>{c&&(f(),c=!1,l=!0)},s=P=>{c&&f(),o=P,i=Date.now()},{started$:d,playing$:h,paused$:g,willSeek$:y,ended$:S,willDestruct$:T}=t.events,{currentPlaybackRate$:D}=t.info;r.add(y.subscribe(a)).add((0,xe.merge)(d,h).subscribe(p)).add((0,xe.merge)(g,S,T).subscribe(v)).add(D.subscribe(s));let H=()=>{let P=n;return c&&(P+=(Date.now()-i)*o),P};return e.next(H),r});var Bo=require("@vkontakte/videoplayer-shared/es2015"),I=require("@vkontakte/videoplayer-core/es2015");var Uo=t=>t&&{[I.HttpConnectionType.HTTP1]:"http1",[I.HttpConnectionType.HTTP2]:"http2",[I.HttpConnectionType.QUIC]:"http3"}[t],It=t=>{if(t!==void 0)switch(t){case I.VideoFormat.MPEG:return"MP4";case I.VideoFormat.DASH:case I.VideoFormat.DASH_LIVE:return"DASH";case I.VideoFormat.DASH_SEP:return"DASH_SEP";case I.VideoFormat.DASH_ONDEMAND:return"ONDEMAND_DASH";case I.VideoFormat.HLS_ONDEMAND:return"ONDEMAND_HLS";case I.VideoFormat.HLS:case I.VideoFormat.HLS_LIVE:return"HLS";case I.VideoFormat.HLS_FMP4:return"HLS_FMP4";case I.VideoFormat.DASH_WEBM:case I.VideoFormat.DASH_LIVE_WEBM:return"WEBM";case I.VideoFormat.DASH_LIVE_CMAF:return"ONDEMAND_DASH_LIVE";case I.VideoFormat.HLS_LIVE_CMAF:return"ONDEMAND_HLS_LIVE";case I.VideoFormat.WEB_RTC_LIVE:return"WEBRTC";case I.VideoFormat.DASH_WEBM_AV1:return"AV1";case I.VideoFormat.DASH_STREAMS:return"MULTI_DASH";default:return(0,Bo.assertNever)(t)}},Z=t=>{if(t!==void 0)switch(t){case I.VideoQuality.Q_144P:return"144p";case I.VideoQuality.Q_240P:return"240p";case I.VideoQuality.Q_360P:return"360p";case I.VideoQuality.Q_480P:return"480p";case I.VideoQuality.Q_720P:return"720p";case I.VideoQuality.Q_1080P:return"1080p";case I.VideoQuality.Q_1440P:return"1440p";case I.VideoQuality.Q_2160P:return"2160p";case I.VideoQuality.INVARIANT:case I.VideoQuality.Q_576P:case I.VideoQuality.Q_4320P:return"UNKNOWN";default:return(0,Bo.assertNever)(t)}},Gd=t=>{if(t!==void 0)switch(t){case"MP4":case"ONDEMAND_DASH":case"ONDEMAND_DASH_LIVE":case"ONDEMAND_HLS":case"ONDEMAND_HLS_LIVE":case"MULTI_DASH":case"WEBM":case"AV1":return"vod";case"DASH":case"HLS":case"HLS_FMP4":case"WEBRTC":return"live";default:return}},he=(t,e,r)=>{var i;if(t&&e)switch(t){case I.VideoFormat.MPEG:return r&&e[t]&&e[t][r];default:return(i=e[t])==null?void 0:i.url}},Tr=(t,e=!1)=>{if(e)return"minimal";switch(t){case void 0:case I.Surface.NONE:return;case I.Surface.INLINE:return"inline";case I.Surface.FULLSCREEN:return"fullscreen";case I.Surface.SECOND_SCREEN:return"chromecast";case I.Surface.PIP:return"pip_external"}},Er=t=>{switch(t){case void 0:return;case I.Surface.INVISIBLE:return"background";default:return"foreground"}};var zd=R($t(),1);var Yd=()=>(0,zd.default)(Math.floor(Math.random()*Ae(2,64)).toString(36),13,"0");var SI="_thin-one-stat_",Jd=`${SI}deviceId`,Xd=()=>{let t=new m.Subscription;return{subscription:t,subscribe:(e,r)=>{e&&t.add(e.subscribe(r))}}},wr=class{constructor(e,r){this.debugLogger=new m.Logger;this.thinOneStatDebugLog=this.debugLogger.createComponentLog("ThinOneStat");this.eventNumber=1;this.playerSize={width:0,height:0};this.seekAction$=new m.ValueSubject("unknown");this.isid$=new m.ValueSubject(void 0);var f,p;this.statContext=e,this.config=Dd((f=r.config)!=null?f:{}),this.subscription=new m.Subscription,this.config.synchronizeTime&&(this.timeSynchronisation=new Sr);let i=new m.Subject,o=m.safeStorage.get(Jd);this.statContext.deviceId?this.deviceId=this.statContext.deviceId:o?this.deviceId=o:(this.deviceId=Vo(),m.safeStorage.set(Jd,this.deviceId)),this.statContext.targetDuration?this.targetDuration=this.statContext.targetDuration:this.targetDuration=this.config.watchedNDefaultTargetDuration,this.resetViewSession(),r.useIsid&&this.isid$.next((p=r.isid)!=null?p:Yd());let n=new yr({error$:i,config:this.config,timeSynchronisation:this.timeSynchronisation});this.api=new br({config:this.config,apiTransport:n,error$:i,deviceId:this.deviceId,refreshAuthToken:r.refreshAuthToken}),this.logger=new _r({config:this.config,debugLogger:this.debugLogger,api:this.api,error$:i,userSalt:r.userSalt});let{isEmbed:c,topOrigin:l}=(0,m.detectEmbed)();this.isEmbed=c,this.embedHostname=l?new URL(l).hostname:void 0}get vsid$(){return new m.ValueSubject(fe.getVSID())}authorize(e){return this.api.authorize(e)}updateContext(e){this.statContext=x(x({},this.statContext),e)}attachTo(e,r){let i=new m.Subscription,o=(a,s)=>i.add(a.subscribe(s));o(Qd(e),a=>{this.getTotalViewTime=a}),o(e.info.isLive$,a=>this.isLive=a);let n;o((0,m.combine)({hostname:e.info.hostname$,connectionType:e.info.httpConnectionType$,connectionReused:e.info.httpConnectionReused$}).pipe((0,m.filter)(({hostname:a})=>a!==void 0),(0,m.filter)(({connectionType:a})=>a!==void 0),(0,m.filter)(({connectionReused:a})=>a!==void 0)),({hostname:a,connectionType:s,connectionReused:d})=>{if(n!==void 0&&n!==a){let g={cdn_host:a,connection_type:Uo(s),connection_reused:d,content_type:It(e.info.currentFormat$.getValue())};this.logFailover(g)}this.cdnHostname=n=a}),o(e.info.httpConnectionType$,a=>{this.connectionType=Uo(a)}),o(e.info.httpConnectionReused$,a=>{this.connectionReused=a}),o(Ud(e,r,{heartbeatInterval:this.config.watchCoverageHeartbeatInterval}),a=>{let s=Math.round(a.from*1e3),d=Math.round(a.to*1e3),h={watch_interval:`${s}-${d}`,in_history:!!this.statContext.inHistory,content_type:It(e.info.currentFormat$.getValue()),playback_quality:Z(e.info.currentQuality$.getValue()),recom_info:this.statContext.recomInfo};if(!e.info.isLive$.getValue())this.logWatchCoverage(h);else{let y=e.info.atLiveEdge$.getValue();this.logWatchCoverageLive(de(x({},h),{live:!!y}))}}),o(Hd(e,{targetDuration:this.targetDuration,firstTvtLog:this.config.watchedNFirstTvtLog,getTotalViewTime:this.getTotalViewTime}),a=>{this.logWatchedN(a)}),o(e.events.willReady$,()=>{if(this.statContext.preload){let a=e.info.currentFormat$.getValue(),s=e.info.availableSources$.getValue(),d=e.info.currentBuffer$.getValue(),h=e.info.currentQuality$.getValue(),g={target_buffer_time:this.calcBufferTime(d),playback_url:he(a,s,h),playback_quality:Z(h)};this.logPreloadStarted(g)}}),o(e.events.manifestRequested$,()=>{let a=e.info.currentFormat$.getValue(),s=e.info.availableSources$.getValue(),d=e.info.currentQuality$.getValue(),h={playback_url:he(a,s,d),cdn_host:this.cdnHostname,connection_type:this.connectionType,connection_reused:this.connectionReused};this.logManifestRequest(h)}),o(e.events.firstBytesManifest$,()=>{let a=e.info.currentFormat$.getValue(),s=e.info.availableSources$.getValue(),d=e.info.currentQuality$.getValue(),h={playback_url:he(a,s,d),cdn_host:this.cdnHostname,connection_type:this.connectionType,connection_reused:this.connectionReused};this.logFirstByteManifest(h)}),o(e.events.manifestReceived$,()=>{let a=e.info.currentFormat$.getValue(),s=e.info.availableSources$.getValue(),d=e.info.currentQuality$.getValue(),h={playback_url:he(a,s,d),cdn_host:this.cdnHostname,connection_type:this.connectionType,connection_reused:this.connectionReused};this.logManifestReceived(h)}),o(e.events.firstBytesRequested$,()=>{let a=e.info.currentFormat$.getValue(),s=e.info.availableSources$.getValue(),d=e.info.currentQuality$.getValue(),h={playback_url:he(a,s,d),cdn_host:this.cdnHostname,connection_type:this.connectionType,connection_reused:this.connectionReused};this.logFirstMediaRequest(h)}),o(e.events.firstBytesReceived$,()=>{let a=e.info.currentFormat$.getValue(),s=e.info.availableSources$.getValue(),d=e.info.currentQuality$.getValue(),h={playback_url:he(a,s,d),cdn_host:this.cdnHostname,connection_type:this.connectionType,connection_reused:this.connectionReused};this.logFirstByteMedia(h)}),o((0,m.merge)(e.events.willStart$,e.events.looped$),a=>{var h;a&&this.resetViewSession();let d={isid:this.isid$.getValue(),stream_profile:Gd(It(e.info.currentFormat$.getValue())),dpi:96*ee.clientChecker.display.pixelRatio,web_layout:this.statContext.isMobile||ee.clientChecker.device.isMobile?"mobile":"desktop",preloaded:this.statContext.preload,navigation:this.statContext.navigation,recom_info:this.statContext.recomInfo};this.isEmbed&&(d.iframe_host=(h=this.embedHostname)!=null?h:"unknown"),this.logStartSession(d)}),o(e.events.started$,()=>{var k,ce,le,W;this.isStarted=!0;let a=e.info.currentBuffer$.getValue(),s=e.info.currentQuality$.getValue(),d=e.info.isAutoQualityEnabled$.getValue(),h=e.info.muted$.getValue(),g=e.info.volume$.getValue(),y=e.info.surface$.getValue(),S=e.info.availableTextTracks$.getValue(),T=e.info.currentTextTrack$.getValue(),D=e.info.currentAudioStream$.getValue(),H=e.info.currentPlaybackRate$.getValue(),P={playback_quality:Z(s),user_quality:d?"auto":Z(s),player_width:this.playerSize.width,player_height:this.playerSize.height,muted:h,sound_volume:Math.round(g*100),buffer_time:this.calcBufferTime(a),mode:Tr(y,this.statContext.isPreviewPlayerView),visibility:Er(y),subtitles_enabled:T?!!T:(k=this.currentSubtitle)==null?void 0:k.enabled,auto_subtitles:(W=(ce=S.find(({id:Cr})=>Cr===T))==null?void 0:ce.isAuto)!=null?W:(le=this.currentSubtitle)==null?void 0:le.auto,audio_track_lang:D==null?void 0:D.language,playback_rate:H,recom_info:this.statContext.recomInfo};this.logPlaybackStarted(P)}),o((0,m.merge)(e.events.willStart$,e.events.willResume$),()=>{this.logPlay()}),o(e.events.playing$,()=>{let a=e.info.currentBuffer$.getValue(),s={buffer_time:this.calcBufferTime(a)};this.logPlaying(s),this.wasPaused&&this.logResume()}),o(e.events.paused$,()=>{this.wasPaused=!0,this.logPause()}),o(e.events.willStop$,()=>{this.logStop()}),o((0,m.merge)(e.events.fetcherRecoverableError$,e.events.fatalError$),()=>{this.statContext.preload&&this.logPreloadError()});let c=a=>{switch(a){case m.ErrorCategory.NETWORK:return"network";case m.ErrorCategory.VIDEO_PIPELINE:return"video_pipeline";case m.ErrorCategory.EXTERNAL_API:return"external_api";case m.ErrorCategory.PARSER:return"parser";case m.ErrorCategory.DOM:return"dom";default:return"wtf"}},l=a=>m.ErrorCategory.FATAL===a?"critical":"informative";o(e.events.fetcherRecoverableError$,({id:a,category:s,data:d,message:h,httpCode:g,UVBackendErrorCode:y})=>{let S={error_severity:l(s),error_category:c(s),player_error_code:a,player_error_trace:d,http_error_code:g,uv_backend_error_code_subcode:y,error_message:h};this.logError(S)}),o(e.events.managedError$,({id:a,category:s,data:d,message:h})=>{let g={error_severity:l(s),error_category:c(s),player_error_code:a,player_error_trace:d,error_message:h};this.logError(g)}),o(e.events.fatalError$,({id:a,category:s,data:d,message:h})=>{let g={error_severity:"critical",error_category:c(s),player_error_code:a,player_error_trace:d,error_message:h};this.logError(g)}),o((0,m.combine)({connectionType:e.info.httpConnectionType$,connectionReused:e.info.httpConnectionReused$,connectionMetrics:e.info.httpConnectionMetrics$}).pipe((0,m.filter)(({connectionReused:a})=>a!==void 0),(0,m.filter)(({connectionMetrics:a})=>a!==void 0),(0,m.filterChanged)((a,s)=>a.connectionType===s.connectionType)),({connectionMetrics:a})=>{let s=e.info.currentFormat$.getValue(),d=e.info.availableSources$.getValue(),h=e.info.currentQuality$.getValue(),g=e.info.rttEstimation$.getValue(),y={playback_url:he(s,d,h),cdn_host:this.cdnHostname,connection_type:this.connectionType,connection_reused:this.connectionReused,rtt:g?Math.round(g):void 0,network_type:a==null?void 0:a.networkType,dns_resolve_time:a==null?void 0:a.dnsResolveTime,tcp_handshake_time:a==null?void 0:a.tcpHandshakeTime,tls_handshake_time:a==null?void 0:a.tlsHandshakeTime};this.logConnectionEstablished(y)}),o(Kd(e),a=>{this.logDownloadBytes(a)}),o(e.events.firstFrame$,()=>{this.logFirstVideoFrameDecoded()}),o(e.events.willSeek$,()=>{let a={seek_type:this.seekAction$.getValue()};this.logSeeking(a)}),o(e.events.seeked$,()=>{let a={seek_type:this.seekAction$.getValue()};this.logSeeked(a),this.seekAction$.next("unknown")}),o(e.info.isStalled$,a=>{let s=e.info.currentBuffer$.getValue(),d=this.calcBufferTime(s);a&&d&&d>0&&this.logBufferStarvation({buffer_time:d})}),o(e.info.currentBuffer$.pipe((0,m.filter)(a=>!!this.calcBufferTime(a)),(0,m.once)()),a=>{let s=this.calcBufferTime(a);if(this.statContext.preload){let d={buffer_time:s};this.logPreloadEnded(d)}this.logReady({buffer_time:s})});let f;o((0,m.combine)({videoStream:e.info.currentVideoStream$,audioStream:e.info.currentAudioStream$,quality:e.info.currentQuality$}).pipe((0,m.filter)(({videoStream:a,audioStream:s})=>a!==void 0&&s!==void 0),(0,m.filter)(({quality:a})=>a!==void 0)),({videoStream:a,audioStream:s,quality:d})=>{if(f!==d){let h=e.info.isAutoQualityEnabled$.getValue(),g=a==null?void 0:a.codec,y=s==null?void 0:s.codec,S={user_quality:h?"auto":Z(d),playback_quality:Z(d),download_quality:Z(d),codec_info:g&&y?`${g},${y}`:void 0};f=d,this.logQualityChanged(S)}});let p,v;return o(e.info.surface$,a=>{let s=Tr(a,this.statContext.isPreviewPlayerView);s&&!this.uiEvents&&this.isStarted&&this.logModeChanged({mode:s}),v=Er(a),p!==v&&this.isStarted&&(p=Er(a),this.logVisibilityChanged({visibility:v}))}),o((0,m.combine)({muted:e.info.muted$,volume:e.info.volume$}),({muted:a,volume:s})=>{if(this.isStarted){let d={muted:a,sound_volume:Math.round(s*100)};this.logSoundChanged(d)}}),o(e.info.currentFormat$.pipe((0,m.filter)(a=>a!==void 0),(0,m.skip)(1)),a=>{let s={content_type:It(a),cdn_host:this.cdnHostname,connection_type:this.connectionType,connection_reused:this.connectionReused};this.logContentTypeChange(s)}),o(e.info.currentAudioStream$.pipe((0,m.filter)(a=>a!==void 0),(0,m.skip)(1)),a=>{let s={audio_track_lang:a.language,codec_info:a.codec};this.logAudioTrackSwitched(s)}),o(e.info.currentVideoStream$.pipe((0,m.filter)(a=>a!==void 0),(0,m.skip)(1)),a=>{let s={hdr:a.hdr,codec_info:a.codec};this.logVideoTrackSwitched(s)}),this.player=e,this.resubscribeBeforeunload(),this.subscription.add(i),i}attachToUi(e){this.uiEvents=e;let{subscribe:r,subscription:i}=Xd();r(e.actionSeek$,this.seekAction$),r(e.playerSize$,({width:n,height:c})=>{n&&c&&(this.playerSize={width:n,height:c},this.logViewPortChanged({player_width:n,player_height:c}))}),r(e.isLoaderVisible$,n=>{n&&this.isStarted&&this.logShowLoader()}),r(e.actionSubtitlesSwitched$,n=>{if(this.currentSubtitle=x({},n),this.isStarted){let c={subtitles_enabled:n.enabled,subtitles_track_lang:n.lang,auto_subtitles:n.auto};this.logSubtitlesSwitched(c)}});let{surface$:o}=hr(this.uiEvents,r,this.player);return r(o,n=>{this.isStarted&&this.logModeChanged({mode:Tr(n)})}),r(e.actionQuality$,n=>{var v,a,s,d,h,g;let c=y=>(0,ef.default)((0,Zd.default)(No),y),l=(a=(v=this.player)==null?void 0:v.info.currentVideoStream$.getValue())==null?void 0:a.codec,f=(d=(s=this.player)==null?void 0:s.info.currentAudioStream$.getValue())==null?void 0:d.codec,p={user_quality:c(n)?"auto":Z(n),playback_quality:Z((h=this.player)==null?void 0:h.info.currentQuality$.getValue()),download_quality:Z((g=this.player)==null?void 0:g.info.currentQuality$.getValue()),codec_info:l&&f?`${l},${f}`:void 0};this.logQualityChangeRequested(p)}),this.resubscribeBeforeunload(),this.subscription.add(i),i}attachToAds(e){let{subscription:r,subscribe:i}=Xd();return i(e.init$,o=>{let n={slot:o};this.logAdvConfiguration(n)}),i(e.slotRequested$,()=>{this.logAdvRequest()}),i(e.started$,o=>{let n={adv_section:o};this.logAdvBreakStarted(n)}),i(e.ended$,o=>{let n={adv_section:o};this.logAdvBreakEnded(n)}),i(e.error$,o=>{let n={error_message:o};this.logAdvError(n)}),this.resubscribeBeforeunload(),this.subscription.add(r),r}getDeviceId(){return this.deviceId}resetViewSession(){this.thinOneStatDebugLog({message:"VSID reset"}),fe.generateVSID(),this.eventNumber=0}destroy(){this.api.destroy()}calcBufferTime(e){var r,i;return e?Math.round(((r=e.end)!=null?r:0)-((i=e.start)!=null?i:0))*1e3:void 0}createRequiredParams(e){var n,c,l,f,p;let r=this.vsid$.getValue();(0,m.assertNonNullable)(r);let i=this.eventNumber++,o=((l=this.isLive?(n=this.player)==null?void 0:n.info.liveTime$.getValue():(c=this.player)==null?void 0:c.info.position$.getValue())!=null?l:0)*1e3;return{vsid:r,uv_movie_id:this.statContext.movieId,event_name:e,client_time:Date.now(),application:(f=this.statContext.application)!=null?f:`@vkontakte/videoplayer-statistics:${B}`,platform:(p=this.statContext.platform)!=null?p:`web:${this.statContext.isMobile||ee.clientChecker.device.isMobile?"mobile":"desktop"}`,product:this.statContext.product,event_number:i,playback_position:o,current_tvt:this.getTotalViewTime(),cdn_host:this.cdnHostname}}createRequiredFatParams(){var e,r,i,o,n,c,l;return{stats_version:"2.1.1",browser:(e=this.statContext.browser)!=null?e:ee.clientChecker.browser.current,browser_version:(r=this.statContext.browserVersion)!=null?r:String(ee.clientChecker.browser.currentVersion),os:(i=this.statContext.os)!=null?i:ee.clientChecker.device.os.name,os_version:(o=this.statContext.osVersion)!=null?o:ee.clientChecker.device.os.version,device_type:(n=this.statContext.deviceType)!=null?n:this.statContext.isMobile||ee.clientChecker.device.isMobile?"mobile":"desktop",device_manufacturer:(c=this.statContext.deviceManufacturer)!=null?c:ee.clientChecker.device.details.vendor,device_model:(l=this.statContext.deviceModel)!=null?l:ee.clientChecker.device.details.model,navigation:this.statContext.navigation}}log(e,r,i=!1){let o=this.createRequiredParams(e),n={};i&&(n=this.createRequiredFatParams()),this.logger.log(x(x(x({},o),n),r))}logWatchCoverage(e){this.log("watch_coverage",e,!0)}logWatchCoverageLive(e){this.log("watch_coverage_live",e,!0)}logWatchedN(e){this.log("watched_n",e,!0)}logStartSession(e){this.log("start_session",e,!0)}logPreloadStarted(e){this.log("preload_started",e)}logPreloadEnded(e){this.log("preload_ended",e)}logPreloadError(){this.log("preload_error")}logPlaybackStarted(e){this.log("playback_started",e,!0)}logPlay(){this.log("play")}logManifestRequest(e){this.log("manifest_request",e)}logFirstByteManifest(e){this.log("first_byte_manifest",e)}logFirstMediaRequest(e){this.log("first_media_request",e)}logFirstByteMedia(e){this.log("first_byte_media",e)}logManifestReceived(e){this.log("manifest_received",e)}logConnectionEstablished(e){this.log("connection_established",e)}logFirstVideoFrameDecoded(){this.log("first_video_frame_decoded")}logReady(e){this.log("ready",e)}logPlaying(e){this.log("playing",e)}logPause(){this.log("pause")}logResume(){this.log("resume")}logSeeking(e){this.log("seeking",e)}logSeeked(e){this.log("seeked",e)}logStop(){this.log("stop")}logBufferStarvation(e){this.log("buffer_starvation",e)}logShowLoader(){this.log("show_loader")}logQualityChangeRequested(e){this.log("quality_change_requested",e)}logQualityChanged(e){this.log("quality_changed",e)}logCdnHostChanged(e){this.log("cdn_host_changed",e)}logViewPortChanged(e){this.log("view_port_changed",e)}logModeChanged(e){this.log("mode_changed",e)}logVisibilityChanged(e){this.log("visibility_changed",e)}logAudioTrackSwitched(e){this.log("audio_track_switched",e)}logVideoTrackSwitched(e){this.log("video_track_switched",e)}logSubtitlesSwitched(e){this.log("subtitles_switched",e)}logSoundChanged(e){this.log("sound_changed",e)}logFailover(e){this.log("failover",e)}logContentTypeChange(e){this.log("content_type_change",e)}logError(e){this.log("error",e,!0)}logDownloadBytes(e){this.log("download_bytes",e)}logAdvConfiguration(e){this.log("adv_configuration",e)}logAdvRequest(){this.log("adv_request")}logAdvBreakStarted(e){this.log("adv_break_started",e)}logAdvBreakEnded(e){this.log("adv_break_ended",e)}logAdvError(e){this.log("adv_error",e)}resubscribeBeforeunload(){var e;(e=this.beforeunloadSubscription)==null||e.unsubscribe(),this.beforeunloadSubscription=(0,m.fromEvent)((0,m.getWindow)(),"beforeunload").subscribe(()=>{}),this.subscription.add(this.beforeunloadSubscription)}};var jo={};var PI=(t,e={})=>{let i=e.timeout||1,o=performance.now();return q.setTimeout(()=>{t({get didTimeout(){return e.timeout?!1:performance.now()-o-1>i},timeRemaining(){return Math.max(0,1+(performance.now()-o))}})},1)},TI=t=>q.clearTimeout(t),tf=t=>typeof t=="function"&&(t==null?void 0:t.toString().endsWith("{ [native code] }")),rf=!tf(q.requestIdleCallback)||!tf(q.cancelIdleCallback),of=rf?PI:q.requestIdleCallback,nf=rf?TI:q.cancelIdleCallback;var _t=require("@vkontakte/videoplayer-core/es2015"),sf=require("@vkontakte/videoplayer-shared/es2015");var Ar=class{constructor(){this.startTime=null;this.stopTime=null;this.accumulatedTime=0}get time(){return Math.floor(this.timeMs/1e3)}get timeMs(){var r;return this.startTime===null?0:((r=this.stopTime)!=null?r:this.now())-this.startTime-this.accumulatedTime}get isRunning(){return this.startTime!==null&&this.stopTime===null}start(){this.isRunning||(this.stopTime!==null?(this.accumulatedTime+=this.now()-this.stopTime,this.stopTime=null):this.startTime=this.now())}stop(){this.isRunning&&(this.stopTime=this.now())}reset(){this.startTime=null,this.stopTime=null,this.accumulatedTime=0}now(){return Date.now()}};var af=()=>window.Image?new Image:document.createElement("img");var Or=class{constructor(e){this.position=0;this.started=!1;this.heartbeatPixels=[];this.heartbeatLastTimeSent={};this.idleCallbackIds=[];this.stopwatch=new Ar;this.subscription=new _t.Subscription;this.params=e;let r=new sf.Logger;this.log=r.createComponentLog("MediascopePixel")}attachTo(e){this.subscription.add(e.info.playbackState$.subscribe(r=>this.onPlaybackState(r))).add(e.info.position$.subscribe(r=>this.onPosition(r))).add(e.info.atLiveEdge$.subscribe(r=>this.isActiveLive=r)),this.subscription.add(e.events.willSeek$.subscribe(()=>this.onWillSeek())).add(e.events.seeked$.subscribe(()=>this.onSeeked())).add(e.events.ended$.subscribe(()=>this.onEnded()))}destroy(){this.stopwatch.reset(),this.subscription.unsubscribe(),window.clearTimeout(this.heartbeatFirstTimeoutId),this.idleCallbackIds.forEach(e=>nf(e)),this.send("stop")}onPlaybackState(e){e===_t.PlaybackState.PLAYING?this.started?this.play():this.start():e===_t.PlaybackState.PAUSED&&this.pause()}start(){var i,o,n;this.started=!0,this.stopwatch.start(),this.send("start"),this.heartbeatPixels=this.prepareHeartbeatPixels(),this.heartbeatInterval=(i=this.heartbeatPixels[0])==null?void 0:i.interval;let e=(o=this.heartbeatPixels[0])==null?void 0:o.url,r=(n=this.heartbeatPixels[0])==null?void 0:n.delay;if(r!==void 0&&e)try{this.heartbeatFirstTimeoutId=window.setTimeout(()=>{this.sendHeartbeat(e)},r*1e3)}catch(c){this.log({message:c.message})}}play(){this.stopwatch.start(),this.send("resume")}pause(){this.stopwatch.stop(),this.send("pause")}onPosition(e){if(this.position=e,this.heartbeatInterval&&this.stopwatch.time!==0&&this.stopwatch.time%this.heartbeatInterval===0)for(let[r,{url:i}]of this.heartbeatPixels.entries())this.heartbeatLastTimeSent[r]!==this.stopwatch.time&&(this.heartbeatLastTimeSent[r]=this.stopwatch.time,this.sendHeartbeat(i))}onWillSeek(){this.started&&this.send("stop")}onSeeked(){this.started&&this.send("start")}onEnded(){this.stopwatch.stop(),this.send("stop")}validatePixels(e,r){return e==null?void 0:e.filter(i=>i.event===r.event&&r.keys.every(o=>!!i[o]))}getFrameTimestamp(){let e;if(this.isActiveLive){let r=Math.floor(Math.random()*25)+5;e=Date.now()/1e3-r}else e=this.position||0;return Math.floor(e)}getUTC(){return Math.floor(Date.now()/1e3)}prepareUrl(e){return e.replace("{@fts_fake_sec}",String(this.getFrameTimestamp())).replace("{@utc_sec}",String(this.getUTC())).split("&").filter(r=>!/={@[a-zA-Z_]+}/.test(r)).join("&")}preparePixels(e){return this.validatePixels(this.params.pixels,{event:e,keys:["url"]})}prepareHeartbeatPixels(){return this.validatePixels(this.params.pixels,{event:"heartbeat",keys:["url","interval"]})}call(e){try{this.idleCallbackIds.push(of(()=>af().src=this.prepareUrl(e)))}catch(r){this.log({message:r.message})}}send(e){let r=this.preparePixels(e);for(let{url:i}of r)this.call(i)}sendHeartbeat(e){this.call(e)}};