@vkontakte/videoplayer-shared 1.0.50-dev.1326de93.0 → 1.0.50-dev.eaae0302.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015.cjs.js +3 -3
- package/es2015.esm.js +3 -3
- package/es2018.cjs.js +3 -3
- package/es2018.esm.js +3 -3
- package/esnext.cjs.js +3 -3
- package/esnext.esm.js +3 -3
- package/evergreen.esm.js +3 -3
- package/package.json +1 -1
package/esnext.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-shared v1.0.50-dev.
|
|
3
|
-
*
|
|
2
|
+
* @vkontakte/videoplayer-shared v1.0.50-dev.eaae0302.0
|
|
3
|
+
* Thu, 21 Nov 2024 07:42:12 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-50/doc/
|
|
5
5
|
*/
|
|
6
|
-
"use strict";var cs=Object.create;var ge=Object.defineProperty;var ls=Object.getOwnPropertyDescriptor;var ps=Object.getOwnPropertyNames;var fs=Object.getPrototypeOf,vs=Object.prototype.hasOwnProperty;var a=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Ct=(e,r)=>{for(var t in r)ge(e,t,{get:r[t],enumerable:!0})},Lt=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of ps(r))!vs.call(e,i)&&i!==t&&ge(e,i,{get:()=>r[i],enumerable:!(n=ls(r,i))||n.enumerable});return e};var bs=(e,r,t)=>(t=e!=null?cs(fs(e)):{},Lt(r||!e||!e.__esModule?ge(t,"default",{value:e,enumerable:!0}):t,e)),ds=e=>Lt(ge({},"__esModule",{value:!0}),e);var _=a((gd,mn)=>{"use strict";mn.exports=function(e){try{return!!e()}catch{return!0}}});var ue=a((Id,Tn)=>{"use strict";var Rs=_();Tn.exports=!Rs(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var L=a((xd,gn)=>{"use strict";var hn=ue(),yn=Function.prototype,qr=yn.call,Ps=hn&&yn.bind.bind(qr,qr);gn.exports=hn?Ps:function(e){return function(){return qr.apply(e,arguments)}}});var Ce=a((Od,xn)=>{"use strict";var In=L(),_s=In({}.toString),As=In("".slice);xn.exports=function(e){return As(_s(e),8,-1)}});var wn=a((wd,On)=>{"use strict";var Cs=L(),Ls=_(),Ms=Ce(),Rr=Object,js=Cs("".split);On.exports=Ls(function(){return!Rr("z").propertyIsEnumerable(0)})?function(e){return Ms(e)==="String"?js(e,""):Rr(e)}:Rr});var Le=a((Sd,Sn)=>{"use strict";Sn.exports=function(e){return e==null}});var Me=a((Ed,En)=>{"use strict";var Ns=Le(),ks=TypeError;En.exports=function(e){if(Ns(e))throw new ks("Can't call method on "+e);return e}});var H=a((qd,qn)=>{"use strict";var Vs=wn(),Ds=Me();qn.exports=function(e){return Vs(Ds(e))}});var Pn=a((Rd,Rn)=>{"use strict";Rn.exports=function(){}});var Q=a((Pd,_n)=>{"use strict";_n.exports={}});var O=a((Pr,An)=>{"use strict";var ce=function(e){return e&&e.Math===Math&&e};An.exports=ce(typeof globalThis=="object"&&globalThis)||ce(typeof window=="object"&&window)||ce(typeof self=="object"&&self)||ce(typeof global=="object"&&global)||ce(typeof Pr=="object"&&Pr)||function(){return this}()||Function("return this")()});var w=a((_d,Cn)=>{"use strict";var _r=typeof document=="object"&&document.all;Cn.exports=typeof _r>"u"&&_r!==void 0?function(e){return typeof e=="function"||e===_r}:function(e){return typeof e=="function"}});var jn=a((Ad,Mn)=>{"use strict";var Fs=O(),Us=w(),Ln=Fs.WeakMap;Mn.exports=Us(Ln)&&/native code/.test(String(Ln))});var M=a((Cd,Nn)=>{"use strict";var Gs=w();Nn.exports=function(e){return typeof e=="object"?e!==null:Gs(e)}});var A=a((Ld,kn)=>{"use strict";var Bs=_();kn.exports=!Bs(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var Cr=a((Md,Dn)=>{"use strict";var Qs=O(),Vn=M(),Ar=Qs.document,Ws=Vn(Ar)&&Vn(Ar.createElement);Dn.exports=function(e){return Ws?Ar.createElement(e):{}}});var Lr=a((jd,Fn)=>{"use strict";var $s=A(),zs=_(),Ks=Cr();Fn.exports=!$s&&!zs(function(){return Object.defineProperty(Ks("div"),"a",{get:function(){return 7}}).a!==7})});var Mr=a((Nd,Un)=>{"use strict";var Ys=A(),Hs=_();Un.exports=Ys&&Hs(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var W=a((kd,Gn)=>{"use strict";var Xs=M(),Js=String,Zs=TypeError;Gn.exports=function(e){if(Xs(e))return e;throw new Zs(Js(e)+" is not an object")}});var D=a((Vd,Bn)=>{"use strict";var eu=ue(),je=Function.prototype.call;Bn.exports=eu?je.bind(je):function(){return je.apply(je,arguments)}});var Ne=a((Dd,Qn)=>{"use strict";Qn.exports={}});var kr=a((Fd,$n)=>{"use strict";var jr=Ne(),Nr=O(),ru=w(),Wn=function(e){return ru(e)?e:void 0};$n.exports=function(e,r){return arguments.length<2?Wn(jr[e])||Wn(Nr[e]):jr[e]&&jr[e][r]||Nr[e]&&Nr[e][r]}});var Vr=a((Ud,zn)=>{"use strict";var tu=L();zn.exports=tu({}.isPrototypeOf)});var Xn=a((Gd,Hn)=>{"use strict";var nu=O(),Kn=nu.navigator,Yn=Kn&&Kn.userAgent;Hn.exports=Yn?String(Yn):""});var ii=a((Bd,ni)=>{"use strict";var ti=O(),Dr=Xn(),Jn=ti.process,Zn=ti.Deno,ei=Jn&&Jn.versions||Zn&&Zn.version,ri=ei&&ei.v8,q,ke;ri&&(q=ri.split("."),ke=q[0]>0&&q[0]<4?1:+(q[0]+q[1]));!ke&&Dr&&(q=Dr.match(/Edge\/(\d+)/),(!q||q[1]>=74)&&(q=Dr.match(/Chrome\/(\d+)/),q&&(ke=+q[1])));ni.exports=ke});var Fr=a((Qd,ai)=>{"use strict";var oi=ii(),iu=_(),ou=O(),au=ou.String;ai.exports=!!Object.getOwnPropertySymbols&&!iu(function(){var e=Symbol("symbol detection");return!au(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&oi&&oi<41})});var Ur=a((Wd,si)=>{"use strict";var su=Fr();si.exports=su&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Gr=a(($d,ui)=>{"use strict";var uu=kr(),cu=w(),lu=Vr(),pu=Ur(),fu=Object;ui.exports=pu?function(e){return typeof e=="symbol"}:function(e){var r=uu("Symbol");return cu(r)&&lu(r.prototype,fu(e))}});var Ve=a((zd,ci)=>{"use strict";var vu=String;ci.exports=function(e){try{return vu(e)}catch{return"Object"}}});var le=a((Kd,li)=>{"use strict";var bu=w(),du=Ve(),mu=TypeError;li.exports=function(e){if(bu(e))return e;throw new mu(du(e)+" is not a function")}});var De=a((Yd,pi)=>{"use strict";var Tu=le(),hu=Le();pi.exports=function(e,r){var t=e[r];return hu(t)?void 0:Tu(t)}});var vi=a((Hd,fi)=>{"use strict";var Br=D(),Qr=w(),Wr=M(),yu=TypeError;fi.exports=function(e,r){var t,n;if(r==="string"&&Qr(t=e.toString)&&!Wr(n=Br(t,e))||Qr(t=e.valueOf)&&!Wr(n=Br(t,e))||r!=="string"&&Qr(t=e.toString)&&!Wr(n=Br(t,e)))return n;throw new yu("Can't convert object to primitive value")}});var pe=a((Xd,bi)=>{"use strict";bi.exports=!0});var Ti=a((Jd,mi)=>{"use strict";var di=O(),gu=Object.defineProperty;mi.exports=function(e,r){try{gu(di,e,{value:r,configurable:!0,writable:!0})}catch{di[e]=r}return r}});var Fe=a((Zd,gi)=>{"use strict";var Iu=pe(),xu=O(),Ou=Ti(),hi="__core-js_shared__",yi=gi.exports=xu[hi]||Ou(hi,{});(yi.versions||(yi.versions=[])).push({version:"3.38.0",mode:Iu?"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=a((em,xi)=>{"use strict";var Ii=Fe();xi.exports=function(e,r){return Ii[e]||(Ii[e]=r||{})}});var zr=a((rm,Oi)=>{"use strict";var wu=Me(),Su=Object;Oi.exports=function(e){return Su(wu(e))}});var j=a((tm,wi)=>{"use strict";var Eu=L(),qu=zr(),Ru=Eu({}.hasOwnProperty);wi.exports=Object.hasOwn||function(r,t){return Ru(qu(r),t)}});var Kr=a((nm,Si)=>{"use strict";var Pu=L(),_u=0,Au=Math.random(),Cu=Pu(1 .toString);Si.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Cu(++_u+Au,36)}});var N=a((im,qi)=>{"use strict";var Lu=O(),Mu=$r(),Ei=j(),ju=Kr(),Nu=Fr(),ku=Ur(),X=Lu.Symbol,Yr=Mu("wks"),Vu=ku?X.for||X:X&&X.withoutSetter||ju;qi.exports=function(e){return Ei(Yr,e)||(Yr[e]=Nu&&Ei(X,e)?X[e]:Vu("Symbol."+e)),Yr[e]}});var Ai=a((om,_i)=>{"use strict";var Du=D(),Ri=M(),Pi=Gr(),Fu=De(),Uu=vi(),Gu=N(),Bu=TypeError,Qu=Gu("toPrimitive");_i.exports=function(e,r){if(!Ri(e)||Pi(e))return e;var t=Fu(e,Qu),n;if(t){if(r===void 0&&(r="default"),n=Du(t,e,r),!Ri(n)||Pi(n))return n;throw new Bu("Can't convert object to primitive value")}return r===void 0&&(r="number"),Uu(e,r)}});var Hr=a((am,Ci)=>{"use strict";var Wu=Ai(),$u=Gr();Ci.exports=function(e){var r=Wu(e,"string");return $u(r)?r:r+""}});var J=a(Mi=>{"use strict";var zu=A(),Ku=Lr(),Yu=Mr(),Ue=W(),Li=Hr(),Hu=TypeError,Xr=Object.defineProperty,Xu=Object.getOwnPropertyDescriptor,Jr="enumerable",Zr="configurable",et="writable";Mi.f=zu?Yu?function(r,t,n){if(Ue(r),t=Li(t),Ue(n),typeof r=="function"&&t==="prototype"&&"value"in n&&et in n&&!n[et]){var i=Xu(r,t);i&&i[et]&&(r[t]=n.value,n={configurable:Zr in n?n[Zr]:i[Zr],enumerable:Jr in n?n[Jr]:i[Jr],writable:!1})}return Xr(r,t,n)}:Xr:function(r,t,n){if(Ue(r),t=Li(t),Ue(n),Ku)try{return Xr(r,t,n)}catch{}if("get"in n||"set"in n)throw new Hu("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var fe=a((um,ji)=>{"use strict";ji.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var Z=a((cm,Ni)=>{"use strict";var Ju=A(),Zu=J(),ec=fe();Ni.exports=Ju?function(e,r,t){return Zu.f(e,r,ec(1,t))}:function(e,r,t){return e[r]=t,e}});var Ge=a((lm,Vi)=>{"use strict";var rc=$r(),tc=Kr(),ki=rc("keys");Vi.exports=function(e){return ki[e]||(ki[e]=tc(e))}});var Be=a((pm,Di)=>{"use strict";Di.exports={}});var Bi=a((fm,Gi)=>{"use strict";var nc=jn(),Ui=O(),ic=M(),oc=Z(),rt=j(),tt=Fe(),ac=Ge(),sc=Be(),Fi="Object already initialized",nt=Ui.TypeError,uc=Ui.WeakMap,Qe,ve,We,cc=function(e){return We(e)?ve(e):Qe(e,{})},lc=function(e){return function(r){var t;if(!ic(r)||(t=ve(r)).type!==e)throw new nt("Incompatible receiver, "+e+" required");return t}};nc||tt.state?(R=tt.state||(tt.state=new uc),R.get=R.get,R.has=R.has,R.set=R.set,Qe=function(e,r){if(R.has(e))throw new nt(Fi);return r.facade=e,R.set(e,r),r},ve=function(e){return R.get(e)||{}},We=function(e){return R.has(e)}):($=ac("state"),sc[$]=!0,Qe=function(e,r){if(rt(e,$))throw new nt(Fi);return r.facade=e,oc(e,$,r),r},ve=function(e){return rt(e,$)?e[$]:{}},We=function(e){return rt(e,$)});var R,$;Gi.exports={set:Qe,get:ve,has:We,enforce:cc,getterFor:lc}});var Ki=a((vm,zi)=>{"use strict";var pc=ue(),$i=Function.prototype,Qi=$i.apply,Wi=$i.call;zi.exports=typeof Reflect=="object"&&Reflect.apply||(pc?Wi.bind(Qi):function(){return Wi.apply(Qi,arguments)})});var it=a((bm,Yi)=>{"use strict";var fc=Ce(),vc=L();Yi.exports=function(e){if(fc(e)==="Function")return vc(e)}});var Zi=a(Ji=>{"use strict";var Hi={}.propertyIsEnumerable,Xi=Object.getOwnPropertyDescriptor,bc=Xi&&!Hi.call({1:2},1);Ji.f=bc?function(r){var t=Xi(this,r);return!!t&&t.enumerable}:Hi});var to=a(ro=>{"use strict";var dc=A(),mc=D(),Tc=Zi(),hc=fe(),yc=H(),gc=Hr(),Ic=j(),xc=Lr(),eo=Object.getOwnPropertyDescriptor;ro.f=dc?eo:function(r,t){if(r=yc(r),t=gc(t),xc)try{return eo(r,t)}catch{}if(Ic(r,t))return hc(!mc(Tc.f,r,t),r[t])}});var io=a((Tm,no)=>{"use strict";var Oc=_(),wc=w(),Sc=/#|\.prototype\./,be=function(e,r){var t=qc[Ec(e)];return t===Pc?!0:t===Rc?!1:wc(r)?Oc(r):!!r},Ec=be.normalize=function(e){return String(e).replace(Sc,".").toLowerCase()},qc=be.data={},Rc=be.NATIVE="N",Pc=be.POLYFILL="P";no.exports=be});var ot=a((hm,ao)=>{"use strict";var oo=it(),_c=le(),Ac=ue(),Cc=oo(oo.bind);ao.exports=function(e,r){return _c(e),r===void 0?e:Ac?Cc(e,r):function(){return e.apply(r,arguments)}}});var at=a((ym,uo)=>{"use strict";var de=O(),Lc=Ki(),Mc=it(),jc=w(),Nc=to().f,kc=io(),ee=Ne(),Vc=ot(),re=Z(),so=j();Fe();var Dc=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 Lc(e,this,arguments)};return r.prototype=e.prototype,r};uo.exports=function(e,r){var t=e.target,n=e.global,i=e.stat,o=e.proto,s=n?de:i?de[t]:de[t]&&de[t].prototype,u=n?ee:ee[t]||re(ee,t,{})[t],f=u.prototype,l,v,c,b,d,T,h,I,y;for(b in r)l=kc(n?b:t+(i?".":"#")+b,e.forced),v=!l&&s&&so(s,b),T=u[b],v&&(e.dontCallGetSet?(y=Nc(s,b),h=y&&y.value):h=s[b]),d=v&&h?h:r[b],!(!l&&!o&&typeof T==typeof d)&&(e.bind&&v?I=Vc(d,de):e.wrap&&v?I=Dc(d):o&&jc(d)?I=Mc(d):I=d,(e.sham||d&&d.sham||T&&T.sham)&&re(I,"sham",!0),re(u,b,I),o&&(c=t+"Prototype",so(ee,c)||re(ee,c,{}),re(ee[c],b,d),e.real&&f&&(l||!f[b])&&re(f,b,d)))}});var po=a((gm,lo)=>{"use strict";var st=A(),Fc=j(),co=Function.prototype,Uc=st&&Object.getOwnPropertyDescriptor,ut=Fc(co,"name"),Gc=ut&&function(){}.name==="something",Bc=ut&&(!st||st&&Uc(co,"name").configurable);lo.exports={EXISTS:ut,PROPER:Gc,CONFIGURABLE:Bc}});var vo=a((Im,fo)=>{"use strict";var Qc=Math.ceil,Wc=Math.floor;fo.exports=Math.trunc||function(r){var t=+r;return(t>0?Wc:Qc)(t)}});var ct=a((xm,bo)=>{"use strict";var $c=vo();bo.exports=function(e){var r=+e;return r!==r||r===0?0:$c(r)}});var To=a((Om,mo)=>{"use strict";var zc=ct(),Kc=Math.max,Yc=Math.min;mo.exports=function(e,r){var t=zc(e);return t<0?Kc(t+r,0):Yc(t,r)}});var yo=a((wm,ho)=>{"use strict";var Hc=ct(),Xc=Math.min;ho.exports=function(e){var r=Hc(e);return r>0?Xc(r,9007199254740991):0}});var lt=a((Sm,go)=>{"use strict";var Jc=yo();go.exports=function(e){return Jc(e.length)}});var Oo=a((Em,xo)=>{"use strict";var Zc=H(),el=To(),rl=lt(),Io=function(e){return function(r,t,n){var i=Zc(r),o=rl(i);if(o===0)return!e&&-1;var s=el(n,o),u;if(e&&t!==t){for(;o>s;)if(u=i[s++],u!==u)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===t)return e||s||0;return!e&&-1}};xo.exports={includes:Io(!0),indexOf:Io(!1)}});var Eo=a((qm,So)=>{"use strict";var tl=L(),pt=j(),nl=H(),il=Oo().indexOf,ol=Be(),wo=tl([].push);So.exports=function(e,r){var t=nl(e),n=0,i=[],o;for(o in t)!pt(ol,o)&&pt(t,o)&&wo(i,o);for(;r.length>n;)pt(t,o=r[n++])&&(~il(i,o)||wo(i,o));return i}});var ft=a((Rm,qo)=>{"use strict";qo.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Po=a((Pm,Ro)=>{"use strict";var al=Eo(),sl=ft();Ro.exports=Object.keys||function(r){return al(r,sl)}});var Ao=a(_o=>{"use strict";var ul=A(),cl=Mr(),ll=J(),pl=W(),fl=H(),vl=Po();_o.f=ul&&!cl?Object.defineProperties:function(r,t){pl(r);for(var n=fl(t),i=vl(t),o=i.length,s=0,u;o>s;)ll.f(r,u=i[s++],n[u]);return r}});var Lo=a((Am,Co)=>{"use strict";var bl=kr();Co.exports=bl("document","documentElement")});var mt=a((Cm,Fo)=>{"use strict";var dl=W(),ml=Ao(),Mo=ft(),Tl=Be(),hl=Lo(),yl=Cr(),gl=Ge(),jo=">",No="<",bt="prototype",dt="script",Vo=gl("IE_PROTO"),vt=function(){},Do=function(e){return No+dt+jo+e+No+"/"+dt+jo},ko=function(e){e.write(Do("")),e.close();var r=e.parentWindow.Object;return e=null,r},Il=function(){var e=yl("iframe"),r="java"+dt+":",t;return e.style.display="none",hl.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(Do("document.F=Object")),t.close(),t.F},$e,ze=function(){try{$e=new ActiveXObject("htmlfile")}catch{}ze=typeof document<"u"?document.domain&&$e?ko($e):Il():ko($e);for(var e=Mo.length;e--;)delete ze[bt][Mo[e]];return ze()};Tl[Vo]=!0;Fo.exports=Object.create||function(r,t){var n;return r!==null?(vt[bt]=dl(r),n=new vt,vt[bt]=null,n[Vo]=r):n=ze(),t===void 0?n:ml.f(n,t)}});var Go=a((Lm,Uo)=>{"use strict";var xl=_();Uo.exports=!xl(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var ht=a((Mm,Qo)=>{"use strict";var Ol=j(),wl=w(),Sl=zr(),El=Ge(),ql=Go(),Bo=El("IE_PROTO"),Tt=Object,Rl=Tt.prototype;Qo.exports=ql?Tt.getPrototypeOf:function(e){var r=Sl(e);if(Ol(r,Bo))return r[Bo];var t=r.constructor;return wl(t)&&r instanceof t?t.prototype:r instanceof Tt?Rl:null}});var yt=a((jm,Wo)=>{"use strict";var Pl=Z();Wo.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:Pl(e,r,t),e}});var Ot=a((Nm,Ko)=>{"use strict";var _l=_(),Al=w(),Cl=M(),Ll=mt(),$o=ht(),Ml=yt(),jl=N(),Nl=pe(),xt=jl("iterator"),zo=!1,k,gt,It;[].keys&&(It=[].keys(),"next"in It?(gt=$o($o(It)),gt!==Object.prototype&&(k=gt)):zo=!0);var kl=!Cl(k)||_l(function(){var e={};return k[xt].call(e)!==e});kl?k={}:Nl&&(k=Ll(k));Al(k[xt])||Ml(k,xt,function(){return this});Ko.exports={IteratorPrototype:k,BUGGY_SAFARI_ITERATORS:zo}});var Ke=a((km,Ho)=>{"use strict";var Vl=N(),Dl=Vl("toStringTag"),Yo={};Yo[Dl]="z";Ho.exports=String(Yo)==="[object z]"});var wt=a((Vm,Xo)=>{"use strict";var Fl=Ke(),Ul=w(),Ye=Ce(),Gl=N(),Bl=Gl("toStringTag"),Ql=Object,Wl=Ye(function(){return arguments}())==="Arguments",$l=function(e,r){try{return e[r]}catch{}};Xo.exports=Fl?Ye:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=$l(r=Ql(e),Bl))=="string"?t:Wl?Ye(r):(n=Ye(r))==="Object"&&Ul(r.callee)?"Arguments":n}});var Zo=a((Dm,Jo)=>{"use strict";var zl=Ke(),Kl=wt();Jo.exports=zl?{}.toString:function(){return"[object "+Kl(this)+"]"}});var He=a((Fm,ra)=>{"use strict";var Yl=Ke(),Hl=J().f,Xl=Z(),Jl=j(),Zl=Zo(),ep=N(),ea=ep("toStringTag");ra.exports=function(e,r,t,n){var i=t?e:e&&e.prototype;i&&(Jl(i,ea)||Hl(i,ea,{configurable:!0,value:r}),n&&!Yl&&Xl(i,"toString",Zl))}});var na=a((Um,ta)=>{"use strict";var rp=Ot().IteratorPrototype,tp=mt(),np=fe(),ip=He(),op=Q(),ap=function(){return this};ta.exports=function(e,r,t,n){var i=r+" Iterator";return e.prototype=tp(rp,{next:np(+!n,t)}),ip(e,i,!1,!0),op[i]=ap,e}});var oa=a((Gm,ia)=>{"use strict";var sp=L(),up=le();ia.exports=function(e,r,t){try{return sp(up(Object.getOwnPropertyDescriptor(e,r)[t]))}catch{}}});var sa=a((Bm,aa)=>{"use strict";var cp=M();aa.exports=function(e){return cp(e)||e===null}});var ca=a((Qm,ua)=>{"use strict";var lp=sa(),pp=String,fp=TypeError;ua.exports=function(e){if(lp(e))return e;throw new fp("Can't set "+pp(e)+" as a prototype")}});var pa=a((Wm,la)=>{"use strict";var vp=oa(),bp=M(),dp=Me(),mp=ca();la.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=vp(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch{}return function(i,o){return dp(i),mp(o),bp(i)&&(e?t(i,o):i.__proto__=o),i}}():void 0)});var xa=a(($m,Ia)=>{"use strict";var Tp=at(),hp=D(),Xe=pe(),ya=po(),yp=w(),gp=na(),fa=ht(),va=pa(),Ip=He(),xp=Z(),St=yt(),Op=N(),ba=Q(),ga=Ot(),wp=ya.PROPER,Sp=ya.CONFIGURABLE,da=ga.IteratorPrototype,Je=ga.BUGGY_SAFARI_ITERATORS,me=Op("iterator"),ma="keys",Te="values",Ta="entries",ha=function(){return this};Ia.exports=function(e,r,t,n,i,o,s){gp(t,r,n);var u=function(y){if(y===i&&b)return b;if(!Je&&y&&y in v)return v[y];switch(y){case ma:return function(){return new t(this,y)};case Te:return function(){return new t(this,y)};case Ta:return function(){return new t(this,y)}}return function(){return new t(this)}},f=r+" Iterator",l=!1,v=e.prototype,c=v[me]||v["@@iterator"]||i&&v[i],b=!Je&&c||u(i),d=r==="Array"&&v.entries||c,T,h,I;if(d&&(T=fa(d.call(new e)),T!==Object.prototype&&T.next&&(!Xe&&fa(T)!==da&&(va?va(T,da):yp(T[me])||St(T,me,ha)),Ip(T,f,!0,!0),Xe&&(ba[f]=ha))),wp&&i===Te&&c&&c.name!==Te&&(!Xe&&Sp?xp(v,"name",Te):(l=!0,b=function(){return hp(c,this)})),i)if(h={values:u(Te),keys:o?b:u(ma),entries:u(Ta)},s)for(I in h)(Je||l||!(I in v))&&St(v,I,h[I]);else Tp({target:r,proto:!0,forced:Je||l},h);return(!Xe||s)&&v[me]!==b&&St(v,me,b,{name:i}),ba[r]=b,h}});var wa=a((zm,Oa)=>{"use strict";Oa.exports=function(e,r){return{value:e,done:r}}});var qt=a((Km,Pa)=>{"use strict";var Ep=H(),Et=Pn(),Sa=Q(),qa=Bi(),qp=J().f,Rp=xa(),Ze=wa(),Pp=pe(),_p=A(),Ra="Array Iterator",Ap=qa.set,Cp=qa.getterFor(Ra);Pa.exports=Rp(Array,"Array",function(e,r){Ap(this,{type:Ra,target:Ep(e),index:0,kind:r})},function(){var e=Cp(this),r=e.target,t=e.index++;if(!r||t>=r.length)return e.target=void 0,Ze(void 0,!0);switch(e.kind){case"keys":return Ze(t,!1);case"values":return Ze(r[t],!1)}return Ze([t,r[t]],!1)},"values");var Ea=Sa.Arguments=Sa.Array;Et("keys");Et("values");Et("entries");if(!Pp&&_p&&Ea.name!=="values")try{qp(Ea,"name",{value:"values"})}catch{}});var Aa=a((Ym,_a)=>{"use strict";var Lp=N(),Mp=Q(),jp=Lp("iterator"),Np=Array.prototype;_a.exports=function(e){return e!==void 0&&(Mp.Array===e||Np[jp]===e)}});var Rt=a((Hm,La)=>{"use strict";var kp=wt(),Ca=De(),Vp=Le(),Dp=Q(),Fp=N(),Up=Fp("iterator");La.exports=function(e){if(!Vp(e))return Ca(e,Up)||Ca(e,"@@iterator")||Dp[kp(e)]}});var ja=a((Xm,Ma)=>{"use strict";var Gp=D(),Bp=le(),Qp=W(),Wp=Ve(),$p=Rt(),zp=TypeError;Ma.exports=function(e,r){var t=arguments.length<2?$p(e):r;if(Bp(t))return Qp(Gp(t,e));throw new zp(Wp(e)+" is not iterable")}});var Va=a((Jm,ka)=>{"use strict";var Kp=D(),Na=W(),Yp=De();ka.exports=function(e,r,t){var n,i;Na(e);try{if(n=Yp(e,"return"),!n){if(r==="throw")throw t;return t}n=Kp(n,e)}catch(o){i=!0,n=o}if(r==="throw")throw t;if(i)throw n;return Na(n),t}});var Ba=a((Zm,Ga)=>{"use strict";var Hp=ot(),Xp=D(),Jp=W(),Zp=Ve(),ef=Aa(),rf=lt(),Da=Vr(),tf=ja(),nf=Rt(),Fa=Va(),of=TypeError,er=function(e,r){this.stopped=e,this.result=r},Ua=er.prototype;Ga.exports=function(e,r,t){var n=t&&t.that,i=!!(t&&t.AS_ENTRIES),o=!!(t&&t.IS_RECORD),s=!!(t&&t.IS_ITERATOR),u=!!(t&&t.INTERRUPTED),f=Hp(r,n),l,v,c,b,d,T,h,I=function(g){return l&&Fa(l,"normal",g),new er(!0,g)},y=function(g){return i?(Jp(g),u?f(g[0],g[1],I):f(g[0],g[1])):u?f(g,I):f(g)};if(o)l=e.iterator;else if(s)l=e;else{if(v=nf(e),!v)throw new of(Zp(e)+" is not iterable");if(ef(v)){for(c=0,b=rf(e);b>c;c++)if(d=y(e[c]),d&&Da(Ua,d))return d;return new er(!1)}l=tf(e,v)}for(T=o?e.next:l.next;!(h=Xp(T,l)).done;){try{d=y(h.value)}catch(g){Fa(l,"throw",g)}if(typeof d=="object"&&d&&Da(Ua,d))return d}return new er(!1)}});var Wa=a((eT,Qa)=>{"use strict";var af=A(),sf=J(),uf=fe();Qa.exports=function(e,r,t){af?sf.f(e,r,uf(0,t)):e[r]=t}});var $a=a(()=>{"use strict";var cf=at(),lf=Ba(),pf=Wa();cf({target:"Object",stat:!0},{fromEntries:function(r){var t={};return lf(r,function(n,i){pf(t,n,i)},{AS_ENTRIES:!0}),t}})});var Ka=a((nT,za)=>{"use strict";qt();$a();var ff=Ne();za.exports=ff.Object.fromEntries});var Ha=a((iT,Ya)=>{"use strict";Ya.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 Ja=a(()=>{"use strict";qt();var vf=Ha(),bf=O(),df=He(),Xa=Q();for(rr in vf)df(bf[rr],rr),Xa[rr]=Xa.Array;var rr});var es=a((sT,Za)=>{"use strict";var mf=Ka();Ja();Za.exports=mf});var ts=a((uT,rs)=>{"use strict";var Tf=es();rs.exports=Tf});var xf={};Ct(xf,{ErrorCategory:()=>vn,InterfaceLanguage:()=>os,Logger:()=>Ie,Observable:()=>p,Subject:()=>C,Subscription:()=>x,Tracer:()=>xe,VERSION:()=>Mt,VKNumericLanguage:()=>is,ValueSubject:()=>ie,VideoQuality:()=>Se,abortable:()=>Gt,addScript:()=>Ft,areQualitiesExact:()=>en,assertEmptyArray:()=>Dt,assertNever:()=>P,assertNonNullable:()=>Nt,assertNotEmptyArray:()=>Vt,assertNullable:()=>kt,assertQualityIsExact:()=>rn,buffer:()=>lr,checkNever:()=>jt,clearVideoElement:()=>an,clientChecker:()=>Bt,cloneDeep:()=>nn,cloneDeepWith:()=>te,combine:()=>sr,createURL:()=>Ss,debounce:()=>fr,debounceFn:()=>Re,detectEmbed:()=>Wt,fillWithDefault:()=>tn,filter:()=>mr,filterChanged:()=>hr,flattenObject:()=>ne,fromEvent:()=>pn,getExponentialDelay:()=>Qt,getHighestQuality:()=>Yt,getTraceSubscriptionMethod:()=>sn,interval:()=>cn,isHigher:()=>$t,isHigherOrEqual:()=>zt,isInvariantQuality:()=>qe,isLower:()=>Ee,isLowerOrEqual:()=>Kt,isMobile:()=>ir,isNonNullable:()=>G,isNullable:()=>we,isValidURL:()=>ws,loadVKLangPack:()=>yf,map:()=>oe,mapTo:()=>gr,merge:()=>ur,noop:()=>V,now:()=>Ut,observableFrom:()=>ln,observeElementSize:()=>on,once:()=>Ir,pairwise:()=>Or,safeStorage:()=>ar,tap:()=>Sr,throttle:()=>br,throttleFn:()=>Pe,timeCodeToString:()=>xs,timeout:()=>un,videoHeightToQuality:()=>Xt,videoQualityToHeight:()=>Zt,videoSizeToQuality:()=>Jt});module.exports=ds(xf);var Mt="1.0.50-dev.1326de93.0";var x=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 P=e=>{throw new Error(`${e} is value of unexpected type`)},jt=e=>{};var V=()=>{};var p=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{r(s)}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)},o;try{o=this._subscribe(i)}catch(s){i.error?.(s)}return new x().add(()=>{switch(i.next=V,i.error=V,typeof o){case"function":o();return;case"object":o.unsubscribe();return;case"undefined":return;default:return P(o)}})}pipe(...r){return r.reduce((t,n)=>n(t),this)}_subscribe(r){}};var C=class extends p{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 x().add(()=>this.subscribers.delete(n))}};var Ie=class{constructor(){this.log$=new C;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 Oe=require("@opentelemetry/api");var U=require("@tracer/opentelemetry"),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}},xe=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,f=new U.TracerMemorySpanExporter;this.spanExporter=u,s.addSpanProcessor(new U.TracerAllSpansProcessor({startedSpansExporter:u,endedSpansExporter:f})),this.tracer=s.getTracer("sdk-videoplayer-tracer")}else this.tracer=n;this.span=this.tracer.startSpan(r,{root:i},t),this.context=Oe.trace.setSpan(Oe.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 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 Nt(e,r='Assertion "value is not nullable" failed'){if(e==null)throw new Error(r)}function kt(e,r='Assertion "value is nullable" failed'){if(e!=null)throw new Error(r)}function G(e){return typeof e<"u"&&e!==null}function we(e){return e==null}function Vt(e,r){if(!e?.length)throw new Error(r)}function Dt(e,r){if(e?.length)throw new Error(r)}var Ft=(e,r,t)=>new Promise((n,i)=>{r.addEventListener("abort",()=>{u(),l.remove()});let o=()=>{u(),i()},s=()=>{u(),n()},u=()=>{f&&clearTimeout(f),l.removeEventListener("load",s),l.removeEventListener("error",o)},f;t&&(f=window.setTimeout(o,t));let l=document.createElement("script");l.addEventListener("load",s),l.addEventListener("error",o),l.src=e,document.head.appendChild(l)});var Ut=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var Gt=(e,r)=>async(...t)=>{let n=r(...t),i=e.aborted,o;for(;!i&&!e.aborted;)try{let s=await n.next(o);i=s.done??!1,o=s.value}catch(s){await n.throw(s)}return o};var ir=()=>/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion??navigator.userAgent)||navigator?.userAgentData?.mobile,nr=class{constructor(){this.detect()}get browser(){return this._currentBrowser}get device(){return this._currentDevice}get isTouch(){return this._maxTouchPoints>0}get isIOS(){return["iPhone","iPad","iPod"].includes(this.device)}get isMac(){return this.device==="Mac"}get isApple(){return this.isIOS||this.isMac}get isIphoneOrOldIpad(){if(!this.isApple||!this.isTouch)return!1;let r=this.device==="iPad"||window?.screen.width>700,t=this._iosVersion;return!r||r&&!!t&&t<16}get isAndroid(){return this.device==="Android"}get isMobile(){return this._isMobile}get iOSVersion(){return this._iosVersion}get macVersion(){return this._macVersion}get isYandex(){return this.browser==="Yandex"}get isSafari(){return this.browser==="Safari"}get isSamsungBrowser(){return this.browser==="SamsungBrowser"}get isHDR(){return this._isHdr}detect(){let{userAgent:r,maxTouchPoints:t}=navigator;try{this._maxTouchPoints=t,this._isHdr=!!matchMedia("(dynamic-range: high)")?.matches}catch(n){console.error(n)}try{this._isMobile=ir()}catch(n){console.error(n)}this.detectBrowser(r),this.detectDevice(r),this.isIOS&&this.detectIOSVersion(),this.isMac&&this.detectMacVersion()}detectBrowser(r){try{let t=/yabrowser/i.test(r)?"Yandex":void 0,n=/samsungbrowser/i.test(r)?"SamsungBrowser":void 0,i=/chrome|crios/i.test(r)?"Chrome":void 0,o=/chromium/i.test(r)?"Chromium":void 0,s=/firefox|fxios/i.test(r)?"Firefox":void 0,u=/webkit|safari|khtml/i.test(r)?"Safari":void 0,f=/opr\//i.test(r)?"Opera":void 0,l=/edg/i.test(r)?"Edge":void 0;this._currentBrowser=t||n||s||f||l||i||o||u||"Rest"}catch(t){console.error(t)}}detectDevice(r){try{let t=/android/i.test(r)?"Android":void 0,n=/iphone/i.test(r)?"iPhone":void 0,i=/ipad/i.test(r)?"iPad":void 0,o=/ipod/i.test(r)?"iPod":void 0,s=/mac/i.test(r)?"Mac":void 0,u=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(r)?"RestMobile":void 0;this._currentDevice=t||n||i||o||u||s||"Desktop"}catch(t){console.error(t)}}detectIOSVersion(){try{let{userAgent:r}=window.navigator,t=r.match(/Version\/(\d+(\.\d+)?)/i);if(!t)return;let n=t[1],i=parseFloat(n);if(isNaN(i))return;this._iosVersion=i}catch(r){console.error(r)}}detectMacVersion(){try{let{userAgent:r}=window.navigator,t=r.match(/Version\/(\d+)/);if(!t)return;let n=t[1],i=parseInt(n,10);if(isNaN(i))return;this._macVersion=i}catch(r){console.error(r)}}},Bt=new nr;var Qt=(e,{start:r=0,factor:t=2,max:n=1/0,min:i=r,random:o=0}={})=>{let s=r;return s*=t**e,s*=1+(Math.random()*o*2-o),s=Math.round(s),s=Math.min(s,n),s=Math.max(s,i),s};var ar={};Ct(ar,{clear:()=>Is,get:()=>Ts,has:()=>ys,isPersistent:()=>ms,remove:()=>gs,set:()=>hs});var z,B,or=`vk-videoplayer-dummy-key-${Math.random()}`,K=()=>{if(B!==void 0)return B;try{localStorage.setItem(or,"test"),localStorage.removeItem(or),B=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(or),B=1}catch(r){if(r instanceof DOMException||r instanceof TypeError)B=2;else throw r}else throw e}return B===2&&(z=new Map),B},ms=()=>K()===0,Ts=e=>{let r=K();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:P(r)}},hs=(e,r)=>{let t=K();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:return void z?.set(e,r);default:P(t)}},ys=e=>{let r=K();switch(r){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return z?.has(e)??!1;default:return P(r),!1}},gs=e=>{let r=K();switch(r){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:return void z?.delete(e);default:P(r)}},Is=()=>{let e=K();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return z?.clear();default:P(e)}};var Wt=()=>{let e,r;try{e=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?e=!0:(e=!1,console.error(n))}try{window.location.ancestorOrigins&&(r=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!r&&document.referrer&&(r=document.referrer)}catch(n){console.error(n)}let t=r?new URL(r).hostname:void 0;return{isEmbed:e,host:t}};var Se=(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))(Se||{});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}},$t=(e,r)=>S[e].height>S[r].height,zt=(e,r)=>S[e].height>=S[r].height,Ee=(e,r)=>S[e].height<S[r].height,Kt=(e,r)=>S[e].height<=S[r].height,Yt=e=>e.sort((r,t)=>r===t?0:r==="Invariant quality"?1:t==="Invariant quality"?-1:Ee(r,t)?1:-1)[0],Ht=Object.keys(S).sort((e,r)=>Ee(e,r)?-1:1),Xt=(e,r=.02)=>[...Ht].find(n=>S[n].height*(1+r)>=e),Jt=({width:e,height:r})=>{let t=Math.min(e,r),n=Math.max(e,r);return Ht.find(i=>{let o=S[i];return o.width>=n&&o.height>=t})},Zt=e=>S[e].height,qe=e=>e==="Invariant quality",en=e=>e.every(r=>!qe(r));function rn(e){if(qe(e))throw new Error("Expected exact quality")}var tn=(e,r)=>{let t={};for(let n of Object.keys(r)){let i=r[n],o=e[n];Array.isArray(i)&&Array.isArray(o)?t[n]=o:typeof i=="object"&&typeof o=="object"?t[n]=tn(o,i):t[n]=n in e?o:i}return t};var xs=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 Re(e,r=0,t){let n,i,o,s,u,f,l=0,v=!1,c=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(v=!!t.leading,c="maxWait"in t,o=t?.maxWait?Math.max(+t?.maxWait||0,r):o,b="trailing"in t?!!t.trailing:b);function T(m){let E=n,F=i;return n=i=void 0,l=m,s=e.apply(F,E),s}function h(m,E){return d?(u&&window.cancelAnimationFrame(u),window.requestAnimationFrame(m)):setTimeout(m,E)}function I(m){if(d){window.cancelAnimationFrame(m);return}clearTimeout(m)}function y(m){return l=m,u=h(he,r),v?T(m):s}function g(m){let E=m-f,F=m-l,At=r-E;return c?Math.min(At,o-F):At}function Pt(m){let E=m-f,F=m-l;return f===void 0||E>=r||E<0||c&&F>=o}function he(){let m=Date.now();if(Pt(m))return _t(m);u=h(he,g(m))}function _t(m){return u=void 0,b&&n?T(m):(n=i=void 0,s)}function as(){u!==void 0&&I(u),l=0,n=f=i=u=void 0}function ss(){return u===void 0?s:_t(Date.now())}function us(){return u!==void 0}function ye(...m){let E=Date.now(),F=Pt(E);if(n=m,i=this,f=E,F){if(u===void 0)return y(f);if(c)return u=h(he,r),T(f)}return u===void 0&&(u=h(he,r)),s}return ye.cancel=as,ye.flush=ss,ye.pending=us,ye}var Pe=(e,r=0,t)=>Re(e,r,{...{leading:!0,trailing:!0},...t,maxWait:r});var te=(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]=te(e[n],r):t[n]=e[n]}return t};var nn=e=>te(e);var Os=300,on=(e,r=Os)=>new p(t=>{let{width:n,height:i}=e.getBoundingClientRect();if(t.next({width:n,height:i}),!window.ResizeObserver)return;let o=new ResizeObserver(Pe(s=>{let u=s[0];if(!u)return;let f,l;u.contentBoxSize&&u.contentBoxSize[0]?(l=u.contentBoxSize[0].blockSize,f=u.contentBoxSize[0].inlineSize):u.contentRect&&(f=u.contentRect.width,l=u.contentRect.height),G(f)&&G(l)&&t.next({width:f,height:l})},r));return o.observe(e),()=>o.disconnect()});var ne=(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 o=ne(e[i],r-1);for(let s in o)o.hasOwnProperty(s)&&(n[i+t+s]=o[s])}else n[i]=e[i];return n};var an=e=>{e.removeAttribute("src"),e.load()};var ws=e=>{let r;try{r=new URL(e)}catch{return!1}return r.protocol==="https:"};var Ss=e=>{try{return new URL(e)}catch{return null}};var sn=e=>r=>t=>{let n=typeof t=="object";t==null||n&&!Object.keys(t).length||e(r,n?ne(t):{value:t})};var ie=class extends C{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}};function sr(e){return new p(r=>{let t={},n=Object.keys(e).length,i=o=>s=>{o in t||n--,t[o]=s,n===0&&r.next(t)};return Object.entries(e).reduce((o,[s,u])=>o.add(u.subscribe(i(s))),new x)})}function ur(...e){return new p(r=>e.reduce((t,n)=>t.add(n.subscribe(r)),new x))}var un=e=>new p(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 cn=e=>new p(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var ln=e=>new p(r=>{e.forEach(t=>r.next(t))});var pn=(e,r)=>new p(t=>{let n=i=>t.next(i);return e.addEventListener(r,n),()=>e.removeEventListener(r,n)});function lr(e){return r=>new p(t=>r.subscribe(new cr(t,e)))}var cr=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 Es={leading:!1,trailing:!0};function fr(e,r=Es){return t=>new p(n=>t.subscribe(new pr(n,e,r)))}var pr=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 qs={leading:!0,trailing:!1};function br(e,r=qs){return t=>new p(n=>t.subscribe(new vr(n,e,r)))}var vr=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,we(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 mr(e){return r=>new p(t=>r.subscribe(new dr(t,e)))}var dr=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)}};function hr(e=(r,t)=>r===t){return r=>new p(t=>r.subscribe(new Tr(t,e)))}var fn={},Tr=class{constructor(r,t){this.destination=r;this.predicate=t;this.lastValue=fn}next(r){let t;try{t=this.lastValue===fn||!this.predicate(this.lastValue,r),this.lastValue=r}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};function oe(e){return r=>new p(t=>r.subscribe(new yr(t,e)))}var yr=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 gr(e){return oe(()=>e)}function Ir(){return e=>new p(r=>{let t=!1,n=!1,i=e.subscribe(o=>{t||(t=!0,r.next(o)),n&&i.unsubscribe()},o=>{t=!0,r.error?.(o),n&&i.unsubscribe()});return n=!0,t&&i.unsubscribe(),i})}function Or(){return e=>new p(r=>e.subscribe(new xr(r)))}var xr=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 Sr(e){return r=>new p(t=>r.subscribe(new wr(t,e)))}var wr=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)}};var vn=(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))(vn||{});var _e=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,o=n.length;i<o;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,o=n.length;i<o;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}},Y=class extends _e{constructor(){super(),this.listeners||_e.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)}},ae=class{constructor(){Object.defineProperty(this,"signal",{value:new Y,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&&(ae.prototype[Symbol.toStringTag]="AbortController",Y.prototype[Symbol.toStringTag]="AbortSignal");function Ae(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 Er(e){typeof e=="function"&&(e={fetch:e});let{fetch:r,Request:t=r.Request,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!Ae({fetch:r,Request:t,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:r,Request:o};let o=t;(o&&!o.prototype.hasOwnProperty("signal")||i)&&(o=function(l,v){let c;v&&v.signal&&(c=v.signal,delete v.signal);let b=new t(l,v);return c&&Object.defineProperty(b,"signal",{writable:!1,enumerable:!1,configurable:!0,value:c}),b},o.prototype=t.prototype);let s=r;return{fetch:(f,l)=>{let v=o&&o.prototype.isPrototypeOf(f)?f.signal:l?l.signal:void 0;if(v){let c;try{c=new DOMException("Aborted","AbortError")}catch{c=new Error("Aborted"),c.name="AbortError"}if(v.aborted)return Promise.reject(c);let b=new Promise((d,T)=>{v.addEventListener("abort",()=>T(c),{once:!0})});return l&&l.signal&&delete l.signal,Promise.race([b,s(f,l)])}return s(f,l)},Request:o}}var se=Ae({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),bn=se?Er({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,dn=se?bn.fetch:window.fetch,md=se?bn.Request:window.Request,Td=se?ae:window.AbortController,hd=se?Y:window.AbortSignal;var ns=bs(ts(),1),is=(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))(is||{}),hf="vk.com",yf=async(e,r,t)=>{let n=new URL(`https://${hf}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",r),e!==void 0&&n.searchParams.set("lang",e);let o=await(await dn(n.toString())).json();return gf(o,t)},gf=(e,r)=>(0,ns.default)(Object.entries(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),If(n)])),If=e=>Array.isArray(e)?e[0]:e;var os=(t=>(t.RU="ru",t.EN="en",t))(os||{});
|
|
6
|
+
"use strict";var cs=Object.create;var ge=Object.defineProperty;var ls=Object.getOwnPropertyDescriptor;var ps=Object.getOwnPropertyNames;var fs=Object.getPrototypeOf,vs=Object.prototype.hasOwnProperty;var a=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Ct=(e,r)=>{for(var t in r)ge(e,t,{get:r[t],enumerable:!0})},Lt=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of ps(r))!vs.call(e,i)&&i!==t&&ge(e,i,{get:()=>r[i],enumerable:!(n=ls(r,i))||n.enumerable});return e};var bs=(e,r,t)=>(t=e!=null?cs(fs(e)):{},Lt(r||!e||!e.__esModule?ge(t,"default",{value:e,enumerable:!0}):t,e)),ds=e=>Lt(ge({},"__esModule",{value:!0}),e);var _=a((gd,mn)=>{"use strict";mn.exports=function(e){try{return!!e()}catch{return!0}}});var ue=a((Id,Tn)=>{"use strict";var Rs=_();Tn.exports=!Rs(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var L=a((xd,gn)=>{"use strict";var hn=ue(),yn=Function.prototype,qr=yn.call,Ps=hn&&yn.bind.bind(qr,qr);gn.exports=hn?Ps:function(e){return function(){return qr.apply(e,arguments)}}});var Ce=a((Od,xn)=>{"use strict";var In=L(),_s=In({}.toString),As=In("".slice);xn.exports=function(e){return As(_s(e),8,-1)}});var wn=a((wd,On)=>{"use strict";var Cs=L(),Ls=_(),Ms=Ce(),Rr=Object,js=Cs("".split);On.exports=Ls(function(){return!Rr("z").propertyIsEnumerable(0)})?function(e){return Ms(e)==="String"?js(e,""):Rr(e)}:Rr});var Le=a((Sd,Sn)=>{"use strict";Sn.exports=function(e){return e==null}});var Me=a((Ed,En)=>{"use strict";var Ns=Le(),ks=TypeError;En.exports=function(e){if(Ns(e))throw new ks("Can't call method on "+e);return e}});var H=a((qd,qn)=>{"use strict";var Vs=wn(),Ds=Me();qn.exports=function(e){return Vs(Ds(e))}});var Pn=a((Rd,Rn)=>{"use strict";Rn.exports=function(){}});var Q=a((Pd,_n)=>{"use strict";_n.exports={}});var O=a((Pr,An)=>{"use strict";var ce=function(e){return e&&e.Math===Math&&e};An.exports=ce(typeof globalThis=="object"&&globalThis)||ce(typeof window=="object"&&window)||ce(typeof self=="object"&&self)||ce(typeof global=="object"&&global)||ce(typeof Pr=="object"&&Pr)||function(){return this}()||Function("return this")()});var w=a((_d,Cn)=>{"use strict";var _r=typeof document=="object"&&document.all;Cn.exports=typeof _r>"u"&&_r!==void 0?function(e){return typeof e=="function"||e===_r}:function(e){return typeof e=="function"}});var jn=a((Ad,Mn)=>{"use strict";var Fs=O(),Us=w(),Ln=Fs.WeakMap;Mn.exports=Us(Ln)&&/native code/.test(String(Ln))});var M=a((Cd,Nn)=>{"use strict";var Gs=w();Nn.exports=function(e){return typeof e=="object"?e!==null:Gs(e)}});var A=a((Ld,kn)=>{"use strict";var Bs=_();kn.exports=!Bs(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var Cr=a((Md,Dn)=>{"use strict";var Qs=O(),Vn=M(),Ar=Qs.document,Ws=Vn(Ar)&&Vn(Ar.createElement);Dn.exports=function(e){return Ws?Ar.createElement(e):{}}});var Lr=a((jd,Fn)=>{"use strict";var $s=A(),zs=_(),Ks=Cr();Fn.exports=!$s&&!zs(function(){return Object.defineProperty(Ks("div"),"a",{get:function(){return 7}}).a!==7})});var Mr=a((Nd,Un)=>{"use strict";var Ys=A(),Hs=_();Un.exports=Ys&&Hs(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var W=a((kd,Gn)=>{"use strict";var Xs=M(),Js=String,Zs=TypeError;Gn.exports=function(e){if(Xs(e))return e;throw new Zs(Js(e)+" is not an object")}});var D=a((Vd,Bn)=>{"use strict";var eu=ue(),je=Function.prototype.call;Bn.exports=eu?je.bind(je):function(){return je.apply(je,arguments)}});var Ne=a((Dd,Qn)=>{"use strict";Qn.exports={}});var kr=a((Fd,$n)=>{"use strict";var jr=Ne(),Nr=O(),ru=w(),Wn=function(e){return ru(e)?e:void 0};$n.exports=function(e,r){return arguments.length<2?Wn(jr[e])||Wn(Nr[e]):jr[e]&&jr[e][r]||Nr[e]&&Nr[e][r]}});var Vr=a((Ud,zn)=>{"use strict";var tu=L();zn.exports=tu({}.isPrototypeOf)});var Xn=a((Gd,Hn)=>{"use strict";var nu=O(),Kn=nu.navigator,Yn=Kn&&Kn.userAgent;Hn.exports=Yn?String(Yn):""});var ii=a((Bd,ni)=>{"use strict";var ti=O(),Dr=Xn(),Jn=ti.process,Zn=ti.Deno,ei=Jn&&Jn.versions||Zn&&Zn.version,ri=ei&&ei.v8,q,ke;ri&&(q=ri.split("."),ke=q[0]>0&&q[0]<4?1:+(q[0]+q[1]));!ke&&Dr&&(q=Dr.match(/Edge\/(\d+)/),(!q||q[1]>=74)&&(q=Dr.match(/Chrome\/(\d+)/),q&&(ke=+q[1])));ni.exports=ke});var Fr=a((Qd,ai)=>{"use strict";var oi=ii(),iu=_(),ou=O(),au=ou.String;ai.exports=!!Object.getOwnPropertySymbols&&!iu(function(){var e=Symbol("symbol detection");return!au(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&oi&&oi<41})});var Ur=a((Wd,si)=>{"use strict";var su=Fr();si.exports=su&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Gr=a(($d,ui)=>{"use strict";var uu=kr(),cu=w(),lu=Vr(),pu=Ur(),fu=Object;ui.exports=pu?function(e){return typeof e=="symbol"}:function(e){var r=uu("Symbol");return cu(r)&&lu(r.prototype,fu(e))}});var Ve=a((zd,ci)=>{"use strict";var vu=String;ci.exports=function(e){try{return vu(e)}catch{return"Object"}}});var le=a((Kd,li)=>{"use strict";var bu=w(),du=Ve(),mu=TypeError;li.exports=function(e){if(bu(e))return e;throw new mu(du(e)+" is not a function")}});var De=a((Yd,pi)=>{"use strict";var Tu=le(),hu=Le();pi.exports=function(e,r){var t=e[r];return hu(t)?void 0:Tu(t)}});var vi=a((Hd,fi)=>{"use strict";var Br=D(),Qr=w(),Wr=M(),yu=TypeError;fi.exports=function(e,r){var t,n;if(r==="string"&&Qr(t=e.toString)&&!Wr(n=Br(t,e))||Qr(t=e.valueOf)&&!Wr(n=Br(t,e))||r!=="string"&&Qr(t=e.toString)&&!Wr(n=Br(t,e)))return n;throw new yu("Can't convert object to primitive value")}});var pe=a((Xd,bi)=>{"use strict";bi.exports=!0});var Ti=a((Jd,mi)=>{"use strict";var di=O(),gu=Object.defineProperty;mi.exports=function(e,r){try{gu(di,e,{value:r,configurable:!0,writable:!0})}catch{di[e]=r}return r}});var Fe=a((Zd,gi)=>{"use strict";var Iu=pe(),xu=O(),Ou=Ti(),hi="__core-js_shared__",yi=gi.exports=xu[hi]||Ou(hi,{});(yi.versions||(yi.versions=[])).push({version:"3.38.0",mode:Iu?"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=a((em,xi)=>{"use strict";var Ii=Fe();xi.exports=function(e,r){return Ii[e]||(Ii[e]=r||{})}});var zr=a((rm,Oi)=>{"use strict";var wu=Me(),Su=Object;Oi.exports=function(e){return Su(wu(e))}});var j=a((tm,wi)=>{"use strict";var Eu=L(),qu=zr(),Ru=Eu({}.hasOwnProperty);wi.exports=Object.hasOwn||function(r,t){return Ru(qu(r),t)}});var Kr=a((nm,Si)=>{"use strict";var Pu=L(),_u=0,Au=Math.random(),Cu=Pu(1 .toString);Si.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Cu(++_u+Au,36)}});var N=a((im,qi)=>{"use strict";var Lu=O(),Mu=$r(),Ei=j(),ju=Kr(),Nu=Fr(),ku=Ur(),X=Lu.Symbol,Yr=Mu("wks"),Vu=ku?X.for||X:X&&X.withoutSetter||ju;qi.exports=function(e){return Ei(Yr,e)||(Yr[e]=Nu&&Ei(X,e)?X[e]:Vu("Symbol."+e)),Yr[e]}});var Ai=a((om,_i)=>{"use strict";var Du=D(),Ri=M(),Pi=Gr(),Fu=De(),Uu=vi(),Gu=N(),Bu=TypeError,Qu=Gu("toPrimitive");_i.exports=function(e,r){if(!Ri(e)||Pi(e))return e;var t=Fu(e,Qu),n;if(t){if(r===void 0&&(r="default"),n=Du(t,e,r),!Ri(n)||Pi(n))return n;throw new Bu("Can't convert object to primitive value")}return r===void 0&&(r="number"),Uu(e,r)}});var Hr=a((am,Ci)=>{"use strict";var Wu=Ai(),$u=Gr();Ci.exports=function(e){var r=Wu(e,"string");return $u(r)?r:r+""}});var J=a(Mi=>{"use strict";var zu=A(),Ku=Lr(),Yu=Mr(),Ue=W(),Li=Hr(),Hu=TypeError,Xr=Object.defineProperty,Xu=Object.getOwnPropertyDescriptor,Jr="enumerable",Zr="configurable",et="writable";Mi.f=zu?Yu?function(r,t,n){if(Ue(r),t=Li(t),Ue(n),typeof r=="function"&&t==="prototype"&&"value"in n&&et in n&&!n[et]){var i=Xu(r,t);i&&i[et]&&(r[t]=n.value,n={configurable:Zr in n?n[Zr]:i[Zr],enumerable:Jr in n?n[Jr]:i[Jr],writable:!1})}return Xr(r,t,n)}:Xr:function(r,t,n){if(Ue(r),t=Li(t),Ue(n),Ku)try{return Xr(r,t,n)}catch{}if("get"in n||"set"in n)throw new Hu("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var fe=a((um,ji)=>{"use strict";ji.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var Z=a((cm,Ni)=>{"use strict";var Ju=A(),Zu=J(),ec=fe();Ni.exports=Ju?function(e,r,t){return Zu.f(e,r,ec(1,t))}:function(e,r,t){return e[r]=t,e}});var Ge=a((lm,Vi)=>{"use strict";var rc=$r(),tc=Kr(),ki=rc("keys");Vi.exports=function(e){return ki[e]||(ki[e]=tc(e))}});var Be=a((pm,Di)=>{"use strict";Di.exports={}});var Bi=a((fm,Gi)=>{"use strict";var nc=jn(),Ui=O(),ic=M(),oc=Z(),rt=j(),tt=Fe(),ac=Ge(),sc=Be(),Fi="Object already initialized",nt=Ui.TypeError,uc=Ui.WeakMap,Qe,ve,We,cc=function(e){return We(e)?ve(e):Qe(e,{})},lc=function(e){return function(r){var t;if(!ic(r)||(t=ve(r)).type!==e)throw new nt("Incompatible receiver, "+e+" required");return t}};nc||tt.state?(R=tt.state||(tt.state=new uc),R.get=R.get,R.has=R.has,R.set=R.set,Qe=function(e,r){if(R.has(e))throw new nt(Fi);return r.facade=e,R.set(e,r),r},ve=function(e){return R.get(e)||{}},We=function(e){return R.has(e)}):($=ac("state"),sc[$]=!0,Qe=function(e,r){if(rt(e,$))throw new nt(Fi);return r.facade=e,oc(e,$,r),r},ve=function(e){return rt(e,$)?e[$]:{}},We=function(e){return rt(e,$)});var R,$;Gi.exports={set:Qe,get:ve,has:We,enforce:cc,getterFor:lc}});var Ki=a((vm,zi)=>{"use strict";var pc=ue(),$i=Function.prototype,Qi=$i.apply,Wi=$i.call;zi.exports=typeof Reflect=="object"&&Reflect.apply||(pc?Wi.bind(Qi):function(){return Wi.apply(Qi,arguments)})});var it=a((bm,Yi)=>{"use strict";var fc=Ce(),vc=L();Yi.exports=function(e){if(fc(e)==="Function")return vc(e)}});var Zi=a(Ji=>{"use strict";var Hi={}.propertyIsEnumerable,Xi=Object.getOwnPropertyDescriptor,bc=Xi&&!Hi.call({1:2},1);Ji.f=bc?function(r){var t=Xi(this,r);return!!t&&t.enumerable}:Hi});var to=a(ro=>{"use strict";var dc=A(),mc=D(),Tc=Zi(),hc=fe(),yc=H(),gc=Hr(),Ic=j(),xc=Lr(),eo=Object.getOwnPropertyDescriptor;ro.f=dc?eo:function(r,t){if(r=yc(r),t=gc(t),xc)try{return eo(r,t)}catch{}if(Ic(r,t))return hc(!mc(Tc.f,r,t),r[t])}});var io=a((Tm,no)=>{"use strict";var Oc=_(),wc=w(),Sc=/#|\.prototype\./,be=function(e,r){var t=qc[Ec(e)];return t===Pc?!0:t===Rc?!1:wc(r)?Oc(r):!!r},Ec=be.normalize=function(e){return String(e).replace(Sc,".").toLowerCase()},qc=be.data={},Rc=be.NATIVE="N",Pc=be.POLYFILL="P";no.exports=be});var ot=a((hm,ao)=>{"use strict";var oo=it(),_c=le(),Ac=ue(),Cc=oo(oo.bind);ao.exports=function(e,r){return _c(e),r===void 0?e:Ac?Cc(e,r):function(){return e.apply(r,arguments)}}});var at=a((ym,uo)=>{"use strict";var de=O(),Lc=Ki(),Mc=it(),jc=w(),Nc=to().f,kc=io(),ee=Ne(),Vc=ot(),re=Z(),so=j();Fe();var Dc=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 Lc(e,this,arguments)};return r.prototype=e.prototype,r};uo.exports=function(e,r){var t=e.target,n=e.global,i=e.stat,o=e.proto,s=n?de:i?de[t]:de[t]&&de[t].prototype,u=n?ee:ee[t]||re(ee,t,{})[t],f=u.prototype,l,v,c,b,d,T,h,I,y;for(b in r)l=kc(n?b:t+(i?".":"#")+b,e.forced),v=!l&&s&&so(s,b),T=u[b],v&&(e.dontCallGetSet?(y=Nc(s,b),h=y&&y.value):h=s[b]),d=v&&h?h:r[b],!(!l&&!o&&typeof T==typeof d)&&(e.bind&&v?I=Vc(d,de):e.wrap&&v?I=Dc(d):o&&jc(d)?I=Mc(d):I=d,(e.sham||d&&d.sham||T&&T.sham)&&re(I,"sham",!0),re(u,b,I),o&&(c=t+"Prototype",so(ee,c)||re(ee,c,{}),re(ee[c],b,d),e.real&&f&&(l||!f[b])&&re(f,b,d)))}});var po=a((gm,lo)=>{"use strict";var st=A(),Fc=j(),co=Function.prototype,Uc=st&&Object.getOwnPropertyDescriptor,ut=Fc(co,"name"),Gc=ut&&function(){}.name==="something",Bc=ut&&(!st||st&&Uc(co,"name").configurable);lo.exports={EXISTS:ut,PROPER:Gc,CONFIGURABLE:Bc}});var vo=a((Im,fo)=>{"use strict";var Qc=Math.ceil,Wc=Math.floor;fo.exports=Math.trunc||function(r){var t=+r;return(t>0?Wc:Qc)(t)}});var ct=a((xm,bo)=>{"use strict";var $c=vo();bo.exports=function(e){var r=+e;return r!==r||r===0?0:$c(r)}});var To=a((Om,mo)=>{"use strict";var zc=ct(),Kc=Math.max,Yc=Math.min;mo.exports=function(e,r){var t=zc(e);return t<0?Kc(t+r,0):Yc(t,r)}});var yo=a((wm,ho)=>{"use strict";var Hc=ct(),Xc=Math.min;ho.exports=function(e){var r=Hc(e);return r>0?Xc(r,9007199254740991):0}});var lt=a((Sm,go)=>{"use strict";var Jc=yo();go.exports=function(e){return Jc(e.length)}});var Oo=a((Em,xo)=>{"use strict";var Zc=H(),el=To(),rl=lt(),Io=function(e){return function(r,t,n){var i=Zc(r),o=rl(i);if(o===0)return!e&&-1;var s=el(n,o),u;if(e&&t!==t){for(;o>s;)if(u=i[s++],u!==u)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===t)return e||s||0;return!e&&-1}};xo.exports={includes:Io(!0),indexOf:Io(!1)}});var Eo=a((qm,So)=>{"use strict";var tl=L(),pt=j(),nl=H(),il=Oo().indexOf,ol=Be(),wo=tl([].push);So.exports=function(e,r){var t=nl(e),n=0,i=[],o;for(o in t)!pt(ol,o)&&pt(t,o)&&wo(i,o);for(;r.length>n;)pt(t,o=r[n++])&&(~il(i,o)||wo(i,o));return i}});var ft=a((Rm,qo)=>{"use strict";qo.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Po=a((Pm,Ro)=>{"use strict";var al=Eo(),sl=ft();Ro.exports=Object.keys||function(r){return al(r,sl)}});var Ao=a(_o=>{"use strict";var ul=A(),cl=Mr(),ll=J(),pl=W(),fl=H(),vl=Po();_o.f=ul&&!cl?Object.defineProperties:function(r,t){pl(r);for(var n=fl(t),i=vl(t),o=i.length,s=0,u;o>s;)ll.f(r,u=i[s++],n[u]);return r}});var Lo=a((Am,Co)=>{"use strict";var bl=kr();Co.exports=bl("document","documentElement")});var mt=a((Cm,Fo)=>{"use strict";var dl=W(),ml=Ao(),Mo=ft(),Tl=Be(),hl=Lo(),yl=Cr(),gl=Ge(),jo=">",No="<",bt="prototype",dt="script",Vo=gl("IE_PROTO"),vt=function(){},Do=function(e){return No+dt+jo+e+No+"/"+dt+jo},ko=function(e){e.write(Do("")),e.close();var r=e.parentWindow.Object;return e=null,r},Il=function(){var e=yl("iframe"),r="java"+dt+":",t;return e.style.display="none",hl.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(Do("document.F=Object")),t.close(),t.F},$e,ze=function(){try{$e=new ActiveXObject("htmlfile")}catch{}ze=typeof document<"u"?document.domain&&$e?ko($e):Il():ko($e);for(var e=Mo.length;e--;)delete ze[bt][Mo[e]];return ze()};Tl[Vo]=!0;Fo.exports=Object.create||function(r,t){var n;return r!==null?(vt[bt]=dl(r),n=new vt,vt[bt]=null,n[Vo]=r):n=ze(),t===void 0?n:ml.f(n,t)}});var Go=a((Lm,Uo)=>{"use strict";var xl=_();Uo.exports=!xl(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var ht=a((Mm,Qo)=>{"use strict";var Ol=j(),wl=w(),Sl=zr(),El=Ge(),ql=Go(),Bo=El("IE_PROTO"),Tt=Object,Rl=Tt.prototype;Qo.exports=ql?Tt.getPrototypeOf:function(e){var r=Sl(e);if(Ol(r,Bo))return r[Bo];var t=r.constructor;return wl(t)&&r instanceof t?t.prototype:r instanceof Tt?Rl:null}});var yt=a((jm,Wo)=>{"use strict";var Pl=Z();Wo.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:Pl(e,r,t),e}});var Ot=a((Nm,Ko)=>{"use strict";var _l=_(),Al=w(),Cl=M(),Ll=mt(),$o=ht(),Ml=yt(),jl=N(),Nl=pe(),xt=jl("iterator"),zo=!1,k,gt,It;[].keys&&(It=[].keys(),"next"in It?(gt=$o($o(It)),gt!==Object.prototype&&(k=gt)):zo=!0);var kl=!Cl(k)||_l(function(){var e={};return k[xt].call(e)!==e});kl?k={}:Nl&&(k=Ll(k));Al(k[xt])||Ml(k,xt,function(){return this});Ko.exports={IteratorPrototype:k,BUGGY_SAFARI_ITERATORS:zo}});var Ke=a((km,Ho)=>{"use strict";var Vl=N(),Dl=Vl("toStringTag"),Yo={};Yo[Dl]="z";Ho.exports=String(Yo)==="[object z]"});var wt=a((Vm,Xo)=>{"use strict";var Fl=Ke(),Ul=w(),Ye=Ce(),Gl=N(),Bl=Gl("toStringTag"),Ql=Object,Wl=Ye(function(){return arguments}())==="Arguments",$l=function(e,r){try{return e[r]}catch{}};Xo.exports=Fl?Ye:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=$l(r=Ql(e),Bl))=="string"?t:Wl?Ye(r):(n=Ye(r))==="Object"&&Ul(r.callee)?"Arguments":n}});var Zo=a((Dm,Jo)=>{"use strict";var zl=Ke(),Kl=wt();Jo.exports=zl?{}.toString:function(){return"[object "+Kl(this)+"]"}});var He=a((Fm,ra)=>{"use strict";var Yl=Ke(),Hl=J().f,Xl=Z(),Jl=j(),Zl=Zo(),ep=N(),ea=ep("toStringTag");ra.exports=function(e,r,t,n){var i=t?e:e&&e.prototype;i&&(Jl(i,ea)||Hl(i,ea,{configurable:!0,value:r}),n&&!Yl&&Xl(i,"toString",Zl))}});var na=a((Um,ta)=>{"use strict";var rp=Ot().IteratorPrototype,tp=mt(),np=fe(),ip=He(),op=Q(),ap=function(){return this};ta.exports=function(e,r,t,n){var i=r+" Iterator";return e.prototype=tp(rp,{next:np(+!n,t)}),ip(e,i,!1,!0),op[i]=ap,e}});var oa=a((Gm,ia)=>{"use strict";var sp=L(),up=le();ia.exports=function(e,r,t){try{return sp(up(Object.getOwnPropertyDescriptor(e,r)[t]))}catch{}}});var sa=a((Bm,aa)=>{"use strict";var cp=M();aa.exports=function(e){return cp(e)||e===null}});var ca=a((Qm,ua)=>{"use strict";var lp=sa(),pp=String,fp=TypeError;ua.exports=function(e){if(lp(e))return e;throw new fp("Can't set "+pp(e)+" as a prototype")}});var pa=a((Wm,la)=>{"use strict";var vp=oa(),bp=M(),dp=Me(),mp=ca();la.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=vp(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch{}return function(i,o){return dp(i),mp(o),bp(i)&&(e?t(i,o):i.__proto__=o),i}}():void 0)});var xa=a(($m,Ia)=>{"use strict";var Tp=at(),hp=D(),Xe=pe(),ya=po(),yp=w(),gp=na(),fa=ht(),va=pa(),Ip=He(),xp=Z(),St=yt(),Op=N(),ba=Q(),ga=Ot(),wp=ya.PROPER,Sp=ya.CONFIGURABLE,da=ga.IteratorPrototype,Je=ga.BUGGY_SAFARI_ITERATORS,me=Op("iterator"),ma="keys",Te="values",Ta="entries",ha=function(){return this};Ia.exports=function(e,r,t,n,i,o,s){gp(t,r,n);var u=function(y){if(y===i&&b)return b;if(!Je&&y&&y in v)return v[y];switch(y){case ma:return function(){return new t(this,y)};case Te:return function(){return new t(this,y)};case Ta:return function(){return new t(this,y)}}return function(){return new t(this)}},f=r+" Iterator",l=!1,v=e.prototype,c=v[me]||v["@@iterator"]||i&&v[i],b=!Je&&c||u(i),d=r==="Array"&&v.entries||c,T,h,I;if(d&&(T=fa(d.call(new e)),T!==Object.prototype&&T.next&&(!Xe&&fa(T)!==da&&(va?va(T,da):yp(T[me])||St(T,me,ha)),Ip(T,f,!0,!0),Xe&&(ba[f]=ha))),wp&&i===Te&&c&&c.name!==Te&&(!Xe&&Sp?xp(v,"name",Te):(l=!0,b=function(){return hp(c,this)})),i)if(h={values:u(Te),keys:o?b:u(ma),entries:u(Ta)},s)for(I in h)(Je||l||!(I in v))&&St(v,I,h[I]);else Tp({target:r,proto:!0,forced:Je||l},h);return(!Xe||s)&&v[me]!==b&&St(v,me,b,{name:i}),ba[r]=b,h}});var wa=a((zm,Oa)=>{"use strict";Oa.exports=function(e,r){return{value:e,done:r}}});var qt=a((Km,Pa)=>{"use strict";var Ep=H(),Et=Pn(),Sa=Q(),qa=Bi(),qp=J().f,Rp=xa(),Ze=wa(),Pp=pe(),_p=A(),Ra="Array Iterator",Ap=qa.set,Cp=qa.getterFor(Ra);Pa.exports=Rp(Array,"Array",function(e,r){Ap(this,{type:Ra,target:Ep(e),index:0,kind:r})},function(){var e=Cp(this),r=e.target,t=e.index++;if(!r||t>=r.length)return e.target=void 0,Ze(void 0,!0);switch(e.kind){case"keys":return Ze(t,!1);case"values":return Ze(r[t],!1)}return Ze([t,r[t]],!1)},"values");var Ea=Sa.Arguments=Sa.Array;Et("keys");Et("values");Et("entries");if(!Pp&&_p&&Ea.name!=="values")try{qp(Ea,"name",{value:"values"})}catch{}});var Aa=a((Ym,_a)=>{"use strict";var Lp=N(),Mp=Q(),jp=Lp("iterator"),Np=Array.prototype;_a.exports=function(e){return e!==void 0&&(Mp.Array===e||Np[jp]===e)}});var Rt=a((Hm,La)=>{"use strict";var kp=wt(),Ca=De(),Vp=Le(),Dp=Q(),Fp=N(),Up=Fp("iterator");La.exports=function(e){if(!Vp(e))return Ca(e,Up)||Ca(e,"@@iterator")||Dp[kp(e)]}});var ja=a((Xm,Ma)=>{"use strict";var Gp=D(),Bp=le(),Qp=W(),Wp=Ve(),$p=Rt(),zp=TypeError;Ma.exports=function(e,r){var t=arguments.length<2?$p(e):r;if(Bp(t))return Qp(Gp(t,e));throw new zp(Wp(e)+" is not iterable")}});var Va=a((Jm,ka)=>{"use strict";var Kp=D(),Na=W(),Yp=De();ka.exports=function(e,r,t){var n,i;Na(e);try{if(n=Yp(e,"return"),!n){if(r==="throw")throw t;return t}n=Kp(n,e)}catch(o){i=!0,n=o}if(r==="throw")throw t;if(i)throw n;return Na(n),t}});var Ba=a((Zm,Ga)=>{"use strict";var Hp=ot(),Xp=D(),Jp=W(),Zp=Ve(),ef=Aa(),rf=lt(),Da=Vr(),tf=ja(),nf=Rt(),Fa=Va(),of=TypeError,er=function(e,r){this.stopped=e,this.result=r},Ua=er.prototype;Ga.exports=function(e,r,t){var n=t&&t.that,i=!!(t&&t.AS_ENTRIES),o=!!(t&&t.IS_RECORD),s=!!(t&&t.IS_ITERATOR),u=!!(t&&t.INTERRUPTED),f=Hp(r,n),l,v,c,b,d,T,h,I=function(g){return l&&Fa(l,"normal",g),new er(!0,g)},y=function(g){return i?(Jp(g),u?f(g[0],g[1],I):f(g[0],g[1])):u?f(g,I):f(g)};if(o)l=e.iterator;else if(s)l=e;else{if(v=nf(e),!v)throw new of(Zp(e)+" is not iterable");if(ef(v)){for(c=0,b=rf(e);b>c;c++)if(d=y(e[c]),d&&Da(Ua,d))return d;return new er(!1)}l=tf(e,v)}for(T=o?e.next:l.next;!(h=Xp(T,l)).done;){try{d=y(h.value)}catch(g){Fa(l,"throw",g)}if(typeof d=="object"&&d&&Da(Ua,d))return d}return new er(!1)}});var Wa=a((eT,Qa)=>{"use strict";var af=A(),sf=J(),uf=fe();Qa.exports=function(e,r,t){af?sf.f(e,r,uf(0,t)):e[r]=t}});var $a=a(()=>{"use strict";var cf=at(),lf=Ba(),pf=Wa();cf({target:"Object",stat:!0},{fromEntries:function(r){var t={};return lf(r,function(n,i){pf(t,n,i)},{AS_ENTRIES:!0}),t}})});var Ka=a((nT,za)=>{"use strict";qt();$a();var ff=Ne();za.exports=ff.Object.fromEntries});var Ha=a((iT,Ya)=>{"use strict";Ya.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 Ja=a(()=>{"use strict";qt();var vf=Ha(),bf=O(),df=He(),Xa=Q();for(rr in vf)df(bf[rr],rr),Xa[rr]=Xa.Array;var rr});var es=a((sT,Za)=>{"use strict";var mf=Ka();Ja();Za.exports=mf});var ts=a((uT,rs)=>{"use strict";var Tf=es();rs.exports=Tf});var xf={};Ct(xf,{ErrorCategory:()=>vn,InterfaceLanguage:()=>os,Logger:()=>Ie,Observable:()=>p,Subject:()=>C,Subscription:()=>x,Tracer:()=>xe,VERSION:()=>Mt,VKNumericLanguage:()=>is,ValueSubject:()=>ie,VideoQuality:()=>Se,abortable:()=>Gt,addScript:()=>Ft,areQualitiesExact:()=>en,assertEmptyArray:()=>Dt,assertNever:()=>P,assertNonNullable:()=>Nt,assertNotEmptyArray:()=>Vt,assertNullable:()=>kt,assertQualityIsExact:()=>rn,buffer:()=>lr,checkNever:()=>jt,clearVideoElement:()=>an,clientChecker:()=>Bt,cloneDeep:()=>nn,cloneDeepWith:()=>te,combine:()=>sr,createURL:()=>Ss,debounce:()=>fr,debounceFn:()=>Re,detectEmbed:()=>Wt,fillWithDefault:()=>tn,filter:()=>mr,filterChanged:()=>hr,flattenObject:()=>ne,fromEvent:()=>pn,getExponentialDelay:()=>Qt,getHighestQuality:()=>Yt,getTraceSubscriptionMethod:()=>sn,interval:()=>cn,isHigher:()=>$t,isHigherOrEqual:()=>zt,isInvariantQuality:()=>qe,isLower:()=>Ee,isLowerOrEqual:()=>Kt,isMobile:()=>ir,isNonNullable:()=>G,isNullable:()=>we,isValidURL:()=>ws,loadVKLangPack:()=>yf,map:()=>oe,mapTo:()=>gr,merge:()=>ur,noop:()=>V,now:()=>Ut,observableFrom:()=>ln,observeElementSize:()=>on,once:()=>Ir,pairwise:()=>Or,safeStorage:()=>ar,tap:()=>Sr,throttle:()=>br,throttleFn:()=>Pe,timeCodeToString:()=>xs,timeout:()=>un,videoHeightToQuality:()=>Xt,videoQualityToHeight:()=>Zt,videoSizeToQuality:()=>Jt});module.exports=ds(xf);var Mt="1.0.50-dev.eaae0302.0";var x=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 P=e=>{throw new Error(`${e} is value of unexpected type`)},jt=e=>{};var V=()=>{};var p=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{r(s)}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)},o;try{o=this._subscribe(i)}catch(s){i.error?.(s)}return new x().add(()=>{switch(i.next=V,i.error=V,typeof o){case"function":o();return;case"object":o.unsubscribe();return;case"undefined":return;default:return P(o)}})}pipe(...r){return r.reduce((t,n)=>n(t),this)}_subscribe(r){}};var C=class extends p{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 x().add(()=>this.subscribers.delete(n))}};var Ie=class{constructor(){this.log$=new C;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 Oe=require("@opentelemetry/api");var U=require("@tracer/opentelemetry"),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}},xe=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,f=new U.TracerMemorySpanExporter;this.spanExporter=u,s.addSpanProcessor(new U.TracerAllSpansProcessor({startedSpansExporter:u,endedSpansExporter:f})),this.tracer=s.getTracer("sdk-videoplayer-tracer")}else this.tracer=n;this.span=this.tracer.startSpan(r,{root:i},t),this.context=Oe.trace.setSpan(Oe.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 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 Nt(e,r='Assertion "value is not nullable" failed'){if(e==null)throw new Error(r)}function kt(e,r='Assertion "value is nullable" failed'){if(e!=null)throw new Error(r)}function G(e){return typeof e<"u"&&e!==null}function we(e){return e==null}function Vt(e,r){if(!e?.length)throw new Error(r)}function Dt(e,r){if(e?.length)throw new Error(r)}var Ft=(e,r,t)=>new Promise((n,i)=>{r.addEventListener("abort",()=>{u(),l.remove()});let o=()=>{u(),i()},s=()=>{u(),n()},u=()=>{f&&clearTimeout(f),l.removeEventListener("load",s),l.removeEventListener("error",o)},f;t&&(f=window.setTimeout(o,t));let l=document.createElement("script");l.addEventListener("load",s),l.addEventListener("error",o),l.src=e,document.head.appendChild(l)});var Ut=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var Gt=(e,r)=>async(...t)=>{let n=r(...t),i=e.aborted,o;for(;!i&&!e.aborted;)try{let s=await n.next(o);i=s.done??!1,o=s.value}catch(s){await n.throw(s)}return o};var ir=()=>/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion??navigator.userAgent)||navigator?.userAgentData?.mobile,nr=class{constructor(){this.detect()}get browser(){return this._currentBrowser}get device(){return this._currentDevice}get isTouch(){return this._maxTouchPoints>0}get isIOS(){return["iPhone","iPad","iPod"].includes(this.device)}get isMac(){return this.device==="Mac"}get isApple(){return this.isIOS||this.isMac}get isIphoneOrOldIpad(){if(!this.isApple||!this.isTouch)return!1;let r=this.device==="iPad"||window?.screen.width>700,t=this._iosVersion;return!r||r&&!!t&&t<16}get isAndroid(){return this.device==="Android"}get isMobile(){return this._isMobile}get iOSVersion(){return this._iosVersion}get macVersion(){return this._macVersion}get isYandex(){return this.browser==="Yandex"}get isSafari(){return this.browser==="Safari"}get isSamsungBrowser(){return this.browser==="SamsungBrowser"}get isHDR(){return this._isHdr}detect(){let{userAgent:r,maxTouchPoints:t}=navigator;try{this._maxTouchPoints=t,this._isHdr=!!matchMedia("(dynamic-range: high)")?.matches}catch(n){console.error(n)}try{this._isMobile=ir()}catch(n){console.error(n)}this.detectBrowser(r),this.detectDevice(r),this.isIOS&&this.detectIOSVersion(),this.isMac&&this.detectMacVersion()}detectBrowser(r){try{let t=/yabrowser/i.test(r)?"Yandex":void 0,n=/samsungbrowser/i.test(r)?"SamsungBrowser":void 0,i=/chrome|crios/i.test(r)?"Chrome":void 0,o=/chromium/i.test(r)?"Chromium":void 0,s=/firefox|fxios/i.test(r)?"Firefox":void 0,u=/webkit|safari|khtml/i.test(r)?"Safari":void 0,f=/opr\//i.test(r)?"Opera":void 0,l=/edg/i.test(r)?"Edge":void 0;this._currentBrowser=t||n||s||f||l||i||o||u||"Rest"}catch(t){console.error(t)}}detectDevice(r){try{let t=/android/i.test(r)?"Android":void 0,n=/iphone/i.test(r)?"iPhone":void 0,i=/ipad/i.test(r)?"iPad":void 0,o=/ipod/i.test(r)?"iPod":void 0,s=/mac/i.test(r)?"Mac":void 0,u=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(r)?"RestMobile":void 0;this._currentDevice=t||n||i||o||u||s||"Desktop"}catch(t){console.error(t)}}detectIOSVersion(){try{let{userAgent:r}=window.navigator,t=r.match(/Version\/(\d+(\.\d+)?)/i);if(!t)return;let n=t[1],i=parseFloat(n);if(isNaN(i))return;this._iosVersion=i}catch(r){console.error(r)}}detectMacVersion(){try{let{userAgent:r}=window.navigator,t=r.match(/Version\/(\d+)/);if(!t)return;let n=t[1],i=parseInt(n,10);if(isNaN(i))return;this._macVersion=i}catch(r){console.error(r)}}},Bt=new nr;var Qt=(e,{start:r=0,factor:t=2,max:n=1/0,min:i=r,random:o=0}={})=>{let s=r;return s*=t**e,s*=1+(Math.random()*o*2-o),s=Math.round(s),s=Math.min(s,n),s=Math.max(s,i),s};var ar={};Ct(ar,{clear:()=>Is,get:()=>Ts,has:()=>ys,isPersistent:()=>ms,remove:()=>gs,set:()=>hs});var z,B,or=`vk-videoplayer-dummy-key-${Math.random()}`,K=()=>{if(B!==void 0)return B;try{localStorage.setItem(or,"test"),localStorage.removeItem(or),B=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(or),B=1}catch(r){if(r instanceof DOMException||r instanceof TypeError)B=2;else throw r}else throw e}return B===2&&(z=new Map),B},ms=()=>K()===0,Ts=e=>{let r=K();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:P(r)}},hs=(e,r)=>{let t=K();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:return void z?.set(e,r);default:P(t)}},ys=e=>{let r=K();switch(r){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return z?.has(e)??!1;default:return P(r),!1}},gs=e=>{let r=K();switch(r){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:return void z?.delete(e);default:P(r)}},Is=()=>{let e=K();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return z?.clear();default:P(e)}};var Wt=()=>{let e,r;try{e=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?e=!0:(e=!1,console.error(n))}try{window.location.ancestorOrigins&&(r=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!r&&document.referrer&&(r=document.referrer)}catch(n){console.error(n)}let t=r?new URL(r).hostname:void 0;return{isEmbed:e,host:t}};var Se=(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))(Se||{});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}},$t=(e,r)=>S[e].height>S[r].height,zt=(e,r)=>S[e].height>=S[r].height,Ee=(e,r)=>S[e].height<S[r].height,Kt=(e,r)=>S[e].height<=S[r].height,Yt=e=>e.sort((r,t)=>r===t?0:r==="Invariant quality"?1:t==="Invariant quality"?-1:Ee(r,t)?1:-1)[0],Ht=Object.keys(S).sort((e,r)=>Ee(e,r)?-1:1),Xt=(e,r=.02)=>[...Ht].find(n=>S[n].height*(1+r)>=e),Jt=({width:e,height:r})=>{let t=Math.min(e,r),n=Math.max(e,r);return Ht.find(i=>{let o=S[i];return o.width>=n&&o.height>=t})},Zt=e=>S[e].height,qe=e=>e==="Invariant quality",en=e=>e.every(r=>!qe(r));function rn(e){if(qe(e))throw new Error("Expected exact quality")}var tn=(e,r)=>{let t={};for(let n of Object.keys(r)){let i=r[n],o=e[n];Array.isArray(i)&&Array.isArray(o)?t[n]=o:typeof i=="object"&&typeof o=="object"?t[n]=tn(o,i):t[n]=n in e?o:i}return t};var xs=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 Re(e,r=0,t){let n,i,o,s,u,f,l=0,v=!1,c=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(v=!!t.leading,c="maxWait"in t,o=t?.maxWait?Math.max(+t?.maxWait||0,r):o,b="trailing"in t?!!t.trailing:b);function T(m){let E=n,F=i;return n=i=void 0,l=m,s=e.apply(F,E),s}function h(m,E){return d?(u&&window.cancelAnimationFrame(u),window.requestAnimationFrame(m)):setTimeout(m,E)}function I(m){if(d){window.cancelAnimationFrame(m);return}clearTimeout(m)}function y(m){return l=m,u=h(he,r),v?T(m):s}function g(m){let E=m-f,F=m-l,At=r-E;return c?Math.min(At,o-F):At}function Pt(m){let E=m-f,F=m-l;return f===void 0||E>=r||E<0||c&&F>=o}function he(){let m=Date.now();if(Pt(m))return _t(m);u=h(he,g(m))}function _t(m){return u=void 0,b&&n?T(m):(n=i=void 0,s)}function as(){u!==void 0&&I(u),l=0,n=f=i=u=void 0}function ss(){return u===void 0?s:_t(Date.now())}function us(){return u!==void 0}function ye(...m){let E=Date.now(),F=Pt(E);if(n=m,i=this,f=E,F){if(u===void 0)return y(f);if(c)return u=h(he,r),T(f)}return u===void 0&&(u=h(he,r)),s}return ye.cancel=as,ye.flush=ss,ye.pending=us,ye}var Pe=(e,r=0,t)=>Re(e,r,{...{leading:!0,trailing:!0},...t,maxWait:r});var te=(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]=te(e[n],r):t[n]=e[n]}return t};var nn=e=>te(e);var Os=300,on=(e,r=Os)=>new p(t=>{let{width:n,height:i}=e.getBoundingClientRect();if(t.next({width:n,height:i}),!window.ResizeObserver)return;let o=new ResizeObserver(Pe(s=>{let u=s[0];if(!u)return;let f,l;u.contentBoxSize&&u.contentBoxSize[0]?(l=u.contentBoxSize[0].blockSize,f=u.contentBoxSize[0].inlineSize):u.contentRect&&(f=u.contentRect.width,l=u.contentRect.height),G(f)&&G(l)&&t.next({width:f,height:l})},r));return o.observe(e),()=>o.disconnect()});var ne=(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 o=ne(e[i],r-1);for(let s in o)o.hasOwnProperty(s)&&(n[i+t+s]=o[s])}else n[i]=e[i];return n};var an=e=>{e.removeAttribute("src"),e.load()};var ws=e=>{let r;try{r=new URL(e)}catch{return!1}return r.protocol==="https:"};var Ss=e=>{try{return new URL(e)}catch{return null}};var sn=e=>r=>t=>{let n=typeof t=="object";t==null||n&&!Object.keys(t).length||e(r,n?ne(t):{value:t})};var ie=class extends C{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}};function sr(e){return new p(r=>{let t={},n=Object.keys(e).length,i=o=>s=>{o in t||n--,t[o]=s,n===0&&r.next(t)};return Object.entries(e).reduce((o,[s,u])=>o.add(u.subscribe(i(s))),new x)})}function ur(...e){return new p(r=>e.reduce((t,n)=>t.add(n.subscribe(r)),new x))}var un=e=>new p(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 cn=e=>new p(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var ln=e=>new p(r=>{e.forEach(t=>r.next(t))});var pn=(e,r)=>new p(t=>{let n=i=>t.next(i);return e.addEventListener(r,n),()=>e.removeEventListener(r,n)});function lr(e){return r=>new p(t=>r.subscribe(new cr(t,e)))}var cr=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 Es={leading:!1,trailing:!0};function fr(e,r=Es){return t=>new p(n=>t.subscribe(new pr(n,e,r)))}var pr=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 qs={leading:!0,trailing:!1};function br(e,r=qs){return t=>new p(n=>t.subscribe(new vr(n,e,r)))}var vr=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,we(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 mr(e){return r=>new p(t=>r.subscribe(new dr(t,e)))}var dr=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)}};function hr(e=(r,t)=>r===t){return r=>new p(t=>r.subscribe(new Tr(t,e)))}var fn={},Tr=class{constructor(r,t){this.destination=r;this.predicate=t;this.lastValue=fn}next(r){let t;try{t=this.lastValue===fn||!this.predicate(this.lastValue,r),this.lastValue=r}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};function oe(e){return r=>new p(t=>r.subscribe(new yr(t,e)))}var yr=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 gr(e){return oe(()=>e)}function Ir(){return e=>new p(r=>{let t=!1,n=!1,i=e.subscribe(o=>{t||(t=!0,r.next(o)),n&&i.unsubscribe()},o=>{t=!0,r.error?.(o),n&&i.unsubscribe()});return n=!0,t&&i.unsubscribe(),i})}function Or(){return e=>new p(r=>e.subscribe(new xr(r)))}var xr=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 Sr(e){return r=>new p(t=>r.subscribe(new wr(t,e)))}var wr=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)}};var vn=(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))(vn||{});var _e=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,o=n.length;i<o;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,o=n.length;i<o;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}},Y=class extends _e{constructor(){super(),this.listeners||_e.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)}},ae=class{constructor(){Object.defineProperty(this,"signal",{value:new Y,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&&(ae.prototype[Symbol.toStringTag]="AbortController",Y.prototype[Symbol.toStringTag]="AbortSignal");function Ae(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 Er(e){typeof e=="function"&&(e={fetch:e});let{fetch:r,Request:t=r.Request,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!Ae({fetch:r,Request:t,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:r,Request:o};let o=t;(o&&!o.prototype.hasOwnProperty("signal")||i)&&(o=function(l,v){let c;v&&v.signal&&(c=v.signal,delete v.signal);let b=new t(l,v);return c&&Object.defineProperty(b,"signal",{writable:!1,enumerable:!1,configurable:!0,value:c}),b},o.prototype=t.prototype);let s=r;return{fetch:(f,l)=>{let v=o&&o.prototype.isPrototypeOf(f)?f.signal:l?l.signal:void 0;if(v){let c;try{c=new DOMException("Aborted","AbortError")}catch{c=new Error("Aborted"),c.name="AbortError"}if(v.aborted)return Promise.reject(c);let b=new Promise((d,T)=>{v.addEventListener("abort",()=>T(c),{once:!0})});return l&&l.signal&&delete l.signal,Promise.race([b,s(f,l)])}return s(f,l)},Request:o}}var se=Ae({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),bn=se?Er({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,dn=se?bn.fetch:window.fetch,md=se?bn.Request:window.Request,Td=se?ae:window.AbortController,hd=se?Y:window.AbortSignal;var ns=bs(ts(),1),is=(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))(is||{}),hf="vk.com",yf=async(e,r,t)=>{let n=new URL(`https://${hf}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",r),e!==void 0&&n.searchParams.set("lang",e);let o=await(await dn(n.toString())).json();return gf(o,t)},gf=(e,r)=>(0,ns.default)(Object.entries(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),If(n)])),If=e=>Array.isArray(e)?e[0]:e;var os=(t=>(t.RU="ru",t.EN="en",t))(os||{});
|
package/esnext.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-shared v1.0.50-dev.
|
|
3
|
-
*
|
|
2
|
+
* @vkontakte/videoplayer-shared v1.0.50-dev.eaae0302.0
|
|
3
|
+
* Thu, 21 Nov 2024 07:42:12 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-50/doc/
|
|
5
5
|
*/
|
|
6
|
-
var qa=Object.create;var We=Object.defineProperty;var Ra=Object.getOwnPropertyDescriptor;var Pa=Object.getOwnPropertyNames;var _a=Object.getPrototypeOf,Aa=Object.prototype.hasOwnProperty;var a=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Ca=(e,r)=>{for(var t in r)We(e,t,{get:r[t],enumerable:!0})},La=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Pa(r))!Aa.call(e,i)&&i!==t&&We(e,i,{get:()=>r[i],enumerable:!(n=Ra(r,i))||n.enumerable});return e};var Ma=(e,r,t)=>(t=e!=null?qa(_a(e)):{},La(r||!e||!e.__esModule?We(t,"default",{value:e,enumerable:!0}):t,e));var P=a((xd,jt)=>{"use strict";jt.exports=function(e){try{return!!e()}catch{return!0}}});var ne=a((Od,Nt)=>{"use strict";var Ss=P();Nt.exports=!Ss(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var C=a((wd,Dt)=>{"use strict";var kt=ne(),Vt=Function.prototype,fr=Vt.call,Es=kt&&Vt.bind.bind(fr,fr);Dt.exports=kt?Es:function(e){return function(){return fr.apply(e,arguments)}}});var Ie=a((Sd,Ut)=>{"use strict";var Ft=C(),qs=Ft({}.toString),Rs=Ft("".slice);Ut.exports=function(e){return Rs(qs(e),8,-1)}});var Bt=a((Ed,Gt)=>{"use strict";var Ps=C(),_s=P(),As=Ie(),vr=Object,Cs=Ps("".split);Gt.exports=_s(function(){return!vr("z").propertyIsEnumerable(0)})?function(e){return As(e)==="String"?Cs(e,""):vr(e)}:vr});var xe=a((qd,Qt)=>{"use strict";Qt.exports=function(e){return e==null}});var Oe=a((Rd,Wt)=>{"use strict";var Ls=xe(),Ms=TypeError;Wt.exports=function(e){if(Ls(e))throw new Ms("Can't call method on "+e);return e}});var Y=a((Pd,$t)=>{"use strict";var js=Bt(),Ns=Oe();$t.exports=function(e){return js(Ns(e))}});var Kt=a((_d,zt)=>{"use strict";zt.exports=function(){}});var G=a((Ad,Yt)=>{"use strict";Yt.exports={}});var x=a((br,Ht)=>{"use strict";var ie=function(e){return e&&e.Math===Math&&e};Ht.exports=ie(typeof globalThis=="object"&&globalThis)||ie(typeof window=="object"&&window)||ie(typeof self=="object"&&self)||ie(typeof global=="object"&&global)||ie(typeof br=="object"&&br)||function(){return this}()||Function("return this")()});var O=a((Cd,Xt)=>{"use strict";var dr=typeof document=="object"&&document.all;Xt.exports=typeof dr>"u"&&dr!==void 0?function(e){return typeof e=="function"||e===dr}:function(e){return typeof e=="function"}});var en=a((Ld,Zt)=>{"use strict";var ks=x(),Vs=O(),Jt=ks.WeakMap;Zt.exports=Vs(Jt)&&/native code/.test(String(Jt))});var L=a((Md,rn)=>{"use strict";var Ds=O();rn.exports=function(e){return typeof e=="object"?e!==null:Ds(e)}});var _=a((jd,tn)=>{"use strict";var Fs=P();tn.exports=!Fs(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var Tr=a((Nd,on)=>{"use strict";var Us=x(),nn=L(),mr=Us.document,Gs=nn(mr)&&nn(mr.createElement);on.exports=function(e){return Gs?mr.createElement(e):{}}});var hr=a((kd,an)=>{"use strict";var Bs=_(),Qs=P(),Ws=Tr();an.exports=!Bs&&!Qs(function(){return Object.defineProperty(Ws("div"),"a",{get:function(){return 7}}).a!==7})});var yr=a((Vd,sn)=>{"use strict";var $s=_(),zs=P();sn.exports=$s&&zs(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var B=a((Dd,un)=>{"use strict";var Ks=L(),Ys=String,Hs=TypeError;un.exports=function(e){if(Ks(e))return e;throw new Hs(Ys(e)+" is not an object")}});var V=a((Fd,cn)=>{"use strict";var Xs=ne(),we=Function.prototype.call;cn.exports=Xs?we.bind(we):function(){return we.apply(we,arguments)}});var Se=a((Ud,ln)=>{"use strict";ln.exports={}});var xr=a((Gd,fn)=>{"use strict";var gr=Se(),Ir=x(),Js=O(),pn=function(e){return Js(e)?e:void 0};fn.exports=function(e,r){return arguments.length<2?pn(gr[e])||pn(Ir[e]):gr[e]&&gr[e][r]||Ir[e]&&Ir[e][r]}});var Or=a((Bd,vn)=>{"use strict";var Zs=C();vn.exports=Zs({}.isPrototypeOf)});var Tn=a((Qd,mn)=>{"use strict";var eu=x(),bn=eu.navigator,dn=bn&&bn.userAgent;mn.exports=dn?String(dn):""});var wn=a((Wd,On)=>{"use strict";var xn=x(),wr=Tn(),hn=xn.process,yn=xn.Deno,gn=hn&&hn.versions||yn&&yn.version,In=gn&&gn.v8,q,Ee;In&&(q=In.split("."),Ee=q[0]>0&&q[0]<4?1:+(q[0]+q[1]));!Ee&&wr&&(q=wr.match(/Edge\/(\d+)/),(!q||q[1]>=74)&&(q=wr.match(/Chrome\/(\d+)/),q&&(Ee=+q[1])));On.exports=Ee});var Sr=a(($d,En)=>{"use strict";var Sn=wn(),ru=P(),tu=x(),nu=tu.String;En.exports=!!Object.getOwnPropertySymbols&&!ru(function(){var e=Symbol("symbol detection");return!nu(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Sn&&Sn<41})});var Er=a((zd,qn)=>{"use strict";var iu=Sr();qn.exports=iu&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var qr=a((Kd,Rn)=>{"use strict";var ou=xr(),au=O(),su=Or(),uu=Er(),cu=Object;Rn.exports=uu?function(e){return typeof e=="symbol"}:function(e){var r=ou("Symbol");return au(r)&&su(r.prototype,cu(e))}});var qe=a((Yd,Pn)=>{"use strict";var lu=String;Pn.exports=function(e){try{return lu(e)}catch{return"Object"}}});var oe=a((Hd,_n)=>{"use strict";var pu=O(),fu=qe(),vu=TypeError;_n.exports=function(e){if(pu(e))return e;throw new vu(fu(e)+" is not a function")}});var Re=a((Xd,An)=>{"use strict";var bu=oe(),du=xe();An.exports=function(e,r){var t=e[r];return du(t)?void 0:bu(t)}});var Ln=a((Jd,Cn)=>{"use strict";var Rr=V(),Pr=O(),_r=L(),mu=TypeError;Cn.exports=function(e,r){var t,n;if(r==="string"&&Pr(t=e.toString)&&!_r(n=Rr(t,e))||Pr(t=e.valueOf)&&!_r(n=Rr(t,e))||r!=="string"&&Pr(t=e.toString)&&!_r(n=Rr(t,e)))return n;throw new mu("Can't convert object to primitive value")}});var ae=a((Zd,Mn)=>{"use strict";Mn.exports=!0});var kn=a((em,Nn)=>{"use strict";var jn=x(),Tu=Object.defineProperty;Nn.exports=function(e,r){try{Tu(jn,e,{value:r,configurable:!0,writable:!0})}catch{jn[e]=r}return r}});var Pe=a((rm,Fn)=>{"use strict";var hu=ae(),yu=x(),gu=kn(),Vn="__core-js_shared__",Dn=Fn.exports=yu[Vn]||gu(Vn,{});(Dn.versions||(Dn.versions=[])).push({version:"3.38.0",mode:hu?"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 Ar=a((tm,Gn)=>{"use strict";var Un=Pe();Gn.exports=function(e,r){return Un[e]||(Un[e]=r||{})}});var Cr=a((nm,Bn)=>{"use strict";var Iu=Oe(),xu=Object;Bn.exports=function(e){return xu(Iu(e))}});var M=a((im,Qn)=>{"use strict";var Ou=C(),wu=Cr(),Su=Ou({}.hasOwnProperty);Qn.exports=Object.hasOwn||function(r,t){return Su(wu(r),t)}});var Lr=a((om,Wn)=>{"use strict";var Eu=C(),qu=0,Ru=Math.random(),Pu=Eu(1 .toString);Wn.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Pu(++qu+Ru,36)}});var j=a((am,zn)=>{"use strict";var _u=x(),Au=Ar(),$n=M(),Cu=Lr(),Lu=Sr(),Mu=Er(),H=_u.Symbol,Mr=Au("wks"),ju=Mu?H.for||H:H&&H.withoutSetter||Cu;zn.exports=function(e){return $n(Mr,e)||(Mr[e]=Lu&&$n(H,e)?H[e]:ju("Symbol."+e)),Mr[e]}});var Xn=a((sm,Hn)=>{"use strict";var Nu=V(),Kn=L(),Yn=qr(),ku=Re(),Vu=Ln(),Du=j(),Fu=TypeError,Uu=Du("toPrimitive");Hn.exports=function(e,r){if(!Kn(e)||Yn(e))return e;var t=ku(e,Uu),n;if(t){if(r===void 0&&(r="default"),n=Nu(t,e,r),!Kn(n)||Yn(n))return n;throw new Fu("Can't convert object to primitive value")}return r===void 0&&(r="number"),Vu(e,r)}});var jr=a((um,Jn)=>{"use strict";var Gu=Xn(),Bu=qr();Jn.exports=function(e){var r=Gu(e,"string");return Bu(r)?r:r+""}});var X=a(ei=>{"use strict";var Qu=_(),Wu=hr(),$u=yr(),_e=B(),Zn=jr(),zu=TypeError,Nr=Object.defineProperty,Ku=Object.getOwnPropertyDescriptor,kr="enumerable",Vr="configurable",Dr="writable";ei.f=Qu?$u?function(r,t,n){if(_e(r),t=Zn(t),_e(n),typeof r=="function"&&t==="prototype"&&"value"in n&&Dr in n&&!n[Dr]){var i=Ku(r,t);i&&i[Dr]&&(r[t]=n.value,n={configurable:Vr in n?n[Vr]:i[Vr],enumerable:kr in n?n[kr]:i[kr],writable:!1})}return Nr(r,t,n)}:Nr:function(r,t,n){if(_e(r),t=Zn(t),_e(n),Wu)try{return Nr(r,t,n)}catch{}if("get"in n||"set"in n)throw new zu("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var se=a((lm,ri)=>{"use strict";ri.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var J=a((pm,ti)=>{"use strict";var Yu=_(),Hu=X(),Xu=se();ti.exports=Yu?function(e,r,t){return Hu.f(e,r,Xu(1,t))}:function(e,r,t){return e[r]=t,e}});var Ae=a((fm,ii)=>{"use strict";var Ju=Ar(),Zu=Lr(),ni=Ju("keys");ii.exports=function(e){return ni[e]||(ni[e]=Zu(e))}});var Ce=a((vm,oi)=>{"use strict";oi.exports={}});var ci=a((bm,ui)=>{"use strict";var ec=en(),si=x(),rc=L(),tc=J(),Fr=M(),Ur=Pe(),nc=Ae(),ic=Ce(),ai="Object already initialized",Gr=si.TypeError,oc=si.WeakMap,Le,ue,Me,ac=function(e){return Me(e)?ue(e):Le(e,{})},sc=function(e){return function(r){var t;if(!rc(r)||(t=ue(r)).type!==e)throw new Gr("Incompatible receiver, "+e+" required");return t}};ec||Ur.state?(R=Ur.state||(Ur.state=new oc),R.get=R.get,R.has=R.has,R.set=R.set,Le=function(e,r){if(R.has(e))throw new Gr(ai);return r.facade=e,R.set(e,r),r},ue=function(e){return R.get(e)||{}},Me=function(e){return R.has(e)}):(Q=nc("state"),ic[Q]=!0,Le=function(e,r){if(Fr(e,Q))throw new Gr(ai);return r.facade=e,tc(e,Q,r),r},ue=function(e){return Fr(e,Q)?e[Q]:{}},Me=function(e){return Fr(e,Q)});var R,Q;ui.exports={set:Le,get:ue,has:Me,enforce:ac,getterFor:sc}});var bi=a((dm,vi)=>{"use strict";var uc=ne(),fi=Function.prototype,li=fi.apply,pi=fi.call;vi.exports=typeof Reflect=="object"&&Reflect.apply||(uc?pi.bind(li):function(){return pi.apply(li,arguments)})});var Br=a((mm,di)=>{"use strict";var cc=Ie(),lc=C();di.exports=function(e){if(cc(e)==="Function")return lc(e)}});var yi=a(hi=>{"use strict";var mi={}.propertyIsEnumerable,Ti=Object.getOwnPropertyDescriptor,pc=Ti&&!mi.call({1:2},1);hi.f=pc?function(r){var t=Ti(this,r);return!!t&&t.enumerable}:mi});var xi=a(Ii=>{"use strict";var fc=_(),vc=V(),bc=yi(),dc=se(),mc=Y(),Tc=jr(),hc=M(),yc=hr(),gi=Object.getOwnPropertyDescriptor;Ii.f=fc?gi:function(r,t){if(r=mc(r),t=Tc(t),yc)try{return gi(r,t)}catch{}if(hc(r,t))return dc(!vc(bc.f,r,t),r[t])}});var wi=a((ym,Oi)=>{"use strict";var gc=P(),Ic=O(),xc=/#|\.prototype\./,ce=function(e,r){var t=wc[Oc(e)];return t===Ec?!0:t===Sc?!1:Ic(r)?gc(r):!!r},Oc=ce.normalize=function(e){return String(e).replace(xc,".").toLowerCase()},wc=ce.data={},Sc=ce.NATIVE="N",Ec=ce.POLYFILL="P";Oi.exports=ce});var Qr=a((gm,Ei)=>{"use strict";var Si=Br(),qc=oe(),Rc=ne(),Pc=Si(Si.bind);Ei.exports=function(e,r){return qc(e),r===void 0?e:Rc?Pc(e,r):function(){return e.apply(r,arguments)}}});var Wr=a((Im,Ri)=>{"use strict";var le=x(),_c=bi(),Ac=Br(),Cc=O(),Lc=xi().f,Mc=wi(),Z=Se(),jc=Qr(),ee=J(),qi=M();Pe();var Nc=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 _c(e,this,arguments)};return r.prototype=e.prototype,r};Ri.exports=function(e,r){var t=e.target,n=e.global,i=e.stat,o=e.proto,s=n?le:i?le[t]:le[t]&&le[t].prototype,u=n?Z:Z[t]||ee(Z,t,{})[t],p=u.prototype,l,v,c,b,d,T,h,I,y;for(b in r)l=Mc(n?b:t+(i?".":"#")+b,e.forced),v=!l&&s&&qi(s,b),T=u[b],v&&(e.dontCallGetSet?(y=Lc(s,b),h=y&&y.value):h=s[b]),d=v&&h?h:r[b],!(!l&&!o&&typeof T==typeof d)&&(e.bind&&v?I=jc(d,le):e.wrap&&v?I=Nc(d):o&&Cc(d)?I=Ac(d):I=d,(e.sham||d&&d.sham||T&&T.sham)&&ee(I,"sham",!0),ee(u,b,I),o&&(c=t+"Prototype",qi(Z,c)||ee(Z,c,{}),ee(Z[c],b,d),e.real&&p&&(l||!p[b])&&ee(p,b,d)))}});var Ai=a((xm,_i)=>{"use strict";var $r=_(),kc=M(),Pi=Function.prototype,Vc=$r&&Object.getOwnPropertyDescriptor,zr=kc(Pi,"name"),Dc=zr&&function(){}.name==="something",Fc=zr&&(!$r||$r&&Vc(Pi,"name").configurable);_i.exports={EXISTS:zr,PROPER:Dc,CONFIGURABLE:Fc}});var Li=a((Om,Ci)=>{"use strict";var Uc=Math.ceil,Gc=Math.floor;Ci.exports=Math.trunc||function(r){var t=+r;return(t>0?Gc:Uc)(t)}});var Kr=a((wm,Mi)=>{"use strict";var Bc=Li();Mi.exports=function(e){var r=+e;return r!==r||r===0?0:Bc(r)}});var Ni=a((Sm,ji)=>{"use strict";var Qc=Kr(),Wc=Math.max,$c=Math.min;ji.exports=function(e,r){var t=Qc(e);return t<0?Wc(t+r,0):$c(t,r)}});var Vi=a((Em,ki)=>{"use strict";var zc=Kr(),Kc=Math.min;ki.exports=function(e){var r=zc(e);return r>0?Kc(r,9007199254740991):0}});var Yr=a((qm,Di)=>{"use strict";var Yc=Vi();Di.exports=function(e){return Yc(e.length)}});var Gi=a((Rm,Ui)=>{"use strict";var Hc=Y(),Xc=Ni(),Jc=Yr(),Fi=function(e){return function(r,t,n){var i=Hc(r),o=Jc(i);if(o===0)return!e&&-1;var s=Xc(n,o),u;if(e&&t!==t){for(;o>s;)if(u=i[s++],u!==u)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===t)return e||s||0;return!e&&-1}};Ui.exports={includes:Fi(!0),indexOf:Fi(!1)}});var Wi=a((Pm,Qi)=>{"use strict";var Zc=C(),Hr=M(),el=Y(),rl=Gi().indexOf,tl=Ce(),Bi=Zc([].push);Qi.exports=function(e,r){var t=el(e),n=0,i=[],o;for(o in t)!Hr(tl,o)&&Hr(t,o)&&Bi(i,o);for(;r.length>n;)Hr(t,o=r[n++])&&(~rl(i,o)||Bi(i,o));return i}});var Xr=a((_m,$i)=>{"use strict";$i.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Ki=a((Am,zi)=>{"use strict";var nl=Wi(),il=Xr();zi.exports=Object.keys||function(r){return nl(r,il)}});var Hi=a(Yi=>{"use strict";var ol=_(),al=yr(),sl=X(),ul=B(),cl=Y(),ll=Ki();Yi.f=ol&&!al?Object.defineProperties:function(r,t){ul(r);for(var n=cl(t),i=ll(t),o=i.length,s=0,u;o>s;)sl.f(r,u=i[s++],n[u]);return r}});var Ji=a((Lm,Xi)=>{"use strict";var pl=xr();Xi.exports=pl("document","documentElement")});var rt=a((Mm,oo)=>{"use strict";var fl=B(),vl=Hi(),Zi=Xr(),bl=Ce(),dl=Ji(),ml=Tr(),Tl=Ae(),eo=">",ro="<",Zr="prototype",et="script",no=Tl("IE_PROTO"),Jr=function(){},io=function(e){return ro+et+eo+e+ro+"/"+et+eo},to=function(e){e.write(io("")),e.close();var r=e.parentWindow.Object;return e=null,r},hl=function(){var e=ml("iframe"),r="java"+et+":",t;return e.style.display="none",dl.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(io("document.F=Object")),t.close(),t.F},je,Ne=function(){try{je=new ActiveXObject("htmlfile")}catch{}Ne=typeof document<"u"?document.domain&&je?to(je):hl():to(je);for(var e=Zi.length;e--;)delete Ne[Zr][Zi[e]];return Ne()};bl[no]=!0;oo.exports=Object.create||function(r,t){var n;return r!==null?(Jr[Zr]=fl(r),n=new Jr,Jr[Zr]=null,n[no]=r):n=Ne(),t===void 0?n:vl.f(n,t)}});var so=a((jm,ao)=>{"use strict";var yl=P();ao.exports=!yl(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var nt=a((Nm,co)=>{"use strict";var gl=M(),Il=O(),xl=Cr(),Ol=Ae(),wl=so(),uo=Ol("IE_PROTO"),tt=Object,Sl=tt.prototype;co.exports=wl?tt.getPrototypeOf:function(e){var r=xl(e);if(gl(r,uo))return r[uo];var t=r.constructor;return Il(t)&&r instanceof t?t.prototype:r instanceof tt?Sl:null}});var it=a((km,lo)=>{"use strict";var El=J();lo.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:El(e,r,t),e}});var ut=a((Vm,vo)=>{"use strict";var ql=P(),Rl=O(),Pl=L(),_l=rt(),po=nt(),Al=it(),Cl=j(),Ll=ae(),st=Cl("iterator"),fo=!1,N,ot,at;[].keys&&(at=[].keys(),"next"in at?(ot=po(po(at)),ot!==Object.prototype&&(N=ot)):fo=!0);var Ml=!Pl(N)||ql(function(){var e={};return N[st].call(e)!==e});Ml?N={}:Ll&&(N=_l(N));Rl(N[st])||Al(N,st,function(){return this});vo.exports={IteratorPrototype:N,BUGGY_SAFARI_ITERATORS:fo}});var ke=a((Dm,mo)=>{"use strict";var jl=j(),Nl=jl("toStringTag"),bo={};bo[Nl]="z";mo.exports=String(bo)==="[object z]"});var ct=a((Fm,To)=>{"use strict";var kl=ke(),Vl=O(),Ve=Ie(),Dl=j(),Fl=Dl("toStringTag"),Ul=Object,Gl=Ve(function(){return arguments}())==="Arguments",Bl=function(e,r){try{return e[r]}catch{}};To.exports=kl?Ve:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=Bl(r=Ul(e),Fl))=="string"?t:Gl?Ve(r):(n=Ve(r))==="Object"&&Vl(r.callee)?"Arguments":n}});var yo=a((Um,ho)=>{"use strict";var Ql=ke(),Wl=ct();ho.exports=Ql?{}.toString:function(){return"[object "+Wl(this)+"]"}});var De=a((Gm,Io)=>{"use strict";var $l=ke(),zl=X().f,Kl=J(),Yl=M(),Hl=yo(),Xl=j(),go=Xl("toStringTag");Io.exports=function(e,r,t,n){var i=t?e:e&&e.prototype;i&&(Yl(i,go)||zl(i,go,{configurable:!0,value:r}),n&&!$l&&Kl(i,"toString",Hl))}});var Oo=a((Bm,xo)=>{"use strict";var Jl=ut().IteratorPrototype,Zl=rt(),ep=se(),rp=De(),tp=G(),np=function(){return this};xo.exports=function(e,r,t,n){var i=r+" Iterator";return e.prototype=Zl(Jl,{next:ep(+!n,t)}),rp(e,i,!1,!0),tp[i]=np,e}});var So=a((Qm,wo)=>{"use strict";var ip=C(),op=oe();wo.exports=function(e,r,t){try{return ip(op(Object.getOwnPropertyDescriptor(e,r)[t]))}catch{}}});var qo=a((Wm,Eo)=>{"use strict";var ap=L();Eo.exports=function(e){return ap(e)||e===null}});var Po=a(($m,Ro)=>{"use strict";var sp=qo(),up=String,cp=TypeError;Ro.exports=function(e){if(sp(e))return e;throw new cp("Can't set "+up(e)+" as a prototype")}});var Ao=a((zm,_o)=>{"use strict";var lp=So(),pp=L(),fp=Oe(),vp=Po();_o.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=lp(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch{}return function(i,o){return fp(i),vp(o),pp(i)&&(e?t(i,o):i.__proto__=o),i}}():void 0)});var Go=a((Km,Uo)=>{"use strict";var bp=Wr(),dp=V(),Fe=ae(),Do=Ai(),mp=O(),Tp=Oo(),Co=nt(),Lo=Ao(),hp=De(),yp=J(),lt=it(),gp=j(),Mo=G(),Fo=ut(),Ip=Do.PROPER,xp=Do.CONFIGURABLE,jo=Fo.IteratorPrototype,Ue=Fo.BUGGY_SAFARI_ITERATORS,pe=gp("iterator"),No="keys",fe="values",ko="entries",Vo=function(){return this};Uo.exports=function(e,r,t,n,i,o,s){Tp(t,r,n);var u=function(y){if(y===i&&b)return b;if(!Ue&&y&&y in v)return v[y];switch(y){case No:return function(){return new t(this,y)};case fe:return function(){return new t(this,y)};case ko:return function(){return new t(this,y)}}return function(){return new t(this)}},p=r+" Iterator",l=!1,v=e.prototype,c=v[pe]||v["@@iterator"]||i&&v[i],b=!Ue&&c||u(i),d=r==="Array"&&v.entries||c,T,h,I;if(d&&(T=Co(d.call(new e)),T!==Object.prototype&&T.next&&(!Fe&&Co(T)!==jo&&(Lo?Lo(T,jo):mp(T[pe])||lt(T,pe,Vo)),hp(T,p,!0,!0),Fe&&(Mo[p]=Vo))),Ip&&i===fe&&c&&c.name!==fe&&(!Fe&&xp?yp(v,"name",fe):(l=!0,b=function(){return dp(c,this)})),i)if(h={values:u(fe),keys:o?b:u(No),entries:u(ko)},s)for(I in h)(Ue||l||!(I in v))&<(v,I,h[I]);else bp({target:r,proto:!0,forced:Ue||l},h);return(!Fe||s)&&v[pe]!==b&<(v,pe,b,{name:i}),Mo[r]=b,h}});var Qo=a((Ym,Bo)=>{"use strict";Bo.exports=function(e,r){return{value:e,done:r}}});var ft=a((Hm,Yo)=>{"use strict";var Op=Y(),pt=Kt(),Wo=G(),zo=ci(),wp=X().f,Sp=Go(),Ge=Qo(),Ep=ae(),qp=_(),Ko="Array Iterator",Rp=zo.set,Pp=zo.getterFor(Ko);Yo.exports=Sp(Array,"Array",function(e,r){Rp(this,{type:Ko,target:Op(e),index:0,kind:r})},function(){var e=Pp(this),r=e.target,t=e.index++;if(!r||t>=r.length)return e.target=void 0,Ge(void 0,!0);switch(e.kind){case"keys":return Ge(t,!1);case"values":return Ge(r[t],!1)}return Ge([t,r[t]],!1)},"values");var $o=Wo.Arguments=Wo.Array;pt("keys");pt("values");pt("entries");if(!Ep&&qp&&$o.name!=="values")try{wp($o,"name",{value:"values"})}catch{}});var Xo=a((Xm,Ho)=>{"use strict";var _p=j(),Ap=G(),Cp=_p("iterator"),Lp=Array.prototype;Ho.exports=function(e){return e!==void 0&&(Ap.Array===e||Lp[Cp]===e)}});var vt=a((Jm,Zo)=>{"use strict";var Mp=ct(),Jo=Re(),jp=xe(),Np=G(),kp=j(),Vp=kp("iterator");Zo.exports=function(e){if(!jp(e))return Jo(e,Vp)||Jo(e,"@@iterator")||Np[Mp(e)]}});var ra=a((Zm,ea)=>{"use strict";var Dp=V(),Fp=oe(),Up=B(),Gp=qe(),Bp=vt(),Qp=TypeError;ea.exports=function(e,r){var t=arguments.length<2?Bp(e):r;if(Fp(t))return Up(Dp(t,e));throw new Qp(Gp(e)+" is not iterable")}});var ia=a((eT,na)=>{"use strict";var Wp=V(),ta=B(),$p=Re();na.exports=function(e,r,t){var n,i;ta(e);try{if(n=$p(e,"return"),!n){if(r==="throw")throw t;return t}n=Wp(n,e)}catch(o){i=!0,n=o}if(r==="throw")throw t;if(i)throw n;return ta(n),t}});var ca=a((rT,ua)=>{"use strict";var zp=Qr(),Kp=V(),Yp=B(),Hp=qe(),Xp=Xo(),Jp=Yr(),oa=Or(),Zp=ra(),ef=vt(),aa=ia(),rf=TypeError,Be=function(e,r){this.stopped=e,this.result=r},sa=Be.prototype;ua.exports=function(e,r,t){var n=t&&t.that,i=!!(t&&t.AS_ENTRIES),o=!!(t&&t.IS_RECORD),s=!!(t&&t.IS_ITERATOR),u=!!(t&&t.INTERRUPTED),p=zp(r,n),l,v,c,b,d,T,h,I=function(g){return l&&aa(l,"normal",g),new Be(!0,g)},y=function(g){return i?(Yp(g),u?p(g[0],g[1],I):p(g[0],g[1])):u?p(g,I):p(g)};if(o)l=e.iterator;else if(s)l=e;else{if(v=ef(e),!v)throw new rf(Hp(e)+" is not iterable");if(Xp(v)){for(c=0,b=Jp(e);b>c;c++)if(d=y(e[c]),d&&oa(sa,d))return d;return new Be(!1)}l=Zp(e,v)}for(T=o?e.next:l.next;!(h=Kp(T,l)).done;){try{d=y(h.value)}catch(g){aa(l,"throw",g)}if(typeof d=="object"&&d&&oa(sa,d))return d}return new Be(!1)}});var pa=a((tT,la)=>{"use strict";var tf=_(),nf=X(),of=se();la.exports=function(e,r,t){tf?nf.f(e,r,of(0,t)):e[r]=t}});var fa=a(()=>{"use strict";var af=Wr(),sf=ca(),uf=pa();af({target:"Object",stat:!0},{fromEntries:function(r){var t={};return sf(r,function(n,i){uf(t,n,i)},{AS_ENTRIES:!0}),t}})});var ba=a((oT,va)=>{"use strict";ft();fa();var cf=Se();va.exports=cf.Object.fromEntries});var ma=a((aT,da)=>{"use strict";da.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 ha=a(()=>{"use strict";ft();var lf=ma(),pf=x(),ff=De(),Ta=G();for(Qe in lf)ff(pf[Qe],Qe),Ta[Qe]=Ta.Array;var Qe});var ga=a((cT,ya)=>{"use strict";var vf=ba();ha();ya.exports=vf});var xa=a((lT,Ia)=>{"use strict";var bf=ga();Ia.exports=bf});var ja="1.0.50-dev.1326de93.0";var w=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 A=e=>{throw new Error(`${e} is value of unexpected type`)},Na=e=>{};var F=()=>{};var f=class{constructor(r){r&&(this._subscribe=r)}subscribe(r,t){let n;t?typeof t=="function"?n={next:t,error:F}:n={next:s=>t.next(s),error:s=>t.error?.(s)}:n={next:F,error:F};let i=typeof r=="function"?{next:s=>{try{r(s)}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)},o;try{o=this._subscribe(i)}catch(s){i.error?.(s)}return new w().add(()=>{switch(i.next=F,i.error=F,typeof o){case"function":o();return;case"object":o.unsubscribe();return;case"undefined":return;default:return A(o)}})}pipe(...r){return r.reduce((t,n)=>n(t),this)}_subscribe(r){}};var k=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 w().add(()=>this.subscribers.delete(n))}};var $e=class{constructor(){this.log$=new k;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 ka,context as Va}from"@opentelemetry/api";import{TracerAllSpansProcessor as Da,TracerMemorySpanExporter as Tt,initTracerOpenTelemetry as Fa}from"@tracer/opentelemetry";var ze=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}},Ke=class e{constructor({name:r,parentContext:t,tracer:n}){this.childTracers=[];let i=!n;if(i){let s=Fa({serviceName:"videoplayer-sdk-web",appToken:"L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb",spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),u=new Tt,p=new Tt;this.spanExporter=u,s.addSpanProcessor(new Da({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=ka.setSpan(Va.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 ze({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 Ua(e,r='Assertion "value is not nullable" failed'){if(e==null)throw new Error(r)}function Ga(e,r='Assertion "value is nullable" failed'){if(e!=null)throw new Error(r)}function W(e){return typeof e<"u"&&e!==null}function Ye(e){return e==null}function Ba(e,r){if(!e?.length)throw new Error(r)}function Qa(e,r){if(e?.length)throw new Error(r)}var Wa=(e,r,t)=>new Promise((n,i)=>{r.addEventListener("abort",()=>{u(),l.remove()});let o=()=>{u(),i()},s=()=>{u(),n()},u=()=>{p&&clearTimeout(p),l.removeEventListener("load",s),l.removeEventListener("error",o)},p;t&&(p=window.setTimeout(o,t));let l=document.createElement("script");l.addEventListener("load",s),l.addEventListener("error",o),l.src=e,document.head.appendChild(l)});var $a=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var za=(e,r)=>async(...t)=>{let n=r(...t),i=e.aborted,o;for(;!i&&!e.aborted;)try{let s=await n.next(o);i=s.done??!1,o=s.value}catch(s){await n.throw(s)}return o};var ht=()=>/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion??navigator.userAgent)||navigator?.userAgentData?.mobile,He=class{constructor(){this.detect()}get browser(){return this._currentBrowser}get device(){return this._currentDevice}get isTouch(){return this._maxTouchPoints>0}get isIOS(){return["iPhone","iPad","iPod"].includes(this.device)}get isMac(){return this.device==="Mac"}get isApple(){return this.isIOS||this.isMac}get isIphoneOrOldIpad(){if(!this.isApple||!this.isTouch)return!1;let r=this.device==="iPad"||window?.screen.width>700,t=this._iosVersion;return!r||r&&!!t&&t<16}get isAndroid(){return this.device==="Android"}get isMobile(){return this._isMobile}get iOSVersion(){return this._iosVersion}get macVersion(){return this._macVersion}get isYandex(){return this.browser==="Yandex"}get isSafari(){return this.browser==="Safari"}get isSamsungBrowser(){return this.browser==="SamsungBrowser"}get isHDR(){return this._isHdr}detect(){let{userAgent:r,maxTouchPoints:t}=navigator;try{this._maxTouchPoints=t,this._isHdr=!!matchMedia("(dynamic-range: high)")?.matches}catch(n){console.error(n)}try{this._isMobile=ht()}catch(n){console.error(n)}this.detectBrowser(r),this.detectDevice(r),this.isIOS&&this.detectIOSVersion(),this.isMac&&this.detectMacVersion()}detectBrowser(r){try{let t=/yabrowser/i.test(r)?"Yandex":void 0,n=/samsungbrowser/i.test(r)?"SamsungBrowser":void 0,i=/chrome|crios/i.test(r)?"Chrome":void 0,o=/chromium/i.test(r)?"Chromium":void 0,s=/firefox|fxios/i.test(r)?"Firefox":void 0,u=/webkit|safari|khtml/i.test(r)?"Safari":void 0,p=/opr\//i.test(r)?"Opera":void 0,l=/edg/i.test(r)?"Edge":void 0;this._currentBrowser=t||n||s||p||l||i||o||u||"Rest"}catch(t){console.error(t)}}detectDevice(r){try{let t=/android/i.test(r)?"Android":void 0,n=/iphone/i.test(r)?"iPhone":void 0,i=/ipad/i.test(r)?"iPad":void 0,o=/ipod/i.test(r)?"iPod":void 0,s=/mac/i.test(r)?"Mac":void 0,u=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(r)?"RestMobile":void 0;this._currentDevice=t||n||i||o||u||s||"Desktop"}catch(t){console.error(t)}}detectIOSVersion(){try{let{userAgent:r}=window.navigator,t=r.match(/Version\/(\d+(\.\d+)?)/i);if(!t)return;let n=t[1],i=parseFloat(n);if(isNaN(i))return;this._iosVersion=i}catch(r){console.error(r)}}detectMacVersion(){try{let{userAgent:r}=window.navigator,t=r.match(/Version\/(\d+)/);if(!t)return;let n=t[1],i=parseInt(n,10);if(isNaN(i))return;this._macVersion=i}catch(r){console.error(r)}}},Ka=new He;var Ya=(e,{start:r=0,factor:t=2,max:n=1/0,min:i=r,random:o=0}={})=>{let s=r;return s*=t**e,s*=1+(Math.random()*o*2-o),s=Math.round(s),s=Math.min(s,n),s=Math.max(s,i),s};var yt={};Ca(yt,{clear:()=>rs,get:()=>Xa,has:()=>Za,isPersistent:()=>Ha,remove:()=>es,set:()=>Ja});var $,U,Xe=`vk-videoplayer-dummy-key-${Math.random()}`,z=()=>{if(U!==void 0)return U;try{localStorage.setItem(Xe,"test"),localStorage.removeItem(Xe),U=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(Xe),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},Ha=()=>z()===0,Xa=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:A(r)}},Ja=(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:return void $?.set(e,r);default:A(t)}},Za=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 A(r),!1}},es=e=>{let r=z();switch(r){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:return void $?.delete(e);default:A(r)}},rs=()=>{let e=z();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return $?.clear();default:A(e)}};var ts=()=>{let e,r;try{e=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?e=!0:(e=!1,console.error(n))}try{window.location.ancestorOrigins&&(r=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!r&&document.referrer&&(r=document.referrer)}catch(n){console.error(n)}let t=r?new URL(r).hostname:void 0;return{isEmbed:e,host:t}};var Je=(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))(Je||{});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}},ns=(e,r)=>S[e].height>S[r].height,is=(e,r)=>S[e].height>=S[r].height,Ze=(e,r)=>S[e].height<S[r].height,os=(e,r)=>S[e].height<=S[r].height,as=e=>e.sort((r,t)=>r===t?0:r==="Invariant quality"?1:t==="Invariant quality"?-1:Ze(r,t)?1:-1)[0],gt=Object.keys(S).sort((e,r)=>Ze(e,r)?-1:1),ss=(e,r=.02)=>[...gt].find(n=>S[n].height*(1+r)>=e),us=({width:e,height:r})=>{let t=Math.min(e,r),n=Math.max(e,r);return gt.find(i=>{let o=S[i];return o.width>=n&&o.height>=t})},cs=e=>S[e].height,er=e=>e==="Invariant quality",ls=e=>e.every(r=>!er(r));function ps(e){if(er(e))throw new Error("Expected exact quality")}var fs=(e,r)=>{let t={};for(let n of Object.keys(r)){let i=r[n],o=e[n];Array.isArray(i)&&Array.isArray(o)?t[n]=o:typeof i=="object"&&typeof o=="object"?t[n]=fs(o,i):t[n]=n in e?o:i}return t};var av=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 rr(e,r=0,t){let n,i,o,s,u,p,l=0,v=!1,c=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(v=!!t.leading,c="maxWait"in t,o=t?.maxWait?Math.max(+t?.maxWait||0,r):o,b="trailing"in t?!!t.trailing:b);function T(m){let E=n,D=i;return n=i=void 0,l=m,s=e.apply(D,E),s}function h(m,E){return d?(u&&window.cancelAnimationFrame(u),window.requestAnimationFrame(m)):setTimeout(m,E)}function I(m){if(d){window.cancelAnimationFrame(m);return}clearTimeout(m)}function y(m){return l=m,u=h(ve,r),v?T(m):s}function g(m){let E=m-p,D=m-l,mt=r-E;return c?Math.min(mt,o-D):mt}function bt(m){let E=m-p,D=m-l;return p===void 0||E>=r||E<0||c&&D>=o}function ve(){let m=Date.now();if(bt(m))return dt(m);u=h(ve,g(m))}function dt(m){return u=void 0,b&&n?T(m):(n=i=void 0,s)}function wa(){u!==void 0&&I(u),l=0,n=p=i=u=void 0}function Sa(){return u===void 0?s:dt(Date.now())}function Ea(){return u!==void 0}function be(...m){let E=Date.now(),D=bt(E);if(n=m,i=this,p=E,D){if(u===void 0)return y(p);if(c)return u=h(ve,r),T(p)}return u===void 0&&(u=h(ve,r)),s}return be.cancel=wa,be.flush=Sa,be.pending=Ea,be}var tr=(e,r=0,t)=>rr(e,r,{...{leading:!0,trailing:!0},...t,maxWait:r});var de=(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]=de(e[n],r):t[n]=e[n]}return t};var vs=e=>de(e);var bs=300,ds=(e,r=bs)=>new f(t=>{let{width:n,height:i}=e.getBoundingClientRect();if(t.next({width:n,height:i}),!window.ResizeObserver)return;let o=new ResizeObserver(tr(s=>{let u=s[0];if(!u)return;let p,l;u.contentBoxSize&&u.contentBoxSize[0]?(l=u.contentBoxSize[0].blockSize,p=u.contentBoxSize[0].inlineSize):u.contentRect&&(p=u.contentRect.width,l=u.contentRect.height),W(p)&&W(l)&&t.next({width:p,height:l})},r));return o.observe(e),()=>o.disconnect()});var me=(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 o=me(e[i],r-1);for(let s in o)o.hasOwnProperty(s)&&(n[i+t+s]=o[s])}else n[i]=e[i];return n};var ms=e=>{e.removeAttribute("src"),e.load()};var yv=e=>{let r;try{r=new URL(e)}catch{return!1}return r.protocol==="https:"};var Iv=e=>{try{return new URL(e)}catch{return null}};var Ts=e=>r=>t=>{let n=typeof t=="object";t==null||n&&!Object.keys(t).length||e(r,n?me(t):{value:t})};var Te=class extends k{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}};function It(e){return new f(r=>{let t={},n=Object.keys(e).length,i=o=>s=>{o in t||n--,t[o]=s,n===0&&r.next(t)};return Object.entries(e).reduce((o,[s,u])=>o.add(u.subscribe(i(s))),new w)})}function xt(...e){return new f(r=>e.reduce((t,n)=>t.add(n.subscribe(r)),new w))}var hs=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 ys=e=>new f(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var gs=e=>new f(r=>{e.forEach(t=>r.next(t))});var Is=(e,r)=>new f(t=>{let n=i=>t.next(i);return e.addEventListener(r,n),()=>e.removeEventListener(r,n)});function Ot(e){return r=>new f(t=>r.subscribe(new nr(t,e)))}var nr=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 xs={leading:!1,trailing:!0};function wt(e,r=xs){return t=>new f(n=>t.subscribe(new ir(n,e,r)))}var ir=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 Os={leading:!0,trailing:!1};function St(e,r=Os){return t=>new f(n=>t.subscribe(new or(n,e,r)))}var or=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,Ye(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 Et(e){return r=>new f(t=>r.subscribe(new ar(t,e)))}var ar=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)}};function Rt(e=(r,t)=>r===t){return r=>new f(t=>r.subscribe(new sr(t,e)))}var qt={},sr=class{constructor(r,t){this.destination=r;this.predicate=t;this.lastValue=qt}next(r){let t;try{t=this.lastValue===qt||!this.predicate(this.lastValue,r),this.lastValue=r}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};function he(e){return r=>new f(t=>r.subscribe(new ur(t,e)))}var ur=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 he(()=>e)}function _t(){return e=>new f(r=>{let t=!1,n=!1,i=e.subscribe(o=>{t||(t=!0,r.next(o)),n&&i.unsubscribe()},o=>{t=!0,r.error?.(o),n&&i.unsubscribe()});return n=!0,t&&i.unsubscribe(),i})}function At(){return e=>new f(r=>e.subscribe(new cr(r)))}var cr=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 Ct(e){return r=>new f(t=>r.subscribe(new lr(t,e)))}var lr=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)}};var ws=(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))(ws||{});var ye=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,o=n.length;i<o;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,o=n.length;i<o;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}},K=class extends ye{constructor(){super(),this.listeners||ye.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)}},re=class{constructor(){Object.defineProperty(this,"signal",{value:new K,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&&(re.prototype[Symbol.toStringTag]="AbortController",K.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 pr(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:o};let o=t;(o&&!o.prototype.hasOwnProperty("signal")||i)&&(o=function(l,v){let c;v&&v.signal&&(c=v.signal,delete v.signal);let b=new t(l,v);return c&&Object.defineProperty(b,"signal",{writable:!1,enumerable:!1,configurable:!0,value:c}),b},o.prototype=t.prototype);let s=r;return{fetch:(p,l)=>{let v=o&&o.prototype.isPrototypeOf(p)?p.signal:l?l.signal:void 0;if(v){let c;try{c=new DOMException("Aborted","AbortError")}catch{c=new Error("Aborted"),c.name="AbortError"}if(v.aborted)return Promise.reject(c);let b=new Promise((d,T)=>{v.addEventListener("abort",()=>T(c),{once:!0})});return l&&l.signal&&delete l.signal,Promise.race([b,s(p,l)])}return s(p,l)},Request:o}}var te=ge({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),Lt=te?pr({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,Mt=te?Lt.fetch:window.fetch,hd=te?Lt.Request:window.Request,yd=te?re:window.AbortController,gd=te?K:window.AbortSignal;var Oa=Ma(xa(),1),df=(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))(df||{}),mf="vk.com",fT=async(e,r,t)=>{let n=new URL(`https://${mf}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",r),e!==void 0&&n.searchParams.set("lang",e);let o=await(await Mt(n.toString())).json();return Tf(o,t)},Tf=(e,r)=>(0,Oa.default)(Object.entries(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),hf(n)])),hf=e=>Array.isArray(e)?e[0]:e;var yf=(t=>(t.RU="ru",t.EN="en",t))(yf||{});export{ws as ErrorCategory,yf as InterfaceLanguage,$e as Logger,f as Observable,k as Subject,w as Subscription,Ke as Tracer,ja as VERSION,df as VKNumericLanguage,Te as ValueSubject,Je as VideoQuality,za as abortable,Wa as addScript,ls as areQualitiesExact,Qa as assertEmptyArray,A as assertNever,Ua as assertNonNullable,Ba as assertNotEmptyArray,Ga as assertNullable,ps as assertQualityIsExact,Ot as buffer,Na as checkNever,ms as clearVideoElement,Ka as clientChecker,vs as cloneDeep,de as cloneDeepWith,It as combine,Iv as createURL,wt as debounce,rr as debounceFn,ts as detectEmbed,fs as fillWithDefault,Et as filter,Rt as filterChanged,me as flattenObject,Is as fromEvent,Ya as getExponentialDelay,as as getHighestQuality,Ts as getTraceSubscriptionMethod,ys as interval,ns as isHigher,is as isHigherOrEqual,er as isInvariantQuality,Ze as isLower,os as isLowerOrEqual,ht as isMobile,W as isNonNullable,Ye as isNullable,yv as isValidURL,fT as loadVKLangPack,he as map,Pt as mapTo,xt as merge,F as noop,$a as now,gs as observableFrom,ds as observeElementSize,_t as once,At as pairwise,yt as safeStorage,Ct as tap,St as throttle,tr as throttleFn,av as timeCodeToString,hs as timeout,ss as videoHeightToQuality,cs as videoQualityToHeight,us as videoSizeToQuality};
|
|
6
|
+
var qa=Object.create;var We=Object.defineProperty;var Ra=Object.getOwnPropertyDescriptor;var Pa=Object.getOwnPropertyNames;var _a=Object.getPrototypeOf,Aa=Object.prototype.hasOwnProperty;var a=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Ca=(e,r)=>{for(var t in r)We(e,t,{get:r[t],enumerable:!0})},La=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Pa(r))!Aa.call(e,i)&&i!==t&&We(e,i,{get:()=>r[i],enumerable:!(n=Ra(r,i))||n.enumerable});return e};var Ma=(e,r,t)=>(t=e!=null?qa(_a(e)):{},La(r||!e||!e.__esModule?We(t,"default",{value:e,enumerable:!0}):t,e));var P=a((xd,jt)=>{"use strict";jt.exports=function(e){try{return!!e()}catch{return!0}}});var ne=a((Od,Nt)=>{"use strict";var Ss=P();Nt.exports=!Ss(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var C=a((wd,Dt)=>{"use strict";var kt=ne(),Vt=Function.prototype,fr=Vt.call,Es=kt&&Vt.bind.bind(fr,fr);Dt.exports=kt?Es:function(e){return function(){return fr.apply(e,arguments)}}});var Ie=a((Sd,Ut)=>{"use strict";var Ft=C(),qs=Ft({}.toString),Rs=Ft("".slice);Ut.exports=function(e){return Rs(qs(e),8,-1)}});var Bt=a((Ed,Gt)=>{"use strict";var Ps=C(),_s=P(),As=Ie(),vr=Object,Cs=Ps("".split);Gt.exports=_s(function(){return!vr("z").propertyIsEnumerable(0)})?function(e){return As(e)==="String"?Cs(e,""):vr(e)}:vr});var xe=a((qd,Qt)=>{"use strict";Qt.exports=function(e){return e==null}});var Oe=a((Rd,Wt)=>{"use strict";var Ls=xe(),Ms=TypeError;Wt.exports=function(e){if(Ls(e))throw new Ms("Can't call method on "+e);return e}});var Y=a((Pd,$t)=>{"use strict";var js=Bt(),Ns=Oe();$t.exports=function(e){return js(Ns(e))}});var Kt=a((_d,zt)=>{"use strict";zt.exports=function(){}});var G=a((Ad,Yt)=>{"use strict";Yt.exports={}});var x=a((br,Ht)=>{"use strict";var ie=function(e){return e&&e.Math===Math&&e};Ht.exports=ie(typeof globalThis=="object"&&globalThis)||ie(typeof window=="object"&&window)||ie(typeof self=="object"&&self)||ie(typeof global=="object"&&global)||ie(typeof br=="object"&&br)||function(){return this}()||Function("return this")()});var O=a((Cd,Xt)=>{"use strict";var dr=typeof document=="object"&&document.all;Xt.exports=typeof dr>"u"&&dr!==void 0?function(e){return typeof e=="function"||e===dr}:function(e){return typeof e=="function"}});var en=a((Ld,Zt)=>{"use strict";var ks=x(),Vs=O(),Jt=ks.WeakMap;Zt.exports=Vs(Jt)&&/native code/.test(String(Jt))});var L=a((Md,rn)=>{"use strict";var Ds=O();rn.exports=function(e){return typeof e=="object"?e!==null:Ds(e)}});var _=a((jd,tn)=>{"use strict";var Fs=P();tn.exports=!Fs(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var Tr=a((Nd,on)=>{"use strict";var Us=x(),nn=L(),mr=Us.document,Gs=nn(mr)&&nn(mr.createElement);on.exports=function(e){return Gs?mr.createElement(e):{}}});var hr=a((kd,an)=>{"use strict";var Bs=_(),Qs=P(),Ws=Tr();an.exports=!Bs&&!Qs(function(){return Object.defineProperty(Ws("div"),"a",{get:function(){return 7}}).a!==7})});var yr=a((Vd,sn)=>{"use strict";var $s=_(),zs=P();sn.exports=$s&&zs(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var B=a((Dd,un)=>{"use strict";var Ks=L(),Ys=String,Hs=TypeError;un.exports=function(e){if(Ks(e))return e;throw new Hs(Ys(e)+" is not an object")}});var V=a((Fd,cn)=>{"use strict";var Xs=ne(),we=Function.prototype.call;cn.exports=Xs?we.bind(we):function(){return we.apply(we,arguments)}});var Se=a((Ud,ln)=>{"use strict";ln.exports={}});var xr=a((Gd,fn)=>{"use strict";var gr=Se(),Ir=x(),Js=O(),pn=function(e){return Js(e)?e:void 0};fn.exports=function(e,r){return arguments.length<2?pn(gr[e])||pn(Ir[e]):gr[e]&&gr[e][r]||Ir[e]&&Ir[e][r]}});var Or=a((Bd,vn)=>{"use strict";var Zs=C();vn.exports=Zs({}.isPrototypeOf)});var Tn=a((Qd,mn)=>{"use strict";var eu=x(),bn=eu.navigator,dn=bn&&bn.userAgent;mn.exports=dn?String(dn):""});var wn=a((Wd,On)=>{"use strict";var xn=x(),wr=Tn(),hn=xn.process,yn=xn.Deno,gn=hn&&hn.versions||yn&&yn.version,In=gn&&gn.v8,q,Ee;In&&(q=In.split("."),Ee=q[0]>0&&q[0]<4?1:+(q[0]+q[1]));!Ee&&wr&&(q=wr.match(/Edge\/(\d+)/),(!q||q[1]>=74)&&(q=wr.match(/Chrome\/(\d+)/),q&&(Ee=+q[1])));On.exports=Ee});var Sr=a(($d,En)=>{"use strict";var Sn=wn(),ru=P(),tu=x(),nu=tu.String;En.exports=!!Object.getOwnPropertySymbols&&!ru(function(){var e=Symbol("symbol detection");return!nu(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Sn&&Sn<41})});var Er=a((zd,qn)=>{"use strict";var iu=Sr();qn.exports=iu&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var qr=a((Kd,Rn)=>{"use strict";var ou=xr(),au=O(),su=Or(),uu=Er(),cu=Object;Rn.exports=uu?function(e){return typeof e=="symbol"}:function(e){var r=ou("Symbol");return au(r)&&su(r.prototype,cu(e))}});var qe=a((Yd,Pn)=>{"use strict";var lu=String;Pn.exports=function(e){try{return lu(e)}catch{return"Object"}}});var oe=a((Hd,_n)=>{"use strict";var pu=O(),fu=qe(),vu=TypeError;_n.exports=function(e){if(pu(e))return e;throw new vu(fu(e)+" is not a function")}});var Re=a((Xd,An)=>{"use strict";var bu=oe(),du=xe();An.exports=function(e,r){var t=e[r];return du(t)?void 0:bu(t)}});var Ln=a((Jd,Cn)=>{"use strict";var Rr=V(),Pr=O(),_r=L(),mu=TypeError;Cn.exports=function(e,r){var t,n;if(r==="string"&&Pr(t=e.toString)&&!_r(n=Rr(t,e))||Pr(t=e.valueOf)&&!_r(n=Rr(t,e))||r!=="string"&&Pr(t=e.toString)&&!_r(n=Rr(t,e)))return n;throw new mu("Can't convert object to primitive value")}});var ae=a((Zd,Mn)=>{"use strict";Mn.exports=!0});var kn=a((em,Nn)=>{"use strict";var jn=x(),Tu=Object.defineProperty;Nn.exports=function(e,r){try{Tu(jn,e,{value:r,configurable:!0,writable:!0})}catch{jn[e]=r}return r}});var Pe=a((rm,Fn)=>{"use strict";var hu=ae(),yu=x(),gu=kn(),Vn="__core-js_shared__",Dn=Fn.exports=yu[Vn]||gu(Vn,{});(Dn.versions||(Dn.versions=[])).push({version:"3.38.0",mode:hu?"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 Ar=a((tm,Gn)=>{"use strict";var Un=Pe();Gn.exports=function(e,r){return Un[e]||(Un[e]=r||{})}});var Cr=a((nm,Bn)=>{"use strict";var Iu=Oe(),xu=Object;Bn.exports=function(e){return xu(Iu(e))}});var M=a((im,Qn)=>{"use strict";var Ou=C(),wu=Cr(),Su=Ou({}.hasOwnProperty);Qn.exports=Object.hasOwn||function(r,t){return Su(wu(r),t)}});var Lr=a((om,Wn)=>{"use strict";var Eu=C(),qu=0,Ru=Math.random(),Pu=Eu(1 .toString);Wn.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Pu(++qu+Ru,36)}});var j=a((am,zn)=>{"use strict";var _u=x(),Au=Ar(),$n=M(),Cu=Lr(),Lu=Sr(),Mu=Er(),H=_u.Symbol,Mr=Au("wks"),ju=Mu?H.for||H:H&&H.withoutSetter||Cu;zn.exports=function(e){return $n(Mr,e)||(Mr[e]=Lu&&$n(H,e)?H[e]:ju("Symbol."+e)),Mr[e]}});var Xn=a((sm,Hn)=>{"use strict";var Nu=V(),Kn=L(),Yn=qr(),ku=Re(),Vu=Ln(),Du=j(),Fu=TypeError,Uu=Du("toPrimitive");Hn.exports=function(e,r){if(!Kn(e)||Yn(e))return e;var t=ku(e,Uu),n;if(t){if(r===void 0&&(r="default"),n=Nu(t,e,r),!Kn(n)||Yn(n))return n;throw new Fu("Can't convert object to primitive value")}return r===void 0&&(r="number"),Vu(e,r)}});var jr=a((um,Jn)=>{"use strict";var Gu=Xn(),Bu=qr();Jn.exports=function(e){var r=Gu(e,"string");return Bu(r)?r:r+""}});var X=a(ei=>{"use strict";var Qu=_(),Wu=hr(),$u=yr(),_e=B(),Zn=jr(),zu=TypeError,Nr=Object.defineProperty,Ku=Object.getOwnPropertyDescriptor,kr="enumerable",Vr="configurable",Dr="writable";ei.f=Qu?$u?function(r,t,n){if(_e(r),t=Zn(t),_e(n),typeof r=="function"&&t==="prototype"&&"value"in n&&Dr in n&&!n[Dr]){var i=Ku(r,t);i&&i[Dr]&&(r[t]=n.value,n={configurable:Vr in n?n[Vr]:i[Vr],enumerable:kr in n?n[kr]:i[kr],writable:!1})}return Nr(r,t,n)}:Nr:function(r,t,n){if(_e(r),t=Zn(t),_e(n),Wu)try{return Nr(r,t,n)}catch{}if("get"in n||"set"in n)throw new zu("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var se=a((lm,ri)=>{"use strict";ri.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var J=a((pm,ti)=>{"use strict";var Yu=_(),Hu=X(),Xu=se();ti.exports=Yu?function(e,r,t){return Hu.f(e,r,Xu(1,t))}:function(e,r,t){return e[r]=t,e}});var Ae=a((fm,ii)=>{"use strict";var Ju=Ar(),Zu=Lr(),ni=Ju("keys");ii.exports=function(e){return ni[e]||(ni[e]=Zu(e))}});var Ce=a((vm,oi)=>{"use strict";oi.exports={}});var ci=a((bm,ui)=>{"use strict";var ec=en(),si=x(),rc=L(),tc=J(),Fr=M(),Ur=Pe(),nc=Ae(),ic=Ce(),ai="Object already initialized",Gr=si.TypeError,oc=si.WeakMap,Le,ue,Me,ac=function(e){return Me(e)?ue(e):Le(e,{})},sc=function(e){return function(r){var t;if(!rc(r)||(t=ue(r)).type!==e)throw new Gr("Incompatible receiver, "+e+" required");return t}};ec||Ur.state?(R=Ur.state||(Ur.state=new oc),R.get=R.get,R.has=R.has,R.set=R.set,Le=function(e,r){if(R.has(e))throw new Gr(ai);return r.facade=e,R.set(e,r),r},ue=function(e){return R.get(e)||{}},Me=function(e){return R.has(e)}):(Q=nc("state"),ic[Q]=!0,Le=function(e,r){if(Fr(e,Q))throw new Gr(ai);return r.facade=e,tc(e,Q,r),r},ue=function(e){return Fr(e,Q)?e[Q]:{}},Me=function(e){return Fr(e,Q)});var R,Q;ui.exports={set:Le,get:ue,has:Me,enforce:ac,getterFor:sc}});var bi=a((dm,vi)=>{"use strict";var uc=ne(),fi=Function.prototype,li=fi.apply,pi=fi.call;vi.exports=typeof Reflect=="object"&&Reflect.apply||(uc?pi.bind(li):function(){return pi.apply(li,arguments)})});var Br=a((mm,di)=>{"use strict";var cc=Ie(),lc=C();di.exports=function(e){if(cc(e)==="Function")return lc(e)}});var yi=a(hi=>{"use strict";var mi={}.propertyIsEnumerable,Ti=Object.getOwnPropertyDescriptor,pc=Ti&&!mi.call({1:2},1);hi.f=pc?function(r){var t=Ti(this,r);return!!t&&t.enumerable}:mi});var xi=a(Ii=>{"use strict";var fc=_(),vc=V(),bc=yi(),dc=se(),mc=Y(),Tc=jr(),hc=M(),yc=hr(),gi=Object.getOwnPropertyDescriptor;Ii.f=fc?gi:function(r,t){if(r=mc(r),t=Tc(t),yc)try{return gi(r,t)}catch{}if(hc(r,t))return dc(!vc(bc.f,r,t),r[t])}});var wi=a((ym,Oi)=>{"use strict";var gc=P(),Ic=O(),xc=/#|\.prototype\./,ce=function(e,r){var t=wc[Oc(e)];return t===Ec?!0:t===Sc?!1:Ic(r)?gc(r):!!r},Oc=ce.normalize=function(e){return String(e).replace(xc,".").toLowerCase()},wc=ce.data={},Sc=ce.NATIVE="N",Ec=ce.POLYFILL="P";Oi.exports=ce});var Qr=a((gm,Ei)=>{"use strict";var Si=Br(),qc=oe(),Rc=ne(),Pc=Si(Si.bind);Ei.exports=function(e,r){return qc(e),r===void 0?e:Rc?Pc(e,r):function(){return e.apply(r,arguments)}}});var Wr=a((Im,Ri)=>{"use strict";var le=x(),_c=bi(),Ac=Br(),Cc=O(),Lc=xi().f,Mc=wi(),Z=Se(),jc=Qr(),ee=J(),qi=M();Pe();var Nc=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 _c(e,this,arguments)};return r.prototype=e.prototype,r};Ri.exports=function(e,r){var t=e.target,n=e.global,i=e.stat,o=e.proto,s=n?le:i?le[t]:le[t]&&le[t].prototype,u=n?Z:Z[t]||ee(Z,t,{})[t],p=u.prototype,l,v,c,b,d,T,h,I,y;for(b in r)l=Mc(n?b:t+(i?".":"#")+b,e.forced),v=!l&&s&&qi(s,b),T=u[b],v&&(e.dontCallGetSet?(y=Lc(s,b),h=y&&y.value):h=s[b]),d=v&&h?h:r[b],!(!l&&!o&&typeof T==typeof d)&&(e.bind&&v?I=jc(d,le):e.wrap&&v?I=Nc(d):o&&Cc(d)?I=Ac(d):I=d,(e.sham||d&&d.sham||T&&T.sham)&&ee(I,"sham",!0),ee(u,b,I),o&&(c=t+"Prototype",qi(Z,c)||ee(Z,c,{}),ee(Z[c],b,d),e.real&&p&&(l||!p[b])&&ee(p,b,d)))}});var Ai=a((xm,_i)=>{"use strict";var $r=_(),kc=M(),Pi=Function.prototype,Vc=$r&&Object.getOwnPropertyDescriptor,zr=kc(Pi,"name"),Dc=zr&&function(){}.name==="something",Fc=zr&&(!$r||$r&&Vc(Pi,"name").configurable);_i.exports={EXISTS:zr,PROPER:Dc,CONFIGURABLE:Fc}});var Li=a((Om,Ci)=>{"use strict";var Uc=Math.ceil,Gc=Math.floor;Ci.exports=Math.trunc||function(r){var t=+r;return(t>0?Gc:Uc)(t)}});var Kr=a((wm,Mi)=>{"use strict";var Bc=Li();Mi.exports=function(e){var r=+e;return r!==r||r===0?0:Bc(r)}});var Ni=a((Sm,ji)=>{"use strict";var Qc=Kr(),Wc=Math.max,$c=Math.min;ji.exports=function(e,r){var t=Qc(e);return t<0?Wc(t+r,0):$c(t,r)}});var Vi=a((Em,ki)=>{"use strict";var zc=Kr(),Kc=Math.min;ki.exports=function(e){var r=zc(e);return r>0?Kc(r,9007199254740991):0}});var Yr=a((qm,Di)=>{"use strict";var Yc=Vi();Di.exports=function(e){return Yc(e.length)}});var Gi=a((Rm,Ui)=>{"use strict";var Hc=Y(),Xc=Ni(),Jc=Yr(),Fi=function(e){return function(r,t,n){var i=Hc(r),o=Jc(i);if(o===0)return!e&&-1;var s=Xc(n,o),u;if(e&&t!==t){for(;o>s;)if(u=i[s++],u!==u)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===t)return e||s||0;return!e&&-1}};Ui.exports={includes:Fi(!0),indexOf:Fi(!1)}});var Wi=a((Pm,Qi)=>{"use strict";var Zc=C(),Hr=M(),el=Y(),rl=Gi().indexOf,tl=Ce(),Bi=Zc([].push);Qi.exports=function(e,r){var t=el(e),n=0,i=[],o;for(o in t)!Hr(tl,o)&&Hr(t,o)&&Bi(i,o);for(;r.length>n;)Hr(t,o=r[n++])&&(~rl(i,o)||Bi(i,o));return i}});var Xr=a((_m,$i)=>{"use strict";$i.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Ki=a((Am,zi)=>{"use strict";var nl=Wi(),il=Xr();zi.exports=Object.keys||function(r){return nl(r,il)}});var Hi=a(Yi=>{"use strict";var ol=_(),al=yr(),sl=X(),ul=B(),cl=Y(),ll=Ki();Yi.f=ol&&!al?Object.defineProperties:function(r,t){ul(r);for(var n=cl(t),i=ll(t),o=i.length,s=0,u;o>s;)sl.f(r,u=i[s++],n[u]);return r}});var Ji=a((Lm,Xi)=>{"use strict";var pl=xr();Xi.exports=pl("document","documentElement")});var rt=a((Mm,oo)=>{"use strict";var fl=B(),vl=Hi(),Zi=Xr(),bl=Ce(),dl=Ji(),ml=Tr(),Tl=Ae(),eo=">",ro="<",Zr="prototype",et="script",no=Tl("IE_PROTO"),Jr=function(){},io=function(e){return ro+et+eo+e+ro+"/"+et+eo},to=function(e){e.write(io("")),e.close();var r=e.parentWindow.Object;return e=null,r},hl=function(){var e=ml("iframe"),r="java"+et+":",t;return e.style.display="none",dl.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(io("document.F=Object")),t.close(),t.F},je,Ne=function(){try{je=new ActiveXObject("htmlfile")}catch{}Ne=typeof document<"u"?document.domain&&je?to(je):hl():to(je);for(var e=Zi.length;e--;)delete Ne[Zr][Zi[e]];return Ne()};bl[no]=!0;oo.exports=Object.create||function(r,t){var n;return r!==null?(Jr[Zr]=fl(r),n=new Jr,Jr[Zr]=null,n[no]=r):n=Ne(),t===void 0?n:vl.f(n,t)}});var so=a((jm,ao)=>{"use strict";var yl=P();ao.exports=!yl(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var nt=a((Nm,co)=>{"use strict";var gl=M(),Il=O(),xl=Cr(),Ol=Ae(),wl=so(),uo=Ol("IE_PROTO"),tt=Object,Sl=tt.prototype;co.exports=wl?tt.getPrototypeOf:function(e){var r=xl(e);if(gl(r,uo))return r[uo];var t=r.constructor;return Il(t)&&r instanceof t?t.prototype:r instanceof tt?Sl:null}});var it=a((km,lo)=>{"use strict";var El=J();lo.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:El(e,r,t),e}});var ut=a((Vm,vo)=>{"use strict";var ql=P(),Rl=O(),Pl=L(),_l=rt(),po=nt(),Al=it(),Cl=j(),Ll=ae(),st=Cl("iterator"),fo=!1,N,ot,at;[].keys&&(at=[].keys(),"next"in at?(ot=po(po(at)),ot!==Object.prototype&&(N=ot)):fo=!0);var Ml=!Pl(N)||ql(function(){var e={};return N[st].call(e)!==e});Ml?N={}:Ll&&(N=_l(N));Rl(N[st])||Al(N,st,function(){return this});vo.exports={IteratorPrototype:N,BUGGY_SAFARI_ITERATORS:fo}});var ke=a((Dm,mo)=>{"use strict";var jl=j(),Nl=jl("toStringTag"),bo={};bo[Nl]="z";mo.exports=String(bo)==="[object z]"});var ct=a((Fm,To)=>{"use strict";var kl=ke(),Vl=O(),Ve=Ie(),Dl=j(),Fl=Dl("toStringTag"),Ul=Object,Gl=Ve(function(){return arguments}())==="Arguments",Bl=function(e,r){try{return e[r]}catch{}};To.exports=kl?Ve:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=Bl(r=Ul(e),Fl))=="string"?t:Gl?Ve(r):(n=Ve(r))==="Object"&&Vl(r.callee)?"Arguments":n}});var yo=a((Um,ho)=>{"use strict";var Ql=ke(),Wl=ct();ho.exports=Ql?{}.toString:function(){return"[object "+Wl(this)+"]"}});var De=a((Gm,Io)=>{"use strict";var $l=ke(),zl=X().f,Kl=J(),Yl=M(),Hl=yo(),Xl=j(),go=Xl("toStringTag");Io.exports=function(e,r,t,n){var i=t?e:e&&e.prototype;i&&(Yl(i,go)||zl(i,go,{configurable:!0,value:r}),n&&!$l&&Kl(i,"toString",Hl))}});var Oo=a((Bm,xo)=>{"use strict";var Jl=ut().IteratorPrototype,Zl=rt(),ep=se(),rp=De(),tp=G(),np=function(){return this};xo.exports=function(e,r,t,n){var i=r+" Iterator";return e.prototype=Zl(Jl,{next:ep(+!n,t)}),rp(e,i,!1,!0),tp[i]=np,e}});var So=a((Qm,wo)=>{"use strict";var ip=C(),op=oe();wo.exports=function(e,r,t){try{return ip(op(Object.getOwnPropertyDescriptor(e,r)[t]))}catch{}}});var qo=a((Wm,Eo)=>{"use strict";var ap=L();Eo.exports=function(e){return ap(e)||e===null}});var Po=a(($m,Ro)=>{"use strict";var sp=qo(),up=String,cp=TypeError;Ro.exports=function(e){if(sp(e))return e;throw new cp("Can't set "+up(e)+" as a prototype")}});var Ao=a((zm,_o)=>{"use strict";var lp=So(),pp=L(),fp=Oe(),vp=Po();_o.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=lp(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch{}return function(i,o){return fp(i),vp(o),pp(i)&&(e?t(i,o):i.__proto__=o),i}}():void 0)});var Go=a((Km,Uo)=>{"use strict";var bp=Wr(),dp=V(),Fe=ae(),Do=Ai(),mp=O(),Tp=Oo(),Co=nt(),Lo=Ao(),hp=De(),yp=J(),lt=it(),gp=j(),Mo=G(),Fo=ut(),Ip=Do.PROPER,xp=Do.CONFIGURABLE,jo=Fo.IteratorPrototype,Ue=Fo.BUGGY_SAFARI_ITERATORS,pe=gp("iterator"),No="keys",fe="values",ko="entries",Vo=function(){return this};Uo.exports=function(e,r,t,n,i,o,s){Tp(t,r,n);var u=function(y){if(y===i&&b)return b;if(!Ue&&y&&y in v)return v[y];switch(y){case No:return function(){return new t(this,y)};case fe:return function(){return new t(this,y)};case ko:return function(){return new t(this,y)}}return function(){return new t(this)}},p=r+" Iterator",l=!1,v=e.prototype,c=v[pe]||v["@@iterator"]||i&&v[i],b=!Ue&&c||u(i),d=r==="Array"&&v.entries||c,T,h,I;if(d&&(T=Co(d.call(new e)),T!==Object.prototype&&T.next&&(!Fe&&Co(T)!==jo&&(Lo?Lo(T,jo):mp(T[pe])||lt(T,pe,Vo)),hp(T,p,!0,!0),Fe&&(Mo[p]=Vo))),Ip&&i===fe&&c&&c.name!==fe&&(!Fe&&xp?yp(v,"name",fe):(l=!0,b=function(){return dp(c,this)})),i)if(h={values:u(fe),keys:o?b:u(No),entries:u(ko)},s)for(I in h)(Ue||l||!(I in v))&<(v,I,h[I]);else bp({target:r,proto:!0,forced:Ue||l},h);return(!Fe||s)&&v[pe]!==b&<(v,pe,b,{name:i}),Mo[r]=b,h}});var Qo=a((Ym,Bo)=>{"use strict";Bo.exports=function(e,r){return{value:e,done:r}}});var ft=a((Hm,Yo)=>{"use strict";var Op=Y(),pt=Kt(),Wo=G(),zo=ci(),wp=X().f,Sp=Go(),Ge=Qo(),Ep=ae(),qp=_(),Ko="Array Iterator",Rp=zo.set,Pp=zo.getterFor(Ko);Yo.exports=Sp(Array,"Array",function(e,r){Rp(this,{type:Ko,target:Op(e),index:0,kind:r})},function(){var e=Pp(this),r=e.target,t=e.index++;if(!r||t>=r.length)return e.target=void 0,Ge(void 0,!0);switch(e.kind){case"keys":return Ge(t,!1);case"values":return Ge(r[t],!1)}return Ge([t,r[t]],!1)},"values");var $o=Wo.Arguments=Wo.Array;pt("keys");pt("values");pt("entries");if(!Ep&&qp&&$o.name!=="values")try{wp($o,"name",{value:"values"})}catch{}});var Xo=a((Xm,Ho)=>{"use strict";var _p=j(),Ap=G(),Cp=_p("iterator"),Lp=Array.prototype;Ho.exports=function(e){return e!==void 0&&(Ap.Array===e||Lp[Cp]===e)}});var vt=a((Jm,Zo)=>{"use strict";var Mp=ct(),Jo=Re(),jp=xe(),Np=G(),kp=j(),Vp=kp("iterator");Zo.exports=function(e){if(!jp(e))return Jo(e,Vp)||Jo(e,"@@iterator")||Np[Mp(e)]}});var ra=a((Zm,ea)=>{"use strict";var Dp=V(),Fp=oe(),Up=B(),Gp=qe(),Bp=vt(),Qp=TypeError;ea.exports=function(e,r){var t=arguments.length<2?Bp(e):r;if(Fp(t))return Up(Dp(t,e));throw new Qp(Gp(e)+" is not iterable")}});var ia=a((eT,na)=>{"use strict";var Wp=V(),ta=B(),$p=Re();na.exports=function(e,r,t){var n,i;ta(e);try{if(n=$p(e,"return"),!n){if(r==="throw")throw t;return t}n=Wp(n,e)}catch(o){i=!0,n=o}if(r==="throw")throw t;if(i)throw n;return ta(n),t}});var ca=a((rT,ua)=>{"use strict";var zp=Qr(),Kp=V(),Yp=B(),Hp=qe(),Xp=Xo(),Jp=Yr(),oa=Or(),Zp=ra(),ef=vt(),aa=ia(),rf=TypeError,Be=function(e,r){this.stopped=e,this.result=r},sa=Be.prototype;ua.exports=function(e,r,t){var n=t&&t.that,i=!!(t&&t.AS_ENTRIES),o=!!(t&&t.IS_RECORD),s=!!(t&&t.IS_ITERATOR),u=!!(t&&t.INTERRUPTED),p=zp(r,n),l,v,c,b,d,T,h,I=function(g){return l&&aa(l,"normal",g),new Be(!0,g)},y=function(g){return i?(Yp(g),u?p(g[0],g[1],I):p(g[0],g[1])):u?p(g,I):p(g)};if(o)l=e.iterator;else if(s)l=e;else{if(v=ef(e),!v)throw new rf(Hp(e)+" is not iterable");if(Xp(v)){for(c=0,b=Jp(e);b>c;c++)if(d=y(e[c]),d&&oa(sa,d))return d;return new Be(!1)}l=Zp(e,v)}for(T=o?e.next:l.next;!(h=Kp(T,l)).done;){try{d=y(h.value)}catch(g){aa(l,"throw",g)}if(typeof d=="object"&&d&&oa(sa,d))return d}return new Be(!1)}});var pa=a((tT,la)=>{"use strict";var tf=_(),nf=X(),of=se();la.exports=function(e,r,t){tf?nf.f(e,r,of(0,t)):e[r]=t}});var fa=a(()=>{"use strict";var af=Wr(),sf=ca(),uf=pa();af({target:"Object",stat:!0},{fromEntries:function(r){var t={};return sf(r,function(n,i){uf(t,n,i)},{AS_ENTRIES:!0}),t}})});var ba=a((oT,va)=>{"use strict";ft();fa();var cf=Se();va.exports=cf.Object.fromEntries});var ma=a((aT,da)=>{"use strict";da.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 ha=a(()=>{"use strict";ft();var lf=ma(),pf=x(),ff=De(),Ta=G();for(Qe in lf)ff(pf[Qe],Qe),Ta[Qe]=Ta.Array;var Qe});var ga=a((cT,ya)=>{"use strict";var vf=ba();ha();ya.exports=vf});var xa=a((lT,Ia)=>{"use strict";var bf=ga();Ia.exports=bf});var ja="1.0.50-dev.eaae0302.0";var w=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 A=e=>{throw new Error(`${e} is value of unexpected type`)},Na=e=>{};var F=()=>{};var f=class{constructor(r){r&&(this._subscribe=r)}subscribe(r,t){let n;t?typeof t=="function"?n={next:t,error:F}:n={next:s=>t.next(s),error:s=>t.error?.(s)}:n={next:F,error:F};let i=typeof r=="function"?{next:s=>{try{r(s)}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)},o;try{o=this._subscribe(i)}catch(s){i.error?.(s)}return new w().add(()=>{switch(i.next=F,i.error=F,typeof o){case"function":o();return;case"object":o.unsubscribe();return;case"undefined":return;default:return A(o)}})}pipe(...r){return r.reduce((t,n)=>n(t),this)}_subscribe(r){}};var k=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 w().add(()=>this.subscribers.delete(n))}};var $e=class{constructor(){this.log$=new k;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 ka,context as Va}from"@opentelemetry/api";import{TracerAllSpansProcessor as Da,TracerMemorySpanExporter as Tt,initTracerOpenTelemetry as Fa}from"@tracer/opentelemetry";var ze=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}},Ke=class e{constructor({name:r,parentContext:t,tracer:n}){this.childTracers=[];let i=!n;if(i){let s=Fa({serviceName:"videoplayer-sdk-web",appToken:"L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb",spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),u=new Tt,p=new Tt;this.spanExporter=u,s.addSpanProcessor(new Da({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=ka.setSpan(Va.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 ze({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 Ua(e,r='Assertion "value is not nullable" failed'){if(e==null)throw new Error(r)}function Ga(e,r='Assertion "value is nullable" failed'){if(e!=null)throw new Error(r)}function W(e){return typeof e<"u"&&e!==null}function Ye(e){return e==null}function Ba(e,r){if(!e?.length)throw new Error(r)}function Qa(e,r){if(e?.length)throw new Error(r)}var Wa=(e,r,t)=>new Promise((n,i)=>{r.addEventListener("abort",()=>{u(),l.remove()});let o=()=>{u(),i()},s=()=>{u(),n()},u=()=>{p&&clearTimeout(p),l.removeEventListener("load",s),l.removeEventListener("error",o)},p;t&&(p=window.setTimeout(o,t));let l=document.createElement("script");l.addEventListener("load",s),l.addEventListener("error",o),l.src=e,document.head.appendChild(l)});var $a=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var za=(e,r)=>async(...t)=>{let n=r(...t),i=e.aborted,o;for(;!i&&!e.aborted;)try{let s=await n.next(o);i=s.done??!1,o=s.value}catch(s){await n.throw(s)}return o};var ht=()=>/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion??navigator.userAgent)||navigator?.userAgentData?.mobile,He=class{constructor(){this.detect()}get browser(){return this._currentBrowser}get device(){return this._currentDevice}get isTouch(){return this._maxTouchPoints>0}get isIOS(){return["iPhone","iPad","iPod"].includes(this.device)}get isMac(){return this.device==="Mac"}get isApple(){return this.isIOS||this.isMac}get isIphoneOrOldIpad(){if(!this.isApple||!this.isTouch)return!1;let r=this.device==="iPad"||window?.screen.width>700,t=this._iosVersion;return!r||r&&!!t&&t<16}get isAndroid(){return this.device==="Android"}get isMobile(){return this._isMobile}get iOSVersion(){return this._iosVersion}get macVersion(){return this._macVersion}get isYandex(){return this.browser==="Yandex"}get isSafari(){return this.browser==="Safari"}get isSamsungBrowser(){return this.browser==="SamsungBrowser"}get isHDR(){return this._isHdr}detect(){let{userAgent:r,maxTouchPoints:t}=navigator;try{this._maxTouchPoints=t,this._isHdr=!!matchMedia("(dynamic-range: high)")?.matches}catch(n){console.error(n)}try{this._isMobile=ht()}catch(n){console.error(n)}this.detectBrowser(r),this.detectDevice(r),this.isIOS&&this.detectIOSVersion(),this.isMac&&this.detectMacVersion()}detectBrowser(r){try{let t=/yabrowser/i.test(r)?"Yandex":void 0,n=/samsungbrowser/i.test(r)?"SamsungBrowser":void 0,i=/chrome|crios/i.test(r)?"Chrome":void 0,o=/chromium/i.test(r)?"Chromium":void 0,s=/firefox|fxios/i.test(r)?"Firefox":void 0,u=/webkit|safari|khtml/i.test(r)?"Safari":void 0,p=/opr\//i.test(r)?"Opera":void 0,l=/edg/i.test(r)?"Edge":void 0;this._currentBrowser=t||n||s||p||l||i||o||u||"Rest"}catch(t){console.error(t)}}detectDevice(r){try{let t=/android/i.test(r)?"Android":void 0,n=/iphone/i.test(r)?"iPhone":void 0,i=/ipad/i.test(r)?"iPad":void 0,o=/ipod/i.test(r)?"iPod":void 0,s=/mac/i.test(r)?"Mac":void 0,u=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(r)?"RestMobile":void 0;this._currentDevice=t||n||i||o||u||s||"Desktop"}catch(t){console.error(t)}}detectIOSVersion(){try{let{userAgent:r}=window.navigator,t=r.match(/Version\/(\d+(\.\d+)?)/i);if(!t)return;let n=t[1],i=parseFloat(n);if(isNaN(i))return;this._iosVersion=i}catch(r){console.error(r)}}detectMacVersion(){try{let{userAgent:r}=window.navigator,t=r.match(/Version\/(\d+)/);if(!t)return;let n=t[1],i=parseInt(n,10);if(isNaN(i))return;this._macVersion=i}catch(r){console.error(r)}}},Ka=new He;var Ya=(e,{start:r=0,factor:t=2,max:n=1/0,min:i=r,random:o=0}={})=>{let s=r;return s*=t**e,s*=1+(Math.random()*o*2-o),s=Math.round(s),s=Math.min(s,n),s=Math.max(s,i),s};var yt={};Ca(yt,{clear:()=>rs,get:()=>Xa,has:()=>Za,isPersistent:()=>Ha,remove:()=>es,set:()=>Ja});var $,U,Xe=`vk-videoplayer-dummy-key-${Math.random()}`,z=()=>{if(U!==void 0)return U;try{localStorage.setItem(Xe,"test"),localStorage.removeItem(Xe),U=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(Xe),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},Ha=()=>z()===0,Xa=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:A(r)}},Ja=(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:return void $?.set(e,r);default:A(t)}},Za=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 A(r),!1}},es=e=>{let r=z();switch(r){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:return void $?.delete(e);default:A(r)}},rs=()=>{let e=z();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return $?.clear();default:A(e)}};var ts=()=>{let e,r;try{e=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?e=!0:(e=!1,console.error(n))}try{window.location.ancestorOrigins&&(r=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!r&&document.referrer&&(r=document.referrer)}catch(n){console.error(n)}let t=r?new URL(r).hostname:void 0;return{isEmbed:e,host:t}};var Je=(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))(Je||{});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}},ns=(e,r)=>S[e].height>S[r].height,is=(e,r)=>S[e].height>=S[r].height,Ze=(e,r)=>S[e].height<S[r].height,os=(e,r)=>S[e].height<=S[r].height,as=e=>e.sort((r,t)=>r===t?0:r==="Invariant quality"?1:t==="Invariant quality"?-1:Ze(r,t)?1:-1)[0],gt=Object.keys(S).sort((e,r)=>Ze(e,r)?-1:1),ss=(e,r=.02)=>[...gt].find(n=>S[n].height*(1+r)>=e),us=({width:e,height:r})=>{let t=Math.min(e,r),n=Math.max(e,r);return gt.find(i=>{let o=S[i];return o.width>=n&&o.height>=t})},cs=e=>S[e].height,er=e=>e==="Invariant quality",ls=e=>e.every(r=>!er(r));function ps(e){if(er(e))throw new Error("Expected exact quality")}var fs=(e,r)=>{let t={};for(let n of Object.keys(r)){let i=r[n],o=e[n];Array.isArray(i)&&Array.isArray(o)?t[n]=o:typeof i=="object"&&typeof o=="object"?t[n]=fs(o,i):t[n]=n in e?o:i}return t};var av=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 rr(e,r=0,t){let n,i,o,s,u,p,l=0,v=!1,c=!1,b=!0,d=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(v=!!t.leading,c="maxWait"in t,o=t?.maxWait?Math.max(+t?.maxWait||0,r):o,b="trailing"in t?!!t.trailing:b);function T(m){let E=n,D=i;return n=i=void 0,l=m,s=e.apply(D,E),s}function h(m,E){return d?(u&&window.cancelAnimationFrame(u),window.requestAnimationFrame(m)):setTimeout(m,E)}function I(m){if(d){window.cancelAnimationFrame(m);return}clearTimeout(m)}function y(m){return l=m,u=h(ve,r),v?T(m):s}function g(m){let E=m-p,D=m-l,mt=r-E;return c?Math.min(mt,o-D):mt}function bt(m){let E=m-p,D=m-l;return p===void 0||E>=r||E<0||c&&D>=o}function ve(){let m=Date.now();if(bt(m))return dt(m);u=h(ve,g(m))}function dt(m){return u=void 0,b&&n?T(m):(n=i=void 0,s)}function wa(){u!==void 0&&I(u),l=0,n=p=i=u=void 0}function Sa(){return u===void 0?s:dt(Date.now())}function Ea(){return u!==void 0}function be(...m){let E=Date.now(),D=bt(E);if(n=m,i=this,p=E,D){if(u===void 0)return y(p);if(c)return u=h(ve,r),T(p)}return u===void 0&&(u=h(ve,r)),s}return be.cancel=wa,be.flush=Sa,be.pending=Ea,be}var tr=(e,r=0,t)=>rr(e,r,{...{leading:!0,trailing:!0},...t,maxWait:r});var de=(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]=de(e[n],r):t[n]=e[n]}return t};var vs=e=>de(e);var bs=300,ds=(e,r=bs)=>new f(t=>{let{width:n,height:i}=e.getBoundingClientRect();if(t.next({width:n,height:i}),!window.ResizeObserver)return;let o=new ResizeObserver(tr(s=>{let u=s[0];if(!u)return;let p,l;u.contentBoxSize&&u.contentBoxSize[0]?(l=u.contentBoxSize[0].blockSize,p=u.contentBoxSize[0].inlineSize):u.contentRect&&(p=u.contentRect.width,l=u.contentRect.height),W(p)&&W(l)&&t.next({width:p,height:l})},r));return o.observe(e),()=>o.disconnect()});var me=(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 o=me(e[i],r-1);for(let s in o)o.hasOwnProperty(s)&&(n[i+t+s]=o[s])}else n[i]=e[i];return n};var ms=e=>{e.removeAttribute("src"),e.load()};var yv=e=>{let r;try{r=new URL(e)}catch{return!1}return r.protocol==="https:"};var Iv=e=>{try{return new URL(e)}catch{return null}};var Ts=e=>r=>t=>{let n=typeof t=="object";t==null||n&&!Object.keys(t).length||e(r,n?me(t):{value:t})};var Te=class extends k{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}};function It(e){return new f(r=>{let t={},n=Object.keys(e).length,i=o=>s=>{o in t||n--,t[o]=s,n===0&&r.next(t)};return Object.entries(e).reduce((o,[s,u])=>o.add(u.subscribe(i(s))),new w)})}function xt(...e){return new f(r=>e.reduce((t,n)=>t.add(n.subscribe(r)),new w))}var hs=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 ys=e=>new f(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var gs=e=>new f(r=>{e.forEach(t=>r.next(t))});var Is=(e,r)=>new f(t=>{let n=i=>t.next(i);return e.addEventListener(r,n),()=>e.removeEventListener(r,n)});function Ot(e){return r=>new f(t=>r.subscribe(new nr(t,e)))}var nr=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 xs={leading:!1,trailing:!0};function wt(e,r=xs){return t=>new f(n=>t.subscribe(new ir(n,e,r)))}var ir=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 Os={leading:!0,trailing:!1};function St(e,r=Os){return t=>new f(n=>t.subscribe(new or(n,e,r)))}var or=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,Ye(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 Et(e){return r=>new f(t=>r.subscribe(new ar(t,e)))}var ar=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)}};function Rt(e=(r,t)=>r===t){return r=>new f(t=>r.subscribe(new sr(t,e)))}var qt={},sr=class{constructor(r,t){this.destination=r;this.predicate=t;this.lastValue=qt}next(r){let t;try{t=this.lastValue===qt||!this.predicate(this.lastValue,r),this.lastValue=r}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};function he(e){return r=>new f(t=>r.subscribe(new ur(t,e)))}var ur=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 he(()=>e)}function _t(){return e=>new f(r=>{let t=!1,n=!1,i=e.subscribe(o=>{t||(t=!0,r.next(o)),n&&i.unsubscribe()},o=>{t=!0,r.error?.(o),n&&i.unsubscribe()});return n=!0,t&&i.unsubscribe(),i})}function At(){return e=>new f(r=>e.subscribe(new cr(r)))}var cr=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 Ct(e){return r=>new f(t=>r.subscribe(new lr(t,e)))}var lr=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)}};var ws=(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))(ws||{});var ye=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,o=n.length;i<o;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,o=n.length;i<o;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}},K=class extends ye{constructor(){super(),this.listeners||ye.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)}},re=class{constructor(){Object.defineProperty(this,"signal",{value:new K,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&&(re.prototype[Symbol.toStringTag]="AbortController",K.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 pr(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:o};let o=t;(o&&!o.prototype.hasOwnProperty("signal")||i)&&(o=function(l,v){let c;v&&v.signal&&(c=v.signal,delete v.signal);let b=new t(l,v);return c&&Object.defineProperty(b,"signal",{writable:!1,enumerable:!1,configurable:!0,value:c}),b},o.prototype=t.prototype);let s=r;return{fetch:(p,l)=>{let v=o&&o.prototype.isPrototypeOf(p)?p.signal:l?l.signal:void 0;if(v){let c;try{c=new DOMException("Aborted","AbortError")}catch{c=new Error("Aborted"),c.name="AbortError"}if(v.aborted)return Promise.reject(c);let b=new Promise((d,T)=>{v.addEventListener("abort",()=>T(c),{once:!0})});return l&&l.signal&&delete l.signal,Promise.race([b,s(p,l)])}return s(p,l)},Request:o}}var te=ge({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),Lt=te?pr({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,Mt=te?Lt.fetch:window.fetch,hd=te?Lt.Request:window.Request,yd=te?re:window.AbortController,gd=te?K:window.AbortSignal;var Oa=Ma(xa(),1),df=(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))(df||{}),mf="vk.com",fT=async(e,r,t)=>{let n=new URL(`https://${mf}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",r),e!==void 0&&n.searchParams.set("lang",e);let o=await(await Mt(n.toString())).json();return Tf(o,t)},Tf=(e,r)=>(0,Oa.default)(Object.entries(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),hf(n)])),hf=e=>Array.isArray(e)?e[0]:e;var yf=(t=>(t.RU="ru",t.EN="en",t))(yf||{});export{ws as ErrorCategory,yf as InterfaceLanguage,$e as Logger,f as Observable,k as Subject,w as Subscription,Ke as Tracer,ja as VERSION,df as VKNumericLanguage,Te as ValueSubject,Je as VideoQuality,za as abortable,Wa as addScript,ls as areQualitiesExact,Qa as assertEmptyArray,A as assertNever,Ua as assertNonNullable,Ba as assertNotEmptyArray,Ga as assertNullable,ps as assertQualityIsExact,Ot as buffer,Na as checkNever,ms as clearVideoElement,Ka as clientChecker,vs as cloneDeep,de as cloneDeepWith,It as combine,Iv as createURL,wt as debounce,rr as debounceFn,ts as detectEmbed,fs as fillWithDefault,Et as filter,Rt as filterChanged,me as flattenObject,Is as fromEvent,Ya as getExponentialDelay,as as getHighestQuality,Ts as getTraceSubscriptionMethod,ys as interval,ns as isHigher,is as isHigherOrEqual,er as isInvariantQuality,Ze as isLower,os as isLowerOrEqual,ht as isMobile,W as isNonNullable,Ye as isNullable,yv as isValidURL,fT as loadVKLangPack,he as map,Pt as mapTo,xt as merge,F as noop,$a as now,gs as observableFrom,ds as observeElementSize,_t as once,At as pairwise,yt as safeStorage,Ct as tap,St as throttle,tr as throttleFn,av as timeCodeToString,hs as timeout,ss as videoHeightToQuality,cs as videoQualityToHeight,us as videoSizeToQuality};
|
package/evergreen.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-shared v1.0.50-dev.
|
|
3
|
-
*
|
|
2
|
+
* @vkontakte/videoplayer-shared v1.0.50-dev.eaae0302.0
|
|
3
|
+
* Thu, 21 Nov 2024 07:42:12 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-50/doc/
|
|
5
5
|
*/
|
|
6
|
-
var Ee=Object.defineProperty;var Se=(t,e)=>{for(var r in e)Ee(t,r,{get:e[r],enumerable:!0})};var Re="1.0.50-dev.1326de93.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`)},Ae=t=>{};var g=()=>{};var c=class{constructor(e){e&&(this._subscribe=e)}subscribe(e,r){let n;r?typeof r=="function"?n={next:r,error:g}:n={next:o=>r.next(o),error:o=>r.error?.(o)}:n={next:g,error:g};let i=typeof e=="function"?{next:o=>{try{e(o)}catch(a){n.next(a)}},error:o=>n.next(o)}:{next:o=>e.next(o),error:o=>e.error?e.error(o):n.next(o)},s;try{s=this._subscribe(i)}catch(o){i.error?.(o)}return new d().add(()=>{switch(i.next=g,i.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 c{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 Pe,context as Ce}from"@opentelemetry/api";import{TracerAllSpansProcessor as Le,TracerMemorySpanExporter as ne,initTracerOpenTelemetry as ke}from"@tracer/opentelemetry";var V=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}},N=class t{constructor({name:e,parentContext:r,tracer:n}){this.childTracers=[];let i=!n;if(i){let o=ke({serviceName:"videoplayer-sdk-web",appToken:"L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb",spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),a=new ne,p=new ne;this.spanExporter=a,o.addSpanProcessor(new Le({startedSpansExporter:a,endedSpansExporter:p})),this.tracer=o.getTracer("sdk-videoplayer-tracer")}else this.tracer=n;this.span=this.tracer.startSpan(e,{root:i},r),this.context=Pe.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 V({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 Ve(t,e='Assertion "value is nullable" failed'){if(t!=null)throw new Error(e)}function x(t){return typeof t<"u"&&t!==null}function _(t){return t==null}function Ne(t,e){if(!t?.length)throw new Error(e)}function _e(t,e){if(t?.length)throw new Error(e)}var Qe=(t,e,r)=>new Promise((n,i)=>{e.addEventListener("abort",()=>{a(),b.remove()});let s=()=>{a(),i()},o=()=>{a(),n()},a=()=>{p&&clearTimeout(p),b.removeEventListener("load",o),b.removeEventListener("error",s)},p;r&&(p=window.setTimeout(s,r));let b=document.createElement("script");b.addEventListener("load",o),b.addEventListener("error",s),b.src=t,document.head.appendChild(b)});var De=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var Ue=(t,e)=>async(...r)=>{let n=e(...r),i=t.aborted,s;for(;!i&&!t.aborted;)try{let o=await n.next(s);i=o.done??!1,s=o.value}catch(o){await n.throw(o)}return s};var ie=()=>/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion??navigator.userAgent)||navigator?.userAgentData?.mobile,Q=class{constructor(){this.detect()}get browser(){return this._currentBrowser}get device(){return this._currentDevice}get isTouch(){return this._maxTouchPoints>0}get isIOS(){return["iPhone","iPad","iPod"].includes(this.device)}get isMac(){return this.device==="Mac"}get isApple(){return this.isIOS||this.isMac}get isIphoneOrOldIpad(){if(!this.isApple||!this.isTouch)return!1;let e=this.device==="iPad"||window?.screen.width>700,r=this._iosVersion;return!e||e&&!!r&&r<16}get isAndroid(){return this.device==="Android"}get isMobile(){return this._isMobile}get iOSVersion(){return this._iosVersion}get macVersion(){return this._macVersion}get isYandex(){return this.browser==="Yandex"}get isSafari(){return this.browser==="Safari"}get isSamsungBrowser(){return this.browser==="SamsungBrowser"}get isHDR(){return this._isHdr}detect(){let{userAgent:e,maxTouchPoints:r}=navigator;try{this._maxTouchPoints=r,this._isHdr=!!matchMedia("(dynamic-range: high)")?.matches}catch(n){console.error(n)}try{this._isMobile=ie()}catch(n){console.error(n)}this.detectBrowser(e),this.detectDevice(e),this.isIOS&&this.detectIOSVersion(),this.isMac&&this.detectMacVersion()}detectBrowser(e){try{let r=/yabrowser/i.test(e)?"Yandex":void 0,n=/samsungbrowser/i.test(e)?"SamsungBrowser":void 0,i=/chrome|crios/i.test(e)?"Chrome":void 0,s=/chromium/i.test(e)?"Chromium":void 0,o=/firefox|fxios/i.test(e)?"Firefox":void 0,a=/webkit|safari|khtml/i.test(e)?"Safari":void 0,p=/opr\//i.test(e)?"Opera":void 0,b=/edg/i.test(e)?"Edge":void 0;this._currentBrowser=r||n||o||p||b||i||s||a||"Rest"}catch(r){console.error(r)}}detectDevice(e){try{let r=/android/i.test(e)?"Android":void 0,n=/iphone/i.test(e)?"iPhone":void 0,i=/ipad/i.test(e)?"iPad":void 0,s=/ipod/i.test(e)?"iPod":void 0,o=/mac/i.test(e)?"Mac":void 0,a=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(e)?"RestMobile":void 0;this._currentDevice=r||n||i||s||a||o||"Desktop"}catch(r){console.error(r)}}detectIOSVersion(){try{let{userAgent:e}=window.navigator,r=e.match(/Version\/(\d+(\.\d+)?)/i);if(!r)return;let n=r[1],i=parseFloat(n);if(isNaN(i))return;this._iosVersion=i}catch(e){console.error(e)}}detectMacVersion(){try{let{userAgent:e}=window.navigator,r=e.match(/Version\/(\d+)/);if(!r)return;let n=r[1],i=parseInt(n,10);if(isNaN(i))return;this._macVersion=i}catch(e){console.error(e)}}},Be=new Q;var je=(t,{start:e=0,factor:r=2,max:n=1/0,min:i=e,random:s=0}={})=>{let o=e;return o*=r**t,o*=1+(Math.random()*s*2-s),o=Math.round(o),o=Math.min(o,n),o=Math.max(o,i),o};var oe={};Se(oe,{clear:()=>qe,get:()=>ze,has:()=>Ge,isPersistent:()=>Fe,remove:()=>He,set:()=>We});var y,I,D=`vk-videoplayer-dummy-key-${Math.random()}`,O=()=>{if(I!==void 0)return I;try{localStorage.setItem(D,"test"),localStorage.removeItem(D),I=0}catch(t){if(t instanceof DOMException||t instanceof TypeError)try{sessionStorage.getItem(D),I=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)I=2;else throw e}else throw t}return I===2&&(y=new Map),I},Fe=()=>O()===0,ze=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)}},We=(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:return void y?.set(t,e);default:T(r)}},Ge=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}},He=t=>{let e=O();switch(e){case 0:return localStorage.removeItem(t);case 1:return sessionStorage.removeItem(t);case 2:return void y?.delete(t);default:T(e)}},qe=()=>{let t=O();switch(t){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return y?.clear();default:T(t)}};var Ke=()=>{let t,e;try{t=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?t=!0:(t=!1,console.error(n))}try{window.location.ancestorOrigins&&(e=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!e&&document.referrer&&(e=document.referrer)}catch(n){console.error(n)}let r=e?new URL(e).hostname:void 0;return{isEmbed:t,host:r}};var U=(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))(U||{});var m={"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}},Ye=(t,e)=>m[t].height>m[e].height,$e=(t,e)=>m[t].height>=m[e].height,B=(t,e)=>m[t].height<m[e].height,Je=(t,e)=>m[t].height<=m[e].height,Xe=t=>t.sort((e,r)=>e===r?0:e==="Invariant quality"?1:r==="Invariant quality"?-1:B(e,r)?1:-1)[0],se=Object.keys(m).sort((t,e)=>B(t,e)?-1:1),Ze=(t,e=.02)=>[...se].find(n=>m[n].height*(1+e)>=t),et=({width:t,height:e})=>{let r=Math.min(t,e),n=Math.max(t,e);return se.find(i=>{let s=m[i];return s.width>=n&&s.height>=r})},tt=t=>m[t].height,j=t=>t==="Invariant quality",rt=t=>t.every(e=>!j(e));function nt(t){if(j(t))throw new Error("Expected exact quality")}var it=(t,e)=>{let r={};for(let n of Object.keys(e)){let i=e[n],s=t[n];Array.isArray(i)&&Array.isArray(s)?r[n]=s:typeof i=="object"&&typeof s=="object"?r[n]=it(s,i):r[n]=n in t?s:i}return r};var cr=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 F(t,e=0,r){let n,i,s,o,a,p,b=0,X=!1,l=!1,L=!0,Z=!e&&e!==0&&typeof window.requestAnimationFrame=="function";r&&(X=!!r.leading,l="maxWait"in r,s=r?.maxWait?Math.max(+r?.maxWait||0,e):s,L="trailing"in r?!!r.trailing:L);function k(u){let f=n,h=i;return n=i=void 0,b=u,o=t.apply(h,f),o}function w(u,f){return Z?(a&&window.cancelAnimationFrame(a),window.requestAnimationFrame(u)):setTimeout(u,f)}function ge(u){if(Z){window.cancelAnimationFrame(u);return}clearTimeout(u)}function Ie(u){return b=u,a=w(E,e),X?k(u):o}function xe(u){let f=u-p,h=u-b,re=e-f;return l?Math.min(re,s-h):re}function ee(u){let f=u-p,h=u-b;return p===void 0||f>=e||f<0||l&&h>=s}function E(){let u=Date.now();if(ee(u))return te(u);a=w(E,xe(u))}function te(u){return a=void 0,L&&n?k(u):(n=i=void 0,o)}function ye(){a!==void 0&&ge(a),b=0,n=p=i=a=void 0}function Oe(){return a===void 0?o:te(Date.now())}function we(){return a!==void 0}function S(...u){let f=Date.now(),h=ee(f);if(n=u,i=this,p=f,h){if(a===void 0)return Ie(p);if(l)return a=w(E,e),k(p)}return a===void 0&&(a=w(E,e)),o}return S.cancel=ye,S.flush=Oe,S.pending=we,S}var z=(t,e=0,r)=>F(t,e,{...{leading:!0,trailing:!0},...r,maxWait:e});var R=(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 i=e(t[n],n,t,r);if(i!==void 0){r[n]=i;continue}}typeof t[n]=="object"?r[n]=R(t[n],e):r[n]=t[n]}return r};var ot=t=>R(t);var st=300,at=(t,e=st)=>new c(r=>{let{width:n,height:i}=t.getBoundingClientRect();if(r.next({width:n,height:i}),!window.ResizeObserver)return;let s=new ResizeObserver(z(o=>{let a=o[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 i in t)if(!(!t.hasOwnProperty(i)||t[i]instanceof HTMLElement||!e))if(typeof t[i]=="object"&&t[i]!==null){let s=A(t[i],e-1);for(let o in s)s.hasOwnProperty(o)&&(n[i+r+o]=s[o])}else n[i]=t[i];return n};var ct=t=>{t.removeAttribute("src"),t.load()};var xr=t=>{let e;try{e=new URL(t)}catch{return!1}return e.protocol==="https:"};var Or=t=>{try{return new URL(t)}catch{return null}};var lt=t=>e=>r=>{let n=typeof r=="object";r==null||n&&!Object.keys(r).length||t(e,n?A(r):{value:r})};var P=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 ae(t){return new c(e=>{let r={},n=Object.keys(t).length,i=s=>o=>{s in r||n--,r[s]=o,n===0&&e.next(r)};return Object.entries(t).reduce((s,[o,a])=>s.add(a.subscribe(i(o))),new d)})}function ce(...t){return new c(e=>t.reduce((r,n)=>r.add(n.subscribe(e)),new d))}var ut=t=>new c(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 pt=t=>new c(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var bt=t=>new c(e=>{t.forEach(r=>e.next(r))});var dt=(t,e)=>new c(r=>{let n=i=>r.next(i);return t.addEventListener(e,n),()=>t.removeEventListener(e,n)});function le(t){return e=>new c(r=>e.subscribe(new W(r,t)))}var W=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 mt={leading:!1,trailing:!0};function ue(t,e=mt){return r=>new c(n=>r.subscribe(new G(n,t,e)))}var G=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 ft={leading:!0,trailing:!1};function pe(t,e=ft){return r=>new c(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,_(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 be(t){return e=>new c(r=>e.subscribe(new q(r,t)))}var q=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)}};function me(t=(e,r)=>e===r){return e=>new c(r=>e.subscribe(new K(r,t)))}var de={},K=class{constructor(e,r){this.destination=e;this.predicate=r;this.lastValue=de}next(e){let r;try{r=this.lastValue===de||!this.predicate(this.lastValue,e),this.lastValue=e}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};function C(t){return e=>new c(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 fe(t){return C(()=>t)}function Te(){return t=>new c(e=>{let r=!1,n=!1,i=t.subscribe(s=>{r||(r=!0,e.next(s)),n&&i.unsubscribe()},s=>{r=!0,e.error?.(s),n&&i.unsubscribe()});return n=!0,r&&i.unsubscribe(),i})}function ve(){return t=>new c(e=>t.subscribe(new $(e)))}var $=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 c(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)}};var Tt=(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))(Tt||{});var vt=(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))(vt||{}),ht="vk.com",mi=async(t,e,r)=>{let n=new URL(`https://${ht}/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 gt(s,r)},gt=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),It(n)])),It=t=>Array.isArray(t)?t[0]:t;var xt=(r=>(r.RU="ru",r.EN="en",r))(xt||{});export{Tt as ErrorCategory,xt as InterfaceLanguage,M as Logger,c as Observable,v as Subject,d as Subscription,N as Tracer,Re as VERSION,vt as VKNumericLanguage,P as ValueSubject,U as VideoQuality,Ue as abortable,Qe as addScript,rt as areQualitiesExact,_e as assertEmptyArray,T as assertNever,Me as assertNonNullable,Ne as assertNotEmptyArray,Ve as assertNullable,nt as assertQualityIsExact,le as buffer,Ae as checkNever,ct as clearVideoElement,Be as clientChecker,ot as cloneDeep,R as cloneDeepWith,ae as combine,Or as createURL,ue as debounce,F as debounceFn,Ke as detectEmbed,it as fillWithDefault,be as filter,me as filterChanged,A as flattenObject,dt as fromEvent,je as getExponentialDelay,Xe as getHighestQuality,lt as getTraceSubscriptionMethod,pt as interval,Ye as isHigher,$e as isHigherOrEqual,j as isInvariantQuality,B as isLower,Je as isLowerOrEqual,ie as isMobile,x as isNonNullable,_ as isNullable,xr as isValidURL,mi as loadVKLangPack,C as map,fe as mapTo,ce as merge,g as noop,De as now,bt as observableFrom,at as observeElementSize,Te as once,ve as pairwise,oe as safeStorage,he as tap,pe as throttle,z as throttleFn,cr as timeCodeToString,ut as timeout,Ze as videoHeightToQuality,tt as videoQualityToHeight,et as videoSizeToQuality};
|
|
6
|
+
var Ee=Object.defineProperty;var Se=(t,e)=>{for(var r in e)Ee(t,r,{get:e[r],enumerable:!0})};var Re="1.0.50-dev.eaae0302.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`)},Ae=t=>{};var g=()=>{};var c=class{constructor(e){e&&(this._subscribe=e)}subscribe(e,r){let n;r?typeof r=="function"?n={next:r,error:g}:n={next:o=>r.next(o),error:o=>r.error?.(o)}:n={next:g,error:g};let i=typeof e=="function"?{next:o=>{try{e(o)}catch(a){n.next(a)}},error:o=>n.next(o)}:{next:o=>e.next(o),error:o=>e.error?e.error(o):n.next(o)},s;try{s=this._subscribe(i)}catch(o){i.error?.(o)}return new d().add(()=>{switch(i.next=g,i.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 c{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 Pe,context as Ce}from"@opentelemetry/api";import{TracerAllSpansProcessor as Le,TracerMemorySpanExporter as ne,initTracerOpenTelemetry as ke}from"@tracer/opentelemetry";var V=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}},N=class t{constructor({name:e,parentContext:r,tracer:n}){this.childTracers=[];let i=!n;if(i){let o=ke({serviceName:"videoplayer-sdk-web",appToken:"L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb",spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),a=new ne,p=new ne;this.spanExporter=a,o.addSpanProcessor(new Le({startedSpansExporter:a,endedSpansExporter:p})),this.tracer=o.getTracer("sdk-videoplayer-tracer")}else this.tracer=n;this.span=this.tracer.startSpan(e,{root:i},r),this.context=Pe.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 V({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 Ve(t,e='Assertion "value is nullable" failed'){if(t!=null)throw new Error(e)}function x(t){return typeof t<"u"&&t!==null}function _(t){return t==null}function Ne(t,e){if(!t?.length)throw new Error(e)}function _e(t,e){if(t?.length)throw new Error(e)}var Qe=(t,e,r)=>new Promise((n,i)=>{e.addEventListener("abort",()=>{a(),b.remove()});let s=()=>{a(),i()},o=()=>{a(),n()},a=()=>{p&&clearTimeout(p),b.removeEventListener("load",o),b.removeEventListener("error",s)},p;r&&(p=window.setTimeout(s,r));let b=document.createElement("script");b.addEventListener("load",o),b.addEventListener("error",s),b.src=t,document.head.appendChild(b)});var De=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var Ue=(t,e)=>async(...r)=>{let n=e(...r),i=t.aborted,s;for(;!i&&!t.aborted;)try{let o=await n.next(s);i=o.done??!1,s=o.value}catch(o){await n.throw(o)}return s};var ie=()=>/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion??navigator.userAgent)||navigator?.userAgentData?.mobile,Q=class{constructor(){this.detect()}get browser(){return this._currentBrowser}get device(){return this._currentDevice}get isTouch(){return this._maxTouchPoints>0}get isIOS(){return["iPhone","iPad","iPod"].includes(this.device)}get isMac(){return this.device==="Mac"}get isApple(){return this.isIOS||this.isMac}get isIphoneOrOldIpad(){if(!this.isApple||!this.isTouch)return!1;let e=this.device==="iPad"||window?.screen.width>700,r=this._iosVersion;return!e||e&&!!r&&r<16}get isAndroid(){return this.device==="Android"}get isMobile(){return this._isMobile}get iOSVersion(){return this._iosVersion}get macVersion(){return this._macVersion}get isYandex(){return this.browser==="Yandex"}get isSafari(){return this.browser==="Safari"}get isSamsungBrowser(){return this.browser==="SamsungBrowser"}get isHDR(){return this._isHdr}detect(){let{userAgent:e,maxTouchPoints:r}=navigator;try{this._maxTouchPoints=r,this._isHdr=!!matchMedia("(dynamic-range: high)")?.matches}catch(n){console.error(n)}try{this._isMobile=ie()}catch(n){console.error(n)}this.detectBrowser(e),this.detectDevice(e),this.isIOS&&this.detectIOSVersion(),this.isMac&&this.detectMacVersion()}detectBrowser(e){try{let r=/yabrowser/i.test(e)?"Yandex":void 0,n=/samsungbrowser/i.test(e)?"SamsungBrowser":void 0,i=/chrome|crios/i.test(e)?"Chrome":void 0,s=/chromium/i.test(e)?"Chromium":void 0,o=/firefox|fxios/i.test(e)?"Firefox":void 0,a=/webkit|safari|khtml/i.test(e)?"Safari":void 0,p=/opr\//i.test(e)?"Opera":void 0,b=/edg/i.test(e)?"Edge":void 0;this._currentBrowser=r||n||o||p||b||i||s||a||"Rest"}catch(r){console.error(r)}}detectDevice(e){try{let r=/android/i.test(e)?"Android":void 0,n=/iphone/i.test(e)?"iPhone":void 0,i=/ipad/i.test(e)?"iPad":void 0,s=/ipod/i.test(e)?"iPod":void 0,o=/mac/i.test(e)?"Mac":void 0,a=/webOS|BlackBerry|IEMobile|Opera Mini/i.test(e)?"RestMobile":void 0;this._currentDevice=r||n||i||s||a||o||"Desktop"}catch(r){console.error(r)}}detectIOSVersion(){try{let{userAgent:e}=window.navigator,r=e.match(/Version\/(\d+(\.\d+)?)/i);if(!r)return;let n=r[1],i=parseFloat(n);if(isNaN(i))return;this._iosVersion=i}catch(e){console.error(e)}}detectMacVersion(){try{let{userAgent:e}=window.navigator,r=e.match(/Version\/(\d+)/);if(!r)return;let n=r[1],i=parseInt(n,10);if(isNaN(i))return;this._macVersion=i}catch(e){console.error(e)}}},Be=new Q;var je=(t,{start:e=0,factor:r=2,max:n=1/0,min:i=e,random:s=0}={})=>{let o=e;return o*=r**t,o*=1+(Math.random()*s*2-s),o=Math.round(o),o=Math.min(o,n),o=Math.max(o,i),o};var oe={};Se(oe,{clear:()=>qe,get:()=>ze,has:()=>Ge,isPersistent:()=>Fe,remove:()=>He,set:()=>We});var y,I,D=`vk-videoplayer-dummy-key-${Math.random()}`,O=()=>{if(I!==void 0)return I;try{localStorage.setItem(D,"test"),localStorage.removeItem(D),I=0}catch(t){if(t instanceof DOMException||t instanceof TypeError)try{sessionStorage.getItem(D),I=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)I=2;else throw e}else throw t}return I===2&&(y=new Map),I},Fe=()=>O()===0,ze=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)}},We=(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:return void y?.set(t,e);default:T(r)}},Ge=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}},He=t=>{let e=O();switch(e){case 0:return localStorage.removeItem(t);case 1:return sessionStorage.removeItem(t);case 2:return void y?.delete(t);default:T(e)}},qe=()=>{let t=O();switch(t){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return y?.clear();default:T(t)}};var Ke=()=>{let t,e;try{t=window.self!==window.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?t=!0:(t=!1,console.error(n))}try{window.location.ancestorOrigins&&(e=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1])}catch(n){console.error(n)}try{!e&&document.referrer&&(e=document.referrer)}catch(n){console.error(n)}let r=e?new URL(e).hostname:void 0;return{isEmbed:t,host:r}};var U=(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))(U||{});var m={"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}},Ye=(t,e)=>m[t].height>m[e].height,$e=(t,e)=>m[t].height>=m[e].height,B=(t,e)=>m[t].height<m[e].height,Je=(t,e)=>m[t].height<=m[e].height,Xe=t=>t.sort((e,r)=>e===r?0:e==="Invariant quality"?1:r==="Invariant quality"?-1:B(e,r)?1:-1)[0],se=Object.keys(m).sort((t,e)=>B(t,e)?-1:1),Ze=(t,e=.02)=>[...se].find(n=>m[n].height*(1+e)>=t),et=({width:t,height:e})=>{let r=Math.min(t,e),n=Math.max(t,e);return se.find(i=>{let s=m[i];return s.width>=n&&s.height>=r})},tt=t=>m[t].height,j=t=>t==="Invariant quality",rt=t=>t.every(e=>!j(e));function nt(t){if(j(t))throw new Error("Expected exact quality")}var it=(t,e)=>{let r={};for(let n of Object.keys(e)){let i=e[n],s=t[n];Array.isArray(i)&&Array.isArray(s)?r[n]=s:typeof i=="object"&&typeof s=="object"?r[n]=it(s,i):r[n]=n in t?s:i}return r};var cr=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 F(t,e=0,r){let n,i,s,o,a,p,b=0,X=!1,l=!1,L=!0,Z=!e&&e!==0&&typeof window.requestAnimationFrame=="function";r&&(X=!!r.leading,l="maxWait"in r,s=r?.maxWait?Math.max(+r?.maxWait||0,e):s,L="trailing"in r?!!r.trailing:L);function k(u){let f=n,h=i;return n=i=void 0,b=u,o=t.apply(h,f),o}function w(u,f){return Z?(a&&window.cancelAnimationFrame(a),window.requestAnimationFrame(u)):setTimeout(u,f)}function ge(u){if(Z){window.cancelAnimationFrame(u);return}clearTimeout(u)}function Ie(u){return b=u,a=w(E,e),X?k(u):o}function xe(u){let f=u-p,h=u-b,re=e-f;return l?Math.min(re,s-h):re}function ee(u){let f=u-p,h=u-b;return p===void 0||f>=e||f<0||l&&h>=s}function E(){let u=Date.now();if(ee(u))return te(u);a=w(E,xe(u))}function te(u){return a=void 0,L&&n?k(u):(n=i=void 0,o)}function ye(){a!==void 0&&ge(a),b=0,n=p=i=a=void 0}function Oe(){return a===void 0?o:te(Date.now())}function we(){return a!==void 0}function S(...u){let f=Date.now(),h=ee(f);if(n=u,i=this,p=f,h){if(a===void 0)return Ie(p);if(l)return a=w(E,e),k(p)}return a===void 0&&(a=w(E,e)),o}return S.cancel=ye,S.flush=Oe,S.pending=we,S}var z=(t,e=0,r)=>F(t,e,{...{leading:!0,trailing:!0},...r,maxWait:e});var R=(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 i=e(t[n],n,t,r);if(i!==void 0){r[n]=i;continue}}typeof t[n]=="object"?r[n]=R(t[n],e):r[n]=t[n]}return r};var ot=t=>R(t);var st=300,at=(t,e=st)=>new c(r=>{let{width:n,height:i}=t.getBoundingClientRect();if(r.next({width:n,height:i}),!window.ResizeObserver)return;let s=new ResizeObserver(z(o=>{let a=o[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 i in t)if(!(!t.hasOwnProperty(i)||t[i]instanceof HTMLElement||!e))if(typeof t[i]=="object"&&t[i]!==null){let s=A(t[i],e-1);for(let o in s)s.hasOwnProperty(o)&&(n[i+r+o]=s[o])}else n[i]=t[i];return n};var ct=t=>{t.removeAttribute("src"),t.load()};var xr=t=>{let e;try{e=new URL(t)}catch{return!1}return e.protocol==="https:"};var Or=t=>{try{return new URL(t)}catch{return null}};var lt=t=>e=>r=>{let n=typeof r=="object";r==null||n&&!Object.keys(r).length||t(e,n?A(r):{value:r})};var P=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 ae(t){return new c(e=>{let r={},n=Object.keys(t).length,i=s=>o=>{s in r||n--,r[s]=o,n===0&&e.next(r)};return Object.entries(t).reduce((s,[o,a])=>s.add(a.subscribe(i(o))),new d)})}function ce(...t){return new c(e=>t.reduce((r,n)=>r.add(n.subscribe(e)),new d))}var ut=t=>new c(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 pt=t=>new c(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var bt=t=>new c(e=>{t.forEach(r=>e.next(r))});var dt=(t,e)=>new c(r=>{let n=i=>r.next(i);return t.addEventListener(e,n),()=>t.removeEventListener(e,n)});function le(t){return e=>new c(r=>e.subscribe(new W(r,t)))}var W=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 mt={leading:!1,trailing:!0};function ue(t,e=mt){return r=>new c(n=>r.subscribe(new G(n,t,e)))}var G=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 ft={leading:!0,trailing:!1};function pe(t,e=ft){return r=>new c(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,_(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 be(t){return e=>new c(r=>e.subscribe(new q(r,t)))}var q=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)}};function me(t=(e,r)=>e===r){return e=>new c(r=>e.subscribe(new K(r,t)))}var de={},K=class{constructor(e,r){this.destination=e;this.predicate=r;this.lastValue=de}next(e){let r;try{r=this.lastValue===de||!this.predicate(this.lastValue,e),this.lastValue=e}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};function C(t){return e=>new c(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 fe(t){return C(()=>t)}function Te(){return t=>new c(e=>{let r=!1,n=!1,i=t.subscribe(s=>{r||(r=!0,e.next(s)),n&&i.unsubscribe()},s=>{r=!0,e.error?.(s),n&&i.unsubscribe()});return n=!0,r&&i.unsubscribe(),i})}function ve(){return t=>new c(e=>t.subscribe(new $(e)))}var $=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 c(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)}};var Tt=(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))(Tt||{});var vt=(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))(vt||{}),ht="vk.com",mi=async(t,e,r)=>{let n=new URL(`https://${ht}/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 gt(s,r)},gt=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),It(n)])),It=t=>Array.isArray(t)?t[0]:t;var xt=(r=>(r.RU="ru",r.EN="en",r))(xt||{});export{Tt as ErrorCategory,xt as InterfaceLanguage,M as Logger,c as Observable,v as Subject,d as Subscription,N as Tracer,Re as VERSION,vt as VKNumericLanguage,P as ValueSubject,U as VideoQuality,Ue as abortable,Qe as addScript,rt as areQualitiesExact,_e as assertEmptyArray,T as assertNever,Me as assertNonNullable,Ne as assertNotEmptyArray,Ve as assertNullable,nt as assertQualityIsExact,le as buffer,Ae as checkNever,ct as clearVideoElement,Be as clientChecker,ot as cloneDeep,R as cloneDeepWith,ae as combine,Or as createURL,ue as debounce,F as debounceFn,Ke as detectEmbed,it as fillWithDefault,be as filter,me as filterChanged,A as flattenObject,dt as fromEvent,je as getExponentialDelay,Xe as getHighestQuality,lt as getTraceSubscriptionMethod,pt as interval,Ye as isHigher,$e as isHigherOrEqual,j as isInvariantQuality,B as isLower,Je as isLowerOrEqual,ie as isMobile,x as isNonNullable,_ as isNullable,xr as isValidURL,mi as loadVKLangPack,C as map,fe as mapTo,ce as merge,g as noop,De as now,bt as observableFrom,at as observeElementSize,Te as once,ve as pairwise,oe as safeStorage,he as tap,pe as throttle,z as throttleFn,cr as timeCodeToString,ut as timeout,Ze as videoHeightToQuality,tt as videoQualityToHeight,et as videoSizeToQuality};
|