@vkontakte/videoplayer-shared 1.0.86 → 1.0.87-beta.1
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 +4 -5
- package/es2015.esm.js +4 -5
- package/esnext.cjs +4 -5
- package/esnext.esm.js +4 -5
- package/evergreen.esm.js +4 -5
- package/package.json +1 -13
- package/types/__polyfills/array.d.ts +10 -0
- package/types/__polyfills/global.d.ts +1 -0
- package/types/__polyfills/index.es2015.d.ts +10 -0
- package/types/__polyfills/index.esnext.d.ts +3 -0
- package/types/__polyfills/index.evergreen.d.ts +1 -0
- package/types/__polyfills/object.d.ts +4 -0
- package/types/__polyfills/promise.d.ts +32 -0
- package/types/__polyfills/runtime/abortableFetch.d.ts +4 -0
- package/types/__polyfills/runtime/at.d.ts +1 -0
- package/types/__polyfills/runtime/idleCallback.d.ts +3 -0
- package/types/__polyfills/runtime/includes.d.ts +1 -0
- package/types/__polyfills/runtime/url.canParse.d.ts +3 -0
- package/types/__polyfills/runtime/window.d.ts +1 -0
- package/types/__polyfills/string.d.ts +9 -0
- package/types/index.d.ts +2 -0
- package/types/reactive/types.d.ts +7 -1
- package/es2018.cjs +0 -7
- package/es2018.esm.js +0 -7
- package/es2024.cjs +0 -7
- package/es2024.esm.js +0 -7
package/es2015.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-shared v1.0.
|
|
3
|
-
*
|
|
4
|
-
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-
|
|
2
|
+
* @vkontakte/videoplayer-shared v1.0.87-beta.1
|
|
3
|
+
* Fri, 03 Apr 2026 11:56:50 GMT
|
|
4
|
+
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-87/doc/
|
|
5
5
|
*/
|
|
6
|
-
var e=require(`@oxc-project/runtime/helpers/defineProperty`),t=require(`@oxc-project/runtime/helpers/objectSpread2`),n=require(`@oxc-project/runtime/helpers/asyncToGenerator`),r=Object.create,i=Object.getPrototypeOf,a=Object.defineProperty,o=Object.getOwnPropertyNames,s=Object.getOwnPropertyDescriptor,c=Object.prototype.hasOwnProperty;function l(e){return this[e]}var u,d,f=(e,t,n)=>{var s=typeof e==`object`&&!!e;if(s){var f=t?u??=new WeakMap:d??=new WeakMap,p=f.get(e);if(p)return p}n=e==null?{}:r(i(e));let m=t||!e||!e.__esModule?a(n,`default`,{value:e,enumerable:!0}):n;for(let t of o(e))c.call(m,t)||a(m,t,{get:l.bind(e,t),enumerable:!0});return s&&f.set(e,m),m},p=e=>{var t=(m??=new WeakMap).get(e),n;if(t)return t;if(t=a({},`__esModule`,{value:!0}),e&&typeof e==`object`||typeof e==`function`)for(var r of o(e))c.call(t,r)||a(t,r,{get:l.bind(e,r),enumerable:!(n=s(e,r))||n.enumerable});return m.set(e,t),t},m,h=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),g=e=>e;function _(e,t){this[e]=g.bind(null,t)}var v=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0,configurable:!0,set:_.bind(t,n)})},y=h((e,t)=>{var n=function(e){return e&&e.Math===Math&&e};t.exports=n(typeof globalThis==`object`&&globalThis)||n(typeof window==`object`&&window)||n(typeof self==`object`&&self)||n(typeof global==`object`&&global)||n(typeof e==`object`&&e)||function(){return this}()||Function(`return this`)()}),b=h((e,t)=>{t.exports=function(e){try{return!!e()}catch{return!0}}}),x=h((e,t)=>{t.exports=!b()(function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})}),S=h((e,t)=>{var n=x(),r=Function.prototype,i=r.apply,a=r.call;t.exports=typeof Reflect==`object`&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})}),C=h((e,t)=>{var n=x(),r=Function.prototype,i=r.call,a=n&&r.bind.bind(i,i);t.exports=n?a:function(e){return function(){return i.apply(e,arguments)}}}),w=h((e,t)=>{var n=C(),r=n({}.toString),i=n(``.slice);t.exports=function(e){return i(r(e),8,-1)}}),T=h((e,t)=>{var n=w(),r=C();t.exports=function(e){if(n(e)===`Function`)return r(e)}}),E=h((e,t)=>{var n=typeof document==`object`&&document.all;t.exports=n===void 0&&n!==void 0?function(e){return typeof e==`function`||e===n}:function(e){return typeof e==`function`}}),D=h((e,t)=>{t.exports=!b()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})}),O=h((e,t)=>{var n=x(),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}}),k=h(e=>{var t={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor;e.f=n&&!t.call({1:2},1)?function(e){var t=n(this,e);return!!t&&t.enumerable}:t}),A=h((e,t)=>{t.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}}),j=h((e,t)=>{var n=C(),r=b(),i=w(),a=Object,o=n(``.split);t.exports=r(function(){return!a(`z`).propertyIsEnumerable(0)})?function(e){return i(e)===`String`?o(e,``):a(e)}:a}),M=h((e,t)=>{t.exports=function(e){return e==null}}),ee=h((e,t)=>{var n=M(),r=TypeError;t.exports=function(e){if(n(e))throw new r(`Can't call method on `+e);return e}}),N=h((e,t)=>{var n=j(),r=ee();t.exports=function(e){return n(r(e))}}),P=h((e,t)=>{var n=E();t.exports=function(e){return typeof e==`object`?e!==null:n(e)}}),F=h((e,t)=>{t.exports={}}),te=h((e,t)=>{var n=F(),r=y(),i=E(),a=function(e){return i(e)?e:void 0};t.exports=function(e,t){return arguments.length<2?a(n[e])||a(r[e]):n[e]&&n[e][t]||r[e]&&r[e][t]}}),ne=h((e,t)=>{t.exports=C()({}.isPrototypeOf)}),re=h((e,t)=>{var n=y().navigator,r=n&&n.userAgent;t.exports=r?String(r):``}),ie=h((e,t)=>{var n=y(),r=re(),i=n.process,a=n.Deno,o=i&&i.versions||a&&a.version,s=o&&o.v8,c,l;s&&(c=s.split(`.`),l=c[0]>0&&c[0]<4?1:+(c[0]+c[1])),!l&&r&&(c=r.match(/Edge\/(\d+)/),(!c||c[1]>=74)&&(c=r.match(/Chrome\/(\d+)/),c&&(l=+c[1]))),t.exports=l}),ae=h((e,t)=>{var n=ie(),r=b(),i=y().String;t.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol(`symbol detection`);return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})}),oe=h((e,t)=>{t.exports=ae()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`}),se=h((e,t)=>{var n=te(),r=E(),i=ne(),a=oe(),o=Object;t.exports=a?function(e){return typeof e==`symbol`}:function(e){var t=n(`Symbol`);return r(t)&&i(t.prototype,o(e))}}),ce=h((e,t)=>{var n=String;t.exports=function(e){try{return n(e)}catch{return`Object`}}}),le=h((e,t)=>{var n=E(),r=ce(),i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not a function`)}}),ue=h((e,t)=>{var n=le(),r=M();t.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}}),de=h((e,t)=>{var n=O(),r=E(),i=P(),a=TypeError;t.exports=function(e,t){var o,s;if(t===`string`&&r(o=e.toString)&&!i(s=n(o,e))||r(o=e.valueOf)&&!i(s=n(o,e))||t!==`string`&&r(o=e.toString)&&!i(s=n(o,e)))return s;throw new a(`Can't convert object to primitive value`)}}),fe=h((e,t)=>{t.exports=!0}),pe=h((e,t)=>{var n=y(),r=Object.defineProperty;t.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch{n[e]=t}return t}}),me=h((e,t)=>{var n=fe(),r=y(),i=pe(),a=`__core-js_shared__`,o=t.exports=r[a]||i(a,{});(o.versions||=[]).push({version:`3.43.0`,mode:n?`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`})}),he=h((e,t)=>{var n=me();t.exports=function(e,t){return n[e]||(n[e]=t||{})}}),ge=h((e,t)=>{var n=ee(),r=Object;t.exports=function(e){return r(n(e))}}),I=h((e,t)=>{var n=C(),r=ge(),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return i(r(e),t)}}),_e=h((e,t)=>{var n=C(),r=0,i=Math.random(),a=n(1.1.toString);t.exports=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+a(++r+i,36)}}),L=h((e,t)=>{var n=y(),r=he(),i=I(),a=_e(),o=ae(),s=oe(),c=n.Symbol,l=r(`wks`),u=s?c.for||c:c&&c.withoutSetter||a;t.exports=function(e){return i(l,e)||(l[e]=o&&i(c,e)?c[e]:u(`Symbol.`+e)),l[e]}}),ve=h((e,t)=>{var n=O(),r=P(),i=se(),a=ue(),o=de(),s=L(),c=TypeError,l=s(`toPrimitive`);t.exports=function(e,t){if(!r(e)||i(e))return e;var s=a(e,l),u;if(s){if(t===void 0&&(t=`default`),u=n(s,e,t),!r(u)||i(u))return u;throw new c(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),o(e,t)}}),ye=h((e,t)=>{var n=ve(),r=se();t.exports=function(e){var t=n(e,`string`);return r(t)?t:t+``}}),be=h((e,t)=>{var n=y(),r=P(),i=n.document,a=r(i)&&r(i.createElement);t.exports=function(e){return a?i.createElement(e):{}}}),xe=h((e,t)=>{var n=D(),r=b(),i=be();t.exports=!n&&!r(function(){return Object.defineProperty(i(`div`),`a`,{get:function(){return 7}}).a!==7})}),Se=h(e=>{var t=D(),n=O(),r=k(),i=A(),a=N(),o=ye(),s=I(),c=xe(),l=Object.getOwnPropertyDescriptor;e.f=t?l:function(e,t){if(e=a(e),t=o(t),c)try{return l(e,t)}catch{}if(s(e,t))return i(!n(r.f,e,t),e[t])}}),Ce=h((e,t)=>{var n=b(),r=E(),i=/#|\.prototype\./,a=function(e,t){var i=s[o(e)];return i===l?!0:i===c?!1:r(t)?n(t):!!t},o=a.normalize=function(e){return String(e).replace(i,`.`).toLowerCase()},s=a.data={},c=a.NATIVE=`N`,l=a.POLYFILL=`P`;t.exports=a}),we=h((e,t)=>{var n=T(),r=le(),i=x(),a=n(n.bind);t.exports=function(e,t){return r(e),t===void 0?e:i?a(e,t):function(){return e.apply(t,arguments)}}}),Te=h((e,t)=>{var n=D(),r=b();t.exports=n&&r(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42})}),R=h((e,t)=>{var n=P(),r=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not an object`)}}),Ee=h(e=>{var t=D(),n=xe(),r=Te(),i=R(),a=ye(),o=TypeError,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=`enumerable`,u=`configurable`,d=`writable`;e.f=t?r?function(e,t,n){if(i(e),t=a(t),i(n),typeof e==`function`&&t===`prototype`&&`value`in n&&d in n&&!n[d]){var r=c(e,t);r&&r[d]&&(e[t]=n.value,n={configurable:u in n?n[u]:r[u],enumerable:l in n?n[l]:r[l],writable:!1})}return s(e,t,n)}:s:function(e,t,r){if(i(e),t=a(t),i(r),n)try{return s(e,t,r)}catch{}if(`get`in r||`set`in r)throw new o(`Accessors not supported`);return`value`in r&&(e[t]=r.value),e}}),De=h((e,t)=>{var n=D(),r=Ee(),i=A();t.exports=n?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}}),z=h((e,t)=>{var n=y(),r=S(),i=T(),a=E(),o=Se().f,s=Ce(),c=F(),l=we(),u=De(),d=I();me();var f=function(e){var t=function(n,i,a){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,i)}return new e(n,i,a)}return r(e,this,arguments)};return t.prototype=e.prototype,t};t.exports=function(e,t){var r=e.target,p=e.global,m=e.stat,h=e.proto,g=p?n:m?n[r]:n[r]&&n[r].prototype,_=p?c:c[r]||u(c,r,{})[r],v=_.prototype,y,b,x,S,C,w,T,E,D;for(S in t)y=s(p?S:r+(m?`.`:`#`)+S,e.forced),b=!y&&g&&d(g,S),w=_[S],b&&(e.dontCallGetSet?(D=o(g,S),T=D&&D.value):T=g[S]),C=b&&T?T:t[S],!(!y&&!h&&typeof w==typeof C)&&(E=e.bind&&b?l(C,n):e.wrap&&b?f(C):h&&a(C)?i(C):C,(e.sham||C&&C.sham||w&&w.sham)&&u(E,`sham`,!0),u(_,S,E),h&&(x=r+`Prototype`,d(c,x)||u(c,x,{}),u(c[x],S,C),e.real&&v&&(y||!v[S])&&u(v,S,C)))}}),Oe=h((e,t)=>{var n=he(),r=_e(),i=n(`keys`);t.exports=function(e){return i[e]||(i[e]=r(e))}}),ke=h((e,t)=>{t.exports=!b()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})}),Ae=h((e,t)=>{var n=I(),r=E(),i=ge(),a=Oe(),o=ke(),s=a(`IE_PROTO`),c=Object,l=c.prototype;t.exports=o?c.getPrototypeOf:function(e){var t=i(e);if(n(t,s))return t[s];var a=t.constructor;return r(a)&&t instanceof a?a.prototype:t instanceof c?l:null}}),je=h((e,t)=>{var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(e){var t=+e;return(t>0?r:n)(t)}}),Me=h((e,t)=>{var n=je();t.exports=function(e){var t=+e;return t!==t||t===0?0:n(t)}}),Ne=h((e,t)=>{var n=Me(),r=Math.max,i=Math.min;t.exports=function(e,t){var a=n(e);return a<0?r(a+t,0):i(a,t)}}),Pe=h((e,t)=>{var n=Me(),r=Math.min;t.exports=function(e){var t=n(e);return t>0?r(t,9007199254740991):0}}),Fe=h((e,t)=>{var n=Pe();t.exports=function(e){return n(e.length)}}),Ie=h((e,t)=>{var n=N(),r=Ne(),i=Fe(),a=function(e){return function(t,a,o){var s=n(t),c=i(s);if(c===0)return!e&&-1;var l=r(o,c),u;if(e&&a!==a){for(;c>l;)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((e||l in s)&&s[l]===a)return e||l||0;return!e&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}}),Le=h((e,t)=>{t.exports={}}),Re=h((e,t)=>{var n=C(),r=I(),i=N(),a=Ie().indexOf,o=Le(),s=n([].push);t.exports=function(e,t){var n=i(e),c=0,l=[],u;for(u in n)!r(o,u)&&r(n,u)&&s(l,u);for(;t.length>c;)r(n,u=t[c++])&&(~a(l,u)||s(l,u));return l}}),ze=h((e,t)=>{t.exports=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`]}),Be=h((e,t)=>{var n=Re(),r=ze();t.exports=Object.keys||function(e){return n(e,r)}}),Ve=h((e,t)=>{var n=D(),r=b(),i=C(),a=Ae(),o=Be(),s=N(),c=k().f,l=i(c),u=i([].push),d=n&&r(function(){var e=Object.create(null);return e[2]=2,!l(e,2)}),f=function(e){return function(t){for(var r=s(t),i=o(r),c=d&&a(r)===null,f=i.length,p=0,m=[],h;f>p;)h=i[p++],(!n||(c?h in r:l(r,h)))&&u(m,e?[h,r[h]]:r[h]);return m}};t.exports={entries:f(!0),values:f(!1)}}),He=h(()=>{var e=z(),t=Ve().entries;e({target:`Object`,stat:!0},{entries:function(e){return t(e)}})}),Ue=h((e,t)=>{He(),t.exports=F().Object.entries}),We=h((e,t)=>{t.exports=Ue()}),Ge=h((e,t)=>{t.exports=We()}),Ke=h((e,t)=>{t.exports=function(){}}),B=h((e,t)=>{t.exports={}}),qe=h((e,t)=>{var n=y(),r=E(),i=n.WeakMap;t.exports=r(i)&&/native code/.test(String(i))}),Je=h((e,t)=>{var n=qe(),r=y(),i=P(),a=De(),o=I(),s=me(),c=Oe(),l=Le(),u=`Object already initialized`,d=r.TypeError,f=r.WeakMap,p,m,h,g=function(e){return h(e)?m(e):p(e,{})},_=function(e){return function(t){var n;if(!i(t)||(n=m(t)).type!==e)throw new d(`Incompatible receiver, `+e+` required`);return n}};n||s.state?(v=s.state||=new f,v.get=v.get,v.has=v.has,v.set=v.set,p=function(e,t){if(v.has(e))throw new d(u);return t.facade=e,v.set(e,t),t},m=function(e){return v.get(e)||{}},h=function(e){return v.has(e)}):(b=c(`state`),l[b]=!0,p=function(e,t){if(o(e,b))throw new d(u);return t.facade=e,a(e,b,t),t},m=function(e){return o(e,b)?e[b]:{}},h=function(e){return o(e,b)});var v,b;t.exports={set:p,get:m,has:h,enforce:g,getterFor:_}}),Ye=h((e,t)=>{var n=D(),r=I(),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,o=r(i,`name`);t.exports={EXISTS:o,PROPER:o&&function(){}.name===`something`,CONFIGURABLE:o&&(!n||n&&a(i,`name`).configurable)}}),Xe=h(e=>{var t=D(),n=Te(),r=Ee(),i=R(),a=N(),o=Be();e.f=t&&!n?Object.defineProperties:function(e,t){i(e);for(var n=a(t),s=o(t),c=s.length,l=0,u;c>l;)r.f(e,u=s[l++],n[u]);return e}}),Ze=h((e,t)=>{t.exports=te()(`document`,`documentElement`)}),Qe=h((e,t)=>{var n=R(),r=Xe(),i=ze(),a=Le(),o=Ze(),s=be(),c=Oe(),l=`>`,u=`<`,d=`prototype`,f=`script`,p=c(`IE_PROTO`),m=function(){},h=function(e){return u+f+l+e+u+`/`+f+l},g=function(e){e.write(h(``)),e.close();var t=e.parentWindow.Object;return e=null,t},_=function(){var e=s(`iframe`),t=`java`+f+`:`,n;return e.style.display=`none`,o.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(h(`document.F=Object`)),n.close(),n.F},v,y=function(){try{v=new ActiveXObject(`htmlfile`)}catch{}y=typeof document<`u`?document.domain&&v?g(v):_():g(v);for(var e=i.length;e--;)delete y[d][i[e]];return y()};a[p]=!0,t.exports=Object.create||function(e,t){var i;return e===null?i=y():(m[d]=n(e),i=new m,m[d]=null,i[p]=e),t===void 0?i:r.f(i,t)}}),$e=h((e,t)=>{var n=De();t.exports=function(e,t,r,i){return i&&i.enumerable?e[t]=r:n(e,t,r),e}}),et=h((e,t)=>{var n=b(),r=E(),i=P(),a=Qe(),o=Ae(),s=$e(),c=L(),l=fe(),u=c(`iterator`),d=!1,f,p,m;[].keys&&(m=[].keys(),`next`in m?(p=o(o(m)),p!==Object.prototype&&(f=p)):d=!0),!i(f)||n(function(){var e={};return f[u].call(e)!==e})?f={}:l&&(f=a(f)),r(f[u])||s(f,u,function(){return this}),t.exports={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:d}}),tt=h((e,t)=>{var n=L()(`toStringTag`),r={};r[n]=`z`,t.exports=String(r)===`[object z]`}),nt=h((e,t)=>{var n=tt(),r=E(),i=w(),a=L()(`toStringTag`),o=Object,s=i(function(){return arguments}())===`Arguments`,c=function(e,t){try{return e[t]}catch{}};t.exports=n?i:function(e){var t,n,l;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=c(t=o(e),a))==`string`?n:s?i(t):(l=i(t))===`Object`&&r(t.callee)?`Arguments`:l}}),rt=h((e,t)=>{var n=tt(),r=nt();t.exports=n?{}.toString:function(){return`[object `+r(this)+`]`}}),it=h((e,t)=>{var n=tt(),r=Ee().f,i=De(),a=I(),o=rt(),s=L()(`toStringTag`);t.exports=function(e,t,c,l){var u=c?e:e&&e.prototype;u&&(a(u,s)||r(u,s,{configurable:!0,value:t}),l&&!n&&i(u,`toString`,o))}}),at=h((e,t)=>{var n=et().IteratorPrototype,r=Qe(),i=A(),a=it(),o=B(),s=function(){return this};t.exports=function(e,t,c,l){var u=t+` Iterator`;return e.prototype=r(n,{next:i(+!l,c)}),a(e,u,!1,!0),o[u]=s,e}}),ot=h((e,t)=>{var n=C(),r=le();t.exports=function(e,t,i){try{return n(r(Object.getOwnPropertyDescriptor(e,t)[i]))}catch{}}}),st=h((e,t)=>{var n=P();t.exports=function(e){return n(e)||e===null}}),ct=h((e,t)=>{var n=st(),r=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(`Can't set `+r(e)+` as a prototype`)}}),lt=h((e,t)=>{var n=ot(),r=P(),i=ee(),a=ct();t.exports=Object.setPrototypeOf||(`__proto__`in{}?function(){var e=!1,t={},o;try{o=n(Object.prototype,`__proto__`,`set`),o(t,[]),e=t instanceof Array}catch{}return function(t,n){return i(t),a(n),r(t)&&(e?o(t,n):t.__proto__=n),t}}():void 0)}),ut=h((e,t)=>{var n=z(),r=O(),i=fe(),a=Ye(),o=E(),s=at(),c=Ae(),l=lt(),u=it(),d=De(),f=$e(),p=L(),m=B(),h=et(),g=a.PROPER,_=a.CONFIGURABLE,v=h.IteratorPrototype,y=h.BUGGY_SAFARI_ITERATORS,b=p(`iterator`),x=`keys`,S=`values`,C=`entries`,w=function(){return this};t.exports=function(e,t,a,p,h,T,E){s(a,t,p);var D=function(e){if(e===h&&M)return M;if(!y&&e&&e in A)return A[e];switch(e){case x:return function(){return new a(this,e)};case S:return function(){return new a(this,e)};case C:return function(){return new a(this,e)}}return function(){return new a(this)}},O=t+` Iterator`,k=!1,A=e.prototype,j=A[b]||A[`@@iterator`]||h&&A[h],M=!y&&j||D(h),ee=t===`Array`&&A.entries||j,N,P,F;if(ee&&(N=c(ee.call(new e)),N!==Object.prototype&&N.next&&(!i&&c(N)!==v&&(l?l(N,v):o(N[b])||f(N,b,w)),u(N,O,!0,!0),i&&(m[O]=w))),g&&h===S&&j&&j.name!==S&&(!i&&_?d(A,`name`,S):(k=!0,M=function(){return r(j,this)})),h)if(P={values:D(S),keys:T?M:D(x),entries:D(C)},E)for(F in P)(y||k||!(F in A))&&f(A,F,P[F]);else n({target:t,proto:!0,forced:y||k},P);return(!i||E)&&A[b]!==M&&f(A,b,M,{name:h}),m[t]=M,P}}),dt=h((e,t)=>{t.exports=function(e,t){return{value:e,done:t}}}),ft=h((e,t)=>{var n=N(),r=Ke(),i=B(),a=Je(),o=Ee().f,s=ut(),c=dt(),l=fe(),u=D(),d=`Array Iterator`,f=a.set,p=a.getterFor(d);t.exports=s(Array,`Array`,function(e,t){f(this,{type:d,target:n(e),index:0,kind:t})},function(){var e=p(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case`keys`:return c(n,!1);case`values`:return c(t[n],!1)}return c([n,t[n]],!1)},`values`);var m=i.Arguments=i.Array;if(r(`keys`),r(`values`),r(`entries`),!l&&u&&m.name!==`values`)try{o(m,`name`,{value:`values`})}catch{}}),pt=h((e,t)=>{var n=L(),r=B(),i=n(`iterator`),a=Array.prototype;t.exports=function(e){return e!==void 0&&(r.Array===e||a[i]===e)}}),mt=h((e,t)=>{var n=nt(),r=ue(),i=M(),a=B(),o=L()(`iterator`);t.exports=function(e){if(!i(e))return r(e,o)||r(e,`@@iterator`)||a[n(e)]}}),ht=h((e,t)=>{var n=O(),r=le(),i=R(),a=ce(),o=mt(),s=TypeError;t.exports=function(e,t){var c=arguments.length<2?o(e):t;if(r(c))return i(n(c,e));throw new s(a(e)+` is not iterable`)}}),gt=h((e,t)=>{var n=O(),r=R(),i=ue();t.exports=function(e,t,a){var o,s;r(e);try{if(o=i(e,`return`),!o){if(t===`throw`)throw a;return a}o=n(o,e)}catch(e){s=!0,o=e}if(t===`throw`)throw a;if(s)throw o;return r(o),a}}),_t=h((e,t)=>{var n=we(),r=O(),i=R(),a=ce(),o=pt(),s=Fe(),c=ne(),l=ht(),u=mt(),d=gt(),f=TypeError,p=function(e,t){this.stopped=e,this.result=t},m=p.prototype;t.exports=function(e,t,h){var g=h&&h.that,_=!!(h&&h.AS_ENTRIES),v=!!(h&&h.IS_RECORD),y=!!(h&&h.IS_ITERATOR),b=!!(h&&h.INTERRUPTED),x=n(t,g),S,C,w,T,E,D,O,k=function(e){return S&&d(S,`normal`),new p(!0,e)},A=function(e){return _?(i(e),b?x(e[0],e[1],k):x(e[0],e[1])):b?x(e,k):x(e)};if(v)S=e.iterator;else if(y)S=e;else{if(C=u(e),!C)throw new f(a(e)+` is not iterable`);if(o(C)){for(w=0,T=s(e);T>w;w++)if(E=A(e[w]),E&&c(m,E))return E;return new p(!1)}S=l(e,C)}for(D=v?e.next:S.next;!(O=r(D,S)).done;){try{E=A(O.value)}catch(e){d(S,`throw`,e)}if(typeof E==`object`&&E&&c(m,E))return E}return new p(!1)}}),vt=h((e,t)=>{var n=D(),r=Ee(),i=A();t.exports=function(e,t,a){n?r.f(e,t,i(0,a)):e[t]=a}}),yt=h(()=>{var e=z(),t=_t(),n=vt();e({target:`Object`,stat:!0},{fromEntries:function(e){var r={};return t(e,function(e,t){n(r,e,t)},{AS_ENTRIES:!0}),r}})}),bt=h((e,t)=>{ft(),yt(),t.exports=F().Object.fromEntries}),xt=h((e,t)=>{t.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}}),St=h(()=>{ft();var e=xt(),t=y(),n=it(),r=B();for(i in e)n(t[i],i),r[i]=r.Array;var i}),Ct=h((e,t)=>{var n=bt();St(),t.exports=n}),wt=h((e,t)=>{t.exports=Ct()}),Tt=h(()=>{var e=z(),t=y();e({global:!0,forced:t.globalThis!==t},{globalThis:t})}),Et=h((e,t)=>{Tt(),t.exports=y()}),Dt=h((e,t)=>{t.exports=Et()}),Ot=h((e,t)=>{t.exports=Dt()}),kt=h(()=>{var e=z(),t=ge(),n=Fe(),r=Me(),i=Ke();e({target:`Array`,proto:!0},{at:function(e){var i=t(this),a=n(i),o=r(e),s=o>=0?o:a+o;return s<0||s>=a?void 0:i[s]}}),i(`at`)}),At=h((e,t)=>{t.exports=te()}),jt=h((e,t)=>{kt(),t.exports=At()(`Array`,`at`)}),Mt=h((e,t)=>{t.exports=jt()}),Nt=h((e,t)=>{t.exports=Mt()}),Pt=h(()=>{var e=z(),t=Ie().includes,n=b(),r=Ke();e({target:`Array`,proto:!0,forced:n(function(){return![,].includes()})},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r(`includes`)}),Ft=h((e,t)=>{Pt(),t.exports=At()(`Array`,`includes`)}),It=h((e,t)=>{t.exports=Ft()}),Lt=h((e,t)=>{t.exports=It()}),Rt={};v(Rt,{withoutNullable:()=>Zt,videoSizeToQuality:()=>Dn,videoQualityToHeight:()=>On,videoHeightToQuality:()=>En,timeout:()=>Wn,timeCodeToString:()=>Pn,throttleFn:()=>In,throttle:()=>tr,tap:()=>_r,suppressAbort:()=>Nr,skip:()=>yr,shareReplay:()=>xr,safeStorage:()=>cn,pairwise:()=>hr,once:()=>mr,observeElementSize:()=>Cr,observableFrom:()=>Kn,nowInt:()=>an,now:()=>rn,noop:()=>Vt,merge:()=>Un,mapTo:()=>pr,map:()=>dr,loadVKLangPack:()=>ni,isValidURL:()=>Er,isNullable:()=>Xt,isNonNullable:()=>W,isLowerOrEqual:()=>Cn,isLower:()=>Sn,isInvariantQuality:()=>kn,isIntersecting:()=>Dr,isHigherOrEqual:()=>xn,isHigher:()=>bn,isBrowserWindow:()=>tn,isAbortError:()=>Mr,interval:()=>Gn,interpolate:()=>Ar,getWindow:()=>G,getVideoQualityLabel:()=>Mn,getTraceSubscriptionMethod:()=>Pr,getRangeAroundIndex:()=>jr,getPlayerId:()=>kr,getHighestQuality:()=>wn,getExponentialDelay:()=>sn,fromEvent:()=>qn,flattenObject:()=>wr,filterChanged:()=>cr,filter:()=>rr,fillWithDefault:()=>Nn,devNull:()=>si,detectEmbed:()=>vn,debounceFn:()=>Fn,debounce:()=>Qn,combine:()=>Hn,cloneDeepWith:()=>Ln,cloneDeep:()=>Rn,clearVideoElement:()=>Tr,checkNever:()=>Bt,buffer:()=>Yn,assertQualityIsExact:()=>jn,assertNullable:()=>Yt,assertNotEmptyArray:()=>Qt,assertNonNullable:()=>Jt,assertNever:()=>H,assertEmptyArray:()=>$t,areQualitiesExact:()=>An,addScript:()=>nn,abortable:()=>on,VideoQuality:()=>yn,ValueSubject:()=>Bn,VKNumericLanguage:()=>ei,VERSION:()=>zt,TracerFactory:()=>Rr,SubscriptionRemovable:()=>Jn,Subscription:()=>V,Subject:()=>Wt,ReplaySubject:()=>zn,Observable:()=>U,Logger:()=>Gt,InternalsExposure:()=>oi,InterfaceLanguage:()=>ai,INTERNAL_EXPOSE_GLOBAL_KEY:()=>Q,ErrorCategory:()=>zr,AppTracer:()=>$}),module.exports=p(Rt);var zt=`1.0.86`;class V{constructor(){e(this,`subscriptions`,[])}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(e=>{typeof e==`function`?e():e.unsubscribe()})}add(e){return this.subscriptions.push(e),this}}var H=e=>{throw Error(`${e} is value of unexpected type`)},Bt=e=>{},Vt=()=>{},Ht=e=>{throw console.error(e),e},Ut=e=>{console.error(e)};class U{constructor(t){e(this,`suppressErrors`,!1),t&&(this._subscribe=t)}setSuppressErrors(e){this.suppressErrors=e}subscribe(e,t){let n=this.suppressErrors?Ut:Ht,r;r=t?typeof t==`function`?{next:t,error:Vt}:{next:e=>t.next(e),error:e=>t.error?.call(t,e)}:{next:n,error:Vt};let i=typeof e==`function`?{next:t=>{try{let n=e(t);n instanceof Promise&&n.catch(e=>r.next(e))}catch(e){r.next(e)}},error:e=>r.next(e)}:{next:t=>e.next(t),error:t=>e.error?e.error(t):r.next(t)},a;try{a=this._subscribe(i)}catch(e){i.error?.call(i,e)}return new V().add(()=>{switch(i.next=Vt,i.error=Vt,typeof a){case`function`:a();return;case`object`:a.unsubscribe();return;case`undefined`:return;default:return H(a)}})}pipe(...e){return e.reduce((e,t)=>t(e),this)}_subscribe(e){}}class Wt extends U{constructor(){super(),e(this,`keyCounter`,0),e(this,`subscribers`,new Map)}next(e){this.subscribers.forEach(t=>t.next(e))}error(e){this.subscribers.forEach(t=>t.error?.call(t,e))}_subscribe(e){let t=this.keyCounter++;return this.subscribers.set(t,e),new V().add(()=>this.subscribers.delete(t))}}class Gt{constructor(){e(this,`log$`,new Wt),e(this,`logs`,[]),e(this,`log`,e=>{let n=t(t({},e),{},{timestamp:Date.now()});this.logs.push(n),this.log$.next(n)}),e(this,`getAllLogs`,()=>this.logs)}createCustomLog(e){return(...t)=>{let n;try{n=e(...t)}catch{n={message:"error in `createCustomLog`",component:`Logger`}}this.log(n)}}createComponentLog(e){return this.createCustomLog(n=>t({component:e},n))}}var Kt=f(Ge(),1),qt=f(wt(),1);function Jt(e,t=`Assertion "value is not nullable" failed`){if(e==null)throw Error(t)}function Yt(e,t=`Assertion "value is nullable" failed`){if(e!=null)throw Error(t)}function W(e){return e!=null}function Xt(e){return e==null}var Zt=e=>qt.default(Kt.default(e).filter(([e,t])=>W(t)));function Qt(e,t){if(!e?.length)throw Error(t)}function $t(e,t){if(e?.length)throw Error(t)}var en=f(Ot(),1),G=()=>en.default,tn=(e=G())=>!!(e.window&&e.screen),nn=(e,t,n)=>new Promise((r,i)=>{t.addEventListener(`abort`,()=>{s(),l.remove()});let a=()=>{s(),i(`error`)},o=()=>{s(),r()},s=()=>{c&&clearTimeout(c),l.removeEventListener(`load`,o),l.removeEventListener(`error`,a)},c;n&&(c=G().setTimeout(()=>{s(),i(`timeout`)},n));let l=document.createElement(`script`);l.addEventListener(`load`,o),l.addEventListener(`error`,a),l.src=e,document.head.appendChild(l)}),rn=typeof G().performance?.now==`function`?()=>G().performance.now():()=>Date.now(),an=()=>Math.trunc(rn()),on=(e,t)=>n(function*(...n){let r=t(...n),i=e.aborted,a;for(;!i&&!e.aborted;)try{let e=yield r.next(a);i=e.done??!1,a=e.value}catch(e){yield r.throw(e)}return a}),sn=(e,{start:t=0,factor:n=2,max:r=1/0,min:i=t,random:a=0}={})=>{let o=t;return o*=n**+e,o*=1+(Math.random()*a*2-a),o=Math.round(o),o=Math.min(o,r),o=Math.max(o,i),o},cn={};v(cn,{set:()=>fn,remove:()=>mn,isPersistent:()=>un,has:()=>pn,get:()=>dn,clear:()=>hn});var K,q,ln=`vk-videoplayer-dummy-key-${Math.random()}`,J=()=>{if(q!==void 0)return q;try{localStorage.setItem(ln,`test`),localStorage.removeItem(ln),q=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(ln),q=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)q=2;else throw e}else throw e}return q===2&&(K=new Map),q},un=()=>J()===0,dn=e=>{let t=J();switch(t){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return K?.get(e);default:H(t)}},fn=(e,t)=>{let n=J();switch(n){case 0:try{localStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 1:try{sessionStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 2:K?.set(e,t);return;default:H(n)}},pn=e=>{let t=J();switch(t){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return K?.has(e)??!1;default:return H(t),!1}},mn=e=>{let t=J();switch(t){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:K?.delete(e);return;default:H(t)}},hn=()=>{let e=J();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return K?.clear();default:H(e)}},gn=(e,t,n)=>{if(typeof e.canParse==`function`)return e.canParse(t,n);try{return new e(t,n),!0}catch{return!1}},_n=f(Nt(),1),vn=()=>{let e,t=[],n=G();try{e=n.self!==n.top}catch(t){t instanceof DOMException&&t.name===`SecurityError`?e=!0:(e=!1,console.error(t))}try{n.location?.ancestorOrigins&&(t=[...n.location.ancestorOrigins])}catch(e){console.error(e)}try{!t.length&&n.document.referrer&&(t=[new URL(n.document.referrer).origin])}catch(e){console.error(e)}return t=t.filter(e=>gn(URL,e)),{isEmbed:e,origins:t,topOrigin:_n.default(t,-1),immediateOrigin:_n.default(t,0)}},yn;(e=>{e.INVARIANT=`Invariant quality`,e.Q_144P=`144p`,e.Q_240P=`240p`,e.Q_360P=`360p`,e.Q_480P=`480p`,e.Q_576P=`576p`,e.Q_720P=`720p`,e.Q_1080P=`1080p`,e.Q_1440P=`1440p`,e.Q_2160P=`2160p`,e.Q_4320P=`4320p`})(yn||={});var Y={"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}},bn=(e,t)=>Y[e].height>Y[t].height,xn=(e,t)=>Y[e].height>=Y[t].height,Sn=(e,t)=>Y[e].height<Y[t].height,Cn=(e,t)=>Y[e].height<=Y[t].height,wn=e=>e.sort((e,t)=>e===t?0:e===`Invariant quality`?1:t===`Invariant quality`?-1:Sn(e,t)?1:-1)[0],Tn=Object.keys(Y).sort((e,t)=>Sn(e,t)?-1:1),En=(e,t=.02)=>[...Tn].find(n=>Y[n].height*(1+t)>=e),Dn=({width:e,height:t})=>{let n=Math.min(e,t),r=Math.max(e,t);return Tn.find(e=>{let t=Y[e];return t.width>=r&&t.height>=n})},On=e=>Y[e].height,kn=e=>e===`Invariant quality`,An=e=>e.every(e=>!kn(e));function jn(e){if(kn(e))throw Error(`Expected exact quality`)}var Mn=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``}},Nn=(e,t)=>{let n={};for(let r of Object.keys(t)){let i=t[r],a=e[r];Array.isArray(i)?n[r]=Array.isArray(a)?a:i:typeof i==`object`&&i?typeof a==`object`&&a&&!Array.isArray(a)?n[r]=Nn(a,i):n[r]=a??i:n[r]=r in e?a:i}return n},Pn=e=>{let t=``;return e>=3600&&(t+=Math.floor(e/3600)+`h`,e%=3600),e>=60&&(t+=Math.floor(e/60)+`m`,e%=60),e>0&&(t+=Math.floor(e)+`s`),t};function Fn(e,t=0,n){let r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0,p=!t&&t!==0&&typeof G().requestAnimationFrame==`function`;n&&(u=!!n.leading,d=`maxWait`in n,a=n?.maxWait?Math.max(+n?.maxWait||0,t):a,f=`trailing`in n?!!n.trailing:f);function m(t){let n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function h(e,t){return p?(s&&G().cancelAnimationFrame(s),G().requestAnimationFrame(e)):setTimeout(e,t)}function g(e){if(p){G().cancelAnimationFrame(e);return}clearTimeout(e)}function _(e){return l=e,s=h(b,t),u?m(e):o}function v(e){let n=e-c,r=e-l,i=t-n;return d?Math.min(i,a-r):i}function y(e){let n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function b(){let e=Date.now();if(y(e))return x(e);s=h(b,v(e))}function x(e){return s=void 0,f&&r?m(e):(r=i=void 0,o)}function S(){s!==void 0&&g(s),l=0,r=c=i=s=void 0}function C(){return s===void 0?o:x(Date.now())}function w(){return s!==void 0}function T(...e){let n=Date.now(),a=y(n);if(r=e,i=this,c=n,a){if(s===void 0)return _(c);if(d)return s=h(b,t),m(c)}return s===void 0&&(s=h(b,t)),o}return T.cancel=S,T.flush=C,T.pending=w,T}var In=(e,n=0,r)=>Fn(e,n,t(t(t({},{leading:!0,trailing:!0}),r),{},{maxWait:n})),Ln=(e,t)=>{if(typeof e!=`object`||!e)return e;let n=Array.isArray(e)?[]:{};for(let r in e){if(typeof t==`function`){let i=t(e[r],r,e,n);if(i!==void 0){n[r]=i;continue}}typeof e[r]==`object`?n[r]=Ln(e[r],t):n[r]=e[r]}return n},Rn=e=>Ln(e);class zn extends Wt{constructor(t){super(),e(this,`bufferSize`,void 0),e(this,`buffer`,[]),e(this,`cursorEnd`,-1),e(this,`cursorStart`,0),this.bufferSize=t,this.buffer=Array(t)}next(e){this.cursorEnd+=1,this.cursorStart=this.cursorEnd>=this.bufferSize?this.cursorStart+1:0,this.buffer[this.cursorEnd%this.bufferSize]=e,this.subscribers.forEach(t=>t.next(e))}_subscribe(e){for(let t=this.cursorStart;t<=this.cursorEnd;t++)e.next(this.buffer[t%this.bufferSize]);let t=this.keyCounter++;return this.subscribers.set(t,e),new V().add(()=>this.subscribers.delete(t))}}class Bn extends Wt{constructor(t){super(),e(this,`value`,void 0),this.value=t}next(e){super.next(this.value=e)}error(e){super.error(this.value=e)}getValue(){return this.value}_subscribe(e){let t=super._subscribe(e);return e.next(this.value),t}}var Vn=f(Ge(),1);function Hn(e){return new U(t=>{let n={},r=Object.keys(e).length,i=e=>i=>{e in n||r--,n[e]=i,r===0&&t.next(n)};return Vn.default(e).reduce((e,[t,n])=>e.add(n.subscribe(i(t))),new V)})}function Un(...e){return new U(t=>e.reduce((e,n)=>e.add(n.subscribe(t)),new V))}var Wn=e=>new U(t=>{let n=G().setTimeout(()=>{try{t.next()}catch(e){if(t.error)t.error(e);else throw e}},e);return()=>G().clearTimeout(n)}),Gn=e=>new U(t=>{let n=G(),r=n.setInterval(()=>t.next(),e);return()=>{r&&=(n.clearInterval(r),void 0)}}),Kn=e=>new U(t=>{e.forEach(e=>t.next(e))}),qn=(e,t)=>new U(n=>{let r=e=>n.next(e);return e.addEventListener(t,r),()=>e.removeEventListener(t,r)});class Jn extends V{remove(e){this.subscriptions=this.subscriptions.filter(t=>t!==e)}}function Yn(e){return t=>new U(n=>t.subscribe(new Xn(n,e)))}class Xn{constructor(t,n){e(this,`destination`,void 0),e(this,`size`,void 0),e(this,`lastValues`,[]),this.destination=t,this.size=n}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var t;(t=this.destination).error?.call(t,e)}}var Zn={leading:!1,trailing:!0};function Qn(e,t=Zn){return n=>new U(r=>n.subscribe(new $n(r,e,t)))}class $n{constructor(t,n,r){e(this,`destination`,void 0),e(this,`time`,void 0),e(this,`config`,void 0),e(this,`lastValue`,void 0),e(this,`timeout`,void 0),this.destination=t,this.time=n,this.config=r}next(e){this.lastValue=e;let t=G();W(this.timeout)?t.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=t.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(e){if(this.destination.error)this.destination.error(e);else throw e}this.timeout=void 0},this.time)}error(e){var t;(t=this.destination).error?.call(t,e)}}var er={leading:!0,trailing:!1};function tr(e,t=er){return n=>new U(r=>n.subscribe(new nr(r,e,t)))}class nr{constructor(t,n,r){e(this,`destination`,void 0),e(this,`time`,void 0),e(this,`config`,void 0),e(this,`lastValue`,void 0),e(this,`timeout`,void 0),this.destination=t,this.time=n,this.config=r}next(e){this.lastValue=e,Xt(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=G().setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){var t;(t=this.destination).error?.call(t,e)}}function rr(e){return t=>new U(n=>t.subscribe(new ir(n,e)))}class ir{constructor(t,n){e(this,`destination`,void 0),e(this,`predicate`,void 0),this.destination=t,this.predicate=n}next(e){let t;try{t=this.predicate(e)}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}var ar=f(Lt(),1),or=(e,t)=>{let n=(e,t)=>{let n=Object.keys(e);for(let r in t)if(!ar.default(n,r)||t[r]!==e[r])return!1;return!0};return n(e,t)&&n(t,e)},sr=(e,t)=>e instanceof Object&&t instanceof Object?or(e,t):e===t;function cr(e=sr){return t=>new U(n=>t.subscribe(new ur(n,e)))}var lr={};class ur{constructor(t,n){e(this,`destination`,void 0),e(this,`predicate`,void 0),e(this,`lastValue`,lr),this.destination=t,this.predicate=n}next(e){let n;try{n=this.lastValue===lr||!this.predicate(this.lastValue,e),this.lastValue=e instanceof Object&&!Array.isArray(e)?t({},e):e}catch(e){throw this.error(e),e}n&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function dr(e){return t=>new U(n=>t.subscribe(new fr(n,e)))}class fr{constructor(t,n){e(this,`destination`,void 0),e(this,`mapper`,void 0),this.destination=t,this.mapper=n}next(e){let t;try{t=this.mapper(e)}catch(e){throw this.error(e),e}this.destination.next(t)}error(e){var t;(t=this.destination).error?.call(t,e)}}function pr(e){return dr(()=>e)}function mr(){return e=>new U(t=>{let n=!1,r=!1,i=e.subscribe(e=>{n||(n=!0,t.next(e)),r&&i.unsubscribe()},e=>{n=!0,t.error?.call(t,e),r&&i.unsubscribe()});return r=!0,n&&i.unsubscribe(),i})}function hr(){return e=>new U(t=>e.subscribe(new gr(t)))}class gr{constructor(t){e(this,`destination`,void 0),e(this,`last`,void 0),e(this,`hasLast`,!1),this.destination=t}next(e){let t=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,e])}error(e){var t;(t=this.destination).error?.call(t,e)}}function _r(e){return t=>new U(n=>t.subscribe(new vr(n,e)))}class vr{constructor(t,n){e(this,`destination`,void 0),e(this,`effect`,void 0),this.destination=t,this.effect=n}next(e){try{this.effect(e)}catch(e){throw this.error(e),e}this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function yr(e){return t=>new U(n=>t.subscribe(new br(n,e)))}class br{constructor(t,n){if(e(this,`destination`,void 0),e(this,`count`,void 0),this.destination=t,this.count=n,n<0){var r;(r=this.destination).error?.call(r,Error(`Count can not be less than zero`))}}next(e){this.count===0?this.destination.next(e):this.count--}error(e){var t;(t=this.destination).error?.call(t,e)}}function xr(e=0){return t=>{let n=0,r=new zn(e),i=t.subscribe(r),a=e=>()=>{e.unsubscribe(),n--,n===0&&i.unsubscribe()};return new U(e=>(n++,a(r.subscribe(e))))}}var Sr=300,Cr=(e,t=Sr)=>new U(n=>{let r=G(),{width:i,height:a}=e.getBoundingClientRect();if(n.next({width:i,height:a}),!tn(r))return;let o=new r.ResizeObserver(In(e=>{let t=e[0];if(!t)return;let r,i;t.contentBoxSize&&t.contentBoxSize[0]?(i=t.contentBoxSize[0].blockSize,r=t.contentBoxSize[0].inlineSize):t.contentRect&&(r=t.contentRect.width,i=t.contentRect.height),W(r)&&W(i)&&n.next({width:r,height:i})},t));return o.observe(e),()=>o.disconnect()}),wr=(e,t=6,n=`.`)=>{let r={};for(let i in e)if(!(!e.hasOwnProperty(i)||e[i]instanceof HTMLElement||!t))if(typeof e[i]==`object`&&e[i]!==null){let a=wr(e[i],t-1);for(let e in a)a.hasOwnProperty(e)&&(r[i+n+e]=a[e])}else r[i]=e[i];return r},Tr=(e,t=!1)=>{t&&(e.innerHTML=``),e.removeAttribute(`src`),e.load()},Er=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol===`https:`},Dr=(e,t)=>!(e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom),Or=(()=>{let e=0;return()=>{let t=e;return e=(e+1)%(2**53-1),t}})(),kr=e=>e!==void 0&&e!==``?e:Or().toString();function Ar(e,t,n){if(e<=t[0])return n[0];if(e>=t[t.length-1])return n[n.length-1];let r=1;for(;r<t.length&&t[r]<e;)r++;r>=t.length&&(r=t.length-1);let i=t[r-1],a=t[r],o=n[r-1],s=n[r];return e===i?o:e===a?s:o+(e-i)/(a-i)*(s-o)}function jr(e,t,n){if(e<=0||n<0)return[];let r=[],i=Math.floor((e-1)/2),a=Math.floor(e/2),o=t-i,s=t+a;o<0&&(s+=Math.abs(o),o=0),s>n&&(o-=s-n,s=n),o=Math.max(0,o),s=Math.min(n,s);for(let e=o;e<=s;e++)r.push(e);return r}var Mr=e=>e instanceof DOMException&&(e.name===`AbortError`||e.code===20),Nr=e=>{if(!Mr(e))throw e},Pr=e=>t=>n=>{let r=typeof n==`object`;n==null||r&&!Object.keys(n).length||e(t,r?wr(n):{value:n})},Fr=(e={})=>{let t=e=>{let t=e;return e===void 0?t=`undefined`:e===null?t=`null`:(typeof e==`number`||typeof e==`boolean`)&&(t=e.toString()),t},n={};for(let r in e)Array.isArray(e[r])?n[r]=e[r].map(t):n[r]=t(e[r]);return n};class X{constructor({name:t,getParentContext:n}){e(this,`dynamicImportTimeout`,5e3),e(this,`span`,void 0),e(this,`context`,void 0),e(this,`childTracers`,[]),e(this,`initPromise`,void 0),X.dynamicImportStatus===`not_started`&&(X.dynamicImportPromise=this.loadOpentelemetry());let r=Date.now();this.initPromise=X.dynamicImportPromise.then(e=>{X.dynamicImportStatus===`completed`&&this.init({name:t,getParentContext:n},r)})}init({name:e,getParentContext:t},n){this.span=X.rootTracer.startSpan(e,{startTime:n},t?.()),this.context=X.dynamicImports.opentelemetryApi.trace.setSpan(X.dynamicImports.opentelemetryApi.context.active(),this.span)}loadOpentelemetry(){var e=this;return n(function*(){if(X.dynamicImportStatus===`not_started`){X.dynamicImportStatus=`in_progress`;try{let t=new Promise((t,n)=>setTimeout(n,e.dynamicImportTimeout)),n=Promise.all([import(`@opentelemetry/api`),import(`@opentelemetry/sdk-trace-web`),import(`@apptracer/opentelemetry`)]),[r,i,a]=yield Promise.race([n,t]);X.dynamicImports={opentelemetryApi:r,opentelemetrySdk:i,tracer:a},X.dynamicImportStatus=`completed`}catch{X.dynamicImportStatus=`failed`}}})()}isComponentTracerNotInitialized(){return Xt(this.span)||X.dynamicImportStatus===`failed`}log(e,n){let r=Date.now();this.initPromise.then(i=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,t(t({},Fr(n)),{},{type:`log`}),r)})}error(e,n){let r=Date.now();this.initPromise.then(i=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,t(t({},Fr(n)),{},{type:`error`}),r)})}critical(e,n){let r=Date.now();this.initPromise.then(i=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,t(t({},Fr(n)),{},{type:`critical`}),r)})}createComponentTracer(e){let t=new X({name:e,getParentContext:()=>this.context});return this.childTracers.push(t),t}end(){this.initPromise.then(e=>{this.isComponentTracerNotInitialized()||(this.childTracers.forEach(e=>e.end()),this.span.end())})}}e(X,`rootTracer`,void 0),e(X,`dynamicImportStatus`,`not_started`),e(X,`dynamicImports`,void 0),e(X,`dynamicImportPromise`,void 0);class Ir extends X{constructor(){super({name:`Root`}),e(this,`spanExporter`,void 0)}init({name:e,getParentContext:t},n){let r=X.dynamicImports.tracer.initTracerOpenTelemetry({serviceName:`videoplayer-sdk-web`,appToken:`L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb`,spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),i=new X.dynamicImports.tracer.TracerMemorySpanExporter;this.spanExporter=i,r.addSpanProcessor(new X.dynamicImports.tracer.TracerAllSpansProcessor({startedSpansExporter:i})),X.rootTracer=r.getTracer(`sdk-videoplayer-tracer`),super.init({name:e,getParentContext:t},n)}getFinishedSpans(){if(!this.isComponentTracerNotInitialized())return this.spanExporter?.getJsonData()}getTraceId(){return this.isComponentTracerNotInitialized()?``:this.span.spanContext().traceId}}class Lr{constructor(t){e(this,`fakeTraceId`,void 0)}log(e,t){}error(e,t){}critical(e,t){}createComponentTracer(e){return new Lr({name:e})}end(){}getFinishedSpans(){}getTraceId(){return this.fakeTraceId}}class Rr{static createRootTracer(e=!1){return e?new Ir:new Lr}}var zr;(e=>{e.NETWORK=`network`,e.VIDEO_PIPELINE=`video_pipeline`,e.EXTERNAL_API=`external_api`,e.PARSER=`parser`,e.DOM=`dom`,e.WTF=`wtf`,e.FATAL=`fatal`})(zr||={});var{NativeAbortSignal:Br,NativeAbortController:Vr}=function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}}(typeof self<`u`?self:global);function Hr(e){let t;try{t=new Event(`abort`)}catch{typeof document<`u`?document.createEvent?(t=document.createEvent(`Event`),t.initEvent(`abort`,!1,!1)):(t=document.createEventObject(),t.type=`abort`):t={type:`abort`,bubbles:!1,cancelable:!1}}return t.reason=e,t}function Ur(e){if(e===void 0)if(typeof document>`u`)e=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=Error(`This operation was aborted`),e.name=`AbortError`}return e}class Wr{constructor(){Object.defineProperty(this,`listeners`,{value:{},writable:!0,configurable:!0})}addEventListener(e,t,n){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:n})}removeEventListener(e,t){if(!(e in this.listeners))return;let n=this.listeners[e];for(let e=0,r=n.length;e<r;e++)if(n[e].callback===t){n.splice(e,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let t=this.listeners[e.type].slice();for(let n=0,r=t.length;n<r;n++){let r=t[n];try{r.callback.call(this,e)}catch(e){Promise.resolve().then(()=>{throw e})}r.options&&r.options.once&&this.removeEventListener(e.type,r.callback)}return!e.defaultPrevented}}class Gr extends Wr{constructor(){super(),this.listeners||Wr.call(this),Object.defineProperty(this,`aborted`,{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,`onabort`,{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,`reason`,{value:void 0,writable:!0,configurable:!0})}toString(){return`[object AbortSignal]`}dispatchEvent(e){e.type===`abort`&&(this.aborted=!0,typeof this.onabort==`function`&&this.onabort.call(this,e)),super.dispatchEvent(e)}throwIfAborted(){let{aborted:e,reason:t=`Aborted`}=this;if(e)throw t}static timeout(e){let t=new Kr;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,`TimeoutError`)),e),t.signal}static any(e){let t=new Kr;function n(){t.abort(this.reason),r()}function r(){for(let t of e)t.removeEventListener(`abort`,n)}for(let r of e)if(r.aborted){t.abort(r.reason);break}else r.addEventListener(`abort`,n);return t.signal}}class Kr{constructor(){Object.defineProperty(this,`signal`,{value:new Gr,writable:!0,configurable:!0})}abort(e){let t=Ur(e),n=Hr(t);this.signal.reason=t,this.signal.dispatchEvent(n)}toString(){return`[object AbortController]`}}typeof Symbol<`u`&&Symbol.toStringTag&&(Kr.prototype[Symbol.toStringTag]=`AbortController`,Gr.prototype[Symbol.toStringTag]=`AbortSignal`);function qr(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 Jr(e){typeof e==`function`&&(e={fetch:e});let{fetch:t,Request:n=t.Request,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!qr({fetch:t,Request:n,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:t,Request:a};let a=n;(a&&!a.prototype.hasOwnProperty(`signal`)||i)&&(a=function(e,t){let r;t&&t.signal&&(r=t.signal,delete t.signal);let i=new n(e,t);return r&&Object.defineProperty(i,`signal`,{writable:!1,enumerable:!1,configurable:!0,value:r}),i},a.prototype=n.prototype);let o=t;return{fetch:(e,t)=>{let n=a&&a.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(n){let r;try{r=new DOMException(`Aborted`,`AbortError`)}catch{r=Error(`Aborted`),r.name=`AbortError`}if(n.aborted)return Promise.reject(r);let i=new Promise((e,t)=>{n.addEventListener(`abort`,()=>t(r),{once:!0})});return t&&t.signal&&delete t.signal,Promise.race([i,o(e,t)])}return o(e,t)},Request:a}}var Z=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window,Yr=`fetch`in Z&&qr({fetch:Z.fetch,Request:Z.Request,AbortController:Z.AbortController}),Xr=Yr?Jr({fetch:Z.fetch,Request:Z.Request,AbortController:Z.AbortController}):void 0,Zr=Yr?Xr.fetch:Z.fetch;Yr?Xr.Request:Z.Request,Yr||Z.AbortController,Yr||Z.AbortSignal;var Qr=f(Ge(),1),$r=f(wt(),1),ei;(e=>{e.Armenian=`58`,e.Azerbaijani=`57`,e.Belarusian=`114`,e.English=`3`,e.Kazakh=`97`,e.Portuguese=`73`,e.Russian=`0`,e.Spanish=`4`,e.Ukrainian=`1`,e.Uzbek=`65`,e.Vietnamese=`75`})(ei||={});var ti=`vk.com`,ni=function(){var e=n(function*(e,t,n){let r=new URL(`https://${ti}/js/lang-pack.js`);return r.searchParams.set(`format`,`json`),r.searchParams.set(`name`,t),e!==void 0&&r.searchParams.set(`lang`,e),ri(yield(yield Zr(r.toString())).json(),n)});return function(t,n,r){return e.apply(this,arguments)}}(),ri=(e,t)=>$r.default(Qr.default(e.keys).map(([e,n])=>[e.substring(`${t}_`.length),ii(n)])),ii=e=>Array.isArray(e)?e[0]:e,ai;(e=>{e.RU=`ru`,e.EN=`en`})(ai||={});var Q=`__vk_vp_internals_exposure`;class oi{constructor(t,n){e(this,`playerId`,void 0),e(this,`type`,void 0),this.playerId=n,this.type=t,this.initWindowObjects()}getWindowObject(){var e;if(typeof window>`u`)return{};let t=this.playerId,n=this.type;return((e=window[Q])==null||(e=e[t])==null?void 0:e[n])??{}}initWindowObjects(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[Q]||(window[Q]={}),window[Q][e]||(window[Q][e]={}),window[Q][e][t]||(window[Q][e][t]={})}expose(e){typeof window>`u`||Object.assign(this.getWindowObject(),e)}destroy(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[Q]&&window[Q][e]&&window[Q][e][t]&&(delete window[Q][e][t],Object.keys(window[Q][e]).length||delete window[Q][e],Object.keys(window[Q]).length||delete window[Q])}}var si={};v(si,{subscribe:()=>fi,push:()=>di,destroy:()=>ui,create:()=>li});var ci=new Map,li=(e,t)=>ci.set(e,t??[]),ui=e=>ci.delete(e),di=(e,t)=>{let n=ci.get(e);n&&(typeof n==`function`?n(t):n.push(t))},fi=(e,t)=>{let n=ci.get(e);if(n){if(n&&Array.isArray(n))for(let e of n)t(e);ci.set(e,t)}},pi=f(Lt(),1),mi=(e,...t)=>typeof e==`string`?e.includes(...t):pi.default(e,...t),hi=`gW5EerTD5QhAnsbpF7Hd2NSMRteYIUUMjFbSyI68Pf5`,gi=e=>Zt({id:e.id,message:e.message,category:e.category,data:_i(e.data),httpCode:e.httpCode,UVBackendErrorCode:e.UVBackendErrorCode});function _i(e){switch(typeof e){case`boolean`:case`string`:case`number`:return e;case`object`:try{return JSON.stringify(e)}catch{return}default:return}}var vi=e=>{if(e.thrown instanceof Error)return e.thrown.name=e.id,e.thrown;let t=Error(e.message);return t.name=e.id,t},yi=()=>{try{let{origin:e,pathname:n,search:r,hostname:i}=G().document.location;return i===`localhost`?void 0:t({url:e+n},new URLSearchParams(r).entries().reduce((e,[t,n])=>(e[`url.${t}`]=n,e),{}))}catch(e){console.error(e)}};class ${constructor(t,n,r,i){e(this,`dynamicImportTimeout`,5e3),e(this,`componentName`,void 0),e(this,`subscription`,new V),e(this,`options`,void 0),e(this,`envParams`,void 0),e(this,`context`,void 0),this.componentName=t,this.options=n,this.envParams=r,this.context=i,this.options.enabled&&(this.loadModule(),this.init())}error(e,n){let{blackErrorCategoryList:r,blackErrorIdList:i,sampleRate:a,whiteErrorCategoryList:o,whiteErrorIdList:s}=this.options,{id:c,category:l}=e;r.length&&mi(r,l)||i.length&&mi(i,c)||o.length&&!mi(o,l)||s.length&&!mi(s,c)||Math.random()>=a||$.tracerErrorMap.get(this.componentName)?.error(vi(e),{severity:n?.severity??(e.traceAsLog?`debug`:void 0),keys:t(t(t({},this.context),gi(e)),yi())})}addSubscription(e){this.subscription.add(e)}destroy(){this.subscription.unsubscribe()}init(){var e=this;return n(function*(){try{if(yield $.loadPromise,$.tracerErrorMap.has(e.componentName)||Xt($.appTracerModule))return;let{appTracerModule:t}=$,{initTracerError:n,initTracerErrorUploader:r,addTracerPlugin:i,getTracerModules:a}=t,o=a(e.componentName),s=!o.error,c=o.error??n(e.componentName,{enableUnhandledErrorsListeners:!1,stringifyErrorDataObject:!0});s&&r(e.componentName,{appToken:hi,environment:e.envParams.env,versionCode:1,versionName:e.envParams.version}),i(e.componentName,{name:`addedCategory`,errorBeforeAdd(e){let t=e.keys?.category??`wtf`;if(typeof t==`string`)return{issueKey:t}}}),$.tracerErrorMap.set(e.componentName,c)}catch{}})()}loadModule(){var e=this;W($.loadPromise)||($.loadPromise=function(){var t=n(function*(){try{let t=new Promise((t,n)=>G().setTimeout(n,e.dynamicImportTimeout));$.appTracerModule=yield Promise.race([t,import(`@apptracer/sdk/lite`)])}catch{$.loadPromise=null}});return function(){return t.apply(this,arguments)}}()())}}e($,`tracerErrorMap`,new Map),e($,`appTracerModule`,null),e($,`loadPromise`,null);
|
|
7
|
-
//# sourceMappingURL=es2015.cjs.map
|
|
6
|
+
var e=require(`@oxc-project/runtime/helpers/defineProperty`),t=require(`@oxc-project/runtime/helpers/objectSpread2`),n=require(`@oxc-project/runtime/helpers/asyncToGenerator`),r=Object.defineProperty,i=Object.getOwnPropertyNames,a=Object.getOwnPropertyDescriptor,o=Object.prototype.hasOwnProperty;function s(e){return this[e]}var c=e=>{var t=(l??=new WeakMap).get(e),n;if(t)return t;if(t=r({},`__esModule`,{value:!0}),e&&typeof e==`object`||typeof e==`function`)for(var c of i(e))o.call(t,c)||r(t,c,{get:s.bind(e,c),enumerable:!(n=a(e,c))||n.enumerable});return l.set(e,t),t},l,u=e=>e;function d(e,t){this[e]=u.bind(null,t)}var f=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0,configurable:!0,set:d.bind(t,n)})},p={};f(p,{withoutNullable:()=>ne,videoSizeToQuality:()=>Ce,videoQualityToHeight:()=>we,videoHeightToQuality:()=>Se,urlCanParsePolyfilled:()=>Rn,timeout:()=>Ne,timeCodeToString:()=>Oe,throttleFn:()=>z,throttle:()=>We,tap:()=>at,suppressAbort:()=>bt,stringTrimStart:()=>Q,stringTrimRight:()=>An,stringTrimLeft:()=>kn,stringTrimEnd:()=>On,stringReplaceAll:()=>Dn,stringPadStart:()=>En,stringPadEnd:()=>Tn,stringMatchAll:()=>wn,stringAt:()=>Cn,skip:()=>st,shareReplay:()=>lt,safeStorage:()=>ue,requestIdleCallbackPolyfilled:()=>Fn,promiseWithResolvers:()=>un,promiseTry:()=>ln,promiseFinally:()=>cn,promiseAny:()=>sn,promiseAllSettled:()=>on,pairwise:()=>rt,once:()=>nt,observeElementSize:()=>dt,observableFrom:()=>Fe,objectValues:()=>an,objectHasOwn:()=>rn,objectFromEntries:()=>tn,objectEntries:()=>en,nowInt:()=>se,now:()=>oe,noop:()=>v,merge:()=>Me,mapTo:()=>tt,map:()=>$e,loadVKLangPack:()=>Ot,isValidURL:()=>pt,isNullable:()=>T,isNonNullable:()=>w,isLowerOrEqual:()=>be,isLower:()=>P,isInvariantQuality:()=>I,isIntersecting:()=>mt,isHigherOrEqual:()=>ye,isHigher:()=>ve,isBrowserWindow:()=>D,isAbortError:()=>yt,interval:()=>Pe,interpolate:()=>_t,includesPolyfilled:()=>Ln,globalThisPolyfill:()=>$t,getWindow:()=>E,getVideoQualityLabel:()=>De,getTraceSubscriptionMethod:()=>xt,getRangeAroundIndex:()=>vt,getPlayerId:()=>gt,getHighestQuality:()=>xe,getExponentialDelay:()=>le,fromEvent:()=>Ie,flattenObject:()=>H,filterChanged:()=>Xe,filter:()=>Ke,fillWithDefault:()=>L,fetchPolyfilled:()=>yn,devNull:()=>Nt,detectEmbed:()=>_e,debounceFn:()=>R,debounce:()=>Ve,combine:()=>je,cloneDeepWith:()=>B,cloneDeep:()=>ke,clearVideoElement:()=>ft,checkNever:()=>_,cancelIdleCallbackPolyfilled:()=>In,buffer:()=>Re,atPolyfilled:()=>jn,assertQualityIsExact:()=>Ee,assertNullable:()=>C,assertNotEmptyArray:()=>re,assertNonNullable:()=>te,assertNever:()=>g,assertEmptyArray:()=>ie,arrayWith:()=>Qt,arrayToSpliced:()=>Zt,arrayToSorted:()=>Xt,arrayToReversed:()=>Yt,arrayIncludes:()=>Jt,arrayFlatMap:()=>qt,arrayFlat:()=>Kt,arrayFindLastIndex:()=>Gt,arrayFindLast:()=>Wt,arrayAt:()=>Ut,areQualitiesExact:()=>Te,addScript:()=>ae,abortable:()=>ce,VideoQuality:()=>M,ValueSubject:()=>Ae,VKNumericLanguage:()=>Et,VERSION:()=>m,TracerFactory:()=>wt,SubscriptionRemovable:()=>Le,Subscription:()=>h,Subject:()=>S,RequestPolyfilled:()=>bn,ReplaySubject:()=>V,Observable:()=>x,Logger:()=>ee,InternalsExposure:()=>Mt,InterfaceLanguage:()=>jt,INTERNAL_EXPOSE_GLOBAL_KEY:()=>G,ErrorCategory:()=>Tt,AppTracer:()=>q,AbortSignalPolyfilled:()=>Sn,AbortControllerPolyfilled:()=>xn}),module.exports=c(p);var m=`1.0.87-beta.1`;class h{constructor(){e(this,`subscriptions`,[])}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(e=>{typeof e==`function`?e():e.unsubscribe()})}add(e){return this.subscriptions.push(e),this}}var g=e=>{throw Error(`${e} is value of unexpected type`)},_=e=>{},v=()=>{},y=e=>{throw console.error(e),e},b=e=>{console.error(e)};class x{constructor(t){e(this,`suppressErrors`,!1),t&&(this._subscribe=t)}setSuppressErrors(e){this.suppressErrors=e}subscribe(e,t){let n=this.suppressErrors?b:y,r;r=t?typeof t==`function`?{next:t,error:v}:{next:e=>t.next(e),error:e=>t.error?.call(t,e)}:{next:n,error:v};let i=typeof e==`function`?{next:t=>{try{let n=e(t);n instanceof Promise&&n.catch(e=>r.next(e))}catch(e){r.next(e)}},error:e=>r.next(e)}:{next:t=>e.next(t),error:t=>e.error?e.error(t):r.next(t)},a;try{a=this._subscribe(i)}catch(e){i.error?.call(i,e)}return new h().add(()=>{switch(i.next=v,i.error=v,typeof a){case`function`:a();return;case`object`:a.unsubscribe();return;case`undefined`:return;default:return g(a)}})}pipe(...e){return e.reduce((e,t)=>t(e),this)}_subscribe(e){}}class S extends x{constructor(){super(),e(this,`keyCounter`,0),e(this,`subscribers`,new Map)}next(e){this.subscribers.forEach(t=>t.next(e))}error(e){this.subscribers.forEach(t=>t.error?.call(t,e))}_subscribe(e){let t=this.keyCounter++;return this.subscribers.set(t,e),new h().add(()=>this.subscribers.delete(t))}}class ee{constructor(){e(this,`log$`,new S),e(this,`logs`,[]),e(this,`log`,e=>{let n=t(t({},e),{},{timestamp:Date.now()});this.logs.push(n),this.log$.next(n)}),e(this,`getAllLogs`,()=>this.logs)}createCustomLog(e){return(...t)=>{let n;try{n=e(...t)}catch{n={message:"error in `createCustomLog`",component:`Logger`}}this.log(n)}}createComponentLog(e){return this.createCustomLog(n=>t({component:e},n))}}function te(e,t=`Assertion "value is not nullable" failed`){if(e==null)throw Error(t)}function C(e,t=`Assertion "value is nullable" failed`){if(e!=null)throw Error(t)}function w(e){return e!=null}function T(e){return e==null}var ne=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>w(t)));function re(e,t){if(!e?.length)throw Error(t)}function ie(e,t){if(e?.length)throw Error(t)}var E=()=>globalThis,D=(e=E())=>!!(e.window&&e.screen),ae=(e,t,n)=>new Promise((r,i)=>{t.addEventListener(`abort`,()=>{s(),l.remove()});let a=()=>{s(),i(`error`)},o=()=>{s(),r()},s=()=>{c&&clearTimeout(c),l.removeEventListener(`load`,o),l.removeEventListener(`error`,a)},c;n&&(c=E().setTimeout(()=>{s(),i(`timeout`)},n));let l=document.createElement(`script`);l.addEventListener(`load`,o),l.addEventListener(`error`,a),l.src=e,document.head.appendChild(l)}),oe=typeof E().performance?.now==`function`?()=>E().performance.now():()=>Date.now(),se=()=>Math.trunc(oe()),ce=(e,t)=>n(function*(...n){let r=t(...n),i=e.aborted,a;for(;!i&&!e.aborted;)try{let e=yield r.next(a);i=e.done??!1,a=e.value}catch(e){yield r.throw(e)}return a}),le=(e,{start:t=0,factor:n=2,max:r=1/0,min:i=t,random:a=0}={})=>{let o=t;return o*=n**+e,o*=1+(Math.random()*a*2-a),o=Math.round(o),o=Math.min(o,r),o=Math.max(o,i),o},ue={};f(ue,{set:()=>pe,remove:()=>he,isPersistent:()=>de,has:()=>me,get:()=>fe,clear:()=>ge});var O,k,A=`vk-videoplayer-dummy-key-${Math.random()}`,j=()=>{if(k!==void 0)return k;try{localStorage.setItem(A,`test`),localStorage.removeItem(A),k=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(A),k=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)k=2;else throw e}else throw e}return k===2&&(O=new Map),k},de=()=>j()===0,fe=e=>{let t=j();switch(t){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return O?.get(e);default:g(t)}},pe=(e,t)=>{let n=j();switch(n){case 0:try{localStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 1:try{sessionStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 2:O?.set(e,t);return;default:g(n)}},me=e=>{let t=j();switch(t){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return O?.has(e)??!1;default:return g(t),!1}},he=e=>{let t=j();switch(t){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:O?.delete(e);return;default:g(t)}},ge=()=>{let e=j();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return O?.clear();default:g(e)}},_e=()=>{let e,t=[],n=E();try{e=n.self!==n.top}catch(t){t instanceof DOMException&&t.name===`SecurityError`?e=!0:(e=!1,console.error(t))}try{n.location?.ancestorOrigins&&(t=[...n.location.ancestorOrigins])}catch(e){console.error(e)}try{!t.length&&n.document.referrer&&(t=[new URL(n.document.referrer).origin])}catch(e){console.error(e)}return t=t.filter(e=>URL.canParse(e)),{isEmbed:e,origins:t,topOrigin:t.at(-1),immediateOrigin:t.at(0)}},M;(e=>{e.INVARIANT=`Invariant quality`,e.Q_144P=`144p`,e.Q_240P=`240p`,e.Q_360P=`360p`,e.Q_480P=`480p`,e.Q_576P=`576p`,e.Q_720P=`720p`,e.Q_1080P=`1080p`,e.Q_1440P=`1440p`,e.Q_2160P=`2160p`,e.Q_4320P=`4320p`})(M||={});var N={"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}},ve=(e,t)=>N[e].height>N[t].height,ye=(e,t)=>N[e].height>=N[t].height,P=(e,t)=>N[e].height<N[t].height,be=(e,t)=>N[e].height<=N[t].height,xe=e=>e.sort((e,t)=>e===t?0:e===`Invariant quality`?1:t===`Invariant quality`?-1:P(e,t)?1:-1)[0],F=Object.keys(N).sort((e,t)=>P(e,t)?-1:1),Se=(e,t=.02)=>[...F].find(n=>N[n].height*(1+t)>=e),Ce=({width:e,height:t})=>{let n=Math.min(e,t),r=Math.max(e,t);return F.find(e=>{let t=N[e];return t.width>=r&&t.height>=n})},we=e=>N[e].height,I=e=>e===`Invariant quality`,Te=e=>e.every(e=>!I(e));function Ee(e){if(I(e))throw Error(`Expected exact quality`)}var De=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``}},L=(e,t)=>{let n={};for(let r of Object.keys(t)){let i=t[r],a=e[r];Array.isArray(i)?n[r]=Array.isArray(a)?a:i:typeof i==`object`&&i?typeof a==`object`&&a&&!Array.isArray(a)?n[r]=L(a,i):n[r]=a??i:n[r]=r in e?a:i}return n},Oe=e=>{let t=``;return e>=3600&&(t+=Math.floor(e/3600)+`h`,e%=3600),e>=60&&(t+=Math.floor(e/60)+`m`,e%=60),e>0&&(t+=Math.floor(e)+`s`),t};function R(e,t=0,n){let r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0,p=!t&&t!==0&&typeof E().requestAnimationFrame==`function`;n&&(u=!!n.leading,d=`maxWait`in n,a=n?.maxWait?Math.max(+n?.maxWait||0,t):a,f=`trailing`in n?!!n.trailing:f);function m(t){let n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function h(e,t){return p?(s&&E().cancelAnimationFrame(s),E().requestAnimationFrame(e)):setTimeout(e,t)}function g(e){if(p){E().cancelAnimationFrame(e);return}clearTimeout(e)}function _(e){return l=e,s=h(b,t),u?m(e):o}function v(e){let n=e-c,r=e-l,i=t-n;return d?Math.min(i,a-r):i}function y(e){let n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function b(){let e=Date.now();if(y(e))return x(e);s=h(b,v(e))}function x(e){return s=void 0,f&&r?m(e):(r=i=void 0,o)}function S(){s!==void 0&&g(s),l=0,r=c=i=s=void 0}function ee(){return s===void 0?o:x(Date.now())}function te(){return s!==void 0}function C(...e){let n=Date.now(),a=y(n);if(r=e,i=this,c=n,a){if(s===void 0)return _(c);if(d)return s=h(b,t),m(c)}return s===void 0&&(s=h(b,t)),o}return C.cancel=S,C.flush=ee,C.pending=te,C}var z=(e,n=0,r)=>R(e,n,t(t(t({},{leading:!0,trailing:!0}),r),{},{maxWait:n})),B=(e,t)=>{if(typeof e!=`object`||!e)return e;let n=Array.isArray(e)?[]:{};for(let r in e){if(typeof t==`function`){let i=t(e[r],r,e,n);if(i!==void 0){n[r]=i;continue}}typeof e[r]==`object`?n[r]=B(e[r],t):n[r]=e[r]}return n},ke=e=>B(e);class V extends S{constructor(t){super(),e(this,`bufferSize`,void 0),e(this,`buffer`,[]),e(this,`cursorEnd`,-1),e(this,`cursorStart`,0),this.bufferSize=t,this.buffer=Array(t)}next(e){this.cursorEnd+=1,this.cursorStart=this.cursorEnd>=this.bufferSize?this.cursorStart+1:0,this.buffer[this.cursorEnd%this.bufferSize]=e,this.subscribers.forEach(t=>t.next(e))}_subscribe(e){for(let t=this.cursorStart;t<=this.cursorEnd;t++)e.next(this.buffer[t%this.bufferSize]);let t=this.keyCounter++;return this.subscribers.set(t,e),new h().add(()=>this.subscribers.delete(t))}}class Ae extends S{constructor(t){super(),e(this,`value`,void 0),this.value=t}next(e){super.next(this.value=e)}error(e){super.error(this.value=e)}getValue(){return this.value}_subscribe(e){let t=super._subscribe(e);return e.next(this.value),t}}function je(e){return new x(t=>{let n={},r=Object.keys(e).length,i=e=>i=>{e in n||r--,n[e]=i,r===0&&t.next(n)};return Object.entries(e).reduce((e,[t,n])=>e.add(n.subscribe(i(t))),new h)})}function Me(...e){return new x(t=>e.reduce((e,n)=>e.add(n.subscribe(t)),new h))}var Ne=e=>new x(t=>{let n=E().setTimeout(()=>{try{t.next()}catch(e){if(t.error)t.error(e);else throw e}},e);return()=>E().clearTimeout(n)}),Pe=e=>new x(t=>{let n=E(),r=n.setInterval(()=>t.next(),e);return()=>{r&&=(n.clearInterval(r),void 0)}}),Fe=e=>new x(t=>{e.forEach(e=>t.next(e))}),Ie=(e,t)=>new x(n=>{let r=e=>n.next(e);return e.addEventListener(t,r),()=>e.removeEventListener(t,r)});class Le extends h{remove(e){this.subscriptions=this.subscriptions.filter(t=>t!==e)}}function Re(e){return t=>new x(n=>t.subscribe(new ze(n,e)))}class ze{constructor(t,n){e(this,`destination`,void 0),e(this,`size`,void 0),e(this,`lastValues`,[]),this.destination=t,this.size=n}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var t;(t=this.destination).error?.call(t,e)}}var Be={leading:!1,trailing:!0};function Ve(e,t=Be){return n=>new x(r=>n.subscribe(new He(r,e,t)))}class He{constructor(t,n,r){e(this,`destination`,void 0),e(this,`time`,void 0),e(this,`config`,void 0),e(this,`lastValue`,void 0),e(this,`timeout`,void 0),this.destination=t,this.time=n,this.config=r}next(e){this.lastValue=e;let t=E();w(this.timeout)?t.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=t.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(e){if(this.destination.error)this.destination.error(e);else throw e}this.timeout=void 0},this.time)}error(e){var t;(t=this.destination).error?.call(t,e)}}var Ue={leading:!0,trailing:!1};function We(e,t=Ue){return n=>new x(r=>n.subscribe(new Ge(r,e,t)))}class Ge{constructor(t,n,r){e(this,`destination`,void 0),e(this,`time`,void 0),e(this,`config`,void 0),e(this,`lastValue`,void 0),e(this,`timeout`,void 0),this.destination=t,this.time=n,this.config=r}next(e){this.lastValue=e,T(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=E().setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){var t;(t=this.destination).error?.call(t,e)}}function Ke(e){return t=>new x(n=>t.subscribe(new qe(n,e)))}class qe{constructor(t,n){e(this,`destination`,void 0),e(this,`predicate`,void 0),this.destination=t,this.predicate=n}next(e){let t;try{t=this.predicate(e)}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}var Je=(e,t)=>{let n=(e,t)=>{let n=Object.keys(e);for(let r in t)if(!n.includes(r)||t[r]!==e[r])return!1;return!0};return n(e,t)&&n(t,e)},Ye=(e,t)=>e instanceof Object&&t instanceof Object?Je(e,t):e===t;function Xe(e=Ye){return t=>new x(n=>t.subscribe(new Qe(n,e)))}var Ze={};class Qe{constructor(t,n){e(this,`destination`,void 0),e(this,`predicate`,void 0),e(this,`lastValue`,Ze),this.destination=t,this.predicate=n}next(e){let n;try{n=this.lastValue===Ze||!this.predicate(this.lastValue,e),this.lastValue=e instanceof Object&&!Array.isArray(e)?t({},e):e}catch(e){throw this.error(e),e}n&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function $e(e){return t=>new x(n=>t.subscribe(new et(n,e)))}class et{constructor(t,n){e(this,`destination`,void 0),e(this,`mapper`,void 0),this.destination=t,this.mapper=n}next(e){let t;try{t=this.mapper(e)}catch(e){throw this.error(e),e}this.destination.next(t)}error(e){var t;(t=this.destination).error?.call(t,e)}}function tt(e){return $e(()=>e)}function nt(){return e=>new x(t=>{let n=!1,r=!1,i=e.subscribe(e=>{n||(n=!0,t.next(e)),r&&i.unsubscribe()},e=>{n=!0,t.error?.call(t,e),r&&i.unsubscribe()});return r=!0,n&&i.unsubscribe(),i})}function rt(){return e=>new x(t=>e.subscribe(new it(t)))}class it{constructor(t){e(this,`destination`,void 0),e(this,`last`,void 0),e(this,`hasLast`,!1),this.destination=t}next(e){let t=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,e])}error(e){var t;(t=this.destination).error?.call(t,e)}}function at(e){return t=>new x(n=>t.subscribe(new ot(n,e)))}class ot{constructor(t,n){e(this,`destination`,void 0),e(this,`effect`,void 0),this.destination=t,this.effect=n}next(e){try{this.effect(e)}catch(e){throw this.error(e),e}this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function st(e){return t=>new x(n=>t.subscribe(new ct(n,e)))}class ct{constructor(t,n){if(e(this,`destination`,void 0),e(this,`count`,void 0),this.destination=t,this.count=n,n<0){var r;(r=this.destination).error?.call(r,Error(`Count can not be less than zero`))}}next(e){this.count===0?this.destination.next(e):this.count--}error(e){var t;(t=this.destination).error?.call(t,e)}}function lt(e=0){return t=>{let n=0,r=new V(e),i=t.subscribe(r),a=e=>()=>{e.unsubscribe(),n--,n===0&&i.unsubscribe()};return new x(e=>(n++,a(r.subscribe(e))))}}var ut=300,dt=(e,t=ut)=>new x(n=>{let r=E(),{width:i,height:a}=e.getBoundingClientRect();if(n.next({width:i,height:a}),!D(r))return;let o=new r.ResizeObserver(z(e=>{let t=e[0];if(!t)return;let r,i;t.contentBoxSize&&t.contentBoxSize[0]?(i=t.contentBoxSize[0].blockSize,r=t.contentBoxSize[0].inlineSize):t.contentRect&&(r=t.contentRect.width,i=t.contentRect.height),w(r)&&w(i)&&n.next({width:r,height:i})},t));return o.observe(e),()=>o.disconnect()}),H=(e,t=6,n=`.`)=>{let r={};for(let i in e)if(!(!e.hasOwnProperty(i)||e[i]instanceof HTMLElement||!t))if(typeof e[i]==`object`&&e[i]!==null){let a=H(e[i],t-1);for(let e in a)a.hasOwnProperty(e)&&(r[i+n+e]=a[e])}else r[i]=e[i];return r},ft=(e,t=!1)=>{t&&(e.innerHTML=``),e.removeAttribute(`src`),e.load()},pt=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol===`https:`},mt=(e,t)=>!(e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom),ht=(()=>{let e=0;return()=>{let t=e;return e=(e+1)%(2**53-1),t}})(),gt=e=>e!==void 0&&e!==``?e:ht().toString();function _t(e,t,n){if(e<=t[0])return n[0];if(e>=t[t.length-1])return n[n.length-1];let r=1;for(;r<t.length&&t[r]<e;)r++;r>=t.length&&(r=t.length-1);let i=t[r-1],a=t[r],o=n[r-1],s=n[r];return e===i?o:e===a?s:o+(e-i)/(a-i)*(s-o)}function vt(e,t,n){if(e<=0||n<0)return[];let r=[],i=Math.floor((e-1)/2),a=Math.floor(e/2),o=t-i,s=t+a;o<0&&(s+=Math.abs(o),o=0),s>n&&(o-=s-n,s=n),o=Math.max(0,o),s=Math.min(n,s);for(let e=o;e<=s;e++)r.push(e);return r}var yt=e=>e instanceof DOMException&&(e.name===`AbortError`||e.code===20),bt=e=>{if(!yt(e))throw e},xt=e=>t=>n=>{let r=typeof n==`object`;n==null||r&&!Object.keys(n).length||e(t,r?H(n):{value:n})},U=(e={})=>{let t=e=>{let t=e;return e===void 0?t=`undefined`:e===null?t=`null`:(typeof e==`number`||typeof e==`boolean`)&&(t=e.toString()),t},n={};for(let r in e)Array.isArray(e[r])?n[r]=e[r].map(t):n[r]=t(e[r]);return n};class W{constructor({name:t,getParentContext:n}){e(this,`dynamicImportTimeout`,5e3),e(this,`span`,void 0),e(this,`context`,void 0),e(this,`childTracers`,[]),e(this,`initPromise`,void 0),W.dynamicImportStatus===`not_started`&&(W.dynamicImportPromise=this.loadOpentelemetry());let r=Date.now();this.initPromise=W.dynamicImportPromise.then(e=>{W.dynamicImportStatus===`completed`&&this.init({name:t,getParentContext:n},r)})}init({name:e,getParentContext:t},n){this.span=W.rootTracer.startSpan(e,{startTime:n},t?.()),this.context=W.dynamicImports.opentelemetryApi.trace.setSpan(W.dynamicImports.opentelemetryApi.context.active(),this.span)}loadOpentelemetry(){var e=this;return n(function*(){if(W.dynamicImportStatus===`not_started`){W.dynamicImportStatus=`in_progress`;try{let t=new Promise((t,n)=>setTimeout(n,e.dynamicImportTimeout)),n=Promise.all([import(`@opentelemetry/api`),import(`@opentelemetry/sdk-trace-web`),import(`@apptracer/opentelemetry`)]),[r,i,a]=yield Promise.race([n,t]);W.dynamicImports={opentelemetryApi:r,opentelemetrySdk:i,tracer:a},W.dynamicImportStatus=`completed`}catch{W.dynamicImportStatus=`failed`}}})()}isComponentTracerNotInitialized(){return T(this.span)||W.dynamicImportStatus===`failed`}log(e,n){let r=Date.now();this.initPromise.then(i=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,t(t({},U(n)),{},{type:`log`}),r)})}error(e,n){let r=Date.now();this.initPromise.then(i=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,t(t({},U(n)),{},{type:`error`}),r)})}critical(e,n){let r=Date.now();this.initPromise.then(i=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,t(t({},U(n)),{},{type:`critical`}),r)})}createComponentTracer(e){let t=new W({name:e,getParentContext:()=>this.context});return this.childTracers.push(t),t}end(){this.initPromise.then(e=>{this.isComponentTracerNotInitialized()||(this.childTracers.forEach(e=>e.end()),this.span.end())})}}e(W,`rootTracer`,void 0),e(W,`dynamicImportStatus`,`not_started`),e(W,`dynamicImports`,void 0),e(W,`dynamicImportPromise`,void 0);class St extends W{constructor(){super({name:`Root`}),e(this,`spanExporter`,void 0)}init({name:e,getParentContext:t},n){let r=W.dynamicImports.tracer.initTracerOpenTelemetry({serviceName:`videoplayer-sdk-web`,appToken:`L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb`,spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),i=new W.dynamicImports.tracer.TracerMemorySpanExporter;this.spanExporter=i,r.addSpanProcessor(new W.dynamicImports.tracer.TracerAllSpansProcessor({startedSpansExporter:i})),W.rootTracer=r.getTracer(`sdk-videoplayer-tracer`),super.init({name:e,getParentContext:t},n)}getFinishedSpans(){if(!this.isComponentTracerNotInitialized())return this.spanExporter?.getJsonData()}getTraceId(){return this.isComponentTracerNotInitialized()?``:this.span.spanContext().traceId}}class Ct{constructor(t){e(this,`fakeTraceId`,void 0)}log(e,t){}error(e,t){}critical(e,t){}createComponentTracer(e){return new Ct({name:e})}end(){}getFinishedSpans(){}getTraceId(){return this.fakeTraceId}}class wt{static createRootTracer(e=!1){return e?new St:new Ct}}var Tt;(e=>{e.NETWORK=`network`,e.VIDEO_PIPELINE=`video_pipeline`,e.EXTERNAL_API=`external_api`,e.PARSER=`parser`,e.DOM=`dom`,e.WTF=`wtf`,e.FATAL=`fatal`})(Tt||={});var Et;(e=>{e.Armenian=`58`,e.Azerbaijani=`57`,e.Belarusian=`114`,e.English=`3`,e.Kazakh=`97`,e.Portuguese=`73`,e.Russian=`0`,e.Spanish=`4`,e.Ukrainian=`1`,e.Uzbek=`65`,e.Vietnamese=`75`})(Et||={});var Dt=`vk.com`,Ot=function(){var e=n(function*(e,t,n){let r=new URL(`https://${Dt}/js/lang-pack.js`);return r.searchParams.set(`format`,`json`),r.searchParams.set(`name`,t),e!==void 0&&r.searchParams.set(`lang`,e),kt(yield(yield fetch(r.toString())).json(),n)});return function(t,n,r){return e.apply(this,arguments)}}(),kt=(e,t)=>Object.fromEntries(Object.entries(e.keys).map(([e,n])=>[e.substring(`${t}_`.length),At(n)])),At=e=>Array.isArray(e)?e[0]:e,jt;(e=>{e.RU=`ru`,e.EN=`en`})(jt||={});var G=`__vk_vp_internals_exposure`;class Mt{constructor(t,n){e(this,`playerId`,void 0),e(this,`type`,void 0),this.playerId=n,this.type=t,this.initWindowObjects()}getWindowObject(){var e;if(typeof window>`u`)return{};let t=this.playerId,n=this.type;return((e=window[G])==null||(e=e[t])==null?void 0:e[n])??{}}initWindowObjects(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[G]||(window[G]={}),window[G][e]||(window[G][e]={}),window[G][e][t]||(window[G][e][t]={})}expose(e){typeof window>`u`||Object.assign(this.getWindowObject(),e)}destroy(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[G]&&window[G][e]&&window[G][e][t]&&(delete window[G][e][t],Object.keys(window[G][e]).length||delete window[G][e],Object.keys(window[G]).length||delete window[G])}}var Nt={};f(Nt,{subscribe:()=>Lt,push:()=>It,destroy:()=>Ft,create:()=>Pt});var K=new Map,Pt=(e,t)=>K.set(e,t??[]),Ft=e=>K.delete(e),It=(e,t)=>{let n=K.get(e);n&&(typeof n==`function`?n(t):n.push(t))},Lt=(e,t)=>{let n=K.get(e);if(n){if(n&&Array.isArray(n))for(let e of n)t(e);K.set(e,t)}},Rt=`gW5EerTD5QhAnsbpF7Hd2NSMRteYIUUMjFbSyI68Pf5`,zt=e=>ne({id:e.id,message:e.message,category:e.category,data:Bt(e.data),httpCode:e.httpCode,UVBackendErrorCode:e.UVBackendErrorCode});function Bt(e){switch(typeof e){case`boolean`:case`string`:case`number`:return e;case`object`:try{return JSON.stringify(e)}catch{return}default:return}}var Vt=e=>{if(e.thrown instanceof Error)return e.thrown.name=e.id,e.thrown;let t=Error(e.message);return t.name=e.id,t},Ht=()=>{try{let{origin:e,pathname:n,search:r,hostname:i}=E().document.location;return i===`localhost`?void 0:t({url:e+n},new URLSearchParams(r).entries().reduce((e,[t,n])=>(e[`url.${t}`]=n,e),{}))}catch(e){console.error(e)}};class q{constructor(t,n,r,i){e(this,`dynamicImportTimeout`,5e3),e(this,`componentName`,void 0),e(this,`subscription`,new h),e(this,`options`,void 0),e(this,`envParams`,void 0),e(this,`context`,void 0),this.componentName=t,this.options=n,this.envParams=r,this.context=i,this.options.enabled&&(this.loadModule(),this.init())}error(e,n){let{blackErrorCategoryList:r,blackErrorIdList:i,sampleRate:a,whiteErrorCategoryList:o,whiteErrorIdList:s}=this.options,{id:c,category:l}=e;r.length&&r.includes(l)||i.length&&i.includes(c)||o.length&&!o.includes(l)||s.length&&!s.includes(c)||Math.random()>=a||q.tracerErrorMap.get(this.componentName)?.error(Vt(e),{severity:n?.severity??(e.traceAsLog?`debug`:void 0),keys:t(t(t({},this.context),zt(e)),Ht())})}addSubscription(e){this.subscription.add(e)}destroy(){this.subscription.unsubscribe()}init(){var e=this;return n(function*(){try{if(yield q.loadPromise,q.tracerErrorMap.has(e.componentName)||T(q.appTracerModule))return;let{appTracerModule:t}=q,{initTracerError:n,initTracerErrorUploader:r,addTracerPlugin:i,getTracerModules:a}=t,o=a(e.componentName),s=!o.error,c=o.error??n(e.componentName,{enableUnhandledErrorsListeners:!1,stringifyErrorDataObject:!0});s&&r(e.componentName,{appToken:Rt,environment:e.envParams.env,versionCode:1,versionName:e.envParams.version}),i(e.componentName,{name:`addedCategory`,errorBeforeAdd(e){let t=e.keys?.category??`wtf`;if(typeof t==`string`)return{issueKey:t}}}),q.tracerErrorMap.set(e.componentName,c)}catch{}})()}loadModule(){var e=this;w(q.loadPromise)||(q.loadPromise=function(){var t=n(function*(){try{let t=new Promise((t,n)=>E().setTimeout(n,e.dynamicImportTimeout));q.appTracerModule=yield Promise.race([t,import(`@apptracer/sdk/lite`)])}catch{q.loadPromise=null}});return function(){return t.apply(this,arguments)}}()())}}e(q,`tracerErrorMap`,new Map),e(q,`appTracerModule`,null),e(q,`loadPromise`,null);var Ut=(e,t)=>{let n=e.length,r=t>=0?t:n+t;return r>=0&&r<n?e[r]:void 0},Wt=(e,t)=>{for(let n=e.length-1;n>=0;n--){let r=e[n];if(t(r,n,e))return r}},Gt=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n,e))return n;return-1},Kt=(e,t=1)=>{let n=[],r=(e,t)=>{for(let i=0;i<e.length;i++){if(!(i in e))continue;let a=e[i];t>0&&Array.isArray(a)?r(a,t-1):n.push(a)}};return r(e,t),n},qt=(e,t)=>{let n=[];for(let r=0;r<e.length;r++){let i=t(e[r],r,e);if(Array.isArray(i))for(let e=0;e<i.length;e++)n.push(i[e]);else n.push(i)}return n},Jt=(e,t,n=0)=>{let r=e.length,i=n>=0?n:Math.max(r+n,0);for(;i<r;i++){let n=e[i];if(n===t||n!==n&&t!==t)return!0}return!1},Yt=e=>{let t=e.length,n=Array(t);for(let r=0;r<t;r++)n[r]=e[t-1-r];return n},Xt=(e,t)=>{let n=e.slice();return t?n.sort(t):n.sort()},Zt=(e,t,n,...r)=>{let i=e.slice();return n===void 0?i.splice(t):i.splice(t,n,...r),i},Qt=(e,t,n)=>{let r=e.length,i=t>=0?t:r+t,a=e.slice();return a[i]=n,a},$t=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof self<`u`?self:Function(`return this`)(),en=e=>{let t=[],n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r];t.push([i,e[i]])}return t},tn=e=>{let t={};for(let[n,r]of e)t[n]=r;return t},nn=Object.prototype.hasOwnProperty,rn=(e,t)=>nn.call(e,t),an=e=>{let t=Object.keys(e),n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e[t[r]];return n},on=e=>{let t=Array.from(e);return t.length===0?Promise.resolve([]):Promise.all(t.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},sn=e=>{let t=Array.from(e);return t.length===0?Promise.reject(AggregateError([],`All promises were rejected`)):new Promise((e,n)=>{let r=Array(t.length),i=t.length;t.forEach((t,a)=>{Promise.resolve(t).then(e,e=>{r[a]=e,--i,i===0&&n(AggregateError(r,`All promises were rejected`))})})})},cn=(e,t)=>e.then(e=>Promise.resolve(t()).then(()=>e),e=>Promise.resolve(t()).then(()=>{throw e})),ln=e=>{try{return Promise.resolve(e())}catch(e){return Promise.reject(e)}},un=()=>{let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}},{NativeAbortSignal:dn,NativeAbortController:fn}=function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}}(typeof self<`u`?self:global);function pn(e){let t;try{t=new Event(`abort`)}catch{typeof document<`u`?document.createEvent?(t=document.createEvent(`Event`),t.initEvent(`abort`,!1,!1)):(t=document.createEventObject(),t.type=`abort`):t={type:`abort`,bubbles:!1,cancelable:!1}}return t.reason=e,t}function mn(e){if(e===void 0)if(typeof document>`u`)e=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=Error(`This operation was aborted`),e.name=`AbortError`}return e}class hn{constructor(){Object.defineProperty(this,`listeners`,{value:{},writable:!0,configurable:!0})}addEventListener(e,t,n){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:n})}removeEventListener(e,t){if(!(e in this.listeners))return;let n=this.listeners[e];for(let e=0,r=n.length;e<r;e++)if(n[e].callback===t){n.splice(e,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let t=this.listeners[e.type].slice();for(let n=0,r=t.length;n<r;n++){let r=t[n];try{r.callback.call(this,e)}catch(e){Promise.resolve().then(()=>{throw e})}r.options&&r.options.once&&this.removeEventListener(e.type,r.callback)}return!e.defaultPrevented}}class J extends hn{constructor(){super(),this.listeners||hn.call(this),Object.defineProperty(this,`aborted`,{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,`onabort`,{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,`reason`,{value:void 0,writable:!0,configurable:!0})}toString(){return`[object AbortSignal]`}dispatchEvent(e){e.type===`abort`&&(this.aborted=!0,typeof this.onabort==`function`&&this.onabort.call(this,e)),super.dispatchEvent(e)}throwIfAborted(){let{aborted:e,reason:t=`Aborted`}=this;if(e)throw t}static timeout(e){let t=new Y;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,`TimeoutError`)),e),t.signal}static any(e){let t=new Y;function n(){t.abort(this.reason),r()}function r(){for(let t of e)t.removeEventListener(`abort`,n)}for(let r of e)if(r.aborted){t.abort(r.reason);break}else r.addEventListener(`abort`,n);return t.signal}}class Y{constructor(){Object.defineProperty(this,`signal`,{value:new J,writable:!0,configurable:!0})}abort(e){let t=mn(e),n=pn(t);this.signal.reason=t,this.signal.dispatchEvent(n)}toString(){return`[object AbortController]`}}typeof Symbol<`u`&&Symbol.toStringTag&&(Y.prototype[Symbol.toStringTag]=`AbortController`,J.prototype[Symbol.toStringTag]=`AbortSignal`);function gn(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 _n(e){typeof e==`function`&&(e={fetch:e});let{fetch:t,Request:n=t.Request,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!gn({fetch:t,Request:n,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:t,Request:a};let a=n;(a&&!a.prototype.hasOwnProperty(`signal`)||i)&&(a=function(e,t){let r;t&&t.signal&&(r=t.signal,delete t.signal);let i=new n(e,t);return r&&Object.defineProperty(i,`signal`,{writable:!1,enumerable:!1,configurable:!0,value:r}),i},a.prototype=n.prototype);let o=t;return{fetch:(e,t)=>{let n=a&&a.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(n){let r;try{r=new DOMException(`Aborted`,`AbortError`)}catch{r=Error(`Aborted`),r.name=`AbortError`}if(n.aborted)return Promise.reject(r);let i=new Promise((e,t)=>{n.addEventListener(`abort`,()=>t(r),{once:!0})});return t&&t.signal&&delete t.signal,Promise.race([i,o(e,t)])}return o(e,t)},Request:a}}var X=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window,Z=`fetch`in X&&gn({fetch:X.fetch,Request:X.Request,AbortController:X.AbortController}),vn=Z?_n({fetch:X.fetch,Request:X.Request,AbortController:X.AbortController}):void 0,yn=Z?vn.fetch:X.fetch,bn=Z?vn.Request:X.Request,xn=Z?Y:X.AbortController,Sn=Z?J:X.AbortSignal,Cn=(e,t)=>{let n=e.length,r=t>=0?t:n+t;if(r<0||r>=n)return;let i=e.charCodeAt(r);if(i>=55296&&i<=56319&&r+1<n){let t=e.charCodeAt(r+1);if(t>=56320&&t<=57343)return e[r]+e[r+1]}return e[r]};function*wn(e,t){let n=t.flags.includes(`g`)?t.flags:t.flags+`g`,r=new RegExp(t.source,n),i;for(;(i=r.exec(e))!==null;)yield i,i[0].length===0&&r.lastIndex++}var Tn=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return e+n.repeat(Math.ceil(r/n.length)).slice(0,r)},En=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return n.repeat(Math.ceil(r/n.length)).slice(0,r)+e},Dn=(e,t,n)=>{if(typeof t==`string`){if(typeof n==`string`)return t===``?n+e.split(``).join(n)+n:e.split(t).join(n);let r=[],i=0,a=e.indexOf(t,i);for(;a!==-1;)r.push(e.slice(i,a)),r.push(n(t,a,e)),i=a+t.length,a=e.indexOf(t,i);return r.push(e.slice(i)),r.join(``)}let r=t.flags.includes(`g`)?t.flags:t.flags+`g`,i=new RegExp(t.source,r);return e.replace(i,n)},Q=e=>e.replace(/^\s+/,``),On=e=>e.replace(/\s+$/,``),kn=Q,An=On,jn=(e,t)=>typeof e==`string`?Cn(e,t):Ut(e,t),Mn=(e,t={})=>{let n=t.timeout||1,r=performance.now();return X.setTimeout(()=>{e({get didTimeout(){return t.timeout?!1:performance.now()-r-1>n},timeRemaining(){return Math.max(0,1+(performance.now()-r))}})},1)},Nn=e=>X.clearTimeout(e),Pn=e=>typeof e==`function`&&e?.toString().endsWith(`{ [native code] }`),$=!Pn(X.requestIdleCallback)||!Pn(X.cancelIdleCallback),Fn=$?Mn:X.requestIdleCallback,In=$?Nn:X.cancelIdleCallback,Ln=(e,t,n)=>typeof e==`string`?e.includes(t,n):Jt(e,t,n),Rn=(e,t,n)=>{if(typeof e.canParse==`function`)return e.canParse(t,n);try{return new e(t,n),!0}catch{return!1}};
|
package/es2015.esm.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-shared v1.0.
|
|
3
|
-
*
|
|
4
|
-
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-
|
|
2
|
+
* @vkontakte/videoplayer-shared v1.0.87-beta.1
|
|
3
|
+
* Fri, 03 Apr 2026 11:56:50 GMT
|
|
4
|
+
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-87/doc/
|
|
5
5
|
*/
|
|
6
|
-
import e from"@oxc-project/runtime/helpers/defineProperty";import t from"@oxc-project/runtime/helpers/objectSpread2";import n from"@oxc-project/runtime/helpers/asyncToGenerator";var r=Object.create,i=Object.getPrototypeOf,a=Object.defineProperty,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty;function c(e){return this[e]}var l,u,d=(e,t,n)=>{var d=typeof e==`object`&&!!e;if(d){var f=t?l??=new WeakMap:u??=new WeakMap,p=f.get(e);if(p)return p}n=e==null?{}:r(i(e));let m=t||!e||!e.__esModule?a(n,`default`,{value:e,enumerable:!0}):n;for(let t of o(e))s.call(m,t)||a(m,t,{get:c.bind(e,t),enumerable:!0});return d&&f.set(e,m),m},f=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),p=e=>e;function m(e,t){this[e]=p.bind(null,t)}var h=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0,configurable:!0,set:m.bind(t,n)})},g=f((e,t)=>{var n=function(e){return e&&e.Math===Math&&e};t.exports=n(typeof globalThis==`object`&&globalThis)||n(typeof window==`object`&&window)||n(typeof self==`object`&&self)||n(typeof global==`object`&&global)||n(typeof e==`object`&&e)||function(){return this}()||Function(`return this`)()}),_=f((e,t)=>{t.exports=function(e){try{return!!e()}catch{return!0}}}),v=f((e,t)=>{t.exports=!_()(function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})}),y=f((e,t)=>{var n=v(),r=Function.prototype,i=r.apply,a=r.call;t.exports=typeof Reflect==`object`&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})}),b=f((e,t)=>{var n=v(),r=Function.prototype,i=r.call,a=n&&r.bind.bind(i,i);t.exports=n?a:function(e){return function(){return i.apply(e,arguments)}}}),x=f((e,t)=>{var n=b(),r=n({}.toString),i=n(``.slice);t.exports=function(e){return i(r(e),8,-1)}}),S=f((e,t)=>{var n=x(),r=b();t.exports=function(e){if(n(e)===`Function`)return r(e)}}),C=f((e,t)=>{var n=typeof document==`object`&&document.all;t.exports=n===void 0&&n!==void 0?function(e){return typeof e==`function`||e===n}:function(e){return typeof e==`function`}}),w=f((e,t)=>{t.exports=!_()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})}),T=f((e,t)=>{var n=v(),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}}),E=f(e=>{var t={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor;e.f=n&&!t.call({1:2},1)?function(e){var t=n(this,e);return!!t&&t.enumerable}:t}),D=f((e,t)=>{t.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}}),ee=f((e,t)=>{var n=b(),r=_(),i=x(),a=Object,o=n(``.split);t.exports=r(function(){return!a(`z`).propertyIsEnumerable(0)})?function(e){return i(e)===`String`?o(e,``):a(e)}:a}),O=f((e,t)=>{t.exports=function(e){return e==null}}),k=f((e,t)=>{var n=O(),r=TypeError;t.exports=function(e){if(n(e))throw new r(`Can't call method on `+e);return e}}),A=f((e,t)=>{var n=ee(),r=k();t.exports=function(e){return n(r(e))}}),j=f((e,t)=>{var n=C();t.exports=function(e){return typeof e==`object`?e!==null:n(e)}}),M=f((e,t)=>{t.exports={}}),N=f((e,t)=>{var n=M(),r=g(),i=C(),a=function(e){return i(e)?e:void 0};t.exports=function(e,t){return arguments.length<2?a(n[e])||a(r[e]):n[e]&&n[e][t]||r[e]&&r[e][t]}}),P=f((e,t)=>{t.exports=b()({}.isPrototypeOf)}),te=f((e,t)=>{var n=g().navigator,r=n&&n.userAgent;t.exports=r?String(r):``}),ne=f((e,t)=>{var n=g(),r=te(),i=n.process,a=n.Deno,o=i&&i.versions||a&&a.version,s=o&&o.v8,c,l;s&&(c=s.split(`.`),l=c[0]>0&&c[0]<4?1:+(c[0]+c[1])),!l&&r&&(c=r.match(/Edge\/(\d+)/),(!c||c[1]>=74)&&(c=r.match(/Chrome\/(\d+)/),c&&(l=+c[1]))),t.exports=l}),re=f((e,t)=>{var n=ne(),r=_(),i=g().String;t.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol(`symbol detection`);return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})}),ie=f((e,t)=>{t.exports=re()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`}),ae=f((e,t)=>{var n=N(),r=C(),i=P(),a=ie(),o=Object;t.exports=a?function(e){return typeof e==`symbol`}:function(e){var t=n(`Symbol`);return r(t)&&i(t.prototype,o(e))}}),oe=f((e,t)=>{var n=String;t.exports=function(e){try{return n(e)}catch{return`Object`}}}),se=f((e,t)=>{var n=C(),r=oe(),i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not a function`)}}),ce=f((e,t)=>{var n=se(),r=O();t.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}}),le=f((e,t)=>{var n=T(),r=C(),i=j(),a=TypeError;t.exports=function(e,t){var o,s;if(t===`string`&&r(o=e.toString)&&!i(s=n(o,e))||r(o=e.valueOf)&&!i(s=n(o,e))||t!==`string`&&r(o=e.toString)&&!i(s=n(o,e)))return s;throw new a(`Can't convert object to primitive value`)}}),ue=f((e,t)=>{t.exports=!0}),de=f((e,t)=>{var n=g(),r=Object.defineProperty;t.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch{n[e]=t}return t}}),fe=f((e,t)=>{var n=ue(),r=g(),i=de(),a=`__core-js_shared__`,o=t.exports=r[a]||i(a,{});(o.versions||=[]).push({version:`3.43.0`,mode:n?`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`})}),pe=f((e,t)=>{var n=fe();t.exports=function(e,t){return n[e]||(n[e]=t||{})}}),me=f((e,t)=>{var n=k(),r=Object;t.exports=function(e){return r(n(e))}}),F=f((e,t)=>{var n=b(),r=me(),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return i(r(e),t)}}),he=f((e,t)=>{var n=b(),r=0,i=Math.random(),a=n(1.1.toString);t.exports=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+a(++r+i,36)}}),I=f((e,t)=>{var n=g(),r=pe(),i=F(),a=he(),o=re(),s=ie(),c=n.Symbol,l=r(`wks`),u=s?c.for||c:c&&c.withoutSetter||a;t.exports=function(e){return i(l,e)||(l[e]=o&&i(c,e)?c[e]:u(`Symbol.`+e)),l[e]}}),ge=f((e,t)=>{var n=T(),r=j(),i=ae(),a=ce(),o=le(),s=I(),c=TypeError,l=s(`toPrimitive`);t.exports=function(e,t){if(!r(e)||i(e))return e;var s=a(e,l),u;if(s){if(t===void 0&&(t=`default`),u=n(s,e,t),!r(u)||i(u))return u;throw new c(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),o(e,t)}}),_e=f((e,t)=>{var n=ge(),r=ae();t.exports=function(e){var t=n(e,`string`);return r(t)?t:t+``}}),ve=f((e,t)=>{var n=g(),r=j(),i=n.document,a=r(i)&&r(i.createElement);t.exports=function(e){return a?i.createElement(e):{}}}),ye=f((e,t)=>{var n=w(),r=_(),i=ve();t.exports=!n&&!r(function(){return Object.defineProperty(i(`div`),`a`,{get:function(){return 7}}).a!==7})}),be=f(e=>{var t=w(),n=T(),r=E(),i=D(),a=A(),o=_e(),s=F(),c=ye(),l=Object.getOwnPropertyDescriptor;e.f=t?l:function(e,t){if(e=a(e),t=o(t),c)try{return l(e,t)}catch{}if(s(e,t))return i(!n(r.f,e,t),e[t])}}),xe=f((e,t)=>{var n=_(),r=C(),i=/#|\.prototype\./,a=function(e,t){var i=s[o(e)];return i===l?!0:i===c?!1:r(t)?n(t):!!t},o=a.normalize=function(e){return String(e).replace(i,`.`).toLowerCase()},s=a.data={},c=a.NATIVE=`N`,l=a.POLYFILL=`P`;t.exports=a}),Se=f((e,t)=>{var n=S(),r=se(),i=v(),a=n(n.bind);t.exports=function(e,t){return r(e),t===void 0?e:i?a(e,t):function(){return e.apply(t,arguments)}}}),Ce=f((e,t)=>{var n=w(),r=_();t.exports=n&&r(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42})}),L=f((e,t)=>{var n=j(),r=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not an object`)}}),we=f(e=>{var t=w(),n=ye(),r=Ce(),i=L(),a=_e(),o=TypeError,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=`enumerable`,u=`configurable`,d=`writable`;e.f=t?r?function(e,t,n){if(i(e),t=a(t),i(n),typeof e==`function`&&t===`prototype`&&`value`in n&&d in n&&!n[d]){var r=c(e,t);r&&r[d]&&(e[t]=n.value,n={configurable:u in n?n[u]:r[u],enumerable:l in n?n[l]:r[l],writable:!1})}return s(e,t,n)}:s:function(e,t,r){if(i(e),t=a(t),i(r),n)try{return s(e,t,r)}catch{}if(`get`in r||`set`in r)throw new o(`Accessors not supported`);return`value`in r&&(e[t]=r.value),e}}),Te=f((e,t)=>{var n=w(),r=we(),i=D();t.exports=n?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}}),R=f((e,t)=>{var n=g(),r=y(),i=S(),a=C(),o=be().f,s=xe(),c=M(),l=Se(),u=Te(),d=F();fe();var f=function(e){var t=function(n,i,a){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,i)}return new e(n,i,a)}return r(e,this,arguments)};return t.prototype=e.prototype,t};t.exports=function(e,t){var r=e.target,p=e.global,m=e.stat,h=e.proto,g=p?n:m?n[r]:n[r]&&n[r].prototype,_=p?c:c[r]||u(c,r,{})[r],v=_.prototype,y,b,x,S,C,w,T,E,D;for(S in t)y=s(p?S:r+(m?`.`:`#`)+S,e.forced),b=!y&&g&&d(g,S),w=_[S],b&&(e.dontCallGetSet?(D=o(g,S),T=D&&D.value):T=g[S]),C=b&&T?T:t[S],!(!y&&!h&&typeof w==typeof C)&&(E=e.bind&&b?l(C,n):e.wrap&&b?f(C):h&&a(C)?i(C):C,(e.sham||C&&C.sham||w&&w.sham)&&u(E,`sham`,!0),u(_,S,E),h&&(x=r+`Prototype`,d(c,x)||u(c,x,{}),u(c[x],S,C),e.real&&v&&(y||!v[S])&&u(v,S,C)))}}),Ee=f((e,t)=>{var n=pe(),r=he(),i=n(`keys`);t.exports=function(e){return i[e]||(i[e]=r(e))}}),De=f((e,t)=>{t.exports=!_()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})}),Oe=f((e,t)=>{var n=F(),r=C(),i=me(),a=Ee(),o=De(),s=a(`IE_PROTO`),c=Object,l=c.prototype;t.exports=o?c.getPrototypeOf:function(e){var t=i(e);if(n(t,s))return t[s];var a=t.constructor;return r(a)&&t instanceof a?a.prototype:t instanceof c?l:null}}),ke=f((e,t)=>{var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(e){var t=+e;return(t>0?r:n)(t)}}),Ae=f((e,t)=>{var n=ke();t.exports=function(e){var t=+e;return t!==t||t===0?0:n(t)}}),je=f((e,t)=>{var n=Ae(),r=Math.max,i=Math.min;t.exports=function(e,t){var a=n(e);return a<0?r(a+t,0):i(a,t)}}),Me=f((e,t)=>{var n=Ae(),r=Math.min;t.exports=function(e){var t=n(e);return t>0?r(t,9007199254740991):0}}),Ne=f((e,t)=>{var n=Me();t.exports=function(e){return n(e.length)}}),Pe=f((e,t)=>{var n=A(),r=je(),i=Ne(),a=function(e){return function(t,a,o){var s=n(t),c=i(s);if(c===0)return!e&&-1;var l=r(o,c),u;if(e&&a!==a){for(;c>l;)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((e||l in s)&&s[l]===a)return e||l||0;return!e&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}}),Fe=f((e,t)=>{t.exports={}}),Ie=f((e,t)=>{var n=b(),r=F(),i=A(),a=Pe().indexOf,o=Fe(),s=n([].push);t.exports=function(e,t){var n=i(e),c=0,l=[],u;for(u in n)!r(o,u)&&r(n,u)&&s(l,u);for(;t.length>c;)r(n,u=t[c++])&&(~a(l,u)||s(l,u));return l}}),Le=f((e,t)=>{t.exports=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`]}),Re=f((e,t)=>{var n=Ie(),r=Le();t.exports=Object.keys||function(e){return n(e,r)}}),ze=f((e,t)=>{var n=w(),r=_(),i=b(),a=Oe(),o=Re(),s=A(),c=E().f,l=i(c),u=i([].push),d=n&&r(function(){var e=Object.create(null);return e[2]=2,!l(e,2)}),f=function(e){return function(t){for(var r=s(t),i=o(r),c=d&&a(r)===null,f=i.length,p=0,m=[],h;f>p;)h=i[p++],(!n||(c?h in r:l(r,h)))&&u(m,e?[h,r[h]]:r[h]);return m}};t.exports={entries:f(!0),values:f(!1)}}),Be=f(()=>{var e=R(),t=ze().entries;e({target:`Object`,stat:!0},{entries:function(e){return t(e)}})}),Ve=f((e,t)=>{Be(),t.exports=M().Object.entries}),He=f((e,t)=>{t.exports=Ve()}),Ue=f((e,t)=>{t.exports=He()}),We=f((e,t)=>{t.exports=function(){}}),z=f((e,t)=>{t.exports={}}),Ge=f((e,t)=>{var n=g(),r=C(),i=n.WeakMap;t.exports=r(i)&&/native code/.test(String(i))}),Ke=f((e,t)=>{var n=Ge(),r=g(),i=j(),a=Te(),o=F(),s=fe(),c=Ee(),l=Fe(),u=`Object already initialized`,d=r.TypeError,f=r.WeakMap,p,m,h,_=function(e){return h(e)?m(e):p(e,{})},v=function(e){return function(t){var n;if(!i(t)||(n=m(t)).type!==e)throw new d(`Incompatible receiver, `+e+` required`);return n}};n||s.state?(y=s.state||=new f,y.get=y.get,y.has=y.has,y.set=y.set,p=function(e,t){if(y.has(e))throw new d(u);return t.facade=e,y.set(e,t),t},m=function(e){return y.get(e)||{}},h=function(e){return y.has(e)}):(b=c(`state`),l[b]=!0,p=function(e,t){if(o(e,b))throw new d(u);return t.facade=e,a(e,b,t),t},m=function(e){return o(e,b)?e[b]:{}},h=function(e){return o(e,b)});var y,b;t.exports={set:p,get:m,has:h,enforce:_,getterFor:v}}),qe=f((e,t)=>{var n=w(),r=F(),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,o=r(i,`name`);t.exports={EXISTS:o,PROPER:o&&function(){}.name===`something`,CONFIGURABLE:o&&(!n||n&&a(i,`name`).configurable)}}),Je=f(e=>{var t=w(),n=Ce(),r=we(),i=L(),a=A(),o=Re();e.f=t&&!n?Object.defineProperties:function(e,t){i(e);for(var n=a(t),s=o(t),c=s.length,l=0,u;c>l;)r.f(e,u=s[l++],n[u]);return e}}),Ye=f((e,t)=>{t.exports=N()(`document`,`documentElement`)}),Xe=f((e,t)=>{var n=L(),r=Je(),i=Le(),a=Fe(),o=Ye(),s=ve(),c=Ee(),l=`>`,u=`<`,d=`prototype`,f=`script`,p=c(`IE_PROTO`),m=function(){},h=function(e){return u+f+l+e+u+`/`+f+l},g=function(e){e.write(h(``)),e.close();var t=e.parentWindow.Object;return e=null,t},_=function(){var e=s(`iframe`),t=`java`+f+`:`,n;return e.style.display=`none`,o.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(h(`document.F=Object`)),n.close(),n.F},v,y=function(){try{v=new ActiveXObject(`htmlfile`)}catch{}y=typeof document<`u`?document.domain&&v?g(v):_():g(v);for(var e=i.length;e--;)delete y[d][i[e]];return y()};a[p]=!0,t.exports=Object.create||function(e,t){var i;return e===null?i=y():(m[d]=n(e),i=new m,m[d]=null,i[p]=e),t===void 0?i:r.f(i,t)}}),Ze=f((e,t)=>{var n=Te();t.exports=function(e,t,r,i){return i&&i.enumerable?e[t]=r:n(e,t,r),e}}),Qe=f((e,t)=>{var n=_(),r=C(),i=j(),a=Xe(),o=Oe(),s=Ze(),c=I(),l=ue(),u=c(`iterator`),d=!1,f,p,m;[].keys&&(m=[].keys(),`next`in m?(p=o(o(m)),p!==Object.prototype&&(f=p)):d=!0),!i(f)||n(function(){var e={};return f[u].call(e)!==e})?f={}:l&&(f=a(f)),r(f[u])||s(f,u,function(){return this}),t.exports={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:d}}),$e=f((e,t)=>{var n=I()(`toStringTag`),r={};r[n]=`z`,t.exports=String(r)===`[object z]`}),et=f((e,t)=>{var n=$e(),r=C(),i=x(),a=I()(`toStringTag`),o=Object,s=i(function(){return arguments}())===`Arguments`,c=function(e,t){try{return e[t]}catch{}};t.exports=n?i:function(e){var t,n,l;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=c(t=o(e),a))==`string`?n:s?i(t):(l=i(t))===`Object`&&r(t.callee)?`Arguments`:l}}),tt=f((e,t)=>{var n=$e(),r=et();t.exports=n?{}.toString:function(){return`[object `+r(this)+`]`}}),nt=f((e,t)=>{var n=$e(),r=we().f,i=Te(),a=F(),o=tt(),s=I()(`toStringTag`);t.exports=function(e,t,c,l){var u=c?e:e&&e.prototype;u&&(a(u,s)||r(u,s,{configurable:!0,value:t}),l&&!n&&i(u,`toString`,o))}}),rt=f((e,t)=>{var n=Qe().IteratorPrototype,r=Xe(),i=D(),a=nt(),o=z(),s=function(){return this};t.exports=function(e,t,c,l){var u=t+` Iterator`;return e.prototype=r(n,{next:i(+!l,c)}),a(e,u,!1,!0),o[u]=s,e}}),it=f((e,t)=>{var n=b(),r=se();t.exports=function(e,t,i){try{return n(r(Object.getOwnPropertyDescriptor(e,t)[i]))}catch{}}}),at=f((e,t)=>{var n=j();t.exports=function(e){return n(e)||e===null}}),ot=f((e,t)=>{var n=at(),r=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(`Can't set `+r(e)+` as a prototype`)}}),st=f((e,t)=>{var n=it(),r=j(),i=k(),a=ot();t.exports=Object.setPrototypeOf||(`__proto__`in{}?function(){var e=!1,t={},o;try{o=n(Object.prototype,`__proto__`,`set`),o(t,[]),e=t instanceof Array}catch{}return function(t,n){return i(t),a(n),r(t)&&(e?o(t,n):t.__proto__=n),t}}():void 0)}),ct=f((e,t)=>{var n=R(),r=T(),i=ue(),a=qe(),o=C(),s=rt(),c=Oe(),l=st(),u=nt(),d=Te(),f=Ze(),p=I(),m=z(),h=Qe(),g=a.PROPER,_=a.CONFIGURABLE,v=h.IteratorPrototype,y=h.BUGGY_SAFARI_ITERATORS,b=p(`iterator`),x=`keys`,S=`values`,w=`entries`,E=function(){return this};t.exports=function(e,t,a,p,h,C,T){s(a,t,p);var D=function(e){if(e===h&&j)return j;if(!y&&e&&e in k)return k[e];switch(e){case x:return function(){return new a(this,e)};case S:return function(){return new a(this,e)};case w:return function(){return new a(this,e)}}return function(){return new a(this)}},ee=t+` Iterator`,O=!1,k=e.prototype,A=k[b]||k[`@@iterator`]||h&&k[h],j=!y&&A||D(h),M=t===`Array`&&k.entries||A,N,P,te;if(M&&(N=c(M.call(new e)),N!==Object.prototype&&N.next&&(!i&&c(N)!==v&&(l?l(N,v):o(N[b])||f(N,b,E)),u(N,ee,!0,!0),i&&(m[ee]=E))),g&&h===S&&A&&A.name!==S&&(!i&&_?d(k,`name`,S):(O=!0,j=function(){return r(A,this)})),h)if(P={values:D(S),keys:C?j:D(x),entries:D(w)},T)for(te in P)(y||O||!(te in k))&&f(k,te,P[te]);else n({target:t,proto:!0,forced:y||O},P);return(!i||T)&&k[b]!==j&&f(k,b,j,{name:h}),m[t]=j,P}}),lt=f((e,t)=>{t.exports=function(e,t){return{value:e,done:t}}}),ut=f((e,t)=>{var n=A(),r=We(),i=z(),a=Ke(),o=we().f,s=ct(),c=lt(),l=ue(),u=w(),d=`Array Iterator`,f=a.set,p=a.getterFor(d);t.exports=s(Array,`Array`,function(e,t){f(this,{type:d,target:n(e),index:0,kind:t})},function(){var e=p(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case`keys`:return c(n,!1);case`values`:return c(t[n],!1)}return c([n,t[n]],!1)},`values`);var m=i.Arguments=i.Array;if(r(`keys`),r(`values`),r(`entries`),!l&&u&&m.name!==`values`)try{o(m,`name`,{value:`values`})}catch{}}),dt=f((e,t)=>{var n=I(),r=z(),i=n(`iterator`),a=Array.prototype;t.exports=function(e){return e!==void 0&&(r.Array===e||a[i]===e)}}),ft=f((e,t)=>{var n=et(),r=ce(),i=O(),a=z(),o=I()(`iterator`);t.exports=function(e){if(!i(e))return r(e,o)||r(e,`@@iterator`)||a[n(e)]}}),pt=f((e,t)=>{var n=T(),r=se(),i=L(),a=oe(),o=ft(),s=TypeError;t.exports=function(e,t){var c=arguments.length<2?o(e):t;if(r(c))return i(n(c,e));throw new s(a(e)+` is not iterable`)}}),mt=f((e,t)=>{var n=T(),r=L(),i=ce();t.exports=function(e,t,a){var o,s;r(e);try{if(o=i(e,`return`),!o){if(t===`throw`)throw a;return a}o=n(o,e)}catch(e){s=!0,o=e}if(t===`throw`)throw a;if(s)throw o;return r(o),a}}),ht=f((e,t)=>{var n=Se(),r=T(),i=L(),a=oe(),o=dt(),s=Ne(),c=P(),l=pt(),u=ft(),d=mt(),f=TypeError,p=function(e,t){this.stopped=e,this.result=t},m=p.prototype;t.exports=function(e,t,h){var g=h&&h.that,_=!!(h&&h.AS_ENTRIES),v=!!(h&&h.IS_RECORD),y=!!(h&&h.IS_ITERATOR),b=!!(h&&h.INTERRUPTED),x=n(t,g),S,C,w,T,E,D,ee,O=function(e){return S&&d(S,`normal`),new p(!0,e)},k=function(e){return _?(i(e),b?x(e[0],e[1],O):x(e[0],e[1])):b?x(e,O):x(e)};if(v)S=e.iterator;else if(y)S=e;else{if(C=u(e),!C)throw new f(a(e)+` is not iterable`);if(o(C)){for(w=0,T=s(e);T>w;w++)if(E=k(e[w]),E&&c(m,E))return E;return new p(!1)}S=l(e,C)}for(D=v?e.next:S.next;!(ee=r(D,S)).done;){try{E=k(ee.value)}catch(e){d(S,`throw`,e)}if(typeof E==`object`&&E&&c(m,E))return E}return new p(!1)}}),gt=f((e,t)=>{var n=w(),r=we(),i=D();t.exports=function(e,t,a){n?r.f(e,t,i(0,a)):e[t]=a}}),_t=f(()=>{var e=R(),t=ht(),n=gt();e({target:`Object`,stat:!0},{fromEntries:function(e){var r={};return t(e,function(e,t){n(r,e,t)},{AS_ENTRIES:!0}),r}})}),vt=f((e,t)=>{ut(),_t(),t.exports=M().Object.fromEntries}),yt=f((e,t)=>{t.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}}),bt=f(()=>{ut();var e=yt(),t=g(),n=nt(),r=z();for(i in e)n(t[i],i),r[i]=r.Array;var i}),xt=f((e,t)=>{var n=vt();bt(),t.exports=n}),St=f((e,t)=>{t.exports=xt()}),Ct=f(()=>{var e=R(),t=g();e({global:!0,forced:t.globalThis!==t},{globalThis:t})}),wt=f((e,t)=>{Ct(),t.exports=g()}),Tt=f((e,t)=>{t.exports=wt()}),Et=f((e,t)=>{t.exports=Tt()}),Dt=f(()=>{var e=R(),t=me(),n=Ne(),r=Ae(),i=We();e({target:`Array`,proto:!0},{at:function(e){var i=t(this),a=n(i),o=r(e),s=o>=0?o:a+o;return s<0||s>=a?void 0:i[s]}}),i(`at`)}),Ot=f((e,t)=>{t.exports=N()}),kt=f((e,t)=>{Dt(),t.exports=Ot()(`Array`,`at`)}),At=f((e,t)=>{t.exports=kt()}),jt=f((e,t)=>{t.exports=At()}),Mt=f(()=>{var e=R(),t=Pe().includes,n=_(),r=We();e({target:`Array`,proto:!0,forced:n(function(){return![,].includes()})},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r(`includes`)}),Nt=f((e,t)=>{Mt(),t.exports=Ot()(`Array`,`includes`)}),Pt=f((e,t)=>{t.exports=Nt()}),Ft=f((e,t)=>{t.exports=Pt()}),It=`1.0.86`;class B{constructor(){e(this,`subscriptions`,[])}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(e=>{typeof e==`function`?e():e.unsubscribe()})}add(e){return this.subscriptions.push(e),this}}var V=e=>{throw Error(`${e} is value of unexpected type`)},Lt=e=>{},Rt=()=>{},zt=e=>{throw console.error(e),e},Bt=e=>{console.error(e)};class H{constructor(t){e(this,`suppressErrors`,!1),t&&(this._subscribe=t)}setSuppressErrors(e){this.suppressErrors=e}subscribe(e,t){let n=this.suppressErrors?Bt:zt,r;r=t?typeof t==`function`?{next:t,error:Rt}:{next:e=>t.next(e),error:e=>t.error?.call(t,e)}:{next:n,error:Rt};let i=typeof e==`function`?{next:t=>{try{let n=e(t);n instanceof Promise&&n.catch(e=>r.next(e))}catch(e){r.next(e)}},error:e=>r.next(e)}:{next:t=>e.next(t),error:t=>e.error?e.error(t):r.next(t)},a;try{a=this._subscribe(i)}catch(e){i.error?.call(i,e)}return new B().add(()=>{switch(i.next=Rt,i.error=Rt,typeof a){case`function`:a();return;case`object`:a.unsubscribe();return;case`undefined`:return;default:return V(a)}})}pipe(...e){return e.reduce((e,t)=>t(e),this)}_subscribe(e){}}class Vt extends H{constructor(){super(),e(this,`keyCounter`,0),e(this,`subscribers`,new Map)}next(e){this.subscribers.forEach(t=>t.next(e))}error(e){this.subscribers.forEach(t=>t.error?.call(t,e))}_subscribe(e){let t=this.keyCounter++;return this.subscribers.set(t,e),new B().add(()=>this.subscribers.delete(t))}}class Ht{constructor(){e(this,`log$`,new Vt),e(this,`logs`,[]),e(this,`log`,e=>{let n=t(t({},e),{},{timestamp:Date.now()});this.logs.push(n),this.log$.next(n)}),e(this,`getAllLogs`,()=>this.logs)}createCustomLog(e){return(...t)=>{let n;try{n=e(...t)}catch{n={message:"error in `createCustomLog`",component:`Logger`}}this.log(n)}}createComponentLog(e){return this.createCustomLog(n=>t({component:e},n))}}var Ut=d(Ue(),1),Wt=d(St(),1);function Gt(e,t=`Assertion "value is not nullable" failed`){if(e==null)throw Error(t)}function Kt(e,t=`Assertion "value is nullable" failed`){if(e!=null)throw Error(t)}function U(e){return e!=null}function qt(e){return e==null}var Jt=e=>Wt.default(Ut.default(e).filter(([e,t])=>U(t)));function Yt(e,t){if(!e?.length)throw Error(t)}function Xt(e,t){if(e?.length)throw Error(t)}var Zt=d(Et(),1),W=()=>Zt.default,Qt=(e=W())=>!!(e.window&&e.screen),$t=(e,t,n)=>new Promise((r,i)=>{t.addEventListener(`abort`,()=>{s(),l.remove()});let a=()=>{s(),i(`error`)},o=()=>{s(),r()},s=()=>{c&&clearTimeout(c),l.removeEventListener(`load`,o),l.removeEventListener(`error`,a)},c;n&&(c=W().setTimeout(()=>{s(),i(`timeout`)},n));let l=document.createElement(`script`);l.addEventListener(`load`,o),l.addEventListener(`error`,a),l.src=e,document.head.appendChild(l)}),en=typeof W().performance?.now==`function`?()=>W().performance.now():()=>Date.now(),tn=()=>Math.trunc(en()),nn=(e,t)=>n(function*(...n){let r=t(...n),i=e.aborted,a;for(;!i&&!e.aborted;)try{let e=yield r.next(a);i=e.done??!1,a=e.value}catch(e){yield r.throw(e)}return a}),rn=(e,{start:t=0,factor:n=2,max:r=1/0,min:i=t,random:a=0}={})=>{let o=t;return o*=n**+e,o*=1+(Math.random()*a*2-a),o=Math.round(o),o=Math.min(o,r),o=Math.max(o,i),o},an={};h(an,{set:()=>ln,remove:()=>dn,isPersistent:()=>sn,has:()=>un,get:()=>cn,clear:()=>fn});var G,K,on=`vk-videoplayer-dummy-key-${Math.random()}`,q=()=>{if(K!==void 0)return K;try{localStorage.setItem(on,`test`),localStorage.removeItem(on),K=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(on),K=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)K=2;else throw e}else throw e}return K===2&&(G=new Map),K},sn=()=>q()===0,cn=e=>{let t=q();switch(t){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return G?.get(e);default:V(t)}},ln=(e,t)=>{let n=q();switch(n){case 0:try{localStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 1:try{sessionStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 2:G?.set(e,t);return;default:V(n)}},un=e=>{let t=q();switch(t){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return G?.has(e)??!1;default:return V(t),!1}},dn=e=>{let t=q();switch(t){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:G?.delete(e);return;default:V(t)}},fn=()=>{let e=q();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return G?.clear();default:V(e)}},pn=(e,t,n)=>{if(typeof e.canParse==`function`)return e.canParse(t,n);try{return new e(t,n),!0}catch{return!1}},mn=d(jt(),1),hn=()=>{let e,t=[],n=W();try{e=n.self!==n.top}catch(t){t instanceof DOMException&&t.name===`SecurityError`?e=!0:(e=!1,console.error(t))}try{n.location?.ancestorOrigins&&(t=[...n.location.ancestorOrigins])}catch(e){console.error(e)}try{!t.length&&n.document.referrer&&(t=[new URL(n.document.referrer).origin])}catch(e){console.error(e)}return t=t.filter(e=>pn(URL,e)),{isEmbed:e,origins:t,topOrigin:mn.default(t,-1),immediateOrigin:mn.default(t,0)}},gn;(e=>{e.INVARIANT=`Invariant quality`,e.Q_144P=`144p`,e.Q_240P=`240p`,e.Q_360P=`360p`,e.Q_480P=`480p`,e.Q_576P=`576p`,e.Q_720P=`720p`,e.Q_1080P=`1080p`,e.Q_1440P=`1440p`,e.Q_2160P=`2160p`,e.Q_4320P=`4320p`})(gn||={});var J={"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}},_n=(e,t)=>J[e].height>J[t].height,vn=(e,t)=>J[e].height>=J[t].height,yn=(e,t)=>J[e].height<J[t].height,bn=(e,t)=>J[e].height<=J[t].height,xn=e=>e.sort((e,t)=>e===t?0:e===`Invariant quality`?1:t===`Invariant quality`?-1:yn(e,t)?1:-1)[0],Sn=Object.keys(J).sort((e,t)=>yn(e,t)?-1:1),Cn=(e,t=.02)=>[...Sn].find(n=>J[n].height*(1+t)>=e),wn=({width:e,height:t})=>{let n=Math.min(e,t),r=Math.max(e,t);return Sn.find(e=>{let t=J[e];return t.width>=r&&t.height>=n})},Tn=e=>J[e].height,En=e=>e===`Invariant quality`,Dn=e=>e.every(e=>!En(e));function On(e){if(En(e))throw Error(`Expected exact quality`)}var kn=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``}},An=(e,t)=>{let n={};for(let r of Object.keys(t)){let i=t[r],a=e[r];Array.isArray(i)?n[r]=Array.isArray(a)?a:i:typeof i==`object`&&i?typeof a==`object`&&a&&!Array.isArray(a)?n[r]=An(a,i):n[r]=a??i:n[r]=r in e?a:i}return n},jn=e=>{let t=``;return e>=3600&&(t+=Math.floor(e/3600)+`h`,e%=3600),e>=60&&(t+=Math.floor(e/60)+`m`,e%=60),e>0&&(t+=Math.floor(e)+`s`),t};function Mn(e,t=0,n){let r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0,p=!t&&t!==0&&typeof W().requestAnimationFrame==`function`;n&&(u=!!n.leading,d=`maxWait`in n,a=n?.maxWait?Math.max(+n?.maxWait||0,t):a,f=`trailing`in n?!!n.trailing:f);function m(t){let n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function h(e,t){return p?(s&&W().cancelAnimationFrame(s),W().requestAnimationFrame(e)):setTimeout(e,t)}function g(e){if(p){W().cancelAnimationFrame(e);return}clearTimeout(e)}function _(e){return l=e,s=h(b,t),u?m(e):o}function v(e){let n=e-c,r=e-l,i=t-n;return d?Math.min(i,a-r):i}function y(e){let n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function b(){let e=Date.now();if(y(e))return x(e);s=h(b,v(e))}function x(e){return s=void 0,f&&r?m(e):(r=i=void 0,o)}function S(){s!==void 0&&g(s),l=0,r=c=i=s=void 0}function C(){return s===void 0?o:x(Date.now())}function w(){return s!==void 0}function T(...e){let n=Date.now(),a=y(n);if(r=e,i=this,c=n,a){if(s===void 0)return _(c);if(d)return s=h(b,t),m(c)}return s===void 0&&(s=h(b,t)),o}return T.cancel=S,T.flush=C,T.pending=w,T}var Nn=(e,n=0,r)=>Mn(e,n,t(t(t({},{leading:!0,trailing:!0}),r),{},{maxWait:n})),Pn=(e,t)=>{if(typeof e!=`object`||!e)return e;let n=Array.isArray(e)?[]:{};for(let r in e){if(typeof t==`function`){let i=t(e[r],r,e,n);if(i!==void 0){n[r]=i;continue}}typeof e[r]==`object`?n[r]=Pn(e[r],t):n[r]=e[r]}return n},Fn=e=>Pn(e);class In extends Vt{constructor(t){super(),e(this,`bufferSize`,void 0),e(this,`buffer`,[]),e(this,`cursorEnd`,-1),e(this,`cursorStart`,0),this.bufferSize=t,this.buffer=Array(t)}next(e){this.cursorEnd+=1,this.cursorStart=this.cursorEnd>=this.bufferSize?this.cursorStart+1:0,this.buffer[this.cursorEnd%this.bufferSize]=e,this.subscribers.forEach(t=>t.next(e))}_subscribe(e){for(let t=this.cursorStart;t<=this.cursorEnd;t++)e.next(this.buffer[t%this.bufferSize]);let t=this.keyCounter++;return this.subscribers.set(t,e),new B().add(()=>this.subscribers.delete(t))}}class Ln extends Vt{constructor(t){super(),e(this,`value`,void 0),this.value=t}next(e){super.next(this.value=e)}error(e){super.error(this.value=e)}getValue(){return this.value}_subscribe(e){let t=super._subscribe(e);return e.next(this.value),t}}var Rn=d(Ue(),1);function zn(e){return new H(t=>{let n={},r=Object.keys(e).length,i=e=>i=>{e in n||r--,n[e]=i,r===0&&t.next(n)};return Rn.default(e).reduce((e,[t,n])=>e.add(n.subscribe(i(t))),new B)})}function Bn(...e){return new H(t=>e.reduce((e,n)=>e.add(n.subscribe(t)),new B))}var Vn=e=>new H(t=>{let n=W().setTimeout(()=>{try{t.next()}catch(e){if(t.error)t.error(e);else throw e}},e);return()=>W().clearTimeout(n)}),Hn=e=>new H(t=>{let n=W(),r=n.setInterval(()=>t.next(),e);return()=>{r&&=(n.clearInterval(r),void 0)}}),Un=e=>new H(t=>{e.forEach(e=>t.next(e))}),Wn=(e,t)=>new H(n=>{let r=e=>n.next(e);return e.addEventListener(t,r),()=>e.removeEventListener(t,r)});class Gn extends B{remove(e){this.subscriptions=this.subscriptions.filter(t=>t!==e)}}function Kn(e){return t=>new H(n=>t.subscribe(new qn(n,e)))}class qn{constructor(t,n){e(this,`destination`,void 0),e(this,`size`,void 0),e(this,`lastValues`,[]),this.destination=t,this.size=n}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var t;(t=this.destination).error?.call(t,e)}}var Jn={leading:!1,trailing:!0};function Yn(e,t=Jn){return n=>new H(r=>n.subscribe(new Xn(r,e,t)))}class Xn{constructor(t,n,r){e(this,`destination`,void 0),e(this,`time`,void 0),e(this,`config`,void 0),e(this,`lastValue`,void 0),e(this,`timeout`,void 0),this.destination=t,this.time=n,this.config=r}next(e){this.lastValue=e;let t=W();U(this.timeout)?t.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=t.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(e){if(this.destination.error)this.destination.error(e);else throw e}this.timeout=void 0},this.time)}error(e){var t;(t=this.destination).error?.call(t,e)}}var Zn={leading:!0,trailing:!1};function Qn(e,t=Zn){return n=>new H(r=>n.subscribe(new $n(r,e,t)))}class $n{constructor(t,n,r){e(this,`destination`,void 0),e(this,`time`,void 0),e(this,`config`,void 0),e(this,`lastValue`,void 0),e(this,`timeout`,void 0),this.destination=t,this.time=n,this.config=r}next(e){this.lastValue=e,qt(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=W().setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){var t;(t=this.destination).error?.call(t,e)}}function er(e){return t=>new H(n=>t.subscribe(new tr(n,e)))}class tr{constructor(t,n){e(this,`destination`,void 0),e(this,`predicate`,void 0),this.destination=t,this.predicate=n}next(e){let t;try{t=this.predicate(e)}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}var nr=d(Ft(),1),rr=(e,t)=>{let n=(e,t)=>{let n=Object.keys(e);for(let r in t)if(!nr.default(n,r)||t[r]!==e[r])return!1;return!0};return n(e,t)&&n(t,e)},ir=(e,t)=>e instanceof Object&&t instanceof Object?rr(e,t):e===t;function ar(e=ir){return t=>new H(n=>t.subscribe(new sr(n,e)))}var or={};class sr{constructor(t,n){e(this,`destination`,void 0),e(this,`predicate`,void 0),e(this,`lastValue`,or),this.destination=t,this.predicate=n}next(e){let n;try{n=this.lastValue===or||!this.predicate(this.lastValue,e),this.lastValue=e instanceof Object&&!Array.isArray(e)?t({},e):e}catch(e){throw this.error(e),e}n&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function cr(e){return t=>new H(n=>t.subscribe(new lr(n,e)))}class lr{constructor(t,n){e(this,`destination`,void 0),e(this,`mapper`,void 0),this.destination=t,this.mapper=n}next(e){let t;try{t=this.mapper(e)}catch(e){throw this.error(e),e}this.destination.next(t)}error(e){var t;(t=this.destination).error?.call(t,e)}}function ur(e){return cr(()=>e)}function dr(){return e=>new H(t=>{let n=!1,r=!1,i=e.subscribe(e=>{n||(n=!0,t.next(e)),r&&i.unsubscribe()},e=>{n=!0,t.error?.call(t,e),r&&i.unsubscribe()});return r=!0,n&&i.unsubscribe(),i})}function fr(){return e=>new H(t=>e.subscribe(new pr(t)))}class pr{constructor(t){e(this,`destination`,void 0),e(this,`last`,void 0),e(this,`hasLast`,!1),this.destination=t}next(e){let t=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,e])}error(e){var t;(t=this.destination).error?.call(t,e)}}function mr(e){return t=>new H(n=>t.subscribe(new hr(n,e)))}class hr{constructor(t,n){e(this,`destination`,void 0),e(this,`effect`,void 0),this.destination=t,this.effect=n}next(e){try{this.effect(e)}catch(e){throw this.error(e),e}this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function gr(e){return t=>new H(n=>t.subscribe(new _r(n,e)))}class _r{constructor(t,n){if(e(this,`destination`,void 0),e(this,`count`,void 0),this.destination=t,this.count=n,n<0){var r;(r=this.destination).error?.call(r,Error(`Count can not be less than zero`))}}next(e){this.count===0?this.destination.next(e):this.count--}error(e){var t;(t=this.destination).error?.call(t,e)}}function vr(e=0){return t=>{let n=0,r=new In(e),i=t.subscribe(r),a=e=>()=>{e.unsubscribe(),n--,n===0&&i.unsubscribe()};return new H(e=>(n++,a(r.subscribe(e))))}}var yr=300,br=(e,t=yr)=>new H(n=>{let r=W(),{width:i,height:a}=e.getBoundingClientRect();if(n.next({width:i,height:a}),!Qt(r))return;let o=new r.ResizeObserver(Nn(e=>{let t=e[0];if(!t)return;let r,i;t.contentBoxSize&&t.contentBoxSize[0]?(i=t.contentBoxSize[0].blockSize,r=t.contentBoxSize[0].inlineSize):t.contentRect&&(r=t.contentRect.width,i=t.contentRect.height),U(r)&&U(i)&&n.next({width:r,height:i})},t));return o.observe(e),()=>o.disconnect()}),xr=(e,t=6,n=`.`)=>{let r={};for(let i in e)if(!(!e.hasOwnProperty(i)||e[i]instanceof HTMLElement||!t))if(typeof e[i]==`object`&&e[i]!==null){let a=xr(e[i],t-1);for(let e in a)a.hasOwnProperty(e)&&(r[i+n+e]=a[e])}else r[i]=e[i];return r},Sr=(e,t=!1)=>{t&&(e.innerHTML=``),e.removeAttribute(`src`),e.load()},Cr=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol===`https:`},wr=(e,t)=>!(e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom),Tr=(()=>{let e=0;return()=>{let t=e;return e=(e+1)%(2**53-1),t}})(),Er=e=>e!==void 0&&e!==``?e:Tr().toString();function Dr(e,t,n){if(e<=t[0])return n[0];if(e>=t[t.length-1])return n[n.length-1];let r=1;for(;r<t.length&&t[r]<e;)r++;r>=t.length&&(r=t.length-1);let i=t[r-1],a=t[r],o=n[r-1],s=n[r];return e===i?o:e===a?s:o+(e-i)/(a-i)*(s-o)}function Or(e,t,n){if(e<=0||n<0)return[];let r=[],i=Math.floor((e-1)/2),a=Math.floor(e/2),o=t-i,s=t+a;o<0&&(s+=Math.abs(o),o=0),s>n&&(o-=s-n,s=n),o=Math.max(0,o),s=Math.min(n,s);for(let e=o;e<=s;e++)r.push(e);return r}var kr=e=>e instanceof DOMException&&(e.name===`AbortError`||e.code===20),Ar=e=>{if(!kr(e))throw e},jr=e=>t=>n=>{let r=typeof n==`object`;n==null||r&&!Object.keys(n).length||e(t,r?xr(n):{value:n})},Mr=(e={})=>{let t=e=>{let t=e;return e===void 0?t=`undefined`:e===null?t=`null`:(typeof e==`number`||typeof e==`boolean`)&&(t=e.toString()),t},n={};for(let r in e)Array.isArray(e[r])?n[r]=e[r].map(t):n[r]=t(e[r]);return n};class Y{constructor({name:t,getParentContext:n}){e(this,`dynamicImportTimeout`,5e3),e(this,`span`,void 0),e(this,`context`,void 0),e(this,`childTracers`,[]),e(this,`initPromise`,void 0),Y.dynamicImportStatus===`not_started`&&(Y.dynamicImportPromise=this.loadOpentelemetry());let r=Date.now();this.initPromise=Y.dynamicImportPromise.then(e=>{Y.dynamicImportStatus===`completed`&&this.init({name:t,getParentContext:n},r)})}init({name:e,getParentContext:t},n){this.span=Y.rootTracer.startSpan(e,{startTime:n},t?.()),this.context=Y.dynamicImports.opentelemetryApi.trace.setSpan(Y.dynamicImports.opentelemetryApi.context.active(),this.span)}loadOpentelemetry(){var e=this;return n(function*(){if(Y.dynamicImportStatus===`not_started`){Y.dynamicImportStatus=`in_progress`;try{let t=new Promise((t,n)=>setTimeout(n,e.dynamicImportTimeout)),n=Promise.all([import(`@opentelemetry/api`),import(`@opentelemetry/sdk-trace-web`),import(`@apptracer/opentelemetry`)]),[r,i,a]=yield Promise.race([n,t]);Y.dynamicImports={opentelemetryApi:r,opentelemetrySdk:i,tracer:a},Y.dynamicImportStatus=`completed`}catch{Y.dynamicImportStatus=`failed`}}})()}isComponentTracerNotInitialized(){return qt(this.span)||Y.dynamicImportStatus===`failed`}log(e,n){let r=Date.now();this.initPromise.then(i=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,t(t({},Mr(n)),{},{type:`log`}),r)})}error(e,n){let r=Date.now();this.initPromise.then(i=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,t(t({},Mr(n)),{},{type:`error`}),r)})}critical(e,n){let r=Date.now();this.initPromise.then(i=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,t(t({},Mr(n)),{},{type:`critical`}),r)})}createComponentTracer(e){let t=new Y({name:e,getParentContext:()=>this.context});return this.childTracers.push(t),t}end(){this.initPromise.then(e=>{this.isComponentTracerNotInitialized()||(this.childTracers.forEach(e=>e.end()),this.span.end())})}}e(Y,`rootTracer`,void 0),e(Y,`dynamicImportStatus`,`not_started`),e(Y,`dynamicImports`,void 0),e(Y,`dynamicImportPromise`,void 0);class Nr extends Y{constructor(){super({name:`Root`}),e(this,`spanExporter`,void 0)}init({name:e,getParentContext:t},n){let r=Y.dynamicImports.tracer.initTracerOpenTelemetry({serviceName:`videoplayer-sdk-web`,appToken:`L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb`,spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),i=new Y.dynamicImports.tracer.TracerMemorySpanExporter;this.spanExporter=i,r.addSpanProcessor(new Y.dynamicImports.tracer.TracerAllSpansProcessor({startedSpansExporter:i})),Y.rootTracer=r.getTracer(`sdk-videoplayer-tracer`),super.init({name:e,getParentContext:t},n)}getFinishedSpans(){if(!this.isComponentTracerNotInitialized())return this.spanExporter?.getJsonData()}getTraceId(){return this.isComponentTracerNotInitialized()?``:this.span.spanContext().traceId}}class Pr{constructor(t){e(this,`fakeTraceId`,void 0)}log(e,t){}error(e,t){}critical(e,t){}createComponentTracer(e){return new Pr({name:e})}end(){}getFinishedSpans(){}getTraceId(){return this.fakeTraceId}}class Fr{static createRootTracer(e=!1){return e?new Nr:new Pr}}var Ir;(e=>{e.NETWORK=`network`,e.VIDEO_PIPELINE=`video_pipeline`,e.EXTERNAL_API=`external_api`,e.PARSER=`parser`,e.DOM=`dom`,e.WTF=`wtf`,e.FATAL=`fatal`})(Ir||={});var{NativeAbortSignal:Lr,NativeAbortController:Rr}=function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}}(typeof self<`u`?self:global);function zr(e){let t;try{t=new Event(`abort`)}catch{typeof document<`u`?document.createEvent?(t=document.createEvent(`Event`),t.initEvent(`abort`,!1,!1)):(t=document.createEventObject(),t.type=`abort`):t={type:`abort`,bubbles:!1,cancelable:!1}}return t.reason=e,t}function Br(e){if(e===void 0)if(typeof document>`u`)e=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=Error(`This operation was aborted`),e.name=`AbortError`}return e}class Vr{constructor(){Object.defineProperty(this,`listeners`,{value:{},writable:!0,configurable:!0})}addEventListener(e,t,n){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:n})}removeEventListener(e,t){if(!(e in this.listeners))return;let n=this.listeners[e];for(let e=0,r=n.length;e<r;e++)if(n[e].callback===t){n.splice(e,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let t=this.listeners[e.type].slice();for(let n=0,r=t.length;n<r;n++){let r=t[n];try{r.callback.call(this,e)}catch(e){Promise.resolve().then(()=>{throw e})}r.options&&r.options.once&&this.removeEventListener(e.type,r.callback)}return!e.defaultPrevented}}class Hr extends Vr{constructor(){super(),this.listeners||Vr.call(this),Object.defineProperty(this,`aborted`,{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,`onabort`,{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,`reason`,{value:void 0,writable:!0,configurable:!0})}toString(){return`[object AbortSignal]`}dispatchEvent(e){e.type===`abort`&&(this.aborted=!0,typeof this.onabort==`function`&&this.onabort.call(this,e)),super.dispatchEvent(e)}throwIfAborted(){let{aborted:e,reason:t=`Aborted`}=this;if(e)throw t}static timeout(e){let t=new Ur;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,`TimeoutError`)),e),t.signal}static any(e){let t=new Ur;function n(){t.abort(this.reason),r()}function r(){for(let t of e)t.removeEventListener(`abort`,n)}for(let r of e)if(r.aborted){t.abort(r.reason);break}else r.addEventListener(`abort`,n);return t.signal}}class Ur{constructor(){Object.defineProperty(this,`signal`,{value:new Hr,writable:!0,configurable:!0})}abort(e){let t=Br(e),n=zr(t);this.signal.reason=t,this.signal.dispatchEvent(n)}toString(){return`[object AbortController]`}}typeof Symbol<`u`&&Symbol.toStringTag&&(Ur.prototype[Symbol.toStringTag]=`AbortController`,Hr.prototype[Symbol.toStringTag]=`AbortSignal`);function Wr(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 Gr(e){typeof e==`function`&&(e={fetch:e});let{fetch:t,Request:n=t.Request,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!Wr({fetch:t,Request:n,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:t,Request:a};let a=n;(a&&!a.prototype.hasOwnProperty(`signal`)||i)&&(a=function(e,t){let r;t&&t.signal&&(r=t.signal,delete t.signal);let i=new n(e,t);return r&&Object.defineProperty(i,`signal`,{writable:!1,enumerable:!1,configurable:!0,value:r}),i},a.prototype=n.prototype);let o=t;return{fetch:(e,t)=>{let n=a&&a.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(n){let r;try{r=new DOMException(`Aborted`,`AbortError`)}catch{r=Error(`Aborted`),r.name=`AbortError`}if(n.aborted)return Promise.reject(r);let i=new Promise((e,t)=>{n.addEventListener(`abort`,()=>t(r),{once:!0})});return t&&t.signal&&delete t.signal,Promise.race([i,o(e,t)])}return o(e,t)},Request:a}}var X=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window,Kr=`fetch`in X&&Wr({fetch:X.fetch,Request:X.Request,AbortController:X.AbortController}),qr=Kr?Gr({fetch:X.fetch,Request:X.Request,AbortController:X.AbortController}):void 0,Jr=Kr?qr.fetch:X.fetch;Kr?qr.Request:X.Request,Kr||X.AbortController,Kr||X.AbortSignal;var Yr=d(Ue(),1),Xr=d(St(),1),Zr;(e=>{e.Armenian=`58`,e.Azerbaijani=`57`,e.Belarusian=`114`,e.English=`3`,e.Kazakh=`97`,e.Portuguese=`73`,e.Russian=`0`,e.Spanish=`4`,e.Ukrainian=`1`,e.Uzbek=`65`,e.Vietnamese=`75`})(Zr||={});var Qr=`vk.com`,$r=function(){var e=n(function*(e,t,n){let r=new URL(`https://${Qr}/js/lang-pack.js`);return r.searchParams.set(`format`,`json`),r.searchParams.set(`name`,t),e!==void 0&&r.searchParams.set(`lang`,e),ei(yield(yield Jr(r.toString())).json(),n)});return function(t,n,r){return e.apply(this,arguments)}}(),ei=(e,t)=>Xr.default(Yr.default(e.keys).map(([e,n])=>[e.substring(`${t}_`.length),ti(n)])),ti=e=>Array.isArray(e)?e[0]:e,ni;(e=>{e.RU=`ru`,e.EN=`en`})(ni||={});var Z=`__vk_vp_internals_exposure`;class ri{constructor(t,n){e(this,`playerId`,void 0),e(this,`type`,void 0),this.playerId=n,this.type=t,this.initWindowObjects()}getWindowObject(){var e;if(typeof window>`u`)return{};let t=this.playerId,n=this.type;return((e=window[Z])==null||(e=e[t])==null?void 0:e[n])??{}}initWindowObjects(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[Z]||(window[Z]={}),window[Z][e]||(window[Z][e]={}),window[Z][e][t]||(window[Z][e][t]={})}expose(e){typeof window>`u`||Object.assign(this.getWindowObject(),e)}destroy(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[Z]&&window[Z][e]&&window[Z][e][t]&&(delete window[Z][e][t],Object.keys(window[Z][e]).length||delete window[Z][e],Object.keys(window[Z]).length||delete window[Z])}}var ii={};h(ii,{subscribe:()=>ci,push:()=>si,destroy:()=>oi,create:()=>ai});var Q=new Map,ai=(e,t)=>Q.set(e,t??[]),oi=e=>Q.delete(e),si=(e,t)=>{let n=Q.get(e);n&&(typeof n==`function`?n(t):n.push(t))},ci=(e,t)=>{let n=Q.get(e);if(n){if(n&&Array.isArray(n))for(let e of n)t(e);Q.set(e,t)}},li=d(Ft(),1),ui=(e,...t)=>typeof e==`string`?e.includes(...t):li.default(e,...t),di=`gW5EerTD5QhAnsbpF7Hd2NSMRteYIUUMjFbSyI68Pf5`,fi=e=>Jt({id:e.id,message:e.message,category:e.category,data:pi(e.data),httpCode:e.httpCode,UVBackendErrorCode:e.UVBackendErrorCode});function pi(e){switch(typeof e){case`boolean`:case`string`:case`number`:return e;case`object`:try{return JSON.stringify(e)}catch{return}default:return}}var mi=e=>{if(e.thrown instanceof Error)return e.thrown.name=e.id,e.thrown;let t=Error(e.message);return t.name=e.id,t},hi=()=>{try{let{origin:e,pathname:n,search:r,hostname:i}=W().document.location;return i===`localhost`?void 0:t({url:e+n},new URLSearchParams(r).entries().reduce((e,[t,n])=>(e[`url.${t}`]=n,e),{}))}catch(e){console.error(e)}};class ${constructor(t,n,r,i){e(this,`dynamicImportTimeout`,5e3),e(this,`componentName`,void 0),e(this,`subscription`,new B),e(this,`options`,void 0),e(this,`envParams`,void 0),e(this,`context`,void 0),this.componentName=t,this.options=n,this.envParams=r,this.context=i,this.options.enabled&&(this.loadModule(),this.init())}error(e,n){let{blackErrorCategoryList:r,blackErrorIdList:i,sampleRate:a,whiteErrorCategoryList:o,whiteErrorIdList:s}=this.options,{id:c,category:l}=e;r.length&&ui(r,l)||i.length&&ui(i,c)||o.length&&!ui(o,l)||s.length&&!ui(s,c)||Math.random()>=a||$.tracerErrorMap.get(this.componentName)?.error(mi(e),{severity:n?.severity??(e.traceAsLog?`debug`:void 0),keys:t(t(t({},this.context),fi(e)),hi())})}addSubscription(e){this.subscription.add(e)}destroy(){this.subscription.unsubscribe()}init(){var e=this;return n(function*(){try{if(yield $.loadPromise,$.tracerErrorMap.has(e.componentName)||qt($.appTracerModule))return;let{appTracerModule:t}=$,{initTracerError:n,initTracerErrorUploader:r,addTracerPlugin:i,getTracerModules:a}=t,o=a(e.componentName),s=!o.error,c=o.error??n(e.componentName,{enableUnhandledErrorsListeners:!1,stringifyErrorDataObject:!0});s&&r(e.componentName,{appToken:di,environment:e.envParams.env,versionCode:1,versionName:e.envParams.version}),i(e.componentName,{name:`addedCategory`,errorBeforeAdd(e){let t=e.keys?.category??`wtf`;if(typeof t==`string`)return{issueKey:t}}}),$.tracerErrorMap.set(e.componentName,c)}catch{}})()}loadModule(){var e=this;U($.loadPromise)||($.loadPromise=function(){var t=n(function*(){try{let t=new Promise((t,n)=>W().setTimeout(n,e.dynamicImportTimeout));$.appTracerModule=yield Promise.race([t,import(`@apptracer/sdk/lite`)])}catch{$.loadPromise=null}});return function(){return t.apply(this,arguments)}}()())}}e($,`tracerErrorMap`,new Map),e($,`appTracerModule`,null),e($,`loadPromise`,null);export{Jt as withoutNullable,wn as videoSizeToQuality,Tn as videoQualityToHeight,Cn as videoHeightToQuality,Vn as timeout,jn as timeCodeToString,Nn as throttleFn,Qn as throttle,mr as tap,Ar as suppressAbort,gr as skip,vr as shareReplay,an as safeStorage,fr as pairwise,dr as once,br as observeElementSize,Un as observableFrom,tn as nowInt,en as now,Rt as noop,Bn as merge,ur as mapTo,cr as map,$r as loadVKLangPack,Cr as isValidURL,qt as isNullable,U as isNonNullable,bn as isLowerOrEqual,yn as isLower,En as isInvariantQuality,wr as isIntersecting,vn as isHigherOrEqual,_n as isHigher,Qt as isBrowserWindow,kr as isAbortError,Hn as interval,Dr as interpolate,W as getWindow,kn as getVideoQualityLabel,jr as getTraceSubscriptionMethod,Or as getRangeAroundIndex,Er as getPlayerId,xn as getHighestQuality,rn as getExponentialDelay,Wn as fromEvent,xr as flattenObject,ar as filterChanged,er as filter,An as fillWithDefault,ii as devNull,hn as detectEmbed,Mn as debounceFn,Yn as debounce,zn as combine,Pn as cloneDeepWith,Fn as cloneDeep,Sr as clearVideoElement,Lt as checkNever,Kn as buffer,On as assertQualityIsExact,Kt as assertNullable,Yt as assertNotEmptyArray,Gt as assertNonNullable,V as assertNever,Xt as assertEmptyArray,Dn as areQualitiesExact,$t as addScript,nn as abortable,gn as VideoQuality,Ln as ValueSubject,Zr as VKNumericLanguage,It as VERSION,Fr as TracerFactory,Gn as SubscriptionRemovable,B as Subscription,Vt as Subject,In as ReplaySubject,H as Observable,Ht as Logger,ri as InternalsExposure,ni as InterfaceLanguage,Z as INTERNAL_EXPOSE_GLOBAL_KEY,Ir as ErrorCategory,$ as AppTracer};
|
|
7
|
-
//# sourceMappingURL=es2015.esm.js.map
|
|
6
|
+
import e from"@oxc-project/runtime/helpers/defineProperty";import t from"@oxc-project/runtime/helpers/objectSpread2";import n from"@oxc-project/runtime/helpers/asyncToGenerator";var r=Object.defineProperty,i=e=>e;function a(e,t){this[e]=i.bind(null,t)}var o=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0,configurable:!0,set:a.bind(t,n)})},s=`1.0.87-beta.1`;class c{constructor(){e(this,`subscriptions`,[])}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(e=>{typeof e==`function`?e():e.unsubscribe()})}add(e){return this.subscriptions.push(e),this}}var l=e=>{throw Error(`${e} is value of unexpected type`)},u=e=>{},d=()=>{},f=e=>{throw console.error(e),e},p=e=>{console.error(e)};class m{constructor(t){e(this,`suppressErrors`,!1),t&&(this._subscribe=t)}setSuppressErrors(e){this.suppressErrors=e}subscribe(e,t){let n=this.suppressErrors?p:f,r;r=t?typeof t==`function`?{next:t,error:d}:{next:e=>t.next(e),error:e=>t.error?.call(t,e)}:{next:n,error:d};let i=typeof e==`function`?{next:t=>{try{let n=e(t);n instanceof Promise&&n.catch(e=>r.next(e))}catch(e){r.next(e)}},error:e=>r.next(e)}:{next:t=>e.next(t),error:t=>e.error?e.error(t):r.next(t)},a;try{a=this._subscribe(i)}catch(e){i.error?.call(i,e)}return new c().add(()=>{switch(i.next=d,i.error=d,typeof a){case`function`:a();return;case`object`:a.unsubscribe();return;case`undefined`:return;default:return l(a)}})}pipe(...e){return e.reduce((e,t)=>t(e),this)}_subscribe(e){}}class h extends m{constructor(){super(),e(this,`keyCounter`,0),e(this,`subscribers`,new Map)}next(e){this.subscribers.forEach(t=>t.next(e))}error(e){this.subscribers.forEach(t=>t.error?.call(t,e))}_subscribe(e){let t=this.keyCounter++;return this.subscribers.set(t,e),new c().add(()=>this.subscribers.delete(t))}}class ee{constructor(){e(this,`log$`,new h),e(this,`logs`,[]),e(this,`log`,e=>{let n=t(t({},e),{},{timestamp:Date.now()});this.logs.push(n),this.log$.next(n)}),e(this,`getAllLogs`,()=>this.logs)}createCustomLog(e){return(...t)=>{let n;try{n=e(...t)}catch{n={message:"error in `createCustomLog`",component:`Logger`}}this.log(n)}}createComponentLog(e){return this.createCustomLog(n=>t({component:e},n))}}function te(e,t=`Assertion "value is not nullable" failed`){if(e==null)throw Error(t)}function g(e,t=`Assertion "value is nullable" failed`){if(e!=null)throw Error(t)}function _(e){return e!=null}function v(e){return e==null}var y=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>_(t)));function ne(e,t){if(!e?.length)throw Error(t)}function re(e,t){if(e?.length)throw Error(t)}var b=()=>globalThis,x=(e=b())=>!!(e.window&&e.screen),S=(e,t,n)=>new Promise((r,i)=>{t.addEventListener(`abort`,()=>{s(),l.remove()});let a=()=>{s(),i(`error`)},o=()=>{s(),r()},s=()=>{c&&clearTimeout(c),l.removeEventListener(`load`,o),l.removeEventListener(`error`,a)},c;n&&(c=b().setTimeout(()=>{s(),i(`timeout`)},n));let l=document.createElement(`script`);l.addEventListener(`load`,o),l.addEventListener(`error`,a),l.src=e,document.head.appendChild(l)}),C=typeof b().performance?.now==`function`?()=>b().performance.now():()=>Date.now(),ie=()=>Math.trunc(C()),ae=(e,t)=>n(function*(...n){let r=t(...n),i=e.aborted,a;for(;!i&&!e.aborted;)try{let e=yield r.next(a);i=e.done??!1,a=e.value}catch(e){yield r.throw(e)}return a}),oe=(e,{start:t=0,factor:n=2,max:r=1/0,min:i=t,random:a=0}={})=>{let o=t;return o*=n**+e,o*=1+(Math.random()*a*2-a),o=Math.round(o),o=Math.min(o,r),o=Math.max(o,i),o},w={};o(w,{set:()=>le,remove:()=>de,isPersistent:()=>se,has:()=>ue,get:()=>ce,clear:()=>fe});var T,E,D=`vk-videoplayer-dummy-key-${Math.random()}`,O=()=>{if(E!==void 0)return E;try{localStorage.setItem(D,`test`),localStorage.removeItem(D),E=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(D),E=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)E=2;else throw e}else throw e}return E===2&&(T=new Map),E},se=()=>O()===0,ce=e=>{let t=O();switch(t){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return T?.get(e);default:l(t)}},le=(e,t)=>{let n=O();switch(n){case 0:try{localStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 1:try{sessionStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 2:T?.set(e,t);return;default:l(n)}},ue=e=>{let t=O();switch(t){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return T?.has(e)??!1;default:return l(t),!1}},de=e=>{let t=O();switch(t){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:T?.delete(e);return;default:l(t)}},fe=()=>{let e=O();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return T?.clear();default:l(e)}},pe=()=>{let e,t=[],n=b();try{e=n.self!==n.top}catch(t){t instanceof DOMException&&t.name===`SecurityError`?e=!0:(e=!1,console.error(t))}try{n.location?.ancestorOrigins&&(t=[...n.location.ancestorOrigins])}catch(e){console.error(e)}try{!t.length&&n.document.referrer&&(t=[new URL(n.document.referrer).origin])}catch(e){console.error(e)}return t=t.filter(e=>URL.canParse(e)),{isEmbed:e,origins:t,topOrigin:t.at(-1),immediateOrigin:t.at(0)}},k;(e=>{e.INVARIANT=`Invariant quality`,e.Q_144P=`144p`,e.Q_240P=`240p`,e.Q_360P=`360p`,e.Q_480P=`480p`,e.Q_576P=`576p`,e.Q_720P=`720p`,e.Q_1080P=`1080p`,e.Q_1440P=`1440p`,e.Q_2160P=`2160p`,e.Q_4320P=`4320p`})(k||={});var A={"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}},me=(e,t)=>A[e].height>A[t].height,he=(e,t)=>A[e].height>=A[t].height,j=(e,t)=>A[e].height<A[t].height,ge=(e,t)=>A[e].height<=A[t].height,_e=e=>e.sort((e,t)=>e===t?0:e===`Invariant quality`?1:t===`Invariant quality`?-1:j(e,t)?1:-1)[0],M=Object.keys(A).sort((e,t)=>j(e,t)?-1:1),ve=(e,t=.02)=>[...M].find(n=>A[n].height*(1+t)>=e),ye=({width:e,height:t})=>{let n=Math.min(e,t),r=Math.max(e,t);return M.find(e=>{let t=A[e];return t.width>=r&&t.height>=n})},be=e=>A[e].height,N=e=>e===`Invariant quality`,xe=e=>e.every(e=>!N(e));function Se(e){if(N(e))throw Error(`Expected exact quality`)}var Ce=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``}},P=(e,t)=>{let n={};for(let r of Object.keys(t)){let i=t[r],a=e[r];Array.isArray(i)?n[r]=Array.isArray(a)?a:i:typeof i==`object`&&i?typeof a==`object`&&a&&!Array.isArray(a)?n[r]=P(a,i):n[r]=a??i:n[r]=r in e?a:i}return n},we=e=>{let t=``;return e>=3600&&(t+=Math.floor(e/3600)+`h`,e%=3600),e>=60&&(t+=Math.floor(e/60)+`m`,e%=60),e>0&&(t+=Math.floor(e)+`s`),t};function F(e,t=0,n){let r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0,p=!t&&t!==0&&typeof b().requestAnimationFrame==`function`;n&&(u=!!n.leading,d=`maxWait`in n,a=n?.maxWait?Math.max(+n?.maxWait||0,t):a,f=`trailing`in n?!!n.trailing:f);function m(t){let n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function h(e,t){return p?(s&&b().cancelAnimationFrame(s),b().requestAnimationFrame(e)):setTimeout(e,t)}function ee(e){if(p){b().cancelAnimationFrame(e);return}clearTimeout(e)}function te(e){return l=e,s=h(v,t),u?m(e):o}function g(e){let n=e-c,r=e-l,i=t-n;return d?Math.min(i,a-r):i}function _(e){let n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function v(){let e=Date.now();if(_(e))return y(e);s=h(v,g(e))}function y(e){return s=void 0,f&&r?m(e):(r=i=void 0,o)}function ne(){s!==void 0&&ee(s),l=0,r=c=i=s=void 0}function re(){return s===void 0?o:y(Date.now())}function x(){return s!==void 0}function S(...e){let n=Date.now(),a=_(n);if(r=e,i=this,c=n,a){if(s===void 0)return te(c);if(d)return s=h(v,t),m(c)}return s===void 0&&(s=h(v,t)),o}return S.cancel=ne,S.flush=re,S.pending=x,S}var I=(e,n=0,r)=>F(e,n,t(t(t({},{leading:!0,trailing:!0}),r),{},{maxWait:n})),L=(e,t)=>{if(typeof e!=`object`||!e)return e;let n=Array.isArray(e)?[]:{};for(let r in e){if(typeof t==`function`){let i=t(e[r],r,e,n);if(i!==void 0){n[r]=i;continue}}typeof e[r]==`object`?n[r]=L(e[r],t):n[r]=e[r]}return n},Te=e=>L(e);class R extends h{constructor(t){super(),e(this,`bufferSize`,void 0),e(this,`buffer`,[]),e(this,`cursorEnd`,-1),e(this,`cursorStart`,0),this.bufferSize=t,this.buffer=Array(t)}next(e){this.cursorEnd+=1,this.cursorStart=this.cursorEnd>=this.bufferSize?this.cursorStart+1:0,this.buffer[this.cursorEnd%this.bufferSize]=e,this.subscribers.forEach(t=>t.next(e))}_subscribe(e){for(let t=this.cursorStart;t<=this.cursorEnd;t++)e.next(this.buffer[t%this.bufferSize]);let t=this.keyCounter++;return this.subscribers.set(t,e),new c().add(()=>this.subscribers.delete(t))}}class Ee extends h{constructor(t){super(),e(this,`value`,void 0),this.value=t}next(e){super.next(this.value=e)}error(e){super.error(this.value=e)}getValue(){return this.value}_subscribe(e){let t=super._subscribe(e);return e.next(this.value),t}}function De(e){return new m(t=>{let n={},r=Object.keys(e).length,i=e=>i=>{e in n||r--,n[e]=i,r===0&&t.next(n)};return Object.entries(e).reduce((e,[t,n])=>e.add(n.subscribe(i(t))),new c)})}function Oe(...e){return new m(t=>e.reduce((e,n)=>e.add(n.subscribe(t)),new c))}var ke=e=>new m(t=>{let n=b().setTimeout(()=>{try{t.next()}catch(e){if(t.error)t.error(e);else throw e}},e);return()=>b().clearTimeout(n)}),Ae=e=>new m(t=>{let n=b(),r=n.setInterval(()=>t.next(),e);return()=>{r&&=(n.clearInterval(r),void 0)}}),je=e=>new m(t=>{e.forEach(e=>t.next(e))}),Me=(e,t)=>new m(n=>{let r=e=>n.next(e);return e.addEventListener(t,r),()=>e.removeEventListener(t,r)});class Ne extends c{remove(e){this.subscriptions=this.subscriptions.filter(t=>t!==e)}}function Pe(e){return t=>new m(n=>t.subscribe(new Fe(n,e)))}class Fe{constructor(t,n){e(this,`destination`,void 0),e(this,`size`,void 0),e(this,`lastValues`,[]),this.destination=t,this.size=n}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var t;(t=this.destination).error?.call(t,e)}}var Ie={leading:!1,trailing:!0};function Le(e,t=Ie){return n=>new m(r=>n.subscribe(new Re(r,e,t)))}class Re{constructor(t,n,r){e(this,`destination`,void 0),e(this,`time`,void 0),e(this,`config`,void 0),e(this,`lastValue`,void 0),e(this,`timeout`,void 0),this.destination=t,this.time=n,this.config=r}next(e){this.lastValue=e;let t=b();_(this.timeout)?t.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=t.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(e){if(this.destination.error)this.destination.error(e);else throw e}this.timeout=void 0},this.time)}error(e){var t;(t=this.destination).error?.call(t,e)}}var ze={leading:!0,trailing:!1};function Be(e,t=ze){return n=>new m(r=>n.subscribe(new Ve(r,e,t)))}class Ve{constructor(t,n,r){e(this,`destination`,void 0),e(this,`time`,void 0),e(this,`config`,void 0),e(this,`lastValue`,void 0),e(this,`timeout`,void 0),this.destination=t,this.time=n,this.config=r}next(e){this.lastValue=e,v(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=b().setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){var t;(t=this.destination).error?.call(t,e)}}function He(e){return t=>new m(n=>t.subscribe(new Ue(n,e)))}class Ue{constructor(t,n){e(this,`destination`,void 0),e(this,`predicate`,void 0),this.destination=t,this.predicate=n}next(e){let t;try{t=this.predicate(e)}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}var We=(e,t)=>{let n=(e,t)=>{let n=Object.keys(e);for(let r in t)if(!n.includes(r)||t[r]!==e[r])return!1;return!0};return n(e,t)&&n(t,e)},Ge=(e,t)=>e instanceof Object&&t instanceof Object?We(e,t):e===t;function Ke(e=Ge){return t=>new m(n=>t.subscribe(new qe(n,e)))}var z={};class qe{constructor(t,n){e(this,`destination`,void 0),e(this,`predicate`,void 0),e(this,`lastValue`,z),this.destination=t,this.predicate=n}next(e){let n;try{n=this.lastValue===z||!this.predicate(this.lastValue,e),this.lastValue=e instanceof Object&&!Array.isArray(e)?t({},e):e}catch(e){throw this.error(e),e}n&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function B(e){return t=>new m(n=>t.subscribe(new Je(n,e)))}class Je{constructor(t,n){e(this,`destination`,void 0),e(this,`mapper`,void 0),this.destination=t,this.mapper=n}next(e){let t;try{t=this.mapper(e)}catch(e){throw this.error(e),e}this.destination.next(t)}error(e){var t;(t=this.destination).error?.call(t,e)}}function Ye(e){return B(()=>e)}function Xe(){return e=>new m(t=>{let n=!1,r=!1,i=e.subscribe(e=>{n||(n=!0,t.next(e)),r&&i.unsubscribe()},e=>{n=!0,t.error?.call(t,e),r&&i.unsubscribe()});return r=!0,n&&i.unsubscribe(),i})}function Ze(){return e=>new m(t=>e.subscribe(new Qe(t)))}class Qe{constructor(t){e(this,`destination`,void 0),e(this,`last`,void 0),e(this,`hasLast`,!1),this.destination=t}next(e){let t=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,e])}error(e){var t;(t=this.destination).error?.call(t,e)}}function $e(e){return t=>new m(n=>t.subscribe(new et(n,e)))}class et{constructor(t,n){e(this,`destination`,void 0),e(this,`effect`,void 0),this.destination=t,this.effect=n}next(e){try{this.effect(e)}catch(e){throw this.error(e),e}this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function tt(e){return t=>new m(n=>t.subscribe(new nt(n,e)))}class nt{constructor(t,n){if(e(this,`destination`,void 0),e(this,`count`,void 0),this.destination=t,this.count=n,n<0){var r;(r=this.destination).error?.call(r,Error(`Count can not be less than zero`))}}next(e){this.count===0?this.destination.next(e):this.count--}error(e){var t;(t=this.destination).error?.call(t,e)}}function rt(e=0){return t=>{let n=0,r=new R(e),i=t.subscribe(r),a=e=>()=>{e.unsubscribe(),n--,n===0&&i.unsubscribe()};return new m(e=>(n++,a(r.subscribe(e))))}}var it=300,at=(e,t=it)=>new m(n=>{let r=b(),{width:i,height:a}=e.getBoundingClientRect();if(n.next({width:i,height:a}),!x(r))return;let o=new r.ResizeObserver(I(e=>{let t=e[0];if(!t)return;let r,i;t.contentBoxSize&&t.contentBoxSize[0]?(i=t.contentBoxSize[0].blockSize,r=t.contentBoxSize[0].inlineSize):t.contentRect&&(r=t.contentRect.width,i=t.contentRect.height),_(r)&&_(i)&&n.next({width:r,height:i})},t));return o.observe(e),()=>o.disconnect()}),V=(e,t=6,n=`.`)=>{let r={};for(let i in e)if(!(!e.hasOwnProperty(i)||e[i]instanceof HTMLElement||!t))if(typeof e[i]==`object`&&e[i]!==null){let a=V(e[i],t-1);for(let e in a)a.hasOwnProperty(e)&&(r[i+n+e]=a[e])}else r[i]=e[i];return r},ot=(e,t=!1)=>{t&&(e.innerHTML=``),e.removeAttribute(`src`),e.load()},st=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol===`https:`},ct=(e,t)=>!(e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom),lt=(()=>{let e=0;return()=>{let t=e;return e=(e+1)%(2**53-1),t}})(),ut=e=>e!==void 0&&e!==``?e:lt().toString();function dt(e,t,n){if(e<=t[0])return n[0];if(e>=t[t.length-1])return n[n.length-1];let r=1;for(;r<t.length&&t[r]<e;)r++;r>=t.length&&(r=t.length-1);let i=t[r-1],a=t[r],o=n[r-1],s=n[r];return e===i?o:e===a?s:o+(e-i)/(a-i)*(s-o)}function ft(e,t,n){if(e<=0||n<0)return[];let r=[],i=Math.floor((e-1)/2),a=Math.floor(e/2),o=t-i,s=t+a;o<0&&(s+=Math.abs(o),o=0),s>n&&(o-=s-n,s=n),o=Math.max(0,o),s=Math.min(n,s);for(let e=o;e<=s;e++)r.push(e);return r}var H=e=>e instanceof DOMException&&(e.name===`AbortError`||e.code===20),pt=e=>{if(!H(e))throw e},mt=e=>t=>n=>{let r=typeof n==`object`;n==null||r&&!Object.keys(n).length||e(t,r?V(n):{value:n})},U=(e={})=>{let t=e=>{let t=e;return e===void 0?t=`undefined`:e===null?t=`null`:(typeof e==`number`||typeof e==`boolean`)&&(t=e.toString()),t},n={};for(let r in e)Array.isArray(e[r])?n[r]=e[r].map(t):n[r]=t(e[r]);return n};class W{constructor({name:t,getParentContext:n}){e(this,`dynamicImportTimeout`,5e3),e(this,`span`,void 0),e(this,`context`,void 0),e(this,`childTracers`,[]),e(this,`initPromise`,void 0),W.dynamicImportStatus===`not_started`&&(W.dynamicImportPromise=this.loadOpentelemetry());let r=Date.now();this.initPromise=W.dynamicImportPromise.then(e=>{W.dynamicImportStatus===`completed`&&this.init({name:t,getParentContext:n},r)})}init({name:e,getParentContext:t},n){this.span=W.rootTracer.startSpan(e,{startTime:n},t?.()),this.context=W.dynamicImports.opentelemetryApi.trace.setSpan(W.dynamicImports.opentelemetryApi.context.active(),this.span)}loadOpentelemetry(){var e=this;return n(function*(){if(W.dynamicImportStatus===`not_started`){W.dynamicImportStatus=`in_progress`;try{let t=new Promise((t,n)=>setTimeout(n,e.dynamicImportTimeout)),n=Promise.all([import(`@opentelemetry/api`),import(`@opentelemetry/sdk-trace-web`),import(`@apptracer/opentelemetry`)]),[r,i,a]=yield Promise.race([n,t]);W.dynamicImports={opentelemetryApi:r,opentelemetrySdk:i,tracer:a},W.dynamicImportStatus=`completed`}catch{W.dynamicImportStatus=`failed`}}})()}isComponentTracerNotInitialized(){return v(this.span)||W.dynamicImportStatus===`failed`}log(e,n){let r=Date.now();this.initPromise.then(i=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,t(t({},U(n)),{},{type:`log`}),r)})}error(e,n){let r=Date.now();this.initPromise.then(i=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,t(t({},U(n)),{},{type:`error`}),r)})}critical(e,n){let r=Date.now();this.initPromise.then(i=>{this.isComponentTracerNotInitialized()||this.span.addEvent(e,t(t({},U(n)),{},{type:`critical`}),r)})}createComponentTracer(e){let t=new W({name:e,getParentContext:()=>this.context});return this.childTracers.push(t),t}end(){this.initPromise.then(e=>{this.isComponentTracerNotInitialized()||(this.childTracers.forEach(e=>e.end()),this.span.end())})}}e(W,`rootTracer`,void 0),e(W,`dynamicImportStatus`,`not_started`),e(W,`dynamicImports`,void 0),e(W,`dynamicImportPromise`,void 0);class ht extends W{constructor(){super({name:`Root`}),e(this,`spanExporter`,void 0)}init({name:e,getParentContext:t},n){let r=W.dynamicImports.tracer.initTracerOpenTelemetry({serviceName:`videoplayer-sdk-web`,appToken:`L9SBoka6ZWk4xPjaK7tmfSfYvMhcge7nvGDjpdMmscb`,spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0}}).getProvider(),i=new W.dynamicImports.tracer.TracerMemorySpanExporter;this.spanExporter=i,r.addSpanProcessor(new W.dynamicImports.tracer.TracerAllSpansProcessor({startedSpansExporter:i})),W.rootTracer=r.getTracer(`sdk-videoplayer-tracer`),super.init({name:e,getParentContext:t},n)}getFinishedSpans(){if(!this.isComponentTracerNotInitialized())return this.spanExporter?.getJsonData()}getTraceId(){return this.isComponentTracerNotInitialized()?``:this.span.spanContext().traceId}}class gt{constructor(t){e(this,`fakeTraceId`,void 0)}log(e,t){}error(e,t){}critical(e,t){}createComponentTracer(e){return new gt({name:e})}end(){}getFinishedSpans(){}getTraceId(){return this.fakeTraceId}}class _t{static createRootTracer(e=!1){return e?new ht:new gt}}var vt;(e=>{e.NETWORK=`network`,e.VIDEO_PIPELINE=`video_pipeline`,e.EXTERNAL_API=`external_api`,e.PARSER=`parser`,e.DOM=`dom`,e.WTF=`wtf`,e.FATAL=`fatal`})(vt||={});var yt;(e=>{e.Armenian=`58`,e.Azerbaijani=`57`,e.Belarusian=`114`,e.English=`3`,e.Kazakh=`97`,e.Portuguese=`73`,e.Russian=`0`,e.Spanish=`4`,e.Ukrainian=`1`,e.Uzbek=`65`,e.Vietnamese=`75`})(yt||={});var bt=`vk.com`,xt=function(){var e=n(function*(e,t,n){let r=new URL(`https://${bt}/js/lang-pack.js`);return r.searchParams.set(`format`,`json`),r.searchParams.set(`name`,t),e!==void 0&&r.searchParams.set(`lang`,e),St(yield(yield fetch(r.toString())).json(),n)});return function(t,n,r){return e.apply(this,arguments)}}(),St=(e,t)=>Object.fromEntries(Object.entries(e.keys).map(([e,n])=>[e.substring(`${t}_`.length),Ct(n)])),Ct=e=>Array.isArray(e)?e[0]:e,wt;(e=>{e.RU=`ru`,e.EN=`en`})(wt||={});var G=`__vk_vp_internals_exposure`;class Tt{constructor(t,n){e(this,`playerId`,void 0),e(this,`type`,void 0),this.playerId=n,this.type=t,this.initWindowObjects()}getWindowObject(){var e;if(typeof window>`u`)return{};let t=this.playerId,n=this.type;return((e=window[G])==null||(e=e[t])==null?void 0:e[n])??{}}initWindowObjects(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[G]||(window[G]={}),window[G][e]||(window[G][e]={}),window[G][e][t]||(window[G][e][t]={})}expose(e){typeof window>`u`||Object.assign(this.getWindowObject(),e)}destroy(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[G]&&window[G][e]&&window[G][e][t]&&(delete window[G][e][t],Object.keys(window[G][e]).length||delete window[G][e],Object.keys(window[G]).length||delete window[G])}}var Et={};o(Et,{subscribe:()=>At,push:()=>kt,destroy:()=>Ot,create:()=>Dt});var K=new Map,Dt=(e,t)=>K.set(e,t??[]),Ot=e=>K.delete(e),kt=(e,t)=>{let n=K.get(e);n&&(typeof n==`function`?n(t):n.push(t))},At=(e,t)=>{let n=K.get(e);if(n){if(n&&Array.isArray(n))for(let e of n)t(e);K.set(e,t)}},jt=`gW5EerTD5QhAnsbpF7Hd2NSMRteYIUUMjFbSyI68Pf5`,Mt=e=>y({id:e.id,message:e.message,category:e.category,data:Nt(e.data),httpCode:e.httpCode,UVBackendErrorCode:e.UVBackendErrorCode});function Nt(e){switch(typeof e){case`boolean`:case`string`:case`number`:return e;case`object`:try{return JSON.stringify(e)}catch{return}default:return}}var Pt=e=>{if(e.thrown instanceof Error)return e.thrown.name=e.id,e.thrown;let t=Error(e.message);return t.name=e.id,t},Ft=()=>{try{let{origin:e,pathname:n,search:r,hostname:i}=b().document.location;return i===`localhost`?void 0:t({url:e+n},new URLSearchParams(r).entries().reduce((e,[t,n])=>(e[`url.${t}`]=n,e),{}))}catch(e){console.error(e)}};class q{constructor(t,n,r,i){e(this,`dynamicImportTimeout`,5e3),e(this,`componentName`,void 0),e(this,`subscription`,new c),e(this,`options`,void 0),e(this,`envParams`,void 0),e(this,`context`,void 0),this.componentName=t,this.options=n,this.envParams=r,this.context=i,this.options.enabled&&(this.loadModule(),this.init())}error(e,n){let{blackErrorCategoryList:r,blackErrorIdList:i,sampleRate:a,whiteErrorCategoryList:o,whiteErrorIdList:s}=this.options,{id:c,category:l}=e;r.length&&r.includes(l)||i.length&&i.includes(c)||o.length&&!o.includes(l)||s.length&&!s.includes(c)||Math.random()>=a||q.tracerErrorMap.get(this.componentName)?.error(Pt(e),{severity:n?.severity??(e.traceAsLog?`debug`:void 0),keys:t(t(t({},this.context),Mt(e)),Ft())})}addSubscription(e){this.subscription.add(e)}destroy(){this.subscription.unsubscribe()}init(){var e=this;return n(function*(){try{if(yield q.loadPromise,q.tracerErrorMap.has(e.componentName)||v(q.appTracerModule))return;let{appTracerModule:t}=q,{initTracerError:n,initTracerErrorUploader:r,addTracerPlugin:i,getTracerModules:a}=t,o=a(e.componentName),s=!o.error,c=o.error??n(e.componentName,{enableUnhandledErrorsListeners:!1,stringifyErrorDataObject:!0});s&&r(e.componentName,{appToken:jt,environment:e.envParams.env,versionCode:1,versionName:e.envParams.version}),i(e.componentName,{name:`addedCategory`,errorBeforeAdd(e){let t=e.keys?.category??`wtf`;if(typeof t==`string`)return{issueKey:t}}}),q.tracerErrorMap.set(e.componentName,c)}catch{}})()}loadModule(){var e=this;_(q.loadPromise)||(q.loadPromise=function(){var t=n(function*(){try{let t=new Promise((t,n)=>b().setTimeout(n,e.dynamicImportTimeout));q.appTracerModule=yield Promise.race([t,import(`@apptracer/sdk/lite`)])}catch{q.loadPromise=null}});return function(){return t.apply(this,arguments)}}()())}}e(q,`tracerErrorMap`,new Map),e(q,`appTracerModule`,null),e(q,`loadPromise`,null);var It=(e,t)=>{let n=e.length,r=t>=0?t:n+t;return r>=0&&r<n?e[r]:void 0},Lt=(e,t)=>{for(let n=e.length-1;n>=0;n--){let r=e[n];if(t(r,n,e))return r}},Rt=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n,e))return n;return-1},zt=(e,t=1)=>{let n=[],r=(e,t)=>{for(let i=0;i<e.length;i++){if(!(i in e))continue;let a=e[i];t>0&&Array.isArray(a)?r(a,t-1):n.push(a)}};return r(e,t),n},Bt=(e,t)=>{let n=[];for(let r=0;r<e.length;r++){let i=t(e[r],r,e);if(Array.isArray(i))for(let e=0;e<i.length;e++)n.push(i[e]);else n.push(i)}return n},Vt=(e,t,n=0)=>{let r=e.length,i=n>=0?n:Math.max(r+n,0);for(;i<r;i++){let n=e[i];if(n===t||n!==n&&t!==t)return!0}return!1},Ht=e=>{let t=e.length,n=Array(t);for(let r=0;r<t;r++)n[r]=e[t-1-r];return n},Ut=(e,t)=>{let n=e.slice();return t?n.sort(t):n.sort()},Wt=(e,t,n,...r)=>{let i=e.slice();return n===void 0?i.splice(t):i.splice(t,n,...r),i},Gt=(e,t,n)=>{let r=e.length,i=t>=0?t:r+t,a=e.slice();return a[i]=n,a},Kt=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof self<`u`?self:Function(`return this`)(),qt=e=>{let t=[],n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r];t.push([i,e[i]])}return t},Jt=e=>{let t={};for(let[n,r]of e)t[n]=r;return t},Yt=Object.prototype.hasOwnProperty,Xt=(e,t)=>Yt.call(e,t),Zt=e=>{let t=Object.keys(e),n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e[t[r]];return n},Qt=e=>{let t=Array.from(e);return t.length===0?Promise.resolve([]):Promise.all(t.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},$t=e=>{let t=Array.from(e);return t.length===0?Promise.reject(AggregateError([],`All promises were rejected`)):new Promise((e,n)=>{let r=Array(t.length),i=t.length;t.forEach((t,a)=>{Promise.resolve(t).then(e,e=>{r[a]=e,--i,i===0&&n(AggregateError(r,`All promises were rejected`))})})})},en=(e,t)=>e.then(e=>Promise.resolve(t()).then(()=>e),e=>Promise.resolve(t()).then(()=>{throw e})),tn=e=>{try{return Promise.resolve(e())}catch(e){return Promise.reject(e)}},nn=()=>{let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}},{NativeAbortSignal:rn,NativeAbortController:an}=function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}}(typeof self<`u`?self:global);function on(e){let t;try{t=new Event(`abort`)}catch{typeof document<`u`?document.createEvent?(t=document.createEvent(`Event`),t.initEvent(`abort`,!1,!1)):(t=document.createEventObject(),t.type=`abort`):t={type:`abort`,bubbles:!1,cancelable:!1}}return t.reason=e,t}function sn(e){if(e===void 0)if(typeof document>`u`)e=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=Error(`This operation was aborted`),e.name=`AbortError`}return e}class cn{constructor(){Object.defineProperty(this,`listeners`,{value:{},writable:!0,configurable:!0})}addEventListener(e,t,n){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:n})}removeEventListener(e,t){if(!(e in this.listeners))return;let n=this.listeners[e];for(let e=0,r=n.length;e<r;e++)if(n[e].callback===t){n.splice(e,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let t=this.listeners[e.type].slice();for(let n=0,r=t.length;n<r;n++){let r=t[n];try{r.callback.call(this,e)}catch(e){Promise.resolve().then(()=>{throw e})}r.options&&r.options.once&&this.removeEventListener(e.type,r.callback)}return!e.defaultPrevented}}class J extends cn{constructor(){super(),this.listeners||cn.call(this),Object.defineProperty(this,`aborted`,{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,`onabort`,{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,`reason`,{value:void 0,writable:!0,configurable:!0})}toString(){return`[object AbortSignal]`}dispatchEvent(e){e.type===`abort`&&(this.aborted=!0,typeof this.onabort==`function`&&this.onabort.call(this,e)),super.dispatchEvent(e)}throwIfAborted(){let{aborted:e,reason:t=`Aborted`}=this;if(e)throw t}static timeout(e){let t=new Y;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,`TimeoutError`)),e),t.signal}static any(e){let t=new Y;function n(){t.abort(this.reason),r()}function r(){for(let t of e)t.removeEventListener(`abort`,n)}for(let r of e)if(r.aborted){t.abort(r.reason);break}else r.addEventListener(`abort`,n);return t.signal}}class Y{constructor(){Object.defineProperty(this,`signal`,{value:new J,writable:!0,configurable:!0})}abort(e){let t=sn(e),n=on(t);this.signal.reason=t,this.signal.dispatchEvent(n)}toString(){return`[object AbortController]`}}typeof Symbol<`u`&&Symbol.toStringTag&&(Y.prototype[Symbol.toStringTag]=`AbortController`,J.prototype[Symbol.toStringTag]=`AbortSignal`);function ln(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 un(e){typeof e==`function`&&(e={fetch:e});let{fetch:t,Request:n=t.Request,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!ln({fetch:t,Request:n,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:t,Request:a};let a=n;(a&&!a.prototype.hasOwnProperty(`signal`)||i)&&(a=function(e,t){let r;t&&t.signal&&(r=t.signal,delete t.signal);let i=new n(e,t);return r&&Object.defineProperty(i,`signal`,{writable:!1,enumerable:!1,configurable:!0,value:r}),i},a.prototype=n.prototype);let o=t;return{fetch:(e,t)=>{let n=a&&a.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(n){let r;try{r=new DOMException(`Aborted`,`AbortError`)}catch{r=Error(`Aborted`),r.name=`AbortError`}if(n.aborted)return Promise.reject(r);let i=new Promise((e,t)=>{n.addEventListener(`abort`,()=>t(r),{once:!0})});return t&&t.signal&&delete t.signal,Promise.race([i,o(e,t)])}return o(e,t)},Request:a}}var X=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window,Z=`fetch`in X&&ln({fetch:X.fetch,Request:X.Request,AbortController:X.AbortController}),dn=Z?un({fetch:X.fetch,Request:X.Request,AbortController:X.AbortController}):void 0,fn=Z?dn.fetch:X.fetch,pn=Z?dn.Request:X.Request,mn=Z?Y:X.AbortController,hn=Z?J:X.AbortSignal,gn=(e,t)=>{let n=e.length,r=t>=0?t:n+t;if(r<0||r>=n)return;let i=e.charCodeAt(r);if(i>=55296&&i<=56319&&r+1<n){let t=e.charCodeAt(r+1);if(t>=56320&&t<=57343)return e[r]+e[r+1]}return e[r]};function*_n(e,t){let n=t.flags.includes(`g`)?t.flags:t.flags+`g`,r=new RegExp(t.source,n),i;for(;(i=r.exec(e))!==null;)yield i,i[0].length===0&&r.lastIndex++}var vn=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return e+n.repeat(Math.ceil(r/n.length)).slice(0,r)},yn=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return n.repeat(Math.ceil(r/n.length)).slice(0,r)+e},bn=(e,t,n)=>{if(typeof t==`string`){if(typeof n==`string`)return t===``?n+e.split(``).join(n)+n:e.split(t).join(n);let r=[],i=0,a=e.indexOf(t,i);for(;a!==-1;)r.push(e.slice(i,a)),r.push(n(t,a,e)),i=a+t.length,a=e.indexOf(t,i);return r.push(e.slice(i)),r.join(``)}let r=t.flags.includes(`g`)?t.flags:t.flags+`g`,i=new RegExp(t.source,r);return e.replace(i,n)},Q=e=>e.replace(/^\s+/,``),xn=e=>e.replace(/\s+$/,``),Sn=Q,Cn=xn,wn=(e,t)=>typeof e==`string`?gn(e,t):It(e,t),Tn=(e,t={})=>{let n=t.timeout||1,r=performance.now();return X.setTimeout(()=>{e({get didTimeout(){return t.timeout?!1:performance.now()-r-1>n},timeRemaining(){return Math.max(0,1+(performance.now()-r))}})},1)},En=e=>X.clearTimeout(e),Dn=e=>typeof e==`function`&&e?.toString().endsWith(`{ [native code] }`),$=!Dn(X.requestIdleCallback)||!Dn(X.cancelIdleCallback),On=$?Tn:X.requestIdleCallback,kn=$?En:X.cancelIdleCallback,An=(e,t,n)=>typeof e==`string`?e.includes(t,n):Vt(e,t,n),jn=(e,t,n)=>{if(typeof e.canParse==`function`)return e.canParse(t,n);try{return new e(t,n),!0}catch{return!1}};export{y as withoutNullable,ye as videoSizeToQuality,be as videoQualityToHeight,ve as videoHeightToQuality,jn as urlCanParsePolyfilled,ke as timeout,we as timeCodeToString,I as throttleFn,Be as throttle,$e as tap,pt as suppressAbort,Q as stringTrimStart,Cn as stringTrimRight,Sn as stringTrimLeft,xn as stringTrimEnd,bn as stringReplaceAll,yn as stringPadStart,vn as stringPadEnd,_n as stringMatchAll,gn as stringAt,tt as skip,rt as shareReplay,w as safeStorage,On as requestIdleCallbackPolyfilled,nn as promiseWithResolvers,tn as promiseTry,en as promiseFinally,$t as promiseAny,Qt as promiseAllSettled,Ze as pairwise,Xe as once,at as observeElementSize,je as observableFrom,Zt as objectValues,Xt as objectHasOwn,Jt as objectFromEntries,qt as objectEntries,ie as nowInt,C as now,d as noop,Oe as merge,Ye as mapTo,B as map,xt as loadVKLangPack,st as isValidURL,v as isNullable,_ as isNonNullable,ge as isLowerOrEqual,j as isLower,N as isInvariantQuality,ct as isIntersecting,he as isHigherOrEqual,me as isHigher,x as isBrowserWindow,H as isAbortError,Ae as interval,dt as interpolate,An as includesPolyfilled,Kt as globalThisPolyfill,b as getWindow,Ce as getVideoQualityLabel,mt as getTraceSubscriptionMethod,ft as getRangeAroundIndex,ut as getPlayerId,_e as getHighestQuality,oe as getExponentialDelay,Me as fromEvent,V as flattenObject,Ke as filterChanged,He as filter,P as fillWithDefault,fn as fetchPolyfilled,Et as devNull,pe as detectEmbed,F as debounceFn,Le as debounce,De as combine,L as cloneDeepWith,Te as cloneDeep,ot as clearVideoElement,u as checkNever,kn as cancelIdleCallbackPolyfilled,Pe as buffer,wn as atPolyfilled,Se as assertQualityIsExact,g as assertNullable,ne as assertNotEmptyArray,te as assertNonNullable,l as assertNever,re as assertEmptyArray,Gt as arrayWith,Wt as arrayToSpliced,Ut as arrayToSorted,Ht as arrayToReversed,Vt as arrayIncludes,Bt as arrayFlatMap,zt as arrayFlat,Rt as arrayFindLastIndex,Lt as arrayFindLast,It as arrayAt,xe as areQualitiesExact,S as addScript,ae as abortable,k as VideoQuality,Ee as ValueSubject,yt as VKNumericLanguage,s as VERSION,_t as TracerFactory,Ne as SubscriptionRemovable,c as Subscription,h as Subject,pn as RequestPolyfilled,R as ReplaySubject,m as Observable,ee as Logger,Tt as InternalsExposure,wt as InterfaceLanguage,G as INTERNAL_EXPOSE_GLOBAL_KEY,vt as ErrorCategory,q as AppTracer,hn as AbortSignalPolyfilled,mn as AbortControllerPolyfilled};
|