@vkontakte/videoplayer-shared 1.0.58-dev.ce524d87.0 → 1.0.58-dev.ef87de0a.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/esnext.cjs.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-shared v1.0.58-dev.ce524d87.0
3
- * Thu, 10 Apr 2025 12:04:34 GMT
2
+ * @vkontakte/videoplayer-shared v1.0.58-dev.ef87de0a.0
3
+ * Thu, 10 Apr 2025 14:06:51 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-58/doc/
5
5
  */
6
- "use strict";var Ks=Object.create;var Ee=Object.defineProperty;var Ws=Object.getOwnPropertyDescriptor;var $s=Object.getOwnPropertyNames;var zs=Object.getPrototypeOf,Ys=Object.prototype.hasOwnProperty;var o=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),pr=(e,r)=>{for(var t in r)Ee(e,t,{get:r[t],enumerable:!0})},Bt=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of $s(r))!Ys.call(e,i)&&i!==t&&Ee(e,i,{get:()=>r[i],enumerable:!(n=Ws(r,i))||n.enumerable});return e};var ne=(e,r,t)=>(t=e!=null?Ks(zs(e)):{},Bt(r||!e||!e.__esModule?Ee(t,"default",{value:e,enumerable:!0}):t,e)),Hs=e=>Bt(Ee({},"__esModule",{value:!0}),e);var x=o((dr,rn)=>{"use strict";var ie=function(e){return e&&e.Math===Math&&e};rn.exports=ie(typeof globalThis=="object"&&globalThis)||ie(typeof window=="object"&&window)||ie(typeof self=="object"&&self)||ie(typeof global=="object"&&global)||ie(typeof dr=="object"&&dr)||function(){return this}()||Function("return this")()});var w=o((hb,tn)=>{"use strict";tn.exports=function(e){try{return!!e()}catch{return!0}}});var oe=o((gb,nn)=>{"use strict";var nu=w();nn.exports=!nu(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var ln=o((Ib,un)=>{"use strict";var iu=oe(),sn=Function.prototype,on=sn.apply,an=sn.call;un.exports=typeof Reflect=="object"&&Reflect.apply||(iu?an.bind(on):function(){return an.apply(on,arguments)})});var L=o((Ob,fn)=>{"use strict";var cn=oe(),pn=Function.prototype,Tr=pn.call,ou=cn&&pn.bind.bind(Tr,Tr);fn.exports=cn?ou:function(e){return function(){return Tr.apply(e,arguments)}}});var Pe=o((xb,bn)=>{"use strict";var vn=L(),au=vn({}.toString),su=vn("".slice);bn.exports=function(e){return su(au(e),8,-1)}});var mr=o((Eb,dn)=>{"use strict";var uu=Pe(),lu=L();dn.exports=function(e){if(uu(e)==="Function")return lu(e)}});var E=o((wb,Tn)=>{"use strict";var yr=typeof document=="object"&&document.all;Tn.exports=typeof yr>"u"&&yr!==void 0?function(e){return typeof e=="function"||e===yr}:function(e){return typeof e=="function"}});var R=o((Sb,mn)=>{"use strict";var cu=w();mn.exports=!cu(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var F=o((qb,yn)=>{"use strict";var pu=oe(),Ae=Function.prototype.call;yn.exports=pu?Ae.bind(Ae):function(){return Ae.apply(Ae,arguments)}});var hr=o(In=>{"use strict";var hn={}.propertyIsEnumerable,gn=Object.getOwnPropertyDescriptor,fu=gn&&!hn.call({1:2},1);In.f=fu?function(r){var t=gn(this,r);return!!t&&t.enumerable}:hn});var ae=o((Pb,On)=>{"use strict";On.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var En=o((Ab,xn)=>{"use strict";var vu=L(),bu=w(),du=Pe(),gr=Object,Tu=vu("".split);xn.exports=bu(function(){return!gr("z").propertyIsEnumerable(0)})?function(e){return du(e)==="String"?Tu(e,""):gr(e)}:gr});var _e=o((_b,wn)=>{"use strict";wn.exports=function(e){return e==null}});var Le=o((Lb,Sn)=>{"use strict";var mu=_e(),yu=TypeError;Sn.exports=function(e){if(mu(e))throw new yu("Can't call method on "+e);return e}});var B=o((jb,qn)=>{"use strict";var hu=En(),gu=Le();qn.exports=function(e){return hu(gu(e))}});var k=o((kb,Rn)=>{"use strict";var Iu=E();Rn.exports=function(e){return typeof e=="object"?e!==null:Iu(e)}});var se=o((Cb,Pn)=>{"use strict";Pn.exports={}});var je=o((Nb,_n)=>{"use strict";var Ir=se(),Or=x(),Ou=E(),An=function(e){return Ou(e)?e:void 0};_n.exports=function(e,r){return arguments.length<2?An(Ir[e])||An(Or[e]):Ir[e]&&Ir[e][r]||Or[e]&&Or[e][r]}});var xr=o((Mb,Ln)=>{"use strict";var xu=L();Ln.exports=xu({}.isPrototypeOf)});var Nn=o((Vb,Cn)=>{"use strict";var Eu=x(),jn=Eu.navigator,kn=jn&&jn.userAgent;Cn.exports=kn?String(kn):""});var Qn=o((Fb,Gn)=>{"use strict";var Un=x(),Er=Nn(),Mn=Un.process,Vn=Un.Deno,Fn=Mn&&Mn.versions||Vn&&Vn.version,Dn=Fn&&Fn.v8,P,ke;Dn&&(P=Dn.split("."),ke=P[0]>0&&P[0]<4?1:+(P[0]+P[1]));!ke&&Er&&(P=Er.match(/Edge\/(\d+)/),(!P||P[1]>=74)&&(P=Er.match(/Chrome\/(\d+)/),P&&(ke=+P[1])));Gn.exports=ke});var wr=o((Db,Kn)=>{"use strict";var Bn=Qn(),wu=w(),Su=x(),qu=Su.String;Kn.exports=!!Object.getOwnPropertySymbols&&!wu(function(){var e=Symbol("symbol detection");return!qu(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Bn&&Bn<41})});var Sr=o((Ub,Wn)=>{"use strict";var Ru=wr();Wn.exports=Ru&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var qr=o((Gb,$n)=>{"use strict";var Pu=je(),Au=E(),_u=xr(),Lu=Sr(),ju=Object;$n.exports=Lu?function(e){return typeof e=="symbol"}:function(e){var r=Pu("Symbol");return Au(r)&&_u(r.prototype,ju(e))}});var Ce=o((Qb,zn)=>{"use strict";var ku=String;zn.exports=function(e){try{return ku(e)}catch{return"Object"}}});var ue=o((Bb,Yn)=>{"use strict";var Cu=E(),Nu=Ce(),Mu=TypeError;Yn.exports=function(e){if(Cu(e))return e;throw new Mu(Nu(e)+" is not a function")}});var Ne=o((Kb,Hn)=>{"use strict";var Vu=ue(),Fu=_e();Hn.exports=function(e,r){var t=e[r];return Fu(t)?void 0:Vu(t)}});var Jn=o((Wb,Xn)=>{"use strict";var Rr=F(),Pr=E(),Ar=k(),Du=TypeError;Xn.exports=function(e,r){var t,n;if(r==="string"&&Pr(t=e.toString)&&!Ar(n=Rr(t,e))||Pr(t=e.valueOf)&&!Ar(n=Rr(t,e))||r!=="string"&&Pr(t=e.toString)&&!Ar(n=Rr(t,e)))return n;throw new Du("Can't convert object to primitive value")}});var le=o(($b,Zn)=>{"use strict";Zn.exports=!0});var ti=o((zb,ri)=>{"use strict";var ei=x(),Uu=Object.defineProperty;ri.exports=function(e,r){try{Uu(ei,e,{value:r,configurable:!0,writable:!0})}catch{ei[e]=r}return r}});var Me=o((Yb,oi)=>{"use strict";var Gu=le(),Qu=x(),Bu=ti(),ni="__core-js_shared__",ii=oi.exports=Qu[ni]||Bu(ni,{});(ii.versions||(ii.versions=[])).push({version:"3.38.0",mode:Gu?"pure":"global",copyright:"\xA9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var _r=o((Hb,si)=>{"use strict";var ai=Me();si.exports=function(e,r){return ai[e]||(ai[e]=r||{})}});var Ve=o((Xb,ui)=>{"use strict";var Ku=Le(),Wu=Object;ui.exports=function(e){return Wu(Ku(e))}});var C=o((Jb,li)=>{"use strict";var $u=L(),zu=Ve(),Yu=$u({}.hasOwnProperty);li.exports=Object.hasOwn||function(r,t){return Yu(zu(r),t)}});var Lr=o((Zb,ci)=>{"use strict";var Hu=L(),Xu=0,Ju=Math.random(),Zu=Hu(1 .toString);ci.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Zu(++Xu+Ju,36)}});var N=o((ed,fi)=>{"use strict";var el=x(),rl=_r(),pi=C(),tl=Lr(),nl=wr(),il=Sr(),H=el.Symbol,jr=rl("wks"),ol=il?H.for||H:H&&H.withoutSetter||tl;fi.exports=function(e){return pi(jr,e)||(jr[e]=nl&&pi(H,e)?H[e]:ol("Symbol."+e)),jr[e]}});var Ti=o((rd,di)=>{"use strict";var al=F(),vi=k(),bi=qr(),sl=Ne(),ul=Jn(),ll=N(),cl=TypeError,pl=ll("toPrimitive");di.exports=function(e,r){if(!vi(e)||bi(e))return e;var t=sl(e,pl),n;if(t){if(r===void 0&&(r="default"),n=al(t,e,r),!vi(n)||bi(n))return n;throw new cl("Can't convert object to primitive value")}return r===void 0&&(r="number"),ul(e,r)}});var kr=o((td,mi)=>{"use strict";var fl=Ti(),vl=qr();mi.exports=function(e){var r=fl(e,"string");return vl(r)?r:r+""}});var Nr=o((nd,hi)=>{"use strict";var bl=x(),yi=k(),Cr=bl.document,dl=yi(Cr)&&yi(Cr.createElement);hi.exports=function(e){return dl?Cr.createElement(e):{}}});var Mr=o((id,gi)=>{"use strict";var Tl=R(),ml=w(),yl=Nr();gi.exports=!Tl&&!ml(function(){return Object.defineProperty(yl("div"),"a",{get:function(){return 7}}).a!==7})});var xi=o(Oi=>{"use strict";var hl=R(),gl=F(),Il=hr(),Ol=ae(),xl=B(),El=kr(),wl=C(),Sl=Mr(),Ii=Object.getOwnPropertyDescriptor;Oi.f=hl?Ii:function(r,t){if(r=xl(r),t=El(t),Sl)try{return Ii(r,t)}catch{}if(wl(r,t))return Ol(!gl(Il.f,r,t),r[t])}});var wi=o((ad,Ei)=>{"use strict";var ql=w(),Rl=E(),Pl=/#|\.prototype\./,ce=function(e,r){var t=_l[Al(e)];return t===jl?!0:t===Ll?!1:Rl(r)?ql(r):!!r},Al=ce.normalize=function(e){return String(e).replace(Pl,".").toLowerCase()},_l=ce.data={},Ll=ce.NATIVE="N",jl=ce.POLYFILL="P";Ei.exports=ce});var Vr=o((sd,qi)=>{"use strict";var Si=mr(),kl=ue(),Cl=oe(),Nl=Si(Si.bind);qi.exports=function(e,r){return kl(e),r===void 0?e:Cl?Nl(e,r):function(){return e.apply(r,arguments)}}});var Fr=o((ud,Ri)=>{"use strict";var Ml=R(),Vl=w();Ri.exports=Ml&&Vl(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var K=o((ld,Pi)=>{"use strict";var Fl=k(),Dl=String,Ul=TypeError;Pi.exports=function(e){if(Fl(e))return e;throw new Ul(Dl(e)+" is not an object")}});var X=o(_i=>{"use strict";var Gl=R(),Ql=Mr(),Bl=Fr(),Fe=K(),Ai=kr(),Kl=TypeError,Dr=Object.defineProperty,Wl=Object.getOwnPropertyDescriptor,Ur="enumerable",Gr="configurable",Qr="writable";_i.f=Gl?Bl?function(r,t,n){if(Fe(r),t=Ai(t),Fe(n),typeof r=="function"&&t==="prototype"&&"value"in n&&Qr in n&&!n[Qr]){var i=Wl(r,t);i&&i[Qr]&&(r[t]=n.value,n={configurable:Gr in n?n[Gr]:i[Gr],enumerable:Ur in n?n[Ur]:i[Ur],writable:!1})}return Dr(r,t,n)}:Dr:function(r,t,n){if(Fe(r),t=Ai(t),Fe(n),Ql)try{return Dr(r,t,n)}catch{}if("get"in n||"set"in n)throw new Kl("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var J=o((pd,Li)=>{"use strict";var $l=R(),zl=X(),Yl=ae();Li.exports=$l?function(e,r,t){return zl.f(e,r,Yl(1,t))}:function(e,r,t){return e[r]=t,e}});var re=o((fd,ki)=>{"use strict";var pe=x(),Hl=ln(),Xl=mr(),Jl=E(),Zl=xi().f,ec=wi(),Z=se(),rc=Vr(),ee=J(),ji=C();Me();var tc=function(e){var r=function(t,n,i){if(this instanceof r){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return Hl(e,this,arguments)};return r.prototype=e.prototype,r};ki.exports=function(e,r){var t=e.target,n=e.global,i=e.stat,a=e.proto,s=n?pe:i?pe[t]:pe[t]&&pe[t].prototype,u=n?Z:Z[t]||ee(Z,t,{})[t],p=u.prototype,c,v,l,b,d,m,y,I,h;for(b in r)c=ec(n?b:t+(i?".":"#")+b,e.forced),v=!c&&s&&ji(s,b),m=u[b],v&&(e.dontCallGetSet?(h=Zl(s,b),y=h&&h.value):y=s[b]),d=v&&y?y:r[b],!(!c&&!a&&typeof m==typeof d)&&(e.bind&&v?I=rc(d,pe):e.wrap&&v?I=tc(d):a&&Jl(d)?I=Xl(d):I=d,(e.sham||d&&d.sham||m&&m.sham)&&ee(I,"sham",!0),ee(u,b,I),a&&(l=t+"Prototype",ji(Z,l)||ee(Z,l,{}),ee(Z[l],b,d),e.real&&p&&(c||!p[b])&&ee(p,b,d)))}});var Ni=o((vd,Ci)=>{"use strict";var nc=Math.ceil,ic=Math.floor;Ci.exports=Math.trunc||function(r){var t=+r;return(t>0?ic:nc)(t)}});var De=o((bd,Mi)=>{"use strict";var oc=Ni();Mi.exports=function(e){var r=+e;return r!==r||r===0?0:oc(r)}});var Fi=o((dd,Vi)=>{"use strict";var ac=De(),sc=Math.min;Vi.exports=function(e){var r=ac(e);return r>0?sc(r,9007199254740991):0}});var Ue=o((Td,Di)=>{"use strict";var uc=Fi();Di.exports=function(e){return uc(e.length)}});var Ge=o((md,Ui)=>{"use strict";Ui.exports=function(){}});var Gi=o(()=>{"use strict";var lc=re(),cc=Ve(),pc=Ue(),fc=De(),vc=Ge();lc({target:"Array",proto:!0},{at:function(r){var t=cc(this),n=pc(t),i=fc(r),a=i>=0?i:n+i;return a<0||a>=n?void 0:t[a]}});vc("at")});var Br=o((gd,Qi)=>{"use strict";var bc=je();Qi.exports=bc});var Ki=o((Id,Bi)=>{"use strict";Gi();var dc=Br();Bi.exports=dc("Array","at")});var $i=o((Od,Wi)=>{"use strict";var Tc=Ki();Wi.exports=Tc});var Yi=o((xd,zi)=>{"use strict";var mc=$i();zi.exports=mc});var ze=o((ST,vo)=>{"use strict";var Oc=_r(),xc=Lr(),fo=Oc("keys");vo.exports=function(e){return fo[e]||(fo[e]=xc(e))}});var To=o((qT,bo)=>{"use strict";var Ec=w();bo.exports=!Ec(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var Ye=o((RT,yo)=>{"use strict";var wc=C(),Sc=E(),qc=Ve(),Rc=ze(),Pc=To(),mo=Rc("IE_PROTO"),Wr=Object,Ac=Wr.prototype;yo.exports=Pc?Wr.getPrototypeOf:function(e){var r=qc(e);if(wc(r,mo))return r[mo];var t=r.constructor;return Sc(t)&&r instanceof t?t.prototype:r instanceof Wr?Ac:null}});var go=o((PT,ho)=>{"use strict";var _c=De(),Lc=Math.max,jc=Math.min;ho.exports=function(e,r){var t=_c(e);return t<0?Lc(t+r,0):jc(t,r)}});var $r=o((AT,Oo)=>{"use strict";var kc=B(),Cc=go(),Nc=Ue(),Io=function(e){return function(r,t,n){var i=kc(r),a=Nc(i);if(a===0)return!e&&-1;var s=Cc(n,a),u;if(e&&t!==t){for(;a>s;)if(u=i[s++],u!==u)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===t)return e||s||0;return!e&&-1}};Oo.exports={includes:Io(!0),indexOf:Io(!1)}});var He=o((_T,xo)=>{"use strict";xo.exports={}});var So=o((LT,wo)=>{"use strict";var Mc=L(),zr=C(),Vc=B(),Fc=$r().indexOf,Dc=He(),Eo=Mc([].push);wo.exports=function(e,r){var t=Vc(e),n=0,i=[],a;for(a in t)!zr(Dc,a)&&zr(t,a)&&Eo(i,a);for(;r.length>n;)zr(t,a=r[n++])&&(~Fc(i,a)||Eo(i,a));return i}});var Yr=o((jT,qo)=>{"use strict";qo.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Hr=o((kT,Ro)=>{"use strict";var Uc=So(),Gc=Yr();Ro.exports=Object.keys||function(r){return Uc(r,Gc)}});var ko=o((CT,jo)=>{"use strict";var Ao=R(),Qc=w(),_o=L(),Bc=Ye(),Kc=Hr(),Wc=B(),$c=hr().f,Lo=_o($c),zc=_o([].push),Yc=Ao&&Qc(function(){var e=Object.create(null);return e[2]=2,!Lo(e,2)}),Po=function(e){return function(r){for(var t=Wc(r),n=Kc(t),i=Yc&&Bc(t)===null,a=n.length,s=0,u=[],p;a>s;)p=n[s++],(!Ao||(i?p in t:Lo(t,p)))&&zc(u,e?[p,t[p]]:t[p]);return u}};jo.exports={entries:Po(!0),values:Po(!1)}});var Co=o(()=>{"use strict";var Hc=re(),Xc=ko().entries;Hc({target:"Object",stat:!0},{entries:function(r){return Xc(r)}})});var Mo=o((VT,No)=>{"use strict";Co();var Jc=se();No.exports=Jc.Object.entries});var Fo=o((FT,Vo)=>{"use strict";var Zc=Mo();Vo.exports=Zc});var Xr=o((DT,Do)=>{"use strict";var ep=Fo();Do.exports=ep});var Wo=o(()=>{"use strict";var np=re(),ip=$r().includes,op=w(),ap=Ge(),sp=op(function(){return!Array(1).includes()});np({target:"Array",proto:!0,forced:sp},{includes:function(r){return ip(this,r,arguments.length>1?arguments[1]:void 0)}});ap("includes")});var zo=o((vm,$o)=>{"use strict";Wo();var up=Br();$o.exports=up("Array","includes")});var Ho=o((bm,Yo)=>{"use strict";var lp=zo();Yo.exports=lp});var Jo=o((dm,Xo)=>{"use strict";var cp=Ho();Xo.exports=cp});var W=o((py,ia)=>{"use strict";ia.exports={}});var sa=o((fy,aa)=>{"use strict";var vp=x(),bp=E(),oa=vp.WeakMap;aa.exports=bp(oa)&&/native code/.test(String(oa))});var pa=o((vy,ca)=>{"use strict";var dp=sa(),la=x(),Tp=k(),mp=J(),gt=C(),It=Me(),yp=ze(),hp=He(),ua="Object already initialized",Ot=la.TypeError,gp=la.WeakMap,Ze,ye,er,Ip=function(e){return er(e)?ye(e):Ze(e,{})},Op=function(e){return function(r){var t;if(!Tp(r)||(t=ye(r)).type!==e)throw new Ot("Incompatible receiver, "+e+" required");return t}};dp||It.state?(A=It.state||(It.state=new gp),A.get=A.get,A.has=A.has,A.set=A.set,Ze=function(e,r){if(A.has(e))throw new Ot(ua);return r.facade=e,A.set(e,r),r},ye=function(e){return A.get(e)||{}},er=function(e){return A.has(e)}):($=yp("state"),hp[$]=!0,Ze=function(e,r){if(gt(e,$))throw new Ot(ua);return r.facade=e,mp(e,$,r),r},ye=function(e){return gt(e,$)?e[$]:{}},er=function(e){return gt(e,$)});var A,$;ca.exports={set:Ze,get:ye,has:er,enforce:Ip,getterFor:Op}});var ba=o((by,va)=>{"use strict";var xt=R(),xp=C(),fa=Function.prototype,Ep=xt&&Object.getOwnPropertyDescriptor,Et=xp(fa,"name"),wp=Et&&function(){}.name==="something",Sp=Et&&(!xt||xt&&Ep(fa,"name").configurable);va.exports={EXISTS:Et,PROPER:wp,CONFIGURABLE:Sp}});var Ta=o(da=>{"use strict";var qp=R(),Rp=Fr(),Pp=X(),Ap=K(),_p=B(),Lp=Hr();da.f=qp&&!Rp?Object.defineProperties:function(r,t){Ap(r);for(var n=_p(t),i=Lp(t),a=i.length,s=0,u;a>s;)Pp.f(r,u=i[s++],n[u]);return r}});var ya=o((Ty,ma)=>{"use strict";var jp=je();ma.exports=jp("document","documentElement")});var Rt=o((my,wa)=>{"use strict";var kp=K(),Cp=Ta(),ha=Yr(),Np=He(),Mp=ya(),Vp=Nr(),Fp=ze(),ga=">",Ia="<",St="prototype",qt="script",xa=Fp("IE_PROTO"),wt=function(){},Ea=function(e){return Ia+qt+ga+e+Ia+"/"+qt+ga},Oa=function(e){e.write(Ea("")),e.close();var r=e.parentWindow.Object;return e=null,r},Dp=function(){var e=Vp("iframe"),r="java"+qt+":",t;return e.style.display="none",Mp.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(Ea("document.F=Object")),t.close(),t.F},rr,tr=function(){try{rr=new ActiveXObject("htmlfile")}catch{}tr=typeof document<"u"?document.domain&&rr?Oa(rr):Dp():Oa(rr);for(var e=ha.length;e--;)delete tr[St][ha[e]];return tr()};Np[xa]=!0;wa.exports=Object.create||function(r,t){var n;return r!==null?(wt[St]=kp(r),n=new wt,wt[St]=null,n[xa]=r):n=tr(),t===void 0?n:Cp.f(n,t)}});var Pt=o((yy,Sa)=>{"use strict";var Up=J();Sa.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:Up(e,r,t),e}});var jt=o((hy,Pa)=>{"use strict";var Gp=w(),Qp=E(),Bp=k(),Kp=Rt(),qa=Ye(),Wp=Pt(),$p=N(),zp=le(),Lt=$p("iterator"),Ra=!1,M,At,_t;[].keys&&(_t=[].keys(),"next"in _t?(At=qa(qa(_t)),At!==Object.prototype&&(M=At)):Ra=!0);var Yp=!Bp(M)||Gp(function(){var e={};return M[Lt].call(e)!==e});Yp?M={}:zp&&(M=Kp(M));Qp(M[Lt])||Wp(M,Lt,function(){return this});Pa.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:Ra}});var nr=o((gy,_a)=>{"use strict";var Hp=N(),Xp=Hp("toStringTag"),Aa={};Aa[Xp]="z";_a.exports=String(Aa)==="[object z]"});var kt=o((Iy,La)=>{"use strict";var Jp=nr(),Zp=E(),ir=Pe(),ef=N(),rf=ef("toStringTag"),tf=Object,nf=ir(function(){return arguments}())==="Arguments",of=function(e,r){try{return e[r]}catch{}};La.exports=Jp?ir:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=of(r=tf(e),rf))=="string"?t:nf?ir(r):(n=ir(r))==="Object"&&Zp(r.callee)?"Arguments":n}});var ka=o((Oy,ja)=>{"use strict";var af=nr(),sf=kt();ja.exports=af?{}.toString:function(){return"[object "+sf(this)+"]"}});var or=o((xy,Na)=>{"use strict";var uf=nr(),lf=X().f,cf=J(),pf=C(),ff=ka(),vf=N(),Ca=vf("toStringTag");Na.exports=function(e,r,t,n){var i=t?e:e&&e.prototype;i&&(pf(i,Ca)||lf(i,Ca,{configurable:!0,value:r}),n&&!uf&&cf(i,"toString",ff))}});var Va=o((Ey,Ma)=>{"use strict";var bf=jt().IteratorPrototype,df=Rt(),Tf=ae(),mf=or(),yf=W(),hf=function(){return this};Ma.exports=function(e,r,t,n){var i=r+" Iterator";return e.prototype=df(bf,{next:Tf(+!n,t)}),mf(e,i,!1,!0),yf[i]=hf,e}});var Da=o((wy,Fa)=>{"use strict";var gf=L(),If=ue();Fa.exports=function(e,r,t){try{return gf(If(Object.getOwnPropertyDescriptor(e,r)[t]))}catch{}}});var Ga=o((Sy,Ua)=>{"use strict";var Of=k();Ua.exports=function(e){return Of(e)||e===null}});var Ba=o((qy,Qa)=>{"use strict";var xf=Ga(),Ef=String,wf=TypeError;Qa.exports=function(e){if(xf(e))return e;throw new wf("Can't set "+Ef(e)+" as a prototype")}});var Wa=o((Ry,Ka)=>{"use strict";var Sf=Da(),qf=k(),Rf=Le(),Pf=Ba();Ka.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=Sf(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch{}return function(i,a){return Rf(i),Pf(a),qf(i)&&(e?t(i,a):i.__proto__=a),i}}():void 0)});var ns=o((Py,ts)=>{"use strict";var Af=re(),_f=F(),ar=le(),es=ba(),Lf=E(),jf=Va(),$a=Ye(),za=Wa(),kf=or(),Cf=J(),Ct=Pt(),Nf=N(),Ya=W(),rs=jt(),Mf=es.PROPER,Vf=es.CONFIGURABLE,Ha=rs.IteratorPrototype,sr=rs.BUGGY_SAFARI_ITERATORS,he=Nf("iterator"),Xa="keys",ge="values",Ja="entries",Za=function(){return this};ts.exports=function(e,r,t,n,i,a,s){jf(t,r,n);var u=function(h){if(h===i&&b)return b;if(!sr&&h&&h in v)return v[h];switch(h){case Xa:return function(){return new t(this,h)};case ge:return function(){return new t(this,h)};case Ja:return function(){return new t(this,h)}}return function(){return new t(this)}},p=r+" Iterator",c=!1,v=e.prototype,l=v[he]||v["@@iterator"]||i&&v[i],b=!sr&&l||u(i),d=r==="Array"&&v.entries||l,m,y,I;if(d&&(m=$a(d.call(new e)),m!==Object.prototype&&m.next&&(!ar&&$a(m)!==Ha&&(za?za(m,Ha):Lf(m[he])||Ct(m,he,Za)),kf(m,p,!0,!0),ar&&(Ya[p]=Za))),Mf&&i===ge&&l&&l.name!==ge&&(!ar&&Vf?Cf(v,"name",ge):(c=!0,b=function(){return _f(l,this)})),i)if(y={values:u(ge),keys:a?b:u(Xa),entries:u(Ja)},s)for(I in y)(sr||c||!(I in v))&&Ct(v,I,y[I]);else Af({target:r,proto:!0,forced:sr||c},y);return(!ar||s)&&v[he]!==b&&Ct(v,he,b,{name:i}),Ya[r]=b,y}});var os=o((Ay,is)=>{"use strict";is.exports=function(e,r){return{value:e,done:r}}});var Mt=o((_y,cs)=>{"use strict";var Ff=B(),Nt=Ge(),as=W(),us=pa(),Df=X().f,Uf=ns(),ur=os(),Gf=le(),Qf=R(),ls="Array Iterator",Bf=us.set,Kf=us.getterFor(ls);cs.exports=Uf(Array,"Array",function(e,r){Bf(this,{type:ls,target:Ff(e),index:0,kind:r})},function(){var e=Kf(this),r=e.target,t=e.index++;if(!r||t>=r.length)return e.target=void 0,ur(void 0,!0);switch(e.kind){case"keys":return ur(t,!1);case"values":return ur(r[t],!1)}return ur([t,r[t]],!1)},"values");var ss=as.Arguments=as.Array;Nt("keys");Nt("values");Nt("entries");if(!Gf&&Qf&&ss.name!=="values")try{Df(ss,"name",{value:"values"})}catch{}});var fs=o((Ly,ps)=>{"use strict";var Wf=N(),$f=W(),zf=Wf("iterator"),Yf=Array.prototype;ps.exports=function(e){return e!==void 0&&($f.Array===e||Yf[zf]===e)}});var Vt=o((jy,bs)=>{"use strict";var Hf=kt(),vs=Ne(),Xf=_e(),Jf=W(),Zf=N(),ev=Zf("iterator");bs.exports=function(e){if(!Xf(e))return vs(e,ev)||vs(e,"@@iterator")||Jf[Hf(e)]}});var Ts=o((ky,ds)=>{"use strict";var rv=F(),tv=ue(),nv=K(),iv=Ce(),ov=Vt(),av=TypeError;ds.exports=function(e,r){var t=arguments.length<2?ov(e):r;if(tv(t))return nv(rv(t,e));throw new av(iv(e)+" is not iterable")}});var hs=o((Cy,ys)=>{"use strict";var sv=F(),ms=K(),uv=Ne();ys.exports=function(e,r,t){var n,i;ms(e);try{if(n=uv(e,"return"),!n){if(r==="throw")throw t;return t}n=sv(n,e)}catch(a){i=!0,n=a}if(r==="throw")throw t;if(i)throw n;return ms(n),t}});var Es=o((Ny,xs)=>{"use strict";var lv=Vr(),cv=F(),pv=K(),fv=Ce(),vv=fs(),bv=Ue(),gs=xr(),dv=Ts(),Tv=Vt(),Is=hs(),mv=TypeError,lr=function(e,r){this.stopped=e,this.result=r},Os=lr.prototype;xs.exports=function(e,r,t){var n=t&&t.that,i=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_RECORD),s=!!(t&&t.IS_ITERATOR),u=!!(t&&t.INTERRUPTED),p=lv(r,n),c,v,l,b,d,m,y,I=function(g){return c&&Is(c,"normal",g),new lr(!0,g)},h=function(g){return i?(pv(g),u?p(g[0],g[1],I):p(g[0],g[1])):u?p(g,I):p(g)};if(a)c=e.iterator;else if(s)c=e;else{if(v=Tv(e),!v)throw new mv(fv(e)+" is not iterable");if(vv(v)){for(l=0,b=bv(e);b>l;l++)if(d=h(e[l]),d&&gs(Os,d))return d;return new lr(!1)}c=dv(e,v)}for(m=a?e.next:c.next;!(y=cv(m,c)).done;){try{d=h(y.value)}catch(g){Is(c,"throw",g)}if(typeof d=="object"&&d&&gs(Os,d))return d}return new lr(!1)}});var Ss=o((My,ws)=>{"use strict";var yv=R(),hv=X(),gv=ae();ws.exports=function(e,r,t){yv?hv.f(e,r,gv(0,t)):e[r]=t}});var qs=o(()=>{"use strict";var Iv=re(),Ov=Es(),xv=Ss();Iv({target:"Object",stat:!0},{fromEntries:function(r){var t={};return Ov(r,function(n,i){xv(t,n,i)},{AS_ENTRIES:!0}),t}})});var Ps=o((Dy,Rs)=>{"use strict";Mt();qs();var Ev=se();Rs.exports=Ev.Object.fromEntries});var _s=o((Uy,As)=>{"use strict";As.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 js=o(()=>{"use strict";Mt();var wv=_s(),Sv=x(),qv=or(),Ls=W();for(cr in wv)qv(Sv[cr],cr),Ls[cr]=Ls.Array;var cr});var Cs=o((By,ks)=>{"use strict";var Rv=Ps();js();ks.exports=Rv});var Ms=o((Ky,Ns)=>{"use strict";var Pv=Cs();Ns.exports=Pv});var Dv={};pr(Dv,{ErrorCategory:()=>ra,InterfaceLanguage:()=>Us,InternalsExposure:()=>Ft,Logger:()=>we,Observable:()=>f,Subject:()=>j,Subscription:()=>O,Tracer:()=>Se,VERSION:()=>Kt,VKNumericLanguage:()=>Ds,ValueSubject:()=>be,VideoQuality:()=>Qe,abortable:()=>Zt,addScript:()=>Xt,areQualitiesExact:()=>oo,assertEmptyArray:()=>Ht,assertNever:()=>_,assertNonNullable:()=>$t,assertNotEmptyArray:()=>Yt,assertNullable:()=>zt,assertQualityIsExact:()=>ao,buffer:()=>rt,checkNever:()=>Wt,clearVideoElement:()=>co,cloneDeep:()=>uo,cloneDeepWith:()=>fe,combine:()=>Jr,createURL:()=>Ic,debounce:()=>nt,debounceFn:()=>We,detectEmbed:()=>Hi,devNull:()=>Dt,fillWithDefault:()=>so,filter:()=>st,filterChanged:()=>lt,flattenObject:()=>ve,fromEvent:()=>Ko,getExponentialDelay:()=>en,getHighestQuality:()=>eo,getTraceSubscriptionMethod:()=>po,interval:()=>Qo,isHigher:()=>Xi,isHigherOrEqual:()=>Ji,isInvariantQuality:()=>Ke,isLower:()=>Be,isLowerOrEqual:()=>Zi,isNonNullable:()=>G,isNullable:()=>Re,isValidURL:()=>gc,loadVKLangPack:()=>_v,map:()=>de,mapTo:()=>pt,merge:()=>Zr,noop:()=>V,now:()=>Jt,observableFrom:()=>Bo,observeElementSize:()=>lo,once:()=>ft,pairwise:()=>bt,safeStorage:()=>br,skip:()=>yt,tap:()=>Tt,throttle:()=>ot,throttleFn:()=>$e,timeCodeToString:()=>yc,timeout:()=>Go,videoHeightToQuality:()=>to,videoQualityToHeight:()=>io,videoSizeToQuality:()=>no});module.exports=Hs(Dv);var Kt="1.0.58-dev.ce524d87.0";var O=class{constructor(){this.subscriptions=[]}unsubscribe(){let r=this.subscriptions;this.subscriptions=[],r.forEach(t=>{typeof t=="function"?t():t.unsubscribe()})}add(r){return this.subscriptions.push(r),this}};var _=e=>{throw new Error(`${e} is value of unexpected type`)},Wt=e=>{};var V=()=>{};var f=class{constructor(r){r&&(this._subscribe=r)}subscribe(r,t){let n;t?typeof t=="function"?n={next:t,error:V}:n={next:s=>t.next(s),error:s=>t.error?.(s)}:n={next:V,error:V};let i=typeof r=="function"?{next:s=>{try{let u=r(s);u instanceof Promise&&u.catch(p=>n.next(p))}catch(u){n.next(u)}},error:s=>n.next(s)}:{next:s=>r.next(s),error:s=>r.error?r.error(s):n.next(s)},a;try{a=this._subscribe(i)}catch(s){i.error?.(s)}return new O().add(()=>{switch(i.next=V,i.error=V,typeof a){case"function":a();return;case"object":a.unsubscribe();return;case"undefined":return;default:return _(a)}})}pipe(...r){return r.reduce((t,n)=>n(t),this)}_subscribe(r){}};var j=class extends f{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(t){this.subscribers.forEach(n=>n.next(t))}error(t){this.subscribers.forEach(n=>n.error?.(t))}_subscribe(t){let n=this.keyCounter++;return this.subscribers.set(n,t),new O().add(()=>this.subscribers.delete(n))}};var we=class{constructor(){this.log$=new j;this.logs=[];this.log=r=>{let t={...r,timestamp:Date.now()};this.logs.push(t),this.log$.next(t)};this.getAllLogs=()=>this.logs}createCustomLog(r){return(...t)=>{let n;try{n=r(...t)}catch{n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(r){return this.createCustomLog(t=>({component:r,...t}))}};var qe=require("@opentelemetry/api");var U=require("@tracer/opentelemetry"),fr=class e{constructor({name:r}){}log(r,t){}error(r,t){}critical(r,t){}createComponentTracer(r){return new e({name:r})}end(){}getFinishedSpans(){}getTraceId(){return this.fakeTraceId}},Se=class e{constructor({name:r,parentContext:t,tracer:n}){this.childTracers=[];let i=!n;if(i){let s=(0,U.initTracerOpenTelemetry)({serviceName:"videoplayer-sdk-web",appToken:"L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb",spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),u=new U.TracerMemorySpanExporter,p=new U.TracerMemorySpanExporter;this.spanExporter=u,s.addSpanProcessor(new U.TracerAllSpansProcessor({startedSpansExporter:u,endedSpansExporter:p})),this.tracer=s.getTracer("sdk-videoplayer-tracer")}else this.tracer=n;this.span=this.tracer.startSpan(r,{root:i},t),this.context=qe.trace.setSpan(qe.context.active(),this.span)}log(r,t){this.span.addEvent(r,{...t,type:"log"})}error(r,t){this.span.addEvent(r,{...t,type:"error"})}critical(r,t){this.span.addEvent(r,{...t,type:"critical"})}static createRootTracer(r=!1){return r?new e({name:"Root"}):new fr({name:"Root"})}createComponentTracer(r){let t=new e({name:r,parentContext:this.context,tracer:this.tracer});return this.childTracers.push(t),t}end(){this.childTracers.forEach(r=>r.end()),this.span.end()}getFinishedSpans(){return this.spanExporter?.getJsonData()}getTraceId(){return this.span.spanContext().traceId}};function $t(e,r='Assertion "value is not nullable" failed'){if(e==null)throw new Error(r)}function zt(e,r='Assertion "value is nullable" failed'){if(e!=null)throw new Error(r)}function G(e){return typeof e<"u"&&e!==null}function Re(e){return e==null}function Yt(e,r){if(!e?.length)throw new Error(r)}function Ht(e,r){if(e?.length)throw new Error(r)}var Xt=(e,r,t)=>new Promise((n,i)=>{r.addEventListener("abort",()=>{u(),c.remove()});let a=()=>{u(),i("error")},s=()=>{u(),n()},u=()=>{p&&clearTimeout(p),c.removeEventListener("load",s),c.removeEventListener("error",a)},p;t&&(p=window.setTimeout(()=>{u(),i("timeout")},t));let c=document.createElement("script");c.addEventListener("load",s),c.addEventListener("error",a),c.src=e,document.head.appendChild(c)});var Jt=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var Zt=(e,r)=>async(...t)=>{let n=r(...t),i=e.aborted,a;for(;!i&&!e.aborted;)try{let s=await n.next(a);i=s.done??!1,a=s.value}catch(s){await n.throw(s)}return a};var en=(e,{start:r=0,factor:t=2,max:n=1/0,min:i=r,random:a=0}={})=>{let s=r;return s*=t**e,s*=1+(Math.random()*a*2-a),s=Math.round(s),s=Math.min(s,n),s=Math.max(s,i),s};var br={};pr(br,{clear:()=>tu,get:()=>Js,has:()=>eu,isPersistent:()=>Xs,remove:()=>ru,set:()=>Zs});var z,Q,vr=`vk-videoplayer-dummy-key-${Math.random()}`,Y=()=>{if(Q!==void 0)return Q;try{localStorage.setItem(vr,"test"),localStorage.removeItem(vr),Q=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(vr),Q=1}catch(r){if(r instanceof DOMException||r instanceof TypeError)Q=2;else throw r}else throw e}return Q===2&&(z=new Map),Q},Xs=()=>Y()===0,Js=e=>{let r=Y();switch(r){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return z?.get(e);default:_(r)}},Zs=(e,r)=>{let t=Y();switch(t){case 0:try{localStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:z?.set(e,r);return;default:_(t)}},eu=e=>{let r=Y();switch(r){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return z?.has(e)??!1;default:return _(r),!1}},ru=e=>{let r=Y();switch(r){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:z?.delete(e);return;default:_(r)}},tu=()=>{let e=Y();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return z?.clear();default:_(e)}};var Kr=ne(Yi(),1),Hi=()=>{let e,r=[];try{e=window.self!==window.top}catch(t){t instanceof DOMException&&t.name==="SecurityError"?e=!0:(e=!1,console.error(t))}try{window.location.ancestorOrigins&&(r=[...window.location.ancestorOrigins])}catch(t){console.error(t)}try{!r.length&&document.referrer&&(r=[new URL(document.referrer).origin])}catch(t){console.error(t)}return{isEmbed:e,origins:r,topOrigin:(0,Kr.default)(r,-1),immediateOrigin:(0,Kr.default)(r,0)}};var Qe=(l=>(l.INVARIANT="Invariant quality",l.Q_144P="144p",l.Q_240P="240p",l.Q_360P="360p",l.Q_480P="480p",l.Q_576P="576p",l.Q_720P="720p",l.Q_1080P="1080p",l.Q_1440P="1440p",l.Q_2160P="2160p",l.Q_4320P="4320p",l))(Qe||{});var S={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"576p":{width:1024,height:576},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},Xi=(e,r)=>S[e].height>S[r].height,Ji=(e,r)=>S[e].height>=S[r].height,Be=(e,r)=>S[e].height<S[r].height,Zi=(e,r)=>S[e].height<=S[r].height,eo=e=>e.sort((r,t)=>r===t?0:r==="Invariant quality"?1:t==="Invariant quality"?-1:Be(r,t)?1:-1)[0],ro=Object.keys(S).sort((e,r)=>Be(e,r)?-1:1),to=(e,r=.02)=>[...ro].find(n=>S[n].height*(1+r)>=e),no=({width:e,height:r})=>{let t=Math.min(e,r),n=Math.max(e,r);return ro.find(i=>{let a=S[i];return a.width>=n&&a.height>=t})},io=e=>S[e].height,Ke=e=>e==="Invariant quality",oo=e=>e.every(r=>!Ke(r));function ao(e){if(Ke(e))throw new Error("Expected exact quality")}var so=(e,r)=>{let t={};for(let n of Object.keys(r)){let i=r[n],a=e[n];Array.isArray(i)&&Array.isArray(a)?t[n]=a:typeof i=="object"&&typeof a=="object"?t[n]=so(a,i):t[n]=n in e?a:i}return t};var yc=e=>{let r="";return e>=3600&&(r+=Math.floor(e/3600)+"h",e=e%3600),e>=60&&(r+=Math.floor(e/60)+"m",e=e%60),e>0&&(r+=Math.floor(e)+"s"),r};function We(e,r=0,t){let n,i,a,s,u,p,c=0,v=!1,l=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(v=!!t.leading,l="maxWait"in t,a=t?.maxWait?Math.max(+t?.maxWait||0,r):a,b="trailing"in t?!!t.trailing:b);function m(T){let q=n,D=i;return n=i=void 0,c=T,s=e.apply(D,q),s}function y(T,q){return d?(u&&window.cancelAnimationFrame(u),window.requestAnimationFrame(T)):setTimeout(T,q)}function I(T){if(d){window.cancelAnimationFrame(T);return}clearTimeout(T)}function h(T){return c=T,u=y(Oe,r),v?m(T):s}function g(T){let q=T-p,D=T-c,Qt=r-q;return l?Math.min(Qt,a-D):Qt}function Ut(T){let q=T-p,D=T-c;return p===void 0||q>=r||q<0||l&&D>=a}function Oe(){let T=Date.now();if(Ut(T))return Gt(T);u=y(Oe,g(T))}function Gt(T){return u=void 0,b&&n?m(T):(n=i=void 0,s)}function Gs(){u!==void 0&&I(u),c=0,n=p=i=u=void 0}function Qs(){return u===void 0?s:Gt(Date.now())}function Bs(){return u!==void 0}function xe(...T){let q=Date.now(),D=Ut(q);if(n=T,i=this,p=q,D){if(u===void 0)return h(p);if(l)return u=y(Oe,r),m(p)}return u===void 0&&(u=y(Oe,r)),s}return xe.cancel=Gs,xe.flush=Qs,xe.pending=Bs,xe}var $e=(e,r=0,t)=>We(e,r,{...{leading:!0,trailing:!0},...t,maxWait:r});var fe=(e,r)=>{if(e===null||typeof e!="object")return e;let t=Array.isArray(e)?[]:{};for(let n in e){if(typeof r=="function"){let i=r(e[n],n,e,t);if(i!==void 0){t[n]=i;continue}}typeof e[n]=="object"?t[n]=fe(e[n],r):t[n]=e[n]}return t};var uo=e=>fe(e);var hc=300,lo=(e,r=hc)=>new f(t=>{let{width:n,height:i}=e.getBoundingClientRect();if(t.next({width:n,height:i}),!window.ResizeObserver)return;let a=new ResizeObserver($e(s=>{let u=s[0];if(!u)return;let p,c;u.contentBoxSize&&u.contentBoxSize[0]?(c=u.contentBoxSize[0].blockSize,p=u.contentBoxSize[0].inlineSize):u.contentRect&&(p=u.contentRect.width,c=u.contentRect.height),G(p)&&G(c)&&t.next({width:p,height:c})},r));return a.observe(e),()=>a.disconnect()});var ve=(e,r=6,t=".")=>{let n={};for(let i in e)if(!(!e.hasOwnProperty(i)||e[i]instanceof HTMLElement||!r))if(typeof e[i]=="object"&&e[i]!==null){let a=ve(e[i],r-1);for(let s in a)a.hasOwnProperty(s)&&(n[i+t+s]=a[s])}else n[i]=e[i];return n};var co=e=>{e.removeAttribute("src"),e.load()};var gc=e=>{let r;try{r=new URL(e)}catch{return!1}return r.protocol==="https:"};var Ic=e=>{try{return new URL(e)}catch{return null}};var po=e=>r=>t=>{let n=typeof t=="object";t==null||n&&!Object.keys(t).length||e(r,n?ve(t):{value:t})};var be=class extends j{constructor(r){super(),this.value=r}next(r){super.next(this.value=r)}error(r){super.error(this.value=r)}getValue(){return this.value}_subscribe(r){let t=super._subscribe(r);return r.next(this.value),t}};var Uo=ne(Xr(),1);function Jr(e){return new f(r=>{let t={},n=Object.keys(e).length,i=a=>s=>{a in t||n--,t[a]=s,n===0&&r.next(t)};return(0,Uo.default)(e).reduce((a,[s,u])=>a.add(u.subscribe(i(s))),new O)})}function Zr(...e){return new f(r=>e.reduce((t,n)=>t.add(n.subscribe(r)),new O))}var Go=e=>new f(r=>{let t=window.setTimeout(()=>{try{r.next()}catch(n){if(r.error)r.error(n);else throw n}},e);return()=>window.clearTimeout(t)});var Qo=e=>new f(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var Bo=e=>new f(r=>{e.forEach(t=>r.next(t))});var Ko=(e,r)=>new f(t=>{let n=i=>t.next(i);return e.addEventListener(r,n),()=>e.removeEventListener(r,n)});function rt(e){return r=>new f(t=>r.subscribe(new et(t,e)))}var et=class{constructor(r,t){this.destination=r;this.size=t;this.lastValues=[]}next(r){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(r),this.destination.next(this.lastValues)}error(r){this.destination.error?.(r)}};var rp={leading:!1,trailing:!0};function nt(e,r=rp){return t=>new f(n=>t.subscribe(new tt(n,e,r)))}var tt=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,G(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(t){if(this.destination.error)this.destination.error(t);else throw t}this.timeout=void 0},this.time)}error(r){this.destination.error?.(r)}};var tp={leading:!0,trailing:!1};function ot(e,r=tp){return t=>new f(n=>t.subscribe(new it(n,e,r)))}var it=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,Re(this.timeout)&&(this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(r){this.destination.error?.(r)}};function st(e){return r=>new f(t=>r.subscribe(new at(t,e)))}var at=class{constructor(r,t){this.destination=r;this.predicate=t}next(r){let t;try{t=this.predicate(r)}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};var ea=ne(Jo(),1);var pp=(e,r)=>{let t=(n,i)=>{let a=Object.keys(n);for(let s in i)if(!(0,ea.default)(a,s)||i[s]!==n[s])return!1;return!0};return t(e,r)&&t(r,e)},fp=(e,r)=>e instanceof Object&&r instanceof Object?pp(e,r):e===r;function lt(e=fp){return r=>new f(t=>r.subscribe(new ut(t,e)))}var Zo={},ut=class{constructor(r,t){this.destination=r;this.predicate=t;this.lastValue=Zo}next(r){let t;try{t=this.lastValue===Zo||!this.predicate(this.lastValue,r),this.lastValue=r instanceof Object?{...r}:r}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};function de(e){return r=>new f(t=>r.subscribe(new ct(t,e)))}var ct=class{constructor(r,t){this.destination=r;this.mapper=t}next(r){let t;try{t=this.mapper(r)}catch(n){throw this.error(n),n}this.destination.next(t)}error(r){this.destination.error?.(r)}};function pt(e){return de(()=>e)}function ft(){return e=>new f(r=>{let t=!1,n=!1,i=e.subscribe(a=>{t||(t=!0,r.next(a)),n&&i.unsubscribe()},a=>{t=!0,r.error?.(a),n&&i.unsubscribe()});return n=!0,t&&i.unsubscribe(),i})}function bt(){return e=>new f(r=>e.subscribe(new vt(r)))}var vt=class{constructor(r){this.destination=r;this.hasLast=!1}next(r){let t=this.last;if(this.last=r,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,r])}error(r){this.destination.error?.(r)}};function Tt(e){return r=>new f(t=>r.subscribe(new dt(t,e)))}var dt=class{constructor(r,t){this.destination=r;this.effect=t}next(r){try{this.effect(r)}catch(t){throw this.error(t),t}this.destination.next(r)}error(r){this.destination.error?.(r)}};function yt(e){return r=>new f(t=>r.subscribe(new mt(t,e)))}var mt=class{constructor(r,t){this.destination=r;this.count=t;t<0&&this.destination.error?.(new Error("Count can not be less than zero"))}next(r){this.count===0?this.destination.next(r):this.count--}error(r){this.destination.error?.(r)}};var ra=(u=>(u.NETWORK="network",u.VIDEO_PIPELINE="video_pipeline",u.EXTERNAL_API="external_api",u.PARSER="parser",u.DOM="dom",u.WTF="wtf",u.FATAL="fatal",u))(ra||{});var Xe=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(r,t,n){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:t,options:n})}removeEventListener(r,t){if(!(r in this.listeners))return;let n=this.listeners[r];for(let i=0,a=n.length;i<a;i++)if(n[i].callback===t){n.splice(i,1);return}}dispatchEvent(r){if(!(r.type in this.listeners))return;let n=this.listeners[r.type].slice();for(let i=0,a=n.length;i<a;i++){let s=n[i];try{s.callback.call(this,r)}catch(u){Promise.resolve().then(()=>{throw u})}s.options&&s.options.once&&this.removeEventListener(r.type,s.callback)}return!r.defaultPrevented}},te=class extends Xe{constructor(){super(),this.listeners||Xe.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(r){r.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,r)),super.dispatchEvent(r)}},Te=class{constructor(){Object.defineProperty(this,"signal",{value:new te,writable:!0,configurable:!0})}abort(r){let t;try{t=new Event("abort")}catch{typeof document<"u"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}let n=r;if(n===void 0)if(typeof document>"u")n=new Error("This operation was aborted"),n.name="AbortError";else try{n=new DOMException("signal is aborted without reason")}catch{n=new Error("This operation was aborted"),n.name="AbortError"}this.signal.reason=n,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol<"u"&&Symbol.toStringTag&&(Te.prototype[Symbol.toStringTag]="AbortController",te.prototype[Symbol.toStringTag]="AbortSignal");function Je(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function ht(e){typeof e=="function"&&(e={fetch:e});let{fetch:r,Request:t=r.Request,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!Je({fetch:r,Request:t,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:r,Request:a};let a=t;(a&&!a.prototype.hasOwnProperty("signal")||i)&&(a=function(c,v){let l;v&&v.signal&&(l=v.signal,delete v.signal);let b=new t(c,v);return l&&Object.defineProperty(b,"signal",{writable:!1,enumerable:!1,configurable:!0,value:l}),b},a.prototype=t.prototype);let s=r;return{fetch:(p,c)=>{let v=a&&a.prototype.isPrototypeOf(p)?p.signal:c?c.signal:void 0;if(v){let l;try{l=new DOMException("Aborted","AbortError")}catch{l=new Error("Aborted"),l.name="AbortError"}if(v.aborted)return Promise.reject(l);let b=new Promise((d,m)=>{v.addEventListener("abort",()=>m(l),{once:!0})});return c&&c.signal&&delete c.signal,Promise.race([b,s(p,c)])}return s(p,c)},Request:a}}var me=Je({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),ta=me?ht({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,na=me?ta.fetch:window.fetch,sy=me?ta.Request:window.Request,uy=me?Te:window.AbortController,ly=me?te:window.AbortSignal;var Vs=ne(Xr(),1),Fs=ne(Ms(),1),Ds=(l=>(l.Armenian="58",l.Azerbaijani="57",l.Belarusian="114",l.English="3",l.Kazakh="97",l.Portuguese="73",l.Russian="0",l.Spanish="4",l.Ukrainian="1",l.Uzbek="65",l.Vietnamese="75",l))(Ds||{}),Av="vk.com",_v=async(e,r,t)=>{let n=new URL(`https://${Av}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",r),e!==void 0&&n.searchParams.set("lang",e);let a=await(await na(n.toString())).json();return Lv(a,t)},Lv=(e,r)=>(0,Fs.default)((0,Vs.default)(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),jv(n)])),jv=e=>Array.isArray(e)?e[0]:e;var Us=(t=>(t.RU="ru",t.EN="en",t))(Us||{});var kv={UI:"__vkVideoPlayer",CORE:"__vkVideoCore"},Cv=(()=>{let e=0;return()=>{let r=e;return e=(e+1)%Number.MAX_SAFE_INTEGER,r}})(),Ft=class{constructor(r){this.id=Cv();this.type=r,this.initWindowObjects()}getWindowObject(){let r=this.key();return window[r]?.[this.id]??{}}initWindowObjects(){let r=this.key();window[r]||(window[r]={}),window[r][this.id]={}}expose(r){Object.assign(this.getWindowObject(),r)}destroy(){let r=this.key();window&&window[r]&&window[r][this.id]&&(delete window[r][this.id],Object.keys(window[r]).length||delete window[r])}key(){let{type:r}=this;return kv[r]}};var Dt={};pr(Dt,{create:()=>Nv,destroy:()=>Mv,push:()=>Vv,subscribe:()=>Fv});var Ie=new Map,Nv=(e,r)=>Ie.set(e,r??[]),Mv=e=>Ie.delete(e),Vv=(e,r)=>{let t=Ie.get(e);t&&(typeof t=="function"?t(r):t.push(r))},Fv=(e,r)=>{let t=Ie.get(e);if(t){if(t&&Array.isArray(t))for(let n of t)r(n);Ie.set(e,r)}};
6
+ "use strict";var $s=Object.create;var we=Object.defineProperty;var zs=Object.getOwnPropertyDescriptor;var Ys=Object.getOwnPropertyNames;var Hs=Object.getPrototypeOf,Xs=Object.prototype.hasOwnProperty;var o=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),fr=(e,r)=>{for(var t in r)we(e,t,{get:r[t],enumerable:!0})},Kt=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Ys(r))!Xs.call(e,i)&&i!==t&&we(e,i,{get:()=>r[i],enumerable:!(n=zs(r,i))||n.enumerable});return e};var ne=(e,r,t)=>(t=e!=null?$s(Hs(e)):{},Kt(r||!e||!e.__esModule?we(t,"default",{value:e,enumerable:!0}):t,e)),Js=e=>Kt(we({},"__esModule",{value:!0}),e);var x=o((Tr,tn)=>{"use strict";var ie=function(e){return e&&e.Math===Math&&e};tn.exports=ie(typeof globalThis=="object"&&globalThis)||ie(typeof window=="object"&&window)||ie(typeof self=="object"&&self)||ie(typeof global=="object"&&global)||ie(typeof Tr=="object"&&Tr)||function(){return this}()||Function("return this")()});var w=o((Ib,nn)=>{"use strict";nn.exports=function(e){try{return!!e()}catch{return!0}}});var oe=o((Ob,on)=>{"use strict";var ou=w();on.exports=!ou(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var cn=o((xb,ln)=>{"use strict";var au=oe(),un=Function.prototype,an=un.apply,sn=un.call;ln.exports=typeof Reflect=="object"&&Reflect.apply||(au?sn.bind(an):function(){return sn.apply(an,arguments)})});var L=o((Eb,vn)=>{"use strict";var pn=oe(),fn=Function.prototype,mr=fn.call,su=pn&&fn.bind.bind(mr,mr);vn.exports=pn?su:function(e){return function(){return mr.apply(e,arguments)}}});var Ae=o((wb,dn)=>{"use strict";var bn=L(),uu=bn({}.toString),lu=bn("".slice);dn.exports=function(e){return lu(uu(e),8,-1)}});var yr=o((Sb,Tn)=>{"use strict";var cu=Ae(),pu=L();Tn.exports=function(e){if(cu(e)==="Function")return pu(e)}});var E=o((qb,mn)=>{"use strict";var hr=typeof document=="object"&&document.all;mn.exports=typeof hr>"u"&&hr!==void 0?function(e){return typeof e=="function"||e===hr}:function(e){return typeof e=="function"}});var R=o((Rb,yn)=>{"use strict";var fu=w();yn.exports=!fu(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var F=o((Pb,hn)=>{"use strict";var vu=oe(),_e=Function.prototype.call;hn.exports=vu?_e.bind(_e):function(){return _e.apply(_e,arguments)}});var gr=o(On=>{"use strict";var gn={}.propertyIsEnumerable,In=Object.getOwnPropertyDescriptor,bu=In&&!gn.call({1:2},1);On.f=bu?function(r){var t=In(this,r);return!!t&&t.enumerable}:gn});var ae=o((_b,xn)=>{"use strict";xn.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var wn=o((Lb,En)=>{"use strict";var du=L(),Tu=w(),mu=Ae(),Ir=Object,yu=du("".split);En.exports=Tu(function(){return!Ir("z").propertyIsEnumerable(0)})?function(e){return mu(e)==="String"?yu(e,""):Ir(e)}:Ir});var Le=o((jb,Sn)=>{"use strict";Sn.exports=function(e){return e==null}});var je=o((kb,qn)=>{"use strict";var hu=Le(),gu=TypeError;qn.exports=function(e){if(hu(e))throw new gu("Can't call method on "+e);return e}});var B=o((Cb,Rn)=>{"use strict";var Iu=wn(),Ou=je();Rn.exports=function(e){return Iu(Ou(e))}});var k=o((Nb,Pn)=>{"use strict";var xu=E();Pn.exports=function(e){return typeof e=="object"?e!==null:xu(e)}});var se=o((Mb,An)=>{"use strict";An.exports={}});var ke=o((Vb,Ln)=>{"use strict";var Or=se(),xr=x(),Eu=E(),_n=function(e){return Eu(e)?e:void 0};Ln.exports=function(e,r){return arguments.length<2?_n(Or[e])||_n(xr[e]):Or[e]&&Or[e][r]||xr[e]&&xr[e][r]}});var Er=o((Fb,jn)=>{"use strict";var wu=L();jn.exports=wu({}.isPrototypeOf)});var Mn=o((Db,Nn)=>{"use strict";var Su=x(),kn=Su.navigator,Cn=kn&&kn.userAgent;Nn.exports=Cn?String(Cn):""});var Bn=o((Ub,Qn)=>{"use strict";var Gn=x(),wr=Mn(),Vn=Gn.process,Fn=Gn.Deno,Dn=Vn&&Vn.versions||Fn&&Fn.version,Un=Dn&&Dn.v8,P,Ce;Un&&(P=Un.split("."),Ce=P[0]>0&&P[0]<4?1:+(P[0]+P[1]));!Ce&&wr&&(P=wr.match(/Edge\/(\d+)/),(!P||P[1]>=74)&&(P=wr.match(/Chrome\/(\d+)/),P&&(Ce=+P[1])));Qn.exports=Ce});var Sr=o((Gb,Wn)=>{"use strict";var Kn=Bn(),qu=w(),Ru=x(),Pu=Ru.String;Wn.exports=!!Object.getOwnPropertySymbols&&!qu(function(){var e=Symbol("symbol detection");return!Pu(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Kn&&Kn<41})});var qr=o((Qb,$n)=>{"use strict";var Au=Sr();$n.exports=Au&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Rr=o((Bb,zn)=>{"use strict";var _u=ke(),Lu=E(),ju=Er(),ku=qr(),Cu=Object;zn.exports=ku?function(e){return typeof e=="symbol"}:function(e){var r=_u("Symbol");return Lu(r)&&ju(r.prototype,Cu(e))}});var Ne=o((Kb,Yn)=>{"use strict";var Nu=String;Yn.exports=function(e){try{return Nu(e)}catch{return"Object"}}});var ue=o((Wb,Hn)=>{"use strict";var Mu=E(),Vu=Ne(),Fu=TypeError;Hn.exports=function(e){if(Mu(e))return e;throw new Fu(Vu(e)+" is not a function")}});var Me=o(($b,Xn)=>{"use strict";var Du=ue(),Uu=Le();Xn.exports=function(e,r){var t=e[r];return Uu(t)?void 0:Du(t)}});var Zn=o((zb,Jn)=>{"use strict";var Pr=F(),Ar=E(),_r=k(),Gu=TypeError;Jn.exports=function(e,r){var t,n;if(r==="string"&&Ar(t=e.toString)&&!_r(n=Pr(t,e))||Ar(t=e.valueOf)&&!_r(n=Pr(t,e))||r!=="string"&&Ar(t=e.toString)&&!_r(n=Pr(t,e)))return n;throw new Gu("Can't convert object to primitive value")}});var le=o((Yb,ei)=>{"use strict";ei.exports=!0});var ni=o((Hb,ti)=>{"use strict";var ri=x(),Qu=Object.defineProperty;ti.exports=function(e,r){try{Qu(ri,e,{value:r,configurable:!0,writable:!0})}catch{ri[e]=r}return r}});var Ve=o((Xb,ai)=>{"use strict";var Bu=le(),Ku=x(),Wu=ni(),ii="__core-js_shared__",oi=ai.exports=Ku[ii]||Wu(ii,{});(oi.versions||(oi.versions=[])).push({version:"3.38.0",mode:Bu?"pure":"global",copyright:"\xA9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var Lr=o((Jb,ui)=>{"use strict";var si=Ve();ui.exports=function(e,r){return si[e]||(si[e]=r||{})}});var Fe=o((Zb,li)=>{"use strict";var $u=je(),zu=Object;li.exports=function(e){return zu($u(e))}});var C=o((ed,ci)=>{"use strict";var Yu=L(),Hu=Fe(),Xu=Yu({}.hasOwnProperty);ci.exports=Object.hasOwn||function(r,t){return Xu(Hu(r),t)}});var jr=o((rd,pi)=>{"use strict";var Ju=L(),Zu=0,el=Math.random(),rl=Ju(1 .toString);pi.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+rl(++Zu+el,36)}});var N=o((td,vi)=>{"use strict";var tl=x(),nl=Lr(),fi=C(),il=jr(),ol=Sr(),al=qr(),H=tl.Symbol,kr=nl("wks"),sl=al?H.for||H:H&&H.withoutSetter||il;vi.exports=function(e){return fi(kr,e)||(kr[e]=ol&&fi(H,e)?H[e]:sl("Symbol."+e)),kr[e]}});var mi=o((nd,Ti)=>{"use strict";var ul=F(),bi=k(),di=Rr(),ll=Me(),cl=Zn(),pl=N(),fl=TypeError,vl=pl("toPrimitive");Ti.exports=function(e,r){if(!bi(e)||di(e))return e;var t=ll(e,vl),n;if(t){if(r===void 0&&(r="default"),n=ul(t,e,r),!bi(n)||di(n))return n;throw new fl("Can't convert object to primitive value")}return r===void 0&&(r="number"),cl(e,r)}});var Cr=o((id,yi)=>{"use strict";var bl=mi(),dl=Rr();yi.exports=function(e){var r=bl(e,"string");return dl(r)?r:r+""}});var Mr=o((od,gi)=>{"use strict";var Tl=x(),hi=k(),Nr=Tl.document,ml=hi(Nr)&&hi(Nr.createElement);gi.exports=function(e){return ml?Nr.createElement(e):{}}});var Vr=o((ad,Ii)=>{"use strict";var yl=R(),hl=w(),gl=Mr();Ii.exports=!yl&&!hl(function(){return Object.defineProperty(gl("div"),"a",{get:function(){return 7}}).a!==7})});var Ei=o(xi=>{"use strict";var Il=R(),Ol=F(),xl=gr(),El=ae(),wl=B(),Sl=Cr(),ql=C(),Rl=Vr(),Oi=Object.getOwnPropertyDescriptor;xi.f=Il?Oi:function(r,t){if(r=wl(r),t=Sl(t),Rl)try{return Oi(r,t)}catch{}if(ql(r,t))return El(!Ol(xl.f,r,t),r[t])}});var Si=o((ud,wi)=>{"use strict";var Pl=w(),Al=E(),_l=/#|\.prototype\./,ce=function(e,r){var t=jl[Ll(e)];return t===Cl?!0:t===kl?!1:Al(r)?Pl(r):!!r},Ll=ce.normalize=function(e){return String(e).replace(_l,".").toLowerCase()},jl=ce.data={},kl=ce.NATIVE="N",Cl=ce.POLYFILL="P";wi.exports=ce});var Fr=o((ld,Ri)=>{"use strict";var qi=yr(),Nl=ue(),Ml=oe(),Vl=qi(qi.bind);Ri.exports=function(e,r){return Nl(e),r===void 0?e:Ml?Vl(e,r):function(){return e.apply(r,arguments)}}});var Dr=o((cd,Pi)=>{"use strict";var Fl=R(),Dl=w();Pi.exports=Fl&&Dl(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var K=o((pd,Ai)=>{"use strict";var Ul=k(),Gl=String,Ql=TypeError;Ai.exports=function(e){if(Ul(e))return e;throw new Ql(Gl(e)+" is not an object")}});var X=o(Li=>{"use strict";var Bl=R(),Kl=Vr(),Wl=Dr(),De=K(),_i=Cr(),$l=TypeError,Ur=Object.defineProperty,zl=Object.getOwnPropertyDescriptor,Gr="enumerable",Qr="configurable",Br="writable";Li.f=Bl?Wl?function(r,t,n){if(De(r),t=_i(t),De(n),typeof r=="function"&&t==="prototype"&&"value"in n&&Br in n&&!n[Br]){var i=zl(r,t);i&&i[Br]&&(r[t]=n.value,n={configurable:Qr in n?n[Qr]:i[Qr],enumerable:Gr in n?n[Gr]:i[Gr],writable:!1})}return Ur(r,t,n)}:Ur:function(r,t,n){if(De(r),t=_i(t),De(n),Kl)try{return Ur(r,t,n)}catch{}if("get"in n||"set"in n)throw new $l("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var J=o((vd,ji)=>{"use strict";var Yl=R(),Hl=X(),Xl=ae();ji.exports=Yl?function(e,r,t){return Hl.f(e,r,Xl(1,t))}:function(e,r,t){return e[r]=t,e}});var re=o((bd,Ci)=>{"use strict";var pe=x(),Jl=cn(),Zl=yr(),ec=E(),rc=Ei().f,tc=Si(),Z=se(),nc=Fr(),ee=J(),ki=C();Ve();var ic=function(e){var r=function(t,n,i){if(this instanceof r){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return Jl(e,this,arguments)};return r.prototype=e.prototype,r};Ci.exports=function(e,r){var t=e.target,n=e.global,i=e.stat,a=e.proto,s=n?pe:i?pe[t]:pe[t]&&pe[t].prototype,u=n?Z:Z[t]||ee(Z,t,{})[t],p=u.prototype,c,v,l,b,d,m,y,I,h;for(b in r)c=tc(n?b:t+(i?".":"#")+b,e.forced),v=!c&&s&&ki(s,b),m=u[b],v&&(e.dontCallGetSet?(h=rc(s,b),y=h&&h.value):y=s[b]),d=v&&y?y:r[b],!(!c&&!a&&typeof m==typeof d)&&(e.bind&&v?I=nc(d,pe):e.wrap&&v?I=ic(d):a&&ec(d)?I=Zl(d):I=d,(e.sham||d&&d.sham||m&&m.sham)&&ee(I,"sham",!0),ee(u,b,I),a&&(l=t+"Prototype",ki(Z,l)||ee(Z,l,{}),ee(Z[l],b,d),e.real&&p&&(c||!p[b])&&ee(p,b,d)))}});var Mi=o((dd,Ni)=>{"use strict";var oc=Math.ceil,ac=Math.floor;Ni.exports=Math.trunc||function(r){var t=+r;return(t>0?ac:oc)(t)}});var Ue=o((Td,Vi)=>{"use strict";var sc=Mi();Vi.exports=function(e){var r=+e;return r!==r||r===0?0:sc(r)}});var Di=o((md,Fi)=>{"use strict";var uc=Ue(),lc=Math.min;Fi.exports=function(e){var r=uc(e);return r>0?lc(r,9007199254740991):0}});var Ge=o((yd,Ui)=>{"use strict";var cc=Di();Ui.exports=function(e){return cc(e.length)}});var Qe=o((hd,Gi)=>{"use strict";Gi.exports=function(){}});var Qi=o(()=>{"use strict";var pc=re(),fc=Fe(),vc=Ge(),bc=Ue(),dc=Qe();pc({target:"Array",proto:!0},{at:function(r){var t=fc(this),n=vc(t),i=bc(r),a=i>=0?i:n+i;return a<0||a>=n?void 0:t[a]}});dc("at")});var Kr=o((Od,Bi)=>{"use strict";var Tc=ke();Bi.exports=Tc});var Wi=o((xd,Ki)=>{"use strict";Qi();var mc=Kr();Ki.exports=mc("Array","at")});var zi=o((Ed,$i)=>{"use strict";var yc=Wi();$i.exports=yc});var Hi=o((wd,Yi)=>{"use strict";var hc=zi();Yi.exports=hc});var Ye=o((AT,To)=>{"use strict";var Ec=Lr(),wc=jr(),bo=Ec("keys");To.exports=function(e){return bo[e]||(bo[e]=wc(e))}});var yo=o((_T,mo)=>{"use strict";var Sc=w();mo.exports=!Sc(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var He=o((LT,go)=>{"use strict";var qc=C(),Rc=E(),Pc=Fe(),Ac=Ye(),_c=yo(),ho=Ac("IE_PROTO"),$r=Object,Lc=$r.prototype;go.exports=_c?$r.getPrototypeOf:function(e){var r=Pc(e);if(qc(r,ho))return r[ho];var t=r.constructor;return Rc(t)&&r instanceof t?t.prototype:r instanceof $r?Lc:null}});var Oo=o((jT,Io)=>{"use strict";var jc=Ue(),kc=Math.max,Cc=Math.min;Io.exports=function(e,r){var t=jc(e);return t<0?kc(t+r,0):Cc(t,r)}});var zr=o((kT,Eo)=>{"use strict";var Nc=B(),Mc=Oo(),Vc=Ge(),xo=function(e){return function(r,t,n){var i=Nc(r),a=Vc(i);if(a===0)return!e&&-1;var s=Mc(n,a),u;if(e&&t!==t){for(;a>s;)if(u=i[s++],u!==u)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===t)return e||s||0;return!e&&-1}};Eo.exports={includes:xo(!0),indexOf:xo(!1)}});var Xe=o((CT,wo)=>{"use strict";wo.exports={}});var Ro=o((NT,qo)=>{"use strict";var Fc=L(),Yr=C(),Dc=B(),Uc=zr().indexOf,Gc=Xe(),So=Fc([].push);qo.exports=function(e,r){var t=Dc(e),n=0,i=[],a;for(a in t)!Yr(Gc,a)&&Yr(t,a)&&So(i,a);for(;r.length>n;)Yr(t,a=r[n++])&&(~Uc(i,a)||So(i,a));return i}});var Hr=o((MT,Po)=>{"use strict";Po.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Xr=o((VT,Ao)=>{"use strict";var Qc=Ro(),Bc=Hr();Ao.exports=Object.keys||function(r){return Qc(r,Bc)}});var No=o((FT,Co)=>{"use strict";var Lo=R(),Kc=w(),jo=L(),Wc=He(),$c=Xr(),zc=B(),Yc=gr().f,ko=jo(Yc),Hc=jo([].push),Xc=Lo&&Kc(function(){var e=Object.create(null);return e[2]=2,!ko(e,2)}),_o=function(e){return function(r){for(var t=zc(r),n=$c(t),i=Xc&&Wc(t)===null,a=n.length,s=0,u=[],p;a>s;)p=n[s++],(!Lo||(i?p in t:ko(t,p)))&&Hc(u,e?[p,t[p]]:t[p]);return u}};Co.exports={entries:_o(!0),values:_o(!1)}});var Mo=o(()=>{"use strict";var Jc=re(),Zc=No().entries;Jc({target:"Object",stat:!0},{entries:function(r){return Zc(r)}})});var Fo=o((GT,Vo)=>{"use strict";Mo();var ep=se();Vo.exports=ep.Object.entries});var Uo=o((QT,Do)=>{"use strict";var rp=Fo();Do.exports=rp});var Jr=o((BT,Go)=>{"use strict";var tp=Uo();Go.exports=tp});var zo=o(()=>{"use strict";var op=re(),ap=zr().includes,sp=w(),up=Qe(),lp=sp(function(){return!Array(1).includes()});op({target:"Array",proto:!0,forced:lp},{includes:function(r){return ap(this,r,arguments.length>1?arguments[1]:void 0)}});up("includes")});var Ho=o((hm,Yo)=>{"use strict";zo();var cp=Kr();Yo.exports=cp("Array","includes")});var Jo=o((gm,Xo)=>{"use strict";var pp=Ho();Xo.exports=pp});var ea=o((Im,Zo)=>{"use strict";var fp=Jo();Zo.exports=fp});var W=o((yy,aa)=>{"use strict";aa.exports={}});var la=o((hy,ua)=>{"use strict";var dp=x(),Tp=E(),sa=dp.WeakMap;ua.exports=Tp(sa)&&/native code/.test(String(sa))});var va=o((gy,fa)=>{"use strict";var mp=la(),pa=x(),yp=k(),hp=J(),It=C(),Ot=Ve(),gp=Ye(),Ip=Xe(),ca="Object already initialized",xt=pa.TypeError,Op=pa.WeakMap,er,he,rr,xp=function(e){return rr(e)?he(e):er(e,{})},Ep=function(e){return function(r){var t;if(!yp(r)||(t=he(r)).type!==e)throw new xt("Incompatible receiver, "+e+" required");return t}};mp||Ot.state?(A=Ot.state||(Ot.state=new Op),A.get=A.get,A.has=A.has,A.set=A.set,er=function(e,r){if(A.has(e))throw new xt(ca);return r.facade=e,A.set(e,r),r},he=function(e){return A.get(e)||{}},rr=function(e){return A.has(e)}):($=gp("state"),Ip[$]=!0,er=function(e,r){if(It(e,$))throw new xt(ca);return r.facade=e,hp(e,$,r),r},he=function(e){return It(e,$)?e[$]:{}},rr=function(e){return It(e,$)});var A,$;fa.exports={set:er,get:he,has:rr,enforce:xp,getterFor:Ep}});var Ta=o((Iy,da)=>{"use strict";var Et=R(),wp=C(),ba=Function.prototype,Sp=Et&&Object.getOwnPropertyDescriptor,wt=wp(ba,"name"),qp=wt&&function(){}.name==="something",Rp=wt&&(!Et||Et&&Sp(ba,"name").configurable);da.exports={EXISTS:wt,PROPER:qp,CONFIGURABLE:Rp}});var ya=o(ma=>{"use strict";var Pp=R(),Ap=Dr(),_p=X(),Lp=K(),jp=B(),kp=Xr();ma.f=Pp&&!Ap?Object.defineProperties:function(r,t){Lp(r);for(var n=jp(t),i=kp(t),a=i.length,s=0,u;a>s;)_p.f(r,u=i[s++],n[u]);return r}});var ga=o((xy,ha)=>{"use strict";var Cp=ke();ha.exports=Cp("document","documentElement")});var Pt=o((Ey,qa)=>{"use strict";var Np=K(),Mp=ya(),Ia=Hr(),Vp=Xe(),Fp=ga(),Dp=Mr(),Up=Ye(),Oa=">",xa="<",qt="prototype",Rt="script",wa=Up("IE_PROTO"),St=function(){},Sa=function(e){return xa+Rt+Oa+e+xa+"/"+Rt+Oa},Ea=function(e){e.write(Sa("")),e.close();var r=e.parentWindow.Object;return e=null,r},Gp=function(){var e=Dp("iframe"),r="java"+Rt+":",t;return e.style.display="none",Fp.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(Sa("document.F=Object")),t.close(),t.F},tr,nr=function(){try{tr=new ActiveXObject("htmlfile")}catch{}nr=typeof document<"u"?document.domain&&tr?Ea(tr):Gp():Ea(tr);for(var e=Ia.length;e--;)delete nr[qt][Ia[e]];return nr()};Vp[wa]=!0;qa.exports=Object.create||function(r,t){var n;return r!==null?(St[qt]=Np(r),n=new St,St[qt]=null,n[wa]=r):n=nr(),t===void 0?n:Mp.f(n,t)}});var At=o((wy,Ra)=>{"use strict";var Qp=J();Ra.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:Qp(e,r,t),e}});var kt=o((Sy,_a)=>{"use strict";var Bp=w(),Kp=E(),Wp=k(),$p=Pt(),Pa=He(),zp=At(),Yp=N(),Hp=le(),jt=Yp("iterator"),Aa=!1,M,_t,Lt;[].keys&&(Lt=[].keys(),"next"in Lt?(_t=Pa(Pa(Lt)),_t!==Object.prototype&&(M=_t)):Aa=!0);var Xp=!Wp(M)||Bp(function(){var e={};return M[jt].call(e)!==e});Xp?M={}:Hp&&(M=$p(M));Kp(M[jt])||zp(M,jt,function(){return this});_a.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:Aa}});var ir=o((qy,ja)=>{"use strict";var Jp=N(),Zp=Jp("toStringTag"),La={};La[Zp]="z";ja.exports=String(La)==="[object z]"});var Ct=o((Ry,ka)=>{"use strict";var ef=ir(),rf=E(),or=Ae(),tf=N(),nf=tf("toStringTag"),of=Object,af=or(function(){return arguments}())==="Arguments",sf=function(e,r){try{return e[r]}catch{}};ka.exports=ef?or:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=sf(r=of(e),nf))=="string"?t:af?or(r):(n=or(r))==="Object"&&rf(r.callee)?"Arguments":n}});var Na=o((Py,Ca)=>{"use strict";var uf=ir(),lf=Ct();Ca.exports=uf?{}.toString:function(){return"[object "+lf(this)+"]"}});var ar=o((Ay,Va)=>{"use strict";var cf=ir(),pf=X().f,ff=J(),vf=C(),bf=Na(),df=N(),Ma=df("toStringTag");Va.exports=function(e,r,t,n){var i=t?e:e&&e.prototype;i&&(vf(i,Ma)||pf(i,Ma,{configurable:!0,value:r}),n&&!cf&&ff(i,"toString",bf))}});var Da=o((_y,Fa)=>{"use strict";var Tf=kt().IteratorPrototype,mf=Pt(),yf=ae(),hf=ar(),gf=W(),If=function(){return this};Fa.exports=function(e,r,t,n){var i=r+" Iterator";return e.prototype=mf(Tf,{next:yf(+!n,t)}),hf(e,i,!1,!0),gf[i]=If,e}});var Ga=o((Ly,Ua)=>{"use strict";var Of=L(),xf=ue();Ua.exports=function(e,r,t){try{return Of(xf(Object.getOwnPropertyDescriptor(e,r)[t]))}catch{}}});var Ba=o((jy,Qa)=>{"use strict";var Ef=k();Qa.exports=function(e){return Ef(e)||e===null}});var Wa=o((ky,Ka)=>{"use strict";var wf=Ba(),Sf=String,qf=TypeError;Ka.exports=function(e){if(wf(e))return e;throw new qf("Can't set "+Sf(e)+" as a prototype")}});var za=o((Cy,$a)=>{"use strict";var Rf=Ga(),Pf=k(),Af=je(),_f=Wa();$a.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=Rf(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch{}return function(i,a){return Af(i),_f(a),Pf(i)&&(e?t(i,a):i.__proto__=a),i}}():void 0)});var os=o((Ny,is)=>{"use strict";var Lf=re(),jf=F(),sr=le(),ts=Ta(),kf=E(),Cf=Da(),Ya=He(),Ha=za(),Nf=ar(),Mf=J(),Nt=At(),Vf=N(),Xa=W(),ns=kt(),Ff=ts.PROPER,Df=ts.CONFIGURABLE,Ja=ns.IteratorPrototype,ur=ns.BUGGY_SAFARI_ITERATORS,ge=Vf("iterator"),Za="keys",Ie="values",es="entries",rs=function(){return this};is.exports=function(e,r,t,n,i,a,s){Cf(t,r,n);var u=function(h){if(h===i&&b)return b;if(!ur&&h&&h in v)return v[h];switch(h){case Za:return function(){return new t(this,h)};case Ie:return function(){return new t(this,h)};case es:return function(){return new t(this,h)}}return function(){return new t(this)}},p=r+" Iterator",c=!1,v=e.prototype,l=v[ge]||v["@@iterator"]||i&&v[i],b=!ur&&l||u(i),d=r==="Array"&&v.entries||l,m,y,I;if(d&&(m=Ya(d.call(new e)),m!==Object.prototype&&m.next&&(!sr&&Ya(m)!==Ja&&(Ha?Ha(m,Ja):kf(m[ge])||Nt(m,ge,rs)),Nf(m,p,!0,!0),sr&&(Xa[p]=rs))),Ff&&i===Ie&&l&&l.name!==Ie&&(!sr&&Df?Mf(v,"name",Ie):(c=!0,b=function(){return jf(l,this)})),i)if(y={values:u(Ie),keys:a?b:u(Za),entries:u(es)},s)for(I in y)(ur||c||!(I in v))&&Nt(v,I,y[I]);else Lf({target:r,proto:!0,forced:ur||c},y);return(!sr||s)&&v[ge]!==b&&Nt(v,ge,b,{name:i}),Xa[r]=b,y}});var ss=o((My,as)=>{"use strict";as.exports=function(e,r){return{value:e,done:r}}});var Vt=o((Vy,fs)=>{"use strict";var Uf=B(),Mt=Qe(),us=W(),cs=va(),Gf=X().f,Qf=os(),lr=ss(),Bf=le(),Kf=R(),ps="Array Iterator",Wf=cs.set,$f=cs.getterFor(ps);fs.exports=Qf(Array,"Array",function(e,r){Wf(this,{type:ps,target:Uf(e),index:0,kind:r})},function(){var e=$f(this),r=e.target,t=e.index++;if(!r||t>=r.length)return e.target=void 0,lr(void 0,!0);switch(e.kind){case"keys":return lr(t,!1);case"values":return lr(r[t],!1)}return lr([t,r[t]],!1)},"values");var ls=us.Arguments=us.Array;Mt("keys");Mt("values");Mt("entries");if(!Bf&&Kf&&ls.name!=="values")try{Gf(ls,"name",{value:"values"})}catch{}});var bs=o((Fy,vs)=>{"use strict";var zf=N(),Yf=W(),Hf=zf("iterator"),Xf=Array.prototype;vs.exports=function(e){return e!==void 0&&(Yf.Array===e||Xf[Hf]===e)}});var Ft=o((Dy,Ts)=>{"use strict";var Jf=Ct(),ds=Me(),Zf=Le(),ev=W(),rv=N(),tv=rv("iterator");Ts.exports=function(e){if(!Zf(e))return ds(e,tv)||ds(e,"@@iterator")||ev[Jf(e)]}});var ys=o((Uy,ms)=>{"use strict";var nv=F(),iv=ue(),ov=K(),av=Ne(),sv=Ft(),uv=TypeError;ms.exports=function(e,r){var t=arguments.length<2?sv(e):r;if(iv(t))return ov(nv(t,e));throw new uv(av(e)+" is not iterable")}});var Is=o((Gy,gs)=>{"use strict";var lv=F(),hs=K(),cv=Me();gs.exports=function(e,r,t){var n,i;hs(e);try{if(n=cv(e,"return"),!n){if(r==="throw")throw t;return t}n=lv(n,e)}catch(a){i=!0,n=a}if(r==="throw")throw t;if(i)throw n;return hs(n),t}});var Ss=o((Qy,ws)=>{"use strict";var pv=Fr(),fv=F(),vv=K(),bv=Ne(),dv=bs(),Tv=Ge(),Os=Er(),mv=ys(),yv=Ft(),xs=Is(),hv=TypeError,cr=function(e,r){this.stopped=e,this.result=r},Es=cr.prototype;ws.exports=function(e,r,t){var n=t&&t.that,i=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_RECORD),s=!!(t&&t.IS_ITERATOR),u=!!(t&&t.INTERRUPTED),p=pv(r,n),c,v,l,b,d,m,y,I=function(g){return c&&xs(c,"normal",g),new cr(!0,g)},h=function(g){return i?(vv(g),u?p(g[0],g[1],I):p(g[0],g[1])):u?p(g,I):p(g)};if(a)c=e.iterator;else if(s)c=e;else{if(v=yv(e),!v)throw new hv(bv(e)+" is not iterable");if(dv(v)){for(l=0,b=Tv(e);b>l;l++)if(d=h(e[l]),d&&Os(Es,d))return d;return new cr(!1)}c=mv(e,v)}for(m=a?e.next:c.next;!(y=fv(m,c)).done;){try{d=h(y.value)}catch(g){xs(c,"throw",g)}if(typeof d=="object"&&d&&Os(Es,d))return d}return new cr(!1)}});var Rs=o((By,qs)=>{"use strict";var gv=R(),Iv=X(),Ov=ae();qs.exports=function(e,r,t){gv?Iv.f(e,r,Ov(0,t)):e[r]=t}});var Ps=o(()=>{"use strict";var xv=re(),Ev=Ss(),wv=Rs();xv({target:"Object",stat:!0},{fromEntries:function(r){var t={};return Ev(r,function(n,i){wv(t,n,i)},{AS_ENTRIES:!0}),t}})});var _s=o(($y,As)=>{"use strict";Vt();Ps();var Sv=se();As.exports=Sv.Object.fromEntries});var js=o((zy,Ls)=>{"use strict";Ls.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 Cs=o(()=>{"use strict";Vt();var qv=js(),Rv=x(),Pv=ar(),ks=W();for(pr in qv)Pv(Rv[pr],pr),ks[pr]=ks.Array;var pr});var Ms=o((Xy,Ns)=>{"use strict";var Av=_s();Cs();Ns.exports=Av});var Fs=o((Jy,Vs)=>{"use strict";var _v=Ms();Vs.exports=_v});var Gv={};fr(Gv,{ErrorCategory:()=>na,InterfaceLanguage:()=>Qs,InternalsExposure:()=>Dt,Logger:()=>Se,Observable:()=>f,Subject:()=>j,Subscription:()=>O,SubscriptionRemovable:()=>de,Tracer:()=>qe,VERSION:()=>Wt,VKNumericLanguage:()=>Gs,ValueSubject:()=>be,VideoQuality:()=>Be,abortable:()=>en,addScript:()=>Jt,areQualitiesExact:()=>ao,assertEmptyArray:()=>Xt,assertNever:()=>_,assertNonNullable:()=>zt,assertNotEmptyArray:()=>Ht,assertNullable:()=>Yt,assertQualityIsExact:()=>so,binarySearch:()=>fo,buffer:()=>tt,checkNever:()=>$t,clearVideoElement:()=>po,cloneDeep:()=>lo,cloneDeepWith:()=>fe,combine:()=>Zr,createURL:()=>xc,debounce:()=>it,debounceFn:()=>$e,detectEmbed:()=>Xi,devNull:()=>Ut,fillWithDefault:()=>uo,filter:()=>ut,filterChanged:()=>ct,flattenObject:()=>ve,fromEvent:()=>$o,getExponentialDelay:()=>rn,getHighestQuality:()=>ro,getTraceSubscriptionMethod:()=>vo,interval:()=>Ko,isHigher:()=>Ji,isHigherOrEqual:()=>Zi,isInvariantQuality:()=>We,isLower:()=>Ke,isLowerOrEqual:()=>eo,isNonNullable:()=>G,isNullable:()=>Pe,isValidURL:()=>Oc,loadVKLangPack:()=>jv,map:()=>Te,mapTo:()=>ft,merge:()=>et,noop:()=>V,now:()=>Zt,observableFrom:()=>Wo,observeElementSize:()=>co,once:()=>vt,pairwise:()=>dt,safeStorage:()=>dr,skip:()=>ht,tap:()=>mt,throttle:()=>at,throttleFn:()=>ze,timeCodeToString:()=>gc,timeout:()=>Bo,videoHeightToQuality:()=>no,videoQualityToHeight:()=>oo,videoSizeToQuality:()=>io});module.exports=Js(Gv);var Wt="1.0.58-dev.ef87de0a.0";var O=class{constructor(){this.subscriptions=[]}unsubscribe(){let r=this.subscriptions;this.subscriptions=[],r.forEach(t=>{typeof t=="function"?t():t.unsubscribe()})}add(r){return this.subscriptions.push(r),this}};var _=e=>{throw new Error(`${e} is value of unexpected type`)},$t=e=>{};var V=()=>{};var f=class{constructor(r){r&&(this._subscribe=r)}subscribe(r,t){let n;t?typeof t=="function"?n={next:t,error:V}:n={next:s=>t.next(s),error:s=>t.error?.(s)}:n={next:V,error:V};let i=typeof r=="function"?{next:s=>{try{let u=r(s);u instanceof Promise&&u.catch(p=>n.next(p))}catch(u){n.next(u)}},error:s=>n.next(s)}:{next:s=>r.next(s),error:s=>r.error?r.error(s):n.next(s)},a;try{a=this._subscribe(i)}catch(s){i.error?.(s)}return new O().add(()=>{switch(i.next=V,i.error=V,typeof a){case"function":a();return;case"object":a.unsubscribe();return;case"undefined":return;default:return _(a)}})}pipe(...r){return r.reduce((t,n)=>n(t),this)}_subscribe(r){}};var j=class extends f{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(t){this.subscribers.forEach(n=>n.next(t))}error(t){this.subscribers.forEach(n=>n.error?.(t))}_subscribe(t){let n=this.keyCounter++;return this.subscribers.set(n,t),new O().add(()=>this.subscribers.delete(n))}};var Se=class{constructor(){this.log$=new j;this.logs=[];this.log=r=>{let t={...r,timestamp:Date.now()};this.logs.push(t),this.log$.next(t)};this.getAllLogs=()=>this.logs}createCustomLog(r){return(...t)=>{let n;try{n=r(...t)}catch{n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(r){return this.createCustomLog(t=>({component:r,...t}))}};var Re=require("@opentelemetry/api");var U=require("@tracer/opentelemetry"),vr=class e{constructor({name:r}){}log(r,t){}error(r,t){}critical(r,t){}createComponentTracer(r){return new e({name:r})}end(){}getFinishedSpans(){}getTraceId(){return this.fakeTraceId}},qe=class e{constructor({name:r,parentContext:t,tracer:n}){this.childTracers=[];let i=!n;if(i){let s=(0,U.initTracerOpenTelemetry)({serviceName:"videoplayer-sdk-web",appToken:"L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb",spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),u=new U.TracerMemorySpanExporter,p=new U.TracerMemorySpanExporter;this.spanExporter=u,s.addSpanProcessor(new U.TracerAllSpansProcessor({startedSpansExporter:u,endedSpansExporter:p})),this.tracer=s.getTracer("sdk-videoplayer-tracer")}else this.tracer=n;this.span=this.tracer.startSpan(r,{root:i},t),this.context=Re.trace.setSpan(Re.context.active(),this.span)}log(r,t){this.span.addEvent(r,{...t,type:"log"})}error(r,t){this.span.addEvent(r,{...t,type:"error"})}critical(r,t){this.span.addEvent(r,{...t,type:"critical"})}static createRootTracer(r=!1){return r?new e({name:"Root"}):new vr({name:"Root"})}createComponentTracer(r){let t=new e({name:r,parentContext:this.context,tracer:this.tracer});return this.childTracers.push(t),t}end(){this.childTracers.forEach(r=>r.end()),this.span.end()}getFinishedSpans(){return this.spanExporter?.getJsonData()}getTraceId(){return this.span.spanContext().traceId}};function zt(e,r='Assertion "value is not nullable" failed'){if(e==null)throw new Error(r)}function Yt(e,r='Assertion "value is nullable" failed'){if(e!=null)throw new Error(r)}function G(e){return typeof e<"u"&&e!==null}function Pe(e){return e==null}function Ht(e,r){if(!e?.length)throw new Error(r)}function Xt(e,r){if(e?.length)throw new Error(r)}var Jt=(e,r,t)=>new Promise((n,i)=>{r.addEventListener("abort",()=>{u(),c.remove()});let a=()=>{u(),i("error")},s=()=>{u(),n()},u=()=>{p&&clearTimeout(p),c.removeEventListener("load",s),c.removeEventListener("error",a)},p;t&&(p=window.setTimeout(()=>{u(),i("timeout")},t));let c=document.createElement("script");c.addEventListener("load",s),c.addEventListener("error",a),c.src=e,document.head.appendChild(c)});var Zt=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var en=(e,r)=>async(...t)=>{let n=r(...t),i=e.aborted,a;for(;!i&&!e.aborted;)try{let s=await n.next(a);i=s.done??!1,a=s.value}catch(s){await n.throw(s)}return a};var rn=(e,{start:r=0,factor:t=2,max:n=1/0,min:i=r,random:a=0}={})=>{let s=r;return s*=t**e,s*=1+(Math.random()*a*2-a),s=Math.round(s),s=Math.min(s,n),s=Math.max(s,i),s};var dr={};fr(dr,{clear:()=>iu,get:()=>eu,has:()=>tu,isPersistent:()=>Zs,remove:()=>nu,set:()=>ru});var z,Q,br=`vk-videoplayer-dummy-key-${Math.random()}`,Y=()=>{if(Q!==void 0)return Q;try{localStorage.setItem(br,"test"),localStorage.removeItem(br),Q=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(br),Q=1}catch(r){if(r instanceof DOMException||r instanceof TypeError)Q=2;else throw r}else throw e}return Q===2&&(z=new Map),Q},Zs=()=>Y()===0,eu=e=>{let r=Y();switch(r){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return z?.get(e);default:_(r)}},ru=(e,r)=>{let t=Y();switch(t){case 0:try{localStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:z?.set(e,r);return;default:_(t)}},tu=e=>{let r=Y();switch(r){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return z?.has(e)??!1;default:return _(r),!1}},nu=e=>{let r=Y();switch(r){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:z?.delete(e);return;default:_(r)}},iu=()=>{let e=Y();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return z?.clear();default:_(e)}};var Wr=ne(Hi(),1),Xi=()=>{let e,r=[];try{e=window.self!==window.top}catch(t){t instanceof DOMException&&t.name==="SecurityError"?e=!0:(e=!1,console.error(t))}try{window.location.ancestorOrigins&&(r=[...window.location.ancestorOrigins])}catch(t){console.error(t)}try{!r.length&&document.referrer&&(r=[new URL(document.referrer).origin])}catch(t){console.error(t)}return{isEmbed:e,origins:r,topOrigin:(0,Wr.default)(r,-1),immediateOrigin:(0,Wr.default)(r,0)}};var Be=(l=>(l.INVARIANT="Invariant quality",l.Q_144P="144p",l.Q_240P="240p",l.Q_360P="360p",l.Q_480P="480p",l.Q_576P="576p",l.Q_720P="720p",l.Q_1080P="1080p",l.Q_1440P="1440p",l.Q_2160P="2160p",l.Q_4320P="4320p",l))(Be||{});var S={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"576p":{width:1024,height:576},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},Ji=(e,r)=>S[e].height>S[r].height,Zi=(e,r)=>S[e].height>=S[r].height,Ke=(e,r)=>S[e].height<S[r].height,eo=(e,r)=>S[e].height<=S[r].height,ro=e=>e.sort((r,t)=>r===t?0:r==="Invariant quality"?1:t==="Invariant quality"?-1:Ke(r,t)?1:-1)[0],to=Object.keys(S).sort((e,r)=>Ke(e,r)?-1:1),no=(e,r=.02)=>[...to].find(n=>S[n].height*(1+r)>=e),io=({width:e,height:r})=>{let t=Math.min(e,r),n=Math.max(e,r);return to.find(i=>{let a=S[i];return a.width>=n&&a.height>=t})},oo=e=>S[e].height,We=e=>e==="Invariant quality",ao=e=>e.every(r=>!We(r));function so(e){if(We(e))throw new Error("Expected exact quality")}var uo=(e,r)=>{let t={};for(let n of Object.keys(r)){let i=r[n],a=e[n];Array.isArray(i)&&Array.isArray(a)?t[n]=a:typeof i=="object"&&typeof a=="object"?t[n]=uo(a,i):t[n]=n in e?a:i}return t};var gc=e=>{let r="";return e>=3600&&(r+=Math.floor(e/3600)+"h",e=e%3600),e>=60&&(r+=Math.floor(e/60)+"m",e=e%60),e>0&&(r+=Math.floor(e)+"s"),r};function $e(e,r=0,t){let n,i,a,s,u,p,c=0,v=!1,l=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(v=!!t.leading,l="maxWait"in t,a=t?.maxWait?Math.max(+t?.maxWait||0,r):a,b="trailing"in t?!!t.trailing:b);function m(T){let q=n,D=i;return n=i=void 0,c=T,s=e.apply(D,q),s}function y(T,q){return d?(u&&window.cancelAnimationFrame(u),window.requestAnimationFrame(T)):setTimeout(T,q)}function I(T){if(d){window.cancelAnimationFrame(T);return}clearTimeout(T)}function h(T){return c=T,u=y(xe,r),v?m(T):s}function g(T){let q=T-p,D=T-c,Bt=r-q;return l?Math.min(Bt,a-D):Bt}function Gt(T){let q=T-p,D=T-c;return p===void 0||q>=r||q<0||l&&D>=a}function xe(){let T=Date.now();if(Gt(T))return Qt(T);u=y(xe,g(T))}function Qt(T){return u=void 0,b&&n?m(T):(n=i=void 0,s)}function Bs(){u!==void 0&&I(u),c=0,n=p=i=u=void 0}function Ks(){return u===void 0?s:Qt(Date.now())}function Ws(){return u!==void 0}function Ee(...T){let q=Date.now(),D=Gt(q);if(n=T,i=this,p=q,D){if(u===void 0)return h(p);if(l)return u=y(xe,r),m(p)}return u===void 0&&(u=y(xe,r)),s}return Ee.cancel=Bs,Ee.flush=Ks,Ee.pending=Ws,Ee}var ze=(e,r=0,t)=>$e(e,r,{...{leading:!0,trailing:!0},...t,maxWait:r});var fe=(e,r)=>{if(e===null||typeof e!="object")return e;let t=Array.isArray(e)?[]:{};for(let n in e){if(typeof r=="function"){let i=r(e[n],n,e,t);if(i!==void 0){t[n]=i;continue}}typeof e[n]=="object"?t[n]=fe(e[n],r):t[n]=e[n]}return t};var lo=e=>fe(e);var Ic=300,co=(e,r=Ic)=>new f(t=>{let{width:n,height:i}=e.getBoundingClientRect();if(t.next({width:n,height:i}),!window.ResizeObserver)return;let a=new ResizeObserver(ze(s=>{let u=s[0];if(!u)return;let p,c;u.contentBoxSize&&u.contentBoxSize[0]?(c=u.contentBoxSize[0].blockSize,p=u.contentBoxSize[0].inlineSize):u.contentRect&&(p=u.contentRect.width,c=u.contentRect.height),G(p)&&G(c)&&t.next({width:p,height:c})},r));return a.observe(e),()=>a.disconnect()});var ve=(e,r=6,t=".")=>{let n={};for(let i in e)if(!(!e.hasOwnProperty(i)||e[i]instanceof HTMLElement||!r))if(typeof e[i]=="object"&&e[i]!==null){let a=ve(e[i],r-1);for(let s in a)a.hasOwnProperty(s)&&(n[i+t+s]=a[s])}else n[i]=e[i];return n};var po=e=>{e.removeAttribute("src"),e.load()};var Oc=e=>{let r;try{r=new URL(e)}catch{return!1}return r.protocol==="https:"};var xc=e=>{try{return new URL(e)}catch{return null}};var fo=(e,r)=>{let t=0,n=e.length-1;for(;t<=n;){let i=Math.floor((t+n)/2),a=r(e[i]);if(a===0)return i;a<0?t=i+1:n=i-1}return-1};var vo=e=>r=>t=>{let n=typeof t=="object";t==null||n&&!Object.keys(t).length||e(r,n?ve(t):{value:t})};var be=class extends j{constructor(r){super(),this.value=r}next(r){super.next(this.value=r)}error(r){super.error(this.value=r)}getValue(){return this.value}_subscribe(r){let t=super._subscribe(r);return r.next(this.value),t}};var Qo=ne(Jr(),1);function Zr(e){return new f(r=>{let t={},n=Object.keys(e).length,i=a=>s=>{a in t||n--,t[a]=s,n===0&&r.next(t)};return(0,Qo.default)(e).reduce((a,[s,u])=>a.add(u.subscribe(i(s))),new O)})}function et(...e){return new f(r=>e.reduce((t,n)=>t.add(n.subscribe(r)),new O))}var Bo=e=>new f(r=>{let t=window.setTimeout(()=>{try{r.next()}catch(n){if(r.error)r.error(n);else throw n}},e);return()=>window.clearTimeout(t)});var Ko=e=>new f(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var Wo=e=>new f(r=>{e.forEach(t=>r.next(t))});var $o=(e,r)=>new f(t=>{let n=i=>t.next(i);return e.addEventListener(r,n),()=>e.removeEventListener(r,n)});var de=class extends O{remove(r){this.subscriptions=this.subscriptions.filter(t=>t!==r)}};function tt(e){return r=>new f(t=>r.subscribe(new rt(t,e)))}var rt=class{constructor(r,t){this.destination=r;this.size=t;this.lastValues=[]}next(r){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(r),this.destination.next(this.lastValues)}error(r){this.destination.error?.(r)}};var np={leading:!1,trailing:!0};function it(e,r=np){return t=>new f(n=>t.subscribe(new nt(n,e,r)))}var nt=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,G(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(t){if(this.destination.error)this.destination.error(t);else throw t}this.timeout=void 0},this.time)}error(r){this.destination.error?.(r)}};var ip={leading:!0,trailing:!1};function at(e,r=ip){return t=>new f(n=>t.subscribe(new ot(n,e,r)))}var ot=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,Pe(this.timeout)&&(this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(r){this.destination.error?.(r)}};function ut(e){return r=>new f(t=>r.subscribe(new st(t,e)))}var st=class{constructor(r,t){this.destination=r;this.predicate=t}next(r){let t;try{t=this.predicate(r)}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};var ta=ne(ea(),1);var vp=(e,r)=>{let t=(n,i)=>{let a=Object.keys(n);for(let s in i)if(!(0,ta.default)(a,s)||i[s]!==n[s])return!1;return!0};return t(e,r)&&t(r,e)},bp=(e,r)=>e instanceof Object&&r instanceof Object?vp(e,r):e===r;function ct(e=bp){return r=>new f(t=>r.subscribe(new lt(t,e)))}var ra={},lt=class{constructor(r,t){this.destination=r;this.predicate=t;this.lastValue=ra}next(r){let t;try{t=this.lastValue===ra||!this.predicate(this.lastValue,r),this.lastValue=r instanceof Object?{...r}:r}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};function Te(e){return r=>new f(t=>r.subscribe(new pt(t,e)))}var pt=class{constructor(r,t){this.destination=r;this.mapper=t}next(r){let t;try{t=this.mapper(r)}catch(n){throw this.error(n),n}this.destination.next(t)}error(r){this.destination.error?.(r)}};function ft(e){return Te(()=>e)}function vt(){return e=>new f(r=>{let t=!1,n=!1,i=e.subscribe(a=>{t||(t=!0,r.next(a)),n&&i.unsubscribe()},a=>{t=!0,r.error?.(a),n&&i.unsubscribe()});return n=!0,t&&i.unsubscribe(),i})}function dt(){return e=>new f(r=>e.subscribe(new bt(r)))}var bt=class{constructor(r){this.destination=r;this.hasLast=!1}next(r){let t=this.last;if(this.last=r,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,r])}error(r){this.destination.error?.(r)}};function mt(e){return r=>new f(t=>r.subscribe(new Tt(t,e)))}var Tt=class{constructor(r,t){this.destination=r;this.effect=t}next(r){try{this.effect(r)}catch(t){throw this.error(t),t}this.destination.next(r)}error(r){this.destination.error?.(r)}};function ht(e){return r=>new f(t=>r.subscribe(new yt(t,e)))}var yt=class{constructor(r,t){this.destination=r;this.count=t;t<0&&this.destination.error?.(new Error("Count can not be less than zero"))}next(r){this.count===0?this.destination.next(r):this.count--}error(r){this.destination.error?.(r)}};var na=(u=>(u.NETWORK="network",u.VIDEO_PIPELINE="video_pipeline",u.EXTERNAL_API="external_api",u.PARSER="parser",u.DOM="dom",u.WTF="wtf",u.FATAL="fatal",u))(na||{});var Je=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(r,t,n){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:t,options:n})}removeEventListener(r,t){if(!(r in this.listeners))return;let n=this.listeners[r];for(let i=0,a=n.length;i<a;i++)if(n[i].callback===t){n.splice(i,1);return}}dispatchEvent(r){if(!(r.type in this.listeners))return;let n=this.listeners[r.type].slice();for(let i=0,a=n.length;i<a;i++){let s=n[i];try{s.callback.call(this,r)}catch(u){Promise.resolve().then(()=>{throw u})}s.options&&s.options.once&&this.removeEventListener(r.type,s.callback)}return!r.defaultPrevented}},te=class extends Je{constructor(){super(),this.listeners||Je.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(r){r.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,r)),super.dispatchEvent(r)}},me=class{constructor(){Object.defineProperty(this,"signal",{value:new te,writable:!0,configurable:!0})}abort(r){let t;try{t=new Event("abort")}catch{typeof document<"u"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}let n=r;if(n===void 0)if(typeof document>"u")n=new Error("This operation was aborted"),n.name="AbortError";else try{n=new DOMException("signal is aborted without reason")}catch{n=new Error("This operation was aborted"),n.name="AbortError"}this.signal.reason=n,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol<"u"&&Symbol.toStringTag&&(me.prototype[Symbol.toStringTag]="AbortController",te.prototype[Symbol.toStringTag]="AbortSignal");function Ze(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function gt(e){typeof e=="function"&&(e={fetch:e});let{fetch:r,Request:t=r.Request,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!Ze({fetch:r,Request:t,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:r,Request:a};let a=t;(a&&!a.prototype.hasOwnProperty("signal")||i)&&(a=function(c,v){let l;v&&v.signal&&(l=v.signal,delete v.signal);let b=new t(c,v);return l&&Object.defineProperty(b,"signal",{writable:!1,enumerable:!1,configurable:!0,value:l}),b},a.prototype=t.prototype);let s=r;return{fetch:(p,c)=>{let v=a&&a.prototype.isPrototypeOf(p)?p.signal:c?c.signal:void 0;if(v){let l;try{l=new DOMException("Aborted","AbortError")}catch{l=new Error("Aborted"),l.name="AbortError"}if(v.aborted)return Promise.reject(l);let b=new Promise((d,m)=>{v.addEventListener("abort",()=>m(l),{once:!0})});return c&&c.signal&&delete c.signal,Promise.race([b,s(p,c)])}return s(p,c)},Request:a}}var ye=Ze({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),ia=ye?gt({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,oa=ye?ia.fetch:window.fetch,by=ye?ia.Request:window.Request,dy=ye?me:window.AbortController,Ty=ye?te:window.AbortSignal;var Ds=ne(Jr(),1),Us=ne(Fs(),1),Gs=(l=>(l.Armenian="58",l.Azerbaijani="57",l.Belarusian="114",l.English="3",l.Kazakh="97",l.Portuguese="73",l.Russian="0",l.Spanish="4",l.Ukrainian="1",l.Uzbek="65",l.Vietnamese="75",l))(Gs||{}),Lv="vk.com",jv=async(e,r,t)=>{let n=new URL(`https://${Lv}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",r),e!==void 0&&n.searchParams.set("lang",e);let a=await(await oa(n.toString())).json();return kv(a,t)},kv=(e,r)=>(0,Us.default)((0,Ds.default)(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),Cv(n)])),Cv=e=>Array.isArray(e)?e[0]:e;var Qs=(t=>(t.RU="ru",t.EN="en",t))(Qs||{});var Nv={UI:"__vkVideoPlayer",CORE:"__vkVideoCore"},Mv=(()=>{let e=0;return()=>{let r=e;return e=(e+1)%Number.MAX_SAFE_INTEGER,r}})(),Dt=class{constructor(r){this.id=Mv();this.type=r,this.initWindowObjects()}getWindowObject(){let r=this.key();return window[r]?.[this.id]??{}}initWindowObjects(){let r=this.key();window[r]||(window[r]={}),window[r][this.id]={}}expose(r){Object.assign(this.getWindowObject(),r)}destroy(){let r=this.key();window&&window[r]&&window[r][this.id]&&(delete window[r][this.id],Object.keys(window[r]).length||delete window[r])}key(){let{type:r}=this;return Nv[r]}};var Ut={};fr(Ut,{create:()=>Vv,destroy:()=>Fv,push:()=>Dv,subscribe:()=>Uv});var Oe=new Map,Vv=(e,r)=>Oe.set(e,r??[]),Fv=e=>Oe.delete(e),Dv=(e,r)=>{let t=Oe.get(e);t&&(typeof t=="function"?t(r):t.push(r))},Uv=(e,r)=>{let t=Oe.get(e);if(t){if(t&&Array.isArray(t))for(let n of t)r(n);Oe.set(e,r)}};
package/esnext.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-shared v1.0.58-dev.ce524d87.0
3
- * Thu, 10 Apr 2025 12:04:34 GMT
2
+ * @vkontakte/videoplayer-shared v1.0.58-dev.ef87de0a.0
3
+ * Thu, 10 Apr 2025 14:06:51 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-58/doc/
5
5
  */
6
- var ps=Object.create;var er=Object.defineProperty;var fs=Object.getOwnPropertyDescriptor;var vs=Object.getOwnPropertyNames;var bs=Object.getPrototypeOf,ds=Object.prototype.hasOwnProperty;var o=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),St=(e,r)=>{for(var t in r)er(e,t,{get:r[t],enumerable:!0})},Ts=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of vs(r))!ds.call(e,i)&&i!==t&&er(e,i,{get:()=>r[i],enumerable:!(n=fs(r,i))||n.enumerable});return e};var te=(e,r,t)=>(t=e!=null?ps(bs(e)):{},Ts(r||!e||!e.__esModule?er(t,"default",{value:e,enumerable:!0}):t,e));var O=o((ar,Pt)=>{"use strict";var ne=function(e){return e&&e.Math===Math&&e};Pt.exports=ne(typeof globalThis=="object"&&globalThis)||ne(typeof window=="object"&&window)||ne(typeof self=="object"&&self)||ne(typeof global=="object"&&global)||ne(typeof ar=="object"&&ar)||function(){return this}()||Function("return this")()});var w=o((yb,At)=>{"use strict";At.exports=function(e){try{return!!e()}catch{return!0}}});var ie=o((hb,_t)=>{"use strict";var Ms=w();_t.exports=!Ms(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var Nt=o((gb,Ct)=>{"use strict";var Vs=ie(),kt=Function.prototype,Lt=kt.apply,jt=kt.call;Ct.exports=typeof Reflect=="object"&&Reflect.apply||(Vs?jt.bind(Lt):function(){return jt.apply(Lt,arguments)})});var _=o((Ib,Ft)=>{"use strict";var Mt=ie(),Vt=Function.prototype,sr=Vt.call,Fs=Mt&&Vt.bind.bind(sr,sr);Ft.exports=Mt?Fs:function(e){return function(){return sr.apply(e,arguments)}}});var he=o((Ob,Ut)=>{"use strict";var Dt=_(),Ds=Dt({}.toString),Us=Dt("".slice);Ut.exports=function(e){return Us(Ds(e),8,-1)}});var ur=o((xb,Gt)=>{"use strict";var Gs=he(),Qs=_();Gt.exports=function(e){if(Gs(e)==="Function")return Qs(e)}});var x=o((Eb,Qt)=>{"use strict";var lr=typeof document=="object"&&document.all;Qt.exports=typeof lr>"u"&&lr!==void 0?function(e){return typeof e=="function"||e===lr}:function(e){return typeof e=="function"}});var R=o((wb,Bt)=>{"use strict";var Bs=w();Bt.exports=!Bs(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var V=o((Sb,Kt)=>{"use strict";var Ks=ie(),ge=Function.prototype.call;Kt.exports=Ks?ge.bind(ge):function(){return ge.apply(ge,arguments)}});var cr=o(zt=>{"use strict";var Wt={}.propertyIsEnumerable,$t=Object.getOwnPropertyDescriptor,Ws=$t&&!Wt.call({1:2},1);zt.f=Ws?function(r){var t=$t(this,r);return!!t&&t.enumerable}:Wt});var oe=o((Rb,Yt)=>{"use strict";Yt.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var Xt=o((Pb,Ht)=>{"use strict";var $s=_(),zs=w(),Ys=he(),pr=Object,Hs=$s("".split);Ht.exports=zs(function(){return!pr("z").propertyIsEnumerable(0)})?function(e){return Ys(e)==="String"?Hs(e,""):pr(e)}:pr});var Ie=o((Ab,Jt)=>{"use strict";Jt.exports=function(e){return e==null}});var Oe=o((_b,Zt)=>{"use strict";var Xs=Ie(),Js=TypeError;Zt.exports=function(e){if(Xs(e))throw new Js("Can't call method on "+e);return e}});var G=o((Lb,en)=>{"use strict";var Zs=Xt(),eu=Oe();en.exports=function(e){return Zs(eu(e))}});var j=o((jb,rn)=>{"use strict";var ru=x();rn.exports=function(e){return typeof e=="object"?e!==null:ru(e)}});var ae=o((kb,tn)=>{"use strict";tn.exports={}});var xe=o((Cb,on)=>{"use strict";var fr=ae(),vr=O(),tu=x(),nn=function(e){return tu(e)?e:void 0};on.exports=function(e,r){return arguments.length<2?nn(fr[e])||nn(vr[e]):fr[e]&&fr[e][r]||vr[e]&&vr[e][r]}});var br=o((Nb,an)=>{"use strict";var nu=_();an.exports=nu({}.isPrototypeOf)});var cn=o((Mb,ln)=>{"use strict";var iu=O(),sn=iu.navigator,un=sn&&sn.userAgent;ln.exports=un?String(un):""});var mn=o((Vb,Tn)=>{"use strict";var dn=O(),dr=cn(),pn=dn.process,fn=dn.Deno,vn=pn&&pn.versions||fn&&fn.version,bn=vn&&vn.v8,P,Ee;bn&&(P=bn.split("."),Ee=P[0]>0&&P[0]<4?1:+(P[0]+P[1]));!Ee&&dr&&(P=dr.match(/Edge\/(\d+)/),(!P||P[1]>=74)&&(P=dr.match(/Chrome\/(\d+)/),P&&(Ee=+P[1])));Tn.exports=Ee});var Tr=o((Fb,hn)=>{"use strict";var yn=mn(),ou=w(),au=O(),su=au.String;hn.exports=!!Object.getOwnPropertySymbols&&!ou(function(){var e=Symbol("symbol detection");return!su(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&yn&&yn<41})});var mr=o((Db,gn)=>{"use strict";var uu=Tr();gn.exports=uu&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var yr=o((Ub,In)=>{"use strict";var lu=xe(),cu=x(),pu=br(),fu=mr(),vu=Object;In.exports=fu?function(e){return typeof e=="symbol"}:function(e){var r=lu("Symbol");return cu(r)&&pu(r.prototype,vu(e))}});var we=o((Gb,On)=>{"use strict";var bu=String;On.exports=function(e){try{return bu(e)}catch{return"Object"}}});var se=o((Qb,xn)=>{"use strict";var du=x(),Tu=we(),mu=TypeError;xn.exports=function(e){if(du(e))return e;throw new mu(Tu(e)+" is not a function")}});var Se=o((Bb,En)=>{"use strict";var yu=se(),hu=Ie();En.exports=function(e,r){var t=e[r];return hu(t)?void 0:yu(t)}});var Sn=o((Kb,wn)=>{"use strict";var hr=V(),gr=x(),Ir=j(),gu=TypeError;wn.exports=function(e,r){var t,n;if(r==="string"&&gr(t=e.toString)&&!Ir(n=hr(t,e))||gr(t=e.valueOf)&&!Ir(n=hr(t,e))||r!=="string"&&gr(t=e.toString)&&!Ir(n=hr(t,e)))return n;throw new gu("Can't convert object to primitive value")}});var ue=o((Wb,qn)=>{"use strict";qn.exports=!0});var An=o(($b,Pn)=>{"use strict";var Rn=O(),Iu=Object.defineProperty;Pn.exports=function(e,r){try{Iu(Rn,e,{value:r,configurable:!0,writable:!0})}catch{Rn[e]=r}return r}});var qe=o((zb,jn)=>{"use strict";var Ou=ue(),xu=O(),Eu=An(),_n="__core-js_shared__",Ln=jn.exports=xu[_n]||Eu(_n,{});(Ln.versions||(Ln.versions=[])).push({version:"3.38.0",mode:Ou?"pure":"global",copyright:"\xA9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var Or=o((Yb,Cn)=>{"use strict";var kn=qe();Cn.exports=function(e,r){return kn[e]||(kn[e]=r||{})}});var Re=o((Hb,Nn)=>{"use strict";var wu=Oe(),Su=Object;Nn.exports=function(e){return Su(wu(e))}});var k=o((Xb,Mn)=>{"use strict";var qu=_(),Ru=Re(),Pu=qu({}.hasOwnProperty);Mn.exports=Object.hasOwn||function(r,t){return Pu(Ru(r),t)}});var xr=o((Jb,Vn)=>{"use strict";var Au=_(),_u=0,Lu=Math.random(),ju=Au(1 .toString);Vn.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+ju(++_u+Lu,36)}});var C=o((Zb,Dn)=>{"use strict";var ku=O(),Cu=Or(),Fn=k(),Nu=xr(),Mu=Tr(),Vu=mr(),Y=ku.Symbol,Er=Cu("wks"),Fu=Vu?Y.for||Y:Y&&Y.withoutSetter||Nu;Dn.exports=function(e){return Fn(Er,e)||(Er[e]=Mu&&Fn(Y,e)?Y[e]:Fu("Symbol."+e)),Er[e]}});var Bn=o((ed,Qn)=>{"use strict";var Du=V(),Un=j(),Gn=yr(),Uu=Se(),Gu=Sn(),Qu=C(),Bu=TypeError,Ku=Qu("toPrimitive");Qn.exports=function(e,r){if(!Un(e)||Gn(e))return e;var t=Uu(e,Ku),n;if(t){if(r===void 0&&(r="default"),n=Du(t,e,r),!Un(n)||Gn(n))return n;throw new Bu("Can't convert object to primitive value")}return r===void 0&&(r="number"),Gu(e,r)}});var wr=o((rd,Kn)=>{"use strict";var Wu=Bn(),$u=yr();Kn.exports=function(e){var r=Wu(e,"string");return $u(r)?r:r+""}});var qr=o((td,$n)=>{"use strict";var zu=O(),Wn=j(),Sr=zu.document,Yu=Wn(Sr)&&Wn(Sr.createElement);$n.exports=function(e){return Yu?Sr.createElement(e):{}}});var Rr=o((nd,zn)=>{"use strict";var Hu=R(),Xu=w(),Ju=qr();zn.exports=!Hu&&!Xu(function(){return Object.defineProperty(Ju("div"),"a",{get:function(){return 7}}).a!==7})});var Xn=o(Hn=>{"use strict";var Zu=R(),el=V(),rl=cr(),tl=oe(),nl=G(),il=wr(),ol=k(),al=Rr(),Yn=Object.getOwnPropertyDescriptor;Hn.f=Zu?Yn:function(r,t){if(r=nl(r),t=il(t),al)try{return Yn(r,t)}catch{}if(ol(r,t))return tl(!el(rl.f,r,t),r[t])}});var Zn=o((od,Jn)=>{"use strict";var sl=w(),ul=x(),ll=/#|\.prototype\./,le=function(e,r){var t=pl[cl(e)];return t===vl?!0:t===fl?!1:ul(r)?sl(r):!!r},cl=le.normalize=function(e){return String(e).replace(ll,".").toLowerCase()},pl=le.data={},fl=le.NATIVE="N",vl=le.POLYFILL="P";Jn.exports=le});var Pr=o((ad,ri)=>{"use strict";var ei=ur(),bl=se(),dl=ie(),Tl=ei(ei.bind);ri.exports=function(e,r){return bl(e),r===void 0?e:dl?Tl(e,r):function(){return e.apply(r,arguments)}}});var Ar=o((sd,ti)=>{"use strict";var ml=R(),yl=w();ti.exports=ml&&yl(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Q=o((ud,ni)=>{"use strict";var hl=j(),gl=String,Il=TypeError;ni.exports=function(e){if(hl(e))return e;throw new Il(gl(e)+" is not an object")}});var H=o(oi=>{"use strict";var Ol=R(),xl=Rr(),El=Ar(),Pe=Q(),ii=wr(),wl=TypeError,_r=Object.defineProperty,Sl=Object.getOwnPropertyDescriptor,Lr="enumerable",jr="configurable",kr="writable";oi.f=Ol?El?function(r,t,n){if(Pe(r),t=ii(t),Pe(n),typeof r=="function"&&t==="prototype"&&"value"in n&&kr in n&&!n[kr]){var i=Sl(r,t);i&&i[kr]&&(r[t]=n.value,n={configurable:jr in n?n[jr]:i[jr],enumerable:Lr in n?n[Lr]:i[Lr],writable:!1})}return _r(r,t,n)}:_r:function(r,t,n){if(Pe(r),t=ii(t),Pe(n),xl)try{return _r(r,t,n)}catch{}if("get"in n||"set"in n)throw new wl("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var X=o((cd,ai)=>{"use strict";var ql=R(),Rl=H(),Pl=oe();ai.exports=ql?function(e,r,t){return Rl.f(e,r,Pl(1,t))}:function(e,r,t){return e[r]=t,e}});var ee=o((pd,ui)=>{"use strict";var ce=O(),Al=Nt(),_l=ur(),Ll=x(),jl=Xn().f,kl=Zn(),J=ae(),Cl=Pr(),Z=X(),si=k();qe();var Nl=function(e){var r=function(t,n,i){if(this instanceof r){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return Al(e,this,arguments)};return r.prototype=e.prototype,r};ui.exports=function(e,r){var t=e.target,n=e.global,i=e.stat,a=e.proto,s=n?ce:i?ce[t]:ce[t]&&ce[t].prototype,u=n?J:J[t]||Z(J,t,{})[t],p=u.prototype,c,v,l,b,d,m,y,I,h;for(b in r)c=kl(n?b:t+(i?".":"#")+b,e.forced),v=!c&&s&&si(s,b),m=u[b],v&&(e.dontCallGetSet?(h=jl(s,b),y=h&&h.value):y=s[b]),d=v&&y?y:r[b],!(!c&&!a&&typeof m==typeof d)&&(e.bind&&v?I=Cl(d,ce):e.wrap&&v?I=Nl(d):a&&Ll(d)?I=_l(d):I=d,(e.sham||d&&d.sham||m&&m.sham)&&Z(I,"sham",!0),Z(u,b,I),a&&(l=t+"Prototype",si(J,l)||Z(J,l,{}),Z(J[l],b,d),e.real&&p&&(c||!p[b])&&Z(p,b,d)))}});var ci=o((fd,li)=>{"use strict";var Ml=Math.ceil,Vl=Math.floor;li.exports=Math.trunc||function(r){var t=+r;return(t>0?Vl:Ml)(t)}});var Ae=o((vd,pi)=>{"use strict";var Fl=ci();pi.exports=function(e){var r=+e;return r!==r||r===0?0:Fl(r)}});var vi=o((bd,fi)=>{"use strict";var Dl=Ae(),Ul=Math.min;fi.exports=function(e){var r=Dl(e);return r>0?Ul(r,9007199254740991):0}});var _e=o((dd,bi)=>{"use strict";var Gl=vi();bi.exports=function(e){return Gl(e.length)}});var Le=o((Td,di)=>{"use strict";di.exports=function(){}});var Ti=o(()=>{"use strict";var Ql=ee(),Bl=Re(),Kl=_e(),Wl=Ae(),$l=Le();Ql({target:"Array",proto:!0},{at:function(r){var t=Bl(this),n=Kl(t),i=Wl(r),a=i>=0?i:n+i;return a<0||a>=n?void 0:t[a]}});$l("at")});var Cr=o((hd,mi)=>{"use strict";var zl=xe();mi.exports=zl});var hi=o((gd,yi)=>{"use strict";Ti();var Yl=Cr();yi.exports=Yl("Array","at")});var Ii=o((Id,gi)=>{"use strict";var Hl=hi();gi.exports=Hl});var xi=o((Od,Oi)=>{"use strict";var Xl=Ii();Oi.exports=Xl});var Ne=o((RT,Si)=>{"use strict";var bc=Or(),dc=xr(),wi=bc("keys");Si.exports=function(e){return wi[e]||(wi[e]=dc(e))}});var Ri=o((PT,qi)=>{"use strict";var Tc=w();qi.exports=!Tc(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var Me=o((AT,Ai)=>{"use strict";var mc=k(),yc=x(),hc=Re(),gc=Ne(),Ic=Ri(),Pi=gc("IE_PROTO"),Gr=Object,Oc=Gr.prototype;Ai.exports=Ic?Gr.getPrototypeOf:function(e){var r=hc(e);if(mc(r,Pi))return r[Pi];var t=r.constructor;return yc(t)&&r instanceof t?t.prototype:r instanceof Gr?Oc:null}});var Li=o((_T,_i)=>{"use strict";var xc=Ae(),Ec=Math.max,wc=Math.min;_i.exports=function(e,r){var t=xc(e);return t<0?Ec(t+r,0):wc(t,r)}});var Qr=o((LT,ki)=>{"use strict";var Sc=G(),qc=Li(),Rc=_e(),ji=function(e){return function(r,t,n){var i=Sc(r),a=Rc(i);if(a===0)return!e&&-1;var s=qc(n,a),u;if(e&&t!==t){for(;a>s;)if(u=i[s++],u!==u)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===t)return e||s||0;return!e&&-1}};ki.exports={includes:ji(!0),indexOf:ji(!1)}});var Ve=o((jT,Ci)=>{"use strict";Ci.exports={}});var Vi=o((kT,Mi)=>{"use strict";var Pc=_(),Br=k(),Ac=G(),_c=Qr().indexOf,Lc=Ve(),Ni=Pc([].push);Mi.exports=function(e,r){var t=Ac(e),n=0,i=[],a;for(a in t)!Br(Lc,a)&&Br(t,a)&&Ni(i,a);for(;r.length>n;)Br(t,a=r[n++])&&(~_c(i,a)||Ni(i,a));return i}});var Kr=o((CT,Fi)=>{"use strict";Fi.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Wr=o((NT,Di)=>{"use strict";var jc=Vi(),kc=Kr();Di.exports=Object.keys||function(r){return jc(r,kc)}});var Wi=o((MT,Ki)=>{"use strict";var Gi=R(),Cc=w(),Qi=_(),Nc=Me(),Mc=Wr(),Vc=G(),Fc=cr().f,Bi=Qi(Fc),Dc=Qi([].push),Uc=Gi&&Cc(function(){var e=Object.create(null);return e[2]=2,!Bi(e,2)}),Ui=function(e){return function(r){for(var t=Vc(r),n=Mc(t),i=Uc&&Nc(t)===null,a=n.length,s=0,u=[],p;a>s;)p=n[s++],(!Gi||(i?p in t:Bi(t,p)))&&Dc(u,e?[p,t[p]]:t[p]);return u}};Ki.exports={entries:Ui(!0),values:Ui(!1)}});var $i=o(()=>{"use strict";var Gc=ee(),Qc=Wi().entries;Gc({target:"Object",stat:!0},{entries:function(r){return Qc(r)}})});var Yi=o((DT,zi)=>{"use strict";$i();var Bc=ae();zi.exports=Bc.Object.entries});var Xi=o((UT,Hi)=>{"use strict";var Kc=Yi();Hi.exports=Kc});var $r=o((GT,Ji)=>{"use strict";var Wc=Xi();Ji.exports=Wc});var ao=o(()=>{"use strict";var Zc=ee(),ep=Qr().includes,rp=w(),tp=Le(),np=rp(function(){return!Array(1).includes()});Zc({target:"Array",proto:!0,forced:np},{includes:function(r){return ep(this,r,arguments.length>1?arguments[1]:void 0)}});tp("includes")});var uo=o((dm,so)=>{"use strict";ao();var ip=Cr();so.exports=ip("Array","includes")});var co=o((Tm,lo)=>{"use strict";var op=uo();lo.exports=op});var fo=o((mm,po)=>{"use strict";var ap=co();po.exports=ap});var B=o((vy,Eo)=>{"use strict";Eo.exports={}});var qo=o((by,So)=>{"use strict";var cp=O(),pp=x(),wo=cp.WeakMap;So.exports=pp(wo)&&/native code/.test(String(wo))});var _o=o((dy,Ao)=>{"use strict";var fp=qo(),Po=O(),vp=j(),bp=X(),it=k(),ot=qe(),dp=Ne(),Tp=Ve(),Ro="Object already initialized",at=Po.TypeError,mp=Po.WeakMap,Ge,ve,Qe,yp=function(e){return Qe(e)?ve(e):Ge(e,{})},hp=function(e){return function(r){var t;if(!vp(r)||(t=ve(r)).type!==e)throw new at("Incompatible receiver, "+e+" required");return t}};fp||ot.state?(A=ot.state||(ot.state=new mp),A.get=A.get,A.has=A.has,A.set=A.set,Ge=function(e,r){if(A.has(e))throw new at(Ro);return r.facade=e,A.set(e,r),r},ve=function(e){return A.get(e)||{}},Qe=function(e){return A.has(e)}):(K=dp("state"),Tp[K]=!0,Ge=function(e,r){if(it(e,K))throw new at(Ro);return r.facade=e,bp(e,K,r),r},ve=function(e){return it(e,K)?e[K]:{}},Qe=function(e){return it(e,K)});var A,K;Ao.exports={set:Ge,get:ve,has:Qe,enforce:yp,getterFor:hp}});var ko=o((Ty,jo)=>{"use strict";var st=R(),gp=k(),Lo=Function.prototype,Ip=st&&Object.getOwnPropertyDescriptor,ut=gp(Lo,"name"),Op=ut&&function(){}.name==="something",xp=ut&&(!st||st&&Ip(Lo,"name").configurable);jo.exports={EXISTS:ut,PROPER:Op,CONFIGURABLE:xp}});var No=o(Co=>{"use strict";var Ep=R(),wp=Ar(),Sp=H(),qp=Q(),Rp=G(),Pp=Wr();Co.f=Ep&&!wp?Object.defineProperties:function(r,t){qp(r);for(var n=Rp(t),i=Pp(t),a=i.length,s=0,u;a>s;)Sp.f(r,u=i[s++],n[u]);return r}});var Vo=o((yy,Mo)=>{"use strict";var Ap=xe();Mo.exports=Ap("document","documentElement")});var ft=o((hy,Ko)=>{"use strict";var _p=Q(),Lp=No(),Fo=Kr(),jp=Ve(),kp=Vo(),Cp=qr(),Np=Ne(),Do=">",Uo="<",ct="prototype",pt="script",Qo=Np("IE_PROTO"),lt=function(){},Bo=function(e){return Uo+pt+Do+e+Uo+"/"+pt+Do},Go=function(e){e.write(Bo("")),e.close();var r=e.parentWindow.Object;return e=null,r},Mp=function(){var e=Cp("iframe"),r="java"+pt+":",t;return e.style.display="none",kp.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(Bo("document.F=Object")),t.close(),t.F},Be,Ke=function(){try{Be=new ActiveXObject("htmlfile")}catch{}Ke=typeof document<"u"?document.domain&&Be?Go(Be):Mp():Go(Be);for(var e=Fo.length;e--;)delete Ke[ct][Fo[e]];return Ke()};jp[Qo]=!0;Ko.exports=Object.create||function(r,t){var n;return r!==null?(lt[ct]=_p(r),n=new lt,lt[ct]=null,n[Qo]=r):n=Ke(),t===void 0?n:Lp.f(n,t)}});var vt=o((gy,Wo)=>{"use strict";var Vp=X();Wo.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:Vp(e,r,t),e}});var mt=o((Iy,Yo)=>{"use strict";var Fp=w(),Dp=x(),Up=j(),Gp=ft(),$o=Me(),Qp=vt(),Bp=C(),Kp=ue(),Tt=Bp("iterator"),zo=!1,N,bt,dt;[].keys&&(dt=[].keys(),"next"in dt?(bt=$o($o(dt)),bt!==Object.prototype&&(N=bt)):zo=!0);var Wp=!Up(N)||Fp(function(){var e={};return N[Tt].call(e)!==e});Wp?N={}:Kp&&(N=Gp(N));Dp(N[Tt])||Qp(N,Tt,function(){return this});Yo.exports={IteratorPrototype:N,BUGGY_SAFARI_ITERATORS:zo}});var We=o((Oy,Xo)=>{"use strict";var $p=C(),zp=$p("toStringTag"),Ho={};Ho[zp]="z";Xo.exports=String(Ho)==="[object z]"});var yt=o((xy,Jo)=>{"use strict";var Yp=We(),Hp=x(),$e=he(),Xp=C(),Jp=Xp("toStringTag"),Zp=Object,ef=$e(function(){return arguments}())==="Arguments",rf=function(e,r){try{return e[r]}catch{}};Jo.exports=Yp?$e:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=rf(r=Zp(e),Jp))=="string"?t:ef?$e(r):(n=$e(r))==="Object"&&Hp(r.callee)?"Arguments":n}});var ea=o((Ey,Zo)=>{"use strict";var tf=We(),nf=yt();Zo.exports=tf?{}.toString:function(){return"[object "+nf(this)+"]"}});var ze=o((wy,ta)=>{"use strict";var of=We(),af=H().f,sf=X(),uf=k(),lf=ea(),cf=C(),ra=cf("toStringTag");ta.exports=function(e,r,t,n){var i=t?e:e&&e.prototype;i&&(uf(i,ra)||af(i,ra,{configurable:!0,value:r}),n&&!of&&sf(i,"toString",lf))}});var ia=o((Sy,na)=>{"use strict";var pf=mt().IteratorPrototype,ff=ft(),vf=oe(),bf=ze(),df=B(),Tf=function(){return this};na.exports=function(e,r,t,n){var i=r+" Iterator";return e.prototype=ff(pf,{next:vf(+!n,t)}),bf(e,i,!1,!0),df[i]=Tf,e}});var aa=o((qy,oa)=>{"use strict";var mf=_(),yf=se();oa.exports=function(e,r,t){try{return mf(yf(Object.getOwnPropertyDescriptor(e,r)[t]))}catch{}}});var ua=o((Ry,sa)=>{"use strict";var hf=j();sa.exports=function(e){return hf(e)||e===null}});var ca=o((Py,la)=>{"use strict";var gf=ua(),If=String,Of=TypeError;la.exports=function(e){if(gf(e))return e;throw new Of("Can't set "+If(e)+" as a prototype")}});var fa=o((Ay,pa)=>{"use strict";var xf=aa(),Ef=j(),wf=Oe(),Sf=ca();pa.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=xf(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch{}return function(i,a){return wf(i),Sf(a),Ef(i)&&(e?t(i,a):i.__proto__=a),i}}():void 0)});var xa=o((_y,Oa)=>{"use strict";var qf=ee(),Rf=V(),Ye=ue(),ga=ko(),Pf=x(),Af=ia(),va=Me(),ba=fa(),_f=ze(),Lf=X(),ht=vt(),jf=C(),da=B(),Ia=mt(),kf=ga.PROPER,Cf=ga.CONFIGURABLE,Ta=Ia.IteratorPrototype,He=Ia.BUGGY_SAFARI_ITERATORS,be=jf("iterator"),ma="keys",de="values",ya="entries",ha=function(){return this};Oa.exports=function(e,r,t,n,i,a,s){Af(t,r,n);var u=function(h){if(h===i&&b)return b;if(!He&&h&&h in v)return v[h];switch(h){case ma:return function(){return new t(this,h)};case de:return function(){return new t(this,h)};case ya:return function(){return new t(this,h)}}return function(){return new t(this)}},p=r+" Iterator",c=!1,v=e.prototype,l=v[be]||v["@@iterator"]||i&&v[i],b=!He&&l||u(i),d=r==="Array"&&v.entries||l,m,y,I;if(d&&(m=va(d.call(new e)),m!==Object.prototype&&m.next&&(!Ye&&va(m)!==Ta&&(ba?ba(m,Ta):Pf(m[be])||ht(m,be,ha)),_f(m,p,!0,!0),Ye&&(da[p]=ha))),kf&&i===de&&l&&l.name!==de&&(!Ye&&Cf?Lf(v,"name",de):(c=!0,b=function(){return Rf(l,this)})),i)if(y={values:u(de),keys:a?b:u(ma),entries:u(ya)},s)for(I in y)(He||c||!(I in v))&&ht(v,I,y[I]);else qf({target:r,proto:!0,forced:He||c},y);return(!Ye||s)&&v[be]!==b&&ht(v,be,b,{name:i}),da[r]=b,y}});var wa=o((Ly,Ea)=>{"use strict";Ea.exports=function(e,r){return{value:e,done:r}}});var It=o((jy,Aa)=>{"use strict";var Nf=G(),gt=Le(),Sa=B(),Ra=_o(),Mf=H().f,Vf=xa(),Xe=wa(),Ff=ue(),Df=R(),Pa="Array Iterator",Uf=Ra.set,Gf=Ra.getterFor(Pa);Aa.exports=Vf(Array,"Array",function(e,r){Uf(this,{type:Pa,target:Nf(e),index:0,kind:r})},function(){var e=Gf(this),r=e.target,t=e.index++;if(!r||t>=r.length)return e.target=void 0,Xe(void 0,!0);switch(e.kind){case"keys":return Xe(t,!1);case"values":return Xe(r[t],!1)}return Xe([t,r[t]],!1)},"values");var qa=Sa.Arguments=Sa.Array;gt("keys");gt("values");gt("entries");if(!Ff&&Df&&qa.name!=="values")try{Mf(qa,"name",{value:"values"})}catch{}});var La=o((ky,_a)=>{"use strict";var Qf=C(),Bf=B(),Kf=Qf("iterator"),Wf=Array.prototype;_a.exports=function(e){return e!==void 0&&(Bf.Array===e||Wf[Kf]===e)}});var Ot=o((Cy,ka)=>{"use strict";var $f=yt(),ja=Se(),zf=Ie(),Yf=B(),Hf=C(),Xf=Hf("iterator");ka.exports=function(e){if(!zf(e))return ja(e,Xf)||ja(e,"@@iterator")||Yf[$f(e)]}});var Na=o((Ny,Ca)=>{"use strict";var Jf=V(),Zf=se(),ev=Q(),rv=we(),tv=Ot(),nv=TypeError;Ca.exports=function(e,r){var t=arguments.length<2?tv(e):r;if(Zf(t))return ev(Jf(t,e));throw new nv(rv(e)+" is not iterable")}});var Fa=o((My,Va)=>{"use strict";var iv=V(),Ma=Q(),ov=Se();Va.exports=function(e,r,t){var n,i;Ma(e);try{if(n=ov(e,"return"),!n){if(r==="throw")throw t;return t}n=iv(n,e)}catch(a){i=!0,n=a}if(r==="throw")throw t;if(i)throw n;return Ma(n),t}});var Ba=o((Vy,Qa)=>{"use strict";var av=Pr(),sv=V(),uv=Q(),lv=we(),cv=La(),pv=_e(),Da=br(),fv=Na(),vv=Ot(),Ua=Fa(),bv=TypeError,Je=function(e,r){this.stopped=e,this.result=r},Ga=Je.prototype;Qa.exports=function(e,r,t){var n=t&&t.that,i=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_RECORD),s=!!(t&&t.IS_ITERATOR),u=!!(t&&t.INTERRUPTED),p=av(r,n),c,v,l,b,d,m,y,I=function(g){return c&&Ua(c,"normal",g),new Je(!0,g)},h=function(g){return i?(uv(g),u?p(g[0],g[1],I):p(g[0],g[1])):u?p(g,I):p(g)};if(a)c=e.iterator;else if(s)c=e;else{if(v=vv(e),!v)throw new bv(lv(e)+" is not iterable");if(cv(v)){for(l=0,b=pv(e);b>l;l++)if(d=h(e[l]),d&&Da(Ga,d))return d;return new Je(!1)}c=fv(e,v)}for(m=a?e.next:c.next;!(y=sv(m,c)).done;){try{d=h(y.value)}catch(g){Ua(c,"throw",g)}if(typeof d=="object"&&d&&Da(Ga,d))return d}return new Je(!1)}});var Wa=o((Fy,Ka)=>{"use strict";var dv=R(),Tv=H(),mv=oe();Ka.exports=function(e,r,t){dv?Tv.f(e,r,mv(0,t)):e[r]=t}});var $a=o(()=>{"use strict";var yv=ee(),hv=Ba(),gv=Wa();yv({target:"Object",stat:!0},{fromEntries:function(r){var t={};return hv(r,function(n,i){gv(t,n,i)},{AS_ENTRIES:!0}),t}})});var Ya=o((Gy,za)=>{"use strict";It();$a();var Iv=ae();za.exports=Iv.Object.fromEntries});var Xa=o((Qy,Ha)=>{"use strict";Ha.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 Za=o(()=>{"use strict";It();var Ov=Xa(),xv=O(),Ev=ze(),Ja=B();for(Ze in Ov)Ev(xv[Ze],Ze),Ja[Ze]=Ja.Array;var Ze});var rs=o((Wy,es)=>{"use strict";var wv=Ya();Za();es.exports=wv});var ns=o(($y,ts)=>{"use strict";var Sv=rs();ts.exports=Sv});var ms="1.0.58-dev.ce524d87.0";var E=class{constructor(){this.subscriptions=[]}unsubscribe(){let r=this.subscriptions;this.subscriptions=[],r.forEach(t=>{typeof t=="function"?t():t.unsubscribe()})}add(r){return this.subscriptions.push(r),this}};var L=e=>{throw new Error(`${e} is value of unexpected type`)},ys=e=>{};var D=()=>{};var f=class{constructor(r){r&&(this._subscribe=r)}subscribe(r,t){let n;t?typeof t=="function"?n={next:t,error:D}:n={next:s=>t.next(s),error:s=>t.error?.(s)}:n={next:D,error:D};let i=typeof r=="function"?{next:s=>{try{let u=r(s);u instanceof Promise&&u.catch(p=>n.next(p))}catch(u){n.next(u)}},error:s=>n.next(s)}:{next:s=>r.next(s),error:s=>r.error?r.error(s):n.next(s)},a;try{a=this._subscribe(i)}catch(s){i.error?.(s)}return new E().add(()=>{switch(i.next=D,i.error=D,typeof a){case"function":a();return;case"object":a.unsubscribe();return;case"undefined":return;default:return L(a)}})}pipe(...r){return r.reduce((t,n)=>n(t),this)}_subscribe(r){}};var M=class extends f{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(t){this.subscribers.forEach(n=>n.next(t))}error(t){this.subscribers.forEach(n=>n.error?.(t))}_subscribe(t){let n=this.keyCounter++;return this.subscribers.set(n,t),new E().add(()=>this.subscribers.delete(n))}};var rr=class{constructor(){this.log$=new M;this.logs=[];this.log=r=>{let t={...r,timestamp:Date.now()};this.logs.push(t),this.log$.next(t)};this.getAllLogs=()=>this.logs}createCustomLog(r){return(...t)=>{let n;try{n=r(...t)}catch{n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(r){return this.createCustomLog(t=>({component:r,...t}))}};import{trace as hs,context as gs}from"@opentelemetry/api";import{TracerAllSpansProcessor as Is,TracerMemorySpanExporter as qt,initTracerOpenTelemetry as Os}from"@tracer/opentelemetry";var tr=class e{constructor({name:r}){}log(r,t){}error(r,t){}critical(r,t){}createComponentTracer(r){return new e({name:r})}end(){}getFinishedSpans(){}getTraceId(){return this.fakeTraceId}},nr=class e{constructor({name:r,parentContext:t,tracer:n}){this.childTracers=[];let i=!n;if(i){let s=Os({serviceName:"videoplayer-sdk-web",appToken:"L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb",spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),u=new qt,p=new qt;this.spanExporter=u,s.addSpanProcessor(new Is({startedSpansExporter:u,endedSpansExporter:p})),this.tracer=s.getTracer("sdk-videoplayer-tracer")}else this.tracer=n;this.span=this.tracer.startSpan(r,{root:i},t),this.context=hs.setSpan(gs.active(),this.span)}log(r,t){this.span.addEvent(r,{...t,type:"log"})}error(r,t){this.span.addEvent(r,{...t,type:"error"})}critical(r,t){this.span.addEvent(r,{...t,type:"critical"})}static createRootTracer(r=!1){return r?new e({name:"Root"}):new tr({name:"Root"})}createComponentTracer(r){let t=new e({name:r,parentContext:this.context,tracer:this.tracer});return this.childTracers.push(t),t}end(){this.childTracers.forEach(r=>r.end()),this.span.end()}getFinishedSpans(){return this.spanExporter?.getJsonData()}getTraceId(){return this.span.spanContext().traceId}};function xs(e,r='Assertion "value is not nullable" failed'){if(e==null)throw new Error(r)}function Es(e,r='Assertion "value is nullable" failed'){if(e!=null)throw new Error(r)}function W(e){return typeof e<"u"&&e!==null}function ir(e){return e==null}function ws(e,r){if(!e?.length)throw new Error(r)}function Ss(e,r){if(e?.length)throw new Error(r)}var qs=(e,r,t)=>new Promise((n,i)=>{r.addEventListener("abort",()=>{u(),c.remove()});let a=()=>{u(),i("error")},s=()=>{u(),n()},u=()=>{p&&clearTimeout(p),c.removeEventListener("load",s),c.removeEventListener("error",a)},p;t&&(p=window.setTimeout(()=>{u(),i("timeout")},t));let c=document.createElement("script");c.addEventListener("load",s),c.addEventListener("error",a),c.src=e,document.head.appendChild(c)});var Rs=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var Ps=(e,r)=>async(...t)=>{let n=r(...t),i=e.aborted,a;for(;!i&&!e.aborted;)try{let s=await n.next(a);i=s.done??!1,a=s.value}catch(s){await n.throw(s)}return a};var As=(e,{start:r=0,factor:t=2,max:n=1/0,min:i=r,random:a=0}={})=>{let s=r;return s*=t**e,s*=1+(Math.random()*a*2-a),s=Math.round(s),s=Math.min(s,n),s=Math.max(s,i),s};var Rt={};St(Rt,{clear:()=>Ns,get:()=>Ls,has:()=>ks,isPersistent:()=>_s,remove:()=>Cs,set:()=>js});var $,U,or=`vk-videoplayer-dummy-key-${Math.random()}`,z=()=>{if(U!==void 0)return U;try{localStorage.setItem(or,"test"),localStorage.removeItem(or),U=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(or),U=1}catch(r){if(r instanceof DOMException||r instanceof TypeError)U=2;else throw r}else throw e}return U===2&&($=new Map),U},_s=()=>z()===0,Ls=e=>{let r=z();switch(r){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return $?.get(e);default:L(r)}},js=(e,r)=>{let t=z();switch(t){case 0:try{localStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:$?.set(e,r);return;default:L(t)}},ks=e=>{let r=z();switch(r){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return $?.has(e)??!1;default:return L(r),!1}},Cs=e=>{let r=z();switch(r){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:$?.delete(e);return;default:L(r)}},Ns=()=>{let e=z();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return $?.clear();default:L(e)}};var Nr=te(xi(),1),Jl=()=>{let e,r=[];try{e=window.self!==window.top}catch(t){t instanceof DOMException&&t.name==="SecurityError"?e=!0:(e=!1,console.error(t))}try{window.location.ancestorOrigins&&(r=[...window.location.ancestorOrigins])}catch(t){console.error(t)}try{!r.length&&document.referrer&&(r=[new URL(document.referrer).origin])}catch(t){console.error(t)}return{isEmbed:e,origins:r,topOrigin:(0,Nr.default)(r,-1),immediateOrigin:(0,Nr.default)(r,0)}};var Mr=(l=>(l.INVARIANT="Invariant quality",l.Q_144P="144p",l.Q_240P="240p",l.Q_360P="360p",l.Q_480P="480p",l.Q_576P="576p",l.Q_720P="720p",l.Q_1080P="1080p",l.Q_1440P="1440p",l.Q_2160P="2160p",l.Q_4320P="4320p",l))(Mr||{});var S={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"576p":{width:1024,height:576},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},Zl=(e,r)=>S[e].height>S[r].height,ec=(e,r)=>S[e].height>=S[r].height,Vr=(e,r)=>S[e].height<S[r].height,rc=(e,r)=>S[e].height<=S[r].height,tc=e=>e.sort((r,t)=>r===t?0:r==="Invariant quality"?1:t==="Invariant quality"?-1:Vr(r,t)?1:-1)[0],Ei=Object.keys(S).sort((e,r)=>Vr(e,r)?-1:1),nc=(e,r=.02)=>[...Ei].find(n=>S[n].height*(1+r)>=e),ic=({width:e,height:r})=>{let t=Math.min(e,r),n=Math.max(e,r);return Ei.find(i=>{let a=S[i];return a.width>=n&&a.height>=t})},oc=e=>S[e].height,Fr=e=>e==="Invariant quality",ac=e=>e.every(r=>!Fr(r));function sc(e){if(Fr(e))throw new Error("Expected exact quality")}var uc=(e,r)=>{let t={};for(let n of Object.keys(r)){let i=r[n],a=e[n];Array.isArray(i)&&Array.isArray(a)?t[n]=a:typeof i=="object"&&typeof a=="object"?t[n]=uc(a,i):t[n]=n in e?a:i}return t};var Rd=e=>{let r="";return e>=3600&&(r+=Math.floor(e/3600)+"h",e=e%3600),e>=60&&(r+=Math.floor(e/60)+"m",e=e%60),e>0&&(r+=Math.floor(e)+"s"),r};function Dr(e,r=0,t){let n,i,a,s,u,p,c=0,v=!1,l=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(v=!!t.leading,l="maxWait"in t,a=t?.maxWait?Math.max(+t?.maxWait||0,r):a,b="trailing"in t?!!t.trailing:b);function m(T){let q=n,F=i;return n=i=void 0,c=T,s=e.apply(F,q),s}function y(T,q){return d?(u&&window.cancelAnimationFrame(u),window.requestAnimationFrame(T)):setTimeout(T,q)}function I(T){if(d){window.cancelAnimationFrame(T);return}clearTimeout(T)}function h(T){return c=T,u=y(me,r),v?m(T):s}function g(T){let q=T-p,F=T-c,wt=r-q;return l?Math.min(wt,a-F):wt}function xt(T){let q=T-p,F=T-c;return p===void 0||q>=r||q<0||l&&F>=a}function me(){let T=Date.now();if(xt(T))return Et(T);u=y(me,g(T))}function Et(T){return u=void 0,b&&n?m(T):(n=i=void 0,s)}function us(){u!==void 0&&I(u),c=0,n=p=i=u=void 0}function ls(){return u===void 0?s:Et(Date.now())}function cs(){return u!==void 0}function ye(...T){let q=Date.now(),F=xt(q);if(n=T,i=this,p=q,F){if(u===void 0)return h(p);if(l)return u=y(me,r),m(p)}return u===void 0&&(u=y(me,r)),s}return ye.cancel=us,ye.flush=ls,ye.pending=cs,ye}var Ur=(e,r=0,t)=>Dr(e,r,{...{leading:!0,trailing:!0},...t,maxWait:r});var je=(e,r)=>{if(e===null||typeof e!="object")return e;let t=Array.isArray(e)?[]:{};for(let n in e){if(typeof r=="function"){let i=r(e[n],n,e,t);if(i!==void 0){t[n]=i;continue}}typeof e[n]=="object"?t[n]=je(e[n],r):t[n]=e[n]}return t};var lc=e=>je(e);var cc=300,pc=(e,r=cc)=>new f(t=>{let{width:n,height:i}=e.getBoundingClientRect();if(t.next({width:n,height:i}),!window.ResizeObserver)return;let a=new ResizeObserver(Ur(s=>{let u=s[0];if(!u)return;let p,c;u.contentBoxSize&&u.contentBoxSize[0]?(c=u.contentBoxSize[0].blockSize,p=u.contentBoxSize[0].inlineSize):u.contentRect&&(p=u.contentRect.width,c=u.contentRect.height),W(p)&&W(c)&&t.next({width:p,height:c})},r));return a.observe(e),()=>a.disconnect()});var ke=(e,r=6,t=".")=>{let n={};for(let i in e)if(!(!e.hasOwnProperty(i)||e[i]instanceof HTMLElement||!r))if(typeof e[i]=="object"&&e[i]!==null){let a=ke(e[i],r-1);for(let s in a)a.hasOwnProperty(s)&&(n[i+t+s]=a[s])}else n[i]=e[i];return n};var fc=e=>{e.removeAttribute("src"),e.load()};var Ud=e=>{let r;try{r=new URL(e)}catch{return!1}return r.protocol==="https:"};var Qd=e=>{try{return new URL(e)}catch{return null}};var vc=e=>r=>t=>{let n=typeof t=="object";t==null||n&&!Object.keys(t).length||e(r,n?ke(t):{value:t})};var Ce=class extends M{constructor(r){super(),this.value=r}next(r){super.next(this.value=r)}error(r){super.error(this.value=r)}getValue(){return this.value}_subscribe(r){let t=super._subscribe(r);return r.next(this.value),t}};var Zi=te($r(),1);function eo(e){return new f(r=>{let t={},n=Object.keys(e).length,i=a=>s=>{a in t||n--,t[a]=s,n===0&&r.next(t)};return(0,Zi.default)(e).reduce((a,[s,u])=>a.add(u.subscribe(i(s))),new E)})}function ro(...e){return new f(r=>e.reduce((t,n)=>t.add(n.subscribe(r)),new E))}var $c=e=>new f(r=>{let t=window.setTimeout(()=>{try{r.next()}catch(n){if(r.error)r.error(n);else throw n}},e);return()=>window.clearTimeout(t)});var zc=e=>new f(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var Yc=e=>new f(r=>{e.forEach(t=>r.next(t))});var Hc=(e,r)=>new f(t=>{let n=i=>t.next(i);return e.addEventListener(r,n),()=>e.removeEventListener(r,n)});function to(e){return r=>new f(t=>r.subscribe(new zr(t,e)))}var zr=class{constructor(r,t){this.destination=r;this.size=t;this.lastValues=[]}next(r){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(r),this.destination.next(this.lastValues)}error(r){this.destination.error?.(r)}};var Xc={leading:!1,trailing:!0};function no(e,r=Xc){return t=>new f(n=>t.subscribe(new Yr(n,e,r)))}var Yr=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,W(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(t){if(this.destination.error)this.destination.error(t);else throw t}this.timeout=void 0},this.time)}error(r){this.destination.error?.(r)}};var Jc={leading:!0,trailing:!1};function io(e,r=Jc){return t=>new f(n=>t.subscribe(new Hr(n,e,r)))}var Hr=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,ir(this.timeout)&&(this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(r){this.destination.error?.(r)}};function oo(e){return r=>new f(t=>r.subscribe(new Xr(t,e)))}var Xr=class{constructor(r,t){this.destination=r;this.predicate=t}next(r){let t;try{t=this.predicate(r)}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};var bo=te(fo(),1);var sp=(e,r)=>{let t=(n,i)=>{let a=Object.keys(n);for(let s in i)if(!(0,bo.default)(a,s)||i[s]!==n[s])return!1;return!0};return t(e,r)&&t(r,e)},up=(e,r)=>e instanceof Object&&r instanceof Object?sp(e,r):e===r;function To(e=up){return r=>new f(t=>r.subscribe(new Jr(t,e)))}var vo={},Jr=class{constructor(r,t){this.destination=r;this.predicate=t;this.lastValue=vo}next(r){let t;try{t=this.lastValue===vo||!this.predicate(this.lastValue,r),this.lastValue=r instanceof Object?{...r}:r}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};function Fe(e){return r=>new f(t=>r.subscribe(new Zr(t,e)))}var Zr=class{constructor(r,t){this.destination=r;this.mapper=t}next(r){let t;try{t=this.mapper(r)}catch(n){throw this.error(n),n}this.destination.next(t)}error(r){this.destination.error?.(r)}};function mo(e){return Fe(()=>e)}function yo(){return e=>new f(r=>{let t=!1,n=!1,i=e.subscribe(a=>{t||(t=!0,r.next(a)),n&&i.unsubscribe()},a=>{t=!0,r.error?.(a),n&&i.unsubscribe()});return n=!0,t&&i.unsubscribe(),i})}function ho(){return e=>new f(r=>e.subscribe(new et(r)))}var et=class{constructor(r){this.destination=r;this.hasLast=!1}next(r){let t=this.last;if(this.last=r,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,r])}error(r){this.destination.error?.(r)}};function go(e){return r=>new f(t=>r.subscribe(new rt(t,e)))}var rt=class{constructor(r,t){this.destination=r;this.effect=t}next(r){try{this.effect(r)}catch(t){throw this.error(t),t}this.destination.next(r)}error(r){this.destination.error?.(r)}};function Io(e){return r=>new f(t=>r.subscribe(new tt(t,e)))}var tt=class{constructor(r,t){this.destination=r;this.count=t;t<0&&this.destination.error?.(new Error("Count can not be less than zero"))}next(r){this.count===0?this.destination.next(r):this.count--}error(r){this.destination.error?.(r)}};var lp=(u=>(u.NETWORK="network",u.VIDEO_PIPELINE="video_pipeline",u.EXTERNAL_API="external_api",u.PARSER="parser",u.DOM="dom",u.WTF="wtf",u.FATAL="fatal",u))(lp||{});var De=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(r,t,n){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:t,options:n})}removeEventListener(r,t){if(!(r in this.listeners))return;let n=this.listeners[r];for(let i=0,a=n.length;i<a;i++)if(n[i].callback===t){n.splice(i,1);return}}dispatchEvent(r){if(!(r.type in this.listeners))return;let n=this.listeners[r.type].slice();for(let i=0,a=n.length;i<a;i++){let s=n[i];try{s.callback.call(this,r)}catch(u){Promise.resolve().then(()=>{throw u})}s.options&&s.options.once&&this.removeEventListener(r.type,s.callback)}return!r.defaultPrevented}},re=class extends De{constructor(){super(),this.listeners||De.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(r){r.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,r)),super.dispatchEvent(r)}},pe=class{constructor(){Object.defineProperty(this,"signal",{value:new re,writable:!0,configurable:!0})}abort(r){let t;try{t=new Event("abort")}catch{typeof document<"u"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}let n=r;if(n===void 0)if(typeof document>"u")n=new Error("This operation was aborted"),n.name="AbortError";else try{n=new DOMException("signal is aborted without reason")}catch{n=new Error("This operation was aborted"),n.name="AbortError"}this.signal.reason=n,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol<"u"&&Symbol.toStringTag&&(pe.prototype[Symbol.toStringTag]="AbortController",re.prototype[Symbol.toStringTag]="AbortSignal");function Ue(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function nt(e){typeof e=="function"&&(e={fetch:e});let{fetch:r,Request:t=r.Request,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!Ue({fetch:r,Request:t,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:r,Request:a};let a=t;(a&&!a.prototype.hasOwnProperty("signal")||i)&&(a=function(c,v){let l;v&&v.signal&&(l=v.signal,delete v.signal);let b=new t(c,v);return l&&Object.defineProperty(b,"signal",{writable:!1,enumerable:!1,configurable:!0,value:l}),b},a.prototype=t.prototype);let s=r;return{fetch:(p,c)=>{let v=a&&a.prototype.isPrototypeOf(p)?p.signal:c?c.signal:void 0;if(v){let l;try{l=new DOMException("Aborted","AbortError")}catch{l=new Error("Aborted"),l.name="AbortError"}if(v.aborted)return Promise.reject(l);let b=new Promise((d,m)=>{v.addEventListener("abort",()=>m(l),{once:!0})});return c&&c.signal&&delete c.signal,Promise.race([b,s(p,c)])}return s(p,c)},Request:a}}var fe=Ue({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),Oo=fe?nt({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,xo=fe?Oo.fetch:window.fetch,ly=fe?Oo.Request:window.Request,cy=fe?pe:window.AbortController,py=fe?re:window.AbortSignal;var is=te($r(),1),os=te(ns(),1),qv=(l=>(l.Armenian="58",l.Azerbaijani="57",l.Belarusian="114",l.English="3",l.Kazakh="97",l.Portuguese="73",l.Russian="0",l.Spanish="4",l.Ukrainian="1",l.Uzbek="65",l.Vietnamese="75",l))(qv||{}),Rv="vk.com",Yy=async(e,r,t)=>{let n=new URL(`https://${Rv}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",r),e!==void 0&&n.searchParams.set("lang",e);let a=await(await xo(n.toString())).json();return Pv(a,t)},Pv=(e,r)=>(0,os.default)((0,is.default)(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),Av(n)])),Av=e=>Array.isArray(e)?e[0]:e;var _v=(t=>(t.RU="ru",t.EN="en",t))(_v||{});var Lv={UI:"__vkVideoPlayer",CORE:"__vkVideoCore"},jv=(()=>{let e=0;return()=>{let r=e;return e=(e+1)%Number.MAX_SAFE_INTEGER,r}})(),as=class{constructor(r){this.id=jv();this.type=r,this.initWindowObjects()}getWindowObject(){let r=this.key();return window[r]?.[this.id]??{}}initWindowObjects(){let r=this.key();window[r]||(window[r]={}),window[r][this.id]={}}expose(r){Object.assign(this.getWindowObject(),r)}destroy(){let r=this.key();window&&window[r]&&window[r][this.id]&&(delete window[r][this.id],Object.keys(window[r]).length||delete window[r])}key(){let{type:r}=this;return Lv[r]}};var ss={};St(ss,{create:()=>kv,destroy:()=>Cv,push:()=>Nv,subscribe:()=>Mv});var Te=new Map,kv=(e,r)=>Te.set(e,r??[]),Cv=e=>Te.delete(e),Nv=(e,r)=>{let t=Te.get(e);t&&(typeof t=="function"?t(r):t.push(r))},Mv=(e,r)=>{let t=Te.get(e);if(t){if(t&&Array.isArray(t))for(let n of t)r(n);Te.set(e,r)}};export{lp as ErrorCategory,_v as InterfaceLanguage,as as InternalsExposure,rr as Logger,f as Observable,M as Subject,E as Subscription,nr as Tracer,ms as VERSION,qv as VKNumericLanguage,Ce as ValueSubject,Mr as VideoQuality,Ps as abortable,qs as addScript,ac as areQualitiesExact,Ss as assertEmptyArray,L as assertNever,xs as assertNonNullable,ws as assertNotEmptyArray,Es as assertNullable,sc as assertQualityIsExact,to as buffer,ys as checkNever,fc as clearVideoElement,lc as cloneDeep,je as cloneDeepWith,eo as combine,Qd as createURL,no as debounce,Dr as debounceFn,Jl as detectEmbed,ss as devNull,uc as fillWithDefault,oo as filter,To as filterChanged,ke as flattenObject,Hc as fromEvent,As as getExponentialDelay,tc as getHighestQuality,vc as getTraceSubscriptionMethod,zc as interval,Zl as isHigher,ec as isHigherOrEqual,Fr as isInvariantQuality,Vr as isLower,rc as isLowerOrEqual,W as isNonNullable,ir as isNullable,Ud as isValidURL,Yy as loadVKLangPack,Fe as map,mo as mapTo,ro as merge,D as noop,Rs as now,Yc as observableFrom,pc as observeElementSize,yo as once,ho as pairwise,Rt as safeStorage,Io as skip,go as tap,io as throttle,Ur as throttleFn,Rd as timeCodeToString,$c as timeout,nc as videoHeightToQuality,oc as videoQualityToHeight,ic as videoSizeToQuality};
6
+ var fs=Object.create;var rr=Object.defineProperty;var vs=Object.getOwnPropertyDescriptor;var bs=Object.getOwnPropertyNames;var ds=Object.getPrototypeOf,Ts=Object.prototype.hasOwnProperty;var o=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),qt=(e,r)=>{for(var t in r)rr(e,t,{get:r[t],enumerable:!0})},ms=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of bs(r))!Ts.call(e,i)&&i!==t&&rr(e,i,{get:()=>r[i],enumerable:!(n=vs(r,i))||n.enumerable});return e};var te=(e,r,t)=>(t=e!=null?fs(ds(e)):{},ms(r||!e||!e.__esModule?rr(t,"default",{value:e,enumerable:!0}):t,e));var x=o((sr,At)=>{"use strict";var ne=function(e){return e&&e.Math===Math&&e};At.exports=ne(typeof globalThis=="object"&&globalThis)||ne(typeof window=="object"&&window)||ne(typeof self=="object"&&self)||ne(typeof global=="object"&&global)||ne(typeof sr=="object"&&sr)||function(){return this}()||Function("return this")()});var w=o((gb,_t)=>{"use strict";_t.exports=function(e){try{return!!e()}catch{return!0}}});var ie=o((Ib,Lt)=>{"use strict";var Vs=w();Lt.exports=!Vs(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var Mt=o((Ob,Nt)=>{"use strict";var Fs=ie(),Ct=Function.prototype,jt=Ct.apply,kt=Ct.call;Nt.exports=typeof Reflect=="object"&&Reflect.apply||(Fs?kt.bind(jt):function(){return kt.apply(jt,arguments)})});var _=o((xb,Dt)=>{"use strict";var Vt=ie(),Ft=Function.prototype,ur=Ft.call,Ds=Vt&&Ft.bind.bind(ur,ur);Dt.exports=Vt?Ds:function(e){return function(){return ur.apply(e,arguments)}}});var he=o((Eb,Gt)=>{"use strict";var Ut=_(),Us=Ut({}.toString),Gs=Ut("".slice);Gt.exports=function(e){return Gs(Us(e),8,-1)}});var lr=o((wb,Qt)=>{"use strict";var Qs=he(),Bs=_();Qt.exports=function(e){if(Qs(e)==="Function")return Bs(e)}});var E=o((Sb,Bt)=>{"use strict";var cr=typeof document=="object"&&document.all;Bt.exports=typeof cr>"u"&&cr!==void 0?function(e){return typeof e=="function"||e===cr}:function(e){return typeof e=="function"}});var R=o((qb,Kt)=>{"use strict";var Ks=w();Kt.exports=!Ks(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var V=o((Rb,Wt)=>{"use strict";var Ws=ie(),ge=Function.prototype.call;Wt.exports=Ws?ge.bind(ge):function(){return ge.apply(ge,arguments)}});var pr=o(Yt=>{"use strict";var $t={}.propertyIsEnumerable,zt=Object.getOwnPropertyDescriptor,$s=zt&&!$t.call({1:2},1);Yt.f=$s?function(r){var t=zt(this,r);return!!t&&t.enumerable}:$t});var oe=o((Ab,Ht)=>{"use strict";Ht.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var Jt=o((_b,Xt)=>{"use strict";var zs=_(),Ys=w(),Hs=he(),fr=Object,Xs=zs("".split);Xt.exports=Ys(function(){return!fr("z").propertyIsEnumerable(0)})?function(e){return Hs(e)==="String"?Xs(e,""):fr(e)}:fr});var Ie=o((Lb,Zt)=>{"use strict";Zt.exports=function(e){return e==null}});var Oe=o((jb,en)=>{"use strict";var Js=Ie(),Zs=TypeError;en.exports=function(e){if(Js(e))throw new Zs("Can't call method on "+e);return e}});var G=o((kb,rn)=>{"use strict";var eu=Jt(),ru=Oe();rn.exports=function(e){return eu(ru(e))}});var j=o((Cb,tn)=>{"use strict";var tu=E();tn.exports=function(e){return typeof e=="object"?e!==null:tu(e)}});var ae=o((Nb,nn)=>{"use strict";nn.exports={}});var xe=o((Mb,an)=>{"use strict";var vr=ae(),br=x(),nu=E(),on=function(e){return nu(e)?e:void 0};an.exports=function(e,r){return arguments.length<2?on(vr[e])||on(br[e]):vr[e]&&vr[e][r]||br[e]&&br[e][r]}});var dr=o((Vb,sn)=>{"use strict";var iu=_();sn.exports=iu({}.isPrototypeOf)});var pn=o((Fb,cn)=>{"use strict";var ou=x(),un=ou.navigator,ln=un&&un.userAgent;cn.exports=ln?String(ln):""});var yn=o((Db,mn)=>{"use strict";var Tn=x(),Tr=pn(),fn=Tn.process,vn=Tn.Deno,bn=fn&&fn.versions||vn&&vn.version,dn=bn&&bn.v8,P,Ee;dn&&(P=dn.split("."),Ee=P[0]>0&&P[0]<4?1:+(P[0]+P[1]));!Ee&&Tr&&(P=Tr.match(/Edge\/(\d+)/),(!P||P[1]>=74)&&(P=Tr.match(/Chrome\/(\d+)/),P&&(Ee=+P[1])));mn.exports=Ee});var mr=o((Ub,gn)=>{"use strict";var hn=yn(),au=w(),su=x(),uu=su.String;gn.exports=!!Object.getOwnPropertySymbols&&!au(function(){var e=Symbol("symbol detection");return!uu(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&hn&&hn<41})});var yr=o((Gb,In)=>{"use strict";var lu=mr();In.exports=lu&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var hr=o((Qb,On)=>{"use strict";var cu=xe(),pu=E(),fu=dr(),vu=yr(),bu=Object;On.exports=vu?function(e){return typeof e=="symbol"}:function(e){var r=cu("Symbol");return pu(r)&&fu(r.prototype,bu(e))}});var we=o((Bb,xn)=>{"use strict";var du=String;xn.exports=function(e){try{return du(e)}catch{return"Object"}}});var se=o((Kb,En)=>{"use strict";var Tu=E(),mu=we(),yu=TypeError;En.exports=function(e){if(Tu(e))return e;throw new yu(mu(e)+" is not a function")}});var Se=o((Wb,wn)=>{"use strict";var hu=se(),gu=Ie();wn.exports=function(e,r){var t=e[r];return gu(t)?void 0:hu(t)}});var qn=o(($b,Sn)=>{"use strict";var gr=V(),Ir=E(),Or=j(),Iu=TypeError;Sn.exports=function(e,r){var t,n;if(r==="string"&&Ir(t=e.toString)&&!Or(n=gr(t,e))||Ir(t=e.valueOf)&&!Or(n=gr(t,e))||r!=="string"&&Ir(t=e.toString)&&!Or(n=gr(t,e)))return n;throw new Iu("Can't convert object to primitive value")}});var ue=o((zb,Rn)=>{"use strict";Rn.exports=!0});var _n=o((Yb,An)=>{"use strict";var Pn=x(),Ou=Object.defineProperty;An.exports=function(e,r){try{Ou(Pn,e,{value:r,configurable:!0,writable:!0})}catch{Pn[e]=r}return r}});var qe=o((Hb,kn)=>{"use strict";var xu=ue(),Eu=x(),wu=_n(),Ln="__core-js_shared__",jn=kn.exports=Eu[Ln]||wu(Ln,{});(jn.versions||(jn.versions=[])).push({version:"3.38.0",mode:xu?"pure":"global",copyright:"\xA9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var xr=o((Xb,Nn)=>{"use strict";var Cn=qe();Nn.exports=function(e,r){return Cn[e]||(Cn[e]=r||{})}});var Re=o((Jb,Mn)=>{"use strict";var Su=Oe(),qu=Object;Mn.exports=function(e){return qu(Su(e))}});var k=o((Zb,Vn)=>{"use strict";var Ru=_(),Pu=Re(),Au=Ru({}.hasOwnProperty);Vn.exports=Object.hasOwn||function(r,t){return Au(Pu(r),t)}});var Er=o((ed,Fn)=>{"use strict";var _u=_(),Lu=0,ju=Math.random(),ku=_u(1 .toString);Fn.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+ku(++Lu+ju,36)}});var C=o((rd,Un)=>{"use strict";var Cu=x(),Nu=xr(),Dn=k(),Mu=Er(),Vu=mr(),Fu=yr(),Y=Cu.Symbol,wr=Nu("wks"),Du=Fu?Y.for||Y:Y&&Y.withoutSetter||Mu;Un.exports=function(e){return Dn(wr,e)||(wr[e]=Vu&&Dn(Y,e)?Y[e]:Du("Symbol."+e)),wr[e]}});var Kn=o((td,Bn)=>{"use strict";var Uu=V(),Gn=j(),Qn=hr(),Gu=Se(),Qu=qn(),Bu=C(),Ku=TypeError,Wu=Bu("toPrimitive");Bn.exports=function(e,r){if(!Gn(e)||Qn(e))return e;var t=Gu(e,Wu),n;if(t){if(r===void 0&&(r="default"),n=Uu(t,e,r),!Gn(n)||Qn(n))return n;throw new Ku("Can't convert object to primitive value")}return r===void 0&&(r="number"),Qu(e,r)}});var Sr=o((nd,Wn)=>{"use strict";var $u=Kn(),zu=hr();Wn.exports=function(e){var r=$u(e,"string");return zu(r)?r:r+""}});var Rr=o((id,zn)=>{"use strict";var Yu=x(),$n=j(),qr=Yu.document,Hu=$n(qr)&&$n(qr.createElement);zn.exports=function(e){return Hu?qr.createElement(e):{}}});var Pr=o((od,Yn)=>{"use strict";var Xu=R(),Ju=w(),Zu=Rr();Yn.exports=!Xu&&!Ju(function(){return Object.defineProperty(Zu("div"),"a",{get:function(){return 7}}).a!==7})});var Jn=o(Xn=>{"use strict";var el=R(),rl=V(),tl=pr(),nl=oe(),il=G(),ol=Sr(),al=k(),sl=Pr(),Hn=Object.getOwnPropertyDescriptor;Xn.f=el?Hn:function(r,t){if(r=il(r),t=ol(t),sl)try{return Hn(r,t)}catch{}if(al(r,t))return nl(!rl(tl.f,r,t),r[t])}});var ei=o((sd,Zn)=>{"use strict";var ul=w(),ll=E(),cl=/#|\.prototype\./,le=function(e,r){var t=fl[pl(e)];return t===bl?!0:t===vl?!1:ll(r)?ul(r):!!r},pl=le.normalize=function(e){return String(e).replace(cl,".").toLowerCase()},fl=le.data={},vl=le.NATIVE="N",bl=le.POLYFILL="P";Zn.exports=le});var Ar=o((ud,ti)=>{"use strict";var ri=lr(),dl=se(),Tl=ie(),ml=ri(ri.bind);ti.exports=function(e,r){return dl(e),r===void 0?e:Tl?ml(e,r):function(){return e.apply(r,arguments)}}});var _r=o((ld,ni)=>{"use strict";var yl=R(),hl=w();ni.exports=yl&&hl(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Q=o((cd,ii)=>{"use strict";var gl=j(),Il=String,Ol=TypeError;ii.exports=function(e){if(gl(e))return e;throw new Ol(Il(e)+" is not an object")}});var H=o(ai=>{"use strict";var xl=R(),El=Pr(),wl=_r(),Pe=Q(),oi=Sr(),Sl=TypeError,Lr=Object.defineProperty,ql=Object.getOwnPropertyDescriptor,jr="enumerable",kr="configurable",Cr="writable";ai.f=xl?wl?function(r,t,n){if(Pe(r),t=oi(t),Pe(n),typeof r=="function"&&t==="prototype"&&"value"in n&&Cr in n&&!n[Cr]){var i=ql(r,t);i&&i[Cr]&&(r[t]=n.value,n={configurable:kr in n?n[kr]:i[kr],enumerable:jr in n?n[jr]:i[jr],writable:!1})}return Lr(r,t,n)}:Lr:function(r,t,n){if(Pe(r),t=oi(t),Pe(n),El)try{return Lr(r,t,n)}catch{}if("get"in n||"set"in n)throw new Sl("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var X=o((fd,si)=>{"use strict";var Rl=R(),Pl=H(),Al=oe();si.exports=Rl?function(e,r,t){return Pl.f(e,r,Al(1,t))}:function(e,r,t){return e[r]=t,e}});var ee=o((vd,li)=>{"use strict";var ce=x(),_l=Mt(),Ll=lr(),jl=E(),kl=Jn().f,Cl=ei(),J=ae(),Nl=Ar(),Z=X(),ui=k();qe();var Ml=function(e){var r=function(t,n,i){if(this instanceof r){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return _l(e,this,arguments)};return r.prototype=e.prototype,r};li.exports=function(e,r){var t=e.target,n=e.global,i=e.stat,a=e.proto,s=n?ce:i?ce[t]:ce[t]&&ce[t].prototype,u=n?J:J[t]||Z(J,t,{})[t],p=u.prototype,c,v,l,b,d,m,y,I,h;for(b in r)c=Cl(n?b:t+(i?".":"#")+b,e.forced),v=!c&&s&&ui(s,b),m=u[b],v&&(e.dontCallGetSet?(h=kl(s,b),y=h&&h.value):y=s[b]),d=v&&y?y:r[b],!(!c&&!a&&typeof m==typeof d)&&(e.bind&&v?I=Nl(d,ce):e.wrap&&v?I=Ml(d):a&&jl(d)?I=Ll(d):I=d,(e.sham||d&&d.sham||m&&m.sham)&&Z(I,"sham",!0),Z(u,b,I),a&&(l=t+"Prototype",ui(J,l)||Z(J,l,{}),Z(J[l],b,d),e.real&&p&&(c||!p[b])&&Z(p,b,d)))}});var pi=o((bd,ci)=>{"use strict";var Vl=Math.ceil,Fl=Math.floor;ci.exports=Math.trunc||function(r){var t=+r;return(t>0?Fl:Vl)(t)}});var Ae=o((dd,fi)=>{"use strict";var Dl=pi();fi.exports=function(e){var r=+e;return r!==r||r===0?0:Dl(r)}});var bi=o((Td,vi)=>{"use strict";var Ul=Ae(),Gl=Math.min;vi.exports=function(e){var r=Ul(e);return r>0?Gl(r,9007199254740991):0}});var _e=o((md,di)=>{"use strict";var Ql=bi();di.exports=function(e){return Ql(e.length)}});var Le=o((yd,Ti)=>{"use strict";Ti.exports=function(){}});var mi=o(()=>{"use strict";var Bl=ee(),Kl=Re(),Wl=_e(),$l=Ae(),zl=Le();Bl({target:"Array",proto:!0},{at:function(r){var t=Kl(this),n=Wl(t),i=$l(r),a=i>=0?i:n+i;return a<0||a>=n?void 0:t[a]}});zl("at")});var Nr=o((Id,yi)=>{"use strict";var Yl=xe();yi.exports=Yl});var gi=o((Od,hi)=>{"use strict";mi();var Hl=Nr();hi.exports=Hl("Array","at")});var Oi=o((xd,Ii)=>{"use strict";var Xl=gi();Ii.exports=Xl});var Ei=o((Ed,xi)=>{"use strict";var Jl=Oi();xi.exports=Jl});var Ne=o((LT,qi)=>{"use strict";var Tc=xr(),mc=Er(),Si=Tc("keys");qi.exports=function(e){return Si[e]||(Si[e]=mc(e))}});var Pi=o((jT,Ri)=>{"use strict";var yc=w();Ri.exports=!yc(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var Me=o((kT,_i)=>{"use strict";var hc=k(),gc=E(),Ic=Re(),Oc=Ne(),xc=Pi(),Ai=Oc("IE_PROTO"),Qr=Object,Ec=Qr.prototype;_i.exports=xc?Qr.getPrototypeOf:function(e){var r=Ic(e);if(hc(r,Ai))return r[Ai];var t=r.constructor;return gc(t)&&r instanceof t?t.prototype:r instanceof Qr?Ec:null}});var ji=o((CT,Li)=>{"use strict";var wc=Ae(),Sc=Math.max,qc=Math.min;Li.exports=function(e,r){var t=wc(e);return t<0?Sc(t+r,0):qc(t,r)}});var Br=o((NT,Ci)=>{"use strict";var Rc=G(),Pc=ji(),Ac=_e(),ki=function(e){return function(r,t,n){var i=Rc(r),a=Ac(i);if(a===0)return!e&&-1;var s=Pc(n,a),u;if(e&&t!==t){for(;a>s;)if(u=i[s++],u!==u)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===t)return e||s||0;return!e&&-1}};Ci.exports={includes:ki(!0),indexOf:ki(!1)}});var Ve=o((MT,Ni)=>{"use strict";Ni.exports={}});var Fi=o((VT,Vi)=>{"use strict";var _c=_(),Kr=k(),Lc=G(),jc=Br().indexOf,kc=Ve(),Mi=_c([].push);Vi.exports=function(e,r){var t=Lc(e),n=0,i=[],a;for(a in t)!Kr(kc,a)&&Kr(t,a)&&Mi(i,a);for(;r.length>n;)Kr(t,a=r[n++])&&(~jc(i,a)||Mi(i,a));return i}});var Wr=o((FT,Di)=>{"use strict";Di.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var $r=o((DT,Ui)=>{"use strict";var Cc=Fi(),Nc=Wr();Ui.exports=Object.keys||function(r){return Cc(r,Nc)}});var $i=o((UT,Wi)=>{"use strict";var Qi=R(),Mc=w(),Bi=_(),Vc=Me(),Fc=$r(),Dc=G(),Uc=pr().f,Ki=Bi(Uc),Gc=Bi([].push),Qc=Qi&&Mc(function(){var e=Object.create(null);return e[2]=2,!Ki(e,2)}),Gi=function(e){return function(r){for(var t=Dc(r),n=Fc(t),i=Qc&&Vc(t)===null,a=n.length,s=0,u=[],p;a>s;)p=n[s++],(!Qi||(i?p in t:Ki(t,p)))&&Gc(u,e?[p,t[p]]:t[p]);return u}};Wi.exports={entries:Gi(!0),values:Gi(!1)}});var zi=o(()=>{"use strict";var Bc=ee(),Kc=$i().entries;Bc({target:"Object",stat:!0},{entries:function(r){return Kc(r)}})});var Hi=o((BT,Yi)=>{"use strict";zi();var Wc=ae();Yi.exports=Wc.Object.entries});var Ji=o((KT,Xi)=>{"use strict";var $c=Hi();Xi.exports=$c});var zr=o((WT,Zi)=>{"use strict";var zc=Ji();Zi.exports=zc});var so=o(()=>{"use strict";var rp=ee(),tp=Br().includes,np=w(),ip=Le(),op=np(function(){return!Array(1).includes()});rp({target:"Array",proto:!0,forced:op},{includes:function(r){return tp(this,r,arguments.length>1?arguments[1]:void 0)}});ip("includes")});var lo=o((Im,uo)=>{"use strict";so();var ap=Nr();uo.exports=ap("Array","includes")});var po=o((Om,co)=>{"use strict";var sp=lo();co.exports=sp});var vo=o((xm,fo)=>{"use strict";var up=po();fo.exports=up});var B=o((gy,wo)=>{"use strict";wo.exports={}});var Ro=o((Iy,qo)=>{"use strict";var fp=x(),vp=E(),So=fp.WeakMap;qo.exports=vp(So)&&/native code/.test(String(So))});var Lo=o((Oy,_o)=>{"use strict";var bp=Ro(),Ao=x(),dp=j(),Tp=X(),ot=k(),at=qe(),mp=Ne(),yp=Ve(),Po="Object already initialized",st=Ao.TypeError,hp=Ao.WeakMap,Qe,ve,Be,gp=function(e){return Be(e)?ve(e):Qe(e,{})},Ip=function(e){return function(r){var t;if(!dp(r)||(t=ve(r)).type!==e)throw new st("Incompatible receiver, "+e+" required");return t}};bp||at.state?(A=at.state||(at.state=new hp),A.get=A.get,A.has=A.has,A.set=A.set,Qe=function(e,r){if(A.has(e))throw new st(Po);return r.facade=e,A.set(e,r),r},ve=function(e){return A.get(e)||{}},Be=function(e){return A.has(e)}):(K=mp("state"),yp[K]=!0,Qe=function(e,r){if(ot(e,K))throw new st(Po);return r.facade=e,Tp(e,K,r),r},ve=function(e){return ot(e,K)?e[K]:{}},Be=function(e){return ot(e,K)});var A,K;_o.exports={set:Qe,get:ve,has:Be,enforce:gp,getterFor:Ip}});var Co=o((xy,ko)=>{"use strict";var ut=R(),Op=k(),jo=Function.prototype,xp=ut&&Object.getOwnPropertyDescriptor,lt=Op(jo,"name"),Ep=lt&&function(){}.name==="something",wp=lt&&(!ut||ut&&xp(jo,"name").configurable);ko.exports={EXISTS:lt,PROPER:Ep,CONFIGURABLE:wp}});var Mo=o(No=>{"use strict";var Sp=R(),qp=_r(),Rp=H(),Pp=Q(),Ap=G(),_p=$r();No.f=Sp&&!qp?Object.defineProperties:function(r,t){Pp(r);for(var n=Ap(t),i=_p(t),a=i.length,s=0,u;a>s;)Rp.f(r,u=i[s++],n[u]);return r}});var Fo=o((wy,Vo)=>{"use strict";var Lp=xe();Vo.exports=Lp("document","documentElement")});var vt=o((Sy,Wo)=>{"use strict";var jp=Q(),kp=Mo(),Do=Wr(),Cp=Ve(),Np=Fo(),Mp=Rr(),Vp=Ne(),Uo=">",Go="<",pt="prototype",ft="script",Bo=Vp("IE_PROTO"),ct=function(){},Ko=function(e){return Go+ft+Uo+e+Go+"/"+ft+Uo},Qo=function(e){e.write(Ko("")),e.close();var r=e.parentWindow.Object;return e=null,r},Fp=function(){var e=Mp("iframe"),r="java"+ft+":",t;return e.style.display="none",Np.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(Ko("document.F=Object")),t.close(),t.F},Ke,We=function(){try{Ke=new ActiveXObject("htmlfile")}catch{}We=typeof document<"u"?document.domain&&Ke?Qo(Ke):Fp():Qo(Ke);for(var e=Do.length;e--;)delete We[pt][Do[e]];return We()};Cp[Bo]=!0;Wo.exports=Object.create||function(r,t){var n;return r!==null?(ct[pt]=jp(r),n=new ct,ct[pt]=null,n[Bo]=r):n=We(),t===void 0?n:kp.f(n,t)}});var bt=o((qy,$o)=>{"use strict";var Dp=X();$o.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:Dp(e,r,t),e}});var yt=o((Ry,Ho)=>{"use strict";var Up=w(),Gp=E(),Qp=j(),Bp=vt(),zo=Me(),Kp=bt(),Wp=C(),$p=ue(),mt=Wp("iterator"),Yo=!1,N,dt,Tt;[].keys&&(Tt=[].keys(),"next"in Tt?(dt=zo(zo(Tt)),dt!==Object.prototype&&(N=dt)):Yo=!0);var zp=!Qp(N)||Up(function(){var e={};return N[mt].call(e)!==e});zp?N={}:$p&&(N=Bp(N));Gp(N[mt])||Kp(N,mt,function(){return this});Ho.exports={IteratorPrototype:N,BUGGY_SAFARI_ITERATORS:Yo}});var $e=o((Py,Jo)=>{"use strict";var Yp=C(),Hp=Yp("toStringTag"),Xo={};Xo[Hp]="z";Jo.exports=String(Xo)==="[object z]"});var ht=o((Ay,Zo)=>{"use strict";var Xp=$e(),Jp=E(),ze=he(),Zp=C(),ef=Zp("toStringTag"),rf=Object,tf=ze(function(){return arguments}())==="Arguments",nf=function(e,r){try{return e[r]}catch{}};Zo.exports=Xp?ze:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=nf(r=rf(e),ef))=="string"?t:tf?ze(r):(n=ze(r))==="Object"&&Jp(r.callee)?"Arguments":n}});var ra=o((_y,ea)=>{"use strict";var of=$e(),af=ht();ea.exports=of?{}.toString:function(){return"[object "+af(this)+"]"}});var Ye=o((Ly,na)=>{"use strict";var sf=$e(),uf=H().f,lf=X(),cf=k(),pf=ra(),ff=C(),ta=ff("toStringTag");na.exports=function(e,r,t,n){var i=t?e:e&&e.prototype;i&&(cf(i,ta)||uf(i,ta,{configurable:!0,value:r}),n&&!sf&&lf(i,"toString",pf))}});var oa=o((jy,ia)=>{"use strict";var vf=yt().IteratorPrototype,bf=vt(),df=oe(),Tf=Ye(),mf=B(),yf=function(){return this};ia.exports=function(e,r,t,n){var i=r+" Iterator";return e.prototype=bf(vf,{next:df(+!n,t)}),Tf(e,i,!1,!0),mf[i]=yf,e}});var sa=o((ky,aa)=>{"use strict";var hf=_(),gf=se();aa.exports=function(e,r,t){try{return hf(gf(Object.getOwnPropertyDescriptor(e,r)[t]))}catch{}}});var la=o((Cy,ua)=>{"use strict";var If=j();ua.exports=function(e){return If(e)||e===null}});var pa=o((Ny,ca)=>{"use strict";var Of=la(),xf=String,Ef=TypeError;ca.exports=function(e){if(Of(e))return e;throw new Ef("Can't set "+xf(e)+" as a prototype")}});var va=o((My,fa)=>{"use strict";var wf=sa(),Sf=j(),qf=Oe(),Rf=pa();fa.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=wf(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch{}return function(i,a){return qf(i),Rf(a),Sf(i)&&(e?t(i,a):i.__proto__=a),i}}():void 0)});var Ea=o((Vy,xa)=>{"use strict";var Pf=ee(),Af=V(),He=ue(),Ia=Co(),_f=E(),Lf=oa(),ba=Me(),da=va(),jf=Ye(),kf=X(),gt=bt(),Cf=C(),Ta=B(),Oa=yt(),Nf=Ia.PROPER,Mf=Ia.CONFIGURABLE,ma=Oa.IteratorPrototype,Xe=Oa.BUGGY_SAFARI_ITERATORS,be=Cf("iterator"),ya="keys",de="values",ha="entries",ga=function(){return this};xa.exports=function(e,r,t,n,i,a,s){Lf(t,r,n);var u=function(h){if(h===i&&b)return b;if(!Xe&&h&&h in v)return v[h];switch(h){case ya:return function(){return new t(this,h)};case de:return function(){return new t(this,h)};case ha:return function(){return new t(this,h)}}return function(){return new t(this)}},p=r+" Iterator",c=!1,v=e.prototype,l=v[be]||v["@@iterator"]||i&&v[i],b=!Xe&&l||u(i),d=r==="Array"&&v.entries||l,m,y,I;if(d&&(m=ba(d.call(new e)),m!==Object.prototype&&m.next&&(!He&&ba(m)!==ma&&(da?da(m,ma):_f(m[be])||gt(m,be,ga)),jf(m,p,!0,!0),He&&(Ta[p]=ga))),Nf&&i===de&&l&&l.name!==de&&(!He&&Mf?kf(v,"name",de):(c=!0,b=function(){return Af(l,this)})),i)if(y={values:u(de),keys:a?b:u(ya),entries:u(ha)},s)for(I in y)(Xe||c||!(I in v))&&gt(v,I,y[I]);else Pf({target:r,proto:!0,forced:Xe||c},y);return(!He||s)&&v[be]!==b&&gt(v,be,b,{name:i}),Ta[r]=b,y}});var Sa=o((Fy,wa)=>{"use strict";wa.exports=function(e,r){return{value:e,done:r}}});var Ot=o((Dy,_a)=>{"use strict";var Vf=G(),It=Le(),qa=B(),Pa=Lo(),Ff=H().f,Df=Ea(),Je=Sa(),Uf=ue(),Gf=R(),Aa="Array Iterator",Qf=Pa.set,Bf=Pa.getterFor(Aa);_a.exports=Df(Array,"Array",function(e,r){Qf(this,{type:Aa,target:Vf(e),index:0,kind:r})},function(){var e=Bf(this),r=e.target,t=e.index++;if(!r||t>=r.length)return e.target=void 0,Je(void 0,!0);switch(e.kind){case"keys":return Je(t,!1);case"values":return Je(r[t],!1)}return Je([t,r[t]],!1)},"values");var Ra=qa.Arguments=qa.Array;It("keys");It("values");It("entries");if(!Uf&&Gf&&Ra.name!=="values")try{Ff(Ra,"name",{value:"values"})}catch{}});var ja=o((Uy,La)=>{"use strict";var Kf=C(),Wf=B(),$f=Kf("iterator"),zf=Array.prototype;La.exports=function(e){return e!==void 0&&(Wf.Array===e||zf[$f]===e)}});var xt=o((Gy,Ca)=>{"use strict";var Yf=ht(),ka=Se(),Hf=Ie(),Xf=B(),Jf=C(),Zf=Jf("iterator");Ca.exports=function(e){if(!Hf(e))return ka(e,Zf)||ka(e,"@@iterator")||Xf[Yf(e)]}});var Ma=o((Qy,Na)=>{"use strict";var ev=V(),rv=se(),tv=Q(),nv=we(),iv=xt(),ov=TypeError;Na.exports=function(e,r){var t=arguments.length<2?iv(e):r;if(rv(t))return tv(ev(t,e));throw new ov(nv(e)+" is not iterable")}});var Da=o((By,Fa)=>{"use strict";var av=V(),Va=Q(),sv=Se();Fa.exports=function(e,r,t){var n,i;Va(e);try{if(n=sv(e,"return"),!n){if(r==="throw")throw t;return t}n=av(n,e)}catch(a){i=!0,n=a}if(r==="throw")throw t;if(i)throw n;return Va(n),t}});var Ka=o((Ky,Ba)=>{"use strict";var uv=Ar(),lv=V(),cv=Q(),pv=we(),fv=ja(),vv=_e(),Ua=dr(),bv=Ma(),dv=xt(),Ga=Da(),Tv=TypeError,Ze=function(e,r){this.stopped=e,this.result=r},Qa=Ze.prototype;Ba.exports=function(e,r,t){var n=t&&t.that,i=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_RECORD),s=!!(t&&t.IS_ITERATOR),u=!!(t&&t.INTERRUPTED),p=uv(r,n),c,v,l,b,d,m,y,I=function(g){return c&&Ga(c,"normal",g),new Ze(!0,g)},h=function(g){return i?(cv(g),u?p(g[0],g[1],I):p(g[0],g[1])):u?p(g,I):p(g)};if(a)c=e.iterator;else if(s)c=e;else{if(v=dv(e),!v)throw new Tv(pv(e)+" is not iterable");if(fv(v)){for(l=0,b=vv(e);b>l;l++)if(d=h(e[l]),d&&Ua(Qa,d))return d;return new Ze(!1)}c=bv(e,v)}for(m=a?e.next:c.next;!(y=lv(m,c)).done;){try{d=h(y.value)}catch(g){Ga(c,"throw",g)}if(typeof d=="object"&&d&&Ua(Qa,d))return d}return new Ze(!1)}});var $a=o((Wy,Wa)=>{"use strict";var mv=R(),yv=H(),hv=oe();Wa.exports=function(e,r,t){mv?yv.f(e,r,hv(0,t)):e[r]=t}});var za=o(()=>{"use strict";var gv=ee(),Iv=Ka(),Ov=$a();gv({target:"Object",stat:!0},{fromEntries:function(r){var t={};return Iv(r,function(n,i){Ov(t,n,i)},{AS_ENTRIES:!0}),t}})});var Ha=o((Yy,Ya)=>{"use strict";Ot();za();var xv=ae();Ya.exports=xv.Object.fromEntries});var Ja=o((Hy,Xa)=>{"use strict";Xa.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 es=o(()=>{"use strict";Ot();var Ev=Ja(),wv=x(),Sv=Ye(),Za=B();for(er in Ev)Sv(wv[er],er),Za[er]=Za.Array;var er});var ts=o((Zy,rs)=>{"use strict";var qv=Ha();es();rs.exports=qv});var is=o((eh,ns)=>{"use strict";var Rv=ts();ns.exports=Rv});var ys="1.0.58-dev.ef87de0a.0";var O=class{constructor(){this.subscriptions=[]}unsubscribe(){let r=this.subscriptions;this.subscriptions=[],r.forEach(t=>{typeof t=="function"?t():t.unsubscribe()})}add(r){return this.subscriptions.push(r),this}};var L=e=>{throw new Error(`${e} is value of unexpected type`)},hs=e=>{};var D=()=>{};var f=class{constructor(r){r&&(this._subscribe=r)}subscribe(r,t){let n;t?typeof t=="function"?n={next:t,error:D}:n={next:s=>t.next(s),error:s=>t.error?.(s)}:n={next:D,error:D};let i=typeof r=="function"?{next:s=>{try{let u=r(s);u instanceof Promise&&u.catch(p=>n.next(p))}catch(u){n.next(u)}},error:s=>n.next(s)}:{next:s=>r.next(s),error:s=>r.error?r.error(s):n.next(s)},a;try{a=this._subscribe(i)}catch(s){i.error?.(s)}return new O().add(()=>{switch(i.next=D,i.error=D,typeof a){case"function":a();return;case"object":a.unsubscribe();return;case"undefined":return;default:return L(a)}})}pipe(...r){return r.reduce((t,n)=>n(t),this)}_subscribe(r){}};var M=class extends f{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(t){this.subscribers.forEach(n=>n.next(t))}error(t){this.subscribers.forEach(n=>n.error?.(t))}_subscribe(t){let n=this.keyCounter++;return this.subscribers.set(n,t),new O().add(()=>this.subscribers.delete(n))}};var tr=class{constructor(){this.log$=new M;this.logs=[];this.log=r=>{let t={...r,timestamp:Date.now()};this.logs.push(t),this.log$.next(t)};this.getAllLogs=()=>this.logs}createCustomLog(r){return(...t)=>{let n;try{n=r(...t)}catch{n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(r){return this.createCustomLog(t=>({component:r,...t}))}};import{trace as gs,context as Is}from"@opentelemetry/api";import{TracerAllSpansProcessor as Os,TracerMemorySpanExporter as Rt,initTracerOpenTelemetry as xs}from"@tracer/opentelemetry";var nr=class e{constructor({name:r}){}log(r,t){}error(r,t){}critical(r,t){}createComponentTracer(r){return new e({name:r})}end(){}getFinishedSpans(){}getTraceId(){return this.fakeTraceId}},ir=class e{constructor({name:r,parentContext:t,tracer:n}){this.childTracers=[];let i=!n;if(i){let s=xs({serviceName:"videoplayer-sdk-web",appToken:"L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb",spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),u=new Rt,p=new Rt;this.spanExporter=u,s.addSpanProcessor(new Os({startedSpansExporter:u,endedSpansExporter:p})),this.tracer=s.getTracer("sdk-videoplayer-tracer")}else this.tracer=n;this.span=this.tracer.startSpan(r,{root:i},t),this.context=gs.setSpan(Is.active(),this.span)}log(r,t){this.span.addEvent(r,{...t,type:"log"})}error(r,t){this.span.addEvent(r,{...t,type:"error"})}critical(r,t){this.span.addEvent(r,{...t,type:"critical"})}static createRootTracer(r=!1){return r?new e({name:"Root"}):new nr({name:"Root"})}createComponentTracer(r){let t=new e({name:r,parentContext:this.context,tracer:this.tracer});return this.childTracers.push(t),t}end(){this.childTracers.forEach(r=>r.end()),this.span.end()}getFinishedSpans(){return this.spanExporter?.getJsonData()}getTraceId(){return this.span.spanContext().traceId}};function Es(e,r='Assertion "value is not nullable" failed'){if(e==null)throw new Error(r)}function ws(e,r='Assertion "value is nullable" failed'){if(e!=null)throw new Error(r)}function W(e){return typeof e<"u"&&e!==null}function or(e){return e==null}function Ss(e,r){if(!e?.length)throw new Error(r)}function qs(e,r){if(e?.length)throw new Error(r)}var Rs=(e,r,t)=>new Promise((n,i)=>{r.addEventListener("abort",()=>{u(),c.remove()});let a=()=>{u(),i("error")},s=()=>{u(),n()},u=()=>{p&&clearTimeout(p),c.removeEventListener("load",s),c.removeEventListener("error",a)},p;t&&(p=window.setTimeout(()=>{u(),i("timeout")},t));let c=document.createElement("script");c.addEventListener("load",s),c.addEventListener("error",a),c.src=e,document.head.appendChild(c)});var Ps=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var As=(e,r)=>async(...t)=>{let n=r(...t),i=e.aborted,a;for(;!i&&!e.aborted;)try{let s=await n.next(a);i=s.done??!1,a=s.value}catch(s){await n.throw(s)}return a};var _s=(e,{start:r=0,factor:t=2,max:n=1/0,min:i=r,random:a=0}={})=>{let s=r;return s*=t**e,s*=1+(Math.random()*a*2-a),s=Math.round(s),s=Math.min(s,n),s=Math.max(s,i),s};var Pt={};qt(Pt,{clear:()=>Ms,get:()=>js,has:()=>Cs,isPersistent:()=>Ls,remove:()=>Ns,set:()=>ks});var $,U,ar=`vk-videoplayer-dummy-key-${Math.random()}`,z=()=>{if(U!==void 0)return U;try{localStorage.setItem(ar,"test"),localStorage.removeItem(ar),U=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(ar),U=1}catch(r){if(r instanceof DOMException||r instanceof TypeError)U=2;else throw r}else throw e}return U===2&&($=new Map),U},Ls=()=>z()===0,js=e=>{let r=z();switch(r){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return $?.get(e);default:L(r)}},ks=(e,r)=>{let t=z();switch(t){case 0:try{localStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(e,r)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:$?.set(e,r);return;default:L(t)}},Cs=e=>{let r=z();switch(r){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return $?.has(e)??!1;default:return L(r),!1}},Ns=e=>{let r=z();switch(r){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:$?.delete(e);return;default:L(r)}},Ms=()=>{let e=z();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return $?.clear();default:L(e)}};var Mr=te(Ei(),1),Zl=()=>{let e,r=[];try{e=window.self!==window.top}catch(t){t instanceof DOMException&&t.name==="SecurityError"?e=!0:(e=!1,console.error(t))}try{window.location.ancestorOrigins&&(r=[...window.location.ancestorOrigins])}catch(t){console.error(t)}try{!r.length&&document.referrer&&(r=[new URL(document.referrer).origin])}catch(t){console.error(t)}return{isEmbed:e,origins:r,topOrigin:(0,Mr.default)(r,-1),immediateOrigin:(0,Mr.default)(r,0)}};var Vr=(l=>(l.INVARIANT="Invariant quality",l.Q_144P="144p",l.Q_240P="240p",l.Q_360P="360p",l.Q_480P="480p",l.Q_576P="576p",l.Q_720P="720p",l.Q_1080P="1080p",l.Q_1440P="1440p",l.Q_2160P="2160p",l.Q_4320P="4320p",l))(Vr||{});var S={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"576p":{width:1024,height:576},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},ec=(e,r)=>S[e].height>S[r].height,rc=(e,r)=>S[e].height>=S[r].height,Fr=(e,r)=>S[e].height<S[r].height,tc=(e,r)=>S[e].height<=S[r].height,nc=e=>e.sort((r,t)=>r===t?0:r==="Invariant quality"?1:t==="Invariant quality"?-1:Fr(r,t)?1:-1)[0],wi=Object.keys(S).sort((e,r)=>Fr(e,r)?-1:1),ic=(e,r=.02)=>[...wi].find(n=>S[n].height*(1+r)>=e),oc=({width:e,height:r})=>{let t=Math.min(e,r),n=Math.max(e,r);return wi.find(i=>{let a=S[i];return a.width>=n&&a.height>=t})},ac=e=>S[e].height,Dr=e=>e==="Invariant quality",sc=e=>e.every(r=>!Dr(r));function uc(e){if(Dr(e))throw new Error("Expected exact quality")}var lc=(e,r)=>{let t={};for(let n of Object.keys(r)){let i=r[n],a=e[n];Array.isArray(i)&&Array.isArray(a)?t[n]=a:typeof i=="object"&&typeof a=="object"?t[n]=lc(a,i):t[n]=n in e?a:i}return t};var Ad=e=>{let r="";return e>=3600&&(r+=Math.floor(e/3600)+"h",e=e%3600),e>=60&&(r+=Math.floor(e/60)+"m",e=e%60),e>0&&(r+=Math.floor(e)+"s"),r};function Ur(e,r=0,t){let n,i,a,s,u,p,c=0,v=!1,l=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(v=!!t.leading,l="maxWait"in t,a=t?.maxWait?Math.max(+t?.maxWait||0,r):a,b="trailing"in t?!!t.trailing:b);function m(T){let q=n,F=i;return n=i=void 0,c=T,s=e.apply(F,q),s}function y(T,q){return d?(u&&window.cancelAnimationFrame(u),window.requestAnimationFrame(T)):setTimeout(T,q)}function I(T){if(d){window.cancelAnimationFrame(T);return}clearTimeout(T)}function h(T){return c=T,u=y(me,r),v?m(T):s}function g(T){let q=T-p,F=T-c,St=r-q;return l?Math.min(St,a-F):St}function Et(T){let q=T-p,F=T-c;return p===void 0||q>=r||q<0||l&&F>=a}function me(){let T=Date.now();if(Et(T))return wt(T);u=y(me,g(T))}function wt(T){return u=void 0,b&&n?m(T):(n=i=void 0,s)}function ls(){u!==void 0&&I(u),c=0,n=p=i=u=void 0}function cs(){return u===void 0?s:wt(Date.now())}function ps(){return u!==void 0}function ye(...T){let q=Date.now(),F=Et(q);if(n=T,i=this,p=q,F){if(u===void 0)return h(p);if(l)return u=y(me,r),m(p)}return u===void 0&&(u=y(me,r)),s}return ye.cancel=ls,ye.flush=cs,ye.pending=ps,ye}var Gr=(e,r=0,t)=>Ur(e,r,{...{leading:!0,trailing:!0},...t,maxWait:r});var je=(e,r)=>{if(e===null||typeof e!="object")return e;let t=Array.isArray(e)?[]:{};for(let n in e){if(typeof r=="function"){let i=r(e[n],n,e,t);if(i!==void 0){t[n]=i;continue}}typeof e[n]=="object"?t[n]=je(e[n],r):t[n]=e[n]}return t};var cc=e=>je(e);var pc=300,fc=(e,r=pc)=>new f(t=>{let{width:n,height:i}=e.getBoundingClientRect();if(t.next({width:n,height:i}),!window.ResizeObserver)return;let a=new ResizeObserver(Gr(s=>{let u=s[0];if(!u)return;let p,c;u.contentBoxSize&&u.contentBoxSize[0]?(c=u.contentBoxSize[0].blockSize,p=u.contentBoxSize[0].inlineSize):u.contentRect&&(p=u.contentRect.width,c=u.contentRect.height),W(p)&&W(c)&&t.next({width:p,height:c})},r));return a.observe(e),()=>a.disconnect()});var ke=(e,r=6,t=".")=>{let n={};for(let i in e)if(!(!e.hasOwnProperty(i)||e[i]instanceof HTMLElement||!r))if(typeof e[i]=="object"&&e[i]!==null){let a=ke(e[i],r-1);for(let s in a)a.hasOwnProperty(s)&&(n[i+t+s]=a[s])}else n[i]=e[i];return n};var vc=e=>{e.removeAttribute("src"),e.load()};var Qd=e=>{let r;try{r=new URL(e)}catch{return!1}return r.protocol==="https:"};var Kd=e=>{try{return new URL(e)}catch{return null}};var bc=(e,r)=>{let t=0,n=e.length-1;for(;t<=n;){let i=Math.floor((t+n)/2),a=r(e[i]);if(a===0)return i;a<0?t=i+1:n=i-1}return-1};var dc=e=>r=>t=>{let n=typeof t=="object";t==null||n&&!Object.keys(t).length||e(r,n?ke(t):{value:t})};var Ce=class extends M{constructor(r){super(),this.value=r}next(r){super.next(this.value=r)}error(r){super.error(this.value=r)}getValue(){return this.value}_subscribe(r){let t=super._subscribe(r);return r.next(this.value),t}};var eo=te(zr(),1);function ro(e){return new f(r=>{let t={},n=Object.keys(e).length,i=a=>s=>{a in t||n--,t[a]=s,n===0&&r.next(t)};return(0,eo.default)(e).reduce((a,[s,u])=>a.add(u.subscribe(i(s))),new O)})}function to(...e){return new f(r=>e.reduce((t,n)=>t.add(n.subscribe(r)),new O))}var Yc=e=>new f(r=>{let t=window.setTimeout(()=>{try{r.next()}catch(n){if(r.error)r.error(n);else throw n}},e);return()=>window.clearTimeout(t)});var Hc=e=>new f(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var Xc=e=>new f(r=>{e.forEach(t=>r.next(t))});var Jc=(e,r)=>new f(t=>{let n=i=>t.next(i);return e.addEventListener(r,n),()=>e.removeEventListener(r,n)});var Fe=class extends O{remove(r){this.subscriptions=this.subscriptions.filter(t=>t!==r)}};function no(e){return r=>new f(t=>r.subscribe(new Yr(t,e)))}var Yr=class{constructor(r,t){this.destination=r;this.size=t;this.lastValues=[]}next(r){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(r),this.destination.next(this.lastValues)}error(r){this.destination.error?.(r)}};var Zc={leading:!1,trailing:!0};function io(e,r=Zc){return t=>new f(n=>t.subscribe(new Hr(n,e,r)))}var Hr=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,W(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(t){if(this.destination.error)this.destination.error(t);else throw t}this.timeout=void 0},this.time)}error(r){this.destination.error?.(r)}};var ep={leading:!0,trailing:!1};function oo(e,r=ep){return t=>new f(n=>t.subscribe(new Xr(n,e,r)))}var Xr=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,or(this.timeout)&&(this.config.leading&&this.destination.next(r),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(r){this.destination.error?.(r)}};function ao(e){return r=>new f(t=>r.subscribe(new Jr(t,e)))}var Jr=class{constructor(r,t){this.destination=r;this.predicate=t}next(r){let t;try{t=this.predicate(r)}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};var To=te(vo(),1);var lp=(e,r)=>{let t=(n,i)=>{let a=Object.keys(n);for(let s in i)if(!(0,To.default)(a,s)||i[s]!==n[s])return!1;return!0};return t(e,r)&&t(r,e)},cp=(e,r)=>e instanceof Object&&r instanceof Object?lp(e,r):e===r;function mo(e=cp){return r=>new f(t=>r.subscribe(new Zr(t,e)))}var bo={},Zr=class{constructor(r,t){this.destination=r;this.predicate=t;this.lastValue=bo}next(r){let t;try{t=this.lastValue===bo||!this.predicate(this.lastValue,r),this.lastValue=r instanceof Object?{...r}:r}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};function De(e){return r=>new f(t=>r.subscribe(new et(t,e)))}var et=class{constructor(r,t){this.destination=r;this.mapper=t}next(r){let t;try{t=this.mapper(r)}catch(n){throw this.error(n),n}this.destination.next(t)}error(r){this.destination.error?.(r)}};function yo(e){return De(()=>e)}function ho(){return e=>new f(r=>{let t=!1,n=!1,i=e.subscribe(a=>{t||(t=!0,r.next(a)),n&&i.unsubscribe()},a=>{t=!0,r.error?.(a),n&&i.unsubscribe()});return n=!0,t&&i.unsubscribe(),i})}function go(){return e=>new f(r=>e.subscribe(new rt(r)))}var rt=class{constructor(r){this.destination=r;this.hasLast=!1}next(r){let t=this.last;if(this.last=r,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,r])}error(r){this.destination.error?.(r)}};function Io(e){return r=>new f(t=>r.subscribe(new tt(t,e)))}var tt=class{constructor(r,t){this.destination=r;this.effect=t}next(r){try{this.effect(r)}catch(t){throw this.error(t),t}this.destination.next(r)}error(r){this.destination.error?.(r)}};function Oo(e){return r=>new f(t=>r.subscribe(new nt(t,e)))}var nt=class{constructor(r,t){this.destination=r;this.count=t;t<0&&this.destination.error?.(new Error("Count can not be less than zero"))}next(r){this.count===0?this.destination.next(r):this.count--}error(r){this.destination.error?.(r)}};var pp=(u=>(u.NETWORK="network",u.VIDEO_PIPELINE="video_pipeline",u.EXTERNAL_API="external_api",u.PARSER="parser",u.DOM="dom",u.WTF="wtf",u.FATAL="fatal",u))(pp||{});var Ue=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(r,t,n){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:t,options:n})}removeEventListener(r,t){if(!(r in this.listeners))return;let n=this.listeners[r];for(let i=0,a=n.length;i<a;i++)if(n[i].callback===t){n.splice(i,1);return}}dispatchEvent(r){if(!(r.type in this.listeners))return;let n=this.listeners[r.type].slice();for(let i=0,a=n.length;i<a;i++){let s=n[i];try{s.callback.call(this,r)}catch(u){Promise.resolve().then(()=>{throw u})}s.options&&s.options.once&&this.removeEventListener(r.type,s.callback)}return!r.defaultPrevented}},re=class extends Ue{constructor(){super(),this.listeners||Ue.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(r){r.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,r)),super.dispatchEvent(r)}},pe=class{constructor(){Object.defineProperty(this,"signal",{value:new re,writable:!0,configurable:!0})}abort(r){let t;try{t=new Event("abort")}catch{typeof document<"u"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}let n=r;if(n===void 0)if(typeof document>"u")n=new Error("This operation was aborted"),n.name="AbortError";else try{n=new DOMException("signal is aborted without reason")}catch{n=new Error("This operation was aborted"),n.name="AbortError"}this.signal.reason=n,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol<"u"&&Symbol.toStringTag&&(pe.prototype[Symbol.toStringTag]="AbortController",re.prototype[Symbol.toStringTag]="AbortSignal");function Ge(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function it(e){typeof e=="function"&&(e={fetch:e});let{fetch:r,Request:t=r.Request,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!Ge({fetch:r,Request:t,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:r,Request:a};let a=t;(a&&!a.prototype.hasOwnProperty("signal")||i)&&(a=function(c,v){let l;v&&v.signal&&(l=v.signal,delete v.signal);let b=new t(c,v);return l&&Object.defineProperty(b,"signal",{writable:!1,enumerable:!1,configurable:!0,value:l}),b},a.prototype=t.prototype);let s=r;return{fetch:(p,c)=>{let v=a&&a.prototype.isPrototypeOf(p)?p.signal:c?c.signal:void 0;if(v){let l;try{l=new DOMException("Aborted","AbortError")}catch{l=new Error("Aborted"),l.name="AbortError"}if(v.aborted)return Promise.reject(l);let b=new Promise((d,m)=>{v.addEventListener("abort",()=>m(l),{once:!0})});return c&&c.signal&&delete c.signal,Promise.race([b,s(p,c)])}return s(p,c)},Request:a}}var fe=Ge({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),xo=fe?it({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,Eo=fe?xo.fetch:window.fetch,Ty=fe?xo.Request:window.Request,my=fe?pe:window.AbortController,yy=fe?re:window.AbortSignal;var os=te(zr(),1),as=te(is(),1),Pv=(l=>(l.Armenian="58",l.Azerbaijani="57",l.Belarusian="114",l.English="3",l.Kazakh="97",l.Portuguese="73",l.Russian="0",l.Spanish="4",l.Ukrainian="1",l.Uzbek="65",l.Vietnamese="75",l))(Pv||{}),Av="vk.com",th=async(e,r,t)=>{let n=new URL(`https://${Av}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",r),e!==void 0&&n.searchParams.set("lang",e);let a=await(await Eo(n.toString())).json();return _v(a,t)},_v=(e,r)=>(0,as.default)((0,os.default)(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),Lv(n)])),Lv=e=>Array.isArray(e)?e[0]:e;var jv=(t=>(t.RU="ru",t.EN="en",t))(jv||{});var kv={UI:"__vkVideoPlayer",CORE:"__vkVideoCore"},Cv=(()=>{let e=0;return()=>{let r=e;return e=(e+1)%Number.MAX_SAFE_INTEGER,r}})(),ss=class{constructor(r){this.id=Cv();this.type=r,this.initWindowObjects()}getWindowObject(){let r=this.key();return window[r]?.[this.id]??{}}initWindowObjects(){let r=this.key();window[r]||(window[r]={}),window[r][this.id]={}}expose(r){Object.assign(this.getWindowObject(),r)}destroy(){let r=this.key();window&&window[r]&&window[r][this.id]&&(delete window[r][this.id],Object.keys(window[r]).length||delete window[r])}key(){let{type:r}=this;return kv[r]}};var us={};qt(us,{create:()=>Nv,destroy:()=>Mv,push:()=>Vv,subscribe:()=>Fv});var Te=new Map,Nv=(e,r)=>Te.set(e,r??[]),Mv=e=>Te.delete(e),Vv=(e,r)=>{let t=Te.get(e);t&&(typeof t=="function"?t(r):t.push(r))},Fv=(e,r)=>{let t=Te.get(e);if(t){if(t&&Array.isArray(t))for(let n of t)r(n);Te.set(e,r)}};export{pp as ErrorCategory,jv as InterfaceLanguage,ss as InternalsExposure,tr as Logger,f as Observable,M as Subject,O as Subscription,Fe as SubscriptionRemovable,ir as Tracer,ys as VERSION,Pv as VKNumericLanguage,Ce as ValueSubject,Vr as VideoQuality,As as abortable,Rs as addScript,sc as areQualitiesExact,qs as assertEmptyArray,L as assertNever,Es as assertNonNullable,Ss as assertNotEmptyArray,ws as assertNullable,uc as assertQualityIsExact,bc as binarySearch,no as buffer,hs as checkNever,vc as clearVideoElement,cc as cloneDeep,je as cloneDeepWith,ro as combine,Kd as createURL,io as debounce,Ur as debounceFn,Zl as detectEmbed,us as devNull,lc as fillWithDefault,ao as filter,mo as filterChanged,ke as flattenObject,Jc as fromEvent,_s as getExponentialDelay,nc as getHighestQuality,dc as getTraceSubscriptionMethod,Hc as interval,ec as isHigher,rc as isHigherOrEqual,Dr as isInvariantQuality,Fr as isLower,tc as isLowerOrEqual,W as isNonNullable,or as isNullable,Qd as isValidURL,th as loadVKLangPack,De as map,yo as mapTo,to as merge,D as noop,Ps as now,Xc as observableFrom,fc as observeElementSize,ho as once,go as pairwise,Pt as safeStorage,Oo as skip,Io as tap,oo as throttle,Gr as throttleFn,Ad as timeCodeToString,Yc as timeout,ic as videoHeightToQuality,ac as videoQualityToHeight,oc as videoSizeToQuality};
package/evergreen.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-shared v1.0.58-dev.ce524d87.0
3
- * Thu, 10 Apr 2025 12:04:34 GMT
2
+ * @vkontakte/videoplayer-shared v1.0.58-dev.ef87de0a.0
3
+ * Thu, 10 Apr 2025 14:06:51 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-58/doc/
5
5
  */
6
- var Ae=Object.defineProperty;var oe=(t,e)=>{for(var r in e)Ae(t,r,{get:e[r],enumerable:!0})};var Le="1.0.58-dev.ce524d87.0";var d=class{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(r=>{typeof r=="function"?r():r.unsubscribe()})}add(e){return this.subscriptions.push(e),this}};var T=t=>{throw new Error(`${t} is value of unexpected type`)},Pe=t=>{};var I=()=>{};var l=class{constructor(e){e&&(this._subscribe=e)}subscribe(e,r){let n;r?typeof r=="function"?n={next:r,error:I}:n={next:i=>r.next(i),error:i=>r.error?.(i)}:n={next:I,error:I};let o=typeof e=="function"?{next:i=>{try{let a=e(i);a instanceof Promise&&a.catch(p=>n.next(p))}catch(a){n.next(a)}},error:i=>n.next(i)}:{next:i=>e.next(i),error:i=>e.error?e.error(i):n.next(i)},s;try{s=this._subscribe(o)}catch(i){o.error?.(i)}return new d().add(()=>{switch(o.next=I,o.error=I,typeof s){case"function":s();return;case"object":s.unsubscribe();return;case"undefined":return;default:return T(s)}})}pipe(...e){return e.reduce((r,n)=>n(r),this)}_subscribe(e){}};var v=class extends l{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(r){this.subscribers.forEach(n=>n.next(r))}error(r){this.subscribers.forEach(n=>n.error?.(r))}_subscribe(r){let n=this.keyCounter++;return this.subscribers.set(n,r),new d().add(()=>this.subscribers.delete(n))}};var V=class{constructor(){this.log$=new v;this.logs=[];this.log=e=>{let r={...e,timestamp:Date.now()};this.logs.push(r),this.log$.next(r)};this.getAllLogs=()=>this.logs}createCustomLog(e){return(...r)=>{let n;try{n=e(...r)}catch{n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(e){return this.createCustomLog(r=>({component:e,...r}))}};import{trace as Ne,context as Ce}from"@opentelemetry/api";import{TracerAllSpansProcessor as Ve,TracerMemorySpanExporter as ie,initTracerOpenTelemetry as _e}from"@tracer/opentelemetry";var _=class t{constructor({name:e}){}log(e,r){}error(e,r){}critical(e,r){}createComponentTracer(e){return new t({name:e})}end(){}getFinishedSpans(){}getTraceId(){return this.fakeTraceId}},M=class t{constructor({name:e,parentContext:r,tracer:n}){this.childTracers=[];let o=!n;if(o){let i=_e({serviceName:"videoplayer-sdk-web",appToken:"L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb",spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),a=new ie,p=new ie;this.spanExporter=a,i.addSpanProcessor(new Ve({startedSpansExporter:a,endedSpansExporter:p})),this.tracer=i.getTracer("sdk-videoplayer-tracer")}else this.tracer=n;this.span=this.tracer.startSpan(e,{root:o},r),this.context=Ne.setSpan(Ce.active(),this.span)}log(e,r){this.span.addEvent(e,{...r,type:"log"})}error(e,r){this.span.addEvent(e,{...r,type:"error"})}critical(e,r){this.span.addEvent(e,{...r,type:"critical"})}static createRootTracer(e=!1){return e?new t({name:"Root"}):new _({name:"Root"})}createComponentTracer(e){let r=new t({name:e,parentContext:this.context,tracer:this.tracer});return this.childTracers.push(r),r}end(){this.childTracers.forEach(e=>e.end()),this.span.end()}getFinishedSpans(){return this.spanExporter?.getJsonData()}getTraceId(){return this.span.spanContext().traceId}};function Me(t,e='Assertion "value is not nullable" failed'){if(t==null)throw new Error(e)}function Qe(t,e='Assertion "value is nullable" failed'){if(t!=null)throw new Error(e)}function h(t){return typeof t<"u"&&t!==null}function Q(t){return t==null}function Ue(t,e){if(!t?.length)throw new Error(e)}function De(t,e){if(t?.length)throw new Error(e)}var je=(t,e,r)=>new Promise((n,o)=>{e.addEventListener("abort",()=>{a(),b.remove()});let s=()=>{a(),o("error")},i=()=>{a(),n()},a=()=>{p&&clearTimeout(p),b.removeEventListener("load",i),b.removeEventListener("error",s)},p;r&&(p=window.setTimeout(()=>{a(),o("timeout")},r));let b=document.createElement("script");b.addEventListener("load",i),b.addEventListener("error",s),b.src=t,document.head.appendChild(b)});var We=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var ze=(t,e)=>async(...r)=>{let n=e(...r),o=t.aborted,s;for(;!o&&!t.aborted;)try{let i=await n.next(s);o=i.done??!1,s=i.value}catch(i){await n.throw(i)}return s};var Ge=(t,{start:e=0,factor:r=2,max:n=1/0,min:o=e,random:s=0}={})=>{let i=e;return i*=r**t,i*=1+(Math.random()*s*2-s),i=Math.round(i),i=Math.min(i,n),i=Math.max(i,o),i};var se={};oe(se,{clear:()=>$e,get:()=>Ke,has:()=>He,isPersistent:()=>Fe,remove:()=>Be,set:()=>qe});var y,x,U=`vk-videoplayer-dummy-key-${Math.random()}`,O=()=>{if(x!==void 0)return x;try{localStorage.setItem(U,"test"),localStorage.removeItem(U),x=0}catch(t){if(t instanceof DOMException||t instanceof TypeError)try{sessionStorage.getItem(U),x=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)x=2;else throw e}else throw t}return x===2&&(y=new Map),x},Fe=()=>O()===0,Ke=t=>{let e=O();switch(e){case 0:return localStorage.getItem(t)??void 0;case 1:return sessionStorage.getItem(t)??void 0;case 2:return y?.get(t);default:T(e)}},qe=(t,e)=>{let r=O();switch(r){case 0:try{localStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:y?.set(t,e);return;default:T(r)}},He=t=>{let e=O();switch(e){case 0:return t in localStorage;case 1:return t in sessionStorage;case 2:return y?.has(t)??!1;default:return T(e),!1}},Be=t=>{let e=O();switch(e){case 0:return localStorage.removeItem(t);case 1:return sessionStorage.removeItem(t);case 2:y?.delete(t);return;default:T(e)}},$e=()=>{let t=O();switch(t){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return y?.clear();default:T(t)}};var Ye=()=>{let t,e=[];try{t=window.self!==window.top}catch(r){r instanceof DOMException&&r.name==="SecurityError"?t=!0:(t=!1,console.error(r))}try{window.location.ancestorOrigins&&(e=[...window.location.ancestorOrigins])}catch(r){console.error(r)}try{!e.length&&document.referrer&&(e=[new URL(document.referrer).origin])}catch(r){console.error(r)}return{isEmbed:t,origins:e,topOrigin:e.at(-1),immediateOrigin:e.at(0)}};var D=(c=>(c.INVARIANT="Invariant quality",c.Q_144P="144p",c.Q_240P="240p",c.Q_360P="360p",c.Q_480P="480p",c.Q_576P="576p",c.Q_720P="720p",c.Q_1080P="1080p",c.Q_1440P="1440p",c.Q_2160P="2160p",c.Q_4320P="4320p",c))(D||{});var f={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"576p":{width:1024,height:576},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},Xe=(t,e)=>f[t].height>f[e].height,Je=(t,e)=>f[t].height>=f[e].height,j=(t,e)=>f[t].height<f[e].height,Ze=(t,e)=>f[t].height<=f[e].height,et=t=>t.sort((e,r)=>e===r?0:e==="Invariant quality"?1:r==="Invariant quality"?-1:j(e,r)?1:-1)[0],ae=Object.keys(f).sort((t,e)=>j(t,e)?-1:1),tt=(t,e=.02)=>[...ae].find(n=>f[n].height*(1+e)>=t),rt=({width:t,height:e})=>{let r=Math.min(t,e),n=Math.max(t,e);return ae.find(o=>{let s=f[o];return s.width>=n&&s.height>=r})},nt=t=>f[t].height,W=t=>t==="Invariant quality",ot=t=>t.every(e=>!W(e));function it(t){if(W(t))throw new Error("Expected exact quality")}var st=(t,e)=>{let r={};for(let n of Object.keys(e)){let o=e[n],s=t[n];Array.isArray(o)&&Array.isArray(s)?r[n]=s:typeof o=="object"&&typeof s=="object"?r[n]=st(s,o):r[n]=n in t?s:o}return r};var vr=t=>{let e="";return t>=3600&&(e+=Math.floor(t/3600)+"h",t=t%3600),t>=60&&(e+=Math.floor(t/60)+"m",t=t%60),t>0&&(e+=Math.floor(t)+"s"),e};function z(t,e=0,r){let n,o,s,i,a,p,b=0,Z=!1,c=!1,N=!0,ee=!e&&e!==0&&typeof window.requestAnimationFrame=="function";r&&(Z=!!r.leading,c="maxWait"in r,s=r?.maxWait?Math.max(+r?.maxWait||0,e):s,N="trailing"in r?!!r.trailing:N);function C(u){let m=n,g=o;return n=o=void 0,b=u,i=t.apply(g,m),i}function w(u,m){return ee?(a&&window.cancelAnimationFrame(a),window.requestAnimationFrame(u)):setTimeout(u,m)}function Oe(u){if(ee){window.cancelAnimationFrame(u);return}clearTimeout(u)}function Ee(u){return b=u,a=w(S,e),Z?C(u):i}function we(u){let m=u-p,g=u-b,ne=e-m;return c?Math.min(ne,s-g):ne}function te(u){let m=u-p,g=u-b;return p===void 0||m>=e||m<0||c&&g>=s}function S(){let u=Date.now();if(te(u))return re(u);a=w(S,we(u))}function re(u){return a=void 0,N&&n?C(u):(n=o=void 0,i)}function Se(){a!==void 0&&Oe(a),b=0,n=p=o=a=void 0}function Re(){return a===void 0?i:re(Date.now())}function ke(){return a!==void 0}function R(...u){let m=Date.now(),g=te(m);if(n=u,o=this,p=m,g){if(a===void 0)return Ee(p);if(c)return a=w(S,e),C(p)}return a===void 0&&(a=w(S,e)),i}return R.cancel=Se,R.flush=Re,R.pending=ke,R}var G=(t,e=0,r)=>z(t,e,{...{leading:!0,trailing:!0},...r,maxWait:e});var k=(t,e)=>{if(t===null||typeof t!="object")return t;let r=Array.isArray(t)?[]:{};for(let n in t){if(typeof e=="function"){let o=e(t[n],n,t,r);if(o!==void 0){r[n]=o;continue}}typeof t[n]=="object"?r[n]=k(t[n],e):r[n]=t[n]}return r};var at=t=>k(t);var lt=300,ct=(t,e=lt)=>new l(r=>{let{width:n,height:o}=t.getBoundingClientRect();if(r.next({width:n,height:o}),!window.ResizeObserver)return;let s=new ResizeObserver(G(i=>{let a=i[0];if(!a)return;let p,b;a.contentBoxSize&&a.contentBoxSize[0]?(b=a.contentBoxSize[0].blockSize,p=a.contentBoxSize[0].inlineSize):a.contentRect&&(p=a.contentRect.width,b=a.contentRect.height),h(p)&&h(b)&&r.next({width:p,height:b})},e));return s.observe(t),()=>s.disconnect()});var A=(t,e=6,r=".")=>{let n={};for(let o in t)if(!(!t.hasOwnProperty(o)||t[o]instanceof HTMLElement||!e))if(typeof t[o]=="object"&&t[o]!==null){let s=A(t[o],e-1);for(let i in s)s.hasOwnProperty(i)&&(n[o+r+i]=s[i])}else n[o]=t[o];return n};var ut=t=>{t.removeAttribute("src"),t.load()};var Lr=t=>{let e;try{e=new URL(t)}catch{return!1}return e.protocol==="https:"};var Nr=t=>{try{return new URL(t)}catch{return null}};var pt=t=>e=>r=>{let n=typeof r=="object";r==null||n&&!Object.keys(r).length||t(e,n?A(r):{value:r})};var L=class extends v{constructor(e){super(),this.value=e}next(e){super.next(this.value=e)}error(e){super.error(this.value=e)}getValue(){return this.value}_subscribe(e){let r=super._subscribe(e);return e.next(this.value),r}};function le(t){return new l(e=>{let r={},n=Object.keys(t).length,o=s=>i=>{s in r||n--,r[s]=i,n===0&&e.next(r)};return Object.entries(t).reduce((s,[i,a])=>s.add(a.subscribe(o(i))),new d)})}function ce(...t){return new l(e=>t.reduce((r,n)=>r.add(n.subscribe(e)),new d))}var bt=t=>new l(e=>{let r=window.setTimeout(()=>{try{e.next()}catch(n){if(e.error)e.error(n);else throw n}},t);return()=>window.clearTimeout(r)});var dt=t=>new l(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var ft=t=>new l(e=>{t.forEach(r=>e.next(r))});var mt=(t,e)=>new l(r=>{let n=o=>r.next(o);return t.addEventListener(e,n),()=>t.removeEventListener(e,n)});function ue(t){return e=>new l(r=>e.subscribe(new F(r,t)))}var F=class{constructor(e,r){this.destination=e;this.size=r;this.lastValues=[]}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){this.destination.error?.(e)}};var Tt={leading:!1,trailing:!0};function pe(t,e=Tt){return r=>new l(n=>r.subscribe(new K(n,t,e)))}var K=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,h(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(r){if(this.destination.error)this.destination.error(r);else throw r}this.timeout=void 0},this.time)}error(e){this.destination.error?.(e)}};var vt={leading:!0,trailing:!1};function be(t,e=vt){return r=>new l(n=>r.subscribe(new q(n,t,e)))}var q=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,Q(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){this.destination.error?.(e)}};function de(t){return e=>new l(r=>e.subscribe(new H(r,t)))}var H=class{constructor(e,r){this.destination=e;this.predicate=r}next(e){let r;try{r=this.predicate(e)}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};var gt=(t,e)=>{let r=(n,o)=>{let s=Object.keys(n);for(let i in o)if(!s.includes(i)||o[i]!==n[i])return!1;return!0};return r(t,e)&&r(e,t)},It=(t,e)=>t instanceof Object&&e instanceof Object?gt(t,e):t===e;function me(t=It){return e=>new l(r=>e.subscribe(new B(r,t)))}var fe={},B=class{constructor(e,r){this.destination=e;this.predicate=r;this.lastValue=fe}next(e){let r;try{r=this.lastValue===fe||!this.predicate(this.lastValue,e),this.lastValue=e instanceof Object?{...e}:e}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};function P(t){return e=>new l(r=>e.subscribe(new $(r,t)))}var $=class{constructor(e,r){this.destination=e;this.mapper=r}next(e){let r;try{r=this.mapper(e)}catch(n){throw this.error(n),n}this.destination.next(r)}error(e){this.destination.error?.(e)}};function Te(t){return P(()=>t)}function ve(){return t=>new l(e=>{let r=!1,n=!1,o=t.subscribe(s=>{r||(r=!0,e.next(s)),n&&o.unsubscribe()},s=>{r=!0,e.error?.(s),n&&o.unsubscribe()});return n=!0,r&&o.unsubscribe(),o})}function ge(){return t=>new l(e=>t.subscribe(new Y(e)))}var Y=class{constructor(e){this.destination=e;this.hasLast=!1}next(e){let r=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([r,e])}error(e){this.destination.error?.(e)}};function Ie(t){return e=>new l(r=>e.subscribe(new X(r,t)))}var X=class{constructor(e,r){this.destination=e;this.effect=r}next(e){try{this.effect(e)}catch(r){throw this.error(r),r}this.destination.next(e)}error(e){this.destination.error?.(e)}};function xe(t){return e=>new l(r=>e.subscribe(new J(r,t)))}var J=class{constructor(e,r){this.destination=e;this.count=r;r<0&&this.destination.error?.(new Error("Count can not be less than zero"))}next(e){this.count===0?this.destination.next(e):this.count--}error(e){this.destination.error?.(e)}};var xt=(a=>(a.NETWORK="network",a.VIDEO_PIPELINE="video_pipeline",a.EXTERNAL_API="external_api",a.PARSER="parser",a.DOM="dom",a.WTF="wtf",a.FATAL="fatal",a))(xt||{});var ht=(c=>(c.Armenian="58",c.Azerbaijani="57",c.Belarusian="114",c.English="3",c.Kazakh="97",c.Portuguese="73",c.Russian="0",c.Spanish="4",c.Ukrainian="1",c.Uzbek="65",c.Vietnamese="75",c))(ht||{}),yt="vk.com",Ro=async(t,e,r)=>{let n=new URL(`https://${yt}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",e),t!==void 0&&n.searchParams.set("lang",t);let s=await(await fetch(n.toString())).json();return Ot(s,r)},Ot=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),Et(n)])),Et=t=>Array.isArray(t)?t[0]:t;var wt=(r=>(r.RU="ru",r.EN="en",r))(wt||{});var St={UI:"__vkVideoPlayer",CORE:"__vkVideoCore"},Rt=(()=>{let t=0;return()=>{let e=t;return t=(t+1)%Number.MAX_SAFE_INTEGER,e}})(),he=class{constructor(e){this.id=Rt();this.type=e,this.initWindowObjects()}getWindowObject(){let e=this.key();return window[e]?.[this.id]??{}}initWindowObjects(){let e=this.key();window[e]||(window[e]={}),window[e][this.id]={}}expose(e){Object.assign(this.getWindowObject(),e)}destroy(){let e=this.key();window&&window[e]&&window[e][this.id]&&(delete window[e][this.id],Object.keys(window[e]).length||delete window[e])}key(){let{type:e}=this;return St[e]}};var ye={};oe(ye,{create:()=>kt,destroy:()=>At,push:()=>Lt,subscribe:()=>Pt});var E=new Map,kt=(t,e)=>E.set(t,e??[]),At=t=>E.delete(t),Lt=(t,e)=>{let r=E.get(t);r&&(typeof r=="function"?r(e):r.push(e))},Pt=(t,e)=>{let r=E.get(t);if(r){if(r&&Array.isArray(r))for(let n of r)e(n);E.set(t,e)}};export{xt as ErrorCategory,wt as InterfaceLanguage,he as InternalsExposure,V as Logger,l as Observable,v as Subject,d as Subscription,M as Tracer,Le as VERSION,ht as VKNumericLanguage,L as ValueSubject,D as VideoQuality,ze as abortable,je as addScript,ot as areQualitiesExact,De as assertEmptyArray,T as assertNever,Me as assertNonNullable,Ue as assertNotEmptyArray,Qe as assertNullable,it as assertQualityIsExact,ue as buffer,Pe as checkNever,ut as clearVideoElement,at as cloneDeep,k as cloneDeepWith,le as combine,Nr as createURL,pe as debounce,z as debounceFn,Ye as detectEmbed,ye as devNull,st as fillWithDefault,de as filter,me as filterChanged,A as flattenObject,mt as fromEvent,Ge as getExponentialDelay,et as getHighestQuality,pt as getTraceSubscriptionMethod,dt as interval,Xe as isHigher,Je as isHigherOrEqual,W as isInvariantQuality,j as isLower,Ze as isLowerOrEqual,h as isNonNullable,Q as isNullable,Lr as isValidURL,Ro as loadVKLangPack,P as map,Te as mapTo,ce as merge,I as noop,We as now,ft as observableFrom,ct as observeElementSize,ve as once,ge as pairwise,se as safeStorage,xe as skip,Ie as tap,be as throttle,G as throttleFn,vr as timeCodeToString,bt as timeout,tt as videoHeightToQuality,nt as videoQualityToHeight,rt as videoSizeToQuality};
6
+ var Le=Object.defineProperty;var ie=(t,e)=>{for(var r in e)Le(t,r,{get:e[r],enumerable:!0})};var Pe="1.0.58-dev.ef87de0a.0";var d=class{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(r=>{typeof r=="function"?r():r.unsubscribe()})}add(e){return this.subscriptions.push(e),this}};var T=t=>{throw new Error(`${t} is value of unexpected type`)},Ne=t=>{};var g=()=>{};var l=class{constructor(e){e&&(this._subscribe=e)}subscribe(e,r){let n;r?typeof r=="function"?n={next:r,error:g}:n={next:i=>r.next(i),error:i=>r.error?.(i)}:n={next:g,error:g};let o=typeof e=="function"?{next:i=>{try{let a=e(i);a instanceof Promise&&a.catch(p=>n.next(p))}catch(a){n.next(a)}},error:i=>n.next(i)}:{next:i=>e.next(i),error:i=>e.error?e.error(i):n.next(i)},s;try{s=this._subscribe(o)}catch(i){o.error?.(i)}return new d().add(()=>{switch(o.next=g,o.error=g,typeof s){case"function":s();return;case"object":s.unsubscribe();return;case"undefined":return;default:return T(s)}})}pipe(...e){return e.reduce((r,n)=>n(r),this)}_subscribe(e){}};var v=class extends l{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(r){this.subscribers.forEach(n=>n.next(r))}error(r){this.subscribers.forEach(n=>n.error?.(r))}_subscribe(r){let n=this.keyCounter++;return this.subscribers.set(n,r),new d().add(()=>this.subscribers.delete(n))}};var M=class{constructor(){this.log$=new v;this.logs=[];this.log=e=>{let r={...e,timestamp:Date.now()};this.logs.push(r),this.log$.next(r)};this.getAllLogs=()=>this.logs}createCustomLog(e){return(...r)=>{let n;try{n=e(...r)}catch{n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(e){return this.createCustomLog(r=>({component:e,...r}))}};import{trace as Ce,context as Ve}from"@opentelemetry/api";import{TracerAllSpansProcessor as Me,TracerMemorySpanExporter as se,initTracerOpenTelemetry as _e}from"@tracer/opentelemetry";var _=class t{constructor({name:e}){}log(e,r){}error(e,r){}critical(e,r){}createComponentTracer(e){return new t({name:e})}end(){}getFinishedSpans(){}getTraceId(){return this.fakeTraceId}},Q=class t{constructor({name:e,parentContext:r,tracer:n}){this.childTracers=[];let o=!n;if(o){let i=_e({serviceName:"videoplayer-sdk-web",appToken:"L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb",spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),a=new se,p=new se;this.spanExporter=a,i.addSpanProcessor(new Me({startedSpansExporter:a,endedSpansExporter:p})),this.tracer=i.getTracer("sdk-videoplayer-tracer")}else this.tracer=n;this.span=this.tracer.startSpan(e,{root:o},r),this.context=Ce.setSpan(Ve.active(),this.span)}log(e,r){this.span.addEvent(e,{...r,type:"log"})}error(e,r){this.span.addEvent(e,{...r,type:"error"})}critical(e,r){this.span.addEvent(e,{...r,type:"critical"})}static createRootTracer(e=!1){return e?new t({name:"Root"}):new _({name:"Root"})}createComponentTracer(e){let r=new t({name:e,parentContext:this.context,tracer:this.tracer});return this.childTracers.push(r),r}end(){this.childTracers.forEach(e=>e.end()),this.span.end()}getFinishedSpans(){return this.spanExporter?.getJsonData()}getTraceId(){return this.span.spanContext().traceId}};function Qe(t,e='Assertion "value is not nullable" failed'){if(t==null)throw new Error(e)}function Ue(t,e='Assertion "value is nullable" failed'){if(t!=null)throw new Error(e)}function x(t){return typeof t<"u"&&t!==null}function U(t){return t==null}function De(t,e){if(!t?.length)throw new Error(e)}function je(t,e){if(t?.length)throw new Error(e)}var We=(t,e,r)=>new Promise((n,o)=>{e.addEventListener("abort",()=>{a(),b.remove()});let s=()=>{a(),o("error")},i=()=>{a(),n()},a=()=>{p&&clearTimeout(p),b.removeEventListener("load",i),b.removeEventListener("error",s)},p;r&&(p=window.setTimeout(()=>{a(),o("timeout")},r));let b=document.createElement("script");b.addEventListener("load",i),b.addEventListener("error",s),b.src=t,document.head.appendChild(b)});var ze=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var Ge=(t,e)=>async(...r)=>{let n=e(...r),o=t.aborted,s;for(;!o&&!t.aborted;)try{let i=await n.next(s);o=i.done??!1,s=i.value}catch(i){await n.throw(i)}return s};var Fe=(t,{start:e=0,factor:r=2,max:n=1/0,min:o=e,random:s=0}={})=>{let i=e;return i*=r**t,i*=1+(Math.random()*s*2-s),i=Math.round(i),i=Math.min(i,n),i=Math.max(i,o),i};var ae={};ie(ae,{clear:()=>Ye,get:()=>qe,has:()=>Be,isPersistent:()=>Ke,remove:()=>$e,set:()=>He});var y,h,D=`vk-videoplayer-dummy-key-${Math.random()}`,O=()=>{if(h!==void 0)return h;try{localStorage.setItem(D,"test"),localStorage.removeItem(D),h=0}catch(t){if(t instanceof DOMException||t instanceof TypeError)try{sessionStorage.getItem(D),h=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)h=2;else throw e}else throw t}return h===2&&(y=new Map),h},Ke=()=>O()===0,qe=t=>{let e=O();switch(e){case 0:return localStorage.getItem(t)??void 0;case 1:return sessionStorage.getItem(t)??void 0;case 2:return y?.get(t);default:T(e)}},He=(t,e)=>{let r=O();switch(r){case 0:try{localStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 1:try{sessionStorage.setItem(t,e)}catch(n){if(n instanceof DOMException)console.error(n);else throw n}break;case 2:y?.set(t,e);return;default:T(r)}},Be=t=>{let e=O();switch(e){case 0:return t in localStorage;case 1:return t in sessionStorage;case 2:return y?.has(t)??!1;default:return T(e),!1}},$e=t=>{let e=O();switch(e){case 0:return localStorage.removeItem(t);case 1:return sessionStorage.removeItem(t);case 2:y?.delete(t);return;default:T(e)}},Ye=()=>{let t=O();switch(t){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return y?.clear();default:T(t)}};var Xe=()=>{let t,e=[];try{t=window.self!==window.top}catch(r){r instanceof DOMException&&r.name==="SecurityError"?t=!0:(t=!1,console.error(r))}try{window.location.ancestorOrigins&&(e=[...window.location.ancestorOrigins])}catch(r){console.error(r)}try{!e.length&&document.referrer&&(e=[new URL(document.referrer).origin])}catch(r){console.error(r)}return{isEmbed:t,origins:e,topOrigin:e.at(-1),immediateOrigin:e.at(0)}};var j=(c=>(c.INVARIANT="Invariant quality",c.Q_144P="144p",c.Q_240P="240p",c.Q_360P="360p",c.Q_480P="480p",c.Q_576P="576p",c.Q_720P="720p",c.Q_1080P="1080p",c.Q_1440P="1440p",c.Q_2160P="2160p",c.Q_4320P="4320p",c))(j||{});var f={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"576p":{width:1024,height:576},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},Je=(t,e)=>f[t].height>f[e].height,Ze=(t,e)=>f[t].height>=f[e].height,W=(t,e)=>f[t].height<f[e].height,et=(t,e)=>f[t].height<=f[e].height,tt=t=>t.sort((e,r)=>e===r?0:e==="Invariant quality"?1:r==="Invariant quality"?-1:W(e,r)?1:-1)[0],le=Object.keys(f).sort((t,e)=>W(t,e)?-1:1),rt=(t,e=.02)=>[...le].find(n=>f[n].height*(1+e)>=t),nt=({width:t,height:e})=>{let r=Math.min(t,e),n=Math.max(t,e);return le.find(o=>{let s=f[o];return s.width>=n&&s.height>=r})},ot=t=>f[t].height,z=t=>t==="Invariant quality",it=t=>t.every(e=>!z(e));function st(t){if(z(t))throw new Error("Expected exact quality")}var at=(t,e)=>{let r={};for(let n of Object.keys(e)){let o=e[n],s=t[n];Array.isArray(o)&&Array.isArray(s)?r[n]=s:typeof o=="object"&&typeof s=="object"?r[n]=at(s,o):r[n]=n in t?s:o}return r};var gr=t=>{let e="";return t>=3600&&(e+=Math.floor(t/3600)+"h",t=t%3600),t>=60&&(e+=Math.floor(t/60)+"m",t=t%60),t>0&&(e+=Math.floor(t)+"s"),e};function G(t,e=0,r){let n,o,s,i,a,p,b=0,ee=!1,c=!1,C=!0,te=!e&&e!==0&&typeof window.requestAnimationFrame=="function";r&&(ee=!!r.leading,c="maxWait"in r,s=r?.maxWait?Math.max(+r?.maxWait||0,e):s,C="trailing"in r?!!r.trailing:C);function V(u){let m=n,I=o;return n=o=void 0,b=u,i=t.apply(I,m),i}function w(u,m){return te?(a&&window.cancelAnimationFrame(a),window.requestAnimationFrame(u)):setTimeout(u,m)}function Ee(u){if(te){window.cancelAnimationFrame(u);return}clearTimeout(u)}function we(u){return b=u,a=w(S,e),ee?V(u):i}function Se(u){let m=u-p,I=u-b,oe=e-m;return c?Math.min(oe,s-I):oe}function re(u){let m=u-p,I=u-b;return p===void 0||m>=e||m<0||c&&I>=s}function S(){let u=Date.now();if(re(u))return ne(u);a=w(S,Se(u))}function ne(u){return a=void 0,C&&n?V(u):(n=o=void 0,i)}function Re(){a!==void 0&&Ee(a),b=0,n=p=o=a=void 0}function ke(){return a===void 0?i:ne(Date.now())}function Ae(){return a!==void 0}function R(...u){let m=Date.now(),I=re(m);if(n=u,o=this,p=m,I){if(a===void 0)return we(p);if(c)return a=w(S,e),V(p)}return a===void 0&&(a=w(S,e)),i}return R.cancel=Re,R.flush=ke,R.pending=Ae,R}var F=(t,e=0,r)=>G(t,e,{...{leading:!0,trailing:!0},...r,maxWait:e});var k=(t,e)=>{if(t===null||typeof t!="object")return t;let r=Array.isArray(t)?[]:{};for(let n in t){if(typeof e=="function"){let o=e(t[n],n,t,r);if(o!==void 0){r[n]=o;continue}}typeof t[n]=="object"?r[n]=k(t[n],e):r[n]=t[n]}return r};var lt=t=>k(t);var ct=300,ut=(t,e=ct)=>new l(r=>{let{width:n,height:o}=t.getBoundingClientRect();if(r.next({width:n,height:o}),!window.ResizeObserver)return;let s=new ResizeObserver(F(i=>{let a=i[0];if(!a)return;let p,b;a.contentBoxSize&&a.contentBoxSize[0]?(b=a.contentBoxSize[0].blockSize,p=a.contentBoxSize[0].inlineSize):a.contentRect&&(p=a.contentRect.width,b=a.contentRect.height),x(p)&&x(b)&&r.next({width:p,height:b})},e));return s.observe(t),()=>s.disconnect()});var A=(t,e=6,r=".")=>{let n={};for(let o in t)if(!(!t.hasOwnProperty(o)||t[o]instanceof HTMLElement||!e))if(typeof t[o]=="object"&&t[o]!==null){let s=A(t[o],e-1);for(let i in s)s.hasOwnProperty(i)&&(n[o+r+i]=s[i])}else n[o]=t[o];return n};var pt=t=>{t.removeAttribute("src"),t.load()};var Nr=t=>{let e;try{e=new URL(t)}catch{return!1}return e.protocol==="https:"};var Vr=t=>{try{return new URL(t)}catch{return null}};var bt=(t,e)=>{let r=0,n=t.length-1;for(;r<=n;){let o=Math.floor((r+n)/2),s=e(t[o]);if(s===0)return o;s<0?r=o+1:n=o-1}return-1};var dt=t=>e=>r=>{let n=typeof r=="object";r==null||n&&!Object.keys(r).length||t(e,n?A(r):{value:r})};var L=class extends v{constructor(e){super(),this.value=e}next(e){super.next(this.value=e)}error(e){super.error(this.value=e)}getValue(){return this.value}_subscribe(e){let r=super._subscribe(e);return e.next(this.value),r}};function ce(t){return new l(e=>{let r={},n=Object.keys(t).length,o=s=>i=>{s in r||n--,r[s]=i,n===0&&e.next(r)};return Object.entries(t).reduce((s,[i,a])=>s.add(a.subscribe(o(i))),new d)})}function ue(...t){return new l(e=>t.reduce((r,n)=>r.add(n.subscribe(e)),new d))}var ft=t=>new l(e=>{let r=window.setTimeout(()=>{try{e.next()}catch(n){if(e.error)e.error(n);else throw n}},t);return()=>window.clearTimeout(r)});var mt=t=>new l(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var Tt=t=>new l(e=>{t.forEach(r=>e.next(r))});var vt=(t,e)=>new l(r=>{let n=o=>r.next(o);return t.addEventListener(e,n),()=>t.removeEventListener(e,n)});var P=class extends d{remove(e){this.subscriptions=this.subscriptions.filter(r=>r!==e)}};function pe(t){return e=>new l(r=>e.subscribe(new K(r,t)))}var K=class{constructor(e,r){this.destination=e;this.size=r;this.lastValues=[]}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){this.destination.error?.(e)}};var It={leading:!1,trailing:!0};function be(t,e=It){return r=>new l(n=>r.subscribe(new q(n,t,e)))}var q=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,x(this.timeout)?window.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(r){if(this.destination.error)this.destination.error(r);else throw r}this.timeout=void 0},this.time)}error(e){this.destination.error?.(e)}};var gt={leading:!0,trailing:!1};function de(t,e=gt){return r=>new l(n=>r.subscribe(new H(n,t,e)))}var H=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,U(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=window.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){this.destination.error?.(e)}};function fe(t){return e=>new l(r=>e.subscribe(new B(r,t)))}var B=class{constructor(e,r){this.destination=e;this.predicate=r}next(e){let r;try{r=this.predicate(e)}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};var ht=(t,e)=>{let r=(n,o)=>{let s=Object.keys(n);for(let i in o)if(!s.includes(i)||o[i]!==n[i])return!1;return!0};return r(t,e)&&r(e,t)},xt=(t,e)=>t instanceof Object&&e instanceof Object?ht(t,e):t===e;function Te(t=xt){return e=>new l(r=>e.subscribe(new $(r,t)))}var me={},$=class{constructor(e,r){this.destination=e;this.predicate=r;this.lastValue=me}next(e){let r;try{r=this.lastValue===me||!this.predicate(this.lastValue,e),this.lastValue=e instanceof Object?{...e}:e}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};function N(t){return e=>new l(r=>e.subscribe(new Y(r,t)))}var Y=class{constructor(e,r){this.destination=e;this.mapper=r}next(e){let r;try{r=this.mapper(e)}catch(n){throw this.error(n),n}this.destination.next(r)}error(e){this.destination.error?.(e)}};function ve(t){return N(()=>t)}function Ie(){return t=>new l(e=>{let r=!1,n=!1,o=t.subscribe(s=>{r||(r=!0,e.next(s)),n&&o.unsubscribe()},s=>{r=!0,e.error?.(s),n&&o.unsubscribe()});return n=!0,r&&o.unsubscribe(),o})}function ge(){return t=>new l(e=>t.subscribe(new X(e)))}var X=class{constructor(e){this.destination=e;this.hasLast=!1}next(e){let r=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([r,e])}error(e){this.destination.error?.(e)}};function he(t){return e=>new l(r=>e.subscribe(new J(r,t)))}var J=class{constructor(e,r){this.destination=e;this.effect=r}next(e){try{this.effect(e)}catch(r){throw this.error(r),r}this.destination.next(e)}error(e){this.destination.error?.(e)}};function xe(t){return e=>new l(r=>e.subscribe(new Z(r,t)))}var Z=class{constructor(e,r){this.destination=e;this.count=r;r<0&&this.destination.error?.(new Error("Count can not be less than zero"))}next(e){this.count===0?this.destination.next(e):this.count--}error(e){this.destination.error?.(e)}};var yt=(a=>(a.NETWORK="network",a.VIDEO_PIPELINE="video_pipeline",a.EXTERNAL_API="external_api",a.PARSER="parser",a.DOM="dom",a.WTF="wtf",a.FATAL="fatal",a))(yt||{});var Ot=(c=>(c.Armenian="58",c.Azerbaijani="57",c.Belarusian="114",c.English="3",c.Kazakh="97",c.Portuguese="73",c.Russian="0",c.Spanish="4",c.Ukrainian="1",c.Uzbek="65",c.Vietnamese="75",c))(Ot||{}),Et="vk.com",Vo=async(t,e,r)=>{let n=new URL(`https://${Et}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",e),t!==void 0&&n.searchParams.set("lang",t);let s=await(await fetch(n.toString())).json();return wt(s,r)},wt=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),St(n)])),St=t=>Array.isArray(t)?t[0]:t;var Rt=(r=>(r.RU="ru",r.EN="en",r))(Rt||{});var kt={UI:"__vkVideoPlayer",CORE:"__vkVideoCore"},At=(()=>{let t=0;return()=>{let e=t;return t=(t+1)%Number.MAX_SAFE_INTEGER,e}})(),ye=class{constructor(e){this.id=At();this.type=e,this.initWindowObjects()}getWindowObject(){let e=this.key();return window[e]?.[this.id]??{}}initWindowObjects(){let e=this.key();window[e]||(window[e]={}),window[e][this.id]={}}expose(e){Object.assign(this.getWindowObject(),e)}destroy(){let e=this.key();window&&window[e]&&window[e][this.id]&&(delete window[e][this.id],Object.keys(window[e]).length||delete window[e])}key(){let{type:e}=this;return kt[e]}};var Oe={};ie(Oe,{create:()=>Lt,destroy:()=>Pt,push:()=>Nt,subscribe:()=>Ct});var E=new Map,Lt=(t,e)=>E.set(t,e??[]),Pt=t=>E.delete(t),Nt=(t,e)=>{let r=E.get(t);r&&(typeof r=="function"?r(e):r.push(e))},Ct=(t,e)=>{let r=E.get(t);if(r){if(r&&Array.isArray(r))for(let n of r)e(n);E.set(t,e)}};export{yt as ErrorCategory,Rt as InterfaceLanguage,ye as InternalsExposure,M as Logger,l as Observable,v as Subject,d as Subscription,P as SubscriptionRemovable,Q as Tracer,Pe as VERSION,Ot as VKNumericLanguage,L as ValueSubject,j as VideoQuality,Ge as abortable,We as addScript,it as areQualitiesExact,je as assertEmptyArray,T as assertNever,Qe as assertNonNullable,De as assertNotEmptyArray,Ue as assertNullable,st as assertQualityIsExact,bt as binarySearch,pe as buffer,Ne as checkNever,pt as clearVideoElement,lt as cloneDeep,k as cloneDeepWith,ce as combine,Vr as createURL,be as debounce,G as debounceFn,Xe as detectEmbed,Oe as devNull,at as fillWithDefault,fe as filter,Te as filterChanged,A as flattenObject,vt as fromEvent,Fe as getExponentialDelay,tt as getHighestQuality,dt as getTraceSubscriptionMethod,mt as interval,Je as isHigher,Ze as isHigherOrEqual,z as isInvariantQuality,W as isLower,et as isLowerOrEqual,x as isNonNullable,U as isNullable,Nr as isValidURL,Vo as loadVKLangPack,N as map,ve as mapTo,ue as merge,g as noop,ze as now,Tt as observableFrom,ut as observeElementSize,Ie as once,ge as pairwise,ae as safeStorage,xe as skip,he as tap,de as throttle,F as throttleFn,gr as timeCodeToString,ft as timeout,rt as videoHeightToQuality,ot as videoQualityToHeight,nt as videoSizeToQuality};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/videoplayer-shared",
3
- "version": "1.0.58-dev.ce524d87.0",
3
+ "version": "1.0.58-dev.ef87de0a.0",
4
4
  "author": "vk.com",
5
5
  "description": "Shared code for vk.com videoplayer",
6
6
  "homepage": "https://vk.com",