@vkontakte/videoplayer-shared 1.0.78-dev.0c91b20c.0 → 1.0.78-dev.e6e86083.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 +6 -0
- package/es2015.esm.js +3 -3
- package/es2018.cjs +6 -0
- package/es2018.esm.js +3 -3
- package/es2024.cjs +6 -0
- package/es2024.esm.js +3 -3
- package/esnext.cjs +6 -0
- package/esnext.esm.js +3 -3
- package/evergreen.esm.js +3 -3
- package/package.json +12 -12
- package/types/types/index.d.ts +3 -0
- package/types/utils/browser.d.ts +2 -0
- package/types/utils/index.d.ts +1 -0
- package/types/utils/observeElementSize.d.ts +3 -2
- package/es2015.cjs.js +0 -6
- package/es2018.cjs.js +0 -6
- package/es2024.cjs.js +0 -6
- package/esnext.cjs.js +0 -6
package/esnext.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-shared v1.0.78-dev.
|
|
3
|
-
*
|
|
2
|
+
* @vkontakte/videoplayer-shared v1.0.78-dev.e6e86083.0
|
|
3
|
+
* Wed, 17 Dec 2025 14:33:29 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-78/doc/
|
|
5
5
|
*/
|
|
6
|
-
var ga=Object.create;var ur=Object.defineProperty;var Ia=Object.getOwnPropertyDescriptor;var xa=Object.getOwnPropertyNames;var Oa=Object.getPrototypeOf,Ea=Object.prototype.hasOwnProperty;var s=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Lt=(e,r)=>{for(var t in r)ur(e,t,{get:r[t],enumerable:!0})},wa=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of xa(r))!Ea.call(e,i)&&i!==t&&ur(e,i,{get:()=>r[i],enumerable:!(n=Ia(r,i))||n.enumerable});return e};var se=(e,r,t)=>(t=e!=null?ga(Oa(e)):{},wa(r||!e||!e.__esModule?ur(t,"default",{value:e,enumerable:!0}):t,e));var E=s((pr,jt)=>{"use strict";var ue=function(e){return e&&e.Math===Math&&e};jt.exports=ue(typeof globalThis=="object"&&globalThis)||ue(typeof window=="object"&&window)||ue(typeof self=="object"&&self)||ue(typeof global=="object"&&global)||ue(typeof pr=="object"&&pr)||function(){return this}()||Function("return this")()});var S=s((xd,kt)=>{"use strict";kt.exports=function(e){try{return!!e()}catch{return!0}}});var ce=s((Od,Mt)=>{"use strict";var za=S();Mt.exports=!za(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var Gt=s((Ed,Ut)=>{"use strict";var Ka=ce(),Ft=Function.prototype,Vt=Ft.apply,Dt=Ft.call;Ut.exports=typeof Reflect=="object"&&Reflect.apply||(Ka?Dt.bind(Vt):function(){return Dt.apply(Vt,arguments)})});var N=s((wd,zt)=>{"use strict";var Qt=ce(),Bt=Function.prototype,fr=Bt.call,Wa=Qt&&Bt.bind.bind(fr,fr);zt.exports=Qt?Wa:function(e){return function(){return fr.apply(e,arguments)}}});var Oe=s((Sd,Wt)=>{"use strict";var Kt=N(),$a=Kt({}.toString),Ya=Kt("".slice);Wt.exports=function(e){return Ya($a(e),8,-1)}});var br=s((qd,$t)=>{"use strict";var Ha=Oe(),Xa=N();$t.exports=function(e){if(Ha(e)==="Function")return Xa(e)}});var w=s((Rd,Yt)=>{"use strict";var dr=typeof document=="object"&&document.all;Yt.exports=typeof dr>"u"&&dr!==void 0?function(e){return typeof e=="function"||e===dr}:function(e){return typeof e=="function"}});var P=s((Pd,Ht)=>{"use strict";var Ja=S();Ht.exports=!Ja(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var D=s((_d,Xt)=>{"use strict";var Za=ce(),Ee=Function.prototype.call;Xt.exports=Za?Ee.bind(Ee):function(){return Ee.apply(Ee,arguments)}});var vr=s(en=>{"use strict";var Jt={}.propertyIsEnumerable,Zt=Object.getOwnPropertyDescriptor,eu=Zt&&!Jt.call({1:2},1);en.f=eu?function(r){var t=Zt(this,r);return!!t&&t.enumerable}:Jt});var le=s((Ld,rn)=>{"use strict";rn.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var nn=s((Nd,tn)=>{"use strict";var ru=N(),tu=S(),nu=Oe(),mr=Object,iu=ru("".split);tn.exports=tu(function(){return!mr("z").propertyIsEnumerable(0)})?function(e){return nu(e)==="String"?iu(e,""):mr(e)}:mr});var we=s((Cd,on)=>{"use strict";on.exports=function(e){return e==null}});var Se=s((jd,sn)=>{"use strict";var ou=we(),su=TypeError;sn.exports=function(e){if(ou(e))throw new su("Can't call method on "+e);return e}});var Q=s((kd,an)=>{"use strict";var au=nn(),uu=Se();an.exports=function(e){return au(uu(e))}});var j=s((Md,un)=>{"use strict";var cu=w();un.exports=function(e){return typeof e=="object"?e!==null:cu(e)}});var pe=s((Vd,cn)=>{"use strict";cn.exports={}});var qe=s((Dd,pn)=>{"use strict";var yr=pe(),Tr=E(),lu=w(),ln=function(e){return lu(e)?e:void 0};pn.exports=function(e,r){return arguments.length<2?ln(yr[e])||ln(Tr[e]):yr[e]&&yr[e][r]||Tr[e]&&Tr[e][r]}});var hr=s((Fd,fn)=>{"use strict";var pu=N();fn.exports=pu({}.isPrototypeOf)});var mn=s((Ud,vn)=>{"use strict";var fu=E(),bn=fu.navigator,dn=bn&&bn.userAgent;vn.exports=dn?String(dn):""});var On=s((Gd,xn)=>{"use strict";var In=E(),gr=mn(),yn=In.process,Tn=In.Deno,hn=yn&&yn.versions||Tn&&Tn.version,gn=hn&&hn.v8,_,Re;gn&&(_=gn.split("."),Re=_[0]>0&&_[0]<4?1:+(_[0]+_[1]));!Re&&gr&&(_=gr.match(/Edge\/(\d+)/),(!_||_[1]>=74)&&(_=gr.match(/Chrome\/(\d+)/),_&&(Re=+_[1])));xn.exports=Re});var Ir=s((Qd,wn)=>{"use strict";var En=On(),bu=S(),du=E(),vu=du.String;wn.exports=!!Object.getOwnPropertySymbols&&!bu(function(){var e=Symbol("symbol detection");return!vu(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&En&&En<41})});var xr=s((Bd,Sn)=>{"use strict";var mu=Ir();Sn.exports=mu&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Or=s((zd,qn)=>{"use strict";var yu=qe(),Tu=w(),hu=hr(),gu=xr(),Iu=Object;qn.exports=gu?function(e){return typeof e=="symbol"}:function(e){var r=yu("Symbol");return Tu(r)&&hu(r.prototype,Iu(e))}});var Pe=s((Kd,Rn)=>{"use strict";var xu=String;Rn.exports=function(e){try{return xu(e)}catch{return"Object"}}});var fe=s((Wd,Pn)=>{"use strict";var Ou=w(),Eu=Pe(),wu=TypeError;Pn.exports=function(e){if(Ou(e))return e;throw new wu(Eu(e)+" is not a function")}});var _e=s(($d,_n)=>{"use strict";var Su=fe(),qu=we();_n.exports=function(e,r){var t=e[r];return qu(t)?void 0:Su(t)}});var Ln=s((Yd,An)=>{"use strict";var Er=D(),wr=w(),Sr=j(),Ru=TypeError;An.exports=function(e,r){var t,n;if(r==="string"&&wr(t=e.toString)&&!Sr(n=Er(t,e))||wr(t=e.valueOf)&&!Sr(n=Er(t,e))||r!=="string"&&wr(t=e.toString)&&!Sr(n=Er(t,e)))return n;throw new Ru("Can't convert object to primitive value")}});var be=s((Hd,Nn)=>{"use strict";Nn.exports=!0});var kn=s((Xd,jn)=>{"use strict";var Cn=E(),Pu=Object.defineProperty;jn.exports=function(e,r){try{Pu(Cn,e,{value:r,configurable:!0,writable:!0})}catch{Cn[e]=r}return r}});var Ae=s((Jd,Dn)=>{"use strict";var _u=be(),Au=E(),Lu=kn(),Mn="__core-js_shared__",Vn=Dn.exports=Au[Mn]||Lu(Mn,{});(Vn.versions||(Vn.versions=[])).push({version:"3.43.0",mode:_u?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var qr=s((Zd,Un)=>{"use strict";var Fn=Ae();Un.exports=function(e,r){return Fn[e]||(Fn[e]=r||{})}});var Le=s((ev,Gn)=>{"use strict";var Nu=Se(),Cu=Object;Gn.exports=function(e){return Cu(Nu(e))}});var k=s((rv,Qn)=>{"use strict";var ju=N(),ku=Le(),Mu=ju({}.hasOwnProperty);Qn.exports=Object.hasOwn||function(r,t){return Mu(ku(r),t)}});var Rr=s((tv,Bn)=>{"use strict";var Vu=N(),Du=0,Fu=Math.random(),Uu=Vu(1.1.toString);Bn.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Uu(++Du+Fu,36)}});var M=s((nv,Kn)=>{"use strict";var Gu=E(),Qu=qr(),zn=k(),Bu=Rr(),zu=Ir(),Ku=xr(),J=Gu.Symbol,Pr=Qu("wks"),Wu=Ku?J.for||J:J&&J.withoutSetter||Bu;Kn.exports=function(e){return zn(Pr,e)||(Pr[e]=zu&&zn(J,e)?J[e]:Wu("Symbol."+e)),Pr[e]}});var Hn=s((iv,Yn)=>{"use strict";var $u=D(),Wn=j(),$n=Or(),Yu=_e(),Hu=Ln(),Xu=M(),Ju=TypeError,Zu=Xu("toPrimitive");Yn.exports=function(e,r){if(!Wn(e)||$n(e))return e;var t=Yu(e,Zu),n;if(t){if(r===void 0&&(r="default"),n=$u(t,e,r),!Wn(n)||$n(n))return n;throw new Ju("Can't convert object to primitive value")}return r===void 0&&(r="number"),Hu(e,r)}});var _r=s((ov,Xn)=>{"use strict";var ec=Hn(),rc=Or();Xn.exports=function(e){var r=ec(e,"string");return rc(r)?r:r+""}});var Lr=s((sv,Zn)=>{"use strict";var tc=E(),Jn=j(),Ar=tc.document,nc=Jn(Ar)&&Jn(Ar.createElement);Zn.exports=function(e){return nc?Ar.createElement(e):{}}});var Nr=s((av,ei)=>{"use strict";var ic=P(),oc=S(),sc=Lr();ei.exports=!ic&&!oc(function(){return Object.defineProperty(sc("div"),"a",{get:function(){return 7}}).a!==7})});var ni=s(ti=>{"use strict";var ac=P(),uc=D(),cc=vr(),lc=le(),pc=Q(),fc=_r(),bc=k(),dc=Nr(),ri=Object.getOwnPropertyDescriptor;ti.f=ac?ri:function(r,t){if(r=pc(r),t=fc(t),dc)try{return ri(r,t)}catch{}if(bc(r,t))return lc(!uc(cc.f,r,t),r[t])}});var oi=s((cv,ii)=>{"use strict";var vc=S(),mc=w(),yc=/#|\.prototype\./,de=function(e,r){var t=hc[Tc(e)];return t===Ic?!0:t===gc?!1:mc(r)?vc(r):!!r},Tc=de.normalize=function(e){return String(e).replace(yc,".").toLowerCase()},hc=de.data={},gc=de.NATIVE="N",Ic=de.POLYFILL="P";ii.exports=de});var Cr=s((lv,ai)=>{"use strict";var si=br(),xc=fe(),Oc=ce(),Ec=si(si.bind);ai.exports=function(e,r){return xc(e),r===void 0?e:Oc?Ec(e,r):function(){return e.apply(r,arguments)}}});var jr=s((pv,ui)=>{"use strict";var wc=P(),Sc=S();ui.exports=wc&&Sc(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var B=s((fv,ci)=>{"use strict";var qc=j(),Rc=String,Pc=TypeError;ci.exports=function(e){if(qc(e))return e;throw new Pc(Rc(e)+" is not an object")}});var Z=s(pi=>{"use strict";var _c=P(),Ac=Nr(),Lc=jr(),Ne=B(),li=_r(),Nc=TypeError,kr=Object.defineProperty,Cc=Object.getOwnPropertyDescriptor,Mr="enumerable",Vr="configurable",Dr="writable";pi.f=_c?Lc?function(r,t,n){if(Ne(r),t=li(t),Ne(n),typeof r=="function"&&t==="prototype"&&"value"in n&&Dr in n&&!n[Dr]){var i=Cc(r,t);i&&i[Dr]&&(r[t]=n.value,n={configurable:Vr in n?n[Vr]:i[Vr],enumerable:Mr in n?n[Mr]:i[Mr],writable:!1})}return kr(r,t,n)}:kr:function(r,t,n){if(Ne(r),t=li(t),Ne(n),Ac)try{return kr(r,t,n)}catch{}if("get"in n||"set"in n)throw new Nc("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var ee=s((dv,fi)=>{"use strict";var jc=P(),kc=Z(),Mc=le();fi.exports=jc?function(e,r,t){return kc.f(e,r,Mc(1,t))}:function(e,r,t){return e[r]=t,e}});var ne=s((vv,di)=>{"use strict";var ve=E(),Vc=Gt(),Dc=br(),Fc=w(),Uc=ni().f,Gc=oi(),re=pe(),Qc=Cr(),te=ee(),bi=k();Ae();var Bc=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 Vc(e,this,arguments)};return r.prototype=e.prototype,r};di.exports=function(e,r){var t=e.target,n=e.global,i=e.stat,o=e.proto,a=n?ve:i?ve[t]:ve[t]&&ve[t].prototype,u=n?re:re[t]||te(re,t,{})[t],l=u.prototype,p,b,c,d,v,y,T,g,h;for(d in r)p=Gc(n?d:t+(i?".":"#")+d,e.forced),b=!p&&a&&bi(a,d),y=u[d],b&&(e.dontCallGetSet?(h=Uc(a,d),T=h&&h.value):T=a[d]),v=b&&T?T:r[d],!(!p&&!o&&typeof y==typeof v)&&(e.bind&&b?g=Qc(v,ve):e.wrap&&b?g=Bc(v):o&&Fc(v)?g=Dc(v):g=v,(e.sham||v&&v.sham||y&&y.sham)&&te(g,"sham",!0),te(u,d,g),o&&(c=t+"Prototype",bi(re,c)||te(re,c,{}),te(re[c],d,v),e.real&&l&&(p||!l[d])&&te(l,d,v)))}});var mi=s((mv,vi)=>{"use strict";var zc=Math.ceil,Kc=Math.floor;vi.exports=Math.trunc||function(r){var t=+r;return(t>0?Kc:zc)(t)}});var Ce=s((yv,yi)=>{"use strict";var Wc=mi();yi.exports=function(e){var r=+e;return r!==r||r===0?0:Wc(r)}});var hi=s((Tv,Ti)=>{"use strict";var $c=Ce(),Yc=Math.min;Ti.exports=function(e){var r=$c(e);return r>0?Yc(r,9007199254740991):0}});var je=s((hv,gi)=>{"use strict";var Hc=hi();gi.exports=function(e){return Hc(e.length)}});var ke=s((gv,Ii)=>{"use strict";Ii.exports=function(){}});var xi=s(()=>{"use strict";var Xc=ne(),Jc=Le(),Zc=je(),el=Ce(),rl=ke();Xc({target:"Array",proto:!0},{at:function(r){var t=Jc(this),n=Zc(t),i=el(r),o=i>=0?i:n+i;return o<0||o>=n?void 0:t[o]}});rl("at")});var Fr=s((Ov,Oi)=>{"use strict";var tl=qe();Oi.exports=tl});var wi=s((Ev,Ei)=>{"use strict";xi();var nl=Fr();Ei.exports=nl("Array","at")});var qi=s((wv,Si)=>{"use strict";var il=wi();Si.exports=il});var Pi=s((Sv,Ri)=>{"use strict";var ol=qi();Ri.exports=ol});var Qe=s((uy,Li)=>{"use strict";var Rl=qr(),Pl=Rr(),Ai=Rl("keys");Li.exports=function(e){return Ai[e]||(Ai[e]=Pl(e))}});var Ci=s((cy,Ni)=>{"use strict";var _l=S();Ni.exports=!_l(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var Be=s((ly,ki)=>{"use strict";var Al=k(),Ll=w(),Nl=Le(),Cl=Qe(),jl=Ci(),ji=Cl("IE_PROTO"),$r=Object,kl=$r.prototype;ki.exports=jl?$r.getPrototypeOf:function(e){var r=Nl(e);if(Al(r,ji))return r[ji];var t=r.constructor;return Ll(t)&&r instanceof t?t.prototype:r instanceof $r?kl:null}});var Vi=s((py,Mi)=>{"use strict";var Ml=Ce(),Vl=Math.max,Dl=Math.min;Mi.exports=function(e,r){var t=Ml(e);return t<0?Vl(t+r,0):Dl(t,r)}});var Yr=s((fy,Fi)=>{"use strict";var Fl=Q(),Ul=Vi(),Gl=je(),Di=function(e){return function(r,t,n){var i=Fl(r),o=Gl(i);if(o===0)return!e&&-1;var a=Ul(n,o),u;if(e&&t!==t){for(;o>a;)if(u=i[a++],u!==u)return!0}else for(;o>a;a++)if((e||a in i)&&i[a]===t)return e||a||0;return!e&&-1}};Fi.exports={includes:Di(!0),indexOf:Di(!1)}});var ze=s((by,Ui)=>{"use strict";Ui.exports={}});var Bi=s((dy,Qi)=>{"use strict";var Ql=N(),Hr=k(),Bl=Q(),zl=Yr().indexOf,Kl=ze(),Gi=Ql([].push);Qi.exports=function(e,r){var t=Bl(e),n=0,i=[],o;for(o in t)!Hr(Kl,o)&&Hr(t,o)&&Gi(i,o);for(;r.length>n;)Hr(t,o=r[n++])&&(~zl(i,o)||Gi(i,o));return i}});var Xr=s((vy,zi)=>{"use strict";zi.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Jr=s((my,Ki)=>{"use strict";var Wl=Bi(),$l=Xr();Ki.exports=Object.keys||function(r){return Wl(r,$l)}});var Ji=s((yy,Xi)=>{"use strict";var $i=P(),Yl=S(),Yi=N(),Hl=Be(),Xl=Jr(),Jl=Q(),Zl=vr().f,Hi=Yi(Zl),ep=Yi([].push),rp=$i&&Yl(function(){var e=Object.create(null);return e[2]=2,!Hi(e,2)}),Wi=function(e){return function(r){for(var t=Jl(r),n=Xl(t),i=rp&&Hl(t)===null,o=n.length,a=0,u=[],l;o>a;)l=n[a++],(!$i||(i?l in t:Hi(t,l)))&&ep(u,e?[l,t[l]]:t[l]);return u}};Xi.exports={entries:Wi(!0),values:Wi(!1)}});var Zi=s(()=>{"use strict";var tp=ne(),np=Ji().entries;tp({target:"Object",stat:!0},{entries:function(r){return np(r)}})});var ro=s((gy,eo)=>{"use strict";Zi();var ip=pe();eo.exports=ip.Object.entries});var no=s((Iy,to)=>{"use strict";var op=ro();to.exports=op});var Zr=s((xy,io)=>{"use strict";var sp=no();io.exports=sp});var fo=s(()=>{"use strict";var bp=ne(),dp=Yr().includes,vp=S(),mp=ke(),yp=vp(function(){return!Array(1).includes()});bp({target:"Array",proto:!0,forced:yp},{includes:function(r){return dp(this,r,arguments.length>1?arguments[1]:void 0)}});mp("includes")});var vo=s((Xy,bo)=>{"use strict";fo();var Tp=Fr();bo.exports=Tp("Array","includes")});var yo=s((Jy,mo)=>{"use strict";var hp=vo();mo.exports=hp});var ho=s((Zy,To)=>{"use strict";var gp=yo();To.exports=gp});var K=s((sh,No)=>{"use strict";No.exports={}});var ko=s((ah,jo)=>{"use strict";var wp=E(),Sp=w(),Co=wp.WeakMap;jo.exports=Sp(Co)&&/native code/.test(String(Co))});var Fo=s((uh,Do)=>{"use strict";var qp=ko(),Vo=E(),Rp=j(),Pp=ee(),lt=k(),pt=Ae(),_p=Qe(),Ap=ze(),Mo="Object already initialized",ft=Vo.TypeError,Lp=Vo.WeakMap,He,ye,Xe,Np=function(e){return Xe(e)?ye(e):He(e,{})},Cp=function(e){return function(r){var t;if(!Rp(r)||(t=ye(r)).type!==e)throw new ft("Incompatible receiver, "+e+" required");return t}};qp||pt.state?(A=pt.state||(pt.state=new Lp),A.get=A.get,A.has=A.has,A.set=A.set,He=function(e,r){if(A.has(e))throw new ft(Mo);return r.facade=e,A.set(e,r),r},ye=function(e){return A.get(e)||{}},Xe=function(e){return A.has(e)}):(W=_p("state"),Ap[W]=!0,He=function(e,r){if(lt(e,W))throw new ft(Mo);return r.facade=e,Pp(e,W,r),r},ye=function(e){return lt(e,W)?e[W]:{}},Xe=function(e){return lt(e,W)});var A,W;Do.exports={set:He,get:ye,has:Xe,enforce:Np,getterFor:Cp}});var Qo=s((ch,Go)=>{"use strict";var bt=P(),jp=k(),Uo=Function.prototype,kp=bt&&Object.getOwnPropertyDescriptor,dt=jp(Uo,"name"),Mp=dt&&function(){}.name==="something",Vp=dt&&(!bt||bt&&kp(Uo,"name").configurable);Go.exports={EXISTS:dt,PROPER:Mp,CONFIGURABLE:Vp}});var zo=s(Bo=>{"use strict";var Dp=P(),Fp=jr(),Up=Z(),Gp=B(),Qp=Q(),Bp=Jr();Bo.f=Dp&&!Fp?Object.defineProperties:function(r,t){Gp(r);for(var n=Qp(t),i=Bp(t),o=i.length,a=0,u;o>a;)Up.f(r,u=i[a++],n[u]);return r}});var Wo=s((ph,Ko)=>{"use strict";var zp=qe();Ko.exports=zp("document","documentElement")});var Tt=s((fh,es)=>{"use strict";var Kp=B(),Wp=zo(),$o=Xr(),$p=ze(),Yp=Wo(),Hp=Lr(),Xp=Qe(),Yo=">",Ho="<",mt="prototype",yt="script",Jo=Xp("IE_PROTO"),vt=function(){},Zo=function(e){return Ho+yt+Yo+e+Ho+"/"+yt+Yo},Xo=function(e){e.write(Zo("")),e.close();var r=e.parentWindow.Object;return e=null,r},Jp=function(){var e=Hp("iframe"),r="java"+yt+":",t;return e.style.display="none",Yp.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(Zo("document.F=Object")),t.close(),t.F},Je,Ze=function(){try{Je=new ActiveXObject("htmlfile")}catch{}Ze=typeof document<"u"?document.domain&&Je?Xo(Je):Jp():Xo(Je);for(var e=$o.length;e--;)delete Ze[mt][$o[e]];return Ze()};$p[Jo]=!0;es.exports=Object.create||function(r,t){var n;return r!==null?(vt[mt]=Kp(r),n=new vt,vt[mt]=null,n[Jo]=r):n=Ze(),t===void 0?n:Wp.f(n,t)}});var ht=s((bh,rs)=>{"use strict";var Zp=ee();rs.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:Zp(e,r,t),e}});var Ot=s((dh,is)=>{"use strict";var ef=S(),rf=w(),tf=j(),nf=Tt(),ts=Be(),of=ht(),sf=M(),af=be(),xt=sf("iterator"),ns=!1,V,gt,It;[].keys&&(It=[].keys(),"next"in It?(gt=ts(ts(It)),gt!==Object.prototype&&(V=gt)):ns=!0);var uf=!tf(V)||ef(function(){var e={};return V[xt].call(e)!==e});uf?V={}:af&&(V=nf(V));rf(V[xt])||of(V,xt,function(){return this});is.exports={IteratorPrototype:V,BUGGY_SAFARI_ITERATORS:ns}});var er=s((vh,ss)=>{"use strict";var cf=M(),lf=cf("toStringTag"),os={};os[lf]="z";ss.exports=String(os)==="[object z]"});var Et=s((mh,as)=>{"use strict";var pf=er(),ff=w(),rr=Oe(),bf=M(),df=bf("toStringTag"),vf=Object,mf=rr(function(){return arguments}())==="Arguments",yf=function(e,r){try{return e[r]}catch{}};as.exports=pf?rr:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=yf(r=vf(e),df))=="string"?t:mf?rr(r):(n=rr(r))==="Object"&&ff(r.callee)?"Arguments":n}});var cs=s((yh,us)=>{"use strict";var Tf=er(),hf=Et();us.exports=Tf?{}.toString:function(){return"[object "+hf(this)+"]"}});var tr=s((Th,ps)=>{"use strict";var gf=er(),If=Z().f,xf=ee(),Of=k(),Ef=cs(),wf=M(),ls=wf("toStringTag");ps.exports=function(e,r,t,n){var i=t?e:e&&e.prototype;i&&(Of(i,ls)||If(i,ls,{configurable:!0,value:r}),n&&!gf&&xf(i,"toString",Ef))}});var bs=s((hh,fs)=>{"use strict";var Sf=Ot().IteratorPrototype,qf=Tt(),Rf=le(),Pf=tr(),_f=K(),Af=function(){return this};fs.exports=function(e,r,t,n){var i=r+" Iterator";return e.prototype=qf(Sf,{next:Rf(+!n,t)}),Pf(e,i,!1,!0),_f[i]=Af,e}});var vs=s((gh,ds)=>{"use strict";var Lf=N(),Nf=fe();ds.exports=function(e,r,t){try{return Lf(Nf(Object.getOwnPropertyDescriptor(e,r)[t]))}catch{}}});var ys=s((Ih,ms)=>{"use strict";var Cf=j();ms.exports=function(e){return Cf(e)||e===null}});var hs=s((xh,Ts)=>{"use strict";var jf=ys(),kf=String,Mf=TypeError;Ts.exports=function(e){if(jf(e))return e;throw new Mf("Can't set "+kf(e)+" as a prototype")}});var Is=s((Oh,gs)=>{"use strict";var Vf=vs(),Df=j(),Ff=Se(),Uf=hs();gs.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=Vf(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch{}return function(i,o){return Ff(i),Uf(o),Df(i)&&(e?t(i,o):i.__proto__=o),i}}():void 0)});var Ls=s((Eh,As)=>{"use strict";var Gf=ne(),Qf=D(),nr=be(),Ps=Qo(),Bf=w(),zf=bs(),xs=Be(),Os=Is(),Kf=tr(),Wf=ee(),wt=ht(),$f=M(),Es=K(),_s=Ot(),Yf=Ps.PROPER,Hf=Ps.CONFIGURABLE,ws=_s.IteratorPrototype,ir=_s.BUGGY_SAFARI_ITERATORS,Te=$f("iterator"),Ss="keys",he="values",qs="entries",Rs=function(){return this};As.exports=function(e,r,t,n,i,o,a){zf(t,r,n);var u=function(h){if(h===i&&d)return d;if(!ir&&h&&h in b)return b[h];switch(h){case Ss:return function(){return new t(this,h)};case he:return function(){return new t(this,h)};case qs:return function(){return new t(this,h)}}return function(){return new t(this)}},l=r+" Iterator",p=!1,b=e.prototype,c=b[Te]||b["@@iterator"]||i&&b[i],d=!ir&&c||u(i),v=r==="Array"&&b.entries||c,y,T,g;if(v&&(y=xs(v.call(new e)),y!==Object.prototype&&y.next&&(!nr&&xs(y)!==ws&&(Os?Os(y,ws):Bf(y[Te])||wt(y,Te,Rs)),Kf(y,l,!0,!0),nr&&(Es[l]=Rs))),Yf&&i===he&&c&&c.name!==he&&(!nr&&Hf?Wf(b,"name",he):(p=!0,d=function(){return Qf(c,this)})),i)if(T={values:u(he),keys:o?d:u(Ss),entries:u(qs)},a)for(g in T)(ir||p||!(g in b))&&wt(b,g,T[g]);else Gf({target:r,proto:!0,forced:ir||p},T);return(!nr||a)&&b[Te]!==d&&wt(b,Te,d,{name:i}),Es[r]=d,T}});var Cs=s((wh,Ns)=>{"use strict";Ns.exports=function(e,r){return{value:e,done:r}}});var qt=s((Sh,Ds)=>{"use strict";var Xf=Q(),St=ke(),js=K(),Ms=Fo(),Jf=Z().f,Zf=Ls(),or=Cs(),eb=be(),rb=P(),Vs="Array Iterator",tb=Ms.set,nb=Ms.getterFor(Vs);Ds.exports=Zf(Array,"Array",function(e,r){tb(this,{type:Vs,target:Xf(e),index:0,kind:r})},function(){var e=nb(this),r=e.target,t=e.index++;if(!r||t>=r.length)return e.target=null,or(void 0,!0);switch(e.kind){case"keys":return or(t,!1);case"values":return or(r[t],!1)}return or([t,r[t]],!1)},"values");var ks=js.Arguments=js.Array;St("keys");St("values");St("entries");if(!eb&&rb&&ks.name!=="values")try{Jf(ks,"name",{value:"values"})}catch{}});var Us=s((qh,Fs)=>{"use strict";var ib=M(),ob=K(),sb=ib("iterator"),ab=Array.prototype;Fs.exports=function(e){return e!==void 0&&(ob.Array===e||ab[sb]===e)}});var Rt=s((Rh,Qs)=>{"use strict";var ub=Et(),Gs=_e(),cb=we(),lb=K(),pb=M(),fb=pb("iterator");Qs.exports=function(e){if(!cb(e))return Gs(e,fb)||Gs(e,"@@iterator")||lb[ub(e)]}});var zs=s((Ph,Bs)=>{"use strict";var bb=D(),db=fe(),vb=B(),mb=Pe(),yb=Rt(),Tb=TypeError;Bs.exports=function(e,r){var t=arguments.length<2?yb(e):r;if(db(t))return vb(bb(t,e));throw new Tb(mb(e)+" is not iterable")}});var $s=s((_h,Ws)=>{"use strict";var hb=D(),Ks=B(),gb=_e();Ws.exports=function(e,r,t){var n,i;Ks(e);try{if(n=gb(e,"return"),!n){if(r==="throw")throw t;return t}n=hb(n,e)}catch(o){i=!0,n=o}if(r==="throw")throw t;if(i)throw n;return Ks(n),t}});var Zs=s((Ah,Js)=>{"use strict";var Ib=Cr(),xb=D(),Ob=B(),Eb=Pe(),wb=Us(),Sb=je(),Ys=hr(),qb=zs(),Rb=Rt(),Hs=$s(),Pb=TypeError,sr=function(e,r){this.stopped=e,this.result=r},Xs=sr.prototype;Js.exports=function(e,r,t){var n=t&&t.that,i=!!(t&&t.AS_ENTRIES),o=!!(t&&t.IS_RECORD),a=!!(t&&t.IS_ITERATOR),u=!!(t&&t.INTERRUPTED),l=Ib(r,n),p,b,c,d,v,y,T,g=function(I){return p&&Hs(p,"normal"),new sr(!0,I)},h=function(I){return i?(Ob(I),u?l(I[0],I[1],g):l(I[0],I[1])):u?l(I,g):l(I)};if(o)p=e.iterator;else if(a)p=e;else{if(b=Rb(e),!b)throw new Pb(Eb(e)+" is not iterable");if(wb(b)){for(c=0,d=Sb(e);d>c;c++)if(v=h(e[c]),v&&Ys(Xs,v))return v;return new sr(!1)}p=qb(e,b)}for(y=o?e.next:p.next;!(T=xb(y,p)).done;){try{v=h(T.value)}catch(I){Hs(p,"throw",I)}if(typeof v=="object"&&v&&Ys(Xs,v))return v}return new sr(!1)}});var ra=s((Lh,ea)=>{"use strict";var _b=P(),Ab=Z(),Lb=le();ea.exports=function(e,r,t){_b?Ab.f(e,r,Lb(0,t)):e[r]=t}});var ta=s(()=>{"use strict";var Nb=ne(),Cb=Zs(),jb=ra();Nb({target:"Object",stat:!0},{fromEntries:function(r){var t={};return Cb(r,function(n,i){jb(t,n,i)},{AS_ENTRIES:!0}),t}})});var ia=s((jh,na)=>{"use strict";qt();ta();var kb=pe();na.exports=kb.Object.fromEntries});var sa=s((kh,oa)=>{"use strict";oa.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 ua=s(()=>{"use strict";qt();var Mb=sa(),Vb=E(),Db=tr(),aa=K();for(ar in Mb)Db(Vb[ar],ar),aa[ar]=aa.Array;var ar});var la=s((Dh,ca)=>{"use strict";var Fb=ia();ua();ca.exports=Fb});var fa=s((Fh,pa)=>{"use strict";var Ub=la();pa.exports=Ub});var Sa="1.0.78-dev.0c91b20c.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 C=e=>{throw new Error(`${e} is value of unexpected type`)},qa=e=>{};var $=()=>{};var Ra=e=>{throw console.error(e),e},Pa=e=>{console.error(e)},f=class{constructor(r){this.suppressErrors=!1;r&&(this._subscribe=r)}setSuppressErrors(r){this.suppressErrors=r}subscribe(r,t){let n=this.suppressErrors?Pa:Ra,i;t?typeof t=="function"?i={next:t,error:$}:i={next:u=>t.next(u),error:u=>t.error?.(u)}:i={next:n,error:$};let o=typeof r=="function"?{next:u=>{try{let l=r(u);l instanceof Promise&&l.catch(p=>i.next(p))}catch(l){i.next(l)}},error:u=>i.next(u)}:{next:u=>r.next(u),error:u=>r.error?r.error(u):i.next(u)},a;try{a=this._subscribe(o)}catch(u){o.error?.(u)}return new x().add(()=>{switch(o.next=$,o.error=$,typeof a){case"function":a();return;case"object":a.unsubscribe();return;case"undefined":return;default:return C(a)}})}pipe(...r){return r.reduce((t,n)=>n(t),this)}_subscribe(r){}};var L=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 x().add(()=>this.subscribers.delete(n))}};var cr=class{constructor(){this.log$=new L;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}))}};function _a(e,r='Assertion "value is not nullable" failed'){if(e==null)throw new Error(r)}function Aa(e,r='Assertion "value is nullable" failed'){if(e!=null)throw new Error(r)}function Y(e){return typeof e<"u"&&e!==null}function ae(e){return e==null}function La(e,r){if(!e?.length)throw new Error(r)}function Na(e,r){if(e?.length)throw new Error(r)}var Ca=(e,r,t)=>new Promise((n,i)=>{r.addEventListener("abort",()=>{u(),p.remove()});let o=()=>{u(),i("error")},a=()=>{u(),n()},u=()=>{l&&clearTimeout(l),p.removeEventListener("load",a),p.removeEventListener("error",o)},l;t&&(l=window.setTimeout(()=>{u(),i("timeout")},t));let p=document.createElement("script");p.addEventListener("load",a),p.addEventListener("error",o),p.src=e,document.head.appendChild(p)});var ja=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var ka=(e,r)=>async(...t)=>{let n=r(...t),i=e.aborted,o;for(;!i&&!e.aborted;)try{let a=await n.next(o);i=a.done??!1,o=a.value}catch(a){await n.throw(a)}return o};var Ma=(e,{start:r=0,factor:t=2,max:n=1/0,min:i=r,random:o=0}={})=>{let a=r;return a*=t**e,a*=1+(Math.random()*o*2-o),a=Math.round(a),a=Math.min(a,n),a=Math.max(a,i),a};var Nt={};Lt(Nt,{clear:()=>Qa,get:()=>Da,has:()=>Ua,isPersistent:()=>Va,remove:()=>Ga,set:()=>Fa});var H,G,lr=`vk-videoplayer-dummy-key-${Math.random()}`,X=()=>{if(G!==void 0)return G;try{localStorage.setItem(lr,"test"),localStorage.removeItem(lr),G=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(lr),G=1}catch(r){if(r instanceof DOMException||r instanceof TypeError)G=2;else throw r}else throw e}return G===2&&(H=new Map),G},Va=()=>X()===0,Da=e=>{let r=X();switch(r){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return H?.get(e);default:C(r)}},Fa=(e,r)=>{let t=X();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:H?.set(e,r);return;default:C(t)}},Ua=e=>{let r=X();switch(r){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return H?.has(e)??!1;default:return C(r),!1}},Ga=e=>{let r=X();switch(r){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:H?.delete(e);return;default:C(r)}},Qa=()=>{let e=X();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return H?.clear();default:C(e)}};var Ba=(e,r,t)=>{if(typeof e.canParse=="function")return e.canParse(r,t);try{return new e(r,t),!0}catch{return!1}},Ct=Ba;var Ur=se(Pi(),1),sl=()=>{let e,r=[];try{e=window.self!==window.top}catch(t){t instanceof DOMException&&t.name==="SecurityError"?e=!0:(e=!1,console.error(t))}try{window.location.ancestorOrigins&&(r=[...window.location.ancestorOrigins])}catch(t){console.error(t)}try{!r.length&&document.referrer&&(r=[new URL(document.referrer).origin])}catch(t){console.error(t)}return r=r.filter(t=>Ct(URL,t)),{isEmbed:e,origins:r,topOrigin:(0,Ur.default)(r,-1),immediateOrigin:(0,Ur.default)(r,0)}};var Gr=(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))(Gr||{});var q={"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}},al=(e,r)=>q[e].height>q[r].height,ul=(e,r)=>q[e].height>=q[r].height,Qr=(e,r)=>q[e].height<q[r].height,cl=(e,r)=>q[e].height<=q[r].height,ll=e=>e.sort((r,t)=>r===t?0:r==="Invariant quality"?1:t==="Invariant quality"?-1:Qr(r,t)?1:-1)[0],_i=Object.keys(q).sort((e,r)=>Qr(e,r)?-1:1),pl=(e,r=.02)=>[..._i].find(n=>q[n].height*(1+r)>=e),fl=({width:e,height:r})=>{let t=Math.min(e,r),n=Math.max(e,r);return _i.find(i=>{let o=q[i];return o.width>=n&&o.height>=t})},bl=e=>q[e].height,Br=e=>e==="Invariant quality",dl=e=>e.every(r=>!Br(r));function vl(e){if(Br(e))throw new Error("Expected exact quality")}var ml=e=>{switch(e){case"4320p":return"8K";case"2160p":return"4K";case"1440p":return"QHD";case"1080p":return"FHD";case"720p":return"HD";default:return""}};var yl=(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]=yl(o,i):t[n]=n in e?o:i}return t};var Nv=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 zr(e,r=0,t){let n,i,o,a,u,l,p=0,b=!1,c=!1,d=!0,v=!r&&r!==0&&typeof window.requestAnimationFrame=="function";t&&(b=!!t.leading,c="maxWait"in t,o=t?.maxWait?Math.max(+t?.maxWait||0,r):o,d="trailing"in t?!!t.trailing:d);function y(m){let R=n,U=i;return n=i=void 0,p=m,a=e.apply(U,R),a}function T(m,R){return v?(u&&window.cancelAnimationFrame(u),window.requestAnimationFrame(m)):setTimeout(m,R)}function g(m){if(v){window.cancelAnimationFrame(m);return}clearTimeout(m)}function h(m){return p=m,u=T(Ie,r),b?y(m):a}function I(m){let R=m-l,U=m-p,At=r-R;return c?Math.min(At,o-U):At}function Pt(m){let R=m-l,U=m-p;return l===void 0||R>=r||R<0||c&&U>=o}function Ie(){let m=Date.now();if(Pt(m))return _t(m);u=T(Ie,I(m))}function _t(m){return u=void 0,d&&n?y(m):(n=i=void 0,a)}function ya(){u!==void 0&&g(u),p=0,n=l=i=u=void 0}function Ta(){return u===void 0?a:_t(Date.now())}function ha(){return u!==void 0}function xe(...m){let R=Date.now(),U=Pt(R);if(n=m,i=this,l=R,U){if(u===void 0)return h(l);if(c)return u=T(Ie,r),y(l)}return u===void 0&&(u=T(Ie,r)),a}return xe.cancel=ya,xe.flush=Ta,xe.pending=ha,xe}var Kr=(e,r=0,t)=>zr(e,r,{...{leading:!0,trailing:!0},...t,maxWait:r});var Me=(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]=Me(e[n],r):t[n]=e[n]}return t};var Tl=e=>Me(e);var hl=300,gl=(e,r=hl)=>new f(t=>{let{width:n,height:i}=e.getBoundingClientRect();if(t.next({width:n,height:i}),!window.ResizeObserver)return;let o=new ResizeObserver(Kr(a=>{let u=a[0];if(!u)return;let l,p;u.contentBoxSize&&u.contentBoxSize[0]?(p=u.contentBoxSize[0].blockSize,l=u.contentBoxSize[0].inlineSize):u.contentRect&&(l=u.contentRect.width,p=u.contentRect.height),Y(l)&&Y(p)&&t.next({width:l,height:p})},r));return o.observe(e),()=>o.disconnect()});var Ve=(e,r=6,t=".")=>{let n={};for(let i in e)if(!(!e.hasOwnProperty(i)||e[i]instanceof HTMLElement||!r))if(typeof e[i]=="object"&&e[i]!==null){let o=Ve(e[i],r-1);for(let a in o)o.hasOwnProperty(a)&&(n[i+t+a]=o[a])}else n[i]=e[i];return n};var Il=e=>{e.removeAttribute("src"),e.load()};var Kv=e=>{let r;try{r=new URL(e)}catch{return!1}return r.protocol==="https:"};var xl=(e,r)=>!(e.right<r.left||e.left>r.right||e.bottom<r.top||e.top>r.bottom);var Ol=(()=>{let e=0;return()=>{let r=e;return e=(e+1)%Number.MAX_SAFE_INTEGER,r}})(),El=e=>e!==void 0&&e!==""?e:Ol().toString();function wl(e,r,t){if(e<=r[0])return t[0];if(e>=r[r.length-1])return t[t.length-1];let n=1;for(;n<r.length&&r[n]<e;)n++;n>=r.length&&(n=r.length-1);let i=r[n-1],o=r[n],a=t[n-1],u=t[n];if(e===i)return a;if(e===o)return u;let l=(e-i)/(o-i);return a+l*(u-a)}function Sl(e,r,t){if(e<=0||t<0)return[];let n=[],i=Math.floor((e-1)/2),o=Math.floor(e/2),a=r-i,u=r+o;a<0&&(u+=Math.abs(a),a=0),u>t&&(a-=u-t,u=t),a=Math.max(0,a),u=Math.min(t,u);for(let l=a;l<=u;l++)n.push(l);return n}var ql=e=>r=>t=>{let n=typeof t=="object";t==null||n&&!Object.keys(t).length||e(r,n?Ve(t):{value:t})},De=(e={})=>{let r=n=>{let i=n;return n===void 0?i="undefined":n===null?i="null":(typeof n=="number"||typeof n=="boolean")&&(i=n.toString()),i},t={};for(let n in e)Array.isArray(e[n])?t[n]=e[n].map(r):t[n]=r(e[n]);return t};var F=class e{constructor({name:r,getParentContext:t}){this.dynamicImportTimeout=5e3;this.childTracers=[];e.dynamicImportStatus==="not_started"&&(e.dynamicImportPromise=this.loadOpentelemetry());let n=Date.now();this.initPromise=e.dynamicImportPromise.then(i=>{e.dynamicImportStatus==="completed"&&this.init({name:r,getParentContext:t},n)})}static{this.dynamicImportStatus="not_started"}init({name:r,getParentContext:t},n){this.span=e.rootTracer.startSpan(r,{startTime:n},t?.()),this.context=e.dynamicImports.opentelemetryApi.trace.setSpan(e.dynamicImports.opentelemetryApi.context.active(),this.span)}async loadOpentelemetry(){if(e.dynamicImportStatus==="not_started"){e.dynamicImportStatus="in_progress";try{let r=new Promise((a,u)=>setTimeout(u,this.dynamicImportTimeout)),t=Promise.all([import("@opentelemetry/api"),import("@opentelemetry/sdk-trace-web"),import("@apptracer/opentelemetry")]),[n,i,o]=await Promise.race([t,r]);e.dynamicImports={opentelemetryApi:n,opentelemetrySdk:i,tracer:o},e.dynamicImportStatus="completed"}catch{e.dynamicImportStatus="failed"}}}isComponentTracerNotInitialized(){return ae(this.span)||e.dynamicImportStatus==="failed"}log(r,t){let n=Date.now();this.initPromise.then(i=>{this.isComponentTracerNotInitialized()||this.span.addEvent(r,{...De(t),type:"log"},n)})}error(r,t){let n=Date.now();this.initPromise.then(i=>{this.isComponentTracerNotInitialized()||this.span.addEvent(r,{...De(t),type:"error"},n)})}critical(r,t){let n=Date.now();this.initPromise.then(i=>{this.isComponentTracerNotInitialized()||this.span.addEvent(r,{...De(t),type:"critical"},n)})}createComponentTracer(r){let t=new e({name:r,getParentContext:()=>this.context});return this.childTracers.push(t),t}end(){this.initPromise.then(r=>{this.isComponentTracerNotInitialized()||(this.childTracers.forEach(t=>t.end()),this.span.end())})}};var Fe=class extends F{constructor(){super({name:"Root"})}init({name:r,getParentContext:t},n){let o=F.dynamicImports.tracer.initTracerOpenTelemetry({serviceName:"videoplayer-sdk-web",appToken:"L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb",spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),a=new F.dynamicImports.tracer.TracerMemorySpanExporter;this.spanExporter=a,o.addSpanProcessor(new F.dynamicImports.tracer.TracerAllSpansProcessor({startedSpansExporter:a})),F.rootTracer=o.getTracer("sdk-videoplayer-tracer"),super.init({name:r,getParentContext:t},n)}getFinishedSpans(){if(!this.isComponentTracerNotInitialized())return this.spanExporter?.getJsonData()}getTraceId(){return this.isComponentTracerNotInitialized()?"":this.span.spanContext().traceId}};var Ue=class e{constructor(r){}log(r,t){}error(r,t){}critical(r,t){}createComponentTracer(r){return new e({name:r})}end(){}getFinishedSpans(){}getTraceId(){return this.fakeTraceId}};var Wr=class{static createRootTracer(r=!1){return r?new Fe:new Ue}};var ie=class extends L{constructor(t){super();this.buffer=[];this.cursorEnd=-1;this.cursorStart=0;this.bufferSize=t,this.buffer=Array(t)}next(t){this.cursorEnd+=1,this.cursorStart=this.cursorEnd>=this.bufferSize?this.cursorStart+1:0,this.buffer[this.cursorEnd%this.bufferSize]=t,this.subscribers.forEach(n=>n.next(t))}_subscribe(t){for(let i=this.cursorStart;i<=this.cursorEnd;i++)t.next(this.buffer[i%this.bufferSize]);let n=this.keyCounter++;return this.subscribers.set(n,t),new x().add(()=>this.subscribers.delete(n))}};var Ge=class extends L{constructor(r){super(),this.value=r}next(r){super.next(this.value=r)}error(r){super.error(this.value=r)}getValue(){return this.value}_subscribe(r){let t=super._subscribe(r);return r.next(this.value),t}};var oo=se(Zr(),1);function so(e){return new f(r=>{let t={},n=Object.keys(e).length,i=o=>a=>{o in t||n--,t[o]=a,n===0&&r.next(t)};return(0,oo.default)(e).reduce((o,[a,u])=>o.add(u.subscribe(i(a))),new x)})}function ao(...e){return new f(r=>e.reduce((t,n)=>t.add(n.subscribe(r)),new x))}var ap=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 up=e=>new f(r=>{let t=window.setInterval(()=>r.next(),e);return()=>{t&&(window.clearInterval(t),t=void 0)}});var cp=e=>new f(r=>{e.forEach(t=>r.next(t))});var lp=(e,r)=>new f(t=>{let n=i=>t.next(i);return e.addEventListener(r,n),()=>e.removeEventListener(r,n)});var Ke=class extends x{remove(r){this.subscriptions=this.subscriptions.filter(t=>t!==r)}};function uo(e){return r=>new f(t=>r.subscribe(new et(t,e)))}var et=class{constructor(r,t){this.destination=r;this.size=t;this.lastValues=[]}next(r){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(r),this.destination.next(this.lastValues)}error(r){this.destination.error?.(r)}};var pp={leading:!1,trailing:!0};function co(e,r=pp){return t=>new f(n=>t.subscribe(new rt(n,e,r)))}var rt=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,Y(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 fp={leading:!0,trailing:!1};function lo(e,r=fp){return t=>new f(n=>t.subscribe(new tt(n,e,r)))}var tt=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,ae(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 po(e){return r=>new f(t=>r.subscribe(new nt(t,e)))}var nt=class{constructor(r,t){this.destination=r;this.predicate=t}next(r){let t;try{t=this.predicate(r)}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};var Io=se(ho(),1);var Ip=(e,r)=>{let t=(n,i)=>{let o=Object.keys(n);for(let a in i)if(!(0,Io.default)(o,a)||i[a]!==n[a])return!1;return!0};return t(e,r)&&t(r,e)},xp=(e,r)=>e instanceof Object&&r instanceof Object?Ip(e,r):e===r;function xo(e=xp){return r=>new f(t=>r.subscribe(new it(t,e)))}var go={},it=class{constructor(r,t){this.destination=r;this.predicate=t;this.lastValue=go}next(r){let t;try{t=this.lastValue===go||!this.predicate(this.lastValue,r),this.lastValue=r instanceof Object&&!Array.isArray(r)?{...r}:r}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};function We(e){return r=>new f(t=>r.subscribe(new ot(t,e)))}var ot=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 Oo(e){return We(()=>e)}function Eo(){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 wo(){return e=>new f(r=>e.subscribe(new st(r)))}var st=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 So(e){return r=>new f(t=>r.subscribe(new at(t,e)))}var at=class{constructor(r,t){this.destination=r;this.effect=t}next(r){try{this.effect(r)}catch(t){throw this.error(t),t}this.destination.next(r)}error(r){this.destination.error?.(r)}};function qo(e){return r=>new f(t=>r.subscribe(new ut(t,e)))}var ut=class{constructor(r,t){this.destination=r;this.count=t;t<0&&this.destination.error?.(new Error("Count can not be less than zero"))}next(r){this.count===0?this.destination.next(r):this.count--}error(r){this.destination.error?.(r)}};function Ro(e=0){return r=>{let t=0,n=new ie(e),i=r.subscribe(n),o=a=>()=>{a.unsubscribe(),t--,t===0&&i.unsubscribe()};return new f(a=>(t++,o(n.subscribe(a))))}}var Op=(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))(Op||{});var{NativeAbortSignal:zT,NativeAbortController:KT}=function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}}(typeof self<"u"?self:global);function Po(e){let r;try{r=new Event("abort")}catch{typeof document<"u"?document.createEvent?(r=document.createEvent("Event"),r.initEvent("abort",!1,!1)):(r=document.createEventObject(),r.type="abort"):r={type:"abort",bubbles:!1,cancelable:!1}}return r.reason=e,r}function _o(e){if(e===void 0)if(typeof document>"u")e=new Error("This operation was aborted"),e.name="AbortError";else try{e=new DOMException("signal is aborted without reason"),Object.defineProperty(e,"name",{value:"AbortError"})}catch{e=new Error("This operation was aborted"),e.name="AbortError"}return e}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 a=n[i];try{a.callback.call(this,r)}catch(u){Promise.resolve().then(()=>{throw u})}a.options&&a.options.once&&this.removeEventListener(r.type,a.callback)}return!r.defaultPrevented}},oe=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)}throwIfAborted(){let{aborted:r,reason:t="Aborted"}=this;if(r)throw t}static timeout(r){let t=new z;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${r}ms`,"TimeoutError")),r),t.signal}static any(r){let t=new z;function n(){t.abort(this.reason),i()}function i(){for(let o of r)o.removeEventListener("abort",n)}for(let o of r)if(o.aborted){t.abort(o.reason);break}else o.addEventListener("abort",n);return t.signal}},z=class{constructor(){Object.defineProperty(this,"signal",{value:new oe,writable:!0,configurable:!0})}abort(r){let t=_o(r),n=Po(t);this.signal.reason=t,this.signal.dispatchEvent(n)}toString(){return"[object AbortController]"}};typeof Symbol<"u"&&Symbol.toStringTag&&(z.prototype[Symbol.toStringTag]="AbortController",oe.prototype[Symbol.toStringTag]="AbortSignal");function Ye(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 ct(e){typeof e=="function"&&(e={fetch:e});let{fetch:r,Request:t=r.Request,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!Ye({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(p,b){let c;b&&b.signal&&(c=b.signal,delete b.signal);let d=new t(p,b);return c&&Object.defineProperty(d,"signal",{writable:!1,enumerable:!1,configurable:!0,value:c}),d},o.prototype=t.prototype);let a=r;return{fetch:(l,p)=>{let b=o&&o.prototype.isPrototypeOf(l)?l.signal:p?p.signal:void 0;if(b){let c;try{c=new DOMException("Aborted","AbortError")}catch{c=new Error("Aborted"),c.name="AbortError"}if(b.aborted)return Promise.reject(c);let d=new Promise((v,y)=>{b.addEventListener("abort",()=>y(c),{once:!0})});return p&&p.signal&&delete p.signal,Promise.race([d,a(l,p)])}return a(l,p)},Request:o}}var Ep=()=>"fetch"in window,me=Ep()&&Ye({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),Ao=me?ct({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,Lo=me?Ao.fetch:window.fetch,th=me?Ao.Request:window.Request,nh=me?z:window.AbortController,ih=me?oe:window.AbortSignal;var ba=se(Zr(),1),da=se(fa(),1),Gb=(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))(Gb||{}),Qb="vk.com",Gh=async(e,r,t)=>{let n=new URL(`https://${Qb}/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 Lo(n.toString())).json();return Bb(o,t)},Bb=(e,r)=>(0,da.default)((0,ba.default)(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),zb(n)])),zb=e=>Array.isArray(e)?e[0]:e;var Kb=(t=>(t.RU="ru",t.EN="en",t))(Kb||{});var O="__vk_vp_internals_exposure",va=class{constructor(r,t){this.playerId=t,this.type=r,this.initWindowObjects()}getWindowObject(){if(typeof window>"u")return{};let r=this.playerId,t=this.type;return window[O]?.[r]?.[t]??{}}initWindowObjects(){if(typeof window>"u")return;let r=this.playerId,t=this.type;window[O]||(window[O]={}),window[O][r]||(window[O][r]={}),window[O][r][t]||(window[O][r][t]={})}expose(r){typeof window>"u"||Object.assign(this.getWindowObject(),r)}destroy(){if(typeof window>"u")return;let r=this.playerId,t=this.type;window[O]&&window[O][r]&&window[O][r][t]&&(delete window[O][r][t],Object.keys(window[O][r]).length||delete window[O][r],Object.keys(window[O]).length||delete window[O])}};var ma={};Lt(ma,{create:()=>Wb,destroy:()=>$b,push:()=>Yb,subscribe:()=>Hb});var ge=new Map,Wb=(e,r)=>ge.set(e,r??[]),$b=e=>ge.delete(e),Yb=(e,r)=>{let t=ge.get(e);t&&(typeof t=="function"?t(r):t.push(r))},Hb=(e,r)=>{let t=ge.get(e);if(t){if(t&&Array.isArray(t))for(let n of t)r(n);ge.set(e,r)}};export{Op as ErrorCategory,O as INTERNAL_EXPOSE_GLOBAL_KEY,Kb as InterfaceLanguage,va as InternalsExposure,cr as Logger,f as Observable,ie as ReplaySubject,L as Subject,x as Subscription,Ke as SubscriptionRemovable,Wr as TracerFactory,Sa as VERSION,Gb as VKNumericLanguage,Ge as ValueSubject,Gr as VideoQuality,ka as abortable,Ca as addScript,dl as areQualitiesExact,Na as assertEmptyArray,C as assertNever,_a as assertNonNullable,La as assertNotEmptyArray,Aa as assertNullable,vl as assertQualityIsExact,uo as buffer,qa as checkNever,Il as clearVideoElement,Tl as cloneDeep,Me as cloneDeepWith,so as combine,co as debounce,zr as debounceFn,sl as detectEmbed,ma as devNull,yl as fillWithDefault,po as filter,xo as filterChanged,Ve as flattenObject,lp as fromEvent,Ma as getExponentialDelay,ll as getHighestQuality,El as getPlayerId,Sl as getRangeAroundIndex,ql as getTraceSubscriptionMethod,ml as getVideoQualityLabel,wl as interpolate,up as interval,al as isHigher,ul as isHigherOrEqual,xl as isIntersecting,Br as isInvariantQuality,Qr as isLower,cl as isLowerOrEqual,Y as isNonNullable,ae as isNullable,Kv as isValidURL,Gh as loadVKLangPack,We as map,Oo as mapTo,ao as merge,$ as noop,ja as now,cp as observableFrom,gl as observeElementSize,Eo as once,wo as pairwise,Nt as safeStorage,Ro as shareReplay,qo as skip,So as tap,lo as throttle,Kr as throttleFn,Nv as timeCodeToString,ap as timeout,pl as videoHeightToQuality,bl as videoQualityToHeight,fl as videoSizeToQuality};
|
|
6
|
+
var La=Object.create;var lr=Object.defineProperty;var Ca=Object.getOwnPropertyDescriptor;var ja=Object.getOwnPropertyNames;var Na=Object.getPrototypeOf,ka=Object.prototype.hasOwnProperty;var s=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Nt=(e,r)=>{for(var t in r)lr(e,t,{get:r[t],enumerable:!0})},Ma=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of ja(r))!ka.call(e,o)&&o!==t&&lr(e,o,{get:()=>r[o],enumerable:!(n=Ca(r,o))||n.enumerable});return e};var X=(e,r,t)=>(t=e!=null?La(Na(e)):{},Ma(r||!e||!e.__esModule?lr(t,"default",{value:e,enumerable:!0}):t,e));var E=s((fr,kt)=>{"use strict";var le=function(e){return e&&e.Math===Math&&e};kt.exports=le(typeof globalThis=="object"&&globalThis)||le(typeof window=="object"&&window)||le(typeof self=="object"&&self)||le(typeof global=="object"&&global)||le(typeof fr=="object"&&fr)||function(){return this}()||Function("return this")()});var q=s((Ad,Mt)=>{"use strict";Mt.exports=function(e){try{return!!e()}catch{return!0}}});var pe=s((Ld,Vt)=>{"use strict";var za=q();Vt.exports=!za(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var Qt=s((Cd,Gt)=>{"use strict";var Ka=pe(),Ut=Function.prototype,Dt=Ut.apply,Ft=Ut.call;Gt.exports=typeof Reflect=="object"&&Reflect.apply||(Ka?Ft.bind(Dt):function(){return Ft.apply(Dt,arguments)})});var N=s((jd,zt)=>{"use strict";var Bt=pe(),Wt=Function.prototype,br=Wt.call,$a=Bt&&Wt.bind.bind(br,br);zt.exports=Bt?$a:function(e){return function(){return br.apply(e,arguments)}}});var Se=s((Nd,$t)=>{"use strict";var Kt=N(),Ya=Kt({}.toString),Ha=Kt("".slice);$t.exports=function(e){return Ha(Ya(e),8,-1)}});var dr=s((kd,Yt)=>{"use strict";var Xa=Se(),Ja=N();Yt.exports=function(e){if(Xa(e)==="Function")return Ja(e)}});var w=s((Md,Ht)=>{"use strict";var vr=typeof document=="object"&&document.all;Ht.exports=typeof vr>"u"&&vr!==void 0?function(e){return typeof e=="function"||e===vr}:function(e){return typeof e=="function"}});var A=s((Vd,Xt)=>{"use strict";var Za=q();Xt.exports=!Za(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var U=s((Dd,Jt)=>{"use strict";var eu=pe(),we=Function.prototype.call;Jt.exports=eu?we.bind(we):function(){return we.apply(we,arguments)}});var mr=s(rn=>{"use strict";var Zt={}.propertyIsEnumerable,en=Object.getOwnPropertyDescriptor,ru=en&&!Zt.call({1:2},1);rn.f=ru?function(r){var t=en(this,r);return!!t&&t.enumerable}:Zt});var fe=s((Ud,tn)=>{"use strict";tn.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var on=s((Gd,nn)=>{"use strict";var tu=N(),nu=q(),ou=Se(),yr=Object,iu=tu("".split);nn.exports=nu(function(){return!yr("z").propertyIsEnumerable(0)})?function(e){return ou(e)==="String"?iu(e,""):yr(e)}:yr});var qe=s((Qd,sn)=>{"use strict";sn.exports=function(e){return e==null}});var Re=s((Bd,an)=>{"use strict";var su=qe(),au=TypeError;an.exports=function(e){if(su(e))throw new au("Can't call method on "+e);return e}});var B=s((Wd,un)=>{"use strict";var uu=on(),cu=Re();un.exports=function(e){return uu(cu(e))}});var M=s((zd,cn)=>{"use strict";var lu=w();cn.exports=function(e){return typeof e=="object"?e!==null:lu(e)}});var be=s((Kd,ln)=>{"use strict";ln.exports={}});var Pe=s(($d,fn)=>{"use strict";var Tr=be(),hr=E(),pu=w(),pn=function(e){return pu(e)?e:void 0};fn.exports=function(e,r){return arguments.length<2?pn(Tr[e])||pn(hr[e]):Tr[e]&&Tr[e][r]||hr[e]&&hr[e][r]}});var gr=s((Yd,bn)=>{"use strict";var fu=N();bn.exports=fu({}.isPrototypeOf)});var yn=s((Hd,mn)=>{"use strict";var bu=E(),dn=bu.navigator,vn=dn&&dn.userAgent;mn.exports=vn?String(vn):""});var En=s((Xd,On)=>{"use strict";var xn=E(),Ir=yn(),Tn=xn.process,hn=xn.Deno,gn=Tn&&Tn.versions||hn&&hn.version,In=gn&&gn.v8,L,_e;In&&(L=In.split("."),_e=L[0]>0&&L[0]<4?1:+(L[0]+L[1]));!_e&&Ir&&(L=Ir.match(/Edge\/(\d+)/),(!L||L[1]>=74)&&(L=Ir.match(/Chrome\/(\d+)/),L&&(_e=+L[1])));On.exports=_e});var xr=s((Jd,wn)=>{"use strict";var Sn=En(),du=q(),vu=E(),mu=vu.String;wn.exports=!!Object.getOwnPropertySymbols&&!du(function(){var e=Symbol("symbol detection");return!mu(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Sn&&Sn<41})});var Or=s((Zd,qn)=>{"use strict";var yu=xr();qn.exports=yu&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Er=s((ev,Rn)=>{"use strict";var Tu=Pe(),hu=w(),gu=gr(),Iu=Or(),xu=Object;Rn.exports=Iu?function(e){return typeof e=="symbol"}:function(e){var r=Tu("Symbol");return hu(r)&&gu(r.prototype,xu(e))}});var Ae=s((rv,Pn)=>{"use strict";var Ou=String;Pn.exports=function(e){try{return Ou(e)}catch{return"Object"}}});var de=s((tv,_n)=>{"use strict";var Eu=w(),Su=Ae(),wu=TypeError;_n.exports=function(e){if(Eu(e))return e;throw new wu(Su(e)+" is not a function")}});var Le=s((nv,An)=>{"use strict";var qu=de(),Ru=qe();An.exports=function(e,r){var t=e[r];return Ru(t)?void 0:qu(t)}});var Cn=s((ov,Ln)=>{"use strict";var Sr=U(),wr=w(),qr=M(),Pu=TypeError;Ln.exports=function(e,r){var t,n;if(r==="string"&&wr(t=e.toString)&&!qr(n=Sr(t,e))||wr(t=e.valueOf)&&!qr(n=Sr(t,e))||r!=="string"&&wr(t=e.toString)&&!qr(n=Sr(t,e)))return n;throw new Pu("Can't convert object to primitive value")}});var ve=s((iv,jn)=>{"use strict";jn.exports=!0});var Mn=s((sv,kn)=>{"use strict";var Nn=E(),_u=Object.defineProperty;kn.exports=function(e,r){try{_u(Nn,e,{value:r,configurable:!0,writable:!0})}catch{Nn[e]=r}return r}});var Ce=s((av,Fn)=>{"use strict";var Au=ve(),Lu=E(),Cu=Mn(),Vn="__core-js_shared__",Dn=Fn.exports=Lu[Vn]||Cu(Vn,{});(Dn.versions||(Dn.versions=[])).push({version:"3.43.0",mode:Au?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var Rr=s((uv,Gn)=>{"use strict";var Un=Ce();Gn.exports=function(e,r){return Un[e]||(Un[e]=r||{})}});var je=s((cv,Qn)=>{"use strict";var ju=Re(),Nu=Object;Qn.exports=function(e){return Nu(ju(e))}});var V=s((lv,Bn)=>{"use strict";var ku=N(),Mu=je(),Vu=ku({}.hasOwnProperty);Bn.exports=Object.hasOwn||function(r,t){return Vu(Mu(r),t)}});var Pr=s((pv,Wn)=>{"use strict";var Du=N(),Fu=0,Uu=Math.random(),Gu=Du(1.1.toString);Wn.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Gu(++Fu+Uu,36)}});var D=s((fv,Kn)=>{"use strict";var Qu=E(),Bu=Rr(),zn=V(),Wu=Pr(),zu=xr(),Ku=Or(),ee=Qu.Symbol,_r=Bu("wks"),$u=Ku?ee.for||ee:ee&&ee.withoutSetter||Wu;Kn.exports=function(e){return zn(_r,e)||(_r[e]=zu&&zn(ee,e)?ee[e]:$u("Symbol."+e)),_r[e]}});var Xn=s((bv,Hn)=>{"use strict";var Yu=U(),$n=M(),Yn=Er(),Hu=Le(),Xu=Cn(),Ju=D(),Zu=TypeError,ec=Ju("toPrimitive");Hn.exports=function(e,r){if(!$n(e)||Yn(e))return e;var t=Hu(e,ec),n;if(t){if(r===void 0&&(r="default"),n=Yu(t,e,r),!$n(n)||Yn(n))return n;throw new Zu("Can't convert object to primitive value")}return r===void 0&&(r="number"),Xu(e,r)}});var Ar=s((dv,Jn)=>{"use strict";var rc=Xn(),tc=Er();Jn.exports=function(e){var r=rc(e,"string");return tc(r)?r:r+""}});var Cr=s((vv,eo)=>{"use strict";var nc=E(),Zn=M(),Lr=nc.document,oc=Zn(Lr)&&Zn(Lr.createElement);eo.exports=function(e){return oc?Lr.createElement(e):{}}});var jr=s((mv,ro)=>{"use strict";var ic=A(),sc=q(),ac=Cr();ro.exports=!ic&&!sc(function(){return Object.defineProperty(ac("div"),"a",{get:function(){return 7}}).a!==7})});var oo=s(no=>{"use strict";var uc=A(),cc=U(),lc=mr(),pc=fe(),fc=B(),bc=Ar(),dc=V(),vc=jr(),to=Object.getOwnPropertyDescriptor;no.f=uc?to:function(r,t){if(r=fc(r),t=bc(t),vc)try{return to(r,t)}catch{}if(dc(r,t))return pc(!cc(lc.f,r,t),r[t])}});var so=s((Tv,io)=>{"use strict";var mc=q(),yc=w(),Tc=/#|\.prototype\./,me=function(e,r){var t=gc[hc(e)];return t===xc?!0:t===Ic?!1:yc(r)?mc(r):!!r},hc=me.normalize=function(e){return String(e).replace(Tc,".").toLowerCase()},gc=me.data={},Ic=me.NATIVE="N",xc=me.POLYFILL="P";io.exports=me});var Nr=s((hv,uo)=>{"use strict";var ao=dr(),Oc=de(),Ec=pe(),Sc=ao(ao.bind);uo.exports=function(e,r){return Oc(e),r===void 0?e:Ec?Sc(e,r):function(){return e.apply(r,arguments)}}});var kr=s((gv,co)=>{"use strict";var wc=A(),qc=q();co.exports=wc&&qc(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var W=s((Iv,lo)=>{"use strict";var Rc=M(),Pc=String,_c=TypeError;lo.exports=function(e){if(Rc(e))return e;throw new _c(Pc(e)+" is not an object")}});var re=s(fo=>{"use strict";var Ac=A(),Lc=jr(),Cc=kr(),Ne=W(),po=Ar(),jc=TypeError,Mr=Object.defineProperty,Nc=Object.getOwnPropertyDescriptor,Vr="enumerable",Dr="configurable",Fr="writable";fo.f=Ac?Cc?function(r,t,n){if(Ne(r),t=po(t),Ne(n),typeof r=="function"&&t==="prototype"&&"value"in n&&Fr in n&&!n[Fr]){var o=Nc(r,t);o&&o[Fr]&&(r[t]=n.value,n={configurable:Dr in n?n[Dr]:o[Dr],enumerable:Vr in n?n[Vr]:o[Vr],writable:!1})}return Mr(r,t,n)}:Mr:function(r,t,n){if(Ne(r),t=po(t),Ne(n),Lc)try{return Mr(r,t,n)}catch{}if("get"in n||"set"in n)throw new jc("Accessors not supported");return"value"in n&&(r[t]=n.value),r}});var te=s((Ov,bo)=>{"use strict";var kc=A(),Mc=re(),Vc=fe();bo.exports=kc?function(e,r,t){return Mc.f(e,r,Vc(1,t))}:function(e,r,t){return e[r]=t,e}});var z=s((Ev,mo)=>{"use strict";var ye=E(),Dc=Qt(),Fc=dr(),Uc=w(),Gc=oo().f,Qc=so(),ne=be(),Bc=Nr(),oe=te(),vo=V();Ce();var Wc=function(e){var r=function(t,n,o){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,o)}return Dc(e,this,arguments)};return r.prototype=e.prototype,r};mo.exports=function(e,r){var t=e.target,n=e.global,o=e.stat,i=e.proto,a=n?ye:o?ye[t]:ye[t]&&ye[t].prototype,u=n?ne:ne[t]||oe(ne,t,{})[t],c=u.prototype,p,b,l,d,v,T,h,I,g;for(d in r)p=Qc(n?d:t+(o?".":"#")+d,e.forced),b=!p&&a&&vo(a,d),T=u[d],b&&(e.dontCallGetSet?(g=Gc(a,d),h=g&&g.value):h=a[d]),v=b&&h?h:r[d],!(!p&&!i&&typeof T==typeof v)&&(e.bind&&b?I=Bc(v,ye):e.wrap&&b?I=Wc(v):i&&Uc(v)?I=Fc(v):I=v,(e.sham||v&&v.sham||T&&T.sham)&&oe(I,"sham",!0),oe(u,d,I),i&&(l=t+"Prototype",vo(ne,l)||oe(ne,l,{}),oe(ne[l],d,v),e.real&&c&&(p||!c[d])&&oe(c,d,v)))}});var yo=s(()=>{"use strict";var zc=z(),Ur=E();zc({global:!0,forced:Ur.globalThis!==Ur},{globalThis:Ur})});var ho=s((qv,To)=>{"use strict";yo();To.exports=E()});var Io=s((Rv,go)=>{"use strict";var Kc=ho();go.exports=Kc});var Oo=s((Pv,xo)=>{"use strict";var $c=Io();xo.exports=$c});var Po=s((Dv,Ro)=>{"use strict";var sl=Math.ceil,al=Math.floor;Ro.exports=Math.trunc||function(r){var t=+r;return(t>0?al:sl)(t)}});var ke=s((Fv,_o)=>{"use strict";var ul=Po();_o.exports=function(e){var r=+e;return r!==r||r===0?0:ul(r)}});var Lo=s((Uv,Ao)=>{"use strict";var cl=ke(),ll=Math.min;Ao.exports=function(e){var r=cl(e);return r>0?ll(r,9007199254740991):0}});var Me=s((Gv,Co)=>{"use strict";var pl=Lo();Co.exports=function(e){return pl(e.length)}});var Ve=s((Qv,jo)=>{"use strict";jo.exports=function(){}});var No=s(()=>{"use strict";var fl=z(),bl=je(),dl=Me(),vl=ke(),ml=Ve();fl({target:"Array",proto:!0},{at:function(r){var t=bl(this),n=dl(t),o=vl(r),i=o>=0?o:n+o;return i<0||i>=n?void 0:t[i]}});ml("at")});var Qr=s((zv,ko)=>{"use strict";var yl=Pe();ko.exports=yl});var Vo=s((Kv,Mo)=>{"use strict";No();var Tl=Qr();Mo.exports=Tl("Array","at")});var Fo=s(($v,Do)=>{"use strict";var hl=Vo();Do.exports=hl});var Go=s((Yv,Uo)=>{"use strict";var gl=Fo();Uo.exports=gl});var Ue=s((ym,Wo)=>{"use strict";var jl=Rr(),Nl=Pr(),Bo=jl("keys");Wo.exports=function(e){return Bo[e]||(Bo[e]=Nl(e))}});var Ko=s((Tm,zo)=>{"use strict";var kl=q();zo.exports=!kl(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var Ge=s((hm,Yo)=>{"use strict";var Ml=V(),Vl=w(),Dl=je(),Fl=Ue(),Ul=Ko(),$o=Fl("IE_PROTO"),Hr=Object,Gl=Hr.prototype;Yo.exports=Ul?Hr.getPrototypeOf:function(e){var r=Dl(e);if(Ml(r,$o))return r[$o];var t=r.constructor;return Vl(t)&&r instanceof t?t.prototype:r instanceof Hr?Gl:null}});var Xo=s((gm,Ho)=>{"use strict";var Ql=ke(),Bl=Math.max,Wl=Math.min;Ho.exports=function(e,r){var t=Ql(e);return t<0?Bl(t+r,0):Wl(t,r)}});var Xr=s((Im,Zo)=>{"use strict";var zl=B(),Kl=Xo(),$l=Me(),Jo=function(e){return function(r,t,n){var o=zl(r),i=$l(o);if(i===0)return!e&&-1;var a=Kl(n,i),u;if(e&&t!==t){for(;i>a;)if(u=o[a++],u!==u)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===t)return e||a||0;return!e&&-1}};Zo.exports={includes:Jo(!0),indexOf:Jo(!1)}});var Qe=s((xm,ei)=>{"use strict";ei.exports={}});var ni=s((Om,ti)=>{"use strict";var Yl=N(),Jr=V(),Hl=B(),Xl=Xr().indexOf,Jl=Qe(),ri=Yl([].push);ti.exports=function(e,r){var t=Hl(e),n=0,o=[],i;for(i in t)!Jr(Jl,i)&&Jr(t,i)&&ri(o,i);for(;r.length>n;)Jr(t,i=r[n++])&&(~Xl(o,i)||ri(o,i));return o}});var Zr=s((Em,oi)=>{"use strict";oi.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var et=s((Sm,ii)=>{"use strict";var Zl=ni(),ep=Zr();ii.exports=Object.keys||function(r){return Zl(r,ep)}});var pi=s((wm,li)=>{"use strict";var ai=A(),rp=q(),ui=N(),tp=Ge(),np=et(),op=B(),ip=mr().f,ci=ui(ip),sp=ui([].push),ap=ai&&rp(function(){var e=Object.create(null);return e[2]=2,!ci(e,2)}),si=function(e){return function(r){for(var t=op(r),n=np(t),o=ap&&tp(t)===null,i=n.length,a=0,u=[],c;i>a;)c=n[a++],(!ai||(o?c in t:ci(t,c)))&&sp(u,e?[c,t[c]]:t[c]);return u}};li.exports={entries:si(!0),values:si(!1)}});var fi=s(()=>{"use strict";var up=z(),cp=pi().entries;up({target:"Object",stat:!0},{entries:function(r){return cp(r)}})});var di=s((Pm,bi)=>{"use strict";fi();var lp=be();bi.exports=lp.Object.entries});var mi=s((_m,vi)=>{"use strict";var pp=di();vi.exports=pp});var rt=s((Am,yi)=>{"use strict";var fp=mi();yi.exports=fp});var Si=s(()=>{"use strict";var hp=z(),gp=Xr().includes,Ip=q(),xp=Ve(),Op=Ip(function(){return!Array(1).includes()});hp({target:"Array",proto:!0,forced:Op},{includes:function(r){return gp(this,r,arguments.length>1?arguments[1]:void 0)}});xp("includes")});var qi=s((fy,wi)=>{"use strict";Si();var Ep=Qr();wi.exports=Ep("Array","includes")});var Pi=s((by,Ri)=>{"use strict";var Sp=qi();Ri.exports=Sp});var Ai=s((dy,_i)=>{"use strict";var wp=Pi();_i.exports=wp});var Y=s((Gh,Wi)=>{"use strict";Wi.exports={}});var $i=s((Qh,Ki)=>{"use strict";var Fp=E(),Up=w(),zi=Fp.WeakMap;Ki.exports=Up(zi)&&/native code/.test(String(zi))});var Ji=s((Bh,Xi)=>{"use strict";var Gp=$i(),Hi=E(),Qp=M(),Bp=te(),bt=V(),dt=Ce(),Wp=Ue(),zp=Qe(),Yi="Object already initialized",vt=Hi.TypeError,Kp=Hi.WeakMap,Je,he,Ze,$p=function(e){return Ze(e)?he(e):Je(e,{})},Yp=function(e){return function(r){var t;if(!Qp(r)||(t=he(r)).type!==e)throw new vt("Incompatible receiver, "+e+" required");return t}};Gp||dt.state?(C=dt.state||(dt.state=new Kp),C.get=C.get,C.has=C.has,C.set=C.set,Je=function(e,r){if(C.has(e))throw new vt(Yi);return r.facade=e,C.set(e,r),r},he=function(e){return C.get(e)||{}},Ze=function(e){return C.has(e)}):(H=Wp("state"),zp[H]=!0,Je=function(e,r){if(bt(e,H))throw new vt(Yi);return r.facade=e,Bp(e,H,r),r},he=function(e){return bt(e,H)?e[H]:{}},Ze=function(e){return bt(e,H)});var C,H;Xi.exports={set:Je,get:he,has:Ze,enforce:$p,getterFor:Yp}});var rs=s((Wh,es)=>{"use strict";var mt=A(),Hp=V(),Zi=Function.prototype,Xp=mt&&Object.getOwnPropertyDescriptor,yt=Hp(Zi,"name"),Jp=yt&&function(){}.name==="something",Zp=yt&&(!mt||mt&&Xp(Zi,"name").configurable);es.exports={EXISTS:yt,PROPER:Jp,CONFIGURABLE:Zp}});var ns=s(ts=>{"use strict";var ef=A(),rf=kr(),tf=re(),nf=W(),of=B(),sf=et();ts.f=ef&&!rf?Object.defineProperties:function(r,t){nf(r);for(var n=of(t),o=sf(t),i=o.length,a=0,u;i>a;)tf.f(r,u=o[a++],n[u]);return r}});var is=s((Kh,os)=>{"use strict";var af=Pe();os.exports=af("document","documentElement")});var It=s(($h,fs)=>{"use strict";var uf=W(),cf=ns(),ss=Zr(),lf=Qe(),pf=is(),ff=Cr(),bf=Ue(),as=">",us="<",ht="prototype",gt="script",ls=bf("IE_PROTO"),Tt=function(){},ps=function(e){return us+gt+as+e+us+"/"+gt+as},cs=function(e){e.write(ps("")),e.close();var r=e.parentWindow.Object;return e=null,r},df=function(){var e=ff("iframe"),r="java"+gt+":",t;return e.style.display="none",pf.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(ps("document.F=Object")),t.close(),t.F},er,rr=function(){try{er=new ActiveXObject("htmlfile")}catch{}rr=typeof document<"u"?document.domain&&er?cs(er):df():cs(er);for(var e=ss.length;e--;)delete rr[ht][ss[e]];return rr()};lf[ls]=!0;fs.exports=Object.create||function(r,t){var n;return r!==null?(Tt[ht]=uf(r),n=new Tt,Tt[ht]=null,n[ls]=r):n=rr(),t===void 0?n:cf.f(n,t)}});var xt=s((Yh,bs)=>{"use strict";var vf=te();bs.exports=function(e,r,t,n){return n&&n.enumerable?e[r]=t:vf(e,r,t),e}});var wt=s((Hh,ms)=>{"use strict";var mf=q(),yf=w(),Tf=M(),hf=It(),ds=Ge(),gf=xt(),If=D(),xf=ve(),St=If("iterator"),vs=!1,F,Ot,Et;[].keys&&(Et=[].keys(),"next"in Et?(Ot=ds(ds(Et)),Ot!==Object.prototype&&(F=Ot)):vs=!0);var Of=!Tf(F)||mf(function(){var e={};return F[St].call(e)!==e});Of?F={}:xf&&(F=hf(F));yf(F[St])||gf(F,St,function(){return this});ms.exports={IteratorPrototype:F,BUGGY_SAFARI_ITERATORS:vs}});var tr=s((Xh,Ts)=>{"use strict";var Ef=D(),Sf=Ef("toStringTag"),ys={};ys[Sf]="z";Ts.exports=String(ys)==="[object z]"});var qt=s((Jh,hs)=>{"use strict";var wf=tr(),qf=w(),nr=Se(),Rf=D(),Pf=Rf("toStringTag"),_f=Object,Af=nr(function(){return arguments}())==="Arguments",Lf=function(e,r){try{return e[r]}catch{}};hs.exports=wf?nr:function(e){var r,t,n;return e===void 0?"Undefined":e===null?"Null":typeof(t=Lf(r=_f(e),Pf))=="string"?t:Af?nr(r):(n=nr(r))==="Object"&&qf(r.callee)?"Arguments":n}});var Is=s((Zh,gs)=>{"use strict";var Cf=tr(),jf=qt();gs.exports=Cf?{}.toString:function(){return"[object "+jf(this)+"]"}});var or=s((eg,Os)=>{"use strict";var Nf=tr(),kf=re().f,Mf=te(),Vf=V(),Df=Is(),Ff=D(),xs=Ff("toStringTag");Os.exports=function(e,r,t,n){var o=t?e:e&&e.prototype;o&&(Vf(o,xs)||kf(o,xs,{configurable:!0,value:r}),n&&!Nf&&Mf(o,"toString",Df))}});var Ss=s((rg,Es)=>{"use strict";var Uf=wt().IteratorPrototype,Gf=It(),Qf=fe(),Bf=or(),Wf=Y(),zf=function(){return this};Es.exports=function(e,r,t,n){var o=r+" Iterator";return e.prototype=Gf(Uf,{next:Qf(+!n,t)}),Bf(e,o,!1,!0),Wf[o]=zf,e}});var qs=s((tg,ws)=>{"use strict";var Kf=N(),$f=de();ws.exports=function(e,r,t){try{return Kf($f(Object.getOwnPropertyDescriptor(e,r)[t]))}catch{}}});var Ps=s((ng,Rs)=>{"use strict";var Yf=M();Rs.exports=function(e){return Yf(e)||e===null}});var As=s((og,_s)=>{"use strict";var Hf=Ps(),Xf=String,Jf=TypeError;_s.exports=function(e){if(Hf(e))return e;throw new Jf("Can't set "+Xf(e)+" as a prototype")}});var Cs=s((ig,Ls)=>{"use strict";var Zf=qs(),eb=M(),rb=Re(),tb=As();Ls.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,r={},t;try{t=Zf(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch{}return function(o,i){return rb(o),tb(i),eb(o)&&(e?t(o,i):o.__proto__=i),o}}():void 0)});var Bs=s((sg,Qs)=>{"use strict";var nb=z(),ob=U(),ir=ve(),Us=rs(),ib=w(),sb=Ss(),js=Ge(),Ns=Cs(),ab=or(),ub=te(),Rt=xt(),cb=D(),ks=Y(),Gs=wt(),lb=Us.PROPER,pb=Us.CONFIGURABLE,Ms=Gs.IteratorPrototype,sr=Gs.BUGGY_SAFARI_ITERATORS,ge=cb("iterator"),Vs="keys",Ie="values",Ds="entries",Fs=function(){return this};Qs.exports=function(e,r,t,n,o,i,a){sb(t,r,n);var u=function(g){if(g===o&&d)return d;if(!sr&&g&&g in b)return b[g];switch(g){case Vs:return function(){return new t(this,g)};case Ie:return function(){return new t(this,g)};case Ds:return function(){return new t(this,g)}}return function(){return new t(this)}},c=r+" Iterator",p=!1,b=e.prototype,l=b[ge]||b["@@iterator"]||o&&b[o],d=!sr&&l||u(o),v=r==="Array"&&b.entries||l,T,h,I;if(v&&(T=js(v.call(new e)),T!==Object.prototype&&T.next&&(!ir&&js(T)!==Ms&&(Ns?Ns(T,Ms):ib(T[ge])||Rt(T,ge,Fs)),ab(T,c,!0,!0),ir&&(ks[c]=Fs))),lb&&o===Ie&&l&&l.name!==Ie&&(!ir&&pb?ub(b,"name",Ie):(p=!0,d=function(){return ob(l,this)})),o)if(h={values:u(Ie),keys:i?d:u(Vs),entries:u(Ds)},a)for(I in h)(sr||p||!(I in b))&&Rt(b,I,h[I]);else nb({target:r,proto:!0,forced:sr||p},h);return(!ir||a)&&b[ge]!==d&&Rt(b,ge,d,{name:o}),ks[r]=d,h}});var zs=s((ag,Ws)=>{"use strict";Ws.exports=function(e,r){return{value:e,done:r}}});var _t=s((ug,Xs)=>{"use strict";var fb=B(),Pt=Ve(),Ks=Y(),Ys=Ji(),bb=re().f,db=Bs(),ar=zs(),vb=ve(),mb=A(),Hs="Array Iterator",yb=Ys.set,Tb=Ys.getterFor(Hs);Xs.exports=db(Array,"Array",function(e,r){yb(this,{type:Hs,target:fb(e),index:0,kind:r})},function(){var e=Tb(this),r=e.target,t=e.index++;if(!r||t>=r.length)return e.target=null,ar(void 0,!0);switch(e.kind){case"keys":return ar(t,!1);case"values":return ar(r[t],!1)}return ar([t,r[t]],!1)},"values");var $s=Ks.Arguments=Ks.Array;Pt("keys");Pt("values");Pt("entries");if(!vb&&mb&&$s.name!=="values")try{bb($s,"name",{value:"values"})}catch{}});var Zs=s((cg,Js)=>{"use strict";var hb=D(),gb=Y(),Ib=hb("iterator"),xb=Array.prototype;Js.exports=function(e){return e!==void 0&&(gb.Array===e||xb[Ib]===e)}});var At=s((lg,ra)=>{"use strict";var Ob=qt(),ea=Le(),Eb=qe(),Sb=Y(),wb=D(),qb=wb("iterator");ra.exports=function(e){if(!Eb(e))return ea(e,qb)||ea(e,"@@iterator")||Sb[Ob(e)]}});var na=s((pg,ta)=>{"use strict";var Rb=U(),Pb=de(),_b=W(),Ab=Ae(),Lb=At(),Cb=TypeError;ta.exports=function(e,r){var t=arguments.length<2?Lb(e):r;if(Pb(t))return _b(Rb(t,e));throw new Cb(Ab(e)+" is not iterable")}});var sa=s((fg,ia)=>{"use strict";var jb=U(),oa=W(),Nb=Le();ia.exports=function(e,r,t){var n,o;oa(e);try{if(n=Nb(e,"return"),!n){if(r==="throw")throw t;return t}n=jb(n,e)}catch(i){o=!0,n=i}if(r==="throw")throw t;if(o)throw n;return oa(n),t}});var pa=s((bg,la)=>{"use strict";var kb=Nr(),Mb=U(),Vb=W(),Db=Ae(),Fb=Zs(),Ub=Me(),aa=gr(),Gb=na(),Qb=At(),ua=sa(),Bb=TypeError,ur=function(e,r){this.stopped=e,this.result=r},ca=ur.prototype;la.exports=function(e,r,t){var n=t&&t.that,o=!!(t&&t.AS_ENTRIES),i=!!(t&&t.IS_RECORD),a=!!(t&&t.IS_ITERATOR),u=!!(t&&t.INTERRUPTED),c=kb(r,n),p,b,l,d,v,T,h,I=function(x){return p&&ua(p,"normal"),new ur(!0,x)},g=function(x){return o?(Vb(x),u?c(x[0],x[1],I):c(x[0],x[1])):u?c(x,I):c(x)};if(i)p=e.iterator;else if(a)p=e;else{if(b=Qb(e),!b)throw new Bb(Db(e)+" is not iterable");if(Fb(b)){for(l=0,d=Ub(e);d>l;l++)if(v=g(e[l]),v&&aa(ca,v))return v;return new ur(!1)}p=Gb(e,b)}for(T=i?e.next:p.next;!(h=Mb(T,p)).done;){try{v=g(h.value)}catch(x){ua(p,"throw",x)}if(typeof v=="object"&&v&&aa(ca,v))return v}return new ur(!1)}});var ba=s((dg,fa)=>{"use strict";var Wb=A(),zb=re(),Kb=fe();fa.exports=function(e,r,t){Wb?zb.f(e,r,Kb(0,t)):e[r]=t}});var da=s(()=>{"use strict";var $b=z(),Yb=pa(),Hb=ba();$b({target:"Object",stat:!0},{fromEntries:function(r){var t={};return Yb(r,function(n,o){Hb(t,n,o)},{AS_ENTRIES:!0}),t}})});var ma=s((yg,va)=>{"use strict";_t();da();var Xb=be();va.exports=Xb.Object.fromEntries});var Ta=s((Tg,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 ga=s(()=>{"use strict";_t();var Jb=Ta(),Zb=E(),ed=or(),ha=Y();for(cr in Jb)ed(Zb[cr],cr),ha[cr]=ha.Array;var cr});var xa=s((Ig,Ia)=>{"use strict";var rd=ma();ga();Ia.exports=rd});var Ea=s((xg,Oa)=>{"use strict";var td=xa();Oa.exports=td});var Va="1.0.78-dev.e6e86083.0";var O=class{constructor(){this.subscriptions=[]}unsubscribe(){let r=this.subscriptions;this.subscriptions=[],r.forEach(t=>{typeof t=="function"?t():t.unsubscribe()})}add(r){return this.subscriptions.push(r),this}};var k=e=>{throw new Error(`${e} is value of unexpected type`)},Da=e=>{};var J=()=>{};var Fa=e=>{throw console.error(e),e},Ua=e=>{console.error(e)},f=class{constructor(r){this.suppressErrors=!1;r&&(this._subscribe=r)}setSuppressErrors(r){this.suppressErrors=r}subscribe(r,t){let n=this.suppressErrors?Ua:Fa,o;t?typeof t=="function"?o={next:t,error:J}:o={next:u=>t.next(u),error:u=>t.error?.(u)}:o={next:n,error:J};let i=typeof r=="function"?{next:u=>{try{let c=r(u);c instanceof Promise&&c.catch(p=>o.next(p))}catch(c){o.next(c)}},error:u=>o.next(u)}:{next:u=>r.next(u),error:u=>r.error?r.error(u):o.next(u)},a;try{a=this._subscribe(i)}catch(u){i.error?.(u)}return new O().add(()=>{switch(i.next=J,i.error=J,typeof a){case"function":a();return;case"object":a.unsubscribe();return;case"undefined":return;default:return k(a)}})}pipe(...r){return r.reduce((t,n)=>n(t),this)}_subscribe(r){}};var j=class extends f{constructor(){super();this.keyCounter=0;this.subscribers=new Map}next(t){this.subscribers.forEach(n=>n.next(t))}error(t){this.subscribers.forEach(n=>n.error?.(t))}_subscribe(t){let n=this.keyCounter++;return this.subscribers.set(n,t),new O().add(()=>this.subscribers.delete(n))}};var pr=class{constructor(){this.log$=new j;this.logs=[];this.log=r=>{let t={...r,timestamp:Date.now()};this.logs.push(t),this.log$.next(t)};this.getAllLogs=()=>this.logs}createCustomLog(r){return(...t)=>{let n;try{n=r(...t)}catch{n={message:"error in `createCustomLog`",component:"Logger"}}this.log(n)}}createComponentLog(r){return this.createCustomLog(t=>({component:r,...t}))}};function Ga(e,r='Assertion "value is not nullable" failed'){if(e==null)throw new Error(r)}function Qa(e,r='Assertion "value is nullable" failed'){if(e!=null)throw new Error(r)}function Z(e){return typeof e<"u"&&e!==null}function ce(e){return e==null}function Ba(e,r){if(!e?.length)throw new Error(r)}function Wa(e,r){if(e?.length)throw new Error(r)}var Eo=X(Oo(),1),y=()=>Eo.default,So=(e=y())=>!!(e.window&&e.screen);var Yc=(e,r,t)=>new Promise((n,o)=>{r.addEventListener("abort",()=>{u(),p.remove()});let i=()=>{u(),o("error")},a=()=>{u(),n()},u=()=>{c&&clearTimeout(c),p.removeEventListener("load",a),p.removeEventListener("error",i)},c;t&&(c=y().setTimeout(()=>{u(),o("timeout")},t));let p=document.createElement("script");p.addEventListener("load",a),p.addEventListener("error",i),p.src=e,document.head.appendChild(p)});var Hc=typeof y().performance?.now=="function"?()=>y().performance.now():()=>Date.now();var Xc=(e,r)=>async(...t)=>{let n=r(...t),o=e.aborted,i;for(;!o&&!e.aborted;)try{let a=await n.next(i);o=a.done??!1,i=a.value}catch(a){await n.throw(a)}return i};var Jc=(e,{start:r=0,factor:t=2,max:n=1/0,min:o=r,random:i=0}={})=>{let a=r;return a*=t**e,a*=1+(Math.random()*i*2-i),a=Math.round(a),a=Math.min(a,n),a=Math.max(a,o),a};var wo={};Nt(wo,{clear:()=>ol,get:()=>el,has:()=>tl,isPersistent:()=>Zc,remove:()=>nl,set:()=>rl});var ie,K,Gr=`vk-videoplayer-dummy-key-${Math.random()}`,se=()=>{if(K!==void 0)return K;try{localStorage.setItem(Gr,"test"),localStorage.removeItem(Gr),K=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(Gr),K=1}catch(r){if(r instanceof DOMException||r instanceof TypeError)K=2;else throw r}else throw e}return K===2&&(ie=new Map),K},Zc=()=>se()===0,el=e=>{let r=se();switch(r){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return ie?.get(e);default:k(r)}},rl=(e,r)=>{let t=se();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:ie?.set(e,r);return;default:k(t)}},tl=e=>{let r=se();switch(r){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return ie?.has(e)??!1;default:return k(r),!1}},nl=e=>{let r=se();switch(r){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:ie?.delete(e);return;default:k(r)}},ol=()=>{let e=se();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return ie?.clear();default:k(e)}};var il=(e,r,t)=>{if(typeof e.canParse=="function")return e.canParse(r,t);try{return new e(r,t),!0}catch{return!1}},qo=il;var Br=X(Go(),1);var Il=()=>{let e,r=[],t=y();try{e=t.self!==t.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?e=!0:(e=!1,console.error(n))}try{t.location.ancestorOrigins&&(r=[...t.location.ancestorOrigins])}catch(n){console.error(n)}try{!r.length&&t.document.referrer&&(r=[new URL(t.document.referrer).origin])}catch(n){console.error(n)}return r=r.filter(n=>qo(URL,n)),{isEmbed:e,origins:r,topOrigin:(0,Br.default)(r,-1),immediateOrigin:(0,Br.default)(r,0)}};var Wr=(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))(Wr||{});var R={"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}},xl=(e,r)=>R[e].height>R[r].height,Ol=(e,r)=>R[e].height>=R[r].height,zr=(e,r)=>R[e].height<R[r].height,El=(e,r)=>R[e].height<=R[r].height,Sl=e=>e.sort((r,t)=>r===t?0:r==="Invariant quality"?1:t==="Invariant quality"?-1:zr(r,t)?1:-1)[0],Qo=Object.keys(R).sort((e,r)=>zr(e,r)?-1:1),wl=(e,r=.02)=>[...Qo].find(n=>R[n].height*(1+r)>=e),ql=({width:e,height:r})=>{let t=Math.min(e,r),n=Math.max(e,r);return Qo.find(o=>{let i=R[o];return i.width>=n&&i.height>=t})},Rl=e=>R[e].height,Kr=e=>e==="Invariant quality",Pl=e=>e.every(r=>!Kr(r));function _l(e){if(Kr(e))throw new Error("Expected exact quality")}var Al=e=>{switch(e){case"4320p":return"8K";case"2160p":return"4K";case"1440p":return"QHD";case"1080p":return"FHD";case"720p":return"HD";default:return""}};var Ll=(e,r)=>{let t={};for(let n of Object.keys(r)){let o=r[n],i=e[n];Array.isArray(o)&&Array.isArray(i)?t[n]=i:typeof o=="object"&&typeof i=="object"?t[n]=Ll(i,o):t[n]=n in e?i:o}return t};var nm=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 $r(e,r=0,t){let n,o,i,a,u,c,p=0,b=!1,l=!1,d=!0,v=!r&&r!==0&&typeof y().requestAnimationFrame=="function";t&&(b=!!t.leading,l="maxWait"in t,i=t?.maxWait?Math.max(+t?.maxWait||0,r):i,d="trailing"in t?!!t.trailing:d);function T(m){let _=n,Q=o;return n=o=void 0,p=m,a=e.apply(Q,_),a}function h(m,_){return v?(u&&y().cancelAnimationFrame(u),y().requestAnimationFrame(m)):setTimeout(m,_)}function I(m){if(v){y().cancelAnimationFrame(m);return}clearTimeout(m)}function g(m){return p=m,u=h(Oe,r),b?T(m):a}function x(m){let _=m-c,Q=m-p,jt=r-_;return l?Math.min(jt,i-Q):jt}function Lt(m){let _=m-c,Q=m-p;return c===void 0||_>=r||_<0||l&&Q>=i}function Oe(){let m=Date.now();if(Lt(m))return Ct(m);u=h(Oe,x(m))}function Ct(m){return u=void 0,d&&n?T(m):(n=o=void 0,a)}function Pa(){u!==void 0&&I(u),p=0,n=c=o=u=void 0}function _a(){return u===void 0?a:Ct(Date.now())}function Aa(){return u!==void 0}function Ee(...m){let _=Date.now(),Q=Lt(_);if(n=m,o=this,c=_,Q){if(u===void 0)return g(c);if(l)return u=h(Oe,r),T(c)}return u===void 0&&(u=h(Oe,r)),a}return Ee.cancel=Pa,Ee.flush=_a,Ee.pending=Aa,Ee}var Yr=(e,r=0,t)=>$r(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 o=r(e[n],n,e,t);if(o!==void 0){t[n]=o;continue}}typeof e[n]=="object"?t[n]=De(e[n],r):t[n]=e[n]}return t};var Cl=e=>De(e);var ae=class extends j{constructor(t){super();this.buffer=[];this.cursorEnd=-1;this.cursorStart=0;this.bufferSize=t,this.buffer=Array(t)}next(t){this.cursorEnd+=1,this.cursorStart=this.cursorEnd>=this.bufferSize?this.cursorStart+1:0,this.buffer[this.cursorEnd%this.bufferSize]=t,this.subscribers.forEach(n=>n.next(t))}_subscribe(t){for(let o=this.cursorStart;o<=this.cursorEnd;o++)t.next(this.buffer[o%this.bufferSize]);let n=this.keyCounter++;return this.subscribers.set(n,t),new O().add(()=>this.subscribers.delete(n))}};var Fe=class extends j{constructor(r){super(),this.value=r}next(r){super.next(this.value=r)}error(r){super.error(this.value=r)}getValue(){return this.value}_subscribe(r){let t=super._subscribe(r);return r.next(this.value),t}};var Ti=X(rt(),1);function hi(e){return new f(r=>{let t={},n=Object.keys(e).length,o=i=>a=>{i in t||n--,t[i]=a,n===0&&r.next(t)};return(0,Ti.default)(e).reduce((i,[a,u])=>i.add(u.subscribe(o(a))),new O)})}function gi(...e){return new f(r=>e.reduce((t,n)=>t.add(n.subscribe(r)),new O))}var bp=e=>new f(r=>{let t=y().setTimeout(()=>{try{r.next()}catch(n){if(r.error)r.error(n);else throw n}},e);return()=>y().clearTimeout(t)});var dp=e=>new f(r=>{let t=y(),n=t.setInterval(()=>r.next(),e);return()=>{n&&(t.clearInterval(n),n=void 0)}});var vp=e=>new f(r=>{e.forEach(t=>r.next(t))});var mp=(e,r)=>new f(t=>{let n=o=>t.next(o);return e.addEventListener(r,n),()=>e.removeEventListener(r,n)});var Be=class extends O{remove(r){this.subscriptions=this.subscriptions.filter(t=>t!==r)}};function Ii(e){return r=>new f(t=>r.subscribe(new tt(t,e)))}var tt=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 yp={leading:!1,trailing:!0};function xi(e,r=yp){return t=>new f(n=>t.subscribe(new nt(n,e,r)))}var nt=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r;let t=y();Z(this.timeout)?t.clearTimeout(this.timeout):this.config.leading&&this.destination.next(r),this.timeout=t.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(n){if(this.destination.error)this.destination.error(n);else throw n}this.timeout=void 0},this.time)}error(r){this.destination.error?.(r)}};var Tp={leading:!0,trailing:!1};function Oi(e,r=Tp){return t=>new f(n=>t.subscribe(new ot(n,e,r)))}var ot=class{constructor(r,t,n){this.destination=r;this.time=t;this.config=n}next(r){this.lastValue=r,ce(this.timeout)&&(this.config.leading&&this.destination.next(r),this.timeout=y().setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(r){this.destination.error?.(r)}};function Ei(e){return r=>new f(t=>r.subscribe(new it(t,e)))}var it=class{constructor(r,t){this.destination=r;this.predicate=t}next(r){let t;try{t=this.predicate(r)}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};var Ci=X(Ai(),1);var qp=(e,r)=>{let t=(n,o)=>{let i=Object.keys(n);for(let a in o)if(!(0,Ci.default)(i,a)||o[a]!==n[a])return!1;return!0};return t(e,r)&&t(r,e)},Rp=(e,r)=>e instanceof Object&&r instanceof Object?qp(e,r):e===r;function ji(e=Rp){return r=>new f(t=>r.subscribe(new st(t,e)))}var Li={},st=class{constructor(r,t){this.destination=r;this.predicate=t;this.lastValue=Li}next(r){let t;try{t=this.lastValue===Li||!this.predicate(this.lastValue,r),this.lastValue=r instanceof Object&&!Array.isArray(r)?{...r}:r}catch(n){throw this.error(n),n}t&&this.destination.next(r)}error(r){this.destination.error?.(r)}};function We(e){return r=>new f(t=>r.subscribe(new at(t,e)))}var at=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 Ni(e){return We(()=>e)}function ki(){return e=>new f(r=>{let t=!1,n=!1,o=e.subscribe(i=>{t||(t=!0,r.next(i)),n&&o.unsubscribe()},i=>{t=!0,r.error?.(i),n&&o.unsubscribe()});return n=!0,t&&o.unsubscribe(),o})}function Mi(){return e=>new f(r=>e.subscribe(new ut(r)))}var ut=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 Vi(e){return r=>new f(t=>r.subscribe(new ct(t,e)))}var ct=class{constructor(r,t){this.destination=r;this.effect=t}next(r){try{this.effect(r)}catch(t){throw this.error(t),t}this.destination.next(r)}error(r){this.destination.error?.(r)}};function Di(e){return r=>new f(t=>r.subscribe(new lt(t,e)))}var lt=class{constructor(r,t){this.destination=r;this.count=t;t<0&&this.destination.error?.(new Error("Count can not be less than zero"))}next(r){this.count===0?this.destination.next(r):this.count--}error(r){this.destination.error?.(r)}};function Fi(e=0){return r=>{let t=0,n=new ae(e),o=r.subscribe(n),i=a=>()=>{a.unsubscribe(),t--,t===0&&o.unsubscribe()};return new f(a=>(t++,i(n.subscribe(a))))}}var Pp=300,_p=(e,r=Pp)=>new f(t=>{let n=y(),{width:o,height:i}=e.getBoundingClientRect();if(t.next({width:o,height:i}),!So(n))return;let a=new n.ResizeObserver(Yr(u=>{let c=u[0];if(!c)return;let p,b;c.contentBoxSize&&c.contentBoxSize[0]?(b=c.contentBoxSize[0].blockSize,p=c.contentBoxSize[0].inlineSize):c.contentRect&&(p=c.contentRect.width,b=c.contentRect.height),Z(p)&&Z(b)&&t.next({width:p,height:b})},r));return a.observe(e),()=>a.disconnect()});var ze=(e,r=6,t=".")=>{let n={};for(let o in e)if(!(!e.hasOwnProperty(o)||e[o]instanceof HTMLElement||!r))if(typeof e[o]=="object"&&e[o]!==null){let i=ze(e[o],r-1);for(let a in i)i.hasOwnProperty(a)&&(n[o+t+a]=i[a])}else n[o]=e[o];return n};var Ap=e=>{e.removeAttribute("src"),e.load()};var fT=e=>{let r;try{r=new URL(e)}catch{return!1}return r.protocol==="https:"};var Lp=(e,r)=>!(e.right<r.left||e.left>r.right||e.bottom<r.top||e.top>r.bottom);var Cp=(()=>{let e=0;return()=>{let r=e;return e=(e+1)%Number.MAX_SAFE_INTEGER,r}})(),jp=e=>e!==void 0&&e!==""?e:Cp().toString();function Np(e,r,t){if(e<=r[0])return t[0];if(e>=r[r.length-1])return t[t.length-1];let n=1;for(;n<r.length&&r[n]<e;)n++;n>=r.length&&(n=r.length-1);let o=r[n-1],i=r[n],a=t[n-1],u=t[n];if(e===o)return a;if(e===i)return u;let c=(e-o)/(i-o);return a+c*(u-a)}function kp(e,r,t){if(e<=0||t<0)return[];let n=[],o=Math.floor((e-1)/2),i=Math.floor(e/2),a=r-o,u=r+i;a<0&&(u+=Math.abs(a),a=0),u>t&&(a-=u-t,u=t),a=Math.max(0,a),u=Math.min(t,u);for(let c=a;c<=u;c++)n.push(c);return n}var Mp=e=>r=>t=>{let n=typeof t=="object";t==null||n&&!Object.keys(t).length||e(r,n?ze(t):{value:t})},Ke=(e={})=>{let r=n=>{let o=n;return n===void 0?o="undefined":n===null?o="null":(typeof n=="number"||typeof n=="boolean")&&(o=n.toString()),o},t={};for(let n in e)Array.isArray(e[n])?t[n]=e[n].map(r):t[n]=r(e[n]);return t};var G=class e{constructor({name:r,getParentContext:t}){this.dynamicImportTimeout=5e3;this.childTracers=[];e.dynamicImportStatus==="not_started"&&(e.dynamicImportPromise=this.loadOpentelemetry());let n=Date.now();this.initPromise=e.dynamicImportPromise.then(o=>{e.dynamicImportStatus==="completed"&&this.init({name:r,getParentContext:t},n)})}static{this.dynamicImportStatus="not_started"}init({name:r,getParentContext:t},n){this.span=e.rootTracer.startSpan(r,{startTime:n},t?.()),this.context=e.dynamicImports.opentelemetryApi.trace.setSpan(e.dynamicImports.opentelemetryApi.context.active(),this.span)}async loadOpentelemetry(){if(e.dynamicImportStatus==="not_started"){e.dynamicImportStatus="in_progress";try{let r=new Promise((a,u)=>setTimeout(u,this.dynamicImportTimeout)),t=Promise.all([import("@opentelemetry/api"),import("@opentelemetry/sdk-trace-web"),import("@apptracer/opentelemetry")]),[n,o,i]=await Promise.race([t,r]);e.dynamicImports={opentelemetryApi:n,opentelemetrySdk:o,tracer:i},e.dynamicImportStatus="completed"}catch{e.dynamicImportStatus="failed"}}}isComponentTracerNotInitialized(){return ce(this.span)||e.dynamicImportStatus==="failed"}log(r,t){let n=Date.now();this.initPromise.then(o=>{this.isComponentTracerNotInitialized()||this.span.addEvent(r,{...Ke(t),type:"log"},n)})}error(r,t){let n=Date.now();this.initPromise.then(o=>{this.isComponentTracerNotInitialized()||this.span.addEvent(r,{...Ke(t),type:"error"},n)})}critical(r,t){let n=Date.now();this.initPromise.then(o=>{this.isComponentTracerNotInitialized()||this.span.addEvent(r,{...Ke(t),type:"critical"},n)})}createComponentTracer(r){let t=new e({name:r,getParentContext:()=>this.context});return this.childTracers.push(t),t}end(){this.initPromise.then(r=>{this.isComponentTracerNotInitialized()||(this.childTracers.forEach(t=>t.end()),this.span.end())})}};var $e=class extends G{constructor(){super({name:"Root"})}init({name:r,getParentContext:t},n){let i=G.dynamicImports.tracer.initTracerOpenTelemetry({serviceName:"videoplayer-sdk-web",appToken:"L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb",spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),a=new G.dynamicImports.tracer.TracerMemorySpanExporter;this.spanExporter=a,i.addSpanProcessor(new G.dynamicImports.tracer.TracerAllSpansProcessor({startedSpansExporter:a})),G.rootTracer=i.getTracer("sdk-videoplayer-tracer"),super.init({name:r,getParentContext:t},n)}getFinishedSpans(){if(!this.isComponentTracerNotInitialized())return this.spanExporter?.getJsonData()}getTraceId(){return this.isComponentTracerNotInitialized()?"":this.span.spanContext().traceId}};var Ye=class e{constructor(r){}log(r,t){}error(r,t){}critical(r,t){}createComponentTracer(r){return new e({name:r})}end(){}getFinishedSpans(){}getTraceId(){return this.fakeTraceId}};var pt=class{static createRootTracer(r=!1){return r?new $e:new Ye}};var Vp=(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))(Vp||{});var{NativeAbortSignal:Sh,NativeAbortController:wh}=function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}}(typeof self<"u"?self:global);function Ui(e){let r;try{r=new Event("abort")}catch{typeof document<"u"?document.createEvent?(r=document.createEvent("Event"),r.initEvent("abort",!1,!1)):(r=document.createEventObject(),r.type="abort"):r={type:"abort",bubbles:!1,cancelable:!1}}return r.reason=e,r}function Gi(e){if(e===void 0)if(typeof document>"u")e=new Error("This operation was aborted"),e.name="AbortError";else try{e=new DOMException("signal is aborted without reason"),Object.defineProperty(e,"name",{value:"AbortError"})}catch{e=new Error("This operation was aborted"),e.name="AbortError"}return e}var He=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 o=0,i=n.length;o<i;o++)if(n[o].callback===t){n.splice(o,1);return}}dispatchEvent(r){if(!(r.type in this.listeners))return;let n=this.listeners[r.type].slice();for(let o=0,i=n.length;o<i;o++){let a=n[o];try{a.callback.call(this,r)}catch(u){Promise.resolve().then(()=>{throw u})}a.options&&a.options.once&&this.removeEventListener(r.type,a.callback)}return!r.defaultPrevented}},ue=class extends He{constructor(){super(),this.listeners||He.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)}throwIfAborted(){let{aborted:r,reason:t="Aborted"}=this;if(r)throw t}static timeout(r){let t=new $;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${r}ms`,"TimeoutError")),r),t.signal}static any(r){let t=new $;function n(){t.abort(this.reason),o()}function o(){for(let i of r)i.removeEventListener("abort",n)}for(let i of r)if(i.aborted){t.abort(i.reason);break}else i.addEventListener("abort",n);return t.signal}},$=class{constructor(){Object.defineProperty(this,"signal",{value:new ue,writable:!0,configurable:!0})}abort(r){let t=Gi(r),n=Ui(t);this.signal.reason=t,this.signal.dispatchEvent(n)}toString(){return"[object AbortController]"}};typeof Symbol<"u"&&Symbol.toStringTag&&($.prototype[Symbol.toStringTag]="AbortController",ue.prototype[Symbol.toStringTag]="AbortSignal");function Xe(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 ft(e){typeof e=="function"&&(e={fetch:e});let{fetch:r,Request:t=r.Request,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o=!1}=e;if(!Xe({fetch:r,Request:t,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o}))return{fetch:r,Request:i};let i=t;(i&&!i.prototype.hasOwnProperty("signal")||o)&&(i=function(p,b){let l;b&&b.signal&&(l=b.signal,delete b.signal);let d=new t(p,b);return l&&Object.defineProperty(d,"signal",{writable:!1,enumerable:!1,configurable:!0,value:l}),d},i.prototype=t.prototype);let a=r;return{fetch:(c,p)=>{let b=i&&i.prototype.isPrototypeOf(c)?c.signal:p?p.signal:void 0;if(b){let l;try{l=new DOMException("Aborted","AbortError")}catch{l=new Error("Aborted"),l.name="AbortError"}if(b.aborted)return Promise.reject(l);let d=new Promise((v,T)=>{b.addEventListener("abort",()=>T(l),{once:!0})});return p&&p.signal&&delete p.signal,Promise.race([d,a(c,p)])}return a(c,p)},Request:i}}var P=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window;var Dp=()=>"fetch"in P,Te=Dp()&&Xe({fetch:P.fetch,Request:P.Request,AbortController:P.AbortController}),Qi=Te?ft({fetch:P.fetch,Request:P.Request,AbortController:P.AbortController}):void 0,Bi=Te?Qi.fetch:P.fetch,Vh=Te?Qi.Request:P.Request,Dh=Te?$:P.AbortController,Fh=Te?ue:P.AbortSignal;var Sa=X(rt(),1),wa=X(Ea(),1),nd=(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))(nd||{}),od="vk.com",Eg=async(e,r,t)=>{let n=new URL(`https://${od}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",r),e!==void 0&&n.searchParams.set("lang",e);let i=await(await Bi(n.toString())).json();return id(i,t)},id=(e,r)=>(0,wa.default)((0,Sa.default)(e.keys).map(([t,n])=>[t.substring(`${r}_`.length),sd(n)])),sd=e=>Array.isArray(e)?e[0]:e;var ad=(t=>(t.RU="ru",t.EN="en",t))(ad||{});var S="__vk_vp_internals_exposure",qa=class{constructor(r,t){this.playerId=t,this.type=r,this.initWindowObjects()}getWindowObject(){if(typeof window>"u")return{};let r=this.playerId,t=this.type;return window[S]?.[r]?.[t]??{}}initWindowObjects(){if(typeof window>"u")return;let r=this.playerId,t=this.type;window[S]||(window[S]={}),window[S][r]||(window[S][r]={}),window[S][r][t]||(window[S][r][t]={})}expose(r){typeof window>"u"||Object.assign(this.getWindowObject(),r)}destroy(){if(typeof window>"u")return;let r=this.playerId,t=this.type;window[S]&&window[S][r]&&window[S][r][t]&&(delete window[S][r][t],Object.keys(window[S][r]).length||delete window[S][r],Object.keys(window[S]).length||delete window[S])}};var Ra={};Nt(Ra,{create:()=>ud,destroy:()=>cd,push:()=>ld,subscribe:()=>pd});var xe=new Map,ud=(e,r)=>xe.set(e,r??[]),cd=e=>xe.delete(e),ld=(e,r)=>{let t=xe.get(e);t&&(typeof t=="function"?t(r):t.push(r))},pd=(e,r)=>{let t=xe.get(e);if(t){if(t&&Array.isArray(t))for(let n of t)r(n);xe.set(e,r)}};export{Vp as ErrorCategory,S as INTERNAL_EXPOSE_GLOBAL_KEY,ad as InterfaceLanguage,qa as InternalsExposure,pr as Logger,f as Observable,ae as ReplaySubject,j as Subject,O as Subscription,Be as SubscriptionRemovable,pt as TracerFactory,Va as VERSION,nd as VKNumericLanguage,Fe as ValueSubject,Wr as VideoQuality,Xc as abortable,Yc as addScript,Pl as areQualitiesExact,Wa as assertEmptyArray,k as assertNever,Ga as assertNonNullable,Ba as assertNotEmptyArray,Qa as assertNullable,_l as assertQualityIsExact,Ii as buffer,Da as checkNever,Ap as clearVideoElement,Cl as cloneDeep,De as cloneDeepWith,hi as combine,xi as debounce,$r as debounceFn,Il as detectEmbed,Ra as devNull,Ll as fillWithDefault,Ei as filter,ji as filterChanged,ze as flattenObject,mp as fromEvent,Jc as getExponentialDelay,Sl as getHighestQuality,jp as getPlayerId,kp as getRangeAroundIndex,Mp as getTraceSubscriptionMethod,Al as getVideoQualityLabel,y as getWindow,Np as interpolate,dp as interval,So as isBrowserWindow,xl as isHigher,Ol as isHigherOrEqual,Lp as isIntersecting,Kr as isInvariantQuality,zr as isLower,El as isLowerOrEqual,Z as isNonNullable,ce as isNullable,fT as isValidURL,Eg as loadVKLangPack,We as map,Ni as mapTo,gi as merge,J as noop,Hc as now,vp as observableFrom,_p as observeElementSize,ki as once,Mi as pairwise,wo as safeStorage,Fi as shareReplay,Di as skip,Vi as tap,Oi as throttle,Yr as throttleFn,nm as timeCodeToString,bp as timeout,wl as videoHeightToQuality,Rl as videoQualityToHeight,ql as videoSizeToQuality};
|
package/evergreen.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-shared v1.0.78-dev.
|
|
3
|
-
*
|
|
2
|
+
* @vkontakte/videoplayer-shared v1.0.78-dev.e6e86083.0
|
|
3
|
+
* Wed, 17 Dec 2025 14:33:29 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-78/doc/
|
|
5
5
|
*/
|
|
6
|
-
var Ve=Object.defineProperty;var pe=(t,e)=>{for(var r in e)Ve(t,r,{get:e[r],enumerable:!0})};var Qe="1.0.78-dev.0c91b20c.0";var b=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 I=t=>{throw new Error(`${t} is value of unexpected type`)},_e=t=>{};var x=()=>{};var De=t=>{throw console.error(t),t},Ue=t=>{console.error(t)},c=class{constructor(e){this.suppressErrors=!1;e&&(this._subscribe=e)}setSuppressErrors(e){this.suppressErrors=e}subscribe(e,r){let n=this.suppressErrors?Ue:De,o;r?typeof r=="function"?o={next:r,error:x}:o={next:i=>r.next(i),error:i=>r.error?.(i)}:o={next:n,error:x};let a=typeof e=="function"?{next:i=>{try{let p=e(i);p instanceof Promise&&p.catch(m=>o.next(m))}catch(p){o.next(p)}},error:i=>o.next(i)}:{next:i=>e.next(i),error:i=>e.error?e.error(i):o.next(i)},s;try{s=this._subscribe(a)}catch(i){a.error?.(i)}return new b().add(()=>{switch(a.next=x,a.error=x,typeof s){case"function":s();return;case"object":s.unsubscribe();return;case"undefined":return;default:return I(s)}})}pipe(...e){return e.reduce((r,n)=>n(r),this)}_subscribe(e){}};var y=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 b().add(()=>this.subscribers.delete(n))}};var F=class{constructor(){this.log$=new y;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}))}};function je(t,e='Assertion "value is not nullable" failed'){if(t==null)throw new Error(e)}function ze(t,e='Assertion "value is nullable" failed'){if(t!=null)throw new Error(e)}function O(t){return typeof t<"u"&&t!==null}function A(t){return t==null}function Fe(t,e){if(!t?.length)throw new Error(e)}function We(t,e){if(t?.length)throw new Error(e)}var Ge=(t,e,r)=>new Promise((n,o)=>{e.addEventListener("abort",()=>{i(),m.remove()});let a=()=>{i(),o("error")},s=()=>{i(),n()},i=()=>{p&&clearTimeout(p),m.removeEventListener("load",s),m.removeEventListener("error",a)},p;r&&(p=window.setTimeout(()=>{i(),o("timeout")},r));let m=document.createElement("script");m.addEventListener("load",s),m.addEventListener("error",a),m.src=t,document.head.appendChild(m)});var Ke=typeof window.performance?.now=="function"?()=>window.performance.now():()=>Date.now();var He=(t,e)=>async(...r)=>{let n=e(...r),o=t.aborted,a;for(;!o&&!t.aborted;)try{let s=await n.next(a);o=s.done??!1,a=s.value}catch(s){await n.throw(s)}return a};var Be=(t,{start:e=0,factor:r=2,max:n=1/0,min:o=e,random:a=0}={})=>{let s=e;return s*=r**t,s*=1+(Math.random()*a*2-a),s=Math.round(s),s=Math.min(s,n),s=Math.max(s,o),s};var ue={};pe(ue,{clear:()=>Ze,get:()=>$e,has:()=>Ye,isPersistent:()=>qe,remove:()=>Je,set:()=>Xe});var w,g,W=`vk-videoplayer-dummy-key-${Math.random()}`,E=()=>{if(g!==void 0)return g;try{localStorage.setItem(W,"test"),localStorage.removeItem(W),g=0}catch(t){if(t instanceof DOMException||t instanceof TypeError)try{sessionStorage.getItem(W),g=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)g=2;else throw e}else throw t}return g===2&&(w=new Map),g},qe=()=>E()===0,$e=t=>{let e=E();switch(e){case 0:return localStorage.getItem(t)??void 0;case 1:return sessionStorage.getItem(t)??void 0;case 2:return w?.get(t);default:I(e)}},Xe=(t,e)=>{let r=E();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:w?.set(t,e);return;default:I(r)}},Ye=t=>{let e=E();switch(e){case 0:return t in localStorage;case 1:return t in sessionStorage;case 2:return w?.has(t)??!1;default:return I(e),!1}},Je=t=>{let e=E();switch(e){case 0:return localStorage.removeItem(t);case 1:return sessionStorage.removeItem(t);case 2:w?.delete(t);return;default:I(e)}},Ze=()=>{let t=E();switch(t){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return w?.clear();default:I(t)}};var et=()=>{let t,e=[];try{t=window.self!==window.top}catch(r){r instanceof DOMException&&r.name==="SecurityError"?t=!0:(t=!1,console.error(r))}try{window.location.ancestorOrigins&&(e=[...window.location.ancestorOrigins])}catch(r){console.error(r)}try{!e.length&&document.referrer&&(e=[new URL(document.referrer).origin])}catch(r){console.error(r)}return e=e.filter(r=>URL.canParse(r)),{isEmbed:t,origins:e,topOrigin:e.at(-1),immediateOrigin:e.at(0)}};var G=(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))(G||{});var f={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"576p":{width:1024,height:576},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},tt=(t,e)=>f[t].height>f[e].height,rt=(t,e)=>f[t].height>=f[e].height,K=(t,e)=>f[t].height<f[e].height,nt=(t,e)=>f[t].height<=f[e].height,ot=t=>t.sort((e,r)=>e===r?0:e==="Invariant quality"?1:r==="Invariant quality"?-1:K(e,r)?1:-1)[0],me=Object.keys(f).sort((t,e)=>K(t,e)?-1:1),it=(t,e=.02)=>[...me].find(n=>f[n].height*(1+e)>=t),st=({width:t,height:e})=>{let r=Math.min(t,e),n=Math.max(t,e);return me.find(o=>{let a=f[o];return a.width>=n&&a.height>=r})},at=t=>f[t].height,H=t=>t==="Invariant quality",ct=t=>t.every(e=>!H(e));function lt(t){if(H(t))throw new Error("Expected exact quality")}var pt=t=>{switch(t){case"4320p":return"8K";case"2160p":return"4K";case"1440p":return"QHD";case"1080p":return"FHD";case"720p":return"HD";default:return""}};var ut=(t,e)=>{let r={};for(let n of Object.keys(e)){let o=e[n],a=t[n];Array.isArray(o)&&Array.isArray(a)?r[n]=a:typeof o=="object"&&typeof a=="object"?r[n]=ut(a,o):r[n]=n in t?a:o}return r};var fr=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 B(t,e=0,r){let n,o,a,s,i,p,m=0,ie=!1,l=!1,j=!0,se=!e&&e!==0&&typeof window.requestAnimationFrame=="function";r&&(ie=!!r.leading,l="maxWait"in r,a=r?.maxWait?Math.max(+r?.maxWait||0,e):a,j="trailing"in r?!!r.trailing:j);function z(u){let T=n,v=o;return n=o=void 0,m=u,s=t.apply(v,T),s}function k(u,T){return se?(i&&window.cancelAnimationFrame(i),window.requestAnimationFrame(u)):setTimeout(u,T)}function ke(u){if(se){window.cancelAnimationFrame(u);return}clearTimeout(u)}function Re(u){return m=u,i=k(R,e),ie?z(u):s}function Le(u){let T=u-p,v=u-m,le=e-T;return l?Math.min(le,a-v):le}function ae(u){let T=u-p,v=u-m;return p===void 0||T>=e||T<0||l&&v>=a}function R(){let u=Date.now();if(ae(u))return ce(u);i=k(R,Le(u))}function ce(u){return i=void 0,j&&n?z(u):(n=o=void 0,s)}function Ne(){i!==void 0&&ke(i),m=0,n=p=o=i=void 0}function Ce(){return i===void 0?s:ce(Date.now())}function Me(){return i!==void 0}function L(...u){let T=Date.now(),v=ae(T);if(n=u,o=this,p=T,v){if(i===void 0)return Re(p);if(l)return i=k(R,e),z(p)}return i===void 0&&(i=k(R,e)),s}return L.cancel=Ne,L.flush=Ce,L.pending=Me,L}var q=(t,e=0,r)=>B(t,e,{...{leading:!0,trailing:!0},...r,maxWait:e});var N=(t,e)=>{if(t===null||typeof t!="object")return t;let r=Array.isArray(t)?[]:{};for(let n in t){if(typeof e=="function"){let o=e(t[n],n,t,r);if(o!==void 0){r[n]=o;continue}}typeof t[n]=="object"?r[n]=N(t[n],e):r[n]=t[n]}return r};var mt=t=>N(t);var bt=300,dt=(t,e=bt)=>new c(r=>{let{width:n,height:o}=t.getBoundingClientRect();if(r.next({width:n,height:o}),!window.ResizeObserver)return;let a=new ResizeObserver(q(s=>{let i=s[0];if(!i)return;let p,m;i.contentBoxSize&&i.contentBoxSize[0]?(m=i.contentBoxSize[0].blockSize,p=i.contentBoxSize[0].inlineSize):i.contentRect&&(p=i.contentRect.width,m=i.contentRect.height),O(p)&&O(m)&&r.next({width:p,height:m})},e));return a.observe(t),()=>a.disconnect()});var C=(t,e=6,r=".")=>{let n={};for(let o in t)if(!(!t.hasOwnProperty(o)||t[o]instanceof HTMLElement||!e))if(typeof t[o]=="object"&&t[o]!==null){let a=C(t[o],e-1);for(let s in a)a.hasOwnProperty(s)&&(n[o+r+s]=a[s])}else n[o]=t[o];return n};var ft=t=>{t.removeAttribute("src"),t.load()};var Pr=t=>{let e;try{e=new URL(t)}catch{return!1}return e.protocol==="https:"};var Tt=(t,e)=>!(t.right<e.left||t.left>e.right||t.bottom<e.top||t.top>e.bottom);var yt=(()=>{let t=0;return()=>{let e=t;return t=(t+1)%Number.MAX_SAFE_INTEGER,e}})(),It=t=>t!==void 0&&t!==""?t:yt().toString();function ht(t,e,r){if(t<=e[0])return r[0];if(t>=e[e.length-1])return r[r.length-1];let n=1;for(;n<e.length&&e[n]<t;)n++;n>=e.length&&(n=e.length-1);let o=e[n-1],a=e[n],s=r[n-1],i=r[n];if(t===o)return s;if(t===a)return i;let p=(t-o)/(a-o);return s+p*(i-s)}function vt(t,e,r){if(t<=0||r<0)return[];let n=[],o=Math.floor((t-1)/2),a=Math.floor(t/2),s=e-o,i=e+a;s<0&&(i+=Math.abs(s),s=0),i>r&&(s-=i-r,i=r),s=Math.max(0,s),i=Math.min(r,i);for(let p=s;p<=i;p++)n.push(p);return n}var gt=t=>e=>r=>{let n=typeof r=="object";r==null||n&&!Object.keys(r).length||t(e,n?C(r):{value:r})},M=(t={})=>{let e=n=>{let o=n;return n===void 0?o="undefined":n===null?o="null":(typeof n=="number"||typeof n=="boolean")&&(o=n.toString()),o},r={};for(let n in t)Array.isArray(t[n])?r[n]=t[n].map(e):r[n]=e(t[n]);return r};var h=class t{constructor({name:e,getParentContext:r}){this.dynamicImportTimeout=5e3;this.childTracers=[];t.dynamicImportStatus==="not_started"&&(t.dynamicImportPromise=this.loadOpentelemetry());let n=Date.now();this.initPromise=t.dynamicImportPromise.then(o=>{t.dynamicImportStatus==="completed"&&this.init({name:e,getParentContext:r},n)})}static{this.dynamicImportStatus="not_started"}init({name:e,getParentContext:r},n){this.span=t.rootTracer.startSpan(e,{startTime:n},r?.()),this.context=t.dynamicImports.opentelemetryApi.trace.setSpan(t.dynamicImports.opentelemetryApi.context.active(),this.span)}async loadOpentelemetry(){if(t.dynamicImportStatus==="not_started"){t.dynamicImportStatus="in_progress";try{let e=new Promise((s,i)=>setTimeout(i,this.dynamicImportTimeout)),r=Promise.all([import("@opentelemetry/api"),import("@opentelemetry/sdk-trace-web"),import("@apptracer/opentelemetry")]),[n,o,a]=await Promise.race([r,e]);t.dynamicImports={opentelemetryApi:n,opentelemetrySdk:o,tracer:a},t.dynamicImportStatus="completed"}catch{t.dynamicImportStatus="failed"}}}isComponentTracerNotInitialized(){return A(this.span)||t.dynamicImportStatus==="failed"}log(e,r){let n=Date.now();this.initPromise.then(o=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,{...M(r),type:"log"},n)})}error(e,r){let n=Date.now();this.initPromise.then(o=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,{...M(r),type:"error"},n)})}critical(e,r){let n=Date.now();this.initPromise.then(o=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,{...M(r),type:"critical"},n)})}createComponentTracer(e){let r=new t({name:e,getParentContext:()=>this.context});return this.childTracers.push(r),r}end(){this.initPromise.then(e=>{this.isComponentTracerNotInitialized()||(this.childTracers.forEach(r=>r.end()),this.span.end())})}};var V=class extends h{constructor(){super({name:"Root"})}init({name:e,getParentContext:r},n){let a=h.dynamicImports.tracer.initTracerOpenTelemetry({serviceName:"videoplayer-sdk-web",appToken:"L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb",spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),s=new h.dynamicImports.tracer.TracerMemorySpanExporter;this.spanExporter=s,a.addSpanProcessor(new h.dynamicImports.tracer.TracerAllSpansProcessor({startedSpansExporter:s})),h.rootTracer=a.getTracer("sdk-videoplayer-tracer"),super.init({name:e,getParentContext:r},n)}getFinishedSpans(){if(!this.isComponentTracerNotInitialized())return this.spanExporter?.getJsonData()}getTraceId(){return this.isComponentTracerNotInitialized()?"":this.span.spanContext().traceId}};var Q=class t{constructor(e){}log(e,r){}error(e,r){}critical(e,r){}createComponentTracer(e){return new t({name:e})}end(){}getFinishedSpans(){}getTraceId(){return this.fakeTraceId}};var $=class{static createRootTracer(e=!1){return e?new V:new Q}};var S=class extends y{constructor(r){super();this.buffer=[];this.cursorEnd=-1;this.cursorStart=0;this.bufferSize=r,this.buffer=Array(r)}next(r){this.cursorEnd+=1,this.cursorStart=this.cursorEnd>=this.bufferSize?this.cursorStart+1:0,this.buffer[this.cursorEnd%this.bufferSize]=r,this.subscribers.forEach(n=>n.next(r))}_subscribe(r){for(let o=this.cursorStart;o<=this.cursorEnd;o++)r.next(this.buffer[o%this.bufferSize]);let n=this.keyCounter++;return this.subscribers.set(n,r),new b().add(()=>this.subscribers.delete(n))}};var _=class extends y{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 be(t){return new c(e=>{let r={},n=Object.keys(t).length,o=a=>s=>{a in r||n--,r[a]=s,n===0&&e.next(r)};return Object.entries(t).reduce((a,[s,i])=>a.add(i.subscribe(o(s))),new b)})}function de(...t){return new c(e=>t.reduce((r,n)=>r.add(n.subscribe(e)),new b))}var xt=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 Ot=t=>new c(e=>{let r=window.setInterval(()=>e.next(),t);return()=>{r&&(window.clearInterval(r),r=void 0)}});var wt=t=>new c(e=>{t.forEach(r=>e.next(r))});var Et=(t,e)=>new c(r=>{let n=o=>r.next(o);return t.addEventListener(e,n),()=>t.removeEventListener(e,n)});var D=class extends b{remove(e){this.subscriptions=this.subscriptions.filter(r=>r!==e)}};function fe(t){return e=>new c(r=>e.subscribe(new X(r,t)))}var X=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 St={leading:!1,trailing:!0};function Te(t,e=St){return r=>new c(n=>r.subscribe(new Y(n,t,e)))}var Y=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,O(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 At={leading:!0,trailing:!1};function ye(t,e=At){return r=>new c(n=>r.subscribe(new J(n,t,e)))}var J=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,A(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 Ie(t){return e=>new c(r=>e.subscribe(new Z(r,t)))}var Z=class{constructor(e,r){this.destination=e;this.predicate=r}next(e){let r;try{r=this.predicate(e)}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};var Pt=(t,e)=>{let r=(n,o)=>{let a=Object.keys(n);for(let s in o)if(!a.includes(s)||o[s]!==n[s])return!1;return!0};return r(t,e)&&r(e,t)},kt=(t,e)=>t instanceof Object&&e instanceof Object?Pt(t,e):t===e;function ve(t=kt){return e=>new c(r=>e.subscribe(new ee(r,t)))}var he={},ee=class{constructor(e,r){this.destination=e;this.predicate=r;this.lastValue=he}next(e){let r;try{r=this.lastValue===he||!this.predicate(this.lastValue,e),this.lastValue=e instanceof Object&&!Array.isArray(e)?{...e}:e}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};function U(t){return e=>new c(r=>e.subscribe(new te(r,t)))}var te=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 ge(t){return U(()=>t)}function xe(){return t=>new c(e=>{let r=!1,n=!1,o=t.subscribe(a=>{r||(r=!0,e.next(a)),n&&o.unsubscribe()},a=>{r=!0,e.error?.(a),n&&o.unsubscribe()});return n=!0,r&&o.unsubscribe(),o})}function Oe(){return t=>new c(e=>t.subscribe(new re(e)))}var re=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 we(t){return e=>new c(r=>e.subscribe(new ne(r,t)))}var ne=class{constructor(e,r){this.destination=e;this.effect=r}next(e){try{this.effect(e)}catch(r){throw this.error(r),r}this.destination.next(e)}error(e){this.destination.error?.(e)}};function Ee(t){return e=>new c(r=>e.subscribe(new oe(r,t)))}var oe=class{constructor(e,r){this.destination=e;this.count=r;r<0&&this.destination.error?.(new Error("Count can not be less than zero"))}next(e){this.count===0?this.destination.next(e):this.count--}error(e){this.destination.error?.(e)}};function Se(t=0){return e=>{let r=0,n=new S(t),o=e.subscribe(n),a=s=>()=>{s.unsubscribe(),r--,r===0&&o.unsubscribe()};return new c(s=>(r++,a(n.subscribe(s))))}}var Rt=(i=>(i.NETWORK="network",i.VIDEO_PIPELINE="video_pipeline",i.EXTERNAL_API="external_api",i.PARSER="parser",i.DOM="dom",i.WTF="wtf",i.FATAL="fatal",i))(Rt||{});var Lt=(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))(Lt||{}),Nt="vk.com",li=async(t,e,r)=>{let n=new URL(`https://${Nt}/js/lang-pack.js`);n.searchParams.set("format","json"),n.searchParams.set("name",e),t!==void 0&&n.searchParams.set("lang",t);let a=await(await fetch(n.toString())).json();return Ct(a,r)},Ct=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),Mt(n)])),Mt=t=>Array.isArray(t)?t[0]:t;var Vt=(r=>(r.RU="ru",r.EN="en",r))(Vt||{});var d="__vk_vp_internals_exposure",Ae=class{constructor(e,r){this.playerId=r,this.type=e,this.initWindowObjects()}getWindowObject(){if(typeof window>"u")return{};let e=this.playerId,r=this.type;return window[d]?.[e]?.[r]??{}}initWindowObjects(){if(typeof window>"u")return;let e=this.playerId,r=this.type;window[d]||(window[d]={}),window[d][e]||(window[d][e]={}),window[d][e][r]||(window[d][e][r]={})}expose(e){typeof window>"u"||Object.assign(this.getWindowObject(),e)}destroy(){if(typeof window>"u")return;let e=this.playerId,r=this.type;window[d]&&window[d][e]&&window[d][e][r]&&(delete window[d][e][r],Object.keys(window[d][e]).length||delete window[d][e],Object.keys(window[d]).length||delete window[d])}};var Pe={};pe(Pe,{create:()=>Qt,destroy:()=>_t,push:()=>Dt,subscribe:()=>Ut});var P=new Map,Qt=(t,e)=>P.set(t,e??[]),_t=t=>P.delete(t),Dt=(t,e)=>{let r=P.get(t);r&&(typeof r=="function"?r(e):r.push(e))},Ut=(t,e)=>{let r=P.get(t);if(r){if(r&&Array.isArray(r))for(let n of r)e(n);P.set(t,e)}};export{Rt as ErrorCategory,d as INTERNAL_EXPOSE_GLOBAL_KEY,Vt as InterfaceLanguage,Ae as InternalsExposure,F as Logger,c as Observable,S as ReplaySubject,y as Subject,b as Subscription,D as SubscriptionRemovable,$ as TracerFactory,Qe as VERSION,Lt as VKNumericLanguage,_ as ValueSubject,G as VideoQuality,He as abortable,Ge as addScript,ct as areQualitiesExact,We as assertEmptyArray,I as assertNever,je as assertNonNullable,Fe as assertNotEmptyArray,ze as assertNullable,lt as assertQualityIsExact,fe as buffer,_e as checkNever,ft as clearVideoElement,mt as cloneDeep,N as cloneDeepWith,be as combine,Te as debounce,B as debounceFn,et as detectEmbed,Pe as devNull,ut as fillWithDefault,Ie as filter,ve as filterChanged,C as flattenObject,Et as fromEvent,Be as getExponentialDelay,ot as getHighestQuality,It as getPlayerId,vt as getRangeAroundIndex,gt as getTraceSubscriptionMethod,pt as getVideoQualityLabel,ht as interpolate,Ot as interval,tt as isHigher,rt as isHigherOrEqual,Tt as isIntersecting,H as isInvariantQuality,K as isLower,nt as isLowerOrEqual,O as isNonNullable,A as isNullable,Pr as isValidURL,li as loadVKLangPack,U as map,ge as mapTo,de as merge,x as noop,Ke as now,wt as observableFrom,dt as observeElementSize,xe as once,Oe as pairwise,ue as safeStorage,Se as shareReplay,Ee as skip,we as tap,ye as throttle,q as throttleFn,fr as timeCodeToString,xt as timeout,it as videoHeightToQuality,at as videoQualityToHeight,st as videoSizeToQuality};
|
|
6
|
+
var _e=Object.defineProperty;var ue=(t,e)=>{for(var r in e)_e(t,r,{get:e[r],enumerable:!0})};var De="1.0.78-dev.e6e86083.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 g=t=>{throw new Error(`${t} is value of unexpected type`)},Ue=t=>{};var E=()=>{};var je=t=>{throw console.error(t),t},We=t=>{console.error(t)},c=class{constructor(e){this.suppressErrors=!1;e&&(this._subscribe=e)}setSuppressErrors(e){this.suppressErrors=e}subscribe(e,r){let n=this.suppressErrors?We:je,o;r?typeof r=="function"?o={next:r,error:E}:o={next:a=>r.next(a),error:a=>r.error?.(a)}:o={next:n,error:E};let s=typeof e=="function"?{next:a=>{try{let l=e(a);l instanceof Promise&&l.catch(b=>o.next(b))}catch(l){o.next(l)}},error:a=>o.next(a)}:{next:a=>e.next(a),error:a=>e.error?e.error(a):o.next(a)},i;try{i=this._subscribe(s)}catch(a){s.error?.(a)}return new d().add(()=>{switch(s.next=E,s.error=E,typeof i){case"function":i();return;case"object":i.unsubscribe();return;case"undefined":return;default:return g(i)}})}pipe(...e){return e.reduce((r,n)=>n(r),this)}_subscribe(e){}};var I=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 G=class{constructor(){this.log$=new I;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}))}};function ze(t,e='Assertion "value is not nullable" failed'){if(t==null)throw new Error(e)}function Fe(t,e='Assertion "value is nullable" failed'){if(t!=null)throw new Error(e)}function w(t){return typeof t<"u"&&t!==null}function k(t){return t==null}function Ge(t,e){if(!t?.length)throw new Error(e)}function Ke(t,e){if(t?.length)throw new Error(e)}var m=()=>globalThis,me=(t=m())=>!!(t.window&&t.screen);var Be=(t,e,r)=>new Promise((n,o)=>{e.addEventListener("abort",()=>{a(),b.remove()});let s=()=>{a(),o("error")},i=()=>{a(),n()},a=()=>{l&&clearTimeout(l),b.removeEventListener("load",i),b.removeEventListener("error",s)},l;r&&(l=m().setTimeout(()=>{a(),o("timeout")},r));let b=document.createElement("script");b.addEventListener("load",i),b.addEventListener("error",s),b.src=t,document.head.appendChild(b)});var He=typeof m().performance?.now=="function"?()=>m().performance.now():()=>Date.now();var qe=(t,e)=>async(...r)=>{let n=e(...r),o=t.aborted,s;for(;!o&&!t.aborted;)try{let i=await n.next(s);o=i.done??!1,s=i.value}catch(i){await n.throw(i)}return s};var $e=(t,{start:e=0,factor:r=2,max:n=1/0,min:o=e,random:s=0}={})=>{let i=e;return i*=r**t,i*=1+(Math.random()*s*2-s),i=Math.round(i),i=Math.min(i,n),i=Math.max(i,o),i};var be={};ue(be,{clear:()=>tt,get:()=>Ye,has:()=>Ze,isPersistent:()=>Xe,remove:()=>et,set:()=>Je});var S,O,K=`vk-videoplayer-dummy-key-${Math.random()}`,A=()=>{if(O!==void 0)return O;try{localStorage.setItem(K,"test"),localStorage.removeItem(K),O=0}catch(t){if(t instanceof DOMException||t instanceof TypeError)try{sessionStorage.getItem(K),O=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)O=2;else throw e}else throw t}return O===2&&(S=new Map),O},Xe=()=>A()===0,Ye=t=>{let e=A();switch(e){case 0:return localStorage.getItem(t)??void 0;case 1:return sessionStorage.getItem(t)??void 0;case 2:return S?.get(t);default:g(e)}},Je=(t,e)=>{let r=A();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:S?.set(t,e);return;default:g(r)}},Ze=t=>{let e=A();switch(e){case 0:return t in localStorage;case 1:return t in sessionStorage;case 2:return S?.has(t)??!1;default:return g(e),!1}},et=t=>{let e=A();switch(e){case 0:return localStorage.removeItem(t);case 1:return sessionStorage.removeItem(t);case 2:S?.delete(t);return;default:g(e)}},tt=()=>{let t=A();switch(t){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return S?.clear();default:g(t)}};var rt=()=>{let t,e=[],r=m();try{t=r.self!==r.top}catch(n){n instanceof DOMException&&n.name==="SecurityError"?t=!0:(t=!1,console.error(n))}try{r.location.ancestorOrigins&&(e=[...r.location.ancestorOrigins])}catch(n){console.error(n)}try{!e.length&&r.document.referrer&&(e=[new URL(r.document.referrer).origin])}catch(n){console.error(n)}return e=e.filter(n=>URL.canParse(n)),{isEmbed:t,origins:e,topOrigin:e.at(-1),immediateOrigin:e.at(0)}};var B=(p=>(p.INVARIANT="Invariant quality",p.Q_144P="144p",p.Q_240P="240p",p.Q_360P="360p",p.Q_480P="480p",p.Q_576P="576p",p.Q_720P="720p",p.Q_1080P="1080p",p.Q_1440P="1440p",p.Q_2160P="2160p",p.Q_4320P="4320p",p))(B||{});var T={"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}},nt=(t,e)=>T[t].height>T[e].height,ot=(t,e)=>T[t].height>=T[e].height,H=(t,e)=>T[t].height<T[e].height,it=(t,e)=>T[t].height<=T[e].height,st=t=>t.sort((e,r)=>e===r?0:e==="Invariant quality"?1:r==="Invariant quality"?-1:H(e,r)?1:-1)[0],de=Object.keys(T).sort((t,e)=>H(t,e)?-1:1),at=(t,e=.02)=>[...de].find(n=>T[n].height*(1+e)>=t),ct=({width:t,height:e})=>{let r=Math.min(t,e),n=Math.max(t,e);return de.find(o=>{let s=T[o];return s.width>=n&&s.height>=r})},lt=t=>T[t].height,q=t=>t==="Invariant quality",pt=t=>t.every(e=>!q(e));function ut(t){if(q(t))throw new Error("Expected exact quality")}var mt=t=>{switch(t){case"4320p":return"8K";case"2160p":return"4K";case"1440p":return"QHD";case"1080p":return"FHD";case"720p":return"HD";default:return""}};var bt=(t,e)=>{let r={};for(let n of Object.keys(e)){let o=e[n],s=t[n];Array.isArray(o)&&Array.isArray(s)?r[n]=s:typeof o=="object"&&typeof s=="object"?r[n]=bt(s,o):r[n]=n in t?s:o}return r};var vr=t=>{let e="";return t>=3600&&(e+=Math.floor(t/3600)+"h",t=t%3600),t>=60&&(e+=Math.floor(t/60)+"m",t=t%60),t>0&&(e+=Math.floor(t)+"s"),e};function $(t,e=0,r){let n,o,s,i,a,l,b=0,v=!1,p=!1,z=!0,ae=!e&&e!==0&&typeof m().requestAnimationFrame=="function";r&&(v=!!r.leading,p="maxWait"in r,s=r?.maxWait?Math.max(+r?.maxWait||0,e):s,z="trailing"in r?!!r.trailing:z);function F(u){let y=n,x=o;return n=o=void 0,b=u,i=t.apply(x,y),i}function L(u,y){return ae?(a&&m().cancelAnimationFrame(a),m().requestAnimationFrame(u)):setTimeout(u,y)}function Le(u){if(ae){m().cancelAnimationFrame(u);return}clearTimeout(u)}function Ne(u){return b=u,a=L(N,e),v?F(u):i}function Ce(u){let y=u-l,x=u-b,pe=e-y;return p?Math.min(pe,s-x):pe}function ce(u){let y=u-l,x=u-b;return l===void 0||y>=e||y<0||p&&x>=s}function N(){let u=Date.now();if(ce(u))return le(u);a=L(N,Ce(u))}function le(u){return a=void 0,z&&n?F(u):(n=o=void 0,i)}function Me(){a!==void 0&&Le(a),b=0,n=l=o=a=void 0}function Ve(){return a===void 0?i:le(Date.now())}function Qe(){return a!==void 0}function C(...u){let y=Date.now(),x=ce(y);if(n=u,o=this,l=y,x){if(a===void 0)return Ne(l);if(p)return a=L(N,e),F(l)}return a===void 0&&(a=L(N,e)),i}return C.cancel=Me,C.flush=Ve,C.pending=Qe,C}var X=(t,e=0,r)=>$(t,e,{...{leading:!0,trailing:!0},...r,maxWait:e});var M=(t,e)=>{if(t===null||typeof t!="object")return t;let r=Array.isArray(t)?[]:{};for(let n in t){if(typeof e=="function"){let o=e(t[n],n,t,r);if(o!==void 0){r[n]=o;continue}}typeof t[n]=="object"?r[n]=M(t[n],e):r[n]=t[n]}return r};var dt=t=>M(t);var P=class extends I{constructor(r){super();this.buffer=[];this.cursorEnd=-1;this.cursorStart=0;this.bufferSize=r,this.buffer=Array(r)}next(r){this.cursorEnd+=1,this.cursorStart=this.cursorEnd>=this.bufferSize?this.cursorStart+1:0,this.buffer[this.cursorEnd%this.bufferSize]=r,this.subscribers.forEach(n=>n.next(r))}_subscribe(r){for(let o=this.cursorStart;o<=this.cursorEnd;o++)r.next(this.buffer[o%this.bufferSize]);let n=this.keyCounter++;return this.subscribers.set(n,r),new d().add(()=>this.subscribers.delete(n))}};var V=class extends I{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 fe(t){return new c(e=>{let r={},n=Object.keys(t).length,o=s=>i=>{s in r||n--,r[s]=i,n===0&&e.next(r)};return Object.entries(t).reduce((s,[i,a])=>s.add(a.subscribe(o(i))),new d)})}function Te(...t){return new c(e=>t.reduce((r,n)=>r.add(n.subscribe(e)),new d))}var ft=t=>new c(e=>{let r=m().setTimeout(()=>{try{e.next()}catch(n){if(e.error)e.error(n);else throw n}},t);return()=>m().clearTimeout(r)});var Tt=t=>new c(e=>{let r=m(),n=r.setInterval(()=>e.next(),t);return()=>{n&&(r.clearInterval(n),n=void 0)}});var yt=t=>new c(e=>{t.forEach(r=>e.next(r))});var It=(t,e)=>new c(r=>{let n=o=>r.next(o);return t.addEventListener(e,n),()=>t.removeEventListener(e,n)});var Q=class extends d{remove(e){this.subscriptions=this.subscriptions.filter(r=>r!==e)}};function ye(t){return e=>new c(r=>e.subscribe(new Y(r,t)))}var Y=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 gt={leading:!1,trailing:!0};function Ie(t,e=gt){return r=>new c(n=>r.subscribe(new J(n,t,e)))}var J=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e;let r=m();w(this.timeout)?r.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=r.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(n){if(this.destination.error)this.destination.error(n);else throw n}this.timeout=void 0},this.time)}error(e){this.destination.error?.(e)}};var ht={leading:!0,trailing:!1};function ge(t,e=ht){return r=>new c(n=>r.subscribe(new Z(n,t,e)))}var Z=class{constructor(e,r,n){this.destination=e;this.time=r;this.config=n}next(e){this.lastValue=e,k(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=m().setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){this.destination.error?.(e)}};function he(t){return e=>new c(r=>e.subscribe(new ee(r,t)))}var ee=class{constructor(e,r){this.destination=e;this.predicate=r}next(e){let r;try{r=this.predicate(e)}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};var vt=(t,e)=>{let r=(n,o)=>{let s=Object.keys(n);for(let i in o)if(!s.includes(i)||o[i]!==n[i])return!1;return!0};return r(t,e)&&r(e,t)},xt=(t,e)=>t instanceof Object&&e instanceof Object?vt(t,e):t===e;function xe(t=xt){return e=>new c(r=>e.subscribe(new te(r,t)))}var ve={},te=class{constructor(e,r){this.destination=e;this.predicate=r;this.lastValue=ve}next(e){let r;try{r=this.lastValue===ve||!this.predicate(this.lastValue,e),this.lastValue=e instanceof Object&&!Array.isArray(e)?{...e}:e}catch(n){throw this.error(n),n}r&&this.destination.next(e)}error(e){this.destination.error?.(e)}};function _(t){return e=>new c(r=>e.subscribe(new re(r,t)))}var re=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 Oe(t){return _(()=>t)}function Ee(){return t=>new c(e=>{let r=!1,n=!1,o=t.subscribe(s=>{r||(r=!0,e.next(s)),n&&o.unsubscribe()},s=>{r=!0,e.error?.(s),n&&o.unsubscribe()});return n=!0,r&&o.unsubscribe(),o})}function we(){return t=>new c(e=>t.subscribe(new ne(e)))}var ne=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 Se(t){return e=>new c(r=>e.subscribe(new oe(r,t)))}var oe=class{constructor(e,r){this.destination=e;this.effect=r}next(e){try{this.effect(e)}catch(r){throw this.error(r),r}this.destination.next(e)}error(e){this.destination.error?.(e)}};function Ae(t){return e=>new c(r=>e.subscribe(new ie(r,t)))}var ie=class{constructor(e,r){this.destination=e;this.count=r;r<0&&this.destination.error?.(new Error("Count can not be less than zero"))}next(e){this.count===0?this.destination.next(e):this.count--}error(e){this.destination.error?.(e)}};function Pe(t=0){return e=>{let r=0,n=new P(t),o=e.subscribe(n),s=i=>()=>{i.unsubscribe(),r--,r===0&&o.unsubscribe()};return new c(i=>(r++,s(n.subscribe(i))))}}var Ot=300,Et=(t,e=Ot)=>new c(r=>{let n=m(),{width:o,height:s}=t.getBoundingClientRect();if(r.next({width:o,height:s}),!me(n))return;let i=new n.ResizeObserver(X(a=>{let l=a[0];if(!l)return;let b,v;l.contentBoxSize&&l.contentBoxSize[0]?(v=l.contentBoxSize[0].blockSize,b=l.contentBoxSize[0].inlineSize):l.contentRect&&(b=l.contentRect.width,v=l.contentRect.height),w(b)&&w(v)&&r.next({width:b,height:v})},e));return i.observe(t),()=>i.disconnect()});var D=(t,e=6,r=".")=>{let n={};for(let o in t)if(!(!t.hasOwnProperty(o)||t[o]instanceof HTMLElement||!e))if(typeof t[o]=="object"&&t[o]!==null){let s=D(t[o],e-1);for(let i in s)s.hasOwnProperty(i)&&(n[o+r+i]=s[i])}else n[o]=t[o];return n};var wt=t=>{t.removeAttribute("src"),t.load()};var uo=t=>{let e;try{e=new URL(t)}catch{return!1}return e.protocol==="https:"};var St=(t,e)=>!(t.right<e.left||t.left>e.right||t.bottom<e.top||t.top>e.bottom);var At=(()=>{let t=0;return()=>{let e=t;return t=(t+1)%Number.MAX_SAFE_INTEGER,e}})(),Pt=t=>t!==void 0&&t!==""?t:At().toString();function kt(t,e,r){if(t<=e[0])return r[0];if(t>=e[e.length-1])return r[r.length-1];let n=1;for(;n<e.length&&e[n]<t;)n++;n>=e.length&&(n=e.length-1);let o=e[n-1],s=e[n],i=r[n-1],a=r[n];if(t===o)return i;if(t===s)return a;let l=(t-o)/(s-o);return i+l*(a-i)}function Rt(t,e,r){if(t<=0||r<0)return[];let n=[],o=Math.floor((t-1)/2),s=Math.floor(t/2),i=e-o,a=e+s;i<0&&(a+=Math.abs(i),i=0),a>r&&(i-=a-r,a=r),i=Math.max(0,i),a=Math.min(r,a);for(let l=i;l<=a;l++)n.push(l);return n}var Lt=t=>e=>r=>{let n=typeof r=="object";r==null||n&&!Object.keys(r).length||t(e,n?D(r):{value:r})},U=(t={})=>{let e=n=>{let o=n;return n===void 0?o="undefined":n===null?o="null":(typeof n=="number"||typeof n=="boolean")&&(o=n.toString()),o},r={};for(let n in t)Array.isArray(t[n])?r[n]=t[n].map(e):r[n]=e(t[n]);return r};var h=class t{constructor({name:e,getParentContext:r}){this.dynamicImportTimeout=5e3;this.childTracers=[];t.dynamicImportStatus==="not_started"&&(t.dynamicImportPromise=this.loadOpentelemetry());let n=Date.now();this.initPromise=t.dynamicImportPromise.then(o=>{t.dynamicImportStatus==="completed"&&this.init({name:e,getParentContext:r},n)})}static{this.dynamicImportStatus="not_started"}init({name:e,getParentContext:r},n){this.span=t.rootTracer.startSpan(e,{startTime:n},r?.()),this.context=t.dynamicImports.opentelemetryApi.trace.setSpan(t.dynamicImports.opentelemetryApi.context.active(),this.span)}async loadOpentelemetry(){if(t.dynamicImportStatus==="not_started"){t.dynamicImportStatus="in_progress";try{let e=new Promise((i,a)=>setTimeout(a,this.dynamicImportTimeout)),r=Promise.all([import("@opentelemetry/api"),import("@opentelemetry/sdk-trace-web"),import("@apptracer/opentelemetry")]),[n,o,s]=await Promise.race([r,e]);t.dynamicImports={opentelemetryApi:n,opentelemetrySdk:o,tracer:s},t.dynamicImportStatus="completed"}catch{t.dynamicImportStatus="failed"}}}isComponentTracerNotInitialized(){return k(this.span)||t.dynamicImportStatus==="failed"}log(e,r){let n=Date.now();this.initPromise.then(o=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,{...U(r),type:"log"},n)})}error(e,r){let n=Date.now();this.initPromise.then(o=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,{...U(r),type:"error"},n)})}critical(e,r){let n=Date.now();this.initPromise.then(o=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,{...U(r),type:"critical"},n)})}createComponentTracer(e){let r=new t({name:e,getParentContext:()=>this.context});return this.childTracers.push(r),r}end(){this.initPromise.then(e=>{this.isComponentTracerNotInitialized()||(this.childTracers.forEach(r=>r.end()),this.span.end())})}};var j=class extends h{constructor(){super({name:"Root"})}init({name:e,getParentContext:r},n){let s=h.dynamicImports.tracer.initTracerOpenTelemetry({serviceName:"videoplayer-sdk-web",appToken:"L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb",spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),i=new h.dynamicImports.tracer.TracerMemorySpanExporter;this.spanExporter=i,s.addSpanProcessor(new h.dynamicImports.tracer.TracerAllSpansProcessor({startedSpansExporter:i})),h.rootTracer=s.getTracer("sdk-videoplayer-tracer"),super.init({name:e,getParentContext:r},n)}getFinishedSpans(){if(!this.isComponentTracerNotInitialized())return this.spanExporter?.getJsonData()}getTraceId(){return this.isComponentTracerNotInitialized()?"":this.span.spanContext().traceId}};var W=class t{constructor(e){}log(e,r){}error(e,r){}critical(e,r){}createComponentTracer(e){return new t({name:e})}end(){}getFinishedSpans(){}getTraceId(){return this.fakeTraceId}};var se=class{static createRootTracer(e=!1){return e?new j:new W}};var Nt=(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))(Nt||{});var Ct=(p=>(p.Armenian="58",p.Azerbaijani="57",p.Belarusian="114",p.English="3",p.Kazakh="97",p.Portuguese="73",p.Russian="0",p.Spanish="4",p.Ukrainian="1",p.Uzbek="65",p.Vietnamese="75",p))(Ct||{}),Mt="vk.com",wi=async(t,e,r)=>{let n=new URL(`https://${Mt}/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 Vt(s,r)},Vt=(t,e)=>Object.fromEntries(Object.entries(t.keys).map(([r,n])=>[r.substring(`${e}_`.length),Qt(n)])),Qt=t=>Array.isArray(t)?t[0]:t;var _t=(r=>(r.RU="ru",r.EN="en",r))(_t||{});var f="__vk_vp_internals_exposure",ke=class{constructor(e,r){this.playerId=r,this.type=e,this.initWindowObjects()}getWindowObject(){if(typeof window>"u")return{};let e=this.playerId,r=this.type;return window[f]?.[e]?.[r]??{}}initWindowObjects(){if(typeof window>"u")return;let e=this.playerId,r=this.type;window[f]||(window[f]={}),window[f][e]||(window[f][e]={}),window[f][e][r]||(window[f][e][r]={})}expose(e){typeof window>"u"||Object.assign(this.getWindowObject(),e)}destroy(){if(typeof window>"u")return;let e=this.playerId,r=this.type;window[f]&&window[f][e]&&window[f][e][r]&&(delete window[f][e][r],Object.keys(window[f][e]).length||delete window[f][e],Object.keys(window[f]).length||delete window[f])}};var Re={};ue(Re,{create:()=>Dt,destroy:()=>Ut,push:()=>jt,subscribe:()=>Wt});var R=new Map,Dt=(t,e)=>R.set(t,e??[]),Ut=t=>R.delete(t),jt=(t,e)=>{let r=R.get(t);r&&(typeof r=="function"?r(e):r.push(e))},Wt=(t,e)=>{let r=R.get(t);if(r){if(r&&Array.isArray(r))for(let n of r)e(n);R.set(t,e)}};export{Nt as ErrorCategory,f as INTERNAL_EXPOSE_GLOBAL_KEY,_t as InterfaceLanguage,ke as InternalsExposure,G as Logger,c as Observable,P as ReplaySubject,I as Subject,d as Subscription,Q as SubscriptionRemovable,se as TracerFactory,De as VERSION,Ct as VKNumericLanguage,V as ValueSubject,B as VideoQuality,qe as abortable,Be as addScript,pt as areQualitiesExact,Ke as assertEmptyArray,g as assertNever,ze as assertNonNullable,Ge as assertNotEmptyArray,Fe as assertNullable,ut as assertQualityIsExact,ye as buffer,Ue as checkNever,wt as clearVideoElement,dt as cloneDeep,M as cloneDeepWith,fe as combine,Ie as debounce,$ as debounceFn,rt as detectEmbed,Re as devNull,bt as fillWithDefault,he as filter,xe as filterChanged,D as flattenObject,It as fromEvent,$e as getExponentialDelay,st as getHighestQuality,Pt as getPlayerId,Rt as getRangeAroundIndex,Lt as getTraceSubscriptionMethod,mt as getVideoQualityLabel,m as getWindow,kt as interpolate,Tt as interval,me as isBrowserWindow,nt as isHigher,ot as isHigherOrEqual,St as isIntersecting,q as isInvariantQuality,H as isLower,it as isLowerOrEqual,w as isNonNullable,k as isNullable,uo as isValidURL,wi as loadVKLangPack,_ as map,Oe as mapTo,Te as merge,E as noop,He as now,yt as observableFrom,Et as observeElementSize,Ee as once,we as pairwise,be as safeStorage,Pe as shareReplay,Ae as skip,Se as tap,ge as throttle,X as throttleFn,vr as timeCodeToString,ft as timeout,at as videoHeightToQuality,lt as videoQualityToHeight,ct as videoSizeToQuality};
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer-shared",
|
|
3
|
-
"version": "1.0.78-dev.
|
|
3
|
+
"version": "1.0.78-dev.e6e86083.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Shared code for vk.com videoplayer",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
7
7
|
"license": "GPL-3.0",
|
|
8
|
-
"main": "./esnext.cjs
|
|
8
|
+
"main": "./esnext.cjs",
|
|
9
9
|
"module": "./esnext.esm.js",
|
|
10
10
|
"types": "./types/index.d.ts",
|
|
11
11
|
"type": "module",
|
|
@@ -13,43 +13,43 @@
|
|
|
13
13
|
".": {
|
|
14
14
|
"types": "./types/index.d.ts",
|
|
15
15
|
"import": "./esnext.esm.js",
|
|
16
|
-
"require": "./esnext.cjs
|
|
16
|
+
"require": "./esnext.cjs"
|
|
17
17
|
},
|
|
18
18
|
"./evergreen": {
|
|
19
19
|
"types": "./types/index.d.ts",
|
|
20
20
|
"import": "./evergreen.esm.js",
|
|
21
|
-
"require": "./evergreen.cjs
|
|
21
|
+
"require": "./evergreen.cjs"
|
|
22
22
|
},
|
|
23
23
|
"./esnext": {
|
|
24
24
|
"types": "./types/index.d.ts",
|
|
25
25
|
"import": "./esnext.esm.js",
|
|
26
|
-
"require": "./esnext.cjs
|
|
26
|
+
"require": "./esnext.cjs"
|
|
27
27
|
},
|
|
28
28
|
"./es2024": {
|
|
29
29
|
"types": "./types/index.d.ts",
|
|
30
30
|
"import": "./es2024.esm.js",
|
|
31
|
-
"require": "./es2024.cjs
|
|
31
|
+
"require": "./es2024.cjs"
|
|
32
32
|
},
|
|
33
33
|
"./es2018": {
|
|
34
34
|
"types": "./types/index.d.ts",
|
|
35
35
|
"import": "./es2018.esm.js",
|
|
36
|
-
"require": "./es2018.cjs
|
|
36
|
+
"require": "./es2018.cjs"
|
|
37
37
|
},
|
|
38
38
|
"./es2015": {
|
|
39
39
|
"types": "./types/index.d.ts",
|
|
40
40
|
"import": "./es2015.esm.js",
|
|
41
|
-
"require": "./es2015.cjs
|
|
41
|
+
"require": "./es2015.cjs"
|
|
42
42
|
},
|
|
43
43
|
"./evergreen.esm.js": "./evergeen.esm.js",
|
|
44
44
|
"./esnext.esm.js": "./esnext.esm.js",
|
|
45
|
-
"./esnext.cjs
|
|
45
|
+
"./esnext.cjs": "./esnext.cjs",
|
|
46
46
|
"./es2018.esm.js": "./es2018.esm.js",
|
|
47
|
-
"./es2018.cjs
|
|
47
|
+
"./es2018.cjs": "./es2018.cjs",
|
|
48
48
|
"./es2015.esm.js": "./es2015.esm.js",
|
|
49
|
-
"./es2015.cjs
|
|
49
|
+
"./es2015.cjs": "./es2015.cjs"
|
|
50
50
|
},
|
|
51
51
|
"files": [
|
|
52
|
-
"*.cjs
|
|
52
|
+
"*.cjs",
|
|
53
53
|
"*.esm.js",
|
|
54
54
|
"**/*.d.ts"
|
|
55
55
|
],
|
package/types/types/index.d.ts
CHANGED
|
@@ -58,3 +58,6 @@ export type RecursivePartial<T> = {
|
|
|
58
58
|
export type WithRequired<T, K extends keyof T> = T & {
|
|
59
59
|
[P in K]-?: T[P];
|
|
60
60
|
};
|
|
61
|
+
export type Constructor<T> = new () => T;
|
|
62
|
+
export type AbstractConstructor<T> = abstract new () => T;
|
|
63
|
+
export type AnyConstructor<T> = Constructor<T> | AbstractConstructor<T>;
|
package/types/utils/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type { IObservable
|
|
2
|
-
import {
|
|
1
|
+
import type { IObservable } from '../reactive';
|
|
2
|
+
import type { IRectangle } from '../types';
|
|
3
|
+
import type { Milliseconds } from './semanticTypes';
|
|
3
4
|
export declare const observeElementSize: (element: Element, throttleTime?: Milliseconds) => IObservable<IRectangle>;
|