@vkontakte/videoplayer 1.1.85-dev.c9a557fc.0 → 1.1.85-dev.efae8891.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015.cjs +34 -34
- package/es2015.esm.js +39 -39
- package/es2018.cjs +36 -36
- package/es2018.esm.js +36 -36
- package/es2024.cjs +36 -36
- package/es2024.esm.js +36 -36
- package/esnext.cjs +36 -36
- package/esnext.esm.js +36 -36
- package/evergreen.esm.js +36 -36
- package/package.json +5 -5
- package/types/config.d.ts +7 -1
- package/types/index.d.ts +3 -2
- package/types/store/index.d.ts +2 -1
- package/types/types/index.d.ts +6 -6
- package/types/utils/webAPI/pictureInPictureApi/documentPictureInPictureApi.svelte.d.ts +2 -1
- package/types/utils/webAPI/pictureInPictureApi/factory.d.ts +3 -0
- package/types/utils/webAPI/pictureInPictureApi/index.d.ts +4 -0
- package/types/utils/webAPI/pictureInPictureApi/pictureInPictureApi.d.ts +1 -1
- package/types/utils/webAPI/pictureInPictureApi/utils.d.ts +3 -0
- package/types/utils/webAPI/pictureInPictureApi/pictureInPictureApiFactory.d.ts +0 -4
package/es2015.esm.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer v1.1.85-dev.
|
|
3
|
-
* Thu, 26 Feb 2026
|
|
2
|
+
* @vkontakte/videoplayer v1.1.85-dev.efae8891.0
|
|
3
|
+
* Thu, 26 Feb 2026 15:09:39 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-1-85/doc/
|
|
5
5
|
*/
|
|
6
|
-
var
|
|
6
|
+
var m$=Object.defineProperty,v$=Object.defineProperties;var g$=Object.getOwnPropertyDescriptors;var Xv=Object.getOwnPropertySymbols;var h$=Object.prototype.hasOwnProperty,_$=Object.prototype.propertyIsEnumerable;var Zv=t=>{throw TypeError(t)};var Cp=(t,e,i)=>e in t?m$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ye=(t,e)=>{for(var i in e||(e={}))h$.call(e,i)&&Cp(t,i,e[i]);if(Xv)for(var i of Xv(e))_$.call(e,i)&&Cp(t,i,e[i]);return t},Jt=(t,e)=>v$(t,g$(e));var pr=(t,e,i)=>Cp(t,typeof e!="symbol"?e+"":e,i),Tp=(t,e,i)=>e.has(t)||Zv("Cannot "+i);var Hi=(t,e,i)=>(Tp(t,e,"read from private field"),i?i.call(t):e.get(t)),Js=(t,e,i)=>e.has(t)?Zv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),fl=(t,e,i,o)=>(Tp(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),Jv=(t,e,i)=>(Tp(t,e,"access private method"),i);var bt=(t,e,i)=>new Promise((o,s)=>{var a=r=>{try{d(i.next(r))}catch(u){s(u)}},l=r=>{try{d(i.throw(r))}catch(u){s(u)}},d=r=>r.done?o(r.value):Promise.resolve(r.value).then(a,l);d((i=i.apply(t,e)).next())});var ea="[",ta="[!",Sa="]",ms={};var oo=Symbol(),qn=Symbol("filename"),eg=Symbol("hmr"),tg="http://www.w3.org/1999/xhtml",zc="http://www.w3.org/2000/svg";var Ip="@attach";var Wc=!0;var og,ng,ig=(ng=(og=globalThis.process)==null?void 0:og.env)==null?void 0:ng.NODE_ENV,Me=ig&&!ig.toLowerCase().startsWith("prod");var fr=Array.isArray,rg=Array.prototype.indexOf,rd=Array.from,Ep=Object.keys,uo=Object.defineProperty,zo=Object.getOwnPropertyDescriptor,Kc=Object.getOwnPropertyDescriptors,Pp=Object.prototype,sg=Array.prototype,Ca=Object.getPrototypeOf,Ap=Object.isExtensible;function ia(t){return typeof t=="function"}var $t=()=>{};function ag(t){return t()}function oa(t){for(var e=0;e<t.length;e++)t[e]()}var Wo=Symbol("$state"),ml=Symbol("legacy props"),lg=Symbol(""),Qc=Symbol("proxy path"),qc=1,vl=3,mr=8;function Gc(t){return t===this.v}function gl(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function dg(t,e){return t!==e}function hl(t){return!gl(t,this.v)}function cg(){if(Me){let t=new Error(`derived_references_self
|
|
7
7
|
A derived value cannot reference itself recursively
|
|
8
|
-
https://svelte.dev/e/derived_references_self`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/derived_references_self")}function
|
|
8
|
+
https://svelte.dev/e/derived_references_self`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/derived_references_self")}function ug(t){if(Me){let e=new Error(`effect_in_teardown
|
|
9
9
|
\`${t}\` cannot be used inside an effect cleanup function
|
|
10
|
-
https://svelte.dev/e/effect_in_teardown`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function
|
|
10
|
+
https://svelte.dev/e/effect_in_teardown`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function pg(){if(Me){let t=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function fg(t){if(Me){let e=new Error(`effect_orphan
|
|
11
11
|
\`${t}\` can only be used inside an effect (e.g. during component initialisation)
|
|
12
|
-
https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function
|
|
12
|
+
https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function mg(){if(Me){let t=new Error(`effect_update_depth_exceeded
|
|
13
13
|
Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
|
|
14
|
-
https://svelte.dev/e/effect_update_depth_exceeded`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function
|
|
14
|
+
https://svelte.dev/e/effect_update_depth_exceeded`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function vg(){if(Me){let t=new Error(`hydration_failed
|
|
15
15
|
Failed to hydrate the application
|
|
16
|
-
https://svelte.dev/e/hydration_failed`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/hydration_failed")}function
|
|
16
|
+
https://svelte.dev/e/hydration_failed`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/hydration_failed")}function gg(){if(Me){let t=new Error("invalid_snippet\nCould not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\nhttps://svelte.dev/e/invalid_snippet");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/invalid_snippet")}function hg(t){if(Me){let e=new Error(`props_invalid_value
|
|
17
17
|
Cannot do \`bind:${t}={undefined}\` when \`${t}\` has a fallback value
|
|
18
|
-
https://svelte.dev/e/props_invalid_value`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_invalid_value")}function
|
|
18
|
+
https://svelte.dev/e/props_invalid_value`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_invalid_value")}function _g(t){if(Me){let e=new Error(`props_rest_readonly
|
|
19
19
|
Rest element properties of \`$props()\` such as \`${t}\` are readonly
|
|
20
|
-
https://svelte.dev/e/props_rest_readonly`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_rest_readonly")}function
|
|
20
|
+
https://svelte.dev/e/props_rest_readonly`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_rest_readonly")}function bg(t){if(Me){let e=new Error(`rune_outside_svelte
|
|
21
21
|
The \`${t}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
|
|
22
|
-
https://svelte.dev/e/rune_outside_svelte`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function
|
|
23
|
-
`),
|
|
24
|
-
`];for(let a=0;a<o.length;a++){let l=o[a];if(l!=="Error"){if(l.includes("validate_each_keys"))return null;l.includes("svelte/src/internal")||
|
|
25
|
-
`)}),uo(e,"name",{value:`${t}Error`})}return e}function
|
|
22
|
+
https://svelte.dev/e/rune_outside_svelte`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function $g(){if(Me){let t=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function yg(){if(Me){let t=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function xg(){if(Me){let t=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}var vs=!1,gs=!1;function wg(){vs=!0}var sd=null;function As(t){let e=Error(),i=e.stack;if(i){let o=i.split(`
|
|
23
|
+
`),s=[`
|
|
24
|
+
`];for(let a=0;a<o.length;a++){let l=o[a];if(l!=="Error"){if(l.includes("validate_each_keys"))return null;l.includes("svelte/src/internal")||s.push(l)}}if(s.length===1)return null;uo(e,"stack",{value:s.join(`
|
|
25
|
+
`)}),uo(e,"name",{value:`${t}Error`})}return e}function Xr(t,e){return t.label=e,Yc(t.v,e),t}function Yc(t,e){var i;return(i=t==null?void 0:t[Qc])==null||i.call(t,e),t}function _l(t){if(Me){let e=new Error(`lifecycle_outside_component
|
|
26
26
|
\`${t}(...)\` can only be used during component initialisation
|
|
27
|
-
https://svelte.dev/e/lifecycle_outside_component`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var
|
|
27
|
+
https://svelte.dev/e/lifecycle_outside_component`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var Bt=null;function ad(t){Bt=t}var vr=null;function ld(t){vr=t}function bl(t){return Mp("getContext").get(t)}function $l(t,e){return Mp("setContext").set(t,e),e}function dd(){return Mp("getAllContexts")}function B(t,e=!1,i){var o=Bt={p:Bt,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};vs&&!e&&(Bt.l={s:null,u:null,r1:[],r2:Vr(!1)}),To(()=>{o.d=!0}),Me&&(Bt.function=i,vr=i)}function H(t){var l,d;let e=Bt;if(e!==null){t!==void 0&&(e.x=t);let r=e.e;if(r!==null){var i=yt,o=Vt;e.e=null;try{for(var s=0;s<r.length;s++){var a=r[s];po(a.effect),qi(a.reaction),Io(a.fn)}}finally{po(i),qi(o)}}Bt=e.p,Me&&(vr=(d=(l=e.p)==null?void 0:l.function)!=null?d:null),e.m=!0}return t||{}}function hs(){return!vs||Bt!==null&&Bt.l===null}function Mp(t){var e;return Bt===null&&_l(t),(e=Bt.c)!=null?e:Bt.c=new Map($$(Bt)||void 0)}function $$(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var y$=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function ri(t){if(typeof t!="object"||t===null||Wo in t)return t;let e=Ca(t);if(e!==Pp&&e!==sg)return t;var i=new Map,o=fr(t),s=K(0),a=Me&&gs?As("CreatedAt"):null,l=Vt,d=p=>{var f=Vt;qi(l);var v=p();return qi(f),v};o&&i.set("length",K(t.length,a));var r="";function u(p){r=p,Xr(s,`${r} version`);for(let[f,v]of i)Xr(v,Ta(r,f))}return new Proxy(t,{defineProperty(p,f,v){(!("value"in v)||v.configurable===!1||v.enumerable===!1||v.writable===!1)&&$g();var b=i.get(f);return b===void 0?b=d(()=>{var y=K(v.value,a);return i.set(f,y),Me&&typeof f=="string"&&Xr(y,Ta(r,f)),y}):D(b,v.value,!0),!0},deleteProperty(p,f){var v=i.get(f);if(v===void 0){if(f in p){let _=d(()=>K(oo,a));i.set(f,_),Vp(s),Me&&Xr(_,Ta(r,f))}}else{if(o&&typeof f=="string"){var b=i.get("length"),y=Number(f);Number.isInteger(y)&&y<b.v&&D(b,y)}D(v,oo),Vp(s)}return!0},get(p,f,v){var w;if(f===Wo)return t;if(Me&&f===Qc)return u;var b=i.get(f),y=f in p;if(b===void 0&&(!y||(w=zo(p,f))!=null&&w.writable)&&(b=d(()=>{var I=ri(y?p[f]:oo),T=K(I,a);return Me&&Xr(T,Ta(r,f)),T}),i.set(f,b)),b!==void 0){var _=n(b);return _===oo?void 0:_}return Reflect.get(p,f,v)},getOwnPropertyDescriptor(p,f){var v=Reflect.getOwnPropertyDescriptor(p,f);if(v&&"value"in v){var b=i.get(f);b&&(v.value=n(b))}else if(v===void 0){var y=i.get(f),_=y==null?void 0:y.v;if(y!==void 0&&_!==oo)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return v},has(p,f){var _;if(f===Wo)return!0;var v=i.get(f),b=v!==void 0&&v.v!==oo||Reflect.has(p,f);if(v!==void 0||yt!==null&&(!b||(_=zo(p,f))!=null&&_.writable)){v===void 0&&(v=d(()=>{var w=b?ri(p[f]):oo,I=K(w,a);return Me&&Xr(I,Ta(r,f)),I}),i.set(f,v));var y=n(v);if(y===oo)return!1}return b},set(p,f,v,b){var E;var y=i.get(f),_=f in p;if(o&&f==="length")for(var w=v;w<y.v;w+=1){var I=i.get(w+"");I!==void 0?D(I,oo):w in p&&(I=d(()=>K(oo,a)),i.set(w+"",I),Me&&Xr(I,Ta(r,w)))}if(y===void 0)(!_||(E=zo(p,f))!=null&&E.writable)&&(y=d(()=>K(void 0,a)),D(y,ri(v)),i.set(f,y),Me&&Xr(y,Ta(r,f)));else{_=y.v!==oo;var T=d(()=>ri(v));D(y,T)}var R=Reflect.getOwnPropertyDescriptor(p,f);if(R!=null&&R.set&&R.set.call(b,v),!_){if(o&&typeof f=="string"){var k=i.get("length"),P=Number(f);Number.isInteger(P)&&P>=k.v&&D(k,P+1)}Vp(s)}return!0},ownKeys(p){n(s);var f=Reflect.ownKeys(p).filter(y=>{var _=i.get(y);return _===void 0||_.v!==oo});for(var[v,b]of i)b.v!==oo&&!(v in p)&&f.push(v);return f},setPrototypeOf(){yg()}})}function Ta(t,e){var i;return typeof e=="symbol"?`${t}[Symbol(${(i=e.description)!=null?i:""})]`:y$.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function Vp(t,e=1){D(t,t.v+e)}function yl(t){try{if(t!==null&&typeof t=="object"&&Wo in t)return t[Wo]}catch(e){}return t}function Rp(t,e){return Object.is(yl(t),yl(e))}function Zr(t){var e=2050,i=Vt!==null&&(Vt.f&2)!==0?Vt:null;yt===null||i!==null&&(i.f&256)!==0?e|=256:yt.f|=1048576;let o={ctx:Bt,deps:null,effects:null,equals:Gc,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:i!=null?i:yt};return Me&&gs&&(o.created=As("CreatedAt")),o}function m(t){let e=Zr(t);return Zc(e),e}function hr(t){let e=Zr(t);return e.equals=hl,e}function jc(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)Gi(e[i])}}var Dp=[];function x$(t){for(var e=t.parent;e!==null;){if((e.f&2)===0)return e;e=e.parent}return null}function Bp(t){var e,i=yt;if(po(x$(t)),Me){let o=Ia;Op(new Set);try{Dp.includes(t)&&cg(),Dp.push(t),jc(t),e=Xc(t)}finally{po(i),Op(o),Dp.pop()}}else try{jc(t),e=Xc(t)}finally{po(i)}return e}function Hp(t){var e=Bp(t);if(t.equals(e)||(t.v=e,t.wv=cd()),!ks){var i=(Ls||(t.f&256)!==0)&&t.deps!==null?4096:1024;An(t,i)}}var Ia=new Set,xl=new Map;function Op(t){Ia=t}function Vr(t,e){var i={f:0,v:t,reactions:null,equals:Gc,rv:0,wv:0};return Me&&gs&&(i.created=e!=null?e:As("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function K(t,e){let i=Vr(t,e);return Zc(i),i}function _s(t,e=!1,i=!0){var s,a;let o=Vr(t);return e||(o.equals=hl),vs&&i&&Bt!==null&&Bt.l!==null&&((a=(s=Bt.l).s)!=null?a:s.s=[]).push(o),o}function D(t,e,i=!1){var s;Vt!==null&&(!br||(Vt.f&262144)!==0)&&hs()&&(Vt.f&262162)!==0&&!((s=Qo)!=null&&s[1].includes(t)&&Qo[0]===Vt)&&xg();let o=i?ri(e):e;return Me&&Yc(o,t.label),wl(t,o)}function wl(t,e){if(!t.equals(e)){var i=t.v;if(ks?xl.set(t,e):xl.set(t,i),t.v=e,Me&&gs&&(t.updated=As("UpdatedAt"),yt!==null&&(t.set_during_effect=!0)),(t.f&2)!==0&&((t.f&2048)!==0&&Bp(t),An(t,(t.f&256)===0?1024:4096)),t.wv=cd(),Cg(t,2048),hs()&&yt!==null&&(yt.f&1024)!==0&&(yt.f&96)===0&&(_r===null?Tg([t]):_r.push(t)),Me&&Ia.size>0){let o=Array.from(Ia);for(let s of o)(s.f&1024)!==0&&An(s,4096),Pa(s)&&Sl(s);Ia.clear()}}return e}function Cg(t,e){var i=t.reactions;if(i!==null)for(var o=hs(),s=i.length,a=0;a<s;a++){var l=i[a],d=l.f;if((d&2048)===0&&!(!o&&l===yt)){if(Me&&(d&262144)!==0){Ia.add(l);continue}An(l,e),(d&1280)!==0&&((d&2)!==0?Cg(l,4096):pd(l))}}}var Cl="font-weight: bold",Tl="font-weight: normal";function Ig(t,e,i){Me?console.warn(`%c[svelte] hydration_attribute_changed
|
|
28
28
|
%cThe \`${t}\` attribute on \`${e}\` changed its value between server and client renders. The client value, \`${i}\`, will be ignored in favour of the server value
|
|
29
|
-
https://svelte.dev/e/hydration_attribute_changed`,
|
|
29
|
+
https://svelte.dev/e/hydration_attribute_changed`,Cl,Tl):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Eg(t){Me?console.warn(`%c[svelte] hydration_html_changed
|
|
30
30
|
%c${t?`The value of an \`{@html ...}\` block ${t} changed between server and client renders. The client value will be ignored in favour of the server value`:"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
|
|
31
|
-
https://svelte.dev/e/hydration_html_changed`,
|
|
31
|
+
https://svelte.dev/e/hydration_html_changed`,Cl,Tl):console.warn("https://svelte.dev/e/hydration_html_changed")}function na(t){Me?console.warn(`%c[svelte] hydration_mismatch
|
|
32
32
|
%c${t?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${t}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
|
|
33
|
-
https://svelte.dev/e/hydration_mismatch`,
|
|
33
|
+
https://svelte.dev/e/hydration_mismatch`,Cl,Tl):console.warn("https://svelte.dev/e/hydration_mismatch")}function Pg(){Me?console.warn(`%c[svelte] lifecycle_double_unmount
|
|
34
34
|
%cTried to unmount a component that was not mounted
|
|
35
|
-
https://svelte.dev/e/lifecycle_double_unmount`,
|
|
35
|
+
https://svelte.dev/e/lifecycle_double_unmount`,Cl,Tl):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Ag(){Me?console.warn("%c[svelte] select_multiple_invalid_value\n%cThe `value` property of a `<select multiple>` element should be an array, but it received a non-array value. The selection will be kept as is.\nhttps://svelte.dev/e/select_multiple_invalid_value",Cl,Tl):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Jc(t){Me?console.warn(`%c[svelte] state_proxy_equality_mismatch
|
|
36
36
|
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${t}\` will produce unexpected results
|
|
37
|
-
https://svelte.dev/e/state_proxy_equality_mismatch`,
|
|
38
|
-
${o}in ${((l=e.fn)==null?void 0:l.name)||"<unknown>"}`,a=e.ctx;a!==null;)
|
|
39
|
-
${o}in ${(d=a.function)==null?void 0:d[
|
|
40
|
-
${
|
|
37
|
+
https://svelte.dev/e/state_proxy_equality_mismatch`,Cl,Tl):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var nt=!1;function fo(t){nt=t}var xt;function wi(t){if(t===null)throw na(),ms;return xt=t}function Yi(){return wi(qo(xt))}function S(t){if(nt){if(qo(xt)!==null)throw na(),ms;xt=t}}function Xt(t=1){if(nt){for(var e=t,i=xt;e--;)i=qo(i);xt=i}}function Aa(){for(var t=0,e=xt;;){if(e.nodeType===mr){var i=e.data;if(i===Sa){if(t===0)return e;t-=1}else(i===ea||i===ta)&&(t+=1)}var o=qo(e);e.remove(),e=o}}function eu(t){if(!t||t.nodeType!==mr)throw na(),ms;return t.data}function kg(){let t=Array.prototype,e=Array.__svelte_cleanup;e&&e();let{indexOf:i,lastIndexOf:o,includes:s}=t;t.indexOf=function(a,l){let d=i.call(this,a,l);if(d===-1){for(let r=l!=null?l:0;r<this.length;r+=1)if(yl(this[r])===a){Jc("array.indexOf(...)");break}}return d},t.lastIndexOf=function(a,l){let d=o.call(this,a,l!=null?l:this.length-1);if(d===-1){for(let r=0;r<=(l!=null?l:this.length-1);r+=1)if(yl(this[r])===a){Jc("array.lastIndexOf(...)");break}}return d},t.includes=function(a,l){let d=s.call(this,a,l);if(!d){for(let r=0;r<this.length;r+=1)if(yl(this[r])===a){Jc("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{t.indexOf=i,t.lastIndexOf=o,t.includes=s}}var ka,Lg,fd,Mg,Vg;function tu(){if(ka===void 0){ka=window,Lg=document,fd=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;Mg=zo(e,"firstChild").get,Vg=zo(e,"nextSibling").get,Ap(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Ap(i)&&(i.__t=void 0),Me&&(t.__svelte_meta=null,kg())}}function kn(t=""){return document.createTextNode(t)}function Ei(t){return Mg.call(t)}function qo(t){return Vg.call(t)}function C(t,e){if(!nt)return Ei(t);var i=Ei(xt);if(i===null)i=xt.appendChild(kn());else if(e&&i.nodeType!==vl){var o=kn();return i==null||i.before(o),wi(o),o}return wi(i),i}function le(t,e){var s,a;if(!nt){var i=Ei(t);return i.nodeType===8&&i.data===""?qo(i):i}if(e&&((s=xt)==null?void 0:s.nodeType)!==vl){var o=kn();return(a=xt)==null||a.before(o),wi(o),o}return xt}function A(t,e=1,i=!1){let o=nt?xt:t;for(var s;e--;)s=o,o=qo(o);if(!nt)return o;if(i&&(o==null?void 0:o.nodeType)!==vl){var a=kn();return o===null?s==null||s.after(a):o.before(a),wi(a),a}return wi(o),o}function md(t){t.textContent=""}function zp(t){yt===null&&Vt===null&&fg(t),Vt!==null&&(Vt.f&256)!==0&&yt===null&&pg(),ks&&ug(t)}function w$(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function La(t,e,i,o=!0){var r;var s=yt;if(Me)for(;s!==null&&(s.f&262144)!==0;)s=s.parent;var a={ctx:Bt,deps:null,nodes_start:null,nodes_end:null,f:t|2048,first:null,fn:e,last:null,next:null,parent:s,prev:null,teardown:null,transitions:null,wv:0};if(Me&&(a.component_function=vr),i)try{Sl(a),a.f|=32768}catch(u){throw Gi(a),u}else e!==null&&pd(a);var l=i&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&1048704)===0;if(!l&&o&&(s!==null&&w$(a,s),Vt!==null&&(Vt.f&2)!==0)){var d=Vt;((r=d.effects)!=null?r:d.effects=[]).push(a)}return a}function To(t){let e=La(8,null,!1);return An(e,1024),e.teardown=t,e}function He(t){var s;zp("$effect");var e=yt!==null&&(yt.f&32)!==0&&Bt!==null&&!Bt.m;if(Me&&uo(t,"name",{value:"$effect"}),e){var i=Bt;((s=i.e)!=null?s:i.e=[]).push({fn:t,effect:yt,reaction:Vt})}else{var o=Io(t);return o}}function hd(t){return zp("$effect.pre"),Me&&uo(t,"name",{value:"$effect.pre"}),Go(t)}function nu(t){let e=La(64,t,!0);return()=>{Gi(e)}}function Dg(t){let e=La(64,t,!0);return(i={})=>new Promise(o=>{i.outro?Xn(e,()=>{Gi(e),o(void 0)}):(Gi(e),o(void 0))})}function Io(t){return La(4,t,!1)}function Go(t){return La(8,t,!0)}function O(t,e=[],i=Zr){if(Me)return Go(()=>{var s=yt,a=()=>t(...l.map(n));uo(s.fn,"name",{value:"{expression}"}),uo(a,"name",{value:"{expression}"});let l=e.map(i);ji(a)});let o=e.map(i);return ji(()=>t(...o.map(n)))}function ji(t,e=0){return La(24|e,t,!0)}function Fi(t,e=!0){return La(40,t,!0,e)}function Wp(t){var e=t.teardown;if(e!==null){let i=ks,o=Vt;Fp(!0),qi(null);try{e.call(null)}finally{Fp(i),qi(o)}}}function Kp(t,e=!1){var i=t.first;for(t.first=t.last=null;i!==null;){var o=i.next;(i.f&64)!==0?i.parent=null:Gi(i,e),i=o}}function Og(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&32)===0&&Gi(e),e=i}}function Gi(t,e=!0){var i=!1;(e||(t.f&524288)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(Qp(t.nodes_start,t.nodes_end),i=!0),Kp(t,e&&!i),_d(t,0),An(t,16384);var o=t.transitions;if(o!==null)for(let a of o)a.stop();Wp(t);var s=t.parent;s!==null&&s.first!==null&&qp(t),Me&&(t.component_function=null),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Qp(t,e){for(;t!==null;){var i=t===e?null:qo(t);t.remove(),t=i}}function qp(t){var e=t.parent,i=t.prev,o=t.next;i!==null&&(i.next=o),o!==null&&(o.prev=i),e!==null&&(e.first===t&&(e.first=o),e.last===t&&(e.last=i))}function Xn(t,e){var i=[];ru(t,i,!0),Gp(i,()=>{Gi(t),e&&e()})}function Gp(t,e){var i=t.length;if(i>0){var o=()=>--i||e();for(var s of t)s.out(o)}else e()}function ru(t,e,i){if((t.f&8192)===0){if(t.f^=8192,t.transitions!==null)for(let l of t.transitions)(l.is_global||i)&&e.push(l);for(var o=t.first;o!==null;){var s=o.next,a=(o.f&65536)!==0||(o.f&32)!==0;ru(o,e,a?i:!1),o=s}}}function Vs(t){Ng(t,!0)}function Ng(t,e){if((t.f&8192)!==0){t.f^=8192;for(var i=t.first;i!==null;){var o=i.next,s=(i.f&65536)!==0||(i.f&32)!==0;Ng(i,s?e:!1),i=o}if(t.transitions!==null)for(let a of t.transitions)(a.is_global||e)&&a.in()}}var bd=[],Yp=[];function Bg(){var t=bd;bd=[],oa(t)}function S$(){var t=Yp;Yp=[],oa(t)}function Ln(t){bd.length===0&&queueMicrotask(Bg),bd.push(t)}function Hg(){bd.length>0&&Bg(),Yp.length>0&&S$()}function Ug(t){var e=yt;if(Me&&t instanceof Error&&C$(t,e),(e.f&32768)===0){if((e.f&128)===0)throw t;e.fn(t)}else $d(t,e)}function $d(t,e){for(;e!==null;){if((e.f&128)!==0)try{e.fn(t);return}catch(i){}e=e.parent}throw t}var Fg=new WeakSet;function C$(t,e){var l,d;if(Fg.has(t))return;Fg.add(t);let i=zo(t,"message");if(!(i&&!i.configurable)){for(var o=fd?" ":" ",s=`
|
|
38
|
+
${o}in ${((l=e.fn)==null?void 0:l.name)||"<unknown>"}`,a=e.ctx;a!==null;)s+=`
|
|
39
|
+
${o}in ${(d=a.function)==null?void 0:d[qn].split("/").pop()}`,a=a.p;uo(t,"message",{value:t.message+`
|
|
40
|
+
${s}
|
|
41
41
|
`}),t.stack&&uo(t,"stack",{value:t.stack.split(`
|
|
42
|
-
`).filter(
|
|
43
|
-
`)})}}var Aa=!1,Cl=null,ka=!1,Ps=!1;function Op(t){Ps=t}var md=[],vd=[],Dt=null,gr=!1;function Gi(t){Dt=t}var yt=null;function po(t){yt=t}var Yo=null;function Gc(t){Dt!==null&&Dt.f&2097152&&(Yo===null?Yo=[Dt,[t]]:Yo[1].push(t))}var In=null,hr=0,vr=null;function $g(t){vr=t}var Bg=1,ou=0,As=!1,nu=null;function od(){return++Bg}function Ta(t){var p,v;var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){var i=t.deps,o=(e&256)!==0;if(i!==null){var r,a,l=(e&512)!==0,d=o&&yt!==null&&!As,s=i.length;if(l||d){var u=t,m=u.parent;for(r=0;r<s;r++)a=i[r],(l||!((p=a==null?void 0:a.reactions)!=null&&p.includes(u)))&&((v=a.reactions)!=null?v:a.reactions=[]).push(u);l&&(u.f^=512),d&&m!==null&&(m.f&256)===0&&(u.f^=256)}for(r=0;r<s;r++)if(a=i[r],Ta(a)&&Dp(a),a.wv>t.wv)return!0}(!o||yt!==null&&!As)&&Sn(t,1024)}return!1}function Hg(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];Yo!=null&&Yo[1].includes(t)&&Yo[0]===Dt||((a.f&2)!==0?Hg(a,e,!1):e===a&&(i?Sn(a,2048):(a.f&1024)!==0&&Sn(a,4096),rd(a)))}}function Qc(t){var $,y;var e=In,i=hr,o=vr,r=Dt,a=As,l=Yo,d=Ut,s=gr,u=t.f;In=null,hr=0,vr=null,As=(u&256)!==0&&(gr||!ka||Dt===null),Dt=(u&96)===0?t:null,Yo=null,ed(t.ctx),gr=!1,ou++,t.f|=2097152;try{var m=(0,t.fn)(),p=t.deps;if(In!==null){var v;if(ud(t,hr),p!==null&&hr>0)for(p.length=hr+In.length,v=0;v<In.length;v++)p[hr+v]=In[v];else t.deps=p=In;if(!As||(u&2)!==0&&t.reactions!==null)for(v=hr;v<p.length;v++)((y=($=p[v]).reactions)!=null?y:$.reactions=[]).push(t)}else p!==null&&hr<p.length&&(ud(t,hr),p.length=hr);if(fs()&&vr!==null&&!gr&&p!==null&&(t.f&6146)===0)for(v=0;v<vr.length;v++)Hg(vr[v],t);return r!==null&&r!==t&&(ou++,vr!==null&&(o===null?o=vr:o.push(...vr))),m}catch(b){Dg(b)}finally{In=e,hr=i,vr=o,Dt=r,As=a,Yo=l,ed(d),gr=s,t.f^=2097152}}function b$(t,e){let i=e.reactions;if(i!==null){var o=Jv.call(i,t);if(o!==-1){var r=i.length-1;r===0?i=e.reactions=null:(i[o]=i[r],i.pop())}}i===null&&(e.f&2)!==0&&(In===null||!In.includes(e))&&(Sn(e,4096),(e.f&768)===0&&(e.f^=512),qc(e),ud(e,0))}function ud(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)b$(t,i[o])}function xl(t){var e=t.f;if((e&16384)===0){Sn(t,1024);var i=yt,o=ka;if(yt=t,ka=!0,Re){var r=pr;td(t.component_function)}try{(e&16)!==0?kg(t):Fp(t),Hp(t);var a=Qc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Bg,Re&&ps&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=od(),l.set_during_effect=!1);Re&&vd.push(t)}finally{ka=o,yt=i,Re&&td(r)}}}function Og(){console.error("Last ten effects were: ",vd.slice(-10).map(t=>t.fn)),vd=[]}function $$(){try{lg()}catch(t){if(Re&&uo(t,"stack",{value:""}),Cl!==null)if(Re)try{fd(t,Cl)}catch(e){throw Og(),e}else fd(t,Cl);else throw Re&&Og(),t}}function Qp(){var t=ka;try{var e=0;for(ka=!0;md.length>0;){e++>1e3&&$$();var i=md,o=i.length;md=[];for(var r=0;r<o;r++){var a=x$(i[r]);y$(a)}$l.clear()}}finally{Aa=!1,ka=t,Cl=null,Re&&(vd=[])}}function y$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&Ta(o)&&(xl(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?zp(o):o.fn=null))}}function rd(t){Aa||(Aa=!0,queueMicrotask(Qp));for(var e=Cl=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}md.push(e)}function x$(t){for(var e=[],i=t;i!==null;){var o=i.f,r=(o&96)!==0,a=r&&(o&1024)!==0;if(!a&&(o&8192)===0){(o&4)!==0?e.push(i):r?i.f^=1024:Ta(i)&&xl(i);var l=i.first;if(l!==null){i=l;continue}}var d=i.parent;for(i=i.next;i===null&&d!==null;)i=d.next,d=d.parent}return e}function Tl(t){var e;for(t&&(Aa=!0,Qp(),Aa=!0,e=t());;){if(Vg(),md.length===0)return Aa=!1,Cl=null,Re&&(vd=[]),e;Aa=!0,Qp()}}function mo(){return _t(this,null,function*(){yield Promise.resolve(),Tl()})}function n(t){var e=t.f,i=(e&2)!==0;if(nu!==null&&nu.add(t),Dt!==null&&!gr){if(!(Yo!=null&&Yo[1].includes(t))||Yo[0]!==Dt){var o=Dt.deps;t.rv<ou&&(t.rv=ou,In===null&&o!==null&&o[hr]===t?hr++:In===null?In=[t]:(!As||!In.includes(t))&&In.push(t))}}else if(i&&t.deps===null&&t.effects===null){var r=t,a=r.parent;a!==null&&(a.f&256)===0&&(r.f^=256)}if(i&&(r=t,Ta(r)&&Dp(r)),Re&&ps&&!gr&&Jl!==null&&Dt!==null&&Jl.reaction===Dt)if(t.trace)t.trace();else{var l=Es("TracedAt");if(l){var d=Jl.entries.get(t);d===void 0&&(d={traces:[]},Jl.entries.set(t,d));var s=d.traces[d.traces.length-1];l.stack!==(s==null?void 0:s.stack)&&d.traces.push(l)}}return Ps&&$l.has(t)?$l.get(t):t.v}function Et(t){var e=gr;try{return gr=!0,t()}finally{gr=e}}var w$=-7169;function Sn(t,e){t.f=t.f&w$|e}function su(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Qo in t)ru(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&Qo in i&&ru(i)}}}function ru(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let o in t)try{ru(t[o],e)}catch(r){}let i=xa(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){let o=Fc(i);for(let r in o){let a=o[r].get;if(a)try{a.call(t)}catch(l){}}}}}function Gp(t,e){if(e){let i=document.body;t.autofocus=!0,Tn(()=>{document.activeElement===i&&t.focus()})}}function gd(t){var e=Dt,i=yt;Gi(null),po(null);try{return t()}finally{Gi(e),po(i)}}var Yp=new Set,au=new Set;function La(t){if(!ot)return;t.removeAttribute("onload"),t.removeAttribute("onerror");let e=t.__e;e!==void 0&&(t.__e=void 0,queueMicrotask(()=>{t.isConnected&&t.dispatchEvent(e)}))}function jp(t,e,i,o={}){function r(a){if(o.capture||Il.call(e,a),!a.cancelBubble)return gd(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Tn(()=>{e.addEventListener(t,r,o)}):e.addEventListener(t,r,o),r}function mt(t,e,i,o,r){var a={capture:o,passive:r},l=jp(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Po(()=>{e.removeEventListener(t,l,a)})}function et(t){for(var e=0;e<t.length;e++)Yp.add(t[e]);for(var i of au)i(t)}function Il(t){var C;var e=this,i=e.ownerDocument,o=t.type,r=((C=t.composedPath)==null?void 0:C.call(t))||[],a=r[0]||t.target,l=0,d=t.__root;if(d){var s=r.indexOf(d);if(s!==-1&&(e===document||e===window)){t.__root=e;return}var u=r.indexOf(e);if(u===-1)return;s<=u&&(l=s)}if(a=r[l]||t.target,a!==e){uo(t,"currentTarget",{configurable:!0,get(){return a||i}});var m=Dt,p=yt;Gi(null),po(null);try{for(var v,$=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var b=a["__"+o];if(b!=null&&(!a.disabled||t.target===a))if(cr(b)){var[x,...I]=b;x.apply(a,[t,...I])}else b.call(a,t)}catch(R){v?$.push(R):v=R}if(t.cancelBubble||y===e||y===null)break;a=y}if(v){for(let R of $)queueMicrotask(()=>{throw R});throw v}}finally{t.__root=e,delete t.currentTarget,Gi(m),po(p)}}}var C$;function Fg(){C$=void 0}function El(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function ko(t,e){var i=yt;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function L(t,e){var i=(e&1)!==0,o=(e&2)!==0,r,a=!t.startsWith("<!>");return()=>{if(ot)return ko(xt,null),xt;r===void 0&&(r=El(a?t:"<!>"+t),i||(r=Ii(r)));var l=o||sd?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=Ii(l),s=l.lastChild;ko(d,s)}else ko(l,l);return l}}function E$(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(ot)return ko(xt,null),xt;if(!l){var d=El(a),s=Ii(d);if(r)for(l=document.createDocumentFragment();Ii(s);)l.appendChild(Ii(s));else l=Ii(s)}var u=l.cloneNode(!0);if(r){var m=Ii(u),p=u.lastChild;ko(m,p)}else ko(u,u);return u}}function ke(t,e){return E$(t,e,"svg")}function vs(t=""){if(!ot){var e=Cn(t+"");return ko(e,e),e}var i=xt;return i.nodeType!==fl&&(i.before(i=Cn()),Ci(i)),ko(i,i),i}function De(){if(ot)return ko(xt,null),xt;var t=document.createDocumentFragment(),e=document.createComment(""),i=Cn();return t.append(e,i),ko(e,i),t}function _(t,e){if(ot){yt.nodes_end=xt,ji();return}t!==null&&t.before(e)}var P$=/\r/g;function zg(t){t=t.replace(P$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function Wg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var A$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Kg(t){return A$.includes(t)}var k$=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var L$={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function qg(t){var e;return t=t.toLowerCase(),(e=L$[t])!=null?e:t}var P3=[...k$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var M$=["touchstart","touchmove"];function Qg(t){return M$.includes(t)}var V$=["$state","$state.raw","$derived","$derived.by"],A3=[...V$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var R$=["textarea","script","style","title"];function Gg(t){return R$.includes(t)}function lu(t){return t==null?void 0:t.replace(/\//g,"/")}var hd=!0;function du(t){hd=t}function he(t,e){var o;var i=e==null?"":typeof e=="object"?e+"":e;i!==((o=t.__t)!=null?o:t.__t=t.nodeValue)&&(t.__t=i,t.nodeValue=i+"")}function Xr(t,e){return Yg(t,e)}function Zp(t,e){var l;Xc(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=ot,r=xt;try{for(var a=Ii(i);a&&(a.nodeType!==ur||a.data!==js);)a=jo(a);if(!a)throw cs;fo(!0),Ci(a),ji();let d=Yg(t,ii(Xe({},e),{anchor:a}));if(xt===null||xt.nodeType!==ur||xt.data!==ya)throw ea(),cs;return fo(!1),d}catch(d){if(d===cs)return e.recover===!1&&dg(),Xc(),ad(i),fo(!1),Xr(t,e);throw d}finally{fo(o),Ci(r),Fg()}}var Pl=new Map;function Yg(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){Xc();var d=new Set,s=p=>{for(var v=0;v<p.length;v++){var $=p[v];if(!d.has($)){d.add($);var y=Qg($);e.addEventListener($,Il,{passive:y});var b=Pl.get($);b===void 0?(document.addEventListener($,Il,{passive:y}),Pl.set($,1)):Pl.set($,b+1)}}};s(Zl(Yp)),au.add(s);var u=void 0,m=Ag(()=>{var p=i!=null?i:e.appendChild(Cn());return Bi(()=>{if(a){B({});var v=Ut;v.c=a}r&&(o.$$events=r),ot&&ko(p,null),hd=l,u=t(p,o)||{},hd=!0,ot&&(yt.nodes_end=xt),a&&H()}),()=>{var y;for(var v of d){e.removeEventListener(v,Il);var $=Pl.get(v);--$===0?(document.removeEventListener(v,Il),Pl.delete(v)):Pl.set(v,$)}au.delete(s),p!==i&&((y=p.parentNode)==null||y.removeChild(p))}});return Xp.set(u,m),u}var Xp=new WeakMap;function Ma(t,e){let i=Xp.get(t);return i?(Xp.delete(t),i(e)):(Re&&wg(),Promise.resolve())}function oi(t,e,...i){var o=t,r=bt,a;Xi(()=>{r!==(r=e())&&(a&&(Yi(a),a=null),Re&&r==null&&cg(),a=Bi(()=>r(o,...i)))},65536),ot&&(o=xt)}if(Re){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;fg(e)},set:o=>{i=o}})}};B$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var B$;function Mt(t){Ut===null&&gl("onMount"),us&&Ut.l!==null?N$(Ut).m.push(t):He(()=>{let e=Et(t);if(typeof e=="function")return e})}function cn(t){Ut===null&&gl("onDestroy"),Mt(()=>()=>Et(t))}function N$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var jg=new Map;function Xg(t,e){var i=jg.get(t);i||(i=new Set,jg.set(t,i)),i.add(e)}function M(t,e,[i,o]=[0,0]){ot&&i===0&&ji();var r=t,a=null,l=null,d=to,s=i>0?65536:0,u=!1;let m=(v,$=!0)=>{u=!0,p($,v)},p=(v,$)=>{if(d===(d=v))return;let y=!1;if(ot&&o!==-1){if(i===0){let x=jc(r);x===js?o=0:x===Xs?o=1/0:(o=parseInt(x.substring(1)),o!==o&&(o=d?1/0:-1))}let b=o>i;!!d===b&&(r=Ia(),Ci(r),fo(!1),y=!0,o=-1)}d?(a?Ls(a):$&&(a=Bi(()=>$(r))),l&&Gn(l,()=>{l=null})):(l?Ls(l):$&&(l=Bi(()=>$(r,[i+1,o]))),a&&Gn(a,()=>{a=null})),y&&fo(!0)};Xi(()=>{u=!1,e(m),u||p(null,null)},s),ot&&(r=xt)}function Ms(t,e,i){ot&&ji();var o=t,r=to,a,l=fs()?og:ml;Xi(()=>{l(r,r=e())&&(a&&Gn(a),a=Bi(()=>i(o)))}),ot&&(o=xt)}var ia=null;function tf(t){ia=t}function _d(t,e){return e}function U$(t,e,i,o){for(var r=[],a=e.length,l=0;l<a;l++)tu(e[l].e,r,!0);var d=a>0&&r.length===0&&i!==null;if(d){var s=i.parentNode;ad(s),s.append(i),o.clear(),ta(t,e[0].prev,e[a-1].next)}Wp(r,()=>{for(var u=0;u<a;u++){var m=e[u];d||(o.delete(m.k),ta(t,m.prev,m.next)),Yi(m.e,!d)}})}function yi(t,e,i,o,r,a=null){var l=t,d={flags:e,items:new Map,first:null},s=(e&4)!==0;if(s){var u=t;l=ot?Ci(Ii(u)):u.appendChild(Cn())}ot&&ji();var m=null,p=!1,v=mr(()=>{var $=i();return cr($)?$:$==null?[]:Zl($)});Xi(()=>{var $=n(v),y=$.length;if(p&&y===0)return;p=y===0;let b=!1;if(ot){var x=jc(l)===Xs;x!==(y===0)&&(l=Ia(),Ci(l),fo(!1),b=!0)}if(ot){for(var I=null,C,R=0;R<y;R++){if(xt.nodeType===ur&&xt.data===ya){l=xt,b=!0,fo(!1);break}var k=$[R],P=o(k,R);C=eh(xt,d,I,null,k,P,R,r,e,i),d.items.set(P,C),I=C}y>0&&Ci(Ia())}ot||z$($,d,l,r,e,o,i),a!==null&&(y===0?m?Ls(m):m=Bi(()=>a(l)):m!==null&&Gn(m,()=>{m=null})),b&&fo(!0),n(v)}),ot&&(l=xt)}function z$(t,e,i,o,r,a,l){var X,Ie,fe,ee;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,m=e.items,p=e.first,v=p,$,y=null,b,x=[],I=[],C,R,k,P;if(d)for(P=0;P<u;P+=1)C=t[P],R=a(C,P),k=m.get(R),k!==void 0&&((X=k.a)==null||X.measure(),(b!=null?b:b=new Set).add(k));for(P=0;P<u;P+=1){if(C=t[P],R=a(C,P),k=m.get(R),k===void 0){var E=v?v.e.nodes_start:i;y=eh(E,e,y,y===null?e.first:y.next,C,R,P,o,r,l),m.set(R,y),x=[],I=[],v=y.next;continue}if(s&&W$(k,C,P,r),(k.e.f&8192)!==0&&(Ls(k.e),d&&((Ie=k.a)==null||Ie.unfix(),(b!=null?b:b=new Set).delete(k))),k!==v){if($!==void 0&&$.has(k)){if(x.length<I.length){var W=I[0],F;y=W.prev;var U=x[0],j=x[x.length-1];for(F=0;F<x.length;F+=1)Zg(x[F],W,i);for(F=0;F<I.length;F+=1)$.delete(I[F]);ta(e,U.prev,j.next),ta(e,y,U),ta(e,j,W),v=W,y=j,P-=1,x=[],I=[]}else $.delete(k),Zg(k,v,i),ta(e,k.prev,k.next),ta(e,k,y===null?e.first:y.next),ta(e,y,k),y=k;continue}for(x=[],I=[];v!==null&&v.k!==R;)(v.e.f&8192)===0&&($!=null?$:$=new Set).add(v),I.push(v),v=v.next;if(v===null)continue;k=v}x.push(k),y=k,v=k.next}if(v!==null||$!==void 0){for(var re=$===void 0?[]:Zl($);v!==null;)(v.e.f&8192)===0&&re.push(v),v=v.next;var G=re.length;if(G>0){var oe=(r&4)!==0&&u===0?i:null;if(d){for(P=0;P<G;P+=1)(fe=re[P].a)==null||fe.measure();for(P=0;P<G;P+=1)(ee=re[P].a)==null||ee.fix()}U$(e,re,oe,m)}}d&&Tn(()=>{var be;if(b!==void 0)for(k of b)(be=k.a)==null||be.apply()}),yt.first=e.first&&e.first.e,yt.last=y&&y.e}function W$(t,e,i,o){(o&1)!==0&&yl(t.v,e),(o&2)!==0?yl(t.i,i):t.i=i}function eh(t,e,i,o,r,a,l,d,s,u){var m=ia,p=(s&1)!==0,v=(s&16)===0,$=p?v?ms(r,!1,!1):kr(r):r,y=(s&2)===0?l:kr(l);Re&&p&&($.trace=()=>{var x=typeof y=="number"?l:y.v;u()[x]});var b={i:y,v:$,k:a,a:null,e:null,prev:i,next:o};ia=b;try{return b.e=Bi(()=>d(t,$,y,u),ot),b.e.prev=i&&i.e,b.e.next=o&&o.e,i===null?e.first=b:(i.next=b,i.e.next=b.e),o!==null&&(o.prev=b,o.e.prev=b.e),b}finally{ia=m}}function Zg(t,e,i){for(var o=t.next?t.next.e.nodes_start:i,r=e?e.e.nodes_start:i,a=t.e.nodes_start;a!==o;){var l=jo(a);r.before(a),a=l}}function ta(t,e,i){e===null?t.first=i:(e.next=i,e.e.next=i&&i.e),i!==null&&(i.prev=e,i.e.prev=e&&e.e)}function K$(t,e,i){var a,l;if(!e||e===zg(String(i!=null?i:"")))return;let o,r=(a=t.__svelte_meta)==null?void 0:a.loc;r?o=`near ${r.file}:${r.line}:${r.column}`:(l=pr)!=null&&l[Wn]&&(o=`in ${pr[Wn]}`),xg(lu(o))}function bd(t,e,i=!1,o=!1,r=!1){var a=t,l="";O(()=>{var $;var d=yt;if(l===(l=($=e())!=null?$:"")){ot&&ji();return}if(d.nodes_start!==null&&(Up(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(ot){for(var s=xt.data,u=ji(),m=u;u!==null&&(u.nodeType!==ur||u.data!=="");)m=u,u=jo(u);if(u===null)throw ea(),cs;Re&&!r&&K$(u.parentNode,s,l),ko(xt,m),a=Ci(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var v=El(p);if((i||o)&&(v=Ii(v)),ko(Ii(v),v.lastChild),i||o)for(;Ii(v);)a.before(Ii(v));else a.before(v)}})}function Hi(t,e,i){ot&&ji();var o=t,r,a;Xi(()=>{r!==(r=e())&&(a&&(Gn(a),a=null),r&&(a=Bi(()=>i(o,r))))},65536),ot&&(o=xt)}function Va(t,e,i,o,r,a){var y;let l=ot;ot&&ji();var d=Re&&a&&((y=Ut)==null?void 0:y.function[Wn]),s,u,m=null;ot&&xt.nodeType===zc&&(m=xt,ji());var p=ot?xt:t,v,$=ia;Xi(()=>{let b=e()||null;var x=r?r():i||b==="svg"?Bc:null;if(b!==s){var I=ia;tf($),v&&(b===null?Gn(v,()=>{v=null,u=null}):b===u?Ls(v):(Yi(v),du(!1))),b&&b!==u&&(v=Bi(()=>{if(m=ot?m:x?document.createElementNS(x,b):document.createElement(b),Re&&a&&(m.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),ko(m,m),o){ot&&Gg(b)&&m.append(document.createComment(""));var C=ot?Ii(m):m.appendChild(Cn());ot&&(C===null?fo(!1):Ci(C)),o(m,C)}yt.nodes_end=m,p.before(m)})),s=b,s&&(u=s),du(!0),tf(I)}},65536),l&&(fo(!0),Ci(p))}var nf;function th(t){return nf=t.target,new of(t)}var Vs,Lr,of=class{constructor(e){Ys(this,Vs);Ys(this,Lr);var a,l;var i=new Map,o=(d,s)=>{var u=ms(s,!1,!1);return i.set(d,u),u};let r=new Proxy(ii(Xe({},e.props||{}),{$$events:{}}),{get(d,s){var u;return n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s)))},has(d,s){var u;return s===pl?!0:(n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s))),Reflect.has(d,s))},set(d,s,u){var m;return D((m=i.get(s))!=null?m:o(s,u),u),Reflect.set(d,s,u)}});ul(this,Lr,(e.hydrate?Zp:Xr)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:(a=e.intro)!=null?a:!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&Tl(),ul(this,Vs,r.$$events);for(let d of Object.keys(Ni(this,Lr)))d==="$set"||d==="$destroy"||d==="$on"||uo(this,d,{get(){return Ni(this,Lr)[d]},set(s){Ni(this,Lr)[d]=s},enumerable:!0});Ni(this,Lr).$set=d=>{Object.assign(r,d)},Ni(this,Lr).$destroy=()=>{Ma(Ni(this,Lr))}}$set(e){Ni(this,Lr).$set(e)}$on(e,i){Ni(this,Vs)[e]=Ni(this,Vs)[e]||[];let o=(...r)=>i.call(this,...r);return Ni(this,Vs)[e].push(o),()=>{Ni(this,Vs)[e]=Ni(this,Vs)[e].filter(r=>r!==o)}}$destroy(){Ni(this,Lr).$destroy()}};Vs=new WeakMap,Lr=new WeakMap;function Q(t,e){Tn(()=>{var r,a,l;var i=t.getRootNode(),o=i.host?i:(l=(r=i.head)!=null?r:i.ownerDocument.head)!=null?l:(a=nf)==null?void 0:a.parentNode;if(!(o!=null&&o.querySelector("#"+e.hash))){let d=document.createElement("style");d.id=e.hash,d.textContent=e.code,o.appendChild(d),Re&&Xg(e.hash,d)}})}function Rs(t,e){var i=void 0,o;Xi(()=>{i!==(i=e())&&(o&&(Yi(o),o=null),i&&(o=Bi(()=>{Ao(()=>i(t))})))})}function ih(t){var e,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(i=ih(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function oh(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=ih(t))&&(o&&(o+=" "),o+=e);return o}function $d(t){return typeof t=="object"?oh(t):t!=null?t:""}var nh=[...`
|
|
44
|
-
\r\f \v\uFEFF`];function sh(t,e,i){var o=t==null?"":""+t;if(e&&(o=o?o+" "+e:e),i){for(var r in i)if(i[r])o=o?o+" "+r:r;else if(o.length)for(var a=r.length,l=0;(l=o.indexOf(r,l))>=0;){var d=l+a;(l===0||nh.includes(o[l-1]))&&(d===o.length||nh.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function rh(t,e=!1){var i=e?" !important;":";",o="";for(var r in t){var a=t[r];a!=null&&a!==""&&(o+=" "+r+": "+a+i)}return o}function rf(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function ah(t,e){if(e){var i="",o,r;if(Array.isArray(e)?(o=e[0],r=e[1]):o=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,l=0,d=!1,s=[];o&&s.push(...Object.keys(o).map(rf)),r&&s.push(...Object.keys(r).map(rf));var u=0,m=-1;let b=t.length;for(var p=0;p<b;p++){var v=t[p];if(d?v==="/"&&t[p-1]==="*"&&(d=!1):a?a===v&&(a=!1):v==="/"&&t[p+1]==="*"?d=!0:v==='"'||v==="'"?a=v:v==="("?l++:v===")"&&l--,!d&&a===!1&&l===0){if(v===":"&&m===-1)m=p;else if(v===";"||p===b-1){if(m!==-1){var $=rf(t.substring(u,m).trim());if(!s.includes($)){v!==";"&&p++;var y=t.substring(u,p).trim();i+=" "+y+";"}}u=p+1,m=-1}}}}return o&&(i+=rh(o)),r&&(i+=rh(r,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function ie(t,e,i,o,r,a){var l=t.__className;if(ot||l!==i||l===void 0){var d=sh(i,o,a);(!ot||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&r!==a)for(var s in a){var u=!!a[s];(r==null||u!==!!r[s])&&t.classList.toggle(s,u)}return a}function sf(t,e={},i,o){for(var r in i){var a=i[r];e[r]!==a&&(i[r]==null?t.style.removeProperty(r):t.style.setProperty(r,a,o))}}function Ke(t,e,i,o){var r=t.__style;if(ot||r!==e){var a=ah(e,o);(!ot||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(sf(t,i==null?void 0:i[0],o[0]),sf(t,i==null?void 0:i[1],o[1],"important")):sf(t,i,o));return o}function yd(t,e,i){if(t.multiple){if(e==null)return;if(!cr(e))return Sg();for(var o of t.options)o.selected=e.includes(lh(o));return}for(o of t.options){var r=lh(o);if(kp(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function af(t){var e=new MutationObserver(()=>{yd(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Po(()=>{e.disconnect()})}function lh(t){return"__value"in t?t.__value:t.value}var Al=Symbol("class"),kl=Symbol("style"),uh=Symbol("is custom element"),ph=Symbol("is html");function fh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Oe(t,e,i,o){var r=vh(t);if(ot&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||J$(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[ig]=i),i==null?t.removeAttribute(e):typeof i!="string"&&gh(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function mh(t,e,i,o,r=!1){var k;var a=vh(t),l=a[uh],d=!a[ph];let s=ot&&l;s&&fo(!1);var u=e||{},m=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=$d(i.class):(o||i[Al])&&(i.class=null),i[kl]&&((k=i.style)!=null||(i.style=null));var v=gh(t);for(let P in i){let E=i[P];if(m&&P==="value"&&E==null){t.value=t.__value="",u[P]=E;continue}if(P==="class"){var $=t.namespaceURI==="http://www.w3.org/1999/xhtml";ie(t,$,E,o,e==null?void 0:e[Al],i[Al]),u[P]=E,u[Al]=i[Al];continue}if(P==="style"){Ke(t,E,e==null?void 0:e[kl],i[kl]),u[P]=E,u[kl]=i[kl];continue}var y=u[P];if(!(E===y&&!(E===void 0&&t.hasAttribute(P)))){u[P]=E;var b=P[0]+P[1];if(b!=="$$")if(b==="on"){let W={},F="$$"+P,U=P.slice(2);var x=Kg(U);if(Wg(U)&&(U=U.slice(0,-7),W.capture=!0),!x&&y){if(E!=null)continue;t.removeEventListener(U,u[F],W),u[F]=null}if(E!=null)if(x)t[`__${U}`]=E,et([U]);else{let j=function(re){u[P].call(this,re)};var R=j;u[F]=jp(U,t,j,W)}else x&&(t[`__${U}`]=void 0)}else if(P==="style")Oe(t,P,E);else if(P==="autofocus")Gp(t,!!E);else if(!l&&(P==="__value"||P==="value"&&E!=null))t.value=t.__value=E;else if(P==="selected"&&m)fh(t,E);else{var I=P;d||(I=qg(I));var C=I==="defaultValue"||I==="defaultChecked";if(E==null&&!l&&!C)if(a[P]=null,I==="value"||I==="checked"){let W=t,F=e===void 0;if(I==="value"){let U=W.defaultValue;W.removeAttribute(I),W.defaultValue=U,W.value=W.__value=F?U:null}else{let U=W.defaultChecked;W.removeAttribute(I),W.defaultChecked=U,W.checked=F?U:!1}}else t.removeAttribute(P);else C||v.includes(I)&&(l||typeof E!="string")?t[I]=E:typeof E!="function"&&Oe(t,I,E,r)}}}return s&&fo(!0),u}function io(t,e,i=[],o,r=!1,a=Gr){let l=i.map(a);var d=void 0,s={},u=t.nodeName==="SELECT",m=!1;if(Xi(()=>{var v=e(...l.map(n)),$=mh(t,d,v,o,r);m&&u&&"value"in v&&yd(t,v.value,!1);for(let b of Object.getOwnPropertySymbols(s))v[b]||Yi(s[b]);for(let b of Object.getOwnPropertySymbols(v)){var y=v[b];b.description===wp&&(!d||y!==d[b])&&(s[b]&&Yi(s[b]),s[b]=Bi(()=>Rs(t,()=>y))),$[b]=y}d=$}),u){var p=t;Ao(()=>{yd(p,d.value),af(p)})}m=!0}function vh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[uh]:t.nodeName.includes("-"),[ph]:t.namespaceURI===Yv}}var dh=new Map;function gh(t){var e=dh.get(t.nodeName);if(e)return e;dh.set(t.nodeName,e=[]);for(var i,o=t,r=Element.prototype;r!==o;){i=Fc(o);for(var a in i)i[a].set&&e.push(a);o=xa(o)}return e}function J$(t,e,i){var o;Re&&(e==="srcset"&&e1(t,i)||lf((o=t.getAttribute(e))!=null?o:"",i)||yg(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function lf(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function ch(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function e1(t,e){var i=ch(t.srcset),o=ch(e);return o.length===i.length&&o.every(([r,a],l)=>a===i[l][1]&&(lf(i[l][0],r)||lf(r,i[l][0])))}var t1=Hc?()=>performance.now():()=>Date.now(),Zr={tick:t=>(Hc?requestAnimationFrame:bt)(t),now:()=>t1(),tasks:new Set};function hh(){let t=Zr.now();Zr.tasks.forEach(e=>{e.c(t)||(Zr.tasks.delete(e),e.f())}),Zr.tasks.size!==0&&Zr.tick(hh)}function _h(t){let e;return Zr.tasks.size===0&&Zr.tick(hh),{promise:new Promise(i=>{Zr.tasks.add(e={c:t,f:i})}),abort(){Zr.tasks.delete(e)}}}function cu(t,e){gd(()=>{t.dispatchEvent(new CustomEvent(e))})}function r1(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;let e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(i=>i[0].toUpperCase()+i.slice(1)).join("")}function bh(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=r1(r.trim());e[l]=a.trim()}return e}var s1=t=>t;function Ds(t,e,i,o){var R;var r=(t&1)!==0,a=(t&2)!==0,l=r&&a,d=(t&4)!==0,s=l?"both":r?"in":"out",u,m=e.inert,p=e.style.overflow,v,$;function y(){var E;var k=Dt,P=yt;Gi(null),po(null);try{return u!=null?u:u=i()(e,(E=o==null?void 0:o())!=null?E:{},{direction:s})}finally{Gi(k),po(P)}}var b={is_global:d,in(){var k;if(e.inert=m,!r){$==null||$.abort(),(k=$==null?void 0:$.reset)==null||k.call($);return}a||v==null||v.abort(),cu(e,"introstart"),v=df(e,y(),$,1,()=>{cu(e,"introend"),v==null||v.abort(),v=u=void 0,e.style.overflow=p})},out(k){if(!a){k==null||k(),u=void 0;return}e.inert=!0,cu(e,"outrostart"),$=df(e,y(),v,0,()=>{cu(e,"outroend"),k==null||k()})},stop:()=>{v==null||v.abort(),$==null||$.abort()}},x=yt;if(((R=x.transitions)!=null?R:x.transitions=[]).push(b),r&&hd){var I=d;if(!I){for(var C=x.parent;C&&(C.f&65536)!==0;)for(;(C=C.parent)&&(C.f&16)===0;);I=!C||(C.f&32768)!==0}I&&Ao(()=>{Et(()=>b.in())})}}function df(t,e,i,o,r){var a=o===1;if(Zs(e)){var l,d=!1;return Tn(()=>{if(!d){var x=e({direction:a?"in":"out"});l=df(t,x,i,o,r)}}),{abort:()=>{d=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return r(),{abort:bt,deactivate:bt,reset:bt,t:()=>o};let{delay:s=0,css:u,tick:m,easing:p=s1}=e;var v=[];if(a&&i===void 0&&(m&&m(0,1),u)){var $=bh(u(0,1));v.push($,$)}var y=()=>1-o,b=t.animate(v,{duration:s,fill:"forwards"});return b.onfinish=()=>{var U;b.cancel();var x=(U=i==null?void 0:i.t())!=null?U:1-o;i==null||i.abort();var I=o-x,C=e.duration*Math.abs(I),R=[];if(C>0){var k=!1;if(u)for(var P=Math.ceil(C/16.666666666666668),E=0;E<=P;E+=1){var W=x+I*p(E/P),F=bh(u(W,1-W));R.push(F),k||(k=F.overflow==="hidden")}k&&(t.style.overflow="hidden"),y=()=>{var j=b.currentTime;return x+I*p(j/C)},m&&_h(()=>{if(b.playState!=="running")return!1;var j=y();return m(j,1-j),!0})}b=t.animate(R,{duration:C,fill:"forwards"}),b.onfinish=()=>{y=()=>o,m==null||m(o,1-o),r()}},{abort:()=>{b&&(b.cancel(),b.effect=null,b.onfinish=bt)},deactivate:()=>{r=bt},reset:()=>{o===0&&(m==null||m(1,0))},t:()=>y()}}function cf(t,e,i){var o=qo(t,e);o&&o.set&&(t[e]=i,Po(()=>{t[e]=null}))}var oa,Ll,xd,pu,$h,fu=class fu{constructor(e){Ys(this,pu);Ys(this,oa,new WeakMap);Ys(this,Ll);Ys(this,xd);ul(this,xd,e)}observe(e,i){var o=Ni(this,oa).get(e)||new Set;return o.add(i),Ni(this,oa).set(e,o),Qv(this,pu,$h).call(this).observe(e,Ni(this,xd)),()=>{var r=Ni(this,oa).get(e);r.delete(i),r.size===0&&(Ni(this,oa).delete(e),Ni(this,Ll).unobserve(e))}}};oa=new WeakMap,Ll=new WeakMap,xd=new WeakMap,pu=new WeakSet,$h=function(){var e;return(e=Ni(this,Ll))!=null?e:ul(this,Ll,new ResizeObserver(i=>{for(var o of i){fu.entries.set(o.target,o);for(var r of Ni(this,oa).get(o.target)||[])r(o)}}))},dr(fu,"entries",new WeakMap);var uf=fu;var a1=new uf({box:"border-box"});function En(t,e,i){var o=a1.observe(t,()=>i(t[e]));Ao(()=>(Et(()=>i(t[e])),o))}function yh(t,e){return t===e||(t==null?void 0:t[Qo])===e}function tt(t={},e,i,o){return Ao(()=>{var r,a;return Xo(()=>{r=a,a=(o==null?void 0:o())||[],Et(()=>{t!==i(...a)&&(e(t,...a),r&&yh(i(...r),t)&&e(null,...r))})}),()=>{Tn(()=>{a&&yh(i(...a),t)&&e(null,...a)})}}),t}function Zo(t=!1){let e=Ut,i=e.l.u;if(!i)return;let o=()=>su(e.s);if(t){let r=0,a={},l=Gr(()=>{let d=!1,s=e.s;for(let u in s)s[u]!==a[u]&&(a[u]=s[u],d=!0);return d&&r++,r});o=()=>n(l)}i.b.length&&cd(()=>{xh(e,o),Js(i.b)}),He(()=>{let r=Et(()=>i.m.map(tg));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&He(()=>{xh(e,o),Js(i.a)})}function xh(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function wd(t,e,i){if(t==null)return e(void 0),i&&i(void 0),bt;let o=Et(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Ml=[];function Mr(t,e){return{subscribe:se(t,e).subscribe}}function se(t,e=bt){let i=null,o=new Set;function r(d){if(ml(t,d)&&(t=d,i)){let s=!Ml.length;for(let u of o)u[1](),Ml.push(u,t);if(s){for(let u=0;u<Ml.length;u+=2)Ml[u][0](Ml[u+1]);Ml.length=0}}}function a(d){r(d(t))}function l(d,s=bt){let u=[d,s];return o.add(u),o.size===1&&(i=e(r,a)||bt),d(t),()=>{o.delete(u),o.size===0&&i&&(i(),i=null)}}return{set:r,update:a,subscribe:l}}function mi(t,e,i){let o=!Array.isArray(t),r=o?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let a=e.length<2;return Mr(i,(l,d)=>{let s=!1,u=[],m=0,p=bt,v=()=>{if(m)return;p();let y=e(o?u[0]:u,l,d);a?l(y):p=typeof y=="function"?y:bt},$=r.map((y,b)=>wd(y,x=>{u[b]=x,m&=~(1<<b),s&&v()},()=>{m|=1<<b}));return s=!0,v(),function(){Js($),p(),s=!1}})}function $e(t){let e;return wd(t,i=>e=i)(),e}var mu=!1,pf=Symbol();function w(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:ms(void 0),unsubscribe:bt};if(o.store!==t&&!(pf in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=bt;else{var r=!0;o.unsubscribe=wd(t,l=>{r?o.source.v=l:D(o.source,l)}),r=!1}return t&&pf in i?$e(t):n(o.source)}function Be(){let t={};function e(){Po(()=>{for(var i in t)t[i].unsubscribe();uo(t,pf,{enumerable:!1,value:!0})})}return[t,e]}function ff(t){var e=mu;try{return mu=!1,[t(),mu]}finally{mu=e}}var m1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Re&&pg(`${t.name}.${String(e)}`),!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Pn(t,e,i){return new Proxy(Re?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},m1)}var v1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(Zs(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o)return o[e]}},set(t,e,i){let o=t.props.length;for(;o--;){let r=t.props[o];Zs(r)&&(r=r());let a=qo(r,e);if(a&&a.set)return a.set(i),!0}return!1},getOwnPropertyDescriptor(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(Zs(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let r=qo(o,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===Qo||e===pl)return!1;for(let i of t.props)if(Zs(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(Zs(i)&&(i=i()),!!i){for(let o in i)e.includes(o)||e.push(o);for(let o of Object.getOwnPropertySymbols(i))e.includes(o)||e.push(o)}return e}};function Jr(...t){return new Proxy({props:t},v1)}function wh(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function g(t,e,i,o){var W,F;var r=(i&1)!==0,a=!us||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,s=!1,u;l?[u,s]=ff(()=>t[e]):u=t[e];var m=Qo in t||pl in t,p=l&&((F=(W=qo(t,e))==null?void 0:W.set)!=null?F:m&&e in t&&(U=>t[e]=U))||void 0,v=o,$=!0,y=!1,b=()=>(y=!0,$&&($=!1,d?v=Et(o):v=o),v);u===void 0&&o!==void 0&&(p&&a&&ug(e),u=b(),p&&p(u));var x;if(a)x=()=>{var U=t[e];return U===void 0?b():($=!0,y=!1,U)};else{var I=(r?Gr:mr)(()=>t[e]);I.f|=131072,x=()=>{var U=n(I);return U!==void 0&&(v=void 0),U===void 0?v:U}}if((i&4)===0&&a)return x;if(p){var C=t.$$legacy;return function(U,j){return arguments.length>0?((!a||!j||C||s)&&p(j?x():U),U):x()}}var R=!1,k=!1,P=ms(u),E=Gr(()=>{var U=x(),j=n(P);return R?(R=!1,k=!0,j):(k=!1,P.v=U)});return l&&n(E),r||(E.equals=vl),function(U,j){if(nu!==null&&(R=k,x(),n(P)),arguments.length>0){let re=j?n(E):a&&l?li(U):U;if(!E.equals(re)){if(R=!0,D(P,re),y&&v!==void 0&&(v=re),wh(E))return U;Et(()=>n(E))}return U}return wh(E)?E.v:n(E)}}var g1;typeof HTMLElement=="function"&&(g1=class extends HTMLElement{constructor(e,i,o){super();dr(this,"$$ctor");dr(this,"$$s");dr(this,"$$c");dr(this,"$$cn",!1);dr(this,"$$d",{});dr(this,"$$r",!1);dr(this,"$$p_d",{});dr(this,"$$l",{});dr(this,"$$l_u",new Map);dr(this,"$$me");this.$$ctor=e,this.$$s=i,o&&this.attachShadow({mode:"open"})}addEventListener(e,i,o){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){let r=this.$$c.$on(e,i);this.$$l_u.set(i,r)}super.addEventListener(e,i,o)}removeEventListener(e,i,o){if(super.removeEventListener(e,i,o),this.$$c){let r=this.$$l_u.get(i);r&&(r(),this.$$l_u.delete(i))}}connectedCallback(){return _t(this,null,function*(){if(this.$$cn=!0,!this.$$c){let i=function(a){return l=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),_(l,d)}};var e=i;if(yield Promise.resolve(),!this.$$cn||this.$$c)return;let o={},r=h1(this);for(let a of this.$$s)a in r&&(a==="default"&&!this.$$d.children?(this.$$d.children=i(a),o.default=!0):o[a]=i(a));for(let a of this.attributes){let l=this.$$g_p(a.name);l in this.$$d||(this.$$d[l]=mf(l,a.value,this.$$p_d,"toProp"))}for(let a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=th({component:this.$$ctor,target:this.shadowRoot||this,props:ii(Xe({},this.$$d),{$$slots:o,$$host:this})}),this.$$me=eu(()=>{Xo(()=>{var a;this.$$r=!0;for(let l of Sp(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=mf(l,this.$$d[l],this.$$p_d,"toAttribute");d==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,d)}this.$$r=!1})});for(let a in this.$$l)for(let l of this.$$l[a]){let d=this.$$c.$on(a,l);this.$$l_u.set(l,d)}this.$$l={}}})}attributeChangedCallback(e,i,o){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=mf(e,o,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Sp(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function mf(t,e,i,o){var a;let r=(a=i[t])==null?void 0:a.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!i[t])return e;if(o==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e==null?null:e;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function h1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var Sh="5";var Ch,Th,Ih;typeof window!="undefined"&&((Ih=(Th=(Ch=window.__svelte)!=null?Ch:window.__svelte={}).v)!=null?Ih:Th.v=new Set).add(Sh);import{areValidLiveRecordSources as VT,clientChecker as Cv}from"@vkontakte/videoplayer-core/es2015";import"@vkontakte/videoplayer-core/es2015";import{noop as Hb,safeStorage as RT,throttleFn as DT}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as OT}from"@vkontakte/videoplayer-statistics/es2015";import{InterfaceLanguage as _1,fillWithDefault as b1,VideoQuality as Eh}from"@vkontakte/videoplayer-shared/es2015";var $1={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:_1.RU,downloadVKLanguages:!0,updateBuiltinLanguages:!0,isSmoothVideoRotate:!0,showSupport:!0,supportLink:"https://vk.com/support?act=new&from=v",showLogo:void 0,logoLink:"https://vk.com/video",logoType:"vk_video",volumeDefault:1,volumeMinRestore:.05,loaderDelay:500,minSubtitlesFontSize:13,autoSubtitlesTimeout:2e3,allowChangingFullscreenTarget:!0,trafficSavingLimit:Eh.Q_480P,highQualityLimit:Eh.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,features:{autoplay:!0,statistics:!0,thinStatistics:!1,preload:!0,subtitles:!0,episodes:!0,fullscreen:!0,timelinePreview:!0,mediaSession:!0,annotations:!0,slots:!0,annotationsInside:!1,pip:!0,dpip:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,episodesClustering:!0,copyVideoLink:!0,videoRotate:!0,tracer:!1,apptracer:{enabled:!1,sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},interactiveGraph:!1,interactiveResponsiveUi:!1,seekToInteractive:!0,interactiveLastFrame:!1,interactiveTextPermanent:!0,interactiveHideTime:!0,interactivePlayPrevChapter:!0,interactiveTimeIndicator:!0,interactiveTimeOpenUri:!1,interactiveAreaControlShadow:!1,interactiveControlsExpectTimeBlinkAnimation:!1,interactiveControlsTapPlace:!1,interactiveControlsFillAnimation:!1,interactiveControlsHideAnimation:!1,interactiveHistoryEndChapterFix:!0,thumbTimer:!0,hotKeyMapModal:!0,hotKeyHelpers:!0,saveDebugInfoToFile:!1,saveTraceInfoToFile:!1,additionalButtons:!0,additionalButtonsDesktopControlPanelRight:!0,additionalSettingsMenuItems:!0,additionalContextMenuItems:!0,contextMenuButton:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,autoplayNext:!0,nextPrevButtons:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,qualityDetailsSubMenuEnabled:!1,showSlowVideoNotification:!1,forceAutoQualityWhenSevereStallHappens:!1,timeoutShowSlowVideoNotification:0,maxCountShowSlowVideoNotification:1,forcePlayerDisplayBlock:!1,playbackStatusShow:!1,playbackStatusNextVideoShow:!1,initSubtitles:!0,useCallbackForMediaSessionNextPrevClick:!1,usePerformanceFix:!1,userVideoPrefs:!1,savePreferredStatesOnUserActionOnly:!1,useLoopSetting:!1,doubleForwardAvailable:!1,useRichSeek:!1,disableThumbUnstartedOnAutoplay:!1},controls:{showOnStartupAtAutoplay:!0,hideTimeout:500,hideTimeoutMobile:3e3,hideTimeoutInitial:200,hideTimeoutFullscreen:3e3,hideTimeoutCursor:3e3,hideTimeoutTooltips:1e3,collapseMobileUnmute:6e3,hide360IconTimeout:3e3,hideHotKeyHelpers:2e3,playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25,volumeStepKeyboard:.05,volumeStepWheel:.05,volumeBarTimeout:300,seekStepKeyboard:1e4,seekStepMobile:15e3,seekStepFrame:400},ads:{enable:void 0,initTimeout:2e3,loadTimeout:2e3,runtimeTimeout:5e3,slot:void 0,preview:void 0,paramsOverride:void 0,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},disablePiPResizeHandling:!1,interactive:{historyMaxLength:100,noInteractionEventTimeout:3e4},view:{timelineSliderColor:null,timelineSliderHandleColor:null,timelineSliderFilledColor:null,timelineSliderLoadedColor:null,volumeSliderColor:null,volumeSliderHandleColor:null,volumeSliderFilledColor:null,controlsTimeColor:null,timelineSliderFilledActiveLiveColor:null,timelineSliderHandleActiveLiveColor:null,buttonColor:null,buttonToggleOnColor:null,focusedColor:null,font:null,focusedOutlineWidth:null,focusedOutlineRadius:null,controlsDesktopPaddingHorizontal:null,timelinePaddingHorizontal:null,settingsBackgroundColor:null,controlsGradientHeight:null,controlsGradient:null},userSalt:"0",doubleForwardActivationTime:600,playbackStatusAnimationDuration:1e3,playbackStatusNextVideoAnimationDuration:1e3,suitableDurationForUsingRichSeek:180,titleShowBehaviour:"fullscreen",disabledSlotIds:[],disabledAdditionalButtonIds:[]},Ph=t=>b1(t,$1),Ah=t=>_l("ui-config",t),Vt=()=>hl("ui-config");var Sd="vk_player_debug_panel_opened";var kh="videoplayer",Lh="videoplayer";var gs={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Mh=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Vh=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Rh=new Set(["ShiftRight","ShiftLeft"]);var Dh=["TIMELINE"],Cd=[...Dh,"GRAPH_BUTTON"],vf=[...Dh,"PLAY_BUTTON"],Td=[...Cd,"PLAY_BUTTON"];var hs=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(hs||{}),Id={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Oh,VERSION as y1}from"@vkontakte/videoplayer-shared/es2015";import{VERSION as x1}from"@vkontakte/videoplayer-core/es2015";import{VERSION as w1}from"@vkontakte/videoplayer-statistics/es2015";var vu="prod",Vl="1.1.85-dev.c9a557fc.0";var Da=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Nh=Symbol("storeContext"),Bh=Symbol("microStoresContext"),Hh=(t,e)=>{_l(Nh,t),_l(Bh,e),vu==="dev"&&(window.app={store:t,microStores:e})},ye=()=>{let t=hl(Nh);return Oh(t,"Store context is empty!"),t},_o=()=>{let t=hl(Bh);return Oh(t,"MicroStores context is empty!"),t},ni=(t,e)=>hu(t,t.getValue(),e),hu=(t,e,i)=>Mr(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),Fh=(t,e,i,o,r=["meta config not provided"])=>{var F,U,j,re,G,oe,X,Ie,fe;let a=t.info,{width:l,height:d}=$e(i.ui.playerSize),s=(U=(F=a.throughputEstimation$.getValue())==null?void 0:F.toFixed(0))!=null?U:0,u=(re=(j=a.rttEstimation$.getValue())==null?void 0:j.toFixed(0))!=null?re:0,m=a.isAutoQualityEnabled$.getValue()?"auto":"manual",p=`${Vl} (core: ${x1}, stat: ${w1}, shared: ${y1})`,v=$e(i.state.errorLog$),$=v.length?`
|
|
45
|
-
`+v.map((ee
|
|
46
|
-
`,
|
|
47
|
-
`,
|
|
48
|
-
`;return
|
|
49
|
-
`):void 0,y=i.state.isAudioDisabled?"disabled"
|
|
50
|
-
`)},Uh=(t,e,i)=>{var F,U,j,re;let o=t.info,{width:r,height:a}=$e(i.ui.playerSize),l={version:Vl,viewport:`${r}x${a}`,volume:Math.round($e(i.state.volume$)*100)};l.id=i.videoId,o.currentFormat$.getValue()&&(l.provider=o.currentFormat$.getValue()),o.hostname$.getValue()&&(l.cdn=o.hostname$.getValue());let u=o.intrinsicVideoSize$.getValue();u&&(l.videoSize=`${u.width}x${u.height}`);let m=o.currentBuffer$.getValue(),p=o.currentNativeBuffer$.getValue(),v=o.isLive$.getValue(),$=o.liveBufferTime$.getValue();m&&p&&(v&&$?(l.buffer=m.end-$,l.nativeBuffer=p.end-$):(l.buffer=Math.max(m.end-$e(i.state.positionExact$),0),l.nativeBuffer=Math.max(p.end-$e(i.state.positionExact$),0))),l.position=$e(i.state.positionExact$);let y=o.throughputEstimation$.getValue();y&&(l.speed=y);let b=o.videoBitrate$.getValue();b&&(l.bitrate=b);let x=o.liveLatency$.getValue();x&&(l.liveLatency=x);let I=o.currentVideoSegmentLength$.getValue();I&&(l.currentVideoSegmentLength=I);let C=o.currentAudioSegmentLength$.getValue();C&&(l.currentAudioSegmentLength=C);let R=$e(i.vsid);typeof R=="string"&&(l.vsid=R);let k=(F=t.info.currentVideoStream$.getValue())==null?void 0:F.codec;k&&(l.videoCodec=k);let P=(U=t.info.currentAudioStream$.getValue())==null?void 0:U.codec;P&&(l.audioCodec=P),((j=t.info.currentVideoStream$.getValue())==null?void 0:j.hdr)&&(l.hdr=!0);let W=(re=t.info.currentAudioStream$.getValue())==null?void 0:re.language;return W&&(l.audioLanguage=W),l},zh=(t,e)=>Da(t,e,"mp4"),Wh=t=>!t.type,Kh=t=>!!t.type,qh=()=>{let e=[],i=0;return{add:(o,r)=>{e[i]=[o,r],i=(i+1)%10},find:o=>e.find(([r])=>r===o)}},gu=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}download(e){return _t(this,null,function*(){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=yield fetch(e,{signal:this.destroyController.signal});if(i.ok)return yield i.text();throw i}finally{this.pendingDownloads.delete(e)}})}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}};import{isNullable as bf,safeStorage as Ei}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-core/es2015";var S1="vk_player_",Qh="vk_player_prefer_traffic_saving_enabled",Gh="vk_player_preferred_volume",Yh="vk_player_prefer_volume_mute",$f="vk_player_preferred_quality",gf="vk_player_preferred_default_quality_settings",hf="vk_player_preferred_quality_settings_by_video",jh="vk_player_preferred_stream_language",Xh="vk_player_preferred_rate",Zh="vk_player_preferred_autoplay_next",_f="vk_player_preferred_subtitles_language",Jh="vk_player_user_video_prefs",e_=`${S1}preview_track_close_tooltip`,t_=t=>t>1?1:t<0?0:t,yf=t=>Ei.set(Gh,t_(t).toString(10)),_u=()=>{let t=Ei.get(Gh);return bf(t)?void 0:t_(parseFloat(t))},xf=(t,e)=>Ei.set($f,JSON.stringify({videoId:t,value:e})),bu=()=>Ei.remove($f),wf=t=>{let e=Ei.get($f);if(bf(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){bu();return}return o},i_=(t,e)=>{e?Ei.set(t,"true"):Ei.remove(t)},Sf=t=>Ei.get(t)==="true",Cf=t=>i_(Yh,t),o_=()=>Sf(Yh),Ed=t=>i_(Qh,t),Tf=()=>Sf(Qh),n_=()=>Ei.get(jh),If=t=>Ei.set(jh,t),Ef=()=>Ei.get(_f),Pf=t=>{t?Ei.set(_f,t):Ei.remove(_f)},r_=t=>Ei.set(Xh,JSON.stringify({rate:t})),s_=()=>{let t=Ei.get(Xh);if(bf(t))return;let{rate:e}=JSON.parse(t);return e},a_=t=>{Ei.set(Zh,String(t))},l_=()=>Sf(Zh),C1=()=>{let t=m=>{Ei.set(gf,JSON.stringify(m))},e=()=>{try{let m=Ei.get(gf);return m?JSON.parse(m):null}catch(m){return null}},i=()=>{try{let m=Ei.get(hf);return m?JSON.parse(m):null}catch(m){return null}},o=m=>{Ei.set(hf,JSON.stringify(m))},r=m=>{u(m);let p=m?i():null;if(p&&(p==null?void 0:p.videoId)===m)return ii(Xe({},p),{appliesTo:"to-video"});p&&a();let v=e();return v?ii(Xe({},v),{appliesTo:"as-default"}):(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{Ei.remove(hf)},l=()=>{Ei.remove(gf)},d=(m,p="as-default")=>{m.type==="exact_quality"||p==="to-video"?o(m):t(m)},s=m=>{let p=r(m);if(p){switch(p.type){case"traffic_saving":Ed(!0);break;case"exact_quality":xf(m,p.quality)}a(),l()}},u=m=>{let p=wf(m);if(p){o({type:"exact_quality",videoId:m,quality:p});return}Tf()&&t({type:"traffic_saving",videoId:m}),Ed(!1),bu()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:Ef,savePreferredSubtitlesLanguage:Pf}},{getPreferredQualitySettings:d_,migrateSettingsToLegacyWay:c_,savePreferredQualitySettings:$u,savePreferredDefaultQualitySettings:tR,removePreferredQualitySettingsByVideo:iR,getPreferredDefaultQualitySettings:yu}=C1(),T1=3,I1=3,u_=()=>{let t=Ei.get(Jh);if(t)try{return JSON.parse(t)}catch(e){return null}return null},xu=(t,e)=>{var r,a;let i=u_();return(a=(r=i==null?void 0:i[t])==null?void 0:r[e])!=null?a:null},Af=(t,e,i)=>{var l,d,s;let o=(l=u_())!=null?l:{},r=(s=(d=o[t])==null?void 0:d[e])!=null?s:{};Object.assign(r,i,{updatedTs:Date.now()}),t in o||(o[t]={}),o[t][e]=r;let a=E1(o);Ei.set(Jh,JSON.stringify(a))};function E1(t){let e=Object.entries(t).reduce((o,[r,a])=>{let l=0;return Object.values(a).forEach(d=>{l<d.updatedTs&&(l=d.updatedTs)}),o.push([r,l]),o},[]);return e.sort(([,o],[,r])=>o>r?-1:1),e.splice(I1),e.reduce((o,[r])=>(o[r]=P1(t[r]),o),{})}function P1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(T1),Object.fromEntries(e)}function p_(){Ei.set(e_,JSON.stringify(!0))}function f_(){let t=Ei.get(e_);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Ob}from"@vkontakte/videoplayer-core/es2015";hg();var na="var(--btn-color, #fff)";var A1=ke('<g filter="url(#strokeAndShadow)"><!></g><defs><filter x="-12" width="72" y="-12" height="72" id="strokeAndShadow"><feMorphology operator="dilate" radius=".4" result="outer"></feMorphology><feFlood flood-color="rgba(0,0,0,0.1)" result="outerColor"></feFlood><feComposite operator="in" in="outerColor" in2="outer" result="outerOutline"></feComposite><feDropShadow in="SourceGraphic" dx="0" dy="0" stdDeviation="3" flood-color="rgba(0,0,0,0.4)" result="outerShadow"></feDropShadow><feMerge><feMergeNode in="outerShadow"></feMergeNode><feMergeNode in="outerOutline"></feMergeNode><feMergeNode in="SourceGraphic"></feMergeNode></feMerge></filter></defs>',1),k1=ke('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function Ze(t,e){var m;B(e,!0);let i=g(e,"width",19,()=>"24"),o=g(e,"height",19,()=>"24"),r=g(e,"fill",3,na),a=(m=e.viewBox)!=null?m:`0 0 ${i()} ${o()}`;var l=k1(),d=T(l);{var s=p=>{var v=A1(),$=ae(v),y=T($);oi(y,()=>e.children),S($),ti(),_(p,v)},u=p=>{var v=De(),$=ae(v);oi($,()=>e.children),_(p,v)};M(d,p=>{e.shadow?p(s):p(u,!1)})}S(l),O(()=>{Oe(l,"aria-label",e.ariaLabel),Oe(l,"aria-hidden",!e.ariaLabel),Oe(l,"width",i()),Oe(l,"height",o()),Oe(l,"viewBox",a),Oe(l,"fill",r()),Ke(l,e.style),Oe(l,"data-testid",e.testId)}),_(t,l),H()}import{isNullable as g_,InterfaceLanguage as h_}from"@vkontakte/videoplayer-shared/es2015";var L1={auto_quality_invariant:"Авто",auto_quality:"Авто ({actual})",auto_quality_option:"Авто",other_quality:"Другое",high_quality:"Высокое качество",high_quality_description:"Будет использовано больше трафика",auto_quality_limit:"Автоматически",traffic_saving_quality:"Экономия трафика",traffic_saving_quality_description:"Видео грузятся быстрее, но качество ниже",default_quality_for_any_video:"Качество для всех видео",quality_applience:"Качество по умолчанию можно {action}",quality_applience_action:"изменить",menu_quality:"Качество",menu_traffic_saving:"Экономия данных",menu_playback_rate:"Скорость",menu_report:"Сообщить о проблеме",menu_pip:"Картинка в картинке",menu_pip_close:"Развернуть видео",menu_copy_video_link:"Скопировать ссылку на видео",menu_copy_video_link_with_timestamp:"Скопировать ссылку на кадр",menu_video_rotate:"Повернуть",menu_video_loop_on:"Включить повторение",menu_video_loop_off:"Отключить повторение",menu_chromecast:"Chromecast трансляция",menu_copy_debug:"Копировать данные для диагностики",menu_save_debug:"Сохранить данные для диагностики",menu_debug_overlay:"Техническая информация",menu_copy_embed_code:"Копировать код для встраивания",menu_audio_languages:"Звуковая дорожка",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Дорожка {index}",pip_dummy_title:"Видео воспроизводится в режиме картинка в картинке",submenu_quality:"Качество",submenu_playback_rate:"Скорость",submenu_settings:"Настройки",submenu_traffic_saving:"Экономия данных",submenu_audio_languages:"Звуковая дорожка",playing_ads:"Реклама {timeleft}",skip_ads_now:"Пропустить рекламу",skip_ads_after:"Пропустить {time}с",visit_advertiser:"Перейти на сайт",aria_timeline:"Ползунок временной шкалы",aria_timeline_value:"{position} (общая длительность {duration}",doubletap_seek_step:"{seconds} секунд",playback_rate_1:"Обычная",playback_rate:"{multiplier}x",video360:"панорамное видео",subtitles_caption:"Субтитры",subtitles_auto:"{language} (Автоматические)",subtitles_off:"Выкл.",subtitles_auto_caption:"Автоматические субтитры",subtitles_turn_on:"Включить субтитры",subtitles_turn_off:"Выключить субтитры",traffic_saving_off:"Откл.",traffic_saving_on:"Вкл.",traffic_saving_helper_text:"При включении качество видео будет снижено для экономии трафика",tooltip_button_disabled:"Кнопка недоступна",tooltip_previous:"Предыдущее видео",tooltip_restart:"Начать заново",tooltip_play:"Смотреть",tooltip_pause:"Пауза",tooltip_next:"Следующее видео",tooltip_interactive_go_back:"Вернуться к предыдущей главе",tooltip_interactive_go_back_disabled:"История прохождения недоступна",tooltip_interactive_go_back_disabled_first:"Вы смотрите первую главу",tooltip_interactive_go_back_disabled_limit:"Лимит возвратов исчерпан",tooltip_chapter_without_interactive:"В этой главе нет интерактива",tooltip_interactive_of_chapter_completed:"Интерактивы этой главы уже пройдены",tooltip_interactive_seek:"Перейти к интерактиву",tooltip_interactive_graph_off:"Показать карту сюжета",tooltip_interactive_graph_on:"Скрыть карту сюжета",tooltip_live:"Перемотать на актуальный лайв",tooltip_episodes:"Эпизоды",tooltip_volume:"Включить звук",tooltip_volume_muted:"Выключить звук",tooltip_sound_unavailable:"Звук недоступен",tooltip_subtitles_off:"Включить субтитры",tooltip_subtitles_on:"Выключить субтитры",tooltip_settings_off:"Открыть настройки",tooltip_settings_on:"Закрыть настройки",tooltip_fullscreen_off:"На весь экран",tooltip_fullscreen_on:"Выйти из полноэкранного режима",tooltip_chromecast_off:"Включить Chromecast",tooltip_chromecast_on:"Выключить Chromecast",tooltip_episode_finished:"Вы уже сделали свой выбор",tooltip_episode_unfinished:"Не пройдено",tooltip_disabled_when_interactive:"Интерактив уже идёт",tooltip_disabled_when_graph_on:"Кнопка недоступна во время просмотра карты",tooltip_interactive_interaction_time_indicator:"Нажмите на элемент интерактива",tooltip_vk_logo:"Открыть в VK Видео",tooltip_vk_video_logo:"Перейти в VK Видео",tooltip_autoplay_off:"Включить автовоспроизведение",tooltip_autoplay_on:"Отключить автовоспроизведение",tooltip_context_menu_open:"Открыть контекстное меню",tooltip_context_menu_close:"Закрыть контекстное меню",download_video_caption:"Скачать видео",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Быстрые клавиши",hotkey_map_modal_close_btn_text:"Закрыть",hotkey_map_group_title_common:"Общие",hotkey_map_group_title_playback:"Воспроизведение",hotkey_map_group_title_subtitles:"Субтитры",hotkey_map_group_title_episodes:"Эпизоды",hotkey_map_item_mute_description:"Включить или отключить звук",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Увеличить громкость",hotkey_map_item_volume_up_value:"Стрелка вверх",hotkey_map_item_volume_down_description:"Уменьшить громкость",hotkey_map_item_volume_down_value:"Стрелка вниз",hotkey_map_item_pip_description:"Свернуть или развернуть мини-проигрыватель",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Включить или выключить полноэкранный режим",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Скрыть или показать контекстное меню",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Скрыть или показать список горячих клавиш",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Приостановить или продолжить воспроизведение",hotkey_map_item_play_toggle_value:"Пробел (или k)",hotkey_map_item_seek_backward_description:"Перемотать ролик на 10 секунд назад",hotkey_map_item_seek_backward_value:"Стрелка влево (или j)",hotkey_map_item_seek_forward_description:"Перемотать ролик на 10 секунд вперёд",hotkey_map_item_seek_forward_value:"Стрелка вправо (или l)",hotkey_map_item_fast_seek_backward_description:"Ускоренная перемотка назад",hotkey_map_item_fast_seek_backward_value:"Shift + Стрелка влево",hotkey_map_item_fast_seek_forward_description:"Ускоренная перемотка вперёд",hotkey_map_item_fast_seek_forward_value:"Shift + Стрелка вправо",hotkey_map_item_rate_down_description:"Уменьшить скорость воспроизведения",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Увеличить скорость воспроизведения",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Перейти к предыдущему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Перейти к следующему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Перейти к определённому моменту видео <br />(например, при нажатии на цифру «7» ролик будет перемотан до временной отметки, которая соответствует 70% от длительности видео)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Включить или отключить субтитры",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Перейти к предыдущему эпизоду",hotkey_map_item_prev_episode_pc_value:"Ctrl + Стрелка влево",hotkey_map_item_prev_episode_mac_value:"Option + Стрелка влево",hotkey_map_item_next_episode_description:"Перейти к следующему эпизоду",hotkey_map_item_next_episode_pc_value:"Ctrl + Стрелка вправо",hotkey_map_item_next_episode_mac_value:"Option + Стрелка вправо",hotkey_map_item_next_video_description:"Перейти к следующему видео",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Перейти к предыдущему видео",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"дн",waiting_live_hour_value:"ч",waiting_live_minute_value:"мин",waiting_live_second_value:"сек",waiting_live_colon:":",waiting_live_upcoming_title:"Трансляция еще не началась",waiting_live_timer_title:"До начала трансляции осталось",waiting_live_recover_title:"Трансляция приостановлена - она продолжится, когда автор вернётся",waiting_record_title:"Трансляция завершена - запись появится позже",aria_label_video_player:"Видео плеер",aria_label_spherical_control:"Контроллер для сферического видео. Используйте клавиши со стрелками для панорамирования видео.",aria_label_debug_panel:"Область с технической информацией, сделайте скриншот для техподдержки",aria_label_new_tab_alert:"Откроется в новой вкладке.",aria_label_menu_quality:"Качество: {actual}",aria_label_menu_audio_languages:"Язык аудио: {actual}",aria_label_menu_rate:"Скорость: {actual}",aria_label_menu_subtitle:"Субтитры: {actual}",aria_label_menu_download:"Скачать видео",aria_label_menu_debug_overlay:"Отображение технической информации",aria_label_menu_rotate:"Повернуть видео на 90 градусов",aria_label_menu_loop:"Переключение режима повторения",aria_label_submenu_back:"Вернуться в меню настроек",aria_label_submenu_traffic_saving:"Режим экономии данных",aria_label_settings:"Настройки",aria_label_context_menu:"Контекстное меню",aria_label_autoplay:"Автовоспроизведение",end_screen_next_video:"Следующее видео",end_screen_recommended_video:"Рекомендуемое видео",slow_video_notification_button:"Выбрать качество «Авто»",slow_video_notification_force_description:`Видео грузится слишком медленно,
|
|
42
|
+
`).filter(r=>!r.includes("svelte/src/internal")).join(`
|
|
43
|
+
`)})}}var Ma=!1,Il=null,Va=!1,ks=!1;function Fp(t){ks=t}var yd=[],xd=[],Vt=null,br=!1;function qi(t){Vt=t}var yt=null;function po(t){yt=t}var Qo=null;function Zc(t){Vt!==null&&Vt.f&2097152&&(Qo===null?Qo=[Vt,[t]]:Qo[1].push(t))}var Mn=null,$r=0,_r=null;function Tg(t){_r=t}var Kg=1,au=0,Ls=!1,lu=null;function cd(){return++Kg}function Pa(t){var f,v;var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){var i=t.deps,o=(e&256)!==0;if(i!==null){var s,a,l=(e&512)!==0,d=o&&yt!==null&&!Ls,r=i.length;if(l||d){var u=t,p=u.parent;for(s=0;s<r;s++)a=i[s],(l||!((f=a==null?void 0:a.reactions)!=null&&f.includes(u)))&&((v=a.reactions)!=null?v:a.reactions=[]).push(u);l&&(u.f^=512),d&&p!==null&&(p.f&256)===0&&(u.f^=256)}for(s=0;s<r;s++)if(a=i[s],Pa(a)&&Hp(a),a.wv>t.wv)return!0}(!o||yt!==null&&!Ls)&&An(t,1024)}return!1}function Qg(t,e,i=!0){var o=t.reactions;if(o!==null)for(var s=0;s<o.length;s++){var a=o[s];Qo!=null&&Qo[1].includes(t)&&Qo[0]===Vt||((a.f&2)!==0?Qg(a,e,!1):e===a&&(i?An(a,2048):(a.f&1024)!==0&&An(a,4096),pd(a)))}}function Xc(t){var b,y;var e=Mn,i=$r,o=_r,s=Vt,a=Ls,l=Qo,d=Bt,r=br,u=t.f;Mn=null,$r=0,_r=null,Ls=(u&256)!==0&&(br||!Va||Vt===null),Vt=(u&96)===0?t:null,Qo=null,ad(t.ctx),br=!1,au++,t.f|=2097152;try{var p=(0,t.fn)(),f=t.deps;if(Mn!==null){var v;if(_d(t,$r),f!==null&&$r>0)for(f.length=$r+Mn.length,v=0;v<Mn.length;v++)f[$r+v]=Mn[v];else t.deps=f=Mn;if(!Ls||(u&2)!==0&&t.reactions!==null)for(v=$r;v<f.length;v++)((y=(b=f[v]).reactions)!=null?y:b.reactions=[]).push(t)}else f!==null&&$r<f.length&&(_d(t,$r),f.length=$r);if(hs()&&_r!==null&&!br&&f!==null&&(t.f&6146)===0)for(v=0;v<_r.length;v++)Qg(_r[v],t);return s!==null&&s!==t&&(au++,_r!==null&&(o===null?o=_r:o.push(..._r))),p}catch(_){Ug(_)}finally{Mn=e,$r=i,_r=o,Vt=s,Ls=a,Qo=l,ad(d),br=r,t.f^=2097152}}function T$(t,e){let i=e.reactions;if(i!==null){var o=rg.call(i,t);if(o!==-1){var s=i.length-1;s===0?i=e.reactions=null:(i[o]=i[s],i.pop())}}i===null&&(e.f&2)!==0&&(Mn===null||!Mn.includes(e))&&(An(e,4096),(e.f&768)===0&&(e.f^=512),jc(e),_d(e,0))}function _d(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)T$(t,i[o])}function Sl(t){var e=t.f;if((e&16384)===0){An(t,1024);var i=yt,o=Va;if(yt=t,Va=!0,Me){var s=vr;ld(t.component_function)}try{(e&16)!==0?Og(t):Kp(t),Wp(t);var a=Xc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Kg,Me&&gs&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=cd(),l.set_during_effect=!1);Me&&xd.push(t)}finally{Va=o,yt=i,Me&&ld(s)}}}function zg(){console.error("Last ten effects were: ",xd.slice(-10).map(t=>t.fn)),xd=[]}function I$(){try{mg()}catch(t){if(Me&&uo(t,"stack",{value:""}),Il!==null)if(Me)try{$d(t,Il)}catch(e){throw zg(),e}else $d(t,Il);else throw Me&&zg(),t}}function Xp(){var t=Va;try{var e=0;for(Va=!0;yd.length>0;){e++>1e3&&I$();var i=yd,o=i.length;yd=[];for(var s=0;s<o;s++){var a=P$(i[s]);E$(a)}xl.clear()}}finally{Ma=!1,Va=t,Il=null,Me&&(xd=[])}}function E$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&Pa(o)&&(Sl(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?qp(o):o.fn=null))}}function pd(t){Ma||(Ma=!0,queueMicrotask(Xp));for(var e=Il=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}yd.push(e)}function P$(t){for(var e=[],i=t;i!==null;){var o=i.f,s=(o&96)!==0,a=s&&(o&1024)!==0;if(!a&&(o&8192)===0){(o&4)!==0?e.push(i):s?i.f^=1024:Pa(i)&&Sl(i);var l=i.first;if(l!==null){i=l;continue}}var d=i.parent;for(i=i.next;i===null&&d!==null;)i=d.next,d=d.parent}return e}function El(t){var e;for(t&&(Ma=!0,Xp(),Ma=!0,e=t());;){if(Hg(),yd.length===0)return Ma=!1,Il=null,Me&&(xd=[]),e;Ma=!0,Xp()}}function mo(){return bt(this,null,function*(){yield Promise.resolve(),El()})}function n(t){var e=t.f,i=(e&2)!==0;if(lu!==null&&lu.add(t),Vt!==null&&!br){if(!(Qo!=null&&Qo[1].includes(t))||Qo[0]!==Vt){var o=Vt.deps;t.rv<au&&(t.rv=au,Mn===null&&o!==null&&o[$r]===t?$r++:Mn===null?Mn=[t]:(!Ls||!Mn.includes(t))&&Mn.push(t))}}else if(i&&t.deps===null&&t.effects===null){var s=t,a=s.parent;a!==null&&(a.f&256)===0&&(s.f^=256)}if(i&&(s=t,Pa(s)&&Hp(s)),Me&&gs&&!br&&sd!==null&&Vt!==null&&sd.reaction===Vt)if(t.trace)t.trace();else{var l=As("TracedAt");if(l){var d=sd.entries.get(t);d===void 0&&(d={traces:[]},sd.entries.set(t,d));var r=d.traces[d.traces.length-1];l.stack!==(r==null?void 0:r.stack)&&d.traces.push(l)}}return ks&&xl.has(t)?xl.get(t):t.v}function Et(t){var e=br;try{return br=!0,t()}finally{br=e}}var A$=-7169;function An(t,e){t.f=t.f&A$|e}function cu(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Wo in t)du(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&Wo in i&&du(i)}}}function du(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let o in t)try{du(t[o],e)}catch(s){}let i=Ca(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){let o=Kc(i);for(let s in o){let a=o[s].get;if(a)try{a.call(t)}catch(l){}}}}}function Zp(t,e){if(e){let i=document.body;t.autofocus=!0,Ln(()=>{document.activeElement===i&&t.focus()})}}function wd(t){var e=Vt,i=yt;qi(null),po(null);try{return t()}finally{qi(e),po(i)}}var Jp=new Set,uu=new Set;function Ra(t){if(!nt)return;t.removeAttribute("onload"),t.removeAttribute("onerror");let e=t.__e;e!==void 0&&(t.__e=void 0,queueMicrotask(()=>{t.isConnected&&t.dispatchEvent(e)}))}function ef(t,e,i,o={}){function s(a){if(o.capture||Pl.call(e,a),!a.cancelBubble)return wd(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Ln(()=>{e.addEventListener(t,s,o)}):e.addEventListener(t,s,o),s}function vt(t,e,i,o,s){var a={capture:o,passive:s},l=ef(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&To(()=>{e.removeEventListener(t,l,a)})}function Ze(t){for(var e=0;e<t.length;e++)Jp.add(t[e]);for(var i of uu)i(t)}function Pl(t){var T;var e=this,i=e.ownerDocument,o=t.type,s=((T=t.composedPath)==null?void 0:T.call(t))||[],a=s[0]||t.target,l=0,d=t.__root;if(d){var r=s.indexOf(d);if(r!==-1&&(e===document||e===window)){t.__root=e;return}var u=s.indexOf(e);if(u===-1)return;r<=u&&(l=r)}if(a=s[l]||t.target,a!==e){uo(t,"currentTarget",{configurable:!0,get(){return a||i}});var p=Vt,f=yt;qi(null),po(null);try{for(var v,b=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var _=a["__"+o];if(_!=null&&(!a.disabled||t.target===a))if(fr(_)){var[w,...I]=_;w.apply(a,[t,...I])}else _.call(a,t)}catch(R){v?b.push(R):v=R}if(t.cancelBubble||y===e||y===null)break;a=y}if(v){for(let R of b)queueMicrotask(()=>{throw R});throw v}}finally{t.__root=e,delete t.currentTarget,qi(p),po(f)}}}var L$;function qg(){L$=void 0}function Al(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Eo(t,e){var i=yt;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function L(t,e){var i=(e&1)!==0,o=(e&2)!==0,s,a=!t.startsWith("<!>");return()=>{if(nt)return Eo(xt,null),xt;s===void 0&&(s=Al(a?t:"<!>"+t),i||(s=Ei(s)));var l=o||fd?document.importNode(s,!0):s.cloneNode(!0);if(i){var d=Ei(l),r=l.lastChild;Eo(d,r)}else Eo(l,l);return l}}function R$(t,e,i="svg"){var o=!t.startsWith("<!>"),s=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(nt)return Eo(xt,null),xt;if(!l){var d=Al(a),r=Ei(d);if(s)for(l=document.createDocumentFragment();Ei(r);)l.appendChild(Ei(r));else l=Ei(r)}var u=l.cloneNode(!0);if(s){var p=Ei(u),f=u.lastChild;Eo(p,f)}else Eo(u,u);return u}}function Ae(t,e){return R$(t,e,"svg")}function bs(t=""){if(!nt){var e=kn(t+"");return Eo(e,e),e}var i=xt;return i.nodeType!==vl&&(i.before(i=kn()),wi(i)),Eo(i,i),i}function Ve(){if(nt)return Eo(xt,null),xt;var t=document.createDocumentFragment(),e=document.createComment(""),i=kn();return t.append(e,i),Eo(e,i),t}function $(t,e){if(nt){yt.nodes_end=xt,Yi();return}t!==null&&t.before(e)}var D$=/\r/g;function Yg(t){t=t.replace(D$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function jg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var O$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Xg(t){return O$.includes(t)}var N$=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var B$={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Zg(t){var e;return t=t.toLowerCase(),(e=B$[t])!=null?e:t}var F3=[...N$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var H$=["touchstart","touchmove"];function Jg(t){return H$.includes(t)}var F$=["$state","$state.raw","$derived","$derived.by"],U3=[...F$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var U$=["textarea","script","style","title"];function eh(t){return U$.includes(t)}function pu(t){return t==null?void 0:t.replace(/\//g,"/")}var Sd=!0;function fu(t){Sd=t}function he(t,e){var o;var i=e==null?"":typeof e=="object"?e+"":e;i!==((o=t.__t)!=null?o:t.__t=t.nodeValue)&&(t.__t=i,t.nodeValue=i+"")}function ts(t,e){return th(t,e)}function of(t,e){var l;tu(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=nt,s=xt;try{for(var a=Ei(i);a&&(a.nodeType!==mr||a.data!==ea);)a=qo(a);if(!a)throw ms;fo(!0),wi(a),Yi();let d=th(t,Jt(Ye({},e),{anchor:a}));if(xt===null||xt.nodeType!==mr||xt.data!==Sa)throw na(),ms;return fo(!1),d}catch(d){if(d===ms)return e.recover===!1&&vg(),tu(),md(i),fo(!1),ts(t,e);throw d}finally{fo(o),wi(s),qg()}}var kl=new Map;function th(t,{target:e,anchor:i,props:o={},events:s,context:a,intro:l=!0}){tu();var d=new Set,r=f=>{for(var v=0;v<f.length;v++){var b=f[v];if(!d.has(b)){d.add(b);var y=Jg(b);e.addEventListener(b,Pl,{passive:y});var _=kl.get(b);_===void 0?(document.addEventListener(b,Pl,{passive:y}),kl.set(b,1)):kl.set(b,_+1)}}};r(rd(Jp)),uu.add(r);var u=void 0,p=Dg(()=>{var f=i!=null?i:e.appendChild(kn());return Fi(()=>{if(a){B({});var v=Bt;v.c=a}s&&(o.$$events=s),nt&&Eo(f,null),Sd=l,u=t(f,o)||{},Sd=!0,nt&&(yt.nodes_end=xt),a&&H()}),()=>{var y;for(var v of d){e.removeEventListener(v,Pl);var b=kl.get(v);--b===0?(document.removeEventListener(v,Pl),kl.delete(v)):kl.set(v,b)}uu.delete(r),f!==i&&((y=f.parentNode)==null||y.removeChild(f))}});return tf.set(u,p),u}var tf=new WeakMap;function Da(t,e){let i=tf.get(t);return i?(tf.delete(t),i(e)):(Me&&Pg(),Promise.resolve())}function ei(t,e,...i){var o=t,s=$t,a;ji(()=>{s!==(s=e())&&(a&&(Gi(a),a=null),Me&&s==null&&gg(),a=Fi(()=>s(o,...i)))},65536),nt&&(o=xt)}if(Me){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;bg(e)},set:o=>{i=o}})}};Q$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var Q$;function kt(t){Bt===null&&_l("onMount"),vs&&Bt.l!==null?K$(Bt).m.push(t):He(()=>{let e=Et(t);if(typeof e=="function")return e})}function ln(t){Bt===null&&_l("onDestroy"),kt(()=>()=>Et(t))}function K$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var ih=new Map;function oh(t,e){var i=ih.get(t);i||(i=new Set,ih.set(t,i)),i.add(e)}function M(t,e,[i,o]=[0,0]){nt&&i===0&&Yi();var s=t,a=null,l=null,d=oo,r=i>0?65536:0,u=!1;let p=(v,b=!0)=>{u=!0,f(b,v)},f=(v,b)=>{if(d===(d=v))return;let y=!1;if(nt&&o!==-1){if(i===0){let w=eu(s);w===ea?o=0:w===ta?o=1/0:(o=parseInt(w.substring(1)),o!==o&&(o=d?1/0:-1))}let _=o>i;!!d===_&&(s=Aa(),wi(s),fo(!1),y=!0,o=-1)}d?(a?Vs(a):b&&(a=Fi(()=>b(s))),l&&Xn(l,()=>{l=null})):(l?Vs(l):b&&(l=Fi(()=>b(s,[i+1,o]))),a&&Xn(a,()=>{a=null})),y&&fo(!0)};ji(()=>{u=!1,e(p),u||f(null,null)},r),nt&&(s=xt)}function Rs(t,e,i){nt&&Yi();var o=t,s=oo,a,l=hs()?dg:gl;ji(()=>{l(s,s=e())&&(a&&Xn(a),a=Fi(()=>i(o)))}),nt&&(o=xt)}var sa=null;function sf(t){sa=t}function Cd(t,e){return e}function Y$(t,e,i,o){for(var s=[],a=e.length,l=0;l<a;l++)ru(e[l].e,s,!0);var d=a>0&&s.length===0&&i!==null;if(d){var r=i.parentNode;md(r),r.append(i),o.clear(),ra(t,e[0].prev,e[a-1].next)}Gp(s,()=>{for(var u=0;u<a;u++){var p=e[u];d||(o.delete(p.k),ra(t,p.prev,p.next)),Gi(p.e,!d)}})}function yi(t,e,i,o,s,a=null){var l=t,d={flags:e,items:new Map,first:null},r=(e&4)!==0;if(r){var u=t;l=nt?wi(Ei(u)):u.appendChild(kn())}nt&&Yi();var p=null,f=!1,v=hr(()=>{var b=i();return fr(b)?b:b==null?[]:rd(b)});ji(()=>{var b=n(v),y=b.length;if(f&&y===0)return;f=y===0;let _=!1;if(nt){var w=eu(l)===ta;w!==(y===0)&&(l=Aa(),wi(l),fo(!1),_=!0)}if(nt){for(var I=null,T,R=0;R<y;R++){if(xt.nodeType===mr&&xt.data===Sa){l=xt,_=!0,fo(!1);break}var k=b[R],P=o(k,R);T=sh(xt,d,I,null,k,P,R,s,e,i),d.items.set(P,T),I=T}y>0&&wi(Aa())}nt||j$(b,d,l,s,e,o,i),a!==null&&(y===0?p?Vs(p):p=Fi(()=>a(l)):p!==null&&Xn(p,()=>{p=null})),_&&fo(!0),n(v)}),nt&&(l=xt)}function j$(t,e,i,o,s,a,l){var de,ae,pe,ee;var d=(s&8)!==0,r=(s&3)!==0,u=t.length,p=e.items,f=e.first,v=f,b,y=null,_,w=[],I=[],T,R,k,P;if(d)for(P=0;P<u;P+=1)T=t[P],R=a(T,P),k=p.get(R),k!==void 0&&((de=k.a)==null||de.measure(),(_!=null?_:_=new Set).add(k));for(P=0;P<u;P+=1){if(T=t[P],R=a(T,P),k=p.get(R),k===void 0){var E=v?v.e.nodes_start:i;y=sh(E,e,y,y===null?e.first:y.next,T,R,P,o,s,l),p.set(R,y),w=[],I=[],v=y.next;continue}if(r&&X$(k,T,P,s),(k.e.f&8192)!==0&&(Vs(k.e),d&&((ae=k.a)==null||ae.unfix(),(_!=null?_:_=new Set).delete(k))),k!==v){if(b!==void 0&&b.has(k)){if(w.length<I.length){var W=I[0],U;y=W.prev;var z=w[0],Y=w[w.length-1];for(U=0;U<w.length;U+=1)nh(w[U],W,i);for(U=0;U<I.length;U+=1)b.delete(I[U]);ra(e,z.prev,Y.next),ra(e,y,z),ra(e,Y,W),v=W,y=Y,P-=1,w=[],I=[]}else b.delete(k),nh(k,v,i),ra(e,k.prev,k.next),ra(e,k,y===null?e.first:y.next),ra(e,y,k),y=k;continue}for(w=[],I=[];v!==null&&v.k!==R;)(v.e.f&8192)===0&&(b!=null?b:b=new Set).add(v),I.push(v),v=v.next;if(v===null)continue;k=v}w.push(k),y=k,v=k.next}if(v!==null||b!==void 0){for(var ie=b===void 0?[]:rd(b);v!==null;)(v.e.f&8192)===0&&ie.push(v),v=v.next;var J=ie.length;if(J>0){var oe=(s&4)!==0&&u===0?i:null;if(d){for(P=0;P<J;P+=1)(pe=ie[P].a)==null||pe.measure();for(P=0;P<J;P+=1)(ee=ie[P].a)==null||ee.fix()}Y$(e,ie,oe,p)}}d&&Ln(()=>{var $e;if(_!==void 0)for(k of _)($e=k.a)==null||$e.apply()}),yt.first=e.first&&e.first.e,yt.last=y&&y.e}function X$(t,e,i,o){(o&1)!==0&&wl(t.v,e),(o&2)!==0?wl(t.i,i):t.i=i}function sh(t,e,i,o,s,a,l,d,r,u){var p=sa,f=(r&1)!==0,v=(r&16)===0,b=f?v?_s(s,!1,!1):Vr(s):s,y=(r&2)===0?l:Vr(l);Me&&f&&(b.trace=()=>{var w=typeof y=="number"?l:y.v;u()[w]});var _={i:y,v:b,k:a,a:null,e:null,prev:i,next:o};sa=_;try{return _.e=Fi(()=>d(t,b,y,u),nt),_.e.prev=i&&i.e,_.e.next=o&&o.e,i===null?e.first=_:(i.next=_,i.e.next=_.e),o!==null&&(o.prev=_,o.e.prev=_.e),_}finally{sa=p}}function nh(t,e,i){for(var o=t.next?t.next.e.nodes_start:i,s=e?e.e.nodes_start:i,a=t.e.nodes_start;a!==o;){var l=qo(a);s.before(a),a=l}}function ra(t,e,i){e===null?t.first=i:(e.next=i,e.e.next=i&&i.e),i!==null&&(i.prev=e,i.e.prev=e&&e.e)}function Z$(t,e,i){var a,l;if(!e||e===Yg(String(i!=null?i:"")))return;let o,s=(a=t.__svelte_meta)==null?void 0:a.loc;s?o=`near ${s.file}:${s.line}:${s.column}`:(l=vr)!=null&&l[qn]&&(o=`in ${vr[qn]}`),Eg(pu(o))}function Td(t,e,i=!1,o=!1,s=!1){var a=t,l="";O(()=>{var b;var d=yt;if(l===(l=(b=e())!=null?b:"")){nt&&Yi();return}if(d.nodes_start!==null&&(Qp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(nt){for(var r=xt.data,u=Yi(),p=u;u!==null&&(u.nodeType!==mr||u.data!=="");)p=u,u=qo(u);if(u===null)throw na(),ms;Me&&!s&&Z$(u.parentNode,r,l),Eo(xt,p),a=wi(u);return}var f=l+"";i?f=`<svg>${f}</svg>`:o&&(f=`<math>${f}</math>`);var v=Al(f);if((i||o)&&(v=Ei(v)),Eo(Ei(v),v.lastChild),i||o)for(;Ei(v);)a.before(Ei(v));else a.before(v)}})}function Ui(t,e,i){nt&&Yi();var o=t,s,a;ji(()=>{s!==(s=e())&&(a&&(Xn(a),a=null),s&&(a=Fi(()=>i(o,s))))},65536),nt&&(o=xt)}function Oa(t,e,i,o,s,a){var y;let l=nt;nt&&Yi();var d=Me&&a&&((y=Bt)==null?void 0:y.function[qn]),r,u,p=null;nt&&xt.nodeType===qc&&(p=xt,Yi());var f=nt?xt:t,v,b=sa;ji(()=>{let _=e()||null;var w=s?s():i||_==="svg"?zc:null;if(_!==r){var I=sa;sf(b),v&&(_===null?Xn(v,()=>{v=null,u=null}):_===u?Vs(v):(Gi(v),fu(!1))),_&&_!==u&&(v=Fi(()=>{if(p=nt?p:w?document.createElementNS(w,_):document.createElement(_),Me&&a&&(p.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),Eo(p,p),o){nt&&eh(_)&&p.append(document.createComment(""));var T=nt?Ei(p):p.appendChild(kn());nt&&(T===null?fo(!1):wi(T)),o(p,T)}yt.nodes_end=p,f.before(p)})),r=_,r&&(u=r),fu(!0),sf(I)}},65536),l&&(fo(!0),wi(f))}var lf;function ah(t){return lf=t.target,new af(t)}var Ds,Rr,af=class{constructor(e){Js(this,Ds);Js(this,Rr);var a,l;var i=new Map,o=(d,r)=>{var u=_s(r,!1,!1);return i.set(d,u),u};let s=new Proxy(Jt(Ye({},e.props||{}),{$$events:{}}),{get(d,r){var u;return n((u=i.get(r))!=null?u:o(r,Reflect.get(d,r)))},has(d,r){var u;return r===ml?!0:(n((u=i.get(r))!=null?u:o(r,Reflect.get(d,r))),Reflect.has(d,r))},set(d,r,u){var p;return D((p=i.get(r))!=null?p:o(r,u),u),Reflect.set(d,r,u)}});fl(this,Rr,(e.hydrate?of:ts)(e.component,{target:e.target,anchor:e.anchor,props:s,context:e.context,intro:(a=e.intro)!=null?a:!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&El(),fl(this,Ds,s.$$events);for(let d of Object.keys(Hi(this,Rr)))d==="$set"||d==="$destroy"||d==="$on"||uo(this,d,{get(){return Hi(this,Rr)[d]},set(r){Hi(this,Rr)[d]=r},enumerable:!0});Hi(this,Rr).$set=d=>{Object.assign(s,d)},Hi(this,Rr).$destroy=()=>{Da(Hi(this,Rr))}}$set(e){Hi(this,Rr).$set(e)}$on(e,i){Hi(this,Ds)[e]=Hi(this,Ds)[e]||[];let o=(...s)=>i.call(this,...s);return Hi(this,Ds)[e].push(o),()=>{Hi(this,Ds)[e]=Hi(this,Ds)[e].filter(s=>s!==o)}}$destroy(){Hi(this,Rr).$destroy()}};Ds=new WeakMap,Rr=new WeakMap;function Q(t,e){Ln(()=>{var s,a,l;var i=t.getRootNode(),o=i.host?i:(l=(s=i.head)!=null?s:i.ownerDocument.head)!=null?l:(a=lf)==null?void 0:a.parentNode;if(!(o!=null&&o.querySelector("#"+e.hash))){let d=document.createElement("style");d.id=e.hash,d.textContent=e.code,o.appendChild(d),Me&&oh(e.hash,d)}})}function Os(t,e){var i=void 0,o;ji(()=>{i!==(i=e())&&(o&&(Gi(o),o=null),i&&(o=Fi(()=>{Io(()=>i(t))})))})}function lh(t){var e,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(i=lh(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function dh(){for(var t,e,i=0,o="",s=arguments.length;i<s;i++)(t=arguments[i])&&(e=lh(t))&&(o&&(o+=" "),o+=e);return o}function Id(t){return typeof t=="object"?dh(t):t!=null?t:""}var ch=[...`
|
|
44
|
+
\r\f \v\uFEFF`];function ph(t,e,i){var o=t==null?"":""+t;if(e&&(o=o?o+" "+e:e),i){for(var s in i)if(i[s])o=o?o+" "+s:s;else if(o.length)for(var a=s.length,l=0;(l=o.indexOf(s,l))>=0;){var d=l+a;(l===0||ch.includes(o[l-1]))&&(d===o.length||ch.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function uh(t,e=!1){var i=e?" !important;":";",o="";for(var s in t){var a=t[s];a!=null&&a!==""&&(o+=" "+s+": "+a+i)}return o}function df(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function fh(t,e){if(e){var i="",o,s;if(Array.isArray(e)?(o=e[0],s=e[1]):o=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,l=0,d=!1,r=[];o&&r.push(...Object.keys(o).map(df)),s&&r.push(...Object.keys(s).map(df));var u=0,p=-1;let _=t.length;for(var f=0;f<_;f++){var v=t[f];if(d?v==="/"&&t[f-1]==="*"&&(d=!1):a?a===v&&(a=!1):v==="/"&&t[f+1]==="*"?d=!0:v==='"'||v==="'"?a=v:v==="("?l++:v===")"&&l--,!d&&a===!1&&l===0){if(v===":"&&p===-1)p=f;else if(v===";"||f===_-1){if(p!==-1){var b=df(t.substring(u,p).trim());if(!r.includes(b)){v!==";"&&f++;var y=t.substring(u,f).trim();i+=" "+y+";"}}u=f+1,p=-1}}}}return o&&(i+=uh(o)),s&&(i+=uh(s,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function te(t,e,i,o,s,a){var l=t.__className;if(nt||l!==i||l===void 0){var d=ph(i,o,a);(!nt||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&s!==a)for(var r in a){var u=!!a[r];(s==null||u!==!!s[r])&&t.classList.toggle(r,u)}return a}function cf(t,e={},i,o){for(var s in i){var a=i[s];e[s]!==a&&(i[s]==null?t.style.removeProperty(s):t.style.setProperty(s,a,o))}}function Ke(t,e,i,o){var s=t.__style;if(nt||s!==e){var a=fh(e,o);(!nt||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(cf(t,i==null?void 0:i[0],o[0]),cf(t,i==null?void 0:i[1],o[1],"important")):cf(t,i,o));return o}function Ed(t,e,i){if(t.multiple){if(e==null)return;if(!fr(e))return Ag();for(var o of t.options)o.selected=e.includes(mh(o));return}for(o of t.options){var s=mh(o);if(Rp(s,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function uf(t){var e=new MutationObserver(()=>{Ed(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),To(()=>{e.disconnect()})}function mh(t){return"__value"in t?t.__value:t.value}var Ll=Symbol("class"),Ml=Symbol("style"),hh=Symbol("is custom element"),_h=Symbol("is html");function bh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function De(t,e,i,o){var s=yh(t);if(nt&&(s[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||s1(t,e,i!=null?i:"");return}s[e]!==(s[e]=i)&&(e==="loading"&&(t[lg]=i),i==null?t.removeAttribute(e):typeof i!="string"&&xh(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function $h(t,e,i,o,s=!1){var k;var a=yh(t),l=a[hh],d=!a[_h];let r=nt&&l;r&&fo(!1);var u=e||{},p=t.tagName==="OPTION";for(var f in e)f in i||(i[f]=null);i.class?i.class=Id(i.class):(o||i[Ll])&&(i.class=null),i[Ml]&&((k=i.style)!=null||(i.style=null));var v=xh(t);for(let P in i){let E=i[P];if(p&&P==="value"&&E==null){t.value=t.__value="",u[P]=E;continue}if(P==="class"){var b=t.namespaceURI==="http://www.w3.org/1999/xhtml";te(t,b,E,o,e==null?void 0:e[Ll],i[Ll]),u[P]=E,u[Ll]=i[Ll];continue}if(P==="style"){Ke(t,E,e==null?void 0:e[Ml],i[Ml]),u[P]=E,u[Ml]=i[Ml];continue}var y=u[P];if(!(E===y&&!(E===void 0&&t.hasAttribute(P)))){u[P]=E;var _=P[0]+P[1];if(_!=="$$")if(_==="on"){let W={},U="$$"+P,z=P.slice(2);var w=Xg(z);if(jg(z)&&(z=z.slice(0,-7),W.capture=!0),!w&&y){if(E!=null)continue;t.removeEventListener(z,u[U],W),u[U]=null}if(E!=null)if(w)t[`__${z}`]=E,Ze([z]);else{let Y=function(ie){u[P].call(this,ie)};var R=Y;u[U]=ef(z,t,Y,W)}else w&&(t[`__${z}`]=void 0)}else if(P==="style")De(t,P,E);else if(P==="autofocus")Zp(t,!!E);else if(!l&&(P==="__value"||P==="value"&&E!=null))t.value=t.__value=E;else if(P==="selected"&&p)bh(t,E);else{var I=P;d||(I=Zg(I));var T=I==="defaultValue"||I==="defaultChecked";if(E==null&&!l&&!T)if(a[P]=null,I==="value"||I==="checked"){let W=t,U=e===void 0;if(I==="value"){let z=W.defaultValue;W.removeAttribute(I),W.defaultValue=z,W.value=W.__value=U?z:null}else{let z=W.defaultChecked;W.removeAttribute(I),W.defaultChecked=z,W.checked=U?z:!1}}else t.removeAttribute(P);else T||v.includes(I)&&(l||typeof E!="string")?t[I]=E:typeof E!="function"&&De(t,I,E,s)}}}return r&&fo(!0),u}function no(t,e,i=[],o,s=!1,a=Zr){let l=i.map(a);var d=void 0,r={},u=t.nodeName==="SELECT",p=!1;if(ji(()=>{var v=e(...l.map(n)),b=$h(t,d,v,o,s);p&&u&&"value"in v&&Ed(t,v.value,!1);for(let _ of Object.getOwnPropertySymbols(r))v[_]||Gi(r[_]);for(let _ of Object.getOwnPropertySymbols(v)){var y=v[_];_.description===Ip&&(!d||y!==d[_])&&(r[_]&&Gi(r[_]),r[_]=Fi(()=>Os(t,()=>y))),b[_]=y}d=b}),u){var f=t;Io(()=>{Ed(f,d.value),uf(f)})}p=!0}function yh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[hh]:t.nodeName.includes("-"),[_h]:t.namespaceURI===tg}}var vh=new Map;function xh(t){var e=vh.get(t.nodeName);if(e)return e;vh.set(t.nodeName,e=[]);for(var i,o=t,s=Element.prototype;s!==o;){i=Kc(o);for(var a in i)i[a].set&&e.push(a);o=Ca(o)}return e}function s1(t,e,i){var o;Me&&(e==="srcset"&&a1(t,i)||pf((o=t.getAttribute(e))!=null?o:"",i)||Ig(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function pf(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function gh(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function a1(t,e){var i=gh(t.srcset),o=gh(e);return o.length===i.length&&o.every(([s,a],l)=>a===i[l][1]&&(pf(i[l][0],s)||pf(s,i[l][0])))}var l1=Wc?()=>performance.now():()=>Date.now(),is={tick:t=>(Wc?requestAnimationFrame:$t)(t),now:()=>l1(),tasks:new Set};function wh(){let t=is.now();is.tasks.forEach(e=>{e.c(t)||(is.tasks.delete(e),e.f())}),is.tasks.size!==0&&is.tick(wh)}function Sh(t){let e;return is.tasks.size===0&&is.tick(wh),{promise:new Promise(i=>{is.tasks.add(e={c:t,f:i})}),abort(){is.tasks.delete(e)}}}function mu(t,e){wd(()=>{t.dispatchEvent(new CustomEvent(e))})}function p1(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;let e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(i=>i[0].toUpperCase()+i.slice(1)).join("")}function Ch(t){let e={},i=t.split(";");for(let o of i){let[s,a]=o.split(":");if(!s||a===void 0)break;let l=p1(s.trim());e[l]=a.trim()}return e}var f1=t=>t;function Ns(t,e,i,o){var R;var s=(t&1)!==0,a=(t&2)!==0,l=s&&a,d=(t&4)!==0,r=l?"both":s?"in":"out",u,p=e.inert,f=e.style.overflow,v,b;function y(){var E;var k=Vt,P=yt;qi(null),po(null);try{return u!=null?u:u=i()(e,(E=o==null?void 0:o())!=null?E:{},{direction:r})}finally{qi(k),po(P)}}var _={is_global:d,in(){var k;if(e.inert=p,!s){b==null||b.abort(),(k=b==null?void 0:b.reset)==null||k.call(b);return}a||v==null||v.abort(),mu(e,"introstart"),v=ff(e,y(),b,1,()=>{mu(e,"introend"),v==null||v.abort(),v=u=void 0,e.style.overflow=f})},out(k){if(!a){k==null||k(),u=void 0;return}e.inert=!0,mu(e,"outrostart"),b=ff(e,y(),v,0,()=>{mu(e,"outroend"),k==null||k()})},stop:()=>{v==null||v.abort(),b==null||b.abort()}},w=yt;if(((R=w.transitions)!=null?R:w.transitions=[]).push(_),s&&Sd){var I=d;if(!I){for(var T=w.parent;T&&(T.f&65536)!==0;)for(;(T=T.parent)&&(T.f&16)===0;);I=!T||(T.f&32768)!==0}I&&Io(()=>{Et(()=>_.in())})}}function ff(t,e,i,o,s){var a=o===1;if(ia(e)){var l,d=!1;return Ln(()=>{if(!d){var w=e({direction:a?"in":"out"});l=ff(t,w,i,o,s)}}),{abort:()=>{d=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return s(),{abort:$t,deactivate:$t,reset:$t,t:()=>o};let{delay:r=0,css:u,tick:p,easing:f=f1}=e;var v=[];if(a&&i===void 0&&(p&&p(0,1),u)){var b=Ch(u(0,1));v.push(b,b)}var y=()=>1-o,_=t.animate(v,{duration:r,fill:"forwards"});return _.onfinish=()=>{var z;_.cancel();var w=(z=i==null?void 0:i.t())!=null?z:1-o;i==null||i.abort();var I=o-w,T=e.duration*Math.abs(I),R=[];if(T>0){var k=!1;if(u)for(var P=Math.ceil(T/16.666666666666668),E=0;E<=P;E+=1){var W=w+I*f(E/P),U=Ch(u(W,1-W));R.push(U),k||(k=U.overflow==="hidden")}k&&(t.style.overflow="hidden"),y=()=>{var Y=_.currentTime;return w+I*f(Y/T)},p&&Sh(()=>{if(_.playState!=="running")return!1;var Y=y();return p(Y,1-Y),!0})}_=t.animate(R,{duration:T,fill:"forwards"}),_.onfinish=()=>{y=()=>o,p==null||p(o,1-o),s()}},{abort:()=>{_&&(_.cancel(),_.effect=null,_.onfinish=$t)},deactivate:()=>{s=$t},reset:()=>{o===0&&(p==null||p(1,0))},t:()=>y()}}function mf(t,e,i){var o=zo(t,e);o&&o.set&&(t[e]=i,To(()=>{t[e]=null}))}var aa,Vl,Pd,gu,Th,hu=class hu{constructor(e){Js(this,gu);Js(this,aa,new WeakMap);Js(this,Vl);Js(this,Pd);fl(this,Pd,e)}observe(e,i){var o=Hi(this,aa).get(e)||new Set;return o.add(i),Hi(this,aa).set(e,o),Jv(this,gu,Th).call(this).observe(e,Hi(this,Pd)),()=>{var s=Hi(this,aa).get(e);s.delete(i),s.size===0&&(Hi(this,aa).delete(e),Hi(this,Vl).unobserve(e))}}};aa=new WeakMap,Vl=new WeakMap,Pd=new WeakMap,gu=new WeakSet,Th=function(){var e;return(e=Hi(this,Vl))!=null?e:fl(this,Vl,new ResizeObserver(i=>{for(var o of i){hu.entries.set(o.target,o);for(var s of Hi(this,aa).get(o.target)||[])s(o)}}))},pr(hu,"entries",new WeakMap);var vf=hu;var m1=new vf({box:"border-box"});function Vn(t,e,i){var o=m1.observe(t,()=>i(t[e]));Io(()=>(Et(()=>i(t[e])),o))}function Ih(t,e){return t===e||(t==null?void 0:t[Wo])===e}function it(t={},e,i,o){return Io(()=>{var s,a;return Go(()=>{s=a,a=(o==null?void 0:o())||[],Et(()=>{t!==i(...a)&&(e(t,...a),s&&Ih(i(...s),t)&&e(null,...s))})}),()=>{Ln(()=>{a&&Ih(i(...a),t)&&e(null,...a)})}}),t}function Yo(t=!1){let e=Bt,i=e.l.u;if(!i)return;let o=()=>cu(e.s);if(t){let s=0,a={},l=Zr(()=>{let d=!1,r=e.s;for(let u in r)r[u]!==a[u]&&(a[u]=r[u],d=!0);return d&&s++,s});o=()=>n(l)}i.b.length&&hd(()=>{Eh(e,o),oa(i.b)}),He(()=>{let s=Et(()=>i.m.map(ag));return()=>{for(let a of s)typeof a=="function"&&a()}}),i.a.length&&He(()=>{Eh(e,o),oa(i.a)})}function Eh(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function Ad(t,e,i){if(t==null)return e(void 0),i&&i(void 0),$t;let o=Et(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Rl=[];function Dr(t,e){return{subscribe:se(t,e).subscribe}}function se(t,e=$t){let i=null,o=new Set;function s(d){if(gl(t,d)&&(t=d,i)){let r=!Rl.length;for(let u of o)u[1](),Rl.push(u,t);if(r){for(let u=0;u<Rl.length;u+=2)Rl[u][0](Rl[u+1]);Rl.length=0}}}function a(d){s(d(t))}function l(d,r=$t){let u=[d,r];return o.add(u),o.size===1&&(i=e(s,a)||$t),d(t),()=>{o.delete(u),o.size===0&&i&&(i(),i=null)}}return{set:s,update:a,subscribe:l}}function ci(t,e,i){let o=!Array.isArray(t),s=o?[t]:t;if(!s.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let a=e.length<2;return Dr(i,(l,d)=>{let r=!1,u=[],p=0,f=$t,v=()=>{if(p)return;f();let y=e(o?u[0]:u,l,d);a?l(y):f=typeof y=="function"?y:$t},b=s.map((y,_)=>Ad(y,w=>{u[_]=w,p&=~(1<<_),r&&v()},()=>{p|=1<<_}));return r=!0,v(),function(){oa(b),f(),r=!1}})}function _e(t){let e;return Ad(t,i=>e=i)(),e}var _u=!1,gf=Symbol();function x(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:_s(void 0),unsubscribe:$t};if(o.store!==t&&!(gf in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=$t;else{var s=!0;o.unsubscribe=Ad(t,l=>{s?o.source.v=l:D(o.source,l)}),s=!1}return t&&gf in i?_e(t):n(o.source)}function Be(){let t={};function e(){To(()=>{for(var i in t)t[i].unsubscribe();uo(t,gf,{enumerable:!1,value:!0})})}return[t,e]}function hf(t){var e=_u;try{return _u=!1,[t(),_u]}finally{_u=e}}var y1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Me&&_g(`${t.name}.${String(e)}`),!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Rn(t,e,i){return new Proxy(Me?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},y1)}var x1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(ia(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o)return o[e]}},set(t,e,i){let o=t.props.length;for(;o--;){let s=t.props[o];ia(s)&&(s=s());let a=zo(s,e);if(a&&a.set)return a.set(i),!0}return!1},getOwnPropertyDescriptor(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(ia(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let s=zo(o,e);return s&&!s.configurable&&(s.configurable=!0),s}}},has(t,e){if(e===Wo||e===ml)return!1;for(let i of t.props)if(ia(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(ia(i)&&(i=i()),!!i){for(let o in i)e.includes(o)||e.push(o);for(let o of Object.getOwnPropertySymbols(i))e.includes(o)||e.push(o)}return e}};function os(...t){return new Proxy({props:t},x1)}function Ph(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function g(t,e,i,o){var W,U;var s=(i&1)!==0,a=!vs||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,r=!1,u;l?[u,r]=hf(()=>t[e]):u=t[e];var p=Wo in t||ml in t,f=l&&((U=(W=zo(t,e))==null?void 0:W.set)!=null?U:p&&e in t&&(z=>t[e]=z))||void 0,v=o,b=!0,y=!1,_=()=>(y=!0,b&&(b=!1,d?v=Et(o):v=o),v);u===void 0&&o!==void 0&&(f&&a&&hg(e),u=_(),f&&f(u));var w;if(a)w=()=>{var z=t[e];return z===void 0?_():(b=!0,y=!1,z)};else{var I=(s?Zr:hr)(()=>t[e]);I.f|=131072,w=()=>{var z=n(I);return z!==void 0&&(v=void 0),z===void 0?v:z}}if((i&4)===0&&a)return w;if(f){var T=t.$$legacy;return function(z,Y){return arguments.length>0?((!a||!Y||T||r)&&f(Y?w():z),z):w()}}var R=!1,k=!1,P=_s(u),E=Zr(()=>{var z=w(),Y=n(P);return R?(R=!1,k=!0,Y):(k=!1,P.v=z)});return l&&n(E),s||(E.equals=hl),function(z,Y){if(lu!==null&&(R=k,w(),n(P)),arguments.length>0){let ie=Y?n(E):a&&l?ri(z):z;if(!E.equals(ie)){if(R=!0,D(P,ie),y&&v!==void 0&&(v=ie),Ph(E))return z;Et(()=>n(E))}return z}return Ph(E)?E.v:n(E)}}var w1;typeof HTMLElement=="function"&&(w1=class extends HTMLElement{constructor(e,i,o){super();pr(this,"$$ctor");pr(this,"$$s");pr(this,"$$c");pr(this,"$$cn",!1);pr(this,"$$d",{});pr(this,"$$r",!1);pr(this,"$$p_d",{});pr(this,"$$l",{});pr(this,"$$l_u",new Map);pr(this,"$$me");this.$$ctor=e,this.$$s=i,o&&this.attachShadow({mode:"open"})}addEventListener(e,i,o){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){let s=this.$$c.$on(e,i);this.$$l_u.set(i,s)}super.addEventListener(e,i,o)}removeEventListener(e,i,o){if(super.removeEventListener(e,i,o),this.$$c){let s=this.$$l_u.get(i);s&&(s(),this.$$l_u.delete(i))}}connectedCallback(){return bt(this,null,function*(){if(this.$$cn=!0,!this.$$c){let i=function(a){return l=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),$(l,d)}};var e=i;if(yield Promise.resolve(),!this.$$cn||this.$$c)return;let o={},s=S1(this);for(let a of this.$$s)a in s&&(a==="default"&&!this.$$d.children?(this.$$d.children=i(a),o.default=!0):o[a]=i(a));for(let a of this.attributes){let l=this.$$g_p(a.name);l in this.$$d||(this.$$d[l]=_f(l,a.value,this.$$p_d,"toProp"))}for(let a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=ah({component:this.$$ctor,target:this.shadowRoot||this,props:Jt(Ye({},this.$$d),{$$slots:o,$$host:this})}),this.$$me=nu(()=>{Go(()=>{var a;this.$$r=!0;for(let l of Ep(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=_f(l,this.$$d[l],this.$$p_d,"toAttribute");d==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,d)}this.$$r=!1})});for(let a in this.$$l)for(let l of this.$$l[a]){let d=this.$$c.$on(a,l);this.$$l_u.set(l,d)}this.$$l={}}})}attributeChangedCallback(e,i,o){var s;this.$$r||(e=this.$$g_p(e),this.$$d[e]=_f(e,o,this.$$p_d,"toProp"),(s=this.$$c)==null||s.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Ep(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function _f(t,e,i,o){var a;let s=(a=i[t])==null?void 0:a.type;if(e=s==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!i[t])return e;if(o==="toAttribute")switch(s){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e==null?null:e;default:return e}else switch(s){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function S1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var Ah="5";var kh,Lh,Mh;typeof window!="undefined"&&((Mh=(Lh=(kh=window.__svelte)!=null?kh:window.__svelte={}).v)!=null?Mh:Lh.v=new Set).add(Ah);import{areValidLiveRecordSources as eI,clientChecker as Rv}from"@vkontakte/videoplayer-core/es2015";import"@vkontakte/videoplayer-core/es2015";import{noop as Gb,safeStorage as tI,throttleFn as iI}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as oI}from"@vkontakte/videoplayer-statistics/es2015";import{InterfaceLanguage as C1,fillWithDefault as T1,VideoQuality as Vh}from"@vkontakte/videoplayer-shared/es2015";var I1={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:C1.RU,downloadVKLanguages:!0,updateBuiltinLanguages:!0,isSmoothVideoRotate:!0,showSupport:!0,supportLink:"https://vk.com/support?act=new&from=v",showLogo:void 0,logoLink:"https://vk.com/video",logoType:"vk_video",volumeDefault:1,volumeMinRestore:.05,loaderDelay:500,minSubtitlesFontSize:13,autoSubtitlesTimeout:2e3,allowChangingFullscreenTarget:!0,trafficSavingLimit:Vh.Q_480P,highQualityLimit:Vh.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,features:{autoplay:!0,statistics:!0,thinStatistics:!1,preload:!0,subtitles:!0,episodes:!0,fullscreen:!0,timelinePreview:!0,mediaSession:!0,annotations:!0,slots:!0,annotationsInside:!1,pip:!0,dpip:{minimalView:!1,initialSize:{width:400,height:225}},download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,episodesClustering:!0,copyVideoLink:!0,videoRotate:!0,tracer:!1,apptracer:{enabled:!1,sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},interactiveGraph:!1,interactiveResponsiveUi:!1,seekToInteractive:!0,interactiveLastFrame:!1,interactiveTextPermanent:!0,interactiveHideTime:!0,interactivePlayPrevChapter:!0,interactiveTimeIndicator:!0,interactiveTimeOpenUri:!1,interactiveAreaControlShadow:!1,interactiveControlsExpectTimeBlinkAnimation:!1,interactiveControlsTapPlace:!1,interactiveControlsFillAnimation:!1,interactiveControlsHideAnimation:!1,interactiveHistoryEndChapterFix:!0,thumbTimer:!0,hotKeyMapModal:!0,hotKeyHelpers:!0,saveDebugInfoToFile:!1,saveTraceInfoToFile:!1,additionalButtons:!0,additionalButtonsDesktopControlPanelRight:!0,additionalSettingsMenuItems:!0,additionalContextMenuItems:!0,contextMenuButton:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,autoplayNext:!0,nextPrevButtons:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,qualityDetailsSubMenuEnabled:!1,showSlowVideoNotification:!1,forceAutoQualityWhenSevereStallHappens:!1,timeoutShowSlowVideoNotification:0,maxCountShowSlowVideoNotification:1,forcePlayerDisplayBlock:!1,playbackStatusShow:!1,playbackStatusNextVideoShow:!1,initSubtitles:!0,useCallbackForMediaSessionNextPrevClick:!1,usePerformanceFix:!1,userVideoPrefs:!1,savePreferredStatesOnUserActionOnly:!1,useLoopSetting:!1,doubleForwardAvailable:!1,useRichSeek:!1,disableThumbUnstartedOnAutoplay:!1},controls:{showOnStartupAtAutoplay:!0,hideTimeout:500,hideTimeoutMobile:3e3,hideTimeoutInitial:200,hideTimeoutFullscreen:3e3,hideTimeoutCursor:3e3,hideTimeoutTooltips:1e3,collapseMobileUnmute:6e3,hide360IconTimeout:3e3,hideHotKeyHelpers:2e3,playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25,volumeStepKeyboard:.05,volumeStepWheel:.05,volumeBarTimeout:300,seekStepKeyboard:1e4,seekStepMobile:15e3,seekStepFrame:400},ads:{enable:void 0,initTimeout:2e3,loadTimeout:2e3,runtimeTimeout:5e3,slot:void 0,preview:void 0,paramsOverride:void 0,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},disablePiPResizeHandling:!1,interactive:{historyMaxLength:100,noInteractionEventTimeout:3e4},view:{timelineSliderColor:null,timelineSliderHandleColor:null,timelineSliderFilledColor:null,timelineSliderLoadedColor:null,volumeSliderColor:null,volumeSliderHandleColor:null,volumeSliderFilledColor:null,controlsTimeColor:null,timelineSliderFilledActiveLiveColor:null,timelineSliderHandleActiveLiveColor:null,buttonColor:null,buttonToggleOnColor:null,focusedColor:null,font:null,focusedOutlineWidth:null,focusedOutlineRadius:null,controlsDesktopPaddingHorizontal:null,controlsDesktopPaddingHorizontalMinimalView:null,timelinePaddingHorizontal:null,settingsBackgroundColor:null,controlsGradientHeight:null,controlsGradient:null},userSalt:"0",doubleForwardActivationTime:600,playbackStatusAnimationDuration:1e3,playbackStatusNextVideoAnimationDuration:1e3,suitableDurationForUsingRichSeek:180,titleShowBehaviour:"fullscreen",disabledSlotIds:[],disabledAdditionalButtonIds:[]},Rh=t=>T1(t,I1),Dh=t=>$l("ui-config",t),Lt=()=>bl("ui-config");var kd="vk_player_debug_panel_opened";var Oh="videoplayer",Nh="videoplayer";var $s={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Bh=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Hh=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Fh=new Set(["ShiftRight","ShiftLeft"]);var Uh=["TIMELINE"],Ld=[...Uh,"GRAPH_BUTTON"],bf=[...Uh,"PLAY_BUTTON"],Md=[...Ld,"PLAY_BUTTON"];var ys=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(ys||{}),Vd={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as zh,VERSION as E1}from"@vkontakte/videoplayer-shared/es2015";import{VERSION as P1}from"@vkontakte/videoplayer-core/es2015";import{VERSION as A1}from"@vkontakte/videoplayer-statistics/es2015";var bu="prod",Dl="1.1.85-dev.efae8891.0";var Ba=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Wh=Symbol("storeContext"),Kh=Symbol("microStoresContext"),Qh=(t,e)=>{$l(Wh,t),$l(Kh,e),bu==="dev"&&(window.app={store:t,microStores:e})},xe=()=>{let t=bl(Wh);return zh(t,"Store context is empty!"),t},_o=()=>{let t=bl(Kh);return zh(t,"MicroStores context is empty!"),t},ti=(t,e)=>yu(t,t.getValue(),e),yu=(t,e,i)=>Dr(e,o=>{let s=t.subscribe(a=>{o(a),i==null||i(a)});return()=>s.unsubscribe()}),qh=(t,e,i,o,s=["meta config not provided"])=>{var U,z,Y,ie,J,oe,de,ae,pe;let a=t.info,{width:l,height:d}=_e(i.ui.playerSize),r=(z=(U=a.throughputEstimation$.getValue())==null?void 0:U.toFixed(0))!=null?z:0,u=(ie=(Y=a.rttEstimation$.getValue())==null?void 0:Y.toFixed(0))!=null?ie:0,p=a.isAutoQualityEnabled$.getValue()?"auto":"manual",f=`${Dl} (core: ${P1}, stat: ${A1}, shared: ${E1})`,v=_e(i.state.errorLog$),b=v.length?`
|
|
45
|
+
`+v.map((ee,$e)=>{var fe;let Ee=`${$e}) Type: ${ee.id}
|
|
46
|
+
`,ce=`Message: ${ee.message} (${ee.thrown})
|
|
47
|
+
`,Qe=`Trace: ${(fe=ee.thrown)==null?void 0:fe.stack}
|
|
48
|
+
`;return Ee+ce+Qe}).join(`
|
|
49
|
+
`):void 0,y=i.state.isAudioDisabled?"disabled":_e(i.state.isAudioAvailable$)?void 0:"unavailable",_=t.info.currentVideoStream$.getValue(),w=t.info.currentAudioStream$.getValue(),I=[];_&&I.push(`Video: ${(J=_==null?void 0:_.codec)!=null?J:""}`+(_!=null&&_.hdr?" (HDR)":"")),w&&I.push(`Audio: ${(oe=w==null?void 0:w.codec)!=null?oe:""}`+(w!=null&&w.language?` (${w.language})`:""));let T=a.currentQuality$.getValue(),R="";if(T){let ee=a.availableQualitiesFps$.getValue()[T];R=ee?`${ee}fps`:""}let k=a.httpConnectionType$.getValue(),P=(ae=(de=a.currentBuffer$.getValue())==null?void 0:de.end)!=null?ae:0,E=Math.max(P-_e(i.state.positionExact$),0),W={Version:f,Browser:navigator.userAgent,Config:s.join(", "),"United video id":String(i.videoId),TraceId:o,VSID:_e(i.vsid),"Content host":a.hostname$.getValue(),"Connection type":k?k+(a.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${r}Kbps @ ${u}ms RTT`,Format:a.currentFormat$.getValue(),"Available Formats":e!=null&&e.sources?Object.keys(e.sources).join(", "):"",Streams:I.join(", "),Quality:`${p} ${T!=null?T:""} ${R}`,"Available qualities":a.availableQualities$.getValue().join(", "),Audio:y,Position:`${_e(i.state.positionExact$)}s`,Buffer:`${E}s`,State:`${_e(i.playerPhase)} ${(pe=a.playbackState$.getValue())!=null?pe:""}`,"Player size":`${l}x${d}`,URL:window.location.href,Errors:b};return Object.entries(W).filter(([ee,$e])=>$e!==void 0).map(([ee,$e])=>`${ee}: ${$e}`).join(`
|
|
50
|
+
`)},Gh=(t,e,i)=>{var U,z,Y,ie;let o=t.info,{width:s,height:a}=_e(i.ui.playerSize),l={version:Dl,viewport:`${s}x${a}`,volume:Math.round(_e(i.state.volume$)*100)};l.id=i.videoId,o.currentFormat$.getValue()&&(l.provider=o.currentFormat$.getValue()),o.hostname$.getValue()&&(l.cdn=o.hostname$.getValue());let u=o.intrinsicVideoSize$.getValue();u&&(l.videoSize=`${u.width}x${u.height}`);let p=o.currentBuffer$.getValue(),f=o.currentNativeBuffer$.getValue(),v=o.isLive$.getValue(),b=o.liveBufferTime$.getValue();p&&f&&(v&&b?(l.buffer=p.end-b,l.nativeBuffer=f.end-b):(l.buffer=Math.max(p.end-_e(i.state.positionExact$),0),l.nativeBuffer=Math.max(f.end-_e(i.state.positionExact$),0))),l.position=_e(i.state.positionExact$);let y=o.throughputEstimation$.getValue();y&&(l.speed=y);let _=o.videoBitrate$.getValue();_&&(l.bitrate=_);let w=o.liveLatency$.getValue();w&&(l.liveLatency=w);let I=o.currentVideoSegmentLength$.getValue();I&&(l.currentVideoSegmentLength=I);let T=o.currentAudioSegmentLength$.getValue();T&&(l.currentAudioSegmentLength=T);let R=_e(i.vsid);typeof R=="string"&&(l.vsid=R);let k=(U=t.info.currentVideoStream$.getValue())==null?void 0:U.codec;k&&(l.videoCodec=k);let P=(z=t.info.currentAudioStream$.getValue())==null?void 0:z.codec;P&&(l.audioCodec=P),((Y=t.info.currentVideoStream$.getValue())==null?void 0:Y.hdr)&&(l.hdr=!0);let W=(ie=t.info.currentAudioStream$.getValue())==null?void 0:ie.language;return W&&(l.audioLanguage=W),l},Yh=(t,e)=>Ba(t,e,"mp4"),jh=t=>!t.type,Xh=t=>!!t.type,Zh=()=>{let e=[],i=0;return{add:(o,s)=>{e[i]=[o,s],i=(i+1)%10},find:o=>e.find(([s])=>s===o)}},$u=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}download(e){return bt(this,null,function*(){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=yield fetch(e,{signal:this.destroyController.signal});if(i.ok)return yield i.text();throw i}finally{this.pendingDownloads.delete(e)}})}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}};import{isNullable as wf,safeStorage as Pi}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-core/es2015";var k1="vk_player_",Jh="vk_player_prefer_traffic_saving_enabled",e_="vk_player_preferred_volume",t_="vk_player_prefer_volume_mute",Sf="vk_player_preferred_quality",$f="vk_player_preferred_default_quality_settings",yf="vk_player_preferred_quality_settings_by_video",i_="vk_player_preferred_stream_language",o_="vk_player_preferred_rate",n_="vk_player_preferred_autoplay_next",xf="vk_player_preferred_subtitles_language",r_="vk_player_user_video_prefs",s_=`${k1}preview_track_close_tooltip`,a_=t=>t>1?1:t<0?0:t,Cf=t=>Pi.set(e_,a_(t).toString(10)),xu=()=>{let t=Pi.get(e_);return wf(t)?void 0:a_(parseFloat(t))},Tf=(t,e)=>Pi.set(Sf,JSON.stringify({videoId:t,value:e})),wu=()=>Pi.remove(Sf),If=t=>{let e=Pi.get(Sf);if(wf(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){wu();return}return o},l_=(t,e)=>{e?Pi.set(t,"true"):Pi.remove(t)},Ef=t=>Pi.get(t)==="true",Pf=t=>l_(t_,t),d_=()=>Ef(t_),Rd=t=>l_(Jh,t),Af=()=>Ef(Jh),c_=()=>Pi.get(i_),kf=t=>Pi.set(i_,t),Lf=()=>Pi.get(xf),Mf=t=>{t?Pi.set(xf,t):Pi.remove(xf)},u_=t=>Pi.set(o_,JSON.stringify({rate:t})),p_=()=>{let t=Pi.get(o_);if(wf(t))return;let{rate:e}=JSON.parse(t);return e},f_=t=>{Pi.set(n_,String(t))},m_=()=>Ef(n_),L1=()=>{let t=p=>{Pi.set($f,JSON.stringify(p))},e=()=>{try{let p=Pi.get($f);return p?JSON.parse(p):null}catch(p){return null}},i=()=>{try{let p=Pi.get(yf);return p?JSON.parse(p):null}catch(p){return null}},o=p=>{Pi.set(yf,JSON.stringify(p))},s=p=>{u(p);let f=p?i():null;if(f&&(f==null?void 0:f.videoId)===p)return Jt(Ye({},f),{appliesTo:"to-video"});f&&a();let v=e();return v?Jt(Ye({},v),{appliesTo:"as-default"}):(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{Pi.remove(yf)},l=()=>{Pi.remove($f)},d=(p,f="as-default")=>{p.type==="exact_quality"||f==="to-video"?o(p):t(p)},r=p=>{let f=s(p);if(f){switch(f.type){case"traffic_saving":Rd(!0);break;case"exact_quality":Tf(p,f.quality)}a(),l()}},u=p=>{let f=If(p);if(f){o({type:"exact_quality",videoId:p,quality:f});return}Af()&&t({type:"traffic_saving",videoId:p}),Rd(!1),wu()};return{getPreferredQualitySettings:s,migrateSettingsToLegacyWay:r,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:Lf,savePreferredSubtitlesLanguage:Mf}},{getPreferredQualitySettings:v_,migrateSettingsToLegacyWay:g_,savePreferredQualitySettings:Su,savePreferredDefaultQualitySettings:fR,removePreferredQualitySettingsByVideo:mR,getPreferredDefaultQualitySettings:Cu}=L1(),M1=3,V1=3,h_=()=>{let t=Pi.get(r_);if(t)try{return JSON.parse(t)}catch(e){return null}return null},Tu=(t,e)=>{var s,a;let i=h_();return(a=(s=i==null?void 0:i[t])==null?void 0:s[e])!=null?a:null},Vf=(t,e,i)=>{var l,d,r;let o=(l=h_())!=null?l:{},s=(r=(d=o[t])==null?void 0:d[e])!=null?r:{};Object.assign(s,i,{updatedTs:Date.now()}),t in o||(o[t]={}),o[t][e]=s;let a=R1(o);Pi.set(r_,JSON.stringify(a))};function R1(t){let e=Object.entries(t).reduce((o,[s,a])=>{let l=0;return Object.values(a).forEach(d=>{l<d.updatedTs&&(l=d.updatedTs)}),o.push([s,l]),o},[]);return e.sort(([,o],[,s])=>o>s?-1:1),e.splice(V1),e.reduce((o,[s])=>(o[s]=D1(t[s]),o),{})}function D1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(M1),Object.fromEntries(e)}function __(){Pi.set(s_,JSON.stringify(!0))}function b_(){let t=Pi.get(s_);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Kb}from"@vkontakte/videoplayer-core/es2015";wg();var la="var(--btn-color, #fff)";var O1=Ae('<g filter="url(#strokeAndShadow)"><!></g><defs><filter x="-12" width="72" y="-12" height="72" id="strokeAndShadow"><feMorphology operator="dilate" radius=".4" result="outer"></feMorphology><feFlood flood-color="rgba(0,0,0,0.1)" result="outerColor"></feFlood><feComposite operator="in" in="outerColor" in2="outer" result="outerOutline"></feComposite><feDropShadow in="SourceGraphic" dx="0" dy="0" stdDeviation="3" flood-color="rgba(0,0,0,0.4)" result="outerShadow"></feDropShadow><feMerge><feMergeNode in="outerShadow"></feMergeNode><feMergeNode in="outerOutline"></feMergeNode><feMergeNode in="SourceGraphic"></feMergeNode></feMerge></filter></defs>',1),N1=Ae('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function je(t,e){var p;B(e,!0);let i=g(e,"width",19,()=>"24"),o=g(e,"height",19,()=>"24"),s=g(e,"fill",3,la),a=(p=e.viewBox)!=null?p:`0 0 ${i()} ${o()}`;var l=N1(),d=C(l);{var r=f=>{var v=O1(),b=le(v),y=C(b);ei(y,()=>e.children),S(b),Xt(),$(f,v)},u=f=>{var v=Ve(),b=le(v);ei(b,()=>e.children),$(f,v)};M(d,f=>{e.shadow?f(r):f(u,!1)})}S(l),O(()=>{De(l,"aria-label",e.ariaLabel),De(l,"aria-hidden",!e.ariaLabel),De(l,"width",i()),De(l,"height",o()),De(l,"viewBox",a),De(l,"fill",s()),Ke(l,e.style),De(l,"data-testid",e.testId)}),$(t,l),H()}import{isNullable as x_,InterfaceLanguage as w_}from"@vkontakte/videoplayer-shared/es2015";var B1={auto_quality_invariant:"Авто",auto_quality:"Авто ({actual})",auto_quality_option:"Авто",other_quality:"Другое",high_quality:"Высокое качество",high_quality_description:"Будет использовано больше трафика",auto_quality_limit:"Автоматически",traffic_saving_quality:"Экономия трафика",traffic_saving_quality_description:"Видео грузятся быстрее, но качество ниже",default_quality_for_any_video:"Качество для всех видео",quality_applience:"Качество по умолчанию можно {action}",quality_applience_action:"изменить",menu_quality:"Качество",menu_traffic_saving:"Экономия данных",menu_playback_rate:"Скорость",menu_report:"Сообщить о проблеме",menu_pip:"Картинка в картинке",menu_pip_close:"Развернуть видео",menu_copy_video_link:"Скопировать ссылку на видео",menu_copy_video_link_with_timestamp:"Скопировать ссылку на кадр",menu_video_rotate:"Повернуть",menu_video_loop_on:"Включить повторение",menu_video_loop_off:"Отключить повторение",menu_chromecast:"Chromecast трансляция",menu_copy_debug:"Копировать данные для диагностики",menu_save_debug:"Сохранить данные для диагностики",menu_debug_overlay:"Техническая информация",menu_copy_embed_code:"Копировать код для встраивания",menu_audio_languages:"Звуковая дорожка",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Дорожка {index}",pip_dummy_title:"Видео воспроизводится в режиме картинка в картинке",submenu_quality:"Качество",submenu_playback_rate:"Скорость",submenu_settings:"Настройки",submenu_traffic_saving:"Экономия данных",submenu_audio_languages:"Звуковая дорожка",playing_ads:"Реклама {timeleft}",skip_ads_now:"Пропустить рекламу",skip_ads_after:"Пропустить {time}с",visit_advertiser:"Перейти на сайт",aria_timeline:"Ползунок временной шкалы",aria_timeline_value:"{position} (общая длительность {duration}",doubletap_seek_step:"{seconds} секунд",playback_rate_1:"Обычная",playback_rate:"{multiplier}x",video360:"панорамное видео",subtitles_caption:"Субтитры",subtitles_auto:"{language} (Автоматические)",subtitles_off:"Выкл.",subtitles_auto_caption:"Автоматические субтитры",subtitles_turn_on:"Включить субтитры",subtitles_turn_off:"Выключить субтитры",traffic_saving_off:"Откл.",traffic_saving_on:"Вкл.",traffic_saving_helper_text:"При включении качество видео будет снижено для экономии трафика",tooltip_button_disabled:"Кнопка недоступна",tooltip_previous:"Предыдущее видео",tooltip_restart:"Начать заново",tooltip_play:"Смотреть",tooltip_pause:"Пауза",tooltip_next:"Следующее видео",tooltip_interactive_go_back:"Вернуться к предыдущей главе",tooltip_interactive_go_back_disabled:"История прохождения недоступна",tooltip_interactive_go_back_disabled_first:"Вы смотрите первую главу",tooltip_interactive_go_back_disabled_limit:"Лимит возвратов исчерпан",tooltip_chapter_without_interactive:"В этой главе нет интерактива",tooltip_interactive_of_chapter_completed:"Интерактивы этой главы уже пройдены",tooltip_interactive_seek:"Перейти к интерактиву",tooltip_interactive_graph_off:"Показать карту сюжета",tooltip_interactive_graph_on:"Скрыть карту сюжета",tooltip_live:"Перемотать на актуальный лайв",tooltip_episodes:"Эпизоды",tooltip_volume:"Включить звук",tooltip_volume_muted:"Выключить звук",tooltip_sound_unavailable:"Звук недоступен",tooltip_subtitles_off:"Включить субтитры",tooltip_subtitles_on:"Выключить субтитры",tooltip_settings_off:"Открыть настройки",tooltip_settings_on:"Закрыть настройки",tooltip_fullscreen_off:"На весь экран",tooltip_fullscreen_on:"Выйти из полноэкранного режима",tooltip_chromecast_off:"Включить Chromecast",tooltip_chromecast_on:"Выключить Chromecast",tooltip_episode_finished:"Вы уже сделали свой выбор",tooltip_episode_unfinished:"Не пройдено",tooltip_disabled_when_interactive:"Интерактив уже идёт",tooltip_disabled_when_graph_on:"Кнопка недоступна во время просмотра карты",tooltip_interactive_interaction_time_indicator:"Нажмите на элемент интерактива",tooltip_vk_logo:"Открыть в VK Видео",tooltip_vk_video_logo:"Перейти в VK Видео",tooltip_autoplay_off:"Включить автовоспроизведение",tooltip_autoplay_on:"Отключить автовоспроизведение",tooltip_context_menu_open:"Открыть контекстное меню",tooltip_context_menu_close:"Закрыть контекстное меню",download_video_caption:"Скачать видео",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Быстрые клавиши",hotkey_map_modal_close_btn_text:"Закрыть",hotkey_map_group_title_common:"Общие",hotkey_map_group_title_playback:"Воспроизведение",hotkey_map_group_title_subtitles:"Субтитры",hotkey_map_group_title_episodes:"Эпизоды",hotkey_map_item_mute_description:"Включить или отключить звук",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Увеличить громкость",hotkey_map_item_volume_up_value:"Стрелка вверх",hotkey_map_item_volume_down_description:"Уменьшить громкость",hotkey_map_item_volume_down_value:"Стрелка вниз",hotkey_map_item_pip_description:"Свернуть или развернуть мини-проигрыватель",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Включить или выключить полноэкранный режим",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Скрыть или показать контекстное меню",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Скрыть или показать список горячих клавиш",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Приостановить или продолжить воспроизведение",hotkey_map_item_play_toggle_value:"Пробел (или k)",hotkey_map_item_seek_backward_description:"Перемотать ролик на 10 секунд назад",hotkey_map_item_seek_backward_value:"Стрелка влево (или j)",hotkey_map_item_seek_forward_description:"Перемотать ролик на 10 секунд вперёд",hotkey_map_item_seek_forward_value:"Стрелка вправо (или l)",hotkey_map_item_fast_seek_backward_description:"Ускоренная перемотка назад",hotkey_map_item_fast_seek_backward_value:"Shift + Стрелка влево",hotkey_map_item_fast_seek_forward_description:"Ускоренная перемотка вперёд",hotkey_map_item_fast_seek_forward_value:"Shift + Стрелка вправо",hotkey_map_item_rate_down_description:"Уменьшить скорость воспроизведения",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Увеличить скорость воспроизведения",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Перейти к предыдущему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Перейти к следующему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Перейти к определённому моменту видео <br />(например, при нажатии на цифру «7» ролик будет перемотан до временной отметки, которая соответствует 70% от длительности видео)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Включить или отключить субтитры",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Перейти к предыдущему эпизоду",hotkey_map_item_prev_episode_pc_value:"Ctrl + Стрелка влево",hotkey_map_item_prev_episode_mac_value:"Option + Стрелка влево",hotkey_map_item_next_episode_description:"Перейти к следующему эпизоду",hotkey_map_item_next_episode_pc_value:"Ctrl + Стрелка вправо",hotkey_map_item_next_episode_mac_value:"Option + Стрелка вправо",hotkey_map_item_next_video_description:"Перейти к следующему видео",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Перейти к предыдущему видео",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"дн",waiting_live_hour_value:"ч",waiting_live_minute_value:"мин",waiting_live_second_value:"сек",waiting_live_colon:":",waiting_live_upcoming_title:"Трансляция еще не началась",waiting_live_timer_title:"До начала трансляции осталось",waiting_live_recover_title:"Трансляция приостановлена - она продолжится, когда автор вернётся",waiting_record_title:"Трансляция завершена - запись появится позже",aria_label_video_player:"Видео плеер",aria_label_spherical_control:"Контроллер для сферического видео. Используйте клавиши со стрелками для панорамирования видео.",aria_label_debug_panel:"Область с технической информацией, сделайте скриншот для техподдержки",aria_label_new_tab_alert:"Откроется в новой вкладке.",aria_label_menu_quality:"Качество: {actual}",aria_label_menu_audio_languages:"Язык аудио: {actual}",aria_label_menu_rate:"Скорость: {actual}",aria_label_menu_subtitle:"Субтитры: {actual}",aria_label_menu_download:"Скачать видео",aria_label_menu_debug_overlay:"Отображение технической информации",aria_label_menu_rotate:"Повернуть видео на 90 градусов",aria_label_menu_loop:"Переключение режима повторения",aria_label_submenu_back:"Вернуться в меню настроек",aria_label_submenu_traffic_saving:"Режим экономии данных",aria_label_settings:"Настройки",aria_label_context_menu:"Контекстное меню",aria_label_autoplay:"Автовоспроизведение",end_screen_next_video:"Следующее видео",end_screen_recommended_video:"Рекомендуемое видео",slow_video_notification_button:"Выбрать качество «Авто»",slow_video_notification_force_description:`Видео грузится слишком медленно,
|
|
51
51
|
качество изменено на «Авто»`,slow_video_notification_suggest_description:`Видео загружается слишком медленно -
|
|
52
|
-
попробуйте изменить качество на «Авто»`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"}
|
|
52
|
+
попробуйте изменить качество на «Авто»`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"},$_=B1;var H1={auto_quality_invariant:"Auto",auto_quality:"Auto ({actual})",auto_quality_option:"Auto",other_quality:"Other",high_quality:"High quality",high_quality_description:"Uses more data",auto_quality_limit:"Auto",traffic_saving_quality:"Data saving",traffic_saving_quality_description:"Videos load faster but at lower quality",quality_applience:"You can {action} the default quality",quality_applience_action:"change",default_quality_for_any_video:"Quality for all videos",menu_quality:"Quality",menu_playback_rate:"Playback rate",menu_traffic_saving:"Data saving",menu_report:"Report a problem",menu_pip:"Picture in picture",menu_pip_close:"Expand video",menu_copy_video_link:"Copy video link",menu_copy_video_link_with_timestamp:"Copy link with timestamp",menu_video_rotate:"Rotate",menu_video_loop_on:"Enable loop",menu_video_loop_off:"Disable loop",menu_chromecast:"Chromecast stream",menu_copy_debug:"Copy debug info",menu_save_debug:"Save debug info",menu_debug_overlay:"Tech stats",menu_copy_embed_code:"Copy embed code",menu_audio_languages:"Audio track",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Audio track {index}",pip_dummy_title:"Video plays in picture-in-picture mode",submenu_quality:"Quality",submenu_playback_rate:"Playback rate",submenu_traffic_saving:"Data saving",submenu_settings:"Settings",submenu_audio_languages:"Audio track",playing_ads:"Ads {timeleft}",skip_ads_after:"Skip ads",skip_ads_now:"Skip {time}s",visit_advertiser:"Visit site",aria_timeline:"Time scale slider",aria_timeline_value:"{position} out of {duration}",doubletap_seek_step:"{seconds} seconds",playback_rate_1:"Normal",playback_rate:"{multiplier}x",video360:"spherical video",subtitles_caption:"Subtitles",subtitles_auto:"{language} (Auto-generated)",subtitles_off:"Off",subtitles_auto_caption:"Auto subtitles",subtitles_turn_on:"Turn on subtitles",subtitles_turn_off:"Turn off subtitles",traffic_saving_off:"Off",traffic_saving_on:"On",traffic_saving_helper_text:"When turned on the video quality will be reduced to save data",tooltip_button_disabled:"Button disabled",tooltip_previous:"Previous video",tooltip_restart:"Watch again",tooltip_play:"Play",tooltip_pause:"Pause",tooltip_next:"Next video",tooltip_interactive_go_back:"Back to previous chapter",tooltip_interactive_go_back_disabled:"Interactive history unavailable",tooltip_interactive_go_back_disabled_first:"You're watching the first chapter",tooltip_interactive_go_back_disabled_limit:"Go-back limit exceeded",tooltip_chapter_without_interactive:"This chapter has no interactive segment",tooltip_interactive_of_chapter_completed:"Chapter's interactive segments already watched",tooltip_interactive_seek:"Go to interactive",tooltip_interactive_graph_off:"Show interactive graph",tooltip_interactive_graph_on:"Hide interactive graph",tooltip_live:"Go to the live edge",tooltip_episodes:"Episodes",tooltip_volume:"Volume off",tooltip_volume_muted:"Turn volume on",tooltip_sound_unavailable:"Sound unavailable",tooltip_subtitles_off:"Turn subtitles on",tooltip_subtitles_on:"Turn subtitles off",tooltip_settings_off:"Open settings",tooltip_settings_on:"Close settings",tooltip_fullscreen_off:"Enter fullscreen mode",tooltip_fullscreen_on:"Exit fullscreen mode",tooltip_chromecast_off:"Turn Chromecast on",tooltip_chromecast_on:"Turn Chromecast off",tooltip_episode_finished:"You have already viewed interactive episode",tooltip_episode_unfinished:"Interactive episode not finished",tooltip_disabled_when_interactive:"Interactive video in progress",tooltip_disabled_when_graph_on:"Button is disabled when graph is opened",tooltip_interactive_interaction_time_indicator:"Press the interactive element",tooltip_vk_logo:"Open in VK Video",tooltip_vk_video_logo:"Go to VK Video",tooltip_autoplay_off:"Turn autoplay on",tooltip_autoplay_on:"Turn autoplay off",tooltip_context_menu_open:"Open context menu",tooltip_context_menu_close:"Close context menu",download_video_caption:"Download video",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Keyboard shortcuts",hotkey_map_modal_close_btn_text:"Close",hotkey_map_group_title_common:"Common",hotkey_map_group_title_playback:"Playback",hotkey_map_group_title_subtitles:"Subtitles",hotkey_map_group_title_episodes:"Episodes",hotkey_map_item_mute_description:"Toggle mute",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Increase volume",hotkey_map_item_volume_up_value:"Arrow up",hotkey_map_item_volume_down_description:"Decrease volume",hotkey_map_item_volume_down_value:"Arrow down",hotkey_map_item_pip_description:"Toggle miniplayer",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Toggle full screen",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Hide or show context menu",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Hide or show list of hotkeys",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Toggle play/pause",hotkey_map_item_play_toggle_value:"Space (or k)",hotkey_map_item_seek_backward_description:"Rewind 10 seconds",hotkey_map_item_seek_backward_value:"Arrow left (or j)",hotkey_map_item_seek_forward_description:"Forward 10 seconds",hotkey_map_item_seek_forward_value:"Arrow right (or l)",hotkey_map_item_fast_seek_backward_description:"Fast rewind",hotkey_map_item_fast_seek_backward_value:"Shift + Arrow left",hotkey_map_item_fast_seek_forward_description:"Fast forward",hotkey_map_item_fast_seek_forward_value:"Shift + Arrow right",hotkey_map_item_rate_down_description:"Decrease playback rate",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Increase playback rate",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Previous frame (while paused)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Next frame (while paused)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Seek to specific point in the video (7 advances to 70% of duration)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Toggle captions ON/OFF",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Seek to previous episode",hotkey_map_item_prev_episode_pc_value:"Ctrl + Arrow left",hotkey_map_item_prev_episode_mac_value:"Option + Arrow left",hotkey_map_item_next_episode_description:"Seek to next episode",hotkey_map_item_next_episode_pc_value:"Ctrl + Arrow right",hotkey_map_item_next_episode_mac_value:"Option + Arrow right",hotkey_map_item_next_video_description:"Next video",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Previous video",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"d",waiting_live_hour_value:"h",waiting_live_minute_value:"min",waiting_live_second_value:"sec",waiting_live_colon:":",waiting_live_upcoming_title:"The broadcast hasn't started yet",waiting_live_timer_title:"Before the start of the broadcast left",waiting_live_recover_title:"The broadcast has been paused - it will resume when the author returns",waiting_record_title:"The broadcast completed - recording will appear later",aria_label_video_player:"Video player",aria_label_spherical_control:"Spherical video control. Use the arrow keys to pan the video.",aria_label_debug_panel:"Technical information area, take a screenshot for technical support",aria_label_new_tab_alert:"Opens in a new tab.",aria_label_menu_quality:"Quality: {actual}",aria_label_menu_audio_languages:"Audio language: {actual}",aria_label_menu_rate:"Rate: {actual}",aria_label_menu_subtitle:"Subtitles: {actual}",aria_label_menu_download:"Download video",aria_label_menu_debug_overlay:"Display of technical information",aria_label_menu_rotate:"Rotate video 90 degrees",aria_label_menu_loop:"Toggle loop",aria_label_submenu_back:"Return to settings menu",aria_label_submenu_traffic_saving:"Data saving mode",aria_label_settings:"Settings",aria_label_context_menu:"Context menu",aria_label_autoplay:"Autoplay",end_screen_next_video:"Next video",end_screen_recommended_video:"Recommended video",slow_video_notification_button:"Select Auto quality",slow_video_notification_force_description:`The video is loading too slowly,
|
|
53
53
|
so the quality was changed to Auto`,slow_video_notification_suggest_description:`The video is loading too slowly.
|
|
54
|
-
Try switching the quality to Auto.`,double_forward_label:"2x",preview_track_notification_text:"pull up to open precise rewind",preview_track_close_tooltip:"dismiss precise rewind"},v_=M1;var Os=new Map;Os.set(h_.EN,v_);Os.set(h_.RU,m_);var __=new Map,kf=({language:t,pack:e,fallback:i})=>{if(Os.has(t)){let o=Os.get(t);Os.set(t,Xe(Xe({},o),e))}else Os.set(t,e);__.set(t,i)},Lf=t=>Os.has(t),Mf=(t,e,i,o)=>{var l;let r=Os.get(t),a=r==null?void 0:r[e];if(g_(a)){let d=(l=__.get(t))!=null?l:o,s=d?Os.get(d):void 0;a=s==null?void 0:s[e]}return g_(a)?e+Object.values(i!=null?i:{}).join(" "):i?a.replaceAll(/{(\w+?)}/g,(d,s)=>{var u;return(u=i[s])!=null?u:""}):a},Y=(t,e)=>{let{interfaceLanguage$:i}=ye(),o=$e(i),r=Vt();return Mf(o,t,e,r.defaultLanguage)};var V1=ke('<path d="M26.86 15.18a3.7 3.7 0 0 0 2.53-3.6C29.4 8.91 27.2 7 24.07 7c-1.96 0-3.57.78-4.67 2.29l-.1.15a1.33 1.33 0 0 0 .26 1.85c.54.4 1.3.35 1.74-.16l.2-.25a3 3 0 0 1 2.5-1.3c1.53 0 2.6.91 2.6 2.25 0 1.36-1.09 2.27-2.65 2.27h-.58a1.23 1.23 0 0 0 0 2.47h.58c1.75 0 2.91.98 2.91 2.39 0 1.45-1.19 2.46-2.88 2.46a3.2 3.2 0 0 1-2.89-1.6l-.2-.29a1.4 1.4 0 0 0-2.05-.25 1.3 1.3 0 0 0-.3 1.68l.21.33A6 6 0 0 0 24 24c3.28 0 5.63-2.04 5.63-4.92a4 4 0 0 0-2.77-3.9M37.73 12.68c-.46 0-1 .04-1.5.16L38.8 9.1a1.34 1.34 0 1 0-2.2-1.52l-3.76 5.47C31.43 15.18 31 16.87 31 18.33 31 21.8 33.56 24 37.19 24c3.6 0 6.16-2.4 6.16-5.77a5.4 5.4 0 0 0-5.63-5.56m-.53 8.74c-1.98 0-3.33-1.27-3.33-3.14 0-1.85 1.35-3.14 3.33-3.14 1.95 0 3.3 1.29 3.3 3.14 0 1.87-1.35 3.14-3.3 3.14m20.8-5.9c0 5.03-2.7 8.43-6.63 8.43s-6.62-3.4-6.62-8.44 2.7-8.44 6.62-8.44S58 10.47 58 15.51m-10.35 0c0 3.56 1.49 5.85 3.72 5.85s3.72-2.3 3.72-5.86-1.48-5.86-3.72-5.86c-2.23 0-3.72 2.3-3.72 5.86M67 9.49A3.5 3.5 0 0 1 63.51 13 3.5 3.5 0 0 1 60 9.49 3.5 3.5 0 0 1 63.51 6 3.5 3.5 0 0 1 67 9.49m-5 0c0 .83.68 1.51 1.51 1.51.81 0 1.5-.68 1.5-1.51 0-.81-.69-1.5-1.5-1.5-.83 0-1.51.69-1.51 1.5ZM67 23.5c0-1.32-1.2-3.1-4.2-4.67a1.5 1.5 0 1 1 1.4-2.66c3.25 1.72 5.8 4.26 5.8 7.33 0 3.13-2.56 5.55-6.09 7.27-3.63 1.77-8.82 3.06-15.26 3.72a1.5 1.5 0 0 1-.3-2.98c6.25-.64 11.05-1.88 14.25-3.44 3.3-1.6 4.4-3.27 4.4-4.57M38.88 35H38c-9.64 0-17.45-1.13-22.9-3.02-2.72-.94-4.94-2.1-6.5-3.47C7.01 27.14 6 25.44 6 23.5a6.2 6.2 0 0 1 1.9-4.25 16 16 0 0 1 4.43-3.1 1.5 1.5 0 1 1 1.34 2.7q-2.39 1.19-3.59 2.46C9.3 22.14 9 22.87 9 23.5c0 .8.4 1.74 1.57 2.76s3 2.01 5.51 2.89C21.11 30.89 28.55 32 38 32h.88l-1.44-1.44a1.5 1.5 0 0 1 2.12-2.12l4 4h.01a1.5 1.5 0 0 1 .32 1.63 2 2 0 0 1-.33.5l-4 4a1.5 1.5 0 0 1-2.12-2.13z"></path>');function Pd(t,e){B(e,!1);let i=Y("video360");Zo(),Ze(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,r)=>{var a=V1();_(o,a)},$$slots:{default:!0}}),H()}import"@vkontakte/videoplayer-core/es2015";var _s=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(_s||{});var wu=t=>{if(t.requestFullscreen)return t.requestFullscreen();if(t.msRequestFullscreen)return t.msRequestFullscreen();if(t.webkitRequestFullscreen)return t.webkitRequestFullscreen();if(t.mozRequestFullScreen)return t.mozRequestFullScreen();let e=t.querySelector("video");return e!=null&&e.webkitEnterFullscreen?(e.webkitEnterFullscreen(),Promise.resolve()):Promise.reject()},Su=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),b_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,$_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Ad=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},ra=()=>!!Ad(),Cu=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},Tu=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},y_=t=>{let e=window.screen;return(r=>_t(null,null,function*(){return e.orientation?e.orientation.lock(r):e.mozLockOrientation?e.mozLockOrientation(r):e.msLockOrientation?e.msLockOrientation(r):Promise.reject()}))(((r={width:0,height:0})=>r.width<=r.height?"portrait":"landscape")(t))};import{clientChecker as x_}from"@vkontakte/videoplayer-core/es2015";var w_=()=>({title:Y("hotkey_map_modal_title"),closeBtnText:Y("hotkey_map_modal_close_btn_text"),groups:[{title:Y("hotkey_map_group_title_common"),items:[{description:Y("hotkey_map_item_mute_description"),value:Y("hotkey_map_item_mute_value")},{description:Y("hotkey_map_item_volume_up_description"),value:Y("hotkey_map_item_volume_up_value")},{description:Y("hotkey_map_item_volume_down_description"),value:Y("hotkey_map_item_volume_down_value")},{description:Y("hotkey_map_item_pip_description"),value:Y("hotkey_map_item_pip_value")},{description:Y("hotkey_map_item_full_screen_description"),value:Y("hotkey_map_item_full_screen_value")},{description:Y("hotkey_map_item_show_context_menu_description"),value:Y("hotkey_map_item_show_context_menu_value")},{description:Y("hotkey_map_item_show_hotkey_map_description"),value:Y("hotkey_map_item_show_hotkey_map_value")}]},{title:Y("hotkey_map_group_title_playback"),items:[{description:Y("hotkey_map_item_play_toggle_description"),value:Y("hotkey_map_item_play_toggle_value")},{description:Y("hotkey_map_item_seek_backward_description"),value:Y("hotkey_map_item_seek_backward_value")},{description:Y("hotkey_map_item_seek_forward_description"),value:Y("hotkey_map_item_seek_forward_value")},{description:Y("hotkey_map_item_fast_seek_backward_description"),value:Y("hotkey_map_item_fast_seek_backward_value")},{description:Y("hotkey_map_item_fast_seek_forward_description"),value:Y("hotkey_map_item_fast_seek_forward_value")},{description:Y("hotkey_map_item_rate_down_description"),value:Y("hotkey_map_item_rate_down_value")},{description:Y("hotkey_map_item_rate_up_description"),value:Y("hotkey_map_item_rate_up_value")},{description:Y("hotkey_map_item_prev_frame_description"),value:Y("hotkey_map_item_prev_frame_value")},{description:Y("hotkey_map_item_next_frame_description"),value:Y("hotkey_map_item_next_frame_value")},{description:Y("hotkey_map_item_jump_seek_description"),value:Y("hotkey_map_item_jump_seek_value")},{description:Y("hotkey_map_item_next_video_description"),value:Y("hotkey_map_item_next_video_value")},{description:Y("hotkey_map_item_prev_video_description"),value:Y("hotkey_map_item_prev_video_value")}]},{title:Y("hotkey_map_group_title_subtitles"),items:[{description:Y("hotkey_map_item_subtitles_toggle_description"),value:Y("hotkey_map_item_subtitles_toggle_value")}]},{title:Y("hotkey_map_group_title_episodes"),items:[{description:Y("hotkey_map_item_prev_episode_description"),value:x_.device.isApple?Y("hotkey_map_item_prev_episode_mac_value"):Y("hotkey_map_item_prev_episode_pc_value")},{description:Y("hotkey_map_item_next_episode_description"),value:x_.device.isApple?Y("hotkey_map_item_next_episode_mac_value"):Y("hotkey_map_item_next_episode_pc_value")}]}]});import{devNull as S_,now as C_}from"@vkontakte/videoplayer-shared/es2015";function Vf(t,e){B(e,!1);let i=ye();Mt(()=>{i.getAdmanWrapper().startPostroll()}),Zo(),H()}import{noop as O1}from"@vkontakte/videoplayer-shared/es2015";var R1=ke('<path d="M11.74 6.74a.9.9 0 0 1-1.28 0L6 2.27 1.54 6.74A.9.9 0 1 1 .26 5.46l5.1-5.1a.9.9 0 0 1 1.28 0l5.1 5.1a.9.9 0 0 1 0 1.28Z"></path>'),D1=ke('<path d="m5.773 8 3.363 3.364a.9.9 0 1 1-1.272 1.272l-4-4a.9.9 0 0 1 0-1.272l4-4a.9.9 0 0 1 1.272 1.272L5.773 8z"></path>');function Vr(t,e){B(e,!0);let i=g(e,"direction",3,"left"),o=g(e,"useBtnColor",3,!1),r=f(()=>["up","down"].includes(i())),a=f(()=>["right","down"].includes(i())),l=f(()=>`chevron-icon--${i()}`),d=f(()=>(()=>{let m="";return n(a)&&(m+="transform: rotate(180deg);"),m.length?m:void 0})()),s=f(()=>o()?na:"currentColor"),u=f(()=>n(r)?"7":"16");Ze(t,{width:"12",get height(){return n(u)},get fill(){return n(s)},get testId(){return n(l)},get style(){return n(d)},children:(m,p)=>{var v=De(),$=ae(v);{var y=x=>{var I=R1();_(x,I)},b=x=>{var I=D1();_(x,I)};M($,x=>{n(r)?x(y):x(b,!1)})}_(m,v)},$$slots:{default:!0}}),H()}var N1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},B1=L('<div class="skip s-1f"> <!></div>'),H1=L("<div><!></div>"),F1={hash:"s-1f",code:".container.s-1f{background:rgba(0,0,0,.56);border-radius:6px;color:#fff;font-size:13px;padding:6px 10px;position:absolute;right:16px;top:14px;transition:color .2s}.container-mobile.s-1f{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-1f{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-1f{color:var(--white);cursor:pointer}.skippable.s-1f:hover{color:hsla(0,0%,100%,.75)}"};function Rf(t,e){B(e,!0),Q(t,F1);let[i,o]=Be(),r=()=>w(u,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"secondsToWatchBeforeSkip",3,0),d=g(e,"skipAd",3,O1),u=ye().ui.isMobile,m=f(()=>a()>0&&a()>=l());var p=H1();let v;p.__click=[N1,m,d];var $=T(p);{var y=x=>{var I=B1(),C=T(I),R=A(C);Vr(R,{direction:"right"}),S(I),O(k=>he(C,`${k!=null?k:""} `),[()=>Y("skip_ads_now")]),_(x,I)},b=x=>{var I=vs();O(C=>he(I,C),[()=>Y("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),_(x,I)};M($,x=>{n(m)?x(y):x(b,!1)})}S(p),O(x=>v=ie(p,1,"container s-1f",null,v,x),[()=>({"container-mobile":r(),skippable:n(m)})]),_(t,p),H(),o()}et(["click"]);var U1=L('<button class="go-to-site s-1g"> </button>'),z1={hash:"s-1g",code:"button.go-to-site.s-1g{background:#fff;border:none;border-radius:6px;bottom:14px;color:#000;font-size:15px;left:16px;padding:6px 10px;pointer-events:none;position:absolute}"};function Df(t,e){B(e,!1),Q(t,z1),Zo();var i=U1(),o=T(i,!0);S(i),O(r=>he(o,r),[()=>Y("visit_advertiser")],mr),_(t,i),H()}var W1=L('<div class="top-gradient-mobile s-i"></div>'),K1=L('<div class="container s-i"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),q1={hash:"s-i",code:".container.s-i{height:100%;width:100%}.top-gradient-mobile.s-i{background:linear-gradient(1turn,transparent,rgba(0,0,0,.05) 12%,rgba(0,0,0,.15) 25%,rgba(0,0,0,.3) 45%,rgba(0,0,0,.4) 57%,rgba(0,0,0,.5) 77%,rgba(0,0,0,.55) 88%,rgba(0,0,0,.65));height:80px;left:0;pointer-events:none;position:absolute;top:0;width:100%}"};function kd(t,e){B(e,!0),Q(t,q1);let[i,o]=Be(),r=()=>w(U,"$canSkipAd",i),a=()=>w(F,"$adPlaybackState",i),l=()=>w(R,"$isMobile",i),d=()=>w(j,"$adPosition",i),s=()=>w(re,"$secondsToWatchBeforeSkipAd",i),u=()=>w(C,"$isVideoEnded",i),m=g(e,"adsSlotId",3,void 0),p=g(e,"adsParams",3,void 0),v=g(e,"adsAutoplayParam",3,void 0),$=g(e,"duration",3,0),y=g(e,"adsExternalApi",3,void 0),b=g(e,"adsJson",3,void 0),x=ye(),I=Vt(),C=x.state.isEnded$,R=x.ui.isMobile,k=I.ads.isMobileGoToSiteButton,P=K(void 0),E=K(void 0),W=!1,F=x.ads.playbackState,U=x.ads.canSkip,j=x.ads.position,re=x.ads.secondsToWatchBeforeSkip,G=f(()=>r()&&a()!=="inactive"),oe=f(()=>l()&&a()!=="inactive"&&k);Mt(()=>{let Z=x.getAdmanWrapper();if(S_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[C_(),m()]}),!m()){Z.onAdmanLoadingError();return}let N=()=>{var Ee;let{width:Le,height:ze}=$e(x.ui.playerSize),te=$e(x.ui.isFullscreen),ce=(Ee=v())!=null?Ee:$e(x.ui.isAutoplay),we=I.ads.paramsOverride;return{width:Le,height:ze,isFullscreen:te,isAutoplay:ce,adsContainer:n(P),adsVideoElement:n(E),slotId:m(),params:p(),paramsOverride:we,duration:$(),externalApi:y(),json:b()}},pe=Le=>_t(null,null,function*(){Le&&(yield mo());let ze=N();yield Z.initAdman(ze),W=!0}),le=new AbortController,ue=()=>{le.abort()};return window.AdmanHTML?pe(!0).catch(()=>{Z.onAdmanLoadingError()}):Z.loadAdman(le.signal).then(()=>pe(!1)).catch(()=>{Z.onAdmanLoadingError()}),()=>{S_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[C_(),m()]}),!W&&ue()}});var X=K1(),Ie=T(X);{var fe=Z=>{var N=W1();_(Z,N)};M(Ie,Z=>{l()&&Z(fe)})}var ee=A(Ie,2);tt(ee,Z=>D(E,Z),()=>n(E));var be=A(ee,2);{var Ce=Z=>{Rf(Z,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return x.actions.internal.skipAd}})};M(be,Z=>{n(G)&&Z(Ce)})}var de=A(be,2);{var We=Z=>{Vf(Z,{})};M(de,Z=>{u()&&Z(We)})}var ve=A(de,2);{var me=Z=>{Df(Z,{})};M(ve,Z=>{n(oe)&&Z(me)})}S(X),tt(X,Z=>D(P,Z),()=>n(P)),_(t,X),H(),o()}var Jo=t=>{if(!isFinite(t))return"00:00";let e=Math.round(t),i=Math.floor(e/(60*60));e-=i*3600;let o=Math.floor(e/60);e-=o*60;let r=[o,e].map(a=>String(a).padStart(2,"0")).join(":");return i>0&&(r=`${i}:${r}`),r};var Q1=ke('<path fill="#fff"></path>'),G1=ke("<path></path><!>",1);function Ld(t,e){let i=g(e,"isActive",3,!1),o=f(()=>i()?"live-active-icon":"live-icon"),r=f(()=>i()?"var(--timeline-slider-filled-active-live-bg, #FF3347)":void 0),a="M8 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2H9V6a1 1 0 0 0-1-1m7 1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0zm15-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-2h3a1 1 0 1 0 0-2h-3V7h3a1 1 0 1 0 0-2zm-8.32 9.31-2.55-7.82a1 1 0 0 1-.12-.37L19 6.1a1 1 0 1 1 2-.2l2 6.4 2-6.4a1 1 0 0 1 2 .2v.02a1 1 0 0 1-.13.37l-2.55 7.82a1 1 0 0 1-.95.69h-.74a1 1 0 0 1-.95-.69";Ze(t,{width:"42",height:"20",get testId(){return n(o)},get fill(){return n(r)},children:(l,d)=>{var s=G1(),u=ae(s),m=A(u);{var p=v=>{var $=Q1();Oe($,"d",a),_(v,$)};M(m,v=>{i()&&v(p)})}O(()=>Oe(u,"d",`M5 0h32s5 0 5 5v10s0 5 -5 5h-32s-5 0 -5 -5v-10s0 -5 5 -5${i()?"":"M5.5 2h31s3.5 0 3.5 3.5v9s0 3.5-3.5 3.5h-31s-3.5 0-3.5-3.5v-9s0-3.5 3.5-3.5"+a}z`)),_(l,s)},$$slots:{default:!0}})}var Y1=L('<div class="equalizer s-e"><div class="col s-e"></div> <div class="col s-e"></div> <div class="col s-e"></div></div>'),j1=L('<div class="live-icon s-e"><!></div>'),X1=L('<span class="text s-e"> </span>'),Z1=L("<div><!> <!></div>"),J1={hash:"s-e",code:".wrapper.s-e{background-color:var(--black-alpha-40);border-radius:4px;padding:2px 6px;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);white-space:nowrap}.wrapper.live.s-e{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-e{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-e .equalizer:where(.s-e){margin-top:-2px}.equalizer.s-e .col:where(.s-e){animation:1.5s linear infinite alternate;animation-play-state:paused;background:var(--btn-color,--white);bottom:0;height:10px;margin-right:2px;position:absolute;transform-origin:50% 100%;width:2px}.playing.s-e .equalizer:where(.s-e) .col:where(.s-e){animation-play-state:running}.equalizer.s-e .col:where(.s-e):first-child{animation-name:s-e-thumb-timer-equalizer-col1;left:0}.equalizer.s-e .col:where(.s-e):nth-child(2){animation-name:s-e-thumb-timer-equalizer-col2;left:3px}.equalizer.s-e .col:where(.s-e):nth-child(3){animation-name:s-e-thumb-timer-equalizer-col3;left:6px}.live-icon.s-e{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-e-thumb-timer-equalizer-col1{0%{transform:scaleY(.1)}25%{transform:scaleY(.8)}50%{transform:scaleY(.4)}75%{transform:scaleY(.6)}to{transform:scaleY(.1)}}@keyframes s-e-thumb-timer-equalizer-col2{0%{transform:scaleY(1)}25%{transform:scaleY(.3)}50%{transform:scaleY(.9)}75%{transform:scaleY(.6)}to{transform:scaleY(1)}}@keyframes s-e-thumb-timer-equalizer-col3{0%{transform:scaleY(.6)}25%{transform:scaleY(.9)}50%{transform:scaleY(.1)}75%{transform:scaleY(.9)}to{transform:scaleY(.6)}}.text.s-e{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function Md(t,e){Q(t,J1);let i=g(e,"withEqualizer",3,!1),o=g(e,"isLive",3,!1),r=g(e,"isPlaying",3,!1);var a=Z1();let l;var d=T(a);{var s=v=>{var $=Y1();_(v,$)};M(d,v=>{i()&&v(s)})}var u=A(d,2);{var m=v=>{var $=j1(),y=T($);Ld(y,{isActive:!0}),S($),_(v,$)},p=v=>{var $=X1(),y=T($,!0);S($),O(()=>he(y,e.time)),_(v,$)};M(u,v=>{o()?v(m):v(p,!1)})}S(a),O(v=>l=ie(a,1,"wrapper s-e",null,l,v),[()=>({live:o(),playing:r()})]),_(t,a)}var Rl=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var e0=L('<div role="timer" data-testid="thumb-timer"><!></div>'),t0={hash:"s-k",code:".thumb-timer.s-k{bottom:0;margin:8px;position:absolute;right:0;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);z-index:var(--thumb-timer-z-index)}"};function Vd(t,e){B(e,!0),Q(t,t0);let[i,o]=Be(),r=()=>w(m,"$disabled",i),a=g(e,"isHidden",3,!1),l=g(e,"isLive",3,!1),d=g(e,"isPlaying",3,!1),s=Vt(),u=f(()=>Jo(e.duration-e.position)),m=se(!1);var p=e0();let v;var $=T(p);Md($,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(p),Rs(p,()=>Rl(a()&&s.features.usePerformanceFix,m,s.disableInvisibleComponentsTimeout)),O(y=>v=ie(p,1,"thumb-timer s-k",null,v,y),[()=>({"out-of-flow":r(),hidden:a()})]),_(t,p),H(),o()}var Dl=t=>{if(!navigator.clipboard){T_(t);return}navigator.clipboard.writeText(t).catch(()=>T_(t))};function T_(t){if(document.queryCommandSupported&&document.queryCommandSupported("copy")){let e=document.createElement("textarea");e.textContent=t,e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e),e.select();try{document.execCommand("copy")}finally{document.body.removeChild(e)}}}import{ChromecastState as p0,clientChecker as f0}from"@vkontakte/videoplayer-core/es2015";import{clientChecker as I_}from"@vkontakte/videoplayer-core/es2015";var Of="focus-hidden";var Rr=t=>{t.stopPropagation(),t.preventDefault()},Nf=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Of)},o0=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},n0=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},r0=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},s0=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},E_=t=>t.code==="Escape",a0=t=>t.code==="ArrowLeft",Rd=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},P_=t=>{r0(t)?(Rr(t),n0(t.target)):s0(t)&&(Rr(t),o0(t.target))},la=t=>!I_.device.isAndroid&&(t==null?void 0:t.detail)===0||I_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Ol=(t,e,i)=>_t(null,null,function*(){yield mo(),t&&!t.classList.contains("opened")&&!e&&$e(i)&&(yield mo(),i.set(!1),t.focus())}),A_=(t,e,i)=>_t(null,null,function*(){yield mo(),t&&!e&&$e(i)&&(i.set(!1),t.focus())}),Dd=(t,e,i,o=!1)=>_t(null,null,function*(){if(yield mo(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Of,!i),a==null||a.focus()}}),k_=(t,e)=>_t(null,null,function*(){setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)}),Iu=(t,e)=>{P_(t),Nf(t.target),E_(t)&&(Rr(t),e())},Eu=(t,e)=>_t(null,null,function*(){Rd(t,["ArrowRight"])&&(Rr(t),e())}),L_=(t,e,i)=>_t(null,null,function*(){if(P_(t),a0(t)){Rr(t),e();return}E_(t)&&(Rr(t),i())}),Nl=(t,e)=>{Rd(t)&&(Rr(t),e())},M_=(t,e,i)=>{if(Rd(t))Rr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Rr(t);return}o==="ArrowRight"&&!e&&(i(!0),Rr(t))}},V_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},R_=t=>{if(!t)return{top:0,left:0};let e=t.getBoundingClientRect(),i=-58,o=8,r=e.left+o;return{bottom:e.bottom+i,left:r}};import{isNullable as Pu,isValidURL as m0}from"@vkontakte/videoplayer-shared/es2015";var es={"copy-link":100,"copy-link-timestamp":200,"copy-embed-code":300,pip:400,"video-loop":500,rotate:600,report:700,"save-debug":800,"save-trace":900,"debug-info":1e3};import{noop as D_}from"@vkontakte/videoplayer-shared/es2015";var d0=(t,e)=>{Nl(t,()=>e())},c0=L('<li class="item s-1p" role="menuitem" tabindex="0"> </li>'),u0={hash:"s-1p",code:".item.s-1p{color:hsla(0,0%,100%,.72);cursor:pointer;display:block;font-size:13px;letter-spacing:-.14px;line-height:18px;padding:8px 16px;position:relative;white-space:nowrap}.item.s-1p:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function Bf(t,e){B(e,!0),Q(t,u0);let i=g(e,"onClick",3,D_),o=g(e,"closeContextMenu",3,D_),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=c0();a.__click=r,a.__keydown=[d0,r];var l=T(a,!0);S(a),O(()=>{var d;Oe(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Oe(a,"data-testid",e.id),he(l,e.label)}),_(t,a),H()}et(["click","keydown"]);var Na=(t,e)=>t.weight-e.weight;var Od=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Od||{});var v0=(t,e)=>{Iu(t,e)},g0=t=>{t.preventDefault()},h0=L('<ul role="menu" data-testid="context-menu" class="s-1a"></ul>'),_0={hash:"s-1a",code:"ul.s-1a{background:rgba(0,0,0,.72);border-radius:8px;list-style:none;margin:0;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;padding:6px 0;position:absolute;transition:visibility .1s,opacity .1s;z-index:var(--context-menu-z-index)}"};function Hf(t,e){B(e,!0),Q(t,_0);let[i,o]=Be(),r=()=>w(Ie,"$playerPhase",i),a=()=>w(re,"$isLive$",i),l=()=>w(fe,"$isPiPEnabled$",i),d=()=>w(j,"$chromecastState$",i),s=()=>w(ee,"$pictureInPictureApiIsActive$",i),u=()=>w(X,"$isLooped$",i),m=()=>w(G,"$positionExact$",i),p=()=>w(W,"$additionalContextMenuItems$",i),v=g(e,"visible",3,!1),$=g(e,"position",19,()=>({top:0,left:0})),y=g(e,"playerContainerRef",3,void 0),b=g(e,"menuElementRef",15,void 0),x=K(0),I=K(0),C=ye(),{pictureInPicture$:R}=_o(),k=Vt(),P=C.ui.contextMenu.visible$,E=C.ui.debugPanelVisible,W=C.ui.additionalContextMenuItems$,F=C.ui.t,U=C.actions.internal.togglePictureInPicture,j=C.state.chromecastState$,re=C.state.isLive$,G=C.state.positionExact$,oe=C.state.isInteractive,X=C.state.looped$,Ie=C.playerPhase,{isEnabled$:fe,isActive$:ee}=R,be=f(()=>r()==="video"),Ce=f(()=>!!a()&&n(be)),de=f(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),We=f(()=>{var ge;return k.features.copyVideoLink&&((ge=C.callbacks)==null?void 0:ge.onCopyVideoLink)}),ve=f(()=>n(We)&&!n(de)&&!oe&&!n(Ce)),me=f(()=>{var ge;return!!((ge=C.callbacks)!=null&&ge.onCopyEmbedCodeClicked)}),Z=f(()=>l()&&d()!==p0.CONNECTED&&!oe&&n(be)&&!f0.browser.isFirefox),N=f(()=>!oe&&!n(de)&&!n(Ce)),pe=f(()=>k.features.videoRotate&&!oe&&!n(de)),le=f(()=>k.showSupport&&!s()),ue=f(()=>k.features.saveTraceInfoToFile),Le=()=>{var ge;P.set(!1),(ge=e.returnFocus)==null||ge.call(e)},ze=(ge,Ne)=>{if(!b()||!y())return;let Ge=b().getBoundingClientRect(),lt=y().getBoundingClientRect();D(x,ge-lt.left),D(I,Ne-lt.top),n(x)+Ge.width>lt.width&&D(x,lt.width-Ge.width),n(I)+Ge.height>lt.height&&D(I,lt.height-Ge.height),D(x,Math.max(n(x),0),!0),D(I,Math.max(n(I),0),!0)};He(()=>{_t(null,null,function*(){if(b()&&y()){yield mo();let{top:Ne,left:Ge,bottom:lt,right:Qt}=$(),At=Ge!=null?Ge:0,di=Ne!=null?Ne:0,ci=b().getBoundingClientRect();Pu(Ge)&&!Pu(Qt)&&(At=Qt-ci.width),Pu(Ne)&&!Pu(lt)&&(di=lt-ci.height),At=Math.max(At,0),di=Math.max(di,0),ze(At,di)}})});let te=()=>{C.actions.internal.videoRotate()},ce=()=>{m0(e.supportLink)&&window.open(e.supportLink,"_blank"),C.actions.internal.reportProblem(),C.actions.internal.pause()},we=()=>{let ge=C.actions.internal.getDebugTextData();if(k.features.saveDebugInfoToFile){let Ne=new Blob([...ge],{type:"plain/text"}),Ge=window.URL.createObjectURL(Ne);Da(Ge,"vk_player_debug_info","txt")}else Dl(C.actions.internal.getDebugTextData())},Ee=()=>{let ge=C.actions.internal.getTraceTextData(),Ne=new Blob([...ge],{type:"application/json"}),Ge=window.URL.createObjectURL(Ne);Da(Ge,"vk_player_trace_info","json")},Ye=()=>{E.set(!0)},Ae=()=>_t(null,null,function*(){var ge;try{U()}finally{(ge=e.returnFocus)==null||ge.call(e)}}),Te=()=>{C.actions.internal.setLooped(!u())},Fe=()=>{var ge,Ne;if(n(me)){let Ge=(Ne=(ge=C.callbacks)==null?void 0:ge.onCopyEmbedCodeClicked)==null?void 0:Ne.call(ge);Ge&&Dl(Ge)}},ht=(ge=!1)=>{var Ne,Ge;if((Ne=C.callbacks)!=null&&Ne.onCopyVideoLink){let lt=(Ge=C.callbacks)==null?void 0:Ge.onCopyVideoLink(ge,m());lt&&Dl(lt)}},Rt=f(()=>k.features.saveDebugInfoToFile?F("menu_save_debug"):F("menu_copy_debug")),It=f(()=>n(We)?{id:"copy-link",weight:es["copy-link"],label:F("menu_copy_video_link"),onClick:()=>ht()}:void 0),ct=f(()=>n(ve)?{id:"copy-link-timestamp",weight:es["copy-link-timestamp"],label:F("menu_copy_video_link_with_timestamp"),onClick:()=>ht(!0)}:void 0),Tt=f(()=>n(me)?{id:"copy-embed-code",weight:es["copy-embed-code"],label:F("menu_copy_embed_code"),onClick:Fe}:void 0),Yt=f(()=>n(Z)?{id:"pip",weight:es.pip,label:s()?F("menu_pip_close"):F("menu_pip"),onClick:Ae}:void 0),Ht=f(()=>n(N)?{id:"video-loop",weight:es["video-loop"],label:u()?F("menu_video_loop_off"):F("menu_video_loop_on"),ariaLabel:F("aria_label_menu_loop"),onClick:Te}:void 0),Ot=f(()=>n(pe)?{id:"rotate",weight:es.rotate,label:F("menu_video_rotate"),ariaLabel:F("aria_label_menu_rotate"),onClick:te}:void 0),Wt=f(()=>n(le)?{id:"report",weight:es.report,label:F("menu_report"),ariaLabel:`${F("menu_report")}. ${F("aria_label_new_tab_alert")}`,onClick:ce}:void 0),q=f(()=>({id:"save-debug",weight:es["save-debug"],label:n(Rt),onClick:we})),Me=f(()=>n(ue)?{id:"save-trace",weight:es["save-trace"],label:F("menu_save_debug"),onClick:Ee}:void 0),Ve=f(()=>({id:"debug-info",weight:es["debug-info"],label:F("menu_debug_overlay"),ariaLabel:F("aria_label_menu_debug_overlay"),onClick:Ye})),xe=f(()=>[n(It),n(ct),n(Tt),n(Yt),n(Ht),n(Ot),n(Wt),n(q),n(Me),n(Ve),...p()].filter(ge=>!!ge).sort(Na));var Ue=De(),Se=ae(Ue);{var Ct=ge=>{var Ne=h0();Ne.__contextmenu=[g0],Ne.__keydown=[v0,Le],yi(Ne,21,()=>n(xe),Ge=>Ge.id,(Ge,lt)=>{Bf(Ge,{get id(){return n(lt).id},get label(){return n(lt).label},get ariaLabel(){return n(lt).ariaLabel},get onClick(){return n(lt).onClick},closeContextMenu:Le})}),S(Ne),tt(Ne,Ge=>b(Ge),()=>b()),O(()=>{var Ge,lt;return Ke(Ne,`top: ${(Ge=n(I))!=null?Ge:""}px; left: ${(lt=n(x))!=null?lt:""}px;`)}),_(ge,Ne)};M(Se,ge=>{v()&&ge(Ct)})}_(t,Ue),H(),o()}et(["contextmenu","keydown"]);var Au=class{constructor(e){this.value=e,this.next=null}};var Bl=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Au(e);this.top?(this.top.next=i,this.top=i):(this.top=i,this.bottom=i),this.size++,this.size>this.maxSize&&this.bottom&&(this.bottom=this.bottom.next)}getValuesFromBottom(){let e=[],i=this.bottom;for(;i;)e.push(i.value),i=i.next;return e}};var b0=L('<div class="container s-14"><canvas class="s-14"></canvas></div>'),$0={hash:"s-14",code:".container.s-14{display:inline-block;height:16px;width:120px}canvas.s-14{margin-top:2px;transform:scaleY(-1)}"};function Nd(t,e){B(e,!0),Q(t,$0);let i=g(e,"values",19,()=>[]),o=K(void 0),r=K(null),a=16,l=120,d=60,s=l/d;Mt(()=>{n(o).width=l,n(o).height=a,D(r,n(o).getContext("2d"),!0)});function u(v,$,y,b,x){x===0&&(x=1),v.fillStyle="#fff",v.fillRect($,y,b,x)}He(()=>{let v="";if(n(r)){let $=i()[0];for(let b=1;b<i().length;b++)i()[b]>$&&($=i()[b]);n(r).clearRect(0,0,l,a);let y=d-1;for(let b=i().length-1;b>=0;b--){let x=y*s,I=$>0?a*(i()[b]/$):0;u(n(r),x,0,s,I),v=I+" "+v,y--}}});var m=b0(),p=T(m);tt(p,v=>D(o,v),()=>n(o)),S(m),_(t,m),H()}import{safeStorage as O_}from"@vkontakte/videoplayer-shared/es2015";var y0=(t,e)=>{t.stopPropagation(),O_.remove(Sd),e.set(!1)},x0=L('<div class="s-m"><div class="s-m">Video id</div> <span> </span></div>'),w0=L('<div class="s-m"><div class="s-m">VSID</div> <span> </span></div>'),S0=L('<div class="s-m"><div class="s-m">Provider</div> <span> </span></div>'),C0=L('<div class="s-m"><div class="s-m">Streams</div> <span> </span></div>'),T0=L('<div class="s-m"><div class="s-m">Viewport</div> <span> </span></div>'),I0=L('<div class="s-m"><div class="s-m">Video size</div> <span> </span></div>'),E0=L('<div class="s-m"><div class="s-m">CDN host</div> <span> </span></div>'),P0=L('<div class="s-m"><div class="s-m">Volume</div> <span> </span></div>'),A0=L('<div class="s-m"><div class="s-m">Position</div> <span> </span></div>'),k0=L('<div class="s-m"><div class="s-m">Buffer</div> <span> </span></div>'),L0=L('<div class="s-m"><div class="s-m">Nbuffer</div> <span> </span></div>'),M0=L('<div class="s-m"><div class="s-m">Live latency</div> <span> </span></div>'),V0=L('<div class="s-m"><div class="s-m">Segment</div> <span> </span></div>'),R0=L('<div class="s-m"><div class="s-m">Network</div> <!> <span> </span></div>'),D0=L('<div class="s-m"><div class="s-m">V bitrate</div> <!> <span> </span></div>'),O0=L('<div role="region"><button class="close s-m" title="закрыть">[x]</button> <div class="content s-m"><div class="s-m"><div class="s-m">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-m"><div class="s-m">Dropped</div> <span> </span></div> <!> <!> <div class="s-m"><div class="s-m">FPS</div> <!> <span> </span></div></div></div>'),N0={hash:"s-m",code:".container.s-m{background:rgba(28,28,28,.8);border-radius:4px;color:#fff;font-size:10px;left:20px;min-width:160px;position:absolute;text-align:left;top:45px;user-select:text;z-index:var(--debug-panel-z-index)}.container-mobile.s-m{left:16px;top:16px}button.close.s-m{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-m{padding:5px}.content.s-m>div:where(.s-m)>div:where(.s-m){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Bd(t,e){B(e,!0),Q(t,N0);let[i,o]=Be(),r=()=>w(d,"$isMobile",i),a=ye(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=K(li(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),m=K(0),p=K(0),v=K(0),$=new Bl(60),y=new Bl(60),b=new Bl(60),x=K(li([])),I=K(li([])),C=K(li([])),R=Y("aria_label_debug_panel");Mt(()=>{O_.set(Sd,"true"),a.actions.internal.startLogging(),u&&(D(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),D(m,u.getVideoPlaybackQuality().totalVideoFrames,!0));let q=window.setInterval(()=>{D(s,a.actions.internal.getDebugPanelData(),!0)},500),Me;return u&&(Me=window.setInterval(()=>{if(u){D(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let Ve=u.getVideoPlaybackQuality().totalVideoFrames;D(v,Ve-n(m)),D(m,Ve,!0),$.push(n(v)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&b.push(n(s).bitrate),D(x,$.getValuesFromBottom(),!0),D(I,y.getValuesFromBottom(),!0),D(C,b.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(q),Me&&clearInterval(Me)}});var k=O0();let P;var E=T(k);E.__click=[y0,l];var W=A(E,2),F=T(W),U=A(T(F),2),j=T(U,!0);S(U),S(F);var re=A(F,2);{var G=q=>{var Me=x0(),Ve=A(T(Me),2),xe=T(Ve,!0);S(Ve),S(Me),O(()=>he(xe,n(s).id)),_(q,Me)};M(re,q=>{n(s).id&&q(G)})}var oe=A(re,2);{var X=q=>{var Me=w0(),Ve=A(T(Me),2),xe=T(Ve,!0);S(Ve),S(Me),O(()=>he(xe,n(s).vsid)),_(q,Me)};M(oe,q=>{n(s).vsid&&q(X)})}var Ie=A(oe,2);{var fe=q=>{var Me=S0(),Ve=A(T(Me),2),xe=T(Ve,!0);S(Ve),S(Me),O(()=>he(xe,n(s).provider)),_(q,Me)};M(Ie,q=>{n(s).provider&&q(fe)})}var ee=A(Ie,2);{var be=q=>{var Me=C0(),Ve=A(T(Me),2),xe=T(Ve);S(Ve),S(Me),O(()=>{var Ue,Se;return he(xe,`Video: ${(Ue=n(s).videoCodec||"")!=null?Ue:""} ${n(s).hdr?"(HDR)":""}
|
|
54
|
+
Try switching the quality to Auto.`,double_forward_label:"2x",preview_track_notification_text:"pull up to open precise rewind",preview_track_close_tooltip:"dismiss precise rewind"},y_=H1;var Bs=new Map;Bs.set(w_.EN,y_);Bs.set(w_.RU,$_);var S_=new Map,Rf=({language:t,pack:e,fallback:i})=>{if(Bs.has(t)){let o=Bs.get(t);Bs.set(t,Ye(Ye({},o),e))}else Bs.set(t,e);S_.set(t,i)},Df=t=>Bs.has(t),Of=(t,e,i,o)=>{var l;let s=Bs.get(t),a=s==null?void 0:s[e];if(x_(a)){let d=(l=S_.get(t))!=null?l:o,r=d?Bs.get(d):void 0;a=r==null?void 0:r[e]}return x_(a)?e+Object.values(i!=null?i:{}).join(" "):i?a.replaceAll(/{(\w+?)}/g,(d,r)=>{var u;return(u=i[r])!=null?u:""}):a},q=(t,e)=>{let{interfaceLanguage$:i}=xe(),o=_e(i),s=Lt();return Of(o,t,e,s.defaultLanguage)};var F1=Ae('<path d="M26.86 15.18a3.7 3.7 0 0 0 2.53-3.6C29.4 8.91 27.2 7 24.07 7c-1.96 0-3.57.78-4.67 2.29l-.1.15a1.33 1.33 0 0 0 .26 1.85c.54.4 1.3.35 1.74-.16l.2-.25a3 3 0 0 1 2.5-1.3c1.53 0 2.6.91 2.6 2.25 0 1.36-1.09 2.27-2.65 2.27h-.58a1.23 1.23 0 0 0 0 2.47h.58c1.75 0 2.91.98 2.91 2.39 0 1.45-1.19 2.46-2.88 2.46a3.2 3.2 0 0 1-2.89-1.6l-.2-.29a1.4 1.4 0 0 0-2.05-.25 1.3 1.3 0 0 0-.3 1.68l.21.33A6 6 0 0 0 24 24c3.28 0 5.63-2.04 5.63-4.92a4 4 0 0 0-2.77-3.9M37.73 12.68c-.46 0-1 .04-1.5.16L38.8 9.1a1.34 1.34 0 1 0-2.2-1.52l-3.76 5.47C31.43 15.18 31 16.87 31 18.33 31 21.8 33.56 24 37.19 24c3.6 0 6.16-2.4 6.16-5.77a5.4 5.4 0 0 0-5.63-5.56m-.53 8.74c-1.98 0-3.33-1.27-3.33-3.14 0-1.85 1.35-3.14 3.33-3.14 1.95 0 3.3 1.29 3.3 3.14 0 1.87-1.35 3.14-3.3 3.14m20.8-5.9c0 5.03-2.7 8.43-6.63 8.43s-6.62-3.4-6.62-8.44 2.7-8.44 6.62-8.44S58 10.47 58 15.51m-10.35 0c0 3.56 1.49 5.85 3.72 5.85s3.72-2.3 3.72-5.86-1.48-5.86-3.72-5.86c-2.23 0-3.72 2.3-3.72 5.86M67 9.49A3.5 3.5 0 0 1 63.51 13 3.5 3.5 0 0 1 60 9.49 3.5 3.5 0 0 1 63.51 6 3.5 3.5 0 0 1 67 9.49m-5 0c0 .83.68 1.51 1.51 1.51.81 0 1.5-.68 1.5-1.51 0-.81-.69-1.5-1.5-1.5-.83 0-1.51.69-1.51 1.5ZM67 23.5c0-1.32-1.2-3.1-4.2-4.67a1.5 1.5 0 1 1 1.4-2.66c3.25 1.72 5.8 4.26 5.8 7.33 0 3.13-2.56 5.55-6.09 7.27-3.63 1.77-8.82 3.06-15.26 3.72a1.5 1.5 0 0 1-.3-2.98c6.25-.64 11.05-1.88 14.25-3.44 3.3-1.6 4.4-3.27 4.4-4.57M38.88 35H38c-9.64 0-17.45-1.13-22.9-3.02-2.72-.94-4.94-2.1-6.5-3.47C7.01 27.14 6 25.44 6 23.5a6.2 6.2 0 0 1 1.9-4.25 16 16 0 0 1 4.43-3.1 1.5 1.5 0 1 1 1.34 2.7q-2.39 1.19-3.59 2.46C9.3 22.14 9 22.87 9 23.5c0 .8.4 1.74 1.57 2.76s3 2.01 5.51 2.89C21.11 30.89 28.55 32 38 32h.88l-1.44-1.44a1.5 1.5 0 0 1 2.12-2.12l4 4h.01a1.5 1.5 0 0 1 .32 1.63 2 2 0 0 1-.33.5l-4 4a1.5 1.5 0 0 1-2.12-2.13z"></path>');function Dd(t,e){B(e,!1);let i=q("video360");Yo(),je(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,s)=>{var a=F1();$(o,a)},$$slots:{default:!0}}),H()}import"@vkontakte/videoplayer-core/es2015";var xs=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(xs||{});var Iu=t=>{if(t.requestFullscreen)return t.requestFullscreen();if(t.msRequestFullscreen)return t.msRequestFullscreen();if(t.webkitRequestFullscreen)return t.webkitRequestFullscreen();if(t.mozRequestFullScreen)return t.mozRequestFullScreen();let e=t.querySelector("video");return e!=null&&e.webkitEnterFullscreen?(e.webkitEnterFullscreen(),Promise.resolve()):Promise.reject()},Eu=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),C_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,T_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Od=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},da=()=>!!Od(),Pu=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},Au=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},I_=t=>{let e=window.screen;return(s=>bt(null,null,function*(){return e.orientation?e.orientation.lock(s):e.mozLockOrientation?e.mozLockOrientation(s):e.msLockOrientation?e.msLockOrientation(s):Promise.reject()}))(((s={width:0,height:0})=>s.width<=s.height?"portrait":"landscape")(t))};import{clientChecker as E_}from"@vkontakte/videoplayer-core/es2015";var P_=()=>({title:q("hotkey_map_modal_title"),closeBtnText:q("hotkey_map_modal_close_btn_text"),groups:[{title:q("hotkey_map_group_title_common"),items:[{description:q("hotkey_map_item_mute_description"),value:q("hotkey_map_item_mute_value")},{description:q("hotkey_map_item_volume_up_description"),value:q("hotkey_map_item_volume_up_value")},{description:q("hotkey_map_item_volume_down_description"),value:q("hotkey_map_item_volume_down_value")},{description:q("hotkey_map_item_pip_description"),value:q("hotkey_map_item_pip_value")},{description:q("hotkey_map_item_full_screen_description"),value:q("hotkey_map_item_full_screen_value")},{description:q("hotkey_map_item_show_context_menu_description"),value:q("hotkey_map_item_show_context_menu_value")},{description:q("hotkey_map_item_show_hotkey_map_description"),value:q("hotkey_map_item_show_hotkey_map_value")}]},{title:q("hotkey_map_group_title_playback"),items:[{description:q("hotkey_map_item_play_toggle_description"),value:q("hotkey_map_item_play_toggle_value")},{description:q("hotkey_map_item_seek_backward_description"),value:q("hotkey_map_item_seek_backward_value")},{description:q("hotkey_map_item_seek_forward_description"),value:q("hotkey_map_item_seek_forward_value")},{description:q("hotkey_map_item_fast_seek_backward_description"),value:q("hotkey_map_item_fast_seek_backward_value")},{description:q("hotkey_map_item_fast_seek_forward_description"),value:q("hotkey_map_item_fast_seek_forward_value")},{description:q("hotkey_map_item_rate_down_description"),value:q("hotkey_map_item_rate_down_value")},{description:q("hotkey_map_item_rate_up_description"),value:q("hotkey_map_item_rate_up_value")},{description:q("hotkey_map_item_prev_frame_description"),value:q("hotkey_map_item_prev_frame_value")},{description:q("hotkey_map_item_next_frame_description"),value:q("hotkey_map_item_next_frame_value")},{description:q("hotkey_map_item_jump_seek_description"),value:q("hotkey_map_item_jump_seek_value")},{description:q("hotkey_map_item_next_video_description"),value:q("hotkey_map_item_next_video_value")},{description:q("hotkey_map_item_prev_video_description"),value:q("hotkey_map_item_prev_video_value")}]},{title:q("hotkey_map_group_title_subtitles"),items:[{description:q("hotkey_map_item_subtitles_toggle_description"),value:q("hotkey_map_item_subtitles_toggle_value")}]},{title:q("hotkey_map_group_title_episodes"),items:[{description:q("hotkey_map_item_prev_episode_description"),value:E_.device.isApple?q("hotkey_map_item_prev_episode_mac_value"):q("hotkey_map_item_prev_episode_pc_value")},{description:q("hotkey_map_item_next_episode_description"),value:E_.device.isApple?q("hotkey_map_item_next_episode_mac_value"):q("hotkey_map_item_next_episode_pc_value")}]}]});import{devNull as A_,now as k_}from"@vkontakte/videoplayer-shared/es2015";function Nf(t,e){B(e,!1);let i=xe();kt(()=>{i.getAdmanWrapper().startPostroll()}),Yo(),H()}import{noop as W1}from"@vkontakte/videoplayer-shared/es2015";var U1=Ae('<path d="M11.74 6.74a.9.9 0 0 1-1.28 0L6 2.27 1.54 6.74A.9.9 0 1 1 .26 5.46l5.1-5.1a.9.9 0 0 1 1.28 0l5.1 5.1a.9.9 0 0 1 0 1.28Z"></path>'),z1=Ae('<path d="m5.773 8 3.363 3.364a.9.9 0 1 1-1.272 1.272l-4-4a.9.9 0 0 1 0-1.272l4-4a.9.9 0 0 1 1.272 1.272L5.773 8z"></path>');function Or(t,e){B(e,!0);let i=g(e,"direction",3,"left"),o=g(e,"useBtnColor",3,!1),s=m(()=>["up","down"].includes(i())),a=m(()=>["right","down"].includes(i())),l=m(()=>`chevron-icon--${i()}`),d=m(()=>(()=>{let p="";return n(a)&&(p+="transform: rotate(180deg);"),p.length?p:void 0})()),r=m(()=>o()?la:"currentColor"),u=m(()=>n(s)?"7":"16");je(t,{width:"12",get height(){return n(u)},get fill(){return n(r)},get testId(){return n(l)},get style(){return n(d)},children:(p,f)=>{var v=Ve(),b=le(v);{var y=w=>{var I=U1();$(w,I)},_=w=>{var I=z1();$(w,I)};M(b,w=>{n(s)?w(y):w(_,!1)})}$(p,v)},$$slots:{default:!0}}),H()}var K1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},Q1=L('<div class="skip s-14"> <!></div>'),q1=L("<div><!></div>"),G1={hash:"s-14",code:".container.s-14{background:rgba(0,0,0,.56);border-radius:6px;color:#fff;font-size:13px;padding:6px 10px;position:absolute;right:16px;top:14px;transition:color .2s}.container-mobile.s-14{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-14{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-14{color:var(--white);cursor:pointer}.skippable.s-14:hover{color:hsla(0,0%,100%,.75)}"};function Bf(t,e){B(e,!0),Q(t,G1);let[i,o]=Be(),s=()=>x(u,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"secondsToWatchBeforeSkip",3,0),d=g(e,"skipAd",3,W1),u=xe().ui.isMobile,p=m(()=>a()>0&&a()>=l());var f=q1();let v;f.__click=[K1,p,d];var b=C(f);{var y=w=>{var I=Q1(),T=C(I),R=A(T);Or(R,{direction:"right"}),S(I),O(k=>he(T,`${k!=null?k:""} `),[()=>q("skip_ads_now")]),$(w,I)},_=w=>{var I=bs();O(T=>he(I,T),[()=>q("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),$(w,I)};M(b,w=>{n(p)?w(y):w(_,!1)})}S(f),O(w=>v=te(f,1,"container s-14",null,v,w),[()=>({"container-mobile":s(),skippable:n(p)})]),$(t,f),H(),o()}Ze(["click"]);var Y1=L('<button class="go-to-site s-17"> </button>'),j1={hash:"s-17",code:"button.go-to-site.s-17{background:#fff;border:none;border-radius:6px;bottom:14px;color:#000;font-size:15px;left:16px;padding:6px 10px;pointer-events:none;position:absolute}"};function Hf(t,e){B(e,!1),Q(t,j1),Yo();var i=Y1(),o=C(i,!0);S(i),O(s=>he(o,s),[()=>q("visit_advertiser")],hr),$(t,i),H()}var X1=L('<div class="top-gradient-mobile s-r"></div>'),Z1=L('<div class="container s-r"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),J1={hash:"s-r",code:".container.s-r{height:100%;width:100%}.top-gradient-mobile.s-r{background:linear-gradient(1turn,transparent,rgba(0,0,0,.05) 12%,rgba(0,0,0,.15) 25%,rgba(0,0,0,.3) 45%,rgba(0,0,0,.4) 57%,rgba(0,0,0,.5) 77%,rgba(0,0,0,.55) 88%,rgba(0,0,0,.65));height:80px;left:0;pointer-events:none;position:absolute;top:0;width:100%}"};function Nd(t,e){B(e,!0),Q(t,J1);let[i,o]=Be(),s=()=>x(z,"$canSkipAd",i),a=()=>x(U,"$adPlaybackState",i),l=()=>x(R,"$isMobile",i),d=()=>x(Y,"$adPosition",i),r=()=>x(ie,"$secondsToWatchBeforeSkipAd",i),u=()=>x(T,"$isVideoEnded",i),p=g(e,"adsSlotId",3,void 0),f=g(e,"adsParams",3,void 0),v=g(e,"adsAutoplayParam",3,void 0),b=g(e,"duration",3,0),y=g(e,"adsExternalApi",3,void 0),_=g(e,"adsJson",3,void 0),w=xe(),I=Lt(),T=w.state.isEnded$,R=w.ui.isMobile,k=I.ads.isMobileGoToSiteButton,P=K(void 0),E=K(void 0),W=!1,U=w.ads.playbackState,z=w.ads.canSkip,Y=w.ads.position,ie=w.ads.secondsToWatchBeforeSkip,J=m(()=>s()&&a()!=="inactive"),oe=m(()=>l()&&a()!=="inactive"&&k);kt(()=>{let X=w.getAdmanWrapper();if(A_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[k_(),p()]}),!p()){X.onAdmanLoadingError();return}let N=()=>{var Le;let{width:Je,height:ke}=_e(w.ui.playerSize),j=_e(w.ui.isFullscreen),ne=(Le=v())!=null?Le:_e(w.ui.isAutoplay),Se=I.ads.paramsOverride;return{width:Je,height:ke,isFullscreen:j,isAutoplay:ne,adsContainer:n(P),adsVideoElement:n(E),slotId:p(),params:f(),paramsOverride:Se,duration:b(),externalApi:y(),json:_()}},me=Je=>bt(null,null,function*(){Je&&(yield mo());let ke=N();yield X.initAdman(ke),W=!0}),ue=new AbortController,Re=()=>{ue.abort()};return window.AdmanHTML?me(!0).catch(()=>{X.onAdmanLoadingError()}):X.loadAdman(ue.signal).then(()=>me(!1)).catch(()=>{X.onAdmanLoadingError()}),()=>{A_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[k_(),p()]}),!W&&Re()}});var de=Z1(),ae=C(de);{var pe=X=>{var N=X1();$(X,N)};M(ae,X=>{l()&&X(pe)})}var ee=A(ae,2);it(ee,X=>D(E,X),()=>n(E));var $e=A(ee,2);{var Ee=X=>{Bf(X,{get position(){return d()},get secondsToWatchBeforeSkip(){return r()},get skipAd(){return w.actions.internal.skipAd}})};M($e,X=>{n(J)&&X(Ee)})}var ce=A($e,2);{var Qe=X=>{Nf(X,{})};M(ce,X=>{u()&&X(Qe)})}var fe=A(ce,2);{var ve=X=>{Hf(X,{})};M(fe,X=>{n(oe)&&X(ve)})}S(de),it(de,X=>D(P,X),()=>n(P)),$(t,de),H(),o()}var jo=t=>{if(!isFinite(t))return"00:00";let e=Math.round(t),i=Math.floor(e/(60*60));e-=i*3600;let o=Math.floor(e/60);e-=o*60;let s=[o,e].map(a=>String(a).padStart(2,"0")).join(":");return i>0&&(s=`${i}:${s}`),s};var e0=Ae('<path fill="#fff"></path>'),t0=Ae("<path></path><!>",1);function Bd(t,e){let i=g(e,"isActive",3,!1),o=m(()=>i()?"live-active-icon":"live-icon"),s=m(()=>i()?"var(--timeline-slider-filled-active-live-bg, #FF3347)":void 0),a="M8 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2H9V6a1 1 0 0 0-1-1m7 1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0zm15-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-2h3a1 1 0 1 0 0-2h-3V7h3a1 1 0 1 0 0-2zm-8.32 9.31-2.55-7.82a1 1 0 0 1-.12-.37L19 6.1a1 1 0 1 1 2-.2l2 6.4 2-6.4a1 1 0 0 1 2 .2v.02a1 1 0 0 1-.13.37l-2.55 7.82a1 1 0 0 1-.95.69h-.74a1 1 0 0 1-.95-.69";je(t,{width:"42",height:"20",get testId(){return n(o)},get fill(){return n(s)},children:(l,d)=>{var r=t0(),u=le(r),p=A(u);{var f=v=>{var b=e0();De(b,"d",a),$(v,b)};M(p,v=>{i()&&v(f)})}O(()=>De(u,"d",`M5 0h32s5 0 5 5v10s0 5 -5 5h-32s-5 0 -5 -5v-10s0 -5 5 -5${i()?"":"M5.5 2h31s3.5 0 3.5 3.5v9s0 3.5-3.5 3.5h-31s-3.5 0-3.5-3.5v-9s0-3.5 3.5-3.5"+a}z`)),$(l,r)},$$slots:{default:!0}})}var i0=L('<div class="equalizer s-b"><div class="col s-b"></div> <div class="col s-b"></div> <div class="col s-b"></div></div>'),o0=L('<div class="live-icon s-b"><!></div>'),n0=L('<span class="text s-b"> </span>'),r0=L("<div><!> <!></div>"),s0={hash:"s-b",code:".wrapper.s-b{background-color:var(--black-alpha-40);border-radius:4px;padding:2px 6px;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);white-space:nowrap}.wrapper.live.s-b{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-b{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-b .equalizer:where(.s-b){margin-top:-2px}.equalizer.s-b .col:where(.s-b){animation:1.5s linear infinite alternate;animation-play-state:paused;background:var(--btn-color,--white);bottom:0;height:10px;margin-right:2px;position:absolute;transform-origin:50% 100%;width:2px}.playing.s-b .equalizer:where(.s-b) .col:where(.s-b){animation-play-state:running}.equalizer.s-b .col:where(.s-b):first-child{animation-name:s-b-thumb-timer-equalizer-col1;left:0}.equalizer.s-b .col:where(.s-b):nth-child(2){animation-name:s-b-thumb-timer-equalizer-col2;left:3px}.equalizer.s-b .col:where(.s-b):nth-child(3){animation-name:s-b-thumb-timer-equalizer-col3;left:6px}.live-icon.s-b{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-b-thumb-timer-equalizer-col1{0%{transform:scaleY(.1)}25%{transform:scaleY(.8)}50%{transform:scaleY(.4)}75%{transform:scaleY(.6)}to{transform:scaleY(.1)}}@keyframes s-b-thumb-timer-equalizer-col2{0%{transform:scaleY(1)}25%{transform:scaleY(.3)}50%{transform:scaleY(.9)}75%{transform:scaleY(.6)}to{transform:scaleY(1)}}@keyframes s-b-thumb-timer-equalizer-col3{0%{transform:scaleY(.6)}25%{transform:scaleY(.9)}50%{transform:scaleY(.1)}75%{transform:scaleY(.9)}to{transform:scaleY(.6)}}.text.s-b{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function Hd(t,e){Q(t,s0);let i=g(e,"withEqualizer",3,!1),o=g(e,"isLive",3,!1),s=g(e,"isPlaying",3,!1);var a=r0();let l;var d=C(a);{var r=v=>{var b=i0();$(v,b)};M(d,v=>{i()&&v(r)})}var u=A(d,2);{var p=v=>{var b=o0(),y=C(b);Bd(y,{isActive:!0}),S(b),$(v,b)},f=v=>{var b=n0(),y=C(b,!0);S(b),O(()=>he(y,e.time)),$(v,b)};M(u,v=>{o()?v(p):v(f,!1)})}S(a),O(v=>l=te(a,1,"wrapper s-b",null,l,v),[()=>({live:o(),playing:s()})]),$(t,a)}var Ol=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var a0=L('<div role="timer" data-testid="thumb-timer"><!></div>'),l0={hash:"s-q",code:".thumb-timer.s-q{bottom:0;margin:8px;position:absolute;right:0;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);z-index:var(--thumb-timer-z-index)}"};function Fd(t,e){B(e,!0),Q(t,l0);let[i,o]=Be(),s=()=>x(p,"$disabled",i),a=g(e,"isHidden",3,!1),l=g(e,"isLive",3,!1),d=g(e,"isPlaying",3,!1),r=Lt(),u=m(()=>jo(e.duration-e.position)),p=se(!1);var f=a0();let v;var b=C(f);Hd(b,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(f),Os(f,()=>Ol(a()&&r.features.usePerformanceFix,p,r.disableInvisibleComponentsTimeout)),O(y=>v=te(f,1,"thumb-timer s-q",null,v,y),[()=>({"out-of-flow":s(),hidden:a()})]),$(t,f),H(),o()}var Nl=t=>{if(!navigator.clipboard){L_(t);return}navigator.clipboard.writeText(t).catch(()=>L_(t))};function L_(t){if(document.queryCommandSupported&&document.queryCommandSupported("copy")){let e=document.createElement("textarea");e.textContent=t,e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e),e.select();try{document.execCommand("copy")}finally{document.body.removeChild(e)}}}import{ChromecastState as b0,clientChecker as $0}from"@vkontakte/videoplayer-core/es2015";import{clientChecker as M_}from"@vkontakte/videoplayer-core/es2015";var Ff="focus-hidden";var Nr=t=>{t.stopPropagation(),t.preventDefault()},Uf=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Ff)},c0=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},u0=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},p0=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},f0=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},V_=t=>t.code==="Escape",m0=t=>t.code==="ArrowLeft",Ud=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},R_=t=>{p0(t)?(Nr(t),u0(t.target)):f0(t)&&(Nr(t),c0(t.target))},pa=t=>!M_.device.isAndroid&&(t==null?void 0:t.detail)===0||M_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Bl=(t,e,i)=>bt(null,null,function*(){yield mo(),t&&!t.classList.contains("opened")&&!e&&_e(i)&&(yield mo(),i.set(!1),t.focus())}),D_=(t,e,i)=>bt(null,null,function*(){yield mo(),t&&!e&&_e(i)&&(i.set(!1),t.focus())}),zd=(t,e,i,o=!1)=>bt(null,null,function*(){if(yield mo(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Ff,!i),a==null||a.focus()}}),O_=(t,e)=>bt(null,null,function*(){setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)}),ku=(t,e)=>{R_(t),Uf(t.target),V_(t)&&(Nr(t),e())},Lu=(t,e)=>bt(null,null,function*(){Ud(t,["ArrowRight"])&&(Nr(t),e())}),N_=(t,e,i)=>bt(null,null,function*(){if(R_(t),m0(t)){Nr(t),e();return}V_(t)&&(Nr(t),i())}),Hl=(t,e)=>{Ud(t)&&(Nr(t),e())},B_=(t,e,i)=>{if(Ud(t))Nr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Nr(t);return}o==="ArrowRight"&&!e&&(i(!0),Nr(t))}},H_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,s=e.top+i;return{right:o,bottom:s}},F_=t=>{if(!t)return{top:0,left:0};let e=t.getBoundingClientRect(),i=-58,o=8,s=e.left+o;return{bottom:e.bottom+i,left:s}};import{isNullable as Mu,isValidURL as y0}from"@vkontakte/videoplayer-shared/es2015";var ns={"copy-link":100,"copy-link-timestamp":200,"copy-embed-code":300,pip:400,"video-loop":500,rotate:600,report:700,"save-debug":800,"save-trace":900,"debug-info":1e3};import{noop as U_}from"@vkontakte/videoplayer-shared/es2015";var g0=(t,e)=>{Hl(t,()=>e())},h0=L('<li class="item s-1s" role="menuitem" tabindex="0"> </li>'),_0={hash:"s-1s",code:".item.s-1s{color:hsla(0,0%,100%,.72);cursor:pointer;display:block;font-size:13px;letter-spacing:-.14px;line-height:18px;padding:8px 16px;position:relative;white-space:nowrap}.item.s-1s:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function zf(t,e){B(e,!0),Q(t,_0);let i=g(e,"onClick",3,U_),o=g(e,"closeContextMenu",3,U_),s=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=h0();a.__click=s,a.__keydown=[g0,s];var l=C(a,!0);S(a),O(()=>{var d;De(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),De(a,"data-testid",e.id),he(l,e.label)}),$(t,a),H()}Ze(["click","keydown"]);var Fa=(t,e)=>t.weight-e.weight;var Wd=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Wd||{});var x0=(t,e)=>{ku(t,e)},w0=t=>{t.preventDefault()},S0=L('<ul role="menu" data-testid="context-menu" class="s-18"></ul>'),C0={hash:"s-18",code:"ul.s-18{background:rgba(0,0,0,.72);border-radius:8px;list-style:none;margin:0;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;padding:6px 0;position:absolute;transition:visibility .1s,opacity .1s;z-index:var(--context-menu-z-index)}"};function Wf(t,e){B(e,!0),Q(t,C0);let[i,o]=Be(),s=()=>x(ae,"$playerPhase",i),a=()=>x(ie,"$isLive$",i),l=()=>x(pe,"$isPiPEnabled$",i),d=()=>x(Y,"$chromecastState$",i),r=()=>x(ee,"$pictureInPictureApiIsActive$",i),u=()=>x(de,"$isLooped$",i),p=()=>x(J,"$positionExact$",i),f=()=>x(W,"$additionalContextMenuItems$",i),v=g(e,"visible",3,!1),b=g(e,"position",19,()=>({top:0,left:0})),y=g(e,"playerContainerRef",3,void 0),_=g(e,"menuElementRef",15,void 0),w=K(0),I=K(0),T=xe(),{pictureInPicture$:R}=_o(),k=Lt(),P=T.ui.contextMenu.visible$,E=T.ui.debugPanelVisible,W=T.ui.additionalContextMenuItems$,U=T.ui.t,z=T.actions.internal.togglePictureInPicture,Y=T.state.chromecastState$,ie=T.state.isLive$,J=T.state.positionExact$,oe=T.state.isInteractive,de=T.state.looped$,ae=T.playerPhase,{isEnabled$:pe,isActive$:ee}=R,$e=m(()=>s()==="video"),Ee=m(()=>!!a()&&n($e)),ce=m(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(s())),Qe=m(()=>{var ye;return k.features.copyVideoLink&&((ye=T.callbacks)==null?void 0:ye.onCopyVideoLink)}),fe=m(()=>n(Qe)&&!n(ce)&&!oe&&!n(Ee)),ve=m(()=>{var ye;return!!((ye=T.callbacks)!=null&&ye.onCopyEmbedCodeClicked)}),X=m(()=>l()&&d()!==b0.CONNECTED&&!oe&&n($e)&&!$0.browser.isFirefox),N=m(()=>!oe&&!n(ce)&&!n(Ee)),me=m(()=>k.features.videoRotate&&!oe&&!n(ce)),ue=m(()=>k.showSupport&&!r()),Re=m(()=>k.features.saveTraceInfoToFile),Je=()=>{var ye;P.set(!1),(ye=e.returnFocus)==null||ye.call(e)},ke=(ye,qe)=>{if(!_()||!y())return;let Ue=_().getBoundingClientRect(),st=y().getBoundingClientRect();D(w,ye-st.left),D(I,qe-st.top),n(w)+Ue.width>st.width&&D(w,st.width-Ue.width),n(I)+Ue.height>st.height&&D(I,st.height-Ue.height),D(w,Math.max(n(w),0),!0),D(I,Math.max(n(I),0),!0)};He(()=>{bt(null,null,function*(){if(_()&&y()){yield mo();let{top:qe,left:Ue,bottom:st,right:qt}=b(),Pt=Ue!=null?Ue:0,Yt=qe!=null?qe:0,bi=_().getBoundingClientRect();Mu(Ue)&&!Mu(qt)&&(Pt=qt-bi.width),Mu(qe)&&!Mu(st)&&(Yt=st-bi.height),Pt=Math.max(Pt,0),Yt=Math.max(Yt,0),ke(Pt,Yt)}})});let j=()=>{T.actions.internal.videoRotate()},ne=()=>{y0(e.supportLink)&&window.open(e.supportLink,"_blank"),T.actions.internal.reportProblem(),T.actions.internal.pause()},Se=()=>{let ye=T.actions.internal.getDebugTextData();if(k.features.saveDebugInfoToFile){let qe=new Blob([...ye],{type:"plain/text"}),Ue=window.URL.createObjectURL(qe);Ba(Ue,"vk_player_debug_info","txt")}else Nl(T.actions.internal.getDebugTextData())},Le=()=>{let ye=T.actions.internal.getTraceTextData(),qe=new Blob([...ye],{type:"application/json"}),Ue=window.URL.createObjectURL(qe);Ba(Ue,"vk_player_trace_info","json")},ze=()=>{E.set(!0)},Ce=()=>bt(null,null,function*(){var ye;try{z()}finally{(ye=e.returnFocus)==null||ye.call(e)}}),we=()=>{T.actions.internal.setLooped(!u())},Fe=()=>{var ye,qe;if(n(ve)){let Ue=(qe=(ye=T.callbacks)==null?void 0:ye.onCopyEmbedCodeClicked)==null?void 0:qe.call(ye);Ue&&Nl(Ue)}},rt=(ye=!1)=>{var qe,Ue;if((qe=T.callbacks)!=null&&qe.onCopyVideoLink){let st=(Ue=T.callbacks)==null?void 0:Ue.onCopyVideoLink(ye,p());st&&Nl(st)}},ut=m(()=>k.features.saveDebugInfoToFile?U("menu_save_debug"):U("menu_copy_debug")),Mt=m(()=>n(Qe)?{id:"copy-link",weight:ns["copy-link"],label:U("menu_copy_video_link"),onClick:()=>rt()}:void 0),lt=m(()=>n(fe)?{id:"copy-link-timestamp",weight:ns["copy-link-timestamp"],label:U("menu_copy_video_link_with_timestamp"),onClick:()=>rt(!0)}:void 0),ni=m(()=>n(ve)?{id:"copy-embed-code",weight:ns["copy-embed-code"],label:U("menu_copy_embed_code"),onClick:Fe}:void 0),wt=m(()=>n(X)?{id:"pip",weight:ns.pip,label:r()?U("menu_pip_close"):U("menu_pip"),onClick:Ce}:void 0),Rt=m(()=>n(N)?{id:"video-loop",weight:ns["video-loop"],label:u()?U("menu_video_loop_off"):U("menu_video_loop_on"),ariaLabel:U("aria_label_menu_loop"),onClick:we}:void 0),Dt=m(()=>n(me)?{id:"rotate",weight:ns.rotate,label:U("menu_video_rotate"),ariaLabel:U("aria_label_menu_rotate"),onClick:j}:void 0),Qt=m(()=>n(ue)?{id:"report",weight:ns.report,label:U("menu_report"),ariaLabel:`${U("menu_report")}. ${U("aria_label_new_tab_alert")}`,onClick:ne}:void 0),Te=m(()=>({id:"save-debug",weight:ns["save-debug"],label:n(ut),onClick:Se})),G=m(()=>n(Re)?{id:"save-trace",weight:ns["save-trace"],label:U("menu_save_debug"),onClick:Le}:void 0),Ne=m(()=>({id:"debug-info",weight:ns["debug-info"],label:U("menu_debug_overlay"),ariaLabel:U("aria_label_menu_debug_overlay"),onClick:ze})),be=m(()=>[n(Mt),n(lt),n(ni),n(wt),n(Rt),n(Dt),n(Qt),n(Te),n(G),n(Ne),...f()].filter(ye=>!!ye).sort(Fa));var Oe=Ve(),Ie=le(Oe);{var ht=ye=>{var qe=S0();qe.__contextmenu=[w0],qe.__keydown=[x0,Je],yi(qe,21,()=>n(be),Ue=>Ue.id,(Ue,st)=>{zf(Ue,{get id(){return n(st).id},get label(){return n(st).label},get ariaLabel(){return n(st).ariaLabel},get onClick(){return n(st).onClick},closeContextMenu:Je})}),S(qe),it(qe,Ue=>_(Ue),()=>_()),O(()=>{var Ue,st;return Ke(qe,`top: ${(Ue=n(I))!=null?Ue:""}px; left: ${(st=n(w))!=null?st:""}px;`)}),$(ye,qe)};M(Ie,ye=>{v()&&ye(ht)})}$(t,Oe),H(),o()}Ze(["contextmenu","keydown"]);var Vu=class{constructor(e){this.value=e,this.next=null}};var Fl=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Vu(e);this.top?(this.top.next=i,this.top=i):(this.top=i,this.bottom=i),this.size++,this.size>this.maxSize&&this.bottom&&(this.bottom=this.bottom.next)}getValuesFromBottom(){let e=[],i=this.bottom;for(;i;)e.push(i.value),i=i.next;return e}};var T0=L('<div class="container s-13"><canvas class="s-13"></canvas></div>'),I0={hash:"s-13",code:".container.s-13{display:inline-block;height:16px;width:120px}canvas.s-13{margin-top:2px;transform:scaleY(-1)}"};function Kd(t,e){B(e,!0),Q(t,I0);let i=g(e,"values",19,()=>[]),o=K(void 0),s=K(null),a=16,l=120,d=60,r=l/d;kt(()=>{n(o).width=l,n(o).height=a,D(s,n(o).getContext("2d"),!0)});function u(v,b,y,_,w){w===0&&(w=1),v.fillStyle="#fff",v.fillRect(b,y,_,w)}He(()=>{let v="";if(n(s)){let b=i()[0];for(let _=1;_<i().length;_++)i()[_]>b&&(b=i()[_]);n(s).clearRect(0,0,l,a);let y=d-1;for(let _=i().length-1;_>=0;_--){let w=y*r,I=b>0?a*(i()[_]/b):0;u(n(s),w,0,r,I),v=I+" "+v,y--}}});var p=T0(),f=C(p);it(f,v=>D(o,v),()=>n(o)),S(p),$(t,p),H()}import{safeStorage as z_}from"@vkontakte/videoplayer-shared/es2015";var E0=(t,e)=>{t.stopPropagation(),z_.remove(kd),e.set(!1)},P0=L('<div class="s-n"><div class="s-n">Video id</div> <span> </span></div>'),A0=L('<div class="s-n"><div class="s-n">VSID</div> <span> </span></div>'),k0=L('<div class="s-n"><div class="s-n">Provider</div> <span> </span></div>'),L0=L('<div class="s-n"><div class="s-n">Streams</div> <span> </span></div>'),M0=L('<div class="s-n"><div class="s-n">Viewport</div> <span> </span></div>'),V0=L('<div class="s-n"><div class="s-n">Video size</div> <span> </span></div>'),R0=L('<div class="s-n"><div class="s-n">CDN host</div> <span> </span></div>'),D0=L('<div class="s-n"><div class="s-n">Volume</div> <span> </span></div>'),O0=L('<div class="s-n"><div class="s-n">Position</div> <span> </span></div>'),N0=L('<div class="s-n"><div class="s-n">Buffer</div> <span> </span></div>'),B0=L('<div class="s-n"><div class="s-n">Nbuffer</div> <span> </span></div>'),H0=L('<div class="s-n"><div class="s-n">Live latency</div> <span> </span></div>'),F0=L('<div class="s-n"><div class="s-n">Segment</div> <span> </span></div>'),U0=L('<div class="s-n"><div class="s-n">Network</div> <!> <span> </span></div>'),z0=L('<div class="s-n"><div class="s-n">V bitrate</div> <!> <span> </span></div>'),W0=L('<div role="region"><button class="close s-n" title="закрыть">[x]</button> <div class="content s-n"><div class="s-n"><div class="s-n">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-n"><div class="s-n">Dropped</div> <span> </span></div> <!> <!> <div class="s-n"><div class="s-n">FPS</div> <!> <span> </span></div></div></div>'),K0={hash:"s-n",code:".container.s-n{background:rgba(28,28,28,.8);border-radius:4px;color:#fff;font-size:10px;left:20px;min-width:160px;position:absolute;text-align:left;top:45px;user-select:text;z-index:var(--debug-panel-z-index)}.container-mobile.s-n{left:16px;top:16px}button.close.s-n{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-n{padding:5px}.content.s-n>div:where(.s-n)>div:where(.s-n){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Qd(t,e){B(e,!0),Q(t,K0);let[i,o]=Be(),s=()=>x(d,"$isMobile",i),a=xe(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,r=K(ri(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),p=K(0),f=K(0),v=K(0),b=new Fl(60),y=new Fl(60),_=new Fl(60),w=K(ri([])),I=K(ri([])),T=K(ri([])),R=q("aria_label_debug_panel");kt(()=>{z_.set(kd,"true"),a.actions.internal.startLogging(),u&&(D(f,u.getVideoPlaybackQuality().droppedVideoFrames,!0),D(p,u.getVideoPlaybackQuality().totalVideoFrames,!0));let Te=window.setInterval(()=>{D(r,a.actions.internal.getDebugPanelData(),!0)},500),G;return u&&(G=window.setInterval(()=>{if(u){D(f,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let Ne=u.getVideoPlaybackQuality().totalVideoFrames;D(v,Ne-n(p)),D(p,Ne,!0),b.push(n(v)),n(r).speed&&y.push(n(r).speed),n(r).bitrate&&_.push(n(r).bitrate),D(w,b.getValuesFromBottom(),!0),D(I,y.getValuesFromBottom(),!0),D(T,_.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(Te),G&&clearInterval(G)}});var k=W0();let P;var E=C(k);E.__click=[E0,l];var W=A(E,2),U=C(W),z=A(C(U),2),Y=C(z,!0);S(z),S(U);var ie=A(U,2);{var J=Te=>{var G=P0(),Ne=A(C(G),2),be=C(Ne,!0);S(Ne),S(G),O(()=>he(be,n(r).id)),$(Te,G)};M(ie,Te=>{n(r).id&&Te(J)})}var oe=A(ie,2);{var de=Te=>{var G=A0(),Ne=A(C(G),2),be=C(Ne,!0);S(Ne),S(G),O(()=>he(be,n(r).vsid)),$(Te,G)};M(oe,Te=>{n(r).vsid&&Te(de)})}var ae=A(oe,2);{var pe=Te=>{var G=k0(),Ne=A(C(G),2),be=C(Ne,!0);S(Ne),S(G),O(()=>he(be,n(r).provider)),$(Te,G)};M(ae,Te=>{n(r).provider&&Te(pe)})}var ee=A(ae,2);{var $e=Te=>{var G=L0(),Ne=A(C(G),2),be=C(Ne);S(Ne),S(G),O(()=>{var Oe,Ie;return he(be,`Video: ${(Oe=n(r).videoCodec||"")!=null?Oe:""} ${n(r).hdr?"(HDR)":""}
|
|
55
55
|
&
|
|
56
|
-
Audio: ${(Se=n(s).audioCodec||"")!=null?Se:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),_(q,Me)};M(ee,q=>{(n(s).videoCodec||n(s).audioCodec)&&q(be)})}var Ce=A(ee,2);{var de=q=>{var Me=T0(),Ve=A(T(Me),2),xe=T(Ve,!0);S(Ve),S(Me),O(()=>he(xe,n(s).viewport)),_(q,Me)};M(Ce,q=>{n(s).viewport&&q(de)})}var We=A(Ce,2);{var ve=q=>{var Me=I0(),Ve=A(T(Me),2),xe=T(Ve,!0);S(Ve),S(Me),O(()=>he(xe,n(s).videoSize)),_(q,Me)};M(We,q=>{n(s).videoSize&&q(ve)})}var me=A(We,2);{var Z=q=>{var Me=E0(),Ve=A(T(Me),2),xe=T(Ve,!0);S(Ve),S(Me),O(()=>he(xe,n(s).cdn)),_(q,Me)};M(me,q=>{n(s).cdn&&q(Z)})}var N=A(me,2);{var pe=q=>{var Me=P0(),Ve=A(T(Me),2),xe=T(Ve);S(Ve),S(Me),O(()=>{var Ue;return he(xe,`${(Ue=n(s).volume)!=null?Ue:""} %`)}),_(q,Me)};M(N,q=>{n(s).volume&&q(pe)})}var le=A(N,2);{var ue=q=>{var Me=A0(),Ve=A(T(Me),2),xe=T(Ve);S(Ve),S(Me),O(Ue=>he(xe,`${Ue!=null?Ue:""} s`),[()=>n(s).position.toFixed(2)]),_(q,Me)};M(le,q=>{n(s).position&&q(ue)})}var Le=A(le,2);{var ze=q=>{var Me=k0(),Ve=A(T(Me),2),xe=T(Ve);S(Ve),S(Me),O(Ue=>he(xe,`${Ue!=null?Ue:""} s`),[()=>n(s).buffer.toFixed(2)]),_(q,Me)};M(Le,q=>{n(s).buffer&&q(ze)})}var te=A(Le,2);{var ce=q=>{var Me=L0(),Ve=A(T(Me),2),xe=T(Ve);S(Ve),S(Me),O(Ue=>he(xe,`${Ue!=null?Ue:""} s`),[()=>n(s).nativeBuffer.toFixed(2)]),_(q,Me)};M(te,q=>{n(s).nativeBuffer&&q(ce)})}var we=A(te,2);{var Ee=q=>{var Me=M0(),Ve=A(T(Me),2),xe=T(Ve);S(Ve),S(Me),O(Ue=>he(xe,`${Ue!=null?Ue:""} s`),[()=>n(s).liveLatency.toFixed(2)]),_(q,Me)};M(we,q=>{n(s).liveLatency&&q(Ee)})}var Ye=A(we,2);{var Ae=q=>{var Me=V0(),Ve=A(T(Me),2),xe=T(Ve,!0);S(Ve),S(Me),O(Ue=>he(xe,Ue),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Ue})=>Ue).map(({value:Ue,title:Se})=>`${Se} ${((Ue!=null?Ue:0)/1e3).toFixed(2)} s`).join(" & ")]),_(q,Me)};M(Ye,q=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&q(Ae)})}var Te=A(Ye,2),Fe=A(T(Te),2),ht=T(Fe);S(Fe),S(Te);var Rt=A(Te,2);{var It=q=>{var Me=R0(),Ve=A(T(Me),2);Nd(Ve,{get values(){return n(I)}});var xe=A(Ve,2),Ue=T(xe);S(xe),S(Me),O(Se=>he(Ue,`${Se!=null?Se:""} Kbps`),[()=>n(s).speed.toFixed(2)]),_(q,Me)};M(Rt,q=>{n(s).speed&&q(It)})}var ct=A(Rt,2);{var Tt=q=>{var Me=D0(),Ve=A(T(Me),2);Nd(Ve,{get values(){return n(C)}});var xe=A(Ve,2),Ue=T(xe);S(xe),S(Me),O(Se=>he(Ue,`${Se!=null?Se:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),_(q,Me)};M(ct,q=>{n(s).bitrate&&q(Tt)})}var Yt=A(ct,2),Ht=A(T(Yt),2);Nd(Ht,{get values(){return n(x)}});var Ot=A(Ht,2),Wt=T(Ot,!0);S(Ot),S(Yt),S(W),S(k),O(q=>{var Me,Ve;P=ie(k,1,"container s-m",null,P,q),Oe(k,"aria-label",R),he(j,n(s).version),he(ht,`${(Me=n(p))!=null?Me:""} / ${(Ve=n(m))!=null?Ve:""} frames`),he(Wt,n(v))},[()=>({"container-mobile":r()})]),_(t,k),H(),o()}et(["click"]);import{noop as B0}from"@vkontakte/videoplayer-shared/es2015";var H0=(t,e)=>{t.stopPropagation(),e()()},F0=L('<div class="close s-11"></div>'),U0={hash:"s-11",code:'.close.s-11{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-11:hover{opacity:1}.close.s-11:after,.close.s-11:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-11:before{transform:rotate(45deg)}.close.s-11:after{transform:rotate(-45deg)}'};function Ns(t,e){B(e,!0),Q(t,U0);let i=g(e,"onClick",3,B0);var o=F0();o.__click=[H0,i],_(t,o),H()}et(["click"]);import{noop as W0}from"@vkontakte/videoplayer-shared/es2015";var un=t=>`width:${t}px;height:${t}px;`;var z0=ke('<path d="m14.4 8.76 24.02 13.85a1.6 1.6 0 0 1 0 2.78L14.4 39.24a1.6 1.6 0 0 1-2.4-1.39v-27.7a1.6 1.6 0 0 1 2.4-1.39"></path>');function An(t,e){B(e,!0);let i=f(()=>un(e.size));Ze(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"play-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=z0();_(o,a)},$$slots:{default:!0}}),H()}var K0=L('<div class="timer s-y"><canvas class="timer-canvas s-y" width="100" height="100"></canvas> <!></div>'),q0={hash:"s-y",code:".timer.s-y{align-items:center;background:rgba(31,31,31,.65);border-radius:50%;display:flex;height:50px;justify-content:space-around;transition:background .2s;width:50px}.timer.s-y:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-y{height:50px;position:absolute;width:50px}"};function Hd(t,e){B(e,!0),Q(t,q0);let i=g(e,"isRunning",3,!0),o=g(e,"onTimerEnded",3,W0),r=5e3,a=K(void 0),l,d,s=0,u;He(()=>{i()&&Et(()=>{d=Date.now(),s=requestAnimationFrame(p)})});let m=()=>{s&&(cancelAnimationFrame(s),s=0)},p=()=>{m(),i()&&(u=(Date.now()-d)/r,u<1?(l==null||l.clearRect(0,0,100,100),l==null||l.beginPath(),l==null||l.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*u),l==null||l.stroke(),s=requestAnimationFrame(p)):o()())};Mt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),cn(()=>{m()});var v=K0(),$=T(v);tt($,b=>D(a,b),()=>n(a));var y=A($,2);An(y,{get size(){return"24"}}),S(v),_(t,v),H()}var Q0=(t,e,i)=>{e(!1),i()},G0=L('<div class="overlay s-17"></div> <div class="next-video s-17"><div class="top s-17"><div class="caption s-17"> </div> <!></div> <div class="row s-17"><div class="column s-17"><div class="thumb s-17"><div></div> <!></div></div> <div class="column s-17"><div class="title s-17"> </div></div></div></div>',1),Y0={hash:"s-17",code:".overlay.s-17{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-17{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-17{display:flex;justify-content:space-between}.caption.s-17{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-17{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-17{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-17{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-17,.thumb-overlay.s-17{height:100%;width:100%}.thumb-overlay.s-17{position:absolute}.thumb-overlay.withOpacity.s-17{background:var(--black);opacity:.3}.title.s-17{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Ff(t,e){B(e,!0),Q(t,Y0);let[i,o]=Be(),r=()=>w(d,"$autoplayNextEnabled$",i),a=()=>w(s,"$timerNextVideoRunning$",i),l=ye(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,m=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),v())},b=()=>{e.clickCloseIcon(),$()};Mt(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),v())});var x=De(),I=ae(x);{var C=R=>{var k=G0(),P=A(ae(k),2),E=T(P),W=T(E),F=T(W,!0);S(W);var U=A(W,2);Ns(U,{onClick:b}),S(E);var j=A(E,2);j.__click=[Q0,u,p];var re=T(j),G=T(re),oe=T(G);let X;var Ie=A(oe,2);{var fe=de=>{let We=f(()=>a()&&r());Hd(de,{get isRunning(){return n(We)},onTimerEnded:y})};M(Ie,de=>{r()&&de(fe)})}S(G),S(re);var ee=A(re,2),be=T(ee),Ce=T(be,!0);S(be),S(ee),S(j),S(P),O((de,We)=>{he(F,de),Ke(G,`background-image: url('${e.thumb}')`),X=ie(oe,1,"thumb-overlay s-17",null,X,We),he(Ce,e.title)},[()=>Y("end_screen_next_video"),()=>({withOpacity:r()})]),_(R,k)};M(I,R=>{e.isHide||R(C)})}_(t,x),H(),o()}et(["click"]);import{PlaybackState as Ba}from"@vkontakte/videoplayer-core/es2015";import{checkNever as X0}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Yn}from"@vkontakte/videoplayer-statistics/es2015";var Uf=(t,e)=>Math.min(+(t+e).toFixed(2),1),zf=(t,e)=>Math.max(+(t-e).toFixed(2),0),ku=(t,e,i)=>{let o=Uf(e,i);e<1&&t.actions.internal.setVolume(o)},Lu=(t,e,i)=>{let o=zf(e,i);e>0&&t.actions.internal.setVolume(o)};var da=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:r})=>t?i?!0:(o==null||o(),!1):e?!0:(r==null||r(),!1);function Mu(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var Z0=(t,e)=>{e(t)},J0=L('<div class="keyboard-controls s-16" tabindex="-1" role="region"><!></div>'),ey={hash:"s-16",code:".keyboard-controls.s-16{bottom:0;left:0;position:absolute;right:0;top:0}"};function Wf(t,e){var xe,Ue;B(e,!0),Q(t,ey);let[i,o]=Be(),r=()=>w(Ie,"$disabledControls$",i),a=()=>w(ze,"$isInteractiveTime$",i),l=()=>w(te,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>w(U,"$playbackState$",i),s=()=>w(Z,"$isEnded$",i),u=()=>w(ve,"$doubleForwardAvailable$",i),m=()=>w(We,"$doubleForwardOn$",i),p=()=>w(N,"$overlayContainer$",i),v=()=>w(re,"$adPlaybackState",i),$=()=>w(G,"$positionExact$",i),y=()=>w(oe,"$duration$",i),b=()=>w(ue,"$isAudioAvailable$",i),x=()=>w(X,"$volume$",i),I=()=>w(j,"$canChangePlaybackSpeed$",i),C=()=>w(fe,"$muted$",i),R=()=>w(ee,"$currentSubtitle$",i),k=g(e,"nextButtonActive",3,!1),P=g(e,"prevButtonActive",3,!1),E=ye(),W=Vt(),F=E.getLogger().createComponentLog("KeyboardControls component"),U=E.state.playbackState$,j=E.state.canChangePlaybackSpeed$,re=E.ads.playbackState,G=E.state.positionExact$,oe=E.state.duration$,X=E.state.volume$,Ie=E.ui.controls.disabledControls$,fe=E.state.muted$,ee=E.state.currentSubtitle$,be=E.ui.contextMenu.openedByHotKey$,Ce=E.ui.contextMenu.lastActiveElem$,de=E.ui.contextMenu.visible$,We=E.ui.doubleForwardOn$,ve=E.ui.doubleForwardAvailable$,me=E.ui.contextMenu.position$,Z=E.state.isEnded$,N=E.ui.overlayContainer$,pe=(xe=E.callbacks)==null?void 0:xe.onAudioDoesNotExistHint,le=(Ue=E.callbacks)==null?void 0:Ue.onAudioDisabledHint,ue=E.state.isAudioAvailable$,Le=E.state.isAudioDisabled,ze=E.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:te}=_o(),ce=0,we=!0,Ee=K(void 0),Ye=Se=>(Se!==we&&(we=Se,ce=0),ce+=1,(W.controls.seekStepKeyboard+W.controls.seekStepKeyboard*ce)/1e3),Ae=!0,Te=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&te.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{E.actions.internal.togglePlay();let Se="PLAY";d()===Ba.PAUSED?Se="PAUSE":s()&&(Se="REPLAY"),e.showHotKeyHelpers({type:Se})}},Fe=Se=>{if(!u()||!Se&&m()){Te(),e.stopDoubleForward(),Ae=!0;return}Ae=!1,!Se&&e.startDoubleForwardActivationTimer()},ht=()=>{Ae||(m()||Te(),e.stopDoubleForward(),Ae=!0)},Rt=Se=>{Se!=="Space"&&e.stopDoubleForward()},It=Se=>{let Ct=R_(p());me.set(Ct),Ce.set(Se.target),be.set(!0),de.set(!0)},ct=(Se,Ct=!1)=>{var pi,Zi;let ge=Se.target,Ne=(pi=ge==null?void 0:ge.getAttribute("role"))==null?void 0:pi.includes("menuitem"),Ge=ge.classList.contains("btn"),lt=Se.code;if(Ge&<==="Space")return!1;let Qt=Vh.has(lt);if(Ne&&Qt)return!1;let At=!Mh.has(lt);if(Se.ctrlKey&&At||Se.altKey&&At||Se.metaKey)return!1;let di=Ne&<==="Escape";Rh.has(lt)||di||e.hideContextMenu();let ci=d()===Ba.PLAYING||d()===Ba.PAUSED,Li=e.isAds&&(v()==="paused"||v()==="playing"),vo=!Li&&!r().has("TIMELINE"),go=Se.shiftKey&&["Digit1","Numpad1"].includes(lt);if(!go&&!(ci||Li))return!1;F({message:`key down, code: ${lt}, isExternal = ${Ct}`});let ui=!1,st=()=>{ui=!0,Ct||Se.preventDefault()};if(Rt(lt),go)return It(Se),st(),!0;switch(lt){case"KeyJ":case"ArrowLeft":{if(!vo)break;if(Se.ctrlKey||Se.altKey){let ut=E.actions.internal.getPrevEpisode();E.actions.internal.seekToPrevEpisode(ut),ut&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:ut.text}),st()}else{let ut=Se.shiftKey?Ye(!1):W.controls.seekStepKeyboard/1e3,Nt=Math.max($()-ut,0);$()>0&&(E.actions.internal.seekTime(Nt,Yn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:ut.toString()}),st())}break}case"KeyL":case"ArrowRight":{if(!vo)break;if(Se.ctrlKey||Se.altKey){let ut=E.actions.internal.getNextEpisode();E.actions.internal.seekToNextEpisode(ut),ut&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:ut.text}),st()}else{let ut=Se.shiftKey?Ye(!0):W.controls.seekStepKeyboard/1e3,Nt=Math.min($()+ut,y());Math.round($())<Math.round(y())&&(E.actions.internal.seekTime(Nt,Yn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:ut.toString()}),st())}break}case"ArrowUp":{if(da({isAudioDisabled:Le,audioDisabledHintCallback:le,isAudioAvailable:b(),audioIsNotExistHintCallback:pe,isAds:e.isAds})){let ut=x(),Nt=W.controls.volumeStepKeyboard,vi=ut<=1;if(ku(E,ut,Nt),vi){let nt=Math.round(Uf(ut,Nt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:nt}})}}st();break}case"ArrowDown":{if(da({isAudioDisabled:Le,audioDisabledHintCallback:le,isAudioAvailable:b(),audioIsNotExistHintCallback:pe,isAds:e.isAds})){let ut=x(),Nt=W.controls.volumeStepKeyboard,vi=ut>=0;if(Lu(E,ut,Nt),vi){let nt=Math.round(zf(ut,Nt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:nt}})}}st();break}case"Comma":{if(Se.shiftKey){if(!m()&&I()){let ut=E.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:ut==null?void 0:ut.displayValue}),st()}}else{if(Li||d()!==Ba.PAUSED)break;let ut=Math.max($()-W.controls.seekStepFrame/1e3,0);$()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),E.actions.internal.clearDelayedBufferingCheckTimeout(),E.actions.internal.seekTime(ut,Yn.DOUBLE_TAP),st())}break}case"Period":{if(Se.shiftKey){if(!m()&&I()){let ut=E.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:ut==null?void 0:ut.displayValue}),st()}}else{if(Li||d()!==Ba.PAUSED)break;let ut=Math.min($()+W.controls.seekStepFrame/1e3,y());$()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),E.actions.internal.clearDelayedBufferingCheckTimeout(),E.actions.internal.seekTime(ut,Yn.DOUBLE_TAP),st())}break}case"KeyK":Te(),st();break;case"Space":Fe(Se.repeat),st();break;case"KeyM":{da({isAudioDisabled:Le,audioDisabledHintCallback:le,isAudioAvailable:b(),audioIsNotExistHintCallback:pe,isAds:e.isAds})&&(e.showHotKeyHelpers({type:C()?"VOLUME":"MUTE"}),E.actions.internal.toggleMuted()),st();break}case"KeyF":e.toggleFullscreen(),st();break;case"KeyC":E.actions.internal.toggleSubtitle(),R().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(Zi=R())==null?void 0:Zi.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),st();break;case"KeyI":E.actions.internal.togglePictureInPicture(),st();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.1,Yn.DOUBLE_TAP),st();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.2,Yn.DOUBLE_TAP),st();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.3,Yn.DOUBLE_TAP),st();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.4,Yn.DOUBLE_TAP),st();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.5,Yn.DOUBLE_TAP),st();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.6,Yn.DOUBLE_TAP),st();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.7,Yn.DOUBLE_TAP),st();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.8,Yn.DOUBLE_TAP),st();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.9,Yn.DOUBLE_TAP),st();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(0,Yn.DOUBLE_TAP),st();break;case"Slash":{Se.shiftKey&&W.features.hotKeyMapModal&&(e.showKeyMap(),st());break}case"KeyN":Se.shiftKey&&k()&&(E.actions.internal.nextVideoClick(),st());break;case"KeyP":Se.shiftKey&&P()&&(E.actions.internal.prevVideoClick(),st());break;case"ShiftLeft":case"ShiftRight":st();break;case"Tab":case"Escape":case"Enter":break;default:X0(lt);break}return ui},Tt=Se=>{let Ct=Se.code;if(Se.ctrlKey||Se.altKey||Se.metaKey)return;let ge=d()===Ba.PLAYING||d()===Ba.PAUSED,Ne=e.isAds&&(v()==="paused"||v()==="playing");if(ge||Ne)switch(Ct){case"ShiftLeft":case"ShiftRight":ce=0;break;case"Space":ht();break}},Yt=Y("aria_label_video_player"),Ht=()=>{var Se;return(Se=n(Ee))==null?void 0:Se.focus()},Ot=()=>n(Ee)===Mu(),Wt=Se=>Se.type==="keydown"?ct(Se,!0):(Se.type==="keyup"&&Tt(Se),!1);var q=J0();q.__keyup=Tt,q.__keydown=[Z0,ct];var Me=T(q);oi(Me,()=>{var Se;return(Se=e.children)!=null?Se:bt}),S(q),tt(q,Se=>D(Ee,Se),()=>n(Ee)),O(()=>Oe(q,"aria-label",Yt)),_(t,q);var Ve=H({focus:Ht,isFocused:Ot,handleExternalKeyboardEvent:Wt});return o(),Ve}et(["keyup","keydown"]);var ty=L('<div class="container s-o"><div class="dot s-o"></div> <div class="dot s-o"></div> <div class="dot s-o"></div></div>'),iy={hash:"s-o",code:".container.s-o{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-o:first-child{animation-delay:0s}.dot.s-o:nth-child(2){animation-delay:.18s}.dot.s-o:nth-child(3){animation-delay:.36s}@keyframes s-o-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-o{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-o-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-o+.dot:where(.s-o){margin-left:4px}"};function Ha(t,e){Q(t,iy);let i=g(e,"style",3,"");var o=ty();O(()=>Ke(o,i())),_(t,o)}var oy=ke('<path d="M5.26 5.26a.9.9 0 0 1 1.28 0L12 10.73l5.46-5.47a.9.9 0 0 1 1.28 1.28L13.27 12l5.47 5.46a.9.9 0 1 1-1.28 1.28L12 13.27l-5.46 5.47a.9.9 0 1 1-1.28-1.28L10.73 12 5.26 6.54a.9.9 0 0 1 0-1.28Z"></path>');function Kf(t,e){Ze(t,{get fill(){return e.fill},children:(i,o)=>{var r=oy();_(i,r)},$$slots:{default:!0}})}import{noop as Hl}from"@vkontakte/videoplayer-shared/es2015";var ny=t=>{t.stopPropagation()},ry=L("<button><!></button>"),sy={hash:"s-1s",code:"button.btn.s-1s{align-items:center;display:flex;flex-direction:row;height:var(--controls-height);justify-content:center;margin:0;padding:8px;will-change:opacity}button.w-max.s-1s{width:100%}button.btn--live.s-1s{padding:10px 4px}button.btn-jc-l.s-1s{justify-content:left}button.btn-m.s-1s{background-color:rgba(0,0,0,.56);border-radius:12px;height:44px;left:12px;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}button.btn-m.s-1s,button.btn-m--play.s-1s{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1s{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1s,button.btn-m--prev.s-1s{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1s{right:calc(100% + 35px)}button.btn-m--next.s-1s{left:calc(100% + 35px)}button.btn.s-1s:disabled{cursor:default;pointer-events:none}button.btn.s-1s:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1s:not(:disabled):hover{opacity:.8}button.pr-0.s-1s{padding-right:0}button.pl-0.s-1s{padding-left:0}"};function zt(t,e){B(e,!0),Q(t,sy);let i=g(e,"className",3,""),o=g(e,"style",3,""),r=g(e,"disabled",3,void 0),a=g(e,"testId",3,void 0),l=g(e,"ariaHidden",3,void 0),d=g(e,"ariaLabel",3,void 0),s=g(e,"ref",15,void 0),u=g(e,"ariaKeyShortCut",3,void 0),m=g(e,"ariaExpanded",3,void 0),p=g(e,"tabIndex",3,0),v=g(e,"click",3,Hl),$=g(e,"focus",3,Hl),y=g(e,"blur",3,Hl),b=f(()=>v()===Hl?null:k=>{k.stopPropagation(),v()(k)}),x=f(()=>$()===Hl?null:k=>{k.preventDefault(),$()()}),I=f(()=>y()===Hl?null:k=>{k.preventDefault(),y()()});var C=ry();C.__pointerdown=[ny],C.__click=function(...k){var P;(P=n(b))==null||P.apply(this,k)};var R=T(C);oi(R,()=>{var k;return(k=e.children)!=null?k:bt}),S(C),tt(C,k=>s(k),()=>s()),O(()=>{var k,P,E,W,F,U,j,re;ie(C,1,`btn ${(k=i())!=null?k:""}`,"s-1s"),Ke(C,o()||null),C.disabled=(P=r())!=null?P:null,Oe(C,"aria-hidden",(E=l())!=null?E:null),Oe(C,"aria-label",(W=d())!=null?W:null),Oe(C,"aria-keyshortcuts",(F=u())!=null?F:null),Oe(C,"aria-expanded",(U=m())!=null?U:null),Oe(C,"data-testid",(j=a())!=null?j:null),Oe(C,"tabindex",p()),Oe(C,"role",e.role),Oe(C,"aria-checked",(re=e.areaChecked)!=null?re:null)}),mt("focus",C,function(...k){var P;(P=n(x))==null||P.apply(this,k)}),mt("blur",C,function(...k){var P;(P=n(I))==null||P.apply(this,k)}),_(t,C),H()}et(["pointerdown","click"]);var ay=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},ly=L('<div class="modal-header s-1m"><h3 class="modal-title s-1m"> </h3> <!></div>'),dy=L('<div class="modal-overlay s-1m"><div class="modal-container s-1m" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-1m" tabindex="0" role="scrollbar"><div class="modal-main s-1m"><!></div></div></div></div>'),cy={hash:"s-1m",code:'.modal-overlay.s-1m{align-items:center;background:transparent;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:var(--modal-z-index)}.modal-container.s-1m{background:var(--mobile-settings-bg);border-radius:8px;color:var(--white);display:flex;flex-direction:column;height:calc(100% - 24px);max-height:490px;max-width:600px;width:calc(100% - 32px)}.modal-header.s-1m{align-items:start;border-bottom:1px solid var(--white-alpha-24);box-sizing:border-box;display:flex;height:40px;justify-content:space-between;padding:8px 10px}.modal-title.s-1m{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px;margin:3px 0 0 6px}.modal-scroll.s-1m{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-1m::-webkit-scrollbar{width:8px}.modal-scroll.s-1m::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-1m::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-1m::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-1m{margin:-8px -4px 0 0}'};function qf(t,e){B(e,!0),Q(t,cy);let i=g(e,"showHeader",3,!0),o=g(e,"showCloseCross",3,!0),r=K(void 0),a=K(void 0),{webApi:{focusManager:l}}=ye(),d=Y("hotkey_map_modal_close_btn_text");Mt(()=>{var b;return(b=n(r))==null||b.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var s=dy();s.__keydown=[ay,e];var u=T(s),m=T(u);{var p=b=>{var x=ly(),I=T(x),C=T(I,!0);S(I);var R=A(I,2);{var k=P=>{zt(P,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(E,W)=>{Kf(E,{fill:"currentColor"})},$$slots:{default:!0}})};M(R,P=>{o()&&P(k)})}S(x),O(()=>he(C,e.title)),_(b,x)};M(m,b=>{i()&&b(p)})}var v=A(m,2),$=T(v),y=T($);oi(y,()=>{var b;return(b=e.children)!=null?b:bt}),S($),S(v),tt(v,b=>D(r,b),()=>n(r)),S(u),tt(u,b=>D(a,b),()=>n(a)),S(s),_(t,s),H()}et(["keydown"]);var uy=new Set(["BR"]),N_=t=>{var r;let e=document.createElement("DIV");e.innerHTML=t;let i=e.querySelectorAll("*"),o=i.length;for(;o--;){let a=i[o],l=a.tagName;uy.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var py=L('<li class="hot-key-map-item s-18"><span class="hot-key-map-item-description s-18"><!></span> <span class="hot-key-map-item-value s-18"> </span></li>'),fy=L('<div class="hot-key-map-group s-18"><h5 class="hot-key-map-group-title s-18"> </h5> <ul class="hot-key-map-group-items s-18"></ul></div>'),my=L('<div class="hot-key-map s-18"></div>'),vy={hash:"s-18",code:'.hot-key-map.s-18{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-18{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-18:last-child{border-bottom:none}.hot-key-map-group-title.s-18{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px}.hot-key-map-group-title.s-18,.hot-key-map-item.s-18{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-18{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-18{align-items:center;box-sizing:border-box;display:flex;justify-content:space-between;--videoplayer-hotkey-item-value-width:156px;--videoplayer-hotkey-item-value-padding-left:24px}.hot-key-map-item-description.s-18{color:var(--white-alpha-72);max-width:388px;width:calc(100% - var(--videoplayer-hotkey-item-value-width) - var(--videoplayer-hotkey-item-value-padding-left))}.hot-key-map-item-value.s-18{color:var(--white);letter-spacing:-.14px;padding-left:var(--videoplayer-hotkey-item-value-padding-left);width:var(--videoplayer-hotkey-item-value-width)}.hot-key-map-item-description.s-18,.hot-key-map-item-value.s-18{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function Qf(t,e){B(e,!1),Q(t,vy);let[i,o]=Be(),r=()=>w(l,"$data",i),a=ye(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};Zo(),qf(t,{get title(){return r().title},onClose:s,children:(u,m)=>{var p=my();yi(p,5,()=>r().groups,({title:v,items:$})=>v,(v,$)=>{let y=()=>n($).title,b=()=>n($).items;var x=fy(),I=T(x),C=T(I,!0);S(I);var R=A(I,2);yi(R,5,b,({description:k,value:P})=>P,(k,P)=>{let E=()=>n(P).description,W=()=>n(P).value;var F=py(),U=T(F),j=T(U);bd(j,()=>N_(E())),S(U);var re=A(U,2),G=T(re,!0);S(re),S(F),O(()=>he(G,W())),_(k,F)}),S(R),S(x),O(()=>he(C,y())),_(v,x)}),S(p),_(u,p)},$$slots:{default:!0}}),H(),o()}import{noop as _b}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as pb,PlaybackState as Nm}from"@vkontakte/videoplayer-core/es2015";import{getVideoQualityLabel as Cy}from"@vkontakte/videoplayer-shared/es2015";var gy=L('<div class="pillow s-1x"><!></div>'),hy={hash:"s-1x",code:".pillow.s-1x{background-color:#679ff8;color:var(--white);font-size:6px;font-weight:600;-webkit-font-smoothing:antialiased;border-radius:12px;padding:2px 4px}"};function Gf(t,e){Q(t,hy);var i=gy(),o=T(i);oi(o,()=>{var r;return(r=e.children)!=null?r:bt}),S(i),O(()=>Oe(i,"data-testid",e.testId)),_(t,i)}import{VideoQuality as Fd}from"@vkontakte/videoplayer-shared/es2015";var _y=ke('<svg><!><path d="M5.52 5c.32 0 .51-.2.51-.54V3.5l.5-.51 1.46 1.74c.16.2.3.28.51.28a.5.5 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.3 2.3 8.8.87c.16-.14.2-.25.2-.4A.47.47 0 0 0 8.52 0c-.18 0-.3.07-.45.22l-2 2.03h-.04V.54C6.03.2 5.84 0 5.52 0S5 .2 5 .54v3.92c0 .34.2.54.52.54M2.55 1.05 1.05 3.1h1.5zM3.5 3.1V.83C3.5.03 2.41-.3 1.94.35L.14 2.82A.75.75 0 0 0 .75 4h1.8v.55c0 .25.25.45.5.45a.45.45 0 0 0 .45-.45V4h.05a.45.45 0 0 0 0-.9z"></path></svg>');function Yf(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=_y();io(o,()=>Xe({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=T(o);oi(r,()=>{var a;return(a=e.children)!=null?a:bt}),ti(),S(o),_(t,o)}var by=ke('<svg><!><path d="M5.51 5c.33 0 .52-.2.52-.54V3.5l.49-.51L7.99 4.7c.16.21.3.29.51.29a.49.49 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.29 2.3 8.82.87C8.95.73 9 .62 9 .47A.47.47 0 0 0 8.52 0c-.17 0-.3.07-.44.22L6.06 2.25h-.03V.54C6.03.2 5.83 0 5.5 0S5 .2 5 .54v3.92c0 .34.19.54.51.54M2 0c-.35 0-.67.06-.95.17a1.5 1.5 0 0 0-.66.49c-.15.2-.23.44-.23.7 0 .43.21.76.62 1-.23.11-.41.26-.55.44-.15.2-.23.44-.23.71 0 .29.08.55.25.78.18.23.41.4.71.52.3.13.65.19 1.04.19s.73-.06 1.03-.19c.3-.12.54-.3.71-.52a1.26 1.26 0 0 0 .03-1.49 1.45 1.45 0 0 0-.55-.44c.4-.23.62-.57.62-1a1.14 1.14 0 0 0-.24-.7 1.44 1.44 0 0 0-.66-.49A2.4 2.4 0 0 0 2 0m-.57.96C1.56.86 1.75.8 2 .8s.43.06.56.16a.51.51 0 0 1 .2.43c0 .2-.06.34-.2.44A.87.87 0 0 1 2 2a.9.9 0 0 1-.57-.16.52.52 0 0 1-.2-.44c0-.18.06-.32.2-.43ZM1.08 3.5a.6.6 0 0 1 .24-.5c.16-.13.38-.2.68-.2s.52.07.68.2a.6.6 0 0 1 .24.5.63.63 0 0 1-.24.52c-.16.12-.38.19-.68.19s-.52-.07-.68-.19a.64.64 0 0 1-.24-.52"></path></svg>');function jf(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=by();io(o,()=>Xe({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=T(o);oi(r,()=>{var a;return(a=e.children)!=null?a:bt}),ti(),S(o),_(t,o)}var $y=ke('<svg><!><path d="M5.52 5h1.1C8.1 5 9 4.07 9 2.5S8.1 0 6.62 0h-1.1C5.19 0 5 .2 5 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47C7.41.85 8 1.47 8 2.5c0 1.07-.58 1.65-1.5 1.65zM.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S4 4.8 4 4.46V.54C4 .2 3.8 0 3.48 0s-.51.2-.51.54v1.53H1.03V.54C1.03.2.84 0 .52 0S0 .2 0 .54v3.99c0 .34.2.47.52.47"></path></svg>');function Xf(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=$y();io(o,()=>Xe({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img"},i));var r=T(o);oi(r,()=>{var a;return(a=e.children)!=null?a:bt}),ti(),S(o),_(t,o)}var yy=ke('<svg><!><path d="M9.52 5h1.1C12.1 5 13 4.07 13 2.5S12.1 0 10.62 0h-1.1C9.19 0 9 .2 9 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zM4.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S8 4.8 8 4.46V.54C8 .2 7.8 0 7.48 0s-.51.2-.51.54v1.53H5.03V.54C5.03.2 4.84 0 4.52 0S4 .2 4 .54v3.99c0 .34.2.47.52.47m-4 0c.32 0 .51-.2.51-.54V3h1.33c.27 0 .45-.15.45-.41 0-.25-.18-.4-.45-.4H1.03V.84h1.5C2.81.85 3 .7 3 .43S2.8 0 2.53 0H.52C.19 0 0 .2 0 .54v3.92C0 4.8.2 5 .52 5"></path></svg>');function Zf(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=yy();io(o,()=>Xe({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img"},i));var r=T(o);oi(r,()=>{var a;return(a=e.children)!=null?a:bt}),ti(),S(o),_(t,o)}var xy=ke('<svg><!><path d="M11.52 5.75h1.1c1.48 0 2.38-.94 2.38-2.5s-.9-2.5-2.38-2.5h-1.1c-.33 0-.52.2-.52.54V5.2c0 .34.2.54.52.54Zm.51-.85V1.6h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zm-5.51.85c.32 0 .51-.2.51-.54V3.67h1.94v1.54c0 .34.19.54.51.54s.52-.2.52-.54V1.3c0-.34-.2-.54-.52-.54s-.51.2-.51.54v1.53H7.03V1.3c0-.34-.19-.54-.51-.54S6 .95 6 1.29v3.99c0 .34.2.47.52.47m-3.18-.09a4 4 0 0 1-.84.09C1.04 5.75 0 4.88 0 3.3 0 1.73 1.04.75 2.5.75S5 1.73 5 3.3c0 .87-.27 1.46-.78 1.88l.2.3a.5.5 0 0 1-.84.55zm-.52-.78-.24-.35a.5.5 0 1 1 .84-.56l.24.37c.18-.26.29-.62.29-1.04 0-1.03-.64-1.65-1.45-1.65s-1.45.62-1.45 1.65.64 1.6 1.45 1.6c.08 0 .2 0 .32-.02"></path></svg>');function Jf(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=xy();io(o,()=>Xe({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img"},i));var r=T(o);oi(r,()=>{var a;return(a=e.children)!=null?a:bt}),ti(),S(o),_(t,o)}var Vu=t=>{switch(t){case Fd.Q_720P:return Xf;case Fd.Q_1080P:return Zf;case Fd.Q_1440P:return Jf;case Fd.Q_2160P:return Yf;case Fd.Q_4320P:return jf}};var wy=ke('<path d="M12.72 2.21q1.8.07 2.41 1.96l.06.21.06.2.06.23.06.16.04.01.06-.02.14-.05.15-.07c1.42-.66 2.5-.53 3.4.44l.12.14.82 1.02c.73.96.7 2 0 3.1l-.13.19-.12.16-.14.2-.07.12-.04.05v.03l.1.06.13.07.15.09c1.39.7 1.96 1.64 1.74 2.93l-.04.19-.24 1.06c-.16.68-.28 1-.77 1.45-.48.43-1.02.61-1.73.67l-.22.02h-.2l-.25.02-.18.02.02.14v.1l.04.17c.32 1.53-.04 2.56-1.19 3.2l-.17.1-1.17.57q-1.64.73-3.02-.7l-.15-.17-.13-.15-.17-.19-.1-.1-.05-.04-.1.09-.1.1-.12.14c-.95 1.13-1.95 1.54-3.17 1.07l-.18-.08-1.05-.5-.31-.17a2 2 0 0 1-1-1.06 3 3 0 0 1-.16-1.88l.04-.23.04-.24.02-.17-.1-.02-.15-.01h-.18c-1.56-.04-2.48-.62-2.85-1.89l-.05-.18-.3-1.28q-.33-1.77 1.37-2.78l.2-.11.17-.1.22-.12.15-.1v-.02l-.06-.1-.08-.13-.1-.14c-.94-1.25-1.04-2.34-.28-3.4L4 6.32l.82-1.01c.8-.92 1.8-1.1 3.04-.64l.2.08.19.08.22.1.13.04.04-.01.03-.1.05-.13.04-.17c.36-1.43 1.09-2.24 2.4-2.35h1.58Zm-.05 1.8h-1.34l-.14.01c-.28.04-.47.2-.65.83l-.04.16-.06.2a6 6 0 0 1-.46 1.14 6 6 0 0 0-1.15.56 7 7 0 0 1-1.16-.35l-.35-.16q-.37-.15-.59-.17h-.08a.6.6 0 0 0-.4.19l-.08.07-.78.98-.1.12c-.18.26-.2.5.2 1.08l.22.31q.34.48.6 1.1-.2.59-.27 1.2-.51.45-1.01.73l-.34.18c-.62.34-.7.56-.65.88l.01.08.28 1.21.04.16c.1.3.27.47.97.5l.39.02q.57.03 1.22.2.35.53.78.97a6 6 0 0 1-.12 1.45c-.2.95-.01 1.1.38 1.3l1.13.54a1 1 0 0 0 .34.1l.06-.01q.26-.03.67-.49l.26-.3q.4-.42.95-.83l.3.02.3.01h.3l.3-.03q.56.4.95.84l.26.3c.32.36.53.48.73.48h.07l.18-.05.09-.04 1.13-.54.14-.08c.3-.17.42-.4.24-1.22a6 6 0 0 1-.12-1.45q.44-.45.78-.97a7 7 0 0 1 1.22-.2l.39-.01c.81-.04.91-.26 1-.66l.27-1.15c.09-.4.1-.64-.62-1.03l-.34-.18a6 6 0 0 1-1.01-.73 6 6 0 0 0-.27-1.2q.26-.62.6-1.1l.22-.31c.4-.58.38-.81.2-1.08l-.05-.06-.78-.97c-.14-.18-.26-.3-.46-.33h-.07q-.23 0-.67.17l-.35.16a6 6 0 0 1-1.16.35 6 6 0 0 0-1.15-.56 7 7 0 0 1-.45-1.1l-.11-.4c-.2-.68-.4-.81-.72-.83zM12 8.2a3.8 3.8 0 1 1 0 7.6 3.8 3.8 0 0 1 0-7.6m0 1.8a2 2 0 1 0 0 4 2 2 0 0 0 0-4"></path>');function em(t,e){Ze(t,{get testId(){return e.testId},children:(i,o)=>{var r=wy();_(i,r)},$$slots:{default:!0}})}var Sy=ke('<path d="M13.25 2.83c.23.75.38 1.5 1.63 2.23 1.4.38 2.08 0 2.72-.42.66-.45.86-.32 1.12-.06l.65.64c.29.3.4.42 0 1.18-.38.7-.8 1.33-.42 2.73.72 1.25 1.47 1.47 2.22 1.62.78.16.83.39.83.76v.9c0 .42 0 .59-.83.84-.75.23-1.5.38-2.23 1.63-.38 1.4 0 2.08.42 2.72.45.66.32.86.06 1.12l-.64.65c-.3.29-.42.4-1.18 0-.7-.38-1.34-.8-2.73-.42-1.25.72-1.47 1.47-1.62 2.22-.16.78-.39.83-.76.83h-.9c-.42 0-.59 0-.84-.83-.23-.75-.38-1.5-1.63-2.23-1.4-.38-2.08 0-2.72.42-.66.45-.86.32-1.12.06l-.65-.64c-.29-.3-.4-.42 0-1.18.38-.7.8-1.34.42-2.73-.72-1.25-1.47-1.47-2.22-1.62-.78-.16-.83-.39-.83-.76v-.9c0-.42 0-.59.83-.84.75-.23 1.5-.38 2.22-1.63.38-1.4 0-2.08-.42-2.72-.44-.66-.31-.86-.05-1.12l.64-.65c.3-.29.42-.4 1.18 0 .7.38 1.33.8 2.73.42 1.25-.72 1.47-1.47 1.62-2.22.16-.78.39-.83.76-.83h.9c.42 0 .59 0 .84.83M12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5"></path>');function tm(t,e){Ze(t,{get testId(){return e.testId},children:(i,o)=>{var r=Sy();_(i,r)},$$slots:{default:!0}})}var Ty=L('<div aria-hidden="true"><!> <!></div>'),Iy={hash:"s-1u",code:".icon.s-1u{display:flex;height:24px;position:relative;width:24px}.icon.s-1u .pillow{position:absolute;right:-9px;top:1px}.icon.triple.s-1u .pillow{right:-13px}.icon.s-1u svg[data-testid=settings-icon--labeled] ._full{opacity:0;visibility:hidden}"};function Ud(t,e){B(e,!0),Q(t,Iy);let i=g(e,"isMobile",3,!1),o=g(e,"currentQuality",3,void 0),r=f(()=>o()?Cy(o()):""),a=f(()=>Vu(o())),l=f(()=>n(r).length>2);var d=De(),s=ae(d);{var u=p=>{em(p,{testId:"settings-mobile-icon"})},m=p=>{var v=Ty();let $;var y=T(v);{var b=C=>{let R=f(()=>`${n(r)}-pill-icon`);Gf(C,{get testId(){return n(R)},children:(k,P)=>{var E=De(),W=ae(E);Hi(W,()=>n(a),(F,U)=>{U(F,{})}),_(k,E)},$$slots:{default:!0}})};M(y,C=>{n(a)&&C(b)})}var x=A(y,2);let I=f(()=>n(a)?"settings-icon--labeled":"settings-icon");tm(x,{get testId(){return n(I)}}),S(v),O(C=>$=ie(v,1,"icon s-1u",null,$,C),[()=>({triple:n(l)})]),_(p,v)};M(s,p=>{i()?p(u):p(m,!1)})}_(t,d),H()}var Ey=L('<span class="settings-icon-wrapper s-21"><!></span>'),Py={hash:"s-21",code:".settings-icon-wrapper.s-21{height:24px;position:relative;width:24px}"};function Fl(t,e){B(e,!0),Q(t,Py);let[i,o]=Be(),r=()=>w(u,"$settingsMenuVisible",i),a=()=>w(v,"$isMobile",i),l=()=>w(s,"$currentQuality",i),d=ye(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,m=d.actions.internal.openSettingsMenu,p=d.actions.internal.closeSettingsMenu,v=d.ui.isMobile,$=d.ui.t,y=K(void 0);He(()=>{n(y)&&Et(()=>{e.ref$.set(n(y))})});let b=$("aria_label_settings");function x(C){return _t(this,null,function*(){let R=la(C);r()?p():m(R,mo)})}let I=f(()=>r()?"opened":"");zt(t,{get className(){return n(I)},testId:"settings-btn",click:x,get ariaLabel(){return b},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(C){D(y,C,!0)},children:(C,R)=>{var k=Ey(),P=T(k);Ud(P,{get isMobile(){return a()},get currentQuality(){return l()}}),S(k),_(C,k)},$$slots:{default:!0}}),H(),o()}var Ay=ke('<path d="M6.56 4.44a1.5 1.5 0 1 0-2.12 2.12l3.09 3.09a11 11 0 0 0-2.39 3.08 11 11 0 0 0-1.01 4.14C4 18.43 4 20.37 4 22.83v2.34c0 2.46 0 4.4.13 5.96.13 1.6.4 2.93 1.01 4.14a10.5 10.5 0 0 0 4.6 4.59c1.2.61 2.53.88 4.13 1.01 1.56.13 3.5.13 5.96.13h8.34c2.46 0 4.4 0 5.96-.13 1.44-.12 2.66-.35 3.78-.84l3.53 3.53a1.5 1.5 0 0 0 2.12-2.12zM13.5 28a1.5 1.5 0 0 0 0 3h11a1.5 1.5 0 0 0 0-3zM12 22a1.5 1.5 0 0 1 1.5-1.5h4a1.5 1.5 0 0 1 0 3h-4A1.5 1.5 0 0 1 12 22"></path><path d="M34.5 23.5h-4.64l12.55 12.55q.23-.37.45-.78a11 11 0 0 0 1.01-4.14c.13-1.56.13-3.5.13-5.96v-2.34c0-2.46 0-4.4-.13-5.96a11 11 0 0 0-1.01-4.14 10.5 10.5 0 0 0-4.6-4.59 11 11 0 0 0-4.13-1.01C32.57 7 30.63 7 28.17 7h-8.34c-2.46 0-4.4 0-5.96.13l-.35.03L26.86 20.5h7.64a1.5 1.5 0 0 1 0 3"></path>',1),ky=ke("<path></path>");function ca(t,e){B(e,!0);let i=f(()=>`subtitles-icon${e.type==="off"?"-off":e.type==="outline"?"-outline":""}`),o=f(()=>un(e.size));Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(i)},get shadow(){return e.shadow},children:(r,a)=>{var l=De(),d=ae(l);{var s=m=>{var p=Ay();ti(),_(m,p)},u=m=>{var p=ky();O(()=>Oe(p,"d",`M16.92 8h14.16q2.82-.02 4.66.1c1.28.1 2.4.32 3.46.86a8.8 8.8 90 013.84 3.84c.54 1.04.76 2.18.86 3.46q.12 1.84.1 4.66v6.16q.02 2.82-.1 4.66a10 10 90 01-.86 3.46 8.8 8.8 90 01-3.84 3.84 10 10 90 01-3.46.86q-1.84.12-4.66.1H16.92q-2.82.02-4.66-.1a10 10 90 01-3.46-.86 8.8 8.8 90 01-3.84-3.84 10 10 90 01-.86-3.46Q4 29.9 4 27.08v-6.16q-.02-2.82.1-4.66c.1-1.28.32-2.4.86-3.46A8.8 8.8 90 018.8 8.96a10 10 90 013.46-.86Q14.1 8 16.92 8
|
|
56
|
+
Audio: ${(Ie=n(r).audioCodec||"")!=null?Ie:""} ${n(r).audioLanguage?`(${n(r).audioLanguage})`:""}`)}),$(Te,G)};M(ee,Te=>{(n(r).videoCodec||n(r).audioCodec)&&Te($e)})}var Ee=A(ee,2);{var ce=Te=>{var G=M0(),Ne=A(C(G),2),be=C(Ne,!0);S(Ne),S(G),O(()=>he(be,n(r).viewport)),$(Te,G)};M(Ee,Te=>{n(r).viewport&&Te(ce)})}var Qe=A(Ee,2);{var fe=Te=>{var G=V0(),Ne=A(C(G),2),be=C(Ne,!0);S(Ne),S(G),O(()=>he(be,n(r).videoSize)),$(Te,G)};M(Qe,Te=>{n(r).videoSize&&Te(fe)})}var ve=A(Qe,2);{var X=Te=>{var G=R0(),Ne=A(C(G),2),be=C(Ne,!0);S(Ne),S(G),O(()=>he(be,n(r).cdn)),$(Te,G)};M(ve,Te=>{n(r).cdn&&Te(X)})}var N=A(ve,2);{var me=Te=>{var G=D0(),Ne=A(C(G),2),be=C(Ne);S(Ne),S(G),O(()=>{var Oe;return he(be,`${(Oe=n(r).volume)!=null?Oe:""} %`)}),$(Te,G)};M(N,Te=>{n(r).volume&&Te(me)})}var ue=A(N,2);{var Re=Te=>{var G=O0(),Ne=A(C(G),2),be=C(Ne);S(Ne),S(G),O(Oe=>he(be,`${Oe!=null?Oe:""} s`),[()=>n(r).position.toFixed(2)]),$(Te,G)};M(ue,Te=>{n(r).position&&Te(Re)})}var Je=A(ue,2);{var ke=Te=>{var G=N0(),Ne=A(C(G),2),be=C(Ne);S(Ne),S(G),O(Oe=>he(be,`${Oe!=null?Oe:""} s`),[()=>n(r).buffer.toFixed(2)]),$(Te,G)};M(Je,Te=>{n(r).buffer&&Te(ke)})}var j=A(Je,2);{var ne=Te=>{var G=B0(),Ne=A(C(G),2),be=C(Ne);S(Ne),S(G),O(Oe=>he(be,`${Oe!=null?Oe:""} s`),[()=>n(r).nativeBuffer.toFixed(2)]),$(Te,G)};M(j,Te=>{n(r).nativeBuffer&&Te(ne)})}var Se=A(j,2);{var Le=Te=>{var G=H0(),Ne=A(C(G),2),be=C(Ne);S(Ne),S(G),O(Oe=>he(be,`${Oe!=null?Oe:""} s`),[()=>n(r).liveLatency.toFixed(2)]),$(Te,G)};M(Se,Te=>{n(r).liveLatency&&Te(Le)})}var ze=A(Se,2);{var Ce=Te=>{var G=F0(),Ne=A(C(G),2),be=C(Ne,!0);S(Ne),S(G),O(Oe=>he(be,Oe),[()=>[{value:n(r).currentVideoSegmentLength,title:"Video:"},{value:n(r).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Oe})=>Oe).map(({value:Oe,title:Ie})=>`${Ie} ${((Oe!=null?Oe:0)/1e3).toFixed(2)} s`).join(" & ")]),$(Te,G)};M(ze,Te=>{(n(r).currentVideoSegmentLength||n(r).currentAudioSegmentLength)&&Te(Ce)})}var we=A(ze,2),Fe=A(C(we),2),rt=C(Fe);S(Fe),S(we);var ut=A(we,2);{var Mt=Te=>{var G=U0(),Ne=A(C(G),2);Kd(Ne,{get values(){return n(I)}});var be=A(Ne,2),Oe=C(be);S(be),S(G),O(Ie=>he(Oe,`${Ie!=null?Ie:""} Kbps`),[()=>n(r).speed.toFixed(2)]),$(Te,G)};M(ut,Te=>{n(r).speed&&Te(Mt)})}var lt=A(ut,2);{var ni=Te=>{var G=z0(),Ne=A(C(G),2);Kd(Ne,{get values(){return n(T)}});var be=A(Ne,2),Oe=C(be);S(be),S(G),O(Ie=>he(Oe,`${Ie!=null?Ie:""} Kbps`),[()=>n(r).bitrate.toFixed(2)]),$(Te,G)};M(lt,Te=>{n(r).bitrate&&Te(ni)})}var wt=A(lt,2),Rt=A(C(wt),2);Kd(Rt,{get values(){return n(w)}});var Dt=A(Rt,2),Qt=C(Dt,!0);S(Dt),S(wt),S(W),S(k),O(Te=>{var G,Ne;P=te(k,1,"container s-n",null,P,Te),De(k,"aria-label",R),he(Y,n(r).version),he(rt,`${(G=n(f))!=null?G:""} / ${(Ne=n(p))!=null?Ne:""} frames`),he(Qt,n(v))},[()=>({"container-mobile":s()})]),$(t,k),H(),o()}Ze(["click"]);import{noop as Q0}from"@vkontakte/videoplayer-shared/es2015";var q0=(t,e)=>{t.stopPropagation(),e()()},G0=L('<div class="close s-y"></div>'),Y0={hash:"s-y",code:'.close.s-y{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-y:hover{opacity:1}.close.s-y:after,.close.s-y:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-y:before{transform:rotate(45deg)}.close.s-y:after{transform:rotate(-45deg)}'};function Hs(t,e){B(e,!0),Q(t,Y0);let i=g(e,"onClick",3,Q0);var o=G0();o.__click=[q0,i],$(t,o),H()}Ze(["click"]);import{noop as X0}from"@vkontakte/videoplayer-shared/es2015";var dn=t=>`width:${t}px;height:${t}px;`;var j0=Ae('<path d="m14.4 8.76 24.02 13.85a1.6 1.6 0 0 1 0 2.78L14.4 39.24a1.6 1.6 0 0 1-2.4-1.39v-27.7a1.6 1.6 0 0 1 2.4-1.39"></path>');function Dn(t,e){B(e,!0);let i=m(()=>dn(e.size));je(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"play-icon",get shadow(){return e.shadow},children:(o,s)=>{var a=j0();$(o,a)},$$slots:{default:!0}}),H()}var Z0=L('<div class="timer s-x"><canvas class="timer-canvas s-x" width="100" height="100"></canvas> <!></div>'),J0={hash:"s-x",code:".timer.s-x{align-items:center;background:rgba(31,31,31,.65);border-radius:50%;display:flex;height:50px;justify-content:space-around;transition:background .2s;width:50px}.timer.s-x:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-x{height:50px;position:absolute;width:50px}"};function qd(t,e){B(e,!0),Q(t,J0);let i=g(e,"isRunning",3,!0),o=g(e,"onTimerEnded",3,X0),s=5e3,a=K(void 0),l,d,r=0,u;He(()=>{i()&&Et(()=>{d=Date.now(),r=requestAnimationFrame(f)})});let p=()=>{r&&(cancelAnimationFrame(r),r=0)},f=()=>{p(),i()&&(u=(Date.now()-d)/s,u<1?(l==null||l.clearRect(0,0,100,100),l==null||l.beginPath(),l==null||l.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*u),l==null||l.stroke(),r=requestAnimationFrame(f)):o()())};kt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),ln(()=>{p()});var v=Z0(),b=C(v);it(b,_=>D(a,_),()=>n(a));var y=A(b,2);Dn(y,{get size(){return"24"}}),S(v),$(t,v),H()}var ey=(t,e,i)=>{e(!1),i()},ty=L('<div class="overlay s-1f"></div> <div class="next-video s-1f"><div class="top s-1f"><div class="caption s-1f"> </div> <!></div> <div class="row s-1f"><div class="column s-1f"><div class="thumb s-1f"><div></div> <!></div></div> <div class="column s-1f"><div class="title s-1f"> </div></div></div></div>',1),iy={hash:"s-1f",code:".overlay.s-1f{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-1f{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-1f{display:flex;justify-content:space-between}.caption.s-1f{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-1f{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-1f{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-1f{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-1f,.thumb-overlay.s-1f{height:100%;width:100%}.thumb-overlay.s-1f{position:absolute}.thumb-overlay.withOpacity.s-1f{background:var(--black);opacity:.3}.title.s-1f{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Kf(t,e){B(e,!0),Q(t,iy);let[i,o]=Be(),s=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(r,"$timerNextVideoRunning$",i),l=xe(),d=l.ui.autoplayNextEnabled$,r=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,p=l.actions.internal.nextVideoAnnouncementShow,f=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,b=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{s()&&(u(!1),v())},_=()=>{e.clickCloseIcon(),b()};kt(()=>{e.isHide||p(),e.isHide&&s()&&(u(!1),v())});var w=Ve(),I=le(w);{var T=R=>{var k=ty(),P=A(le(k),2),E=C(P),W=C(E),U=C(W,!0);S(W);var z=A(W,2);Hs(z,{onClick:_}),S(E);var Y=A(E,2);Y.__click=[ey,u,f];var ie=C(Y),J=C(ie),oe=C(J);let de;var ae=A(oe,2);{var pe=ce=>{let Qe=m(()=>a()&&s());qd(ce,{get isRunning(){return n(Qe)},onTimerEnded:y})};M(ae,ce=>{s()&&ce(pe)})}S(J),S(ie);var ee=A(ie,2),$e=C(ee),Ee=C($e,!0);S($e),S(ee),S(Y),S(P),O((ce,Qe)=>{he(U,ce),Ke(J,`background-image: url('${e.thumb}')`),de=te(oe,1,"thumb-overlay s-1f",null,de,Qe),he(Ee,e.title)},[()=>q("end_screen_next_video"),()=>({withOpacity:s()})]),$(R,k)};M(I,R=>{e.isHide||R(T)})}$(t,w),H(),o()}Ze(["click"]);import{PlaybackState as Ua}from"@vkontakte/videoplayer-core/es2015";import{checkNever as ny}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Zn}from"@vkontakte/videoplayer-statistics/es2015";var Qf=(t,e)=>Math.min(+(t+e).toFixed(2),1),qf=(t,e)=>Math.max(+(t-e).toFixed(2),0),Ru=(t,e,i)=>{let o=Qf(e,i);e<1&&t.actions.internal.setVolume(o)},Du=(t,e,i)=>{let o=qf(e,i);e>0&&t.actions.internal.setVolume(o)};var fa=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:s})=>t?i?!0:(o==null||o(),!1):e?!0:(s==null||s(),!1);function Ou(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var ry=(t,e)=>{e(t)},sy=L('<div class="keyboard-controls s-1b" tabindex="-1" role="region"><!></div>'),ay={hash:"s-1b",code:".keyboard-controls.s-1b{bottom:0;left:0;position:absolute;right:0;top:0}"};function Gf(t,e){var be,Oe;B(e,!0),Q(t,ay);let[i,o]=Be(),s=()=>x(ae,"$disabledControls$",i),a=()=>x(ke,"$isInteractiveTime$",i),l=()=>x(j,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>x(z,"$playbackState$",i),r=()=>x(X,"$isEnded$",i),u=()=>x(fe,"$doubleForwardAvailable$",i),p=()=>x(Qe,"$doubleForwardOn$",i),f=()=>x(N,"$overlayContainer$",i),v=()=>x(ie,"$adPlaybackState",i),b=()=>x(J,"$positionExact$",i),y=()=>x(oe,"$duration$",i),_=()=>x(Re,"$isAudioAvailable$",i),w=()=>x(de,"$volume$",i),I=()=>x(Y,"$canChangePlaybackSpeed$",i),T=()=>x(pe,"$muted$",i),R=()=>x(ee,"$currentSubtitle$",i),k=g(e,"nextButtonActive",3,!1),P=g(e,"prevButtonActive",3,!1),E=xe(),W=Lt(),U=E.getLogger().createComponentLog("KeyboardControls component"),z=E.state.playbackState$,Y=E.state.canChangePlaybackSpeed$,ie=E.ads.playbackState,J=E.state.positionExact$,oe=E.state.duration$,de=E.state.volume$,ae=E.ui.controls.disabledControls$,pe=E.state.muted$,ee=E.state.currentSubtitle$,$e=E.ui.contextMenu.openedByHotKey$,Ee=E.ui.contextMenu.lastActiveElem$,ce=E.ui.contextMenu.visible$,Qe=E.ui.doubleForwardOn$,fe=E.ui.doubleForwardAvailable$,ve=E.ui.contextMenu.position$,X=E.state.isEnded$,N=E.ui.overlayContainer$,me=(be=E.callbacks)==null?void 0:be.onAudioDoesNotExistHint,ue=(Oe=E.callbacks)==null?void 0:Oe.onAudioDisabledHint,Re=E.state.isAudioAvailable$,Je=E.state.isAudioDisabled,ke=E.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:j}=_o(),ne=0,Se=!0,Le=K(void 0),ze=Ie=>(Ie!==Se&&(Se=Ie,ne=0),ne+=1,(W.controls.seekStepKeyboard+W.controls.seekStepKeyboard*ne)/1e3),Ce=!0,we=()=>{if(!s().has("PLAY_BUTTON"))if(a()&&l()&&j.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{E.actions.internal.togglePlay();let Ie="PLAY";d()===Ua.PAUSED?Ie="PAUSE":r()&&(Ie="REPLAY"),e.showHotKeyHelpers({type:Ie})}},Fe=Ie=>{if(!u()||!Ie&&p()){we(),e.stopDoubleForward(),Ce=!0;return}Ce=!1,!Ie&&e.startDoubleForwardActivationTimer()},rt=()=>{Ce||(p()||we(),e.stopDoubleForward(),Ce=!0)},ut=Ie=>{Ie!=="Space"&&e.stopDoubleForward()},Mt=Ie=>{let ht=F_(f());ve.set(ht),Ee.set(Ie.target),$e.set(!0),ce.set(!0)},lt=(Ie,ht=!1)=>{var di,Ji;let ye=Ie.target,qe=(di=ye==null?void 0:ye.getAttribute("role"))==null?void 0:di.includes("menuitem"),Ue=ye.classList.contains("btn"),st=Ie.code;if(Ue&&st==="Space")return!1;let qt=Hh.has(st);if(qe&&qt)return!1;let Pt=!Bh.has(st);if(Ie.ctrlKey&&Pt||Ie.altKey&&Pt||Ie.metaKey)return!1;let Yt=qe&&st==="Escape";Fh.has(st)||Yt||e.hideContextMenu();let bi=d()===Ua.PLAYING||d()===Ua.PAUSED,Mi=e.isAds&&(v()==="paused"||v()==="playing"),Ai=!Mi&&!s().has("TIMELINE"),Zi=Ie.shiftKey&&["Digit1","Numpad1"].includes(st);if(!Zi&&!(bi||Mi))return!1;U({message:`key down, code: ${st}, isExternal = ${ht}`});let si=!1,pt=()=>{si=!0,ht||Ie.preventDefault()};if(ut(st),Zi)return Mt(Ie),pt(),!0;switch(st){case"KeyJ":case"ArrowLeft":{if(!Ai)break;if(Ie.ctrlKey||Ie.altKey){let It=E.actions.internal.getPrevEpisode();E.actions.internal.seekToPrevEpisode(It),It&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:It.text}),pt()}else{let It=Ie.shiftKey?ze(!1):W.controls.seekStepKeyboard/1e3,gi=Math.max(b()-It,0);b()>0&&(E.actions.internal.seekTime(gi,Zn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:It.toString()}),pt())}break}case"KeyL":case"ArrowRight":{if(!Ai)break;if(Ie.ctrlKey||Ie.altKey){let It=E.actions.internal.getNextEpisode();E.actions.internal.seekToNextEpisode(It),It&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:It.text}),pt()}else{let It=Ie.shiftKey?ze(!0):W.controls.seekStepKeyboard/1e3,gi=Math.min(b()+It,y());Math.round(b())<Math.round(y())&&(E.actions.internal.seekTime(gi,Zn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:It.toString()}),pt())}break}case"ArrowUp":{if(fa({isAudioDisabled:Je,audioDisabledHintCallback:ue,isAudioAvailable:_(),audioIsNotExistHintCallback:me,isAds:e.isAds})){let It=w(),gi=W.controls.volumeStepKeyboard,ui=It<=1;if(Ru(E,It,gi),ui){let We=Math.round(Qf(It,gi)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:We}})}}pt();break}case"ArrowDown":{if(fa({isAudioDisabled:Je,audioDisabledHintCallback:ue,isAudioAvailable:_(),audioIsNotExistHintCallback:me,isAds:e.isAds})){let It=w(),gi=W.controls.volumeStepKeyboard,ui=It>=0;if(Du(E,It,gi),ui){let We=Math.round(qf(It,gi)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:We}})}}pt();break}case"Comma":{if(Ie.shiftKey){if(!p()&&I()){let It=E.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:It==null?void 0:It.displayValue}),pt()}}else{if(Mi||d()!==Ua.PAUSED)break;let It=Math.max(b()-W.controls.seekStepFrame/1e3,0);b()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),E.actions.internal.clearDelayedBufferingCheckTimeout(),E.actions.internal.seekTime(It,Zn.DOUBLE_TAP),pt())}break}case"Period":{if(Ie.shiftKey){if(!p()&&I()){let It=E.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:It==null?void 0:It.displayValue}),pt()}}else{if(Mi||d()!==Ua.PAUSED)break;let It=Math.min(b()+W.controls.seekStepFrame/1e3,y());b()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),E.actions.internal.clearDelayedBufferingCheckTimeout(),E.actions.internal.seekTime(It,Zn.DOUBLE_TAP),pt())}break}case"KeyK":we(),pt();break;case"Space":Fe(Ie.repeat),pt();break;case"KeyM":{fa({isAudioDisabled:Je,audioDisabledHintCallback:ue,isAudioAvailable:_(),audioIsNotExistHintCallback:me,isAds:e.isAds})&&(e.showHotKeyHelpers({type:T()?"VOLUME":"MUTE"}),E.actions.internal.toggleMuted()),pt();break}case"KeyF":e.toggleFullscreen(),pt();break;case"KeyC":E.actions.internal.toggleSubtitle(),R().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(Ji=R())==null?void 0:Ji.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),pt();break;case"KeyI":E.actions.internal.togglePictureInPicture(),pt();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.1,Zn.DOUBLE_TAP),pt();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.2,Zn.DOUBLE_TAP),pt();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.3,Zn.DOUBLE_TAP),pt();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.4,Zn.DOUBLE_TAP),pt();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.5,Zn.DOUBLE_TAP),pt();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.6,Zn.DOUBLE_TAP),pt();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.7,Zn.DOUBLE_TAP),pt();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.8,Zn.DOUBLE_TAP),pt();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.9,Zn.DOUBLE_TAP),pt();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(0,Zn.DOUBLE_TAP),pt();break;case"Slash":{Ie.shiftKey&&W.features.hotKeyMapModal&&(e.showKeyMap(),pt());break}case"KeyN":Ie.shiftKey&&k()&&(E.actions.internal.nextVideoClick(),pt());break;case"KeyP":Ie.shiftKey&&P()&&(E.actions.internal.prevVideoClick(),pt());break;case"ShiftLeft":case"ShiftRight":pt();break;case"Tab":case"Escape":case"Enter":break;default:ny(st);break}return si},ni=Ie=>{let ht=Ie.code;if(Ie.ctrlKey||Ie.altKey||Ie.metaKey)return;let ye=d()===Ua.PLAYING||d()===Ua.PAUSED,qe=e.isAds&&(v()==="paused"||v()==="playing");if(ye||qe)switch(ht){case"ShiftLeft":case"ShiftRight":ne=0;break;case"Space":rt();break}},wt=q("aria_label_video_player"),Rt=()=>{var Ie;return(Ie=n(Le))==null?void 0:Ie.focus()},Dt=()=>n(Le)===Ou(),Qt=Ie=>Ie.type==="keydown"?lt(Ie,!0):(Ie.type==="keyup"&&ni(Ie),!1);var Te=sy();Te.__keyup=ni,Te.__keydown=[ry,lt];var G=C(Te);ei(G,()=>{var Ie;return(Ie=e.children)!=null?Ie:$t}),S(Te),it(Te,Ie=>D(Le,Ie),()=>n(Le)),O(()=>De(Te,"aria-label",wt)),$(t,Te);var Ne=H({focus:Rt,isFocused:Dt,handleExternalKeyboardEvent:Qt});return o(),Ne}Ze(["keyup","keydown"]);var ly=L('<div class="container s-o"><div class="dot s-o"></div> <div class="dot s-o"></div> <div class="dot s-o"></div></div>'),dy={hash:"s-o",code:".container.s-o{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-o:first-child{animation-delay:0s}.dot.s-o:nth-child(2){animation-delay:.18s}.dot.s-o:nth-child(3){animation-delay:.36s}@keyframes s-o-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-o{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-o-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-o+.dot:where(.s-o){margin-left:4px}"};function za(t,e){Q(t,dy);let i=g(e,"style",3,"");var o=ly();O(()=>Ke(o,i())),$(t,o)}var cy=Ae('<path d="M5.26 5.26a.9.9 0 0 1 1.28 0L12 10.73l5.46-5.47a.9.9 0 0 1 1.28 1.28L13.27 12l5.47 5.46a.9.9 0 1 1-1.28 1.28L12 13.27l-5.46 5.47a.9.9 0 1 1-1.28-1.28L10.73 12 5.26 6.54a.9.9 0 0 1 0-1.28Z"></path>');function Yf(t,e){je(t,{get fill(){return e.fill},children:(i,o)=>{var s=cy();$(i,s)},$$slots:{default:!0}})}import{noop as Ul}from"@vkontakte/videoplayer-shared/es2015";var uy=t=>{t.stopPropagation()},py=L("<button><!></button>"),fy={hash:"s-1t",code:"button.btn.s-1t{align-items:center;display:flex;flex-direction:row;height:var(--controls-height);justify-content:center;margin:0;padding:8px;will-change:opacity}button.w-max.s-1t{width:100%}button.btn--live.s-1t{padding:10px 4px}button.btn-jc-l.s-1t{justify-content:left}button.btn-m.s-1t{background-color:rgba(0,0,0,.56);border-radius:12px;height:44px;left:12px;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}button.btn-m.s-1t,button.btn-m--play.s-1t{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1t{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1t,button.btn-m--prev.s-1t{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1t{right:calc(100% + 35px)}button.btn-m--next.s-1t{left:calc(100% + 35px)}button.btn.s-1t:disabled{cursor:default;pointer-events:none}button.btn.s-1t:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1t:not(:disabled):hover{opacity:.8}button.pr-0.s-1t{padding-right:0}button.pl-0.s-1t{padding-left:0}"};function Ht(t,e){B(e,!0),Q(t,fy);let i=g(e,"className",3,""),o=g(e,"style",3,""),s=g(e,"disabled",3,void 0),a=g(e,"testId",3,void 0),l=g(e,"ariaHidden",3,void 0),d=g(e,"ariaLabel",3,void 0),r=g(e,"ref",15,void 0),u=g(e,"ariaKeyShortCut",3,void 0),p=g(e,"ariaExpanded",3,void 0),f=g(e,"tabIndex",3,0),v=g(e,"click",3,Ul),b=g(e,"focus",3,Ul),y=g(e,"blur",3,Ul),_=m(()=>v()===Ul?null:k=>{k.stopPropagation(),v()(k)}),w=m(()=>b()===Ul?null:k=>{k.preventDefault(),b()()}),I=m(()=>y()===Ul?null:k=>{k.preventDefault(),y()()});var T=py();T.__pointerdown=[uy],T.__click=function(...k){var P;(P=n(_))==null||P.apply(this,k)};var R=C(T);ei(R,()=>{var k;return(k=e.children)!=null?k:$t}),S(T),it(T,k=>r(k),()=>r()),O(()=>{var k,P,E,W,U,z,Y,ie;te(T,1,`btn ${(k=i())!=null?k:""}`,"s-1t"),Ke(T,o()||null),T.disabled=(P=s())!=null?P:null,De(T,"aria-hidden",(E=l())!=null?E:null),De(T,"aria-label",(W=d())!=null?W:null),De(T,"aria-keyshortcuts",(U=u())!=null?U:null),De(T,"aria-expanded",(z=p())!=null?z:null),De(T,"data-testid",(Y=a())!=null?Y:null),De(T,"tabindex",f()),De(T,"role",e.role),De(T,"aria-checked",(ie=e.areaChecked)!=null?ie:null)}),vt("focus",T,function(...k){var P;(P=n(w))==null||P.apply(this,k)}),vt("blur",T,function(...k){var P;(P=n(I))==null||P.apply(this,k)}),$(t,T),H()}Ze(["pointerdown","click"]);var my=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},vy=L('<div class="modal-header s-1l"><h3 class="modal-title s-1l"> </h3> <!></div>'),gy=L('<div class="modal-overlay s-1l"><div class="modal-container s-1l" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-1l" tabindex="0" role="scrollbar"><div class="modal-main s-1l"><!></div></div></div></div>'),hy={hash:"s-1l",code:'.modal-overlay.s-1l{align-items:center;background:transparent;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:var(--modal-z-index)}.modal-container.s-1l{background:var(--mobile-settings-bg);border-radius:8px;color:var(--white);display:flex;flex-direction:column;height:calc(100% - 24px);max-height:490px;max-width:600px;width:calc(100% - 32px)}.modal-header.s-1l{align-items:start;border-bottom:1px solid var(--white-alpha-24);box-sizing:border-box;display:flex;height:40px;justify-content:space-between;padding:8px 10px}.modal-title.s-1l{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px;margin:3px 0 0 6px}.modal-scroll.s-1l{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-1l::-webkit-scrollbar{width:8px}.modal-scroll.s-1l::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-1l::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-1l::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-1l{margin:-8px -4px 0 0}'};function jf(t,e){B(e,!0),Q(t,hy);let i=g(e,"showHeader",3,!0),o=g(e,"showCloseCross",3,!0),s=K(void 0),a=K(void 0),{webApi:{focusManager:l}}=xe(),d=q("hotkey_map_modal_close_btn_text");kt(()=>{var _;return(_=n(s))==null||_.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var r=gy();r.__keydown=[my,e];var u=C(r),p=C(u);{var f=_=>{var w=vy(),I=C(w),T=C(I,!0);S(I);var R=A(I,2);{var k=P=>{Ht(P,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(E,W)=>{Yf(E,{fill:"currentColor"})},$$slots:{default:!0}})};M(R,P=>{o()&&P(k)})}S(w),O(()=>he(T,e.title)),$(_,w)};M(p,_=>{i()&&_(f)})}var v=A(p,2),b=C(v),y=C(b);ei(y,()=>{var _;return(_=e.children)!=null?_:$t}),S(b),S(v),it(v,_=>D(s,_),()=>n(s)),S(u),it(u,_=>D(a,_),()=>n(a)),S(r),$(t,r),H()}Ze(["keydown"]);var _y=new Set(["BR"]),W_=t=>{var s;let e=document.createElement("DIV");e.innerHTML=t;let i=e.querySelectorAll("*"),o=i.length;for(;o--;){let a=i[o],l=a.tagName;_y.has(l)||(s=a.parentElement)==null||s.removeChild(a)}return e.innerHTML};var by=L('<li class="hot-key-map-item s-19"><span class="hot-key-map-item-description s-19"><!></span> <span class="hot-key-map-item-value s-19"> </span></li>'),$y=L('<div class="hot-key-map-group s-19"><h5 class="hot-key-map-group-title s-19"> </h5> <ul class="hot-key-map-group-items s-19"></ul></div>'),yy=L('<div class="hot-key-map s-19"></div>'),xy={hash:"s-19",code:'.hot-key-map.s-19{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-19{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-19:last-child{border-bottom:none}.hot-key-map-group-title.s-19{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px}.hot-key-map-group-title.s-19,.hot-key-map-item.s-19{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-19{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-19{align-items:center;box-sizing:border-box;display:flex;justify-content:space-between;--videoplayer-hotkey-item-value-width:156px;--videoplayer-hotkey-item-value-padding-left:24px}.hot-key-map-item-description.s-19{color:var(--white-alpha-72);max-width:388px;width:calc(100% - var(--videoplayer-hotkey-item-value-width) - var(--videoplayer-hotkey-item-value-padding-left))}.hot-key-map-item-value.s-19{color:var(--white);letter-spacing:-.14px;padding-left:var(--videoplayer-hotkey-item-value-padding-left);width:var(--videoplayer-hotkey-item-value-width)}.hot-key-map-item-description.s-19,.hot-key-map-item-value.s-19{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function Xf(t,e){B(e,!1),Q(t,xy);let[i,o]=Be(),s=()=>x(l,"$data",i),a=xe(),{data:l,show:d}=a.ui.modals.hotKeyMap,r=()=>{d.set(!1)};Yo(),jf(t,{get title(){return s().title},onClose:r,children:(u,p)=>{var f=yy();yi(f,5,()=>s().groups,({title:v,items:b})=>v,(v,b)=>{let y=()=>n(b).title,_=()=>n(b).items;var w=$y(),I=C(w),T=C(I,!0);S(I);var R=A(I,2);yi(R,5,_,({description:k,value:P})=>P,(k,P)=>{let E=()=>n(P).description,W=()=>n(P).value;var U=by(),z=C(U),Y=C(z);Td(Y,()=>W_(E())),S(z);var ie=A(z,2),J=C(ie,!0);S(ie),S(U),O(()=>he(J,W())),$(k,U)}),S(R),S(w),O(()=>he(T,y())),$(v,w)}),S(f),$(u,f)},$$slots:{default:!0}}),H(),o()}import{noop as Tb}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as $b,PlaybackState as Gm}from"@vkontakte/videoplayer-core/es2015";import{getVideoQualityLabel as Ly}from"@vkontakte/videoplayer-shared/es2015";var wy=L('<div class="pillow s-1x"><!></div>'),Sy={hash:"s-1x",code:".pillow.s-1x{background-color:#679ff8;color:var(--white);font-size:6px;font-weight:600;-webkit-font-smoothing:antialiased;border-radius:12px;padding:2px 4px}"};function Zf(t,e){Q(t,Sy);var i=wy(),o=C(i);ei(o,()=>{var s;return(s=e.children)!=null?s:$t}),S(i),O(()=>De(i,"data-testid",e.testId)),$(t,i)}import{VideoQuality as Gd}from"@vkontakte/videoplayer-shared/es2015";var Cy=Ae('<svg><!><path d="M5.52 5c.32 0 .51-.2.51-.54V3.5l.5-.51 1.46 1.74c.16.2.3.28.51.28a.5.5 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.3 2.3 8.8.87c.16-.14.2-.25.2-.4A.47.47 0 0 0 8.52 0c-.18 0-.3.07-.45.22l-2 2.03h-.04V.54C6.03.2 5.84 0 5.52 0S5 .2 5 .54v3.92c0 .34.2.54.52.54M2.55 1.05 1.05 3.1h1.5zM3.5 3.1V.83C3.5.03 2.41-.3 1.94.35L.14 2.82A.75.75 0 0 0 .75 4h1.8v.55c0 .25.25.45.5.45a.45.45 0 0 0 .45-.45V4h.05a.45.45 0 0 0 0-.9z"></path></svg>');function Jf(t,e){let i=Rn(e,["$$slots","$$events","$$legacy","children"]);var o=Cy();no(o,()=>Ye({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:$t}),Xt(),S(o),$(t,o)}var Ty=Ae('<svg><!><path d="M5.51 5c.33 0 .52-.2.52-.54V3.5l.49-.51L7.99 4.7c.16.21.3.29.51.29a.49.49 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.29 2.3 8.82.87C8.95.73 9 .62 9 .47A.47.47 0 0 0 8.52 0c-.17 0-.3.07-.44.22L6.06 2.25h-.03V.54C6.03.2 5.83 0 5.5 0S5 .2 5 .54v3.92c0 .34.19.54.51.54M2 0c-.35 0-.67.06-.95.17a1.5 1.5 0 0 0-.66.49c-.15.2-.23.44-.23.7 0 .43.21.76.62 1-.23.11-.41.26-.55.44-.15.2-.23.44-.23.71 0 .29.08.55.25.78.18.23.41.4.71.52.3.13.65.19 1.04.19s.73-.06 1.03-.19c.3-.12.54-.3.71-.52a1.26 1.26 0 0 0 .03-1.49 1.45 1.45 0 0 0-.55-.44c.4-.23.62-.57.62-1a1.14 1.14 0 0 0-.24-.7 1.44 1.44 0 0 0-.66-.49A2.4 2.4 0 0 0 2 0m-.57.96C1.56.86 1.75.8 2 .8s.43.06.56.16a.51.51 0 0 1 .2.43c0 .2-.06.34-.2.44A.87.87 0 0 1 2 2a.9.9 0 0 1-.57-.16.52.52 0 0 1-.2-.44c0-.18.06-.32.2-.43ZM1.08 3.5a.6.6 0 0 1 .24-.5c.16-.13.38-.2.68-.2s.52.07.68.2a.6.6 0 0 1 .24.5.63.63 0 0 1-.24.52c-.16.12-.38.19-.68.19s-.52-.07-.68-.19a.64.64 0 0 1-.24-.52"></path></svg>');function em(t,e){let i=Rn(e,["$$slots","$$events","$$legacy","children"]);var o=Ty();no(o,()=>Ye({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:$t}),Xt(),S(o),$(t,o)}var Iy=Ae('<svg><!><path d="M5.52 5h1.1C8.1 5 9 4.07 9 2.5S8.1 0 6.62 0h-1.1C5.19 0 5 .2 5 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47C7.41.85 8 1.47 8 2.5c0 1.07-.58 1.65-1.5 1.65zM.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S4 4.8 4 4.46V.54C4 .2 3.8 0 3.48 0s-.51.2-.51.54v1.53H1.03V.54C1.03.2.84 0 .52 0S0 .2 0 .54v3.99c0 .34.2.47.52.47"></path></svg>');function tm(t,e){let i=Rn(e,["$$slots","$$events","$$legacy","children"]);var o=Iy();no(o,()=>Ye({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:$t}),Xt(),S(o),$(t,o)}var Ey=Ae('<svg><!><path d="M9.52 5h1.1C12.1 5 13 4.07 13 2.5S12.1 0 10.62 0h-1.1C9.19 0 9 .2 9 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zM4.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S8 4.8 8 4.46V.54C8 .2 7.8 0 7.48 0s-.51.2-.51.54v1.53H5.03V.54C5.03.2 4.84 0 4.52 0S4 .2 4 .54v3.99c0 .34.2.47.52.47m-4 0c.32 0 .51-.2.51-.54V3h1.33c.27 0 .45-.15.45-.41 0-.25-.18-.4-.45-.4H1.03V.84h1.5C2.81.85 3 .7 3 .43S2.8 0 2.53 0H.52C.19 0 0 .2 0 .54v3.92C0 4.8.2 5 .52 5"></path></svg>');function im(t,e){let i=Rn(e,["$$slots","$$events","$$legacy","children"]);var o=Ey();no(o,()=>Ye({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:$t}),Xt(),S(o),$(t,o)}var Py=Ae('<svg><!><path d="M11.52 5.75h1.1c1.48 0 2.38-.94 2.38-2.5s-.9-2.5-2.38-2.5h-1.1c-.33 0-.52.2-.52.54V5.2c0 .34.2.54.52.54Zm.51-.85V1.6h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zm-5.51.85c.32 0 .51-.2.51-.54V3.67h1.94v1.54c0 .34.19.54.51.54s.52-.2.52-.54V1.3c0-.34-.2-.54-.52-.54s-.51.2-.51.54v1.53H7.03V1.3c0-.34-.19-.54-.51-.54S6 .95 6 1.29v3.99c0 .34.2.47.52.47m-3.18-.09a4 4 0 0 1-.84.09C1.04 5.75 0 4.88 0 3.3 0 1.73 1.04.75 2.5.75S5 1.73 5 3.3c0 .87-.27 1.46-.78 1.88l.2.3a.5.5 0 0 1-.84.55zm-.52-.78-.24-.35a.5.5 0 1 1 .84-.56l.24.37c.18-.26.29-.62.29-1.04 0-1.03-.64-1.65-1.45-1.65s-1.45.62-1.45 1.65.64 1.6 1.45 1.6c.08 0 .2 0 .32-.02"></path></svg>');function om(t,e){let i=Rn(e,["$$slots","$$events","$$legacy","children"]);var o=Py();no(o,()=>Ye({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:$t}),Xt(),S(o),$(t,o)}var Nu=t=>{switch(t){case Gd.Q_720P:return tm;case Gd.Q_1080P:return im;case Gd.Q_1440P:return om;case Gd.Q_2160P:return Jf;case Gd.Q_4320P:return em}};var Ay=Ae('<path d="M12.72 2.21q1.8.07 2.41 1.96l.06.21.06.2.06.23.06.16.04.01.06-.02.14-.05.15-.07c1.42-.66 2.5-.53 3.4.44l.12.14.82 1.02c.73.96.7 2 0 3.1l-.13.19-.12.16-.14.2-.07.12-.04.05v.03l.1.06.13.07.15.09c1.39.7 1.96 1.64 1.74 2.93l-.04.19-.24 1.06c-.16.68-.28 1-.77 1.45-.48.43-1.02.61-1.73.67l-.22.02h-.2l-.25.02-.18.02.02.14v.1l.04.17c.32 1.53-.04 2.56-1.19 3.2l-.17.1-1.17.57q-1.64.73-3.02-.7l-.15-.17-.13-.15-.17-.19-.1-.1-.05-.04-.1.09-.1.1-.12.14c-.95 1.13-1.95 1.54-3.17 1.07l-.18-.08-1.05-.5-.31-.17a2 2 0 0 1-1-1.06 3 3 0 0 1-.16-1.88l.04-.23.04-.24.02-.17-.1-.02-.15-.01h-.18c-1.56-.04-2.48-.62-2.85-1.89l-.05-.18-.3-1.28q-.33-1.77 1.37-2.78l.2-.11.17-.1.22-.12.15-.1v-.02l-.06-.1-.08-.13-.1-.14c-.94-1.25-1.04-2.34-.28-3.4L4 6.32l.82-1.01c.8-.92 1.8-1.1 3.04-.64l.2.08.19.08.22.1.13.04.04-.01.03-.1.05-.13.04-.17c.36-1.43 1.09-2.24 2.4-2.35h1.58Zm-.05 1.8h-1.34l-.14.01c-.28.04-.47.2-.65.83l-.04.16-.06.2a6 6 0 0 1-.46 1.14 6 6 0 0 0-1.15.56 7 7 0 0 1-1.16-.35l-.35-.16q-.37-.15-.59-.17h-.08a.6.6 0 0 0-.4.19l-.08.07-.78.98-.1.12c-.18.26-.2.5.2 1.08l.22.31q.34.48.6 1.1-.2.59-.27 1.2-.51.45-1.01.73l-.34.18c-.62.34-.7.56-.65.88l.01.08.28 1.21.04.16c.1.3.27.47.97.5l.39.02q.57.03 1.22.2.35.53.78.97a6 6 0 0 1-.12 1.45c-.2.95-.01 1.1.38 1.3l1.13.54a1 1 0 0 0 .34.1l.06-.01q.26-.03.67-.49l.26-.3q.4-.42.95-.83l.3.02.3.01h.3l.3-.03q.56.4.95.84l.26.3c.32.36.53.48.73.48h.07l.18-.05.09-.04 1.13-.54.14-.08c.3-.17.42-.4.24-1.22a6 6 0 0 1-.12-1.45q.44-.45.78-.97a7 7 0 0 1 1.22-.2l.39-.01c.81-.04.91-.26 1-.66l.27-1.15c.09-.4.1-.64-.62-1.03l-.34-.18a6 6 0 0 1-1.01-.73 6 6 0 0 0-.27-1.2q.26-.62.6-1.1l.22-.31c.4-.58.38-.81.2-1.08l-.05-.06-.78-.97c-.14-.18-.26-.3-.46-.33h-.07q-.23 0-.67.17l-.35.16a6 6 0 0 1-1.16.35 6 6 0 0 0-1.15-.56 7 7 0 0 1-.45-1.1l-.11-.4c-.2-.68-.4-.81-.72-.83zM12 8.2a3.8 3.8 0 1 1 0 7.6 3.8 3.8 0 0 1 0-7.6m0 1.8a2 2 0 1 0 0 4 2 2 0 0 0 0-4"></path>');function nm(t,e){je(t,{get testId(){return e.testId},children:(i,o)=>{var s=Ay();$(i,s)},$$slots:{default:!0}})}var ky=Ae('<path d="M13.25 2.83c.23.75.38 1.5 1.63 2.23 1.4.38 2.08 0 2.72-.42.66-.45.86-.32 1.12-.06l.65.64c.29.3.4.42 0 1.18-.38.7-.8 1.33-.42 2.73.72 1.25 1.47 1.47 2.22 1.62.78.16.83.39.83.76v.9c0 .42 0 .59-.83.84-.75.23-1.5.38-2.23 1.63-.38 1.4 0 2.08.42 2.72.45.66.32.86.06 1.12l-.64.65c-.3.29-.42.4-1.18 0-.7-.38-1.34-.8-2.73-.42-1.25.72-1.47 1.47-1.62 2.22-.16.78-.39.83-.76.83h-.9c-.42 0-.59 0-.84-.83-.23-.75-.38-1.5-1.63-2.23-1.4-.38-2.08 0-2.72.42-.66.45-.86.32-1.12.06l-.65-.64c-.29-.3-.4-.42 0-1.18.38-.7.8-1.34.42-2.73-.72-1.25-1.47-1.47-2.22-1.62-.78-.16-.83-.39-.83-.76v-.9c0-.42 0-.59.83-.84.75-.23 1.5-.38 2.22-1.63.38-1.4 0-2.08-.42-2.72-.44-.66-.31-.86-.05-1.12l.64-.65c.3-.29.42-.4 1.18 0 .7.38 1.33.8 2.73.42 1.25-.72 1.47-1.47 1.62-2.22.16-.78.39-.83.76-.83h.9c.42 0 .59 0 .84.83M12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5"></path>');function rm(t,e){je(t,{get testId(){return e.testId},children:(i,o)=>{var s=ky();$(i,s)},$$slots:{default:!0}})}var My=L('<div aria-hidden="true"><!> <!></div>'),Vy={hash:"s-1v",code:".icon.s-1v{display:flex;height:24px;position:relative;width:24px}.icon.s-1v .pillow{position:absolute;right:-9px;top:1px}.icon.triple.s-1v .pillow{right:-13px}.icon.s-1v svg[data-testid=settings-icon--labeled] ._full{opacity:0;visibility:hidden}"};function Yd(t,e){B(e,!0),Q(t,Vy);let i=g(e,"isMobile",3,!1),o=g(e,"currentQuality",3,void 0),s=m(()=>o()?Ly(o()):""),a=m(()=>Nu(o())),l=m(()=>n(s).length>2);var d=Ve(),r=le(d);{var u=f=>{nm(f,{testId:"settings-mobile-icon"})},p=f=>{var v=My();let b;var y=C(v);{var _=T=>{let R=m(()=>`${n(s)}-pill-icon`);Zf(T,{get testId(){return n(R)},children:(k,P)=>{var E=Ve(),W=le(E);Ui(W,()=>n(a),(U,z)=>{z(U,{})}),$(k,E)},$$slots:{default:!0}})};M(y,T=>{n(a)&&T(_)})}var w=A(y,2);let I=m(()=>n(a)?"settings-icon--labeled":"settings-icon");rm(w,{get testId(){return n(I)}}),S(v),O(T=>b=te(v,1,"icon s-1v",null,b,T),[()=>({triple:n(l)})]),$(f,v)};M(r,f=>{i()?f(u):f(p,!1)})}$(t,d),H()}var Ry=L('<span class="settings-icon-wrapper s-1z"><!></span>'),Dy={hash:"s-1z",code:".settings-icon-wrapper.s-1z{height:24px;position:relative;width:24px}"};function zl(t,e){B(e,!0),Q(t,Dy);let[i,o]=Be(),s=()=>x(u,"$settingsMenuVisible",i),a=()=>x(v,"$isMobile",i),l=()=>x(r,"$currentQuality",i),d=xe(),r=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,p=d.actions.internal.openSettingsMenu,f=d.actions.internal.closeSettingsMenu,v=d.ui.isMobile,b=d.ui.t,y=K(void 0);He(()=>{n(y)&&Et(()=>{e.ref$.set(n(y))})});let _=b("aria_label_settings");function w(T){return bt(this,null,function*(){let R=pa(T);s()?f():p(R,mo)})}let I=m(()=>s()?"opened":"");Ht(t,{get className(){return n(I)},testId:"settings-btn",click:w,get ariaLabel(){return _},get ariaExpanded(){return s()},get ref(){return n(y)},set ref(T){D(y,T,!0)},children:(T,R)=>{var k=Ry(),P=C(k);Yd(P,{get isMobile(){return a()},get currentQuality(){return l()}}),S(k),$(T,k)},$$slots:{default:!0}}),H(),o()}var Oy=Ae('<path d="M6.56 4.44a1.5 1.5 0 1 0-2.12 2.12l3.09 3.09a11 11 0 0 0-2.39 3.08 11 11 0 0 0-1.01 4.14C4 18.43 4 20.37 4 22.83v2.34c0 2.46 0 4.4.13 5.96.13 1.6.4 2.93 1.01 4.14a10.5 10.5 0 0 0 4.6 4.59c1.2.61 2.53.88 4.13 1.01 1.56.13 3.5.13 5.96.13h8.34c2.46 0 4.4 0 5.96-.13 1.44-.12 2.66-.35 3.78-.84l3.53 3.53a1.5 1.5 0 0 0 2.12-2.12zM13.5 28a1.5 1.5 0 0 0 0 3h11a1.5 1.5 0 0 0 0-3zM12 22a1.5 1.5 0 0 1 1.5-1.5h4a1.5 1.5 0 0 1 0 3h-4A1.5 1.5 0 0 1 12 22"></path><path d="M34.5 23.5h-4.64l12.55 12.55q.23-.37.45-.78a11 11 0 0 0 1.01-4.14c.13-1.56.13-3.5.13-5.96v-2.34c0-2.46 0-4.4-.13-5.96a11 11 0 0 0-1.01-4.14 10.5 10.5 0 0 0-4.6-4.59 11 11 0 0 0-4.13-1.01C32.57 7 30.63 7 28.17 7h-8.34c-2.46 0-4.4 0-5.96.13l-.35.03L26.86 20.5h7.64a1.5 1.5 0 0 1 0 3"></path>',1),Ny=Ae("<path></path>");function ma(t,e){B(e,!0);let i=m(()=>`subtitles-icon${e.type==="off"?"-off":e.type==="outline"?"-outline":""}`),o=m(()=>dn(e.size));je(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(i)},get shadow(){return e.shadow},children:(s,a)=>{var l=Ve(),d=le(l);{var r=p=>{var f=Oy();Xt(),$(p,f)},u=p=>{var f=Ny();O(()=>De(f,"d",`M16.92 8h14.16q2.82-.02 4.66.1c1.28.1 2.4.32 3.46.86a8.8 8.8 90 013.84 3.84c.54 1.04.76 2.18.86 3.46q.12 1.84.1 4.66v6.16q.02 2.82-.1 4.66a10 10 90 01-.86 3.46 8.8 8.8 90 01-3.84 3.84 10 10 90 01-3.46.86q-1.84.12-4.66.1H16.92q-2.82.02-4.66-.1a10 10 90 01-3.46-.86 8.8 8.8 90 01-3.84-3.84 10 10 90 01-.86-3.46Q4 29.9 4 27.08v-6.16q-.02-2.82.1-4.66c.1-1.28.32-2.4.86-3.46A8.8 8.8 90 018.8 8.96a10 10 90 013.46-.86Q14.1 8 16.92 8
|
|
57
57
|
${e.type==="outline"?"M12.54 11.68c-1.04.1-1.64.26-2.1.48a5.2 5.2 90 00-2.28 2.28c-.22.46-.4 1.06-.48 2.1-.08 1.08-.08 2.46-.08 4.46v6c0 2 0 3.38.08 4.46.1 1.04.26 1.64.48 2.1q.78 1.5 2.28 2.28c.46.22 1.06.4 2.1.48 1.08.08 2.48.08 4.46.08h14c2 0 3.38 0 4.46-.08 1.04-.1 1.64-.26 2.1-.48a5.2 5.2 90 002.28-2.28c.22-.46.4-1.06.48-2.1.08-1.08.08-2.48.08-4.46v-6c0-2 0-3.38-.08-4.46a6 6 90 00-.48-2.1 5.2 5.2 90 00-2.28-2.28c-.46-.22-1.06-.4-2.1-.48-1.08-.08-2.48-.08-4.46-.08h-14c-2 0-3.38 0-4.46.08":""}
|
|
58
|
-
M12 29.8c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6H13.8a1.8 1.8 90 01-1.8-1.8m0-7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6H13.8a1.8 1.8 90 01-1.8-1.8m17 7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6h-3.4a1.8 1.8 90 01-1.8-1.8M22 22.2c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6h-10.4a1.8 1.8 90 01-1.8-1.8`)),_(m,p)};M(d,m=>{e.type==="off"?m(s):m(u,!1)})}_(r,l)},$$slots:{default:!0}}),H()}function im(t,e){B(e,!0);let i=g(e,"isSubtitlesEnabled",3,!1),r=ye().ui.t,a=f(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));zt(t,{testId:"subtitles-btn",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return gs.KeyC},role:"button",children:(l,d)=>{let s=f(()=>i()?void 0:"outline");ca(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),H()}var Ly=L('<span class="duration s-24" data-testid="video_duration"> </span>'),My=L('<div data-testid="time"><span class="current s-24" data-testid="current_time"> </span> <!></div>'),Vy={hash:"s-24",code:'.time.s-24{align-items:center;color:var(--controls-time);display:flex;font-variant-numeric:tabular-nums;font-weight:500;padding:12px 6px}.time.mobile.s-24{padding:0 0 0 8px}.current.s-24{position:relative}.duration.s-24{opacity:.7}.duration.s-24:before{content:" / ";white-space:pre}'};function zd(t,e){B(e,!0),Q(t,Vy);let i=g(e,"isMobile",3,!1),o=g(e,"isHidden",3,!1),r=g(e,"showDuration",3,!0),a=g(e,"ref",15),l=Vt(),d=se(!1),s=f(()=>Jo(e.duration)),u=f(()=>Jo(e.position));var m=My();let p;var v=T(m),$=T(v,!0);S(v);var y=A(v,2);{var b=x=>{var I=Ly(),C=T(I,!0);S(I),O(()=>he(C,n(s))),_(x,I)};M(y,x=>{r()&&x(b)})}S(m),Rs(m,()=>Rl(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),tt(m,x=>a(x),()=>a()),O(x=>{p=ie(m,1,"time s-24",null,p,x),he($,n(u))},[()=>({mobile:i()})]),_(t,m),H()}import{noop as Ru}from"@vkontakte/videoplayer-shared/es2015";var Ry=ke('<path d="M21.8632 10.0832C22.2147 9.73171 22.7852 9.73171 23.1367 10.0832C23.4881 10.4347 23.4881 11.0051 23.1367 11.3566L18.6367 15.8566C18.2852 16.2081 17.7147 16.2081 17.3632 15.8566C17.0117 15.5051 17.0117 14.9347 17.3632 14.5832L21.8632 10.0832Z"></path><path d="M17.3632 11.3566C17.0117 11.0051 17.0117 10.4347 17.3632 10.0832C17.7147 9.73171 18.2852 9.73171 18.6367 10.0832L23.1367 14.5832C23.4881 14.9347 23.4881 15.5051 23.1367 15.8566C22.7852 16.2081 22.2147 16.2081 21.8632 15.8566L17.3632 11.3566Z"></path>',1),Dy=ke("<path></path>"),Oy=ke('<path d="M14 3C14.5523 3 15 3.44772 15 4V20C15 20.5523 14.5523 21 14 21C13.3585 21 12.7422 20.7509 12.2808 20.3052L6.79013 15H4C2.89543 15 2 14.1046 2 13V11C2 9.89543 2.89543 9 4 9H6.765L12.2794 3.6934C12.7418 3.24852 13.3584 3 14 3Z"></path><!>',1);function ua(t,e){B(e,!0);let i=g(e,"volume",3,1),o=g(e,"muted",3,!1),r=(u,m)=>m?"off":u>.5?"max":u>.2?"mid":u>0?"min":"off",a=f(()=>r(i(),o())),l=f(()=>un(e.size)),d="M16.8748 8.85259C17.2324 8.50731 17.8021 8.51726 18.1474 8.87481C18.5465 9.28803 18.8614 9.77691 19.0757 10.3128C19.2901 10.8486 19.4 11.4218 19.4 12C19.4 12.5782 19.2901 13.1514 19.0757 13.6872C18.8614 14.2231 18.5465 14.712 18.1474 15.1252C17.8021 15.4827 17.2324 15.4927 16.8748 15.1474C16.5173 14.8021 16.5073 14.2324 16.8526 13.8748C17.0876 13.6314 17.2757 13.3408 17.4045 13.0187C17.5333 12.6966 17.6 12.3504 17.6 12C17.6 11.6496 17.5333 11.3034 17.4045 10.9813C17.2757 10.6592 17.0876 10.3686 16.8526 10.1252C16.5073 9.76764 16.5173 9.19788 16.8748 8.85259Z",s="M19.2636 6.2636C19.6151 5.91213 20.1849 5.91213 20.5364 6.2636C21.2516 6.97878 21.9929 7.99659 22.3989 8.97678C22.7959 9.93525 23.0003 10.9625 23.0003 12C23.0003 13.0374 22.7959 14.0647 22.3989 15.0232C21.9929 16.0034 21.2516 17.0212 20.5364 17.7364C20.1849 18.0879 19.6151 18.0879 19.2636 17.7364C18.9121 17.3849 18.9121 16.8151 19.2636 16.4636C19.8484 15.8788 20.4384 15.0527 20.7359 14.3343C21.0425 13.5943 21.2003 12.801 21.2003 12C21.2003 11.1989 21.0425 10.4057 20.7359 9.66561C20.4384 8.94724 19.8484 8.12124 19.2636 7.5364C18.9121 7.18492 18.9121 6.61508 19.2636 6.2636Z";Ze(t,{get style(){return n(l)},get testId(){var u;return`volume-${(u=n(a))!=null?u:""}-icon`},get shadow(){return e.shadow},children:(u,m)=>{var p=Oy(),v=A(ae(p));{var $=b=>{var x=Ry();ti(),_(b,x)},y=b=>{var x=Dy();O(()=>Oe(x,"d",`${d}${n(a)==="max"?s:""}`)),_(b,x)};M(v,b=>{n(a)==="off"?b($):b(y,!1)})}_(u,p)},$$slots:{default:!0}}),H()}import{isNonNullable as H_,noop as jn}from"@vkontakte/videoplayer-shared/es2015";import{noop as nm}from"@vkontakte/videoplayer-shared/es2015";import{noop as By}from"@vkontakte/videoplayer-shared/es2015";var Ny=L('<div class="overlay"><!></div>');function om(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(l,"$overlayContainer$",i),l=ye().ui.overlayContainer$,d=K(void 0),s=v=>{!v||!n(d)||!v.contains(n(d))||v.removeChild(n(d))},u=v=>{!v||!n(d)||v.contains(n(d))||v.appendChild(n(d))};He(()=>{u(r())}),Mt(()=>(u(r()),()=>s(r())));var m=Ny(),p=T(m);oi(p,()=>{var v;return(v=e.children)!=null?v:bt}),S(m),tt(m,v=>D(d,v),()=>n(d)),_(t,m),H(),o()}var Hy=L('<div class="tooltip s-1l"><div class="content s-1l"> </div> <div class="tooltip-pointer s-1l"></div></div>'),Fy=L("<div><!></div> <!>",1),Uy={hash:"s-1l",code:'.tooltip-wrapper.s-1l{display:flex;flex-direction:column;min-width:0}.full-width.s-1l{width:100%}.tooltip.s-1l{bottom:100%;left:0;opacity:0;position:absolute;transition:opacity .2s,visibility .2s;visibility:hidden}.content.s-1l{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.tooltip-pointer.s-1l{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;line-height:0;position:absolute;width:0}'};function Fa(t,e){B(e,!0),Q(t,Uy);let[i,o]=Be(),r=()=>w(j,"$overlayContainer$",i),a=()=>w(U,"$containerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"content",3,""),s=g(e,"active",15,!1),u=g(e,"translateX",3,0),m=g(e,"translateY",3,0),p=g(e,"isFullWidthWrapper",3,!1),v=g(e,"maxTooltipWidth",3,void 0),$=g(e,"placement",3,"top"),y=g(e,"onVisibilityChange",3,By),b=5,x=K(void 0),I=K(void 0),C,R=K(0),k=K(0),P=K(0),E=K(0),W=Vt(),F=ye(),U=F.ui.playerSize,j=F.ui.overlayContainer$;He(()=>{Et(()=>{y()(s())})});let re=F.getLogger().createComponentLog("Tooltip component"),G=te=>{if(!r()||!n(I)||!n(x))return;D(k,b);let ce=r().getBoundingClientRect(),we=n(x).getBoundingClientRect(),Ee=we.width,Ye=n(I).clientWidth,Ae=a().width,Te=(Ee-Ye)/2,Fe=we.left+u()-ce.left,ht=Fe+Te,Rt=we.top+m()-ce.top,It=Ye/2-b,ct=ht<8,Tt=ht+Ye>Ae-8;te==="top-left"&&(ht=Fe),ct&&(ht=8,It=Fe+we.width/2-2.5*b),Tt&&(ht=Ae-8-Ye,It=we.left-ce.left+we.width/2-ht-b),D(P,ht,!0),D(E,Rt),D(R,It,!0)},oe=()=>{!r()||!n(I)||!n(x)||D(k,-b)},X=()=>{if(!r()||!n(I)||!n(x))return;D(R,b);let te=r().getBoundingClientRect(),ce=n(x).getBoundingClientRect(),we=ce.height,Ee=n(I).clientHeight,Ye=(we-Ee)/2+Ee,Ae=ce.left+u()-te.left-n(I).clientWidth,Te=2,Fe=Ae-b;Fe<8&&(Fe=8);let Rt=ce.top+m()-te.top+Ye,It=Te-Ye/2,ct=Te-b;D(P,Fe,!0),D(E,Rt),D(k,It),D(R,ct)},Ie=()=>{!r()||!n(I)||!n(x)||D(R,-b)},fe=()=>{switch($()){case"top":G();break;case"bottom":oe();break;case"left":X();break;case"top-left":G("top-left");break;default:Ie();break}},ee=()=>{try{if(!r()||!n(x))return;fe(),s(!0)}catch(te){re({message:String(te)})}},be=()=>{s(!1)},Ce=()=>{n(I)&&(C||(C=window.setTimeout(ee,W.controls.hideTimeoutTooltips)),s()&&ee())},de=()=>{be(),window.clearTimeout(C),C=void 0},We=(te,ce,we)=>{let Ee="";switch($()){case"top":Ee=`transform: translate(${te}px, ${ce}px);`;break;case"bottom":Ee=`transform: translate(${te}px, ${ce}px); top: auto; bottom: 100%;`;break;case"left":Ee=`transform: translate(${te}px, ${ce}px); left: 0; right: auto;`;break;default:Ee=`transform: translate(${te}px, ${ce}px);`}return Ee+=` max-width: ${v()===void 0?"auto":`${v()}px`};`,Ee+=` opacity: ${we?1:0}; visibility: ${we?"visible":"hidden"}`,Ee},ve=(te,ce)=>{let we="";switch($()){case"top-left":case"top":we=`transform: translate(${te}px, ${ce}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":we=`transform: translate(${te}px, ${ce}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":we=`transform: translate(${te}px, ${ce}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:we=`transform: translate(${te}px, ${ce}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return we},me=f(()=>We(n(P),n(E),s())),Z=f(()=>ve(n(R),n(k)));Mt(fe),cn(()=>window.clearTimeout(C));var N=Fy(),pe=ae(N);let le;pe.__pointermove=Ce,pe.__pointerdown=de,pe.__pointerup=function(...te){var ce;(ce=e.disableMouseupTooltipShow?void 0:Ce)==null||ce.apply(this,te)};var ue=T(pe);oi(ue,()=>{var te;return(te=e.children)!=null?te:bt}),S(pe),tt(pe,te=>D(x,te),()=>n(x));var Le=A(pe,2);{var ze=te=>{om(te,{children:(ce,we)=>{var Ee=Hy(),Ye=T(Ee),Ae=T(Ye,!0);S(Ye);var Te=A(Ye,2);S(Ee),tt(Ee,Fe=>D(I,Fe),()=>n(I)),O(()=>{Ke(Ee,n(me)),he(Ae,d()),Ke(Te,n(Z))}),_(ce,Ee)},$$slots:{default:!0}})};M(Le,te=>{d()&&!l()&&te(ze)})}O(te=>le=ie(pe,1,"tooltip-wrapper s-1l",null,le,te),[()=>({"full-width":p()})]),mt("pointerenter",pe,Ce),mt("pointerleave",pe,de),_(t,N),H(),o()}et(["pointermove","pointerdown","pointerup"]);var B_=t=>{t.stopPropagation()},zy=L("<div><!></div>"),Wy={hash:"s-1h",code:".btn-container.s-1h{align-items:center;display:flex;height:100%;position:relative;transition:var(--button-hover-transition);will-change:opacity;-webkit-tap-highlight-color:transparent}.w-max.s-1h{min-width:0;width:100%}"};function Lo(t,e){B(e,!0),Q(t,Wy);let[i,o]=Be(),r=()=>w(u,"$isGraphOpened$",i),a=()=>w(s,"$isMobile",i),l=ye(),d=_o(),s=l.ui.isMobile,u=d.graphIsOpened$,m=l.ui.t,p=g(e,"className",3,""),v=g(e,"disabled",3,!1),$=g(e,"hasTooltip",3,!0),y=g(e,"ref",15,void 0),b=g(e,"width",15,void 0),x=g(e,"isFullWidthTooltip",3,!0),I=g(e,"tooltipContent",3,""),C=g(e,"tooltipVisible",3,!1),R=g(e,"tooltipPlacement",3,"top"),k=g(e,"disabledTooltipContent",19,()=>m("tooltip_button_disabled")),P=g(e,"isAriaHidden",3,!1),E=g(e,"onTooltipVisibilityChange",3,nm),W=g(e,"initialTranslateXPx",3,0),F=g(e,"initialTranslateYPx",19,()=>-18),U=g(e,"mouseEnter",3,nm),j=g(e,"mouseLeave",3,nm),re=f(()=>v()?r()?m("tooltip_disabled_when_graph_on"):k():I()),G=K(!1);He(()=>{C()||D(G,!1)});var oe=zy();oe.__pointerdown=[B_],oe.__click=[B_];var X=T(oe);{var Ie=ee=>{Fa(ee,{get content(){return n(re)},get translateX(){return W()},get translateY(){return F()},get isFullWidthWrapper(){return x()},get placement(){return R()},get onVisibilityChange(){return E()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(G)},set active(be){D(G,be,!0)},children:(be,Ce)=>{var de=De(),We=ae(de);oi(We,()=>{var ve;return(ve=e.children)!=null?ve:bt}),_(be,de)},$$slots:{default:!0}})},fe=ee=>{var be=De(),Ce=ae(be);oi(Ce,()=>{var de;return(de=e.children)!=null?de:bt}),_(ee,be)};M(X,ee=>{$()&&n(re)&&!a()?ee(Ie):ee(fe,!1)})}S(oe),tt(oe,ee=>y(ee),()=>y()),O(()=>{var ee;ie(oe,1,`btn-container ${(ee=p())!=null?ee:""}`,"s-1h"),Oe(oe,"aria-hidden",P()||null)}),mt("mouseenter",oe,function(...ee){var be;(be=U())==null||be.apply(this,ee)}),mt("mouseleave",oe,function(...ee){var be;(be=j())==null||be.apply(this,ee)}),En(oe,"clientWidth",b),_(t,oe),H(),o()}et(["pointerdown","click"]);var Ky=ke('<rect width="20" height="20" rx="10"></rect><path d="m12.53 8.69.06.19-.22-.64a.83.83 0 0 0-1.6.47l.13.48-.23-.85a.82.82 0 0 0-1.6.24l-.73-2.93a.85.85 0 0 0-1.65.4L8 11.34l-1.12-1.16a.8.8 0 0 0-1.21 1.03l2.23 2.94s1.23 1.83 4.3 1.23c2.43-.48 3.25-2.67 2.58-4.88l-.55-2.3a.88.88 0 1 0-1.7.49"></path>',1);function Wd(t,e){let i=f(()=>(e.completed,"interactive-episode-completed-icon"));Ze(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,r)=>{var a=Ky(),l=ae(a),d=A(l);O(()=>{Oe(l,"fill",na),Oe(l,"fill-opacity",e.completed?1:.24),Oe(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),_(o,a)},$$slots:{default:!0}})}var qy=L("<div><!></div>"),Qy={hash:"s-u",code:".interactive-episode-icon.s-u{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-u{opacity:.4;pointer-events:none}"};function rm(t,e){B(e,!0),Q(t,Qy);let o=ye().ui.t,r=K(0),a=f(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Lo(t,{get tooltipContent(){return n(a)},initialTranslateXPx:-10,initialTranslateYPx:-10,get disabled(){return e.disabled},get width(){return n(r)},isAriaHidden:!0,isFullWidthTooltip:!1,children:(l,d)=>{var s=qy();let u;var m=T(s);let p=f(()=>!!e.videoEpisode.completed);Wd(m,{get completed(){return n(p)}}),S(s),O(v=>{u=ie(s,1,"interactive-episode-icon s-u",null,u,v),Ke(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),En(s,"clientWidth",v=>D(r,v)),_(l,s)},$$slots:{default:!0}}),H()}var Gy=L('<div><div class="video-episode-inner s-v"><div class="video-episode-loaded s-v"></div> <div></div></div></div>'),Yy=L('<div class="video-episodes-wrap s-v"></div>'),jy={hash:"s-v",code:".video-episodes-wrap.s-v{height:100%;position:absolute;width:100%}.video-episode.s-v{box-sizing:border-box;height:calc(var(--slider-height)*3);margin-top:calc(var(--slider-height)*-1);padding:var(--slider-height) var(--slider-video-episode-gap);position:absolute;transition:transform .2s}.video-episode.s-v:first-child{padding-left:0}.video-episode.s-v:last-child{padding-right:0}.video-episode.s-v:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-v,.video-episode-inner.s-v,.video-episode-loaded.s-v{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-v{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-v:first-child .video-episode-inner:where(.s-v),.video-episode.s-v:last-child .video-episode-inner:where(.s-v){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-v{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-v,.video-episode-loaded.s-v{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-v{background-color:var(--slider-filled-bg)}"};function sm(t,e){Q(t,jy);let i=g(e,"videoEpisodes",19,()=>[]);var o=Yy();yi(o,21,i,r=>r.from,(r,a)=>{var l=Gy();let d;var s=T(l),u=T(s),m=A(u,2);let p;S(s),S(l),O((v,$)=>{d=ie(l,1,"video-episode s-v",null,d,v),Ke(l,`left: ${n(a).from}%; width: ${n(a).width}%`),Ke(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),p=ie(m,1,"video-episode-filled s-v",null,p,$),Ke(m,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),_(r,l)}),S(o),_(t,o)}function Xy(t,e,i,o,r,a,l){if(t.preventDefault(),e()&&D(i,e().getBoundingClientRect(),!0),o()||n(r)||!e())return;D(r,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function Zy(t,e,i,o,r,a,l,d){if(t.preventDefault(),e())return;let s=i(t.clientX,t.clientY),u=o(t.clientX);r()(s,u,n(a).width,t),n(l)&&d()(s)}function Jy(t,e,i,o,r){if(t.preventDefault(),e()||!n(i))return;D(i,!1);let a=o(t.clientX,t.clientY);r()(a,t)}function ex(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function tx(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),D(r,!1),a()(l)}var ix=L("<div></div>"),ox=L('<div class="bars s-h"><div class="loaded s-h"></div> <div></div></div>'),nx=L('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),rx={hash:"s-h",code:'.interactive-icons.s-h{position:absolute;top:-28px;width:calc(100% - 20px)}.interactive-icons.mobile.s-h{top:-10px}.slider.s-h{border-radius:var(--slider-radius);cursor:pointer;height:var(--slider-height);position:relative;touch-action:none;transition:opacity .2s;width:100%;will-change:opacity,transform;-webkit-tap-highlight-color:transparent}.no-handle.s-h{cursor:default}.slider.s-h:before{content:"";height:calc(var(--controls-height)/2);left:0;position:absolute;right:0;top:calc((var(--controls-height)/2 - var(--slider-height))*-1/2)}.bars.s-h{background:var(--slider-bg);overflow:hidden}.bars.s-h,.loaded.s-h{border-radius:var(--slider-radius);height:100%;position:absolute;width:100%}.loaded.s-h{background:var(--slider-loaded-bg);left:-100%;transition:transform .2s;will-change:transform}.filled.s-h{background-color:var(--slider-filled-bg);border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.slider.square.s-h,.slider.square.s-h .filled:where(.s-h),.slider.square.s-h .loaded:where(.s-h),.slider.square.s-h>.bars:where(.s-h){border-radius:unset}.filled.active-live.s-h{background-color:var(--timeline-slider-filled-active-live-bg)}.filled.ads.s-h{background-color:var(--slider-filled-ads)}.handleWrap.s-h{left:-100%;position:absolute;width:100%}.handle.s-h{background-color:var(--slider-handle-bg);border-radius:50%;height:var(--slider-handle-size);opacity:0;position:absolute;right:calc(var(--slider-handle-size)*-1/2);top:calc((var(--slider-height) - var(--slider-handle-size))/2);transform:scale(0);transition:opacity .2s,transform .2s;visibility:hidden;width:var(--slider-handle-size);will-change:opacity,transform}.handle.active-live.s-h{background-color:var(--timeline-slider-handle-active-live-bg)}.handle-always-visible.s-h .handle:where(.s-h),.slider-dragging.s-h .handle:where(.s-h),.slider.s-h:hover .handle:where(.s-h){opacity:1;transform:scale(1);visibility:visible}.slider-dragging.s-h .handle:where(.s-h){transform:scale(1.3)}.slider-vertical.s-h{left:-8px;position:absolute;top:-18px;transform:rotate(-90deg);transform-origin:0 0}.slider.disabled.s-h{cursor:default;opacity:.4}'};function Ua(t,e){B(e,!0),Q(t,rx);let i=g(e,"ref",15,void 0),o=g(e,"className",3,""),r=g(e,"testId",3,void 0),a=g(e,"isHidden",3,!1),l=g(e,"isVertical",3,!1),d=g(e,"isActiveLive",3,!1),s=g(e,"isMobile",3,!1),u=g(e,"squareBorders",3,!1),m=g(e,"videoEpisodes",19,()=>[]),p=g(e,"withWheelHandler",3,!1),v=g(e,"isInteractive",3,!1),$=g(e,"disabled",3,!1),y=g(e,"hideHandel",3,!1),b=g(e,"onPointerDown",3,jn),x=g(e,"onHandleMove",3,jn),I=g(e,"onPointerUp",3,jn),C=g(e,"onPointerEnter",3,jn),R=g(e,"onPointerMove",3,jn),k=g(e,"onPointerLeave",3,jn),P=g(e,"onMouseEnter",3,jn),E=g(e,"onMouseLeave",3,jn),W=g(e,"onWheelUp",3,jn),F=g(e,"onWheelDown",3,jn),U=g(e,"onWheelLeft",3,jn),j=g(e,"onWheelRight",3,jn),re=g(e,"onDisabledClick",3,jn),G=g(e,"loadedProgress",3,0),oe=g(e,"filledProgress",3,0),X=g(e,"handleProgress",3,0),Ie=g(e,"ariaLabel",3,""),fe=g(e,"ariaValueMin",3,void 0),ee=g(e,"ariaValueMax",3,void 0),be=g(e,"ariaValueNow",3,void 0),Ce=g(e,"ariaValueText",3,""),de=g(e,"onContextMenu",3,jn),We=g(e,"handleAlwaysVisible",3,!1),ve=Vt(),me=K(void 0),Z=K(!1),N=f(()=>{var xe;return(xe=ee())!=null?xe:0}),pe=f(()=>{var xe;return H_(m())&&((xe=m()[m().length-1])==null?void 0:xe.time)<n(N)}),le=f(()=>H_(m())&&m().length&&n(pe)&&n(N)?Ye(G()*100,oe()*100):[]);function ue(xe){if(xe.preventDefault(),i()&&D(me,i().getBoundingClientRect(),!0),$())return;let Ue=we(xe.clientX,xe.clientY),Se=Ee(xe.clientX);C()(Ue,Se,n(me).width)}function Le(xe){xe.preventDefault(),!$()&&k()()}function ze(){P()()}function te(){E()()}function ce(xe){$()||p()&&(xe.preventDefault(),xe.deltaY<0?W()():xe.deltaY>0?F()():xe.deltaX>0?j()():U()())}function we(xe,Ue){return l()?Math.max(0,Math.min(1,(n(me).height-(Ue-n(me).top))/n(me).height)):Math.min(Math.max(xe-n(me).x,0),n(me).width)/n(me).width}function Ee(xe){return Math.min(Math.max(xe-n(me).x,0),n(me).width)}function Ye(xe,Ue){let Se=ve.features.episodesClustering&&!v()?ve.episodeMinWidthPc:0,Ct=[],ge=m()[0].time/n(N)*100,Ne=0,Ge=0;for(let At=1;At<m().length;At++)Ne=m()[At].time/n(N)*100,Ne-ge>Se&&(Ct.push({from:ge,width:Math.max(0,Ne-ge),loadedWidth:Math.max(0,Math.min(Ne,xe)-ge),filledWidth:Math.max(0,Math.min(Ne,Ue)-ge),interactive:m()[At-1].interactive,completed:m()[At-1].completed}),ge=m()[At].time/n(N)*100,Ge++);let lt={from:ge,width:Math.max(0,100-ge),loadedWidth:Math.max(0,Math.min(xe,100)-ge),filledWidth:Math.max(0,Math.min(Ue,100)-ge),interactive:m()[Ge].interactive,completed:m()[Ge].completed};100-ge<Se?(Ge-=1,Ct[Ge].width+=100-ge,Ct[Ge].loadedWidth+=Math.max(0,Math.min(xe,100)-ge),Ct[Ge].filledWidth+=Math.max(0,Math.min(Ue,100)-ge)):Ct[Ge]=lt;let Qt=m()[0].time;if(Qt!==0){let At=Qt/n(N)*100;Ct.unshift({from:0,width:At,loadedWidth:Math.min(At,xe),filledWidth:Math.min(At,Ue)})}return Ct}function Ae(xe){return Math.max(0,Math.min(100,xe*100))}let Te=f(()=>Ae(G())),Fe=f(()=>Ae(oe()));var ht=nx(),Rt=ae(ht);{var It=xe=>{var Ue=ix();let Se;yi(Ue,21,()=>n(le),Ct=>Ct.from,(Ct,ge)=>{var Ne=De(),Ge=ae(Ne);{var lt=Qt=>{rm(Qt,{get videoEpisode(){return n(ge)},get disabled(){return $()}})};M(Ge,Qt=>{n(ge).interactive&&Qt(lt)})}_(Ct,Ne)}),S(Ue),O(Ct=>Se=ie(Ue,1,"interactive-icons s-h",null,Se,Ct),[()=>({mobile:s(),hidden:s()&&!n(Z)})]),_(xe,Ue)};M(Rt,xe=>{v()&&xe(It)})}var ct=A(Rt,2);let Tt;ct.__pointerdown=[Xy,i,me,$,Z,we,b],ct.__pointermove=[Zy,$,we,Ee,R,me,Z,x],ct.__pointerup=[Jy,$,Z,we,I],ct.__click=[ex,$,re,we],ct.__contextmenu=[tx,we,$,re,Z,de];var Yt=T(ct);{var Ht=xe=>{sm(xe,{get videoEpisodes(){return n(le)},get disabled(){return $()},get isMobile(){return s()}})},Ot=xe=>{var Ue=ox(),Se=T(Ue),Ct=A(Se,2);let ge;S(Ue),O(Ne=>{Oe(Se,"data-value",n(Te)),Ke(Se,`transform: translateX(${n(Te)}%);`),ge=ie(Ct,1,"filled s-h",null,ge,Ne),Oe(Ct,"data-value",n(Fe)),Ke(Ct,`transform: translateX(${n(Fe)}%);`)},[()=>({"active-live":d()})]),_(xe,Ue)};M(Yt,xe=>{n(le).length?xe(Ht):xe(Ot,!1)})}var Wt=A(Yt,2);let q;var Me=T(Wt);let Ve;S(Wt),S(ct),tt(ct,xe=>i(xe),()=>i()),O((xe,Ue,Se,Ct)=>{var ge,Ne;Tt=ie(ct,1,`slider ${(ge=o())!=null?ge:""}`,"s-h",Tt,xe),Oe(ct,"aria-label",Ie()),Oe(ct,"aria-valuemin",fe()),Oe(ct,"aria-valuemax",ee()),Oe(ct,"aria-valuenow",be()),Oe(ct,"aria-valuetext",Ce()),Oe(ct,"data-testid",(Ne=r())!=null?Ne:null),q=ie(Wt,1,"handleWrap s-h",null,q,Ue),Ke(Wt,Se),Ve=ie(Me,1,"handle s-h",null,Ve,Ct)},[()=>({disabled:$(),"slider-dragging":n(Z),hidden:a(),"handle-always-visible":We(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${Ae(X())}%);`,()=>({"active-live":d()})]),mt("pointerenter",ct,ue),mt("pointerleave",ct,Le),mt("mouseenter",ct,ze),mt("mouseleave",ct,te),mt("wheel",ct,ce),_(t,ht),H()}et(["pointerdown","pointermove","pointerup","click","contextmenu"]);var oo=(t,e)=>Id[t]>=Id[e];var Bs=(t,e)=>Id[t]<=Id[e],F_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var ax=L("<div><!></div>"),lx=L("<div><!> <!></div>"),dx={hash:"s-27",code:".volumeBar-container.s-27{align-items:center;display:flex}.vertical.s-27 .btn,.vertical.s-27 .tooltip-wrapper,.volumeBar-container.vertical.s-27{width:40px}.volumeBar.s-27{align-items:center;display:flex;margin:0 8px;position:relative;width:70px;--slider-height:var(--slider-volume-height);--slider-radius:var(--slider-volume-radius);--slider-handle-size:var(--slider-volume-handle-size);--slider-bg:var(--volume-slider-bg);--slider-filled-bg:var(--volume-slider-filled-bg);--slider-handle-bg:var(--volume-slider-handle-bg)}.volumeBar-slider-vertical{width:50px!important}.volumeBar-vertical.s-27{padding:0 8px 0 0;width:0}"};function am(t,e){var Ee,Ye;B(e,!0),Q(t,dx);let[i,o]=Be(),r=()=>w(R,"$isAudioAvailable$",i),a=()=>w(v,"$muted$",i),l=()=>w(p,"$volume$",i),d=()=>w(x,"$currentGridType$",i),s=()=>w(ue,"$controlsVisible",i),u=ye(),m=Vt(),p=u.state.volume$,v=u.state.muted$,{setVolume:$,startVolumeChanging:y,stopVolumeChanging:b}=u.actions.internal,x=u.ui.currentGridType$,I=(Ee=u.callbacks)==null?void 0:Ee.onAudioDoesNotExistHint,C=(Ye=u.callbacks)==null?void 0:Ye.onAudioDisabledHint,R=u.state.isAudioAvailable$,k=u.state.isAudioDisabled,P=u.ui.t,E=K(!1),W,F=f(()=>e.isAds||r()),U=f(()=>!n(F)||a()||l()===0),j=f(()=>Bs(d(),"l")),re=f(()=>n(j)?"":n(U)?!r()||k?P("tooltip_sound_unavailable"):P("tooltip_volume"):P("tooltip_volume_muted")),G=f(()=>n(U)?P("tooltip_volume"):P("tooltip_volume_muted")),oe=f(()=>n(U)?0:l()),X=!1,Ie=f(()=>e.isAds?!1:k?!C:r()?!1:!I);function fe(Ae){y(),$(Ae)}function ee(){ku(u,l(),m.controls.volumeStepWheel)}function be(){Lu(u,l(),m.controls.volumeStepWheel)}function Ce(Ae){$(Ae)}function de(Ae){$(Ae),b()}function We(){X=!0}function ve(){X=!1,N()}function me(){clearTimeout(W),D(E,!0)}function Z(){N()}function N(){W=window.setTimeout(()=>{X||D(E,!1)},m.controls.volumeBarTimeout)}function pe(Ae){Ae.preventDefault(),Ae.deltaY<0?ee():Ae.deltaY>0&&be()}let le=K(!1),ue=u.ui.controlsVisible;He(()=>{s()||D(le,!1)});var Le=lx();let ze;var te=T(Le);Fa(te,{get content(){return n(re)},translateY:-18,get active(){return n(le)},set active(Ae){D(le,Ae,!0)},children:(Ae,Te)=>{let Fe=f(()=>n(j)?"btn-volume-vertical":"btn-volume-horizontal");zt(Ae,{className:"btn-full-opacity",get disabled(){return n(Ie)},get testId(){return n(Fe)},get ariaLabel(){return n(G)},get click(){return e.click},get ariaKeyShortCut(){return gs.KeyM},role:"button",children:(ht,Rt)=>{ua(ht,{get size(){return"24"},get volume(){return l()},get muted(){return n(U)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var ce=A(te,2);{var we=Ae=>{var Te=ax();let Fe;var ht=T(Te);let Rt=f(()=>n(j)?"volumeBar-slider-vertical":""),It=f(()=>n(j)&&!n(E)),ct=f(()=>n(j)?We:Ru),Tt=f(()=>n(j)?ve:Ru),Yt=f(()=>Math.round(n(oe)*100)),Ht=f(()=>`${Math.round(n(oe)*100)}%`),Ot=f(()=>n(j)?"volume-slider-vertical":"volume-slider");Ua(ht,{get className(){return n(Rt)},get isHidden(){return n(It)},get isVertical(){return n(j)},withWheelHandler:!0,onWheelUp:ee,onWheelDown:be,onPointerDown:fe,onHandleMove:Ce,onPointerUp:de,get onPointerEnter(){return n(ct)},get onPointerLeave(){return n(Tt)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(Yt)},get ariaValueText(){return n(Ht)},get filledProgress(){return n(oe)},get handleProgress(){return n(oe)},get testId(){return n(Ot)}}),S(Te),O(Wt=>Fe=ie(Te,1,"volumeBar s-27",null,Fe,Wt),[()=>({"volumeBar-vertical":n(j)})]),_(Ae,Te)};M(ce,Ae=>{n(F)&&Ae(we)})}S(Le),O(Ae=>ze=ie(Le,1,"volumeBar-container s-27",null,ze,Ae),[()=>({vertical:n(j)})]),mt("mouseenter",Le,function(...Ae){var Te;(Te=n(j)?me:Ru)==null||Te.apply(this,Ae)}),mt("mouseleave",Le,function(...Ae){var Te;(Te=n(j)?Z:Ru)==null||Te.apply(this,Ae)}),mt("wheel",Le,pe),_(t,Le),H(),o()}import{noop as px}from"@vkontakte/videoplayer-shared/es2015";var cx=ke('<path d="M4.58 13.98a1 1 0 0 1 .99-1h4.45a1 1 0 0 1 1 1v4.45a.99.99 0 0 1-1.99 0v-2.05L5.71 19.7a1 1 0 1 1-1.41-1.4l3.32-3.32H5.57a1 1 0 0 1-.99-1m10.39-6.36 3.32-3.32a1 1 0 1 1 1.41 1.4l-3.32 3.32h2.05a.99.99 0 0 1 0 1.98H14a1 1 0 0 1-1-1V5.57a.99.99 0 1 1 1.98 0z"></path>'),ux=ke('<path d="M10.5 19a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-4.5a1 1 0 0 1 2 0v2.07l3.36-3.36a1 1 0 0 1 1.42 0l.01.01a1 1 0 0 1 0 1.42L7.43 18H9.5a1 1 0 0 1 1 1M18 7.43l-3.36 3.36a1 1 0 0 1-1.42 0l-.01-.01a1 1 0 0 1 0-1.42L16.57 6H14.5a1 1 0 0 1 0-2H19a1 1 0 0 1 1 1v4.5a1 1 0 0 1-2 0z"></path>');function lm(t,e){let i=g(e,"isFullscreen",8,!1),o=mr(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");Ze(t,{get testId(){return n(o)},children:(r,a)=>{var l=De(),d=ae(l);{var s=m=>{var p=cx();_(m,p)},u=m=>{var p=ux();_(m,p)};M(d,m=>{i()?m(s):m(u,!1)})}_(r,l)},$$slots:{default:!0}})}function Kd(t,e){B(e,!0);let i=g(e,"isFullscreen",3,!1),o=g(e,"click",3,px),r=ye(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=f(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));zt(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let m=la(u);a.set(m),o()()},get ariaKeyShortCut(){return gs.KeyF},role:"button",children:(u,m)=>{lm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),H()}var fx=ke('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.26 4.26C3 5.54 3 7.57 3 11.65v.72c0 4.07 0 6.11 1.26 7.38C5.54 21 7.57 21 11.65 21h.72c4.07 0 6.11 0 7.38-1.26C21 18.47 21 16.43 21 12.36v-.72c0-4.07 0-6.11-1.26-7.38C18.47 3 16.43 3 12.36 3h-.72C7.57 3 5.53 3 4.26 4.26M6 8.5c.1 4.68 2.56 7.5 6.61 7.5h.24v-2.68c1.47.15 2.57 1.25 3.02 2.68H18a6 6 0 0 0-3-3.76 5.7 5.7 0 0 0 2.55-3.74h-1.94c-.4 1.49-1.61 2.84-2.77 2.97V8.5h-1.96v5.2c-1.2-.3-2.76-1.76-2.83-5.2z" clip-rule="evenodd"></path></svg>');function dm(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=fx();io(o,()=>Xe({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"vk-logo-icon",role:"img"},i));var r=T(o);oi(r,()=>{var a;return(a=e.children)!=null?a:bt}),ti(),S(o),_(t,o)}var mx=ke('<svg><!><svg data-logo="vk_video"><path d="M7 8.6c0-1.96 0-2.94.38-3.69a3.5 3.5 0 0 1 1.53-1.53C9.66 3 10.64 3 12.6 3h1.36c2.46 0 3.7 0 4.64.48a4.4 4.4 0 0 1 1.92 1.92c.48.94.48 2.18.48 4.64v3.92c0 2.46 0 3.7-.48 4.64a4.4 4.4 0 0 1-1.92 1.92c-.94.48-2.18.48-4.64.48H12.6c-1.96 0-2.94 0-3.69-.38a3.5 3.5 0 0 1-1.53-1.53C7 18.34 7 17.36 7 15.4zm9.26 1.74c.9.54 1.36.81 1.51 1.16.13.3.13.65 0 .96-.15.34-.6.61-1.5 1.15l-2.4 1.43c-.93.56-1.4.84-1.8.8-.33-.03-.64-.2-.84-.48-.23-.31-.23-.86-.23-1.96v-2.85c0-1.1 0-1.64.23-1.96q.31-.42.85-.48c.38-.04.86.25 1.8.8zM5 9.04c0-2.46 0-3.7.48-4.64q.37-.71.95-1.25-.58.1-1.03.33A4.4 4.4 0 0 0 3.48 5.4C3 6.34 3 7.58 3 10.04v3.92c0 2.46 0 3.7.48 4.64a4.4 4.4 0 0 0 1.92 1.92q.45.23 1.03.33a4 4 0 0 1-.95-1.25C5 18.66 5 17.42 5 14.96z"></path></svg><svg x="4" y="3" data-logo="play_market"><path d="M0 1.26v15.47q0 .66.34 1L9.52 9 .33.28C.08.53 0 .92 0 1.26"></path><path d="M.33.28.38.23c.34-.3.89-.32 1.49 0l10.75 5.81-2.6 2.48zm10.29 8.75 2.88 2.45-.53.29-.34.18-2.58-2.44-9.71 8.22c.33.34.9.37 1.53.04l11.1-6 .53-.29 2.73-1.47c1.03-.56 1.03-1.47 0-2.02l-2.77-1.5-.84-.45.84.45.1.05z"></path></svg><svg x="3" data-logo="app_store"><path d="M17.62 16.37q-.48 1.09-1.15 2.03-.9 1.27-1.48 1.75-.88.8-1.9.83-.72 0-1.76-.42a5 5 0 0 0-1.89-.4q-.9 0-1.94.4a5 5 0 0 1-1.68.44q-.98.04-1.95-.85-.62-.53-1.55-1.82a13 13 0 0 1-1.63-3.2 12 12 0 0 1-.69-3.8q0-2.1.93-3.64A5.4 5.4 0 0 1 5.5 5.03q.77 0 2.03.46t1.62.47q.26 0 1.79-.55a6 6 0 0 1 2.43-.42 5.2 5.2 0 0 1 4.05 2.09q-2.4 1.44-2.4 4.02a4.4 4.4 0 0 0 1.49 3.34q.66.61 1.48.95-.18.5-.38.98M13.5.42q0 1.58-1.17 2.94c-.94 1.08-2.07 1.7-3.3 1.6L9 4.56c0-1 .45-2.08 1.24-2.96q.6-.67 1.5-1.12.93-.44 1.74-.48z"></path></svg><path d="M32.55 17.04h2.5L38.7 7h-1.8l-2.94 8.28h-.28L30.84 7H29zm15.52 0-4.61-5.2L47.72 7H45.6l-3.56 4.09h-.42V7h-1.7v10.04h1.7v-4.3h.43l3.76 4.3z"></path><path d="M57.89 11.89a2.2 2.2 0 0 0 1.44-2.16C59.33 8.14 58 7 56.06 7h-3.92v10.04h4.2c1.96 0 3.29-1.14 3.29-2.8 0-1.17-.66-2.04-1.74-2.35m-4.04-3.4h2.21c.92 0 1.54.56 1.54 1.39 0 .8-.62 1.36-1.54 1.36h-2.2zm2.5 7.06h-2.5v-2.81h2.5c.9 0 1.52.57 1.52 1.4 0 .84-.62 1.4-1.52 1.4m4.84 1.5h2.32l2.77-5.5h.22v5.5h1.57v-7.4h-2.32l-2.77 5.5h-.22v-5.5h-1.57zm7.96 2.21h1.64v-2.2h5.33v2.2h1.64v-3.7h-1.29V9.64h-5.43l-.37 3.78c-.13 1.34-.53 2.13-1.34 2.13h-.18zm2.49-3.7c.4-.39.57-1.04.68-2.15l.23-2.27h2.28v4.42zm14.38-2.3a3.7 3.7 0 0 0-3.84-3.76 3.7 3.7 0 0 0-3.85 3.85 3.7 3.7 0 0 0 3.85 3.84c1.54 0 2.99-.72 3.55-2.13l-1.54-.26c-.36.53-1.04.9-1.91.9-1.26 0-2.09-.77-2.24-1.91H86zm-3.84-2.33c1.02 0 1.8.65 2.06 1.58h-4.1a2.1 2.1 0 0 1 2.04-1.58m8.66 6.26c2.32 0 3.96-1.6 3.96-3.84 0-2.25-1.64-3.85-3.96-3.85s-3.97 1.6-3.97 3.85 1.64 3.84 3.97 3.84m0-1.5c-1.34 0-2.25-.95-2.25-2.34 0-1.4.9-2.35 2.25-2.35 1.34 0 2.25.95 2.25 2.35s-.91 2.35-2.25 2.35" class="_ru"></path><path d="M35.02 17.36h-2.48L29 7.42h1.83l2.83 8.2h.28l2.93-8.2h1.8zm8.41-5.15 4.6 5.15h-2.24l-3.75-4.26h-.43v4.26h-1.7V7.42h1.7v4.05h.41l3.55-4.05h2.1zm13.37 5.15h-2.48L50.8 7.42h1.83l2.82 8.2h.29l2.92-8.2h1.8zm6.46 0h-1.64v-7.33h1.64zm-.81-8.37q-.45 0-.74-.27a1 1 0 0 1-.28-.72q0-.44.28-.72.3-.28.74-.28t.72.28q.3.29.29.72 0 .44-.29.72t-.72.27m5.93 8.51q-1.03 0-1.86-.48a3.5 3.5 0 0 1-1.29-1.35 4 4 0 0 1-.45-1.98q0-1.1.45-1.95.46-.88 1.3-1.36.81-.5 1.85-.5.9 0 1.6.38.68.35 1.13.88V7.42h1.63v9.94h-1.22l-.34-1.18q-.46.54-1.17.94a3.4 3.4 0 0 1-1.63.38m.4-1.45q1.04 0 1.68-.65.65-.66.65-1.7t-.65-1.7a2.2 2.2 0 0 0-1.68-.66 2.2 2.2 0 0 0-1.66.66q-.64.66-.64 1.7t.64 1.7q.64.65 1.66.65m13.15-2.44-.03.52h-5.94q.12.86.71 1.38.6.51 1.52.51.63 0 1.13-.24.51-.24.78-.65l1.53.26q-.39 1.01-1.38 1.56-.96.55-2.16.55-1.1 0-1.98-.48a3.6 3.6 0 0 1-1.85-3.33q0-1.1.48-1.95.5-.88 1.37-1.36a4 4 0 0 1 1.98-.5q1.11 0 1.98.5.88.48 1.36 1.34.5.86.5 1.89m-3.84-2.31q-.73 0-1.29.42-.53.42-.74 1.14h4.1a2.2 2.2 0 0 0-2.07-1.56m8.66 6.2q-1.14 0-2.04-.48a3.7 3.7 0 0 1-1.4-1.35 4 4 0 0 1-.5-1.98q0-1.1.5-1.95.5-.88 1.4-1.36.9-.5 2.04-.5t2.03.5q.91.48 1.4 1.36.52.86.52 1.95 0 1.11-.51 1.98-.5.86-1.4 1.35-.9.48-2.04.48m0-1.48q.99 0 1.62-.63.63-.66.63-1.7t-.63-1.67a2.2 2.2 0 0 0-1.62-.65q-.99 0-1.62.65-.62.63-.62 1.67 0 1.05.62 1.7.63.63 1.62.63" class="_en"></path></svg>');function cm(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=mx();io(o,()=>Xe({xmlns:"http://www.w3.org/2000/svg",width:"95",height:"24",fill:"var(--btn-color, #fff)","fill-rule":"evenodd","aria-hidden":"true","clip-rule":"evenodd",viewBox:"0 0 95 24",role:"img"},i));var r=T(o);oi(r,()=>{var a;return(a=e.children)!=null?a:bt}),ti(6),S(o),_(t,o)}var vx={hash:"s-29",code:"svg [data-logo],svg[data-testid=vk-video-logo-icon--en] ._ru,svg[data-testid=vk-video-logo-icon--short] ._en,svg[data-testid=vk-video-logo-icon--short] ._ru,svg[data-testid=vk-video-logo-icon] ._en{opacity:0;visibility:hidden}svg[data-logo=app_store] [data-logo=app_store],svg[data-logo=play_market] [data-logo=play_market],svg[data-logo=vk_video] [data-logo=vk_video]{opacity:1;visibility:visible}"};function um(t,e){B(e,!0),Q(t,vx);let i=g(e,"short",3,!1),o=g(e,"isCyrillic",3,!0),r=g(e,"logo",19,()=>"vk_video"),a="vk-video-logo-icon--short",l=24,d=f(()=>!o()&&!i()?91:i()?l:95),s=f(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=f(()=>`0 0 ${n(d)} 24`);cm(t,{get width(){return n(d)},height:"24",get viewBox(){return n(u)},get"data-testid"(){return n(s)},get"data-logo"(){return r()}}),H()}function qd(t,e){B(e,!0);let[i,o]=Be(),r=()=>w($,"$isMobile",i),a=()=>w(v,"$currentGridType$",i),l=()=>w(b,"$isCyrillicRelatedInterface$",i),d=g(e,"ref",15,void 0),s=g(e,"logoClickable",3,!1),u=g(e,"targetUrl",3,""),m=Vt(),p=ye(),v=p.ui.currentGridType$,$=p.ui.isMobile,y=p.ui.t,b=p.isCyrillicRelatedInterface$,x=f(()=>m.logoType!=="vk"),I=f(()=>n(x)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),C=f(()=>(r()&&Bs(a(),"m")||Bs(a(),"l"))&&n(x)),R=()=>{var E,W;e.click(),(E=p.callbacks)!=null&&E.onLogoClicked?(W=p.callbacks)==null||W.onLogoClicked():u()&&window.open(u(),"_blank")},k=f(()=>!s()),P=f(()=>n(x)?"btn-vk-video-logo":"btn-vk-logo");zt(t,{className:"btn-full-opacity",get disabled(){return n(k)},click:R,get testId(){return n(P)},get ariaLabel(){return n(I)},get ref(){return d()},set ref(E){d(E)},children:(E,W)=>{var F=De(),U=ae(F);{var j=G=>{um(G,{get logo(){return m.logoType},get short(){return n(C)},get isCyrillic(){return l()}})},re=G=>{dm(G,{})};M(U,G=>{n(x)?G(j):G(re,!1)})}_(E,F)},$$slots:{default:!0}}),H(),o()}import{ChromecastState as bx}from"@vkontakte/videoplayer-core/es2015";import{ChromecastState as z_}from"@vkontakte/videoplayer-core/es2015";var gx=ke('<path d="M3.6 13.3a5.1 5.1 0 0 1 5.05 5.83.9.9 0 0 1-1.78-.26 3.3 3.3 0 0 0-3.74-3.74.9.9 0 0 1-.26-1.78c.24-.03.49-.05.73-.05Z" class="s-13"></path><path d="M3.6 9.7a8.7 8.7 0 0 1 8.68 9.37.9.9 0 0 1-1.8-.14c.02-.17.02-.35.02-.53a6.9 6.9 0 0 0-7.43-6.88.9.9 0 0 1-.14-1.8l.67-.02ZM3.6 16.9a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z" class="s-13"></path><path d="M16.24 4.1c.8 0 1.47 0 2 .04a4 4 0 0 1 1.53.38 3.9 3.9 0 0 1 1.7 1.71 4 4 0 0 1 .39 1.53c.04.53.04 1.2.04 2v4.48c0 .8 0 1.47-.04 2a4 4 0 0 1-.38 1.53 3.9 3.9 0 0 1-1.7 1.7 4 4 0 0 1-1.54.39c-.53.04-1.2.04-2 .04H15a.9.9 0 0 1 0-1.8h1.2c.85 0 1.44 0 1.9-.04.44-.03.68-.1.85-.19.4-.2.72-.52.92-.92.09-.17.16-.4.2-.85.03-.46.03-1.05.03-1.9V9.8c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2.1 2.1 0 0 0-.92-.92 2.25 2.25 0 0 0-.85-.2 25.9 25.9 0 0 0-1.9-.03H5.83a2.1 2.1 0 0 0-1.81 1.4.9.9 0 1 1-1.7-.6A3.9 3.9 0 0 1 6 4.1h10.24Z" class="s-13"></path>',1),hx=ke('<path d="M3.60219 13.2993C6.41858 13.2995 8.70256 15.5835 8.70278 18.3999C8.70277 18.6469 8.68424 18.8909 8.65004 19.1294C8.57937 19.6212 8.12333 19.9625 7.63149 19.8921C7.13968 19.8213 6.79823 19.3654 6.86879 18.8735C6.89087 18.7195 6.90199 18.5611 6.902 18.3999C6.90178 16.5776 5.42447 15.1003 3.60219 15.1001C3.441 15.1001 3.28267 15.1112 3.12856 15.1333C2.63666 15.2039 2.18077 14.8624 2.11 14.3706C2.03966 13.8788 2.38091 13.4227 2.8727 13.3521C3.11125 13.3178 3.35516 13.2993 3.60219 13.2993Z"></path><path d="M3.60219 9.69971C8.40682 9.69977 12.3021 13.5953 12.3024 18.3999C12.3024 18.6248 12.2938 18.8489 12.277 19.0698C12.239 19.5651 11.8065 19.9365 11.3112 19.8989C10.8157 19.8611 10.4445 19.4286 10.4821 18.9331C10.4954 18.7576 10.5026 18.5791 10.5026 18.3999C10.5023 14.5894 7.41271 11.5005 3.60219 11.5005C3.42268 11.5005 3.24474 11.5066 3.06899 11.52C2.57352 11.5578 2.14115 11.1863 2.10317 10.6909C2.06587 10.1957 2.43694 9.76287 2.93227 9.7251C3.15348 9.70823 3.37699 9.69971 3.60219 9.69971Z"></path><path d="M3.60219 16.8999C4.43047 16.8999 5.10198 17.5717 5.10219 18.3999C5.10209 19.2282 4.43054 19.8999 3.60219 19.8999C2.77383 19.8999 2.10229 19.2282 2.10219 18.3999C2.10241 17.5717 2.7739 16.8999 3.60219 16.8999Z"></path><path d="M16.2379 4.1001C17.0459 4.10009 17.7067 4.10017 18.2438 4.14404C18.7997 4.18946 19.3022 4.28599 19.7711 4.5249C20.5049 4.89882 21.1014 5.49623 21.4752 6.22998C21.714 6.69873 21.8107 7.20063 21.8561 7.75635C21.9 8.29338 21.9001 8.95424 21.9 9.76221V14.2378C21.9001 15.0458 21.9 15.7066 21.8561 16.2437C21.8107 16.7996 21.7141 17.3021 21.4752 17.771C21.1014 18.5046 20.5048 19.1012 19.7711 19.4751C19.3022 19.714 18.7997 19.8105 18.2438 19.856C17.7067 19.8998 17.0459 19.8999 16.2379 19.8999H14.9997C14.503 19.8996 14.1005 19.4972 14.1002 19.0005C14.1002 18.5036 14.5028 18.1004 14.9997 18.1001H16.1998C17.0548 18.1001 17.6422 18.0992 18.0973 18.062C18.5419 18.0257 18.7809 17.9596 18.9538 17.8716C19.3489 17.6702 19.6704 17.3487 19.8717 16.9536C19.9598 16.7808 20.0258 16.5417 20.0622 16.0972C20.0993 15.6421 20.1002 15.0546 20.1002 14.1997V9.80029C20.1002 8.94536 20.0993 8.35794 20.0622 7.90283C20.0258 7.45834 19.9598 7.21921 19.8717 7.04639C19.6704 6.6514 19.3487 6.33073 18.9538 6.12939C18.7809 6.04133 18.5419 5.97431 18.0973 5.93799C17.6422 5.9008 17.0548 5.8999 16.1998 5.8999H6.00063L5.83071 5.90674C4.99191 5.97398 4.28981 6.53462 4.01918 7.30029C3.85342 7.76872 3.33928 8.01472 2.87075 7.84912C2.40214 7.68346 2.15628 7.16833 2.32192 6.69971C2.85696 5.18632 4.30125 4.1001 6.00063 4.1001H16.2379Z"></path><path d="M2.95114 7.11345C2.42394 7.1914 1.90399 6.78569 2.00995 6.2634C2.05777 6.0277 2.12517 5.82449 2.22018 5.63803C2.5078 5.07354 2.96674 4.6146 3.53123 4.32698C4.17296 4 5.01304 4 6.6932 4H17.2001C18.8803 4 19.7204 4 20.3621 4.32698C20.9266 4.6146 21.3855 5.07354 21.6731 5.63803C22.0001 6.27976 22.0001 7.11984 22.0001 8.8V15.2C22.0001 16.8802 22.0001 17.7202 21.6731 18.362C21.3855 18.9265 20.9266 19.3854 20.3621 19.673C19.7204 20 18.8803 20 17.2001 20H15.7196C15.2009 20 14.8203 19.5134 14.8938 19C14.9638 18.5101 15.0001 18.0093 15.0001 17.5C15.0001 11.701 10.2991 7 4.5001 7C3.97384 7 3.45662 7.03872 2.95114 7.11345Z"></path>',1),_x={hash:"s-13",code:".animated.s-13{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-13{animation-name:s-13-wave1}.wave2.animated.s-13{animation-name:s-13-wave2}.wave3.animated.s-13{animation-name:s-13-wave3}@keyframes s-13-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-13-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-13-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function Qd(t,e){B(e,!0),Q(t,_x);let i=g(e,"isMobile",3,!1),o=f(()=>e.iconState===z_.CONNECTED),r=f(()=>e.iconState===z_.CONNECTING),a=f(()=>n(o)?"#2688EB":na),l=f(()=>e.size?un(e.size):void 0);var d=De(),s=ae(d);{var u=p=>{Ze(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(v,$)=>{var y=gx();ti(2),_(v,y)},$$slots:{default:!0}})},m=p=>{Ze(p,{get style(){return n(l)},testId:"chromecast-icon",children:(v,$)=>{var y=hx(),b=ae(y);let x;var I=A(b);let C;var R=A(I);let k;var P=A(R);let E;var W=A(P);let F;O((U,j,re,G,oe)=>{x=ie(b,0,"wave2 s-13",null,x,U),C=ie(I,0,"wave3 s-13",null,C,j),k=ie(R,0,"wave1 s-13",null,k,re),E=ie(P,0,"s-13",null,E,G),F=ie(W,0,"s-13",null,F,oe)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:n(o)}),()=>({hidden:!n(o)})]),_(v,y)},$$slots:{default:!0}})};M(s,p=>{i()?p(u):p(m,!1)})}_(t,d),H()}import{noop as $x}from"@vkontakte/videoplayer-shared/es2015";function Gd(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"click",3,$x),l=ye().ui.t,d=f(()=>e.state===bx.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));zt(t,{get ariaLabel(){return n(d)},get click(){return r()},testId:"btn-chromecast",get ref(){return i()},set ref(s){i(s)},children:(s,u)=>{Qd(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),H()}import{noop as xx}from"@vkontakte/videoplayer-shared/es2015";var yx=ke('<path d="m21.62 16.5-.02.07q-.22 1.27-.42 2.09a5 5 0 0 1-.64 1.5 4.4 4.4 0 0 1-2.51 1.73q-.77.18-1.63.07t-2.11-.34l-4.34-.8q-1.27-.22-2.1-.42a5 5 0 0 1-1.5-.65 4.4 4.4 0 0 1-1.72-2.5 5 5 0 0 1-.07-1.63q.1-.84.34-2.11l.01-.07q.22-1.27.43-2.1a5 5 0 0 1 .64-1.5 4.4 4.4 0 0 1 2.5-1.73 5 5 0 0 1 1.64-.07q.83.1 2.1.35l4.34.8q1.28.21 2.1.42a5 5 0 0 1 1.5.64 4.4 4.4 0 0 1 1.73 2.5q.18.78.07 1.64-.1.83-.34 2.1m-1.45-2.3c.05-.49.03-.77-.02-1a2.6 2.6 0 0 0-1.02-1.48 3 3 0 0 0-.93-.37c-.48-.13-1.1-.24-2-.4l-4.26-.79c-.9-.16-1.52-.27-2.01-.33a3 3 0 0 0-1 .03 2.6 2.6 0 0 0-1.48 1.02 3 3 0 0 0-.37.92c-.13.48-.24 1.1-.4 2s-.28 1.51-.33 2c-.06.5-.04.78.02 1 .15.6.51 1.13 1.02 1.48.19.13.45.25.92.37.48.13 1.1.25 2 .4l4.27.79c.9.16 1.52.28 2.01.33s.77.03 1-.02a2.6 2.6 0 0 0 1.47-1.03c.14-.19.25-.45.38-.92.12-.48.24-1.1.4-2s.28-1.51.33-2"></path><path d="M18.19 7.49a.9.9 0 0 1-1.05-.73c-.14-.8-.2-1.08-.28-1.3A2.6 2.6 0 0 0 14.5 3.8c-.22 0-.5.04-1.31.17l-5.85.96a8 8 0 0 0-2.17.5 2.6 2.6 0 0 0-1.33 1.75c-.08.38-.04.85.11 2.23l.01.1a.9.9 0 1 1-1.78.2l-.01-.1-.02-.17a9 9 0 0 1-.07-2.64 4.4 4.4 0 0 1 2.25-2.97c.63-.33 1.42-.46 2.56-.65l.16-.03 5.85-.96.1-.01c.67-.11 1.13-.19 1.55-.18a4.4 4.4 0 0 1 4 2.82c.14.39.23.85.35 1.53l.01.1a.9.9 0 0 1-.72 1.04"></path><path d="M12.72 12.41a.42.42 0 0 0-.69.23l-.72 4.18a.4.4 0 0 0 .03.23c.08.2.33.3.54.22l3.67-1.47a.4.4 0 0 0 .12-.68z"></path>',1);function pm(t){Ze(t,{testId:"episodes-icon",children:(e,i)=>{var o=yx();ti(2),_(e,o)},$$slots:{default:!0}})}var Du=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var wx=L('<span class="text mobile s-23"> </span> <div class="chevron-episodes s-23" data-testid="btn-episodes_icon"><!></div>',1),Sx=L('<span class="text s-23"> </span>'),Cx=L('<span class="text count s-23"> </span>'),Tx=L('<span class="icon s-23"><!></span> <!>',1),Ix={hash:"s-23",code:".icon.s-23{flex-shrink:0}.text.s-23{overflow:hidden;padding:0 8px;text-overflow:ellipsis;white-space:nowrap}.text.count.s-23{overflow:visible}.text.mobile.s-23{padding:0 3px 0 4px}.chevron-episodes.s-23{margin-bottom:-6px;opacity:.7;transform:scale(.8)}"};function Yd(t,e){var X,Ie,fe;B(e,!0),Q(t,Ix);let[i,o]=Be(),r=()=>w(y,"$currentGridType$",i),a=()=>w(b,"$openedByKeyboard$",i),l=()=>w(x,"$panelOpened$",i),d=()=>w(I,"$isMobile",i),s=g(e,"position",3,0),u=g(e,"duration",3,0),m=g(e,"timeCodes",19,()=>[]),p=ye(),v=(Ie=(X=p.callbacks)==null?void 0:X.onEpisodeChanged)!=null?Ie:xx,$=!!((fe=p.callbacks)!=null&&fe.onEpisodeClicked),y=p.ui.currentGridType$,b=p.ui.episodes.openedByKeyboard$,x=p.ui.episodes.panelOpened$,I=p.ui.isMobile,C=p.ui.t,R=K(void 0),k=ee=>{var Ce,de,We;if(!!((Ce=p.callbacks)!=null&&Ce.onEpisodeClicked)){let ve=la(ee);b.set(ve),x.set(!0),(We=(de=p.callbacks)==null?void 0:de.onEpisodeClicked)==null||We.call(de,ve)}},P=K(null),E=f(()=>s()/u());He(()=>{var be;let ee=Du(n(E),u(),m());ee?((be=n(P))==null?void 0:be.time)!==ee.time&&(v(ee),D(P,ee,!0)):D(P,null)});let W=f(()=>{var ee;return((ee=n(P))==null?void 0:ee.text)||""}),F=f(()=>oo(r(),"xl")?"FULL":oo(r(),"m")?"COUNT":"SHORT"),U=f(()=>`${C("tooltip_episodes")}: ${n(W)}`),j=(ee,be,Ce)=>_t(null,null,function*(){yield mo(),(ee==null?void 0:ee.getAttribute("aria-expanded"))==="false"&&be&&!Ce&&Et(()=>{b.set(!1),ee.focus()})});He(()=>{j(n(R),a(),l())});var re=De(),G=ae(re);{var oe=ee=>{let be=f(()=>d()?"px-0":""),Ce=f(()=>!$);zt(ee,{get className(){var de;return`w-max btn-full-opacity btn-jc-l ${(de=n(be))!=null?de:""}`},testId:"btn-episodes",click:k,get disabled(){return n(Ce)},get ariaExpanded(){return l()},get ariaLabel(){return n(U)},get ref(){return n(R)},set ref(de){D(R,de,!0)},children:(de,We)=>{var ve=De(),me=ae(ve);{var Z=pe=>{var le=wx(),ue=ae(le),Le=T(ue,!0);S(ue);var ze=A(ue,2),te=T(ze);Vr(te,{direction:"right"}),S(ze),O(()=>he(Le,n(W))),_(pe,le)},N=pe=>{var le=Tx(),ue=ae(le),Le=T(ue);pm(Le,{}),S(ue);var ze=A(ue,2);{var te=we=>{var Ee=Sx(),Ye=T(Ee,!0);S(Ee),O(()=>he(Ye,n(W))),_(we,Ee)},ce=(we,Ee)=>{{var Ye=Ae=>{var Te=Cx(),Fe=T(Te,!0);S(Te),O(()=>he(Fe,m().length)),_(Ae,Te)};M(we,Ae=>{n(F)==="COUNT"&&Ae(Ye)},Ee)}};M(ze,we=>{n(F)==="FULL"?we(te):we(ce,!1)})}_(pe,le)};M(me,pe=>{d()?pe(Z):pe(N,!1)})}_(de,ve)},$$slots:{default:!0}})};M(G,ee=>{n(P)&&ee(oe)})}_(t,re),H(),o()}import{debounceFn as fb}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as Ox,PlaybackState as Wl,Player as Nx,PredefinedQualityLimits as $s,VideoFormat as Zd,clientChecker as J_}from"@vkontakte/videoplayer-core/es2015";import{assertNonNullable as _r,getHighestQuality as Bx,InterfaceLanguage as Hx,isInvariantQuality as Fx,isNonNullable as Ux,loadVKLangPack as zx,Logger as Wx,map as eb,merge as Kx,Observable as Ku,Subject as Jd,Subscription as tb,TracerFactory as qx,ValueSubject as ib,VideoQuality as Qx,devNull as Gx,now as Yx,filter as jx,once as Xx,ErrorCategory as ob,suppressAbort as Zx}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Us,ThinOneStat as Jx}from"@vkontakte/videoplayer-statistics/es2015";import{detectEmbed as Ex,devNull as ri,now as si,withoutNullable as W_}from"@vkontakte/videoplayer-shared/es2015";import{addScript as Px,Subject as pn,clearVideoElement as Ax}from"@vkontakte/videoplayer-shared/es2015";var kx="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Ou=class{constructor(e,i){this.adman=null;this.initialVolume=1;this.videoElement=null;this.currentAdSection=null;this.actions=null;this.adsState=null;this.playerState=null;this.events={init$:new pn,loadStarted$:new pn,loadEnded$:new pn,loadError$:new pn,ready$:new pn,slotRequested$:new pn,started$:new pn,timeRemained$:new pn,paused$:new pn,resumed$:new pn,ended$:new pn,empty$:new pn,skipped$:new pn,clicked$:new pn,closed$:new pn,error$:new pn};this.loadAdman=e=>(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[si()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));this.loadAdmanMailRu=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[si()]}),i(),this.events.loadEnded$.next()):(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[si()]}),o())};Px(kx,e,this.loadTimeout).then(()=>{ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[si()]}),window.AdmanHTML?(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[si()]}),i(),this.events.loadEnded$.next()):(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[si()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[si()]}),o(),clearTimeout(r)})});this.loadAdmanNPM=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[si()]}),i(),this.events.loadEnded$.next()):(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[si()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[si()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[si()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[si()]}),!d&&(window.AdmanHTML?(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[si()]}),i(),this.events.loadEnded$.next()):(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[si()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[si()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[si(),i.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(i)}`}),this.events.started$.next(e),i.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:"ad muted start"})),this.adsState.duration.set(i.duration),this.adsState.playbackState.set("playing"),this.adsState.canSkip.set(i.allowClose),this.adsState.secondsToWatchBeforeSkip.set(i.allowCloseDelay),this.startWatchDog(),(o=this.externalApi)!=null&&o.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,e,String(i.bannerID))):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=e=>{var o;((o=this.adsState)!=null&&o.playbackState?$e(this.adsState.playbackState):void 0)!=="inactive"&&(this.adsState?(this.adsState.position.set(e.currentTime),this.events.timeRemained$.next(e),this.startWatchDog()):this.onAdError("TimeRemained callback failed: Adman state is not initialized"))};this.onAdPaused=()=>{var e;ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[si()]}),this.stopWatchDog(),this.adsState?(this.log({message:"ad paused"}),this.adsState.playbackState.set("paused")):this.onAdError("Paused callback failed: Adman state is not initialized")};this.onAdPlayed=()=>{var e;ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[si()]}),this.startWatchDog(),this.adsState?(this.log({message:"ad played"}),this.adsState.playbackState.set("playing")):this.onAdError("Player callback failed: Adman is not initialized")};this.onAdMidrollPoint=()=>{if(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[si()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch(e){this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};this.onAdSkipped=()=>{var e;ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[si()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[si()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[si()]}),this.log({message:"ad completed"}),this.currentAdSection?(this.events.ended$.next(this.currentAdSection),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0)):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{var e,i;ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[si()]}),this.log({message:"ad clicked"}),(i=this.videoElement)==null||i.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(e="ad error")=>{ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[si()]}),this.log({message:e}),this.events.error$.next(e),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()};this.log=e.createComponentLog("AdmanWrapper"),ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[si()]}),this.loadTimeout=i.loadTimeout,this.initTimeout=i.initTimeout,this.runtimeTimeout=i.runtimeTimeout,this.useAdmanFromNPM=i.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(i.volumeMultiplier,1)),this.isVsidOriginal=i.isVsidOriginal}init(e,i,o){this.actions=e,this.adsState=i,this.playerState=o}onAdmanLoadingError(){this.onAdError("adman loading error")}initAdman(e){return _t(this,null,function*(){var k,P;if(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[si(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:o,isAutoplay:r,adsContainer:a,adsVideoElement:l,slotId:d,params:s={},paramsOverride:u={},duration:m,externalApi:p,json:v}=e;this.externalApi=p;let $,y=this.playerState&&$e(this.playerState.vsid);y&&(this.isVsidOriginal?$=y:$=parseInt(y,36));let{isEmbed:b,immediateOrigin:x}=Ex(),I=(k=b?x:window.location.href)!=null?k:window.location.href,C=W_(Xe(ii(Xe(ii(Xe({},s),{dl:encodeURIComponent(I),autoplay:r?1:0,player_width:i,player_height:o}),$?{request_id:$}:{}),{duration:m}),u)),R=W_({slot:v?void 0:d,wrapper:a,videoEl:l,videoQuality:o,params:v?void 0:C,browser:{mobile:!1},json:v});try{let E=new window.AdmanHTML;if(E.onReady(this.onAdsReady),E.onStarted(this.onAdStarted),E.onPlayed(this.onAdPlayed),E.onPaused(this.onAdPaused),E.adMidrollPoint(this.onAdMidrollPoint),E.onClosed(this.onAdClosed),E.onSkipped(this.onAdSkipped),E.onClicked(this.onAdClicked),E.onTimeRemained(this.onAdTimeRemained),E.onCompleted(this.onAdCompleted),E.onError(this.onAdError),E.setDebug(!1),!v&&((P=this.externalApi)!=null&&P.videoGetAds)){let W=yield this.safeExternalCall(this.externalApi.videoGetAds,C);W&&(delete R.slot,delete R.params,Object.assign(R,{json:W}))}E.init(R),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(R)}`})}catch(E){ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[si()]}),this.onAdError("could not init adman")}})}switchToVideo(e=!1){var o,r,a;if(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[si()]}),this.currentAdSection===null&&!e){this.log({message:"switch to video, no currentAdSection. can't switch"});return}let i=this.currentAdSection==="postroll";if(this.actions){if(this.adsState&&this.playerState)this.adsState.playbackState.set("inactive"),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${i}`});else{let l="Switch to video: Adman state was not updated correctly";this.log({message:l}),this.events.error$.next(l)}(a=(r=this.actions).switchFromAdsToVideo)==null||a.call(r,!i)}}setPostrollPassed(e){var i;(i=this.adsState)==null||i.postrollPassed.set(e),this.log({message:"postroll passed"})}togglePlay(){var e;if(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[si()]}),this.adsState){this.log({message:"toggle play"});let i=$e(this.adsState.playbackState);i==="playing"?this.pause():i==="paused"&&this.play()}else this.onAdError("Can not toggle play: Adman state is not initialized")}setInitialVolume(e){this.log({message:`set initial volume ${e}`}),this.initialVolume=e}setVolume(e){let i=e*this.volumeMultiplier;if(this.log({message:`set volume ${i}`}),this.adman)try{this.adman.setVolume(i)}catch(o){this.onAdError("could not set ad volume")}this.videoElement&&(this.videoElement.volume=i)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch(i){this.onAdError("could not set ad fullscreen")}}startPreroll(){if(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[si()]}),this.adman){if(!this.isDestroyed){this.log({message:"start preroll"}),this.setVolume(this.initialVolume),this.currentAdSection="preroll",this.startWatchDog();try{this.adman.start("preroll")}catch(e){this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){var e;if(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[si()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch(i){this.onAdError("could not start postroll")}}else this.onAdError("Can not start postroll: Adman is not initialized")}startWatchDog(){this.watchDogTimeout&&this.stopWatchDog(),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){var e;if(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[si()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch(i){this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){var e;if(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[si()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch(i){this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){var e;if(ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[si()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(i){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){var o;(o=this.adman)==null||o.setPosition(Math.floor(e),Math.floor(i))}destroy(){var e,i,o,r,a,l,d,s,u,m,p,v;ri.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[si()]}),this.log({message:"destroy"}),this.stopWatchDog(),(e=this.adman)==null||e.onReady(void 0),(i=this.adman)==null||i.onStarted(void 0),(o=this.adman)==null||o.onPlayed(void 0),(r=this.adman)==null||r.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(l=this.adman)==null||l.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(s=this.adman)==null||s.onClicked(void 0),(u=this.adman)==null||u.onTimeRemained(void 0),(m=this.adman)==null||m.onCompleted(void 0),(p=this.adman)==null||p.onError(void 0),(v=this.adman)==null||v.destroy(),this.videoElement&&Ax(this.videoElement),this.isDestroyed=!0}safeExternalCall(e,...i){return _t(this,null,function*(){var o;try{return yield e(...i)}catch(r){return this.onAdError((o=r==null?void 0:r.message)!=null?o:"External call failed"),null}})}};var K_=t=>{let e=Math.round(t);return isNaN(e)||e<40?"":e>=40&&e<55?50:e>=55&&e<90?60:e>=90&&e<180?120:e>=180?240:""};var fm=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(e,i){let o=[],r=e.split(this.twoLinesRegExp);for(let a of r){let l={startTime:0,endTime:0,texts:[],lang:i},d=a.split(this.oneLineRegExp);for(let s of d)if(!l.startTime&&!l.endTime){let u=new Nu,{startTime:m,endTime:p}=u.parse(s);l.startTime=m,l.endTime=p}else if(s.trim()!==""){let u=new mm,{texts:m}=u.parse(s);l.texts=[...l.texts,...m]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},Nu=class{constructor(){this.timeRegExp=/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/;this.timingRegExp=new RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`)}parse(e){let i={startTime:0,endTime:0},o=this.timingRegExp.exec(e);return o&&(i.startTime=this.calcTime(o[1],o[2],o[3],o[4]),i.endTime=this.calcTime(o[6],o[7],o[8],o[9])),i}parseTime(e){let i=this.timeRegExp.exec(e);return i?this.calcTime(i[1],i[2],i[3],i[4]):0}isTime(e){return this.timeRegExp.test(e)}calcTime(e="0",i="0",o="0",r="0"){let a=Number(e)*60*60,l=Number(i)*60,d=Number(o),s=+`0.${r}`;return a+l+d+s}},mm=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},r=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](l){let d=0,s=[];for(;d<l.length;){let u=["<",">"].reduce((m,p)=>{let v=l.indexOf(p,d);return m===-1||m>v?v:m},-1);if(u===-1){s.push(l.substring(d));break}s.push(l.substring(d,u)),d=u+1}return s}}),a=new Nu;for(let l of r)a.isTime(l)?i.texts.push({type:"timestamp",value:a.parseTime(l)}):i.texts.push({type:"text",value:l});return i}},q_=fm;import{isNonNullable as vm}from"@vkontakte/videoplayer-shared/es2015";var za,Ri,gm=0,hm=!1,Q_="",G_=(t,e=0,i=0)=>t<e&&t<i,Bu=(t,e=0,i=0)=>t>=e&&t<=i,Lx=(t,e=0,i=0)=>t>e&&t>i,Y_=(t,e,i,o=!1)=>{var d;let r=(d=i.find(({id:s})=>s===e.value))==null?void 0:d.subtitles;if(o)return r==null?void 0:r.find(({startTime:u,endTime:m})=>Bu(t,u,m));let a=t>=gm,l=t<gm;if(gm=t,l&&(hm=!1),vm(za)&&Bu(t,za.startTime,za.endTime)&&Q_===e.value)return za;if(!vm(Ri)&&(r!=null&&r.length)&&!hm){Ri=r.find(({startTime:u,endTime:m})=>Bu(t,u,m)||a&&G_(t,u,m)),za=void 0,!vm(Ri)&&r[r.length-1].endTime<t&&(hm=!0);return}else{if(Bu(t,Ri==null?void 0:Ri.startTime,Ri==null?void 0:Ri.endTime))return za=Ri,Ri=void 0,Q_=e.value,za;(a&&Lx(t,Ri==null?void 0:Ri.startTime,Ri==null?void 0:Ri.endTime)||l&&G_(t,Ri==null?void 0:Ri.startTime,Ri==null?void 0:Ri.endTime))&&(Ri=void 0)}};var Hu={ru:"Русский",en:"English",uk:"Українська",be:"Беларуская (тарашкевiца)",es:"Español",fi:"Suomi",de:"Deutsch",it:"Italiano",bg:"Български",hr:"Hrvatski",hu:"Magyar",sr:"Српски",pt:"Português",el:"Ελληνικά",pl:"Polski",fr:"Français",ko:"한국어","zh-CN":"汉语",lt:"Lietuvių",ja:"日本語",cs:"Čeština",et:"Eesti",tt:"Татарча",ba:"Башҡортса",cv:"Чăвашла",sk:"Slovenčina",ro:"Română",no:"Norsk",lv:"Latviešu",az:"Azərbaycan dili",hy:"Հայերեն",sv:"Svenska",nl:"Nederlands",tk:"Türkmen",ka:"ქართული",da:"Dansk",uz:"O‘zbek",th:"ภาษาไทย",id:"Bahasa Indonesia",tg:"Тоҷикӣ",sl:"Slovenščina",bs:"Bosanski","pt-BR":"Português brasileiro",fa:"فارسی",vi:"Tiếng Việt",hi:"हिन्दी",si:"සිංහල",bn:"বাংলা",tl:"Tagalog",mn:"Монгол",my:"ဗမာစာ",tr:"Türkçe",ne:"नेपाली",ur:"اردو",ky:"Кыргыз тили",pa:"پنجابی",os:"Ирон",kn:"ಕನ್ನಡ",sw:"Kiswahili",kk:"Қазақша",ar:"العربية",he:"עברית",ab:"Аҧсшәа",eu:"Euskara",eo:"Esperanto"},Mx={abk:"as",ara:"ar",aze:"az",bak:"ba",bel:"be",ben:"bn",bos:"bs",bul:"bg",ces:"cs",chv:"cv",dan:"da",deu:"de",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",fas:"fa",fin:"fi",fra:"fr",heb:"he",hin:"hi",hrv:"hr",hun:"hu",hye:"hy",ind:"id",ita:"it",jpn:"ja",kan:"kn",kat:"ka",kaz:"kk",kir:"ky",kor:"ko",lav:"lv",lit:"lt",mon:"mn",mya:"my",nep:"ne",nld:"nl",nor:"no",oss:"os",pan:"pa",pol:"pl",por:"pt",ron:"ro",rus:"ru",sin:"si",slk:"sk",slv:"sl",spa:"es",srp:"sr",swa:"sw",swe:"sv",tat:"tt",tgk:"tg",tgl:"tl",tha:"th",tuk:"tk",tur:"tr",ukr:"uk",urd:"ur",uzb:"uz",vie:"vi"},jd=t=>{var e,i;return(i=(e=Hu[t])!=null?e:Hu[Mx[t]])!=null?i:void 0};import{clientChecker as X_}from"@vkontakte/videoplayer-core/es2015";import{debounceFn as Rx,getWindow as _m,ValueSubject as bm}from"@vkontakte/videoplayer-shared/es2015";import{getWindow as Vx}from"@vkontakte/videoplayer-shared/es2015";var Fu=()=>{var t;return(t=Vx().document)==null?void 0:t.pictureInPictureEnabled},Uu=t=>!!t.pictureInPictureWindow,j_=t=>!!t.target&&"height"in t.target&&"width"in t.target;var Hs=class{constructor({enabled:e=!0}={enabled:!0}){this.isRequested=!1;this.videoElement=void 0;this.playerContainer=void 0;this.externalEventHandlers={};this.eventHandlers={enterpictureinpicture:this.onEnterPictureInPicture.bind(this),leavepictureinpicture:this.onLeavePictureInPicture.bind(this),resize:Rx(this.onResize.bind(this),300)};this.info={isActive$:new bm(!1),isEnabled$:new bm(!1),type:0};this.info.isEnabled$=new bm(e)}isSupported(){return Fu()}isActive(){return this.info.isActive$.getValue()}setContext(e){this.svelteContext=e}revealPictureInPicture(){return _t(this,null,function*(){this.isRequested&&(this.removeEventHandlers(),yield this.request(),this.addEventHandlers())})}request(){return _t(this,null,function*(){var e;if(!(!this.isSupported()||this.isActive()))try{yield(e=this.videoElement)==null?void 0:e.requestPictureInPicture()}catch(i){this.isRequested=!1}})}exit(){return _t(this,null,function*(){let{document:e}=_m();!this.isSupported()||!this.isActive()||!this.videoElement||!e.pictureInPictureElement||(yield e.exitPictureInPicture(),X_.browser.isYandex&&!this.videoElement.isConnected&&this.onLeavePictureInPicture())})}assignPlayerContainer(e){this.isSupported()&&(this.playerContainer=e)}updateVideoElement(){this.isSupported()&&this.exit().finally(()=>{var i;this.removeEventHandlers();let e=this.videoElement;this.videoElement=(i=this.playerContainer)==null?void 0:i.querySelector("video"),this.waitForSafariLeavePictureInPicture(e,this.videoElement),this.addEventHandlers()})}addEventHandlers(){var e,i;(e=this.videoElement)==null||e.addEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.addEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}setExternalEventHandlers(e){this.externalEventHandlers=Xe({},e)}removeEventHandlers(){var e,i;(e=this.videoElement)==null||e.removeEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.removeEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}dispose(){return _t(this,null,function*(){this.removeEventHandlers(),yield this.exit(),this.info.isActive$.next(!1),this.isRequested=!1})}onEnterPictureInPicture(e){var o,r;let i=Uu(e)?e.pictureInPictureWindow:void 0;this.info.isActive$.next(!0),this.isRequested=!0,i==null||i.addEventListener("resize",this.eventHandlers.resize),(r=(o=this.externalEventHandlers).enterpictureinpicture)==null||r.call(o)}onLeavePictureInPicture(e){var i,o;if(e){let r=Uu(e)?e.pictureInPictureWindow:void 0;r==null||r.removeEventListener("resize",this.eventHandlers.resize)}this.info.isActive$.next(!1),this.isRequested=!1,this.eventHandlers.resize.cancel(),(o=(i=this.externalEventHandlers).leavepictureinpicture)==null||o.call(i)}onResize(e){var o,r;let i=j_(e)?e.target:Uu(e)?e.pictureInPictureWindow:void 0;i&&((r=(o=this.externalEventHandlers).resize)==null||r.call(o,{width:i.width,height:i.height}))}setEnabled(e){this.info.isEnabled$.next(e)}waitForSafariLeavePictureInPicture(e,i){if(X_.browser.isSafari&&e&&e!==i){let r=this.eventHandlers.leavepictureinpicture,a=0,l=()=>{_m().clearTimeout(a),e.removeEventListener("leavepictureinpicture",d)},d=s=>(r(s),l());e.addEventListener("leavepictureinpicture",d),a=_m().setTimeout(l,1e3)}}};function Z_(t){return t instanceof Hs}import{Subscription as Dx}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-statistics/es2015";var zu=class{constructor(e,i,o,r=new Dx){this.oneStat=e;this.thinOneStat=i;this.mediascopePixel=o;this.statSubscription=r}destroy(){var e,i,o;(e=this.oneStat)==null||e.destroy(),(i=this.thinOneStat)==null||i.destroy(),(o=this.mediascopePixel)==null||o.destroy(),this.statSubscription.unsubscribe()}};var Wu=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(Wu||{});var bs=t=>t!=null?t:0,Fs=(t,e)=>{var r,a;let i=(r=t==null?void 0:t.getBoundingClientRect)==null?void 0:r.call(t),o=(a=e==null?void 0:e.getBoundingClientRect)==null?void 0:a.call(e);return{top:Math.round(bs(i==null?void 0:i.top)-bs(o==null?void 0:o.top)),left:Math.round(bs(i==null?void 0:i.left)-bs(o==null?void 0:o.left)),bottom:Math.round(bs(i==null?void 0:i.bottom)-bs(o==null?void 0:o.top)),right:Math.round(bs(i==null?void 0:i.right)-bs(o==null?void 0:o.left))}},Ul=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:bs(e==null?void 0:e.width),height:bs(e==null?void 0:e.height)}};var kn="off";var zl=t=>!!(Math.round(Math.abs(t)/90)%2);var nb=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:m,previewThumbsData:p,uiConfig:v,coreConfig:$,player:y,disabledControls:b,isInteractive:x,interactiveRanges$:I,isInteractiveTime$:C,replayInteractive:R,stopPlayer:k,hasInteractiveBranches:P,playPrevChapterDisabledTooltip:E,additionalButtons:W,additionalSettingsMenuItems:F,additionalContextMenuItems:U,playPrevVideo:j,playNextVideo:re,onVideoChanged:G,looped:oe=!1,statistics:X,saveRate:Ie,internalsExposure:fe,playerView:ee,playerId:be,metaConfig:Ce,appTracer:de})=>{var zv,Wv;let We=ii(Xe({},$),{isAudioDisabled:l,live:ii(Xe({},(zv=$.live)!=null?zv:{}),{isLiveCatchUpMode:!!r})}),ve=v,me=qx.createRootTracer(ve.features.tracer),Z=me.createComponentTracer("Store"),N=y||new Nx(We,me,{playerId:be,onDevNullLog:s==null?void 0:s.onDevNullLog});fe==null||fe.expose({corePlayer:N});let pe=new Wx,le=new Ou(pe,{loadTimeout:ve.ads.loadTimeout,initTimeout:ve.ads.initTimeout,runtimeTimeout:ve.ads.runtimeTimeout,useAdmanFromNPM:ve.ads.useAdmanFromNPM,volumeMultiplier:ve.ads.volumeMultiplier,isVsidOriginal:ve.ads.isVsidOriginal}),ue=u==null?void 0:u.pictureInPictureApi,Le=u==null?void 0:u.annotationsApi,ze=u==null?void 0:u.slotsApi,te=u==null?void 0:u.focusManager,ce=pe.createComponentLog("Store"),we,Ee,Ye={},Ae=new gu,Te=new tb,Fe="",ht=se(!1),Rt=X&&X.oneStat?ni(X.oneStat.vsid$):Mr(void 0),It=se(ra()),ct=se(!1),Tt=()=>b_(document,J_.device.isIOS),Yt=(Wv=ue==null?void 0:ue.info.isActive$)!=null?Wv:new ib(!1),Ht=se(0),Ot=se(!1),Wt=se(!1),q=se([]),Me=Kx(N.events.fatalError$,N.events.managedError$).subscribe(c=>q.update(h=>[...h,c])),Ve=Mr(!1,c=>{let h=N.events.fatalError$.subscribe(()=>c(!0));return()=>h.unsubscribe()}),xe=c=>_t(null,null,function*(){var ne;let h=Object.values(Hx).includes(c);if(ve.downloadVKLanguages&&(h&&ve.updateBuiltinLanguages||!Lf(c))){let Pe;try{Pe=yield zx(c,kh,Lh)}catch(Je){(ne=X==null?void 0:X.oneStat)==null||ne.logError({errorType:"VKLangPack",fatal:!1}),de==null||de.error({category:ob.WTF,id:"VKLangPack",message:String(Je),thrown:Je},{severity:"warning"})}Pe&&(kf({language:c,pack:Pe,fallback:ve.defaultLanguage}),Ue.set(c),Se.update(Je=>Je+1))}Lf(c)&&Ue.set(c)}),Ue=se(t),Se=se(0),Ct=se(e);xe(t);let ge=(c,h)=>{let V=$e(Ue);return Mf(V,c,h,ve.defaultLanguage)},Ne=se("thumb");Ne.subscribe(c=>{c==="ads"&&N.info.playbackState$.getValue()&&Qt()});let Ge=(()=>{let c=mi([Ve,Ne],([h,V])=>h?"crashed":V);return ii(Xe({},c),{is:h=>$e(c)===h})})(),lt=se(),Qt=()=>{lt.set({muted:N.info.muted$.getValue()})},At=(()=>{let c=se(new Set(b));return ii(Xe({},c),{add:h=>{c.update(V=>new Set([...V].concat(h)))},remove:h=>{c.update(V=>{let ne=[...V];return new Set(Array.isArray(h)?ne.filter(Pe=>!h.includes(Pe)):ne.filter(Pe=>Pe!==h))})},includes:h=>{let V=$e(c);return Array.isArray(h)?h.every(ne=>V.has(ne)):V.has(h)}})})(),di=se({width:0,height:0}),ci=null,Li=N.info.isBuffering$,vo=Mr(Li.getValue(),c=>{let h=Li.subscribe(V=>{V&&ci===null?ci=window.setTimeout(()=>{c(Li.getValue()),ci=null},ve.loaderDelay):c(V)});return()=>{h.unsubscribe(),ci&&clearTimeout(ci)}});Z.log("create store"),ce({message:"create store"});let go=c=>{let h=c.container,V=()=>{vi=new MutationObserver(Pe=>{let{removedNodes:Je}=Pe[0];Je.length&&h.append(N.experimental.element$.getValue())}),vi.observe(h,{childList:!0})},ne=N.experimental.element$.getValue();if(ne)h.append(ne),V();else{let Pe=N.experimental.element$.pipe(jx(Je=>!!Je),Xx()).subscribe(Je=>{h.append(Je),V()});Te.add(Pe)}},ui=c=>{ce({message:`init video, config: ${JSON.stringify(c)}`}),x?go(c):(Gx.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[Yx()]}),N.initVideo(c)),Z.log("init video",{isInteractive:x}),c.subtitles&&N.setExternalTextTracks(c.subtitles),we=c,Fe=c.subtitlesForcedLanguage||""},st=new Jd,pi=c=>st.next(c),Zi=new Jd,ut=new ib(Us.UNKNOWN),Nt=new Jd,vi=null,nt={actionRewind$:Zi,actionSeek$:ut,inPiP$:Yt,inFullscreen$:new Ku(c=>It.subscribe(h=>c.next(h))),actionSetSubtitle$:Nt,nextMovie$:st},rt=new Jd,Pi=new Jd,en={actionSeek$:ut,actionSubtitlesSwitched$:rt,actionQuality$:Pi,playerSize$:new Ku(c=>di.subscribe(h=>c.next(h))),inPiP$:Yt,inFullscreen$:new Ku(c=>It.subscribe(h=>c.next(h))),isLoaderVisible$:new Ku(c=>vo.subscribe(h=>c.next(h)))};if(X){let{oneStat:c,thinOneStat:h,mediascopePixel:V,statSubscription:ne}=X;c&&(x||ne.add(c.attachTo(N)),ne.add(c.attachToUi(nt)),ne.add(c.attachToAds(le.events)),c.authorize(a).catch(Pe=>{ce({message:`onestat auth error ${String(Pe)}`})}),V&&V.attachTo(N)),h&&(ne.add(h.attachTo(N,le.events)),ne.add(h.attachToUi(en)),ne.add(h.attachToAds(le.events)),h.updateContext({isMobile:$e(ht)}),h.authorize(a))}de&&(de.addSubscription(N.events.managedError$.subscribe(c=>{de.error(c,{severity:"debug"})})),de.addSubscription(N.events.fatalError$.subscribe(c=>{de.error(c,{severity:"fatal"})})),X!=null&&X.oneStat&&de.addSubscription(X.oneStat.experimental.error$.subscribe(c=>{de.error(c,{severity:"warning"})})));let Mo=()=>{if(J_.device.isIOS&&Ee)try{$_(Ee)}catch(c){ce({message:`exitIosSafariFullscreen failed: ${c}`})}};Te.add(N.experimental.element$.subscribe(c=>{c&&(Ee=c,c.classList.add("player-media"),ue==null||ue.updateVideoElement(),x&&c.setAttribute("pip","false"),(ee==="preview"||!ve.features.pip&&!ve.features.dpip)&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(N.events.ended$.subscribe(()=>{var c;Mo(),(c=s==null?void 0:s.onEnded)==null||c.call(s)})).add(N.events.looped$.subscribe(()=>{var c;(c=s==null?void 0:s.onLooped)==null||c.call(s)})).add(N.events.started$.subscribe(()=>_t(null,null,function*(){var h,V;Z_(ue)&&(yield ue==null?void 0:ue.revealPictureInPicture());let c=N.info.muted$.getValue();(h=s==null?void 0:s.onStarted)==null||h.call(s),(V=Ye.onStarted)==null||V.call(Ye,c)}))).add(N.events.willSeek$.subscribe(({from:c,to:h})=>{var V;(V=s==null?void 0:s.onSeek)==null||V.call(s,c,h,ut.getValue())})).add(N.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=s==null?void 0:s.onAutoplaySoundProhibited)==null||c.call(s)})).add(N.info.position$.subscribe(c=>{var V;let h=N.info.duration$.getValue();isFinite(h)&&h>0&&((V=s==null?void 0:s.onTimeupdate)==null||V.call(s,h,c),le.setPosition(c,h))})).add(N.events.fatalError$.subscribe(c=>{var h;(h=s==null?void 0:s.onCrashed)==null||h.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(N.events.fetcherRecoverableError$.subscribe(c=>{var h;(h=s==null?void 0:s.onRecoverableError)==null||h.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(N.events.loadedMetadata$.subscribe(()=>{Ot.set(!0)})).add(N.info.is3DVideo$.subscribe(c=>{Wt.set(c)})).add(N.info.isEnded$.subscribe(c=>{x&&(c?(C!=null&&C.getValue()&&At.add(Td),At.add("PLAY_BUTTON")):At.remove("PLAY_BUTTON"))})).add(N.info.liveTime$.subscribe(c=>{var h;(h=s==null?void 0:s.onLiveTime)==null||h.call(s,c)})).add(N.info.isStalled$.subscribe(c=>{var h;(h=s==null?void 0:s.onStalledChanged)==null||h.call(s,c)})).add(N.info.isLiveEnded$.subscribe(c=>{var h;return c&&((h=s==null?void 0:s.onLiveEnded)==null?void 0:h.call(s))})).add(le.events.loadStarted$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:h.call(c)})).add(le.events.loadEnded$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:h.call(c)})).add(le.events.loadError$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadError)==null?void 0:h.call(c)})).add(le.events.init$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onInit)==null?void 0:h.call(c)})).add(le.events.ready$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onReady)==null?void 0:h.call(c)})).add(le.events.started$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onStarted)==null?void 0:V.call(h,c)})).add(le.events.timeRemained$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onTimeRemained)==null?void 0:V.call(h,c)})).add(le.events.ended$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onCompleted)==null?void 0:V.call(h,c)})).add(le.events.empty$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onEmpty)==null?void 0:h.call(c)})).add(le.events.clicked$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onClicked)==null?void 0:V.call(h,c)})).add(le.events.closed$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onClosed)==null?void 0:V.call(h,c)})).add(le.events.error$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onError)==null?void 0:V.call(h,c)})).add(le.events.paused$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onPaused)==null?void 0:h.call(c)})).add(le.events.resumed$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onResumed)==null?void 0:h.call(c)}));let $t=new tb,Ft=()=>{var Je,Pt,Bt;let{debugLog:c}=ve,h,V="#9df7b7",ne="#efd169";if(c&&c!==!0){let{colors:qt}=c;h=c.tag,V=(Je=qt==null?void 0:qt[0])!=null?Je:V,ne=(Bt=(Pt=qt==null?void 0:qt[1])!=null?Pt:qt==null?void 0:qt[0])!=null?Bt:ne}let Pe=h?`: ${h}`:"";$t.add(N.events.log$.subscribe(qt=>{console.debug(`%c sdk${Pe} `,`background:${V};`,`sdk component: ${qt.component}`,qt.message)})).add(pe.log$.subscribe(qt=>{console.debug(`%c ui${Pe} `,`background:${ne};`,`ui component: ${qt.component}.`,qt.message)}))},z=()=>{$t.unsubscribe()},kt=(c,h)=>{Z.log("start camera manual rotation",{mx:c,my:h}),N.startCameraManualRotation(c,h)},dt=(c=!1)=>{Z.log("stop camera manual rotation",{immediate:c}),N.stopCameraManualRotation(c)},bi=(c,h,V)=>{Z.log("move camera focus px",{xpx:c,ypx:h,dt:V}),N.moveCameraFocusPX(c,h,V)},Zt=()=>{N.holdCamera()},wt=()=>{N.releaseCamera()},at=Mr(N.info.position$.getValue(),c=>{let h,V,ne=()=>{let Pe=N.info.playbackState$.getValue(),Je=N.info.isLive$.getValue(),Pt=N.info.duration$.getValue(),Bt=N.info.position$.getValue();if(Pe&&[Wl.PLAYING,Wl.PAUSED].includes(Pe)){let qt=Je?Bt-Pt:N.getExactTime();qt!==V&&c(qt),V=qt}h=requestAnimationFrame(ne)};return ne(),()=>cancelAnimationFrame(h)}),Ui=ni(N.info.playbackState$),Di=ni(N.info.isBuffering$),Ln=mi([Ui,Di],([c,h])=>h?"buffering":c),Mn=ni(N.info.currentBuffer$),Ti=ni(N.info.isEnded$),Ji=ni(N.info.isLive$),Vn=ve.features.playbackRate?ni(N.info.canChangePlaybackSpeed$):Mr(!1),bo=ni(N.info.liveBufferTime$),xi=ni(N.info.volume$),Vo=ni(N.info.muted$),Ro=hu(N.info.predefinedQualityLimitType$.pipe(eb(c=>c===$s.TRAFFIC_SAVING)),N.info.predefinedQualityLimitType$.getValue()===$s.TRAFFIC_SAVING),ho=hu(N.info.predefinedQualityLimitType$.pipe(eb(c=>c===$s.HIGH_QUALITY)),N.info.predefinedQualityLimitType$.getValue()===$s.HIGH_QUALITY),mn=ni(N.info.autoQualityLimitingAvailable$),is=ni(N.info.availableQualities$),Dr=ni(N.info.availableQualitiesFps$),os=ni(N.info.chromecastState$),Or=ni(N.info.chromecastDeviceName$),Jn=ni(N.info.currentFormat$),ns=ni(N.info.throughputEstimation$),Nr=ni(N.info.videoBitrate$),tn=ni(N.info.intrinsicVideoSize$),vn=ni(N.info.duration$),br=ni(N.info.isAudioAvailable$),$r=()=>{ci&&clearTimeout(ci),ci=null},gn=mi([vn,Ji],([c,h])=>h?-c:c),er=mi([Ui],([c])=>c===Wl.PLAYING),yr=ni(N.info.atLiveEdge$),tr=ni(N.info.atLiveDurationEdge$),ir=ni(N.info.position$),rs=mi([ir,vn],([c,h])=>isFinite(c)&&isFinite(h)&&!!h),$o=mi([os],([c])=>c===Ox.CONNECTED),xr=ni(N.info.availableVideoStreams$),zi=ve.features.audioLanguages?ni(N.info.availableAudioStreams$):Mr([]),wr=ni(N.info.currentVideoStream$),Rn=ni(N.info.currentAudioStream$),vt=c=>{c.language&&If(c.language),N.setVideoStream(c)},Jt=(c,h)=>{N.setAudioStream(c),No(h)&&(c.language&&If(c.language),ve.features.userVideoPrefs&&i&&Af(ve.userSalt,String(i),{audioTrackId:c.id}))},Sr=c=>{let h;if(c.length===1&&(h=c.at(0)),h!=null||(h=c.find(ne=>"isDefault"in ne&&ne.isDefault)),ve.features.userVideoPrefs&&i){let ne=xu(ve.userSalt,String(i));if(ne!=null&&ne.audioTrackId){let Pe=c.find(Je=>Je.id===ne.audioTrackId);h=Pe!=null?Pe:h}}let V=n_();return V&&(h!=null||(h=c.find(({language:ne})=>V===ne))),h!=null||(h=c.at(0)),h},Br=c=>{Z.log("change audio stream",{id:c});let h=N.info.availableAudioStreams$.getValue().find(V=>V.id===c);h&&Jt(h,!0)},Hr=!1;Te.add(N.info.availableAudioStreams$.subscribe(c=>{if(!Hr&&c.length){let h=Sr(c);h&&(N.setAudioStream(h),Hr=!0)}})),zi.subscribe(c=>{var h;(h=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||h.call(s,c.map(({label:V="",id:ne="",language:Pe=""})=>({label:V,language:Pe,id:ne})))}),Rn.subscribe(c=>{var h;return c&&((h=s==null?void 0:s.onAudioStreamChanged)==null?void 0:h.call(s,c.id))});let Dn=!1;Te.add(N.info.availableVideoStreams$.subscribe(c=>{if(!Dn&&c.length){let h=Sr(c);h&&(N.setVideoStream(h),Dn=!0)}}));let On=se(void 0),Do=ni(N.info.isAutoQualityEnabled$,c=>c&&On.set(void 0)),Nn=ni(N.info.currentQuality$,()=>On.set(void 0)),or=mi([On,Nn],([c,h])=>c!=null?c:h),on=mi(Jn,c=>c!==Zd.MPEG),hn=mi([is,Dr,Do,or,on],([c,h,V,ne,Pe])=>{let Je=[];Pe&&Je.push({value:"auto",displayValue:ge("auto_quality_option"),selected:V});let Pt=c.filter(Bt=>!Fx(Bt));for(let Bt of Pt){let qt=h[Bt];Je.push({value:Bt,displayValue:`${Bt}${qt?K_(qt):""}`,selected:V?!1:Bt===ne})}return Je}),nr=ni(N.info.currentPlaybackRate$),_n=mi([nr,yr,tr],([c,h,V])=>{let ne=V||x?1:ve.controls.playbackRateMin,Pe=h?1:ve.controls.playbackRateMax,Je=ve.controls.playbackRateStep,Pt=[];for(let Bt=ne;Bt<=Pe;Bt+=Je)Pt.push({value:Bt,displayValue:Bt===1?ge("playback_rate_1"):ge("playback_rate",{multiplier:Bt.toString(10)}),selected:c===Bt});return Pt}),nn=()=>({displayValue:ge("subtitles_off"),value:kn,language:""}),Mi=se(nn()),ro=mi([Mi,Se],([c],h)=>{c.value===kn?h(nn()):h(c)}),rn=ve.features.subtitles?ni(N.info.availableTextTracks$):Mr([]),rr=qh(),Cr=mi([rn,ro],([c,h],V)=>{var Je;let ne=[],Pe=c.find(({id:Pt})=>Pt===h.value);if(Pe!=null&&Pe.url){let[,Pt]=(Je=rr.find(Pe.url))!=null?Je:[];if(Pt){V(Pt);return}Ae.download(Pe.url).then(Bt=>{if(!Bt||Ae.isDestroyed())return;let qt=new q_,Gs=Pe.language;if(Gs){let r$=!!Pe.isAuto,s$=qt.parse(Bt,Gs);ne.push({lang:Gs,subtitles:s$,isAuto:r$,id:Pe.id})}rr.add(Pe.url,ne),$e(ro).value===h.value&&V(ne)}).catch(Zx).catch(Bt=>{var qt;(qt=X==null?void 0:X.oneStat)==null||qt.logError({errorType:"Subtitles download",fatal:!1}),de==null||de.error({category:ob.WTF,id:"Subtitles download",message:String(Bt),thrown:Bt},{severity:"warning"})})}V(ne)}),bn=mi([nr,er,ro],([c,h,V],ne)=>{let Pt;if(N.info.isLive$.getValue()&&h&&V.value!==kn){let qt=()=>{let Gs=1e3/(3*c);Pt=setTimeout(qt,Gs),ne(Date.now())};return qt(),()=>clearTimeout(Pt)}}),sr=mi([rn,ro],([c,h])=>{if(!c.length)return[];let V=[];for(let{language:ne,isAuto:Pe,id:Je}of c){let Pt=ne&&jd(ne);ne&&Pt&&V.push({displayValue:Pe?ge("subtitles_auto",{language:Pt}):Pt,value:Je,selected:(h==null?void 0:h.value)===Je,isAuto:Pe,language:ne})}return V.length?(V.unshift(ii(Xe({},nn()),{selected:(h==null?void 0:h.value)===kn})),V):[]}),je={available:[],prev:[]},gi=()=>{var h,V;let c=N.experimental.getCurrentTime$.getValue();return(V=(h=c==null?void 0:c())!=null?h:Ee==null?void 0:Ee.currentTime)!=null?V:0},Oo=mi([at,ro,Cr,bn],([c,h,V,ne])=>{var Je;let Pe=N.info.isLive$.getValue();if(Pe&&je.prev!==V){let Pt=V.find(({id:qt})=>qt===h.value),Bt=je.prev.find(({id:qt})=>qt===h.value);if(Pt){let qt=ii(Xe({},Pt),{subtitles:[...(Je=Bt==null?void 0:Bt.subtitles)!=null?Je:[],...Pt.subtitles]});je.available=[qt],je.prev=V}}if(h&&h.value!==kn){let Pt=Pe?gi():c,Bt=Pe?je.available:V;return Y_(Pt,h,Bt,Pe)}}),$n=mi([Oo],([c])=>c!=null&&c.texts?c.texts:[]);Te.add(ro.subscribe(c=>{var h,V;if(c.value===kn)(h=s==null?void 0:s.onSubtitleOff)==null||h.call(s);else{let ne=Object.entries(Hu).find(([Pe,Je])=>Je===c.displayValue);(V=s==null?void 0:s.onSubtitleOn)==null||V.call(s,ne?ne[0]:"",c.value)}}));let yo=se(!0),sn=mi([Mn,gn,ir,bo],([c,h,V,ne])=>{var Bt;let Pe=(Bt=c==null?void 0:c.end)!=null?Bt:0;if(!ne)return Pe/h;let Pt=-V+ne-h;return(Pe-Pt)/h}),so=ni(N.info.availableSources$),xo=mi([so],([c])=>Object.keys((c==null?void 0:c[Zd.MPEG])||{}).length>0),Ai=()=>{var V,ne,Pe;let c=Object.keys(((ne=(V=N.info.availableSources$)==null?void 0:V.getValue())==null?void 0:ne[Zd.MPEG])||{}),h=Bx(c)||Qx.Q_144P;return(Pe=we.sources[Zd.MPEG])==null?void 0:Pe[h]},Fr=()=>{var h;let c=Ai();if(c)Z.log("download video",{url:c}),zh(c,((h=we==null?void 0:we.meta)==null?void 0:h.title)||"video");else{let V="There is no URL for download video";Z.log("download video",{message:V}),ce({message:V})}},Bn=()=>{ce({message:"toggle muted"});let c=N.info.muted$.getValue();N.info.volume$.getValue()===0&&!c?Ur(Tr(),!1):an(!c,!1)},ys=()=>{var c;if(Kt.ui.settingsMenu.visible$.set(!1),!$e(Kt.ui.settingsSubMenu.visible$)){let h=$e(Kt.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&h){let ne=Ul(h),Pe={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:ne,position:Pe,name:"settings"})}}Z.log("close settings menu")},Wi=(c,h=()=>Promise.resolve())=>_t(null,null,function*(){var Pe;Kt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Kt.ui.settingsMenu.visible$.set(!0),yield h();let V=$e(Kt.ui.settingsMenu.ref$),ne=$a();if((Pe=s==null?void 0:s.uiInfo)!=null&&Pe.onSettingsMenu&&V&&ne){let Pt=Ul(V),Bt=Fs(V,ne);s.uiInfo.onSettingsMenu({visible:!0,size:Pt,position:Bt,name:"settings"})}Z.log("open settings menu",{wasOpenedByKeyboard:c})}),xs=(c,h=!1)=>{var Je;Kt.ui.settingsSubMenu.visible$.set(!1);let V=$e(Kt.ui.settingsMenu.ref$),ne=$a(),Pe=$e(Kt.ui.settingsMenu.visible$);if((Je=s==null?void 0:s.uiInfo)!=null&&Je.onSettingsMenu&&V&&ne)if(Pe&&!h){let Bt=Ul(V),qt=Fs(V,ne);s.uiInfo.onSettingsMenu({visible:!0,size:Bt,position:qt,name:"settings"})}else{let Bt=Ul(c),qt={top:0,left:0,bottom:0,right:0},Gs=$e(Kt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:Bt,position:qt,name:Gs})}Z.log("close settings sub menu")},ss=(c,h)=>{var ne;Kt.ui.settingsSubMenu.visible$.set(!0),Kt.ui.settingsSubMenu.ref$.set(h),Kt.ui.settingsSubMenu.name$.set(c);let V=$a();if((ne=s==null?void 0:s.uiInfo)!=null&&ne.onSettingsMenu&&h&&V){let Je=Ul(h),Pt=Fs(h,V);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:Je,position:Pt})}Z.log("open settings sub menu",{name:c})},Tr=()=>{var h;let c=Math.max(ve.volumeMinRestore,(h=_u())!=null?h:0);return c===0?ve.volumeDefault:c},No=c=>{let h=ve.features.savePreferredStatesOnUserActionOnly;return!h||h&&!c},Ur=(c,h)=>{let V=c===0?Tr():c,ne=N.info.muted$.getValue();ce({message:`set volume, volume: ${c}, preferredVolume: ${V}`});let Pe=!l||Ge.is("ads");ne&&c>0&&Pe&&(ne=!1,No(h)&&Cf(!1)),N.setVolume(c,ne),le.setVolume(c),No(h)&&yf(V)},an=(c,h)=>{let V=N.info.volume$.getValue();ce({message:`set muted, currentVolume: ${V}, mute: ${c}`});let ne=Ge.is("ads");if(N.setMuted(c,ne),le.setVolume(c?0:V),No(h)&&(!ne||!c)&&Cf(c),!c&&V===0){let Pe=Tr();N.setVolume(Pe),No(h)&&yf(Pe),le.setVolume(Pe)}},Vi=se(!1),qe=c=>{var h,V;Z.log("set looped",{isLooped:c}),Vi.set(c),N.setLooped(c),(V=(h=s==null?void 0:s.uiInfo)==null?void 0:h.onLoopedChanged)==null||V.call(h,c)};qe(oe);let Lt=()=>{var c,h;(h=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||h.call(c)},fi=(c,h=!1)=>{var V;ce({message:`set autoplayNextEnabled, value: ${c}`}),Z.log("set autoplay next enabled",{autoplayNextEnabled:c}),Kt.ui.autoplayNextEnabled$.set(c),a_(c),h&&((V=s==null?void 0:s.onSetAutoplayNextEnabled)==null||V.call(s,c))},Bo=c=>{ce({message:`set timerNextVideoRunning, value: ${c}`}),Z.log("set timer next video running",{timerNextVideoRunning:c}),Kt.ui.timerNextVideoRunning$.set(c)},wo=(c=!0)=>{var V;let h=!0;if(c&&(s!=null&&s.onPrevVideoClick))try{h=(V=s==null?void 0:s.onPrevVideoClick)==null?void 0:V.call(s)}catch(ne){ce({message:"onPrevVideoClick callback failed to execute"})}G(!0),h&&j()},So=(c=!0)=>{var V;let h=!0;if(c&&(s!=null&&s.onNextVideoClick))try{h=(V=s==null?void 0:s.onNextVideoClick)==null?void 0:V.call(s)}catch(ne){ce({message:"onNextVideoClick callback failed to execute"})}G(!1),h&&re()},Ki=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},Ho=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},Hn=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},Ir=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},Co=()=>{N.prepare()},ao=()=>{_r(Kt);let c=$e(Kt.ui.controls.disabledControls$),h=$e(Kt.playerPhase),V={playerPhase:h,isInteractive:x,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(ce({message:"toggle play"}),h==="ads"){V.action="play",Z.log("toggle adman play",V),le.togglePlay();return}let ne=()=>{var Je;ce({message:"toggle play, call player.play"}),V.action="play",N.play(),(Je=s==null?void 0:s.onPlay)==null||Je.call(s)},Pe=()=>{var Je;ce({message:"toggle play, call player.pause"}),V.action="pause",N.pause(),(Je=s==null?void 0:s.onPause)==null||Je.call(s)};if(N.info.isEnded$.getValue()){if(ce({message:"toggle play, video ended, seek to 0"}),Zi.next(),ut.next(Us.REWIND),x){R==null||R();return}N.seekTime(0),ne()}else N.info.playbackState$.getValue()!==Wl.PLAYING?ne():Pe();Z.log("toggle play",V)},yn=(c,{changeReason:h="default",appliesTo:V="to-video",byUser:ne=!1}={},Pe)=>{ce({message:`set quality, quality: ${c}`}),Z.log("set quality",{quality:c}),ne&&Pi.next(c),N.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Je}=ve.features;bu(),c!=="auto"?(Je?($u({type:"exact_quality",quality:c,videoId:i},V),N.setPredefinedQualityLimits($s.UNKNOWN)):xf(i,c),On.set(c),N.setQuality(c)):Je&&h==="default"&&(Wr("auto_quality",V,Pe),$e(Ro)&&Fo(!1,void 0,Pe),$e(ho)&&Fn(!1,void 0,Pe))},Fo=(c,h="as-default",V)=>{ce({message:`set trafficSavingEnabled, value: ${c}`}),Z.log("set traffic saving enabled",{trafficSavingEnabled:c});let ne=c?$s.TRAFFIC_SAVING:$s.UNKNOWN;ve.features.qualityDetailsSubMenuEnabled?(zr(ne,h,V),Ed(!1)):(N.setPredefinedQualityLimits(ne),No(V)&&Ed(c))},Fn=(c,h="as-default",V)=>{ce({message:`set highQualityEnabled, value: ${c}`}),Z.log("set high quality enabled",{highQualityEnabled:c}),zr(c?$s.HIGH_QUALITY:$s.UNKNOWN,h,V)},zr=(c,h,V)=>{c!==$s.UNKNOWN&&($e(mn)&&!$e(Do)&&yn("auto",{appliesTo:h,changeReason:"limit-changed"},V),Wr(c,h,V)),N.setPredefinedQualityLimits(c)},Wr=(c,h,V)=>{No(V)&&($u({type:c,videoId:i},h),h==="as-default"&&$u({type:c,videoId:i},"to-video"))},Un=(c,h=!0)=>{Z.log("set playback rate",{playbackRate:c}),N.setPlaybackRate(c),ve.features.saveRate&&Ie&&!N.info.isLive$.getValue()&&h&&r_(c)},it=()=>{let c=$e(Vn),h=$e(_n),V=h.findIndex(({selected:Pe})=>Pe);if(V===h.length-1||!c)return h[V];let ne=h[V+1];return Un(ne.value),ne},jt=()=>{let c=$e(Vn),h=$e(_n),V=h.findIndex(({selected:Pe})=>Pe);if(V===0||!c)return h[V];let ne=h[V-1];return Un(ne.value),ne},wi=(c=ii(Xe({},nn()),{selected:!1}),h)=>{Z.log("set subtitles",Xe({},c)),c.value!==kn&&Nt.next(c.isAuto?c.value+"_auto":c.value),rt.next({enabled:c.value!==kn,lang:c.language,auto:!!c.isAuto}),Mi.set(c),No(h)&&(Pf(c.value===kn?void 0:c.language),ve.features.userVideoPrefs&&i&&Af(ve.userSalt,String(i),{subtitleTrackId:c.value===kn?void 0:c.value}))},To=c=>{Z.log("toggle subtitles");let h=$e(ro);(h==null?void 0:h.value)===kn?zn(c):Uo(c)},xn=(c,h)=>{Z.log("change subtitle",{enabled:c}),c?zn(!0,h):Uo(!0)},zn=(c,h)=>{Z.log("subtitle on");let V=$e(sr),ne=$e(Ue),Pe=Fe!=null?Fe:ne,Je;h&&(Je=V.find(Pt=>Pt.value===h)),Je!=null||(Je=V.filter(Pt=>Pt.value!==kn).find(Pt=>Pt.language===Pe)),wi(Je!=null?Je:V[1],c)},Uo=c=>{Z.log("subtitle off"),wi(void 0,c)};Te.add(N.info.availableTextTracks$.subscribe(c=>{var V;function h(){let ne=[];for(let{language:Pe,isAuto:Je,id:Pt}of c){let Bt=Pe&&jd(Pe);Pe&&Bt&&ne.push({id:Pt,language:Pe,title:Je?ge("subtitles_auto",{language:Bt}):Bt})}return ne}(V=s==null?void 0:s.onAvailableSubtitlesChanged)==null||V.call(s,h())}));let ar=se(!0),as=c=>{ar.set(c)},Er=(c,h,V=!0)=>{var ne;if(ce({message:`seek to time, time: ${c}`}),Z.log("seek to time",{time:c,action:h,forcePrecise:V}),ut.next(h),N.info.isLive$.getValue()){let Pe=N.info.duration$.getValue(),Je=Math.min(0,Pe+c);N.seekTime(Je,V)}else{if(C!=null&&C.getValue())return;N.info.isEnded$.getValue()&&(ce({message:"seek after ended, call callbacks.onPlay"}),(ne=s==null?void 0:s.onPlay)==null||ne.call(s)),N.seekTime(Hv(c),V)}},ws=c=>{ce({message:`seek to episode start time: ${c}`}),Z.log("seek to episode start time",{time:c}),Er(c,Us.EPISODE,!0)},qs=(c,h,V=!1)=>{ce({message:`seek to percent, percent: ${c}`}),Z.log("seek to percent",{percent:c,action:h});let ne=$e(gn)*c;Er(ne,h,V)},va=c=>{ce({message:`seek external, time: ${c}`}),Z.log("seek external",{time:c}),ut.next(Us.UNKNOWN),N.seekTime(N.info.isLive$.getValue()?-c:c)},pt=c=>{var ne,Pe;let h=(ne=c.max)!=null?ne:"none",V=(Pe=c.min)!=null?Pe:"none";ce({message:`set auto quality limitation. Max: ${h}. Min: ${V}`}),Z.log("set auto quality limits",{max:h,min:V}),N.setAutoQualityLimits(c)},ai=c=>{ce({message:`seek external to episode start time: ${c}`}),Z.log("seek external to episode start time",{time:c}),Er(c,Us.EPISODE,!0)},Io=c=>{ce({message:`set playback rate to: ${c}`}),Z.log("set playback rate external",{playbackRate:c}),N.setPlaybackRate(c)},Si=se(!1),eo=se(!1),Ss=mi([gn],([c])=>!!p&&c>=ve.suitableDurationForUsingRichSeek&&ve.features.useRichSeek&&!x&&ee!=="preview"),Cs=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),Ts=mi([Ht],([c])=>{let h=zl(c);return Cs?!h:h});Te.add(Ge.subscribe(c=>{c!=="video"&&Si.set(!1)})),Si.subscribe(c=>{var h;(h=s==null?void 0:s.onRichSeekActiveChanged)==null||h.call(s,c)});let qi=se(void 0),ki=se(!1),_e=c=>{ce({message:`start scrubbing, progress: ${c}`}),Z.log("start scrubbing",{progress:c}),ki.set(!0),St(c)},St=c=>{qi.set(c)},Xt,ei,zo=()=>{qi.set(void 0),ki.set(!1)},lo=()=>{clearTimeout(ei),clearTimeout(Xt),Xt=window.setTimeout(()=>{zo()},500),Ee==null||Ee.removeEventListener("seeked",lo)},co=(c,h=!1,V=Jx.ActionSeekType.SLIDER)=>{ce({message:`complete scrubbing, progress: ${c}`}),Z.log("complete scrubbing",{progress:c}),qs(c,V,h),$e(Kt.ui.isMobile)&&$e(Kt.state.currentFormat$)===Zd.HLS?(Ee==null||Ee.addEventListener("seeked",lo),ei=window.setTimeout(()=>{lo()},300)):zo()},ls=mi([at,gn,qi],([c,h,V],ne)=>{ne(Ux(V)?V*h:c)}),wn=se(!1),Is=()=>{wn.set(!0)},ga=()=>{wn.set(!1)},ha=mi([di],([{width:c}],h)=>{let V=F_(c);h(V)}),Kr=W.filter(c=>Wh(c)),ds=mi([ha,ht],([c,h])=>h?Kr.filter(V=>!V.hideOnMobile):Kr.filter(V=>{var ne;return!((ne=V.hideOnDesktopGridTypes)!=null&&ne.includes(c))})),lr=se(W.filter(c=>Kh(c))),il=mi([lr,ha],([c,h])=>c.filter(V=>{var ne;return!((ne=V.hideOnDesktopGridTypes)!=null&&ne.includes(h))})),ol=mi([il,ds],([c,h])=>[...ve.features.additionalButtonsDesktopControlPanelRight?c.filter(V=>V.type==="desktop-control-panel-right"):[],...ve.features.additionalButtons?h.map((V,ne)=>{var Pe;return{id:ne,weight:ne,type:"desktop-control-panel-right",testId:V.testId,icon:V.iconUrl,onClick:V.onClick,ariaLabel:(Pe=V.ariaLabel)!=null?Pe:V.tooltip,tooltipText:V.tooltip}}):[]].filter(V=>!v.disabledAdditionalButtonIds.includes(V.id))),qr=se(F),nl=mi([qr],([c])=>ve.features.additionalSettingsMenuItems?c.map(h=>h.type==="SWITCH"?ii(Xe({},h),{onClick:h.onChangeEnabled}):h):[]),rl=(c,h)=>{let V=$e(lr).map(ne=>ne.id!==c?ne:Xe(Xe({},ne),h));lr.set(V)},sl=c=>{let h=$e(lr);if(h.some(V=>V.id===c.id)){ce({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),lr.set(h)},Xl=c=>{let h=$e(lr);if(!h.some(V=>V.id===c)){ce({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),lr.set(h)},_a=c=>{ut.next(Us.LIVE),ce({message:"live switch to low latency "+c}),Z.log("live switch to low latency "+c),N.setLiveLowLatency(c)},al=(c,h)=>{let V=$e(qr).map(ne=>ne.id!==c?ne:Xe(Xe({},ne),h));qr.set(V)},ft=c=>{let h=$e(qr);if(h.some(V=>V.id===c.id)){ce({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),qr.set(h)},gt=c=>{let h=$e(qr);if(!h.some(V=>V.id===c)){ce({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),qr.set(h)},$i=se(U),Wo=mi([$i],([c])=>ve.features.additionalContextMenuItems?c:[]),Qi=(c,h)=>{let V=$e($i).map(ne=>ne.id!==c?ne:Xe(Xe({},ne),h));$i.set(V)},_i=c=>{let h=$e($i);if(h.some(V=>V.id===c.id)){ce({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),$i.set(h)},Oi=c=>{let h=$e($i);if(!h.some(V=>V.id===c)){ce({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),$i.set(h)},ba=mi([ht,Ve],([c,h],V)=>{V(c&&h)}),ll=()=>{ut.next(Us.LIVE),ce({message:"switch to active live"}),Z.log("switch to active live"),N.seekTime(0),N.info.playbackState$.getValue()!==Wl.PLAYING&&Kt.actions.internal.togglePlay()},fp=()=>{Z.log("skip adman"),le.skip()},Pc=(c=!0)=>{var ne;_r(Kt),ce({message:`switch from ads to video, callPlay: ${c}`}),Z.log("switch from ads to video",{callPlay:c}),Ne.set("video"),c&&N.play(),l&&an(!0,!0);let h=(ne=$e(lt))==null?void 0:ne.muted,V=!N.info.muted$.getValue();h!==void 0&&!V&&an(h,!0),lt.set(void 0)},mp=()=>{_r(Kt),ce({message:"switch from video to ads"}),Z.log("switch from video to ads"),Kt.actions.internal.pause(),Mo(),Ne.set("ads")},Ac=c=>{_r(Kt);let h=c?"LiveWaitingStart":"thumb";Z.log("set live waiting start",{state:c,playerPhase:h}),Ne.set(h)},vp=c=>{_r(Kt);let h=c?"LiveWaitingRecover":"thumb";Z.log("set live waiting recover",{state:c,playerPhase:h}),Ne.set(h)},kc=c=>{_r(Kt);let h=c?"LiveWaitingRecord":"thumb";Z.log("set live waiting record",{state:c,playerPhase:h}),Ne.set(h)},gp=()=>(_r(Kt),Z.log("get debug text data"),Fh(N,we,Kt,me.getTraceId(),Ce)),Lc=()=>(_r(Kt),JSON.stringify(me.getFinishedSpans())),hp=()=>(_r(Kt),Uh(N,we,Kt)),$a=()=>Ee,Mc=()=>{ce({message:"toggle chromecast"}),Z.log("toggle chromecast"),N.toggleChromecast()},Qs=c=>{var V;if(_r(Kt),N.info.isEnded$.getValue())return;let h=!c;if($e(Kt.playerPhase)==="ads"){ce({message:`pause ads, internalCall: ${h}`}),Z.log("pause ads",{internalCall:h}),le.pause();return}ce({message:`pause video, internalCall: ${h}`}),Z.log("pause video",{internalCall:h}),h&&((V=s==null?void 0:s.onPause)==null||V.call(s)),N.pause()},dl=c=>{var V;_r(Kt);let h=!c;if($e(Kt.playerPhase)==="ads"){ce({message:`play ads, internalCall: ${h}`}),Z.log("play ads",{internalCall:h}),le.play();return}ce({message:`play video, internalCall: ${h}`}),Z.log("play video",{internalCall:h}),h&&((V=s==null?void 0:s.onPlay)==null||V.call(s)),N.play()},Vc=c=>{_r(Kt);let h=!c;if($e(Kt.playerPhase)==="ads"){ce({message:"player cannot be stopped during ads via external method"});return}ce({message:`player will be stopped, internalCall: ${h}`}),k==null||k()},Rc=(c,h)=>{_r(Kt),ce({message:`first start, show ads: ${c}, internalCall: ${!h}`}),Z.log("first start",{showAds:c,external:h}),c?Ne.set("ads"):(Ne.set("video"),h?N.play():Kt.actions.internal.togglePlay())},cl=()=>(ce({message:"getting time codes"}),m),Dc=()=>{let c=cl();if(!c||[0,1].includes(c.length))return;let h=N.info.position$.getValue();return c.find(V=>V.time>h)},_p=c=>{let h=c;h||(h=Dc());let V=N.info.position$.getValue();Z.log("seek to next episode",Xe({currentTime:V},h)),h&&(ce({message:"seek to next episode"}),Er(h.time,Us.EPISODE,!0))},Oc=()=>{let c=cl();if(!c||[0,1].includes(c.length))return;let h=N.info.position$.getValue(),V=c.findIndex(Pe=>Pe.time>h),ne=V===-1?c.length-2:V-2;if(!(ne<0))return c[ne]},Qe=c=>{let h=c;h||(h=Oc());let V=N.info.position$.getValue();Z.log("seek to prev episode",Xe({currentTime:V},h)),h&&(ce({message:"seek to prev episode"}),Er(h.time,Us.EPISODE,!0))},hi=()=>(ce({message:"getting preview thumbs data"}),Z.log("get preview thumbs data",Xe({},p)),p),Ko=()=>_t(null,null,function*(){let c=ue==null?void 0:ue.isActive(),h="none";ue!=null&&ue.isActive()?(h="exit",yield ue==null?void 0:ue.exit()):(h="request",yield ue==null?void 0:ue.request()),Z.log("toggle picture in picture",{isActive:c,action:h})}),Pr=(c=-90)=>{Z.log("rotate video",{alphaDiff:c}),Ht.update(h=>h+c)},Eo=se([]);I==null||I.subscribe(c=>{let h=[];for(let V=0;V<c.length;V++){let{range:[ne,Pe],subjects:Je}=c[V];V===0&&ne!==0&&h.push({time:0,text:"",interactive:!1,completed:!0}),h.push({time:ne/1e3,text:"",interactive:!0,completed:ve.features.interactiveTimeOpenUri?!Je.length||Je.every(Pt=>Pt.isRemoved):!Je.length}),Pe!==1/0&&h.push({time:Pe/1e3,text:"",interactive:!1,completed:!0})}Eo.set(h)});let Xb=se(!1);C==null||C.subscribe(c=>{c&&$e(ki)&&zo()});let Hv=c=>{if(!x)return c;let h=$e(Eo),V=$e(gn),Pe=$e(ir)/V,Je=h.find(Pt=>Pt.interactive&&!Pt.completed&&Pt.time>Pe);return typeof(Je==null?void 0:Je.time)=="number"?Math.min(c,Je.time-.05):c},Zb=()=>{Kt.ui.episodes.panelOpened$.set(!1)},Jb=()=>{Z.log("destroy store"),clearTimeout(ei),clearTimeout(Xt),Te.unsubscribe(),$t.unsubscribe(),N.destroy(),le.destroy(),X==null||X.destroy(),Me.unsubscribe(),vi==null||vi.disconnect(),vi=null,Ae.destroy(),de==null||de.destroy()},e$=mi([yr,Ge,Vn],([c,h,V])=>v.features.doubleForwardAvailable&&!c&&h==="video"&&V),bp=se(!1),Fv=2,Nc=null,Uv=c=>{if(!$e(er)&&c)return;let h=N.info.currentPlaybackRate$.getValue();c?h!==Fv&&(Nc=h,Un(Fv,!1),bp.set(!0)):(Nc&&Un(Nc,!1),bp.set(!1),Nc=null)};Ge.subscribe(c=>{c!=="video"&&Uv(!1)});let t$=()=>{Qs(!1),Si.set(!0)},i$=()=>{dl(!1),Si.set(!1)},$p=!1,o$=()=>{eo.set(!0),$p=N.info.playbackState$.getValue()===Wl.PLAYING,Qs(!1)},n$=()=>{eo.set(!1),!$e(Si)&&$p&&dl(!1),$p=!1};N.events.playing$.subscribe(()=>{$e(Si)&&Qs(!1)});let Kt={interfaceLanguage$:Ue,isCyrillicRelatedInterface$:Ct,initVideo:ui,videoId:i,isClip:o,playerPhase:Ge,vsid:Rt,state:{positionExact$:at,positionWithScrubbing$:ls,duration$:gn,playbackState$:Ui,playbackStateRealistic$:Ln,isPlaying$:er,isLoaderVisible:vo,bufferedProgress$:sn,isLive$:Ji,canChangePlaybackSpeed$:Vn,isActiveLive$:yr,isOldestAvailableLive$:tr,isRewindableLive$:rs,isEnded$:Ti,muted$:Vo,volume$:xi,trafficSavingEnabled$:Ro,highQualityEnabled$:ho,autoQualityLimitingAvailable$:mn,availableVideoStreams$:xr,availableAudioStreams$:zi,videoStream$:wr,audioStream$:Rn,currentQuality$:or,isAutoQualityEnabled$:Do,availableQualities$:hn,currentPlaybackRate$:nr,availablePlaybackRates$:_n,currentSubtitle$:ro,availableTextTracks$:rn,availableSubtitlesList$:sr,currentSubtitleCaptions$:$n,isAutoSubtitleCaptionVisible$:yo,chromecastState$:os,chromecastDeviceName$:Or,chromecastConnected$:$o,currentFormat$:Jn,throughputEstimation$:ns,videoBitrate$:Nr,videoSize$:tn,errorLog$:q,crashed$:Ve,isAudioAvailable$:br,isAudioDisabled:!!l,canDownload:ve.features.download&&!!d,availableSources$:so,hasMpegSources$:xo,isInteractive:x,showInteractiveGraph:ve.features.interactiveGraph,showSeekToInteractive:ve.features.seekToInteractive,showPlayPrevChapter:ve.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:ve.features.interactiveTimeIndicator&&!!$e(Eo).length,interactiveEpisodes$:Eo,isInteractiveTime$:C?ni(C):se(!1),isInteractiveExpectation$:Xb,hasInteractiveBranches:P,playPrevChapterDisabledTooltip:E,looped$:Vi,loadedMetadata$:Ot,isAutoQualityAvailable$:on,previewTrackActive:Si,previewTrackDragInProgress:eo},ui:{t:ge,controlsVisible:se(!1),touched:se(!1),controls:{prevButton:se(void 0),playButton:se(void 0),replayButton:se(void 0),nextButton:se(void 0),playPrevChapterButton:se(void 0),seekToInteractiveButton:se(void 0),interactiveGraphButton:se(void 0),liveButton:se(void 0),time:se(void 0),episodes:se(void 0),volume:se(void 0),subtitles:se(void 0),settings:se(void 0),context:se(void 0),chromecast:se(void 0),pip:se(void 0),"theater-mode-button":se(void 0),fullscreen:se(void 0),vkLogo:se(void 0),interactiveTimeIndicator:se(void 0),timeline:se(void 0),autoplayNextToggle:se(void 0),additionalButtons:W.length?W.reduce(c=>[...c,se(void 0)],[]):[],disabledControls$:At},modals:{hotKeyMap:{show:se(!1),data:se({title:"",closeBtnText:"",groups:[]})}},isFullscreen:It,isFullscreenOpenedByKeyboard:ct,rotateAlpha:Ht,isAutoplay:se(!1),debugPanelVisible:se(!1),episodes:{panelOpened$:se(!1),openedByKeyboard$:se(!1)},contextMenu:{visible$:se(!1),btnRef$:se(void 0),openedByBtnKeyboard$:se(!1),openedByHotKey$:se(!1),lastActiveElem$:se(void 0),showContextMenuBtn$:se(!1),position$:se({top:0,left:0})},playerSize:di,isMobile:ht,mobileNotReportControlHidden$:ba,icon3DVideoVisible:se(!1),scrubbingInProgress:ki,volumeChangingInProgress:wn,is3DVideo:Wt,currentGridType$:ha,additionalButtonsDeprecated$:ds,additionalDesktopControlPanelRightButtons$:ol,additionalSettingsMenuItems$:nl,additionalContextMenuItems$:Wo,interactiveHideMobileControls:se(!1),overlayContainer$:se(void 0),startedByKeyboard$:se(!1),autoplayNextEnabled$:se(!1),timerNextVideoRunning$:se(!0),settingsMenu:{visible$:se(!1),ref$:se(void 0),openedByBtnKeyboard$:se(!1)},settingsSubMenu:{visible$:se(!1),ref$:se(void 0),name$:se(void 0)},userActionsDisabled:se(!1),hiddenControls:{volume:se(!1),vkLogo:se(!1),pip:se(!1),chromecast:se(!1),settings:se(!1)},isControlsAvailable:ar,controlBlocks:{topLeft:se(void 0),topRight:se(void 0),middle:se(void 0),bottom:se(void 0),bottomLeft:se(void 0),bottomRight:se(void 0)},videoTitleInfo:se(void 0),doubleForwardOn$:bp,doubleForwardAvailable$:e$,previewTrackActive:Si,previewTrackDragInProgress:eo,previewTrackAvailable:Ss,isPreviewTrackHorizontallyAligned:Ts},ads:{position:se(0),duration:se(0),playbackState:se("inactive"),canSkip:se(!1),secondsToWatchBeforeSkip:se(0),postrollPassed:se(!1)},webApi:{pictureInPictureApi:ue,annotationsApi:Le,slotsApi:ze,focusManager:te},actions:{internal:{preload:Co,firstStart:c=>Rc(c,!1),play:()=>dl(!1),pause:()=>Qs(!1),togglePlay:ao,toggleMuted:Bn,openSettingsMenu:Wi,closeSettingsMenu:ys,openSettingsSubMenu:ss,closeSettingsSubMenu:xs,setVolume:c=>Ur(c,!1),setMuted:c=>an(c,!1),startVolumeChanging:Is,stopVolumeChanging:ga,setVideoStream:vt,setAudioStream:c=>Jt(c,!1),setQuality:(c,h)=>yn(c,h,!1),setTrafficSavingEnabled:(c,h)=>Fo(c,h,!1),setHighQualityEnabled:(c,h)=>Fn(c,h,!1),setPlaybackRate:Un,incrementPlaybackRate:it,decrementPlaybackRate:jt,setSubtitle:c=>wi(c,!1),toggleSubtitle:()=>To(!1),togglePictureInPicture:Ko,startScrubbing:_e,progressScrubbing:St,completeScrubbing:co,toggleChromecast:Mc,switchToActiveLive:ll,switchFromAdsToVideo:Pc,switchFromVideoToAds:mp,skipAd:fp,setLiveWaitingStart:Ac,setLiveWaitingRecover:vp,setLiveWaitingRecord:kc,getDebugTextData:gp,getTraceTextData:Lc,getDebugPanelData:hp,getVideoElement:$a,seekTime:(c,h,V)=>Er(c,h,V),clearDelayedBufferingCheckTimeout:$r,seekEpisodeStartTime:ws,seekToPercent:qs,getNextEpisode:Dc,seekToNextEpisode:_p,getPrevEpisode:Oc,seekToPrevEpisode:Qe,startLogging:Ft,stopLogging:z,startCameraManualRotation:kt,stopCameraManualRotation:dt,moveCameraFocusPX:bi,holdCamera:Zt,releaseCamera:wt,getVideoEpisodes:cl,getPreviewThumbsData:hi,downloadVideo:Fr,addLanguage:kf,setLanguage:xe,nextMovie:pi,videoRotate:Pr,correctSeekTimeToInteractive:Hv,replayInteractive:R,setLooped:qe,reportProblem:Lt,setAutoplayNextEnabled:fi,setTimerNextVideoRunning:Bo,prevVideoClick:wo,nextVideoClick:So,nextVideoAnnouncementShow:Ki,nextVideoAnnouncementClick:Ho,nextVideoAnnouncementAuto:Hn,nextVideoAnnouncementCancel:Ir,checkFullscreenSupport:Tt,changeDoubleForwardOn:Uv,closePreviewTrack:i$,previewTrackOpened:t$,previewTrackDragStarted:o$,previewTrackDragFinished:n$},external:{firstStart:c=>Rc(c,!0),play:()=>dl(!0),pause:()=>Qs(!0),stop:()=>Vc(!0),seekTime:c=>va(c),seekEpisodeStartTime:c=>ai(c),setPlaybackRate:c=>Io(c),setAutoQualityLimits:c=>pt(c),setMuted:c=>an(c,!0),toggleSubtitle:()=>To(!0),changeSubtitle:xn,setVolume:c=>Ur(c,!0),returnFocusToEpisodes:Zb,updateAdditionalSettingsItem:al,addAdditionalSettingsItem:ft,removeAdditionalSettingsItem:gt,updateAdditionalContextItem:Qi,addAdditionalContextItem:_i,removeAdditionalContextItem:Oi,updateAdditionalButton:rl,addAdditionalButton:sl,removeAdditionalButton:Xl,setLiveLowLatency:_a,hideControls:()=>as(!1),showControls:()=>as(!0),setQuality:c=>yn(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>Fo(c,"to-video",!0),setHighQualityEnabled:c=>Fn(c,"to-video",!0),changeAudioStream:Br}},callbacks:s,setUiCallbacks:c=>{Ye=Xe({},c)},getAdmanWrapper:()=>le,getLogger:()=>pe,getPlayer:()=>N,destroy:Jb};return Kt};function Xn(t,e,i,o){var m;let r=(m=e[i])==null?void 0:m.getBoundingClientRect(),a=o&&!!r&&!!(r.right-r.left),{top:l,left:d,bottom:s,right:u}=Fs(e[i],t||void 0);return{left:a?d:0,right:a?u:0,top:a?l:0,bottom:a?s:0,isDisplayed:a}}var e2=["disabledControls$","additionalButtons"],t2=["interactiveTimeIndicator"],ql=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!e2.includes(r)){let l=o||t2.includes(r);a.set(Xn(t,i,r,l))}}};var qu=(t,e,i)=>_t(null,null,function*(){yield mo(),e&&i&&(i.focus(),t.set(!1))});var i2=ke('<path d="M18 10c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2Zm-6 4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Zm-6 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Z"></path>');function ym(t){Ze(t,{children:(e,i)=>{var o=i2();_(e,o)},$$slots:{default:!0}})}function xm(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(s,"$contextMenuVisible$",i),a=g(e,"disabled",3,!1),l=g(e,"ariaLabel",3,""),d=ye(),s=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,m=d.ui.contextMenu.showContextMenuBtn$,p=d.ui.contextMenu.position$,v=d.ui.contextMenu.btnRef$,$=K(void 0);He(()=>{n($)&&Et(()=>{v.set(n($))})});let y=C=>{let R=la(C),k=V_(n($));p.set(k),u.set(R),s.set(!r())},b=()=>{m.set(!0)},x=()=>{m.set(!1)},I=f(()=>r()?"opened":"");zt(t,{get className(){return n(I)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:b,blur:x,get ariaExpanded(){return r()},get ref(){return n($)},set ref(C){D($,C,!0)},children:(C,R)=>{ym(C,{})},$$slots:{default:!0}}),H(),o()}var o2=t=>{t.stopPropagation()},n2=L("<div><!> <div></div> <div></div></div>"),r2={hash:"s-20",code:'.interactive-episode-icon-animated.s-20{height:32px;opacity:1;position:absolute;right:16px;top:16px;transition:.3s;width:32px}.interactive-episode-icon-animated.icon-small.s-20{height:28px;width:28px}.invisible.s-20{opacity:0;visibility:hidden}.fullscreen.s-20:not(.mobile){height:40px;right:23px;top:19px;width:40px}.mobile.s-20{height:28px;right:14px;top:12px;width:28px}.fullscreen.mobile.s-20{height:32px;width:32px}@media screen and (orientation:portrait){.interactive-episode-icon-animated.mobile.fullscreen.s-20{right:16px;top:40px}}@keyframes s-20-pulse{0%{border-width:1px;opacity:0;transform:scale(1)}10%{opacity:1}50%{border-width:1px;opacity:.5;transform:scale(1.5)}to{border-width:.5px;opacity:0;transform:scale(1.5)}}.pulse.s-20{animation:s-20-pulse 1s infinite;border:1px solid #fff;border-radius:100%;bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;transform:scale(1.8);transition:.3s}.pulse.paused.s-20{animation-play-state:paused}.interactive-episode-icon-animated svg{height:100%;width:100%}.ref-block.s-20{height:100%;position:absolute;top:0;visibility:hidden;width:100%}.hidden.s-20{display:none}'};function ec(t,e){var pe;B(e,!0),Q(t,r2);let[i,o]=Be(),r=()=>w(x,"$isMobile",i),a=()=>w(k,"$areControlsVisible",i),l=()=>w(E,"$currentGridType$",i),d=()=>w(C,"$isInteractiveTime$",i),s=()=>w(b,"$interactiveControlsOpacity$",i),u=()=>w(R,"$showInteractiveTimeIndicatorTooltip$",i),m=()=>w(I,"$isFullscreen",i),p=g(e,"ref",15,void 0),v=K(void 0),$=ye(),y=_o(),{interactiveControlsOpacity$:b}=y,x=$.ui.isMobile,I=$.ui.isFullscreen,C=$.state.isInteractiveTime$,R=y.showInteractiveTimeIndicatorTooltip$,k=$.ui.controlsVisible,P=(pe=$.callbacks)==null?void 0:pe.onInteractiveTimeIndicatorClick,E=$.ui.currentGridType$,W=f(()=>!r()&&a()),F=f(()=>Bs(l(),"s")),U=f(()=>!d()||!!s()||n(W)),j=K(!1);He(()=>{D(j,n(U),!0)});let re=()=>{D(j,!0)},G=()=>{var le;oe(),(le=n(v))==null||le.addEventListener("animationiteration",re,{once:!0})},oe=()=>{var le;D(j,!1),(le=n(v))==null||le.removeEventListener("animationiteration",re)},X=le=>{R.set(le)},Ie=f(()=>u()&&!n(U));He(()=>{u()?G():oe()});let fe=()=>{n(U)||(R.set(!0),P==null||P())};cn(()=>{R.clearTimeout(),oe()});let ee=()=>{R.set(!1)},be=Y("tooltip_interactive_interaction_time_indicator");var Ce=n2();let de;Ce.__mousemove=[o2],Ce.__click=fe;var We=T(Ce);Lo(We,{get tooltipContent(){return be},get tooltipVisible(){return n(Ie)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:X,get ref(){return p()},set ref(le){p(le)},children:(le,ue)=>{Wd(le,{completed:!0})},$$slots:{default:!0}});var ve=A(We,2);let me;tt(ve,le=>p(le),()=>p());var Z=A(ve,2);let N;tt(Z,le=>D(v,le),()=>n(v)),S(Ce),O((le,ue,Le)=>{de=ie(Ce,1,"interactive-episode-icon-animated s-20",null,de,le),me=ie(ve,1,"ref-block s-20",null,me,ue),N=ie(Z,1,"pulse s-20",null,N,Le)},[()=>({mobile:r(),fullscreen:m(),invisible:n(U),"icon-small":n(F)}),()=>({hidden:n(U)}),()=>({paused:n(j)})]),mt("mouseleave",Ce,ee),_(t,Ce),H(),o()}et(["mousemove","click"]);function Qu(t,e){B(e,!0);let i=g(e,"tooltipEnabled",3,!0),o=g(e,"disabled",3,!1),r=g(e,"className",3,void 0),a=g(e,"ref",15),l=g(e,"tooltipVisible",3,!1);Lo(t,{get disabled(){return o()},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},get hasTooltip(){return i()},get mouseEnter(){return e.mouseEnter},get mouseLeave(){return e.mouseLeave},get tooltipVisible(){return l()},get className(){return r()},get ref(){return a()},set ref(d){a(d)},children:(d,s)=>{var u=De();let m=f(()=>e.buttonComponent);var p=ae(u);Hi(p,()=>n(m),(v,$)=>{$(v,Jr(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),_(d,u)},$$slots:{default:!0}}),H()}var zs={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var a2=ke('<path d="M32 21.68V15a2 2 90 114 0v18a2 2 90 01-4 0v-6.66l-16.3 9.32A2.48 2.48 90 0112 33.56V14.46c0-1.9 2.06-3.08 3.7-2.12z"></path>');function pa(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=f(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),r=f(()=>`${un(e.size)}${n(o)}`),a=f(()=>i()?"prev-icon":"next-icon");Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(r)},get testId(){return n(a)},get shadow(){return e.shadow},children:(l,d)=>{var s=a2();_(l,s)},$$slots:{default:!0}}),H()}var l2=L('<div class="icon-background-mobile s-25"><!></div>'),d2={hash:"s-25",code:".icon-background-mobile.s-25{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:100%;justify-content:space-around;left:0;position:absolute;top:0;width:100%}"};function Wa(t,e){B(e,!0),Q(t,d2);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"disabled",3,!1),l=ye().ui.t,d=f(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),s=f(()=>e.type==="prev"?l("hotkey_map_item_prev_video_value"):l("hotkey_map_item_next_video_value")),u=f(()=>`btn-${o()?"m":"d"}--${e.type}`);zt(t,{get className(){return n(u)},get testId(){var m;return`btn-${(m=e.type)!=null?m:""}`},get disabled(){return r()},get ariaLabel(){return n(d)},get click(){return e.click},get ariaKeyShortCut(){return n(s)},get ref(){return i()},set ref(m){i(m)},children:(m,p)=>{var v=De(),$=ae(v);{var y=x=>{var I=l2(),C=T(I);let R=f(()=>e.type==="prev");pa(C,{get size(){return"32"},get reversed(){return n(R)}}),S(I),_(x,I)},b=x=>{let I=f(()=>e.type==="prev");pa(x,{get size(){return"24"},get reversed(){return n(I)}})};M($,x=>{o()?x(y):x(b,!1)})}_(m,v)},$$slots:{default:!0}}),H()}var c2=ke('<path d="M24 21.2a.8.8 90 01-1.34.6L14.08 14a1.34 1.34 90 010-2l8.6-7.8a.8.8 90 011.32.6V11a16 16 90 11-16 16 2 2 90 114 0 12 12 90 1012-12z"></path>');function tc(t,e){B(e,!0);let i=f(()=>un(e.size));Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(i)},testId:"replay-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=c2();_(o,a)},$$slots:{default:!0}}),H()}import{noop as u2}from"@vkontakte/videoplayer-shared/es2015";var p2=L('<div class="icon-background-mobile s-1y"></div>'),f2=L("<!> <div><!></div>",1),m2={hash:"s-1y",code:".mobile.s-1y{align-items:center;display:flex;justify-content:center;position:relative}.icon-background-mobile.s-1y{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);height:calc(100% - 32px);left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function Ql(t,e){B(e,!0),Q(t,m2);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"disabled",3,!1),a=g(e,"className",3,""),l=g(e,"click",3,u2),d=Y("tooltip_restart"),s=f(()=>`${o()?"btn-m--play":""} ${a()}`);zt(t,{get className(){return n(s)},testId:"replay-btn",get ariaLabel(){return d},get disabled(){return r()},get click(){return l()},get ariaKeyShortCut(){return gs.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,m)=>{var p=f2(),v=ae(p);{var $=C=>{var R=p2();_(C,R)};M(v,C=>{o()&&C($)})}var y=A(v,2);let b;var x=T(y);let I=f(()=>o()?"48":"24");tc(x,{get size(){return n(I)}}),S(y),O(C=>b=ie(y,1,"s-1y",null,b,C),[()=>({mobile:o()})]),_(u,p)},$$slots:{default:!0}}),H()}var v2=ke('<path d="m17.4 10 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h3.801zm16 0 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h4z"></path>');function Ws(t,e){B(e,!0);let i=f(()=>un(e.size));Ze(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"pause-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=v2();_(o,a)},$$slots:{default:!0}}),H()}import{noop as g2}from"@vkontakte/videoplayer-shared/es2015";var h2=L('<div class="icon-background-mobile s-22"><!></div>'),_2={hash:"s-22",code:".icon-background-mobile.s-22{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:calc(100% - 32px);justify-content:space-around;left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function Gl(t,e){B(e,!0),Q(t,_2);let[i,o]=Be(),r=()=>w(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=_o(),l=g(e,"ref",15,void 0),d=g(e,"isMobile",3,!1),s=g(e,"isPlaying",3,!1),u=g(e,"disabled",3,!1),m=g(e,"className",3,""),p=g(e,"click",3,g2),$=ye().ui.t,{toggle:y}=a,b=f(()=>y),x=f(()=>r()!==null),I=f(()=>n(x)?r():s()),C=f(()=>n(I)?$("tooltip_pause"):$("tooltip_play")),R=f(()=>n(I)?Ws:An),k=f(()=>`${d()?"btn-m--play":""} ${m()}`),P=f(()=>n(x)?n(b):p());zt(t,{get className(){return n(k)},testId:"play-btn",get click(){return n(P)},get disabled(){return u()},get ariaLabel(){return n(C)},get ariaKeyShortCut(){return gs.KeyK},get ref(){return l()},set ref(E){l(E)},children:(E,W)=>{var F=De();let U=f(()=>n(R));var j=ae(F);{var re=oe=>{var X=h2(),Ie=T(X);Hi(Ie,()=>n(U),(fe,ee)=>{ee(fe,{get size(){return"48"}})}),S(X),_(oe,X)},G=oe=>{var X=De(),Ie=ae(X);Hi(Ie,()=>n(U),(fe,ee)=>{ee(fe,{get size(){return"24"}})}),_(oe,X)};M(j,oe=>{d()?oe(re):oe(G,!1)})}_(E,F)},$$slots:{default:!0}}),H(),o()}var b2=ke('<path d="M12.58 12.92v2.5a1 1 0 0 1-1.52.85l-5.58-3.42a1 1 0 0 1 0-1.7l5.58-3.42a1 1 0 0 1 1.52.86v2.5l5.48-3.36a1 1 0 0 1 1.52.86v6.82a1 1 0 0 1-1.52.86z"></path>');function wm(t){Ze(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=b2();_(e,o)},$$slots:{default:!0}})}function ic(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),r=g(e,"disabled",3,!1),a=Y("tooltip_interactive_go_back"),l=f(()=>o()?"hidden":"");zt(t,{get className(){return n(l)},testId:"play-prev-chapter-btn",get ariaLabel(){return a},get disabled(){return r()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,s)=>{wm(d,{})},$$slots:{default:!0}}),H()}var $2=L('<span class="gutter s-26"><span><!></span></span>'),y2={hash:"s-26",code:".gutter.s-26{--gutterWidth:32px;--gutterHeight:12px;--togglerWidth:18px;--togglerHeight:18px;--togglerGap:calc(var(--togglerWidth)/6);background-color:hsla(0,0%,100%,.3);border-radius:50px;height:var(--gutterHeight);position:relative;width:var(--gutterWidth)}.toggler.s-26{align-items:center;background-color:#626364;border-radius:50%;display:flex;height:var(--togglerHeight);justify-content:center;left:0;position:absolute;top:calc((var(--togglerHeight) - var(--gutterHeight))/2*-1);transform:translateX(calc(var(--togglerGap)*-1));transition-duration:.2s;transition-property:background-color,transform;transition-timing-function:ease;width:var(--togglerWidth)}.toggler.enabled.s-26{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function oc(t,e){B(e,!0),Q(t,y2);let[i,o]=Be(),r=()=>w(s,"$autoplayNextEnabled$",i),a=g(e,"ref",15,void 0),l=ye(),d=l.ui.t,s=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,m=()=>{u(!r(),!0)},p=d("aria_label_autoplay"),v="12",$="#000",y=f(()=>r()?"true":"false");zt(t,{click:m,get ariaLabel(){return p},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref(b){a(b)},children:(b,x)=>{var I=$2(),C=T(I);let R;var k=T(C);{var P=W=>{An(W,{get size(){return v},fill:$})},E=W=>{Ws(W,{get size(){return v},fill:$})};M(k,W=>{r()?W(P):W(E,!1)})}S(C),S(I),O(W=>R=ie(C,1,"toggler s-26",null,R,W),[()=>({enabled:r()})]),_(b,I)},$$slots:{default:!0}}),H(),o()}var x2=ke('<path d="M16.73 4.85c-.54-.05-1.23-.05-2.23-.05H7.9a.9.9 0 1 1 0-1.8h6.64q1.41-.01 2.33.05c.64.05 1.2.16 1.73.43a4.4 4.4 0 0 1 1.92 1.92c.27.52.38 1.09.43 1.73q.06.92.05 2.33v5.08q.01 1.41-.05 2.33a5 5 0 0 1-.43 1.73 4.4 4.4 0 0 1-1.92 1.92 5 5 0 0 1-1.73.43q-.92.06-2.33.05H7.9a.9.9 0 1 1 0-1.8h6.6c1 0 1.69 0 2.23-.04.52-.05.82-.13 1.05-.24a2.6 2.6 0 0 0 1.14-1.14c.11-.23.2-.53.24-1.06s.04-1.23.04-2.22v-5c0-1 0-1.69-.04-2.23a3 3 0 0 0-.24-1.05 2.6 2.6 0 0 0-1.14-1.14c-.23-.11-.53-.2-1.05-.24"></path><path d="M7.76 11.17V8.9c0-.71.7-1.15 1.25-.78l4.6 3.1a.96.96 0 0 1 0 1.54L9 15.87c-.55.37-1.25-.07-1.25-.78v-2.26l-4.5 3.04C2.7 16.24 2 15.8 2 15.09V8.91c0-.71.7-1.15 1.25-.78z "></path>',1);function Sm(t){Ze(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=x2();ti(),_(e,o)},$$slots:{default:!0}})}function nc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),r=g(e,"disabled",3,!1),a=Y("tooltip_interactive_seek"),l=f(()=>o()?"hidden":"");zt(t,{get className(){return n(l)},testId:"btn-seek-to-interactive",get ariaLabel(){return a},get disabled(){return r()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,s)=>{Sm(d,{})},$$slots:{default:!0}}),H()}var w2=ke('<path d="M15.2 5.9v1.2c0 .6 0 .9.12 1.12q.15.3.46.46c.23.12.52.12 1.12.12h1.2c.6 0 .9 0 1.12-.12q.3-.15.46-.46c.12-.23.12-.52.12-1.12V5.9c0-.6 0-.9-.12-1.12a1 1 0 0 0-.46-.46c-.23-.12-.52-.12-1.12-.12h-1.2c-.6 0-.9 0-1.12.12q-.3.15-.47.46c-.11.23-.11.53-.11 1.12m-.05 11.03v1.14c0 .6 0 .91.12 1.14q.15.31.47.47c.23.12.53.12 1.14.12h1.22c.6 0 .9 0 1.14-.12a1 1 0 0 0 .47-.47c.12-.23.12-.53.12-1.14v-1.14c0-.6 0-.9-.12-1.14a1 1 0 0 0-.47-.47c-.23-.12-.54-.12-1.14-.12h-1.22c-.6 0-.91 0-1.14.12a1 1 0 0 0-.47.47c-.12.23-.12.53-.12 1.14"></path>'),S2=ke('<path d="M16.78 3h1.42q.47 0 .83.02.4.02.82.21.61.31.92.92.2.41.21.81.03.36.02.83v1.4q0 .47-.02.83-.02.4-.21.81a2 2 0 0 1-.92.92 2 2 0 0 1-.82.21q-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.2 2 2 0 0 1-.93-.93 2 2 0 0 1-.2-.8l-.03-.64h-2.2c-.49 0-.8 0-1.04.02a1 1 0 0 0-.35.06 1 1 0 0 0-.35.35 1 1 0 0 0-.07.35c-.02.24-.02.55-.02 1.04v5.57c0 .5 0 .8.02 1.04s.05.31.07.34q.12.23.35.35c.03.02.11.05.34.07s.56.02 1.05.02h2.2q0-.34.02-.62.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02h1.42q.47 0 .83.02.4.01.82.2.61.31.92.93.2.41.21.8.03.37.02.84v1.4q0 .47-.02.83-.02.39-.21.81a2 2 0 0 1-.92.92q-.43.2-.82.21-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.21 2 2 0 0 1-.93-.92 2 2 0 0 1-.2-.81l-.03-.63h-2.24q-.68 0-1.16-.03a3 3 0 0 1-1.01-.26 2.6 2.6 0 0 1-1.14-1.14 3 3 0 0 1-.26-1q-.04-.5-.03-1.16v-1.93H2.9A.9.9 0 0 1 2 12c0-.5.4-.9.9-.9h5.23V9.18q0-.68.03-1.16.02-.51.26-1.02a2.6 2.6 0 0 1 1.14-1.13q.5-.24 1.02-.26.48-.04 1.16-.02h2.23q0-.34.02-.63.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02m-.84 1.84.15-.02c.16-.02.37-.02.72-.02h1.35c.36 0 .57 0 .72.02l.15.02a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.13l-.15.02-.72.01h-1.35l-.72-.01-.15-.03a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71V5.82q0-.5.02-.71l.02-.15a.3.3 0 0 1 .12-.12m0 11.02.15-.03.72-.01h1.35l.72.01.15.03a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.12l-.15.02c-.15.02-.36.02-.72.02h-1.35c-.35 0-.56 0-.72-.02l-.15-.02a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71v-1.34c0-.35 0-.56.02-.71l.02-.15a.3.3 0 0 1 .12-.13"></path><!>',1);function Cm(t,e){let i=g(e,"isOpened",3,!1),o=f(()=>i()?"graph-close-icon":"graph-open-icon");Ze(t,{get testId(){return n(o)},children:(r,a)=>{var l=S2(),d=A(ae(l));{var s=u=>{var m=w2();_(u,m)};M(d,u=>{i()&&u(s)})}_(r,l)},$$slots:{default:!0}})}function rc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),r=g(e,"disabled",3,!1),a=g(e,"graphIsOpened",3,!1),d=ye().ui.t,s=f(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=f(()=>o()?"hidden":"");zt(t,{get className(){return n(u)},testId:"btn-graph",get disabled(){return r()},get ariaLabel(){return n(s)},get click(){return e.click},get ref(){return i()},set ref(m){i(m)},children:(m,p)=>{let v=f(()=>!!a());Cm(m,{get isOpened(){return n(v)}})},$$slots:{default:!0}}),H()}import{PlaybackState as rb}from"@vkontakte/videoplayer-core/es2015";function sc(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(u,"$playbackState$",i),a=g(e,"isMobile",3,!1),l=g(e,"isLiveActive",3,!1),d=g(e,"ariaLabel",3,""),s=ye(),u=s.state.playbackState$,m=s.actions.internal.switchToActiveLive,p=s.actions.internal.togglePlay,v=f(()=>()=>{if(!l()){m();return}r()===rb.PAUSED&&p()}),$=f(()=>a()?"":"btn--live btn-full-opacity"),y=f(()=>l()?"btn-live":"btn-live-offset"),b=f(()=>l()&&r()===rb.PLAYING);zt(t,{get className(){return n($)},get testId(){return n(y)},get disabled(){return n(b)},get ariaLabel(){return d()},get click(){return n(v)},children:(x,I)=>{Ld(x,{get isActive(){return l()}})},$$slots:{default:!0}}),H(),o()}import{noop as sb}from"@vkontakte/videoplayer-shared/es2015";var C2=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),T2=L('<img class="icon" aria-hidden="true"/>');function Ka(t,e){"use strict";let i=K(!1),o=()=>{D(i,!0)};var r=De(),a=ae(r);{var l=s=>{var u=C2();_(s,u)},d=s=>{var u=T2();O(()=>Oe(u,"src",e.icon)),mt("error",u,o),La(u),_(s,u)};M(a,s=>{n(i)?s(l):s(d,!1)})}_(t,r)}function Tm(t,e){B(e,!0);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,sb),r=g(e,"ref",15),a=f(()=>o()===sb),l=f(()=>n(a)||i()),d=f(()=>n(a)?"btn-full-opacity":"");Lo(t,{get disabled(){return n(l)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get tooltipVisible(){return e.tooltipVisible},get ref(){return r()},set ref(s){r(s)},children:(s,u)=>{let m=f(()=>{var p;return(p=e.testId)!=null?p:e.id});zt(s,{get className(){return n(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(l)},get testId(){return n(m)},children:(p,v)=>{Ka(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),H()}var ab=t=>!!t.buttonComponent;var Ks={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var Gu=(t,e,i,o)=>{if(t)for(let[r,a]of Object.entries(e))a.set(Xn(t,i,r,o))};import{interpolate as Im}from"@vkontakte/videoplayer-shared/es2015";var lb=10,db=40,Em=.2,E2=.5,P2=65,A2=114,k2=4,cb=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=f(()=>i?P2:A2),r=K(!1),a=K(0),l=K(0),d=f(()=>n(o)+lb-db-k2),s=f(()=>Im(n(a),[Em,1],[0,-n(d)])),u=f(()=>Im(n(a),[Em,1],[0,db])),m=f(()=>Im(n(a),[Em,1],[0,n(o)+lb]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(m),onPointerDown:b=>{var x;D(l,((x=e())==null?void 0:x.getBoundingClientRect().bottom)||0,!0),D(r,!0)},onPointerMove:b=>{if(!n(r))return;let x=Math.max(Math.min(b.clientY-n(l),0),-n(d));D(a,Math.abs(x/n(d)),!0)},onPointerUp:()=>{D(r,!1),D(a,n(a)>=E2?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{D(a,0)}}};var L2=t=>t;function fa(t,{delay:e=0,duration:i=400,easing:o=L2}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var M2=L('<span class="root s-2b"> </span>'),V2={hash:"s-2b",code:".root.s-2b{box-shadow:0 8px 24px 0 rgba(0,0,0,.08);box-shadow:0 0 2px 0 rgba(0,0,0,.08);color:#fff;font-size:13px;font-weight:500;line-height:16px}"};function Pm(t,e){Q(t,V2);var i=M2(),o=T(i,!0);S(i),O(()=>he(o,e.time)),_(t,i)}var R2=L('<div class="tooltip-wrapper s-x"><div><!></div></div>'),D2={hash:"s-x",code:'.tooltip-wrapper.s-x{display:block;position:relative}.tooltip.s-x{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-x:after{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;left:50%;line-height:0;position:absolute;transform:translate(-50%,5px);width:0}.tooltip.active.s-x{opacity:1;visibility:visible}'};function Am(t,e){Q(t,D2);let i=g(e,"active",3,!1),o=g(e,"pointer",3,!1),r=g(e,"translateXPx",3,0),a=g(e,"translateYPx",3,0),l=g(e,"leftOffset",3,0),d=g(e,"rightOffset",3,0),s=K(void 0),u=K(void 0);function m(x){if(!n(u))return 0;let{width:I}=n(u).getBoundingClientRect(),C=I/2;return x<C?C+l():x>e.containerWidth-C?e.containerWidth-C-d():x}let p=f(()=>m(r()));var v=R2(),$=T(v);let y;var b=T($);oi(b,()=>{var x;return(x=e.children)!=null?x:bt}),S($),tt($,x=>D(u,x),()=>n(u)),S(v),tt(v,x=>D(s,x),()=>n(s)),O(x=>{Ke(v,`transform: translate(${n(p)}px, ${a()}px);`),y=ie($,1,"tooltip s-x",null,y,x),Ke($,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),_(t,v)}var ub=t=>Math.abs(t)/90%4===1;var O2=ke('<path xmlns="http://www.w3.org/2000/svg" d="M15.782 10.152a.75.75 0 0 1-1.06 0L9.999 5.438l-4.72 4.716a.75.75 0 0 1-1.061-1.061l5.251-5.246a.75.75 0 0 1 1.06 0l5.253 5.246a.75.75 0 0 1 0 1.06Z"></path><path xmlns="http://www.w3.org/2000/svg" d="M15.782 16.152a.75.75 0 0 1-1.06 0l-4.723-4.715-4.72 4.716a.75.75 0 0 1-1.061-1.061l5.251-5.246a.75.75 0 0 1 1.06 0l5.253 5.245a.75.75 0 0 1 0 1.061Z"></path>',1);function km(t){Ze(t,{height:"20",width:"20",shadow:!0,children:(e,i)=>{var o=O2();ti(),_(e,o)},$$slots:{default:!0}})}var N2=L('<div class="rich-seek-hint s-w"><span class="icon_wrapper s-w"><!></span> <span class="rich-seek-hint-text s-w"> </span></div>'),B2=L('<div class="preview s-w"><!></div>'),H2=L('<div class="time s-w"> </div>'),F2=L('<div><!> <div class="episode s-w"><!></div> <!></div>'),U2={hash:"s-w",code:".timeline-preview.s-w{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-w{bottom:72px}.preview.s-w{background-color:var(--timeline-preview-bg);border:1px solid var(--white);border-radius:8px;box-shadow:0 0 2px var(--timeline-preview-shadow),0 8px 24px var(--timeline-preview-shadow);display:flex;justify-content:center}.episode.s-w{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-w,.time.s-w{font-size:13px;font-weight:500;line-height:16px;text-align:center;text-shadow:0 8px 24px var(--timeline-preview-shadow),0 0 2px var(--timeline-preview-shadow)}.time.s-w{color:var(--white)}.rich-seek-hint.s-w{position:absolute;text-align:center;top:-12px;transform:translateY(-100%)}.icon_wrapper.s-w{display:inline-block;height:20px;margin-right:6px;vertical-align:top;width:20px}.rich-seek-hint-text.s-w{font-size:14px;line-height:18px;text-shadow:0 2px 4px rgba(0,0,0,.3),0 7px 16px rgba(0,0,0,.25);vertical-align:top}"};function Lm(t,e){B(e,!0),Q(t,U2);let[i,o]=Be(),r=()=>w(b,"$rotateAlpha",i),a=()=>w(x,"$playerSize",i),l=()=>w(I,"$previewTrackAvailable",i),d={MOBILE:150,DESKTOP:278},s=g(e,"time",3,""),u=g(e,"isMobile",3,!1),m=g(e,"videoEpisodes",19,()=>[]),p=g(e,"progress",3,0),v=g(e,"duration",3,0),$=g(e,"isInteractive",3,!1),y=ye(),b=y.ui.rotateAlpha,x=y.ui.playerSize,I=y.ui.previewTrackAvailable,C=K(0),R=K(0),k=K(""),P=K(0),E=K(0),W=K(0),F=K(0),U=f(()=>Du(p(),v(),m())),j=f(()=>zl(r())),re=f(()=>ub(r())),G=f(Ie),oe=f(()=>(n(re)?1:-1)*(n(C)/2-n(R)/2)),X=f(()=>n(oe)*-1);He(()=>{(ue=>{D(C,ue.width,!0),D(R,ue.height,!0)})(ee())}),He(()=>{(ue=>{D(k,ue.imgSrc,!0),D(P,ue.imgWidth,!0),D(E,ue.imgHeight,!0),D(W,ue.imgOffsetX,!0),D(F,ue.imgOffsetY,!0)})(be(p()))});function Ie(){var te;let ue=u()?d.MOBILE:d.DESKTOP,{isVertical:Le}=fe(),ze=30;return(te=n(U))!=null&&te.text&&(ze+=16),(Le||n(j))&&(ze+=18,ze+=50),Math.min(Math.max(a().height-ze,0),ue)}function fe(){let ue=e.previewThumbsData.frameWidth,Le=e.previewThumbsData.frameHeight,ze=Le>ue;return{width:ue,height:Le,isHorizontal:!ze,isVertical:ze}}function ee(){let{height:ue,isHorizontal:Le,isVertical:ze,width:te}=fe();return Le&&(ue=ue/te*n(G),te=n(G)),ze&&(te=te/ue*n(G),ue=n(G)),{width:te,height:ue}}function be(ue){let Le;e.previewThumbsData.isUV?Le=Math.floor(v()*ue/e.previewThumbsData.frequency):Le=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*ue)));let ze=Math.floor(Le/e.previewThumbsData.countPerImage),te=Math.floor(Le%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),ce=Le%e.previewThumbsData.countPerRow,we=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&ze===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(we=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&we++);let Ee=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&ze===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(Ee=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let Ye=n(C)*Ee,Ae=n(R)*we,Te=-ce*n(C),Fe=-te*n(R);return{imgSrc:e.previewThumbsData.links[ze],imgWidth:Ye,imgHeight:Ae,imgOffsetX:Te,imgOffsetY:Fe}}var Ce=F2();let de;var We=T(Ce);{var ve=ue=>{var Le=B2(),ze=T(Le);{var te=ce=>{var we=N2(),Ee=T(we),Ye=T(Ee);km(Ye,{}),S(Ee);var Ae=A(Ee,2),Te=T(Ae,!0);S(Ae),S(we),O(Fe=>he(Te,Fe),[()=>Y("preview_track_notification_text")]),_(ce,we)};M(ze,ce=>{l()&&ce(te)})}S(Le),O(()=>Ke(Le,`width: ${n(C)}px; height: ${n(R)}px; background-image: url(${n(k)}); background-size: ${n(P)}px ${n(E)}px; background-position: ${n(W)}px ${n(F)}px;
|
|
59
|
-
transform: rotate(${r()}deg) ${n(j)?`translate(${n(oe)}px, ${n(X)}px)`:""};
|
|
60
|
-
`)),_(ue,Le)};M(We,ue=>{n(k)&&ue(ve)})}var me=A(We,2),Z=T(me);{var N=ue=>{var Le=De(),ze=ae(Le);{var te=we=>{var Ee=vs();O(Ye=>he(Ee,Ye),[()=>Y("tooltip_episode_unfinished")]),_(we,Ee)},ce=we=>{var Ee=vs();O(()=>he(Ee,n(U).text||"")),_(we,Ee)};M(ze,we=>{$()&&n(U).completed===!1?we(te):we(ce,!1)})}_(ue,Le)};M(Z,ue=>{n(U)&&ue(N)})}S(me);var pe=A(me,2);{var le=ue=>{var Le=H2(),ze=T(Le,!0);S(Le),O(()=>he(ze,s())),_(ue,Le)};M(pe,ue=>{$()||ue(le)})}S(Ce),O(ue=>{de=ie(Ce,1,"timeline-preview s-w",null,de,ue),Ke(Ce,`width: ${n(j)?n(R):n(C)}px;`)},[()=>({mobile:u()})]),_(t,Ce),H(),o()}var z2=L('<span class="time s-g"> </span>'),W2=L("<!> <!>",1),K2={hash:"s-g",code:".time.s-g{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.timeline-slider{--slider-bg:var(--timeline-slider-bg);--slider-filled-bg:var(--timeline-slider-filled-bg);--slider-handle-bg:var(--timeline-slider-handle-bg);--slider-loaded-bg:var(--timeline-slider-loaded-bg)}"};function Mm(t,e){var Ve,xe,Ue,Se,Ct;B(e,!0),Q(t,K2);let[i,o]=Be(),r=()=>w(G,"$interactiveEpisodes$",i),a=()=>w(E,"$duration$",i),l=()=>w(P,"$position$",i),d=()=>w(Ie,"$isInteractiveExpectation$",i),s=()=>w(X,"$isInteractiveTime$",i),u=()=>w(Ce,"$previewTrackActive",i),m=()=>w(W,"$isLive$",i),p=()=>w(be,"$disabledControls$",i),v=()=>w(U,"$isMobile",i),$=()=>w(F,"$isActiveLive$",i),y=()=>w(k,"$bufferedProgress$",i),b=g(e,"showTimeline",3,!1),x=g(e,"withEpisodes",3,!0),I=g(e,"ref",15,void 0),C=ye(),R=Vt(),k=C.state.bufferedProgress$,P=C.state.positionWithScrubbing$,E=C.state.duration$,W=C.state.isLive$,F=C.state.isActiveLive$,U=C.ui.isMobile,j=R.features.episodes&&x()?C.actions.internal.getVideoEpisodes():void 0,re=C.actions.internal.getPreviewThumbsData(),G=C.state.interactiveEpisodes$,oe=C.state.isInteractive,X=C.state.isInteractiveTime$,Ie=C.state.isInteractiveExpectation$,fe=C.actions.internal.correctSeekTimeToInteractive,ee=(Ve=C.callbacks)==null?void 0:Ve.onDisabledTimelineClick,be=C.ui.controls.disabledControls$,Ce=C.ui.previewTrackActive,de=(Ue=(xe=C.callbacks)==null?void 0:xe.uiInfo)==null?void 0:Ue.onTimelineMouseEnter,We=(Ct=(Se=C.callbacks)==null?void 0:Se.uiInfo)==null?void 0:Ct.onTimelineMouseLeave,ve=C.ui.t,me=R.features.interactiveResponsiveUi,Z=f(()=>oe?r():j),N=f(()=>Jo(a())),pe=f(()=>Jo(l())),le=f(()=>l()/a()),ue=f(()=>d()||s()),Le=K(!1),ze=K(""),te=K(0),ce=K(0),we=K(0),Ee=f(()=>({containerWidth:n(ce),translateXPx:n(te),translateYPx:oe&&re?-36:-16,active:n(Le)&&b()&&!n(ue)&&!me&&!u(),pointer:!R.features.timelinePreview||!re||m()})),Ye=ve("aria_timeline"),Ae=f(()=>ve("aria_timeline_value",{position:n(pe),duration:n(N)}));function Te(ge){return!fe||!oe?ge:fe(ge*a())/a()}function Fe(ge,Ne){var Ge;(Ge=e.onSliderPointerDown)==null||Ge.call(e,Ne),C.actions.internal.startScrubbing(Te(ge))}function ht(ge){s()||C.actions.internal.progressScrubbing(Te(ge))}function Rt(ge){var Ne;C.actions.internal.completeScrubbing(Te(ge)),D(Le,!1),(Ne=e.onSliderPointerUp)==null||Ne.call(e)}function It(ge,Ne,Ge){var lt;(lt=e.onSliderPointerEnter)==null||lt.call(e,ge),Yt(ge,Ne,Ge),D(Le,!0)}function ct(ge,Ne,Ge,lt){var Qt;(Qt=e.onSliderMove)==null||Qt.call(e,lt,ge),Yt(ge,Ne,Ge),D(Le,!0)}function Tt(){var ge;D(Le,!1),(ge=e.onSliderLeave)==null||ge.call(e)}function Yt(ge,Ne,Ge){D(we,Te(ge),!0),D(te,Ne,!0),Ge&&D(ce,Ge,!0),D(ze,Ht(ge),!0)}function Ht(ge){let Ne=Jo((m()?1-ge:ge)*a());return m()?`-${Ne}`:Ne}let Ot=f(()=>p().has("TIMELINE"));var Wt=W2(),q=ae(Wt);Am(q,Jr(()=>n(Ee),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(ge,Ne)=>{var Ge=De(),lt=ae(Ge);{var Qt=di=>{Lm(di,{get time(){return n(ze)},get isMobile(){return v()},get videoEpisodes(){return n(Z)},get previewThumbsData(){return re},get progress(){return n(we)},get duration(){return a()},get isInteractive(){return oe}})},At=di=>{var ci=z2(),Li=T(ci,!0);S(ci),O(()=>he(Li,n(ze))),_(di,ci)};M(lt,di=>{R.features.timelinePreview&&re&&!m()?di(Qt):di(At,!1)})}_(ge,Ge)},$$slots:{default:!0}}));var Me=A(q,2);Ua(Me,{className:"timeline-slider",get isActiveLive(){return $()},get isMobile(){return v()},get ariaLabel(){return Ye},ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return l()},get ariaValueText(){return n(Ae)},get loadedProgress(){return y()},get filledProgress(){return n(le)},get handleProgress(){return n(le)},get videoEpisodes(){return n(Z)},onPointerDown:Fe,onHandleMove:ht,onPointerMove:ct,onPointerUp:Rt,onPointerEnter:It,onPointerLeave:Tt,get onMouseEnter(){return de},get onMouseLeave(){return We},get onDisabledClick(){return ee},get isInteractive(){return oe},get disabled(){return n(Ot)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:Rt,get ref(){return I()},set ref(ge){I(ge)}}),_(t,Wt),H(),o()}var q2={hash:"s-f",code:".timeline-ads-slider{--slider-bg:var(--timeline-slider-bg);--slider-filled-bg:var(--timeline-slider-filled-bg);--slider-handle-bg:var(--timeline-slider-handle-bg);--slider-loaded-bg:var(--timeline-slider-loaded-bg)}"};function ac(t,e){B(e,!0),Q(t,q2);let[i,o]=Be(),r=()=>w(s,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"duration",3,0),d=ye(),s=d.ui.isMobile,u=d.ui.t,m=f(()=>Jo(l())),p=f(()=>Jo(a())),v=f(()=>a()/l()),$=f(()=>u("aria_timeline_value",{position:n(p),duration:n(m)})),y=f(()=>Math.round(n(v)*100));Ua(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n($)},get filledProgress(){return n(v)},hideHandel:!0,get squareBorders(){return r()}}),H(),o()}var Q2=L("<div><!></div>"),G2=L("<div></div>"),Y2={hash:"s-c",code:".timeline.s-c{align-items:center;bottom:0;box-sizing:border-box;display:flex;min-width:86px;pointer-events:all;position:relative;width:100%}.timeline.mobile.s-c{height:16px;margin-top:6px;padding:6px 12px 7px}.withoutPadding.s-c{padding:0}.timeline-stub.s-c{min-width:20px;width:100%}.timeline-stub.mobile.s-c{height:8px}"};function qa(t,e){B(e,!0),Q(t,Y2);let[i,o]=Be(),r=()=>w(x,"$isLive$",i),a=()=>w(R,"$isMobile",i),l=()=>w(k,"$disabled",i),d=()=>w(C,"$adPosition",i),s=()=>w(I,"$adDuration",i),u=g(e,"isAds",3,!1),m=g(e,"isHidden",3,!1),p=g(e,"timelineNotAvailable",3,!1),v=g(e,"needPadding",3,!0),$=g(e,"ref",15,void 0),y=ye(),b=Vt(),x=y.state.isLive$,I=y.ads.duration,C=y.ads.position,R=y.ui.isMobile,k=se(!1),P=f(()=>!p()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var E=De(),W=ae(E);{var F=j=>{var re=Q2();let G;var oe=T(re);{var X=fe=>{ac(fe,{get position(){return d()},get duration(){return s()}})},Ie=fe=>{Mm(fe,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return n(P)},get withEpisodes(){return e.withEpisodes},get onSliderMove(){return e.onSliderMove},get onSliderPointerDown(){return e.onSliderPointerDown},get onSliderPointerUp(){return e.onSliderPointerUp},get onSliderLeave(){return e.onSliderLeave},get onSliderPointerEnter(){return e.onSliderPointerEnter},get ref(){return $()},set ref(ee){$(ee)}})};M(oe,fe=>{u()?fe(X):fe(Ie,!1)})}S(re),Rs(re,()=>Rl(m()&&b.features.usePerformanceFix,k,b.disableInvisibleComponentsTimeout)),O(fe=>G=ie(re,1,"timeline s-c",null,G,fe),[()=>({withoutPadding:!v(),mobile:a(),"out-of-flow":l()})]),_(j,re)},U=j=>{var re=G2();let G;O(oe=>G=ie(re,1,"timeline-stub s-c",null,G,oe),[()=>({mobile:a()})]),_(j,re)};M(W,j=>{n(P)?j(F):j(U,!1)})}_(t,E),H(),o()}import{getRangeAroundIndex as j2}from"@vkontakte/videoplayer-shared/es2015";import{ThinOneStat as X2}from"@vkontakte/videoplayer-statistics/es2015";var Z2=(t,e,i,o,r,a,l)=>{D(e,!0),D(i,t.clientX,!0),D(o,n(r),!0),a(l())},J2=L("<div></div>"),ew=L('<div><div class="track s-2c"></div></div>'),tw={hash:"s-2c",code:'.root.s-2c{display:flex;height:var(--preview-track-frame-height-horizontal);overflow:hidden;position:relative;width:100%}.root.is-vertical-video.s-2c,.root.vertically-rotated.s-2c{height:var(--preview-track-frame-height-vertical)}.root.s-2c:after{background-color:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.12);box-shadow:0 0 2px 0 rgba(0,0,0,.06);content:"";height:100%;margin:0 auto;pointer-events:none;width:3px;z-index:1}.track.s-2c{bottom:0;display:flex;left:0;padding:0 50%;top:0}.frame.s-2c,.track.s-2c{position:absolute}.frame.s-2c{background-position-x:calc(var(--column-index)*-1*var(--frame-width));background-position-y:calc(var(--frame-height)*-1*var(--row-index));background-size:calc(var(--frame-width)*var(--column-numbers)) calc(var(--frame-height)*var(--row-numbers));flex-shrink:0;height:var(--frame-height);pointer-events:none;transform-origin:center;width:var(--frame-width)}.vertically-rotated.s-2c .frame:where(.s-2c){transform-origin:0 0}.rotate-1.s-2c{transform:rotate(-90deg) translateX(-100%)}.rotate-2.s-2c{transform:rotate(-180deg)}.rotate-3.s-2c{transform:rotate(-270deg) translateY(-100%)}'};function Rm(t,e){B(e,!0),Q(t,tw);let[i,o]=Be(),r=()=>w(R,"$rotateAlpha",i),a=()=>w(b,"$position$",i),l=()=>w(y,"$duration$",i),d=ye(),{countPerImage:s=0,countPerRow:u=0,countTotal:m=0,links:p=[],frameHeight:v=0,frameWidth:$=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:b}=d.state,{startScrubbing:x,progressScrubbing:I,completeScrubbing:C}=d.actions.internal,R=d.ui.rotateAlpha,k=K(void 0),P=K(!1),E=K(0),W=K(0),F=K(0),U=K(0),j=f(()=>v<=$),re=f(()=>zl(r())),G=f(()=>n(j)?!n(re):n(re)),oe=114,X=65,Ie=3,fe=f(()=>n(G)?oe:X),ee=f(()=>n(j)?oe:X),be=f(()=>n(j)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),Ce=f(()=>m*n(fe)),de=K(0);He(()=>{D(U,Math.ceil(-n(F)/n(fe))-1),D(F,-n(Ce)*a()/l())});let We=()=>{C(ve(),!0,X2.ActionSeekType.RICH)},ve=()=>l()*-n(F)/n(Ce)/l(),me=!1,Z=Ae=>{if(!n(P))return!1;let Te=Ae.clientX-n(E);D(F,n(W)+Te),D(F,Math.max(Math.min(n(F),0),-n(Ce)),!0),Math.abs(Te)>1&&(me=!0),I(ve())},N=Ae=>{n(P)&&(D(P,!1),!me&&Ae&&D(F,-(Ae.offsetX-n(de)/2)),me=!1,We())},pe=()=>{n(P)&&N()},le=f(()=>s/u),ue=(Ae,Te)=>{if(Ae!==p.length-1)return u;let Fe=0,ht=Te*u;for(let Rt=1;Rt<=u;Rt++)Ae*s+Fe+ht<m&&Fe++;return Fe},Le=f(()=>Math.floor(n(U)/s)),ze=f(()=>j2(3,n(Le),p.length-1)),te=(Ae,Te,Fe)=>{let ht=s*n(fe);return Ae*ht+Te*n(fe)*u+n(de)/2-Ie/2+Fe*n(fe)},ce=f(()=>[`--row-numbers: ${n(le)}`,`--column-numbers: ${u}`,`--frame-width: ${n(ee)}px`,`--frame-height: ${n(be)}`].join(";"));var we=ew();let Ee;var Ye=T(we);Ye.__pointerdown=[Z2,P,E,W,F,x,ve],Ye.__pointermove=Z,Ye.__pointerup=N,yi(Ye,20,()=>n(ze),Ae=>Ae,(Ae,Te)=>{var Fe=De(),ht=ae(Fe);yi(ht,16,()=>Array.from({length:n(le)},(Rt,It)=>It),Rt=>Rt,(Rt,It)=>{var ct=De(),Tt=ae(ct);yi(Tt,16,()=>Array.from({length:ue(Te,It)},(Yt,Ht)=>Ht),Yt=>Yt,(Yt,Ht)=>{var Ot=J2();O((Wt,q)=>{Ke(Ot,Wt),ie(Ot,1,q,"s-2c")},[()=>`--row-index: ${It}; --column-index: ${Ht}; left: ${te(Te,It,Ht)}px; background-image: url(${p[Te]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),_(Yt,Ot)}),_(Rt,ct)}),_(Ae,Fe)}),S(Ye),S(we),tt(we,Ae=>D(k,Ae),()=>n(k)),O(Ae=>{Ee=ie(we,1,"root s-2c",null,Ee,Ae),Ke(we,n(ce)),Ke(Ye,`transform: translateX(${n(F)}px); width: ${n(Ce)}px;`)},[()=>({"is-vertical-video":!n(j),"vertically-rotated":n(re)})]),mt("mouseleave",Ye,pe),En(we,"clientWidth",Ae=>D(de,Ae)),_(t,we),H(),o()}et(["pointerdown","pointermove","pointerup"]);var iw=L('<div class="notification s-2a"><span class="description s-2a"> </span></div>'),ow={hash:"s-2a",code:".notification.s-2a{background:var(--notification-bg);border-radius:var(--notification-radius);padding:9px 14px 10px 12px}.description.s-2a{font-size:14px;line-height:18px}"};function Dm(t,e){B(e,!1),Q(t,ow);let i=340,{ui:{t:o}}=ye();Zo();var r=iw(),a=T(r),l=T(a,!0);S(a),S(r),O(d=>he(l,d),[()=>o("preview_track_close_tooltip")],mr),Ds(3,r,()=>fa,()=>({duration:i})),_(t,r),H()}import{getRangeAroundIndex as nw}from"@vkontakte/videoplayer-shared/es2015";var rw=L('<div class="preview-track-close tooltip s-28"><!></div>'),sw=L('<div class="preview-track-control s-28"><!> <div class="preview-track-close s-28"><!></div> <!></div>'),aw=L('<div class="wrapper-preview-track s-28"><!></div>'),lw=L('<div class="enriched-timeline s-28"><!> <!> <!></div>'),dw={hash:"s-28",code:".enriched-timeline.s-28{padding:var(--timeline-padding-vertical-top) var(--timeline-padding-horizontal) var(--timeline-padding-vertical-bottom);pointer-events:auto;position:relative}.preview-track-control.s-28{align-items:center;display:flex;justify-content:center;left:0;padding:0 calc(var(--timeline-padding-horizontal));pointer-events:none;position:absolute;right:0;top:calc((var(--timeline-height) + var(--preview-track-controls-top))*-1)}.preview-track-close.s-28{pointer-events:auto;position:absolute;right:calc(var(--timeline-padding-horizontal))}.preview-track-close.tooltip.s-28{bottom:32px;opacity:0;transition:opacity .2s}.preview-track-close.s-28:hover+.tooltip:where(.s-28){opacity:1}.wrapper-preview-track.s-28{box-sizing:border-box;left:0;overflow:hidden;padding:0 calc(var(--timeline-padding-horizontal));position:absolute;right:0;z-index:-1}"};function Om(t,e){B(e,!0),Q(t,dw);let[i,o]=Be(),r=()=>w(b,"$playerSize",i),a=()=>w(y,"$duration$",i),l=()=>w(x,"$previewTrackActive",i),d=()=>w(v,"$position$",i),s=()=>w($,"$isRewindableLive$",i),u=g(e,"timelineRef",15,void 0),m=ye(),p=200,{positionWithScrubbing$:v,isRewindableLive$:$,duration$:y}=m.state,{playerSize:b,previewTrackActive:x}=m.ui,{countPerImage:I=0,links:C=[],frequency:R=0}=m.actions.internal.getPreviewThumbsData()||{},k=f(()=>r().width>100),P=K(!f_()),E=()=>{n(P)&&(p_(),D(P,!1))},W=fe=>{let ee=Math.floor(a()*fe/R),be=Math.floor(ee/I),Ce=nw(3,be,C.length-1);for(let de of Ce){let We=new Image;We.src=C[de]}},F=(fe,ee)=>{W(ee),!l()&&e.onTimelineMove(fe)};var U=lw(),j=T(U);{var re=fe=>{var ee=sw(),be=T(ee);let Ce=f(()=>Jo(d()));Pm(be,{get time(){return n(Ce)}});var de=A(be,2),We=T(de);Ns(We,{onClick:()=>m.actions.internal.closePreviewTrack()}),S(de);var ve=A(de,2);{var me=Z=>{var N=rw(),pe=T(N);Dm(pe,{}),S(N),_(Z,N)};M(ve,Z=>{n(P)&&Z(me)})}S(ee),mt("mouseleave",de,E),Ds(3,ee,()=>fa,()=>({duration:p})),_(fe,ee)};M(j,fe=>{l()&&fe(re)})}var G=A(j,2);let oe=f(()=>!n(k));qa(G,{get isHidden(){return n(oe)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return s()},onSliderMove:F,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:W,get ref(){return u()},set ref(fe){u(fe)}});var X=A(G,2);{var Ie=fe=>{var ee=aw(),be=T(ee);Rm(be,{}),S(ee),O(()=>Ke(ee,`height: ${e.animatedPreviewTrackHeight}px;`)),_(fe,ee)};M(X,fe=>{e.previewTrackAvailable&&fe(Ie)})}S(U),O(()=>Ke(U,`transform: translateY(${e.animatedOffsetY}px);`)),_(t,U),H(),o()}var uw=L('<div><!> <div class="controls s-10" data-testid="player_controls"><div class="controls-left s-10"><!> <!> <!></div> <div class="controls-right s-10"></div></div></div> <!>',1),pw={hash:"s-10",code:'.wrapper-bottom.s-10{bottom:0;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;left:0;pointer-events:none;position:absolute;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);width:100%;will-change:transform;z-index:var(--controls-container-z-index)}.wrapper-bottom.s-10:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-10>:where(.s-10){pointer-events:auto}.controls.s-10{align-items:center;box-sizing:border-box;display:flex;font-size:13px;height:var(--controls-height);justify-content:space-between;padding:0 var(--controls-desktop-padding-horizontal) 4px;white-space:nowrap;width:100%}.controls-left.s-10,.controls-right.s-10{align-content:center;display:flex}.controls-left.s-10{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-10 >:not(:first-child),.controls-right.s-10 >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-10{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-10{transition:none}'};function Bm(t,e){var _a,al;B(e,!0),Q(t,pw);let[i,o]=Be(),r=()=>w(en,"$disabledControls$",i),a=()=>w(wt,"$adPlaybackState",i),l=()=>w(At,"$playbackState$",i),d=()=>w(Pi,"$currentSubtitle$",i),s=()=>w(Li,"$isEnded$",i),u=()=>w(Di,"$currentGridType$",i),m=()=>w(vo,"$isLive$",i),p=()=>w(nt,"$chromecastState$",i),v=()=>w(st,"$isPictureInPictureActive",i),$=()=>w(pi,"$pictureInPictureType$",i),y=()=>w(rt,"$availableSubtitlesList$",i),b=()=>w(Ft,"$contextMenuOpenedByKeyboard$",i),x=()=>w($t,"$showContextMenuBtn$",i),I=()=>w(ui,"$isRewindableLive$",i),C=()=>w(go,"$isActiveLive$",i),R=()=>w(Or,"$graphIsOpened$",i),k=()=>w(Mo,"$contextMenuVisible$",i),P=()=>w(at,"$isFullscreen",i),E=()=>w(Mn,"$autoplayNextEnabled",i),W=()=>w(n(Oo),"$prevButton",i),F=()=>w(n($n),"$replayButton",i),U=()=>w(n(yo),"$playButton",i),j=()=>w(n(sn),"$nextButton",i),re=()=>w(n(so),"$playPrevChapterButton",i),G=()=>w(n(xo),"$seekToInteractiveButton",i),oe=()=>w(n(Ai),"$interactiveGraphButton",i),X=()=>w(n(Fr),"$liveButton",i),Ie=()=>w(n(Bn),"$time",i),fe=()=>w(n(ys),"$episodes",i),ee=()=>w(n(Wi),"$vkLogo",i),be=()=>w(n(xs),"$volume",i),Ce=()=>w(n(ss),"$subtitles",i),de=()=>w(n(Tr),"$settings",i),We=()=>w(n(No),"$context",i),ve=()=>w(n(Ur),"$fullscreen",i),me=()=>w(n(an),"$chromecast",i),Z=()=>w(Ln,"$additionalDesktopControlPanelRightButtons$",i),N=()=>w(Ui,"$playerSize",i),pe=()=>w(Vo,"$isInteractiveTime$",i),le=()=>w(pt,"$previewTrackActive",i),ue=()=>w(Zi,"$settingsMenuVisible",i),Le=()=>w(So,"$settingButtonRef$",i),ze=()=>w(z,"$startedByKeyboard$",i),te=()=>w(di,"$isAudioAvailable$",i),ce=()=>w(Wt,"$fakeIsPlaying$",i),we=()=>w(os,"$seekToInteractiveDisabledTooltip$",i),Ee=()=>w(Si,"$isPreviewTrackHorizontallyAligned$",i),Ye=()=>w(Io,"$previewTrackAvailable",i),Ae=()=>w(ai,"$previewTrackDragInProgress",i),Te=()=>w(Zt,"$adPosition",i),Fe=()=>w(Qt,"$position$",i),ht=()=>w(bi,"$adDuration",i),Rt=()=>w(lt,"$duration$",i),It=g(e,"playerControlsWrapperRef",15,void 0),ct=g(e,"playerControlsRef",15,void 0),Tt=g(e,"isAds",3,!1),Yt=g(e,"logoTargetUrl",3,""),Ht=g(e,"isOneVideoPlaylist",3,!1),Ot=g(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:Wt}=_o(),q=ye(),Me=_o(),Ve=Vt(),xe=q.actions.internal.toggleMuted,Ue=q.actions.internal.togglePlay,Se=q.actions.internal.pause,Ct=q.actions.internal.toggleSubtitle,ge=q.actions.internal.checkFullscreenSupport,Ne=(_a=q.callbacks)==null?void 0:_a.onAudioDoesNotExistHint,Ge=(al=q.callbacks)==null?void 0:al.onAudioDisabledHint,lt=q.state.duration$,Qt=q.state.positionWithScrubbing$,At=q.state.playbackState$,di=q.state.isAudioAvailable$,ci=q.state.isAudioDisabled,Li=q.state.isEnded$,vo=q.state.isLive$,go=q.state.isActiveLive$,ui=q.state.isRewindableLive$,{isActive$:st,type$:pi}=Me.pictureInPicture$,Zi=q.ui.settingsMenu.visible$,ut=q.ui.settingsMenu.openedByBtnKeyboard$,Nt=q.ui.controls,vi=q.actions.internal.getVideoEpisodes(),nt=q.state.chromecastState$,rt=q.state.availableSubtitlesList$,Pi=q.state.currentSubtitle$,en=Nt.disabledControls$,Mo=q.ui.contextMenu.visible$,$t=q.ui.contextMenu.showContextMenuBtn$,Ft=q.ui.contextMenu.openedByBtnKeyboard$,z=q.ui.startedByKeyboard$,kt=q.ui.controlBlocks,dt=q.ui.t,bi=q.ads.duration,Zt=q.ads.position,wt=q.ads.playbackState,at=q.ui.isFullscreen,Ui=q.ui.playerSize,Di=q.ui.currentGridType$,Ln=q.ui.additionalDesktopControlPanelRightButtons$,Mn=q.ui.autoplayNextEnabled$,Ti=q.actions.internal.getVideoElement,Ji=q.actions.internal.replayInteractive,Vn=q.actions.internal.prevVideoClick,bo=q.actions.internal.nextVideoClick,xi=q.state.isInteractive,Vo=q.state.isInteractiveTime$,Ro=q.state.showInteractiveGraph,ho=q.state.showSeekToInteractive,mn=q.state.showPlayPrevChapter,is=q.state.showInteractiveTimeIndicator,Dr=q.state.playPrevChapterDisabledTooltip,os=Me.seekToInteractiveDisabledTooltip$,Or=Me.graphIsOpened$,Jn=Ve.features.interactiveResponsiveUi,ns=f(()=>r().has("EPISODE_BUTTON")),Nr=f(()=>r().has("GRAPH_BUTTON")),tn=f(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),vn=f(()=>r().has("PLAY_BUTTON")),br=f(()=>r().has("REPLAY_BUTTON")),$r=f(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),gn=()=>q.actions.internal.toggleChromecast(),er=f(()=>Tt()?a()==="playing":l()===Nm.PLAYING),yr=f(()=>d().value!=="off"),tr=f(()=>s()&&!Tt()||xi),ir=f(()=>Jn?n(tr)&&oo(u(),"m"):n(tr)),rs=f(()=>!s()||xi||Tt()),$o=f(()=>oo(u(),"m")),xr=f(()=>e.showNextPrevButtons&&oo(u(),"m")&&!Tt()&&e.nextButtonActive),zi=f(()=>e.showNextPrevButtons&&oo(u(),"m")&&!Tt()&&e.prevButtonActive),wr=f(()=>!Tt()&&!!m()),Rn=f(()=>p()!==pb.NOT_AVAILABLE&&!(v()&&$()===1)&&oo(u(),"m")&&!xi&&!Tt()),vt=f(()=>e.showAutoplayNext&&!Ht()&&oo(u(),"s")),Jt=f(()=>y().length>0&&oo(u(),"m")),Sr=f(()=>b()||x()),Br=f(()=>oo(u(),"s")&&!Tt()),Hr=f(()=>!e.logoHidden&&!Tt()),Dn=f(()=>Ve.features.fullscreen&&ge()&&(e.logoHidden||oo(u(),Jn?"xs":"s"))&&!(v()&&$()===1)&&(xi?Ot():!0)),On=f(()=>(!m()||Tt())&&!(Ve.features.interactiveHideTime&&xi)),Do=f(()=>Ro&&oo(u(),"m")),Nn=f(()=>Jn?ho&&oo(u(),"s"):ho),or=f(()=>Jn?mn&&oo(u(),"s"):mn),on=f(()=>!Tt()&&!m()&&!!(vi!=null&&vi.length)&&n($o)&&!n(ns)),hn=f(()=>!I()||!!C()),nr=f(()=>R()?dt("tooltip_interactive_graph_on"):dt("tooltip_interactive_graph_off")),_n=f(()=>k()?dt("tooltip_context_menu_close"):dt("tooltip_context_menu_open")),nn=(ft,gt)=>ft?gt&>===Nm.PAUSED?dt("tooltip_play"):"":dt("tooltip_live"),Mi=f(()=>nn(n(hn),l())),ro=f(()=>Ve.logoType==="vk_video"?dt("tooltip_vk_video_logo"):dt("tooltip_vk_logo")),rn=f(()=>n(yr)?dt("tooltip_subtitles_on"):dt("tooltip_subtitles_off")),rr=f(()=>P()?dt("tooltip_fullscreen_on"):dt("tooltip_fullscreen_off")),Cr=f(()=>p()===pb.CONNECTED?dt("tooltip_chromecast_on"):dt("tooltip_chromecast_off")),bn=f(()=>E()?dt("tooltip_autoplay_on"):dt("tooltip_autoplay_off")),sr=K(0),je=li({}),gi=li({}),Oo=f(()=>Nt.prevButton),$n=f(()=>Nt.replayButton),yo=f(()=>Nt.playButton),sn=f(()=>Nt.nextButton),so=f(()=>Nt.playPrevChapterButton),xo=f(()=>Nt.seekToInteractiveButton),Ai=f(()=>Nt.interactiveGraphButton),Fr=f(()=>Nt.liveButton),Bn=f(()=>Nt.time),ys=f(()=>Nt.episodes),Wi=f(()=>Nt.vkLogo),xs=f(()=>Nt.volume),ss=f(()=>Nt.subtitles),Tr=f(()=>Nt.settings),No=f(()=>Nt.context),Ur=f(()=>Nt.fullscreen),an=f(()=>Nt.chromecast),Vi=f(()=>({prevButton:W()?W().right-W().left:0,replayButton:F()?F().right-F().left:0,playButton:U()?U().right-U().left:0,nextButton:j()?j().right-j().left:0,playPrevChapterButton:re()?re().right-re().left:0,seekToInteractiveButton:G()?G().right-G().left:0,interactiveGraphButton:oe()?oe().right-oe().left:0,liveButton:X()?X().right-X().left:0,time:Ie()?Ie().right-Ie().left:0,episodes:fe()?fe().right-fe().left:0,vkLogo:ee()?ee().right-ee().left:0,volume:be()?be().right-be().left:0,subtitles:Ce()?Ce().right-Ce().left:0,settings:de()?de().right-de().left:0,context:We()?We().right-We().left:0,fullscreen:ve()?ve().right-ve().left:0,chromecast:me()?me().right-me().left:0,additionalButtons:Z().length?Z().reduce(ft=>[...ft,40],[]):[]})),qe=K(0);He(()=>{(!n(qe)||n(qe)<n(Vi).time)&&Et(()=>D(qe,n(Vi).time,!0))});let Lt=K(!1);He(()=>{let ft=0;n(on)&&(oo(u(),"xl")?ft=n(Vi).time:ft=60);let gt=n(Vi).prevButton+n(Vi).playButton+n(Vi).nextButton+n(Vi).seekToInteractiveButton+n(Vi).interactiveGraphButton+n(Vi).liveButton+n(qe)+ft;D(Lt,n(On)&&n(sr)>=gt,!0)});let fi=f(()=>n(Lt)&&oo(u(),"m")),Bo=fb(ql,260),wo=fb(Gu,260);He(()=>{N(),pe(),le(),Bo(Ti(),Nt,je,e.showControls),wo(Ti(),kt,gi,e.showControls)}),He(()=>{gi.bottom=It()});let So=se();He(()=>{ue(),Le()&&Et(()=>Ol(Le(),ue(),ut))});let Ki;He(()=>{ze(),Et(()=>qu(z,ze(),Ki))});function Ho(){da({isAudioDisabled:ci,isAudioAvailable:te(),isAds:Tt(),audioIsNotExistHintCallback:Ne,audioDisabledHintCallback:Ge})&&xe()}let Hn=xi?Ji:Ue,Ir=f(()=>ce()!==null),Co=f(()=>n(Ir)?ce():n(er)),ao=f(()=>n(Co)?dt("tooltip_pause"):dt("tooltip_play")),yn=dt("tooltip_episodes"),Fo=f(()=>{var ft,gt,$i,Wo;return n(zi)?{id:"prevButton",type:"desktop-control-panel-left",weight:zs.prevButton,buttonComponent:Wa,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:Vn.bind(null,!0)},tooltipEnabled:!((gt=(ft=q.callbacks)==null?void 0:ft.uiInfo)!=null&>.onPrevButtonMouseEnter)&&!((Wo=($i=q.callbacks)==null?void 0:$i.uiInfo)!=null&&Wo.onPrevButtonMouseLeave),mouseEnter:()=>{var Qi,_i,Oi;(Oi=(_i=(Qi=q.callbacks)==null?void 0:Qi.uiInfo)==null?void 0:_i.onPrevButtonMouseEnter)==null||Oi.call(_i,Xn(Ti(),je,"prevButton",e.showControls))},mouseLeave:()=>{var Qi,_i,Oi;(Oi=(_i=(Qi=q.callbacks)==null?void 0:Qi.uiInfo)==null?void 0:_i.onPrevButtonMouseLeave)==null||Oi.call(_i,Xn(Ti(),je,"prevButton",e.showControls))},tooltipText:dt("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),Fn=f(()=>n(ir)?{id:"replayButton",type:"desktop-control-panel-left",weight:zs.replayButton,buttonComponent:Ql,buttonComponentProps:{disabled:n(br),click:Hn},tooltipText:dt("tooltip_restart"),disabled:n(br)}:void 0),zr=f(()=>n(rs)?{id:"playButton",type:"desktop-control-panel-left",weight:zs.playButton,buttonComponent:Gl,buttonComponentProps:{disabled:n(vn),isPlaying:n(er),click:Ue},tooltipText:n(ao),disabled:n(vn)}:void 0),Wr=f(()=>{var ft,gt,$i,Wo;return n(xr)?{id:"nextButton",type:"desktop-control-panel-left",weight:zs.nextButton,buttonComponent:Wa,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:bo.bind(null,!0)},tooltipEnabled:!((gt=(ft=q.callbacks)==null?void 0:ft.uiInfo)!=null&>.onNextButtonMouseEnter)&&!((Wo=($i=q.callbacks)==null?void 0:$i.uiInfo)!=null&&Wo.onNextButtonMouseLeave),mouseEnter:()=>{var Qi,_i,Oi;(Oi=(_i=(Qi=q.callbacks)==null?void 0:Qi.uiInfo)==null?void 0:_i.onNextButtonMouseEnter)==null||Oi.call(_i,Xn(Ti(),je,"nextButton",e.showControls))},mouseLeave:()=>{var Qi,_i,Oi;(Oi=(_i=(Qi=q.callbacks)==null?void 0:Qi.uiInfo)==null?void 0:_i.onNextButtonMouseLeave)==null||Oi.call(_i,Xn(Ti(),je,"nextButton",e.showControls))},tooltipText:dt("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Un=f(()=>xi&&n(or)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:zs.playPrevChapterButton,buttonComponent:ic,buttonComponentProps:{disabled:n($r),click:e.playPrevChapter},tooltipText:dt("tooltip_interactive_go_back"),disabledTooltipContent:dt(Dr),disabled:n($r)}:void 0),it=f(()=>xi&&n(Nn)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:zs.seekToInteractiveButton,buttonComponent:nc,buttonComponentProps:{disabled:n(tn),click:e.seekToInteractive},tooltipText:dt("tooltip_interactive_seek"),disabled:n(tn),disabledTooltipContent:dt(we())}:void 0),jt=f(()=>xi&&n(Do)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:zs.interactiveGraphButton,buttonComponent:rc,buttonComponentProps:{disabled:n(Nr),click:Or.toggle,graphIsOpened:R()},tooltipText:n(nr)}:void 0),wi=f(()=>n(wr)?{id:"liveButton",type:"desktop-control-panel-left",weight:zs.liveButton,buttonComponent:sc,buttonComponentProps:{isLiveActive:n(hn),ariaLabel:n(Mi)},tooltipText:n(Mi),disabled:n(hn)&&l()===Nm.PLAYING}:void 0),To=f(()=>[n(Fo),n(Fn),n(zr),n(Wr),n(Un),n(it),n(jt),n(wi)].filter(ft=>!!ft).sort(Na)),xn=f(()=>n(Hr)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Ks.vkLogo,buttonComponent:qd,buttonComponentProps:{targetUrl:Yt(),logoClickable:e.logoClickable,click:Se},tooltipText:n(ro),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),zn=f(()=>n(vt)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Ks.autoplayNext,buttonComponent:oc,tooltipText:n(bn)}:void 0),Uo=f(()=>({id:"volume",type:"desktop-control-panel-right",weight:Ks.volume,buttonComponent:am,buttonComponentProps:{click:Ho,isAds:Tt()}})),ar=f(()=>n(Jt)?{id:"subtitles",type:"desktop-control-panel-right",weight:Ks.subtitles,buttonComponent:im,buttonComponentProps:{isSubtitlesEnabled:n(yr),click:Ct},tooltipText:n(rn)}:void 0),as=f(()=>n(Br)?{id:"settings",type:"desktop-control-panel-right",weight:Ks.settings,buttonComponent:Fl,buttonComponentProps:{ref$:So},tooltipText:ue()?void 0:dt("tooltip_settings_off")}:void 0),Er=f(()=>Ve.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Ks.context,buttonComponent:xm,buttonComponentProps:{ariaLabel:dt("aria_label_context_menu")},className:n(Sr)?"":"out-of-view",tooltipText:n(_n)}:void 0),ws=f(()=>n(Dn)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Ks.fullscreen,buttonComponent:Kd,buttonComponentProps:{isFullscreen:P(),click:e.toggleFullscreen},tooltipText:n(rr)}:void 0),qs=f(()=>n(Rn)?{id:"chromecast",type:"desktop-control-panel-right",weight:Ks.chromecast,buttonComponent:Gd,buttonComponentProps:{state:p(),click:gn},tooltipText:n(Cr)}:void 0),va=f(()=>[n(xn),n(zn),n(Uo),n(ar),n(as),n(Er),n(ws),n(qs),...Z()].filter(ft=>!!ft).sort(Na)),pt=q.ui.previewTrackActive,ai=q.ui.previewTrackDragInProgress,Io=q.ui.previewTrackAvailable,Si=q.ui.isPreviewTrackHorizontallyAligned,eo=f(()=>cb({onPreviewTrackOpened:q.actions.internal.previewTrackOpened,getTimelineRef:()=>je.timeline,isHorizontal:Ee()})),Ss=f(()=>n(eo).progressBarY),Cs=f(()=>n(eo).controlsY),Ts=f(()=>n(eo).onPointerDown),qi=f(()=>n(eo).onPointerMove),ki=f(()=>n(eo).onPointerUp),_e=f(()=>n(eo).calculatedHeight),St=f(()=>n(eo).closePreviewTrack);He(()=>{le()||n(St)()});let Xt;Mt(()=>()=>Xt&&clearTimeout(Xt));let ei=ft=>{le()||!Ye()||(n(Ts)(ft),Xt=setTimeout(()=>{q.actions.internal.previewTrackDragStarted()},200))},zo=()=>{le()||n(ki)(),Xt&&clearTimeout(Xt),Ae()&&q.actions.internal.previewTrackDragFinished()},lo=ft=>{n(qi)(ft)},co=-(parseInt("24")/2+4);var ls=uw(),wn=ae(ls);let Is;var ga=T(wn);{var ha=ft=>{let gt=f(()=>n(Ss)()),$i=f(()=>n(_e)());Om(ft,{get animatedOffsetY(){return n(gt)},get animatedPreviewTrackHeight(){return n($i)},get canRewindLive(){return e.canRewindLive},get isAds(){return Tt()},onTimelineMove:lo,onTimelinePointerDown:ei,onTimelinePointerUp:zo,get previewTrackAvailable(){return Ye()},get timelineRef(){return je.timeline},set timelineRef(Wo){je.timeline=Wo}})};M(ga,ft=>{e.showControls&&ft(ha)})}var Kr=A(ga,2),ds=T(Kr),lr=T(ds);yi(lr,17,()=>n(To),ft=>ft.id,(ft,gt)=>{Qu(ft,{get buttonComponent(){return n(gt).buttonComponent},get buttonComponentProps(){return n(gt).buttonComponentProps},get tooltipText(){return n(gt).tooltipText},get disabledTooltipContent(){return n(gt).disabledTooltipContent},get disabled(){return n(gt).disabled},get className(){return n(gt).className},get tooltipEnabled(){return n(gt).tooltipEnabled},get mouseEnter(){return n(gt).mouseEnter},get mouseLeave(){return n(gt).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return je[n(gt).id]},set ref($i){je[n(gt).id]=$i}})});var il=A(lr,2);{var ol=ft=>{let gt=f(()=>!e.showControls),$i=f(()=>Tt()?Te():Fe()),Wo=f(()=>Tt()?ht():Rt());zd(ft,{get isHidden(){return n(gt)},isMobile:!1,get showDuration(){return n(fi)},get position(){return n($i)},get duration(){return n(Wo)},get ref(){return je.time},set ref(Qi){je.time=Qi}})};M(il,ft=>{n(On)&&ft(ol)})}var qr=A(il,2);let nl=f(()=>!n(on));Lo(qr,{className:"w-max",get disabled(){return n(nl)},get tooltipContent(){return yn},get tooltipVisible(){return e.showControls},tooltipPlacement:"top-left",get initialTranslateXPx(){return co},get ref(){return je.episodes},set ref(ft){je.episodes=ft},children:(ft,gt)=>{var $i=De(),Wo=ae($i);{var Qi=_i=>{Yd(_i,{get position(){return Fe()},get duration(){return Rt()},get timeCodes(){return vi}})};M(Wo,_i=>{n(on)&&_i(Qi)})}_(ft,$i)},$$slots:{default:!0}}),S(ds);var rl=A(ds,2);yi(rl,21,()=>n(va),ft=>ft.id,(ft,gt)=>{var $i=De(),Wo=ae($i);{var Qi=Oi=>{Qu(Oi,{get buttonComponent(){return n(gt).buttonComponent},get buttonComponentProps(){return n(gt).buttonComponentProps},get tooltipText(){return n(gt).tooltipText},get disabledTooltipContent(){return n(gt).disabledTooltipContent},get disabled(){return n(gt).disabled},get className(){return n(gt).className},get tooltipVisible(){return e.showControls},get ref(){return je[n(gt).id]},set ref(ba){je[n(gt).id]=ba}})},_i=Oi=>{let ba=f(()=>!!n(gt).disabled);Tm(Oi,{get id(){return n(gt).id},get testId(){return n(gt).testId},get icon(){return n(gt).icon},get ariaLabel(){return n(gt).ariaLabel},get tooltipText(){return n(gt).tooltipText},get disabledTooltipContent(){return n(gt).disabledTooltipContent},get disabled(){return n(ba)},get onClick(){return n(gt).onClick},get disableMouseupTooltipShow(){return n(gt).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return je[n(gt).id]},set ref(ll){je[n(gt).id]=ll}})};M(Wo,Oi=>{ab(n(gt))?Oi(Qi):Oi(_i,!1)})}_(ft,$i)}),S(rl),S(Kr),tt(Kr,ft=>ct(ft),()=>ct()),S(wn),tt(wn,ft=>It(ft),()=>It());var sl=A(wn,2);{var Xl=ft=>{ec(ft,{get ref(){return je.interactiveTimeIndicator},set ref(gt){je.interactiveTimeIndicator=gt}})};M(sl,ft=>{is&&ft(Xl)})}O((ft,gt)=>{Is=ie(wn,1,"wrapper-bottom s-10",null,Is,ft),Ke(wn,`transform: ${e.showControls?"translateY(0)":"translateY(100%)"}`),Ke(Kr,gt),Kr.inert=le()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||Ae()}),()=>`transform: translateY(${n(Cs)()}px);`]),En(ds,"clientWidth",ft=>D(sr,ft)),_(t,ls),H(),o()}import{ChromecastState as vb,PlaybackState as gb}from"@vkontakte/videoplayer-core/es2015";import{noop as mb}from"@vkontakte/videoplayer-shared/es2015";var fw=L('<div class="icon icon-error-stub s-1z"><div class="inner s-1z"></div></div>'),mw=L('<img class="icon s-1z" aria-hidden="true"/>'),vw={hash:"s-1z",code:".icon.s-1z{height:24px!important;width:24px!important}.inner.s-1z{background-color:var(--white);height:16px;width:16px}"};function Hm(t,e){Q(t,vw);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,mb),r=f(()=>o()===mb),a=f(()=>n(r)||i()),l=K(!1),d=()=>{D(l,!0)},s=f(()=>n(r)?"btn-full-opacity":"");zt(t,{get className(){return n(s)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(a)},get testId(){return e.testId},children:(u,m)=>{var p=De(),v=ae(p);{var $=b=>{var x=fw();_(b,x)},y=b=>{var x=mw();O(()=>Oe(x,"src",e.iconUrl)),mt("error",x,d),La(x),_(b,x)};M(v,b=>{n(l)?b($):b(y,!1)})}_(u,p)},$$slots:{default:!0}})}var gw=ke('<path d="M8.7 8.1 5.3 4.72A1 1 0 0 1 6.72 3.3L20.7 17.29a1 1 0 0 1-1.41 1.41L16 15.41V20a1 1 0 0 1-1 1c-.64 0-1.26-.25-1.72-.7L7.79 15H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2.77zm2.88-2.76 1.7-1.65A2.5 2.5 0 0 1 15 3a1 1 0 0 1 1 1v5.76z"></path>');function Fm(t){Ze(t,{testId:"muted-icon",children:(e,i)=>{var o=gw();_(e,o)},$$slots:{default:!0}})}import{noop as hw}from"@vkontakte/videoplayer-shared/es2015";function Yu(t,e){B(e,!0);let i=g(e,"muted",3,!1),o=g(e,"click",3,hw),r=g(e,"ref",15,void 0),l=ye().ui.t,d=f(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),s=f(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");zt(t,{get testId(){return n(s)},get click(){return o()},get ariaLabel(){return n(d)},role:"button",get ref(){return r()},set ref(u){r(u)},children:(u,m)=>{var p=De(),v=ae(p);{var $=b=>{Fm(b,{})},y=b=>{ua(b,{get size(){return"24"}})};M(v,b=>{i()?b($):b(y,!1)})}_(u,p)},$$slots:{default:!0}}),H()}var _w=ke('<path d="M11.64 12.37 9.07 9.8h1.03a.9.9 0 1 0 0-1.8H6.9a.9.9 0 0 0-.9.9v3.2a.9.9 0 0 0 1.8 0v-1.02l2.53 2.52.13.14a.9.9 0 0 0 1.28-1.28z"></path>'),bw=ke('<path d="m6.36 9.63 2.57 2.57H7.9a.9.9 0 1 0 0 1.8h3.2a.9.9 0 0 0 .9-.9V9.9a.9.9 0 0 0-1.8 0v1.02L7.67 8.4l-.13-.14a.9.9 0 0 0-1.28 1.28z"></path>'),$w=ke('<path d="M7.66 4h6.68q1.2-.01 2 .04.83.06 1.53.38a4 4 0 0 1 1.7 1.7c.24.48.34.98.39 1.54q.05.8.04 2v1.44a.9.9 0 0 1-1.8 0V9.7c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2 2 0 0 0-.92-.92 2 2 0 0 0-.85-.2c-.46-.03-1.04-.03-1.9-.03H7.7c-.85 0-1.44 0-1.9.04-.44.03-.68.1-.85.19a2 2 0 0 0-.92.92c-.09.17-.16.4-.2.85-.03.46-.03 1.05-.03 1.9v2.65c0 .85 0 1.44.04 1.9.03.44.1.68.19.85a2 2 0 0 0 .92.92c.17.08.4.15.85.19.46.03 1.04.04 1.9.04h2.4a.9.9 0 0 1 0 1.8H7.66q-1.2.01-2-.05a4 4 0 0 1-1.53-.38 4 4 0 0 1-1.7-1.7 4 4 0 0 1-.39-1.53q-.05-.8-.04-2V9.65q-.01-1.2.04-2c.05-.56.15-1.06.39-1.53a4 4 0 0 1 1.7-1.7c.47-.24.97-.34 1.53-.39q.8-.05 2-.04M13 16.8c0-.98 0-1.47.19-1.84a2 2 0 0 1 .77-.77c.37-.19.86-.19 1.84-.19h3.4c.98 0 1.47 0 1.85.19q.5.27.76.77c.19.37.19.86.19 1.84v.4c0 .98 0 1.47-.19 1.85a2 2 0 0 1-.77.76c-.37.19-.86.19-1.84.19h-3.4c-.98 0-1.47 0-1.85-.19a2 2 0 0 1-.76-.76c-.19-.38-.19-.87-.19-1.85z"></path><!>',1);function Um(t,e){let i=g(e,"isActive",3,!1),o=f(()=>i()?"pip-icon--active":"pip-icon");Ze(t,{get testId(){return n(o)},children:(r,a)=>{var l=$w(),d=A(ae(l));{var s=m=>{var p=_w();_(m,p)},u=m=>{var p=bw();_(m,p)};M(d,m=>{i()?m(s):m(u,!1)})}_(r,l)},$$slots:{default:!0}})}import{noop as yw}from"@vkontakte/videoplayer-shared/es2015";function zm(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isPictureInPictureActive",3,!1),r=g(e,"click",3,yw),a=Y("menu_pip");zt(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return r()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{Um(l,{get isActive(){return o()}})},$$slots:{default:!0}}),H()}import{debounceFn as hb}from"@vkontakte/videoplayer-shared/es2015";var xw=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},ww=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},Sw=L("<div><!></div>"),Cw=L("<div><!></div>"),Tw=L("<div><!></div>"),Iw=L("<!> <!> <!>",1),Ew=L("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),Pw=L('<div class="wrapper-middle s-z"><!></div>'),Aw=L("<div><!></div> <!> <div><!></div>",1),kw=L('<div aria-hidden="true">·</div> <!>',1),Lw=L('<!> <!> <div><div><div class="controls mobile s-z" data-testid="bottom-controls"><div class="controls-group contain s-z"><!> <!> <!> <!></div> <div class="controls-group s-z"><!> <!> <!></div></div> <!></div></div> <!>',1),Mw={hash:"s-z",code:".wrapper-bottom.s-z{background:var(--controls-gradient);bottom:0;box-sizing:border-box;display:flex;flex-direction:column;height:var(--controls-gradient-height);justify-content:flex-end;left:0;padding:0 4px 8px;pointer-events:none;position:absolute;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.wrapper-bottom.s-z>:where(.s-z){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-z{height:9px;padding:0 4px 4px}.wrapper-middle.s-z{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-z,.wrapper-top-right.s-z{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-z{right:8px;top:4px}.wrapper-top-left.s-z{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-z,.wrapper-middle-left-second.s-z,.wrapper-middle-right.s-z{align-items:center;background-color:rgba(0,0,0,.56);border-radius:12px;display:flex;height:44px;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}.wrapper-middle-left.s-z{left:12px}.wrapper-middle-left-second.s-z{left:64px}.wrapper-middle-right.s-z{right:12px}.controls.s-z{align-items:center;box-sizing:border-box;font-size:13px;height:var(--controls-height);justify-content:space-between;padding:0 4px;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);white-space:nowrap;width:100%;will-change:transform}.controls.s-z,.controls-group.s-z{display:flex}.controls-group.contain.s-z{min-width:0}.controls-group.s-z >:not(:first-child){margin-left:8px}.hidden.s-z{opacity:0;visibility:hidden}.controls-hidden.s-z{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-z{transition:none}.overlay-mobile.s-z{background-color:rgba(0,0,0,.3);height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:opacity var(--controls-transition-duration);width:100%}@media screen and (orientation:portrait){.wrapper-top-left.fullscreen.s-z,.wrapper-top-right.fullscreen.s-z{top:16px}.controls-wrapper.fullscreen.s-z{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-z{left:44px;top:12px}.wrapper-top-right.fullscreen.s-z{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-z{left:44px}.wrapper-middle-left-second.fullscreen.s-z{left:96px}.wrapper-middle-right.fullscreen.s-z{right:44px}.controls-wrapper.fullscreen.s-z{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function Wm(t,e){var an,Vi;B(e,!0),Q(t,Mw);let[i,o]=Be(),r=()=>w(Di,"$seekToInteractiveDisabledTooltip$",i),a=()=>w(Nt,"$disabledControls$",i),l=()=>w(Ht,"$playbackState$",i),d=()=>w(en,"$adPlaybackState",i),s=()=>w(q,"$isEnded$",i),u=()=>w($t,"$playerSize",i),m=()=>w(Ct,"$scrubbingInProgress",i),p=()=>w(Zi,"$chromecastState$",i),v=()=>w(Ne,"$isPictureInPictureActive",i),$=()=>w(Ge,"$pictureInPictureType$",i),y=()=>w(ge,"$mobileNotReportControlHidden$",i),b=()=>w(ui,"$chromecastHidden",i),x=()=>w(ct,"$playerPhase",i),I=()=>w(vo,"$pipHidden",i),C=()=>w(nt,"$currentGridType$",i),R=()=>w(ci,"$vkLogoHidden",i),k=()=>w(di,"$volumeHidden",i),P=()=>w(Me,"$isLive$",i),E=()=>w(lt,"$settingsMenuVisible",i),W=()=>w(Se,"$isRewindableLive$",i),F=()=>w(Ue,"$isActiveLive$",i),U=()=>w(Ot,"$isAudioAvailable$",i),j=()=>w(xe,"$muted$",i),re=()=>w(Ve,"$volume$",i),G=()=>w(bi,"$isInteractiveTime$",i),oe=()=>w(or,"$settingButtonRef$",i),X=()=>w(vi,"$startedByKeyboard$",i),Ie=()=>w(Mo,"$isFullscreen",i),fe=()=>w(Ft,"$additionalButtons$",i),ee=()=>w(Li,"$autoplayNextToggleHidden",i),be=()=>w(ut,"$crashed$",i),Ce=()=>w(go,"$settingsHidden",i),de=()=>w(Ln,"$graphIsOpened$",i),We=()=>w(Pi,"$adPosition",i),ve=()=>w(rt,"$adDuration",i),me=()=>w(Yt,"$position$",i),Z=()=>w(Tt,"$duration$",i),N=g(e,"playerControlsWrapperRef",15,void 0),pe=g(e,"playerControlsRef",15,void 0),le=g(e,"isAds",3,!1),ue=g(e,"logoTargetUrl",3,""),Le=g(e,"isOneVideoPlaylist",3,!1),ze=g(e,"customFullscreenSupported",3,!0),te=ye(),ce=_o(),we=Vt(),Ee=te.actions.internal.toggleMuted,Ye=te.actions.internal.togglePlay,Ae=te.actions.internal.pause,Te=te.actions.internal.prevVideoClick,Fe=te.actions.internal.nextVideoClick,ht=te.actions.internal.checkFullscreenSupport,Rt=(an=te.callbacks)==null?void 0:an.onAudioDoesNotExistHint,It=(Vi=te.callbacks)==null?void 0:Vi.onAudioDisabledHint,ct=te.playerPhase,Tt=te.state.duration$,Yt=te.state.positionWithScrubbing$,Ht=te.state.playbackState$,Ot=te.state.isAudioAvailable$,Wt=te.state.isAudioDisabled,q=te.state.isEnded$,Me=te.state.isLive$,Ve=te.state.volume$,xe=te.state.muted$,Ue=te.state.isActiveLive$,Se=te.state.isRewindableLive$,Ct=te.ui.scrubbingInProgress,ge=te.ui.mobileNotReportControlHidden$,{isActive$:Ne,type$:Ge}=ce.pictureInPicture$,lt=te.ui.settingsMenu.visible$,Qt=te.ui.settingsMenu.openedByBtnKeyboard$,At=te.ui.controls,{volume:di,vkLogo:ci,autoplayNextToggle:Li,pip:vo,settings:go,chromecast:ui}=te.ui.hiddenControls,st=te.actions.internal.getVideoEpisodes(),pi=te.webApi.pictureInPictureApi,Zi=te.state.chromecastState$,ut=te.state.crashed$,Nt=At.disabledControls$,vi=te.ui.startedByKeyboard$,nt=te.ui.currentGridType$,rt=te.ads.duration,Pi=te.ads.position,en=te.ads.playbackState,Mo=te.ui.isFullscreen,$t=te.ui.playerSize,Ft=te.ui.additionalButtonsDeprecated$,z=te.actions.internal.getVideoElement,kt=te.actions.internal.replayInteractive,dt=te.state.isInteractive,bi=te.state.isInteractiveTime$,Zt=te.state.showInteractiveGraph,wt=te.state.showSeekToInteractive,at=te.state.showPlayPrevChapter,Ui=te.state.showInteractiveTimeIndicator,Di=ce.seekToInteractiveDisabledTooltip$,Ln=ce.graphIsOpened$,Mn=te.ui.controlBlocks,Ti=f(()=>Y(te.state.playPrevChapterDisabledTooltip)),Ji=f(()=>Y(r())),Vn=f(()=>a().has("EPISODE_BUTTON")),bo=f(()=>a().has("GRAPH_BUTTON")),xi=f(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),Vo=f(()=>a().has("PLAY_BUTTON")),Ro=f(()=>a().has("REPLAY_BUTTON")),ho=f(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),mn=f(()=>l()===gb.PLAYING),is=f(()=>d()==="paused"),Dr=f(()=>s()&&!le()&&!dt),os=f(()=>!s()||le()),Or=f(()=>e.showNextPrevButtons&&!le()&&e.prevButtonActive),Jn=f(()=>e.showNextPrevButtons&&!le()&&e.nextButtonActive),ns=f(()=>u().width>300),Nr=f(()=>u().width>400),tn=f(m),vn=f(()=>p()!==vb.NOT_AVAILABLE&&!(v()&&$()===1)&&!y()&&!dt&&!b()),br=f(()=>x()==="LiveWaitingStart"),$r=f(()=>!!pi&&p()!==vb.CONNECTED&&!y()&&($()===1&&n(br)||!n(br))&&!n(tn)&&!dt&&!I()),gn=K(!1);Mt(()=>{let qe=pi==null?void 0:pi.info.isActive$.subscribe(Lt=>D(gn,Lt,!0));return()=>qe==null?void 0:qe.unsubscribe()});let er=f(()=>!n(tn)&&oo(C(),"s")),yr=f(()=>!e.logoHidden&&u().width>350&&!R()),tr=f(()=>we.features.fullscreen&&ht()&&!(v()&&$()===1)&&(dt?ze():!0)&&!n(tn)&&!n(gn)),ir=f(()=>!k()&&!n(tn)),rs=f(()=>(!P()||le())&&u().width>260&&!n(tn)&&!(we.features.interactiveHideTime&&dt)),$o=f(()=>E()||e.showControls),xr=f(()=>!le()&&!P()&&!!(st!=null&&st.length)&&n(ns)&&!n(Vn)&&!n(tn)),zi=f(()=>!W()||!!F()),wr=f(()=>Zt&&oo(C(),"m")),Rn=f(()=>!U()||j()||re()===0),vt=li({}),Jt=li({}),Sr=hb(ql,260),Br=hb(Gu,260);He(()=>{u(),G(),Sr(z(),At,vt,e.showControls),Br(z(),Mn,Jt,e.showControls)});let Hr=()=>te.actions.internal.toggleChromecast();function Dn(){return _t(this,null,function*(){pi!=null&&pi.isActive()?yield pi==null?void 0:pi.exit():yield pi==null?void 0:pi.request()})}function On(){da({isAudioDisabled:Wt,audioDisabledHintCallback:It,isAudioAvailable:U(),audioIsNotExistHintCallback:Rt,isAds:le()})&&Ee()}let Do=K(""),Nn=(qe,Lt)=>{if(!qe){D(Do,Y("tooltip_live"),!0);return}Lt&&Lt===gb.PAUSED&&D(Do,Y("tooltip_play"),!0)};He(()=>{Nn(n(zi),l())});let or=se();He(()=>{oe()&&Ol(oe(),E(),Qt)}),He(()=>{qu(vi,X(),vt.playButton)});var on=Lw(),hn=ae(on);{var nr=qe=>{var Lt=Ew(),fi=ae(Lt);let Bo;var wo=A(fi,2);let So;tt(wo,pt=>Jt.topLeft=pt,()=>Jt==null?void 0:Jt.topLeft);var Ki=A(wo,2);let Ho;var Hn=T(Ki);yi(Hn,1,fe,({iconUrl:pt,ariaLabel:ai,testId:Io,onClick:Si,tooltip:eo})=>pt,(pt,ai)=>{let Io=()=>n(ai).iconUrl,Si=()=>n(ai).ariaLabel,eo=()=>n(ai).testId,Ss=()=>n(ai).onClick,Cs=()=>n(ai).tooltip,Ts=f(()=>{var qi;return(qi=Si())!=null?qi:Cs()});Hm(pt,{get iconUrl(){return Io()},get ariaLabel(){return n(Ts)},get testId(){return eo()},get onClick(){return Ss()}})});var Ir=A(Hn,2);{var Co=pt=>{oc(pt,{get ref(){return vt.autoplayNextToggle},set ref(ai){vt.autoplayNextToggle=ai}})};M(Ir,pt=>{e.showAutoplayNext&&!Le()&&!ee()&&pt(Co)})}var ao=A(Ir,2);{var yn=pt=>{Gd(pt,{isMobile:!0,click:Hr,get state(){return p()},get ref(){return vt.chromecast},set ref(ai){vt.chromecast=ai}})};M(ao,pt=>{n(vn)&&pt(yn)})}var Fo=A(ao,2);{var Fn=pt=>{zm(pt,{click:Dn,get isPictureInPictureActive(){return v()},get ref(){return vt.pip},set ref(ai){vt.pip=ai}})};M(Fo,pt=>{n($r)&&pt(Fn)})}var zr=A(Fo,2);{var Wr=pt=>{Fl(pt,{get ref$(){return or}})};M(zr,pt=>{be()&&!Ce()&&pt(Wr)})}var Un=A(zr,2);{var it=pt=>{qd(pt,{get click(){return Ae},get targetUrl(){return ue()},get logoClickable(){return e.logoClickable},get ref(){return vt.vkLogo},set ref(ai){vt.vkLogo=ai}})};M(Un,pt=>{n(yr)&&pt(it)})}S(Ki),tt(Ki,pt=>Jt.topRight=pt,()=>Jt==null?void 0:Jt.topRight);var jt=A(Ki,2);let wi;var To=T(jt);{var xn=pt=>{let ai=f(()=>Te.bind(null,!0));Wa(pt,{get click(){return n(ai)},type:"prev",isMobile:!0,get ref(){return vt.prevButton},set ref(Io){vt.prevButton=Io}})};M(To,pt=>{n(Or)&&pt(xn)})}var zn=A(To,2);{var Uo=pt=>{Gl(pt,{get disabled(){return n(Vo)},get click(){return Ye},isMobile:!0,get isPlaying(){return n(mn)},get ref(){return vt.playButton},set ref(ai){vt.playButton=ai}})};M(zn,pt=>{n(os)&&pt(Uo)})}var ar=A(zn,2);{var as=pt=>{Ql(pt,{get disabled(){return n(Ro)},get click(){return Ye},isMobile:!0,get ref(){return vt.replayButton},set ref(ai){vt.replayButton=ai}})};M(ar,pt=>{n(Dr)&&pt(as)})}var Er=A(ar,2);{var ws=pt=>{let ai=f(()=>Fe.bind(null,!0));Wa(pt,{get click(){return n(ai)},type:"next",isMobile:!0,get ref(){return vt.nextButton},set ref(Io){vt.nextButton=Io}})};M(Er,pt=>{n(Jn)&&pt(ws)})}S(jt),tt(jt,pt=>Jt.middle=pt,()=>Jt==null?void 0:Jt.middle);var qs=A(jt,2);{var va=pt=>{var ai=Iw(),Io=ae(ai);{var Si=qi=>{var ki=Sw();let _e;ki.__click=[xw,ho,e,Ti];var St=T(ki);let Xt=f(()=>!e.showControls);ic(St,{get hidden(){return n(Xt)},get disabled(){return n(ho)},get click(){return e.playPrevChapter},get ref(){return vt.playPrevChapterButton},set ref(ei){vt.playPrevChapterButton=ei}}),S(ki),O(ei=>_e=ie(ki,1,"wrapper-middle-left s-z",null,_e,ei),[()=>({fullscreen:Ie(),hidden:!e.showControls})]),_(qi,ki)};M(Io,qi=>{at&&qi(Si)})}var eo=A(Io,2);{var Ss=qi=>{var ki=Cw();let _e;var St=T(ki);let Xt=f(()=>!e.showControls&&!de());rc(St,{get hidden(){return n(Xt)},get disabled(){return n(bo)},get click(){return Ln.toggle},get graphIsOpened(){return de()},get ref(){return vt.interactiveGraphButton},set ref(ei){vt.interactiveGraphButton=ei}}),S(ki),O(ei=>_e=ie(ki,1,$d(at?"wrapper-middle-left-second":"wrapper-middle-left"),"s-z",_e,ei),[()=>({fullscreen:Ie(),hidden:!e.showControls&&!de()})]),_(qi,ki)};M(eo,qi=>{n(wr)&&qi(Ss)})}var Cs=A(eo,2);{var Ts=qi=>{var ki=Tw();let _e;ki.__click=[ww,xi,e,Ji];var St=T(ki);let Xt=f(()=>!e.showControls);nc(St,{get hidden(){return n(Xt)},get disabled(){return n(xi)},get click(){return e.seekToInteractive},get ref(){return vt.seekToInteractiveButton},set ref(ei){vt.seekToInteractiveButton=ei}}),S(ki),O(ei=>_e=ie(ki,1,"wrapper-middle-right s-z",null,_e,ei),[()=>({fullscreen:Ie(),hidden:!e.showControls})]),_(qi,ki)};M(Cs,qi=>{wt&&qi(Ts)})}_(pt,ai)};M(qs,pt=>{dt&&!m()&&pt(va)})}O((pt,ai,Io,Si)=>{Bo=ie(fi,1,"overlay-mobile s-z",null,Bo,pt),So=ie(wo,1,"wrapper-top-left s-z",null,So,ai),Ho=ie(Ki,1,"wrapper-top-right s-z",null,Ho,Io),wi=ie(jt,1,"wrapper-middle s-z",null,wi,Si)},[()=>({hidden:!n($o)}),()=>({hidden:!e.showControls,fullscreen:Ie()}),()=>({hidden:!e.showControls&&!y(),fullscreen:Ie()}),()=>({hidden:!e.showControls||m()||e.endScreenShown&&e.showNextPrevButtons})]),_(qe,Lt)};M(hn,qe=>{le()||qe(nr)})}var _n=A(hn,2);{var nn=qe=>{var Lt=Aw(),fi=ae(Lt);let Bo;var wo=T(fi);Yu(wo,{get muted(){return j()},click:On,get ref(){return vt.volume},set ref(Co){vt.volume=Co}}),S(fi);var So=A(fi,2);{var Ki=Co=>{var ao=Pw(),yn=T(ao);let Fo=f(()=>!n(is));Gl(yn,{get disabled(){return n(Vo)},get click(){return Ye},isMobile:!0,get isPlaying(){return n(Fo)},get ref(){return vt.playButton},set ref(Fn){vt.playButton=Fn}}),S(ao),_(Co,ao)};M(So,Co=>{n(is)&&Co(Ki)})}var Ho=A(So,2);let Hn;var Ir=T(Ho);ac(Ir,{get position(){return We()},get duration(){return ve()}}),S(Ho),O((Co,ao)=>{Bo=ie(fi,1,"wrapper-top-right s-z",null,Bo,Co),Hn=ie(Ho,1,"wrapper-bottom ads-timeline-mobile s-z",null,Hn,ao)},[()=>({fullscreen:Ie()}),()=>({fullscreen:Ie()})]),_(qe,Lt)};M(_n,qe=>{le()&&d()!=="inactive"&&qe(nn)})}var Mi=A(_n,2);let ro;var rn=T(Mi);let rr;var Cr=T(rn),bn=T(Cr),sr=T(bn);{var je=qe=>{Lo(qe,{get disabled(){return n(Ro)},get ref(){return vt.replayButton},set ref(Lt){vt.replayButton=Lt},children:(Lt,fi)=>{Ql(Lt,{get disabled(){return n(Ro)},get click(){return kt}})},$$slots:{default:!0}})};M(sr,qe=>{dt&&qe(je)})}var gi=A(sr,2);{var Oo=qe=>{Lo(qe,{get ref(){return vt.liveButton},set ref(Lt){vt.liveButton=Lt},children:(Lt,fi)=>{sc(Lt,{get isLiveActive(){return n(zi)},isMobile:!0,get ariaLabel(){return n(Do)}})},$$slots:{default:!0}})};M(gi,qe=>{!le()&&P()&&qe(Oo)})}var $n=A(gi,2);{var yo=qe=>{let Lt=f(()=>le()?We():me()),fi=f(()=>le()?ve():Z()),Bo=f(()=>!e.showControls);zd(qe,{get showDuration(){return n(Nr)},get position(){return n(Lt)},get duration(){return n(fi)},isMobile:!0,get isHidden(){return n(Bo)},get ref(){return vt.time},set ref(wo){vt.time=wo}})};M($n,qe=>{n(rs)&&qe(yo)})}var sn=A($n,2);let so=f(()=>!n(xr));Lo(sn,{className:"w-max",get disabled(){return n(so)},get ref(){return vt.episodes},set ref(qe){vt.episodes=qe},children:(qe,Lt)=>{var fi=De(),Bo=ae(fi);{var wo=So=>{var Ki=kw(),Ho=A(ae(Ki),2);Yd(Ho,{get position(){return me()},get duration(){return Z()},get timeCodes(){return st}}),_(So,Ki)};M(Bo,So=>{n(xr)&&So(wo)})}_(qe,fi)},$$slots:{default:!0}}),S(bn),tt(bn,qe=>Jt.bottomLeft=qe,()=>Jt==null?void 0:Jt.bottomLeft);var xo=A(bn,2),Ai=T(xo);{var Fr=qe=>{Lo(qe,{get ref(){return vt.volume},set ref(Lt){vt.volume=Lt},children:(Lt,fi)=>{Yu(Lt,{get muted(){return n(Rn)},click:On})},$$slots:{default:!0}})};M(Ai,qe=>{n(ir)&&qe(Fr)})}var Bn=A(Ai,2);{var ys=qe=>{Lo(qe,{get ref(){return vt.settings},set ref(Lt){vt.settings=Lt},children:(Lt,fi)=>{Fl(Lt,{get ref$(){return or}})},$$slots:{default:!0}})};M(Bn,qe=>{n(er)&&qe(ys)})}var Wi=A(Bn,2);{var xs=qe=>{Lo(qe,{get ref(){return vt.fullscreen},set ref(Lt){vt.fullscreen=Lt},children:(Lt,fi)=>{Kd(Lt,{get click(){return e.toggleFullscreen},get isFullscreen(){return Ie()}})},$$slots:{default:!0}})};M(Wi,qe=>{n(tr)&&qe(xs)})}S(xo),tt(xo,qe=>Jt.bottomRight=qe,()=>Jt==null?void 0:Jt.bottomRight),S(Cr),tt(Cr,qe=>pe(qe),()=>pe());var ss=A(Cr,2);let Tr=f(()=>!e.showControls);qa(ss,{get isHidden(){return n(Tr)},get isAds(){return le()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return W()},get ref(){return vt.timeline},set ref(qe){vt.timeline=qe}}),S(rn),tt(rn,qe=>Jt.bottom=qe,()=>Jt==null?void 0:Jt.bottom),S(Mi),tt(Mi,qe=>N(qe),()=>N());var No=A(Mi,2);{var Ur=qe=>{ec(qe,{get ref(){return vt.interactiveTimeIndicator},set ref(Lt){vt.interactiveTimeIndicator=Lt}})};M(No,qe=>{Ui&&qe(Ur)})}O((qe,Lt)=>{ro=ie(Mi,1,"wrapper-bottom mobile s-z",null,ro,qe),Ke(Mi,`transform: ${e.showControls?"translateY(0)":"translateY(100%)"}`),rr=ie(rn,1,"controls-wrapper s-z",null,rr,Lt)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:Ie()})]),_(t,on),H(),o()}et(["click"]);function lc(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(I,"$isMobile",i),a=g(e,"bottomNoSmooth",3,!1),l=g(e,"playerControlsWrapperRef",15,void 0),d=g(e,"playerControlsRef",15,void 0),s=g(e,"isAds",3,!1),u=g(e,"logoTargetUrl",3,""),m=g(e,"showAutoplayNext",3,!1),p=g(e,"isOneVideoPlaylist",3,!1),v=g(e,"customFullscreenSupported",3,!0),$=g(e,"endScreenShown",3,!1),y=g(e,"onDisabledPlayPrevChapterClick",3,_b),b=g(e,"onDisabledSeekToInteractiveClick",3,_b),I=ye().ui.isMobile,C=K(!1);Mt(()=>{let E=setTimeout(()=>D(C,!0),0);return()=>clearTimeout(E)});var R=De(),k=ae(R);{var P=E=>{var W=De(),F=ae(W);{var U=re=>{Wm(re,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get showAutoplayNext(){return m()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return p()},get customFullscreenSupported(){return v()},get endScreenShown(){return $()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return y()},get onDisabledSeekToInteractiveClick(){return b()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(G){l(G)},get playerControlsRef(){return d()},set playerControlsRef(G){d(G)}})},j=re=>{Bm(re,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get isOneVideoPlaylist(){return p()},get showAutoplayNext(){return m()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return v()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(G){l(G)},get playerControlsRef(){return d()},set playerControlsRef(G){d(G)}})};M(F,re=>{r()?re(U):re(j,!1)})}_(E,W)};M(k,E=>{n(C)&&E(P)})}_(t,R),H(),o()}var Vw=ke('<path d="M23.75 31.2v-5.45l-11.84 6.7a1.45 1.45 180 01-2.16-1.25v-14.4a1.45 1.45 180 012.16-1.26l11.84 6.7v-5.44a1.45 1.45 180 012.16-1.26l12.7 7.19a1.45 1.45 180 010 2.52l-12.7 7.2a1.45 1.45 180 01-2.16-1.27Z"></path>');function dc(t,e){B(e,!0);let i=f(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=f(()=>`${un(e.size)}${n(i)}`);Ze(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(o)},get testId(){return e.testId},get shadow(){return e.shadow},children:(r,a)=>{var l=Vw();_(r,l)},$$slots:{default:!0}}),H()}var Rw=ke('<path d="M32.46 9.53a1.16 1.16 90 010 1.96l-7.66 4.83c-.78.49-1.8-.07-1.8-.98v-3.3a14 14 90 1014.1 18.93 1.5 1.5 90 012.8 1.06 17 17 90 11-16.9-23V5.66c0-.91 1.03-1.47 1.8-.98z"></path>');function Km(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=f(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),r=f(()=>`seek-icon-${i()?"backward":"forward"}`);Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(r)},get shadow(){return e.shadow},children:(a,l)=>{var d=Rw();_(a,d)},$$slots:{default:!0}}),H()}var Dw=L('<span class="hot-key-helpers-text s-19"> </span>'),Ow=L('<div data-testid="hotkey-helper-icon" class="s-19"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),Nw=L("<div><!></div>"),Bw={hash:"s-19",code:'.hot-key-helpers-container.s-19{align-items:center;animation:s-19-fadeIn ease var(--controls-transition-duration);box-sizing:border-box;display:flex;flex-direction:column;height:120px;left:calc(50% - 100px);padding-top:14px;position:absolute;top:calc(50% - 40px);width:200px;z-index:var(--hot-key-helpers-container-z-index)}.hot-key-helpers-container--left.s-19{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-19{left:calc(75% - 100px)}.hot-key-helpers-text.s-19{display:-webkit-box;font-feature-settings:"clig" off,"liga" off;font-size:15px;font-style:normal;font-weight:600;letter-spacing:-.105px;-webkit-line-clamp:2;line-height:20px;margin-top:4px;max-height:40px;overflow:hidden;text-align:center;text-overflow:ellipsis;text-shadow:0 0 5px rgba(0,0,0,.16);white-space:pre-wrap;width:100%;-webkit-box-orient:vertical}.hidden.s-19{animation:s-19-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-19-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-19-fadeOut{0%{opacity:1}to{opacity:0}}'};function qm(t,e){B(e,!0),Q(t,Bw);let[i,o]=Be(),r=()=>w(e.data,"$data",i),a=ye(),{features:l}=Vt(),d=a.ui.t,s=f(()=>!r()),u=f(()=>{var I;return((I=r())==null?void 0:I.type)==="BACKWARD_SEEK"}),m=f(()=>{var I;return((I=r())==null?void 0:I.type)==="FORWARD_SEEK"}),p=f(()=>{var I;return(I=r())==null?void 0:I.type}),v=f(()=>{var I,C;return(I=r())!=null&&I.t?d(r().t.key,{value:r().t.value||""}):(C=r())==null?void 0:C.text});var $=Nw();let y;var b=T($);{var x=I=>{var C=Ow(),R=ae(C),k=T(R);{var P=pe=>{let le=f(()=>n(p)==="BACKWARD_SEEK");Km(pe,{get reversed(){return n(le)},shadow:!0})};M(k,pe=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&pe(P)})}var E=A(k,2);{var W=pe=>{Ws(pe,{get size(){return"48"},shadow:!0})};M(E,pe=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&pe(W)})}var F=A(E,2);{var U=pe=>{An(pe,{get size(){return"48"},shadow:!0})};M(F,pe=>{n(p)==="PLAY"&&!l.playbackStatusShow&&pe(U)})}var j=A(F,2);{var re=pe=>{tc(pe,{get size(){return"48"},shadow:!0})};M(j,pe=>{n(p)==="REPLAY"&&!l.playbackStatusShow&&pe(re)})}var G=A(j,2);{var oe=pe=>{ca(pe,{get size(){return"48"},type:"off",shadow:!0})};M(G,pe=>{n(p)==="SUBTITLES_OFF"&&pe(oe)})}var X=A(G,2);{var Ie=pe=>{ca(pe,{get size(){return"48"},shadow:!0})};M(X,pe=>{n(p)==="SUBTITLES_ON"&&pe(Ie)})}var fe=A(X,2);{var ee=pe=>{let le=f(()=>n(p)==="RATE_DOWN");dc(pe,{get size(){return"48"},get reversed(){return n(le)},testId:"rate-change-icon",shadow:!0})};M(fe,pe=>{["RATE_DOWN","RATE_UP"].includes(n(p))&&pe(ee)})}var be=A(fe,2);{var Ce=pe=>{let le=f(()=>n(p)==="EPISODE_PREV");pa(pe,{get size(){return"48"},get reversed(){return n(le)},shadow:!0})};M(be,pe=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(p))&&pe(Ce)})}var de=A(be,2);{var We=pe=>{ua(pe,{get size(){return"48"},volume:0,shadow:!0})};M(de,pe=>{n(p)==="MUTE"&&pe(We)})}var ve=A(de,2);{var me=pe=>{ua(pe,{get size(){return"48"},volume:1,shadow:!0})};M(ve,pe=>{n(p)==="VOLUME"&&pe(me)})}S(R);var Z=A(R,2);{var N=pe=>{var le=Dw(),ue=T(le,!0);S(le),O(()=>he(ue,n(v))),_(pe,le)};M(Z,pe=>{n(v)&&pe(N)})}O(()=>Oe(R,"data-type",n(p))),_(I,C)};M(b,I=>{!n(s)&&n(p)&&I(x)})}S($),O(I=>y=ie($,1,"hot-key-helpers-container s-19",null,y,I),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(m)})]),_(t,$),H(),o()}var Hw=(t,e,i,o,r,a)=>{if(e.has(t.code))switch(t.preventDefault(),t.stopPropagation(),t.code){case"ArrowUp":i();break;case"ArrowDown":o();break;case"ArrowLeft":r();break;case"ArrowRight":a();break}},Fw=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},Uw=L('<div tabindex="0" role="button"><div class="button-block s-l" aria-hidden="true"><div class="button-row s-l"><div class="button button-up s-l"><!></div> <div class="button button-right s-l"><!></div></div> <div class="button-row s-l"><div class="button button-left s-l"><!></div> <div class="button button-down s-l"><!></div></div></div></div>'),zw={hash:"s-l",code:".immersive-controls.s-l{background-color:rgba(0,0,0,.56);border-radius:8px;display:flex;flex-direction:row;height:56px;left:10px;position:absolute;top:10px;transition-duration:var(--controls-transition-duration);transition-property:top,left;transition-timing-function:var(--controls-transition-fn);width:56px}.immersive-controls.m-shifted.s-l{left:20px;top:50px}.button-block.s-l{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-l{display:flex;flex-direction:row;position:relative}.button.s-l{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-l svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-l svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-l svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-l svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-l svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-l:hover svg{opacity:1}"};function cc(t,e){B(e,!0),Q(t,zw);let i=g(e,"isShifted",3,!1),o=ye(),r=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},l=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},s=()=>{o.actions.internal.startCameraManualRotation(-1,0)},u=()=>(o.actions.internal.stopCameraManualRotation(),null),m=Y("aria_label_spherical_control");var p=Uw();let v;p.__keydown=[Hw,r,a,l,s,d],p.__keyup=[Fw,r,u];var $=T(p),y=T($),b=T(y);b.__mousedown=a,b.__mouseup=u;var x=T(b);Vr(x,{direction:"up",useBtnColor:!0}),S(b);var I=A(b,2);I.__mousedown=d,I.__mouseup=u;var C=T(I);Vr(C,{direction:"up",useBtnColor:!0}),S(I),S(y);var R=A(y,2),k=T(R);k.__mousedown=s,k.__mouseup=u;var P=T(k);Vr(P,{direction:"up",useBtnColor:!0}),S(k);var E=A(k,2);E.__mousedown=l,E.__mouseup=u;var W=T(E);Vr(W,{direction:"up",useBtnColor:!0}),S(E),S(R),S($),S(p),O(F=>{v=ie(p,1,"immersive-controls s-l",null,v,F),Oe(p,"aria-label",m)},[()=>({"m-shifted":i()})]),mt("mouseleave",b,u),mt("mouseleave",I,u),mt("mouseleave",k,u),mt("mouseleave",E,u),_(t,p),H()}et(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as $b,Subscription as Ww,filterChanged as Kw,filter as qw}from"@vkontakte/videoplayer-shared/es2015";var bb=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var ju=class{constructor(){this.flickeringTimeout=bb(1e3);this.subscriptions=new Ww;this.isAuto=!1;this.isLive=!1;this.captions$=new $b([]);this.captionsPrepared$=new $b([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(qw(()=>this.isEnabled()),Kw()).subscribe(e=>{this.processCaptions(e)})),this}setIsAuto(e){this.isAuto=e}setIsLive(e){this.isLive=e}setCaptions(e){this.captions$.next(e)}destroy(){this.subscriptions.unsubscribe(),this.flickeringTimeout.clear()}isEnabled(){return this.isAuto&&!this.isLive}processCaptions(e){if(!e.length){this.flickeringTimeout.add(()=>{this.captionsPrepared$.next([])});return}this.flickeringTimeout.clear();let i=[],o=e.length>1&&e[0].type!=="timestamp"&&e[1].type!=="timestamp";o&&i.push([{value:String(e[0].value),timeAppeared:null}]),i.push(e.reduce((r,{type:a,value:l},d)=>(o&&!d||(a==="timestamp"?r.push({timeAppeared:Number(l),value:""}):r.length===0?r.push({value:String(l)}):r[r.length-1].value=String(l)),r),[])),this.captionsPrepared$.next(i)}};var Qw=L('<span class="caption-line s-d"><span class="caption-segment s-d"> </span></span>'),Gw=L('<span class="caption-line s-d"><span class="caption-segment s-d"></span></span>'),Yw=L('<span class="caption-line s-d"><span class="caption-segment s-d"> </span></span>'),jw=L('<div><span class="caption s-d"><!></span></div>'),Xw=L("<div><!></div>"),Zw={hash:"s-d",code:".subtitles-container.s-d{height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:transform var(--controls-transition-duration);width:100%}.subtitles-container.shifted.s-d{transform:translateY(calc(var(--controls-height)*-1))}.subtitles-container.preview-track-active.s-d{transform:translateY(calc(var(--preview-track-height)*-1))}.preview-track-active.s-d .subtitles-caption:where(.s-d){bottom:var(--preview-track-controls-top-offset)}.subtitles-caption.s-d{bottom:4%;display:flex;justify-content:center;left:4%;position:absolute;right:4%}.subtitles-caption.mobile.s-d{bottom:8%}.subtitles-container.auto.s-d .subtitles-caption:where(.s-d){left:var(--subtitles-caption-margin);right:var(--subtitles-caption-margin)}.caption.s-d{background:rgba(0,0,0,.4);border-radius:4px;display:block;overflow-wrap:normal;padding:4px 8px}.subtitles-container.auto.s-d .caption:where(.s-d){width:100%}.caption-line.s-d{display:block;text-align:center}.subtitles-container.auto.s-d .caption-line:where(.s-d){text-align:left}.caption-segment.s-d{color:var(--white);display:inline-block;font-size:13px;line-height:1.2;white-space:pre-wrap}"};function Ga(t,e){B(e,!0),Q(t,Zw);let[i,o]=Be(),r=()=>w(v,"$currentSubtitle$",i),a=()=>w(y,"$isLive$",i),l=()=>w(b,"$isFullscreen",i),d=()=>w(x,"$previewTrackActive",i),s=()=>w($,"$isAutoSubtitleCaptionVisible$",i),u=g(e,"isMobile",3,!1),m=ye(),p=Vt(),v=m.state.currentSubtitle$,$=m.state.isAutoSubtitleCaptionVisible$,y=m.state.isLive$,b=m.ui.isFullscreen,x=m.ui.previewTrackActive,I=f(()=>!!r().isAuto),C=f(()=>!!a()),R=f(()=>e.playerSize.width*.02),k=f(()=>u()&&!l()||n(R)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(R)),P=K(null);He(()=>{var G,oe,X;(G=n(P))==null||G.setIsAuto(n(I)),(oe=n(P))==null||oe.setIsLive(n(C)),(X=n(P))==null||X.setCaptions(e.captions)});let E=K(li([[]]));Mt(()=>{D(P,new ju().subscribe(),!0);let G=n(P).captionsPrepared$.subscribe(oe=>{D(E,oe,!0)});return()=>{var oe;(oe=n(P))==null||oe.destroy(),G.unsubscribe()}}),Mt(()=>{if(n(I)){let G=window.setTimeout(()=>{$.set(!1)},p.autoSubtitlesTimeout);return()=>{window.clearTimeout(G)}}else $.set(!1)});let W=f(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var F=Xw();let U;var j=T(F);{var re=G=>{var oe=jw();let X;var Ie=T(oe),fe=T(Ie);{var ee=Ce=>{var de=Qw(),We=T(de),ve=T(We,!0);S(We),S(de),O(me=>{var Z;Ke(We,`font-size: ${(Z=n(k))!=null?Z:""}px`),he(ve,me)},[()=>Y("subtitles_auto_caption")]),_(Ce,de)},be=(Ce,de)=>{{var We=me=>{var Z=De(),N=ae(Z);yi(N,17,()=>n(E),_d,(pe,le)=>{var ue=Gw(),Le=T(ue);yi(Le,21,()=>n(le),({value:ze,timeAppeared:te})=>te,(ze,te)=>{let ce=()=>n(te).value,we=()=>n(te).timeAppeared;var Ee=De(),Ye=ae(Ee);{var Ae=Te=>{var Fe=vs();O(()=>he(Fe,ce())),_(Te,Fe)};M(Ye,Te=>{(!we()||we()<=e.position)&&Te(Ae)})}_(ze,Ee)}),S(Le),S(ue),O(()=>{var ze;return Ke(Le,`font-size: ${(ze=n(k))!=null?ze:""}px`)}),_(pe,ue)}),_(me,Z)},ve=me=>{var Z=De(),N=ae(Z);yi(N,17,()=>e.captions,({value:pe})=>pe,(pe,le)=>{let ue=()=>n(le).value;var Le=Yw(),ze=T(Le),te=T(ze,!0);S(ze),S(Le),O(()=>{var ce;Ke(ze,`font-size: ${(ce=n(k))!=null?ce:""}px`),he(te,ue())}),_(pe,Le)}),_(me,Z)};M(Ce,me=>{var Z;n(I)&&((Z=n(E))!=null&&Z.length)?me(We):me(ve,!1)},de)}};M(fe,Ce=>{n(I)&&s()?Ce(ee):Ce(be,!1)})}S(Ie),S(oe),O(Ce=>{var de;X=ie(oe,1,"subtitles-caption s-d",null,X,Ce),Ke(oe,`--subtitles-caption-margin: ${(de=n(W))!=null?de:""}%`)},[()=>({mobile:u()})]),_(G,oe)};M(j,G=>{var oe;(e.captions.length||(oe=n(E))!=null&&oe.length)&&G(re)})}S(F),O(G=>U=ie(F,1,"subtitles-container s-d",null,U,G),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(I)&&!n(C)&&!s()})]),_(t,F),H(),o()}import{ChromecastState as Jw}from"@vkontakte/videoplayer-core/es2015";var eS=L('<div class="text s-s"> </div>'),tS=L('<div><div class="icon_wrapper s-s"><!></div> <!></div>'),iS={hash:"s-s",code:".wrapper.s-s{align-items:center;background-position:50%;background-repeat:no-repeat;background-size:contain;display:flex;flex-direction:column;font-size:16px;height:100%;justify-content:center}.wrapper.bgCover.s-s{background-size:cover}.icon_wrapper.s-s{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-s{margin-top:20px}"};function uc(t,e){B(e,!0),Q(t,iS);let i=g(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Vt();var r=tS();let a;r.__contextmenu=function(...m){var p;(p=e.onContextMenu)==null||p.apply(this,m)},r.__click=function(...m){var p;(p=e.onClick)==null||p.apply(this,m)},r.__dblclick=function(...m){var p;(p=e.onDblClick)==null||p.apply(this,m)};var l=T(r),d=T(l);Qd(d,{get size(){return"48"},get iconState(){return Jw.CONNECTED}}),S(l);var s=A(l,2);{var u=m=>{var p=eS(),v=T(p);S(p),O(()=>{var $;return he(v,`Видео воспроизводится на ${($=i())!=null?$:""}`)}),_(m,p)};M(s,m=>{i()&&m(u)})}S(r),O(m=>{a=ie(r,1,"wrapper s-s",null,a,m),Ke(r,`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e.thumbUrl||""}')`)},[()=>({bgCover:o.features.previewNoEmptySpace})]),_(t,r),H()}et(["contextmenu","click","dblclick"]);var oS=ke('<path d="M460 194a4 4 0 0 1 4-4h122a4 4 0 0 1 4 4v82a4 4 0 0 1-4 4H464a4 4 0 0 1-4-4zm6 3a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm112-72a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm-71-37a6 6 0 1 0 0-12 6 6 0 0 0 0 12m36 0a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-18.05 15c6.05 0 11.62 4.45 11.94 4.65 2.11 1.35 3.26.77 3.96.16s1.15-2.81-1.04-4.66c-1.74-1.48-5.8-5.16-14.86-5.15s-12.95 3.5-14.8 5.18c-1.83 1.69-2.28 3.5-.96 4.66s2.31 1.16 4.35-.33c0 .01 5.36-4.51 11.41-4.51"></path>');function Qm(t){Ze(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=oS();_(e,o)},$$slots:{default:!0}})}var nS=L('<div class="container s-4"><!></div>'),rS={hash:"s-4",code:".container.s-4{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function Ya(t){Q(t,rS);var e=nS(),i=T(e);Qm(i,{}),S(e),_(t,e)}var sS=L('<div class="playButton s-a" tabindex="0" role="button"><div class="playButtonBackground s-a"></div> <!></div>'),aS=L('<div data-testid="unstarted-thumb"><!></div>'),lS={hash:"s-a",code:".container.s-a{background-position:50%;background-repeat:no-repeat;background-size:contain;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:opacity .2s,visibility .2s;will-change:opacity}.container.hidden.s-a{opacity:0;visibility:hidden}.container.bgCover.s-a{background-size:cover}.playButton.s-a{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-a,.playButtonBackground.s-a{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-a{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);transition:background .2s,transform .2s;transition-timing-function:ease-out;will-change:background,transform}.container.s-a:hover .playButtonBackground:where(.s-a){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-a svg{position:relative}"};function ja(t,e){B(e,!0),Q(t,lS);let i=g(e,"iconVisible",3,!0),o=ye(),r=Vt(),a=o.ui.startedByKeyboard$,l=Y("tooltip_play"),d=$=>{var b;let y=$.code;["Enter","Space"].includes(y)&&($.stopPropagation(),$.preventDefault(),a.set(!0),(b=e.startVideo)==null||b.call(e))},s=$=>{var y,b;$.stopPropagation(),(y=e.startVideo)==null||y.call(e),(b=e.onClick)==null||b.call(e,$)};var u=aS();let m;u.__click=s,u.__contextmenu=function(...$){var y;(y=e.onContextMenu)==null||y.apply(this,$)};var p=T(u);{var v=$=>{var y=sS();y.__keydown=d;var b=A(T(y),2);An(b,{get size(){return"48"}}),S(y),O(()=>Oe(y,"aria-label",l)),_($,y)};M(p,$=>{i()&&$(v)})}return S(u),O($=>{m=ie(u,1,"container s-a",null,m,$),Ke(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:r.features.previewNoEmptySpace})]),_(t,u),H({handlePressKey:d,handleClick:s})}et(["click","contextmenu","keydown"]);var dS=L('<span class="text s-1b"> </span>'),cS=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},uS=L('<a target="_blank" class="link s-1b"><!></a>'),pS=(t,e)=>e.onTitleClicked(),fS=L("<button><!></button>"),mS=L('<div data-testid="video_title"><!></div>'),vS={hash:"s-1b",code:".title.s-1b{background:linear-gradient(0deg,transparent,rgba(0,0,0,.02) 19%,rgba(0,0,0,.1) 34%,rgba(0,0,0,.4) 60%,rgba(0,0,0,.6));box-sizing:border-box;font-size:15px;height:var(--controls-gradient-height);left:0;overflow:hidden;padding:18px 20px 10px;pointer-events:none;position:absolute;text-overflow:ellipsis;top:0;transition-duration:var(--controls-transition-duration);transition-property:visibility,transform,opacity;transition-timing-function:var(--controls-transition-fn);white-space:nowrap;width:100%;will-change:transform,opacity;z-index:var(--controls-container-z-index)}.link.s-1b,.title.s-1b{color:var(--white)}.link.s-1b{pointer-events:auto;text-decoration:none}.link.s-1b:hover{text-decoration:underline}.text.s-1b{pointer-events:auto}.size-sm.s-1b{font-size:14px;font-weight:500;line-height:18px}.hidden.s-1b{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function Gm(t,e){B(e,!0),Q(t,vS);let i=$=>{var y=dS(),b=T(y,!0);S(y),tt(y,x=>l(x),()=>l()),O(()=>he(b,o())),mt("mouseenter",y,function(...x){var I;(I=e.onMouseEnter)==null||I.apply(this,x)}),mt("mouseleave",y,function(...x){var I;(I=e.onMouseLeave)==null||I.apply(this,x)}),_($,y)},o=g(e,"title",3,""),r=g(e,"isHidden",3,!1),a=g(e,"size",3,"md"),l=g(e,"ref",15),d=K(void 0);Mt(()=>{var y;requestAnimationFrame(()=>{var b;(b=e.onVisibilityChanged)==null||b.call(e,!0)});function $(b){var x;b.propertyName==="transform"&&((x=e.onVisibilityChanged)==null||x.call(e,!r()))}return(y=n(d))==null||y.addEventListener("transitionend",$),()=>{var b;return(b=n(d))==null?void 0:b.removeEventListener("transitionend",$)}});var s=mS();let u;var m=T(s);{var p=$=>{var y=uS();y.__click=[cS,e];var b=T(y);i(b),S(y),O(()=>Oe(y,"href",e.titleLinkHref)),_($,y)},v=($,y)=>{{var b=I=>{var C=fS();C.__click=[pS,e];var R=T(C);i(R),S(C),_(I,C)},x=I=>{i(I)};M($,I=>{e.onTitleClicked?I(b):I(x,!1)},y)}};M(m,$=>{e.titleLinkHref?$(p):$(v,!1)})}S(s),tt(s,$=>D(d,$),()=>n(d)),O($=>u=ie(s,1,`title size-${a()}`,"s-1b",u,$),[()=>({hidden:r()})]),_(t,s),H()}et(["click"]);import{throttleFn as xS}from"@vkontakte/videoplayer-shared/es2015";var gS=L('<div class="timer__cell cell s-12"><span class="cell__value s-12"> </span> <span class="cell__unit s-12"> </span></div> <span class="timer__points s-12"> </span>',1),hS=L('<div class="timer__cell cell s-12"><span class="cell__value s-12"> </span> <span class="cell__unit s-12"> </span></div> <span class="timer__points s-12"> </span>',1),_S=L('<div class="timer__cell cell s-12"><span class="cell__value s-12"> </span> <span class="cell__unit s-12"> </span></div> <span class="timer__points s-12"> </span>',1),bS=L('<div class="timer__cell cell s-12"><span class="cell__value s-12"> </span> <span class="cell__unit s-12"> </span></div>'),$S=L("<div><!> <!> <!> <!></div>"),yS={hash:"s-12",code:".timer__container.s-12{align-items:flex-start;display:flex;justify-content:center}.cell.s-12{align-items:center;display:flex;flex-direction:column}.cell__value.s-12{font-size:48px;font-weight:600;line-height:1.2}.small.s-12 .cell__value:where(.s-12){font-size:24px}.cell__unit.s-12{font-size:14px;font-weight:400;line-height:1.2}.small.s-12 .cell__unit:where(.s-12){font-size:12px}.timer__points.s-12{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-12 .timer__points:where(.s-12){font-size:20px}"};function Ym(t,e){B(e,!0),Q(t,yS);let i=K(""),o=K(""),r=K(""),a=K(""),l,d=32,s=d/2,u=F=>String(F).padStart(2,"0"),m=F=>Math.max(F.length,1),p=F=>`${(e.isSmallSize?s:d)*m(F)}px`,v=F=>{let U=Math.floor(F/86400);U&&(F-=U*86400,D(i,u(U),!0));let j=Math.floor(F/3600);D(o,u(j),!0);let re=Math.floor(F/60)%60;D(r,u(re),!0);let G=F%60;D(a,u(G),!0)},$=()=>{let F=Math.floor(Date.now()/1e3),U=e.startTime-F;v(U),U>=1?l=requestAnimationFrame($):e.onTimerOver()};Mt(()=>{l=requestAnimationFrame($)}),cn(()=>{cancelAnimationFrame(l)});var y=$S();let b;var x=T(y);{var I=F=>{var U=gS(),j=ae(U);let re;var G=T(j),oe=T(G,!0);S(G);var X=A(G,2),Ie=T(X,!0);S(X),S(j);var fe=A(j,2),ee=T(fe,!0);S(fe),O((be,Ce,de)=>{re=Ke(j,"",re,{width:be}),he(oe,n(i)),he(Ie,Ce),he(ee,de)},[()=>p(n(i)),()=>Y("waiting_live_day_value"),()=>Y("waiting_live_colon")]),_(F,U)};M(x,F=>{n(i)&&F(I)})}var C=A(x,2);{var R=F=>{var U=hS(),j=ae(U);let re;var G=T(j),oe=T(G,!0);S(G);var X=A(G,2),Ie=T(X,!0);S(X),S(j);var fe=A(j,2),ee=T(fe,!0);S(fe),O((be,Ce,de)=>{re=Ke(j,"",re,{width:be}),he(oe,n(o)),he(Ie,Ce),he(ee,de)},[()=>p(n(o)),()=>Y("waiting_live_hour_value"),()=>Y("waiting_live_colon")]),_(F,U)};M(C,F=>{n(o)&&F(R)})}var k=A(C,2);{var P=F=>{var U=_S(),j=ae(U);let re;var G=T(j),oe=T(G,!0);S(G);var X=A(G,2),Ie=T(X,!0);S(X),S(j);var fe=A(j,2),ee=T(fe,!0);S(fe),O((be,Ce,de)=>{re=Ke(j,"",re,{width:be}),he(oe,n(r)),he(Ie,Ce),he(ee,de)},[()=>p(n(r)),()=>Y("waiting_live_minute_value"),()=>Y("waiting_live_colon")]),_(F,U)};M(k,F=>{n(r)&&F(P)})}var E=A(k,2);{var W=F=>{var U=bS();let j;var re=T(U),G=T(re,!0);S(re);var oe=A(re,2),X=T(oe,!0);S(oe),S(U),O((Ie,fe)=>{j=Ke(U,"",j,{width:Ie}),he(G,n(a)),he(X,fe)},[()=>p(n(a)),()=>Y("waiting_live_second_value")]),_(F,U)};M(E,F=>{n(a)&&F(W)})}S(y),O(F=>b=ie(y,1,"timer__container s-12",null,b,F),[()=>({small:e.isSmallSize})]),_(t,y),H()}var wS=L('<div class="waiting s-n"><span> </span></div>'),SS=L('<div class="upcoming-timer timer s-n"><span> </span> <!></div>'),CS=L('<div class="waiting-container s-n"><!></div>'),TS={hash:"s-n",code:'.waiting-container.s-n{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.waiting-container.s-n,.waiting-container.s-n:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-n:before{backdrop-filter:blur(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-n{align-items:center;display:flex;flex-direction:column;justify-content:center;left:0;position:absolute;top:50%;transform:translateY(-50%);width:100%;z-index:2}.waiting__title.s-n{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-n{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-n{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-n{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-n{font-size:15px}.medium.s-n{font-size:17px}'};function pc(t,e){B(e,!0),Q(t,TS);let i=g(e,"startTime",3,0),o=f(()=>i()<Math.floor(Date.now()/1e3)),r=K(void 0),a=K(void 0),l=0,d=K(void 0),s=K(void 0),u=f(()=>{var x,I;return((x=n(d))!=null?x:1/0)<=509||((I=n(s))!=null?I:1/0)<=320}),m=f(()=>{var x,I;return!n(u)&&(((x=n(d))!=null?x:1/0)<=699||((I=n(s))!=null?I:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?xS(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let x={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"},I=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(x,I)})},300):void 0;He(()=>{n(s),n(d),n(o),p==null||p()}),cn(()=>{if(cancelAnimationFrame(l),p==null||p.cancel(),e.onUpcomingLiveViewStateChanged){let x={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"};e.onUpcomingLiveViewStateChanged(x)}});var v=CS();v.__contextmenu=function(...x){var I;(I=e.onContextMenu)==null||I.apply(this,x)},v.__click=function(...x){var I;(I=e.onClick)==null||I.apply(this,x)};var $=T(v);{var y=x=>{var I=wS(),C=T(I);let R;var k=T(C,!0);S(C),S(I),tt(I,P=>D(r,P),()=>n(r)),O((P,E)=>{R=ie(C,1,"waiting__title s-n",null,R,P),he(k,E)},[()=>({medium:n(m),small:n(u)}),()=>Y("waiting_live_upcoming_title")]),_(x,I)},b=x=>{var I=SS(),C=T(I);let R;var k=T(C,!0);S(C);var P=A(C,2);let E=f(()=>n(u)||n(m)),W=f(()=>i()||0);Ym(P,{get isSmallSize(){return n(E)},get startTime(){return n(W)},onTimerOver:()=>D(o,!0)}),S(I),tt(I,F=>D(a,F),()=>n(a)),O((F,U)=>{R=ie(C,1,"timer__title s-n",null,R,F),he(k,U)},[()=>({medium:n(m),small:n(u)}),()=>Y("waiting_live_timer_title")]),_(x,I)};M($,x=>{n(o)?x(y):x(b,!1)})}S(v),O(()=>Ke(v,`background-image: url(${e.thumbUrl})`)),En(v,"clientWidth",x=>D(d,x)),En(v,"clientHeight",x=>D(s,x)),_(t,v),H()}et(["contextmenu","click"]);var IS=L('<div class="waiting-container s-t"><div class="waiting-caption s-t"><!> <p class="waiting-title s-t"> </p></div></div>'),ES={hash:"s-t",code:'.waiting-container.s-t{align-items:center;background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;justify-content:center}.waiting-container.s-t,.waiting-container.s-t:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-t:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-t{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-t{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function Xa(t,e){B(e,!0),Q(t,ES);let i=g(e,"thumbUrl",3,""),o={recover:Y("waiting_live_recover_title"),record:Y("waiting_record_title")},r=f(()=>o[e.kind]||"");var a=IS();a.__contextmenu=function(...m){var p;(p=e.onContextMenu)==null||p.apply(this,m)},a.__click=function(...m){var p;(p=e.onClick)==null||p.apply(this,m)};var l=T(a),d=T(l);Ha(d,{style:"position: static; transform: translate(0, 0)"});var s=A(d,2),u=T(s,!0);S(s),S(l),S(a),O(()=>{Ke(a,`background-image: url('${i()}')`),he(u,n(r))}),_(t,a),H()}et(["contextmenu","click"]);var PS=ke('<path d="M6 10.2 3.5 7.7a.99.99 0 0 0-1.4 1.4l3.2 3.2a1 1 0 0 0 1.4 0l7.6-7.6a.99.99 0 0 0-1.4-1.4z"></path>');function jm(t){Ze(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=PS();_(e,o)},$$slots:{default:!0}})}var AS=L('<div class="select-icon s-1w"><!></div>'),kS={hash:"s-1w",code:".select-icon.s-1w{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function fc(t){Q(t,kS);var e=AS(),i=T(e);jm(i,{}),S(e),_(t,e)}var LS=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},MS=(t,e)=>{Nl(t,()=>e.item.selectItem(e.item.value))},VS=L("<p> </p>"),RS=L('<p class="sublabel s-1t"> </p>'),DS=L('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),OS={hash:"s-1t",code:".menu-item-value.s-1t{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1t{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1t,.sublabel.s-1t{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1t{opacity:.5}"};function Xm(t,e){B(e,!0),Q(t,OS);let i=g(e,"isMobile",3,!1);var o=DS();let r;o.__click=[LS,e],o.__keydown=[MS,e];var a=T(o);{var l=y=>{fc(y,{})};M(a,y=>{e.item.selected&&y(l)})}var d=A(a,2);let s;var u=T(d);{var m=y=>{var b=De(),x=ae(b);Hi(x,()=>e.item.valueComponent,(I,C)=>{C(I,Jr(()=>{var R;return(R=e.item.valueComponentParams)!=null?R:{}}))}),_(y,b)},p=y=>{var b=VS();let x;var I=T(b,!0);S(b),O(C=>{var R;x=ie(b,1,"label s-1t",null,x,C),he(I,(R=e.item.label)!=null?R:e.item.value)},[()=>({mobile:i()})]),_(y,b)};M(u,y=>{e.item.valueComponent?y(m):y(p,!1)})}var v=A(u,2);{var $=y=>{var b=RS(),x=T(b,!0);S(b),O(()=>he(x,e.item.sublabel)),_(y,b)};M(v,y=>{e.item.sublabel&&y($)})}S(d),S(o),O((y,b,x)=>{var I;r=ie(o,1,"item",null,r,y),Oe(o,"data-value",(I=e.item.dataValue)!=null?I:e.item.value),Oe(o,"aria-label",b),Oe(o,"data-testid",e.item.dataTestid),s=ie(d,1,"menu-item-value s-1t",null,s,x),Oe(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var y,b;return(b=(y=e.item.ariaLabel)!=null?y:e.item.label)!=null?b:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),_(t,o),H()}et(["click","keydown"]);var NS=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function Zm(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"refMenuItems",15),r=f(()=>()=>e.openSubMenuList(e.item.children)),a=f(()=>b=>Eu(b,n(r)));var l=NS();let d;l.__click=function(...b){var x;(x=n(r))==null||x.apply(this,b)},l.__keydown=function(...b){var x;(x=n(a))==null||x.apply(this,b)};var s=T(l);{var u=b=>{fc(b,{})};M(s,b=>{e.item.selected&&b(u)})}var m=A(s,2);let p;var v=T(m);{var $=b=>{var x=De();let I=f(()=>e.item.valueComponent);var C=ae(x);Hi(C,()=>n(I),(R,k)=>{k(R,Jr(()=>{var P;return(P=e.item.valueComponentParams)!=null?P:{}}))}),_(b,x)},y=b=>{var x=vs();O(()=>he(x,e.item.label)),_(b,x)};M(v,b=>{e.item.valueComponent?b($):b(y,!1)})}S(m),S(l),tt(l,b=>o(o()[e.item.id]=b,!0),()=>{var b;return(b=o())==null?void 0:b[e.item.id]}),O((b,x)=>{var I;d=ie(l,1,"item",null,d,b),Oe(l,"aria-label",(I=e.item.ariaLabel)!=null?I:e.item.label),Oe(l,"data-testid",e.item.id),p=ie(m,1,"menu-item-value",null,p,x)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),_(t,l),H()}et(["click","keydown"]);var ts={"quality-settings":100,"audio-language-settings":200,"playback-rate-settings":300,"subtitles-settings":400,"traffic-saving-settings":500,download:600,report:700,"copy-data":800,"save-trace-info":900,"debug-info":1e3};var HS=(t,e)=>{L_(t,e.returnFromSubMenu,e.closeSettingsMenu)},FS=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},US=(t,e)=>{Rd(t)&&(Rr(t),e.returnFromSubMenu())},zS=L('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1i"> </p></li> <!></ul></div>'),WS={hash:"s-1i",code:".sub-menu.s-1i{--item-padding-vertical-mobile:16px;--item-padding-vertical:7px;--item-label-line-height:18px;--edge-item-padding-vertical-mobile:calc(6px + var(--item-padding-vertical-mobile));--edge-item-padding-vertical:calc(8px + var(--item-padding-vertical))}.sub-menu.s-1i .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1i{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1i{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1i .items:where(.s-1i) .item.header:where(.s-1i){border-bottom:var(--divider-border);display:flex;justify-content:space-between;left:0;min-width:max-content;position:absolute;right:0;top:0}.header.s-1i .title:where(.s-1i){margin-left:8px}.sub-menu.s-1i .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1i .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1i .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1i .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1i .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1i .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1i .item .sublabel{font-size:12px;line-height:14px}.item.s-1i:not(.mobile) p:where(.s-1i),.sub-menu.s-1i .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function ev(t,e){B(e,!0),Q(t,WS);let[i,o]=Be(),r=()=>w(p,"$isFullscreen",i),a=()=>w(v,"$playerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"playerControlsHeight",3,0),s=g(e,"ariaLabelReturnFromSubMenu",19,()=>Y("aria_label_submenu_back")),u=g(e,"listRef",15);Mt(()=>{let G=e.items.findIndex(oe=>oe.selected);u().children[G+1].focus()});let m=ye(),p=m.ui.isFullscreen,v=m.ui.playerSize,$=K(void 0),y=K(0),b=K(0),x=f(()=>l()&&r()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n(b)-d()}px; overflow: auto;`),I=f(()=>Math.max(e.minWidth,n(y)));var C=zS();let R;var k=T(C);let P;k.__keydown=[HS,e];var E=T(k);let W;E.__click=[FS,e],E.__keydown=[US,e];var F=T(E);Vr(F,{direction:"left"});var U=A(F,2),j=T(U,!0);S(U),S(E),tt(E,G=>D($,G),()=>n($));var re=A(E,2);yi(re,17,()=>e.items,_d,(G,oe)=>{var X=De(),Ie=ae(X);{var fe=be=>{Xm(be,{get item(){return n(oe)},get isMobile(){return l()}})},ee=(be,Ce)=>{{var de=We=>{Zm(We,{get isMobile(){return l()},get item(){return n(oe)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};M(be,We=>{n(oe).type==="OPEN_SUB_MENU"&&We(de)},Ce)}};M(Ie,be=>{n(oe).type==="SELECT_VALUE"?be(fe):be(ee,!1)})}_(G,X)}),S(k),tt(k,G=>u(G),()=>u()),S(C),O((G,oe,X)=>{R=ie(C,1,"sub-menu menu s-1i",null,R,G),Oe(C,"data-testid",`${e.id}-sub-menu`),Ke(C,`min-width: ${n(I)}px`),P=ie(k,1,"items s-1i",null,P,oe),Ke(k,n(x)),W=ie(E,1,"item header back s-1i",null,W,X),Oe(E,"aria-label",s()),he(j,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),En(E,"clientWidth",G=>D(y,G)),En(E,"clientHeight",G=>D(b,G)),_(t,C),H(),o()}et(["keydown","click"]);import{noop as KS}from"@vkontakte/videoplayer-shared/es2015";var qS=(t,e)=>Eu(t,e()),QS=(t,e)=>{t.stopPropagation(),e()()},GS=L('<div class="value s-1k"> </div>'),YS=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),jS={hash:"s-1k",code:".value.s-1k{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function tv(t,e){B(e,!0),Q(t,jS);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,KS),r=g(e,"valueComponent",3,void 0),a=g(e,"iconProps",19,()=>({})),l=g(e,"ref",15);var d=YS();let s;d.__click=[QS,o],d.__keydown=[qS,o];var u=T(d),m=T(u);{var p=C=>{Ka(C,{get icon(){return e.icon}})},v=C=>{var R=De();let k=f(()=>e.icon);var P=ae(R);Hi(P,()=>n(k),(E,W)=>{W(E,Jr(a))}),_(C,R)};M(m,C=>{typeof e.icon=="string"?C(p):C(v,!1)})}S(u);var $=A(u,2),y=T($,!0);S($);var b=A($,2);{var x=C=>{var R=De();let k=f(r);var P=ae(R);Hi(P,()=>n(k),(E,W)=>{W(E,{})}),_(C,R)},I=C=>{var R=GS(),k=T(R,!0);S(R),O(()=>he(k,e.value)),_(C,R)};M(b,C=>{r()?C(x):C(I,!1)})}S(d),tt(d,C=>l(C),()=>l()),O(C=>{s=ie(d,1,"item",null,s,C),Oe(d,"aria-label",e.ariaLabel),Oe(d,"data-testid",e.id),he(y,e.label)},[()=>({mobile:i()})]),_(t,d),H()}et(["click","keydown"]);import{noop as xb}from"@vkontakte/videoplayer-shared/es2015";var XS=(t,e)=>{Nl(t,()=>e())},ZS=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),JS=L('<img class="icon" aria-hidden="true"/>'),eC=L('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1j"> </div></li>'),tC={hash:"s-1j",code:".label.s-1j{overflow:hidden;text-overflow:ellipsis}"};function iv(t,e){B(e,!0),Q(t,tC);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,xb),r=g(e,"closeSettings",3,xb),a=K(!1),l=()=>{D(a,!0)},d=x=>{x==null||x.stopPropagation(),o()(),r()()};var s=eC();let u;s.__click=d,s.__keydown=[XS,d];var m=T(s),p=T(m);{var v=x=>{var I=De(),C=ae(I);{var R=P=>{var E=ZS();_(P,E)},k=P=>{var E=JS();O(()=>Oe(E,"src",e.icon)),mt("error",E,l),La(E),_(P,E)};M(C,P=>{n(a)?P(R):P(k,!1)})}_(x,I)},$=x=>{var I=De();let C=f(()=>e.icon);var R=ae(I);Hi(R,()=>n(C),(k,P)=>{P(k,{})}),_(x,I)};M(p,x=>{typeof e.icon=="string"?x(v):x($,!1)})}S(m);var y=A(m,2),b=T(y,!0);S(y),S(s),O(x=>{var I;u=ie(s,1,"item",null,u,x),Oe(s,"aria-label",(I=e.ariaLabel)!=null?I:e.label),Oe(s,"data-testid",e.id),he(b,e.label)},[()=>({mobile:i()})]),_(t,s),H()}et(["click","keydown"]);import{noop as nC}from"@vkontakte/videoplayer-shared/es2015";var iC=L('<div class="toggle_wrap s-1o"><div></div> <div class="toggle-label s-1o"></div></div>'),oC={hash:"s-1o",code:'.toggle_wrap.s-1o{cursor:pointer;font-size:12px;line-height:15px;min-height:15px;padding:0;user-select:none}.toggle.s-1o{background-color:var(--toggle-color-separator);border-radius:45px;cursor:pointer;float:right;height:9px;margin-top:3px;width:28px}.toggle.s-1o:after{background-color:var(--toggle-color-off);border-radius:50%;content:"";float:left;height:15px;left:0;position:relative;top:-3px;transition:left .1s ease;width:15px}.toggle.on.s-1o:after{background-color:var(--toggle-color-on);left:13px}.toggle-label.s-1o{overflow:hidden}'};function ov(t,e){Q(t,oC);let i=g(e,"enabled",3,!1);var o=iC(),r=T(o);let a;ti(2),S(o),O(l=>a=ie(r,1,"toggle s-1o",null,a,l),[()=>({on:i()})]),_(t,o)}var rC=(t,e,i)=>{M_(t,e(),o=>i()(o))},sC=(t,e,i)=>{t.stopPropagation(),e()(!i())},aC=L('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),lC=L('<li role="menuitem" tabindex="0"><!></li>');function nv(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,nC),r=g(e,"enabled",3,!1),a=g(e,"tooltipText",3,void 0),l=g(e,"maxTooltipWidth",3,void 0);var d=lC();let s;d.__click=[sC,o,r],d.__keydown=[rC,r,o];var u=T(d);Fa(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(m,p)=>{var v=aC();let $;var y=T(v),b=T(y);{var x=P=>{Ka(P,{get icon(){return e.icon}})},I=P=>{var E=De();let W=f(()=>e.icon);var F=ae(E);Hi(F,()=>n(W),(U,j)=>{j(U,{})}),_(P,E)};M(b,P=>{typeof e.icon=="string"?P(x):P(I,!1)})}S(y);var C=A(y,2),R=T(C,!0);S(C);var k=A(C,2);ov(k,{get enabled(){return r()}}),S(v),O(P=>{$=ie(v,1,"switch-wrapper",null,$,P),he(R,e.label)},[()=>({mobile:i()})]),_(m,v)},$$slots:{default:!0}}),S(d),O(m=>{var p;s=ie(d,1,"item switch-item",null,s,m),Oe(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),Oe(d,"data-testid",e.id)},[()=>({mobile:i()})]),_(t,d),H()}et(["click","keydown"]);import{isValidURL as MC,VideoQuality as Mb}from"@vkontakte/videoplayer-shared/es2015";var wb=()=>{let t=K(li([])),e=f(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{D(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{D(t,[],!0)}}};import{getVideoQualityLabel as dC}from"@vkontakte/videoplayer-shared/es2015";var cC=L('<div class="quality-icon s-1n"><!></div>'),uC=L('<div class="quality-label s-1n"><span> </span> <!></div>'),pC={hash:"s-1n",code:".quality-label.s-1n{position:relative}.quality.s-1n{font-size:13px;line-height:18px}.quality.sub.s-1n{opacity:.7}.quality-icon.s-1n{display:flex;padding-left:2px;position:absolute;right:0;top:0;transform:translateX(100%)}.quality-icon.s-1n svg{color:var(--blue-light)}"};function Za(t,e){B(e,!0),Q(t,pC);let i=g(e,"isSubCase",3,!1),o=f(()=>e.quality?dC(e.quality):""),r=f(()=>Vu(e.quality));var a=uC(),l=T(a);let d;var s=T(l,!0);S(l);var u=A(l,2);{var m=p=>{var v=cC();let $=f(()=>n(r));var y=T(v);Hi(y,()=>n($),(b,x)=>{x(b,{})}),S(v),O(()=>Oe(v,"data-testid",`${n(o)}-icon`)),_(p,v)};M(u,p=>{n(r)&&!e.isMobile&&p(m)})}S(a),O(p=>{d=ie(l,1,"s-1n",null,d,p),he(s,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),_(t,a),H()}import{VideoQuality as fC}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as Sb}from"@vkontakte/videoplayer-core/es2015";var Cb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},Tb=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=Cb({quality:t,availableQualities:e});return i?t===Sb.INVARIANT?Y("auto_quality_invariant"):Y("auto_quality",{actual:o}):o},Ib=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===Sb.INVARIANT?i:`${i}${Cb({quality:t,availableQualities:e})}`:"...";var mC=L('<div class="menu-item-value-wrapper s-1r"><!></div>'),vC={hash:"s-1r",code:".menu-item-value-wrapper.s-1r{line-height:normal}"};function Yl(t,e){B(e,!0),Q(t,vC);let[i,o]=Be(),r=()=>w(s,"$currentQuality$",i),a=()=>w(u,"$availableQualities$",i),l=()=>w(m,"$isMobile$",i),d=ye(),s=d.state.currentQuality$,u=d.state.availableQualities$,m=d.ui.isMobile,p=" · ",v=f(()=>e.prefix+(e.selected&&r()!==fC.INVARIANT?p:"")),$=f(()=>Ib({prefix:n(v),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=mC(),b=T(y);let x=f(()=>e.selected?r():void 0);Za(b,{get quality(){return n(x)},get label(){return n($)},get isMobile(){return l()},isSubCase:!0}),S(y),_(t,y),H(),o()}var gC=t=>{let e=t.join("|"),i="<(?<keyhtml>.*?)(?<propshtml> .*?)?>(?<childrenhtml>.*?)</\\k<keyhtml>>",o=`{(?<keyi18n>${e})}(?<childreni18n>.*?){/\\k<keyi18n>}`,r="<(?<keyhtmlself>.*?)(?<propshtmlself> .*?)?/?>",a=`{(?<keyi18nself>${e})}`;return new RegExp(`${i}|${o}|${r}|${a}`,"g")},hC={br:!0,span:!0},rv=(t,e={})=>{var d,s,u,m,p,v,$;if(!t)return t;let i=Xe(Xe({},hC),e),o=Object.keys(i);if(!o.length)return t;let r=gC(o),a=[],l=0;for(let y of t.matchAll(r)){let b=y[0],x=((d=y.groups)==null?void 0:d.keyhtml)||((s=y.groups)==null?void 0:s.keyi18n)||((u=y.groups)==null?void 0:u.keyhtmlself)||((m=y.groups)==null?void 0:m.keyi18nself)||"",{index:I}=y;if(!i[x]){a.push(t.slice(l,I)),l=I+b.length;continue}let C=(p=y.groups)!=null&&p.childrenhtml?rv(y.groups.childrenhtml,i):"",R=(v=y.groups)!=null&&v.childrenhtml?b.replace(new RegExp(($=y.groups)==null?void 0:$.childrenhtml),()=>C||""):b;a.push(t.slice(l,I),R),l=I+b.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function mc(t,e){B(e,!1);let i=g(e,"message",8),o=rv(i());Zo();var r=De(),a=ae(r);{var l=d=>{var s=De(),u=ae(s);bd(u,()=>o),_(d,s)};M(a,d=>{o&&d(l)})}_(t,r),H()}var _C=L('<p class="quality-applies sublabel s-1q"><!></p>'),bC={hash:"s-1q",code:".quality-applies.s-1q{color:hsla(0,0%,100%,.5);display:flex;justify-content:end;padding:3px 0}.quality-applies span{color:#70c1ff}"};function sv(t,e){B(e,!1),Q(t,bC),Zo();var i=_C(),o=T(i);let r=mr(()=>Y("quality_applience",{action:`<span>${Y("quality_applience_action")}</span>`}));mc(o,{get message(){return n(r)}}),S(i),_(t,i),H()}var Pb=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",label:Y("other_quality"),selected:o,valueComponent:Yl,valueComponentParams:{prefix:Y("other_quality"),selected:o},children:"quality-other-settings"}},av=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:Y("auto_quality_limit"),valueComponent:e?Yl:void 0,valueComponentParams:{prefix:Y("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),Ab=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:sv,bottomBordered:!0,children:"quality-appliance"}),lv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"quality-high",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:Y("high_quality"),valueComponent:t?Yl:void 0,valueComponentParams:{prefix:Y("high_quality"),selected:i},sublabel:Y("high_quality_description")}),dv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleTrafficSaving:o})=>({id:"quality-traffic-saving",type:"SELECT_VALUE",value:"save_traffic",selectItem:()=>o(!0,e),selected:i,label:Y("traffic_saving_quality"),valueComponent:t?Yl:void 0,valueComponentParams:{prefix:Y("traffic_saving_quality"),selected:i},sublabel:Y("traffic_saving_quality_description")});var Xu=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),Zu=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,r;if(i==="und"?r=void 0:i&&(r=(l=jd(i))!=null?l:i),o&&i&&r){let d=e.filter(s=>s.label===o&&s.language===i);if(d.length===1)return Y("audio_stream_display_language_label",{language:r,label:o});{let s=Xu(t,d);return Y("audio_stream_display_language_label_index",{language:r,label:o,index:s})}}if(o){let d=e.filter(s=>s.label===o);if(d.length===1)return o;{let s=Xu(t,d);return Y("audio_stream_display_label_index",{label:o,index:s})}}if(i&&r){let d=e.filter(s=>s.language===i);if(d.length===1)return r;{let s=Xu(t,d);return Y("audio_stream_display_language_index",{language:r,index:s})}}let a=Xu(t,e);return Y("audio_stream_display_unknown",{index:a})};var $C={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:r}=t,a=[];return i&&a.push({handler:av,selected:e&&!o&&!r||!1}),a.push({handler:dv,selected:o},{handler:lv,selected:r}),{title:Y("submenu_quality"),id:"quality-settings",items:[Ab(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),Pb(t)]}},"quality-other-settings":({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"quality-other-settings",title:Y("submenu_quality"),closeSettingsMenu:t,items:i.map(r=>({type:"SELECT_VALUE",value:r.value,valueComponent:Za,valueComponentParams:{quality:r.value,label:r.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:r.selected,label:r.displayValue}))}),"quality-appliance":t=>{var i,o,r;let{closeSettingsMenu:e}=t;return{id:"quality-appliance",title:Y("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:av,selected:((i=yu())==null?void 0:i.type)==="auto_quality"},{handler:dv,selected:((o=yu())==null?void 0:o.type)==="traffic_saving"},{handler:lv,selected:((r=yu())==null?void 0:r.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-tracks":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-tracks",title:Y("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(r=>({type:"SELECT_VALUE",value:r,dataValue:r.id,selectItem:o,selected:r.id===(i==null?void 0:i.id),label:Zu(r,e)}))}),"playback-rate":({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"playback-rate",title:Y("submenu_playback_rate"),closeSettingsMenu:t,items:e.map(o=>({type:"SELECT_VALUE",value:o.value,selectItem:i,selected:o.selected,label:o.displayValue}))}),subtitles:({availableSubtitlesList:t,selectSubtitle:e})=>({id:"subtitles",minWidth:164,title:Y("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i.value,selectItem:()=>e(i),selected:i.selected,label:i.displayValue,dataTestid:i.value===kn?"sub_off":void 0}))})},kb=({subMenuId:t,context:e})=>t?[$C[t](e)]:[];var yC=ke('<path d="M3.1 9.5c0-2.24 0-3.36.44-4.22A4 4 0 015.28 3.54C6.14 3.1 7.26 3.1 9.5 3.1h5c2.24 0 3.36 0 4.22.44a4 4 0 011.74 1.74c.44.86.44 1.98.44 4.22s0 3.36-.44 4.22a4 4 0 01-1.74 1.74c-.84.43-1.93.44-4.07.44l.55 2.2h1.9a.9.9 0 010 1.8H6.9a.9.9 0 110-1.8h1.9l.55-2.2c-2.14 0-3.23-.01-4.07-.44a4 4 0 01-1.74-1.74C3.1 12.86 3.1 11.74 3.1 9.5m11.4-4.6h-5c-1.15 0-1.9 0-2.48.05-.56.04-.79.12-.92.19a2.2 2.2 0 00-.96.96 2 2 0 00-.2.92C4.9 7.6 4.9 8.35 4.9 9.5s0 1.9.05 2.48c.04.56.12.79.19.92q.33.63.96.96c.13.07.36.15.92.2.58.04 1.33.04 2.48.04h5c1.15 0 1.9 0 2.48-.05.56-.04.79-.12.92-.19a2.2 2.2 0 00.96-.96c.07-.13.15-.36.2-.92.04-.58.04-1.33.04-2.48s0-1.9-.05-2.48a3 3 0 00-.19-.92 2.2 2.2 0 00-.96-.96 2 2 0 00-.92-.2c-.58-.04-1.33-.04-2.48-.04m-3.3 11-.55 2.2h2.7l-.55-2.2z"></path>');function cv(t){Ze(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=yC();_(e,o)},$$slots:{default:!0}})}var xC=ke('<path d="M8.3 14.25c1.86 1.9 5.5.02 5.5-3.55V5.64l2.4-.7A2.74 2.74 0 0 0 18 2.37V.64a.75.75 0 0 0-.92-.62l-.26.06C15.88.3 14.93.51 14 .8c-1.33.45-2.03 1.62-2.01 3.08V9c-3.89.2-5.64 3.29-3.7 5.25ZM.9.1a.9.9 0 0 0 0 1.8h8.2a.9.9 0 0 0 0-1.8H.9ZM.9 5.1a.9.9 0 1 0 0 1.8h7.2a.9.9 0 0 0 0-1.8H.9ZM0 11c0-.5.4-.9.9-.9h4.18a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 11Z"></path>');function uv(t){Ze(t,{width:"18",height:"15",children:(e,i)=>{var o=xC();_(e,o)},$$slots:{default:!0}})}var wC=ke('<path d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69A8 8 0 0 1 11 4.07M5.69 7.1 4.26 5.68A10 10 0 0 0 2.05 11h2.02a8 8 0 0 1 1.62-3.9M2.05 13c.2 2.01 1 3.84 2.21 5.32l1.43-1.43A8 8 0 0 1 4.07 13zM11 21.95v-2.02a8 8 0 0 1-3.9-1.62l-1.42 1.43A10 10 0 0 0 11 21.95M22 12c0 5.16-3.92 9.42-8.95 9.95v-2.02C16.97 19.41 20 16.05 20 12s-3.03-7.41-6.95-7.93V2.05C18.08 2.58 22 6.84 22 12M10.69 8.58l4.74 2.73a.8.8 0 0 1 0 1.37l-4.74 2.74a.8.8 0 0 1-1.19-.68V9.26a.8.8 0 0 1 1.19-.68"></path>');function pv(t){Ze(t,{testId:"play-speed-icon",children:(e,i)=>{var o=wC();_(e,o)},$$slots:{default:!0}})}var SC=ke('<path d="M12 2a.9.9 0 01.9.9v10.93l4.56-4.57a.9.9 0 011.28 1.28l-6.1 6.1a.9.9 0 01-1.28 0l-6.1-6.1a.9.9 0 111.28-1.28l4.56 4.57V2.9A.9.9 0 0112 2M4 20a.9.9 0 01.9-.9h14.2a.9.9 0 110 1.8H4.9A.9.9 0 014 20"></path>');function fv(t){Ze(t,{testId:"download-icon",children:(e,i)=>{var o=SC();_(e,o)},$$slots:{default:!0}})}var CC=ke('<path d="M8.86 2.1h6.28c.67 0 1.2.21 1.68.7l4.38 4.38c.48.48.7 1 .7 1.68v6.28c0 .68-.22 1.2-.7 1.68l-4.38 4.38c-.48.48-1 .7-1.68.7H8.86c-.68 0-1.2-.22-1.68-.7L2.8 16.82c-.48-.48-.7-1-.7-1.68V8.86c0-.68.22-1.2.7-1.68L7.18 2.8c.48-.49 1-.7 1.68-.7m-.44 2L4.1 8.43c-.18.18-.21.24-.21.5v6.17c0 .25.03.31.2.5l4.32 4.3c.18.18.24.21.5.21h6.17c.25 0 .31-.03.5-.2l4.3-4.32c.18-.18.21-.24.21-.5V8.92c0-.25-.03-.31-.2-.5l-4.32-4.3c-.18-.18-.24-.21-.5-.21H8.92c-.25 0-.32.03-.5.2M13 16a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-.1-8.1a.9.9 0 0 0-1.8 0v5.2a.9.9 0 1 0 1.8 0z"></path>');function mv(t){Ze(t,{testId:"report-icon",children:(e,i)=>{var o=CC();_(e,o)},$$slots:{default:!0}})}var TC=ke('<path d="M4 12.3V12c0-1.47 0-2.55.08-3.4.07-.9.21-1.48.45-1.95a4.85 4.85 0 0 1 2.12-2.12 5.1 5.1 0 0 1 1.95-.45C9.5 4 10.68 4 12.3 4h4.51c-.03-.16-.09-.33-.17-.49a2.4 2.4 0 0 0-1.05-1.05c-.3-.16-.63-.21-.93-.24-.29-.02-.64-.02-1.03-.02h-1.37c-1.58 0-2.81 0-3.81.08a6.84 6.84 0 0 0-2.62.64 6.65 6.65 0 0 0-2.9 2.91c-.4.76-.57 1.6-.65 2.62-.08 1-.08 2.23-.08 3.81v1.37c0 .4 0 .74.02 1.03.03.3.08.62.24.93A2.4 2.4 0 0 0 4 16.8V12.3ZM10.08 6h-.03c-.53 0-.97 0-1.33.03-.39.03-.76.1-1.12.28a2.9 2.9 0 0 0-1.3 1.3c-.17.35-.24.72-.27 1.1C6 9.09 6 9.53 6 10.06v7.9c0 .53 0 .97.03 1.33.03.39.1.76.28 1.12a2.9 2.9 0 0 0 1.3 1.3c.35.17.72.24 1.1.27.37.03.81.03 1.33.03h6.91c.53 0 .97 0 1.33-.03.39-.03.76-.1 1.12-.28a2.9 2.9 0 0 0 1.3-1.3c.17-.35.24-.72.27-1.1.03-.37.03-.81.03-1.34v-7.9c0-.53 0-.97-.03-1.33-.03-.39-.1-.76-.28-1.12a2.9 2.9 0 0 0-1.3-1.3 2.96 2.96 0 0 0-1.1-.27C17.91 6 17.47 6 16.94 6h-6.87ZM8.41 7.92c.06-.04.18-.07.45-.1.28-.02.65-.02 1.22-.02h6.84c.57 0 .94 0 1.22.02.27.03.39.06.45.1.21.1.39.28.5.49.03.06.06.18.09.45.02.28.02.65.02 1.22v7.84c0 .57 0 .94-.02 1.22-.03.27-.06.39-.1.45-.1.21-.28.39-.49.5-.06.03-.18.06-.45.09-.28.02-.65.02-1.22.02h-6.84c-.57 0-.94 0-1.22-.02a1.23 1.23 0 0 1-.45-.1 1.1 1.1 0 0 1-.5-.49 1.23 1.23 0 0 1-.09-.45c-.02-.28-.02-.65-.02-1.22v-7.84c0-.57 0-.94.02-1.22.03-.27.06-.39.1-.45.1-.21.28-.39.49-.5Z"></path>');function Ju(t){Ze(t,{children:(e,i)=>{var o=TC();_(e,o)},$$slots:{default:!0}})}var IC=ke('<path d="M12 20.1a8.1 8.1 0 1 0 0-16.2 8.1 8.1 0 0 0 0 16.2m0 1.9a10 10 0 1 1 0-20 10 10 0 0 1 0 20m0-12.37A1.32 1.32 0 1 1 12 7a1.32 1.32 0 0 1 0 2.63m-.95 2.82c0-.54.43-.98.95-.98s.95.44.95.98v3.83c0 .54-.43.98-.95.98a.96.96 0 0 1-.95-.98z"></path>');function vv(t){Ze(t,{testId:"info-icon",children:(e,i)=>{var o=IC();_(e,o)},$$slots:{default:!0}})}var EC=L('<div class="menu-item-value-wrapper s-1v"><!></div>'),PC={hash:"s-1v",code:".menu-item-value-wrapper.s-1v{line-height:normal}"};function gv(t,e){B(e,!0),Q(t,PC);let[i,o]=Be(),r=()=>w(u,"$currentQuality$",i),a=()=>w(m,"$availableQualities$",i),l=()=>w(p,"$isAutoQualityEnabled$",i),d=()=>w(v,"$isMobile$",i),s=ye(),u=s.state.currentQuality$,m=s.state.availableQualities$,p=s.state.isAutoQualityEnabled$,v=s.ui.isMobile,$=f(()=>Tb({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=EC(),b=T(y);Za(b,{get quality(){return r()},get label(){return n($)},get isMobile(){return d()}}),S(y),_(t,y),H(),o()}var kC={"quality-settings":({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?Y("auto_quality_option"):e)||"";return{id:"quality-settings",type:"OPEN_SUB_MENU",ariaLabel:Y("aria_label_menu_quality",{actual:o}),icon:Ud,label:Y("menu_quality"),value:e,valueComponent:gv,weight:ts["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:ts["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:Y("aria_label_submenu_traffic_saving"),icon:cv,label:Y("menu_traffic_saving"),enabled:t,tooltipText:Y("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-tracks-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=Zu(t,e);return{id:"audio-tracks-settings",weight:ts["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:Y("aria_label_menu_audio_languages",{actual:i}),icon:uv,label:Y("menu_audio_languages"),value:i,children:"audio-tracks"}},"playback-rate-settings":({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(r=>r.value===e))==null?void 0:o.displayValue)||"";return{id:"playback-rate-settings",weight:ts["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:Y("aria_label_menu_rate",{actual:i}),icon:pv,label:Y("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:ts["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:Y("aria_label_menu_subtitle",{actual:t.displayValue}),icon:ca,iconProps:{type:"outline"},label:Y("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:ts.download,type:"CLICK",onClick:t,label:Y("download_video_caption"),ariaLabel:Y("aria_label_menu_download"),icon:fv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:ts.report,type:"CLICK",onClick:t,label:Y("menu_report"),ariaLabel:`${Y("menu_report")}. ${Y("aria_label_new_tab_alert")}`,icon:mv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:ts["copy-data"],type:"CLICK",onClick:t,label:Y("menu_copy_debug"),ariaLabel:Y("menu_copy_debug"),icon:Ju,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:ts["save-trace-info"],type:"CLICK",onClick:t,label:Y("menu_save_debug"),ariaLabel:Y("menu_save_debug"),icon:Ju,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:ts["debug-info"],type:"CLICK",onClick:t,ariaLabel:Y("aria_label_menu_debug_overlay"),label:Y("menu_debug_overlay"),icon:vv,isHiddenFor:["desktop"]})},Lb=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>kC[r](e)),...i.map(r=>ii(Xe({},r),{isAdditional:!0}))].filter(r=>{var a,l,d;return!((a=r==null?void 0:r.isHiddenFor)!=null&&a.length)||!((l=r==null?void 0:r.isHiddenFor)!=null&&l.includes("desktop"))&&!o||!((d=r==null?void 0:r.isHiddenFor)!=null&&d.includes("mobile"))&&o}).sort(Na)};var VC=(t,e)=>{Iu(t,e)},RC=L('<div><div> </div> <div class="close s-p" data-testid="close-settings-menu"></div></div>'),DC=L('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),OC=L("<div><!> <!></div>"),NC={hash:"s-p",code:'.settings-menu-container.mobile.s-p{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-p ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-p .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-p .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-p .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-p .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-p .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-p .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-p{line-height:40px}.settings-menu.desktop.s-p{min-width:300px}.settings-menu-container.s-p .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-p .menu.mobile.hidden{display:none}.settings-menu-container.s-p .menu .item:not(.switch-item),.settings-menu-container.s-p .menu .switch-wrapper{align-items:center;color:var(--white);cursor:pointer;display:flex;justify-content:flex-end;position:relative;white-space:nowrap}.settings-menu-container.s-p .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-p .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-p .item:not(.switch-item),.settings-menu.s-p .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-p .item.mobile:not(.switch-item),.settings-menu.s-p .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-p .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-p .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-p .item.header.mobile:where(.s-p){border-bottom:var(--divider-border);color:var(--white);column-gap:12px;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:4px}.settings-menu-container.s-p .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-p .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-p .items::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.settings-menu-container.s-p .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-p .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-p{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-p:after,.close.s-p:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-p:before{transform:rotate(45deg)}.close.s-p:after{transform:rotate(-45deg)}'};function vc(t,e){B(e,!0),Q(t,NC);let[i,o]=Be(),r=()=>w(Le,"$settingsMenuVisible",i),a=()=>w(ze,"$settingsMenuOpenedByKeyboard",i),l=()=>w(Fe,"$debugPanelVisible",i),d=()=>w(ce,"$isMobile",i),s=()=>w(Te,"$playerSize",i),u=()=>w(ue,"$hasMpegSources$",i),m=()=>w(we,"$mobileNotReportControlHidden$",i),p=()=>w(de,"$autoQualityLimitingAvailable$",i),v=()=>w(pe,"$availableSubtitlesList$",i),$=()=>w(Ee,"$isLiveWithPlaybackSpeed",i),y=()=>w(ee,"$availableAudioStreams$",i),b=()=>w(Z,"$availablePlaybackRates$",i),x=()=>w(fe,"$currentAudioStream$",i),I=()=>w(me,"$currentPlaybackRate$",i),C=()=>w(Ye,"$trafficSavingEnabled",i),R=()=>w(be,"$currentQuality$",i),k=()=>w(We,"$isAutoQualityEnabled$",i),P=()=>w(N,"$currentSubtitle$",i),E=()=>w(Rt,"$additionalSettingsMenuItems$",i),W=()=>w(ve,"$isAutoQualityAvailable$",i),F=()=>w(Ce,"$availableQualities$",i),U=()=>w(Ae,"$highQualityEnabled",i),j=g(e,"ref",15,void 0),re=g(e,"playerControlsHeight",3,0),G=li({}),oe=li({}),X=ye(),Ie=Vt(),fe=X.state.audioStream$,ee=X.state.availableAudioStreams$,be=X.state.currentQuality$,Ce=X.state.availableQualities$,de=X.state.autoQualityLimitingAvailable$,We=X.state.isAutoQualityEnabled$,ve=X.state.isAutoQualityAvailable$,me=X.state.currentPlaybackRate$,Z=X.state.availablePlaybackRates$,N=X.state.currentSubtitle$,pe=X.state.availableSubtitlesList$,le=X.state.canDownload,ue=X.state.hasMpegSources$,Le=X.ui.settingsMenu.visible$,ze=X.ui.settingsMenu.openedByBtnKeyboard$,te=X.ui.settingsMenu.ref$,ce=X.ui.isMobile,we=X.ui.mobileNotReportControlHidden$,Ee=X.state.canChangePlaybackSpeed$,Ye=X.state.trafficSavingEnabled$,Ae=X.state.highQualityEnabled$,Te=X.ui.playerSize,Fe=X.ui.debugPanelVisible,ht=X.state.isInteractiveTime$,Rt=X.ui.additionalSettingsMenuItems$,It=X.ui.t,ct=X.actions.internal.downloadVideo,Tt=X.actions.internal.closeSettingsMenu,Yt=X.actions.internal.openSettingsSubMenu,Ht=X.actions.internal.closeSettingsSubMenu,Ot=K(!1),Wt=K(void 0),q=wb();He(()=>{!r()&&q.current&&(Ht(oe[q.current]),q.popAllSubMenus())}),He(()=>{r()||D(Wt,void 0)}),He(()=>{!q.current&&n(Wt)&&k_(G,n(Wt))}),He(()=>{j()&&te.set(j())});function Me($t){return _t(this,null,function*(){var z;q.pushSubMenu($t),yield mo(),Yt($t,oe[$t]);let Ft=(z=j())==null?void 0:z.firstElementChild;Ft&&Nf(Ft)})}function Ve($t){var Ft;$t==null||$t.stopPropagation(),a()||(Ft=e.returnFocus)==null||Ft.call(e),Tt(),D(Ot,!1)}function xe($t,Ft){X.actions.internal.setQuality($t,{appliesTo:Ft,byUser:!0}),Ve()}function Ue($t){X.actions.internal.setAudioStream($t),Ve()}function Se($t,Ft){X.actions.internal.setTrafficSavingEnabled($t,Ft),Ie.features.qualityDetailsSubMenuEnabled&&Ve()}function Ct($t,Ft){X.actions.internal.setHighQualityEnabled($t,Ft),Ve()}function ge($t){X.actions.internal.setPlaybackRate($t),Ve()}function Ne($t){X.actions.internal.setSubtitle($t),Ve()}function Ge(){ct()}function lt(){MC(e.supportLink)&&window.open(e.supportLink,"_blank"),X.actions.internal.reportProblem(),X.actions.internal.pause()}function Qt(){Dl(X.actions.internal.getDebugTextData())}let At=()=>{let $t=X.actions.internal.getTraceTextData(),Ft=new Blob([...$t],{type:"application/json"}),z=window.URL.createObjectURL(Ft);Da(z,"vk_player_trace_info","json")};function di(){Fe.set(!l())}function ci(){D(Ot,!0)}function Li(){D(Ot,!1)}function vo(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-re()}px; overflow: auto;`}let go=f(()=>le&&u()&&!m()),ui=f(()=>Ie.features.trafficSaving&&!m()&&p()&&!Ie.features.qualityDetailsSubMenuEnabled),st=f(()=>v().length>0&&!m()),pi=f(()=>!!$()&&!m()),Zi=f(()=>Ie.features.audioLanguages&&y().length>=2&&!m()),ut=f(()=>!m());Mt(()=>ht.subscribe($t=>{$t&&!d()&&!n(Ot)&&!a()&&Ve()}));let Nt=f(()=>{let $t=[n(ut)&&"quality-settings",n(Zi)&&"audio-tracks-settings",n(pi)&&"playback-rate-settings",n(st)&&"subtitles-settings",n(ui)&&"traffic-saving-switch",n(go)&&"download",Ie.showSupport&&"show-support","copy-data",Ie.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(Ft=>!!Ft);return Lb({items:$t,context:{qualityDetailsSubMenuEnabled:Ie.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:b(),currentAudioStream:x(),availableAudioStreams:y(),currentPlaybackRate:I(),selectPlaybackRate:ge,trafficSavingEnabled:C(),toggleTrafficSaving:Se,currentQuality:R()||Mb.INVARIANT,isAutoQualityEnabled:k()||!1,currentSubtitle:P(),isMobile:d(),onDownloadClick:Ge,onCopyDataClick:Qt,onReportProblemClick:lt,onSaveTraceDataClick:At,toggleShowDebugInfo:di},additionalSettingsMenuItems:E()})}),vi=f(()=>kb({subMenuId:q.current,context:{availablePlaybackRates:b(),selectPlaybackRate:ge,trafficSavingEnabled:C(),toggleTrafficSaving:Se,currentQuality:R()||Mb.INVARIANT,isAutoQualityEnabled:k()||!1,isAutoQualityAvailable:W()||!1,availableQualities:F(),highQualityEnabled:U(),toggleHighQuality:Ct,availableAudioStreams:y(),availableSubtitlesList:v(),closeSettingsMenu:Tt,currentAudioStream:x(),isMobile:d(),selectAudioLanguage:Ue,selectQuality:xe,selectSubtitle:Ne}}));var nt=OC();let rt;var Pi=T(nt);{var en=$t=>{var Ft=DC();let z;Ft.__keydown=[VC,Tt];var kt=T(Ft);{var dt=wt=>{var at=RC();let Ui;var Di=T(at),Ln=T(Di,!0);S(Di);var Mn=A(Di,2);Mn.__click=Ve,S(at),O((Ti,Ji)=>{Ui=ie(at,1,"item header s-p",null,Ui,Ti),he(Ln,Ji)},[()=>({mobile:d()}),()=>It("submenu_settings")]),_(wt,at)};M(kt,wt=>{d()&&wt(dt)})}var bi=A(kt,2);let Zt;yi(bi,21,()=>n(Nt),wt=>wt.id,(wt,at)=>{var Ui=De(),Di=ae(Ui);{var Ln=Ti=>{tv(Ti,{get isMobile(){return d()},get id(){return n(at).id},get icon(){return n(at).icon},get iconProps(){return n(at).iconProps},get label(){return n(at).label},get ariaLabel(){return n(at).ariaLabel},get value(){return n(at).value},get valueComponent(){return n(at).valueComponent},onClick:()=>{Me(n(at).children),D(Wt,n(at).id,!0)},get ref(){return G[n(at).id]},set ref(Ji){G[n(at).id]=Ji}})},Mn=(Ti,Ji)=>{{var Vn=xi=>{let Vo=f(()=>`${n(at).id}-menu-item`);iv(xi,{get isMobile(){return d()},get id(){return n(Vo)},get onClick(){return n(at).onClick},get icon(){return n(at).icon},get label(){return n(at).label},get ariaLabel(){return n(at).ariaLabel},closeSettings:Ve})},bo=(xi,Vo)=>{{var Ro=ho=>{let mn=f(()=>`${n(at).id}-menu-item`);nv(ho,{get isMobile(){return d()},get id(){return n(mn)},get onClick(){return n(at).onClick},get icon(){return n(at).icon},get label(){return n(at).label},get ariaLabel(){return n(at).ariaLabel},get enabled(){return n(at).enabled},get tooltipText(){return n(at).tooltipText},get maxTooltipWidth(){return n(at).maxTooltipWidth}})};M(xi,ho=>{n(at).type==="SWITCH"&&ho(Ro)},Vo)}};M(Ti,xi=>{n(at).type==="CLICK"?xi(Vn):xi(bo,!1)},Ji)}};M(Di,Ti=>{n(at).type==="OPEN_SUB_MENU"?Ti(Ln):Ti(Mn,!1)})}_(wt,Ui)}),S(bi),tt(bi,wt=>j(wt),()=>j()),S(Ft),O((wt,at,Ui)=>{z=ie(Ft,1,"settings-menu menu s-p",null,z,wt),Zt=ie(bi,1,"items",null,Zt,at),Ke(bi,Ui)},[()=>({desktop:!d(),mobile:d(),hidden:!!q.current}),()=>({mobile:d()}),vo]),mt("mouseenter",Ft,ci),mt("mouseleave",Ft,Li),_($t,Ft)};M(Pi,$t=>{r()&&$t(en)})}var Mo=A(Pi,2);yi(Mo,17,()=>n(vi),$t=>$t.id,($t,Ft)=>{let z=f(()=>{var kt;return(kt=n(Ft).minWidth)!=null?kt:137});ev($t,{get isMobile(){return d()},get playerControlsHeight(){return re()},get returnFromSubMenu(){return q.popSubMenu},get id(){return n(Ft).id},get title(){return n(Ft).title},get closeSettingsMenu(){return Tt},openSubMenuList:Me,get items(){return n(Ft).items},get minWidth(){return n(z)},get refMenuItems(){return G},get listRef(){return oe[n(Ft).id]},set listRef(kt){oe[n(Ft).id]=kt}})}),S(nt),O($t=>rt=ie(nt,1,"settings-menu-container s-p",null,rt,$t),[()=>({mobile:d(),hidden:!r()})]),_(t,nt),H(),o()}et(["keydown","click"]);var BC=L('<button class="btn s-15"> </button>'),HC={hash:"s-15",code:"button.btn.s-15{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function hv(t,e){Q(t,HC);var i=BC();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=T(i,!0);S(i),O(()=>he(o,e.label)),_(t,i)}et(["click"]);var FC=L('<div class="container s-r"><div class="notification s-r"><div><p class="description s-r"><!></p> <!></div> <!></div></div>'),UC={hash:"s-r",code:".container.s-r{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px;z-index:var(--controls-container-z-index)}.notification.s-r{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-r{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function gc(t,e){B(e,!0),Q(t,UC);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Vt(),{ui:{t:r}}=ye(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=FC(),d=T(l),s=T(d),u=T(s),m=T(u);mc(m,{get message(){return a}}),S(u);var p=A(u,2);{var v=y=>{let b=f(()=>r("slow_video_notification_button"));hv(y,{get label(){return n(b)},get onClick(){return e.onSelectAutoQuality}})};M(p,y=>{o||y(v)})}S(s);var $=A(s,2);Ns($,{get onClick(){return e.onClose}}),S(d),S(l),Ds(3,d,()=>fa,()=>({duration:i})),_(t,l),H()}import{isIntersecting as Vb,Subscription as zC}from"@vkontakte/videoplayer-shared/es2015";var Ja="annotation",ep=class{constructor(e){this.slots=new Map;this.disabledIds=new Set(e)}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var s;let{overlay:o,id:r,controlsBehaviour:a,hideAllControls:l}=i;if(this.disabledIds.has(r))return{success:!1,message:"current slotId is disabled via config"};let d=typeof e=="function"?e():e;return d.setAttribute("slot",Ja),this.setupSlotStyles(d,o),this.shadowRootContainer.append(d),this.slots.set(r,{rootElement:d,options:i}),a&&this.runHidingControlsWhenIntersected(r,a),l&&((s=this.store)==null||s.ui.isControlsAvailable.set(!1)),{success:!0}}setupSlotStyles(e,i){switch(e.style.position="absolute",i){case"over_video":e.style.zIndex="calc(var(--video-container-z-index) + 1)";break;case"over_controls":e.style.zIndex="calc(var(--controls-container-z-index) + 1)";break;default:e.style.zIndex="0"}}runHidingControlsWhenIntersected(r,a){return _t(this,arguments,function*(e,{observedSlotElementId:i,controlsToObserve:o}){var v;let l=this.slots.get(e);if(!l)return;let d=yield this.findSlotElement(l.rootElement,i,e),{controls:s,hiddenControls:u}=((v=this.store)==null?void 0:v.ui)||{},m=new MutationObserver($=>$.forEach(()=>{let y=Fs(d,this.shadowRootContainer);o.forEach(b=>{let x=s==null?void 0:s[b],I=x?$e(x):null,C=u==null?void 0:u[b];I&&(C==null||C.set(Vb(I,y)))})}));m.observe(d,{childList:!0,subtree:!0}),l.observer=m;let p=new zC;o.forEach($=>{s&&p.add(s[$].subscribe(y=>{let b=u==null?void 0:u[$];y&&y.isDisplayed?b==null||b.set(Vb(y,Fs(d,this.shadowRootContainer))):b==null||b.set(!1)}))}),l.subs=p})}findSlotElement(e,i,o){return _t(this,null,function*(){return new Promise(r=>{let a=null,l=new MutationObserver(()=>{if(a=e.querySelector(`#${i}`),a){l.disconnect();let s=this.slots.get(o);s&&(s.observerForFindingSlotElement=void 0),r(a)}});l.observe(e,{childList:!0,subtree:!0});let d=this.slots.get(o);d&&(d.observerForFindingSlotElement=l)})})}remove(e){var u,m;let i=this.slots.get(e);if(!i)return;let{rootElement:o,observer:r,observerForFindingSlotElement:a,subs:l,options:{controlsBehaviour:d,hideAllControls:s}}=i;o&&o.remove(),[r,a].forEach(p=>p==null?void 0:p.disconnect()),l==null||l.unsubscribe(),this.slots.delete(e),s&&((u=this.store)==null||u.ui.isControlsAvailable.set(!0)),(m=d==null?void 0:d.controlsToObserve)==null||m.forEach(p=>{var v,$;($=(v=this.store)==null?void 0:v.ui.hiddenControls[p])==null||$.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var WC=L('<div class="container s-5"><!></div>'),KC={hash:"s-5",code:".container.s-5{align-items:center;animation-fill-mode:forwards;animation-name:s-5-videoPlayerStatusIconPopup;background-color:#00000073;border-radius:100%;display:flex;height:64px;justify-content:center;width:64px;will-change:opacity,scale}@keyframes s-5-videoPlayerStatusIconPopup{0%{opacity:0;scale:.6}10%{animation-timing-function:ease-in;opacity:1;scale:1}75%{opacity:1;scale:1}90%{animation-timing-function:ease-out;opacity:0;scale:.4}to{opacity:0;scale:0}}"};function hc(t,e){B(e,!0),Q(t,KC);let i=g(e,"reversed",3,!1);var o=De(),r=ae(o);Ms(r,()=>e.Icon,a=>{var l=WC(),d=T(l);Hi(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),S(l),O(()=>Ke(l,`animation-duration: ${e.duration}ms`)),_(a,l)}),_(t,o),H()}import{PlaybackState as Rb}from"@vkontakte/videoplayer-core/es2015";var qC=L('<div class="container s-1e"><!></div>'),QC={hash:"s-1e",code:".container.s-1e{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function _v(t,e){B(e,!0),Q(t,QC);let[i,o]=Be(),r=()=>w(s,"$playbackState$",i),a=()=>w(m,"$previewTrackActive",i),l=()=>w(p,"$previewTrackDragInProgress",i),d=()=>w(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:m,previewTrackDragInProgress:p}}=ye(),{features:{playbackStatusShow:v},playbackStatusAnimationDuration:$}=Vt(),y=0,b=K(null),x=K(!1);He(()=>{r()===Rb.PLAYING?D(b,An,!0):r()===Rb.PAUSED?D(b,Ws,!0):D(b,null)}),He(()=>{if(!(!v||a()||l()))return y=window.setTimeout(()=>{y=0,D(b,null)},$),()=>{y&&(window.clearTimeout(y),y=0)}}),He(()=>{d()&&!n(x)&&(D(x,!0),D(b,null))});var I=De(),C=ae(I);{var R=k=>{var P=qC(),E=T(P);hc(E,{get duration(){return $},get Icon(){return n(b)}}),S(P),_(k,P)};M(C,k=>{n(b)&&v&&k(R)})}_(t,I),H(),o()}var GC=L('<div><div data-testid="video-container"></div></div>'),YC={hash:"s-b",code:".video-container.s-b,.video-wrapper.s-b{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-b{background:var(--black)}.video-container.s-b,.video-wrapper.s-b{z-index:var(--video-container-z-index)}.video-container.s-b{transition:var(--rotate-transition-duration) ease all}.video-container.fast-rotate.s-b{transition:none}.nocursor.s-b{cursor:none}"};function el(t,e){B(e,!0),Q(t,YC);let[i,o]=Be(),r=()=>w(p,"$rotateAlpha",i),a=()=>w(v,"$playerSize",i),l=()=>w(m,"$playerPhase",i),d=()=>w(y,"$chromecastConnected$",i),s=()=>w($,"$isPlaying$",i),u=g(e,"videoContainer",15),{playerPhase:m,ui:{rotateAlpha:p,playerSize:v},state:{isPlaying$:$,chromecastConnected$:y}}=ye(),{isSmoothVideoRotate:b}=Vt(),x=f(()=>u()&&r()%180?a().height/a().width:1);var I=GC();let C;I.__contextmenu=function(...P){var E;(E=e.onContextMenu)==null||E.apply(this,P)},I.__mousedown=function(...P){var E;(E=e.onMouseDown)==null||E.apply(this,P)},I.__mouseup=function(...P){var E;(E=e.onMouseUp)==null||E.apply(this,P)},I.__click=function(...P){var E;(E=e.onClick)==null||E.apply(this,P)},I.__dblclick=function(...P){var E;(E=e.onDblClick)==null||E.apply(this,P)};var R=T(I);let k;tt(R,P=>u(P),()=>u()),S(I),O((P,E)=>{C=ie(I,1,"video-wrapper s-b",null,C,P),k=ie(R,1,"video-container s-b",null,k,E),Ke(R,`transform: rotate(${r()}deg) scale(${n(x)})`),Oe(R,"data-is-playing",s())},[()=>({hidden:l()!=="video"||d(),nocursor:e.hideCursor}),()=>({"fast-rotate":!b})]),_(t,I),H(),o()}et(["contextmenu","mousedown","mouseup","click","dblclick"]);var jC=L('<div><span class="text s-1d"> </span> <!></div>'),XC={hash:"s-1d",code:".root.s-1d{background-color:var(--double-forward-bg);border-radius:100px;color:var(--white);display:flex;gap:4px;left:50%;opacity:0;padding:6px 12px;pointer-events:none;position:absolute;top:24px;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);visibility:hidden}.root.s-1d,.root.visible.s-1d{transform:translateX(-50%)}.root.visible.s-1d{opacity:1;visibility:visible}.text.s-1d{font-size:13px;font-weight:600;line-height:16px}"};function bv(t,e){B(e,!0),Q(t,XC);let{ui:{t:i}}=ye();var o=jC();let r;var a=T(o),l=T(a,!0);S(a);var d=A(a,2);dc(d,{get size(){return"16"},fill:"currentColor"}),S(o),O((s,u)=>{r=ie(o,1,"root s-1d",null,r,s),he(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),_(t,o),H()}var ZC=L('<div class="container s-1c" role="button" data-testid="preview-track-overlay"><div class="icon s-1c"><!></div></div>'),JC={hash:"s-1c",code:".container.s-1c{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-1c,.icon.s-1c{align-items:center;display:flex;justify-content:center}.icon.s-1c{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-1c:hover .icon:where(.s-1c){transform:scale(1.15)}"};function $v(t,e){B(e,!1),Q(t,JC);let o=ye().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};Zo();var l=ZC();l.__click=a;var d=T(l),s=T(d);return An(s,{get size(){return"32"}}),S(d),S(l),Ds(3,l,()=>fa,()=>({duration:r})),_(t,l),cf(e,"handleClick",a),H({handleClick:a})}et(["click"]);var eT=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},tT=L("<div><!></div>"),iT=L('<div class="spherical-video-icon s-9"><!></div>'),oT=L("<div><!></div>"),nT=L('<div class="settings-menu s-9"><!></div>'),rT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),sT=L("<!> <!> <!>",1),aT=L('<div class="blocked s-9"></div>'),lT=L('<div class="player-wrapper s-9"><!> <div class="overlay-container"></div></div> <!>',1),dT={hash:"s-9",code:".blocked.s-9,.player-wrapper.s-9{height:100%;position:absolute;width:100%}.blocked.s-9{z-index:var(--overlay-container-z-index)}.player-wrapper.s-9 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-9{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-9{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-menu.s-9{bottom:57px;left:0;position:absolute;right:18px;transition:opacity .2s;z-index:var(--settings-menu-z-index)}"};function yv(t,e){B(e,!0),Q(t,dT);let[i,o]=Be(),r=()=>w(Br,"$notificationsToShow$",i),a=()=>w(ui,"$playerPhase",i),l=()=>w(en,"$isLoaderVisible",i),d=()=>w(Li,"$adPlaybackState",i),s=()=>w(bi,"$crashed",i),u=()=>w(Vn,"$isInteractiveTime$",i),m=()=>w(ut,"$settingsMenuVisible",i),p=()=>w(bo,"$isInteractiveExpectation$",i),v=()=>w(Zi,"$controlsVisible",i),$=()=>w(Vo,"$touched",i),y=()=>w(rs,"$graphIsOpened$",i),b=()=>w(st,"$isFullscreen",i),x=()=>w(Nr,"$autoplayNextEnabled$",i),I=()=>w(z,"$postrollPassed",i),C=()=>w(Mo,"$isEnded$",i),R=()=>w(nr,"$cursorInside",i),k=()=>w(vn,"$isControlsAvailable",i),P=()=>w($r,"$doubleForwardOn$",i),E=()=>w(tr,"$fakeIsPlaying$",i),W=()=>w(Nn,"$bottomNoSmooth",i),F=()=>w(Dr,"$interactiveTimeIndicator",i),U=()=>w(Di,"$playerSize",i),j=()=>w(Mn,"$is3DVideo",i),re=()=>w(gn,"$doubleForwardAvailable$",i),G=()=>w(rt,"$contextMenuVisible$",i),oe=()=>w(ci,"$playbackState$",i),X=()=>w(Ro,"$hotKeyMapData",i),Ie=()=>w(vi,"$scrubbingInProgress",i),fe=()=>w(nt,"$volumeChangingInProgress",i),ee=()=>w($t,"$chromecastConnected$",i),be=()=>w(on,"$controlsTimeoutActive",i),Ce=()=>w(Ln,"$adsPlaybackState",i),de=()=>w(Nt,"$settingsMenuOpenedByKeyboard",i),We=()=>w(To,"$contextMenuOpenedByKeyboard$",i),ve=()=>w(Uo,"$contextMenuOpenedByHotKey$",i),me=()=>w(xn,"$contextMenuButtonRef$",i),Z=()=>w(ar,"$contextMenuLastActiveElem$",i),N=()=>w(pi,"$isFullscreenOpenedByKeyboard",i),pe=()=>w(mn,"$positionExact$",i),le=()=>w(di,"$language$",i),ue=()=>w(Er,"$previewTrackActive$",i),Le=()=>w(Ti,"$icon3DVideoVisible",i),ze=()=>w(Ft,"$chromecastDeviceName$",i),te=()=>w(at,"$currentSubtitle$",i),ce=()=>w(Ui,"$currentSubtitleCaptions$",i),we=()=>w(vo,"$position$",i),Ee=()=>w(go,"$duration$",i),Ye=()=>w(kt,"$isLive$",i),Ae=()=>w(dt,"$isPlaying$",i),Te=()=>w(Or,"$contextMenuPosition$",i),Fe=()=>w(ho,"$showHotKeyMap",i),ht=()=>w(Pi,"$debugPanelVisible",i),Rt=()=>w(tn,"$userActionsDisabled$",i),It=g(e,"videoContainer",15),ct=g(e,"adsSlotId",3,void 0),Tt=g(e,"adsParams",3,void 0),Yt=g(e,"adsAutoplayParam",3,void 0),Ht=g(e,"duration",3,void 0),Ot=g(e,"logoTargetUrl",3,""),Wt=g(e,"showNextPrevButtons",3,!1),q=g(e,"nextButtonActive",3,!1),Me=g(e,"prevButtonActive",3,!1),Ve=g(e,"endScreenVideoTitle",3,void 0),xe=g(e,"endScreenVideoThumb",3,void 0),Ue=g(e,"isOneVideoPlaylist",3,!1),Se=g(e,"shadowRootContainer",3,void 0),Ct=g(e,"outerContainerRef",3,void 0),ge=g(e,"playerStarted",3,!1),Ne=g(e,"fullScreenTarget",3,void 0),Ge=g(e,"showMiniTimer",3,!1),lt=g(e,"showEndScreen",3,!0),Qt=g(e,"keyboardControls",15),At=e.store.getLogger().createComponentLog("Root component"),di=e.store.interfaceLanguage$,ci=e.store.state.playbackState$,Li=e.store.ads.playbackState,vo=e.store.state.positionWithScrubbing$,go=e.store.state.duration$,ui=e.store.playerPhase,st=e.store.ui.isFullscreen,pi=e.store.ui.isFullscreenOpenedByKeyboard,Zi=e.store.ui.controlsVisible,ut=e.store.ui.settingsMenu.visible$,Nt=e.store.ui.settingsMenu.openedByBtnKeyboard$,vi=e.store.ui.scrubbingInProgress,nt=e.store.ui.volumeChangingInProgress,rt=e.store.ui.contextMenu.visible$,Pi=e.store.ui.debugPanelVisible,en=e.store.state.isLoaderVisible,Mo=e.store.state.isEnded$,$t=e.store.state.chromecastConnected$,Ft=e.store.state.chromecastDeviceName$,z=e.store.ads.postrollPassed,kt=e.store.state.isLive$,dt=e.store.state.isPlaying$,bi=e.store.state.crashed$,Zt=e.store.webApi.annotationsApi,wt=e.store.webApi.pictureInPictureApi,at=e.store.state.currentSubtitle$,Ui=e.store.state.currentSubtitleCaptions$,Di=e.store.ui.playerSize,Ln=e.store.ads.playbackState,Mn=e.store.ui.is3DVideo,Ti=e.store.ui.icon3DVideoVisible,Ji=e.store.state.isInteractive,Vn=e.store.state.isInteractiveTime$,bo=e.store.state.isInteractiveExpectation$,xi=e.store.state.hasInteractiveBranches,Vo=e.store.ui.touched,Ro=e.store.ui.modals.hotKeyMap.data,ho=e.store.ui.modals.hotKeyMap.show,mn=e.store.state.positionExact$,is=e.store.ui.overlayContainer$,Dr=e.store.ui.controls.interactiveTimeIndicator,os=e.store.state.showInteractiveTimeIndicator,Or=e.store.ui.contextMenu.position$,Jn=e.store.actions.internal.setQuality,ns=e.store.actions.internal.closeSettingsMenu,Nr=e.store.ui.autoplayNextEnabled$,tn=e.store.ui.userActionsDisabled,vn=e.store.ui.isControlsAvailable,br=e.store.ui.videoTitleInfo,$r=e.store.ui.doubleForwardOn$,gn=e.store.ui.doubleForwardAvailable$,er=e.store.actions.internal.getVideoElement,yr=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:tr,notifications$:ir,graphIsOpened$:rs}=_o(),$o=K(void 0),xr=K(void 0),zi=K(void 0),wr=K(void 0),Rn,vt,Jt;Ro.set(w_());let{closeNotification:Sr,notificationsToShow$:Br}=ir,Hr=f(()=>!!r().slow_video),Dn=()=>Sr("slow_video"),On=f(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),Do=K(void 0),Nn=se(!1),or,on=se(!1),hn=se(),nr=se(!1),_n=K(!1),nn=K(!1),Mi=K(!1),ro=K(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),rn=f(()=>u()&&!m()&&!(n(_n)||n(nn))&&!(n(Mi)&&!p())),rr=!0,Cr=f(()=>e.uiConfig.features.thumbTimer&&Ge()&&a()==="video"&&!v()&&!s()&&!Ji&&(e.uiConfig.hideThumbTimerAfterTouch&&!$()||!e.uiConfig.hideThumbTimerAfterTouch)),bn=e.uiConfig.titleShowBehaviour,sr=f(()=>!["video","thumb"].includes(a())||bn==="never"||y()?!1:bn==="fullscreen"?b():!0),je=f(()=>bn==="always"||a()==="thumb"?!1:!v()),gi=K(!1),Oo=f(()=>(lt()||e.showAutoplayNext&&x())&&!!Ve()&&!!xe()&&(e.showAds&&I()||!e.showAds)&&C()&&!s()&&!n(gi)&&!xi),$n=f(()=>R()&&!(v()||n(Oo))&&!u()&&k()&&!P()),yo=K(!1),sn=f(()=>E()!==null),{toggle:so}=tr,xo=!1,Ai=null;wt==null||wt.setContext(id());let Fr=()=>{e.autoplay&&!Ji&&e.uiConfig.controls.showOnStartupAtAutoplay&&Wi(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:Fr});let Bn=()=>{window.clearTimeout(Rn),on.set(!1)},ys=()=>{window.clearTimeout(vt),hn.set(null)},Wi=_e=>{Bn(),on.set(!0),Rn=window.setTimeout(()=>on.set(!1),_e);let St=_e-100;or=window.setTimeout(()=>{W()&&Nn.set(!1)},St>0?St:_e)},xs=(_e,St)=>{ys(),hn.set(St),vt=window.setTimeout(()=>hn.set(null),_e)},ss=Mn.subscribe(_e=>{Ti.set(_e),_e&&(window.clearTimeout(Jt),Jt=window.setTimeout(()=>Ti.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Tr=()=>_t(null,null,function*(){var St,Xt,ei,zo;let _e=ra();if(_e){let lo=Ad(),co=an();_e=lo===co||lo===Se()}if(_e){Wi(e.uiConfig.controls.hideTimeoutFullscreen);try{yield wt==null?void 0:wt.exit()}catch(lo){At({message:String(lo)})}}st.set(_e),e.store.getAdmanWrapper().setFullscreen(_e),b()?(Xt=(St=e.store.callbacks)==null?void 0:St.onFullscreenEnter)==null||Xt.call(St):(zo=(ei=e.store.callbacks)==null?void 0:ei.onFullscreenExit)==null||zo.call(ei)}),No=_e=>{Di.set(_e)},Ur=()=>{if(n($o)){let{width:_e,height:St}=n($o).getBoundingClientRect();Di.set({width:_e,height:St})}};Mt(()=>{var St;return Cu(Tr),e.uiConfig.features.annotationsInside&&(Zt==null||Zt.init(n($o))),wt==null||wt.assignPlayerContainer(n($o)),e.uiConfig.disablePiPResizeHandling||wt==null||wt.setExternalEventHandlers({resize:No,leavepictureinpicture:Ur}),e.interactiveContainer&&((St=It().parentElement)==null||St.insertBefore(e.interactiveContainer,It().nextSibling)),()=>{window.clearTimeout(Rn),window.clearTimeout(or),window.clearTimeout(vt),window.clearTimeout(Jt),ss(),wt==null||wt.dispose().catch(Xt=>{At({message:String(Xt)})}),Tu(Tr)}});let an=()=>{let _e=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!Ct()?n($o):Ct(),St=_e.getRootNode(),Xt=St instanceof ShadowRoot?St.host:St,ei=Ne()instanceof HTMLElement&&Ne().contains(Xt);return e.uiConfig.allowChangingFullscreenTarget&&Ne()&&ei?Ne():_e},Vi=()=>{rt.set(!1)},qe=()=>{ns(),Vi()},Lt=()=>_t(null,null,function*(){if(!yr()){At({message:"fullscreen disabled"});return}Vi(),ra()?(yield Su(document),At({message:"exit fullscreen"})):(At({message:"request fullscreen"}),yield wu(an()))}),fi=_e=>{y()||(_e.preventDefault(),rt.set(!0),Or.set({left:_e.clientX,top:_e.clientY}))};function Bo(){nr.set(!0),Ji||Wi(e.uiConfig.controls.hideTimeoutCursor)}function wo(_e){var lo,co;let{relatedTarget:St}=_e,ei=!!(St&&((lo=n(zi))!=null&&lo.contains(St)))&&((co=Qt())==null?void 0:co.isFocused()),zo=e.uiConfig.controls.showOnStartupAtAutoplay||!!St;!Ji&&!ei&&zo&&(Nn.set(!0),Wi(e.uiConfig.controls.hideTimeoutCursor))}function So(){nr.set(!1),D(nn,!1),D(_n,!1),xo=!1,e.store.actions.internal.releaseCamera(),Wi(e.uiConfig.controls.hideTimeout),P()&&Fo()}function Ki(_e){return _e?_e.offsetTop+Ki(_e.offsetParent):0}function Ho(_e){return _e?_e.offsetLeft+Ho(_e.offsetParent):0}function Hn(_e){if(F()&&os){let St=_e.currentTarget,Xt=Ki(St),ei=Ho(St),zo=_e.pageX-ei,lo=_e.pageY-Xt,{left:co,bottom:ls,right:wn}=F(),Is=wn-co;return zo>=co-Is&&lo<=ls+Is}}function Ir(_e){if(n($o)){let St=Ki(_e.currentTarget),Xt=U().height,ei=_e.pageY-St;if(Hn(_e)){D(nn,!1);return}ei<40?D(nn,!0):ei>Xt-40?D(_n,!0):(D(nn,!1),m()||D(_n,!1))}}function Co(_e){Ir(_e),!n(rn)&&!P()&&Wi(e.uiConfig.controls.hideTimeoutCursor),j()&&xo&&Ai&&e.store.actions.internal.moveCameraFocusPX(Ai.clientX-_e.clientX,Ai.clientY-_e.clientY,_e.timeStamp-Ai.timeStamp),Ai=_e}let ao=null,yn=()=>{ao=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),Bn()},e.uiConfig.doubleForwardActivationTime)},Fo=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),ao&&clearTimeout(ao),ao=null},Fn=_e=>{_e.preventDefault(),_e.button===0&&(xo=!0,e.store.actions.internal.holdCamera(),re()&&yn()),!xo&&Wi(e.uiConfig.controls.hideTimeoutCursor)},zr=_e=>{_e.preventDefault(),_e.button===0&&(Ai=_e,xo=!1,e.store.actions.internal.releaseCamera()),!P()&&Wi(e.uiConfig.controls.hideTimeoutCursor)},Wr=_e=>{_e.preventDefault(),rr&&(At({message:"double click on video"}),Lt(),Wi(e.uiConfig.controls.hideTimeoutCursor))},Un=_e=>{var St;if(_e.preventDefault(),P()){Fo();return}if(ao&&Fo(),G()||m()){qe();return}if(!(C()&&!xi)){if(n(sn))return so();if((St=Qt())==null||St.focus(),!ge()){e.firstStart(),Wi(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||oe()!==Ob.PLAYING)&&e.store.actions.internal.togglePlay(),Wi(e.uiConfig.controls.hideTimeoutCursor)}},it=_e=>{qe(),Vo.set(!0),Wi(e.uiConfig.controls.hideTimeout),_e&&xs(e.uiConfig.controls.hideHotKeyHelpers,_e)},jt=()=>{var _e,St;qe(),(_e=e.store.callbacks)!=null&&_e.onOpenHotKeyMap?(St=e.store.callbacks)==null||St.onOpenHotKeyMap(X()):ho.update(Xt=>!Xt)},wi=()=>{Vo.set(!0)},To=e.store.ui.contextMenu.openedByBtnKeyboard$,xn=e.store.ui.contextMenu.btnRef$,zn=K(void 0),Uo=e.store.ui.contextMenu.openedByHotKey$,ar=e.store.ui.contextMenu.lastActiveElem$,as=K(!1),Er=e.store.ui.previewTrackActive;He(()=>{is.set(n(Do))}),He(()=>{D(Mi,n(ro)&&oe()!==Ob.PLAYING,!0),n(ro)||Et(()=>D(ro,!0))}),He(()=>{var St,Xt;let _e=(n(Mi)||C()||m()||Ie()||fe()||ee()||be()||n(as))&&!n(rn)&&(a()==="video"||a()==="ads"&&(e.uiConfig.controls.showOnStartupAtAutoplay||Ce()!=="inactive"))&&!s()&&k();Zi.set(_e),!_e&&!be()&&((St=n(zi))!=null&&St.contains(Mu()))&&((Xt=Qt())==null||Xt.focus())}),He(()=>{!Ie()&&n(yo)&&!u()&&Wi(e.uiConfig.controls.hideTimeoutCursor),Et(()=>D(yo,Ie(),!0))}),He(()=>{n(wr),m(),de(),Et(()=>Dd(n(wr),m(),de()))}),He(()=>{n(zn),G(),We(),ve(),Et(()=>{let _e=We()||ve();Dd(n(zn),G(),_e)})}),He(()=>{let _e=me();_e&&(G(),Et(()=>Ol(_e,G(),To)))}),He(()=>{let _e=Z();_e&&(G(),Et(()=>A_(_e,G(),Uo)))}),He(()=>{var _e;!N()&&b()&&(Et(()=>pi.set(!1)),(_e=Qt())==null||_e.focus())}),He(()=>{y()&&qe()});let ws=K(void 0),qs=_e=>{br.set(Xn(er(),{title:n(ws)},"title",_e))},va=(_e,St)=>{var lo,co;let Xt=(co=(lo=e.store.callbacks)==null?void 0:lo.uiInfo)==null?void 0:co.onUpcomingLiveViewStateChanged;if(!Xt)return;let ei=!!St,zo=Xe(Xe({},Xn(n($o),{upcomingLiveScreen:St},"upcomingLiveScreen",ei)),_e);Xt(zo)},pt="",ai=f(()=>{var _e;return n(je)?pt:(_e=e.getVideoDeeplink)==null?void 0:_e.call(e,pe())});He(()=>{pt=n(ai)});var Io=lT();mt("blur",Ea,qe);var Si=ae(Io);Si.__mousemove=Co;var eo=T(Si);let Ss=f(()=>a()==="ads"),Cs=f(()=>n(sn)?so:void 0);tt(Wf(eo,{startDoubleForwardActivationTimer:yn,stopDoubleForward:Fo,toggleFullscreen:Lt,hideContextMenu:qe,showHotKeyHelpers:it,showKeyMap:jt,get isAds(){return n(Ss)},get fakePlayButtonHandler(){return n(Cs)},get nextButtonActive(){return q()},get prevButtonActive(){return Me()},children:(_e,St)=>{var Xt=sT(),ei=ae(Xt);el(ei,{get hideCursor(){return n($n)},onClick:Un,onContextMenu:fi,onMouseDown:Fn,onMouseUp:zr,onDblClick:Wr,get videoContainer(){return It()},set videoContainer(co){It(co)}});var zo=A(ei,2);Va(zo,()=>"slot",!1,(co,ls)=>{io(co,()=>({name:Ja}))});var lo=A(zo,2);Ms(lo,le,co=>{var ls=rT(),wn=ae(ls);let Is=f(()=>a()!=="thumb"||s()||Ji&&e.autoplay);ja(wn,{get hidden(){return n(Is)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:fi,onClick:Vi});var ga=A(wn,2);{var ha=Qe=>{$v(Qe,{})};M(ga,Qe=>{ue()&&Qe(ha)})}var Kr=A(ga,2);_v(Kr,{});var ds=A(Kr,2);bv(ds,{get isVisible(){return P()}});var lr=A(ds,2);{var il=Qe=>{let hi=f(()=>{var Ko;return(Ko=e.live)==null?void 0:Ko.startTime});pc(Qe,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(hi)},onUpcomingLiveViewStateChanged:va,onContextMenu:fi,onClick:Vi})};M(lr,Qe=>{a()==="LiveWaitingStart"&&Qe(il)})}var ol=A(lr,2);{var qr=Qe=>{Xa(Qe,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:fi,onClick:Vi})};M(ol,Qe=>{a()==="LiveWaitingRecover"&&Qe(qr)})}var nl=A(ol,2);{var rl=Qe=>{Xa(Qe,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:fi,onClick:Vi})};M(nl,Qe=>{a()==="LiveWaitingRecord"&&Qe(rl)})}var sl=A(nl,2);{var Xl=Qe=>{var hi=tT();let Ko;var Pr=T(hi);kd(Pr,{get adsSlotId(){return ct()},get adsParams(){return Tt()},get adsAutoplayParam(){return Yt()},get duration(){return Ht()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson}}),S(hi),O(Eo=>Ko=ie(hi,1,"ads-container s-9",null,Ko,Eo),[()=>({hidden:a()!=="ads"})]),_(Qe,hi)};M(sl,Qe=>{e.showAds&&ge()&&Qe(Xl)})}var _a=A(sl,2);{var al=Qe=>{let hi=f(()=>!lt()&&e.showAutoplayNext&&x());Ff(Qe,{get title(){return Ve()},get thumb(){return xe()},get isHide(){return n(hi)},clickCloseIcon:()=>D(gi,!0)})};M(_a,Qe=>{n(Oo)&&Ve()&&xe()&&Qe(al)})}var ft=A(_a,2);{var gt=Qe=>{let hi=f(()=>b()?"md":"sm"),Ko=f(()=>{var Pr;return(Pr=e.store.callbacks)==null?void 0:Pr.onTitleClicked});Gm(Qe,{get title(){return e.title},get isHidden(){return n(je)},onVisibilityChanged:qs,get titleLinkHref(){return n(ai)},onMouseEnter:()=>{D(as,!0)},onMouseLeave:()=>{D(as,!1)},get size(){return n(hi)},get onTitleClicked(){return n(Ko)},get ref(){return n(ws)},set ref(Pr){D(ws,Pr,!0)}})};M(ft,Qe=>{n(sr)&&Qe(gt)})}var $i=A(ft,2);{var Wo=Qe=>{let hi=f(()=>a()==="video"&&v());cc(Qe,{get isShifted(){return n(hi)}})};M($i,Qe=>{j()&&Qe(Wo)})}var Qi=A($i,2);{var _i=Qe=>{var hi=iT(),Ko=T(hi);Pd(Ko,{}),S(hi),_(Qe,hi)};M(Qi,Qe=>{Le()&&Qe(_i)})}var Oi=A(Qi,2);{var ba=Qe=>{uc(Qe,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return ze()},onClick:Un,onContextMenu:fi,onDblClick:Wr})};M(Oi,Qe=>{ee()&&Qe(ba)})}var ll=A(Oi,2);{var fp=Qe=>{Ga(Qe,{get shifted(){return v()},get captions(){return ce()},get position(){return we()},get playerSize(){return U()}})};M(ll,Qe=>{te().value!=="off"&&a()==="video"&&Qe(fp)})}var Pc=A(ll,2);{var mp=Qe=>{var hi=oT();hi.__contextmenu=fi,hi.__click=[eT,G,rt,m,ut,qe];var Ko=T(hi);Ya(Ko,{}),S(hi),_(Qe,hi)};M(Pc,Qe=>{s()&&Qe(mp)})}var Ac=A(Pc,2);{var vp=Qe=>{let hi=f(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),Ko=f(()=>a()==="ads"),Pr=f(()=>e.canRewindLive&&Ee()!==0);lc(Qe,{get bottomHidden(){return n(hi)},get bottomNoSmooth(){return W()},get showControls(){return v()},get isAds(){return n(Ko)},get canRewindLive(){return n(Pr)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Ot()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Wt()},get nextButtonActive(){return q()},get prevButtonActive(){return Me()},get isOneVideoPlaylist(){return Ue()},customFullscreenSupported:rr,toggleFullscreen:Lt,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(xr)},set playerControlsWrapperRef(Eo){D(xr,Eo,!0)},get playerControlsRef(){return n(zi)},set playerControlsRef(Eo){D(zi,Eo,!0)}})};M(Ac,Qe=>{ge()&&Qe(vp)})}var kc=A(Ac,2);{var gp=Qe=>{var hi=nT(),Ko=T(hi);let Pr=f(()=>{var Eo;return(Eo=n(zi))==null?void 0:Eo.clientHeight});vc(Ko,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(Pr)},returnFocus:()=>{var Eo;return(Eo=Qt())==null?void 0:Eo.focus()},get ref(){return n(wr)},set ref(Eo){D(wr,Eo,!0)}}),S(hi),_(Qe,hi)};M(kc,Qe=>{!ee()&&a()!=="ads"&&Qe(gp)})}var Lc=A(kc,2);let hp=f(()=>!n(Cr));Vd(Lc,{get isLive(){return Ye()},get isHidden(){return n(hp)},get isPlaying(){return Ae()},get position(){return we()},get duration(){return Ee()}});var $a=A(Lc,2);qm($a,{get data(){return hn}});var Mc=A($a,2);Hf(Mc,{get supportLink(){return e.supportLink},returnFocus:()=>{var Qe;return(Qe=Qt())==null?void 0:Qe.focus()},get visible(){return G()},get playerContainerRef(){return n($o)},get position(){return Te()},get menuElementRef(){return n(zn)},set menuElementRef(Qe){D(zn,Qe,!0)}});var Qs=A(Mc,2);{var dl=Qe=>{gc(Qe,{onClose:Dn,onSelectAutoQuality:()=>{Jn("auto"),Dn()}})};M(Qs,Qe=>{n(Hr)&&Qe(dl)})}var Vc=A(Qs,2);{var Rc=Qe=>{Ha(Qe,{})};M(Vc,Qe=>{n(On)&&Qe(Rc)})}var cl=A(Vc,2);{var Dc=Qe=>{Qf(Qe,{})};M(cl,Qe=>{Fe()&&Qe(Dc)})}var _p=A(cl,2);{var Oc=Qe=>{Bd(Qe,{})};M(_p,Qe=>{ht()&&Qe(Oc)})}_(co,ls)}),_(_e,Xt)},$$slots:{default:!0}}),_e=>Qt(_e),()=>Qt());var Ts=A(eo,2);tt(Ts,_e=>D(Do,_e),()=>n(Do)),S(Si),tt(Si,_e=>D($o,_e),()=>n($o));var qi=A(Si,2);{var ki=_e=>{var St=aT();_(_e,St)};M(qi,_e=>{Rt()&&_e(ki)})}mt("mouseenter",Si,Bo),mt("mouseleave",Si,So),mt("click",Si,wi,!0),mt("focusin",Si,wo,!0),_(t,Io),H(),o()}et(["mousemove","contextmenu","click"]);import{clientChecker as _c,PlaybackState as bT}from"@vkontakte/videoplayer-core/es2015";import{noop as $T}from"@vkontakte/videoplayer-shared/es2015";var cT=L('<div></div> <div class="info s-q"><div class="triangles-wrapper s-q"><div></div> <div></div> <div></div></div> <p class="step-caption s-q"> </p></div>',1),uT=L("<div><!></div>"),pT={hash:"s-q",code:".double-click-area.s-q{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-q{left:0}.double-click-area.right.s-q{right:0}.semicircle.s-q{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-q{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-q{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-q{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-q,.triangles-wrapper.s-q{display:flex;justify-content:center}.triangles-wrapper.s-q{margin-bottom:10px;position:relative}.triangle.s-q{animation:s-q-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-q:nth-child(3),.triangle.right.s-q:first-child{animation-delay:0s}.triangle.left.s-q:nth-child(2),.triangle.right.s-q:nth-child(2){animation-delay:.1s}.triangle.left.s-q:first-child,.triangle.right.s-q:nth-child(3){animation-delay:.2s}@keyframes s-q-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-q{border-right:8px solid var(--white)}.triangle.right.s-q{border-left:8px solid var(--white)}.triangle.s-q:not(:last-child){margin-right:5px}.step-caption.s-q{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function tp(t,e){B(e,!0),Q(t,pT);let i=g(e,"seekStep",3,0),o=K(!1),r=0,a=0,l=K(li(i())),d=p=>{p.stopPropagation(),a+=1,D(l,i()*(a-1)),a===1?e.handleSingleFirstClick(p):(D(o,!0),e.handleSecondClick()),window.clearTimeout(r),r=window.setTimeout(()=>{a=0,D(o,!1)},300)};cn(()=>{window.clearTimeout(r)});var s=uT();s.__click=d;var u=T(s);{var m=p=>{var v=cT(),$=ae(v),y=A($,2),b=T(y),x=T(b),I=A(x,2),C=A(I,2);S(b);var R=A(b,2),k=T(R,!0);S(R),S(y),O(P=>{var E,W,F,U;ie($,1,`semicircle ${(E=e.side)!=null?E:""}`,"s-q"),ie(x,1,`triangle ${(W=e.side)!=null?W:""}`,"s-q"),ie(I,1,`triangle ${(F=e.side)!=null?F:""}`,"s-q"),ie(C,1,`triangle ${(U=e.side)!=null?U:""}`,"s-q"),he(k,P)},[()=>Y("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),_(p,v)};M(u,p=>{n(o)&&p(m)})}S(s),O(()=>{var p;return ie(s,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-q")}),_(t,s),H()}et(["click"]);var fT=(t,e,i)=>{e(!1),i()},mT=L('<div class="overlay s-j"></div> <div class="next-video s-j"><div class="top s-j"><div class="caption s-j"> </div> <!></div> <div class="row s-j"><div class="column s-j"><div class="thumb s-j"><div></div> <!></div></div> <div class="column s-j"><div class="title s-j"> </div></div></div></div>',1),vT={hash:"s-j",code:".overlay.s-j{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-j{display:flex;flex-direction:column;left:50%;margin:0 auto;max-width:362px;min-width:320px;padding-bottom:12px;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:var(--end-screen-mobile-z-index)}.top.s-j{display:flex;justify-content:space-between}.caption.s-j{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-j{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-j{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-j{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-j,.thumb-overlay.s-j{height:100%;width:100%}.thumb-overlay.s-j{position:absolute}.thumb-overlay.withOpacity.s-j{background:var(--black);opacity:.3}.title.s-j{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function xv(t,e){B(e,!0),Q(t,vT);let[i,o]=Be(),r=()=>w(d,"$autoplayNextEnabled$",i),a=()=>w(s,"$timerNextVideoRunning$",i),l=ye(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,m=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),v()},b=()=>{e.clickCloseIcon(),$()};Mt(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),v())});var x=De(),I=ae(x);{var C=R=>{var k=mT(),P=A(ae(k),2),E=T(P),W=T(E),F=T(W,!0);S(W);var U=A(W,2);Ns(U,{onClick:b}),S(E);var j=A(E,2);j.__click=[fT,u,p];var re=T(j),G=T(re),oe=T(G);let X;var Ie=A(oe,2);{var fe=de=>{Hd(de,{get isRunning(){return a()},onTimerEnded:y})};M(Ie,de=>{r()&&de(fe)})}S(G),S(re);var ee=A(re,2),be=T(ee),Ce=T(be,!0);S(be),S(ee),S(j),S(P),O((de,We)=>{he(F,de),Ke(G,`background-image: url('${e.thumb}')`),X=ie(oe,1,"thumb-overlay s-j",null,X,We),he(Ce,e.title)},[()=>r()?Y("end_screen_next_video"):Y("end_screen_recommended_video"),()=>({withOpacity:r()})]),_(R,k)};M(I,R=>{e.isHide||R(C)})}_(t,x),H(),o()}et(["click"]);import{clientChecker as gT}from"@vkontakte/videoplayer-core/es2015";var Nb=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Mt(()=>{gT.device.isIOS&&(o=setTimeout(()=>{let a=t().querySelector("video");if(!a)return;let l=()=>e(!0),d=()=>e(!1);a.addEventListener("webkitbeginfullscreen",l),a.addEventListener("webkitendfullscreen",d),i=()=>{a.removeEventListener("webkitbeginfullscreen",l),a.removeEventListener("webkitendfullscreen",d)}},0))}),cn(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as hT}from"@vkontakte/videoplayer-core/es2015";var ip=class{constructor(e){this.video=e}getTracksArray(){return Array.from(this.video.getElementsByTagName("track"))}attach(e,i=!1){let o=document.createElement("track");o.setAttribute("src",e.url),o.setAttribute("id",e.id),e.label&&o.setAttribute("label",e.label),e.language&&o.setAttribute("srclang",e.language),i&&(o.track.mode="showing"),this.video.appendChild(o)}detachAll(){for(let e of this.getTracksArray())this.video.removeChild(e)}updateSrc(e){let i=this.getTracksArray().find(o=>o.id===e.id);i&&(i.src=e.url)}getCurrentShowingId(){var e,i;return(i=(e=this.getTracksArray().find(o=>o.track.mode==="showing"))==null?void 0:e.id)!=null?i:null}};import{clientChecker as _T}from"@vkontakte/videoplayer-core/es2015";var Bb=({store:t,getFullscreenTarget:e})=>{let{isFullscreen:i}=t.ui,{setSubtitle:o}=t.actions.internal,{currentSubtitle$:r,availableSubtitlesList$:a,currentFormat$:l,availableTextTracks$:d}=t.state,s=null,u=()=>e().querySelector("video"),m=()=>_T.device.isIOS&&$e(l)===hT.DASH_LIVE_CMAF,p=()=>{s==null||s(),s=null},v=$=>{if(p(),!m()||!$)return;let y=u();if(!y)return;let b=new ip(y),x=$e(d),I=$e(a),C=$e(r);for(let P of x)I.some(W=>W.value===P.id)&&b.attach(P,C.value===P.id);let R=d.subscribe(P=>{for(let E of P)b.updateSrc(E)}),k=()=>{let P=b.getCurrentShowingId();o($e(a).find(E=>E.value===P))};y.textTracks.addEventListener("change",k),s=()=>{R(),b.detachAll(),y.textTracks.removeEventListener("change",k)}};Mt(()=>i.subscribe(v)),cn(p)};var yT=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},xT=L("<!> <!>",1),wT=L("<div><!></div>"),ST=L('<div class="spherical-video-icon s-8"><!></div>'),CT=L("<div><!></div>"),TT=L('<div class="settings-mobile s-8"><!></div>'),IT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),ET=L('<div class="player-wrapper s-8" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),PT={hash:"s-8",code:".player-wrapper.s-8{height:100%;position:absolute;width:100%}.player-wrapper.s-8 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-8{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-8{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-mobile.s-8{align-items:center;display:flex;left:50%;max-width:320px;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);width:90%;z-index:var(--settings-menu-z-index)}"};function wv(t,e){var bn,sr;B(e,!0),Q(t,PT);let[i,o]=Be(),r=()=>w(Ue,"$playerPhase",i),a=()=>w(ci,"$isLoaderVisible",i),l=()=>w(Me,"$adPlaybackState",i),d=()=>w(Nt,"$crashed",i),s=()=>w(Or,"$notificationsToShow$",i),u=()=>w(q,"$playbackState$",i),m=()=>w(Ht,"$graphIsOpened$",i),p=()=>w(Ne,"$interactiveHideMobileControls",i),v=()=>w(Li,"$isEnded$",i),$=()=>w(bi,"$isInteractiveExpectation$",i),y=()=>w(Ct,"$controlsVisible",i),b=()=>w(at,"$touched",i),x=()=>w(Di,"$autoplayNextEnabled$",i),I=()=>w(ui,"$postrollPassed",i),C=()=>w(Nr,"$bottomNoSmooth",i),R=()=>w(rt,"$videoSize",i),k=()=>w($t,"$playerSize",i),P=()=>w(Se,"$isFullscreen",i),E=()=>w(Ve,"$position$",i),W=()=>w(xe,"$duration$",i),F=()=>w(Ln,"$loadedMetadata",i),U=()=>w(Ge,"$settingsMenuVisible",i),j=()=>w(Qt,"$scrubbingInProgress",i),re=()=>w(At,"$volumeChangingInProgress",i),G=()=>w(vo,"$chromecastConnected$",i),oe=()=>w(ge,"$isControlsAvailable",i),X=()=>w(dt,"$isInteractiveTime$",i),Ie=()=>w(Zi,"$isActiveLive",i),fe=()=>w(lt,"$settingsMenuOpenedByKeyboard",i),ee=()=>w(Wt,"$language$",i),be=()=>w(wt,"$disabledControls$",i),Ce=()=>w(Ft,"$is3DVideo",i),de=()=>w(z,"$icon3DVideoVisible",i),We=()=>w(go,"$chromecastDeviceName$",i),ve=()=>w(Pi,"$currentSubtitle$",i),me=()=>w(en,"$currentSubtitleCaptions$",i),Z=()=>w(Mo,"$realDuration$",i),N=()=>w(st,"$isLive$",i),pe=()=>w(pi,"$isPlaying$",i),le=()=>w(di,"$debugPanelVisible",i),ue=g(e,"videoContainer",15),Le=g(e,"adsSlotId",3,void 0),ze=g(e,"adsParams",3,void 0),te=g(e,"adsAutoplayParam",3,void 0),ce=g(e,"duration",3,void 0),we=g(e,"logoTargetUrl",3,""),Ee=g(e,"showNextPrevButtons",3,!1),Ye=g(e,"nextButtonActive",3,!1),Ae=g(e,"prevButtonActive",3,!1),Te=g(e,"endScreenVideoTitle",3,void 0),Fe=g(e,"endScreenVideoThumb",3,void 0),ht=g(e,"isOneVideoPlaylist",3,!1),Rt=g(e,"showMiniTimer",3,!1),It=g(e,"fullScreenTarget",3,void 0),ct=g(e,"playerStarted",3,!1),Tt=g(e,"showEndScreen",3,!0),{notifications$:Yt,graphIsOpened$:Ht}=_o(),Ot=e.store.getLogger().createComponentLog("Root component"),Wt=e.store.interfaceLanguage$,q=e.store.state.playbackState$,Me=e.store.ads.playbackState,Ve=e.store.state.positionWithScrubbing$,xe=e.store.state.duration$,Ue=e.store.playerPhase,Se=e.store.ui.isFullscreen,Ct=e.store.ui.controlsVisible,ge=e.store.ui.isControlsAvailable,Ne=e.store.ui.interactiveHideMobileControls,Ge=e.store.ui.settingsMenu.visible$,lt=e.store.ui.settingsMenu.openedByBtnKeyboard$,Qt=e.store.ui.scrubbingInProgress,At=e.store.ui.volumeChangingInProgress,di=e.store.ui.debugPanelVisible,ci=e.store.state.isLoaderVisible,Li=e.store.state.isEnded$,vo=e.store.state.chromecastConnected$,go=e.store.state.chromecastDeviceName$,ui=e.store.ads.postrollPassed,st=e.store.state.isLive$,pi=e.store.state.isPlaying$,Zi=e.store.state.isActiveLive$,ut=e.store.state.isRewindableLive$,Nt=e.store.state.crashed$,vi=e.store.webApi.annotationsApi,nt=e.store.webApi.pictureInPictureApi,rt=e.store.state.videoSize$,Pi=e.store.state.currentSubtitle$,en=e.store.state.currentSubtitleCaptions$,Mo=e.store.state.duration$,$t=e.store.ui.playerSize,Ft=e.store.ui.is3DVideo,z=e.store.ui.icon3DVideoVisible,kt=e.store.state.isInteractive,dt=e.store.state.isInteractiveTime$,bi=e.store.state.isInteractiveExpectation$,Zt=e.store.state.hasInteractiveBranches,wt=e.store.ui.controls.disabledControls$,at=e.store.ui.touched,Ui=e.store.ui.overlayContainer$,Di=e.store.ui.autoplayNextEnabled$,Ln=e.store.state.loadedMetadata$,Mn=e.store.actions.internal.closeSettingsMenu,Ti=(bn=e.store.callbacks)==null?void 0:bn.onDisabledPlayPrevChapterClick,Ji=(sr=e.store.callbacks)==null?void 0:sr.onDisabledSeekToInteractiveClick,Vn=e.store.actions.internal.setQuality,bo=K(void 0),xi=K(void 0),Vo=K(void 0),Ro=K(void 0),ho,mn,is=f(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),Dr=K(void 0),{closeNotification:os,notificationsToShow$:Or}=Yt,Jn=f(()=>!!s().slow_video),ns=()=>os("slow_video"),Nr=se(!1),tn,vn=K(!1),br=f(()=>u()!==bT.PLAYING),$r=K(!1),gn=f(()=>m()||p()||!n(vn)&&(v()&&!!Zt||n(br)&&$())),er=K(!0),yr=f(()=>e.uiConfig.features.thumbTimer&&Rt()&&r()==="video"&&!y()&&!d()&&!kt&&(e.uiConfig.hideThumbTimerAfterTouch&&!b()||!e.uiConfig.hideThumbTimerAfterTouch)),tr=K(!1),ir=f(()=>(Tt()||e.showAutoplayNext&&x())&&!!Te()&&!!Fe()&&(e.showAds&&I()||!e.showAds)&&v()&&!d()&&!n(tr)),rs=K(!1);nt==null||nt.setContext(id());let $o=je=>{je&&!kt&&e.uiConfig.controls.showOnStartupAtAutoplay&&zi(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:$o});let xr=()=>{clearTimeout(ho),D(vn,!1),p()&&Ne.set(!1)},zi=je=>{xr(),D(vn,!0),ho=setTimeout(()=>D(vn,!1),je);let gi=je-100;tn=setTimeout(()=>{C()&&Nr.set(!1)},gi>0?gi:je)},wr=Ft.subscribe(je=>{z.set(je),je&&(clearTimeout(mn),mn=setTimeout(()=>z.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Rn=(...gi)=>_t(null,[...gi],function*(je=ra()){var Oo,$n,yo,sn,so,xo;if(je&&!_c.device.isIOS){let Ai=Ad(),Fr=Dn(),Bn=_c.browser.isSamsungBrowser&&Ai===e.shadowRootContainer;je=Ai===Fr||Bn}if(je){zi(e.uiConfig.controls.hideTimeoutFullscreen);try{yield nt==null?void 0:nt.exit()}catch(Ai){Ot({message:String(Ai)})}try{let Ai=(Oo=R())!=null&&Oo.width&&(($n=R())!=null&&$n.height)?R():k();yield y_(Ai)}catch(Ai){Ot({message:String(Ai)})}}Se.set(je),e.store.getAdmanWrapper().setFullscreen(je),P()?(sn=(yo=e.store.callbacks)==null?void 0:yo.onFullscreenEnter)==null||sn.call(yo):(xo=(so=e.store.callbacks)==null?void 0:so.onFullscreenExit)==null||xo.call(so)}),vt=je=>{$t.set(je)},Jt=()=>{if(n(bo)){let{width:je,height:gi}=n(bo).getBoundingClientRect();$t.set({width:je,height:gi})}};Mt(()=>{var je;return Cu(Rn),e.uiConfig.features.annotationsInside&&(vi==null||vi.init(n(bo))),nt==null||nt.assignPlayerContainer(n(bo)),e.uiConfig.disablePiPResizeHandling||nt==null||nt.setExternalEventHandlers({resize:vt,leavepictureinpicture:Jt}),D(er,!_c.device.isIphoneOrOldIpad),e.interactiveContainer&&((je=ue().parentElement)==null||je.insertBefore(e.interactiveContainer,ue().nextSibling)),()=>{clearTimeout(ho),clearTimeout(tn),clearTimeout(mn),wr(),nt==null||nt.dispose().catch(gi=>{Ot({message:String(gi)})}),Tu(Rn)}});let Sr=K(!0),Br=K(!0),Hr=je=>{let gi=E()+(je==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;gi<0?(D(Sr,!1),gi=0):gi>=W()&&(D(Br,!1),gi=W()),D($r,!0),e.seekTime(gi)},Dn=()=>_c.device.isIOS?n(bo):!e.uiConfig.allowChangingFullscreenTarget||!It()?e.outerContainerRef:It().contains(e.outerContainerRef)?It():e.outerContainerRef,On=()=>_t(null,null,function*(){try{if(ra())yield Su(document),Ot({message:"exit fullscreen"});else{if(Ot({message:"request fullscreen"}),_c.device.isIOS&&!F())return;yield wu(Dn())}}catch(je){Ot({message:String(je)})}}),Do=()=>{Mn()},Nn=je=>{if(je.preventDefault(),U()){Do();return}if(!ct()){e.firstStart(),zi(e.uiConfig.controls.hideTimeoutCursor);return}D($r,!1),y()?xr():zi(e.uiConfig.controls.hideTimeoutMobile)},or=()=>{at.set(!0)},on=()=>{kt||(Nr.set(!0),zi(e.uiConfig.controls.hideTimeoutCursor))},hn=je=>{Ti&&(Ti(je),zi(e.uiConfig.controls.hideTimeoutMobile))},nr=je=>{Ji&&(Ji(je),zi(e.uiConfig.controls.hideTimeoutMobile))};He(()=>{Ui.set(n(Dr))}),He(()=>{Ct.set((n(br)||U()||j()||re()||G()||!n(ir)&&(v()||n(vn)&&!n($r)))&&!n(gn)&&r()==="video"&&!d()&&oe())}),He(()=>{!j()&&n(rs)&&!X()&&zi(e.uiConfig.controls.hideTimeoutMobile),D(rs,j(),!0)}),He(()=>{D(Sr,E()>0),D(Br,!Ie()&&E()<W(),!0)}),He(()=>{Dd(n(Ro),U(),fe(),!0)});let _n=Y("aria_label_video_player");Nb({fullScreenChangeHandler:Rn,getFullscreenTarget:Dn}),Bb({store:e.store,getFullscreenTarget:Dn});let nn=(je,gi)=>{var sn,so;let Oo=(so=(sn=e.store.callbacks)==null?void 0:sn.uiInfo)==null?void 0:so.onUpcomingLiveViewStateChanged;if(!Oo)return;let $n=!!gi,yo=Xe(Xe({},Xn(n(bo),{upcomingLiveScreen:gi},"upcomingLiveScreen",$n)),je);Oo(yo)};var Mi=ET();mt("blur",Ea,Do);var ro=T(Mi);el(ro,{onClick:Nn,get videoContainer(){return ue()},set videoContainer(je){ue(je)}});var rn=A(ro,2);Va(rn,()=>"slot",!1,(je,gi)=>{io(je,()=>({name:Ja}))});var rr=A(rn,2);Ms(rr,ee,je=>{var gi=IT(),Oo=ae(gi);let $n=f(()=>r()!=="thumb"||d()||kt&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);ja(Oo,{get hidden(){return n($n)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var yo=A(Oo,2);{var sn=it=>{var jt=xT(),wi=ae(jt);{var To=Uo=>{let ar=f(()=>e.uiConfig.controls.seekStepMobile/1e3);tp(Uo,{side:"left",get seekStep(){return n(ar)},handleSingleFirstClick:Nn,handleSecondClick:()=>Hr("backward")})};M(wi,Uo=>{n(Sr)&&Uo(To)})}var xn=A(wi,2);{var zn=Uo=>{let ar=f(()=>e.uiConfig.controls.seekStepMobile/1e3);tp(Uo,{side:"right",get seekStep(){return n(ar)},handleSingleFirstClick:Nn,handleSecondClick:()=>Hr("forward")})};M(xn,Uo=>{n(Br)&&Uo(zn)})}_(it,jt)};M(yo,it=>{e.canRewindLive&&ut&&!be().has("TIMELINE")&&it(sn)})}var so=A(yo,2);{var xo=it=>{let jt=f(()=>{var wi;return(wi=e.live)==null?void 0:wi.startTime});pc(it,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(jt)},onUpcomingLiveViewStateChanged:nn})};M(so,it=>{r()==="LiveWaitingStart"&&it(xo)})}var Ai=A(so,2);{var Fr=it=>{Xa(it,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};M(Ai,it=>{r()==="LiveWaitingRecover"&&it(Fr)})}var Bn=A(Ai,2);{var ys=it=>{Xa(it,{kind:"record",get thumbUrl(){return e.thumbUrl}})};M(Bn,it=>{r()==="LiveWaitingRecord"&&it(ys)})}var Wi=A(Bn,2);{var xs=it=>{var jt=wT();let wi;var To=T(jt);kd(To,{get adsSlotId(){return Le()},get adsParams(){return ze()},get adsAutoplayParam(){return te()},get duration(){return ce()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson}}),S(jt),O(xn=>wi=ie(jt,1,"ads-container s-8",null,wi,xn),[()=>({hidden:r()!=="ads"})]),_(it,jt)};M(Wi,it=>{e.showAds&&ct()&&it(xs)})}var ss=A(Wi,2);{var Tr=it=>{let jt=f(()=>!Tt()&&e.showAutoplayNext&&x());xv(it,{get title(){return Te()},get thumb(){return Fe()},get isHide(){return n(jt)},clickCloseIcon:()=>D(tr,!0)})};M(ss,it=>{n(ir)&&Te()&&Fe()&&it(Tr)})}var No=A(ss,2);{var Ur=it=>{cc(it,{})};M(No,it=>{Ce()&&it(Ur)})}var an=A(No,2);{var Vi=it=>{var jt=ST(),wi=T(jt);Pd(wi,{}),S(jt),_(it,jt)};M(an,it=>{de()&&it(Vi)})}var qe=A(an,2);{var Lt=it=>{uc(it,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return We()},onClick:Nn})};M(qe,it=>{G()&&it(Lt)})}var fi=A(qe,2);{var Bo=it=>{Ga(it,{get shifted(){return y()},get captions(){return me()},get position(){return E()},get playerSize(){return k()},isMobile:!0})};M(fi,it=>{ve().value!=="off"&&it(Bo)})}var wo=A(fi,2);{var So=it=>{var jt=CT();jt.__click=[yT,U,Ge,Do];var wi=T(jt);Ya(wi,{}),S(jt),_(it,jt)};M(wo,it=>{d()&&it(So)})}var Ki=A(wo,2);{var Ho=it=>{let jt=f(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),wi=f(()=>r()==="ads"),To=f(()=>e.canRewindLive&&Z()!==0);lc(it,{get bottomHidden(){return n(jt)},get showControls(){return y()},get bottomNoSmooth(){return C()},get isAds(){return n(wi)},get canRewindLive(){return n(To)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return we()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Ee()},get nextButtonActive(){return Ye()},get prevButtonActive(){return Ae()},get isOneVideoPlaylist(){return ht()},get customFullscreenSupported(){return n(er)},get endScreenShown(){return n(ir)},toggleFullscreen:On,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:hn,onDisabledSeekToInteractiveClick:nr,get playerControlsWrapperRef(){return n(xi)},set playerControlsWrapperRef(xn){D(xi,xn,!0)},get playerControlsRef(){return n(Vo)},set playerControlsRef(xn){D(Vo,xn,!0)}})};M(Ki,it=>{ct()&&it(Ho)})}var Hn=A(Ki,2);{var Ir=it=>{var jt=TT(),wi=T(jt);vc(wi,{get supportLink(){return e.supportLink},get returnFocus(){return $T},get ref(){return n(Ro)},set ref(To){D(Ro,To,!0)}}),S(jt),_(it,jt)};M(Hn,it=>{U()&&it(Ir)})}var Co=A(Hn,2);let ao=f(()=>!n(yr));Vd(Co,{get isLive(){return N()},get isHidden(){return n(ao)},get isPlaying(){return pe()},get position(){return E()},get duration(){return W()}});var yn=A(Co,2);{var Fo=it=>{Ha(it,{})};M(yn,it=>{n(is)&&it(Fo)})}var Fn=A(yn,2);{var zr=it=>{Bd(it,{})};M(Fn,it=>{le()&&it(zr)})}var Wr=A(Fn,2);{var Un=it=>{gc(it,{onClose:ns,onSelectAutoQuality:()=>{Vn("auto"),ns()}})};M(Wr,it=>{n(Jn)&&it(Un)})}_(je,gi)});var Cr=A(rr,2);tt(Cr,je=>D(Dr,je),()=>n(Dr)),S(Mi),tt(Mi,je=>D(bo,je),()=>n(bo)),O(()=>Oe(Mi,"aria-label",_n)),mt("click",Mi,or,!0),mt("focusin",Mi,on,!0),_(t,Mi),H(),o()}et(["click"]);function op(t){let e="";return no(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),no(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),no(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),no(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),no(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),no(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),no(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),no(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),no(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),no(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),no(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),no(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),no(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),no(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),no(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),no(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),no(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),no(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),no(t.font)&&(e+=`--font:${t.font};`),no(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),no(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function no(t){return typeof t=="string"&&!t.includes(";")}import{debounceFn as AT}from"@vkontakte/videoplayer-shared/es2015";var kT=L('<div class="time-container s-7"><!></div>'),LT=L('<div class="player-wrapper s-7" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),MT={hash:"s-7",code:".player-wrapper.s-7{height:100%;position:absolute;width:100%}.player-wrapper.s-7 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.timeline.s-7{bottom:0;left:0;opacity:0;opacity:1;position:absolute;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.visible.s-7{opacity:1}.time-container.s-7{bottom:8px;position:absolute;right:8px;z-index:var(--thumb-timer-z-index)}"};function Sv(t,e){B(e,!0),Q(t,MT);let[i,o]=Be(),r=()=>w(X,"$scrubbingInProgress",i),a=()=>w(G,"$playerSize",i),l=()=>w(E,"$isPlaying$",i),d=()=>w(k,"$duration$",i),s=()=>w(U,"$positionWithScrubbing$",i),u=()=>w(C,"$playerPhase",i),m=()=>w(R,"$crashed$",i),p=()=>w(W,"$currentSubtitle$",i),v=()=>w(F,"$currentSubtitleCaptions$",i),$=()=>w(P,"$positionExact$",i),y=()=>w(j,"$isLive$",i),b=()=>w(re,"$isRewindableLive$",i),x=g(e,"outsideDuration",3,0),I=g(e,"videoContainer",15),{playerPhase:C,state:{crashed$:R,duration$:k,positionExact$:P,isPlaying$:E,currentSubtitle$:W,currentSubtitleCaptions$:F,positionWithScrubbing$:U,isLive$:j,isRewindableLive$:re},ui:{playerSize:G,controls:oe,scrubbingInProgress:X},actions:{internal:{getVideoElement:Ie}}}=ye(),fe=8,ee=K(!1),be=li({}),Ce=K(!1),de=f(()=>!r()&&!n(Ce)),We=()=>{D(ee,!0)},ve=()=>{D(ee,!1)},me=AT(ql,260);He(()=>{a(),me(Ie(),oe,be,n(ee))});let Z=f(()=>l()?Jo(d()-s()):Jo(isFinite(d())?d():x()));var N=LT(),pe=T(N);el(pe,{hideCursor:!1,get videoContainer(){return I()},set videoContainer(Te){I(Te)}});var le=A(pe,2);Va(le,()=>"slot",!1,(Te,Fe)=>{io(Te,()=>({name:Ja}))});var ue=A(le,2);let Le=f(()=>u()!=="thumb"||m());ja(ue,{get hidden(){return n(Le)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var ze=A(ue,2);{var te=Te=>{Ga(Te,{shifted:!1,get captions(){return v()},get position(){return $()},get playerSize(){return a()}})};M(ze,Te=>{p().value!=="off"&&n(de)&&Te(te)})}var ce=A(ze,2);{var we=Te=>{var Fe=kT(),ht=T(Fe);Md(ht,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(Z)}}),S(Fe),_(Te,Fe)};M(ce,Te=>{n(de)&&Te(we)})}var Ee=A(ce,2);let Ye;var Ae=T(Ee);qa(Ae,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return b()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:fe,tooltipRightOffset:fe,get ref(){return be.timeline},set ref(Te){be.timeline=Te}}),S(Ee),S(N),O(Te=>Ye=ie(Ee,1,"timeline s-7",null,Ye,Te),[()=>({visible:n(ee)})]),mt("mouseenter",N,We),mt("mouseleave",N,ve),mt("mouseenter",Ee,()=>D(Ce,!0)),mt("mouseleave",Ee,()=>D(Ce,!1)),_(t,N),H(),o()}var NT=L("<div><!></div>"),BT={hash:"s-0",code:'.vk-vp-root.s-0{--white:#fff;--black:#000;--red:#ff3347;--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px;--interactive-episode-complete:#5c9ce6;--slider-bg:hsla(0,0%,100%,.4);--slider-filled-bg:var(--white);--slider-handle-bg:var(--white);--slider-loaded-bg:hsla(0,0%,100%,.4);--slider-height:3px;--slider-video-episode-gap:1.5px;--slider-radius:0px;--slider-handle-size:12px;--slider-filled-ads:#67a5eb;--slider-disabled-color:hsla(0,0%,97%,.31);--slider-volume-height:5px;--slider-volume-radius:calc(var(--slider-volume-height)/2);--slider-volume-handle-size:13px;--timeline-slider-filled-active-live-bg:var(--red);--timeline-slider-handle-active-live-bg:var(--red);--timeline-slider-bg:var(--slider-bg);--timeline-slider-filled-bg:var(--slider-filled-bg);--timeline-slider-handle-bg:var(--slider-handle-bg);--timeline-slider-loaded-bg:var(--slider-loaded-bg);--volume-slider-bg:var(--slider-bg);--volume-slider-filled-bg:var(--slider-filled-bg);--volume-slider-handle-bg:var(--slider-handle-bg);--controls-time:var(--white);--controls-gradient:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.005) 6.67%,rgba(0,0,0,.02) 13.33%,rgba(1,1,1,.04) 20%,rgba(1,1,1,.07) 26.67%,rgba(2,2,2,.11) 33.33%,rgba(3,3,3,.16) 40%,rgba(4,4,4,.22) 46.67%,rgba(6,6,6,.28) 53.33%,rgba(7,7,7,.33) 60%,rgba(8,8,8,.38) 66.67%,rgba(9,9,9,.42) 73.33%,rgba(9,9,9,.46) 80%,hsla(0,0%,4%,.48) 86.67%,hsla(0,0%,4%,.5));--timeline-preview-shadow:rgba(0,0,0,.08);--timeline-preview-bg:#222;--timeline-padding-horizontal:10px;--timeline-padding-vertical-top:3px;--timeline-padding-vertical-bottom:4px;--timeline-height:calc(var(--timeline-padding-vertical-bottom) + var(--timeline-padding-vertical-top) + var(--slider-height));--preview-track-frame-height-vertical:114px;--preview-track-frame-height-horizontal:65px;--preview-track-controls-top:16px;--preview-track-time-line-height:16px;--preview-track-bottom-offset:10px;--preview-track-height:calc(var(--preview-track-frame-height-vertical) + var(--preview-track-bottom-offset));--preview-track-controls-top-offset:calc(var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height));--settings-bg:rgba(0,0,0,.72);--settings-item-bg-hover:hsla(0,0%,100%,.08);--settings-radius:8px;--mobile-settings-bg:#2c2d2e;--divider-border:1px solid var(--white-alpha-24);--toggle-color-separator:#363738;--toggle-color-off:#656565;--toggle-color-on:#71aaeb;--toggle-color-autoplay-on:var(--white);--notification-bg:#2c2d2e;--notification-radius:8px;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--controls-container-z-index:1;--ads-container-z-index:1;--end-screen-mobile-z-index:1;--notification-z-index:1;--thumb-timer-z-index:2;--debug-panel-z-index:2;--modal-z-index:2;--settings-menu-z-index:2;--context-menu-z-index:3;--hot-key-helpers-container-z-index:3;--overlay-container-z-index:4;--rotate-transition-duration:0.25s;--btn-color:var(--white);--double-forward-bg:rgba(0,0,0,.6);background:var(--black);color:var(--white);font-family:var(--vk-vp-custom-font,var(--font));font-size:12px;height:100%;line-height:normal;outline:0;overflow:hidden;position:relative;user-select:none;width:100%}.vk-vp-root.visible-outside.s-0{overflow:visible}.vk-vp-root.s-0 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-0 button{background:transparent;border:none;color:inherit;font:inherit;line-height:normal;margin:0;overflow:visible;padding:0;width:auto;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}.vk-vp-root.s-0 p{margin:0}.vk-vp-root.s-0 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-0 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-0 :focus,.vk-vp-root.s-0 :focus-visible{outline:none}.vk-vp-root.s-0 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-0 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-0 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-0 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-0 .overlay-container{height:100%;left:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:var(--overlay-container-z-index)}.vk-vp-root.s-0 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-0 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function Tv(t,e){B(e,!0),Q(t,BT);let[i,o]=Be(),r=()=>w(ct,"$isLive$",i),a=()=>w(vi,"$availableSubtitlesList$",i),l=()=>w(nt,"$isPreviewTrackHorizontallyAligned$",i),d=g(e,"sources",7),s=g(e,"store",7),u=g(e,"microStoresRoot",7),m=g(e,"videoConfig",7),p=g(e,"uiConfig",7),v=g(e,"title",7),$=g(e,"thumbUrl",7),y=g(e,"interactiveContainer",7),b=g(e,"interactiveController",7),x=g(e,"subtitles",7),I=g(e,"subtitlesForcedLanguage",7),C=g(e,"live",7),R=g(e,"preload",7),k=g(e,"autoplay",7),P=g(e,"volume",7,void 0),E=g(e,"muted",7,void 0),W=g(e,"fromTime",7),F=g(e,"canRewindLive",7),U=g(e,"showAds",7),j=g(e,"adsSlotId",7,void 0),re=g(e,"adsParams",7,void 0),G=g(e,"adsAutoplayParam",7,void 0),oe=g(e,"duration",7,void 0),X=g(e,"logoClickable",7),Ie=g(e,"logoHidden",7),fe=g(e,"isMobile",7),ee=g(e,"showNextPrevButtons",7,!1),be=g(e,"nextButtonActive",7,!1),Ce=g(e,"prevButtonActive",7,!1),de=g(e,"endScreenVideoTitle",7,void 0),We=g(e,"endScreenVideoThumb",7,void 0),ve=g(e,"isOneVideoPlaylist",7,!1),me=g(e,"supportLink",7),Z=g(e,"shadowRootContainer",7),N=g(e,"outerContainerRef",7),pe=g(e,"fullScreenTarget",7,void 0),le=g(e,"failoverHosts",7,void 0),ue=g(e,"showMiniTimer",7,!1),Le=g(e,"saveRate",7),ze=g(e,"seekToInteractive",7,Hb),te=g(e,"playPrevChapter",7,Hb),ce=g(e,"volumeMultiplier",7),we=g(e,"showAutoplayNext",7),Ee=g(e,"showEndScreen",7,!0),Ye=g(e,"keyboardControls",15,void 0),{subscribers:Ae,stores:Te}=u();Ah(p());let Fe=Vt(),ht=p().logoLink,Rt=s().ui.debugPanelVisible,It=s().ui.playerSize,ct=s().state.isLive$,Yt=s().state.isInteractive&&Cv.device.isAndroid,Ht=K(void 0),Ot=null,Wt=K(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{vsid:s().vsid}),Hh(s(),Te),He(()=>{var z,kt;s().ui.isMobile.set(fe()),(kt=(z=m().callbacks)==null?void 0:z.onDomReady)==null||kt.call(z)});let q=(z=!1)=>{D(Wt,!0),z?s().actions.external.firstStart(U()):s().actions.internal.firstStart(U())},Me=()=>{if(Fe.features.qualityDetailsSubMenuEnabled){let z=d_(s().videoId);if(z)switch(z.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,z.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,z.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(z.quality);break}}else{c_(s().videoId),Tf()&&s().actions.internal.setTrafficSavingEnabled(!0);let kt=wf(s().videoId);kt&&s().actions.internal.setQuality(kt)}};function Ve(z){var wt,at,Ui;let kt=d()||z;kt&&s().initVideo({container:n(Ht),sources:kt,failoverHosts:le(),subtitles:x(),subtitlesForcedLanguage:I(),volumeMultiplier:ce()});let dt=RT.get(Sd)==="true";Rt.set(dt),W()>0&&s().actions.external.seekTime(W());let bi=fe()?Fe.volumeDefault:(at=(wt=P())!=null?wt:_u())!=null?at:Fe.volumeDefault,Zt=(Ui=E())!=null?Ui:o_();if(s().actions.external.setVolume(bi),s().actions.external.setMuted(Zt),s().getAdmanWrapper().setInitialVolume(Zt?0:bi),Me(),Fe.features.saveRate&&Le()){let Di=s_();Di&&!r()&&s().actions.internal.setPlaybackRate(Di)}if(we()){let Di=l_();Di&&s().actions.internal.setAutoplayNextEnabled(Di)}s().ui.isAutoplay.set(k()),k()&&q(),R()&&Fe.features.preload&&s().actions.internal.preload()}let xe=z=>{if(window.ResizeObserver){let kt,dt;Ot=new ResizeObserver(DT(bi=>{let Zt=bi[0];if(Zt.contentBoxSize){let wt=Array.isArray(Zt.contentBoxSize)?Zt.contentBoxSize[0]:Zt.contentBoxSize;kt=wt.inlineSize,dt=wt.blockSize}else Zt.contentRect&&(kt=Zt.contentRect.width,dt=Zt.contentRect.height);It.set({width:kt,height:dt})},300)),Ot.observe(z)}z.clientWidth&&z.clientHeight&&It.set({width:z.clientWidth,height:z.clientHeight})},Ue=()=>{document.hidden&&s().actions.external.stop()};Mt(()=>{var dt,bi,Zt,wt;Yt&&document.addEventListener("visibilitychange",Ue),Fe.debugLog&&s().actions.internal.startLogging(),xe(n(Ht));let z=Ae.map(at=>at.init({store:s(),microStores:Te,config:m(),interactiveController:b(),uiConfig:p()})),kt=()=>{Yt&&document.removeEventListener("visibilitychange",Ue),Ot==null||Ot.disconnect(),z.forEach(at=>at.unsubscribe()),s().destroy()};return((dt=C())==null?void 0:dt.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),kt):((bi=C())==null?void 0:bi.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),kt):(((Zt=C())==null?void 0:Zt.status)==="finished"||((wt=C())==null?void 0:wt.status)==="postlive")&&!(d()&&VT(d()))?(s().actions.internal.setLiveWaitingRecord(!0),kt):(Ve(),kt)});function Se(){n(Wt)?s().actions.external.play():q(!0)}function Ct(){s().actions.external.pause()}function ge(z){s().actions.external.setMuted(z)}function Ne(){s().actions.external.toggleSubtitle()}function Ge(z,kt){s().actions.external.changeSubtitle(z,kt)}function lt(z){s().actions.external.changeAudioStream(z)}function Qt(){var z;(z=s().webApi.slotsApi)!=null&&z.haveSlots()&&s().actions.external.hideControls()}function At(){var z;(z=s().webApi.slotsApi)!=null&&z.haveSlots()&&s().actions.external.showControls()}function di(z){fe()||z>=0&&z<=1&&s().actions.external.setVolume(z)}function ci(z){s().actions.internal.seekTime(z,OT.UNKNOWN)}function Li(z){s().actions.external.seekEpisodeStartTime(z)}function vo(){s().actions.external.returnFocusToEpisodes()}function go(z){s().actions.external.setPlaybackRate(z)}function ui(z){s().actions.external.setAutoQualityLimits(z)}function st(){s().actions.external.setQuality("auto")}function pi(z){s().actions.external.setTrafficSavingEnabled(z)}function Zi(z){s().actions.external.setHighQualityEnabled(z)}let ut=op(Fe.view),Nt=m().playerView==="preview",vi=s().state.availableSubtitlesList$;if(Fe.features.initSubtitles){let z=!1;He(()=>{var kt;if(!z&&a().length){z=!0;let dt;if(Fe.features.userVideoPrefs&&s().videoId){let Zt=xu(Fe.userSalt,String(s().videoId));Zt!=null&&Zt.subtitleTrackId&&(dt=a().find(wt=>wt.value===Zt.subtitleTrackId))}let bi=(kt=I())!=null?kt:Ef();bi&&(dt=a().find(Zt=>Zt.language===bi)),s().actions.internal.setSubtitle(dt)}})}let nt=s().ui.isPreviewTrackHorizontallyAligned;var rt=NT();let Pi;var en=T(rt);{var Mo=z=>{wv(z,{get store(){return s()},get uiConfig(){return Fe},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return C()},get autoplay(){return k()},get canRewindLive(){return F()},get showAds(){return U()},get adsSlotId(){return j()},get adsParams(){return re()},get adsAutoplayParam(){return G()},get duration(){return oe()},get logoClickable(){return X()},get logoHidden(){return Ie()},get logoTargetUrl(){return ht},get nextButtonActive(){return be()},get prevButtonActive(){return Ce()},get endScreenVideoTitle(){return de()},get endScreenVideoThumb(){return We()},get isOneVideoPlaylist(){return ve()},get supportLink(){return me()},get shadowRootContainer(){return Z()},get outerContainerRef(){return N()},get fullScreenTarget(){return pe()},get showMiniTimer(){return ue()},get playerStarted(){return n(Wt)},get seekToInteractive(){return ze()},get playPrevChapter(){return te()},firstStart:q,seekTime:ci,get showEndScreen(){return Ee()},get showAutoplayNext(){return we()},get showNextPrevButtons(){return ee()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson},get videoContainer(){return n(Ht)},set videoContainer(kt){D(Ht,kt,!0)}})},$t=z=>{var kt=De(),dt=ae(kt);{var bi=wt=>{Sv(wt,{get thumbUrl(){return $()},get outsideDuration(){return oe()},get canRewindLive(){return F()},get videoContainer(){return n(Ht)},set videoContainer(at){D(Ht,at,!0)}})},Zt=wt=>{yv(wt,{get store(){return s()},get uiConfig(){return Fe},get title(){return v()},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return C()},get autoplay(){return k()},get canRewindLive(){return F()},get showAds(){return U()},get adsSlotId(){return j()},get adsParams(){return re()},get adsAutoplayParam(){return G()},get duration(){return oe()},get logoClickable(){return X()},get logoHidden(){return Ie()},get logoTargetUrl(){return ht},get nextButtonActive(){return be()},get prevButtonActive(){return Ce()},get endScreenVideoTitle(){return de()},get endScreenVideoThumb(){return We()},get isOneVideoPlaylist(){return ve()},get supportLink(){return me()},get shadowRootContainer(){return Z()},get outerContainerRef(){return N()},get fullScreenTarget(){return pe()},get showMiniTimer(){return ue()},get playerStarted(){return n(Wt)},get seekToInteractive(){return ze()},get playPrevChapter(){return te()},firstStart:q,get showEndScreen(){return Ee()},get showAutoplayNext(){return we()},get showNextPrevButtons(){return ee()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(Ht)},set videoContainer(at){D(Ht,at,!0)},get keyboardControls(){return Ye()},set keyboardControls(at){Ye(at)}})};M(dt,wt=>{Nt?wt(bi):wt(Zt,!1)})}_(z,kt)};M(en,z=>{fe()?z(Mo):z($t,!1)})}S(rt),O(z=>{Pi=ie(rt,1,"vk-vp-root s-0",null,Pi,z),Ke(rt,ut)},[()=>({"root--miui-browser":Cv.device.isMobile&&Cv.browser.isMiuiBrowser,"visible-outside":Nt,"preview-track-horizontally-alinged":l()})]),_(t,rt);var Ft=H({initVideo:Ve,play:Se,pause:Ct,setMuted:ge,toggleSubtitle:Ne,changeSubtitle:Ge,changeAudioStream:lt,hideControls:Qt,showControls:At,setVolume:di,seekTime:ci,seekEpisodeStartTime:Li,returnFocusToEpisodes:vo,setPlaybackRate:go,setAutoQualityLimits:ui,setAutoQuality:st,toggleTrafficSaving:pi,toggleHighQuality:Zi,get sources(){return d()},set sources(z){d(z)},get store(){return s()},set store(z){s(z)},get microStoresRoot(){return u()},set microStoresRoot(z){u(z)},get videoConfig(){return m()},set videoConfig(z){m(z)},get uiConfig(){return p()},set uiConfig(z){p(z)},get title(){return v()},set title(z){v(z)},get thumbUrl(){return $()},set thumbUrl(z){$(z)},get interactiveContainer(){return y()},set interactiveContainer(z){y(z)},get interactiveController(){return b()},set interactiveController(z){b(z)},get subtitles(){return x()},set subtitles(z){x(z)},get subtitlesForcedLanguage(){return I()},set subtitlesForcedLanguage(z){I(z)},get live(){return C()},set live(z){C(z)},get preload(){return R()},set preload(z){R(z)},get autoplay(){return k()},set autoplay(z){k(z)},get volume(){return P()},set volume(z){P(z)},get muted(){return E()},set muted(z){E(z)},get fromTime(){return W()},set fromTime(z){W(z)},get canRewindLive(){return F()},set canRewindLive(z){F(z)},get showAds(){return U()},set showAds(z){U(z)},get adsSlotId(){return j()},set adsSlotId(z){j(z)},get adsParams(){return re()},set adsParams(z){re(z)},get adsAutoplayParam(){return G()},set adsAutoplayParam(z){G(z)},get duration(){return oe()},set duration(z){oe(z)},get logoClickable(){return X()},set logoClickable(z){X(z)},get logoHidden(){return Ie()},set logoHidden(z){Ie(z)},get isMobile(){return fe()},set isMobile(z){fe(z)},get showNextPrevButtons(){return ee()},set showNextPrevButtons(z){ee(z)},get nextButtonActive(){return be()},set nextButtonActive(z){be(z)},get prevButtonActive(){return Ce()},set prevButtonActive(z){Ce(z)},get endScreenVideoTitle(){return de()},set endScreenVideoTitle(z){de(z)},get endScreenVideoThumb(){return We()},set endScreenVideoThumb(z){We(z)},get isOneVideoPlaylist(){return ve()},set isOneVideoPlaylist(z){ve(z)},get supportLink(){return me()},set supportLink(z){me(z)},get shadowRootContainer(){return Z()},set shadowRootContainer(z){Z(z)},get outerContainerRef(){return N()},set outerContainerRef(z){N(z)},get fullScreenTarget(){return pe()},set fullScreenTarget(z){pe(z)},get failoverHosts(){return le()},set failoverHosts(z){le(z)},get showMiniTimer(){return ue()},set showMiniTimer(z){ue(z)},get saveRate(){return Le()},set saveRate(z){Le(z)},get showAutoplayNext(){return we()},set showAutoplayNext(z){we(z)},get seekToInteractive(){return ze()},set seekToInteractive(z){ze(z)},get playPrevChapter(){return te()},set playPrevChapter(z){te(z)},get volumeMultiplier(){return ce()},set volumeMultiplier(z){ce(z)},get showEndScreen(){return Ee()},set showEndScreen(z){Ee(z)},get keyboardControls(){return Ye()},set keyboardControls(z){Ye(z)}});return o(),Ft}var HT=ke('<defs><path id="rect" d="m2.72 0c.45 0 .6.05.77.13a1 1 0 01.38.38c.09.16.13.33.13.77v1.44c0 .44-.04.6-.13.77a1 1 0 01-.38.38c-.16.08-.32.13-.77.13h-1.44c-.44 0-.6-.05-.77-.13a1 1 0 01-.37-.38c-.1-.16-.14-.33-.14-.77v-1.44c0-.44.05-.6.13-.77a1 1 0 01.38-.38c.17-.08.33-.13.77-.13z"></path></defs><path d="M38.24 6c3.57 0 4.86.37 6.17 1.07a7.3 7.3 0 0 1 3.02 3.02c.7 1.3 1.07 2.6 1.07 6.17v23.49c0 3.56-.37 4.85-1.07 6.16a7.3 7.3 0 0 1-3.02 3.02c-1.3.7-2.6 1.07-6.16 1.07h-19.5c-3.56 0-4.85-.37-6.16-1.07a7.3 7.3 0 0 1-3.02-3.02c-.7-1.3-1.07-2.6-1.07-6.16v-23.5c0-3.56.37-4.85 1.07-6.16a7.3 7.3 0 0 1 3.02-3.02C13.9 6.37 15.2 6 18.76 6zm.32 3h-19.8c-2.8 0-3.77.19-4.75.71a4.3 4.3 0 0 0-1.8 1.8c-.5.95-.7 1.87-.7 4.43l-.01 23.8c0 2.8.19 3.76.71 4.75a4.3 4.3 0 0 0 1.8 1.8c.98.52 1.95.71 4.75.71h19.49c2.8 0 3.76-.19 4.74-.71a4.3 4.3 0 0 0 1.8-1.8c.52-.98.71-1.95.71-4.74v-23.5c0-2.8-.19-3.75-.71-4.74a4.3 4.3 0 0 0-1.8-1.8c-.95-.5-1.87-.7-4.43-.7z"></path><use xlink:href="#rect" x="16.5" y="14"></use><use xlink:href="#rect" x="16.5" y="22"></use><use xlink:href="#rect" x="16.5" y="30"></use><use xlink:href="#rect" x="16.5" y="38"></use><use xlink:href="#rect" x="37" y="14"></use><use xlink:href="#rect" x="37" y="22"></use><use xlink:href="#rect" x="37" y="30"></use><use xlink:href="#rect" x="37" y="38"></use>',1);function Iv(t,e){let i=g(e,"isWhite",3,!1),o=f(()=>i()?"#fff":"#909499");Ze(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(r,a)=>{var l=HT();ti(9),_(r,l)},$$slots:{default:!0}})}var FT=L('<div class="title s-1"> </div>'),UT=L('<div class="playerStub s-1"><!> <!></div>'),zT={hash:"s-1",code:".playerStub.s-1{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}.title.s-1{box-sizing:border-box;color:#fff;font-size:15px;left:0;overflow:hidden;padding:18px 20px 10px;position:absolute;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}"};function Ev(t,e){Q(t,zT);var i=UT(),o=T(i);{var r=d=>{var s=FT(),u=T(s,!0);S(s),O(()=>he(u,e.title)),_(d,s)};M(o,d=>{e.title&&d(r)})}var a=A(o,2);{var l=d=>{let s=f(()=>!!e.thumbUrl);Iv(d,{get isWhite(){return n(s)}})};M(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}S(i),O(()=>Ke(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),_(t,i)}var WT=L('<div class="playerError s-3"><!></div>'),KT={hash:"s-3",code:".playerError.s-3{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}"};function Pv(t){Q(t,KT);var e=WT(),i=T(e);Ya(i,{}),S(e),_(t,e)}import{AppTracer as SI,now as CI,ValueSubject as TI,withoutNullable as II}from"@vkontakte/videoplayer-shared/es2015";import{cloneDeepWith as EI,InterfaceLanguage as PI,isNonNullable as Ov,Logger as AI,Observable as kI,Subscription as Yb,once as LI,InternalsExposure as MI,skip as VI,getPlayerId as RI}from"@vkontakte/videoplayer-shared/es2015";import{clientChecker as jb,isMobile as DI}from"@vkontakte/videoplayer-core/es2015";import{OneStat as OI,ThinOneStat as NI,MediascopePixel as BI}from"@vkontakte/videoplayer-statistics/es2015";import{Logger as qT,Subscription as QT}from"@vkontakte/videoplayer-shared/es2015";var np=class{constructor(){this.subscription=new QT,this.logger=new qT,this.log=this.logger.createComponentLog("MediaSessionApi")}isSupported(){return"mediaSession"in navigator}setMetaData({title:e,artist:i="",thumbUrl:o=""}){this.isSupported()&&(navigator.mediaSession.metadata=new MediaMetadata({title:e,artist:i,artwork:[{src:o,sizes:"96x96",type:"image/png"},{src:o,sizes:"128x128",type:"image/png"},{src:o,sizes:"192x192",type:"image/png"},{src:o,sizes:"256x256",type:"image/png"},{src:o,sizes:"384x384",type:"image/png"},{src:o,sizes:"512x512",type:"image/png"}]}))}updateActionHandlers(e){this.resetActionHandlers(),this.setActionHandlers(e)}resetActionHandlers(){let e=[["play",null],["pause",null],["stop",null],["nexttrack",null],["previoustrack",null],["seekto",null],["seekbackward",null],["seekforward",null]];this.setActionHandlers(e)}setActionHandlers(e){var i,o;if(this.isSupported())for(let[r,a]of e)try{(o=(i=navigator.mediaSession).setActionHandler)==null||o.call(i,r,a)}catch(l){throw new Error(`The media session action "${r}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{var a,l;let o=$e(e.state.currentPlaybackRate$),r=$e(e.state.duration$);if(!(!isFinite(i)||!isFinite(r)))try{(l=(a=navigator.mediaSession).setPositionState)==null||l.call(a,{position:i,playbackRate:o,duration:r})}catch(d){this.log({message:`MediaSession setPositionState can't call with position: ${i} and duration: ${r}`})}})))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};import{ValueSubject as Lv,detectEmbed as JT}from"@vkontakte/videoplayer-shared/es2015";var GT=ke('<path d="M31.257 3.998c3.037.01 4.52.39 6.13 1.24a9 9 0 013.47 3.35l.17.31.15.3c.78 1.55 1.07 3.18 1.09 6.25v9.04a1.5 1.5 0 01-3 .02v-9.65c-.05-2.04-.24-3.12-.64-4.04l-.12-.27-.13-.25A6 6 0 0036.2 7.9c-1.19-.64-2.34-.88-5.11-.9h-8.84c-2.73 0-4 .2-5.07.7l-.25.13a6 6 0 00-2.4 2.41c-.64 1.19-.88 2.34-.9 5.11v20.83c0 2.74.2 4 .7 5.08l.13.25a6 6 0 002.41 2.4c1.1.6 2.13.83 4.44.89H26a1.5 1.5 0 010 3h-4.47c-3-.05-4.53-.38-6.14-1.24a9 9 0 01-3.48-3.35l-.15-.3c-.73-1.47-1.04-3.01-1.08-5.8V15c.05-2.98.39-4.52 1.25-6.12a9 9 0 013.293-3.582c1.85-.871 2.623-1.27 5.747-1.27z"></path><path d="M30.5 33.8c0-1.68 0-2.52.33-3.16a3 3 0 0 1 1.3-1.31c.65-.33 1.49-.33 3.17-.33h6.4c1.68 0 2.52 0 3.16.33a3 3 0 0 1 1.31 1.3c.33.65.33 1.49.33 3.17v13.4c0 1.68 0 2.52-.33 3.16a3 3 0 0 1-1.3 1.31c-.65.33-1.49.33-3.17.33h-6.4c-1.68 0-2.52 0-3.16-.33a3 3 0 0 1-1.31-1.3c-.33-.65-.33-1.49-.33-3.17z"></path>',1),YT=L('<div><div><!></div> <span class="title s-6"> </span></div>'),jT={hash:"s-6",code:".player-pip-dummy.s-6{align-items:center;background-color:#19191a;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;width:100%}.player-pip-dummy.is-pip-api.s-6{position:relative}.dummy-image.s-6 svg{transform:scale(1.07143)}.dummy-image.desktop.s-6{transform:scale(1.07143) rotate(-90deg) rotateY(180deg)}.title.s-6{color:#fff;font-size:16px;padding:18px 20px 10px;text-align:center}"};function Av(t,e){B(e,!0),Q(t,jT);let[i,o]=Be(),r=()=>w(u,"$interfaceLanguage$",i),a=()=>w(m,"$isMobile$",i),l=ye(),d=Vt(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,m=l.ui.isMobile,p=l.ui.t,v=f(()=>r()&&p("pip_dummy_title")),$=op(d.view);var y=YT();let b;var x=T(y);let I;var C=T(x);Ze(C,{width:"57",height:"56",testId:"pip-dummy-icon",children:(P,E)=>{var W=GT();ti(),_(P,W)},$$slots:{default:!0}}),S(x);var R=A(x,2),k=T(R,!0);S(R),S(y),O((P,E)=>{b=ie(y,1,"player-pip-dummy s-6",null,b,P),Ke(y,$),I=ie(x,1,"dummy-image s-6",null,I,E),he(k,n(v))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),_(t,y),H(),o()}var XT=Object.defineProperty,ZT=(t,e,i)=>e in t?XT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,ma=(t,e,i)=>ZT(t,typeof e!="symbol"?e+"":e,i),kv=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())}),eI=460,tI=280,bc=class{constructor({enabled:e=!0}={enabled:!0}){ma(this,"playerDomElement"),ma(this,"playerParentShadowRoot"),ma(this,"playerDummyElement"),ma(this,"svelteContext"),ma(this,"pipWindow"),ma(this,"info",{isActive$:new Lv(!1),isEnabled$:new Lv(!1),type:1}),ma(this,"pipActive",!1),ma(this,"pipApi"),this.info.isEnabled$=new Lv(e),Fu()&&(this.pipApi=new Hs({enabled:e}),this.pipApi.info.isActive$.subscribe(i=>{(i&&!this.info.isActive$.getValue()||!i&&this.pipActive)&&this.info.isActive$.next(i),this.pipActive=i}))}isSupported(){let{isEmbed:e}=JT();return"documentPictureInPicture"in window&&!e}isActive(){return this.info.isActive$.getValue()}setPlayerDomElement(e,i){this.playerDomElement=e,this.playerParentShadowRoot=i}setContext(e){this.svelteContext=e}request(){return kv(this,null,function*(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=yield documentPictureInPicture.requestWindow({width:eI,height:tI,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let o=[...this.playerParentShadowRoot.styleSheets].map(s=>[...s.cssRules].map(u=>u.cssText).join(" ")).filter(Boolean).join(`
|
|
61
|
-
`),r=document.createElement("style");r.textContent=o;let a=this.createStretchedContainer(),l=a.attachShadow({mode:"open"});l.append(r),l.append(this.playerDomElement);let d={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=Xr(Av,d),(e=this.pipWindow)==null||e.document.body.append(a),this.info.isActive$.next(!0),(i=this.pipWindow)==null||i.addEventListener("unload",s=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(Ma(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})})}exit(){return kv(this,null,function*(){return new Promise(e=>{var i,o,r;this.pipWindow?(i=documentPictureInPicture.window)==null||i.close():(o=this.pipApi)!=null&&o.isActive()&&((r=this.pipApi)==null||r.exit()),e()})})}dispose(){return kv(this,null,function*(){yield this.exit()})}setEnabled(e){var i;this.info.isEnabled$.next(e),(i=this.pipApi)==null||i.setEnabled(e)}assignPlayerContainer(e){var i;(i=this.pipApi)==null||i.assignPlayerContainer(e)}updateVideoElement(){var e;(e=this.pipApi)==null||e.updateVideoElement()}setExternalEventHandlers(e){var i;(i=this.pipApi)==null||i.setExternalEventHandlers(e)}createStretchedContainer(){let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e}};function Fb(t){return t instanceof bc}var rp=class{static getLatestSupportedVersion(e){let i=new Hs(e),o=new bc(e);if(o.isSupported())return o;if(i.isSupported())return i}};function $c(t,e){var r,a;let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let l of i)o[l]=(a=(r=e[l])!=null?r:t[l])!=null?a:void 0;return o}var Ub="Inner error. Unexpectedly root annotation container null reference exception",zb="Annotation with such name already exists",Wb="Annotation with such name does not exist";var jl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as iI,Subscription as oI,throttleFn as nI}from"@vkontakte/videoplayer-shared/es2015";var rI="1",sI=100,sp=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new oI}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=nI(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},sI);this.subscriptions.add(iI(this.rootAnnotationsContainer).subscribe(({width:o,height:r})=>{this.playerSize={width:o,height:r},i()})),this.mutationObserver=new MutationObserver(i),this.mutationObserver.observe(this.rootAnnotationsContainer,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}add(e,i){var o;if(!this.rootAnnotationsContainer)throw new jl(Ub);if(this.annotations.has(e))throw new jl(zb);i.style.zIndex=(o=i.style.zIndex)!=null?o:rI,i.style.position="absolute",this.rootAnnotationsContainer.append(i),this.annotations.set(e,i)}get(e){let i=this.annotations.get(e);if(!i)throw new jl(Wb);return i}remove(e){let i=this.get(e);this.annotations.delete(e)&&i.remove()}clear(){for(let e in this.annotations.keys())this.remove(e)}destroy(){var e;this.annotations.clear(),this.subscriptions.unsubscribe(),(e=this.mutationObserver)==null||e.disconnect(),this.rootAnnotationsContainer=null}isElementExceedsBoundaries(e,i,o){let r=e.offsetTop,a=e.offsetLeft,l=e.offsetWidth,d=e.offsetHeight;return r<0||a<0||a+l>i||r+d>o}registryRootContainer(e){}addLayer(e){return document.createElement("div")}getLayer(e){}removeLayer(e){}clearLayer(e){}detach(){}reattach(){}};import{assertNonNullable as ap,Subscription as aI}from"@vkontakte/videoplayer-shared/es2015";var fn=class{init({store:e,microStores:i,interactiveController:o,config:r}){return ap(e),ap(i),ap(r),r.interactiveData&&ap(o),this.subscription=new aI,this.subscription}};var yc=class extends fn{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$=ii(Xe({},se(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{isInteractiveExpectation$:r}=i.store.state;return o.add(r.subscribe(a=>{this.state$.set(a?!0:null)})),o}};var xc=class extends fn{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$=ii(Xe({},se(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{microStores:r,store:a}=i,{fakeIsPlaying$:l}=r,{isInteractiveExpectation$:d,isPlaying$:s}=a.state,{controlsVisible:u,isMobile:m}=a.ui,p=$e(m),v=()=>p&&$e(u);return o.add(u.subscribe($=>{if(!p)return;let y=$e(l);$e(s)?this.state$.set($):y!==null&&this.state$.set(!y||$)})),o.add(s.subscribe($=>{this.state$.set(!$||v())})),o.add(l.subscribe($=>{if($===null)return;let y=$e(d);if(v()){this.state$.set(!0);return}y&&this.state$.set(!$)})),o}};var wc=class extends fn{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=se("tooltip_chapter_without_interactive")}init(i){let o=super.init(i),{store:r}=i;return o.add(r.state.interactiveEpisodes$.subscribe(a=>{a.length&&(a.every(l=>l.completed)?this.state$.set("tooltip_interactive_of_chapter_completed"):this.state$.set("tooltip_disabled_when_interactive"))})),o}};import{combine as lI}from"@vkontakte/videoplayer-shared/es2015";var Mv=se(!1),lp=null,Sc=class extends fn{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$=ii(Xe({},Mv),{set:(i,o=!1)=>{i!==$e(Mv)&&(this.clearTimeout(),Mv.set(i),!i&&lp&&(lp=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()})}init(i){let o=super.init(i),{store:r,config:a}=i,{isInteractiveTime$:l,isPlaying$:d}=r.state,s=r.ui.controlsVisible,{interactiveTimeIndicator:u}=r.ui.controls;o.add(s.subscribe(p=>{$e(l)&&p&&this.state$.set(!1)}));let m=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(lI({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:v,interactiveTimeIndicator:$})=>{var y,b;if(!(!p||!($!=null&&$.isDisplayed))){if(!v)return this.state$.set(!1);m.tooltipHelpHintActive&&lp===null&&(lp=!0,m.tooltipHelpHintActive=!1,this.state$.set(!0),(b=(y=r.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||b.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as dI,noop as cI}from"@vkontakte/videoplayer-shared/es2015";var Cc=class extends fn{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$=ii(Xe({},se(null)),{toggle:cI});this.checkIfShouldHide=i=>Bs(i,"s")}init(i){let o=super.init(i),{store:r,interactiveController:a}=i,l=r.ui.currentGridType$,d=r.getLogger().createComponentLog("GraphIsOpened microStore");return this.state$.toggle=()=>_t(this,null,function*(){if(this.checkIfShouldHide($e(l)))return;let s=$e(this.state$),{isEnded$:u,playbackState$:m}=r.state,{disabledControls$:p}=r.ui.controls,v=$e(u),$=$e(m);if(s)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1),p.remove(vf),!v&&this.graphMadePause&&r.actions.internal.play()}catch(y){d({message:"Cant hide graph"})}else{this.graphMadePause=$==="playing";try{yield a==null?void 0:a.toggleGraphView(!0),this.state$.set(!0),p.add(vf),!v&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}}),o.add(dI({graphIsOpened:this.state$,currentGridType:l}).subscribe(m=>_t(this,[m],function*({graphIsOpened:s,currentGridType:u}){if(this.checkIfShouldHide(u)&&s)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1)}catch(v){d({message:"Cant hide graph"})}}))),o}};import{ValueSubject as Kb}from"@vkontakte/videoplayer-shared/es2015";var Tc=class extends fn{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:se(!1),isEnabled$:se(!1),type$:se(void 0)}}init(i){let o=super.init(i),{store:r}=i,{info:{isActive$:a,isEnabled$:l,type:d}}=r.webApi.pictureInPictureApi||{info:{isActive$:new Kb(!1),isEnabled$:new Kb(!1)}};return o.add(a.subscribe(s=>{this.state$.isActive$.set(s)})),o.add(l.subscribe(s=>{this.state$.isEnabled$.set(s)})),this.state$.type$.set(d),o}};import{filter as fI,filterChanged as mI}from"@vkontakte/videoplayer-shared/es2015";import{safeStorage as Vv}from"@vkontakte/videoplayer-shared/es2015";var qb=({maxShowCount:t,timeout:e})=>{let i=[t!==0?uI({maxCount:t}):void 0,e!==0?pI({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},uI=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Vv.set("videoplayer_notifications_manager_count",JSON.stringify((r=e[i])!=null?r:0))},canShowNotification:i=>{var o;return((o=e[i])!=null?o:0)<t}}},pI=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Vv.get(e)||"{}")}catch(a){return{}}},o=a=>Vv.set(e,JSON.stringify(a)),r=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o(ii(Xe({},i()),{[a]:{timeout:t,launchTime:Date.now()}}))},canShowNotification:a=>{let l=i()[a];if(l){let d=Date.now()-l.launchTime>t;return d&&r(a),d}else return!0}}};var Ic=class extends fn{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:se({}),showNotification:i=>{this.state$.notificationsToShow$.update(o=>(o[i]=!0,o)),this.notificationManager.notificationShowed(i)},closeNotification:i=>{this.state$.notificationsToShow$.update(o=>(delete o[i],o))}}}init(i){let o=super.init(i),{store:r,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:l,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:s}}}=i;this.notificationManager=qb({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe(mI(),fI(m=>m)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(s&&r.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var Qb=()=>[yc,xc,wc,Sc,Cc,Tc,Ic].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:ii(Xe({},e),{[o.stateName]:o.state$})}},{subscribers:[],stores:{}});import{devNull as Ec}from"@vkontakte/videoplayer-shared/es2015";var dp=class{constructor(e){this.getActiveElement=e;this.focusableElements=[];this.isActive=!1;this.handleTabKey=e=>{if(this.updateFocusableElements(),!this.focusableElements.length)return;let i=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1],r=this.getActiveElement();e.shiftKey&&r===i?(e.preventDefault(),o.focus()):!e.shiftKey&&r===o&&(e.preventDefault(),i.focus())}}activate(){this.isActive||(document.addEventListener("keydown",this.handleTabKey),this.isActive=!0)}deactivate(){this.isActive&&(document.removeEventListener("keydown",this.handleTabKey),this.isActive=!1,this.focusableElements=[])}updateFocusableElements(){this.isActive&&(this.focusableElements=this.getFocusableElements())}getFocusableElements(){let e=["button:not([disabled])","[href]:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"]):not([disabled])'].join(", ");return Array.from(this.container.querySelectorAll(e)).filter(i=>!i.disabled&&i.offsetParent!==null)}destroy(){this.deactivate()}setContainer(e){this.container=e}};var cp=class{constructor(e){this.shadowRoot=e;this.lastFocusedNode=null;this.init=()=>{this.shadowRoot.addEventListener("focusin",this.handleFocusChange)};this.handleFocusChange=()=>{this.lastFocusedNode=this.shadowRoot.activeElement};this.restoreFocus=()=>{var e;(e=this.lastFocusedNode)==null||e.focus()};this.focusLock=new dp(()=>this.lastFocusedNode),this.init()}destroy(){this.shadowRoot.removeEventListener("focusin",this.handleFocusChange),this.focusLock.destroy()}getLastFocusedNode(){return this.lastFocusedNode}activateLock(){this.focusLock.activate()}deactivateLock(){this.focusLock.deactivate()}setContainerForFocusLock(e){this.focusLock.setContainer(e)}};var vI=L('<div class="root s-2"><!></div>'),gI={hash:"s-2",code:".root.s-2{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:1}"};function Rv(t,e){B(e,!0),Q(t,gI);let i=null,o=K(null);He(()=>(n(o)&&(i=window.setTimeout(()=>{D(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function r(s){e.playbackStatusShow&&D(o,s?"prev":"next",!0)}var a=De(),l=ae(a);{var d=s=>{var u=De(),m=ae(u);Ms(m,()=>n(o),p=>{var v=vI(),$=T(v);let y=f(()=>n(o)==="prev");hc($,{get duration(){return e.animationDuration},get Icon(){return pa},get reversed(){return n(y)}}),S(v),_(p,v)}),_(s,u)};M(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return _(t,a),H({startVideoChangedAnimation:r})}import{getWindow as hI}from"@vkontakte/videoplayer-shared/es2015";var Dv=hI().HTMLElement||class{constructor(){this.isConnected=!1}};var _I=Object.defineProperty,bI=Object.defineProperties,$I=Object.getOwnPropertyDescriptors,Gb=Object.getOwnPropertySymbols,yI=Object.prototype.hasOwnProperty,xI=Object.prototype.propertyIsEnumerable,Bv=(t,e,i)=>e in t?_I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,tl=(t,e)=>{for(var i in e||(e={}))yI.call(e,i)&&Bv(t,i,e[i]);if(Gb)for(var i of Gb(e))xI.call(e,i)&&Bv(t,i,e[i]);return t},wI=(t,e)=>bI(t,$I(e)),Gt=(t,e,i)=>Bv(t,typeof e!="symbol"?e+"":e,i),up=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())}),HI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:PI.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:DI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},Zn=K(void 0),Nv=li({animationDuration:0,playbackStatusShow:!1}),pp=class extends Dv{constructor(){super(),Gt(this,"svelteStubComponent"),Gt(this,"svelteRootComponent"),Gt(this,"sveltePersistentLayerComponent"),Gt(this,"svelteErrorComponent"),Gt(this,"store"),Gt(this,"microStoresRoot"),Gt(this,"statistics"),Gt(this,"_shadowRoot"),Gt(this,"playerContainer"),Gt(this,"rootContainer"),Gt(this,"stateContainer"),Gt(this,"shadowRootContainer"),Gt(this,"playerId"),Gt(this,"uiConfig"),Gt(this,"coreConfig"),Gt(this,"statisticsConfig"),Gt(this,"metaConfig"),Gt(this,"interactiveController"),Gt(this,"interactiveContainer"),Gt(this,"graphMadePause"),Gt(this,"currentPlayingVideoIndex",0),Gt(this,"needToRepeatPlaylist",!1),Gt(this,"videoConfig"),Gt(this,"pictureInPictureApi"),Gt(this,"mediaSessionApi"),Gt(this,"unsubscribePlayerPhaseSubscription"),Gt(this,"logger"),Gt(this,"log"),Gt(this,"subscription"),Gt(this,"interactiveSubscription"),Gt(this,"annotationsApi"),Gt(this,"slotsApi"),Gt(this,"focusManager"),Gt(this,"prevIsid"),Gt(this,"isInited",!1),Gt(this,"postponedInitParams",null),Gt(this,"internalsExposure",null),Gt(this,"shadowDOMCallbacksDisabled",!1),Gt(this,"fatalError$",new TI(null)),Gt(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:m,statVKAppId:p,refreshStatAuthToken:v,autoplay:$,isMobile:y,isTouch:b,refDomain:x,deviceId:I,interactiveData:C}=$c(this.videoConfig,i),R=(o=C==null?void 0:C.projectInfo)==null?void 0:o.pid,k=(a=(r=this.interactiveController)==null?void 0:r.state.isReplay$.getValue())!=null?a:!1;k&&(this.prevIsid=void 0);let{unitedVideoId:P,isClip:E=!1}=e;if(this.uiConfig.features.statistics&&P)try{return new OI(tl({movieId:P,albumId:d,place:s,trackCode:m,vkAppId:p,autoplay:(l=$&&!this.interactiveController)!=null?l:!1,mobile:b!=null?b:y,clip:E,refDomain:x,deviceId:I,isPreviewPlayerView:this.videoConfig.playerView==="preview"},R&&(!this.isInited||k)&&{projectId:Number(R)}),tl({refreshAuthToken:v,userSalt:u,config:this.statisticsConfig},this.interactiveController&&{useIsid:!0,isid:this.prevIsid}))}catch(F){console.error(F),this.log({message:F.message})}}),Ec.create("ui"),this.logger=new AI,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Yb,this.interactiveSubscription=new Yb,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Xr(Pv,{target:this.playerContainer}))})}connectedCallback(){var e,i;if(this.rootContainer)return;this.initPlayerRootContainers();let o=(e=this.getAttribute("stub-title"))!=null?e:void 0,r=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=li({title:o,thumbUrl:r}),l={target:this.playerContainer,props:a};this.svelteStubComponent=Xr(Ev,l),this.sveltePersistentLayerComponent=Xr(Rv,{target:this.playerContainer,props:Nv}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;Nv.animationDuration=e,Nv.playbackStatusShow=i&&o}disconnectedCallback(){var e,i,o,r,a,l,d;this.shadowDOMCallbacksDisabled||((e=this.annotationsApi)==null||e.destroy(),(i=this.slotsApi)==null||i.destroy(),(o=this.focusManager)==null||o.destroy(),(r=this.mediaSessionApi)==null||r.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteErrorComponent),this.unmountComponent(this.sveltePersistentLayerComponent),this.subscription.unsubscribe(),(a=this.unsubscribePlayerPhaseSubscription)==null||a.call(this),(l=this.interactiveController)==null||l.destroy(),this.interactiveSubscription.unsubscribe(),(d=this.internalsExposure)==null||d.destroy(),Ec.destroy("ui"))}initPlayerRootContainers(){this.rootContainer=document.createElement("div"),this.rootContainer.style.position="relative",this.rootContainer.className="root-container",this.rootContainer.style.width="100%",this.rootContainer.style.height="100%",this.rootContainer.style.minHeight="206px",this.shadowRootContainer=document.createElement("div"),this.shadowRootContainer.style.position="absolute",this.shadowRootContainer.className="shadow-root-container",this.shadowRootContainer.style.width="100%",this.shadowRootContainer.style.height="100%",this._shadowRoot=this.shadowRootContainer.attachShadow({mode:"open"}),this.playerContainer=document.createElement("div"),this.playerContainer.style.all="initial",this.playerContainer.style.display="block",this.playerContainer.style.contain="strict",this.playerContainer.style.width="100%",this.playerContainer.style.height="100%",this._shadowRoot.append(this.playerContainer),this.rootContainer.append(this.shadowRootContainer),this.stateContainer=document.createElement("div"),this.stateContainer.className="state-container",this.stateContainer.style.width="1px",this.stateContainer.style.height="1px",this.stateContainer.style.position="absolute",this.stateContainer.style.backgroundColor="transparent",this.stateContainer.style.left="-100000px",this.append(this.rootContainer),this.append(this.stateContainer)}needToShowNextPrevButtons(){return this.videoConfig?this.videoConfig.videos.length>1&&this.videoConfig.showNextPrevButtons:!1}isNextButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1||this.needToRepeatPlaylist):!1}isPrevButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex>0||this.needToRepeatPlaylist):!1}isControlDisabled(e){var i;let o=(i=this.store)==null?void 0:i.ui.controls.disabledControls$;return(o==null?void 0:o.includes(e))||!1}getNextVideoInfo(){if(!this.videoConfig)return{nextVideoTitle:void 0,nextVideoThumb:void 0};let e=this.videoConfig.videos[this.currentPlayingVideoIndex+1]||{};return{nextVideoTitle:e.title,nextVideoThumb:e.thumbUrl}}createThinOneStat(e,i={}){if(!this.videoConfig)return;let{deviceId:o,preload:r,refreshStatAuthToken:a}=$c(this.videoConfig,i),{unitedVideoId:l}=e;if(this.uiConfig.features.thinStatistics&&l)return new NI.ThinOneStat({deviceId:o,movieId:l,preload:r,isPreviewPlayerView:this.videoConfig.playerView==="preview"},{config:this.statisticsConfig,refreshAuthToken:a})}createPlayer(e,i={},o){var r,a,l,d,s,u,m,p,v,$;if(!this.videoConfig)return;let{albumId:y,statPlace:b,statAuthToken:x,preload:I,autoplay:C,volume:R,muted:k,fromTime:P,canRewindLive:E,supportLink:W,showAds:F,adsSlotId:U,adsParams:j={},adsAutoplayParam:re,interfaceLanguage:G,isCyrillicRelatedInterface:oe,logoClickable:X,logoHidden:Ie,isMobile:fe,isTouch:ee,isAudioDisabled:be,isLiveCatchUpMode:Ce,fullScreenTarget:de,failoverHosts:We,canDownload:ve,callbacks:me,interactiveData:Z,showThumbTimer:N,additionalButtons:pe=[],additionalSettingsMenuItems:le=[],additionalContextMenuItems:ue=[],repeat:Le,loop:ze,saveRate:te,volumeMultiplier:ce,showEndScreen:we,showAutoplayNext:Ee,mediascopePixels:Ye}=$c(this.videoConfig,i),{sources:Ae,title:Te,thumbUrl:Fe,unitedVideoId:ht,isClip:Rt=!1,duration:It,adsParams:ct={},videoEpisodes:Tt,previewThumbsData:Yt,subtitles:Ht,subtitlesForcedLanguage:Ot,live:Wt,adsExternalApi:q,adsJson:Me}=e;if(!Ae&&!Wt){let ui=new Error("empty sources and live");this.fatalError$.next(ui),(r=me.onCrashed)==null||r.call(me,ui.message);return}let Ve=tl(tl({},j),ct),xe=this.getNextVideoInfo(),Ue={sources:Ae,title:Te,thumbUrl:Fe,subtitles:Ht,subtitlesForcedLanguage:Ot,unitedVideoId:ht,isClip:Rt,live:Wt,albumId:y,statPlace:b,autoplay:C,muted:k,volume:R,fromTime:P,canRewindLive:E,showAds:F,adsSlotId:U,adsParams:Ve,adsAutoplayParam:re,duration:It,logoClickable:X,logoHidden:Ie,isTouch:ee!=null?ee:fe,repeat:Le,loop:ze,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:xe.nextVideoTitle,endScreenVideoThumb:xe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},Se={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(Ue)}`});let Ct=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),ge=(Ct==null?void 0:Ct.oneStat)||this.createOneStat(e,i),Ne=this.createThinOneStat(e,i),Ge;Ye&&(Ge=new BI({pixels:Ye})),(ge||Ne)&&(this.statistics=new zu(ge,Ne,Ge,Ct==null?void 0:Ct.statSubscription));let lt=this.uiConfig.features.apptracer.enabled?new SI("videoplayer",this.uiConfig.features.apptracer,{version:Vl,env:vu},II({movieId:ht,albumId:y,place:b,autoplay:(l=C&&!this.interactiveController)!=null?l:!1,mobile:ee!=null?ee:fe,clip:Rt})):void 0;this.interactiveController&&((u=this.prevIsid)!=null||(this.prevIsid=(s=(d=this.statistics)==null?void 0:d.oneStat)==null?void 0:s.isid$.getValue()));let Qt=!!Z,At=[],di="tooltip_interactive_go_back_disabled_first";if(Qt&&this.interactiveController){let ui=this.interactiveController.state.isInitialChapter$.getValue(),st=this.interactiveController.getHistoryState();ui&&At.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||At.push("SEEK_TO_INTERACTIVE_BUTTON"),st.hasPrevChapter$.getValue()||(At.push("PLAY_PREV_CHAPTER_BUTTON"),ui||(st.isGoBackLimited$.getValue()?di="tooltip_interactive_go_back_disabled_limit":di="tooltip_interactive_go_back_disabled"))}let ci=()=>{var ui;this.isInited=!1,this.prevIsid=void 0;let st=(o==null?void 0:o.info.isEnded$.getValue())&&((ui=this.interactiveController)==null?void 0:ui.state.isEndChapter$.getValue());me.onReplayInteractiveVideo&&!st?me.onReplayInteractiveVideo():this.replayInteractiveVideo()},Li=Le&&this.videoConfig.videos.length===1;this.store=nb({player:o,interfaceLanguage:G,isCyrillicRelatedInterface:oe,videoId:ht,isClip:Rt,isLiveCatchUpMode:Ce,isAudioDisabled:be,statAuthToken:x,callbacks:me,webApi:Se,videoEpisodes:Tt,previewThumbsData:Yt,canDownload:ve,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,disabledControls:At,isInteractive:Qt,saveRate:te,interactiveRanges$:(m=this.interactiveController)==null?void 0:m.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:ci,playPrevChapterDisabledTooltip:di,hasInteractiveBranches:!!(($=(v=this.interactiveController)==null?void 0:v.getChapterBranches())!=null&&$.length),additionalButtons:this.uiConfig.features.additionalButtons?pe:[],additionalSettingsMenuItems:le!=null?le:[],additionalContextMenuItems:ue!=null?ue:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:ui=>{var st;return(st=this.sveltePersistentLayerComponent)==null?void 0:st.startVideoChangedAnimation(ui)},looped:this.uiConfig.features.useLoopSetting?ze:Li,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId,appTracer:lt,videoElement:this.videoConfig.videoElement});let{stores:vo}=this.microStoresRoot=Qb(),go=()=>{var ui,st,pi,Zi,ut,Nt;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(nt=>{var rt;return(rt=me==null?void 0:me.onCurrentFormatChanged)==null?void 0:rt.call(me,nt)})),this.subscription.add(vo.interactiveControlsOpacity$.subscribe(nt=>{var rt;nt!==null&&((rt=this==null?void 0:this.interactiveController)==null||rt.setDisabledControls(nt))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(nt=>{var rt;return(rt=me==null?void 0:me.onThroughputEstimationChanged)==null?void 0:rt.call(me,nt)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(nt=>{var rt;return(rt=me==null?void 0:me.onTrafficSavingEnabledChanged)==null?void 0:rt.call(me,nt)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(nt=>{var rt;return(rt=me==null?void 0:me.onHighQualityEnabledChanged)==null?void 0:rt.call(me,nt)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(nt=>{var rt;return(rt=me==null?void 0:me.onAutoQualityEnabledChanged)==null?void 0:rt.call(me,!!nt)})),this.subscription.add(new kI(nt=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(rt=>nt.next(rt)))}).pipe(VI(1)).subscribe(nt=>{var rt;return(rt=me==null?void 0:me.onCurrentPlaybackRateChanged)==null?void 0:rt.call(me,nt)})),this.subscription.add(this.store.state.volume$.subscribe(nt=>{var rt;return(rt=me==null?void 0:me.onVolumeChange)==null?void 0:rt.call(me,nt)})),this.subscription.add(this.store.state.muted$.subscribe(nt=>{var rt,Pi,en,Mo;if(nt)(rt=me==null?void 0:me.onMute)==null||rt.call(me);else{let $t=(en=((Pi=this.store)==null?void 0:Pi.state.volume$)&&$e(this.store.state.volume$))!=null?en:0;(Mo=me==null?void 0:me.onUnmute)==null||Mo.call(me,$t)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(nt=>{var rt;return(rt=me==null?void 0:me.onVideoBitrateChanged)==null?void 0:rt.call(me,nt)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(nt=>{var rt;let Pi=(rt=this.store)==null?void 0:rt.ui.controls.disabledControls$;Pi&&(nt&&!Pi.includes(Cd)&&Pi.add(Cd),nt||Pi.remove(Cd))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(nt=>up(this,null,function*(){var rt;if(!jb.browser.isSamsungBrowser||!nt||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&(yield this.replayInteractiveChapter((rt=this.videoConfig)==null?void 0:rt.callbacks.onExternalFullscreenExit))}))),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(nt=>{var rt;return(rt=me==null?void 0:me.onVSIDChanged)==null?void 0:rt.call(me,nt)})),this.initMediaSession(),D(Zn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:Ae,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Te,thumbUrl:Fe,subtitles:Ht,subtitlesForcedLanguage:Ot,live:Wt,preload:I,autoplay:C,muted:k,volume:R,fromTime:P,canRewindLive:E,supportLink:W,showAds:F,adsSlotId:U,adsParams:Ve,adsAutoplayParam:re,duration:It,logoClickable:X,logoHidden:Ie,isMobile:ee!=null?ee:fe,failoverHosts:We,fullScreenTarget:de,saveRate:te,shadowRootContainer:this.shadowRootContainer,showMiniTimer:N,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:xe.nextVideoTitle,endScreenVideoThumb:xe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:ce,showEndScreen:we,showAutoplayNext:Ee,adsExternalApi:q,adsJson:Me,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let vi={target:this.playerContainer,props:n(Zn)};this.svelteRootComponent=Xr(Tv,vi),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(pi=(st=(ui=this.videoConfig)==null?void 0:ui.callbacks)==null?void 0:st.onInited)==null||pi.call(st)),(Zi=this.internalsExposure)==null||Zi.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((Nt=(ut=this.videoConfig)==null?void 0:ut.callbacks)!=null&&Nt.onDevNullLog)?Ec.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Ec.destroy("ui")};this.coreConfig.asyncResolveClientChecker?jb.isInited$.subscribe(ui=>{ui&&(console.log("UI SDK async start"),go())}):go()}addPlayerInfoSubscriptions(){var e,i;let o=this.store,r=(e=this.microStoresRoot)==null?void 0:e.stores;if(!o||!r)return;let a=(i=this.videoConfig)==null?void 0:i.callbacks;a&&this.subscription.add(o.playerPhase.subscribe(d=>{var s;return(s=a.onPlayerPhaseChanged)==null?void 0:s.call(a,d)})).add(o.state.playbackState$.subscribe(d=>{var s;return d&&((s=a.onPlaybackStateChanged)==null?void 0:s.call(a,d))})).add(o.state.playbackStateRealistic$.subscribe(d=>{d?this.stateContainer.setAttribute("data-playback-state",d):this.stateContainer.removeAttribute("data-playback-state")})).add(o.state.isLive$.subscribe(d=>{var s;return(s=a.onIsLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isActiveLive$.subscribe(d=>{var s;return(s=a.onIsActiveLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isAudioAvailable$.subscribe(d=>{var s;return(s=a.onIsAudioAvailableChanged)==null?void 0:s.call(a,d)})).add(o.state.currentQuality$.subscribe(d=>{var s;return(s=a.onCurrentQualityChanged)==null?void 0:s.call(a,d)})).add(o.state.availableQualities$.subscribe(d=>{var s;return(s=a.onAvailableQualitiesChanged)==null?void 0:s.call(a,d.map(({value:u})=>u).filter(u=>u!=="auto"))})).add(o.state.availableAudioStreams$.subscribe(d=>{d.length>1&&a.onAudioLanguagesAvailable&&a.onAudioLanguagesAvailable()})).add(r.pictureInPicture$.isActive$.subscribe(d=>{var s,u;return d?(s=a.onPiPEnter)==null?void 0:s.call(a):(u=a.onPiPExit)==null?void 0:u.call(a)}));let l=a==null?void 0:a.uiInfo;l&&this.subscription.add(o.ui.controlsVisible.subscribe(d=>{var s;return(s=l.onControlsVisibleChanged)==null?void 0:s.call(l,d)})).add(o.ui.isMobile.subscribe(d=>{var s;return(s=l.onIsMobileChanged)==null?void 0:s.call(l,d)})).add(o.ui.playerSize.subscribe(d=>{var s;return(s=l.onPlayerSizeChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.prevButton.subscribe(d=>{var s;return(s=l.onPrevButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playButton.subscribe(d=>{var s;return(s=l.onPlayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.replayButton.subscribe(d=>{var s;return(s=l.onReplayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.nextButton.subscribe(d=>{var s;return(s=l.onNextButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playPrevChapterButton.subscribe(d=>{var s;return(s=l.onPlayPrevChapterChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.seekToInteractiveButton.subscribe(d=>{var s;return(s=l.onSeekToInteractiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveGraphButton.subscribe(d=>{var s;return(s=l.onGraphButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.liveButton.subscribe(d=>{var s;return(s=l.onLiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.time.subscribe(d=>{var s;return(s=l.onTimeUpdateChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.episodes.subscribe(d=>{var s;return(s=l.onEpisodesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.subtitles.subscribe(d=>{var s;return(s=l.onSubtitlesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topLeft.subscribe(d=>{var s;return(s=l.onTopLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topRight.subscribe(d=>{var s;return(s=l.onTopRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomLeft.subscribe(d=>{var s;return(s=l.onBottomLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomRight.subscribe(d=>{var s;return(s=l.onBottomRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.middle.subscribe(d=>{var s;return(s=l.onMiddleControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottom.subscribe(d=>{var s;return(s=l.onBottomControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.videoTitleInfo.subscribe(d=>{var s;return(s=l.onTitleChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.settings.subscribe(d=>{var s;return(s=l.onSettingsChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.fullscreen.subscribe(d=>{var s;return(s=l.onFullscreenChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.chromecast.subscribe(d=>{var s;return(s=l.onChromecastChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.pip.subscribe(d=>{var s;return(s=l.onPipChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls["theater-mode-button"].subscribe(d=>{var s;return(s=l.onTheaterModeChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.vkLogo.subscribe(d=>{var s;return(s=l.onVkLogoChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveTimeIndicator.subscribe(d=>{var s;return(s=l.onInteractiveTimeIndicatorChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.timeline.subscribe(d=>{var s;return(s=l.onTimelineChanged)==null?void 0:s.call(l,d)}))}playNextVideo(){this.videoConfig&&(this.currentPlayingVideoIndex++,this.currentPlayingVideoIndex>=this.videoConfig.videos.length&&(this.currentPlayingVideoIndex=0),this.log({message:`play next video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}playPrevVideo(){this.videoConfig&&(this.currentPlayingVideoIndex--,this.currentPlayingVideoIndex<0&&(this.currentPlayingVideoIndex=this.videoConfig.videos.length-1),this.log({message:`play prev video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}createPlayerWithCurrentVideo(e,i=!0){var o;if(!this.videoConfig)return;let r=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!r){this.log({message:"no next video"});return}this.isInited&&Ov(r.unitedVideoId)&&((o=this.store)==null||o.actions.internal.nextMovie(r.unitedVideoId)),this.unmountComponent(this.svelteRootComponent),this.createPlayer(r,{autoplay:i,fromTime:0},e)}playPrevChapter(){var e;(e=this.interactiveController)==null||e.playPrevChapter()}seekToInteractive(){var e;let i=(e=this.interactiveController)==null?void 0:e.getNextInteractiveStartTime();typeof i=="number"&&this.seekTime(i/1e3)}initInteractives(){return up(this,null,function*(){var e,i,o,r,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=yield import("@vkontakte/videoplayer-interactive/es2015");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let s=(i=this.store)==null?void 0:i.interfaceLanguage$,u=s?$e(s):this.videoConfig.interfaceLanguage,{projectInfo:m,initChapterId:p,historyApi:v,videoLoader:$}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:m,initChapterId:p,historyApi:v,vkVideoLoader:$,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,isTouch:this.videoConfig.isTouch,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation,controlsTapPlace:this.uiConfig.features.interactiveControlsTapPlace,controlsFillAnimation:this.uiConfig.features.interactiveControlsFillAnimation,controlsHideAnimation:this.uiConfig.features.interactiveControlsHideAnimation},endChapterHistoryFix:this.uiConfig.features.interactiveHistoryEndChapterFix});let{isInteractiveExpectation$:y,isSeekable$:b}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(b.subscribe(I=>{if(!this.isInited)return;let C=this.store;I?C.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):C.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(y.subscribe(I=>{this.store&&this.store.state.isInteractiveExpectation$.set(I)}));let x=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(I=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]=wI(tl({},I.config),{title:(m==null?void 0:m.title)||I.config.title});let C=x?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(I.player,C),x&&(x=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:I,actionType:C})=>{var R,k,P,E,W,F;if(!this.store||!this.microStoresRoot)return;let U=y.getValue();if(I==="action-choice"&&C==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Td)),I==="action-choice-canceled"){let j=$e(this.store.state.isPlaying$)||U;if(((P=(R=this.videoConfig)==null?void 0:R.isTouch)!=null?P:(k=this.videoConfig)!=null&&k.isMobile)&&j){this.store.ui.interactiveHideMobileControls.set(!0);return}(F=(E=this.videoConfig)==null?void 0:(W=E.callbacks).onDisabledInteractiveClick)==null||F.call(W)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:I,removeAllOpenURI:C})=>{this.store&&I==="container-fake-removed"&&C&&this.store.ui.controls.disabledControls$.remove(Td)})),yield this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(r=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&r.onInteractiveHistoryChanged){let I=this.interactiveController.getHistoryState();this.subscription.add(I.history$.subscribe(C=>{var R,k,P;C.length&&((P=(k=(R=this.videoConfig)==null?void 0:R.callbacks)==null?void 0:k.onInteractiveHistoryChanged)==null||P.call(k,C))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(I=>{var C,R,k;(k=(C=this.videoConfig)==null?void 0:(R=C.callbacks).onInteractiveChapterChanged)==null||k.call(R,I.chapter,I.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var I,C,R,k;(I=this.microStoresRoot)==null||I.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(k=(C=this.videoConfig)==null?void 0:(R=C.callbacks).onInteractiveTimeIndicatorClick)==null||k.call(R)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(I=>{this.log({message:I.toString()})}))}catch(d){this.log({message:d.message})}})}initPlayer(e,i={}){var o,r,a,l,d,s,u,m,p,v,$,y,b,x,I,C,R,k,P,E,W,F,U,j,re;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let G=new Error("empty videos");this.fatalError$.next(G),(r=(o=e.callbacks)==null?void 0:o.onCrashed)==null||r.call(o,G.message);return}else this.fatalError$.next(null);if(this.videoConfig=$c(HI,EI(e,G=>G instanceof Dv?G:void 0)),(a=this.playerId)!=null||(this.playerId=RI(e.playerId)),this.uiConfig=Ph((l=i.ui)!=null?l:{}),this.updatePersistentLayerProps(),this.coreConfig=(d=i.core)!=null?d:{},this.statisticsConfig=(s=i.statistics)!=null?s:{},this.metaConfig=i.meta,this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer&&(this.rootContainer.style.minHeight="unset"),this.style.display="block",this.style.width="100%",this.style.height="100%"),this.videoConfig.playerView==="preview"&&(this.playerContainer.style.contain="none"),this.uiConfig.features.exposeInternalsToGlobal&&((u=this.internalsExposure)!=null||(this.internalsExposure=new MI("ui",this.playerId))),Ec.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((m=this.videoConfig)==null?void 0:m.showAds)],numbers:[CI()]}),Ov(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(v=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?v:!0),Ov(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(y=($=this.uiConfig.features.pip)!=null?$:this.videoConfig.isPictureInPictureEnabled)!=null?y:!0,this.uiConfig.features.dpip=(x=(b=this.uiConfig.features.dpip)!=null?b:this.videoConfig.isPictureInPictureEnabled)!=null?x:!0),this.uiConfig.ads.paramsOverride=tl({preview:(I=this.uiConfig.ads.preview)!=null?I:this.videoConfig.adsPreviewParam},this.uiConfig.ads.paramsOverride),this.videoConfig.isTouch=(R=(C=this.uiConfig.isMobile)!=null?C:this.videoConfig.isTouch)!=null?R:this.videoConfig.isMobile,(k=this.videoConfig).autoplay&&(k.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(P=this.uiConfig.ads.enable)!=null?P:this.videoConfig.showAds,this.videoConfig.adsSlotId=(E=this.uiConfig.ads.slot)!=null?E:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((W=this.uiConfig.showLogo)!=null?W:!this.videoConfig.logoHidden),(F=this.videoConfig).canRewindLive&&(F.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(U=this.videoConfig.supportLink)!=null?U:this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=this.uiConfig.features.autoplayNext&&this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=this.uiConfig.features.nextPrevButtons&&this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((j=this.videoConfig.videos)!=null&&j[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let G={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=rp.getLatestSupportedVersion(G):this.pictureInPictureApi=new Hs(G)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new np:void 0,this.slotsApi=this.uiConfig.features.slots?new ep(this.uiConfig.disabledSlotIds):void 0,this.annotationsApi=this.uiConfig.features.annotations?new sp(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new cp(this._shadowRoot):void 0,this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.isInited=!1,this.prevIsid=void 0,this.interactiveController&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveSubscription.unsubscribe()),this.videoConfig.interactiveData?this.initInteractives():this.createPlayer(this.videoConfig.videos[this.currentPlayingVideoIndex]),Fb(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(re=this.slotsApi)==null||re.init(this.shadowRootContainer,this.store)}isOneVideoPlaylist(){return this.videoConfig?this.videoConfig.videos.length===1:!1}updateVideos(e,i){if(!this.videoConfig)return;this.log({message:`update ${i} videos, videos: ${JSON.stringify(e)}`}),i==="prev"?(this.videoConfig.videos.splice(0,this.currentPlayingVideoIndex),this.videoConfig.videos.unshift(...e),this.currentPlayingVideoIndex=e.length):i==="next"&&(this.videoConfig.videos.splice(this.currentPlayingVideoIndex+1),this.videoConfig.videos.push(...e));let o=this.getNextVideoInfo();n(Zn)&&(n(Zn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Zn).nextButtonActive=this.isNextButtonActive(),n(Zn).prevButtonActive=this.isPrevButtonActive(),n(Zn).endScreenVideoTitle=o.nextVideoTitle,n(Zn).endScreenVideoThumb=o.nextVideoThumb,n(Zn).isOneVideoPlaylist=this.isOneVideoPlaylist())}updatePrevVideos(e){this.updateVideos(e,"prev")}updateNextVideos(e){this.updateVideos(e,"next")}initMediaSession(){var e,i;this.mediaSessionApi&&((e=this.unsubscribePlayerPhaseSubscription)==null||e.call(this),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=(i=this.store)==null?void 0:i.playerPhase.subscribe(o=>{o==="video"?this.setupMediaSessionForVideo():o==="ads"&&this.setupMediaSessionForAds()}))}setupMediaSessionForVideo(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let{title:e,thumbUrl:i}=tl({},this.videoConfig.videos[this.currentPlayingVideoIndex]),o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",r=>this.seekTime(r.seekTime)]];this.videoConfig.videos.length>1&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1&&o.push(["nexttrack",()=>{var r,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(r=this.videoConfig)==null?void 0:r.callbacks)==null?void 0:a.onNextVideoClick)==null||l.call(a)}catch(d){this.log({message:"onNextVideoClick callback failed to execute"})}else this.playNextVideo()}]),this.currentPlayingVideoIndex>0&&o.push(["previoustrack",()=>{var r,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(r=this.videoConfig)==null?void 0:r.callbacks)==null?void 0:a.onPrevVideoClick)==null||l.call(a)}catch(d){this.log({message:"onPrevVideoClick callback failed to execute"})}else this.playPrevVideo()}])),this.mediaSessionApi.setMetaData({title:e,thumbUrl:i}),this.mediaSessionApi.updateActionHandlers(o),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}setupMediaSessionForAds(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let e="Реклама",i=[["play",()=>this.play()],["pause",()=>this.pause()]];this.mediaSessionApi.setMetaData({title:e}),this.mediaSessionApi.updateActionHandlers(i),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}moveTo(e){this.shadowDOMCallbacksDisabled=!0,e.append(this),this.shadowDOMCallbacksDisabled=!1}play(){var e,i,o,r;this.isControlDisabled("PLAY_BUTTON")||(e=this.store)!=null&&e.playerPhase.is("LiveWaitingStart")||(i=this.store)!=null&&i.playerPhase.is("LiveWaitingRecover")||(o=this.store)!=null&&o.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),(r=this.svelteRootComponent)==null||r.play())}pause(){var e;this.log({message:"pause"}),(e=this.svelteRootComponent)==null||e.pause()}stop(){var e;if(!this.videoConfig)return;this.log({message:"stop"});let i=!!this.interactiveController;i&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveContainer=void 0,this.interactiveSubscription.unsubscribe()),this.unmountComponent(this.svelteStubComponent),(e=this.mediaSessionApi)==null||e.destroy();let o=this.videoConfig.videos[0];o&&(this.unmountComponent(this.svelteRootComponent),i?(this.videoConfig.autoplay=!1,this.initInteractives()):this.createPlayer(o))}setMuted(e){var i;this.log({message:`set muted, muted: ${e}`}),(i=this.svelteRootComponent)==null||i.setMuted(e)}toggleSubtitle(){var e;this.log({message:"toggle subtitle"}),(e=this.svelteRootComponent)==null||e.toggleSubtitle()}changeSubtitle(e,i){var o;this.log({message:"change subtitle"}),(o=this.svelteRootComponent)==null||o.changeSubtitle(e,i)}hideControls(){var e;this.log({message:"hide controls"}),(e=this.svelteRootComponent)==null||e.hideControls()}showControls(){var e;this.log({message:"show controls"}),(e=this.svelteRootComponent)==null||e.showControls()}setPiPEnabled(e){var i,o;(o=(i=this.store)==null?void 0:i.webApi.pictureInPictureApi)==null||o.setEnabled(e)}setVolume(e){var i;this.log({message:`set volume, volume: ${e}`}),(i=this.svelteRootComponent)==null||i.setVolume(e)}setRepeat(e){this.log({message:`set repeat, repeat: ${e}`}),this.needToRepeatPlaylist=e,n(Zn)&&(n(Zn).needToRepeatPlaylist=this.needToRepeatPlaylist,n(Zn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Zn).nextButtonActive=this.isNextButtonActive(),n(Zn).prevButtonActive=this.isPrevButtonActive())}seekTime(e){var i;this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekTime(e))}seekEpisodeStartTime(e){var i;this.log({message:`seek episode start time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekEpisodeStartTime(e)}returnFocusToEpisodes(){var e;this.log({message:"return focus to episodes button"}),(e=this.svelteRootComponent)==null||e.returnFocusToEpisodes()}setPlaybackRate(e){var i;this.log({message:`set playback rate to: ${e}`}),(i=this.svelteRootComponent)==null||i.setPlaybackRate(e)}setAutoQualityLimits(e){var i,o,r;this.log({message:`set auto quality limitation. Max: ${(i=e.max)!=null?i:"none"}. Min: ${(o=e.min)!=null?o:"none"}`}),(r=this.svelteRootComponent)==null||r.setAutoQualityLimits(e)}setAutoQuality(){var e;(e=this.svelteRootComponent)==null||e.setAutoQuality()}toggleTrafficSaving(e){var i;(i=this.svelteRootComponent)==null||i.toggleTrafficSaving(e)}toggleHighQuality(e){var i;(i=this.svelteRootComponent)==null||i.toggleHighQuality(e)}changeAudioStream(e){var i;(i=this.svelteRootComponent)==null||i.changeAudioStream(e)}addLanguage(e){var i;(i=this.store)==null||i.actions.internal.addLanguage(e)}setLanguage(e){return up(this,null,function*(){var i;yield(i=this.store)==null?void 0:i.actions.internal.setLanguage(e)})}setLiveStart(e){var i,o;let r=this.isLiveTailPlaying();this.log({message:`live started: liveTailPlaying = ${r}`}),r||((i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!1),(o=this.store)==null||o.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){var e;this.log({message:"live waiting"}),(e=this.store)==null||e.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){var e;let i=(e=this.store)==null?void 0:e.getPlayer();if(!i)return!1;let{info:o}=i;return o.canPlayLiveTailBuffer$.getValue()&&!o.isStalled$.getValue()&&!o.atLiveEdge$.getValue()}setLiveWaitingRecover(e=!1){var i;let o=this.isLiveTailPlaying(),r=e||!o;this.log({message:`live waiting recover: forceImmediate = ${e}, liveTailPlaying = ${o}`});let a=()=>{var l;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!0)};r&&a(),(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var l;r||a(),(l=this.store)==null||l.destroy()})}setLiveWaitingRecord(){var e;let i=this.isLiveTailPlaying(),o=!i;this.log({message:`live waiting record: liveTailPlaying = ${i}`});let r=()=>{var a;(a=this.store)==null||a.actions.internal.setLiveWaitingRecord(!0)};o&&r(),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var a;o||r(),(a=this.store)==null||a.destroy()})}setLiveEnd(e){var i;let o=this.isLiveTailPlaying(),r=!o;this.log({message:`live ended: liveTailPlaying = ${o}`});let a=()=>{var l,d;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!1),(d=this.store)==null||d.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};if(r){a();return}(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=a)}setLiveLowLatency(e){var i;this.log({message:"live switch to low latency "+e}),(i=this.store)==null||i.actions.external.setLiveLowLatency(e)}setLooped(e){var i;(i=this.store)==null||i.actions.internal.setLooped(e)}getDebugData(){var e,i;return(i=(e=this.store)==null?void 0:e.actions.internal.getDebugTextData())!=null?i:""}getDeviceId(){var e,i,o;return(o=(i=(e=this.statistics)==null?void 0:e.oneStat)==null?void 0:i.getDeviceId())!=null?o:void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}replayInteractiveChapter(e){return up(this,null,function*(){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let r=$e(this.store.state.positionExact$),l=$e(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe(LI()).subscribe(()=>{l&&r>=l.time?this.seekTime(l.time):this.seekTime(r),e==null||e()});let d=this.interactiveController.getCurrentChapter();yield this.interactiveController.setChapter({chapterId:(o=d==null?void 0:d.chapter)==null?void 0:o.id,pushToHistory:!1})}})}showInteractiveIndicatorTooltip(e,i=!1){var o;(o=this.microStoresRoot)==null||o.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){var e;(e=this.store)==null||e.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}handleTimerNextVideo(e){var i;(i=this.store)==null||i.actions.internal.setTimerNextVideoRunning(e)}togglePictureInPicture(){var e;(e=this.store)==null||e.actions.internal.togglePictureInPicture()}focus(){var e,i,o;(o=(i=(e=this.svelteRootComponent)==null?void 0:e.keyboardControls)==null?void 0:i.focus)==null||o.call(i)}restoreFocus(){var e;(e=this.focusManager)==null||e.restoreFocus()}handleExternalKeyboardEvent(e){var i,o;return!!((o=(i=this.svelteRootComponent)==null?void 0:i.keyboardControls)!=null&&o.handleExternalKeyboardEvent(e))}setAutoplayNext(e){var i;(i=this.store)==null||i.actions.internal.setAutoplayNextEnabled(e)}getTotalViewTime(){var e,i;return(i=(e=this.statistics)==null?void 0:e.thinOneStat)==null?void 0:i.getTotalViewTime()}unmountComponent(e){e&&Ma(e)}};import{InterfaceLanguage as gne,VKNumericLanguage as hne,loadVKLangPack as _ne}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as $ne,VideoFormat as yne}from"@vkontakte/videoplayer-core/es2015";var lne=()=>{window.customElements.define("vk-video-player",pp)};export{Wu as ControlButtonType,hs as GridTypes,gne as InterfaceLanguage,Od as MenuItemType,_s as PlayerPhase,Vl as VERSION,hne as VKNumericLanguage,yne as VideoFormat,$ne as VideoQuality,_ne as loadVKLangPack,lne as registerPlayerWebComponent};
|
|
58
|
+
M12 29.8c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6H13.8a1.8 1.8 90 01-1.8-1.8m0-7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6H13.8a1.8 1.8 90 01-1.8-1.8m17 7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6h-3.4a1.8 1.8 90 01-1.8-1.8M22 22.2c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6h-10.4a1.8 1.8 90 01-1.8-1.8`)),$(p,f)};M(d,p=>{e.type==="off"?p(r):p(u,!1)})}$(s,l)},$$slots:{default:!0}}),H()}function sm(t,e){B(e,!0);let i=g(e,"isSubtitlesEnabled",3,!1),s=xe().ui.t,a=m(()=>i()?s("tooltip_subtitles_on"):s("tooltip_subtitles_off"));Ht(t,{testId:"subtitles-btn",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return $s.KeyC},role:"button",children:(l,d)=>{let r=m(()=>i()?void 0:"outline");ma(l,{get size(){return"24"},get type(){return n(r)}})},$$slots:{default:!0}}),H()}var By=L('<span class="duration s-23" data-testid="video_duration"> </span>'),Hy=L('<div data-testid="time"><span class="current s-23" data-testid="current_time"> </span> <!></div>'),Fy={hash:"s-23",code:'.time.s-23{align-items:center;color:var(--controls-time);display:flex;font-variant-numeric:tabular-nums;font-weight:500;padding:12px 6px}.time.mobile.s-23{padding:0 0 0 8px}.current.s-23{position:relative}.duration.s-23{opacity:.7}.duration.s-23:before{content:" / ";white-space:pre}'};function jd(t,e){B(e,!0),Q(t,Fy);let i=g(e,"isMobile",3,!1),o=g(e,"isHidden",3,!1),s=g(e,"showDuration",3,!0),a=g(e,"ref",15),l=Lt(),d=se(!1),r=m(()=>jo(e.duration)),u=m(()=>jo(e.position));var p=Hy();let f;var v=C(p),b=C(v,!0);S(v);var y=A(v,2);{var _=w=>{var I=By(),T=C(I,!0);S(I),O(()=>he(T,n(r))),$(w,I)};M(y,w=>{s()&&w(_)})}S(p),Os(p,()=>Ol(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),it(p,w=>a(w),()=>a()),O(w=>{f=te(p,1,"time s-23",null,f,w),he(b,n(u))},[()=>({mobile:i()})]),$(t,p),H()}import{noop as Bu}from"@vkontakte/videoplayer-shared/es2015";var Uy=Ae('<path d="M21.8632 10.0832C22.2147 9.73171 22.7852 9.73171 23.1367 10.0832C23.4881 10.4347 23.4881 11.0051 23.1367 11.3566L18.6367 15.8566C18.2852 16.2081 17.7147 16.2081 17.3632 15.8566C17.0117 15.5051 17.0117 14.9347 17.3632 14.5832L21.8632 10.0832Z"></path><path d="M17.3632 11.3566C17.0117 11.0051 17.0117 10.4347 17.3632 10.0832C17.7147 9.73171 18.2852 9.73171 18.6367 10.0832L23.1367 14.5832C23.4881 14.9347 23.4881 15.5051 23.1367 15.8566C22.7852 16.2081 22.2147 16.2081 21.8632 15.8566L17.3632 11.3566Z"></path>',1),zy=Ae("<path></path>"),Wy=Ae('<path d="M14 3C14.5523 3 15 3.44772 15 4V20C15 20.5523 14.5523 21 14 21C13.3585 21 12.7422 20.7509 12.2808 20.3052L6.79013 15H4C2.89543 15 2 14.1046 2 13V11C2 9.89543 2.89543 9 4 9H6.765L12.2794 3.6934C12.7418 3.24852 13.3584 3 14 3Z"></path><!>',1);function va(t,e){B(e,!0);let i=g(e,"volume",3,1),o=g(e,"muted",3,!1),s=(u,p)=>p?"off":u>.5?"max":u>.2?"mid":u>0?"min":"off",a=m(()=>s(i(),o())),l=m(()=>dn(e.size)),d="M16.8748 8.85259C17.2324 8.50731 17.8021 8.51726 18.1474 8.87481C18.5465 9.28803 18.8614 9.77691 19.0757 10.3128C19.2901 10.8486 19.4 11.4218 19.4 12C19.4 12.5782 19.2901 13.1514 19.0757 13.6872C18.8614 14.2231 18.5465 14.712 18.1474 15.1252C17.8021 15.4827 17.2324 15.4927 16.8748 15.1474C16.5173 14.8021 16.5073 14.2324 16.8526 13.8748C17.0876 13.6314 17.2757 13.3408 17.4045 13.0187C17.5333 12.6966 17.6 12.3504 17.6 12C17.6 11.6496 17.5333 11.3034 17.4045 10.9813C17.2757 10.6592 17.0876 10.3686 16.8526 10.1252C16.5073 9.76764 16.5173 9.19788 16.8748 8.85259Z",r="M19.2636 6.2636C19.6151 5.91213 20.1849 5.91213 20.5364 6.2636C21.2516 6.97878 21.9929 7.99659 22.3989 8.97678C22.7959 9.93525 23.0003 10.9625 23.0003 12C23.0003 13.0374 22.7959 14.0647 22.3989 15.0232C21.9929 16.0034 21.2516 17.0212 20.5364 17.7364C20.1849 18.0879 19.6151 18.0879 19.2636 17.7364C18.9121 17.3849 18.9121 16.8151 19.2636 16.4636C19.8484 15.8788 20.4384 15.0527 20.7359 14.3343C21.0425 13.5943 21.2003 12.801 21.2003 12C21.2003 11.1989 21.0425 10.4057 20.7359 9.66561C20.4384 8.94724 19.8484 8.12124 19.2636 7.5364C18.9121 7.18492 18.9121 6.61508 19.2636 6.2636Z";je(t,{get style(){return n(l)},get testId(){var u;return`volume-${(u=n(a))!=null?u:""}-icon`},get shadow(){return e.shadow},children:(u,p)=>{var f=Wy(),v=A(le(f));{var b=_=>{var w=Uy();Xt(),$(_,w)},y=_=>{var w=zy();O(()=>De(w,"d",`${d}${n(a)==="max"?r:""}`)),$(_,w)};M(v,_=>{n(a)==="off"?_(b):_(y,!1)})}$(u,f)},$$slots:{default:!0}}),H()}import{isNonNullable as Q_,noop as Jn}from"@vkontakte/videoplayer-shared/es2015";import{noop as lm}from"@vkontakte/videoplayer-shared/es2015";import{noop as Qy}from"@vkontakte/videoplayer-shared/es2015";var Ky=L('<div class="overlay"><!></div>');function am(t,e){B(e,!0);let[i,o]=Be(),s=()=>x(l,"$overlayContainer$",i),l=xe().ui.overlayContainer$,d=K(void 0),r=v=>{!v||!n(d)||!v.contains(n(d))||v.removeChild(n(d))},u=v=>{!v||!n(d)||v.contains(n(d))||v.appendChild(n(d))};He(()=>{u(s())}),kt(()=>(u(s()),()=>r(s())));var p=Ky(),f=C(p);ei(f,()=>{var v;return(v=e.children)!=null?v:$t}),S(p),it(p,v=>D(d,v),()=>n(d)),$(t,p),H(),o()}var qy=L('<div class="tooltip s-1o"><div class="content s-1o"> </div> <div class="tooltip-pointer s-1o"></div></div>'),Gy=L("<div><!></div> <!>",1),Yy={hash:"s-1o",code:'.tooltip-wrapper.s-1o{display:flex;flex-direction:column;min-width:0}.full-width.s-1o{width:100%}.tooltip.s-1o{bottom:100%;left:0;opacity:0;position:absolute;transition:opacity .2s,visibility .2s;visibility:hidden}.content.s-1o{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.tooltip-pointer.s-1o{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;line-height:0;position:absolute;width:0}'};function Wa(t,e){B(e,!0),Q(t,Yy);let[i,o]=Be(),s=()=>x(Y,"$overlayContainer$",i),a=()=>x(z,"$containerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"content",3,""),r=g(e,"active",15,!1),u=g(e,"translateX",3,0),p=g(e,"translateY",3,0),f=g(e,"isFullWidthWrapper",3,!1),v=g(e,"maxTooltipWidth",3,void 0),b=g(e,"placement",3,"top"),y=g(e,"onVisibilityChange",3,Qy),_=5,w=K(void 0),I=K(void 0),T,R=K(0),k=K(0),P=K(0),E=K(0),W=Lt(),U=xe(),z=U.ui.playerSize,Y=U.ui.overlayContainer$;He(()=>{Et(()=>{y()(r())})});let ie=U.getLogger().createComponentLog("Tooltip component"),J=j=>{if(!s()||!n(I)||!n(w))return;D(k,_);let ne=s().getBoundingClientRect(),Se=n(w).getBoundingClientRect(),Le=Se.width,ze=n(I).clientWidth,Ce=a().width,we=(Le-ze)/2,Fe=Se.left+u()-ne.left,rt=Fe+we,ut=Se.top+p()-ne.top,Mt=ze/2-_,lt=rt<8,ni=rt+ze>Ce-8;j==="top-left"&&(rt=Fe),lt&&(rt=8,Mt=Fe+Se.width/2-2.5*_),ni&&(rt=Ce-8-ze,Mt=Se.left-ne.left+Se.width/2-rt-_),D(P,rt,!0),D(E,ut),D(R,Mt,!0)},oe=()=>{!s()||!n(I)||!n(w)||D(k,-_)},de=()=>{if(!s()||!n(I)||!n(w))return;D(R,_);let j=s().getBoundingClientRect(),ne=n(w).getBoundingClientRect(),Se=ne.height,Le=n(I).clientHeight,ze=(Se-Le)/2+Le,Ce=ne.left+u()-j.left-n(I).clientWidth,we=2,Fe=Ce-_;Fe<8&&(Fe=8);let ut=ne.top+p()-j.top+ze,Mt=we-ze/2,lt=we-_;D(P,Fe,!0),D(E,ut),D(k,Mt),D(R,lt)},ae=()=>{!s()||!n(I)||!n(w)||D(R,-_)},pe=()=>{switch(b()){case"top":J();break;case"bottom":oe();break;case"left":de();break;case"top-left":J("top-left");break;default:ae();break}},ee=()=>{try{if(!s()||!n(w))return;pe(),r(!0)}catch(j){ie({message:String(j)})}},$e=()=>{r(!1)},Ee=()=>{n(I)&&(T||(T=window.setTimeout(ee,W.controls.hideTimeoutTooltips)),r()&&ee())},ce=()=>{$e(),window.clearTimeout(T),T=void 0},Qe=(j,ne,Se)=>{let Le="";switch(b()){case"top":Le=`transform: translate(${j}px, ${ne}px);`;break;case"bottom":Le=`transform: translate(${j}px, ${ne}px); top: auto; bottom: 100%;`;break;case"left":Le=`transform: translate(${j}px, ${ne}px); left: 0; right: auto;`;break;default:Le=`transform: translate(${j}px, ${ne}px);`}return Le+=` max-width: ${v()===void 0?"auto":`${v()}px`};`,Le+=` opacity: ${Se?1:0}; visibility: ${Se?"visible":"hidden"}`,Le},fe=(j,ne)=>{let Se="";switch(b()){case"top-left":case"top":Se=`transform: translate(${j}px, ${ne}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":Se=`transform: translate(${j}px, ${ne}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":Se=`transform: translate(${j}px, ${ne}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:Se=`transform: translate(${j}px, ${ne}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return Se},ve=m(()=>Qe(n(P),n(E),r())),X=m(()=>fe(n(R),n(k)));kt(pe),ln(()=>window.clearTimeout(T));var N=Gy(),me=le(N);let ue;me.__pointermove=Ee,me.__pointerdown=ce,me.__pointerup=function(...j){var ne;(ne=e.disableMouseupTooltipShow?void 0:Ee)==null||ne.apply(this,j)};var Re=C(me);ei(Re,()=>{var j;return(j=e.children)!=null?j:$t}),S(me),it(me,j=>D(w,j),()=>n(w));var Je=A(me,2);{var ke=j=>{am(j,{children:(ne,Se)=>{var Le=qy(),ze=C(Le),Ce=C(ze,!0);S(ze);var we=A(ze,2);S(Le),it(Le,Fe=>D(I,Fe),()=>n(I)),O(()=>{Ke(Le,n(ve)),he(Ce,d()),Ke(we,n(X))}),$(ne,Le)},$$slots:{default:!0}})};M(Je,j=>{d()&&!l()&&j(ke)})}O(j=>ue=te(me,1,"tooltip-wrapper s-1o",null,ue,j),[()=>({"full-width":f()})]),vt("pointerenter",me,Ee),vt("pointerleave",me,ce),$(t,N),H(),o()}Ze(["pointermove","pointerdown","pointerup"]);var K_=t=>{t.stopPropagation()},jy=L("<div><!></div>"),Xy={hash:"s-1k",code:".btn-container.s-1k{align-items:center;display:flex;height:100%;position:relative;transition:var(--button-hover-transition);will-change:opacity;-webkit-tap-highlight-color:transparent}.w-max.s-1k{min-width:0;width:100%}"};function Po(t,e){B(e,!0),Q(t,Xy);let[i,o]=Be(),s=()=>x(u,"$isGraphOpened$",i),a=()=>x(r,"$isMobile",i),l=xe(),d=_o(),r=l.ui.isMobile,u=d.graphIsOpened$,p=l.ui.t,f=g(e,"className",3,""),v=g(e,"disabled",3,!1),b=g(e,"hasTooltip",3,!0),y=g(e,"ref",15,void 0),_=g(e,"width",15,void 0),w=g(e,"isFullWidthTooltip",3,!0),I=g(e,"tooltipContent",3,""),T=g(e,"tooltipVisible",3,!1),R=g(e,"tooltipPlacement",3,"top"),k=g(e,"disabledTooltipContent",19,()=>p("tooltip_button_disabled")),P=g(e,"isAriaHidden",3,!1),E=g(e,"onTooltipVisibilityChange",3,lm),W=g(e,"initialTranslateXPx",3,0),U=g(e,"initialTranslateYPx",19,()=>-18),z=g(e,"mouseEnter",3,lm),Y=g(e,"mouseLeave",3,lm),ie=m(()=>v()?s()?p("tooltip_disabled_when_graph_on"):k():I()),J=K(!1);He(()=>{T()||D(J,!1)});var oe=jy();oe.__pointerdown=[K_],oe.__click=[K_];var de=C(oe);{var ae=ee=>{Wa(ee,{get content(){return n(ie)},get translateX(){return W()},get translateY(){return U()},get isFullWidthWrapper(){return w()},get placement(){return R()},get onVisibilityChange(){return E()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(J)},set active($e){D(J,$e,!0)},children:($e,Ee)=>{var ce=Ve(),Qe=le(ce);ei(Qe,()=>{var fe;return(fe=e.children)!=null?fe:$t}),$($e,ce)},$$slots:{default:!0}})},pe=ee=>{var $e=Ve(),Ee=le($e);ei(Ee,()=>{var ce;return(ce=e.children)!=null?ce:$t}),$(ee,$e)};M(de,ee=>{b()&&n(ie)&&!a()?ee(ae):ee(pe,!1)})}S(oe),it(oe,ee=>y(ee),()=>y()),O(()=>{var ee;te(oe,1,`btn-container ${(ee=f())!=null?ee:""}`,"s-1k"),De(oe,"aria-hidden",P()||null)}),vt("mouseenter",oe,function(...ee){var $e;($e=z())==null||$e.apply(this,ee)}),vt("mouseleave",oe,function(...ee){var $e;($e=Y())==null||$e.apply(this,ee)}),Vn(oe,"clientWidth",_),$(t,oe),H(),o()}Ze(["pointerdown","click"]);var Zy=Ae('<rect width="20" height="20" rx="10"></rect><path d="m12.53 8.69.06.19-.22-.64a.83.83 0 0 0-1.6.47l.13.48-.23-.85a.82.82 0 0 0-1.6.24l-.73-2.93a.85.85 0 0 0-1.65.4L8 11.34l-1.12-1.16a.8.8 0 0 0-1.21 1.03l2.23 2.94s1.23 1.83 4.3 1.23c2.43-.48 3.25-2.67 2.58-4.88l-.55-2.3a.88.88 0 1 0-1.7.49"></path>',1);function Xd(t,e){let i=m(()=>(e.completed,"interactive-episode-completed-icon"));je(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,s)=>{var a=Zy(),l=le(a),d=A(l);O(()=>{De(l,"fill",la),De(l,"fill-opacity",e.completed?1:.24),De(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),$(o,a)},$$slots:{default:!0}})}var Jy=L("<div><!></div>"),ex={hash:"s-15",code:".interactive-episode-icon.s-15{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-15{opacity:.4;pointer-events:none}"};function dm(t,e){B(e,!0),Q(t,ex);let o=xe().ui.t,s=K(0),a=m(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Po(t,{get tooltipContent(){return n(a)},initialTranslateXPx:-10,initialTranslateYPx:-10,get disabled(){return e.disabled},get width(){return n(s)},isAriaHidden:!0,isFullWidthTooltip:!1,children:(l,d)=>{var r=Jy();let u;var p=C(r);let f=m(()=>!!e.videoEpisode.completed);Xd(p,{get completed(){return n(f)}}),S(r),O(v=>{u=te(r,1,"interactive-episode-icon s-15",null,u,v),Ke(r,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),Vn(r,"clientWidth",v=>D(s,v)),$(l,r)},$$slots:{default:!0}}),H()}var tx=L('<div><div class="video-episode-inner s-16"><div class="video-episode-loaded s-16"></div> <div></div></div></div>'),ix=L('<div class="video-episodes-wrap s-16"></div>'),ox={hash:"s-16",code:".video-episodes-wrap.s-16{height:100%;position:absolute;width:100%}.video-episode.s-16{box-sizing:border-box;height:calc(var(--slider-height)*3);margin-top:calc(var(--slider-height)*-1);padding:var(--slider-height) var(--slider-video-episode-gap);position:absolute;transition:transform .2s}.video-episode.s-16:first-child{padding-left:0}.video-episode.s-16:last-child{padding-right:0}.video-episode.s-16:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-16,.video-episode-inner.s-16,.video-episode-loaded.s-16{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-16{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-16:first-child .video-episode-inner:where(.s-16),.video-episode.s-16:last-child .video-episode-inner:where(.s-16){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-16{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-16,.video-episode-loaded.s-16{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-16{background-color:var(--slider-filled-bg)}"};function cm(t,e){Q(t,ox);let i=g(e,"videoEpisodes",19,()=>[]);var o=ix();yi(o,21,i,s=>s.from,(s,a)=>{var l=tx();let d;var r=C(l),u=C(r),p=A(u,2);let f;S(r),S(l),O((v,b)=>{d=te(l,1,"video-episode s-16",null,d,v),Ke(l,`left: ${n(a).from}%; width: ${n(a).width}%`),Ke(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),f=te(p,1,"video-episode-filled s-16",null,f,b),Ke(p,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),$(s,l)}),S(o),$(t,o)}function nx(t,e,i,o,s,a,l){if(t.preventDefault(),e()&&D(i,e().getBoundingClientRect(),!0),o()||n(s)||!e())return;D(s,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function rx(t,e,i,o,s,a,l,d){if(t.preventDefault(),e())return;let r=i(t.clientX,t.clientY),u=o(t.clientX);s()(r,u,n(a).width,t),n(l)&&d()(r)}function sx(t,e,i,o,s){if(t.preventDefault(),e()||!n(i))return;D(i,!1);let a=o(t.clientX,t.clientY);s()(a,t)}function ax(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function lx(t,e,i,o,s,a){let l=e(t.clientX,t.clientY);i()&&o()(l),D(s,!1),a()(l)}var dx=L("<div></div>"),cx=L('<div class="bars s-t"><div class="loaded s-t"></div> <div></div></div>'),ux=L('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),px={hash:"s-t",code:'.interactive-icons.s-t{position:absolute;top:-28px;width:calc(100% - 20px)}.interactive-icons.mobile.s-t{top:-10px}.slider.s-t{border-radius:var(--slider-radius);cursor:pointer;height:var(--slider-height);position:relative;touch-action:none;transition:opacity .2s;width:100%;will-change:opacity,transform;-webkit-tap-highlight-color:transparent}.no-handle.s-t{cursor:default}.slider.s-t:before{content:"";height:calc(var(--controls-height)/2);left:0;position:absolute;right:0;top:calc((var(--controls-height)/2 - var(--slider-height))*-1/2)}.bars.s-t{background:var(--slider-bg);overflow:hidden}.bars.s-t,.loaded.s-t{border-radius:var(--slider-radius);height:100%;position:absolute;width:100%}.loaded.s-t{background:var(--slider-loaded-bg);left:-100%;transition:transform .2s;will-change:transform}.filled.s-t{background-color:var(--slider-filled-bg);border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.slider.square.s-t,.slider.square.s-t .filled:where(.s-t),.slider.square.s-t .loaded:where(.s-t),.slider.square.s-t>.bars:where(.s-t){border-radius:unset}.filled.active-live.s-t{background-color:var(--timeline-slider-filled-active-live-bg)}.filled.ads.s-t{background-color:var(--slider-filled-ads)}.handleWrap.s-t{left:-100%;position:absolute;width:100%}.handle.s-t{background-color:var(--slider-handle-bg);border-radius:50%;height:var(--slider-handle-size);opacity:0;position:absolute;right:calc(var(--slider-handle-size)*-1/2);top:calc((var(--slider-height) - var(--slider-handle-size))/2);transform:scale(0);transition:opacity .2s,transform .2s;visibility:hidden;width:var(--slider-handle-size);will-change:opacity,transform}.handle.active-live.s-t{background-color:var(--timeline-slider-handle-active-live-bg)}.handle-always-visible.s-t .handle:where(.s-t),.slider-dragging.s-t .handle:where(.s-t),.slider.s-t:hover .handle:where(.s-t){opacity:1;transform:scale(1);visibility:visible}.slider-dragging.s-t .handle:where(.s-t){transform:scale(1.3)}.slider-vertical.s-t{left:-8px;position:absolute;top:-18px;transform:rotate(-90deg);transform-origin:0 0}.slider.disabled.s-t{cursor:default;opacity:.4}'};function Ka(t,e){B(e,!0),Q(t,px);let i=g(e,"ref",15,void 0),o=g(e,"className",3,""),s=g(e,"testId",3,void 0),a=g(e,"isHidden",3,!1),l=g(e,"isVertical",3,!1),d=g(e,"isActiveLive",3,!1),r=g(e,"isMobile",3,!1),u=g(e,"squareBorders",3,!1),p=g(e,"videoEpisodes",19,()=>[]),f=g(e,"withWheelHandler",3,!1),v=g(e,"isInteractive",3,!1),b=g(e,"disabled",3,!1),y=g(e,"hideHandel",3,!1),_=g(e,"onPointerDown",3,Jn),w=g(e,"onHandleMove",3,Jn),I=g(e,"onPointerUp",3,Jn),T=g(e,"onPointerEnter",3,Jn),R=g(e,"onPointerMove",3,Jn),k=g(e,"onPointerLeave",3,Jn),P=g(e,"onMouseEnter",3,Jn),E=g(e,"onMouseLeave",3,Jn),W=g(e,"onWheelUp",3,Jn),U=g(e,"onWheelDown",3,Jn),z=g(e,"onWheelLeft",3,Jn),Y=g(e,"onWheelRight",3,Jn),ie=g(e,"onDisabledClick",3,Jn),J=g(e,"loadedProgress",3,0),oe=g(e,"filledProgress",3,0),de=g(e,"handleProgress",3,0),ae=g(e,"ariaLabel",3,""),pe=g(e,"ariaValueMin",3,void 0),ee=g(e,"ariaValueMax",3,void 0),$e=g(e,"ariaValueNow",3,void 0),Ee=g(e,"ariaValueText",3,""),ce=g(e,"onContextMenu",3,Jn),Qe=g(e,"handleAlwaysVisible",3,!1),fe=Lt(),ve=K(void 0),X=K(!1),N=m(()=>{var be;return(be=ee())!=null?be:0}),me=m(()=>{var be;return Q_(p())&&((be=p()[p().length-1])==null?void 0:be.time)<n(N)}),ue=m(()=>Q_(p())&&p().length&&n(me)&&n(N)?ze(J()*100,oe()*100):[]);function Re(be){if(be.preventDefault(),i()&&D(ve,i().getBoundingClientRect(),!0),b())return;let Oe=Se(be.clientX,be.clientY),Ie=Le(be.clientX);T()(Oe,Ie,n(ve).width)}function Je(be){be.preventDefault(),!b()&&k()()}function ke(){P()()}function j(){E()()}function ne(be){b()||f()&&(be.preventDefault(),be.deltaY<0?W()():be.deltaY>0?U()():be.deltaX>0?Y()():z()())}function Se(be,Oe){return l()?Math.max(0,Math.min(1,(n(ve).height-(Oe-n(ve).top))/n(ve).height)):Math.min(Math.max(be-n(ve).x,0),n(ve).width)/n(ve).width}function Le(be){return Math.min(Math.max(be-n(ve).x,0),n(ve).width)}function ze(be,Oe){let Ie=fe.features.episodesClustering&&!v()?fe.episodeMinWidthPc:0,ht=[],ye=p()[0].time/n(N)*100,qe=0,Ue=0;for(let Pt=1;Pt<p().length;Pt++)qe=p()[Pt].time/n(N)*100,qe-ye>Ie&&(ht.push({from:ye,width:Math.max(0,qe-ye),loadedWidth:Math.max(0,Math.min(qe,be)-ye),filledWidth:Math.max(0,Math.min(qe,Oe)-ye),interactive:p()[Pt-1].interactive,completed:p()[Pt-1].completed}),ye=p()[Pt].time/n(N)*100,Ue++);let st={from:ye,width:Math.max(0,100-ye),loadedWidth:Math.max(0,Math.min(be,100)-ye),filledWidth:Math.max(0,Math.min(Oe,100)-ye),interactive:p()[Ue].interactive,completed:p()[Ue].completed};100-ye<Ie?(Ue-=1,ht[Ue].width+=100-ye,ht[Ue].loadedWidth+=Math.max(0,Math.min(be,100)-ye),ht[Ue].filledWidth+=Math.max(0,Math.min(Oe,100)-ye)):ht[Ue]=st;let qt=p()[0].time;if(qt!==0){let Pt=qt/n(N)*100;ht.unshift({from:0,width:Pt,loadedWidth:Math.min(Pt,be),filledWidth:Math.min(Pt,Oe)})}return ht}function Ce(be){return Math.max(0,Math.min(100,be*100))}let we=m(()=>Ce(J())),Fe=m(()=>Ce(oe()));var rt=ux(),ut=le(rt);{var Mt=be=>{var Oe=dx();let Ie;yi(Oe,21,()=>n(ue),ht=>ht.from,(ht,ye)=>{var qe=Ve(),Ue=le(qe);{var st=qt=>{dm(qt,{get videoEpisode(){return n(ye)},get disabled(){return b()}})};M(Ue,qt=>{n(ye).interactive&&qt(st)})}$(ht,qe)}),S(Oe),O(ht=>Ie=te(Oe,1,"interactive-icons s-t",null,Ie,ht),[()=>({mobile:r(),hidden:r()&&!n(X)})]),$(be,Oe)};M(ut,be=>{v()&&be(Mt)})}var lt=A(ut,2);let ni;lt.__pointerdown=[nx,i,ve,b,X,Se,_],lt.__pointermove=[rx,b,Se,Le,R,ve,X,w],lt.__pointerup=[sx,b,X,Se,I],lt.__click=[ax,b,ie,Se],lt.__contextmenu=[lx,Se,b,ie,X,ce];var wt=C(lt);{var Rt=be=>{cm(be,{get videoEpisodes(){return n(ue)},get disabled(){return b()},get isMobile(){return r()}})},Dt=be=>{var Oe=cx(),Ie=C(Oe),ht=A(Ie,2);let ye;S(Oe),O(qe=>{De(Ie,"data-value",n(we)),Ke(Ie,`transform: translateX(${n(we)}%);`),ye=te(ht,1,"filled s-t",null,ye,qe),De(ht,"data-value",n(Fe)),Ke(ht,`transform: translateX(${n(Fe)}%);`)},[()=>({"active-live":d()})]),$(be,Oe)};M(wt,be=>{n(ue).length?be(Rt):be(Dt,!1)})}var Qt=A(wt,2);let Te;var G=C(Qt);let Ne;S(Qt),S(lt),it(lt,be=>i(be),()=>i()),O((be,Oe,Ie,ht)=>{var ye,qe;ni=te(lt,1,`slider ${(ye=o())!=null?ye:""}`,"s-t",ni,be),De(lt,"aria-label",ae()),De(lt,"aria-valuemin",pe()),De(lt,"aria-valuemax",ee()),De(lt,"aria-valuenow",$e()),De(lt,"aria-valuetext",Ee()),De(lt,"data-testid",(qe=s())!=null?qe:null),Te=te(Qt,1,"handleWrap s-t",null,Te,Oe),Ke(Qt,Ie),Ne=te(G,1,"handle s-t",null,Ne,ht)},[()=>({disabled:b(),"slider-dragging":n(X),hidden:a(),"handle-always-visible":Qe(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${Ce(de())}%);`,()=>({"active-live":d()})]),vt("pointerenter",lt,Re),vt("pointerleave",lt,Je),vt("mouseenter",lt,ke),vt("mouseleave",lt,j),vt("wheel",lt,ne),$(t,rt),H()}Ze(["pointerdown","pointermove","pointerup","click","contextmenu"]);var ro=(t,e)=>Vd[t]>=Vd[e];var Fs=(t,e)=>Vd[t]<=Vd[e],q_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var mx=L("<div><!></div>"),vx=L("<div><!> <!></div>"),gx={hash:"s-27",code:".volumeBar-container.s-27{align-items:center;display:flex}.vertical.s-27 .btn,.vertical.s-27 .tooltip-wrapper,.volumeBar-container.vertical.s-27{width:40px}.volumeBar.s-27{align-items:center;display:flex;margin:0 8px;position:relative;width:70px;--slider-height:var(--slider-volume-height);--slider-radius:var(--slider-volume-radius);--slider-handle-size:var(--slider-volume-handle-size);--slider-bg:var(--volume-slider-bg);--slider-filled-bg:var(--volume-slider-filled-bg);--slider-handle-bg:var(--volume-slider-handle-bg)}.volumeBar-slider-vertical{width:50px!important}.volumeBar-vertical.s-27{padding:0 8px 0 0;width:0}"};function um(t,e){var Le,ze;B(e,!0),Q(t,gx);let[i,o]=Be(),s=()=>x(R,"$isAudioAvailable$",i),a=()=>x(v,"$muted$",i),l=()=>x(f,"$volume$",i),d=()=>x(w,"$currentGridType$",i),r=()=>x(Re,"$controlsVisible",i),u=xe(),p=Lt(),f=u.state.volume$,v=u.state.muted$,{setVolume:b,startVolumeChanging:y,stopVolumeChanging:_}=u.actions.internal,w=u.ui.currentGridType$,I=(Le=u.callbacks)==null?void 0:Le.onAudioDoesNotExistHint,T=(ze=u.callbacks)==null?void 0:ze.onAudioDisabledHint,R=u.state.isAudioAvailable$,k=u.state.isAudioDisabled,P=u.ui.t,E=K(!1),W,U=m(()=>e.isAds||s()),z=m(()=>!n(U)||a()||l()===0),Y=m(()=>Fs(d(),"l")),ie=m(()=>n(Y)?"":n(z)?!s()||k?P("tooltip_sound_unavailable"):P("tooltip_volume"):P("tooltip_volume_muted")),J=m(()=>n(z)?P("tooltip_volume"):P("tooltip_volume_muted")),oe=m(()=>n(z)?0:l()),de=!1,ae=m(()=>e.isAds?!1:k?!T:s()?!1:!I);function pe(Ce){y(),b(Ce)}function ee(){Ru(u,l(),p.controls.volumeStepWheel)}function $e(){Du(u,l(),p.controls.volumeStepWheel)}function Ee(Ce){b(Ce)}function ce(Ce){b(Ce),_()}function Qe(){de=!0}function fe(){de=!1,N()}function ve(){clearTimeout(W),D(E,!0)}function X(){N()}function N(){W=window.setTimeout(()=>{de||D(E,!1)},p.controls.volumeBarTimeout)}function me(Ce){Ce.preventDefault(),Ce.deltaY<0?ee():Ce.deltaY>0&&$e()}let ue=K(!1),Re=u.ui.controlsVisible;He(()=>{r()||D(ue,!1)});var Je=vx();let ke;var j=C(Je);Wa(j,{get content(){return n(ie)},translateY:-18,get active(){return n(ue)},set active(Ce){D(ue,Ce,!0)},children:(Ce,we)=>{let Fe=m(()=>n(Y)?"btn-volume-vertical":"btn-volume-horizontal");Ht(Ce,{className:"btn-full-opacity",get disabled(){return n(ae)},get testId(){return n(Fe)},get ariaLabel(){return n(J)},get click(){return e.click},get ariaKeyShortCut(){return $s.KeyM},role:"button",children:(rt,ut)=>{va(rt,{get size(){return"24"},get volume(){return l()},get muted(){return n(z)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var ne=A(j,2);{var Se=Ce=>{var we=mx();let Fe;var rt=C(we);let ut=m(()=>n(Y)?"volumeBar-slider-vertical":""),Mt=m(()=>n(Y)&&!n(E)),lt=m(()=>n(Y)?Qe:Bu),ni=m(()=>n(Y)?fe:Bu),wt=m(()=>Math.round(n(oe)*100)),Rt=m(()=>`${Math.round(n(oe)*100)}%`),Dt=m(()=>n(Y)?"volume-slider-vertical":"volume-slider");Ka(rt,{get className(){return n(ut)},get isHidden(){return n(Mt)},get isVertical(){return n(Y)},withWheelHandler:!0,onWheelUp:ee,onWheelDown:$e,onPointerDown:pe,onHandleMove:Ee,onPointerUp:ce,get onPointerEnter(){return n(lt)},get onPointerLeave(){return n(ni)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(wt)},get ariaValueText(){return n(Rt)},get filledProgress(){return n(oe)},get handleProgress(){return n(oe)},get testId(){return n(Dt)}}),S(we),O(Qt=>Fe=te(we,1,"volumeBar s-27",null,Fe,Qt),[()=>({"volumeBar-vertical":n(Y)})]),$(Ce,we)};M(ne,Ce=>{n(U)&&Ce(Se)})}S(Je),O(Ce=>ke=te(Je,1,"volumeBar-container s-27",null,ke,Ce),[()=>({vertical:n(Y)})]),vt("mouseenter",Je,function(...Ce){var we;(we=n(Y)?ve:Bu)==null||we.apply(this,Ce)}),vt("mouseleave",Je,function(...Ce){var we;(we=n(Y)?X:Bu)==null||we.apply(this,Ce)}),vt("wheel",Je,me),$(t,Je),H(),o()}import{noop as bx}from"@vkontakte/videoplayer-shared/es2015";var hx=Ae('<path d="M4.58 13.98a1 1 0 0 1 .99-1h4.45a1 1 0 0 1 1 1v4.45a.99.99 0 0 1-1.99 0v-2.05L5.71 19.7a1 1 0 1 1-1.41-1.4l3.32-3.32H5.57a1 1 0 0 1-.99-1m10.39-6.36 3.32-3.32a1 1 0 1 1 1.41 1.4l-3.32 3.32h2.05a.99.99 0 0 1 0 1.98H14a1 1 0 0 1-1-1V5.57a.99.99 0 1 1 1.98 0z"></path>'),_x=Ae('<path d="M10.5 19a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-4.5a1 1 0 0 1 2 0v2.07l3.36-3.36a1 1 0 0 1 1.42 0l.01.01a1 1 0 0 1 0 1.42L7.43 18H9.5a1 1 0 0 1 1 1M18 7.43l-3.36 3.36a1 1 0 0 1-1.42 0l-.01-.01a1 1 0 0 1 0-1.42L16.57 6H14.5a1 1 0 0 1 0-2H19a1 1 0 0 1 1 1v4.5a1 1 0 0 1-2 0z"></path>');function pm(t,e){let i=g(e,"isFullscreen",8,!1),o=hr(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");je(t,{get testId(){return n(o)},children:(s,a)=>{var l=Ve(),d=le(l);{var r=p=>{var f=hx();$(p,f)},u=p=>{var f=_x();$(p,f)};M(d,p=>{i()?p(r):p(u,!1)})}$(s,l)},$$slots:{default:!0}})}function Zd(t,e){B(e,!0);let i=g(e,"isFullscreen",3,!1),o=g(e,"click",3,bx),s=xe(),a=s.ui.isFullscreenOpenedByKeyboard,l=s.ui.t,d=m(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));Ht(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let p=pa(u);a.set(p),o()()},get ariaKeyShortCut(){return $s.KeyF},role:"button",children:(u,p)=>{pm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),H()}var $x=Ae('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.26 4.26C3 5.54 3 7.57 3 11.65v.72c0 4.07 0 6.11 1.26 7.38C5.54 21 7.57 21 11.65 21h.72c4.07 0 6.11 0 7.38-1.26C21 18.47 21 16.43 21 12.36v-.72c0-4.07 0-6.11-1.26-7.38C18.47 3 16.43 3 12.36 3h-.72C7.57 3 5.53 3 4.26 4.26M6 8.5c.1 4.68 2.56 7.5 6.61 7.5h.24v-2.68c1.47.15 2.57 1.25 3.02 2.68H18a6 6 0 0 0-3-3.76 5.7 5.7 0 0 0 2.55-3.74h-1.94c-.4 1.49-1.61 2.84-2.77 2.97V8.5h-1.96v5.2c-1.2-.3-2.76-1.76-2.83-5.2z" clip-rule="evenodd"></path></svg>');function fm(t,e){let i=Rn(e,["$$slots","$$events","$$legacy","children"]);var o=$x();no(o,()=>Ye({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"vk-logo-icon",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:$t}),Xt(),S(o),$(t,o)}var yx=Ae('<svg><!><svg data-logo="vk_video"><path d="M7 8.6c0-1.96 0-2.94.38-3.69a3.5 3.5 0 0 1 1.53-1.53C9.66 3 10.64 3 12.6 3h1.36c2.46 0 3.7 0 4.64.48a4.4 4.4 0 0 1 1.92 1.92c.48.94.48 2.18.48 4.64v3.92c0 2.46 0 3.7-.48 4.64a4.4 4.4 0 0 1-1.92 1.92c-.94.48-2.18.48-4.64.48H12.6c-1.96 0-2.94 0-3.69-.38a3.5 3.5 0 0 1-1.53-1.53C7 18.34 7 17.36 7 15.4zm9.26 1.74c.9.54 1.36.81 1.51 1.16.13.3.13.65 0 .96-.15.34-.6.61-1.5 1.15l-2.4 1.43c-.93.56-1.4.84-1.8.8-.33-.03-.64-.2-.84-.48-.23-.31-.23-.86-.23-1.96v-2.85c0-1.1 0-1.64.23-1.96q.31-.42.85-.48c.38-.04.86.25 1.8.8zM5 9.04c0-2.46 0-3.7.48-4.64q.37-.71.95-1.25-.58.1-1.03.33A4.4 4.4 0 0 0 3.48 5.4C3 6.34 3 7.58 3 10.04v3.92c0 2.46 0 3.7.48 4.64a4.4 4.4 0 0 0 1.92 1.92q.45.23 1.03.33a4 4 0 0 1-.95-1.25C5 18.66 5 17.42 5 14.96z"></path></svg><svg x="4" y="3" data-logo="play_market"><path d="M0 1.26v15.47q0 .66.34 1L9.52 9 .33.28C.08.53 0 .92 0 1.26"></path><path d="M.33.28.38.23c.34-.3.89-.32 1.49 0l10.75 5.81-2.6 2.48zm10.29 8.75 2.88 2.45-.53.29-.34.18-2.58-2.44-9.71 8.22c.33.34.9.37 1.53.04l11.1-6 .53-.29 2.73-1.47c1.03-.56 1.03-1.47 0-2.02l-2.77-1.5-.84-.45.84.45.1.05z"></path></svg><svg x="3" data-logo="app_store"><path d="M17.62 16.37q-.48 1.09-1.15 2.03-.9 1.27-1.48 1.75-.88.8-1.9.83-.72 0-1.76-.42a5 5 0 0 0-1.89-.4q-.9 0-1.94.4a5 5 0 0 1-1.68.44q-.98.04-1.95-.85-.62-.53-1.55-1.82a13 13 0 0 1-1.63-3.2 12 12 0 0 1-.69-3.8q0-2.1.93-3.64A5.4 5.4 0 0 1 5.5 5.03q.77 0 2.03.46t1.62.47q.26 0 1.79-.55a6 6 0 0 1 2.43-.42 5.2 5.2 0 0 1 4.05 2.09q-2.4 1.44-2.4 4.02a4.4 4.4 0 0 0 1.49 3.34q.66.61 1.48.95-.18.5-.38.98M13.5.42q0 1.58-1.17 2.94c-.94 1.08-2.07 1.7-3.3 1.6L9 4.56c0-1 .45-2.08 1.24-2.96q.6-.67 1.5-1.12.93-.44 1.74-.48z"></path></svg><path d="M32.55 17.04h2.5L38.7 7h-1.8l-2.94 8.28h-.28L30.84 7H29zm15.52 0-4.61-5.2L47.72 7H45.6l-3.56 4.09h-.42V7h-1.7v10.04h1.7v-4.3h.43l3.76 4.3z"></path><path d="M57.89 11.89a2.2 2.2 0 0 0 1.44-2.16C59.33 8.14 58 7 56.06 7h-3.92v10.04h4.2c1.96 0 3.29-1.14 3.29-2.8 0-1.17-.66-2.04-1.74-2.35m-4.04-3.4h2.21c.92 0 1.54.56 1.54 1.39 0 .8-.62 1.36-1.54 1.36h-2.2zm2.5 7.06h-2.5v-2.81h2.5c.9 0 1.52.57 1.52 1.4 0 .84-.62 1.4-1.52 1.4m4.84 1.5h2.32l2.77-5.5h.22v5.5h1.57v-7.4h-2.32l-2.77 5.5h-.22v-5.5h-1.57zm7.96 2.21h1.64v-2.2h5.33v2.2h1.64v-3.7h-1.29V9.64h-5.43l-.37 3.78c-.13 1.34-.53 2.13-1.34 2.13h-.18zm2.49-3.7c.4-.39.57-1.04.68-2.15l.23-2.27h2.28v4.42zm14.38-2.3a3.7 3.7 0 0 0-3.84-3.76 3.7 3.7 0 0 0-3.85 3.85 3.7 3.7 0 0 0 3.85 3.84c1.54 0 2.99-.72 3.55-2.13l-1.54-.26c-.36.53-1.04.9-1.91.9-1.26 0-2.09-.77-2.24-1.91H86zm-3.84-2.33c1.02 0 1.8.65 2.06 1.58h-4.1a2.1 2.1 0 0 1 2.04-1.58m8.66 6.26c2.32 0 3.96-1.6 3.96-3.84 0-2.25-1.64-3.85-3.96-3.85s-3.97 1.6-3.97 3.85 1.64 3.84 3.97 3.84m0-1.5c-1.34 0-2.25-.95-2.25-2.34 0-1.4.9-2.35 2.25-2.35 1.34 0 2.25.95 2.25 2.35s-.91 2.35-2.25 2.35" class="_ru"></path><path d="M35.02 17.36h-2.48L29 7.42h1.83l2.83 8.2h.28l2.93-8.2h1.8zm8.41-5.15 4.6 5.15h-2.24l-3.75-4.26h-.43v4.26h-1.7V7.42h1.7v4.05h.41l3.55-4.05h2.1zm13.37 5.15h-2.48L50.8 7.42h1.83l2.82 8.2h.29l2.92-8.2h1.8zm6.46 0h-1.64v-7.33h1.64zm-.81-8.37q-.45 0-.74-.27a1 1 0 0 1-.28-.72q0-.44.28-.72.3-.28.74-.28t.72.28q.3.29.29.72 0 .44-.29.72t-.72.27m5.93 8.51q-1.03 0-1.86-.48a3.5 3.5 0 0 1-1.29-1.35 4 4 0 0 1-.45-1.98q0-1.1.45-1.95.46-.88 1.3-1.36.81-.5 1.85-.5.9 0 1.6.38.68.35 1.13.88V7.42h1.63v9.94h-1.22l-.34-1.18q-.46.54-1.17.94a3.4 3.4 0 0 1-1.63.38m.4-1.45q1.04 0 1.68-.65.65-.66.65-1.7t-.65-1.7a2.2 2.2 0 0 0-1.68-.66 2.2 2.2 0 0 0-1.66.66q-.64.66-.64 1.7t.64 1.7q.64.65 1.66.65m13.15-2.44-.03.52h-5.94q.12.86.71 1.38.6.51 1.52.51.63 0 1.13-.24.51-.24.78-.65l1.53.26q-.39 1.01-1.38 1.56-.96.55-2.16.55-1.1 0-1.98-.48a3.6 3.6 0 0 1-1.85-3.33q0-1.1.48-1.95.5-.88 1.37-1.36a4 4 0 0 1 1.98-.5q1.11 0 1.98.5.88.48 1.36 1.34.5.86.5 1.89m-3.84-2.31q-.73 0-1.29.42-.53.42-.74 1.14h4.1a2.2 2.2 0 0 0-2.07-1.56m8.66 6.2q-1.14 0-2.04-.48a3.7 3.7 0 0 1-1.4-1.35 4 4 0 0 1-.5-1.98q0-1.1.5-1.95.5-.88 1.4-1.36.9-.5 2.04-.5t2.03.5q.91.48 1.4 1.36.52.86.52 1.95 0 1.11-.51 1.98-.5.86-1.4 1.35-.9.48-2.04.48m0-1.48q.99 0 1.62-.63.63-.66.63-1.7t-.63-1.67a2.2 2.2 0 0 0-1.62-.65q-.99 0-1.62.65-.62.63-.62 1.67 0 1.05.62 1.7.63.63 1.62.63" class="_en"></path></svg>');function mm(t,e){let i=Rn(e,["$$slots","$$events","$$legacy","children"]);var o=yx();no(o,()=>Ye({xmlns:"http://www.w3.org/2000/svg",width:"95",height:"24",fill:"var(--btn-color, #fff)","fill-rule":"evenodd","aria-hidden":"true","clip-rule":"evenodd",viewBox:"0 0 95 24",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:$t}),Xt(6),S(o),$(t,o)}var xx={hash:"s-29",code:"svg [data-logo],svg[data-testid=vk-video-logo-icon--en] ._ru,svg[data-testid=vk-video-logo-icon--short] ._en,svg[data-testid=vk-video-logo-icon--short] ._ru,svg[data-testid=vk-video-logo-icon] ._en{opacity:0;visibility:hidden}svg[data-logo=app_store] [data-logo=app_store],svg[data-logo=play_market] [data-logo=play_market],svg[data-logo=vk_video] [data-logo=vk_video]{opacity:1;visibility:visible}"};function vm(t,e){B(e,!0),Q(t,xx);let i=g(e,"short",3,!1),o=g(e,"isCyrillic",3,!0),s=g(e,"logo",19,()=>"vk_video"),a="vk-video-logo-icon--short",l=24,d=m(()=>!o()&&!i()?91:i()?l:95),r=m(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=m(()=>`0 0 ${n(d)} 24`);mm(t,{get width(){return n(d)},height:"24",get viewBox(){return n(u)},get"data-testid"(){return n(r)},get"data-logo"(){return s()}}),H()}function Jd(t,e){B(e,!0);let[i,o]=Be(),s=()=>x(b,"$isMobile",i),a=()=>x(v,"$currentGridType$",i),l=()=>x(_,"$isCyrillicRelatedInterface$",i),d=g(e,"ref",15,void 0),r=g(e,"logoClickable",3,!1),u=g(e,"targetUrl",3,""),p=Lt(),f=xe(),v=f.ui.currentGridType$,b=f.ui.isMobile,y=f.ui.t,_=f.isCyrillicRelatedInterface$,w=m(()=>p.logoType!=="vk"),I=m(()=>n(w)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),T=m(()=>(s()&&Fs(a(),"m")||Fs(a(),"l"))&&n(w)),R=()=>{var E,W;e.click(),(E=f.callbacks)!=null&&E.onLogoClicked?(W=f.callbacks)==null||W.onLogoClicked():u()&&window.open(u(),"_blank")},k=m(()=>!r()),P=m(()=>n(w)?"btn-vk-video-logo":"btn-vk-logo");Ht(t,{className:"btn-full-opacity",get disabled(){return n(k)},click:R,get testId(){return n(P)},get ariaLabel(){return n(I)},get ref(){return d()},set ref(E){d(E)},children:(E,W)=>{var U=Ve(),z=le(U);{var Y=J=>{vm(J,{get logo(){return p.logoType},get short(){return n(T)},get isCyrillic(){return l()}})},ie=J=>{fm(J,{})};M(z,J=>{n(w)?J(Y):J(ie,!1)})}$(E,U)},$$slots:{default:!0}}),H(),o()}import{ChromecastState as Tx}from"@vkontakte/videoplayer-core/es2015";import{ChromecastState as Y_}from"@vkontakte/videoplayer-core/es2015";var wx=Ae('<path d="M3.6 13.3a5.1 5.1 0 0 1 5.05 5.83.9.9 0 0 1-1.78-.26 3.3 3.3 0 0 0-3.74-3.74.9.9 0 0 1-.26-1.78c.24-.03.49-.05.73-.05Z" class="s-10"></path><path d="M3.6 9.7a8.7 8.7 0 0 1 8.68 9.37.9.9 0 0 1-1.8-.14c.02-.17.02-.35.02-.53a6.9 6.9 0 0 0-7.43-6.88.9.9 0 0 1-.14-1.8l.67-.02ZM3.6 16.9a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z" class="s-10"></path><path d="M16.24 4.1c.8 0 1.47 0 2 .04a4 4 0 0 1 1.53.38 3.9 3.9 0 0 1 1.7 1.71 4 4 0 0 1 .39 1.53c.04.53.04 1.2.04 2v4.48c0 .8 0 1.47-.04 2a4 4 0 0 1-.38 1.53 3.9 3.9 0 0 1-1.7 1.7 4 4 0 0 1-1.54.39c-.53.04-1.2.04-2 .04H15a.9.9 0 0 1 0-1.8h1.2c.85 0 1.44 0 1.9-.04.44-.03.68-.1.85-.19.4-.2.72-.52.92-.92.09-.17.16-.4.2-.85.03-.46.03-1.05.03-1.9V9.8c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2.1 2.1 0 0 0-.92-.92 2.25 2.25 0 0 0-.85-.2 25.9 25.9 0 0 0-1.9-.03H5.83a2.1 2.1 0 0 0-1.81 1.4.9.9 0 1 1-1.7-.6A3.9 3.9 0 0 1 6 4.1h10.24Z" class="s-10"></path>',1),Sx=Ae('<path d="M3.60219 13.2993C6.41858 13.2995 8.70256 15.5835 8.70278 18.3999C8.70277 18.6469 8.68424 18.8909 8.65004 19.1294C8.57937 19.6212 8.12333 19.9625 7.63149 19.8921C7.13968 19.8213 6.79823 19.3654 6.86879 18.8735C6.89087 18.7195 6.90199 18.5611 6.902 18.3999C6.90178 16.5776 5.42447 15.1003 3.60219 15.1001C3.441 15.1001 3.28267 15.1112 3.12856 15.1333C2.63666 15.2039 2.18077 14.8624 2.11 14.3706C2.03966 13.8788 2.38091 13.4227 2.8727 13.3521C3.11125 13.3178 3.35516 13.2993 3.60219 13.2993Z"></path><path d="M3.60219 9.69971C8.40682 9.69977 12.3021 13.5953 12.3024 18.3999C12.3024 18.6248 12.2938 18.8489 12.277 19.0698C12.239 19.5651 11.8065 19.9365 11.3112 19.8989C10.8157 19.8611 10.4445 19.4286 10.4821 18.9331C10.4954 18.7576 10.5026 18.5791 10.5026 18.3999C10.5023 14.5894 7.41271 11.5005 3.60219 11.5005C3.42268 11.5005 3.24474 11.5066 3.06899 11.52C2.57352 11.5578 2.14115 11.1863 2.10317 10.6909C2.06587 10.1957 2.43694 9.76287 2.93227 9.7251C3.15348 9.70823 3.37699 9.69971 3.60219 9.69971Z"></path><path d="M3.60219 16.8999C4.43047 16.8999 5.10198 17.5717 5.10219 18.3999C5.10209 19.2282 4.43054 19.8999 3.60219 19.8999C2.77383 19.8999 2.10229 19.2282 2.10219 18.3999C2.10241 17.5717 2.7739 16.8999 3.60219 16.8999Z"></path><path d="M16.2379 4.1001C17.0459 4.10009 17.7067 4.10017 18.2438 4.14404C18.7997 4.18946 19.3022 4.28599 19.7711 4.5249C20.5049 4.89882 21.1014 5.49623 21.4752 6.22998C21.714 6.69873 21.8107 7.20063 21.8561 7.75635C21.9 8.29338 21.9001 8.95424 21.9 9.76221V14.2378C21.9001 15.0458 21.9 15.7066 21.8561 16.2437C21.8107 16.7996 21.7141 17.3021 21.4752 17.771C21.1014 18.5046 20.5048 19.1012 19.7711 19.4751C19.3022 19.714 18.7997 19.8105 18.2438 19.856C17.7067 19.8998 17.0459 19.8999 16.2379 19.8999H14.9997C14.503 19.8996 14.1005 19.4972 14.1002 19.0005C14.1002 18.5036 14.5028 18.1004 14.9997 18.1001H16.1998C17.0548 18.1001 17.6422 18.0992 18.0973 18.062C18.5419 18.0257 18.7809 17.9596 18.9538 17.8716C19.3489 17.6702 19.6704 17.3487 19.8717 16.9536C19.9598 16.7808 20.0258 16.5417 20.0622 16.0972C20.0993 15.6421 20.1002 15.0546 20.1002 14.1997V9.80029C20.1002 8.94536 20.0993 8.35794 20.0622 7.90283C20.0258 7.45834 19.9598 7.21921 19.8717 7.04639C19.6704 6.6514 19.3487 6.33073 18.9538 6.12939C18.7809 6.04133 18.5419 5.97431 18.0973 5.93799C17.6422 5.9008 17.0548 5.8999 16.1998 5.8999H6.00063L5.83071 5.90674C4.99191 5.97398 4.28981 6.53462 4.01918 7.30029C3.85342 7.76872 3.33928 8.01472 2.87075 7.84912C2.40214 7.68346 2.15628 7.16833 2.32192 6.69971C2.85696 5.18632 4.30125 4.1001 6.00063 4.1001H16.2379Z"></path><path d="M2.95114 7.11345C2.42394 7.1914 1.90399 6.78569 2.00995 6.2634C2.05777 6.0277 2.12517 5.82449 2.22018 5.63803C2.5078 5.07354 2.96674 4.6146 3.53123 4.32698C4.17296 4 5.01304 4 6.6932 4H17.2001C18.8803 4 19.7204 4 20.3621 4.32698C20.9266 4.6146 21.3855 5.07354 21.6731 5.63803C22.0001 6.27976 22.0001 7.11984 22.0001 8.8V15.2C22.0001 16.8802 22.0001 17.7202 21.6731 18.362C21.3855 18.9265 20.9266 19.3854 20.3621 19.673C19.7204 20 18.8803 20 17.2001 20H15.7196C15.2009 20 14.8203 19.5134 14.8938 19C14.9638 18.5101 15.0001 18.0093 15.0001 17.5C15.0001 11.701 10.2991 7 4.5001 7C3.97384 7 3.45662 7.03872 2.95114 7.11345Z"></path>',1),Cx={hash:"s-10",code:".animated.s-10{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-10{animation-name:s-10-wave1}.wave2.animated.s-10{animation-name:s-10-wave2}.wave3.animated.s-10{animation-name:s-10-wave3}@keyframes s-10-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-10-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-10-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function ec(t,e){B(e,!0),Q(t,Cx);let i=g(e,"isMobile",3,!1),o=m(()=>e.iconState===Y_.CONNECTED),s=m(()=>e.iconState===Y_.CONNECTING),a=m(()=>n(o)?"#2688EB":la),l=m(()=>e.size?dn(e.size):void 0);var d=Ve(),r=le(d);{var u=f=>{je(f,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(v,b)=>{var y=wx();Xt(2),$(v,y)},$$slots:{default:!0}})},p=f=>{je(f,{get style(){return n(l)},testId:"chromecast-icon",children:(v,b)=>{var y=Sx(),_=le(y);let w;var I=A(_);let T;var R=A(I);let k;var P=A(R);let E;var W=A(P);let U;O((z,Y,ie,J,oe)=>{w=te(_,0,"wave2 s-10",null,w,z),T=te(I,0,"wave3 s-10",null,T,Y),k=te(R,0,"wave1 s-10",null,k,ie),E=te(P,0,"s-10",null,E,J),U=te(W,0,"s-10",null,U,oe)},[()=>({animated:n(s)}),()=>({animated:n(s)}),()=>({animated:n(s)}),()=>({hidden:n(o)}),()=>({hidden:!n(o)})]),$(v,y)},$$slots:{default:!0}})};M(r,f=>{i()?f(u):f(p,!1)})}$(t,d),H()}import{noop as Ix}from"@vkontakte/videoplayer-shared/es2015";function tc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),s=g(e,"click",3,Ix),l=xe().ui.t,d=m(()=>e.state===Tx.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));Ht(t,{get ariaLabel(){return n(d)},get click(){return s()},testId:"btn-chromecast",get ref(){return i()},set ref(r){i(r)},children:(r,u)=>{ec(r,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),H()}import{noop as Px}from"@vkontakte/videoplayer-shared/es2015";var Ex=Ae('<path d="m21.62 16.5-.02.07q-.22 1.27-.42 2.09a5 5 0 0 1-.64 1.5 4.4 4.4 0 0 1-2.51 1.73q-.77.18-1.63.07t-2.11-.34l-4.34-.8q-1.27-.22-2.1-.42a5 5 0 0 1-1.5-.65 4.4 4.4 0 0 1-1.72-2.5 5 5 0 0 1-.07-1.63q.1-.84.34-2.11l.01-.07q.22-1.27.43-2.1a5 5 0 0 1 .64-1.5 4.4 4.4 0 0 1 2.5-1.73 5 5 0 0 1 1.64-.07q.83.1 2.1.35l4.34.8q1.28.21 2.1.42a5 5 0 0 1 1.5.64 4.4 4.4 0 0 1 1.73 2.5q.18.78.07 1.64-.1.83-.34 2.1m-1.45-2.3c.05-.49.03-.77-.02-1a2.6 2.6 0 0 0-1.02-1.48 3 3 0 0 0-.93-.37c-.48-.13-1.1-.24-2-.4l-4.26-.79c-.9-.16-1.52-.27-2.01-.33a3 3 0 0 0-1 .03 2.6 2.6 0 0 0-1.48 1.02 3 3 0 0 0-.37.92c-.13.48-.24 1.1-.4 2s-.28 1.51-.33 2c-.06.5-.04.78.02 1 .15.6.51 1.13 1.02 1.48.19.13.45.25.92.37.48.13 1.1.25 2 .4l4.27.79c.9.16 1.52.28 2.01.33s.77.03 1-.02a2.6 2.6 0 0 0 1.47-1.03c.14-.19.25-.45.38-.92.12-.48.24-1.1.4-2s.28-1.51.33-2"></path><path d="M18.19 7.49a.9.9 0 0 1-1.05-.73c-.14-.8-.2-1.08-.28-1.3A2.6 2.6 0 0 0 14.5 3.8c-.22 0-.5.04-1.31.17l-5.85.96a8 8 0 0 0-2.17.5 2.6 2.6 0 0 0-1.33 1.75c-.08.38-.04.85.11 2.23l.01.1a.9.9 0 1 1-1.78.2l-.01-.1-.02-.17a9 9 0 0 1-.07-2.64 4.4 4.4 0 0 1 2.25-2.97c.63-.33 1.42-.46 2.56-.65l.16-.03 5.85-.96.1-.01c.67-.11 1.13-.19 1.55-.18a4.4 4.4 0 0 1 4 2.82c.14.39.23.85.35 1.53l.01.1a.9.9 0 0 1-.72 1.04"></path><path d="M12.72 12.41a.42.42 0 0 0-.69.23l-.72 4.18a.4.4 0 0 0 .03.23c.08.2.33.3.54.22l3.67-1.47a.4.4 0 0 0 .12-.68z"></path>',1);function gm(t){je(t,{testId:"episodes-icon",children:(e,i)=>{var o=Ex();Xt(2),$(e,o)},$$slots:{default:!0}})}var Hu=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var Ax=L('<span class="text mobile s-21"> </span> <div class="chevron-episodes s-21" data-testid="btn-episodes_icon"><!></div>',1),kx=L('<span class="text s-21"> </span>'),Lx=L('<span class="text count s-21"> </span>'),Mx=L('<span class="icon s-21"><!></span> <!>',1),Vx={hash:"s-21",code:".icon.s-21{flex-shrink:0}.text.s-21{overflow:hidden;padding:0 8px;text-overflow:ellipsis;white-space:nowrap}.text.count.s-21{overflow:visible}.text.mobile.s-21{padding:0 3px 0 4px}.chevron-episodes.s-21{margin-bottom:-6px;opacity:.7;transform:scale(.8)}"};function ic(t,e){var de,ae,pe;B(e,!0),Q(t,Vx);let[i,o]=Be(),s=()=>x(y,"$currentGridType$",i),a=()=>x(_,"$openedByKeyboard$",i),l=()=>x(w,"$panelOpened$",i),d=()=>x(I,"$isMobile",i),r=g(e,"position",3,0),u=g(e,"duration",3,0),p=g(e,"timeCodes",19,()=>[]),f=xe(),v=(ae=(de=f.callbacks)==null?void 0:de.onEpisodeChanged)!=null?ae:Px,b=!!((pe=f.callbacks)!=null&&pe.onEpisodeClicked),y=f.ui.currentGridType$,_=f.ui.episodes.openedByKeyboard$,w=f.ui.episodes.panelOpened$,I=f.ui.isMobile,T=f.ui.t,R=K(void 0),k=ee=>{var Ee,ce,Qe;if(!!((Ee=f.callbacks)!=null&&Ee.onEpisodeClicked)){let fe=pa(ee);_.set(fe),w.set(!0),(Qe=(ce=f.callbacks)==null?void 0:ce.onEpisodeClicked)==null||Qe.call(ce,fe)}},P=K(null),E=m(()=>r()/u());He(()=>{var $e;let ee=Hu(n(E),u(),p());ee?(($e=n(P))==null?void 0:$e.time)!==ee.time&&(v(ee),D(P,ee,!0)):D(P,null)});let W=m(()=>{var ee;return((ee=n(P))==null?void 0:ee.text)||""}),U=m(()=>ro(s(),"xl")?"FULL":ro(s(),"m")?"COUNT":"SHORT"),z=m(()=>`${T("tooltip_episodes")}: ${n(W)}`),Y=(ee,$e,Ee)=>bt(null,null,function*(){yield mo(),(ee==null?void 0:ee.getAttribute("aria-expanded"))==="false"&&$e&&!Ee&&Et(()=>{_.set(!1),ee.focus()})});He(()=>{Y(n(R),a(),l())});var ie=Ve(),J=le(ie);{var oe=ee=>{let $e=m(()=>d()?"px-0":""),Ee=m(()=>!b);Ht(ee,{get className(){var ce;return`w-max btn-full-opacity btn-jc-l ${(ce=n($e))!=null?ce:""}`},testId:"btn-episodes",click:k,get disabled(){return n(Ee)},get ariaExpanded(){return l()},get ariaLabel(){return n(z)},get ref(){return n(R)},set ref(ce){D(R,ce,!0)},children:(ce,Qe)=>{var fe=Ve(),ve=le(fe);{var X=me=>{var ue=Ax(),Re=le(ue),Je=C(Re,!0);S(Re);var ke=A(Re,2),j=C(ke);Or(j,{direction:"right"}),S(ke),O(()=>he(Je,n(W))),$(me,ue)},N=me=>{var ue=Mx(),Re=le(ue),Je=C(Re);gm(Je,{}),S(Re);var ke=A(Re,2);{var j=Se=>{var Le=kx(),ze=C(Le,!0);S(Le),O(()=>he(ze,n(W))),$(Se,Le)},ne=(Se,Le)=>{{var ze=Ce=>{var we=Lx(),Fe=C(we,!0);S(we),O(()=>he(Fe,p().length)),$(Ce,we)};M(Se,Ce=>{n(U)==="COUNT"&&Ce(ze)},Le)}};M(ke,Se=>{n(U)==="FULL"?Se(j):Se(ne,!1)})}$(me,ue)};M(ve,me=>{d()?me(X):me(N,!1)})}$(ce,fe)},$$slots:{default:!0}})};M(J,ee=>{n(P)&&ee(oe)})}$(t,ie),H(),o()}import{debounceFn as yb}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as i2,PlaybackState as ql,Player as o2,PredefinedQualityLimits as Ss,VideoFormat as sc,clientChecker as ab}from"@vkontakte/videoplayer-core/es2015";import{assertNonNullable as yr,getHighestQuality as n2,InterfaceLanguage as r2,isInvariantQuality as s2,isNonNullable as a2,loadVKLangPack as l2,Logger as d2,map as lb,merge as c2,Observable as ju,Subject as ac,Subscription as db,TracerFactory as u2,ValueSubject as cb,VideoQuality as p2,devNull as f2,now as m2,filter as v2,once as g2,ErrorCategory as ub,suppressAbort as h2}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Ws,ThinOneStat as _2}from"@vkontakte/videoplayer-statistics/es2015";import{detectEmbed as Rx,devNull as ii,now as oi,withoutNullable as j_}from"@vkontakte/videoplayer-shared/es2015";import{addScript as Dx,Subject as cn,clearVideoElement as Ox}from"@vkontakte/videoplayer-shared/es2015";var Nx="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Fu=class{constructor(e,i){this.adman=null;this.initialVolume=1;this.videoElement=null;this.currentAdSection=null;this.actions=null;this.adsState=null;this.playerState=null;this.events={init$:new cn,loadStarted$:new cn,loadEnded$:new cn,loadError$:new cn,ready$:new cn,slotRequested$:new cn,started$:new cn,timeRemained$:new cn,paused$:new cn,resumed$:new cn,ended$:new cn,empty$:new cn,skipped$:new cn,clicked$:new cn,closed$:new cn,error$:new cn};this.loadAdman=e=>(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[oi()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));this.loadAdmanMailRu=e=>new Promise((i,o)=>{let s;this.events.loadStarted$.next();let a=()=>{clearTimeout(s),delete window.admanAsyncInit,window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[oi()]}),o())};Dx(Nx,e,this.loadTimeout).then(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[oi()]}),window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[oi()]}),window.admanAsyncInit=a,s=window.setTimeout(a,this.initTimeout))}).catch(l=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[oi()]}),o(),clearTimeout(s)})});this.loadAdmanNPM=e=>new Promise((i,o)=>{let s;this.events.loadStarted$.next();let a=()=>{clearTimeout(s),delete window.admanAsyncInit,window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[oi()]}),o())},l=()=>{d=!0,o()},d=!1,r=window.setTimeout(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[oi()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[oi()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[oi()]}),!d&&(window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[oi()]}),window.admanAsyncInit=a,s=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(s),clearTimeout(r),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[oi()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[oi(),i.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(i)}`}),this.events.started$.next(e),i.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:"ad muted start"})),this.adsState.duration.set(i.duration),this.adsState.playbackState.set("playing"),this.adsState.canSkip.set(i.allowClose),this.adsState.secondsToWatchBeforeSkip.set(i.allowCloseDelay),this.startWatchDog(),(o=this.externalApi)!=null&&o.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,e,String(i.bannerID))):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=e=>{var o;((o=this.adsState)!=null&&o.playbackState?_e(this.adsState.playbackState):void 0)!=="inactive"&&(this.adsState?(this.adsState.position.set(e.currentTime),this.events.timeRemained$.next(e),this.startWatchDog()):this.onAdError("TimeRemained callback failed: Adman state is not initialized"))};this.onAdPaused=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.stopWatchDog(),this.adsState?(this.log({message:"ad paused"}),this.adsState.playbackState.set("paused")):this.onAdError("Paused callback failed: Adman state is not initialized")};this.onAdPlayed=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.startWatchDog(),this.adsState?(this.log({message:"ad played"}),this.adsState.playbackState.set("playing")):this.onAdError("Player callback failed: Adman is not initialized")};this.onAdMidrollPoint=()=>{if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[oi()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch(e){this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};this.onAdSkipped=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad completed"}),this.currentAdSection?(this.events.ended$.next(this.currentAdSection),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0)):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{var e,i;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad clicked"}),(i=this.videoElement)==null||i.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(e="ad error")=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[oi()]}),this.log({message:e}),this.events.error$.next(e),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()};this.log=e.createComponentLog("AdmanWrapper"),ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[oi()]}),this.loadTimeout=i.loadTimeout,this.initTimeout=i.initTimeout,this.runtimeTimeout=i.runtimeTimeout,this.useAdmanFromNPM=i.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(i.volumeMultiplier,1)),this.isVsidOriginal=i.isVsidOriginal}init(e,i,o){this.actions=e,this.adsState=i,this.playerState=o}onAdmanLoadingError(){this.onAdError("adman loading error")}initAdman(e){return bt(this,null,function*(){var k,P;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[oi(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:o,isAutoplay:s,adsContainer:a,adsVideoElement:l,slotId:d,params:r={},paramsOverride:u={},duration:p,externalApi:f,json:v}=e;this.externalApi=f;let b,y=this.playerState&&_e(this.playerState.vsid);y&&(this.isVsidOriginal?b=y:b=parseInt(y,36));let{isEmbed:_,immediateOrigin:w}=Rx(),I=(k=_?w:window.location.href)!=null?k:window.location.href,T=j_(Ye(Jt(Ye(Jt(Ye({},r),{dl:encodeURIComponent(I),autoplay:s?1:0,player_width:i,player_height:o}),b?{request_id:b}:{}),{duration:p}),u)),R=j_({slot:v?void 0:d,wrapper:a,videoEl:l,videoQuality:o,params:v?void 0:T,browser:{mobile:!1},json:v});try{let E=new window.AdmanHTML;if(E.onReady(this.onAdsReady),E.onStarted(this.onAdStarted),E.onPlayed(this.onAdPlayed),E.onPaused(this.onAdPaused),E.adMidrollPoint(this.onAdMidrollPoint),E.onClosed(this.onAdClosed),E.onSkipped(this.onAdSkipped),E.onClicked(this.onAdClicked),E.onTimeRemained(this.onAdTimeRemained),E.onCompleted(this.onAdCompleted),E.onError(this.onAdError),E.setDebug(!1),!v&&((P=this.externalApi)!=null&&P.videoGetAds)){let W=yield this.safeExternalCall(this.externalApi.videoGetAds,T);W&&(delete R.slot,delete R.params,Object.assign(R,{json:W}))}E.init(R),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(R)}`})}catch(E){ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[oi()]}),this.onAdError("could not init adman")}})}switchToVideo(e=!1){var o,s,a;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[oi()]}),this.currentAdSection===null&&!e){this.log({message:"switch to video, no currentAdSection. can't switch"});return}let i=this.currentAdSection==="postroll";if(this.actions){if(this.adsState&&this.playerState)this.adsState.playbackState.set("inactive"),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${i}`});else{let l="Switch to video: Adman state was not updated correctly";this.log({message:l}),this.events.error$.next(l)}(a=(s=this.actions).switchFromAdsToVideo)==null||a.call(s,!i)}}setPostrollPassed(e){var i;(i=this.adsState)==null||i.postrollPassed.set(e),this.log({message:"postroll passed"})}togglePlay(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adsState){this.log({message:"toggle play"});let i=_e(this.adsState.playbackState);i==="playing"?this.pause():i==="paused"&&this.play()}else this.onAdError("Can not toggle play: Adman state is not initialized")}setInitialVolume(e){this.log({message:`set initial volume ${e}`}),this.initialVolume=e}setVolume(e){let i=e*this.volumeMultiplier;if(this.log({message:`set volume ${i}`}),this.adman)try{this.adman.setVolume(i)}catch(o){this.onAdError("could not set ad volume")}this.videoElement&&(this.videoElement.volume=i)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch(i){this.onAdError("could not set ad fullscreen")}}startPreroll(){if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[oi()]}),this.adman){if(!this.isDestroyed){this.log({message:"start preroll"}),this.setVolume(this.initialVolume),this.currentAdSection="preroll",this.startWatchDog();try{this.adman.start("preroll")}catch(e){this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch(i){this.onAdError("could not start postroll")}}else this.onAdError("Can not start postroll: Adman is not initialized")}startWatchDog(){this.watchDogTimeout&&this.stopWatchDog(),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch(i){this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch(i){this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(i){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){var o;(o=this.adman)==null||o.setPosition(Math.floor(e),Math.floor(i))}destroy(){var e,i,o,s,a,l,d,r,u,p,f,v;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[oi()]}),this.log({message:"destroy"}),this.stopWatchDog(),(e=this.adman)==null||e.onReady(void 0),(i=this.adman)==null||i.onStarted(void 0),(o=this.adman)==null||o.onPlayed(void 0),(s=this.adman)==null||s.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(l=this.adman)==null||l.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(r=this.adman)==null||r.onClicked(void 0),(u=this.adman)==null||u.onTimeRemained(void 0),(p=this.adman)==null||p.onCompleted(void 0),(f=this.adman)==null||f.onError(void 0),(v=this.adman)==null||v.destroy(),this.videoElement&&Ox(this.videoElement),this.isDestroyed=!0}safeExternalCall(e,...i){return bt(this,null,function*(){var o;try{return yield e(...i)}catch(s){return this.onAdError((o=s==null?void 0:s.message)!=null?o:"External call failed"),null}})}};var X_=t=>{let e=Math.round(t);return isNaN(e)||e<40?"":e>=40&&e<55?50:e>=55&&e<90?60:e>=90&&e<180?120:e>=180?240:""};var hm=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(e,i){let o=[],s=e.split(this.twoLinesRegExp);for(let a of s){let l={startTime:0,endTime:0,texts:[],lang:i},d=a.split(this.oneLineRegExp);for(let r of d)if(!l.startTime&&!l.endTime){let u=new Uu,{startTime:p,endTime:f}=u.parse(r);l.startTime=p,l.endTime=f}else if(r.trim()!==""){let u=new _m,{texts:p}=u.parse(r);l.texts=[...l.texts,...p]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},Uu=class{constructor(){this.timeRegExp=/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/;this.timingRegExp=new RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`)}parse(e){let i={startTime:0,endTime:0},o=this.timingRegExp.exec(e);return o&&(i.startTime=this.calcTime(o[1],o[2],o[3],o[4]),i.endTime=this.calcTime(o[6],o[7],o[8],o[9])),i}parseTime(e){let i=this.timeRegExp.exec(e);return i?this.calcTime(i[1],i[2],i[3],i[4]):0}isTime(e){return this.timeRegExp.test(e)}calcTime(e="0",i="0",o="0",s="0"){let a=Number(e)*60*60,l=Number(i)*60,d=Number(o),r=+`0.${s}`;return a+l+d+r}},_m=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},s=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](l){let d=0,r=[];for(;d<l.length;){let u=["<",">"].reduce((p,f)=>{let v=l.indexOf(f,d);return p===-1||p>v?v:p},-1);if(u===-1){r.push(l.substring(d));break}r.push(l.substring(d,u)),d=u+1}return r}}),a=new Uu;for(let l of s)a.isTime(l)?i.texts.push({type:"timestamp",value:a.parseTime(l)}):i.texts.push({type:"text",value:l});return i}},Z_=hm;import{isNonNullable as bm}from"@vkontakte/videoplayer-shared/es2015";var Qa,Oi,$m=0,ym=!1,J_="",eb=(t,e=0,i=0)=>t<e&&t<i,zu=(t,e=0,i=0)=>t>=e&&t<=i,Bx=(t,e=0,i=0)=>t>e&&t>i,tb=(t,e,i,o=!1)=>{var d;let s=(d=i.find(({id:r})=>r===e.value))==null?void 0:d.subtitles;if(o)return s==null?void 0:s.find(({startTime:u,endTime:p})=>zu(t,u,p));let a=t>=$m,l=t<$m;if($m=t,l&&(ym=!1),bm(Qa)&&zu(t,Qa.startTime,Qa.endTime)&&J_===e.value)return Qa;if(!bm(Oi)&&(s!=null&&s.length)&&!ym){Oi=s.find(({startTime:u,endTime:p})=>zu(t,u,p)||a&&eb(t,u,p)),Qa=void 0,!bm(Oi)&&s[s.length-1].endTime<t&&(ym=!0);return}else{if(zu(t,Oi==null?void 0:Oi.startTime,Oi==null?void 0:Oi.endTime))return Qa=Oi,Oi=void 0,J_=e.value,Qa;(a&&Bx(t,Oi==null?void 0:Oi.startTime,Oi==null?void 0:Oi.endTime)||l&&eb(t,Oi==null?void 0:Oi.startTime,Oi==null?void 0:Oi.endTime))&&(Oi=void 0)}};var Wu={ru:"Русский",en:"English",uk:"Українська",be:"Беларуская (тарашкевiца)",es:"Español",fi:"Suomi",de:"Deutsch",it:"Italiano",bg:"Български",hr:"Hrvatski",hu:"Magyar",sr:"Српски",pt:"Português",el:"Ελληνικά",pl:"Polski",fr:"Français",ko:"한국어","zh-CN":"汉语",lt:"Lietuvių",ja:"日本語",cs:"Čeština",et:"Eesti",tt:"Татарча",ba:"Башҡортса",cv:"Чăвашла",sk:"Slovenčina",ro:"Română",no:"Norsk",lv:"Latviešu",az:"Azərbaycan dili",hy:"Հայերեն",sv:"Svenska",nl:"Nederlands",tk:"Türkmen",ka:"ქართული",da:"Dansk",uz:"O‘zbek",th:"ภาษาไทย",id:"Bahasa Indonesia",tg:"Тоҷикӣ",sl:"Slovenščina",bs:"Bosanski","pt-BR":"Português brasileiro",fa:"فارسی",vi:"Tiếng Việt",hi:"हिन्दी",si:"සිංහල",bn:"বাংলা",tl:"Tagalog",mn:"Монгол",my:"ဗမာစာ",tr:"Türkçe",ne:"नेपाली",ur:"اردو",ky:"Кыргыз тили",pa:"پنجابی",os:"Ирон",kn:"ಕನ್ನಡ",sw:"Kiswahili",kk:"Қазақша",ar:"العربية",he:"עברית",ab:"Аҧсшәа",eu:"Euskara",eo:"Esperanto"},Hx={abk:"as",ara:"ar",aze:"az",bak:"ba",bel:"be",ben:"bn",bos:"bs",bul:"bg",ces:"cs",chv:"cv",dan:"da",deu:"de",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",fas:"fa",fin:"fi",fra:"fr",heb:"he",hin:"hi",hrv:"hr",hun:"hu",hye:"hy",ind:"id",ita:"it",jpn:"ja",kan:"kn",kat:"ka",kaz:"kk",kir:"ky",kor:"ko",lav:"lv",lit:"lt",mon:"mn",mya:"my",nep:"ne",nld:"nl",nor:"no",oss:"os",pan:"pa",pol:"pl",por:"pt",ron:"ro",rus:"ru",sin:"si",slk:"sk",slv:"sl",spa:"es",srp:"sr",swa:"sw",swe:"sv",tat:"tt",tgk:"tg",tgl:"tl",tha:"th",tuk:"tk",tur:"tr",ukr:"uk",urd:"ur",uzb:"uz",vie:"vi"},oc=t=>{var e,i;return(i=(e=Wu[t])!=null?e:Wu[Hx[t]])!=null?i:void 0};import{ValueSubject as Em}from"@vkontakte/videoplayer-shared/es2015";function Ku(t){let e="";return Xi(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),Xi(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),Xi(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),Xi(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),Xi(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),Xi(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),Xi(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),Xi(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),Xi(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),Xi(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),Xi(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),Xi(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),Xi(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),Xi(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),Xi(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),Xi(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),Xi(t.controlsDesktopPaddingHorizontalMinimalView)&&(e+=`--controls-desktop-padding-horizontal-minimal-view:${t.controlsDesktopPaddingHorizontalMinimalView};`),Xi(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),Xi(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),Xi(t.font)&&(e+=`--font:${t.font};`),Xi(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),Xi(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function Xi(t){return typeof t=="string"&&!t.includes(";")}var Fx=Ae('<path d="M31.257 3.998c3.037.01 4.52.39 6.13 1.24a9 9 0 013.47 3.35l.17.31.15.3c.78 1.55 1.07 3.18 1.09 6.25v9.04a1.5 1.5 0 01-3 .02v-9.65c-.05-2.04-.24-3.12-.64-4.04l-.12-.27-.13-.25A6 6 0 0036.2 7.9c-1.19-.64-2.34-.88-5.11-.9h-8.84c-2.73 0-4 .2-5.07.7l-.25.13a6 6 0 00-2.4 2.41c-.64 1.19-.88 2.34-.9 5.11v20.83c0 2.74.2 4 .7 5.08l.13.25a6 6 0 002.41 2.4c1.1.6 2.13.83 4.44.89H26a1.5 1.5 0 010 3h-4.47c-3-.05-4.53-.38-6.14-1.24a9 9 0 01-3.48-3.35l-.15-.3c-.73-1.47-1.04-3.01-1.08-5.8V15c.05-2.98.39-4.52 1.25-6.12a9 9 0 013.293-3.582c1.85-.871 2.623-1.27 5.747-1.27z"></path><path d="M30.5 33.8c0-1.68 0-2.52.33-3.16a3 3 0 0 1 1.3-1.31c.65-.33 1.49-.33 3.17-.33h6.4c1.68 0 2.52 0 3.16.33a3 3 0 0 1 1.31 1.3c.33.65.33 1.49.33 3.17v13.4c0 1.68 0 2.52-.33 3.16a3 3 0 0 1-1.3 1.31c-.65.33-1.49.33-3.17.33h-6.4c-1.68 0-2.52 0-3.16-.33a3 3 0 0 1-1.31-1.3c-.33-.65-.33-1.49-.33-3.17z"></path>',1),Ux=L('<div><div><!></div> <span class="title s-0"> </span></div>'),zx={hash:"s-0",code:".player-pip-dummy.s-0{align-items:center;background-color:#19191a;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;width:100%}.player-pip-dummy.is-pip-api.s-0{position:relative}.dummy-image.s-0 svg{transform:scale(1.07143)}.dummy-image.desktop.s-0{transform:scale(1.07143) rotate(-90deg) rotateY(180deg)}.title.s-0{color:#fff;font-size:16px;padding:18px 20px 10px;text-align:center}"};function xm(t,e){B(e,!0),Q(t,zx);let[i,o]=Be(),s=()=>x(u,"$interfaceLanguage$",i),a=()=>x(p,"$isMobile$",i),l=xe(),d=Lt(),r=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,p=l.ui.isMobile,f=l.ui.t,v=m(()=>s()&&f("pip_dummy_title")),b=Ku(d.view);var y=Ux();let _;var w=C(y);let I;var T=C(w);je(T,{width:"57",height:"56",testId:"pip-dummy-icon",children:(P,E)=>{var W=Fx();Xt(),$(P,W)},$$slots:{default:!0}}),S(w);var R=A(w,2),k=C(R,!0);S(R),S(y),O((P,E)=>{_=te(y,1,"player-pip-dummy s-0",null,_,P),Ke(y,b),I=te(w,1,"dummy-image s-0",null,I,E),he(k,n(v))},[()=>({"is-pip-api":r}),()=>({desktop:!a()})]),$(t,y),H(),o()}import{clientChecker as rb}from"@vkontakte/videoplayer-core/es2015";import{debounceFn as Kx,getWindow as wm,ValueSubject as Sm}from"@vkontakte/videoplayer-shared/es2015";import{detectEmbed as Wx,getWindow as ib}from"@vkontakte/videoplayer-shared/es2015";var ga=()=>{var t;return(t=ib().document)==null?void 0:t.pictureInPictureEnabled},Wl=()=>{let{isEmbed:t}=Wx();return"documentPictureInPicture"in ib()&&!t},Qu=t=>!!t.pictureInPictureWindow,ob=t=>!!t.target&&"height"in t.target&&"width"in t.target,nb=t=>typeof t=="boolean"?t:t!==void 0;var qa=class{constructor({enabled:e=!0}){this.isRequested=!1;this.videoElement=void 0;this.playerContainer=void 0;this.externalEventHandlers={};this.eventHandlers={enterpictureinpicture:this.onEnterPictureInPicture.bind(this),leavepictureinpicture:this.onLeavePictureInPicture.bind(this),resize:Kx(this.onResize.bind(this),300)};this.info={isActive$:new Sm(!1),isEnabled$:new Sm(!1),type:0};this.info.isEnabled$=new Sm(e)}isSupported(){return ga()}isActive(){return this.info.isActive$.getValue()}setContext(e){this.svelteContext=e}revealPictureInPicture(){return bt(this,null,function*(){this.isRequested&&(this.removeEventHandlers(),yield this.request(),this.addEventHandlers())})}request(){return bt(this,null,function*(){var e;if(!(!this.isSupported()||this.isActive()))try{yield(e=this.videoElement)==null?void 0:e.requestPictureInPicture()}catch(i){this.isRequested=!1}})}exit(){return bt(this,null,function*(){let{document:e}=wm();!this.isSupported()||!this.isActive()||!this.videoElement||!e.pictureInPictureElement||(yield e.exitPictureInPicture(),rb.browser.isYandex&&!this.videoElement.isConnected&&this.onLeavePictureInPicture())})}assignPlayerContainer(e){this.isSupported()&&(this.playerContainer=e)}updateVideoElement(){this.isSupported()&&this.exit().finally(()=>{var i;this.removeEventHandlers();let e=this.videoElement;this.videoElement=(i=this.playerContainer)==null?void 0:i.querySelector("video"),this.waitForSafariLeavePictureInPicture(e,this.videoElement),this.addEventHandlers()})}addEventHandlers(){var e,i;(e=this.videoElement)==null||e.addEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.addEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}setExternalEventHandlers(e){this.externalEventHandlers=Ye({},e)}removeEventHandlers(){var e,i;(e=this.videoElement)==null||e.removeEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.removeEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}dispose(){return bt(this,null,function*(){this.removeEventHandlers(),yield this.exit(),this.info.isActive$.next(!1),this.isRequested=!1})}onEnterPictureInPicture(e){var o,s;let i=Qu(e)?e.pictureInPictureWindow:void 0;this.info.isActive$.next(!0),this.isRequested=!0,i==null||i.addEventListener("resize",this.eventHandlers.resize),(s=(o=this.externalEventHandlers).enterpictureinpicture)==null||s.call(o)}onLeavePictureInPicture(e){var i,o;if(e){let s=Qu(e)?e.pictureInPictureWindow:void 0;s==null||s.removeEventListener("resize",this.eventHandlers.resize)}this.info.isActive$.next(!1),this.isRequested=!1,this.eventHandlers.resize.cancel(),(o=(i=this.externalEventHandlers).leavepictureinpicture)==null||o.call(i)}onResize(e){var o,s;let i=ob(e)?e.target:Qu(e)?e.pictureInPictureWindow:void 0;i&&((s=(o=this.externalEventHandlers).resize)==null||s.call(o,{width:i.width,height:i.height}))}setEnabled(e){this.info.isEnabled$.next(e)}waitForSafariLeavePictureInPicture(e,i){if(rb.browser.isSafari&&e&&e!==i){let s=this.eventHandlers.leavepictureinpicture,a=0,l=()=>{wm().clearTimeout(a),e.removeEventListener("leavepictureinpicture",d)},d=r=>(s(r),l());e.addEventListener("leavepictureinpicture",d),a=wm().setTimeout(l,1e3)}}};function Tm(t){return t instanceof qa}var Qx=Object.defineProperty,qx=Object.defineProperties,Gx=Object.getOwnPropertyDescriptors,sb=Object.getOwnPropertySymbols,Yx=Object.prototype.hasOwnProperty,jx=Object.prototype.propertyIsEnumerable,Pm=(t,e,i)=>e in t?Qx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Xx=(t,e)=>{for(var i in e||(e={}))Yx.call(e,i)&&Pm(t,i,e[i]);if(sb)for(var i of sb(e))jx.call(e,i)&&Pm(t,i,e[i]);return t},Zx=(t,e)=>qx(t,Gx(e)),Us=(t,e,i)=>Pm(t,typeof e!="symbol"?e+"":e,i),Im=(t,e,i)=>new Promise((o,s)=>{var a=r=>{try{d(i.next(r))}catch(u){s(u)}},l=r=>{try{d(i.throw(r))}catch(u){s(u)}},d=r=>r.done?o(r.value):Promise.resolve(r.value).then(a,l);d((i=i.apply(t,e)).next())}),Jx=400,e2=225,rc=class{constructor({enabled:e=!0,initialSize:i={width:Jx,height:e2}}){Us(this,"initialSize"),Us(this,"playerDomElement"),Us(this,"playerParentShadowRoot"),Us(this,"playerDummyElement"),Us(this,"svelteContext"),Us(this,"pipWindow"),Us(this,"info",{isActive$:new Em(!1),isEnabled$:new Em(!1),type:1}),Us(this,"pipActive",!1),Us(this,"pipApi"),this.initialSize=i,this.info.isEnabled$=new Em(e),ga()&&(this.pipApi=new qa({enabled:e}),this.pipApi.info.isActive$.subscribe(o=>{(o&&!this.info.isActive$.getValue()||!o&&this.pipActive)&&this.info.isActive$.next(o),this.pipActive=o}))}isSupported(){return Wl()}isActive(){return this.info.isActive$.getValue()}setPlayerDomElement(e,i){this.playerDomElement=e,this.playerParentShadowRoot=i}setContext(e){this.svelteContext=e}request(){return Im(this,null,function*(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=yield documentPictureInPicture.requestWindow(Zx(Xx({},this.initialSize),{copyStyleSheets:!0})),this.pipWindow.document.body.style.margin="0";let o=[...this.playerParentShadowRoot.styleSheets].map(r=>[...r.cssRules].map(u=>u.cssText).join(" ")).filter(Boolean).join(`
|
|
59
|
+
`),s=document.createElement("style");s.textContent=o;let a=this.createStretchedContainer(),l=a.attachShadow({mode:"open"});l.append(s),l.append(this.playerDomElement);let d={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=ts(xm,d),(e=this.pipWindow)==null||e.document.body.append(a),this.info.isActive$.next(!0),(i=this.pipWindow)==null||i.addEventListener("unload",r=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(Da(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})})}exit(){return Im(this,null,function*(){return new Promise(e=>{var i,o,s;this.pipWindow?((i=documentPictureInPicture.window)==null||i.close(),window.focus()):(o=this.pipApi)!=null&&o.isActive()&&((s=this.pipApi)==null||s.exit()),e()})})}dispose(){return Im(this,null,function*(){yield this.exit()})}setEnabled(e){var i;this.info.isEnabled$.next(e),(i=this.pipApi)==null||i.setEnabled(e)}assignPlayerContainer(e){var i;(i=this.pipApi)==null||i.assignPlayerContainer(e)}updateVideoElement(){var e;(e=this.pipApi)==null||e.updateVideoElement()}setExternalEventHandlers(e){var i;(i=this.pipApi)==null||i.setExternalEventHandlers(e)}createStretchedContainer(){let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e}};function qu(t){return t instanceof rc}var Am=(t,e)=>{if(nb(e)&&Wl())return new rc(Ye({enabled:t},typeof e!="boolean"&&e));if(ga())return new qa({enabled:t})};import{Subscription as t2}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-statistics/es2015";var Gu=class{constructor(e,i,o,s=new t2){this.oneStat=e;this.thinOneStat=i;this.mediascopePixel=o;this.statSubscription=s}destroy(){var e,i,o;(e=this.oneStat)==null||e.destroy(),(i=this.thinOneStat)==null||i.destroy(),(o=this.mediascopePixel)==null||o.destroy(),this.statSubscription.unsubscribe()}};var Yu=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(Yu||{});var ws=t=>t!=null?t:0,zs=(t,e)=>{var s,a;let i=(s=t==null?void 0:t.getBoundingClientRect)==null?void 0:s.call(t),o=(a=e==null?void 0:e.getBoundingClientRect)==null?void 0:a.call(e);return{top:Math.round(ws(i==null?void 0:i.top)-ws(o==null?void 0:o.top)),left:Math.round(ws(i==null?void 0:i.left)-ws(o==null?void 0:o.left)),bottom:Math.round(ws(i==null?void 0:i.bottom)-ws(o==null?void 0:o.top)),right:Math.round(ws(i==null?void 0:i.right)-ws(o==null?void 0:o.left))}},Kl=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:ws(e==null?void 0:e.width),height:ws(e==null?void 0:e.height)}};var On="off";var Ql=t=>!!(Math.round(Math.abs(t)/90)%2);var pb=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:s,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:r,webApi:u,videoEpisodes:p,previewThumbsData:f,uiConfig:v,coreConfig:b,player:y,disabledControls:_,isInteractive:w,interactiveRanges$:I,isInteractiveTime$:T,replayInteractive:R,stopPlayer:k,hasInteractiveBranches:P,playPrevChapterDisabledTooltip:E,additionalButtons:W,additionalSettingsMenuItems:U,additionalContextMenuItems:z,playPrevVideo:Y,playNextVideo:ie,onVideoChanged:J,looped:oe=!1,statistics:de,saveRate:ae,internalsExposure:pe,playerView:ee,playerId:$e,metaConfig:Ee,appTracer:ce})=>{var Yv,jv;let Qe=Jt(Ye({},b),{isAudioDisabled:l,live:Jt(Ye({},(Yv=b.live)!=null?Yv:{}),{isLiveCatchUpMode:!!s})}),fe=v,ve=u2.createRootTracer(fe.features.tracer),X=ve.createComponentTracer("Store"),N=y||new o2(Qe,ve,{playerId:$e,onDevNullLog:r==null?void 0:r.onDevNullLog});pe==null||pe.expose({corePlayer:N});let me=new d2,ue=new Fu(me,{loadTimeout:fe.ads.loadTimeout,initTimeout:fe.ads.initTimeout,runtimeTimeout:fe.ads.runtimeTimeout,useAdmanFromNPM:fe.ads.useAdmanFromNPM,volumeMultiplier:fe.ads.volumeMultiplier,isVsidOriginal:fe.ads.isVsidOriginal}),Re=u==null?void 0:u.pictureInPictureApi,Je=u==null?void 0:u.annotationsApi,ke=u==null?void 0:u.slotsApi,j=u==null?void 0:u.focusManager,ne=me.createComponentLog("Store"),Se,Le,ze={},Ce=new $u,we=new db,Fe="",rt=se(!1),ut=se(ee==="minimal"),Mt=de&&de.oneStat?ti(de.oneStat.vsid$):Dr(void 0),lt=se(da()),ni=se(!1),wt=()=>C_(document,ab.device.isIOS),Rt=(jv=Re==null?void 0:Re.info.isActive$)!=null?jv:new cb(!1),Dt=se(0),Qt=se(!1),Te=se(!1),G=se([]),Ne=c2(N.events.fatalError$,N.events.managedError$).subscribe(c=>G.update(h=>[...h,c])),be=Dr(!1,c=>{let h=N.events.fatalError$.subscribe(()=>c(!0));return()=>h.unsubscribe()}),Oe=c=>{ut.set(c)},Ie=c=>bt(null,null,function*(){var re;let h=Object.values(r2).includes(c);if(fe.downloadVKLanguages&&(h&&fe.updateBuiltinLanguages||!Df(c))){let Pe;try{Pe=yield l2(c,Oh,Nh)}catch(Xe){(re=de==null?void 0:de.oneStat)==null||re.logError({errorType:"VKLangPack",fatal:!1}),ce==null||ce.error({category:ub.WTF,id:"VKLangPack",message:String(Xe),thrown:Xe},{severity:"warning"})}Pe&&(Rf({language:c,pack:Pe,fallback:fe.defaultLanguage}),ht.set(c),ye.update(Xe=>Xe+1))}Df(c)&&ht.set(c)}),ht=se(t),ye=se(0),qe=se(e);Ie(t);let Ue=(c,h)=>{let V=_e(ht);return Of(V,c,h,fe.defaultLanguage)},st=se("thumb");st.subscribe(c=>{c==="ads"&&N.info.playbackState$.getValue()&&Yt()});let qt=(()=>{let c=ci([be,st],([h,V])=>h?"crashed":V);return Jt(Ye({},c),{is:h=>_e(c)===h})})(),Pt=se(),Yt=()=>{Pt.set({muted:N.info.muted$.getValue()})},bi=(()=>{let c=se(new Set(_));return Jt(Ye({},c),{add:h=>{c.update(V=>new Set([...V].concat(h)))},remove:h=>{c.update(V=>{let re=[...V];return new Set(Array.isArray(h)?re.filter(Pe=>!h.includes(Pe)):re.filter(Pe=>Pe!==h))})},includes:h=>{let V=_e(c);return Array.isArray(h)?h.every(re=>V.has(re)):V.has(h)}})})(),Mi=se({width:0,height:0}),Ai=null,Zi=N.info.isBuffering$,si=Dr(Zi.getValue(),c=>{let h=Zi.subscribe(V=>{V&&Ai===null?Ai=window.setTimeout(()=>{c(Zi.getValue()),Ai=null},fe.loaderDelay):c(V)});return()=>{h.unsubscribe(),Ai&&clearTimeout(Ai)}});X.log("create store"),ne({message:"create store"});let pt=c=>{let h=c.container,V=()=>{at=new MutationObserver(Pe=>{let{removedNodes:Xe}=Pe[0];Xe.length&&h.append(N.experimental.element$.getValue())}),at.observe(h,{childList:!0})},re=N.experimental.element$.getValue();if(re)h.append(re),V();else{let Pe=N.experimental.element$.pipe(v2(Xe=>!!Xe),g2()).subscribe(Xe=>{h.append(Xe),V()});we.add(Pe)}},di=c=>{ne({message:`init video, config: ${JSON.stringify(c)}`}),w?pt(c):(f2.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[m2()]}),N.initVideo(c)),X.log("init video",{isInteractive:w}),c.subtitles&&N.setExternalTextTracks(c.subtitles),Se=c,Fe=c.subtitlesForcedLanguage||""},Ji=new ac,It=c=>Ji.next(c),gi=new ac,ui=new cb(Ws.UNKNOWN),We=new ac,at=null,Si={actionRewind$:gi,actionSeek$:ui,inPiP$:Rt,inFullscreen$:new ju(c=>lt.subscribe(h=>c.next(h))),actionSetSubtitle$:We,nextMovie$:Ji},eo=new ac,bo=new ac,Ao={actionSeek$:ui,actionSubtitlesSwitched$:eo,actionQuality$:bo,playerSize$:new ju(c=>Mi.subscribe(h=>c.next(h))),inPiP$:Rt,inFullscreen$:new ju(c=>lt.subscribe(h=>c.next(h))),isLoaderVisible$:new ju(c=>si.subscribe(h=>c.next(h)))};if(de){let{oneStat:c,thinOneStat:h,mediascopePixel:V,statSubscription:re}=de;c&&(w||re.add(c.attachTo(N)),re.add(c.attachToUi(Si)),re.add(c.attachToAds(ue.events)),c.authorize(a).catch(Pe=>{ne({message:`onestat auth error ${String(Pe)}`})}),V&&V.attachTo(N)),h&&(re.add(h.attachTo(N,ue.events)),re.add(h.attachToUi(Ao)),re.add(h.attachToAds(ue.events)),h.updateContext({isMobile:_e(rt)}),h.authorize(a))}ce&&(ce.addSubscription(N.events.managedError$.subscribe(c=>{ce.error(c,{severity:"debug"})})),ce.addSubscription(N.events.fatalError$.subscribe(c=>{ce.error(c,{severity:"fatal"})})),de!=null&&de.oneStat&&ce.addSubscription(de.oneStat.experimental.error$.subscribe(c=>{ce.error(c,{severity:"warning"})})));let pn=()=>{if(ab.device.isIOS&&Le)try{T_(Le)}catch(c){ne({message:`exitIosSafariFullscreen failed: ${c}`})}};we.add(N.experimental.element$.subscribe(c=>{c&&(Le=c,c.classList.add("player-media"),Re==null||Re.updateVideoElement(),w&&c.setAttribute("pip","false"),(ee==="preview"||!fe.features.pip&&!fe.features.dpip)&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(N.events.ended$.subscribe(()=>{var c;pn(),(c=r==null?void 0:r.onEnded)==null||c.call(r)})).add(N.events.looped$.subscribe(()=>{var c;(c=r==null?void 0:r.onLooped)==null||c.call(r)})).add(N.events.started$.subscribe(()=>bt(null,null,function*(){var h,V;Tm(Re)&&(yield Re==null?void 0:Re.revealPictureInPicture());let c=N.info.muted$.getValue();(h=r==null?void 0:r.onStarted)==null||h.call(r),(V=ze.onStarted)==null||V.call(ze,c)}))).add(N.events.willSeek$.subscribe(({from:c,to:h})=>{var V;(V=r==null?void 0:r.onSeek)==null||V.call(r,c,h,ui.getValue())})).add(N.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=r==null?void 0:r.onAutoplaySoundProhibited)==null||c.call(r)})).add(N.info.position$.subscribe(c=>{var V;let h=N.info.duration$.getValue();isFinite(h)&&h>0&&((V=r==null?void 0:r.onTimeupdate)==null||V.call(r,h,c),ue.setPosition(c,h))})).add(N.events.fatalError$.subscribe(c=>{var h;(h=r==null?void 0:r.onCrashed)==null||h.call(r,c?`${c.id}: ${c.message}`:void 0)})).add(N.events.fetcherRecoverableError$.subscribe(c=>{var h;(h=r==null?void 0:r.onRecoverableError)==null||h.call(r,c?`${c.id}: ${c.message}`:void 0)})).add(N.events.loadedMetadata$.subscribe(()=>{Qt.set(!0)})).add(N.info.is3DVideo$.subscribe(c=>{Te.set(c)})).add(N.info.isEnded$.subscribe(c=>{w&&(c?(T!=null&&T.getValue()&&bi.add(Md),bi.add("PLAY_BUTTON")):bi.remove("PLAY_BUTTON"))})).add(N.info.liveTime$.subscribe(c=>{var h;(h=r==null?void 0:r.onLiveTime)==null||h.call(r,c)})).add(N.info.isStalled$.subscribe(c=>{var h;(h=r==null?void 0:r.onStalledChanged)==null||h.call(r,c)})).add(N.info.isLiveEnded$.subscribe(c=>{var h;return c&&((h=r==null?void 0:r.onLiveEnded)==null?void 0:h.call(r))})).add(ue.events.loadStarted$.subscribe(()=>{var c,h;return(h=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:h.call(c)})).add(ue.events.loadEnded$.subscribe(()=>{var c,h;return(h=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:h.call(c)})).add(ue.events.loadError$.subscribe(()=>{var c,h;return(h=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onLoadError)==null?void 0:h.call(c)})).add(ue.events.init$.subscribe(()=>{var c,h;return(h=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onInit)==null?void 0:h.call(c)})).add(ue.events.ready$.subscribe(()=>{var c,h;return(h=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onReady)==null?void 0:h.call(c)})).add(ue.events.started$.subscribe(c=>{var h,V;return(V=(h=r==null?void 0:r.adsInfo)==null?void 0:h.onStarted)==null?void 0:V.call(h,c)})).add(ue.events.timeRemained$.subscribe(c=>{var h,V;return(V=(h=r==null?void 0:r.adsInfo)==null?void 0:h.onTimeRemained)==null?void 0:V.call(h,c)})).add(ue.events.ended$.subscribe(c=>{var h,V;return(V=(h=r==null?void 0:r.adsInfo)==null?void 0:h.onCompleted)==null?void 0:V.call(h,c)})).add(ue.events.empty$.subscribe(()=>{var c,h;return(h=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onEmpty)==null?void 0:h.call(c)})).add(ue.events.clicked$.subscribe(c=>{var h,V;return(V=(h=r==null?void 0:r.adsInfo)==null?void 0:h.onClicked)==null?void 0:V.call(h,c)})).add(ue.events.closed$.subscribe(c=>{var h,V;return(V=(h=r==null?void 0:r.adsInfo)==null?void 0:h.onClosed)==null?void 0:V.call(h,c)})).add(ue.events.error$.subscribe(c=>{var h,V;return(V=(h=r==null?void 0:r.adsInfo)==null?void 0:h.onError)==null?void 0:V.call(h,c)})).add(ue.events.paused$.subscribe(()=>{var c,h;return(h=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onPaused)==null?void 0:h.call(c)})).add(ue.events.resumed$.subscribe(()=>{var c,h;return(h=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onResumed)==null?void 0:h.call(c)}));let F=new db,ot=()=>{var Xe,At,Ot;let{debugLog:c}=fe,h,V="#9df7b7",re="#efd169";if(c&&c!==!0){let{colors:zt}=c;h=c.tag,V=(Xe=zt==null?void 0:zt[0])!=null?Xe:V,re=(Ot=(At=zt==null?void 0:zt[1])!=null?At:zt==null?void 0:zt[0])!=null?Ot:re}let Pe=h?`: ${h}`:"";F.add(N.events.log$.subscribe(zt=>{console.debug(`%c sdk${Pe} `,`background:${V};`,`sdk component: ${zt.component}`,zt.message)})).add(me.log$.subscribe(zt=>{console.debug(`%c ui${Pe} `,`background:${re};`,`ui component: ${zt.component}.`,zt.message)}))},Ut=()=>{F.unsubscribe()},pi=(c,h)=>{X.log("start camera manual rotation",{mx:c,my:h}),N.startCameraManualRotation(c,h)},ct=(c=!1)=>{X.log("stop camera manual rotation",{immediate:c}),N.stopCameraManualRotation(c)},ai=(c,h,V)=>{X.log("move camera focus px",{xpx:c,ypx:h,dt:V}),N.moveCameraFocusPX(c,h,V)},fi=()=>{N.holdCamera()},Gt=()=>{N.releaseCamera()},Ct=Dr(N.info.position$.getValue(),c=>{let h,V,re=()=>{let Pe=N.info.playbackState$.getValue(),Xe=N.info.isLive$.getValue(),At=N.info.duration$.getValue(),Ot=N.info.position$.getValue();if(Pe&&[ql.PLAYING,ql.PAUSED].includes(Pe)){let zt=Xe?Ot-At:N.getExactTime();zt!==V&&c(zt),V=zt}h=requestAnimationFrame(re)};return re(),()=>cancelAnimationFrame(h)}),so=ti(N.info.playbackState$),ko=ti(N.info.isBuffering$),Nn=ci([so,ko],([c,h])=>h?"buffering":c),fn=ti(N.info.currentBuffer$),ki=ti(N.info.isEnded$),xi=ti(N.info.isLive$),Xo=fe.features.playbackRate?ti(N.info.canChangePlaybackSpeed$):Dr(!1),ir=ti(N.info.liveBufferTime$),hi=ti(N.info.volume$),$o=ti(N.info.muted$),mn=yu(N.info.predefinedQualityLimitType$.pipe(lb(c=>c===Ss.TRAFFIC_SAVING)),N.info.predefinedQualityLimitType$.getValue()===Ss.TRAFFIC_SAVING),Lo=yu(N.info.predefinedQualityLimitType$.pipe(lb(c=>c===Ss.HIGH_QUALITY)),N.info.predefinedQualityLimitType$.getValue()===Ss.HIGH_QUALITY),vn=ti(N.info.autoQualityLimitingAvailable$),Cs=ti(N.info.availableQualities$),Ts=ti(N.info.availableQualitiesFps$),ss=ti(N.info.chromecastState$),xr=ti(N.info.chromecastDeviceName$),gn=ti(N.info.currentFormat$),hn=ti(N.info.throughputEstimation$),or=ti(N.info.videoBitrate$),wr=ti(N.info.intrinsicVideoSize$),nr=ti(N.info.duration$),Br=ti(N.info.isAudioAvailable$),Hr=()=>{Ai&&clearTimeout(Ai),Ai=null},Bn=ci([nr,xi],([c,h])=>h?-c:c),rr=ci([so],([c])=>c===ql.PLAYING),Hn=ti(N.info.atLiveEdge$),sr=ti(N.info.atLiveDurationEdge$),Fr=ti(N.info.position$),Ur=ci([Fr,nr],([c,h])=>isFinite(c)&&isFinite(h)&&!!h),Ci=ci([ss],([c])=>c===i2.CONNECTED),as=ti(N.info.availableVideoStreams$),Zo=fe.features.audioLanguages?ti(N.info.availableAudioStreams$):Dr([]),gt=ti(N.info.currentVideoStream$),jt=ti(N.info.currentAudioStream$),ar=c=>{c.language&&kf(c.language),N.setVideoStream(c)},Fn=(c,h)=>{N.setAudioStream(c),vo(h)&&(c.language&&kf(c.language),fe.features.userVideoPrefs&&i&&Vf(fe.userSalt,String(i),{audioTrackId:c.id}))},zr=c=>{let h;if(c.length===1&&(h=c.at(0)),h!=null||(h=c.find(re=>"isDefault"in re&&re.isDefault)),fe.features.userVideoPrefs&&i){let re=Tu(fe.userSalt,String(i));if(re!=null&&re.audioTrackId){let Pe=c.find(Xe=>Xe.id===re.audioTrackId);h=Pe!=null?Pe:h}}let V=c_();return V&&(h!=null||(h=c.find(({language:re})=>V===re))),h!=null||(h=c.at(0)),h},Sr=c=>{X.log("change audio stream",{id:c});let h=N.info.availableAudioStreams$.getValue().find(V=>V.id===c);h&&Fn(h,!0)},Wr=!1;we.add(N.info.availableAudioStreams$.subscribe(c=>{if(!Wr&&c.length){let h=zr(c);h&&(N.setAudioStream(h),Wr=!0)}})),Zo.subscribe(c=>{var h;(h=r==null?void 0:r.onAvailableAudioStreamsChanged)==null||h.call(r,c.map(({label:V="",id:re="",language:Pe=""})=>({label:V,language:Pe,id:re})))}),jt.subscribe(c=>{var h;return c&&((h=r==null?void 0:r.onAudioStreamChanged)==null?void 0:h.call(r,c.id))});let _n=!1;we.add(N.info.availableVideoStreams$.subscribe(c=>{if(!_n&&c.length){let h=zr(c);h&&(N.setVideoStream(h),_n=!0)}}));let Jo=se(void 0),bn=ti(N.info.isAutoQualityEnabled$,c=>c&&Jo.set(void 0)),Cr=ti(N.info.currentQuality$,()=>Jo.set(void 0)),Tr=ci([Jo,Cr],([c,h])=>c!=null?c:h),$n=ci(gn,c=>c!==sc.MPEG),yn=ci([Cs,Ts,bn,Tr,$n],([c,h,V,re,Pe])=>{let Xe=[];Pe&&Xe.push({value:"auto",displayValue:Ue("auto_quality_option"),selected:V});let At=c.filter(Ot=>!s2(Ot));for(let Ot of At){let zt=h[Ot];Xe.push({value:Ot,displayValue:`${Ot}${zt?X_(zt):""}`,selected:V?!1:Ot===re})}return Xe}),lr=ti(N.info.currentPlaybackRate$),Li=ci([lr,Hn,sr],([c,h,V])=>{let re=V||w?1:fe.controls.playbackRateMin,Pe=h?1:fe.controls.playbackRateMax,Xe=fe.controls.playbackRateStep,At=[];for(let Ot=re;Ot<=Pe;Ot+=Xe)At.push({value:Ot,displayValue:Ot===1?Ue("playback_rate_1"):Ue("playback_rate",{multiplier:Ot.toString(10)}),selected:c===Ot});return At}),yo=()=>({displayValue:Ue("subtitles_off"),value:On,language:""}),Mo=se(yo()),ao=ci([Mo,ye],([c],h)=>{c.value===On?h(yo()):h(c)}),xn=fe.features.subtitles?ti(N.info.availableTextTracks$):Dr([]),wn=Zh(),Kr=ci([xn,ao],([c,h],V)=>{var Xe;let re=[],Pe=c.find(({id:At})=>At===h.value);if(Pe!=null&&Pe.url){let[,At]=(Xe=wn.find(Pe.url))!=null?Xe:[];if(At){V(At);return}Ce.download(Pe.url).then(Ot=>{if(!Ot||Ce.isDestroyed())return;let zt=new Z_,Zs=Pe.language;if(Zs){let p$=!!Pe.isAuto,f$=zt.parse(Ot,Zs);re.push({lang:Zs,subtitles:f$,isAuto:p$,id:Pe.id})}wn.add(Pe.url,re),_e(ao).value===h.value&&V(re)}).catch(h2).catch(Ot=>{var zt;(zt=de==null?void 0:de.oneStat)==null||zt.logError({errorType:"Subtitles download",fatal:!1}),ce==null||ce.error({category:ub.WTF,id:"Subtitles download",message:String(Ot),thrown:Ot},{severity:"warning"})})}V(re)}),St=ci([lr,rr,ao],([c,h,V],re)=>{let At;if(N.info.isLive$.getValue()&&h&&V.value!==On){let zt=()=>{let Zs=1e3/(3*c);At=setTimeout(zt,Zs),re(Date.now())};return zt(),()=>clearTimeout(At)}}),mi=ci([xn,ao],([c,h])=>{if(!c.length)return[];let V=[];for(let{language:re,isAuto:Pe,id:Xe}of c){let At=re&&oc(re);re&&At&&V.push({displayValue:Pe?Ue("subtitles_auto",{language:At}):At,value:Xe,selected:(h==null?void 0:h.value)===Xe,isAuto:Pe,language:re})}return V.length?(V.unshift(Jt(Ye({},yo()),{selected:(h==null?void 0:h.value)===On})),V):[]}),Wt={available:[],prev:[]},Vo=()=>{var h,V;let c=N.experimental.getCurrentTime$.getValue();return(V=(h=c==null?void 0:c())!=null?h:Le==null?void 0:Le.currentTime)!=null?V:0},xo=ci([Ct,ao,Kr,St],([c,h,V,re])=>{var Xe;let Pe=N.info.isLive$.getValue();if(Pe&&Wt.prev!==V){let At=V.find(({id:zt})=>zt===h.value),Ot=Wt.prev.find(({id:zt})=>zt===h.value);if(At){let zt=Jt(Ye({},At),{subtitles:[...(Xe=Ot==null?void 0:Ot.subtitles)!=null?Xe:[],...At.subtitles]});Wt.available=[zt],Wt.prev=V}}if(h&&h.value!==On){let At=Pe?Vo():c,Ot=Pe?Wt.available:V;return tb(At,h,Ot,Pe)}}),Sn=ci([xo],([c])=>c!=null&&c.texts?c.texts:[]);we.add(ao.subscribe(c=>{var h,V;if(c.value===On)(h=r==null?void 0:r.onSubtitleOff)==null||h.call(r);else{let re=Object.entries(Wu).find(([Pe,Xe])=>Xe===c.displayValue);(V=r==null?void 0:r.onSubtitleOn)==null||V.call(r,re?re[0]:"",c.value)}}));let wo=se(!0),Cn=ci([fn,Bn,Fr,ir],([c,h,V,re])=>{var Ot;let Pe=(Ot=c==null?void 0:c.end)!=null?Ot:0;if(!re)return Pe/h;let At=-V+re-h;return(Pe-At)/h}),Wi=ti(N.info.availableSources$),Ir=ci([Wi],([c])=>Object.keys((c==null?void 0:c[sc.MPEG])||{}).length>0),Ro=()=>{var V,re,Pe;let c=Object.keys(((re=(V=N.info.availableSources$)==null?void 0:V.getValue())==null?void 0:re[sc.MPEG])||{}),h=n2(c)||p2.Q_144P;return(Pe=Se.sources[sc.MPEG])==null?void 0:Pe[h]},Un=()=>{var h;let c=Ro();if(c)X.log("download video",{url:c}),Yh(c,((h=Se==null?void 0:Se.meta)==null?void 0:h.title)||"video");else{let V="There is no URL for download video";X.log("download video",{message:V}),ne({message:V})}},ls=()=>{ne({message:"toggle muted"});let c=N.info.muted$.getValue();N.info.volume$.getValue()===0&&!c?Er(Qr(),!1):et(!c,!1)},ds=()=>{var c;if(Ft.ui.settingsMenu.visible$.set(!1),!_e(Ft.ui.settingsSubMenu.visible$)){let h=_e(Ft.ui.settingsMenu.ref$);if((c=r==null?void 0:r.uiInfo)!=null&&c.onSettingsMenu&&h){let re=Kl(h),Pe={top:0,left:0,bottom:0,right:0};r.uiInfo.onSettingsMenu({visible:!1,size:re,position:Pe,name:"settings"})}}X.log("close settings menu")},cs=(c,h=()=>Promise.resolve())=>bt(null,null,function*(){var Pe;Ft.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Ft.ui.settingsMenu.visible$.set(!0),yield h();let V=_e(Ft.ui.settingsMenu.ref$),re=pl();if((Pe=r==null?void 0:r.uiInfo)!=null&&Pe.onSettingsMenu&&V&&re){let At=Kl(V),Ot=zs(V,re);r.uiInfo.onSettingsMenu({visible:!0,size:At,position:Ot,name:"settings"})}X.log("open settings menu",{wasOpenedByKeyboard:c})}),to=(c,h=!1)=>{var Xe;Ft.ui.settingsSubMenu.visible$.set(!1);let V=_e(Ft.ui.settingsMenu.ref$),re=pl(),Pe=_e(Ft.ui.settingsMenu.visible$);if((Xe=r==null?void 0:r.uiInfo)!=null&&Xe.onSettingsMenu&&V&&re)if(Pe&&!h){let Ot=Kl(V),zt=zs(V,re);r.uiInfo.onSettingsMenu({visible:!0,size:Ot,position:zt,name:"settings"})}else{let Ot=Kl(c),zt={top:0,left:0,bottom:0,right:0},Zs=_e(Ft.ui.settingsSubMenu.name$);r.uiInfo.onSettingsMenu({visible:!1,size:Ot,position:zt,name:Zs})}X.log("close settings sub menu")},us=(c,h)=>{var re;Ft.ui.settingsSubMenu.visible$.set(!0),Ft.ui.settingsSubMenu.ref$.set(h),Ft.ui.settingsSubMenu.name$.set(c);let V=pl();if((re=r==null?void 0:r.uiInfo)!=null&&re.onSettingsMenu&&h&&V){let Xe=Kl(h),At=zs(h,V);r.uiInfo.onSettingsMenu({visible:!0,name:c,size:Xe,position:At})}X.log("open settings sub menu",{name:c})},Qr=()=>{var h;let c=Math.max(fe.volumeMinRestore,(h=xu())!=null?h:0);return c===0?fe.volumeDefault:c},vo=c=>{let h=fe.features.savePreferredStatesOnUserActionOnly;return!h||h&&!c},Er=(c,h)=>{let V=c===0?Qr():c,re=N.info.muted$.getValue();ne({message:`set volume, volume: ${c}, preferredVolume: ${V}`});let Pe=!l||qt.is("ads");re&&c>0&&Pe&&(re=!1,vo(h)&&Pf(!1)),N.setVolume(c,re),ue.setVolume(c),vo(h)&&Cf(V)},et=(c,h)=>{let V=N.info.volume$.getValue();ne({message:`set muted, currentVolume: ${V}, mute: ${c}`});let re=qt.is("ads");if(N.setMuted(c,re),ue.setVolume(c?0:V),vo(h)&&(!re||!c)&&Pf(c),!c&&V===0){let Pe=Qr();N.setVolume(Pe),vo(h)&&Cf(Pe),ue.setVolume(Pe)}},_t=se(!1),Zt=c=>{var h,V;X.log("set looped",{isLooped:c}),_t.set(c),N.setLooped(c),(V=(h=r==null?void 0:r.uiInfo)==null?void 0:h.onLoopedChanged)==null||V.call(h,c)};Zt(oe);let Vi=()=>{var c,h;(h=(c=r==null?void 0:r.uiInfo)==null?void 0:c.onReportProblem)==null||h.call(c)},lo=(c,h=!1)=>{var V;ne({message:`set autoplayNextEnabled, value: ${c}`}),X.log("set autoplay next enabled",{autoplayNextEnabled:c}),Ft.ui.autoplayNextEnabled$.set(c),f_(c),h&&((V=r==null?void 0:r.onSetAutoplayNextEnabled)==null||V.call(r,c))},Ni=c=>{ne({message:`set timerNextVideoRunning, value: ${c}`}),X.log("set timer next video running",{timerNextVideoRunning:c}),Ft.ui.timerNextVideoRunning$.set(c)},go=(c=!0)=>{var V;let h=!0;if(c&&(r!=null&&r.onPrevVideoClick))try{h=(V=r==null?void 0:r.onPrevVideoClick)==null?void 0:V.call(r)}catch(re){ne({message:"onPrevVideoClick callback failed to execute"})}J(!0),h&&Y()},Do=(c=!0)=>{var V;let h=!0;if(c&&(r!=null&&r.onNextVideoClick))try{h=(V=r==null?void 0:r.onNextVideoClick)==null?void 0:V.call(r)}catch(re){ne({message:"onNextVideoClick callback failed to execute"})}J(!1),h&&ie()},Tn=()=>{var c;(c=r==null?void 0:r.onNextVideoAnnouncementShow)==null||c.call(r)},zn=()=>{var c;(c=r==null?void 0:r.onNextVideoAnnouncementClick)==null||c.call(r)},ho=()=>{var c;(c=r==null?void 0:r.onNextVideoAnnouncementAuto)==null||c.call(r)},en=()=>{var c;(c=r==null?void 0:r.onNextVideoAnnouncementCancel)==null||c.call(r)},Pr=()=>{N.prepare()},Ar=()=>{yr(Ft);let c=_e(Ft.ui.controls.disabledControls$),h=_e(Ft.playerPhase),V={playerPhase:h,isInteractive:w,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(ne({message:"toggle play"}),h==="ads"){V.action="play",X.log("toggle adman play",V),ue.togglePlay();return}let re=()=>{var Xe;ne({message:"toggle play, call player.play"}),V.action="play",N.play(),(Xe=r==null?void 0:r.onPlay)==null||Xe.call(r)},Pe=()=>{var Xe;ne({message:"toggle play, call player.pause"}),V.action="pause",N.pause(),(Xe=r==null?void 0:r.onPause)==null||Xe.call(r)};if(N.info.isEnded$.getValue()){if(ne({message:"toggle play, video ended, seek to 0"}),gi.next(),ui.next(Ws.REWIND),w){R==null||R();return}N.seekTime(0),re()}else N.info.playbackState$.getValue()!==ql.PLAYING?re():Pe();X.log("toggle play",V)},So=(c,{changeReason:h="default",appliesTo:V="to-video",byUser:re=!1}={},Pe)=>{ne({message:`set quality, quality: ${c}`}),X.log("set quality",{quality:c}),re&&bo.next(c),N.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Xe}=fe.features;wu(),c!=="auto"?(Xe?(Su({type:"exact_quality",quality:c,videoId:i},V),N.setPredefinedQualityLimits(Ss.UNKNOWN)):Tf(i,c),Jo.set(c),N.setQuality(c)):Xe&&h==="default"&&(tt("auto_quality",V,Pe),_e(mn)&&dr(!1,void 0,Pe),_e(Lo)&&Wn(!1,void 0,Pe))},dr=(c,h="as-default",V)=>{ne({message:`set trafficSavingEnabled, value: ${c}`}),X.log("set traffic saving enabled",{trafficSavingEnabled:c});let re=c?Ss.TRAFFIC_SAVING:Ss.UNKNOWN;fe.features.qualityDetailsSubMenuEnabled?(ps(re,h,V),Rd(!1)):(N.setPredefinedQualityLimits(re),vo(V)&&Rd(c))},Wn=(c,h="as-default",V)=>{ne({message:`set highQualityEnabled, value: ${c}`}),X.log("set high quality enabled",{highQualityEnabled:c}),ps(c?Ss.HIGH_QUALITY:Ss.UNKNOWN,h,V)},ps=(c,h,V)=>{c!==Ss.UNKNOWN&&(_e(vn)&&!_e(bn)&&So("auto",{appliesTo:h,changeReason:"limit-changed"},V),tt(c,h,V)),N.setPredefinedQualityLimits(c)},tt=(c,h,V)=>{vo(V)&&(Su({type:c,videoId:i},h),h==="as-default"&&Su({type:c,videoId:i},"to-video"))},Nt=(c,h=!0)=>{X.log("set playback rate",{playbackRate:c}),N.setPlaybackRate(c),fe.features.saveRate&&ae&&!N.info.isLive$.getValue()&&h&&u_(c)},Ti=()=>{let c=_e(Xo),h=_e(Li),V=h.findIndex(({selected:Pe})=>Pe);if(V===h.length-1||!c)return h[V];let re=h[V+1];return Nt(re.value),re},tn=()=>{let c=_e(Xo),h=_e(Li),V=h.findIndex(({selected:Pe})=>Pe);if(V===0||!c)return h[V];let re=h[V-1];return Nt(re.value),re},Oo=(c=Jt(Ye({},yo()),{selected:!1}),h)=>{X.log("set subtitles",Ye({},c)),c.value!==On&&We.next(c.isAuto?c.value+"_auto":c.value),eo.next({enabled:c.value!==On,lang:c.language,auto:!!c.isAuto}),Mo.set(c),vo(h)&&(Mf(c.value===On?void 0:c.language),fe.features.userVideoPrefs&&i&&Vf(fe.userSalt,String(i),{subtitleTrackId:c.value===On?void 0:c.value}))},qr=c=>{X.log("toggle subtitles");let h=_e(ao);(h==null?void 0:h.value)===On?cr(c):Gr(c)},on=(c,h)=>{X.log("change subtitle",{enabled:c}),c?cr(!0,h):Gr(!0)},cr=(c,h)=>{if(_e(ut))return;X.log("subtitle on");let V=_e(mi),re=_e(ht),Pe=Fe!=null?Fe:re,Xe;h&&(Xe=V.find(At=>At.value===h)),Xe!=null||(Xe=V.filter(At=>At.value!==On).find(At=>At.language===Pe)),Oo(Xe!=null?Xe:V[1],c)},Gr=c=>{X.log("subtitle off"),Oo(void 0,c)};we.add(N.info.availableTextTracks$.subscribe(c=>{var V;function h(){let re=[];for(let{language:Pe,isAuto:Xe,id:At}of c){let Ot=Pe&&oc(Pe);Pe&&Ot&&re.push({id:At,language:Pe,title:Xe?Ue("subtitles_auto",{language:Ot}):Ot})}return re}(V=r==null?void 0:r.onAvailableSubtitlesChanged)==null||V.call(r,h())}));let Is=se(!0),Gs=c=>{Is.set(c)},Kn=(c,h,V=!0)=>{var re;if(ne({message:`seek to time, time: ${c}`}),X.log("seek to time",{time:c,action:h,forcePrecise:V}),ui.next(h),N.info.isLive$.getValue()){let Pe=N.info.duration$.getValue(),Xe=Math.min(0,Pe+c);N.seekTime(Xe,V)}else{if(T!=null&&T.getValue())return;N.info.isEnded$.getValue()&&(ne({message:"seek after ended, call callbacks.onPlay"}),(re=r==null?void 0:r.onPlay)==null||re.call(r)),N.seekTime(Qv(c),V)}},ba=c=>{ne({message:`seek to episode start time: ${c}`}),X.log("seek to episode start time",{time:c}),Kn(c,Ws.EPISODE,!0)},ft=(c,h,V=!1)=>{ne({message:`seek to percent, percent: ${c}`}),X.log("seek to percent",{percent:c,action:h});let re=_e(Bn)*c;Kn(re,h,V)},li=c=>{ne({message:`seek external, time: ${c}`}),X.log("seek external",{time:c}),ui.next(Ws.UNKNOWN),N.seekTime(N.info.isLive$.getValue()?-c:c)},No=c=>{var re,Pe;let h=(re=c.max)!=null?re:"none",V=(Pe=c.min)!=null?Pe:"none";ne({message:`set auto quality limitation. Max: ${h}. Min: ${V}`}),X.log("set auto quality limits",{max:h,min:V}),N.setAutoQualityLimits(c)},ur=c=>{ne({message:`seek external to episode start time: ${c}`}),X.log("seek external to episode start time",{time:c}),Kn(c,Ws.EPISODE,!0)},kr=c=>{ne({message:`set playback rate to: ${c}`}),X.log("set playback rate external",{playbackRate:c}),N.setPlaybackRate(c)},Bo=se(!1),Ii=se(!1),fs=ci([Bn,ut],([c,h])=>!!f&&c>=fe.suitableDurationForUsingRichSeek&&fe.features.useRichSeek&&!w&&ee!=="preview"&&!h),co=((f==null?void 0:f.frameWidth)||0)>=((f==null?void 0:f.frameHeight)||0),Ki=ci([Dt],([c])=>{let h=Ql(c);return co?!h:h});we.add(qt.subscribe(c=>{c!=="video"&&Bo.set(!1)})),Bo.subscribe(c=>{var h;(h=r==null?void 0:r.onRichSeekActiveChanged)==null||h.call(r,c)});let nn=se(void 0),Qn=se(!1),Yr=c=>{ne({message:`start scrubbing, progress: ${c}`}),X.log("start scrubbing",{progress:c}),Qn.set(!0),ge(c)},ge=c=>{nn.set(c)},Tt,$i,Ri=()=>{nn.set(void 0),Qn.set(!1)},Ho=()=>{clearTimeout($i),clearTimeout(Tt),Tt=window.setTimeout(()=>{Ri()},500),Le==null||Le.removeEventListener("seeked",Ho)},Co=(c,h=!1,V=_2.ActionSeekType.SLIDER)=>{ne({message:`complete scrubbing, progress: ${c}`}),X.log("complete scrubbing",{progress:c}),ft(c,V,h),_e(Ft.ui.isMobile)&&_e(Ft.state.currentFormat$)===sc.HLS?(Le==null||Le.addEventListener("seeked",Ho),$i=window.setTimeout(()=>{Ho()},300)):Ri()},io=ci([Ct,Bn,nn],([c,h,V],re)=>{re(a2(V)?V*h:c)}),rn=se(!1),Es=()=>{rn.set(!0)},Ps=()=>{rn.set(!1)},Ys=ci([Mi],([{width:c}],h)=>{let V=q_(c);h(V)}),jr=W.filter(c=>jh(c)),js=ci([Ys,rt],([c,h])=>h?jr.filter(V=>!V.hideOnMobile):jr.filter(V=>{var re;return!((re=V.hideOnDesktopGridTypes)!=null&&re.includes(c))})),In=se(W.filter(c=>Xh(c))),$a=ci([In,Ys],([c,h])=>c.filter(V=>{var re;return!((re=V.hideOnDesktopGridTypes)!=null&&re.includes(h))})),sl=ci([$a,js],([c,h])=>[...fe.features.additionalButtonsDesktopControlPanelRight?c.filter(V=>V.type==="desktop-control-panel-right"):[],...fe.features.additionalButtons?h.map((V,re)=>{var Pe;return{id:re,weight:re,type:"desktop-control-panel-right",testId:V.testId,icon:V.iconUrl,onClick:V.onClick,ariaLabel:(Pe=V.ariaLabel)!=null?Pe:V.tooltip,tooltipText:V.tooltip}}):[]].filter(V=>!v.disabledAdditionalButtonIds.includes(V.id))),Lr=se(U),ed=ci([Lr],([c])=>fe.features.additionalSettingsMenuItems?c.map(h=>h.type==="SWITCH"?Jt(Ye({},h),{onClick:h.onChangeEnabled}):h):[]),al=(c,h)=>{let V=_e(In).map(re=>re.id!==c?re:Ye(Ye({},re),h));In.set(V)},ll=c=>{let h=_e(In);if(h.some(V=>V.id===c.id)){ne({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),In.set(h)},dl=c=>{let h=_e(In);if(!h.some(V=>V.id===c)){ne({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),In.set(h)},td=c=>{ui.next(Ws.LIVE),ne({message:"live switch to low latency "+c}),X.log("live switch to low latency "+c),N.setLiveLowLatency(c)},ya=(c,h)=>{let V=_e(Lr).map(re=>re.id!==c?re:Ye(Ye({},re),h));Lr.set(V)},cl=c=>{let h=_e(Lr);if(h.some(V=>V.id===c.id)){ne({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),Lr.set(h)},mt=c=>{let h=_e(Lr);if(!h.some(V=>V.id===c)){ne({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),Lr.set(h)},dt=se(z),Di=ci([dt],([c])=>fe.features.additionalContextMenuItems?c:[]),Fo=(c,h)=>{let V=_e(dt).map(re=>re.id!==c?re:Ye(Ye({},re),h));dt.set(V)},Qi=c=>{let h=_e(dt);if(h.some(V=>V.id===c.id)){ne({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),dt.set(h)},_i=c=>{let h=_e(dt);if(!h.some(V=>V.id===c)){ne({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),dt.set(h)},Bi=ci([rt,be],([c,h],V)=>{V(c&&h)}),xa=()=>{ui.next(Ws.LIVE),ne({message:"switch to active live"}),X.log("switch to active live"),N.seekTime(0),N.info.playbackState$.getValue()!==ql.PLAYING&&Ft.actions.internal.togglePlay()},ul=()=>{X.log("skip adman"),ue.skip()},gp=(c=!0)=>{var re;yr(Ft),ne({message:`switch from ads to video, callPlay: ${c}`}),X.log("switch from ads to video",{callPlay:c}),st.set("video"),c&&N.play(),l&&et(!0,!0);let h=(re=_e(Pt))==null?void 0:re.muted,V=!N.info.muted$.getValue();h!==void 0&&!V&&et(h,!0),Pt.set(void 0)},Dc=()=>{yr(Ft),ne({message:"switch from video to ads"}),X.log("switch from video to ads"),Ft.actions.internal.pause(),pn(),st.set("ads")},hp=c=>{yr(Ft);let h=c?"LiveWaitingStart":"thumb";X.log("set live waiting start",{state:c,playerPhase:h}),st.set(h)},Oc=c=>{yr(Ft);let h=c?"LiveWaitingRecover":"thumb";X.log("set live waiting recover",{state:c,playerPhase:h}),st.set(h)},_p=c=>{yr(Ft);let h=c?"LiveWaitingRecord":"thumb";X.log("set live waiting record",{state:c,playerPhase:h}),st.set(h)},Nc=()=>(yr(Ft),X.log("get debug text data"),qh(N,Se,Ft,ve.getTraceId(),Ee)),bp=()=>(yr(Ft),JSON.stringify(ve.getFinishedSpans())),Bc=()=>(yr(Ft),Gh(N,Se,Ft)),pl=()=>Le,Hc=()=>{ne({message:"toggle chromecast"}),X.log("toggle chromecast"),N.toggleChromecast()},Xs=c=>{var V;if(yr(Ft),N.info.isEnded$.getValue())return;let h=!c;if(_e(Ft.playerPhase)==="ads"){ne({message:`pause ads, internalCall: ${h}`}),X.log("pause ads",{internalCall:h}),ue.pause();return}ne({message:`pause video, internalCall: ${h}`}),X.log("pause video",{internalCall:h}),h&&((V=r==null?void 0:r.onPause)==null||V.call(r)),N.pause()},wa=c=>{var V;yr(Ft);let h=!c;if(_e(Ft.playerPhase)==="ads"){ne({message:`play ads, internalCall: ${h}`}),X.log("play ads",{internalCall:h}),ue.play();return}ne({message:`play video, internalCall: ${h}`}),X.log("play video",{internalCall:h}),h&&((V=r==null?void 0:r.onPlay)==null||V.call(r)),N.play()},$p=c=>{yr(Ft);let h=!c;if(_e(Ft.playerPhase)==="ads"){ne({message:"player cannot be stopped during ads via external method"});return}ne({message:`player will be stopped, internalCall: ${h}`}),k==null||k()},id=(c,h)=>{yr(Ft),ne({message:`first start, show ads: ${c}, internalCall: ${!h}`}),X.log("first start",{showAds:c,external:h}),c?st.set("ads"):(st.set("video"),h?N.play():Ft.actions.internal.togglePlay())},od=()=>(ne({message:"getting time codes"}),p),nd=()=>{let c=od();if(!c||[0,1].includes(c.length))return;let h=N.info.position$.getValue();return c.find(V=>V.time>h)},yp=c=>{let h=c;h||(h=nd());let V=N.info.position$.getValue();X.log("seek to next episode",Ye({currentTime:V},h)),h&&(ne({message:"seek to next episode"}),Kn(h.time,Ws.EPISODE,!0))},Fc=()=>{let c=od();if(!c||[0,1].includes(c.length))return;let h=N.info.position$.getValue(),V=c.findIndex(Pe=>Pe.time>h),re=V===-1?c.length-2:V-2;if(!(re<0))return c[re]},xp=c=>{let h=c;h||(h=Fc());let V=N.info.position$.getValue();X.log("seek to prev episode",Ye({currentTime:V},h)),h&&(ne({message:"seek to prev episode"}),Kn(h.time,Ws.EPISODE,!0))},Ge=()=>(ne({message:"getting preview thumbs data"}),X.log("get preview thumbs data",Ye({},f)),f),vi=()=>bt(null,null,function*(){let c=Re==null?void 0:Re.isActive(),h="none";Re!=null&&Re.isActive()?(h="exit",yield Re==null?void 0:Re.exit()):(h="request",yield Re==null?void 0:Re.request()),X.log("toggle picture in picture",{isActive:c,action:h})}),Uo=(c=-90)=>{X.log("rotate video",{alphaDiff:c}),Dt.update(h=>h+c)},En=se([]);I==null||I.subscribe(c=>{let h=[];for(let V=0;V<c.length;V++){let{range:[re,Pe],subjects:Xe}=c[V];V===0&&re!==0&&h.push({time:0,text:"",interactive:!1,completed:!0}),h.push({time:re/1e3,text:"",interactive:!0,completed:fe.features.interactiveTimeOpenUri?!Xe.length||Xe.every(At=>At.isRemoved):!Xe.length}),Pe!==1/0&&h.push({time:Pe/1e3,text:"",interactive:!1,completed:!0})}En.set(h)});let Pn=se(!1);T==null||T.subscribe(c=>{c&&_e(Qn)&&Ri()});let Qv=c=>{if(!w)return c;let h=_e(En),V=_e(Bn),Pe=_e(Fr)/V,Xe=h.find(At=>At.interactive&&!At.completed&&At.time>Pe);return typeof(Xe==null?void 0:Xe.time)=="number"?Math.min(c,Xe.time-.05):c},r$=()=>{Ft.ui.episodes.panelOpened$.set(!1)},s$=()=>{X.log("destroy store"),clearTimeout($i),clearTimeout(Tt),we.unsubscribe(),F.unsubscribe(),N.destroy(),ue.destroy(),de==null||de.destroy(),Ne.unsubscribe(),at==null||at.disconnect(),at=null,Ce.destroy(),ce==null||ce.destroy()},a$=ci([Hn,qt,Xo],([c,h,V])=>v.features.doubleForwardAvailable&&!c&&h==="video"&&V),wp=se(!1),qv=2,Uc=null,Gv=c=>{if(!_e(rr)&&c)return;let h=N.info.currentPlaybackRate$.getValue();c?h!==qv&&(Uc=h,Nt(qv,!1),wp.set(!0)):(Uc&&Nt(Uc,!1),wp.set(!1),Uc=null)};qt.subscribe(c=>{c!=="video"&&Gv(!1)});let l$=()=>{Xs(!1),Bo.set(!0)},d$=()=>{wa(!1),Bo.set(!1)},Sp=!1,c$=()=>{Ii.set(!0),Sp=N.info.playbackState$.getValue()===ql.PLAYING,Xs(!1)},u$=()=>{Ii.set(!1),!_e(Bo)&&Sp&&wa(!1),Sp=!1};N.events.playing$.subscribe(()=>{_e(Bo)&&Xs(!1)});let Ft={interfaceLanguage$:ht,isCyrillicRelatedInterface$:qe,initVideo:di,videoId:i,isClip:o,playerPhase:qt,vsid:Mt,state:{positionExact$:Ct,positionWithScrubbing$:io,duration$:Bn,playbackState$:so,playbackStateRealistic$:Nn,isPlaying$:rr,isLoaderVisible:si,bufferedProgress$:Cn,isLive$:xi,canChangePlaybackSpeed$:Xo,isActiveLive$:Hn,isOldestAvailableLive$:sr,isRewindableLive$:Ur,isEnded$:ki,muted$:$o,volume$:hi,trafficSavingEnabled$:mn,highQualityEnabled$:Lo,autoQualityLimitingAvailable$:vn,availableVideoStreams$:as,availableAudioStreams$:Zo,videoStream$:gt,audioStream$:jt,currentQuality$:Tr,isAutoQualityEnabled$:bn,availableQualities$:yn,currentPlaybackRate$:lr,availablePlaybackRates$:Li,currentSubtitle$:ao,availableTextTracks$:xn,availableSubtitlesList$:mi,currentSubtitleCaptions$:Sn,isAutoSubtitleCaptionVisible$:wo,chromecastState$:ss,chromecastDeviceName$:xr,chromecastConnected$:Ci,currentFormat$:gn,throughputEstimation$:hn,videoBitrate$:or,videoSize$:wr,errorLog$:G,crashed$:be,isAudioAvailable$:Br,isAudioDisabled:!!l,canDownload:fe.features.download&&!!d,availableSources$:Wi,hasMpegSources$:Ir,isInteractive:w,showInteractiveGraph:fe.features.interactiveGraph,showSeekToInteractive:fe.features.seekToInteractive,showPlayPrevChapter:fe.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:fe.features.interactiveTimeIndicator&&!!_e(En).length,interactiveEpisodes$:En,isInteractiveTime$:T?ti(T):se(!1),isInteractiveExpectation$:Pn,hasInteractiveBranches:P,playPrevChapterDisabledTooltip:E,looped$:_t,loadedMetadata$:Qt,isAutoQualityAvailable$:$n,previewTrackActive:Bo,previewTrackDragInProgress:Ii},ui:{t:Ue,isMinimalView$:ut,controlsVisible:se(!1),touched:se(!1),controls:{prevButton:se(void 0),playButton:se(void 0),replayButton:se(void 0),nextButton:se(void 0),playPrevChapterButton:se(void 0),seekToInteractiveButton:se(void 0),interactiveGraphButton:se(void 0),liveButton:se(void 0),time:se(void 0),episodes:se(void 0),volume:se(void 0),subtitles:se(void 0),settings:se(void 0),context:se(void 0),chromecast:se(void 0),pip:se(void 0),"theater-mode-button":se(void 0),fullscreen:se(void 0),vkLogo:se(void 0),interactiveTimeIndicator:se(void 0),timeline:se(void 0),autoplayNextToggle:se(void 0),additionalButtons:W.length?W.reduce(c=>[...c,se(void 0)],[]):[],disabledControls$:bi},modals:{hotKeyMap:{show:se(!1),data:se({title:"",closeBtnText:"",groups:[]})}},isFullscreen:lt,isFullscreenOpenedByKeyboard:ni,rotateAlpha:Dt,isAutoplay:se(!1),debugPanelVisible:se(!1),episodes:{panelOpened$:se(!1),openedByKeyboard$:se(!1)},contextMenu:{visible$:se(!1),btnRef$:se(void 0),openedByBtnKeyboard$:se(!1),openedByHotKey$:se(!1),lastActiveElem$:se(void 0),showContextMenuBtn$:se(!1),position$:se({top:0,left:0})},playerSize:Mi,isMobile:rt,mobileNotReportControlHidden$:Bi,icon3DVideoVisible:se(!1),scrubbingInProgress:Qn,volumeChangingInProgress:rn,is3DVideo:Te,currentGridType$:Ys,additionalButtonsDeprecated$:js,additionalDesktopControlPanelRightButtons$:sl,additionalSettingsMenuItems$:ed,additionalContextMenuItems$:Di,interactiveHideMobileControls:se(!1),overlayContainer$:se(void 0),startedByKeyboard$:se(!1),autoplayNextEnabled$:se(!1),timerNextVideoRunning$:se(!0),settingsMenu:{visible$:se(!1),ref$:se(void 0),openedByBtnKeyboard$:se(!1)},settingsSubMenu:{visible$:se(!1),ref$:se(void 0),name$:se(void 0)},userActionsDisabled:se(!1),hiddenControls:{volume:se(!1),vkLogo:se(!1),pip:se(!1),chromecast:se(!1),settings:se(!1)},isControlsAvailable:Is,controlBlocks:{topLeft:se(void 0),topRight:se(void 0),middle:se(void 0),bottom:se(void 0),bottomLeft:se(void 0),bottomRight:se(void 0)},videoTitleInfo:se(void 0),doubleForwardOn$:wp,doubleForwardAvailable$:a$,previewTrackActive:Bo,previewTrackDragInProgress:Ii,previewTrackAvailable:fs,isPreviewTrackHorizontallyAligned:Ki},ads:{position:se(0),duration:se(0),playbackState:se("inactive"),canSkip:se(!1),secondsToWatchBeforeSkip:se(0),postrollPassed:se(!1)},webApi:{pictureInPictureApi:Re,annotationsApi:Je,slotsApi:ke,focusManager:j},actions:{internal:{preload:Pr,firstStart:c=>id(c,!1),play:()=>wa(!1),pause:()=>Xs(!1),togglePlay:Ar,toggleMuted:ls,openSettingsMenu:cs,closeSettingsMenu:ds,openSettingsSubMenu:us,closeSettingsSubMenu:to,setVolume:c=>Er(c,!1),setMuted:c=>et(c,!1),startVolumeChanging:Es,stopVolumeChanging:Ps,setVideoStream:ar,setAudioStream:c=>Fn(c,!1),setQuality:(c,h)=>So(c,h,!1),setTrafficSavingEnabled:(c,h)=>dr(c,h,!1),setHighQualityEnabled:(c,h)=>Wn(c,h,!1),setPlaybackRate:Nt,incrementPlaybackRate:Ti,decrementPlaybackRate:tn,setSubtitle:c=>Oo(c,!1),toggleSubtitle:()=>qr(!1),togglePictureInPicture:vi,startScrubbing:Yr,progressScrubbing:ge,completeScrubbing:Co,toggleChromecast:Hc,switchToActiveLive:xa,switchFromAdsToVideo:gp,switchFromVideoToAds:Dc,skipAd:ul,setLiveWaitingStart:hp,setLiveWaitingRecover:Oc,setLiveWaitingRecord:_p,getDebugTextData:Nc,getTraceTextData:bp,getDebugPanelData:Bc,getVideoElement:pl,seekTime:(c,h,V)=>Kn(c,h,V),clearDelayedBufferingCheckTimeout:Hr,seekEpisodeStartTime:ba,seekToPercent:ft,getNextEpisode:nd,seekToNextEpisode:yp,getPrevEpisode:Fc,seekToPrevEpisode:xp,startLogging:ot,stopLogging:Ut,startCameraManualRotation:pi,stopCameraManualRotation:ct,moveCameraFocusPX:ai,holdCamera:fi,releaseCamera:Gt,getVideoEpisodes:od,getPreviewThumbsData:Ge,downloadVideo:Un,addLanguage:Rf,setLanguage:Ie,nextMovie:It,videoRotate:Uo,correctSeekTimeToInteractive:Qv,replayInteractive:R,setLooped:Zt,reportProblem:Vi,setAutoplayNextEnabled:lo,setTimerNextVideoRunning:Ni,prevVideoClick:go,nextVideoClick:Do,nextVideoAnnouncementShow:Tn,nextVideoAnnouncementClick:zn,nextVideoAnnouncementAuto:ho,nextVideoAnnouncementCancel:en,checkFullscreenSupport:wt,changeDoubleForwardOn:Gv,closePreviewTrack:d$,previewTrackOpened:l$,previewTrackDragStarted:c$,previewTrackDragFinished:u$},external:{firstStart:c=>id(c,!0),play:()=>wa(!0),pause:()=>Xs(!0),stop:()=>$p(!0),seekTime:c=>li(c),seekEpisodeStartTime:c=>ur(c),setPlaybackRate:c=>kr(c),setAutoQualityLimits:c=>No(c),setMuted:c=>et(c,!0),toggleSubtitle:()=>qr(!0),changeSubtitle:on,setVolume:c=>Er(c,!0),returnFocusToEpisodes:r$,updateAdditionalSettingsItem:ya,addAdditionalSettingsItem:cl,removeAdditionalSettingsItem:mt,updateAdditionalContextItem:Fo,addAdditionalContextItem:Qi,removeAdditionalContextItem:_i,updateAdditionalButton:al,addAdditionalButton:ll,removeAdditionalButton:dl,setLiveLowLatency:td,hideControls:()=>Gs(!1),showControls:()=>Gs(!0),setQuality:c=>So(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>dr(c,"to-video",!0),setHighQualityEnabled:c=>Wn(c,"to-video",!0),changeAudioStream:Sr,setMinimalView:Oe}},callbacks:r,setUiCallbacks:c=>{ze=Ye({},c)},getAdmanWrapper:()=>ue,getLogger:()=>me,getPlayer:()=>N,destroy:s$};return Ft};function er(t,e,i,o){var p;let s=(p=e[i])==null?void 0:p.getBoundingClientRect(),a=o&&!!s&&!!(s.right-s.left),{top:l,left:d,bottom:r,right:u}=zs(e[i],t||void 0);return{left:a?d:0,right:a?u:0,top:a?l:0,bottom:a?r:0,isDisplayed:a}}var b2=["disabledControls$","additionalButtons"],$2=["interactiveTimeIndicator"],Yl=(t,e,i,o)=>{if(t){for(let[s,a]of Object.entries(e))if(!b2.includes(s)){let l=o||$2.includes(s);a.set(er(t,i,s,l))}}};var Xu=(t,e,i)=>bt(null,null,function*(){yield mo(),e&&i&&(i.focus(),t.set(!1))});var y2=Ae('<path d="M18 10c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2Zm-6 4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Zm-6 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Z"></path>');function km(t){je(t,{children:(e,i)=>{var o=y2();$(e,o)},$$slots:{default:!0}})}function Lm(t,e){B(e,!0);let[i,o]=Be(),s=()=>x(r,"$contextMenuVisible$",i),a=g(e,"disabled",3,!1),l=g(e,"ariaLabel",3,""),d=xe(),r=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,p=d.ui.contextMenu.showContextMenuBtn$,f=d.ui.contextMenu.position$,v=d.ui.contextMenu.btnRef$,b=K(void 0);He(()=>{n(b)&&Et(()=>{v.set(n(b))})});let y=T=>{let R=pa(T),k=H_(n(b));f.set(k),u.set(R),r.set(!s())},_=()=>{p.set(!0)},w=()=>{p.set(!1)},I=m(()=>s()?"opened":"");Ht(t,{get className(){return n(I)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:_,blur:w,get ariaExpanded(){return s()},get ref(){return n(b)},set ref(T){D(b,T,!0)},children:(T,R)=>{km(T,{})},$$slots:{default:!0}}),H(),o()}var x2=t=>{t.stopPropagation()},w2=L("<div><!> <div></div> <div></div></div>"),S2={hash:"s-26",code:'.interactive-episode-icon-animated.s-26{height:32px;opacity:1;position:absolute;right:16px;top:16px;transition:.3s;width:32px}.interactive-episode-icon-animated.icon-small.s-26{height:28px;width:28px}.invisible.s-26{opacity:0;visibility:hidden}.fullscreen.s-26:not(.mobile){height:40px;right:23px;top:19px;width:40px}.mobile.s-26{height:28px;right:14px;top:12px;width:28px}.fullscreen.mobile.s-26{height:32px;width:32px}@media screen and (orientation:portrait){.interactive-episode-icon-animated.mobile.fullscreen.s-26{right:16px;top:40px}}@keyframes s-26-pulse{0%{border-width:1px;opacity:0;transform:scale(1)}10%{opacity:1}50%{border-width:1px;opacity:.5;transform:scale(1.5)}to{border-width:.5px;opacity:0;transform:scale(1.5)}}.pulse.s-26{animation:s-26-pulse 1s infinite;border:1px solid #fff;border-radius:100%;bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;transform:scale(1.8);transition:.3s}.pulse.paused.s-26{animation-play-state:paused}.interactive-episode-icon-animated svg{height:100%;width:100%}.ref-block.s-26{height:100%;position:absolute;top:0;visibility:hidden;width:100%}.hidden.s-26{display:none}'};function lc(t,e){var me;B(e,!0),Q(t,S2);let[i,o]=Be(),s=()=>x(w,"$isMobile",i),a=()=>x(k,"$areControlsVisible",i),l=()=>x(E,"$currentGridType$",i),d=()=>x(T,"$isInteractiveTime$",i),r=()=>x(_,"$interactiveControlsOpacity$",i),u=()=>x(R,"$showInteractiveTimeIndicatorTooltip$",i),p=()=>x(I,"$isFullscreen",i),f=g(e,"ref",15,void 0),v=K(void 0),b=xe(),y=_o(),{interactiveControlsOpacity$:_}=y,w=b.ui.isMobile,I=b.ui.isFullscreen,T=b.state.isInteractiveTime$,R=y.showInteractiveTimeIndicatorTooltip$,k=b.ui.controlsVisible,P=(me=b.callbacks)==null?void 0:me.onInteractiveTimeIndicatorClick,E=b.ui.currentGridType$,W=m(()=>!s()&&a()),U=m(()=>Fs(l(),"s")),z=m(()=>!d()||!!r()||n(W)),Y=K(!1);He(()=>{D(Y,n(z),!0)});let ie=()=>{D(Y,!0)},J=()=>{var ue;oe(),(ue=n(v))==null||ue.addEventListener("animationiteration",ie,{once:!0})},oe=()=>{var ue;D(Y,!1),(ue=n(v))==null||ue.removeEventListener("animationiteration",ie)},de=ue=>{R.set(ue)},ae=m(()=>u()&&!n(z));He(()=>{u()?J():oe()});let pe=()=>{n(z)||(R.set(!0),P==null||P())};ln(()=>{R.clearTimeout(),oe()});let ee=()=>{R.set(!1)},$e=q("tooltip_interactive_interaction_time_indicator");var Ee=w2();let ce;Ee.__mousemove=[x2],Ee.__click=pe;var Qe=C(Ee);Po(Qe,{get tooltipContent(){return $e},get tooltipVisible(){return n(ae)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:de,get ref(){return f()},set ref(ue){f(ue)},children:(ue,Re)=>{Xd(ue,{completed:!0})},$$slots:{default:!0}});var fe=A(Qe,2);let ve;it(fe,ue=>f(ue),()=>f());var X=A(fe,2);let N;it(X,ue=>D(v,ue),()=>n(v)),S(Ee),O((ue,Re,Je)=>{ce=te(Ee,1,"interactive-episode-icon-animated s-26",null,ce,ue),ve=te(fe,1,"ref-block s-26",null,ve,Re),N=te(X,1,"pulse s-26",null,N,Je)},[()=>({mobile:s(),fullscreen:p(),invisible:n(z),"icon-small":n(U)}),()=>({hidden:n(z)}),()=>({paused:n(Y)})]),vt("mouseleave",Ee,ee),$(t,Ee),H(),o()}Ze(["mousemove","click"]);function Zu(t,e){B(e,!0);let i=g(e,"tooltipEnabled",3,!0),o=g(e,"disabled",3,!1),s=g(e,"className",3,void 0),a=g(e,"ref",15),l=g(e,"tooltipVisible",3,!1);Po(t,{get disabled(){return o()},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},get hasTooltip(){return i()},get mouseEnter(){return e.mouseEnter},get mouseLeave(){return e.mouseLeave},get tooltipVisible(){return l()},get className(){return s()},get ref(){return a()},set ref(d){a(d)},children:(d,r)=>{var u=Ve();let p=m(()=>e.buttonComponent);var f=le(u);Ui(f,()=>n(p),(v,b)=>{b(v,os(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),$(d,u)},$$slots:{default:!0}}),H()}var Ks={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var T2=Ae('<path d="M32 21.68V15a2 2 90 114 0v18a2 2 90 01-4 0v-6.66l-16.3 9.32A2.48 2.48 90 0112 33.56V14.46c0-1.9 2.06-3.08 3.7-2.12z"></path>');function ha(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=m(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),s=m(()=>`${dn(e.size)}${n(o)}`),a=m(()=>i()?"prev-icon":"next-icon");je(t,{get width(){return"48"},get height(){return"48"},get style(){return n(s)},get testId(){return n(a)},get shadow(){return e.shadow},children:(l,d)=>{var r=T2();$(l,r)},$$slots:{default:!0}}),H()}var I2=L('<div class="icon-background-mobile s-20"><!></div>'),E2={hash:"s-20",code:".icon-background-mobile.s-20{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:100%;justify-content:space-around;left:0;position:absolute;top:0;width:100%}"};function Ga(t,e){B(e,!0),Q(t,E2);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),s=g(e,"disabled",3,!1),l=xe().ui.t,d=m(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),r=m(()=>e.type==="prev"?l("hotkey_map_item_prev_video_value"):l("hotkey_map_item_next_video_value")),u=m(()=>`btn-${o()?"m":"d"}--${e.type}`);Ht(t,{get className(){return n(u)},get testId(){var p;return`btn-${(p=e.type)!=null?p:""}`},get disabled(){return s()},get ariaLabel(){return n(d)},get click(){return e.click},get ariaKeyShortCut(){return n(r)},get ref(){return i()},set ref(p){i(p)},children:(p,f)=>{var v=Ve(),b=le(v);{var y=w=>{var I=I2(),T=C(I);let R=m(()=>e.type==="prev");ha(T,{get size(){return"32"},get reversed(){return n(R)}}),S(I),$(w,I)},_=w=>{let I=m(()=>e.type==="prev");ha(w,{get size(){return"24"},get reversed(){return n(I)}})};M(b,w=>{o()?w(y):w(_,!1)})}$(p,v)},$$slots:{default:!0}}),H()}var P2=Ae('<path d="M24 21.2a.8.8 90 01-1.34.6L14.08 14a1.34 1.34 90 010-2l8.6-7.8a.8.8 90 011.32.6V11a16 16 90 11-16 16 2 2 90 114 0 12 12 90 1012-12z"></path>');function dc(t,e){B(e,!0);let i=m(()=>dn(e.size));je(t,{get width(){return"48"},get height(){return"48"},get style(){return n(i)},testId:"replay-icon",get shadow(){return e.shadow},children:(o,s)=>{var a=P2();$(o,a)},$$slots:{default:!0}}),H()}import{noop as A2}from"@vkontakte/videoplayer-shared/es2015";var k2=L('<div class="icon-background-mobile s-25"></div>'),L2=L("<!> <div><!></div>",1),M2={hash:"s-25",code:".mobile.s-25{align-items:center;display:flex;justify-content:center;position:relative}.icon-background-mobile.s-25{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);height:calc(100% - 32px);left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function jl(t,e){B(e,!0),Q(t,M2);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),s=g(e,"disabled",3,!1),a=g(e,"className",3,""),l=g(e,"click",3,A2),d=q("tooltip_restart"),r=m(()=>`${o()?"btn-m--play":""} ${a()}`);Ht(t,{get className(){return n(r)},testId:"replay-btn",get ariaLabel(){return d},get disabled(){return s()},get click(){return l()},get ariaKeyShortCut(){return $s.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,p)=>{var f=L2(),v=le(f);{var b=T=>{var R=k2();$(T,R)};M(v,T=>{o()&&T(b)})}var y=A(v,2);let _;var w=C(y);let I=m(()=>o()?"48":"24");dc(w,{get size(){return n(I)}}),S(y),O(T=>_=te(y,1,"s-25",null,_,T),[()=>({mobile:o()})]),$(u,f)},$$slots:{default:!0}}),H()}var V2=Ae('<path d="m17.4 10 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h3.801zm16 0 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h4z"></path>');function Qs(t,e){B(e,!0);let i=m(()=>dn(e.size));je(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"pause-icon",get shadow(){return e.shadow},children:(o,s)=>{var a=V2();$(o,a)},$$slots:{default:!0}}),H()}import{noop as R2}from"@vkontakte/videoplayer-shared/es2015";var D2=L('<div class="icon-background-mobile s-22"><!></div>'),O2={hash:"s-22",code:".icon-background-mobile.s-22{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:calc(100% - 32px);justify-content:space-around;left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function Xl(t,e){B(e,!0),Q(t,O2);let[i,o]=Be(),s=()=>x(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=_o(),l=g(e,"ref",15,void 0),d=g(e,"isMobile",3,!1),r=g(e,"isPlaying",3,!1),u=g(e,"disabled",3,!1),p=g(e,"className",3,""),f=g(e,"click",3,R2),b=xe().ui.t,{toggle:y}=a,_=m(()=>y),w=m(()=>s()!==null),I=m(()=>n(w)?s():r()),T=m(()=>n(I)?b("tooltip_pause"):b("tooltip_play")),R=m(()=>n(I)?Qs:Dn),k=m(()=>`${d()?"btn-m--play":""} ${p()}`),P=m(()=>n(w)?n(_):f());Ht(t,{get className(){return n(k)},testId:"play-btn",get click(){return n(P)},get disabled(){return u()},get ariaLabel(){return n(T)},get ariaKeyShortCut(){return $s.KeyK},get ref(){return l()},set ref(E){l(E)},children:(E,W)=>{var U=Ve();let z=m(()=>n(R));var Y=le(U);{var ie=oe=>{var de=D2(),ae=C(de);Ui(ae,()=>n(z),(pe,ee)=>{ee(pe,{get size(){return"48"}})}),S(de),$(oe,de)},J=oe=>{var de=Ve(),ae=le(de);Ui(ae,()=>n(z),(pe,ee)=>{ee(pe,{get size(){return"24"}})}),$(oe,de)};M(Y,oe=>{d()?oe(ie):oe(J,!1)})}$(E,U)},$$slots:{default:!0}}),H(),o()}var N2=Ae('<path d="M12.58 12.92v2.5a1 1 0 0 1-1.52.85l-5.58-3.42a1 1 0 0 1 0-1.7l5.58-3.42a1 1 0 0 1 1.52.86v2.5l5.48-3.36a1 1 0 0 1 1.52.86v6.82a1 1 0 0 1-1.52.86z"></path>');function Mm(t){je(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=N2();$(e,o)},$$slots:{default:!0}})}function cc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),s=g(e,"disabled",3,!1),a=q("tooltip_interactive_go_back"),l=m(()=>o()?"hidden":"");Ht(t,{get className(){return n(l)},testId:"play-prev-chapter-btn",get ariaLabel(){return a},get disabled(){return s()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,r)=>{Mm(d,{})},$$slots:{default:!0}}),H()}var B2=L('<span class="gutter s-24"><span><!></span></span>'),H2={hash:"s-24",code:".gutter.s-24{--gutterWidth:32px;--gutterHeight:12px;--togglerWidth:18px;--togglerHeight:18px;--togglerGap:calc(var(--togglerWidth)/6);background-color:hsla(0,0%,100%,.3);border-radius:50px;height:var(--gutterHeight);position:relative;width:var(--gutterWidth)}.toggler.s-24{align-items:center;background-color:#626364;border-radius:50%;display:flex;height:var(--togglerHeight);justify-content:center;left:0;position:absolute;top:calc((var(--togglerHeight) - var(--gutterHeight))/2*-1);transform:translateX(calc(var(--togglerGap)*-1));transition-duration:.2s;transition-property:background-color,transform;transition-timing-function:ease;width:var(--togglerWidth)}.toggler.enabled.s-24{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function uc(t,e){B(e,!0),Q(t,H2);let[i,o]=Be(),s=()=>x(r,"$autoplayNextEnabled$",i),a=g(e,"ref",15,void 0),l=xe(),d=l.ui.t,r=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,p=()=>{u(!s(),!0)},f=d("aria_label_autoplay"),v="12",b="#000",y=m(()=>s()?"true":"false");Ht(t,{click:p,get ariaLabel(){return f},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref(_){a(_)},children:(_,w)=>{var I=B2(),T=C(I);let R;var k=C(T);{var P=W=>{Dn(W,{get size(){return v},fill:b})},E=W=>{Qs(W,{get size(){return v},fill:b})};M(k,W=>{s()?W(P):W(E,!1)})}S(T),S(I),O(W=>R=te(T,1,"toggler s-24",null,R,W),[()=>({enabled:s()})]),$(_,I)},$$slots:{default:!0}}),H(),o()}var F2=Ae('<path d="M16.73 4.85c-.54-.05-1.23-.05-2.23-.05H7.9a.9.9 0 1 1 0-1.8h6.64q1.41-.01 2.33.05c.64.05 1.2.16 1.73.43a4.4 4.4 0 0 1 1.92 1.92c.27.52.38 1.09.43 1.73q.06.92.05 2.33v5.08q.01 1.41-.05 2.33a5 5 0 0 1-.43 1.73 4.4 4.4 0 0 1-1.92 1.92 5 5 0 0 1-1.73.43q-.92.06-2.33.05H7.9a.9.9 0 1 1 0-1.8h6.6c1 0 1.69 0 2.23-.04.52-.05.82-.13 1.05-.24a2.6 2.6 0 0 0 1.14-1.14c.11-.23.2-.53.24-1.06s.04-1.23.04-2.22v-5c0-1 0-1.69-.04-2.23a3 3 0 0 0-.24-1.05 2.6 2.6 0 0 0-1.14-1.14c-.23-.11-.53-.2-1.05-.24"></path><path d="M7.76 11.17V8.9c0-.71.7-1.15 1.25-.78l4.6 3.1a.96.96 0 0 1 0 1.54L9 15.87c-.55.37-1.25-.07-1.25-.78v-2.26l-4.5 3.04C2.7 16.24 2 15.8 2 15.09V8.91c0-.71.7-1.15 1.25-.78z "></path>',1);function Vm(t){je(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=F2();Xt(),$(e,o)},$$slots:{default:!0}})}function pc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),s=g(e,"disabled",3,!1),a=q("tooltip_interactive_seek"),l=m(()=>o()?"hidden":"");Ht(t,{get className(){return n(l)},testId:"btn-seek-to-interactive",get ariaLabel(){return a},get disabled(){return s()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,r)=>{Vm(d,{})},$$slots:{default:!0}}),H()}var U2=Ae('<path d="M15.2 5.9v1.2c0 .6 0 .9.12 1.12q.15.3.46.46c.23.12.52.12 1.12.12h1.2c.6 0 .9 0 1.12-.12q.3-.15.46-.46c.12-.23.12-.52.12-1.12V5.9c0-.6 0-.9-.12-1.12a1 1 0 0 0-.46-.46c-.23-.12-.52-.12-1.12-.12h-1.2c-.6 0-.9 0-1.12.12q-.3.15-.47.46c-.11.23-.11.53-.11 1.12m-.05 11.03v1.14c0 .6 0 .91.12 1.14q.15.31.47.47c.23.12.53.12 1.14.12h1.22c.6 0 .9 0 1.14-.12a1 1 0 0 0 .47-.47c.12-.23.12-.53.12-1.14v-1.14c0-.6 0-.9-.12-1.14a1 1 0 0 0-.47-.47c-.23-.12-.54-.12-1.14-.12h-1.22c-.6 0-.91 0-1.14.12a1 1 0 0 0-.47.47c-.12.23-.12.53-.12 1.14"></path>'),z2=Ae('<path d="M16.78 3h1.42q.47 0 .83.02.4.02.82.21.61.31.92.92.2.41.21.81.03.36.02.83v1.4q0 .47-.02.83-.02.4-.21.81a2 2 0 0 1-.92.92 2 2 0 0 1-.82.21q-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.2 2 2 0 0 1-.93-.93 2 2 0 0 1-.2-.8l-.03-.64h-2.2c-.49 0-.8 0-1.04.02a1 1 0 0 0-.35.06 1 1 0 0 0-.35.35 1 1 0 0 0-.07.35c-.02.24-.02.55-.02 1.04v5.57c0 .5 0 .8.02 1.04s.05.31.07.34q.12.23.35.35c.03.02.11.05.34.07s.56.02 1.05.02h2.2q0-.34.02-.62.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02h1.42q.47 0 .83.02.4.01.82.2.61.31.92.93.2.41.21.8.03.37.02.84v1.4q0 .47-.02.83-.02.39-.21.81a2 2 0 0 1-.92.92q-.43.2-.82.21-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.21 2 2 0 0 1-.93-.92 2 2 0 0 1-.2-.81l-.03-.63h-2.24q-.68 0-1.16-.03a3 3 0 0 1-1.01-.26 2.6 2.6 0 0 1-1.14-1.14 3 3 0 0 1-.26-1q-.04-.5-.03-1.16v-1.93H2.9A.9.9 0 0 1 2 12c0-.5.4-.9.9-.9h5.23V9.18q0-.68.03-1.16.02-.51.26-1.02a2.6 2.6 0 0 1 1.14-1.13q.5-.24 1.02-.26.48-.04 1.16-.02h2.23q0-.34.02-.63.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02m-.84 1.84.15-.02c.16-.02.37-.02.72-.02h1.35c.36 0 .57 0 .72.02l.15.02a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.13l-.15.02-.72.01h-1.35l-.72-.01-.15-.03a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71V5.82q0-.5.02-.71l.02-.15a.3.3 0 0 1 .12-.12m0 11.02.15-.03.72-.01h1.35l.72.01.15.03a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.12l-.15.02c-.15.02-.36.02-.72.02h-1.35c-.35 0-.56 0-.72-.02l-.15-.02a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71v-1.34c0-.35 0-.56.02-.71l.02-.15a.3.3 0 0 1 .12-.13"></path><!>',1);function Rm(t,e){let i=g(e,"isOpened",3,!1),o=m(()=>i()?"graph-close-icon":"graph-open-icon");je(t,{get testId(){return n(o)},children:(s,a)=>{var l=z2(),d=A(le(l));{var r=u=>{var p=U2();$(u,p)};M(d,u=>{i()&&u(r)})}$(s,l)},$$slots:{default:!0}})}function fc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),s=g(e,"disabled",3,!1),a=g(e,"graphIsOpened",3,!1),d=xe().ui.t,r=m(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=m(()=>o()?"hidden":"");Ht(t,{get className(){return n(u)},testId:"btn-graph",get disabled(){return s()},get ariaLabel(){return n(r)},get click(){return e.click},get ref(){return i()},set ref(p){i(p)},children:(p,f)=>{let v=m(()=>!!a());Rm(p,{get isOpened(){return n(v)}})},$$slots:{default:!0}}),H()}import{PlaybackState as fb}from"@vkontakte/videoplayer-core/es2015";function mc(t,e){B(e,!0);let[i,o]=Be(),s=()=>x(u,"$playbackState$",i),a=g(e,"isMobile",3,!1),l=g(e,"isLiveActive",3,!1),d=g(e,"ariaLabel",3,""),r=xe(),u=r.state.playbackState$,p=r.actions.internal.switchToActiveLive,f=r.actions.internal.togglePlay,v=m(()=>()=>{if(!l()){p();return}s()===fb.PAUSED&&f()}),b=m(()=>a()?"":"btn--live btn-full-opacity"),y=m(()=>l()?"btn-live":"btn-live-offset"),_=m(()=>l()&&s()===fb.PLAYING);Ht(t,{get className(){return n(b)},get testId(){return n(y)},get disabled(){return n(_)},get ariaLabel(){return d()},get click(){return n(v)},children:(w,I)=>{Bd(w,{get isActive(){return l()}})},$$slots:{default:!0}}),H(),o()}import{noop as mb}from"@vkontakte/videoplayer-shared/es2015";var W2=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),K2=L('<img class="icon" aria-hidden="true"/>');function Ya(t,e){"use strict";let i=K(!1),o=()=>{D(i,!0)};var s=Ve(),a=le(s);{var l=r=>{var u=W2();$(r,u)},d=r=>{var u=K2();O(()=>De(u,"src",e.icon)),vt("error",u,o),Ra(u),$(r,u)};M(a,r=>{n(i)?r(l):r(d,!1)})}$(t,s)}function Dm(t,e){B(e,!0);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,mb),s=g(e,"ref",15),a=m(()=>o()===mb),l=m(()=>n(a)||i()),d=m(()=>n(a)?"btn-full-opacity":"");Po(t,{get disabled(){return n(l)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get tooltipVisible(){return e.tooltipVisible},get ref(){return s()},set ref(r){s(r)},children:(r,u)=>{let p=m(()=>{var f;return(f=e.testId)!=null?f:e.id});Ht(r,{get className(){return n(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(l)},get testId(){return n(p)},children:(f,v)=>{Ya(f,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),H()}var vb=t=>!!t.buttonComponent;var qs={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var Ju=(t,e,i,o)=>{if(t)for(let[s,a]of Object.entries(e))a.set(er(t,i,s,o))};import{interpolate as Om}from"@vkontakte/videoplayer-shared/es2015";var gb=10,hb=40,Nm=.2,q2=.5,G2=65,Y2=114,j2=4,_b=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=m(()=>i?G2:Y2),s=K(!1),a=K(0),l=K(0),d=m(()=>n(o)+gb-hb-j2),r=m(()=>Om(n(a),[Nm,1],[0,-n(d)])),u=m(()=>Om(n(a),[Nm,1],[0,hb])),p=m(()=>Om(n(a),[Nm,1],[0,n(o)+gb]));return{progressBarY:()=>n(r),controlsY:()=>n(u),calculatedHeight:()=>n(p),onPointerDown:_=>{var w;D(l,((w=e())==null?void 0:w.getBoundingClientRect().bottom)||0,!0),D(s,!0)},onPointerMove:_=>{if(!n(s))return;let w=Math.max(Math.min(_.clientY-n(l),0),-n(d));D(a,Math.abs(w/n(d)),!0)},onPointerUp:()=>{D(s,!1),D(a,n(a)>=q2?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{D(a,0)}}};var X2=t=>t;function _a(t,{delay:e=0,duration:i=400,easing:o=X2}={}){let s=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*s}`}}var Z2=L('<span class="root s-2c"> </span>'),J2={hash:"s-2c",code:".root.s-2c{box-shadow:0 8px 24px 0 rgba(0,0,0,.08);box-shadow:0 0 2px 0 rgba(0,0,0,.08);color:#fff;font-size:13px;font-weight:500;line-height:16px}"};function Bm(t,e){Q(t,J2);var i=Z2(),o=C(i,!0);S(i),O(()=>he(o,e.time)),$(t,i)}var ew=L('<div class="tooltip-wrapper s-v"><div><!></div></div>'),tw={hash:"s-v",code:'.tooltip-wrapper.s-v{display:block;position:relative}.tooltip.s-v{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-v:after{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;left:50%;line-height:0;position:absolute;transform:translate(-50%,5px);width:0}.tooltip.active.s-v{opacity:1;visibility:visible}'};function Hm(t,e){Q(t,tw);let i=g(e,"active",3,!1),o=g(e,"pointer",3,!1),s=g(e,"translateXPx",3,0),a=g(e,"translateYPx",3,0),l=g(e,"leftOffset",3,0),d=g(e,"rightOffset",3,0),r=K(void 0),u=K(void 0);function p(w){if(!n(u))return 0;let{width:I}=n(u).getBoundingClientRect(),T=I/2;return w<T?T+l():w>e.containerWidth-T?e.containerWidth-T-d():w}let f=m(()=>p(s()));var v=ew(),b=C(v);let y;var _=C(b);ei(_,()=>{var w;return(w=e.children)!=null?w:$t}),S(b),it(b,w=>D(u,w),()=>n(u)),S(v),it(v,w=>D(r,w),()=>n(r)),O(w=>{Ke(v,`transform: translate(${n(f)}px, ${a()}px);`),y=te(b,1,"tooltip s-v",null,y,w),Ke(b,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),$(t,v)}var bb=t=>Math.abs(t)/90%4===1;var iw=Ae('<path xmlns="http://www.w3.org/2000/svg" d="M15.782 10.152a.75.75 0 0 1-1.06 0L9.999 5.438l-4.72 4.716a.75.75 0 0 1-1.061-1.061l5.251-5.246a.75.75 0 0 1 1.06 0l5.253 5.246a.75.75 0 0 1 0 1.06Z"></path><path xmlns="http://www.w3.org/2000/svg" d="M15.782 16.152a.75.75 0 0 1-1.06 0l-4.723-4.715-4.72 4.716a.75.75 0 0 1-1.061-1.061l5.251-5.246a.75.75 0 0 1 1.06 0l5.253 5.245a.75.75 0 0 1 0 1.061Z"></path>',1);function Fm(t){je(t,{height:"20",width:"20",shadow:!0,children:(e,i)=>{var o=iw();Xt(),$(e,o)},$$slots:{default:!0}})}var ow=L('<div class="rich-seek-hint s-u"><span class="icon_wrapper s-u"><!></span> <span class="rich-seek-hint-text s-u"> </span></div>'),nw=L('<div class="preview s-u"><!></div>'),rw=L('<div class="episode s-u"><!></div>'),sw=L('<div class="time s-u"> </div>'),aw=L("<div><!> <!> <!></div>"),lw={hash:"s-u",code:".timeline-preview.s-u{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-u{bottom:72px}.preview.s-u{background-color:var(--timeline-preview-bg);border:1px solid var(--white);border-radius:8px;box-shadow:0 0 2px var(--timeline-preview-shadow),0 8px 24px var(--timeline-preview-shadow);display:flex;justify-content:center}.episode.s-u{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-u,.time.s-u{font-size:13px;font-weight:500;line-height:16px;text-align:center;text-shadow:0 8px 24px var(--timeline-preview-shadow),0 0 2px var(--timeline-preview-shadow)}.time.s-u{color:var(--white)}.rich-seek-hint.s-u{position:absolute;text-align:center;top:-12px;transform:translateY(-100%)}.icon_wrapper.s-u{display:inline-block;height:20px;margin-right:6px;vertical-align:top;width:20px}.rich-seek-hint-text.s-u{font-size:14px;line-height:18px;text-shadow:0 2px 4px rgba(0,0,0,.3),0 7px 16px rgba(0,0,0,.25);vertical-align:top}"};function Um(t,e){B(e,!0),Q(t,lw);let[i,o]=Be(),s=()=>x(w,"$isMinimalView$",i),a=()=>x(I,"$rotateAlpha",i),l=()=>x(T,"$playerSize",i),d=()=>x(R,"$previewTrackAvailable",i),r={MOBILE:150,DESKTOP:278},u=g(e,"time",3,""),p=g(e,"isMobile",3,!1),f=g(e,"videoEpisodes",19,()=>[]),v=g(e,"progress",3,0),b=g(e,"duration",3,0),y=g(e,"isInteractive",3,!1),_=xe(),w=_.ui.isMinimalView$,I=_.ui.rotateAlpha,T=_.ui.playerSize,R=_.ui.previewTrackAvailable,k=K(0),P=K(0),E=K(""),W=K(0),U=K(0),z=K(0),Y=K(0),ie=m(()=>Hu(v(),b(),f())),J=m(()=>!s()),oe=m(()=>Ql(a())),de=m(()=>bb(a())),ae=m($e),pe=m(()=>(n(de)?1:-1)*(n(k)/2-n(P)/2)),ee=m(()=>n(pe)*-1);He(()=>{(ke=>{D(k,ke.width,!0),D(P,ke.height,!0)})(ce())}),He(()=>{(ke=>{D(E,ke.imgSrc,!0),D(W,ke.imgWidth,!0),D(U,ke.imgHeight,!0),D(z,ke.imgOffsetX,!0),D(Y,ke.imgOffsetY,!0)})(Qe(v()))});function $e(){var Se;let ke=p()?r.MOBILE:r.DESKTOP,{isVertical:j}=Ee(),ne=30;return(Se=n(ie))!=null&&Se.text&&(ne+=16),(j||n(oe))&&(ne+=18,ne+=50),Math.min(Math.max(l().height-ne,0),ke)}function Ee(){let ke=e.previewThumbsData.frameWidth,j=e.previewThumbsData.frameHeight,ne=j>ke;return{width:ke,height:j,isHorizontal:!ne,isVertical:ne}}function ce(){let{height:ke,isHorizontal:j,isVertical:ne,width:Se}=Ee();return j&&(ke=ke/Se*n(ae),Se=n(ae)),ne&&(Se=Se/ke*n(ae),ke=n(ae)),{width:Se,height:ke}}function Qe(ke){let j;e.previewThumbsData.isUV?j=Math.floor(b()*ke/e.previewThumbsData.frequency):j=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*ke)));let ne=Math.floor(j/e.previewThumbsData.countPerImage),Se=Math.floor(j%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),Le=j%e.previewThumbsData.countPerRow,ze=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&ne===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(ze=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&ze++);let Ce=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&ne===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(Ce=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let we=n(k)*Ce,Fe=n(P)*ze,rt=-Le*n(k),ut=-Se*n(P);return{imgSrc:e.previewThumbsData.links[ne],imgWidth:we,imgHeight:Fe,imgOffsetX:rt,imgOffsetY:ut}}var fe=aw();let ve;var X=C(fe);{var N=ke=>{var j=nw(),ne=C(j);{var Se=Le=>{var ze=ow(),Ce=C(ze),we=C(Ce);Fm(we,{}),S(Ce);var Fe=A(Ce,2),rt=C(Fe,!0);S(Fe),S(ze),O(ut=>he(rt,ut),[()=>q("preview_track_notification_text")]),$(Le,ze)};M(ne,Le=>{d()&&Le(Se)})}S(j),O(()=>Ke(j,`width: ${n(k)}px; height: ${n(P)}px; background-image: url(${n(E)}); background-size: ${n(W)}px ${n(U)}px; background-position: ${n(z)}px ${n(Y)}px;
|
|
60
|
+
transform: rotate(${a()}deg) ${n(oe)?`translate(${n(pe)}px, ${n(ee)}px)`:""};
|
|
61
|
+
`)),$(ke,j)};M(X,ke=>{n(E)&&ke(N)})}var me=A(X,2);{var ue=ke=>{var j=rw(),ne=C(j);{var Se=Le=>{var ze=Ve(),Ce=le(ze);{var we=rt=>{var ut=bs();O(Mt=>he(ut,Mt),[()=>q("tooltip_episode_unfinished")]),$(rt,ut)},Fe=rt=>{var ut=bs();O(()=>he(ut,n(ie).text||"")),$(rt,ut)};M(Ce,rt=>{y()&&n(ie).completed===!1?rt(we):rt(Fe,!1)})}$(Le,ze)};M(ne,Le=>{n(ie)&&Le(Se)})}S(j),$(ke,j)};M(me,ke=>{n(J)&&ke(ue)})}var Re=A(me,2);{var Je=ke=>{var j=sw(),ne=C(j,!0);S(j),O(()=>he(ne,u())),$(ke,j)};M(Re,ke=>{y()||ke(Je)})}S(fe),O(ke=>{ve=te(fe,1,"timeline-preview s-u",null,ve,ke),Ke(fe,`width: ${n(oe)?n(P):n(k)}px;`)},[()=>({mobile:p()})]),$(t,fe),H(),o()}var dw=L('<span class="time s-g"> </span>'),cw=L("<!> <!>",1),uw={hash:"s-g",code:".time.s-g{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.timeline-slider{--slider-bg:var(--timeline-slider-bg);--slider-filled-bg:var(--timeline-slider-filled-bg);--slider-handle-bg:var(--timeline-slider-handle-bg);--slider-loaded-bg:var(--timeline-slider-loaded-bg)}"};function zm(t,e){var Ne,be,Oe,Ie,ht;B(e,!0),Q(t,uw);let[i,o]=Be(),s=()=>x(J,"$interactiveEpisodes$",i),a=()=>x(E,"$duration$",i),l=()=>x(P,"$position$",i),d=()=>x(ae,"$isInteractiveExpectation$",i),r=()=>x(de,"$isInteractiveTime$",i),u=()=>x(Ee,"$previewTrackActive",i),p=()=>x(W,"$isLive$",i),f=()=>x($e,"$disabledControls$",i),v=()=>x(z,"$isMobile",i),b=()=>x(U,"$isActiveLive$",i),y=()=>x(k,"$bufferedProgress$",i),_=g(e,"showTimeline",3,!1),w=g(e,"withEpisodes",3,!0),I=g(e,"ref",15,void 0),T=xe(),R=Lt(),k=T.state.bufferedProgress$,P=T.state.positionWithScrubbing$,E=T.state.duration$,W=T.state.isLive$,U=T.state.isActiveLive$,z=T.ui.isMobile,Y=R.features.episodes&&w()?T.actions.internal.getVideoEpisodes():void 0,ie=T.actions.internal.getPreviewThumbsData(),J=T.state.interactiveEpisodes$,oe=T.state.isInteractive,de=T.state.isInteractiveTime$,ae=T.state.isInteractiveExpectation$,pe=T.actions.internal.correctSeekTimeToInteractive,ee=(Ne=T.callbacks)==null?void 0:Ne.onDisabledTimelineClick,$e=T.ui.controls.disabledControls$,Ee=T.ui.previewTrackActive,ce=(Oe=(be=T.callbacks)==null?void 0:be.uiInfo)==null?void 0:Oe.onTimelineMouseEnter,Qe=(ht=(Ie=T.callbacks)==null?void 0:Ie.uiInfo)==null?void 0:ht.onTimelineMouseLeave,fe=T.ui.t,ve=R.features.interactiveResponsiveUi,X=m(()=>oe?s():Y),N=m(()=>jo(a())),me=m(()=>jo(l())),ue=m(()=>l()/a()),Re=m(()=>d()||r()),Je=K(!1),ke=K(""),j=K(0),ne=K(0),Se=K(0),Le=m(()=>({containerWidth:n(ne),translateXPx:n(j),translateYPx:oe&&ie?-36:-16,active:n(Je)&&_()&&!n(Re)&&!ve&&!u(),pointer:!R.features.timelinePreview||!ie||p()})),ze=fe("aria_timeline"),Ce=m(()=>fe("aria_timeline_value",{position:n(me),duration:n(N)}));function we(ye){return!pe||!oe?ye:pe(ye*a())/a()}function Fe(ye,qe){var Ue;(Ue=e.onSliderPointerDown)==null||Ue.call(e,qe),T.actions.internal.startScrubbing(we(ye))}function rt(ye){r()||T.actions.internal.progressScrubbing(we(ye))}function ut(ye){var qe;T.actions.internal.completeScrubbing(we(ye)),D(Je,!1),(qe=e.onSliderPointerUp)==null||qe.call(e)}function Mt(ye,qe,Ue){var st;(st=e.onSliderPointerEnter)==null||st.call(e,ye),wt(ye,qe,Ue),D(Je,!0)}function lt(ye,qe,Ue,st){var qt;(qt=e.onSliderMove)==null||qt.call(e,st,ye),wt(ye,qe,Ue),D(Je,!0)}function ni(){var ye;D(Je,!1),(ye=e.onSliderLeave)==null||ye.call(e)}function wt(ye,qe,Ue){D(Se,we(ye),!0),D(j,qe,!0),Ue&&D(ne,Ue,!0),D(ke,Rt(ye),!0)}function Rt(ye){let qe=jo((p()?1-ye:ye)*a());return p()?`-${qe}`:qe}let Dt=m(()=>f().has("TIMELINE"));var Qt=cw(),Te=le(Qt);Hm(Te,os(()=>n(Le),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(ye,qe)=>{var Ue=Ve(),st=le(Ue);{var qt=Yt=>{Um(Yt,{get time(){return n(ke)},get isMobile(){return v()},get videoEpisodes(){return n(X)},get previewThumbsData(){return ie},get progress(){return n(Se)},get duration(){return a()},get isInteractive(){return oe}})},Pt=Yt=>{var bi=dw(),Mi=C(bi,!0);S(bi),O(()=>he(Mi,n(ke))),$(Yt,bi)};M(st,Yt=>{R.features.timelinePreview&&ie&&!p()?Yt(qt):Yt(Pt,!1)})}$(ye,Ue)},$$slots:{default:!0}}));var G=A(Te,2);Ka(G,{className:"timeline-slider",get isActiveLive(){return b()},get isMobile(){return v()},get ariaLabel(){return ze},ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return l()},get ariaValueText(){return n(Ce)},get loadedProgress(){return y()},get filledProgress(){return n(ue)},get handleProgress(){return n(ue)},get videoEpisodes(){return n(X)},onPointerDown:Fe,onHandleMove:rt,onPointerMove:lt,onPointerUp:ut,onPointerEnter:Mt,onPointerLeave:ni,get onMouseEnter(){return ce},get onMouseLeave(){return Qe},get onDisabledClick(){return ee},get isInteractive(){return oe},get disabled(){return n(Dt)},get handleAlwaysVisible(){return u()},get hideHandel(){return r()},testId:"progress_bar",onContextMenu:ut,get ref(){return I()},set ref(ye){I(ye)}}),$(t,Qt),H(),o()}var pw={hash:"s-f",code:".timeline-ads-slider{--slider-bg:var(--timeline-slider-bg);--slider-filled-bg:var(--timeline-slider-filled-bg);--slider-handle-bg:var(--timeline-slider-handle-bg);--slider-loaded-bg:var(--timeline-slider-loaded-bg)}"};function vc(t,e){B(e,!0),Q(t,pw);let[i,o]=Be(),s=()=>x(r,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"duration",3,0),d=xe(),r=d.ui.isMobile,u=d.ui.t,p=m(()=>jo(l())),f=m(()=>jo(a())),v=m(()=>a()/l()),b=m(()=>u("aria_timeline_value",{position:n(f),duration:n(p)})),y=m(()=>Math.round(n(v)*100));Ka(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n(b)},get filledProgress(){return n(v)},hideHandel:!0,get squareBorders(){return s()}}),H(),o()}var fw=L("<div><!></div>"),mw=L("<div></div>"),vw={hash:"s-d",code:".timeline.s-d{align-items:center;bottom:0;box-sizing:border-box;display:flex;min-width:86px;pointer-events:all;position:relative;width:100%}.timeline.mobile.s-d{height:16px;margin-top:6px;padding:6px 12px 7px}.withoutPadding.s-d{padding:0}.timeline-stub.s-d{min-width:20px;width:100%}.timeline-stub.mobile.s-d{height:8px}"};function ja(t,e){B(e,!0),Q(t,vw);let[i,o]=Be(),s=()=>x(w,"$isLive$",i),a=()=>x(R,"$isMobile",i),l=()=>x(k,"$disabled",i),d=()=>x(T,"$adPosition",i),r=()=>x(I,"$adDuration",i),u=g(e,"isAds",3,!1),p=g(e,"isHidden",3,!1),f=g(e,"timelineNotAvailable",3,!1),v=g(e,"needPadding",3,!0),b=g(e,"ref",15,void 0),y=xe(),_=Lt(),w=y.state.isLive$,I=y.ads.duration,T=y.ads.position,R=y.ui.isMobile,k=se(!1),P=m(()=>!f()&&(!s()||s()&&e.canRewindLive&&e.isRewindableLive||u()));var E=Ve(),W=le(E);{var U=Y=>{var ie=fw();let J;var oe=C(ie);{var de=pe=>{vc(pe,{get position(){return d()},get duration(){return r()}})},ae=pe=>{zm(pe,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return n(P)},get withEpisodes(){return e.withEpisodes},get onSliderMove(){return e.onSliderMove},get onSliderPointerDown(){return e.onSliderPointerDown},get onSliderPointerUp(){return e.onSliderPointerUp},get onSliderLeave(){return e.onSliderLeave},get onSliderPointerEnter(){return e.onSliderPointerEnter},get ref(){return b()},set ref(ee){b(ee)}})};M(oe,pe=>{u()?pe(de):pe(ae,!1)})}S(ie),Os(ie,()=>Ol(p()&&_.features.usePerformanceFix,k,_.disableInvisibleComponentsTimeout)),O(pe=>J=te(ie,1,"timeline s-d",null,J,pe),[()=>({withoutPadding:!v(),mobile:a(),"out-of-flow":l()})]),$(Y,ie)},z=Y=>{var ie=mw();let J;O(oe=>J=te(ie,1,"timeline-stub s-d",null,J,oe),[()=>({mobile:a()})]),$(Y,ie)};M(W,Y=>{n(P)?Y(U):Y(z,!1)})}$(t,E),H(),o()}import{getRangeAroundIndex as gw}from"@vkontakte/videoplayer-shared/es2015";import{ThinOneStat as hw}from"@vkontakte/videoplayer-statistics/es2015";var _w=(t,e,i,o,s,a,l)=>{D(e,!0),D(i,t.clientX,!0),D(o,n(s),!0),a(l())},bw=L("<div></div>"),$w=L('<div><div class="track s-2b"></div></div>'),yw={hash:"s-2b",code:'.root.s-2b{display:flex;height:var(--preview-track-frame-height-horizontal);overflow:hidden;position:relative;width:100%}.root.is-vertical-video.s-2b,.root.vertically-rotated.s-2b{height:var(--preview-track-frame-height-vertical)}.root.s-2b:after{background-color:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.12);box-shadow:0 0 2px 0 rgba(0,0,0,.06);content:"";height:100%;margin:0 auto;pointer-events:none;width:3px;z-index:1}.track.s-2b{bottom:0;display:flex;left:0;padding:0 50%;top:0}.frame.s-2b,.track.s-2b{position:absolute}.frame.s-2b{background-position-x:calc(var(--column-index)*-1*var(--frame-width));background-position-y:calc(var(--frame-height)*-1*var(--row-index));background-size:calc(var(--frame-width)*var(--column-numbers)) calc(var(--frame-height)*var(--row-numbers));flex-shrink:0;height:var(--frame-height);pointer-events:none;transform-origin:center;width:var(--frame-width)}.vertically-rotated.s-2b .frame:where(.s-2b){transform-origin:0 0}.rotate-1.s-2b{transform:rotate(-90deg) translateX(-100%)}.rotate-2.s-2b{transform:rotate(-180deg)}.rotate-3.s-2b{transform:rotate(-270deg) translateY(-100%)}'};function Km(t,e){B(e,!0),Q(t,yw);let[i,o]=Be(),s=()=>x(R,"$rotateAlpha",i),a=()=>x(_,"$position$",i),l=()=>x(y,"$duration$",i),d=xe(),{countPerImage:r=0,countPerRow:u=0,countTotal:p=0,links:f=[],frameHeight:v=0,frameWidth:b=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:_}=d.state,{startScrubbing:w,progressScrubbing:I,completeScrubbing:T}=d.actions.internal,R=d.ui.rotateAlpha,k=K(void 0),P=K(!1),E=K(0),W=K(0),U=K(0),z=K(0),Y=m(()=>v<=b),ie=m(()=>Ql(s())),J=m(()=>n(Y)?!n(ie):n(ie)),oe=114,de=65,ae=3,pe=m(()=>n(J)?oe:de),ee=m(()=>n(Y)?oe:de),$e=m(()=>n(Y)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),Ee=m(()=>p*n(pe)),ce=K(0);He(()=>{D(z,Math.ceil(-n(U)/n(pe))-1),D(U,-n(Ee)*a()/l())});let Qe=()=>{T(fe(),!0,hw.ActionSeekType.RICH)},fe=()=>l()*-n(U)/n(Ee)/l(),ve=!1,X=Ce=>{if(!n(P))return!1;let we=Ce.clientX-n(E);D(U,n(W)+we),D(U,Math.max(Math.min(n(U),0),-n(Ee)),!0),Math.abs(we)>1&&(ve=!0),I(fe())},N=Ce=>{n(P)&&(D(P,!1),!ve&&Ce&&D(U,-(Ce.offsetX-n(ce)/2)),ve=!1,Qe())},me=()=>{n(P)&&N()},ue=m(()=>r/u),Re=(Ce,we)=>{if(Ce!==f.length-1)return u;let Fe=0,rt=we*u;for(let ut=1;ut<=u;ut++)Ce*r+Fe+rt<p&&Fe++;return Fe},Je=m(()=>Math.floor(n(z)/r)),ke=m(()=>gw(3,n(Je),f.length-1)),j=(Ce,we,Fe)=>{let rt=r*n(pe);return Ce*rt+we*n(pe)*u+n(ce)/2-ae/2+Fe*n(pe)},ne=m(()=>[`--row-numbers: ${n(ue)}`,`--column-numbers: ${u}`,`--frame-width: ${n(ee)}px`,`--frame-height: ${n($e)}`].join(";"));var Se=$w();let Le;var ze=C(Se);ze.__pointerdown=[_w,P,E,W,U,w,fe],ze.__pointermove=X,ze.__pointerup=N,yi(ze,20,()=>n(ke),Ce=>Ce,(Ce,we)=>{var Fe=Ve(),rt=le(Fe);yi(rt,16,()=>Array.from({length:n(ue)},(ut,Mt)=>Mt),ut=>ut,(ut,Mt)=>{var lt=Ve(),ni=le(lt);yi(ni,16,()=>Array.from({length:Re(we,Mt)},(wt,Rt)=>Rt),wt=>wt,(wt,Rt)=>{var Dt=bw();O((Qt,Te)=>{Ke(Dt,Qt),te(Dt,1,Te,"s-2b")},[()=>`--row-index: ${Mt}; --column-index: ${Rt}; left: ${j(we,Mt,Rt)}px; background-image: url(${f[we]});`,()=>`frame rotate-${Math.abs(s())/90%4}`]),$(wt,Dt)}),$(ut,lt)}),$(Ce,Fe)}),S(ze),S(Se),it(Se,Ce=>D(k,Ce),()=>n(k)),O(Ce=>{Le=te(Se,1,"root s-2b",null,Le,Ce),Ke(Se,n(ne)),Ke(ze,`transform: translateX(${n(U)}px); width: ${n(Ee)}px;`)},[()=>({"is-vertical-video":!n(Y),"vertically-rotated":n(ie)})]),vt("mouseleave",ze,me),Vn(Se,"clientWidth",Ce=>D(ce,Ce)),$(t,Se),H(),o()}Ze(["pointerdown","pointermove","pointerup"]);var xw=L('<div class="notification s-2a"><span class="description s-2a"> </span></div>'),ww={hash:"s-2a",code:".notification.s-2a{background:var(--notification-bg);border-radius:var(--notification-radius);padding:9px 14px 10px 12px}.description.s-2a{font-size:14px;line-height:18px}"};function Qm(t,e){B(e,!1),Q(t,ww);let i=340,{ui:{t:o}}=xe();Yo();var s=xw(),a=C(s),l=C(a,!0);S(a),S(s),O(d=>he(l,d),[()=>o("preview_track_close_tooltip")],hr),Ns(3,s,()=>_a,()=>({duration:i})),$(t,s),H()}import{getRangeAroundIndex as Sw}from"@vkontakte/videoplayer-shared/es2015";var Cw=L('<div class="preview-track-close tooltip s-28"><!></div>'),Tw=L('<div class="preview-track-control s-28"><!> <div class="preview-track-close s-28"><!></div> <!></div>'),Iw=L('<div class="wrapper-preview-track s-28"><!></div>'),Ew=L('<div class="enriched-timeline s-28"><!> <!> <!></div>'),Pw={hash:"s-28",code:".enriched-timeline.s-28{padding:var(--timeline-padding-vertical-top) var(--timeline-padding-horizontal) var(--timeline-padding-vertical-bottom);pointer-events:auto;position:relative}.preview-track-control.s-28{align-items:center;display:flex;justify-content:center;left:0;padding:0 calc(var(--timeline-padding-horizontal));pointer-events:none;position:absolute;right:0;top:calc((var(--timeline-height) + var(--preview-track-controls-top))*-1)}.preview-track-close.s-28{pointer-events:auto;position:absolute;right:calc(var(--timeline-padding-horizontal))}.preview-track-close.tooltip.s-28{bottom:32px;opacity:0;transition:opacity .2s}.preview-track-close.s-28:hover+.tooltip:where(.s-28){opacity:1}.wrapper-preview-track.s-28{box-sizing:border-box;left:0;overflow:hidden;padding:0 calc(var(--timeline-padding-horizontal));position:absolute;right:0;z-index:-1}"};function qm(t,e){B(e,!0),Q(t,Pw);let[i,o]=Be(),s=()=>x(_,"$playerSize",i),a=()=>x(y,"$duration$",i),l=()=>x(w,"$previewTrackActive",i),d=()=>x(v,"$position$",i),r=()=>x(b,"$isRewindableLive$",i),u=g(e,"timelineRef",15,void 0),p=xe(),f=200,{positionWithScrubbing$:v,isRewindableLive$:b,duration$:y}=p.state,{playerSize:_,previewTrackActive:w}=p.ui,{countPerImage:I=0,links:T=[],frequency:R=0}=p.actions.internal.getPreviewThumbsData()||{},k=m(()=>s().width>100),P=K(!b_()),E=()=>{n(P)&&(__(),D(P,!1))},W=pe=>{let ee=Math.floor(a()*pe/R),$e=Math.floor(ee/I),Ee=Sw(3,$e,T.length-1);for(let ce of Ee){let Qe=new Image;Qe.src=T[ce]}},U=(pe,ee)=>{W(ee),!l()&&e.onTimelineMove(pe)};var z=Ew(),Y=C(z);{var ie=pe=>{var ee=Tw(),$e=C(ee);let Ee=m(()=>jo(d()));Bm($e,{get time(){return n(Ee)}});var ce=A($e,2),Qe=C(ce);Hs(Qe,{onClick:()=>p.actions.internal.closePreviewTrack()}),S(ce);var fe=A(ce,2);{var ve=X=>{var N=Cw(),me=C(N);Qm(me,{}),S(N),$(X,N)};M(fe,X=>{n(P)&&X(ve)})}S(ee),vt("mouseleave",ce,E),Ns(3,ee,()=>_a,()=>({duration:f})),$(pe,ee)};M(Y,pe=>{l()&&pe(ie)})}var J=A(Y,2);let oe=m(()=>!n(k));ja(J,{get isHidden(){return n(oe)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return r()},onSliderMove:U,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:W,get ref(){return u()},set ref(pe){u(pe)}});var de=A(J,2);{var ae=pe=>{var ee=Iw(),$e=C(ee);Km($e,{}),S(ee),O(()=>Ke(ee,`height: ${e.animatedPreviewTrackHeight}px;`)),$(pe,ee)};M(de,pe=>{e.previewTrackAvailable&&pe(ae)})}S(z),O(()=>Ke(z,`transform: translateY(${e.animatedOffsetY}px);`)),$(t,z),H(),o()}var kw=L('<div><!> <div data-testid="player_controls"><div class="controls-left s-w"><!> <!> <!></div> <div class="controls-right s-w"></div></div></div> <!>',1),Lw={hash:"s-w",code:'.wrapper-bottom.s-w{bottom:0;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;left:0;pointer-events:none;position:absolute;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);width:100%;will-change:transform;z-index:var(--controls-container-z-index)}.wrapper-bottom.s-w:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-w>:where(.s-w){pointer-events:auto}.controls.s-w{align-items:center;box-sizing:border-box;display:flex;font-size:13px;height:var(--controls-height);justify-content:space-between;padding:0 var(--controls-desktop-padding-horizontal) 4px;white-space:nowrap;width:100%}.controls.minimal-view.s-w{padding:0 var(--controls-desktop-padding-horizontal-minimal-view) 8px}.controls-left.s-w,.controls-right.s-w{align-content:center;display:flex}.controls-left.s-w{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-w >:not(:first-child),.controls-right.s-w >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-w{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-w{transition:none}'};function Ym(t,e){var ya,cl;B(e,!0),Q(t,Lw);let[i,o]=Be(),s=()=>x(Ao,"$disabledControls$",i),a=()=>x(Gt,"$adPlaybackState",i),l=()=>x(bi,"$playbackState$",i),d=()=>x(bo,"$currentSubtitle$",i),r=()=>x(Zi,"$isEnded$",i),u=()=>x(ko,"$currentGridType$",i),p=()=>x(qt,"$isMinimalView$",i),f=()=>x(si,"$isLive$",i),v=()=>x(Si,"$chromecastState$",i),b=()=>x(Ji,"$isPictureInPictureActive",i),y=()=>x(It,"$pictureInPictureType$",i),_=()=>x(eo,"$availableSubtitlesList$",i),w=()=>x(ot,"$contextMenuOpenedByKeyboard$",i),I=()=>x(F,"$showContextMenuBtn$",i),T=()=>x(di,"$isRewindableLive$",i),R=()=>x(pt,"$isActiveLive$",i),k=()=>x(xr,"$graphIsOpened$",i),P=()=>x(pn,"$contextMenuVisible$",i),E=()=>x(Ct,"$isFullscreen",i),W=()=>x(fn,"$autoplayNextEnabled",i),U=()=>x(n(xo),"$prevButton",i),z=()=>x(n(Sn),"$replayButton",i),Y=()=>x(n(wo),"$playButton",i),ie=()=>x(n(Cn),"$nextButton",i),J=()=>x(n(Wi),"$playPrevChapterButton",i),oe=()=>x(n(Ir),"$seekToInteractiveButton",i),de=()=>x(n(Ro),"$interactiveGraphButton",i),ae=()=>x(n(Un),"$liveButton",i),pe=()=>x(n(ls),"$time",i),ee=()=>x(n(ds),"$episodes",i),$e=()=>x(n(cs),"$vkLogo",i),Ee=()=>x(n(to),"$volume",i),ce=()=>x(n(us),"$subtitles",i),Qe=()=>x(n(Qr),"$settings",i),fe=()=>x(n(vo),"$context",i),ve=()=>x(n(Er),"$fullscreen",i),X=()=>x(n(et),"$chromecast",i),N=()=>x(Nn,"$additionalDesktopControlPanelRightButtons$",i),me=()=>x(so,"$playerSize",i),ue=()=>x($o,"$isInteractiveTime$",i),Re=()=>x(No,"$previewTrackActive",i),Je=()=>x(gi,"$settingsMenuVisible",i),ke=()=>x(Do,"$settingButtonRef$",i),j=()=>x(Ut,"$startedByKeyboard$",i),ne=()=>x(Mi,"$isAudioAvailable$",i),Se=()=>x(Te,"$fakeIsPlaying$",i),Le=()=>x(ss,"$seekToInteractiveDisabledTooltip$",i),ze=()=>x(Bo,"$isPreviewTrackHorizontallyAligned$",i),Ce=()=>x(kr,"$previewTrackAvailable",i),we=()=>x(ur,"$previewTrackDragInProgress",i),Fe=()=>x(fi,"$adPosition",i),rt=()=>x(Yt,"$position$",i),ut=()=>x(ai,"$adDuration",i),Mt=()=>x(Pt,"$duration$",i),lt=g(e,"playerControlsWrapperRef",15,void 0),ni=g(e,"playerControlsRef",15,void 0),wt=g(e,"isAds",3,!1),Rt=g(e,"logoTargetUrl",3,""),Dt=g(e,"isOneVideoPlaylist",3,!1),Qt=g(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:Te}=_o(),G=xe(),Ne=_o(),be=Lt(),Oe=G.actions.internal.toggleMuted,Ie=G.actions.internal.togglePlay,ht=G.actions.internal.pause,ye=G.actions.internal.toggleSubtitle,qe=G.actions.internal.checkFullscreenSupport,Ue=(ya=G.callbacks)==null?void 0:ya.onAudioDoesNotExistHint,st=(cl=G.callbacks)==null?void 0:cl.onAudioDisabledHint,qt=G.ui.isMinimalView$,Pt=G.state.duration$,Yt=G.state.positionWithScrubbing$,bi=G.state.playbackState$,Mi=G.state.isAudioAvailable$,Ai=G.state.isAudioDisabled,Zi=G.state.isEnded$,si=G.state.isLive$,pt=G.state.isActiveLive$,di=G.state.isRewindableLive$,{isActive$:Ji,type$:It}=Ne.pictureInPicture$,gi=G.ui.settingsMenu.visible$,ui=G.ui.settingsMenu.openedByBtnKeyboard$,We=G.ui.controls,at=G.actions.internal.getVideoEpisodes(),Si=G.state.chromecastState$,eo=G.state.availableSubtitlesList$,bo=G.state.currentSubtitle$,Ao=We.disabledControls$,pn=G.ui.contextMenu.visible$,F=G.ui.contextMenu.showContextMenuBtn$,ot=G.ui.contextMenu.openedByBtnKeyboard$,Ut=G.ui.startedByKeyboard$,pi=G.ui.controlBlocks,ct=G.ui.t,ai=G.ads.duration,fi=G.ads.position,Gt=G.ads.playbackState,Ct=G.ui.isFullscreen,so=G.ui.playerSize,ko=G.ui.currentGridType$,Nn=G.ui.additionalDesktopControlPanelRightButtons$,fn=G.ui.autoplayNextEnabled$,ki=G.actions.internal.getVideoElement,xi=G.actions.internal.replayInteractive,Xo=G.actions.internal.prevVideoClick,ir=G.actions.internal.nextVideoClick,hi=G.state.isInteractive,$o=G.state.isInteractiveTime$,mn=G.state.showInteractiveGraph,Lo=G.state.showSeekToInteractive,vn=G.state.showPlayPrevChapter,Cs=G.state.showInteractiveTimeIndicator,Ts=G.state.playPrevChapterDisabledTooltip,ss=Ne.seekToInteractiveDisabledTooltip$,xr=Ne.graphIsOpened$,gn=be.features.interactiveResponsiveUi,hn=m(()=>s().has("EPISODE_BUTTON")),or=m(()=>s().has("GRAPH_BUTTON")),wr=m(()=>s().has("SEEK_TO_INTERACTIVE_BUTTON")),nr=m(()=>s().has("PLAY_BUTTON")),Br=m(()=>s().has("REPLAY_BUTTON")),Hr=m(()=>s().has("PLAY_PREV_CHAPTER_BUTTON")),Bn=()=>G.actions.internal.toggleChromecast(),rr=m(()=>wt()?a()==="playing":l()===Gm.PLAYING),Hn=m(()=>d().value!=="off"),sr=m(()=>r()&&!wt()||hi),Fr=m(()=>gn?n(sr)&&ro(u(),"m"):n(sr)),Ur=m(()=>!r()||hi||wt()),Ci=m(()=>!p()&&ro(u(),"m")),as=m(()=>e.showNextPrevButtons&&!p()&&ro(u(),"m")&&!wt()&&e.nextButtonActive),Zo=m(()=>e.showNextPrevButtons&&!p()&&ro(u(),"m")&&!wt()&&e.prevButtonActive),gt=m(()=>!wt()&&!!f()),jt=m(()=>!p()&&v()!==$b.NOT_AVAILABLE&&!(b()&&y()===1)&&ro(u(),"m")&&!hi&&!wt()),ar=m(()=>e.showAutoplayNext&&!p()&&!Dt()&&ro(u(),"s")),Fn=m(()=>!p()&&_().length>0&&ro(u(),"m")),zr=m(()=>w()||I()),Sr=m(()=>ro(u(),"s")&&!wt()),Wr=m(()=>!e.logoHidden&&!wt()&&!p()),_n=m(()=>be.features.fullscreen&&qe()&&(e.logoHidden||ro(u(),gn?"xs":"s"))&&!(b()&&y()===1)&&(hi?Qt():!0)),Jo=m(()=>(!f()||wt())&&!(be.features.interactiveHideTime&&hi)),bn=m(()=>mn&&ro(u(),"m")),Cr=m(()=>gn?Lo&&ro(u(),"s"):Lo),Tr=m(()=>gn?vn&&ro(u(),"s"):vn),$n=m(()=>!p()&&!wt()&&!f()&&!!(at!=null&&at.length)&&n(Ci)&&!n(hn)),yn=m(()=>!T()||!!R()),lr=m(()=>k()?ct("tooltip_interactive_graph_on"):ct("tooltip_interactive_graph_off")),Li=m(()=>P()?ct("tooltip_context_menu_close"):ct("tooltip_context_menu_open")),yo=(mt,dt)=>mt?dt&&dt===Gm.PAUSED?ct("tooltip_play"):"":ct("tooltip_live"),Mo=m(()=>yo(n(yn),l())),ao=m(()=>be.logoType==="vk_video"?ct("tooltip_vk_video_logo"):ct("tooltip_vk_logo")),xn=m(()=>n(Hn)?ct("tooltip_subtitles_on"):ct("tooltip_subtitles_off")),wn=m(()=>E()?ct("tooltip_fullscreen_on"):ct("tooltip_fullscreen_off")),Kr=m(()=>v()===$b.CONNECTED?ct("tooltip_chromecast_on"):ct("tooltip_chromecast_off")),St=m(()=>W()?ct("tooltip_autoplay_on"):ct("tooltip_autoplay_off")),mi=K(0),Wt=ri({}),Vo=ri({}),xo=m(()=>We.prevButton),Sn=m(()=>We.replayButton),wo=m(()=>We.playButton),Cn=m(()=>We.nextButton),Wi=m(()=>We.playPrevChapterButton),Ir=m(()=>We.seekToInteractiveButton),Ro=m(()=>We.interactiveGraphButton),Un=m(()=>We.liveButton),ls=m(()=>We.time),ds=m(()=>We.episodes),cs=m(()=>We.vkLogo),to=m(()=>We.volume),us=m(()=>We.subtitles),Qr=m(()=>We.settings),vo=m(()=>We.context),Er=m(()=>We.fullscreen),et=m(()=>We.chromecast),_t=m(()=>({prevButton:U()?U().right-U().left:0,replayButton:z()?z().right-z().left:0,playButton:Y()?Y().right-Y().left:0,nextButton:ie()?ie().right-ie().left:0,playPrevChapterButton:J()?J().right-J().left:0,seekToInteractiveButton:oe()?oe().right-oe().left:0,interactiveGraphButton:de()?de().right-de().left:0,liveButton:ae()?ae().right-ae().left:0,time:pe()?pe().right-pe().left:0,episodes:ee()?ee().right-ee().left:0,vkLogo:$e()?$e().right-$e().left:0,volume:Ee()?Ee().right-Ee().left:0,subtitles:ce()?ce().right-ce().left:0,settings:Qe()?Qe().right-Qe().left:0,context:fe()?fe().right-fe().left:0,fullscreen:ve()?ve().right-ve().left:0,chromecast:X()?X().right-X().left:0,additionalButtons:N().length?N().reduce(mt=>[...mt,40],[]):[]})),Zt=K(0);He(()=>{(!n(Zt)||n(Zt)<n(_t).time)&&Et(()=>D(Zt,n(_t).time,!0))});let Vi=K(!1);He(()=>{let mt=0;n($n)&&(ro(u(),"xl")?mt=n(_t).time:mt=60);let dt=n(_t).prevButton+n(_t).playButton+n(_t).nextButton+n(_t).seekToInteractiveButton+n(_t).interactiveGraphButton+n(_t).liveButton+n(Zt)+mt;D(Vi,n(Jo)&&n(mi)>=dt,!0)});let lo=m(()=>n(Vi)&&ro(u(),"m")),Ni=yb(Yl,260),go=yb(Ju,260);He(()=>{me(),ue(),Re(),Ni(ki(),We,Wt,e.showControls),go(ki(),pi,Vo,e.showControls)}),He(()=>{Vo.bottom=lt()});let Do=se();He(()=>{Je(),ke()&&Et(()=>Bl(ke(),Je(),ui))});let Tn;He(()=>{j(),Et(()=>Xu(Ut,j(),Tn))});function zn(){fa({isAudioDisabled:Ai,isAudioAvailable:ne(),isAds:wt(),audioIsNotExistHintCallback:Ue,audioDisabledHintCallback:st})&&Oe()}let ho=hi?xi:Ie,en=m(()=>Se()!==null),Pr=m(()=>n(en)?Se():n(rr)),Ar=m(()=>n(Pr)?ct("tooltip_pause"):ct("tooltip_play")),So=ct("tooltip_episodes"),dr=m(()=>{var mt,dt,Di,Fo;return n(Zo)?{id:"prevButton",type:"desktop-control-panel-left",weight:Ks.prevButton,buttonComponent:Ga,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:Xo.bind(null,!0)},tooltipEnabled:!((dt=(mt=G.callbacks)==null?void 0:mt.uiInfo)!=null&&dt.onPrevButtonMouseEnter)&&!((Fo=(Di=G.callbacks)==null?void 0:Di.uiInfo)!=null&&Fo.onPrevButtonMouseLeave),mouseEnter:()=>{var Qi,_i,Bi;(Bi=(_i=(Qi=G.callbacks)==null?void 0:Qi.uiInfo)==null?void 0:_i.onPrevButtonMouseEnter)==null||Bi.call(_i,er(ki(),Wt,"prevButton",e.showControls))},mouseLeave:()=>{var Qi,_i,Bi;(Bi=(_i=(Qi=G.callbacks)==null?void 0:Qi.uiInfo)==null?void 0:_i.onPrevButtonMouseLeave)==null||Bi.call(_i,er(ki(),Wt,"prevButton",e.showControls))},tooltipText:ct("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),Wn=m(()=>n(Fr)?{id:"replayButton",type:"desktop-control-panel-left",weight:Ks.replayButton,buttonComponent:jl,buttonComponentProps:{disabled:n(Br),click:ho},tooltipText:ct("tooltip_restart"),disabled:n(Br)}:void 0),ps=m(()=>n(Ur)?{id:"playButton",type:"desktop-control-panel-left",weight:Ks.playButton,buttonComponent:Xl,buttonComponentProps:{disabled:n(nr),isPlaying:n(rr),click:Ie},tooltipText:n(Ar),disabled:n(nr)}:void 0),tt=m(()=>{var mt,dt,Di,Fo;return n(as)?{id:"nextButton",type:"desktop-control-panel-left",weight:Ks.nextButton,buttonComponent:Ga,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:ir.bind(null,!0)},tooltipEnabled:!((dt=(mt=G.callbacks)==null?void 0:mt.uiInfo)!=null&&dt.onNextButtonMouseEnter)&&!((Fo=(Di=G.callbacks)==null?void 0:Di.uiInfo)!=null&&Fo.onNextButtonMouseLeave),mouseEnter:()=>{var Qi,_i,Bi;(Bi=(_i=(Qi=G.callbacks)==null?void 0:Qi.uiInfo)==null?void 0:_i.onNextButtonMouseEnter)==null||Bi.call(_i,er(ki(),Wt,"nextButton",e.showControls))},mouseLeave:()=>{var Qi,_i,Bi;(Bi=(_i=(Qi=G.callbacks)==null?void 0:Qi.uiInfo)==null?void 0:_i.onNextButtonMouseLeave)==null||Bi.call(_i,er(ki(),Wt,"nextButton",e.showControls))},tooltipText:ct("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Nt=m(()=>hi&&n(Tr)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Ks.playPrevChapterButton,buttonComponent:cc,buttonComponentProps:{disabled:n(Hr),click:e.playPrevChapter},tooltipText:ct("tooltip_interactive_go_back"),disabledTooltipContent:ct(Ts),disabled:n(Hr)}:void 0),Ti=m(()=>hi&&n(Cr)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Ks.seekToInteractiveButton,buttonComponent:pc,buttonComponentProps:{disabled:n(wr),click:e.seekToInteractive},tooltipText:ct("tooltip_interactive_seek"),disabled:n(wr),disabledTooltipContent:ct(Le())}:void 0),tn=m(()=>hi&&n(bn)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Ks.interactiveGraphButton,buttonComponent:fc,buttonComponentProps:{disabled:n(or),click:xr.toggle,graphIsOpened:k()},tooltipText:n(lr)}:void 0),Oo=m(()=>n(gt)?{id:"liveButton",type:"desktop-control-panel-left",weight:Ks.liveButton,buttonComponent:mc,buttonComponentProps:{isLiveActive:n(yn),ariaLabel:n(Mo)},tooltipText:n(Mo),disabled:n(yn)&&l()===Gm.PLAYING}:void 0),qr=m(()=>[n(dr),n(Wn),n(ps),n(tt),n(Nt),n(Ti),n(tn),n(Oo)].filter(mt=>!!mt).sort(Fa)),on=m(()=>n(Wr)?{id:"vkLogo",type:"desktop-control-panel-right",weight:qs.vkLogo,buttonComponent:Jd,buttonComponentProps:{targetUrl:Rt(),logoClickable:e.logoClickable,click:ht},tooltipText:n(ao),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),cr=m(()=>n(ar)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:qs.autoplayNext,buttonComponent:uc,tooltipText:n(St)}:void 0),Gr=m(()=>({id:"volume",type:"desktop-control-panel-right",weight:qs.volume,buttonComponent:um,buttonComponentProps:{click:zn,isAds:wt()}})),Is=m(()=>n(Fn)?{id:"subtitles",type:"desktop-control-panel-right",weight:qs.subtitles,buttonComponent:sm,buttonComponentProps:{isSubtitlesEnabled:n(Hn),click:ye},tooltipText:n(xn)}:void 0),Gs=m(()=>n(Sr)?{id:"settings",type:"desktop-control-panel-right",weight:qs.settings,buttonComponent:zl,buttonComponentProps:{ref$:Do},tooltipText:Je()?void 0:ct("tooltip_settings_off")}:void 0),Kn=m(()=>be.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:qs.context,buttonComponent:Lm,buttonComponentProps:{ariaLabel:ct("aria_label_context_menu")},className:n(zr)?"":"out-of-view",tooltipText:n(Li)}:void 0),ba=m(()=>n(_n)?{id:"fullscreen",type:"desktop-control-panel-right",weight:qs.fullscreen,buttonComponent:Zd,buttonComponentProps:{isFullscreen:E(),click:e.toggleFullscreen},tooltipText:n(wn)}:void 0),ft=m(()=>n(jt)?{id:"chromecast",type:"desktop-control-panel-right",weight:qs.chromecast,buttonComponent:tc,buttonComponentProps:{state:v(),click:Bn},tooltipText:n(Kr)}:void 0),li=m(()=>[n(on),n(cr),n(Gr),n(Is),n(Gs),n(Kn),n(ba),n(ft),...N()].filter(mt=>!!mt).sort(Fa)),No=G.ui.previewTrackActive,ur=G.ui.previewTrackDragInProgress,kr=G.ui.previewTrackAvailable,Bo=G.ui.isPreviewTrackHorizontallyAligned,Ii=m(()=>_b({onPreviewTrackOpened:G.actions.internal.previewTrackOpened,getTimelineRef:()=>Wt.timeline,isHorizontal:ze()})),fs=m(()=>n(Ii).progressBarY),co=m(()=>n(Ii).controlsY),Ki=m(()=>n(Ii).onPointerDown),nn=m(()=>n(Ii).onPointerMove),Qn=m(()=>n(Ii).onPointerUp),Yr=m(()=>n(Ii).calculatedHeight),ge=m(()=>n(Ii).closePreviewTrack);He(()=>{Re()||n(ge)()});let Tt;kt(()=>()=>Tt&&clearTimeout(Tt));let $i=mt=>{Re()||!Ce()||(n(Ki)(mt),Tt=setTimeout(()=>{G.actions.internal.previewTrackDragStarted()},200))},Ri=()=>{Re()||n(Qn)(),Tt&&clearTimeout(Tt),we()&&G.actions.internal.previewTrackDragFinished()},Ho=mt=>{n(nn)(mt)},Co=-(parseInt("24")/2+4);var io=kw(),rn=le(io);let Es;var Ps=C(rn);{var Ys=mt=>{let dt=m(()=>n(fs)()),Di=m(()=>n(Yr)());qm(mt,{get animatedOffsetY(){return n(dt)},get animatedPreviewTrackHeight(){return n(Di)},get canRewindLive(){return e.canRewindLive},get isAds(){return wt()},onTimelineMove:Ho,onTimelinePointerDown:$i,onTimelinePointerUp:Ri,get previewTrackAvailable(){return Ce()},get timelineRef(){return Wt.timeline},set timelineRef(Fo){Wt.timeline=Fo}})};M(Ps,mt=>{e.showControls&&mt(Ys)})}var jr=A(Ps,2);let js;var In=C(jr),$a=C(In);yi($a,17,()=>n(qr),mt=>mt.id,(mt,dt)=>{Zu(mt,{get buttonComponent(){return n(dt).buttonComponent},get buttonComponentProps(){return n(dt).buttonComponentProps},get tooltipText(){return n(dt).tooltipText},get disabledTooltipContent(){return n(dt).disabledTooltipContent},get disabled(){return n(dt).disabled},get className(){return n(dt).className},get tooltipEnabled(){return n(dt).tooltipEnabled},get mouseEnter(){return n(dt).mouseEnter},get mouseLeave(){return n(dt).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return Wt[n(dt).id]},set ref(Di){Wt[n(dt).id]=Di}})});var sl=A($a,2);{var Lr=mt=>{let dt=m(()=>!e.showControls),Di=m(()=>wt()?Fe():rt()),Fo=m(()=>wt()?ut():Mt());jd(mt,{get isHidden(){return n(dt)},isMobile:!1,get showDuration(){return n(lo)},get position(){return n(Di)},get duration(){return n(Fo)},get ref(){return Wt.time},set ref(Qi){Wt.time=Qi}})};M(sl,mt=>{n(Jo)&&mt(Lr)})}var ed=A(sl,2);let al=m(()=>!n($n));Po(ed,{className:"w-max",get disabled(){return n(al)},get tooltipContent(){return So},get tooltipVisible(){return e.showControls},tooltipPlacement:"top-left",get initialTranslateXPx(){return Co},get ref(){return Wt.episodes},set ref(mt){Wt.episodes=mt},children:(mt,dt)=>{var Di=Ve(),Fo=le(Di);{var Qi=_i=>{ic(_i,{get position(){return rt()},get duration(){return Mt()},get timeCodes(){return at}})};M(Fo,_i=>{n($n)&&_i(Qi)})}$(mt,Di)},$$slots:{default:!0}}),S(In);var ll=A(In,2);yi(ll,21,()=>n(li),mt=>mt.id,(mt,dt)=>{var Di=Ve(),Fo=le(Di);{var Qi=Bi=>{Zu(Bi,{get buttonComponent(){return n(dt).buttonComponent},get buttonComponentProps(){return n(dt).buttonComponentProps},get tooltipText(){return n(dt).tooltipText},get disabledTooltipContent(){return n(dt).disabledTooltipContent},get disabled(){return n(dt).disabled},get className(){return n(dt).className},get tooltipVisible(){return e.showControls},get ref(){return Wt[n(dt).id]},set ref(xa){Wt[n(dt).id]=xa}})},_i=Bi=>{let xa=m(()=>!!n(dt).disabled);Dm(Bi,{get id(){return n(dt).id},get testId(){return n(dt).testId},get icon(){return n(dt).icon},get ariaLabel(){return n(dt).ariaLabel},get tooltipText(){return n(dt).tooltipText},get disabledTooltipContent(){return n(dt).disabledTooltipContent},get disabled(){return n(xa)},get onClick(){return n(dt).onClick},get disableMouseupTooltipShow(){return n(dt).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return Wt[n(dt).id]},set ref(ul){Wt[n(dt).id]=ul}})};M(Fo,Bi=>{vb(n(dt))?Bi(Qi):Bi(_i,!1)})}$(mt,Di)}),S(ll),S(jr),it(jr,mt=>ni(mt),()=>ni()),S(rn),it(rn,mt=>lt(mt),()=>lt());var dl=A(rn,2);{var td=mt=>{lc(mt,{get ref(){return Wt.interactiveTimeIndicator},set ref(dt){Wt.interactiveTimeIndicator=dt}})};M(dl,mt=>{Cs&&mt(td)})}O((mt,dt,Di)=>{Es=te(rn,1,"wrapper-bottom s-w",null,Es,mt),Ke(rn,`transform: ${e.showControls?"translateY(0)":"translateY(100%)"}`),js=te(jr,1,"controls s-w",null,js,dt),Ke(jr,Di),jr.inert=Re()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||we()}),()=>({"minimal-view":p()}),()=>`transform: translateY(${n(co)()}px);`]),Vn(In,"clientWidth",mt=>D(mi,mt)),$(t,io),H(),o()}import{ChromecastState as wb,PlaybackState as Sb}from"@vkontakte/videoplayer-core/es2015";import{noop as xb}from"@vkontakte/videoplayer-shared/es2015";var Mw=L('<div class="icon icon-error-stub s-1y"><div class="inner s-1y"></div></div>'),Vw=L('<img class="icon s-1y" aria-hidden="true"/>'),Rw={hash:"s-1y",code:".icon.s-1y{height:24px!important;width:24px!important}.inner.s-1y{background-color:var(--white);height:16px;width:16px}"};function jm(t,e){Q(t,Rw);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,xb),s=m(()=>o()===xb),a=m(()=>n(s)||i()),l=K(!1),d=()=>{D(l,!0)},r=m(()=>n(s)?"btn-full-opacity":"");Ht(t,{get className(){return n(r)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(a)},get testId(){return e.testId},children:(u,p)=>{var f=Ve(),v=le(f);{var b=_=>{var w=Mw();$(_,w)},y=_=>{var w=Vw();O(()=>De(w,"src",e.iconUrl)),vt("error",w,d),Ra(w),$(_,w)};M(v,_=>{n(l)?_(b):_(y,!1)})}$(u,f)},$$slots:{default:!0}})}var Dw=Ae('<path d="M8.7 8.1 5.3 4.72A1 1 0 0 1 6.72 3.3L20.7 17.29a1 1 0 0 1-1.41 1.41L16 15.41V20a1 1 0 0 1-1 1c-.64 0-1.26-.25-1.72-.7L7.79 15H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2.77zm2.88-2.76 1.7-1.65A2.5 2.5 0 0 1 15 3a1 1 0 0 1 1 1v5.76z"></path>');function Xm(t){je(t,{testId:"muted-icon",children:(e,i)=>{var o=Dw();$(e,o)},$$slots:{default:!0}})}import{noop as Ow}from"@vkontakte/videoplayer-shared/es2015";function ep(t,e){B(e,!0);let i=g(e,"muted",3,!1),o=g(e,"click",3,Ow),s=g(e,"ref",15,void 0),l=xe().ui.t,d=m(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),r=m(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");Ht(t,{get testId(){return n(r)},get click(){return o()},get ariaLabel(){return n(d)},role:"button",get ref(){return s()},set ref(u){s(u)},children:(u,p)=>{var f=Ve(),v=le(f);{var b=_=>{Xm(_,{})},y=_=>{va(_,{get size(){return"24"}})};M(v,_=>{i()?_(b):_(y,!1)})}$(u,f)},$$slots:{default:!0}}),H()}var Nw=Ae('<path d="M11.64 12.37 9.07 9.8h1.03a.9.9 0 1 0 0-1.8H6.9a.9.9 0 0 0-.9.9v3.2a.9.9 0 0 0 1.8 0v-1.02l2.53 2.52.13.14a.9.9 0 0 0 1.28-1.28z"></path>'),Bw=Ae('<path d="m6.36 9.63 2.57 2.57H7.9a.9.9 0 1 0 0 1.8h3.2a.9.9 0 0 0 .9-.9V9.9a.9.9 0 0 0-1.8 0v1.02L7.67 8.4l-.13-.14a.9.9 0 0 0-1.28 1.28z"></path>'),Hw=Ae('<path d="M7.66 4h6.68q1.2-.01 2 .04.83.06 1.53.38a4 4 0 0 1 1.7 1.7c.24.48.34.98.39 1.54q.05.8.04 2v1.44a.9.9 0 0 1-1.8 0V9.7c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2 2 0 0 0-.92-.92 2 2 0 0 0-.85-.2c-.46-.03-1.04-.03-1.9-.03H7.7c-.85 0-1.44 0-1.9.04-.44.03-.68.1-.85.19a2 2 0 0 0-.92.92c-.09.17-.16.4-.2.85-.03.46-.03 1.05-.03 1.9v2.65c0 .85 0 1.44.04 1.9.03.44.1.68.19.85a2 2 0 0 0 .92.92c.17.08.4.15.85.19.46.03 1.04.04 1.9.04h2.4a.9.9 0 0 1 0 1.8H7.66q-1.2.01-2-.05a4 4 0 0 1-1.53-.38 4 4 0 0 1-1.7-1.7 4 4 0 0 1-.39-1.53q-.05-.8-.04-2V9.65q-.01-1.2.04-2c.05-.56.15-1.06.39-1.53a4 4 0 0 1 1.7-1.7c.47-.24.97-.34 1.53-.39q.8-.05 2-.04M13 16.8c0-.98 0-1.47.19-1.84a2 2 0 0 1 .77-.77c.37-.19.86-.19 1.84-.19h3.4c.98 0 1.47 0 1.85.19q.5.27.76.77c.19.37.19.86.19 1.84v.4c0 .98 0 1.47-.19 1.85a2 2 0 0 1-.77.76c-.37.19-.86.19-1.84.19h-3.4c-.98 0-1.47 0-1.85-.19a2 2 0 0 1-.76-.76c-.19-.38-.19-.87-.19-1.85z"></path><!>',1);function Zm(t,e){let i=g(e,"isActive",3,!1),o=m(()=>i()?"pip-icon--active":"pip-icon");je(t,{get testId(){return n(o)},children:(s,a)=>{var l=Hw(),d=A(le(l));{var r=p=>{var f=Nw();$(p,f)},u=p=>{var f=Bw();$(p,f)};M(d,p=>{i()?p(r):p(u,!1)})}$(s,l)},$$slots:{default:!0}})}import{noop as Fw}from"@vkontakte/videoplayer-shared/es2015";function Jm(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isPictureInPictureActive",3,!1),s=g(e,"click",3,Fw),a=q("menu_pip");Ht(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return s()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{Zm(l,{get isActive(){return o()}})},$$slots:{default:!0}}),H()}import{debounceFn as Cb}from"@vkontakte/videoplayer-shared/es2015";var Uw=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},zw=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},Ww=L("<div><!></div>"),Kw=L("<div><!></div>"),Qw=L("<div><!></div>"),qw=L("<!> <!> <!>",1),Gw=L("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),Yw=L('<div class="wrapper-middle s-z"><!></div>'),jw=L("<div><!></div> <!> <div><!></div>",1),Xw=L('<div aria-hidden="true">·</div> <!>',1),Zw=L('<!> <!> <div><div><div class="controls mobile s-z" data-testid="bottom-controls"><div class="controls-group contain s-z"><!> <!> <!> <!></div> <div class="controls-group s-z"><!> <!> <!></div></div> <!></div></div> <!>',1),Jw={hash:"s-z",code:".wrapper-bottom.s-z{background:var(--controls-gradient);bottom:0;box-sizing:border-box;display:flex;flex-direction:column;height:var(--controls-gradient-height);justify-content:flex-end;left:0;padding:0 4px 8px;pointer-events:none;position:absolute;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.wrapper-bottom.s-z>:where(.s-z){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-z{height:9px;padding:0 4px 4px}.wrapper-middle.s-z{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-z,.wrapper-top-right.s-z{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-z{right:8px;top:4px}.wrapper-top-left.s-z{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-z,.wrapper-middle-left-second.s-z,.wrapper-middle-right.s-z{align-items:center;background-color:rgba(0,0,0,.56);border-radius:12px;display:flex;height:44px;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}.wrapper-middle-left.s-z{left:12px}.wrapper-middle-left-second.s-z{left:64px}.wrapper-middle-right.s-z{right:12px}.controls.s-z{align-items:center;box-sizing:border-box;font-size:13px;height:var(--controls-height);justify-content:space-between;padding:0 4px;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);white-space:nowrap;width:100%;will-change:transform}.controls.s-z,.controls-group.s-z{display:flex}.controls-group.contain.s-z{min-width:0}.controls-group.s-z >:not(:first-child){margin-left:8px}.hidden.s-z{opacity:0;visibility:hidden}.controls-hidden.s-z{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-z{transition:none}.overlay-mobile.s-z{background-color:rgba(0,0,0,.3);height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:opacity var(--controls-transition-duration);width:100%}@media screen and (orientation:portrait){.wrapper-top-left.fullscreen.s-z,.wrapper-top-right.fullscreen.s-z{top:16px}.controls-wrapper.fullscreen.s-z{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-z{left:44px;top:12px}.wrapper-top-right.fullscreen.s-z{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-z{left:44px}.wrapper-middle-left-second.fullscreen.s-z{left:96px}.wrapper-middle-right.fullscreen.s-z{right:44px}.controls-wrapper.fullscreen.s-z{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function ev(t,e){var vo,Er;B(e,!0),Q(t,Jw);let[i,o]=Be(),s=()=>x(Ct,"$seekToInteractiveDisabledTooltip$",i),a=()=>x(gi,"$disabledControls$",i),l=()=>x(Rt,"$playbackState$",i),d=()=>x(eo,"$adPlaybackState",i),r=()=>x(Te,"$isEnded$",i),u=()=>x(Ao,"$playerSize",i),p=()=>x(ht,"$scrubbingInProgress",i),f=()=>x(Ji,"$chromecastState$",i),v=()=>x(qe,"$isPictureInPictureActive",i),b=()=>x(Ue,"$pictureInPictureType$",i),y=()=>x(ye,"$mobileNotReportControlHidden$",i),_=()=>x(si,"$chromecastHidden",i),w=()=>x(lt,"$playerPhase",i),I=()=>x(Ai,"$pipHidden",i),T=()=>x(We,"$currentGridType$",i),R=()=>x(bi,"$vkLogoHidden",i),k=()=>x(Yt,"$volumeHidden",i),P=()=>x(G,"$isLive$",i),E=()=>x(st,"$settingsMenuVisible",i),W=()=>x(Ie,"$isRewindableLive$",i),U=()=>x(Oe,"$isActiveLive$",i),z=()=>x(Dt,"$isAudioAvailable$",i),Y=()=>x(be,"$muted$",i),ie=()=>x(Ne,"$volume$",i),J=()=>x(pi,"$isInteractiveTime$",i),oe=()=>x(bn,"$settingButtonRef$",i),de=()=>x(ui,"$startedByKeyboard$",i),ae=()=>x(bo,"$isFullscreen",i),pe=()=>x(pn,"$additionalButtons$",i),ee=()=>x(Mi,"$autoplayNextToggleHidden",i),$e=()=>x(It,"$crashed$",i),Ee=()=>x(Zi,"$settingsHidden",i),ce=()=>x(so,"$graphIsOpened$",i),Qe=()=>x(Si,"$adPosition",i),fe=()=>x(at,"$adDuration",i),ve=()=>x(wt,"$position$",i),X=()=>x(ni,"$duration$",i),N=g(e,"playerControlsWrapperRef",15,void 0),me=g(e,"playerControlsRef",15,void 0),ue=g(e,"isAds",3,!1),Re=g(e,"logoTargetUrl",3,""),Je=g(e,"isOneVideoPlaylist",3,!1),ke=g(e,"customFullscreenSupported",3,!0),j=xe(),ne=_o(),Se=Lt(),Le=j.actions.internal.toggleMuted,ze=j.actions.internal.togglePlay,Ce=j.actions.internal.pause,we=j.actions.internal.prevVideoClick,Fe=j.actions.internal.nextVideoClick,rt=j.actions.internal.checkFullscreenSupport,ut=(vo=j.callbacks)==null?void 0:vo.onAudioDoesNotExistHint,Mt=(Er=j.callbacks)==null?void 0:Er.onAudioDisabledHint,lt=j.playerPhase,ni=j.state.duration$,wt=j.state.positionWithScrubbing$,Rt=j.state.playbackState$,Dt=j.state.isAudioAvailable$,Qt=j.state.isAudioDisabled,Te=j.state.isEnded$,G=j.state.isLive$,Ne=j.state.volume$,be=j.state.muted$,Oe=j.state.isActiveLive$,Ie=j.state.isRewindableLive$,ht=j.ui.scrubbingInProgress,ye=j.ui.mobileNotReportControlHidden$,{isActive$:qe,type$:Ue}=ne.pictureInPicture$,st=j.ui.settingsMenu.visible$,qt=j.ui.settingsMenu.openedByBtnKeyboard$,Pt=j.ui.controls,{volume:Yt,vkLogo:bi,autoplayNextToggle:Mi,pip:Ai,settings:Zi,chromecast:si}=j.ui.hiddenControls,pt=j.actions.internal.getVideoEpisodes(),di=j.webApi.pictureInPictureApi,Ji=j.state.chromecastState$,It=j.state.crashed$,gi=Pt.disabledControls$,ui=j.ui.startedByKeyboard$,We=j.ui.currentGridType$,at=j.ads.duration,Si=j.ads.position,eo=j.ads.playbackState,bo=j.ui.isFullscreen,Ao=j.ui.playerSize,pn=j.ui.additionalButtonsDeprecated$,F=j.actions.internal.getVideoElement,ot=j.actions.internal.replayInteractive,Ut=j.state.isInteractive,pi=j.state.isInteractiveTime$,ct=j.state.showInteractiveGraph,ai=j.state.showSeekToInteractive,fi=j.state.showPlayPrevChapter,Gt=j.state.showInteractiveTimeIndicator,Ct=ne.seekToInteractiveDisabledTooltip$,so=ne.graphIsOpened$,ko=j.ui.controlBlocks,Nn=m(()=>q(j.state.playPrevChapterDisabledTooltip)),fn=m(()=>q(s())),ki=m(()=>a().has("EPISODE_BUTTON")),xi=m(()=>a().has("GRAPH_BUTTON")),Xo=m(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),ir=m(()=>a().has("PLAY_BUTTON")),hi=m(()=>a().has("REPLAY_BUTTON")),$o=m(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),mn=m(()=>l()===Sb.PLAYING),Lo=m(()=>d()==="paused"),vn=m(()=>r()&&!ue()&&!Ut),Cs=m(()=>!r()||ue()),Ts=m(()=>e.showNextPrevButtons&&!ue()&&e.prevButtonActive),ss=m(()=>e.showNextPrevButtons&&!ue()&&e.nextButtonActive),xr=m(()=>u().width>300),gn=m(()=>u().width>400),hn=m(p),or=m(()=>f()!==wb.NOT_AVAILABLE&&!(v()&&b()===1)&&!y()&&!Ut&&!_()),wr=m(()=>w()==="LiveWaitingStart"),nr=m(()=>!!di&&f()!==wb.CONNECTED&&!y()&&(b()===1&&n(wr)||!n(wr))&&!n(hn)&&!Ut&&!I()),Br=K(!1);kt(()=>{let et=di==null?void 0:di.info.isActive$.subscribe(_t=>D(Br,_t,!0));return()=>et==null?void 0:et.unsubscribe()});let Hr=m(()=>!n(hn)&&ro(T(),"s")),Bn=m(()=>!e.logoHidden&&u().width>350&&!R()),rr=m(()=>Se.features.fullscreen&&rt()&&!(v()&&b()===1)&&(Ut?ke():!0)&&!n(hn)&&!n(Br)),Hn=m(()=>!k()&&!n(hn)),sr=m(()=>(!P()||ue())&&u().width>260&&!n(hn)&&!(Se.features.interactiveHideTime&&Ut)),Fr=m(()=>E()||e.showControls),Ur=m(()=>!ue()&&!P()&&!!(pt!=null&&pt.length)&&n(xr)&&!n(ki)&&!n(hn)),Ci=m(()=>!W()||!!U()),as=m(()=>ct&&ro(T(),"m")),Zo=m(()=>!z()||Y()||ie()===0),gt=ri({}),jt=ri({}),ar=Cb(Yl,260),Fn=Cb(Ju,260);He(()=>{u(),J(),ar(F(),Pt,gt,e.showControls),Fn(F(),ko,jt,e.showControls)});let zr=()=>j.actions.internal.toggleChromecast();function Sr(){return bt(this,null,function*(){di!=null&&di.isActive()?yield di==null?void 0:di.exit():yield di==null?void 0:di.request()})}function Wr(){fa({isAudioDisabled:Qt,audioDisabledHintCallback:Mt,isAudioAvailable:z(),audioIsNotExistHintCallback:ut,isAds:ue()})&&Le()}let _n=K(""),Jo=(et,_t)=>{if(!et){D(_n,q("tooltip_live"),!0);return}_t&&_t===Sb.PAUSED&&D(_n,q("tooltip_play"),!0)};He(()=>{Jo(n(Ci),l())});let bn=se();He(()=>{oe()&&Bl(oe(),E(),qt)}),He(()=>{Xu(ui,de(),gt.playButton)});var Cr=Zw(),Tr=le(Cr);{var $n=et=>{var _t=Gw(),Zt=le(_t);let Vi;var lo=A(Zt,2);let Ni;it(lo,ft=>jt.topLeft=ft,()=>jt==null?void 0:jt.topLeft);var go=A(lo,2);let Do;var Tn=C(go);yi(Tn,1,pe,({iconUrl:ft,ariaLabel:li,testId:No,onClick:ur,tooltip:kr})=>ft,(ft,li)=>{let No=()=>n(li).iconUrl,ur=()=>n(li).ariaLabel,kr=()=>n(li).testId,Bo=()=>n(li).onClick,Ii=()=>n(li).tooltip,fs=m(()=>{var co;return(co=ur())!=null?co:Ii()});jm(ft,{get iconUrl(){return No()},get ariaLabel(){return n(fs)},get testId(){return kr()},get onClick(){return Bo()}})});var zn=A(Tn,2);{var ho=ft=>{uc(ft,{get ref(){return gt.autoplayNextToggle},set ref(li){gt.autoplayNextToggle=li}})};M(zn,ft=>{e.showAutoplayNext&&!Je()&&!ee()&&ft(ho)})}var en=A(zn,2);{var Pr=ft=>{tc(ft,{isMobile:!0,click:zr,get state(){return f()},get ref(){return gt.chromecast},set ref(li){gt.chromecast=li}})};M(en,ft=>{n(or)&&ft(Pr)})}var Ar=A(en,2);{var So=ft=>{Jm(ft,{click:Sr,get isPictureInPictureActive(){return v()},get ref(){return gt.pip},set ref(li){gt.pip=li}})};M(Ar,ft=>{n(nr)&&ft(So)})}var dr=A(Ar,2);{var Wn=ft=>{zl(ft,{get ref$(){return bn}})};M(dr,ft=>{$e()&&!Ee()&&ft(Wn)})}var ps=A(dr,2);{var tt=ft=>{Jd(ft,{get click(){return Ce},get targetUrl(){return Re()},get logoClickable(){return e.logoClickable},get ref(){return gt.vkLogo},set ref(li){gt.vkLogo=li}})};M(ps,ft=>{n(Bn)&&ft(tt)})}S(go),it(go,ft=>jt.topRight=ft,()=>jt==null?void 0:jt.topRight);var Nt=A(go,2);let Ti;var tn=C(Nt);{var Oo=ft=>{let li=m(()=>we.bind(null,!0));Ga(ft,{get click(){return n(li)},type:"prev",isMobile:!0,get ref(){return gt.prevButton},set ref(No){gt.prevButton=No}})};M(tn,ft=>{n(Ts)&&ft(Oo)})}var qr=A(tn,2);{var on=ft=>{Xl(ft,{get disabled(){return n(ir)},get click(){return ze},isMobile:!0,get isPlaying(){return n(mn)},get ref(){return gt.playButton},set ref(li){gt.playButton=li}})};M(qr,ft=>{n(Cs)&&ft(on)})}var cr=A(qr,2);{var Gr=ft=>{jl(ft,{get disabled(){return n(hi)},get click(){return ze},isMobile:!0,get ref(){return gt.replayButton},set ref(li){gt.replayButton=li}})};M(cr,ft=>{n(vn)&&ft(Gr)})}var Is=A(cr,2);{var Gs=ft=>{let li=m(()=>Fe.bind(null,!0));Ga(ft,{get click(){return n(li)},type:"next",isMobile:!0,get ref(){return gt.nextButton},set ref(No){gt.nextButton=No}})};M(Is,ft=>{n(ss)&&ft(Gs)})}S(Nt),it(Nt,ft=>jt.middle=ft,()=>jt==null?void 0:jt.middle);var Kn=A(Nt,2);{var ba=ft=>{var li=qw(),No=le(li);{var ur=co=>{var Ki=Ww();let nn;Ki.__click=[Uw,$o,e,Nn];var Qn=C(Ki);let Yr=m(()=>!e.showControls);cc(Qn,{get hidden(){return n(Yr)},get disabled(){return n($o)},get click(){return e.playPrevChapter},get ref(){return gt.playPrevChapterButton},set ref(ge){gt.playPrevChapterButton=ge}}),S(Ki),O(ge=>nn=te(Ki,1,"wrapper-middle-left s-z",null,nn,ge),[()=>({fullscreen:ae(),hidden:!e.showControls})]),$(co,Ki)};M(No,co=>{fi&&co(ur)})}var kr=A(No,2);{var Bo=co=>{var Ki=Kw();let nn;var Qn=C(Ki);let Yr=m(()=>!e.showControls&&!ce());fc(Qn,{get hidden(){return n(Yr)},get disabled(){return n(xi)},get click(){return so.toggle},get graphIsOpened(){return ce()},get ref(){return gt.interactiveGraphButton},set ref(ge){gt.interactiveGraphButton=ge}}),S(Ki),O(ge=>nn=te(Ki,1,Id(fi?"wrapper-middle-left-second":"wrapper-middle-left"),"s-z",nn,ge),[()=>({fullscreen:ae(),hidden:!e.showControls&&!ce()})]),$(co,Ki)};M(kr,co=>{n(as)&&co(Bo)})}var Ii=A(kr,2);{var fs=co=>{var Ki=Qw();let nn;Ki.__click=[zw,Xo,e,fn];var Qn=C(Ki);let Yr=m(()=>!e.showControls);pc(Qn,{get hidden(){return n(Yr)},get disabled(){return n(Xo)},get click(){return e.seekToInteractive},get ref(){return gt.seekToInteractiveButton},set ref(ge){gt.seekToInteractiveButton=ge}}),S(Ki),O(ge=>nn=te(Ki,1,"wrapper-middle-right s-z",null,nn,ge),[()=>({fullscreen:ae(),hidden:!e.showControls})]),$(co,Ki)};M(Ii,co=>{ai&&co(fs)})}$(ft,li)};M(Kn,ft=>{Ut&&!p()&&ft(ba)})}O((ft,li,No,ur)=>{Vi=te(Zt,1,"overlay-mobile s-z",null,Vi,ft),Ni=te(lo,1,"wrapper-top-left s-z",null,Ni,li),Do=te(go,1,"wrapper-top-right s-z",null,Do,No),Ti=te(Nt,1,"wrapper-middle s-z",null,Ti,ur)},[()=>({hidden:!n(Fr)}),()=>({hidden:!e.showControls,fullscreen:ae()}),()=>({hidden:!e.showControls&&!y(),fullscreen:ae()}),()=>({hidden:!e.showControls||p()||e.endScreenShown&&e.showNextPrevButtons})]),$(et,_t)};M(Tr,et=>{ue()||et($n)})}var yn=A(Tr,2);{var lr=et=>{var _t=jw(),Zt=le(_t);let Vi;var lo=C(Zt);ep(lo,{get muted(){return Y()},click:Wr,get ref(){return gt.volume},set ref(ho){gt.volume=ho}}),S(Zt);var Ni=A(Zt,2);{var go=ho=>{var en=Yw(),Pr=C(en);let Ar=m(()=>!n(Lo));Xl(Pr,{get disabled(){return n(ir)},get click(){return ze},isMobile:!0,get isPlaying(){return n(Ar)},get ref(){return gt.playButton},set ref(So){gt.playButton=So}}),S(en),$(ho,en)};M(Ni,ho=>{n(Lo)&&ho(go)})}var Do=A(Ni,2);let Tn;var zn=C(Do);vc(zn,{get position(){return Qe()},get duration(){return fe()}}),S(Do),O((ho,en)=>{Vi=te(Zt,1,"wrapper-top-right s-z",null,Vi,ho),Tn=te(Do,1,"wrapper-bottom ads-timeline-mobile s-z",null,Tn,en)},[()=>({fullscreen:ae()}),()=>({fullscreen:ae()})]),$(et,_t)};M(yn,et=>{ue()&&d()!=="inactive"&&et(lr)})}var Li=A(yn,2);let yo;var Mo=C(Li);let ao;var xn=C(Mo),wn=C(xn),Kr=C(wn);{var St=et=>{Po(et,{get disabled(){return n(hi)},get ref(){return gt.replayButton},set ref(_t){gt.replayButton=_t},children:(_t,Zt)=>{jl(_t,{get disabled(){return n(hi)},get click(){return ot}})},$$slots:{default:!0}})};M(Kr,et=>{Ut&&et(St)})}var mi=A(Kr,2);{var Wt=et=>{Po(et,{get ref(){return gt.liveButton},set ref(_t){gt.liveButton=_t},children:(_t,Zt)=>{mc(_t,{get isLiveActive(){return n(Ci)},isMobile:!0,get ariaLabel(){return n(_n)}})},$$slots:{default:!0}})};M(mi,et=>{!ue()&&P()&&et(Wt)})}var Vo=A(mi,2);{var xo=et=>{let _t=m(()=>ue()?Qe():ve()),Zt=m(()=>ue()?fe():X()),Vi=m(()=>!e.showControls);jd(et,{get showDuration(){return n(gn)},get position(){return n(_t)},get duration(){return n(Zt)},isMobile:!0,get isHidden(){return n(Vi)},get ref(){return gt.time},set ref(lo){gt.time=lo}})};M(Vo,et=>{n(sr)&&et(xo)})}var Sn=A(Vo,2);let wo=m(()=>!n(Ur));Po(Sn,{className:"w-max",get disabled(){return n(wo)},get ref(){return gt.episodes},set ref(et){gt.episodes=et},children:(et,_t)=>{var Zt=Ve(),Vi=le(Zt);{var lo=Ni=>{var go=Xw(),Do=A(le(go),2);ic(Do,{get position(){return ve()},get duration(){return X()},get timeCodes(){return pt}}),$(Ni,go)};M(Vi,Ni=>{n(Ur)&&Ni(lo)})}$(et,Zt)},$$slots:{default:!0}}),S(wn),it(wn,et=>jt.bottomLeft=et,()=>jt==null?void 0:jt.bottomLeft);var Cn=A(wn,2),Wi=C(Cn);{var Ir=et=>{Po(et,{get ref(){return gt.volume},set ref(_t){gt.volume=_t},children:(_t,Zt)=>{ep(_t,{get muted(){return n(Zo)},click:Wr})},$$slots:{default:!0}})};M(Wi,et=>{n(Hn)&&et(Ir)})}var Ro=A(Wi,2);{var Un=et=>{Po(et,{get ref(){return gt.settings},set ref(_t){gt.settings=_t},children:(_t,Zt)=>{zl(_t,{get ref$(){return bn}})},$$slots:{default:!0}})};M(Ro,et=>{n(Hr)&&et(Un)})}var ls=A(Ro,2);{var ds=et=>{Po(et,{get ref(){return gt.fullscreen},set ref(_t){gt.fullscreen=_t},children:(_t,Zt)=>{Zd(_t,{get click(){return e.toggleFullscreen},get isFullscreen(){return ae()}})},$$slots:{default:!0}})};M(ls,et=>{n(rr)&&et(ds)})}S(Cn),it(Cn,et=>jt.bottomRight=et,()=>jt==null?void 0:jt.bottomRight),S(xn),it(xn,et=>me(et),()=>me());var cs=A(xn,2);let to=m(()=>!e.showControls);ja(cs,{get isHidden(){return n(to)},get isAds(){return ue()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return W()},get ref(){return gt.timeline},set ref(et){gt.timeline=et}}),S(Mo),it(Mo,et=>jt.bottom=et,()=>jt==null?void 0:jt.bottom),S(Li),it(Li,et=>N(et),()=>N());var us=A(Li,2);{var Qr=et=>{lc(et,{get ref(){return gt.interactiveTimeIndicator},set ref(_t){gt.interactiveTimeIndicator=_t}})};M(us,et=>{Gt&&et(Qr)})}O((et,_t)=>{yo=te(Li,1,"wrapper-bottom mobile s-z",null,yo,et),Ke(Li,`transform: ${e.showControls?"translateY(0)":"translateY(100%)"}`),ao=te(Mo,1,"controls-wrapper s-z",null,ao,_t)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:ae()})]),$(t,Cr),H(),o()}Ze(["click"]);function gc(t,e){B(e,!0);let[i,o]=Be(),s=()=>x(I,"$isMobile",i),a=g(e,"bottomNoSmooth",3,!1),l=g(e,"playerControlsWrapperRef",15,void 0),d=g(e,"playerControlsRef",15,void 0),r=g(e,"isAds",3,!1),u=g(e,"logoTargetUrl",3,""),p=g(e,"showAutoplayNext",3,!1),f=g(e,"isOneVideoPlaylist",3,!1),v=g(e,"customFullscreenSupported",3,!0),b=g(e,"endScreenShown",3,!1),y=g(e,"onDisabledPlayPrevChapterClick",3,Tb),_=g(e,"onDisabledSeekToInteractiveClick",3,Tb),I=xe().ui.isMobile,T=K(!1);kt(()=>{let E=setTimeout(()=>D(T,!0),0);return()=>clearTimeout(E)});var R=Ve(),k=le(R);{var P=E=>{var W=Ve(),U=le(W);{var z=ie=>{ev(ie,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return r()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get showAutoplayNext(){return p()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return f()},get customFullscreenSupported(){return v()},get endScreenShown(){return b()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return y()},get onDisabledSeekToInteractiveClick(){return _()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(J){l(J)},get playerControlsRef(){return d()},set playerControlsRef(J){d(J)}})},Y=ie=>{Ym(ie,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return r()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get isOneVideoPlaylist(){return f()},get showAutoplayNext(){return p()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return v()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(J){l(J)},get playerControlsRef(){return d()},set playerControlsRef(J){d(J)}})};M(U,ie=>{s()?ie(z):ie(Y,!1)})}$(E,W)};M(k,E=>{n(T)&&E(P)})}$(t,R),H(),o()}var eS=Ae('<path d="M23.75 31.2v-5.45l-11.84 6.7a1.45 1.45 180 01-2.16-1.25v-14.4a1.45 1.45 180 012.16-1.26l11.84 6.7v-5.44a1.45 1.45 180 012.16-1.26l12.7 7.19a1.45 1.45 180 010 2.52l-12.7 7.2a1.45 1.45 180 01-2.16-1.27Z"></path>');function hc(t,e){B(e,!0);let i=m(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=m(()=>`${dn(e.size)}${n(i)}`);je(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(o)},get testId(){return e.testId},get shadow(){return e.shadow},children:(s,a)=>{var l=eS();$(s,l)},$$slots:{default:!0}}),H()}var tS=Ae('<path d="M32.46 9.53a1.16 1.16 90 010 1.96l-7.66 4.83c-.78.49-1.8-.07-1.8-.98v-3.3a14 14 90 1014.1 18.93 1.5 1.5 90 012.8 1.06 17 17 90 11-16.9-23V5.66c0-.91 1.03-1.47 1.8-.98z"></path>');function tv(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=m(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),s=m(()=>`seek-icon-${i()?"backward":"forward"}`);je(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(s)},get shadow(){return e.shadow},children:(a,l)=>{var d=tS();$(a,d)},$$slots:{default:!0}}),H()}var iS=L('<span class="hot-key-helpers-text s-1d"> </span>'),oS=L('<div data-testid="hotkey-helper-icon" class="s-1d"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),nS=L("<div><!></div>"),rS={hash:"s-1d",code:'.hot-key-helpers-container.s-1d{align-items:center;animation:s-1d-fadeIn ease var(--controls-transition-duration);box-sizing:border-box;display:flex;flex-direction:column;height:120px;left:calc(50% - 100px);padding-top:14px;position:absolute;top:calc(50% - 40px);width:200px;z-index:var(--hot-key-helpers-container-z-index)}.hot-key-helpers-container--left.s-1d{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-1d{left:calc(75% - 100px)}.hot-key-helpers-text.s-1d{display:-webkit-box;font-feature-settings:"clig" off,"liga" off;font-size:15px;font-style:normal;font-weight:600;letter-spacing:-.105px;-webkit-line-clamp:2;line-height:20px;margin-top:4px;max-height:40px;overflow:hidden;text-align:center;text-overflow:ellipsis;text-shadow:0 0 5px rgba(0,0,0,.16);white-space:pre-wrap;width:100%;-webkit-box-orient:vertical}.hidden.s-1d{animation:s-1d-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-1d-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-1d-fadeOut{0%{opacity:1}to{opacity:0}}'};function iv(t,e){B(e,!0),Q(t,rS);let[i,o]=Be(),s=()=>x(e.data,"$data",i),a=xe(),{features:l}=Lt(),d=a.ui.t,r=m(()=>!s()),u=m(()=>{var I;return((I=s())==null?void 0:I.type)==="BACKWARD_SEEK"}),p=m(()=>{var I;return((I=s())==null?void 0:I.type)==="FORWARD_SEEK"}),f=m(()=>{var I;return(I=s())==null?void 0:I.type}),v=m(()=>{var I,T;return(I=s())!=null&&I.t?d(s().t.key,{value:s().t.value||""}):(T=s())==null?void 0:T.text});var b=nS();let y;var _=C(b);{var w=I=>{var T=oS(),R=le(T),k=C(R);{var P=me=>{let ue=m(()=>n(f)==="BACKWARD_SEEK");tv(me,{get reversed(){return n(ue)},shadow:!0})};M(k,me=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(f))&&me(P)})}var E=A(k,2);{var W=me=>{Qs(me,{get size(){return"48"},shadow:!0})};M(E,me=>{n(f)==="PAUSE"&&!l.playbackStatusShow&&me(W)})}var U=A(E,2);{var z=me=>{Dn(me,{get size(){return"48"},shadow:!0})};M(U,me=>{n(f)==="PLAY"&&!l.playbackStatusShow&&me(z)})}var Y=A(U,2);{var ie=me=>{dc(me,{get size(){return"48"},shadow:!0})};M(Y,me=>{n(f)==="REPLAY"&&!l.playbackStatusShow&&me(ie)})}var J=A(Y,2);{var oe=me=>{ma(me,{get size(){return"48"},type:"off",shadow:!0})};M(J,me=>{n(f)==="SUBTITLES_OFF"&&me(oe)})}var de=A(J,2);{var ae=me=>{ma(me,{get size(){return"48"},shadow:!0})};M(de,me=>{n(f)==="SUBTITLES_ON"&&me(ae)})}var pe=A(de,2);{var ee=me=>{let ue=m(()=>n(f)==="RATE_DOWN");hc(me,{get size(){return"48"},get reversed(){return n(ue)},testId:"rate-change-icon",shadow:!0})};M(pe,me=>{["RATE_DOWN","RATE_UP"].includes(n(f))&&me(ee)})}var $e=A(pe,2);{var Ee=me=>{let ue=m(()=>n(f)==="EPISODE_PREV");ha(me,{get size(){return"48"},get reversed(){return n(ue)},shadow:!0})};M($e,me=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(f))&&me(Ee)})}var ce=A($e,2);{var Qe=me=>{va(me,{get size(){return"48"},volume:0,shadow:!0})};M(ce,me=>{n(f)==="MUTE"&&me(Qe)})}var fe=A(ce,2);{var ve=me=>{va(me,{get size(){return"48"},volume:1,shadow:!0})};M(fe,me=>{n(f)==="VOLUME"&&me(ve)})}S(R);var X=A(R,2);{var N=me=>{var ue=iS(),Re=C(ue,!0);S(ue),O(()=>he(Re,n(v))),$(me,ue)};M(X,me=>{n(v)&&me(N)})}O(()=>De(R,"data-type",n(f))),$(I,T)};M(_,I=>{!n(r)&&n(f)&&I(w)})}S(b),O(I=>y=te(b,1,"hot-key-helpers-container s-1d",null,y,I),[()=>({hidden:n(r),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(p)})]),$(t,b),H(),o()}var sS=(t,e,i,o,s,a)=>{if(e.has(t.code))switch(t.preventDefault(),t.stopPropagation(),t.code){case"ArrowUp":i();break;case"ArrowDown":o();break;case"ArrowLeft":s();break;case"ArrowRight":a();break}},aS=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},lS=L('<div tabindex="0" role="button"><div class="button-block s-i" aria-hidden="true"><div class="button-row s-i"><div class="button button-up s-i"><!></div> <div class="button button-right s-i"><!></div></div> <div class="button-row s-i"><div class="button button-left s-i"><!></div> <div class="button button-down s-i"><!></div></div></div></div>'),dS={hash:"s-i",code:".immersive-controls.s-i{background-color:rgba(0,0,0,.56);border-radius:8px;display:flex;flex-direction:row;height:56px;left:10px;position:absolute;top:10px;transition-duration:var(--controls-transition-duration);transition-property:top,left;transition-timing-function:var(--controls-transition-fn);width:56px}.immersive-controls.m-shifted.s-i{left:20px;top:50px}.button-block.s-i{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-i{display:flex;flex-direction:row;position:relative}.button.s-i{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-i svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-i svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-i svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-i svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-i svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-i:hover svg{opacity:1}"};function _c(t,e){B(e,!0),Q(t,dS);let i=g(e,"isShifted",3,!1),o=xe(),s=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},l=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},r=()=>{o.actions.internal.startCameraManualRotation(-1,0)},u=()=>(o.actions.internal.stopCameraManualRotation(),null),p=q("aria_label_spherical_control");var f=lS();let v;f.__keydown=[sS,s,a,l,r,d],f.__keyup=[aS,s,u];var b=C(f),y=C(b),_=C(y);_.__mousedown=a,_.__mouseup=u;var w=C(_);Or(w,{direction:"up",useBtnColor:!0}),S(_);var I=A(_,2);I.__mousedown=d,I.__mouseup=u;var T=C(I);Or(T,{direction:"up",useBtnColor:!0}),S(I),S(y);var R=A(y,2),k=C(R);k.__mousedown=r,k.__mouseup=u;var P=C(k);Or(P,{direction:"up",useBtnColor:!0}),S(k);var E=A(k,2);E.__mousedown=l,E.__mouseup=u;var W=C(E);Or(W,{direction:"up",useBtnColor:!0}),S(E),S(R),S(b),S(f),O(U=>{v=te(f,1,"immersive-controls s-i",null,v,U),De(f,"aria-label",p)},[()=>({"m-shifted":i()})]),vt("mouseleave",_,u),vt("mouseleave",I,u),vt("mouseleave",k,u),vt("mouseleave",E,u),$(t,f),H()}Ze(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as Eb,Subscription as cS,filterChanged as uS,filter as pS}from"@vkontakte/videoplayer-shared/es2015";var Ib=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var tp=class{constructor(){this.flickeringTimeout=Ib(1e3);this.subscriptions=new cS;this.isAuto=!1;this.isLive=!1;this.captions$=new Eb([]);this.captionsPrepared$=new Eb([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(pS(()=>this.isEnabled()),uS()).subscribe(e=>{this.processCaptions(e)})),this}setIsAuto(e){this.isAuto=e}setIsLive(e){this.isLive=e}setCaptions(e){this.captions$.next(e)}destroy(){this.subscriptions.unsubscribe(),this.flickeringTimeout.clear()}isEnabled(){return this.isAuto&&!this.isLive}processCaptions(e){if(!e.length){this.flickeringTimeout.add(()=>{this.captionsPrepared$.next([])});return}this.flickeringTimeout.clear();let i=[],o=e.length>1&&e[0].type!=="timestamp"&&e[1].type!=="timestamp";o&&i.push([{value:String(e[0].value),timeAppeared:null}]),i.push(e.reduce((s,{type:a,value:l},d)=>(o&&!d||(a==="timestamp"?s.push({timeAppeared:Number(l),value:""}):s.length===0?s.push({value:String(l)}):s[s.length-1].value=String(l)),s),[])),this.captionsPrepared$.next(i)}};var fS=L('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),mS=L('<span class="caption-line s-a"><span class="caption-segment s-a"></span></span>'),vS=L('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),gS=L('<div><span class="caption s-a"><!></span></div>'),hS=L("<div><!></div>"),_S={hash:"s-a",code:".subtitles-container.s-a{height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:transform var(--controls-transition-duration);width:100%}.subtitles-container.shifted.s-a{transform:translateY(calc(var(--controls-height)*-1))}.subtitles-container.preview-track-active.s-a{transform:translateY(calc(var(--preview-track-height)*-1))}.preview-track-active.s-a .subtitles-caption:where(.s-a){bottom:var(--preview-track-controls-top-offset)}.subtitles-caption.s-a{bottom:4%;display:flex;justify-content:center;left:4%;position:absolute;right:4%}.subtitles-caption.mobile.s-a{bottom:8%}.subtitles-container.auto.s-a .subtitles-caption:where(.s-a){left:var(--subtitles-caption-margin);right:var(--subtitles-caption-margin)}.caption.s-a{background:rgba(0,0,0,.4);border-radius:4px;display:block;overflow-wrap:normal;padding:4px 8px}.subtitles-container.auto.s-a .caption:where(.s-a){width:100%}.caption-line.s-a{display:block;text-align:center}.subtitles-container.auto.s-a .caption-line:where(.s-a){text-align:left}.caption-segment.s-a{color:var(--white);display:inline-block;font-size:13px;line-height:1.2;white-space:pre-wrap}"};function Za(t,e){B(e,!0),Q(t,_S);let[i,o]=Be(),s=()=>x(v,"$currentSubtitle$",i),a=()=>x(y,"$isLive$",i),l=()=>x(_,"$isFullscreen",i),d=()=>x(w,"$previewTrackActive",i),r=()=>x(b,"$isAutoSubtitleCaptionVisible$",i),u=g(e,"isMobile",3,!1),p=xe(),f=Lt(),v=p.state.currentSubtitle$,b=p.state.isAutoSubtitleCaptionVisible$,y=p.state.isLive$,_=p.ui.isFullscreen,w=p.ui.previewTrackActive,I=m(()=>!!s().isAuto),T=m(()=>!!a()),R=m(()=>e.playerSize.width*.02),k=m(()=>u()&&!l()||n(R)<=f.minSubtitlesFontSize?f.minSubtitlesFontSize:n(R)),P=K(null);He(()=>{var J,oe,de;(J=n(P))==null||J.setIsAuto(n(I)),(oe=n(P))==null||oe.setIsLive(n(T)),(de=n(P))==null||de.setCaptions(e.captions)});let E=K(ri([[]]));kt(()=>{D(P,new tp().subscribe(),!0);let J=n(P).captionsPrepared$.subscribe(oe=>{D(E,oe,!0)});return()=>{var oe;(oe=n(P))==null||oe.destroy(),J.unsubscribe()}}),kt(()=>{if(n(I)){let J=window.setTimeout(()=>{b.set(!1)},f.autoSubtitlesTimeout);return()=>{window.clearTimeout(J)}}else b.set(!1)});let W=m(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var U=hS();let z;var Y=C(U);{var ie=J=>{var oe=gS();let de;var ae=C(oe),pe=C(ae);{var ee=Ee=>{var ce=fS(),Qe=C(ce),fe=C(Qe,!0);S(Qe),S(ce),O(ve=>{var X;Ke(Qe,`font-size: ${(X=n(k))!=null?X:""}px`),he(fe,ve)},[()=>q("subtitles_auto_caption")]),$(Ee,ce)},$e=(Ee,ce)=>{{var Qe=ve=>{var X=Ve(),N=le(X);yi(N,17,()=>n(E),Cd,(me,ue)=>{var Re=mS(),Je=C(Re);yi(Je,21,()=>n(ue),({value:ke,timeAppeared:j})=>j,(ke,j)=>{let ne=()=>n(j).value,Se=()=>n(j).timeAppeared;var Le=Ve(),ze=le(Le);{var Ce=we=>{var Fe=bs();O(()=>he(Fe,ne())),$(we,Fe)};M(ze,we=>{(!Se()||Se()<=e.position)&&we(Ce)})}$(ke,Le)}),S(Je),S(Re),O(()=>{var ke;return Ke(Je,`font-size: ${(ke=n(k))!=null?ke:""}px`)}),$(me,Re)}),$(ve,X)},fe=ve=>{var X=Ve(),N=le(X);yi(N,17,()=>e.captions,({value:me})=>me,(me,ue)=>{let Re=()=>n(ue).value;var Je=vS(),ke=C(Je),j=C(ke,!0);S(ke),S(Je),O(()=>{var ne;Ke(ke,`font-size: ${(ne=n(k))!=null?ne:""}px`),he(j,Re())}),$(me,Je)}),$(ve,X)};M(Ee,ve=>{var X;n(I)&&((X=n(E))!=null&&X.length)?ve(Qe):ve(fe,!1)},ce)}};M(pe,Ee=>{n(I)&&r()?Ee(ee):Ee($e,!1)})}S(ae),S(oe),O(Ee=>{var ce;de=te(oe,1,"subtitles-caption s-a",null,de,Ee),Ke(oe,`--subtitles-caption-margin: ${(ce=n(W))!=null?ce:""}%`)},[()=>({mobile:u()})]),$(J,oe)};M(Y,J=>{var oe;(e.captions.length||(oe=n(E))!=null&&oe.length)&&J(ie)})}S(U),O(J=>z=te(U,1,"subtitles-container s-a",null,z,J),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(I)&&!n(T)&&!r()})]),$(t,U),H(),o()}import{ChromecastState as bS}from"@vkontakte/videoplayer-core/es2015";var $S=L('<div class="text s-p"> </div>'),yS=L('<div><div class="icon_wrapper s-p"><!></div> <!></div>'),xS={hash:"s-p",code:".wrapper.s-p{align-items:center;background-position:50%;background-repeat:no-repeat;background-size:contain;display:flex;flex-direction:column;font-size:16px;height:100%;justify-content:center}.wrapper.bgCover.s-p{background-size:cover}.icon_wrapper.s-p{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-p{margin-top:20px}"};function bc(t,e){B(e,!0),Q(t,xS);let i=g(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Lt();var s=yS();let a;s.__contextmenu=function(...p){var f;(f=e.onContextMenu)==null||f.apply(this,p)},s.__click=function(...p){var f;(f=e.onClick)==null||f.apply(this,p)},s.__dblclick=function(...p){var f;(f=e.onDblClick)==null||f.apply(this,p)};var l=C(s),d=C(l);ec(d,{get size(){return"48"},get iconState(){return bS.CONNECTED}}),S(l);var r=A(l,2);{var u=p=>{var f=$S(),v=C(f);S(f),O(()=>{var b;return he(v,`Видео воспроизводится на ${(b=i())!=null?b:""}`)}),$(p,f)};M(r,p=>{i()&&p(u)})}S(s),O(p=>{a=te(s,1,"wrapper s-p",null,a,p),Ke(s,`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e.thumbUrl||""}')`)},[()=>({bgCover:o.features.previewNoEmptySpace})]),$(t,s),H()}Ze(["contextmenu","click","dblclick"]);var wS=Ae('<path d="M460 194a4 4 0 0 1 4-4h122a4 4 0 0 1 4 4v82a4 4 0 0 1-4 4H464a4 4 0 0 1-4-4zm6 3a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm112-72a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm-71-37a6 6 0 1 0 0-12 6 6 0 0 0 0 12m36 0a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-18.05 15c6.05 0 11.62 4.45 11.94 4.65 2.11 1.35 3.26.77 3.96.16s1.15-2.81-1.04-4.66c-1.74-1.48-5.8-5.16-14.86-5.15s-12.95 3.5-14.8 5.18c-1.83 1.69-2.28 3.5-.96 4.66s2.31 1.16 4.35-.33c0 .01 5.36-4.51 11.41-4.51"></path>');function ov(t){je(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=wS();$(e,o)},$$slots:{default:!0}})}var SS=L('<div class="container s-6"><!></div>'),CS={hash:"s-6",code:".container.s-6{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function Ja(t){Q(t,CS);var e=SS(),i=C(e);ov(i,{}),S(e),$(t,e)}var TS=L('<div class="playButton s-c" tabindex="0" role="button"><div class="playButtonBackground s-c"></div> <!></div>'),IS=L('<div data-testid="unstarted-thumb"><!></div>'),ES={hash:"s-c",code:".container.s-c{background-position:50%;background-repeat:no-repeat;background-size:contain;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:opacity .2s,visibility .2s;will-change:opacity}.container.hidden.s-c{opacity:0;visibility:hidden}.container.bgCover.s-c{background-size:cover}.playButton.s-c{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-c,.playButtonBackground.s-c{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-c{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);transition:background .2s,transform .2s;transition-timing-function:ease-out;will-change:background,transform}.container.s-c:hover .playButtonBackground:where(.s-c){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-c svg{position:relative}"};function el(t,e){B(e,!0),Q(t,ES);let i=g(e,"iconVisible",3,!0),o=xe(),s=Lt(),a=o.ui.startedByKeyboard$,l=q("tooltip_play"),d=b=>{var _;let y=b.code;["Enter","Space"].includes(y)&&(b.stopPropagation(),b.preventDefault(),a.set(!0),(_=e.startVideo)==null||_.call(e))},r=b=>{var y,_;b.stopPropagation(),(y=e.startVideo)==null||y.call(e),(_=e.onClick)==null||_.call(e,b)};var u=IS();let p;u.__click=r,u.__contextmenu=function(...b){var y;(y=e.onContextMenu)==null||y.apply(this,b)};var f=C(u);{var v=b=>{var y=TS();y.__keydown=d;var _=A(C(y),2);Dn(_,{get size(){return"48"}}),S(y),O(()=>De(y,"aria-label",l)),$(b,y)};M(f,b=>{i()&&b(v)})}return S(u),O(b=>{p=te(u,1,"container s-c",null,p,b),Ke(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:s.features.previewNoEmptySpace})]),$(t,u),H({handlePressKey:d,handleClick:r})}Ze(["click","contextmenu","keydown"]);var PS=L('<span class="text s-1a"> </span>'),AS=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},kS=L('<a target="_blank" class="link s-1a"><!></a>'),LS=(t,e)=>e.onTitleClicked(),MS=L("<button><!></button>"),VS=L('<div data-testid="video_title"><!></div>'),RS={hash:"s-1a",code:".title.s-1a{background:linear-gradient(0deg,transparent,rgba(0,0,0,.02) 19%,rgba(0,0,0,.1) 34%,rgba(0,0,0,.4) 60%,rgba(0,0,0,.6));box-sizing:border-box;font-size:15px;height:var(--controls-gradient-height);left:0;overflow:hidden;padding:18px 20px 10px;pointer-events:none;position:absolute;text-overflow:ellipsis;top:0;transition-duration:var(--controls-transition-duration);transition-property:visibility,transform,opacity;transition-timing-function:var(--controls-transition-fn);white-space:nowrap;width:100%;will-change:transform,opacity;z-index:var(--controls-container-z-index)}.link.s-1a,.title.s-1a{color:var(--white)}.link.s-1a{pointer-events:auto;text-decoration:none}.link.s-1a:hover{text-decoration:underline}.text.s-1a{pointer-events:auto}.size-sm.s-1a{font-size:14px;font-weight:500;line-height:18px}.hidden.s-1a{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function nv(t,e){B(e,!0),Q(t,RS);let i=b=>{var y=PS(),_=C(y,!0);S(y),it(y,w=>l(w),()=>l()),O(()=>he(_,o())),vt("mouseenter",y,function(...w){var I;(I=e.onMouseEnter)==null||I.apply(this,w)}),vt("mouseleave",y,function(...w){var I;(I=e.onMouseLeave)==null||I.apply(this,w)}),$(b,y)},o=g(e,"title",3,""),s=g(e,"isHidden",3,!1),a=g(e,"size",3,"md"),l=g(e,"ref",15),d=K(void 0);kt(()=>{var y;requestAnimationFrame(()=>{var _;(_=e.onVisibilityChanged)==null||_.call(e,!0)});function b(_){var w;_.propertyName==="transform"&&((w=e.onVisibilityChanged)==null||w.call(e,!s()))}return(y=n(d))==null||y.addEventListener("transitionend",b),()=>{var _;return(_=n(d))==null?void 0:_.removeEventListener("transitionend",b)}});var r=VS();let u;var p=C(r);{var f=b=>{var y=kS();y.__click=[AS,e];var _=C(y);i(_),S(y),O(()=>De(y,"href",e.titleLinkHref)),$(b,y)},v=(b,y)=>{{var _=I=>{var T=MS();T.__click=[LS,e];var R=C(T);i(R),S(T),$(I,T)},w=I=>{i(I)};M(b,I=>{e.onTitleClicked?I(_):I(w,!1)},y)}};M(p,b=>{e.titleLinkHref?b(f):b(v,!1)})}S(r),it(r,b=>D(d,b),()=>n(d)),O(b=>u=te(r,1,`title size-${a()}`,"s-1a",u,b),[()=>({hidden:s()})]),$(t,r),H()}Ze(["click"]);import{throttleFn as US}from"@vkontakte/videoplayer-shared/es2015";var DS=L('<div class="timer__cell cell s-12"><span class="cell__value s-12"> </span> <span class="cell__unit s-12"> </span></div> <span class="timer__points s-12"> </span>',1),OS=L('<div class="timer__cell cell s-12"><span class="cell__value s-12"> </span> <span class="cell__unit s-12"> </span></div> <span class="timer__points s-12"> </span>',1),NS=L('<div class="timer__cell cell s-12"><span class="cell__value s-12"> </span> <span class="cell__unit s-12"> </span></div> <span class="timer__points s-12"> </span>',1),BS=L('<div class="timer__cell cell s-12"><span class="cell__value s-12"> </span> <span class="cell__unit s-12"> </span></div>'),HS=L("<div><!> <!> <!> <!></div>"),FS={hash:"s-12",code:".timer__container.s-12{align-items:flex-start;display:flex;justify-content:center}.cell.s-12{align-items:center;display:flex;flex-direction:column}.cell__value.s-12{font-size:48px;font-weight:600;line-height:1.2}.small.s-12 .cell__value:where(.s-12){font-size:24px}.cell__unit.s-12{font-size:14px;font-weight:400;line-height:1.2}.small.s-12 .cell__unit:where(.s-12){font-size:12px}.timer__points.s-12{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-12 .timer__points:where(.s-12){font-size:20px}"};function rv(t,e){B(e,!0),Q(t,FS);let i=K(""),o=K(""),s=K(""),a=K(""),l,d=32,r=d/2,u=U=>String(U).padStart(2,"0"),p=U=>Math.max(U.length,1),f=U=>`${(e.isSmallSize?r:d)*p(U)}px`,v=U=>{let z=Math.floor(U/86400);z&&(U-=z*86400,D(i,u(z),!0));let Y=Math.floor(U/3600);D(o,u(Y),!0);let ie=Math.floor(U/60)%60;D(s,u(ie),!0);let J=U%60;D(a,u(J),!0)},b=()=>{let U=Math.floor(Date.now()/1e3),z=e.startTime-U;v(z),z>=1?l=requestAnimationFrame(b):e.onTimerOver()};kt(()=>{l=requestAnimationFrame(b)}),ln(()=>{cancelAnimationFrame(l)});var y=HS();let _;var w=C(y);{var I=U=>{var z=DS(),Y=le(z);let ie;var J=C(Y),oe=C(J,!0);S(J);var de=A(J,2),ae=C(de,!0);S(de),S(Y);var pe=A(Y,2),ee=C(pe,!0);S(pe),O(($e,Ee,ce)=>{ie=Ke(Y,"",ie,{width:$e}),he(oe,n(i)),he(ae,Ee),he(ee,ce)},[()=>f(n(i)),()=>q("waiting_live_day_value"),()=>q("waiting_live_colon")]),$(U,z)};M(w,U=>{n(i)&&U(I)})}var T=A(w,2);{var R=U=>{var z=OS(),Y=le(z);let ie;var J=C(Y),oe=C(J,!0);S(J);var de=A(J,2),ae=C(de,!0);S(de),S(Y);var pe=A(Y,2),ee=C(pe,!0);S(pe),O(($e,Ee,ce)=>{ie=Ke(Y,"",ie,{width:$e}),he(oe,n(o)),he(ae,Ee),he(ee,ce)},[()=>f(n(o)),()=>q("waiting_live_hour_value"),()=>q("waiting_live_colon")]),$(U,z)};M(T,U=>{n(o)&&U(R)})}var k=A(T,2);{var P=U=>{var z=NS(),Y=le(z);let ie;var J=C(Y),oe=C(J,!0);S(J);var de=A(J,2),ae=C(de,!0);S(de),S(Y);var pe=A(Y,2),ee=C(pe,!0);S(pe),O(($e,Ee,ce)=>{ie=Ke(Y,"",ie,{width:$e}),he(oe,n(s)),he(ae,Ee),he(ee,ce)},[()=>f(n(s)),()=>q("waiting_live_minute_value"),()=>q("waiting_live_colon")]),$(U,z)};M(k,U=>{n(s)&&U(P)})}var E=A(k,2);{var W=U=>{var z=BS();let Y;var ie=C(z),J=C(ie,!0);S(ie);var oe=A(ie,2),de=C(oe,!0);S(oe),S(z),O((ae,pe)=>{Y=Ke(z,"",Y,{width:ae}),he(J,n(a)),he(de,pe)},[()=>f(n(a)),()=>q("waiting_live_second_value")]),$(U,z)};M(E,U=>{n(a)&&U(W)})}S(y),O(U=>_=te(y,1,"timer__container s-12",null,_,U),[()=>({small:e.isSmallSize})]),$(t,y),H()}var zS=L('<div class="waiting s-l"><span> </span></div>'),WS=L('<div class="upcoming-timer timer s-l"><span> </span> <!></div>'),KS=L('<div class="waiting-container s-l"><!></div>'),QS={hash:"s-l",code:'.waiting-container.s-l{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.waiting-container.s-l,.waiting-container.s-l:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-l:before{backdrop-filter:blur(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-l{align-items:center;display:flex;flex-direction:column;justify-content:center;left:0;position:absolute;top:50%;transform:translateY(-50%);width:100%;z-index:2}.waiting__title.s-l{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-l{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-l{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-l{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-l{font-size:15px}.medium.s-l{font-size:17px}'};function $c(t,e){B(e,!0),Q(t,QS);let i=g(e,"startTime",3,0),o=m(()=>i()<Math.floor(Date.now()/1e3)),s=K(void 0),a=K(void 0),l=0,d=K(void 0),r=K(void 0),u=m(()=>{var w,I;return((w=n(d))!=null?w:1/0)<=509||((I=n(r))!=null?I:1/0)<=320}),p=m(()=>{var w,I;return!n(u)&&(((w=n(d))!=null?w:1/0)<=699||((I=n(r))!=null?I:1/0)<=599)}),f=e.onUpcomingLiveViewStateChanged?US(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let w={type:n(o)?"expired":"default",size:n(u)?"s":n(p)?"m":"l"},I=n(o)?n(s):n(a);e.onUpcomingLiveViewStateChanged(w,I)})},300):void 0;He(()=>{n(r),n(d),n(o),f==null||f()}),ln(()=>{if(cancelAnimationFrame(l),f==null||f.cancel(),e.onUpcomingLiveViewStateChanged){let w={type:n(o)?"expired":"default",size:n(u)?"s":n(p)?"m":"l"};e.onUpcomingLiveViewStateChanged(w)}});var v=KS();v.__contextmenu=function(...w){var I;(I=e.onContextMenu)==null||I.apply(this,w)},v.__click=function(...w){var I;(I=e.onClick)==null||I.apply(this,w)};var b=C(v);{var y=w=>{var I=zS(),T=C(I);let R;var k=C(T,!0);S(T),S(I),it(I,P=>D(s,P),()=>n(s)),O((P,E)=>{R=te(T,1,"waiting__title s-l",null,R,P),he(k,E)},[()=>({medium:n(p),small:n(u)}),()=>q("waiting_live_upcoming_title")]),$(w,I)},_=w=>{var I=WS(),T=C(I);let R;var k=C(T,!0);S(T);var P=A(T,2);let E=m(()=>n(u)||n(p)),W=m(()=>i()||0);rv(P,{get isSmallSize(){return n(E)},get startTime(){return n(W)},onTimerOver:()=>D(o,!0)}),S(I),it(I,U=>D(a,U),()=>n(a)),O((U,z)=>{R=te(T,1,"timer__title s-l",null,R,U),he(k,z)},[()=>({medium:n(p),small:n(u)}),()=>q("waiting_live_timer_title")]),$(w,I)};M(b,w=>{n(o)?w(y):w(_,!1)})}S(v),O(()=>Ke(v,`background-image: url(${e.thumbUrl})`)),Vn(v,"clientWidth",w=>D(d,w)),Vn(v,"clientHeight",w=>D(r,w)),$(t,v),H()}Ze(["contextmenu","click"]);var qS=L('<div class="waiting-container s-s"><div class="waiting-caption s-s"><!> <p class="waiting-title s-s"> </p></div></div>'),GS={hash:"s-s",code:'.waiting-container.s-s{align-items:center;background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;justify-content:center}.waiting-container.s-s,.waiting-container.s-s:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-s:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-s{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-s{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function tl(t,e){B(e,!0),Q(t,GS);let i=g(e,"thumbUrl",3,""),o={recover:q("waiting_live_recover_title"),record:q("waiting_record_title")},s=m(()=>o[e.kind]||"");var a=qS();a.__contextmenu=function(...p){var f;(f=e.onContextMenu)==null||f.apply(this,p)},a.__click=function(...p){var f;(f=e.onClick)==null||f.apply(this,p)};var l=C(a),d=C(l);za(d,{style:"position: static; transform: translate(0, 0)"});var r=A(d,2),u=C(r,!0);S(r),S(l),S(a),O(()=>{Ke(a,`background-image: url('${i()}')`),he(u,n(s))}),$(t,a),H()}Ze(["contextmenu","click"]);var YS=Ae('<path d="M6 10.2 3.5 7.7a.99.99 0 0 0-1.4 1.4l3.2 3.2a1 1 0 0 0 1.4 0l7.6-7.6a.99.99 0 0 0-1.4-1.4z"></path>');function sv(t){je(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=YS();$(e,o)},$$slots:{default:!0}})}var jS=L('<div class="select-icon s-1w"><!></div>'),XS={hash:"s-1w",code:".select-icon.s-1w{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function yc(t){Q(t,XS);var e=jS(),i=C(e);sv(i,{}),S(e),$(t,e)}var ZS=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},JS=(t,e)=>{Hl(t,()=>e.item.selectItem(e.item.value))},eC=L("<p> </p>"),tC=L('<p class="sublabel s-1r"> </p>'),iC=L('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),oC={hash:"s-1r",code:".menu-item-value.s-1r{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1r{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1r,.sublabel.s-1r{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1r{opacity:.5}"};function av(t,e){B(e,!0),Q(t,oC);let i=g(e,"isMobile",3,!1);var o=iC();let s;o.__click=[ZS,e],o.__keydown=[JS,e];var a=C(o);{var l=y=>{yc(y,{})};M(a,y=>{e.item.selected&&y(l)})}var d=A(a,2);let r;var u=C(d);{var p=y=>{var _=Ve(),w=le(_);Ui(w,()=>e.item.valueComponent,(I,T)=>{T(I,os(()=>{var R;return(R=e.item.valueComponentParams)!=null?R:{}}))}),$(y,_)},f=y=>{var _=eC();let w;var I=C(_,!0);S(_),O(T=>{var R;w=te(_,1,"label s-1r",null,w,T),he(I,(R=e.item.label)!=null?R:e.item.value)},[()=>({mobile:i()})]),$(y,_)};M(u,y=>{e.item.valueComponent?y(p):y(f,!1)})}var v=A(u,2);{var b=y=>{var _=tC(),w=C(_,!0);S(_),O(()=>he(w,e.item.sublabel)),$(y,_)};M(v,y=>{e.item.sublabel&&y(b)})}S(d),S(o),O((y,_,w)=>{var I;s=te(o,1,"item",null,s,y),De(o,"data-value",(I=e.item.dataValue)!=null?I:e.item.value),De(o,"aria-label",_),De(o,"data-testid",e.item.dataTestid),r=te(d,1,"menu-item-value s-1r",null,r,w),De(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var y,_;return(_=(y=e.item.ariaLabel)!=null?y:e.item.label)!=null?_:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),$(t,o),H()}Ze(["click","keydown"]);var nC=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function lv(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"refMenuItems",15),s=m(()=>()=>e.openSubMenuList(e.item.children)),a=m(()=>_=>Lu(_,n(s)));var l=nC();let d;l.__click=function(..._){var w;(w=n(s))==null||w.apply(this,_)},l.__keydown=function(..._){var w;(w=n(a))==null||w.apply(this,_)};var r=C(l);{var u=_=>{yc(_,{})};M(r,_=>{e.item.selected&&_(u)})}var p=A(r,2);let f;var v=C(p);{var b=_=>{var w=Ve();let I=m(()=>e.item.valueComponent);var T=le(w);Ui(T,()=>n(I),(R,k)=>{k(R,os(()=>{var P;return(P=e.item.valueComponentParams)!=null?P:{}}))}),$(_,w)},y=_=>{var w=bs();O(()=>he(w,e.item.label)),$(_,w)};M(v,_=>{e.item.valueComponent?_(b):_(y,!1)})}S(p),S(l),it(l,_=>o(o()[e.item.id]=_,!0),()=>{var _;return(_=o())==null?void 0:_[e.item.id]}),O((_,w)=>{var I;d=te(l,1,"item",null,d,_),De(l,"aria-label",(I=e.item.ariaLabel)!=null?I:e.item.label),De(l,"data-testid",e.item.id),f=te(p,1,"menu-item-value",null,f,w)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),$(t,l),H()}Ze(["click","keydown"]);var rs={"quality-settings":100,"audio-language-settings":200,"playback-rate-settings":300,"subtitles-settings":400,"traffic-saving-settings":500,download:600,report:700,"copy-data":800,"save-trace-info":900,"debug-info":1e3};var sC=(t,e)=>{N_(t,e.returnFromSubMenu,e.closeSettingsMenu)},aC=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},lC=(t,e)=>{Ud(t)&&(Nr(t),e.returnFromSubMenu())},dC=L('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1i"> </p></li> <!></ul></div>'),cC={hash:"s-1i",code:".sub-menu.s-1i{--item-padding-vertical-mobile:16px;--item-padding-vertical:7px;--item-label-line-height:18px;--edge-item-padding-vertical-mobile:calc(6px + var(--item-padding-vertical-mobile));--edge-item-padding-vertical:calc(8px + var(--item-padding-vertical))}.sub-menu.s-1i .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1i{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1i{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1i .items:where(.s-1i) .item.header:where(.s-1i){border-bottom:var(--divider-border);display:flex;justify-content:space-between;left:0;min-width:max-content;position:absolute;right:0;top:0}.header.s-1i .title:where(.s-1i){margin-left:8px}.sub-menu.s-1i .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1i .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1i .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1i .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1i .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1i .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1i .item .sublabel{font-size:12px;line-height:14px}.item.s-1i:not(.mobile) p:where(.s-1i),.sub-menu.s-1i .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function cv(t,e){B(e,!0),Q(t,cC);let[i,o]=Be(),s=()=>x(f,"$isFullscreen",i),a=()=>x(v,"$playerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"playerControlsHeight",3,0),r=g(e,"ariaLabelReturnFromSubMenu",19,()=>q("aria_label_submenu_back")),u=g(e,"listRef",15);kt(()=>{let J=e.items.findIndex(oe=>oe.selected);u().children[J+1].focus()});let p=xe(),f=p.ui.isFullscreen,v=p.ui.playerSize,b=K(void 0),y=K(0),_=K(0),w=m(()=>l()&&s()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n(_)-d()}px; overflow: auto;`),I=m(()=>Math.max(e.minWidth,n(y)));var T=dC();let R;var k=C(T);let P;k.__keydown=[sC,e];var E=C(k);let W;E.__click=[aC,e],E.__keydown=[lC,e];var U=C(E);Or(U,{direction:"left"});var z=A(U,2),Y=C(z,!0);S(z),S(E),it(E,J=>D(b,J),()=>n(b));var ie=A(E,2);yi(ie,17,()=>e.items,Cd,(J,oe)=>{var de=Ve(),ae=le(de);{var pe=$e=>{av($e,{get item(){return n(oe)},get isMobile(){return l()}})},ee=($e,Ee)=>{{var ce=Qe=>{lv(Qe,{get isMobile(){return l()},get item(){return n(oe)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};M($e,Qe=>{n(oe).type==="OPEN_SUB_MENU"&&Qe(ce)},Ee)}};M(ae,$e=>{n(oe).type==="SELECT_VALUE"?$e(pe):$e(ee,!1)})}$(J,de)}),S(k),it(k,J=>u(J),()=>u()),S(T),O((J,oe,de)=>{R=te(T,1,"sub-menu menu s-1i",null,R,J),De(T,"data-testid",`${e.id}-sub-menu`),Ke(T,`min-width: ${n(I)}px`),P=te(k,1,"items s-1i",null,P,oe),Ke(k,n(w)),W=te(E,1,"item header back s-1i",null,W,de),De(E,"aria-label",r()),he(Y,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),Vn(E,"clientWidth",J=>D(y,J)),Vn(E,"clientHeight",J=>D(_,J)),$(t,T),H(),o()}Ze(["keydown","click"]);import{noop as uC}from"@vkontakte/videoplayer-shared/es2015";var pC=(t,e)=>Lu(t,e()),fC=(t,e)=>{t.stopPropagation(),e()()},mC=L('<div class="value s-1h"> </div>'),vC=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),gC={hash:"s-1h",code:".value.s-1h{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function uv(t,e){B(e,!0),Q(t,gC);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,uC),s=g(e,"valueComponent",3,void 0),a=g(e,"iconProps",19,()=>({})),l=g(e,"ref",15);var d=vC();let r;d.__click=[fC,o],d.__keydown=[pC,o];var u=C(d),p=C(u);{var f=T=>{Ya(T,{get icon(){return e.icon}})},v=T=>{var R=Ve();let k=m(()=>e.icon);var P=le(R);Ui(P,()=>n(k),(E,W)=>{W(E,os(a))}),$(T,R)};M(p,T=>{typeof e.icon=="string"?T(f):T(v,!1)})}S(u);var b=A(u,2),y=C(b,!0);S(b);var _=A(b,2);{var w=T=>{var R=Ve();let k=m(s);var P=le(R);Ui(P,()=>n(k),(E,W)=>{W(E,{})}),$(T,R)},I=T=>{var R=mC(),k=C(R,!0);S(R),O(()=>he(k,e.value)),$(T,R)};M(_,T=>{s()?T(w):T(I,!1)})}S(d),it(d,T=>l(T),()=>l()),O(T=>{r=te(d,1,"item",null,r,T),De(d,"aria-label",e.ariaLabel),De(d,"data-testid",e.id),he(y,e.label)},[()=>({mobile:i()})]),$(t,d),H()}Ze(["click","keydown"]);import{noop as Ab}from"@vkontakte/videoplayer-shared/es2015";var hC=(t,e)=>{Hl(t,()=>e())},_C=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),bC=L('<img class="icon" aria-hidden="true"/>'),$C=L('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1j"> </div></li>'),yC={hash:"s-1j",code:".label.s-1j{overflow:hidden;text-overflow:ellipsis}"};function pv(t,e){B(e,!0),Q(t,yC);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,Ab),s=g(e,"closeSettings",3,Ab),a=K(!1),l=()=>{D(a,!0)},d=w=>{w==null||w.stopPropagation(),o()(),s()()};var r=$C();let u;r.__click=d,r.__keydown=[hC,d];var p=C(r),f=C(p);{var v=w=>{var I=Ve(),T=le(I);{var R=P=>{var E=_C();$(P,E)},k=P=>{var E=bC();O(()=>De(E,"src",e.icon)),vt("error",E,l),Ra(E),$(P,E)};M(T,P=>{n(a)?P(R):P(k,!1)})}$(w,I)},b=w=>{var I=Ve();let T=m(()=>e.icon);var R=le(I);Ui(R,()=>n(T),(k,P)=>{P(k,{})}),$(w,I)};M(f,w=>{typeof e.icon=="string"?w(v):w(b,!1)})}S(p);var y=A(p,2),_=C(y,!0);S(y),S(r),O(w=>{var I;u=te(r,1,"item",null,u,w),De(r,"aria-label",(I=e.ariaLabel)!=null?I:e.label),De(r,"data-testid",e.id),he(_,e.label)},[()=>({mobile:i()})]),$(t,r),H()}Ze(["click","keydown"]);import{noop as SC}from"@vkontakte/videoplayer-shared/es2015";var xC=L('<div class="toggle_wrap s-1n"><div></div> <div class="toggle-label s-1n"></div></div>'),wC={hash:"s-1n",code:'.toggle_wrap.s-1n{cursor:pointer;font-size:12px;line-height:15px;min-height:15px;padding:0;user-select:none}.toggle.s-1n{background-color:var(--toggle-color-separator);border-radius:45px;cursor:pointer;float:right;height:9px;margin-top:3px;width:28px}.toggle.s-1n:after{background-color:var(--toggle-color-off);border-radius:50%;content:"";float:left;height:15px;left:0;position:relative;top:-3px;transition:left .1s ease;width:15px}.toggle.on.s-1n:after{background-color:var(--toggle-color-on);left:13px}.toggle-label.s-1n{overflow:hidden}'};function fv(t,e){Q(t,wC);let i=g(e,"enabled",3,!1);var o=xC(),s=C(o);let a;Xt(2),S(o),O(l=>a=te(s,1,"toggle s-1n",null,a,l),[()=>({on:i()})]),$(t,o)}var CC=(t,e,i)=>{B_(t,e(),o=>i()(o))},TC=(t,e,i)=>{t.stopPropagation(),e()(!i())},IC=L('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),EC=L('<li role="menuitem" tabindex="0"><!></li>');function mv(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,SC),s=g(e,"enabled",3,!1),a=g(e,"tooltipText",3,void 0),l=g(e,"maxTooltipWidth",3,void 0);var d=EC();let r;d.__click=[TC,o,s],d.__keydown=[CC,s,o];var u=C(d);Wa(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(p,f)=>{var v=IC();let b;var y=C(v),_=C(y);{var w=P=>{Ya(P,{get icon(){return e.icon}})},I=P=>{var E=Ve();let W=m(()=>e.icon);var U=le(E);Ui(U,()=>n(W),(z,Y)=>{Y(z,{})}),$(P,E)};M(_,P=>{typeof e.icon=="string"?P(w):P(I,!1)})}S(y);var T=A(y,2),R=C(T,!0);S(T);var k=A(T,2);fv(k,{get enabled(){return s()}}),S(v),O(P=>{b=te(v,1,"switch-wrapper",null,b,P),he(R,e.label)},[()=>({mobile:i()})]),$(p,v)},$$slots:{default:!0}}),S(d),O(p=>{var f;r=te(d,1,"item switch-item",null,r,p),De(d,"aria-label",(f=e.ariaLabel)!=null?f:e.label),De(d,"data-testid",e.id)},[()=>({mobile:i()})]),$(t,d),H()}Ze(["click","keydown"]);import{isValidURL as JC,VideoQuality as Fb}from"@vkontakte/videoplayer-shared/es2015";var kb=()=>{let t=K(ri([])),e=m(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{D(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{D(t,[],!0)}}};import{getVideoQualityLabel as PC}from"@vkontakte/videoplayer-shared/es2015";var AC=L('<div class="quality-icon s-1m"><!></div>'),kC=L('<div class="quality-label s-1m"><span> </span> <!></div>'),LC={hash:"s-1m",code:".quality-label.s-1m{position:relative}.quality.s-1m{font-size:13px;line-height:18px}.quality.sub.s-1m{opacity:.7}.quality-icon.s-1m{display:flex;padding-left:2px;position:absolute;right:0;top:0;transform:translateX(100%)}.quality-icon.s-1m svg{color:var(--blue-light)}"};function il(t,e){B(e,!0),Q(t,LC);let i=g(e,"isSubCase",3,!1),o=m(()=>e.quality?PC(e.quality):""),s=m(()=>Nu(e.quality));var a=kC(),l=C(a);let d;var r=C(l,!0);S(l);var u=A(l,2);{var p=f=>{var v=AC();let b=m(()=>n(s));var y=C(v);Ui(y,()=>n(b),(_,w)=>{w(_,{})}),S(v),O(()=>De(v,"data-testid",`${n(o)}-icon`)),$(f,v)};M(u,f=>{n(s)&&!e.isMobile&&f(p)})}S(a),O(f=>{d=te(l,1,"s-1m",null,d,f),he(r,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),$(t,a),H()}import{VideoQuality as MC}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as Lb}from"@vkontakte/videoplayer-core/es2015";var Mb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},Vb=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=Mb({quality:t,availableQualities:e});return i?t===Lb.INVARIANT?q("auto_quality_invariant"):q("auto_quality",{actual:o}):o},Rb=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===Lb.INVARIANT?i:`${i}${Mb({quality:t,availableQualities:e})}`:"...";var VC=L('<div class="menu-item-value-wrapper s-1p"><!></div>'),RC={hash:"s-1p",code:".menu-item-value-wrapper.s-1p{line-height:normal}"};function Zl(t,e){B(e,!0),Q(t,RC);let[i,o]=Be(),s=()=>x(r,"$currentQuality$",i),a=()=>x(u,"$availableQualities$",i),l=()=>x(p,"$isMobile$",i),d=xe(),r=d.state.currentQuality$,u=d.state.availableQualities$,p=d.ui.isMobile,f=" · ",v=m(()=>e.prefix+(e.selected&&s()!==MC.INVARIANT?f:"")),b=m(()=>Rb({prefix:n(v),quality:s(),availableQualities:a(),onlyPrefix:!e.selected}));var y=VC(),_=C(y);let w=m(()=>e.selected?s():void 0);il(_,{get quality(){return n(w)},get label(){return n(b)},get isMobile(){return l()},isSubCase:!0}),S(y),$(t,y),H(),o()}var DC=t=>{let e=t.join("|"),i="<(?<keyhtml>.*?)(?<propshtml> .*?)?>(?<childrenhtml>.*?)</\\k<keyhtml>>",o=`{(?<keyi18n>${e})}(?<childreni18n>.*?){/\\k<keyi18n>}`,s="<(?<keyhtmlself>.*?)(?<propshtmlself> .*?)?/?>",a=`{(?<keyi18nself>${e})}`;return new RegExp(`${i}|${o}|${s}|${a}`,"g")},OC={br:!0,span:!0},vv=(t,e={})=>{var d,r,u,p,f,v,b;if(!t)return t;let i=Ye(Ye({},OC),e),o=Object.keys(i);if(!o.length)return t;let s=DC(o),a=[],l=0;for(let y of t.matchAll(s)){let _=y[0],w=((d=y.groups)==null?void 0:d.keyhtml)||((r=y.groups)==null?void 0:r.keyi18n)||((u=y.groups)==null?void 0:u.keyhtmlself)||((p=y.groups)==null?void 0:p.keyi18nself)||"",{index:I}=y;if(!i[w]){a.push(t.slice(l,I)),l=I+_.length;continue}let T=(f=y.groups)!=null&&f.childrenhtml?vv(y.groups.childrenhtml,i):"",R=(v=y.groups)!=null&&v.childrenhtml?_.replace(new RegExp((b=y.groups)==null?void 0:b.childrenhtml),()=>T||""):_;a.push(t.slice(l,I),R),l=I+_.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function xc(t,e){B(e,!1);let i=g(e,"message",8),o=vv(i());Yo();var s=Ve(),a=le(s);{var l=d=>{var r=Ve(),u=le(r);Td(u,()=>o),$(d,r)};M(a,d=>{o&&d(l)})}$(t,s),H()}var NC=L('<p class="quality-applies sublabel s-1q"><!></p>'),BC={hash:"s-1q",code:".quality-applies.s-1q{color:hsla(0,0%,100%,.5);display:flex;justify-content:end;padding:3px 0}.quality-applies span{color:#70c1ff}"};function gv(t,e){B(e,!1),Q(t,BC),Yo();var i=NC(),o=C(i);let s=hr(()=>q("quality_applience",{action:`<span>${q("quality_applience_action")}</span>`}));xc(o,{get message(){return n(s)}}),S(i),$(t,i),H()}var Ob=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",label:q("other_quality"),selected:o,valueComponent:Zl,valueComponentParams:{prefix:q("other_quality"),selected:o},children:"quality-other-settings"}},hv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:q("auto_quality_limit"),valueComponent:e?Zl:void 0,valueComponentParams:{prefix:q("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),Nb=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:gv,bottomBordered:!0,children:"quality-appliance"}),_v=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"quality-high",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:q("high_quality"),valueComponent:t?Zl:void 0,valueComponentParams:{prefix:q("high_quality"),selected:i},sublabel:q("high_quality_description")}),bv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleTrafficSaving:o})=>({id:"quality-traffic-saving",type:"SELECT_VALUE",value:"save_traffic",selectItem:()=>o(!0,e),selected:i,label:q("traffic_saving_quality"),valueComponent:t?Zl:void 0,valueComponentParams:{prefix:q("traffic_saving_quality"),selected:i},sublabel:q("traffic_saving_quality_description")});var ip=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),op=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,s;if(i==="und"?s=void 0:i&&(s=(l=oc(i))!=null?l:i),o&&i&&s){let d=e.filter(r=>r.label===o&&r.language===i);if(d.length===1)return q("audio_stream_display_language_label",{language:s,label:o});{let r=ip(t,d);return q("audio_stream_display_language_label_index",{language:s,label:o,index:r})}}if(o){let d=e.filter(r=>r.label===o);if(d.length===1)return o;{let r=ip(t,d);return q("audio_stream_display_label_index",{label:o,index:r})}}if(i&&s){let d=e.filter(r=>r.language===i);if(d.length===1)return s;{let r=ip(t,d);return q("audio_stream_display_language_index",{language:s,index:r})}}let a=ip(t,e);return q("audio_stream_display_unknown",{index:a})};var HC={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:s}=t,a=[];return i&&a.push({handler:hv,selected:e&&!o&&!s||!1}),a.push({handler:bv,selected:o},{handler:_v,selected:s}),{title:q("submenu_quality"),id:"quality-settings",items:[Nb(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),Ob(t)]}},"quality-other-settings":({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"quality-other-settings",title:q("submenu_quality"),closeSettingsMenu:t,items:i.map(s=>({type:"SELECT_VALUE",value:s.value,valueComponent:il,valueComponentParams:{quality:s.value,label:s.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:s.selected,label:s.displayValue}))}),"quality-appliance":t=>{var i,o,s;let{closeSettingsMenu:e}=t;return{id:"quality-appliance",title:q("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:hv,selected:((i=Cu())==null?void 0:i.type)==="auto_quality"},{handler:bv,selected:((o=Cu())==null?void 0:o.type)==="traffic_saving"},{handler:_v,selected:((s=Cu())==null?void 0:s.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-tracks":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-tracks",title:q("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(s=>({type:"SELECT_VALUE",value:s,dataValue:s.id,selectItem:o,selected:s.id===(i==null?void 0:i.id),label:op(s,e)}))}),"playback-rate":({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"playback-rate",title:q("submenu_playback_rate"),closeSettingsMenu:t,items:e.map(o=>({type:"SELECT_VALUE",value:o.value,selectItem:i,selected:o.selected,label:o.displayValue}))}),subtitles:({availableSubtitlesList:t,selectSubtitle:e})=>({id:"subtitles",minWidth:164,title:q("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i.value,selectItem:()=>e(i),selected:i.selected,label:i.displayValue,dataTestid:i.value===On?"sub_off":void 0}))})},Bb=({subMenuId:t,context:e})=>t?[HC[t](e)]:[];var FC=Ae('<path d="M3.1 9.5c0-2.24 0-3.36.44-4.22A4 4 0 015.28 3.54C6.14 3.1 7.26 3.1 9.5 3.1h5c2.24 0 3.36 0 4.22.44a4 4 0 011.74 1.74c.44.86.44 1.98.44 4.22s0 3.36-.44 4.22a4 4 0 01-1.74 1.74c-.84.43-1.93.44-4.07.44l.55 2.2h1.9a.9.9 0 010 1.8H6.9a.9.9 0 110-1.8h1.9l.55-2.2c-2.14 0-3.23-.01-4.07-.44a4 4 0 01-1.74-1.74C3.1 12.86 3.1 11.74 3.1 9.5m11.4-4.6h-5c-1.15 0-1.9 0-2.48.05-.56.04-.79.12-.92.19a2.2 2.2 0 00-.96.96 2 2 0 00-.2.92C4.9 7.6 4.9 8.35 4.9 9.5s0 1.9.05 2.48c.04.56.12.79.19.92q.33.63.96.96c.13.07.36.15.92.2.58.04 1.33.04 2.48.04h5c1.15 0 1.9 0 2.48-.05.56-.04.79-.12.92-.19a2.2 2.2 0 00.96-.96c.07-.13.15-.36.2-.92.04-.58.04-1.33.04-2.48s0-1.9-.05-2.48a3 3 0 00-.19-.92 2.2 2.2 0 00-.96-.96 2 2 0 00-.92-.2c-.58-.04-1.33-.04-2.48-.04m-3.3 11-.55 2.2h2.7l-.55-2.2z"></path>');function $v(t){je(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=FC();$(e,o)},$$slots:{default:!0}})}var UC=Ae('<path d="M8.3 14.25c1.86 1.9 5.5.02 5.5-3.55V5.64l2.4-.7A2.74 2.74 0 0 0 18 2.37V.64a.75.75 0 0 0-.92-.62l-.26.06C15.88.3 14.93.51 14 .8c-1.33.45-2.03 1.62-2.01 3.08V9c-3.89.2-5.64 3.29-3.7 5.25ZM.9.1a.9.9 0 0 0 0 1.8h8.2a.9.9 0 0 0 0-1.8H.9ZM.9 5.1a.9.9 0 1 0 0 1.8h7.2a.9.9 0 0 0 0-1.8H.9ZM0 11c0-.5.4-.9.9-.9h4.18a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 11Z"></path>');function yv(t){je(t,{width:"18",height:"15",children:(e,i)=>{var o=UC();$(e,o)},$$slots:{default:!0}})}var zC=Ae('<path d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69A8 8 0 0 1 11 4.07M5.69 7.1 4.26 5.68A10 10 0 0 0 2.05 11h2.02a8 8 0 0 1 1.62-3.9M2.05 13c.2 2.01 1 3.84 2.21 5.32l1.43-1.43A8 8 0 0 1 4.07 13zM11 21.95v-2.02a8 8 0 0 1-3.9-1.62l-1.42 1.43A10 10 0 0 0 11 21.95M22 12c0 5.16-3.92 9.42-8.95 9.95v-2.02C16.97 19.41 20 16.05 20 12s-3.03-7.41-6.95-7.93V2.05C18.08 2.58 22 6.84 22 12M10.69 8.58l4.74 2.73a.8.8 0 0 1 0 1.37l-4.74 2.74a.8.8 0 0 1-1.19-.68V9.26a.8.8 0 0 1 1.19-.68"></path>');function xv(t){je(t,{testId:"play-speed-icon",children:(e,i)=>{var o=zC();$(e,o)},$$slots:{default:!0}})}var WC=Ae('<path d="M12 2a.9.9 0 01.9.9v10.93l4.56-4.57a.9.9 0 011.28 1.28l-6.1 6.1a.9.9 0 01-1.28 0l-6.1-6.1a.9.9 0 111.28-1.28l4.56 4.57V2.9A.9.9 0 0112 2M4 20a.9.9 0 01.9-.9h14.2a.9.9 0 110 1.8H4.9A.9.9 0 014 20"></path>');function wv(t){je(t,{testId:"download-icon",children:(e,i)=>{var o=WC();$(e,o)},$$slots:{default:!0}})}var KC=Ae('<path d="M8.86 2.1h6.28c.67 0 1.2.21 1.68.7l4.38 4.38c.48.48.7 1 .7 1.68v6.28c0 .68-.22 1.2-.7 1.68l-4.38 4.38c-.48.48-1 .7-1.68.7H8.86c-.68 0-1.2-.22-1.68-.7L2.8 16.82c-.48-.48-.7-1-.7-1.68V8.86c0-.68.22-1.2.7-1.68L7.18 2.8c.48-.49 1-.7 1.68-.7m-.44 2L4.1 8.43c-.18.18-.21.24-.21.5v6.17c0 .25.03.31.2.5l4.32 4.3c.18.18.24.21.5.21h6.17c.25 0 .31-.03.5-.2l4.3-4.32c.18-.18.21-.24.21-.5V8.92c0-.25-.03-.31-.2-.5l-4.32-4.3c-.18-.18-.24-.21-.5-.21H8.92c-.25 0-.32.03-.5.2M13 16a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-.1-8.1a.9.9 0 0 0-1.8 0v5.2a.9.9 0 1 0 1.8 0z"></path>');function Sv(t){je(t,{testId:"report-icon",children:(e,i)=>{var o=KC();$(e,o)},$$slots:{default:!0}})}var QC=Ae('<path d="M4 12.3V12c0-1.47 0-2.55.08-3.4.07-.9.21-1.48.45-1.95a4.85 4.85 0 0 1 2.12-2.12 5.1 5.1 0 0 1 1.95-.45C9.5 4 10.68 4 12.3 4h4.51c-.03-.16-.09-.33-.17-.49a2.4 2.4 0 0 0-1.05-1.05c-.3-.16-.63-.21-.93-.24-.29-.02-.64-.02-1.03-.02h-1.37c-1.58 0-2.81 0-3.81.08a6.84 6.84 0 0 0-2.62.64 6.65 6.65 0 0 0-2.9 2.91c-.4.76-.57 1.6-.65 2.62-.08 1-.08 2.23-.08 3.81v1.37c0 .4 0 .74.02 1.03.03.3.08.62.24.93A2.4 2.4 0 0 0 4 16.8V12.3ZM10.08 6h-.03c-.53 0-.97 0-1.33.03-.39.03-.76.1-1.12.28a2.9 2.9 0 0 0-1.3 1.3c-.17.35-.24.72-.27 1.1C6 9.09 6 9.53 6 10.06v7.9c0 .53 0 .97.03 1.33.03.39.1.76.28 1.12a2.9 2.9 0 0 0 1.3 1.3c.35.17.72.24 1.1.27.37.03.81.03 1.33.03h6.91c.53 0 .97 0 1.33-.03.39-.03.76-.1 1.12-.28a2.9 2.9 0 0 0 1.3-1.3c.17-.35.24-.72.27-1.1.03-.37.03-.81.03-1.34v-7.9c0-.53 0-.97-.03-1.33-.03-.39-.1-.76-.28-1.12a2.9 2.9 0 0 0-1.3-1.3 2.96 2.96 0 0 0-1.1-.27C17.91 6 17.47 6 16.94 6h-6.87ZM8.41 7.92c.06-.04.18-.07.45-.1.28-.02.65-.02 1.22-.02h6.84c.57 0 .94 0 1.22.02.27.03.39.06.45.1.21.1.39.28.5.49.03.06.06.18.09.45.02.28.02.65.02 1.22v7.84c0 .57 0 .94-.02 1.22-.03.27-.06.39-.1.45-.1.21-.28.39-.49.5-.06.03-.18.06-.45.09-.28.02-.65.02-1.22.02h-6.84c-.57 0-.94 0-1.22-.02a1.23 1.23 0 0 1-.45-.1 1.1 1.1 0 0 1-.5-.49 1.23 1.23 0 0 1-.09-.45c-.02-.28-.02-.65-.02-1.22v-7.84c0-.57 0-.94.02-1.22.03-.27.06-.39.1-.45.1-.21.28-.39.49-.5Z"></path>');function np(t){je(t,{children:(e,i)=>{var o=QC();$(e,o)},$$slots:{default:!0}})}var qC=Ae('<path d="M12 20.1a8.1 8.1 0 1 0 0-16.2 8.1 8.1 0 0 0 0 16.2m0 1.9a10 10 0 1 1 0-20 10 10 0 0 1 0 20m0-12.37A1.32 1.32 0 1 1 12 7a1.32 1.32 0 0 1 0 2.63m-.95 2.82c0-.54.43-.98.95-.98s.95.44.95.98v3.83c0 .54-.43.98-.95.98a.96.96 0 0 1-.95-.98z"></path>');function Cv(t){je(t,{testId:"info-icon",children:(e,i)=>{var o=qC();$(e,o)},$$slots:{default:!0}})}var GC=L('<div class="menu-item-value-wrapper s-1u"><!></div>'),YC={hash:"s-1u",code:".menu-item-value-wrapper.s-1u{line-height:normal}"};function Tv(t,e){B(e,!0),Q(t,YC);let[i,o]=Be(),s=()=>x(u,"$currentQuality$",i),a=()=>x(p,"$availableQualities$",i),l=()=>x(f,"$isAutoQualityEnabled$",i),d=()=>x(v,"$isMobile$",i),r=xe(),u=r.state.currentQuality$,p=r.state.availableQualities$,f=r.state.isAutoQualityEnabled$,v=r.ui.isMobile,b=m(()=>Vb({quality:s(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=GC(),_=C(y);il(_,{get quality(){return s()},get label(){return n(b)},get isMobile(){return d()}}),S(y),$(t,y),H(),o()}var XC={"quality-settings":({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?q("auto_quality_option"):e)||"";return{id:"quality-settings",type:"OPEN_SUB_MENU",ariaLabel:q("aria_label_menu_quality",{actual:o}),icon:Yd,label:q("menu_quality"),value:e,valueComponent:Tv,weight:rs["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:rs["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:q("aria_label_submenu_traffic_saving"),icon:$v,label:q("menu_traffic_saving"),enabled:t,tooltipText:q("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-tracks-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=op(t,e);return{id:"audio-tracks-settings",weight:rs["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:q("aria_label_menu_audio_languages",{actual:i}),icon:yv,label:q("menu_audio_languages"),value:i,children:"audio-tracks"}},"playback-rate-settings":({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(s=>s.value===e))==null?void 0:o.displayValue)||"";return{id:"playback-rate-settings",weight:rs["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:q("aria_label_menu_rate",{actual:i}),icon:xv,label:q("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:rs["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:q("aria_label_menu_subtitle",{actual:t.displayValue}),icon:ma,iconProps:{type:"outline"},label:q("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:rs.download,type:"CLICK",onClick:t,label:q("download_video_caption"),ariaLabel:q("aria_label_menu_download"),icon:wv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:rs.report,type:"CLICK",onClick:t,label:q("menu_report"),ariaLabel:`${q("menu_report")}. ${q("aria_label_new_tab_alert")}`,icon:Sv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:rs["copy-data"],type:"CLICK",onClick:t,label:q("menu_copy_debug"),ariaLabel:q("menu_copy_debug"),icon:np,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:rs["save-trace-info"],type:"CLICK",onClick:t,label:q("menu_save_debug"),ariaLabel:q("menu_save_debug"),icon:np,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:rs["debug-info"],type:"CLICK",onClick:t,ariaLabel:q("aria_label_menu_debug_overlay"),label:q("menu_debug_overlay"),icon:Cv,isHiddenFor:["desktop"]})},Hb=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(s=>XC[s](e)),...i.map(s=>Jt(Ye({},s),{isAdditional:!0}))].filter(s=>{var a,l,d;return!((a=s==null?void 0:s.isHiddenFor)!=null&&a.length)||!((l=s==null?void 0:s.isHiddenFor)!=null&&l.includes("desktop"))&&!o||!((d=s==null?void 0:s.isHiddenFor)!=null&&d.includes("mobile"))&&o}).sort(Fa)};var eT=(t,e)=>{ku(t,e)},tT=L('<div><div> </div> <div class="close s-m" data-testid="close-settings-menu"></div></div>'),iT=L('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),oT=L("<div><!> <!></div>"),nT={hash:"s-m",code:'.settings-menu-container.mobile.s-m{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-m ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-m .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-m .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-m .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-m .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-m .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-m .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-m{line-height:40px}.settings-menu.desktop.s-m{min-width:300px}.settings-menu-container.s-m .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-m .menu.mobile.hidden{display:none}.settings-menu-container.s-m .menu .item:not(.switch-item),.settings-menu-container.s-m .menu .switch-wrapper{align-items:center;color:var(--white);cursor:pointer;display:flex;justify-content:flex-end;position:relative;white-space:nowrap}.settings-menu-container.s-m .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-m .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-m .item:not(.switch-item),.settings-menu.s-m .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-m .item.mobile:not(.switch-item),.settings-menu.s-m .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-m .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-m .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-m .item.header.mobile:where(.s-m){border-bottom:var(--divider-border);color:var(--white);column-gap:12px;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:4px}.settings-menu-container.s-m .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-m .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-m .items::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.settings-menu-container.s-m .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-m .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-m{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-m:after,.close.s-m:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-m:before{transform:rotate(45deg)}.close.s-m:after{transform:rotate(-45deg)}'};function wc(t,e){B(e,!0),Q(t,nT);let[i,o]=Be(),s=()=>x(j,"$settingsMenuVisible",i),a=()=>x(ne,"$settingsMenuOpenedByKeyboard",i),l=()=>x(ut,"$debugPanelVisible",i),d=()=>x(Le,"$isMobile",i),r=()=>x(rt,"$playerSize",i),u=()=>x(ke,"$hasMpegSources$",i),p=()=>x(ze,"$mobileNotReportControlHidden$",i),f=()=>x(fe,"$autoQualityLimitingAvailable$",i),v=()=>x(ee,"$isMinimalView$",i),b=()=>x(Re,"$availableSubtitlesList$",i),y=()=>x(Ce,"$isLiveWithPlaybackSpeed",i),_=()=>x(Ee,"$availableAudioStreams$",i),w=()=>x(me,"$availablePlaybackRates$",i),I=()=>x($e,"$currentAudioStream$",i),T=()=>x(N,"$currentPlaybackRate$",i),R=()=>x(we,"$trafficSavingEnabled",i),k=()=>x(ce,"$currentQuality$",i),P=()=>x(ve,"$isAutoQualityEnabled$",i),E=()=>x(ue,"$currentSubtitle$",i),W=()=>x(lt,"$additionalSettingsMenuItems$",i),U=()=>x(X,"$isAutoQualityAvailable$",i),z=()=>x(Qe,"$availableQualities$",i),Y=()=>x(Fe,"$highQualityEnabled",i),ie=g(e,"ref",15,void 0),J=g(e,"playerControlsHeight",3,0),oe=ri({}),de=ri({}),ae=xe(),pe=Lt(),ee=ae.ui.isMinimalView$,$e=ae.state.audioStream$,Ee=ae.state.availableAudioStreams$,ce=ae.state.currentQuality$,Qe=ae.state.availableQualities$,fe=ae.state.autoQualityLimitingAvailable$,ve=ae.state.isAutoQualityEnabled$,X=ae.state.isAutoQualityAvailable$,N=ae.state.currentPlaybackRate$,me=ae.state.availablePlaybackRates$,ue=ae.state.currentSubtitle$,Re=ae.state.availableSubtitlesList$,Je=ae.state.canDownload,ke=ae.state.hasMpegSources$,j=ae.ui.settingsMenu.visible$,ne=ae.ui.settingsMenu.openedByBtnKeyboard$,Se=ae.ui.settingsMenu.ref$,Le=ae.ui.isMobile,ze=ae.ui.mobileNotReportControlHidden$,Ce=ae.state.canChangePlaybackSpeed$,we=ae.state.trafficSavingEnabled$,Fe=ae.state.highQualityEnabled$,rt=ae.ui.playerSize,ut=ae.ui.debugPanelVisible,Mt=ae.state.isInteractiveTime$,lt=ae.ui.additionalSettingsMenuItems$,ni=ae.ui.t,wt=ae.actions.internal.downloadVideo,Rt=ae.actions.internal.closeSettingsMenu,Dt=ae.actions.internal.openSettingsSubMenu,Qt=ae.actions.internal.closeSettingsSubMenu,Te=K(!1),G=K(void 0),Ne=kb();He(()=>{!s()&&Ne.current&&(Qt(de[Ne.current]),Ne.popAllSubMenus())}),He(()=>{s()||D(G,void 0)}),He(()=>{!Ne.current&&n(G)&&O_(oe,n(G))}),He(()=>{ie()&&Se.set(ie())});function be(F){return bt(this,null,function*(){var Ut;Ne.pushSubMenu(F),yield mo(),Dt(F,de[F]);let ot=(Ut=ie())==null?void 0:Ut.firstElementChild;ot&&Uf(ot)})}function Oe(F){var ot;F==null||F.stopPropagation(),a()||(ot=e.returnFocus)==null||ot.call(e),Rt(),D(Te,!1)}function Ie(F,ot){ae.actions.internal.setQuality(F,{appliesTo:ot,byUser:!0}),Oe()}function ht(F){ae.actions.internal.setAudioStream(F),Oe()}function ye(F,ot){ae.actions.internal.setTrafficSavingEnabled(F,ot),pe.features.qualityDetailsSubMenuEnabled&&Oe()}function qe(F,ot){ae.actions.internal.setHighQualityEnabled(F,ot),Oe()}function Ue(F){ae.actions.internal.setPlaybackRate(F),Oe()}function st(F){ae.actions.internal.setSubtitle(F),Oe()}function qt(){wt()}function Pt(){JC(e.supportLink)&&window.open(e.supportLink,"_blank"),ae.actions.internal.reportProblem(),ae.actions.internal.pause()}function Yt(){Nl(ae.actions.internal.getDebugTextData())}let bi=()=>{let F=ae.actions.internal.getTraceTextData(),ot=new Blob([...F],{type:"application/json"}),Ut=window.URL.createObjectURL(ot);Ba(Ut,"vk_player_trace_info","json")};function Mi(){ut.set(!l())}function Ai(){D(Te,!0)}function Zi(){D(Te,!1)}function si(){return d()?`max-height: ${Math.round(r().height*.6)}px`:`max-height: ${r().height-32-J()}px; overflow: auto;`}let pt=m(()=>Je&&u()&&!p()),di=m(()=>pe.features.trafficSaving&&!p()&&f()&&!pe.features.qualityDetailsSubMenuEnabled),Ji=m(()=>!v()&&b().length>0&&!p()),It=m(()=>!!y()&&!p()),gi=m(()=>pe.features.audioLanguages&&_().length>=2&&!p()),ui=m(()=>!p());kt(()=>Mt.subscribe(F=>{F&&!d()&&!n(Te)&&!a()&&Oe()}));let We=m(()=>{let F=[n(ui)&&"quality-settings",n(gi)&&"audio-tracks-settings",n(It)&&"playback-rate-settings",n(Ji)&&"subtitles-settings",n(di)&&"traffic-saving-switch",n(pt)&&"download",pe.showSupport&&"show-support","copy-data",pe.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(ot=>!!ot);return Hb({items:F,context:{qualityDetailsSubMenuEnabled:pe.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:w(),currentAudioStream:I(),availableAudioStreams:_(),currentPlaybackRate:T(),selectPlaybackRate:Ue,trafficSavingEnabled:R(),toggleTrafficSaving:ye,currentQuality:k()||Fb.INVARIANT,isAutoQualityEnabled:P()||!1,currentSubtitle:E(),isMobile:d(),onDownloadClick:qt,onCopyDataClick:Yt,onReportProblemClick:Pt,onSaveTraceDataClick:bi,toggleShowDebugInfo:Mi},additionalSettingsMenuItems:W()})}),at=m(()=>Bb({subMenuId:Ne.current,context:{availablePlaybackRates:w(),selectPlaybackRate:Ue,trafficSavingEnabled:R(),toggleTrafficSaving:ye,currentQuality:k()||Fb.INVARIANT,isAutoQualityEnabled:P()||!1,isAutoQualityAvailable:U()||!1,availableQualities:z(),highQualityEnabled:Y(),toggleHighQuality:qe,availableAudioStreams:_(),availableSubtitlesList:b(),closeSettingsMenu:Rt,currentAudioStream:I(),isMobile:d(),selectAudioLanguage:ht,selectQuality:Ie,selectSubtitle:st}}));var Si=oT();let eo;var bo=C(Si);{var Ao=F=>{var ot=iT();let Ut;ot.__keydown=[eT,Rt];var pi=C(ot);{var ct=Gt=>{var Ct=tT();let so;var ko=C(Ct),Nn=C(ko,!0);S(ko);var fn=A(ko,2);fn.__click=Oe,S(Ct),O((ki,xi)=>{so=te(Ct,1,"item header s-m",null,so,ki),he(Nn,xi)},[()=>({mobile:d()}),()=>ni("submenu_settings")]),$(Gt,Ct)};M(pi,Gt=>{d()&&Gt(ct)})}var ai=A(pi,2);let fi;yi(ai,21,()=>n(We),Gt=>Gt.id,(Gt,Ct)=>{var so=Ve(),ko=le(so);{var Nn=ki=>{uv(ki,{get isMobile(){return d()},get id(){return n(Ct).id},get icon(){return n(Ct).icon},get iconProps(){return n(Ct).iconProps},get label(){return n(Ct).label},get ariaLabel(){return n(Ct).ariaLabel},get value(){return n(Ct).value},get valueComponent(){return n(Ct).valueComponent},onClick:()=>{be(n(Ct).children),D(G,n(Ct).id,!0)},get ref(){return oe[n(Ct).id]},set ref(xi){oe[n(Ct).id]=xi}})},fn=(ki,xi)=>{{var Xo=hi=>{let $o=m(()=>`${n(Ct).id}-menu-item`);pv(hi,{get isMobile(){return d()},get id(){return n($o)},get onClick(){return n(Ct).onClick},get icon(){return n(Ct).icon},get label(){return n(Ct).label},get ariaLabel(){return n(Ct).ariaLabel},closeSettings:Oe})},ir=(hi,$o)=>{{var mn=Lo=>{let vn=m(()=>`${n(Ct).id}-menu-item`);mv(Lo,{get isMobile(){return d()},get id(){return n(vn)},get onClick(){return n(Ct).onClick},get icon(){return n(Ct).icon},get label(){return n(Ct).label},get ariaLabel(){return n(Ct).ariaLabel},get enabled(){return n(Ct).enabled},get tooltipText(){return n(Ct).tooltipText},get maxTooltipWidth(){return n(Ct).maxTooltipWidth}})};M(hi,Lo=>{n(Ct).type==="SWITCH"&&Lo(mn)},$o)}};M(ki,hi=>{n(Ct).type==="CLICK"?hi(Xo):hi(ir,!1)},xi)}};M(ko,ki=>{n(Ct).type==="OPEN_SUB_MENU"?ki(Nn):ki(fn,!1)})}$(Gt,so)}),S(ai),it(ai,Gt=>ie(Gt),()=>ie()),S(ot),O((Gt,Ct,so)=>{Ut=te(ot,1,"settings-menu menu s-m",null,Ut,Gt),fi=te(ai,1,"items",null,fi,Ct),Ke(ai,so)},[()=>({desktop:!d(),mobile:d(),hidden:!!Ne.current}),()=>({mobile:d()}),si]),vt("mouseenter",ot,Ai),vt("mouseleave",ot,Zi),$(F,ot)};M(bo,F=>{s()&&F(Ao)})}var pn=A(bo,2);yi(pn,17,()=>n(at),F=>F.id,(F,ot)=>{let Ut=m(()=>{var pi;return(pi=n(ot).minWidth)!=null?pi:137});cv(F,{get isMobile(){return d()},get playerControlsHeight(){return J()},get returnFromSubMenu(){return Ne.popSubMenu},get id(){return n(ot).id},get title(){return n(ot).title},get closeSettingsMenu(){return Rt},openSubMenuList:be,get items(){return n(ot).items},get minWidth(){return n(Ut)},get refMenuItems(){return oe},get listRef(){return de[n(ot).id]},set listRef(pi){de[n(ot).id]=pi}})}),S(Si),O(F=>eo=te(Si,1,"settings-menu-container s-m",null,eo,F),[()=>({mobile:d(),hidden:!s()})]),$(t,Si),H(),o()}Ze(["keydown","click"]);var rT=L('<button class="btn s-11"> </button>'),sT={hash:"s-11",code:"button.btn.s-11{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function Iv(t,e){Q(t,sT);var i=rT();i.__click=function(...s){var a;(a=e.onClick)==null||a.apply(this,s)};var o=C(i,!0);S(i),O(()=>he(o,e.label)),$(t,i)}Ze(["click"]);var aT=L('<div class="container s-h"><div class="notification s-h"><div><p class="description s-h"><!></p> <!></div> <!></div></div>'),lT={hash:"s-h",code:".container.s-h{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px;z-index:var(--controls-container-z-index)}.notification.s-h{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-h{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function Sc(t,e){B(e,!0),Q(t,lT);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Lt(),{ui:{t:s}}=xe(),a=s(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=aT(),d=C(l),r=C(d),u=C(r),p=C(u);xc(p,{get message(){return a}}),S(u);var f=A(u,2);{var v=y=>{let _=m(()=>s("slow_video_notification_button"));Iv(y,{get label(){return n(_)},get onClick(){return e.onSelectAutoQuality}})};M(f,y=>{o||y(v)})}S(r);var b=A(r,2);Hs(b,{get onClick(){return e.onClose}}),S(d),S(l),Ns(3,d,()=>_a,()=>({duration:i})),$(t,l),H()}import{isIntersecting as Ub,Subscription as dT}from"@vkontakte/videoplayer-shared/es2015";var ol="annotation",rp=class{constructor(e){this.slots=new Map;this.disabledIds=new Set(e)}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var r;let{overlay:o,id:s,controlsBehaviour:a,hideAllControls:l}=i;if(this.disabledIds.has(s))return{success:!1,message:"current slotId is disabled via config"};let d=typeof e=="function"?e():e;return d.setAttribute("slot",ol),this.setupSlotStyles(d,o),this.shadowRootContainer.append(d),this.slots.set(s,{rootElement:d,options:i}),a&&this.runHidingControlsWhenIntersected(s,a),l&&((r=this.store)==null||r.ui.isControlsAvailable.set(!1)),{success:!0}}setupSlotStyles(e,i){switch(e.style.position="absolute",i){case"over_video":e.style.zIndex="calc(var(--video-container-z-index) + 1)";break;case"over_controls":e.style.zIndex="calc(var(--controls-container-z-index) + 1)";break;default:e.style.zIndex="0"}}runHidingControlsWhenIntersected(s,a){return bt(this,arguments,function*(e,{observedSlotElementId:i,controlsToObserve:o}){var v;let l=this.slots.get(e);if(!l)return;let d=yield this.findSlotElement(l.rootElement,i,e),{controls:r,hiddenControls:u}=((v=this.store)==null?void 0:v.ui)||{},p=new MutationObserver(b=>b.forEach(()=>{let y=zs(d,this.shadowRootContainer);o.forEach(_=>{let w=r==null?void 0:r[_],I=w?_e(w):null,T=u==null?void 0:u[_];I&&(T==null||T.set(Ub(I,y)))})}));p.observe(d,{childList:!0,subtree:!0}),l.observer=p;let f=new dT;o.forEach(b=>{r&&f.add(r[b].subscribe(y=>{let _=u==null?void 0:u[b];y&&y.isDisplayed?_==null||_.set(Ub(y,zs(d,this.shadowRootContainer))):_==null||_.set(!1)}))}),l.subs=f})}findSlotElement(e,i,o){return bt(this,null,function*(){return new Promise(s=>{let a=null,l=new MutationObserver(()=>{if(a=e.querySelector(`#${i}`),a){l.disconnect();let r=this.slots.get(o);r&&(r.observerForFindingSlotElement=void 0),s(a)}});l.observe(e,{childList:!0,subtree:!0});let d=this.slots.get(o);d&&(d.observerForFindingSlotElement=l)})})}remove(e){var u,p;let i=this.slots.get(e);if(!i)return;let{rootElement:o,observer:s,observerForFindingSlotElement:a,subs:l,options:{controlsBehaviour:d,hideAllControls:r}}=i;o&&o.remove(),[s,a].forEach(f=>f==null?void 0:f.disconnect()),l==null||l.unsubscribe(),this.slots.delete(e),r&&((u=this.store)==null||u.ui.isControlsAvailable.set(!0)),(p=d==null?void 0:d.controlsToObserve)==null||p.forEach(f=>{var v,b;(b=(v=this.store)==null?void 0:v.ui.hiddenControls[f])==null||b.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var cT=L('<div class="container s-5"><!></div>'),uT={hash:"s-5",code:".container.s-5{align-items:center;animation-fill-mode:forwards;animation-name:s-5-videoPlayerStatusIconPopup;background-color:#00000073;border-radius:100%;display:flex;height:64px;justify-content:center;width:64px;will-change:opacity,scale}@keyframes s-5-videoPlayerStatusIconPopup{0%{opacity:0;scale:.6}10%{animation-timing-function:ease-in;opacity:1;scale:1}75%{opacity:1;scale:1}90%{animation-timing-function:ease-out;opacity:0;scale:.4}to{opacity:0;scale:0}}"};function Cc(t,e){B(e,!0),Q(t,uT);let i=g(e,"reversed",3,!1);var o=Ve(),s=le(o);Rs(s,()=>e.Icon,a=>{var l=cT(),d=C(l);Ui(d,()=>e.Icon,(r,u)=>{u(r,{get size(){return"48"},get reversed(){return i()}})}),S(l),O(()=>Ke(l,`animation-duration: ${e.duration}ms`)),$(a,l)}),$(t,o),H()}import{PlaybackState as zb}from"@vkontakte/videoplayer-core/es2015";var pT=L('<div class="container s-1g"><!></div>'),fT={hash:"s-1g",code:".container.s-1g{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function Ev(t,e){B(e,!0),Q(t,fT);let[i,o]=Be(),s=()=>x(r,"$playbackState$",i),a=()=>x(p,"$previewTrackActive",i),l=()=>x(f,"$previewTrackDragInProgress",i),d=()=>x(u,"$isPlaying$",i),{state:{playbackState$:r,isPlaying$:u},ui:{previewTrackActive:p,previewTrackDragInProgress:f}}=xe(),{features:{playbackStatusShow:v},playbackStatusAnimationDuration:b}=Lt(),y=0,_=K(null),w=K(!1);He(()=>{s()===zb.PLAYING?D(_,Dn,!0):s()===zb.PAUSED?D(_,Qs,!0):D(_,null)}),He(()=>{if(!(!v||a()||l()))return y=window.setTimeout(()=>{y=0,D(_,null)},b),()=>{y&&(window.clearTimeout(y),y=0)}}),He(()=>{d()&&!n(w)&&(D(w,!0),D(_,null))});var I=Ve(),T=le(I);{var R=k=>{var P=pT(),E=C(P);Cc(E,{get duration(){return b},get Icon(){return n(_)}}),S(P),$(k,P)};M(T,k=>{n(_)&&v&&k(R)})}$(t,I),H(),o()}var mT=L('<div><div data-testid="video-container"></div></div>'),vT={hash:"s-e",code:".video-container.s-e,.video-wrapper.s-e{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-e{background:var(--black)}.video-container.s-e,.video-wrapper.s-e{z-index:var(--video-container-z-index)}.video-container.s-e{transition:var(--rotate-transition-duration) ease all}.video-container.fast-rotate.s-e{transition:none}.nocursor.s-e{cursor:none}"};function nl(t,e){B(e,!0),Q(t,vT);let[i,o]=Be(),s=()=>x(f,"$rotateAlpha",i),a=()=>x(v,"$playerSize",i),l=()=>x(p,"$playerPhase",i),d=()=>x(y,"$chromecastConnected$",i),r=()=>x(b,"$isPlaying$",i),u=g(e,"videoContainer",15),{playerPhase:p,ui:{rotateAlpha:f,playerSize:v},state:{isPlaying$:b,chromecastConnected$:y}}=xe(),{isSmoothVideoRotate:_}=Lt(),w=m(()=>u()&&s()%180?a().height/a().width:1);var I=mT();let T;I.__contextmenu=function(...P){var E;(E=e.onContextMenu)==null||E.apply(this,P)},I.__mousedown=function(...P){var E;(E=e.onMouseDown)==null||E.apply(this,P)},I.__mouseup=function(...P){var E;(E=e.onMouseUp)==null||E.apply(this,P)},I.__click=function(...P){var E;(E=e.onClick)==null||E.apply(this,P)},I.__dblclick=function(...P){var E;(E=e.onDblClick)==null||E.apply(this,P)};var R=C(I);let k;it(R,P=>u(P),()=>u()),S(I),O((P,E)=>{T=te(I,1,"video-wrapper s-e",null,T,P),k=te(R,1,"video-container s-e",null,k,E),Ke(R,`transform: rotate(${s()}deg) scale(${n(w)})`),De(R,"data-is-playing",r())},[()=>({hidden:l()!=="video"||d(),nocursor:e.hideCursor}),()=>({"fast-rotate":!_})]),$(t,I),H(),o()}Ze(["contextmenu","mousedown","mouseup","click","dblclick"]);var gT=L('<div><span class="text s-1e"> </span> <!></div>'),hT={hash:"s-1e",code:".root.s-1e{background-color:var(--double-forward-bg);border-radius:100px;color:var(--white);display:flex;gap:4px;left:50%;opacity:0;padding:6px 12px;pointer-events:none;position:absolute;top:24px;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);visibility:hidden}.root.s-1e,.root.visible.s-1e{transform:translateX(-50%)}.root.visible.s-1e{opacity:1;visibility:visible}.text.s-1e{font-size:13px;font-weight:600;line-height:16px}"};function Pv(t,e){B(e,!0),Q(t,hT);let{ui:{t:i}}=xe();var o=gT();let s;var a=C(o),l=C(a,!0);S(a);var d=A(a,2);hc(d,{get size(){return"16"},fill:"currentColor"}),S(o),O((r,u)=>{s=te(o,1,"root s-1e",null,s,r),he(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),$(t,o),H()}var _T=L('<div class="container s-1c" role="button" data-testid="preview-track-overlay"><div class="icon s-1c"><!></div></div>'),bT={hash:"s-1c",code:".container.s-1c{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-1c,.icon.s-1c{align-items:center;display:flex;justify-content:center}.icon.s-1c{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-1c:hover .icon:where(.s-1c){transform:scale(1.15)}"};function Av(t,e){B(e,!1),Q(t,bT);let o=xe().actions.internal.closePreviewTrack,s=200,a=u=>{u.stopPropagation(),o()};Yo();var l=_T();l.__click=a;var d=C(l),r=C(d);return Dn(r,{get size(){return"32"}}),S(d),S(l),Ns(3,l,()=>_a,()=>({duration:s})),$(t,l),mf(e,"handleClick",a),H({handleClick:a})}Ze(["click"]);var $T=(t,e,i,o,s,a)=>{if(t.stopPropagation(),e()||o()){a();return}},yT=L("<div><!></div>"),xT=L('<div class="spherical-video-icon s-9"><!></div>'),wT=L("<div><!></div>"),ST=L('<div class="settings-menu s-9"><!></div>'),CT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),TT=L("<!> <!> <!>",1),IT=L('<div class="blocked s-9"></div>'),ET=L('<div class="player-wrapper s-9"><!> <div class="overlay-container"></div></div> <!>',1),PT={hash:"s-9",code:".blocked.s-9,.player-wrapper.s-9{height:100%;position:absolute;width:100%}.blocked.s-9{z-index:var(--overlay-container-z-index)}.player-wrapper.s-9 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-9{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-9{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-menu.s-9{bottom:57px;left:0;position:absolute;right:18px;transition:opacity .2s;z-index:var(--settings-menu-z-index)}"};function kv(t,e){B(e,!0),Q(t,PT);let[i,o]=Be(),s=()=>x(Sr,"$notificationsToShow$",i),a=()=>x(di,"$playerPhase",i),l=()=>x(Ao,"$isLoaderVisible",i),d=()=>x(Zi,"$adPlaybackState",i),r=()=>x(ai,"$crashed",i),u=()=>x(Xo,"$isInteractiveTime$",i),p=()=>x(ui,"$settingsMenuVisible",i),f=()=>x(ir,"$isInteractiveExpectation$",i),v=()=>x(Mi,"$isMinimalView$",i),b=()=>x(gi,"$controlsVisible",i),y=()=>x($o,"$touched",i),_=()=>x(Ur,"$graphIsOpened$",i),w=()=>x(Ji,"$isFullscreen",i),I=()=>x(or,"$autoplayNextEnabled$",i),T=()=>x(Ut,"$postrollPassed",i),R=()=>x(pn,"$isEnded$",i),k=()=>x(Ct,"$currentSubtitle$",i),P=()=>x(lr,"$cursorInside",i),E=()=>x(nr,"$isControlsAvailable",i),W=()=>x(Hr,"$doubleForwardOn$",i),U=()=>x(sr,"$fakeIsPlaying$",i),z=()=>x(Cr,"$bottomNoSmooth",i),Y=()=>x(Ts,"$interactiveTimeIndicator",i),ie=()=>x(ko,"$playerSize",i),J=()=>x(fn,"$is3DVideo",i),oe=()=>x(Bn,"$doubleForwardAvailable$",i),de=()=>x(eo,"$contextMenuVisible$",i),ae=()=>x(Ai,"$playbackState$",i),pe=()=>x(mn,"$hotKeyMapData",i),ee=()=>x(at,"$scrubbingInProgress",i),$e=()=>x(Si,"$volumeChangingInProgress",i),Ee=()=>x(F,"$chromecastConnected$",i),ce=()=>x($n,"$controlsTimeoutActive",i),Qe=()=>x(Nn,"$adsPlaybackState",i),fe=()=>x(We,"$settingsMenuOpenedByKeyboard",i),ve=()=>x(on,"$contextMenuOpenedByKeyboard$",i),X=()=>x(Is,"$contextMenuOpenedByHotKey$",i),N=()=>x(cr,"$contextMenuButtonRef$",i),me=()=>x(Gs,"$contextMenuLastActiveElem$",i),ue=()=>x(It,"$isFullscreenOpenedByKeyboard",i),Re=()=>x(vn,"$positionExact$",i),Je=()=>x(bi,"$language$",i),ke=()=>x(ba,"$previewTrackActive$",i),j=()=>x(ki,"$icon3DVideoVisible",i),ne=()=>x(ot,"$chromecastDeviceName$",i),Se=()=>x(so,"$currentSubtitleCaptions$",i),Le=()=>x(si,"$position$",i),ze=()=>x(pt,"$duration$",i),Ce=()=>x(pi,"$isLive$",i),we=()=>x(ct,"$isPlaying$",i),Fe=()=>x(xr,"$contextMenuPosition$",i),rt=()=>x(Lo,"$showHotKeyMap",i),ut=()=>x(bo,"$debugPanelVisible",i),Mt=()=>x(wr,"$userActionsDisabled$",i),lt=g(e,"videoContainer",15),ni=g(e,"adsSlotId",3,void 0),wt=g(e,"adsParams",3,void 0),Rt=g(e,"adsAutoplayParam",3,void 0),Dt=g(e,"duration",3,void 0),Qt=g(e,"logoTargetUrl",3,""),Te=g(e,"showNextPrevButtons",3,!1),G=g(e,"nextButtonActive",3,!1),Ne=g(e,"prevButtonActive",3,!1),be=g(e,"endScreenVideoTitle",3,void 0),Oe=g(e,"endScreenVideoThumb",3,void 0),Ie=g(e,"isOneVideoPlaylist",3,!1),ht=g(e,"shadowRootContainer",3,void 0),ye=g(e,"outerContainerRef",3,void 0),qe=g(e,"playerStarted",3,!1),Ue=g(e,"fullScreenTarget",3,void 0),st=g(e,"showMiniTimer",3,!1),qt=g(e,"showEndScreen",3,!0),Pt=g(e,"keyboardControls",15),Yt=e.store.getLogger().createComponentLog("Root component"),bi=e.store.interfaceLanguage$,Mi=e.store.ui.isMinimalView$,Ai=e.store.state.playbackState$,Zi=e.store.ads.playbackState,si=e.store.state.positionWithScrubbing$,pt=e.store.state.duration$,di=e.store.playerPhase,Ji=e.store.ui.isFullscreen,It=e.store.ui.isFullscreenOpenedByKeyboard,gi=e.store.ui.controlsVisible,ui=e.store.ui.settingsMenu.visible$,We=e.store.ui.settingsMenu.openedByBtnKeyboard$,at=e.store.ui.scrubbingInProgress,Si=e.store.ui.volumeChangingInProgress,eo=e.store.ui.contextMenu.visible$,bo=e.store.ui.debugPanelVisible,Ao=e.store.state.isLoaderVisible,pn=e.store.state.isEnded$,F=e.store.state.chromecastConnected$,ot=e.store.state.chromecastDeviceName$,Ut=e.store.ads.postrollPassed,pi=e.store.state.isLive$,ct=e.store.state.isPlaying$,ai=e.store.state.crashed$,fi=e.store.webApi.annotationsApi,Gt=e.store.webApi.pictureInPictureApi,Ct=e.store.state.currentSubtitle$,so=e.store.state.currentSubtitleCaptions$,ko=e.store.ui.playerSize,Nn=e.store.ads.playbackState,fn=e.store.ui.is3DVideo,ki=e.store.ui.icon3DVideoVisible,xi=e.store.state.isInteractive,Xo=e.store.state.isInteractiveTime$,ir=e.store.state.isInteractiveExpectation$,hi=e.store.state.hasInteractiveBranches,$o=e.store.ui.touched,mn=e.store.ui.modals.hotKeyMap.data,Lo=e.store.ui.modals.hotKeyMap.show,vn=e.store.state.positionExact$,Cs=e.store.ui.overlayContainer$,Ts=e.store.ui.controls.interactiveTimeIndicator,ss=e.store.state.showInteractiveTimeIndicator,xr=e.store.ui.contextMenu.position$,gn=e.store.actions.internal.setQuality,hn=e.store.actions.internal.closeSettingsMenu,or=e.store.ui.autoplayNextEnabled$,wr=e.store.ui.userActionsDisabled,nr=e.store.ui.isControlsAvailable,Br=e.store.ui.videoTitleInfo,Hr=e.store.ui.doubleForwardOn$,Bn=e.store.ui.doubleForwardAvailable$,rr=e.store.actions.internal.getVideoElement,Hn=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:sr,notifications$:Fr,graphIsOpened$:Ur}=_o(),Ci=K(void 0),as=K(void 0),Zo=K(void 0),gt=K(void 0),jt,ar,Fn;mn.set(P_());let{closeNotification:zr,notificationsToShow$:Sr}=Fr,Wr=m(()=>!!s().slow_video),_n=()=>zr("slow_video"),Jo=m(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!r()),bn=K(void 0),Cr=se(!1),Tr,$n=se(!1),yn=se(),lr=se(!1),Li=K(!1),yo=K(!1),Mo=K(!1),ao=K(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),xn=m(()=>u()&&!p()&&!(n(Li)||n(yo))&&!(n(Mo)&&!f())),wn=!0,Kr=m(()=>e.uiConfig.features.thumbTimer&&!v()&&st()&&a()==="video"&&!b()&&!r()&&!xi&&(e.uiConfig.hideThumbTimerAfterTouch&&!y()||!e.uiConfig.hideThumbTimerAfterTouch)),St=e.uiConfig.titleShowBehaviour,mi=m(()=>!["video","thumb"].includes(a())||St==="never"||_()?!1:St==="fullscreen"?w():!0),Wt=m(()=>St==="always"||a()==="thumb"?!1:!b()),Vo=K(!1),xo=m(()=>(qt()||e.showAutoplayNext&&I())&&!!be()&&!!Oe()&&(e.showAds&&T()||!e.showAds)&&R()&&!r()&&!n(Vo)&&!hi),Sn=m(()=>!v()&&k().value!=="off"&&a()==="video"),wo=m(()=>P()&&!(b()||n(xo))&&!u()&&E()&&!W()),Cn=K(!1),Wi=m(()=>U()!==null),{toggle:Ir}=sr,Ro=!1,Un=null;Gt==null||Gt.setContext(dd());let ls=()=>{e.autoplay&&!xi&&e.uiConfig.controls.showOnStartupAtAutoplay&&to(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:ls});let ds=()=>{window.clearTimeout(jt),$n.set(!1)},cs=()=>{window.clearTimeout(ar),yn.set(null)},to=ge=>{ds(),$n.set(!0),jt=window.setTimeout(()=>$n.set(!1),ge);let Tt=ge-100;Tr=window.setTimeout(()=>{z()&&Cr.set(!1)},Tt>0?Tt:ge)},us=(ge,Tt)=>{cs(),yn.set(Tt),ar=window.setTimeout(()=>yn.set(null),ge)},Qr=fn.subscribe(ge=>{ki.set(ge),ge&&(window.clearTimeout(Fn),Fn=window.setTimeout(()=>ki.set(!1),e.uiConfig.controls.hide360IconTimeout))}),vo=()=>bt(null,null,function*(){var Tt,$i,Ri,Ho;let ge=da();if(ge){let Co=Od(),io=_t();ge=Co===io||Co===ht()}if(ge){to(e.uiConfig.controls.hideTimeoutFullscreen);try{yield Gt==null?void 0:Gt.exit()}catch(Co){Yt({message:String(Co)})}}Ji.set(ge),e.store.getAdmanWrapper().setFullscreen(ge),w()?($i=(Tt=e.store.callbacks)==null?void 0:Tt.onFullscreenEnter)==null||$i.call(Tt):(Ho=(Ri=e.store.callbacks)==null?void 0:Ri.onFullscreenExit)==null||Ho.call(Ri)}),Er=ge=>{ko.set(ge)},et=()=>{if(n(Ci)){let{width:ge,height:Tt}=n(Ci).getBoundingClientRect();ko.set({width:ge,height:Tt})}};kt(()=>{var Tt;return Pu(vo),e.uiConfig.features.annotationsInside&&(fi==null||fi.init(n(Ci))),Gt==null||Gt.assignPlayerContainer(n(Ci)),e.uiConfig.disablePiPResizeHandling||Gt==null||Gt.setExternalEventHandlers({resize:Er,leavepictureinpicture:et}),e.interactiveContainer&&((Tt=lt().parentElement)==null||Tt.insertBefore(e.interactiveContainer,lt().nextSibling)),()=>{window.clearTimeout(jt),window.clearTimeout(Tr),window.clearTimeout(ar),window.clearTimeout(Fn),Qr(),Gt==null||Gt.dispose().catch($i=>{Yt({message:String($i)})}),Au(vo)}});let _t=()=>{let ge=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!ye()?n(Ci):ye(),Tt=ge.getRootNode(),$i=Tt instanceof ShadowRoot?Tt.host:Tt,Ri=Ue()instanceof HTMLElement&&Ue().contains($i);return e.uiConfig.allowChangingFullscreenTarget&&Ue()&&Ri?Ue():ge},Zt=()=>{eo.set(!1)},Vi=()=>{hn(),Zt()},lo=()=>bt(null,null,function*(){if(!Hn()){Yt({message:"fullscreen disabled"});return}Zt(),da()?(yield Eu(document),Yt({message:"exit fullscreen"})):(Yt({message:"request fullscreen"}),yield Iu(_t()))}),Ni=ge=>{_()||(ge.preventDefault(),eo.set(!0),xr.set({left:ge.clientX,top:ge.clientY}))};function go(){lr.set(!0),xi||to(e.uiConfig.controls.hideTimeoutCursor)}function Do(ge){var Co,io;let{relatedTarget:Tt}=ge,Ri=!!(Tt&&((Co=n(Zo))!=null&&Co.contains(Tt)))&&((io=Pt())==null?void 0:io.isFocused()),Ho=e.uiConfig.controls.showOnStartupAtAutoplay||!!Tt;!xi&&!Ri&&Ho&&(Cr.set(!0),to(e.uiConfig.controls.hideTimeoutCursor))}function Tn(){lr.set(!1),D(yo,!1),D(Li,!1),Ro=!1,e.store.actions.internal.releaseCamera(),to(e.uiConfig.controls.hideTimeout),W()&&Wn()}function zn(ge){return ge?ge.offsetTop+zn(ge.offsetParent):0}function ho(ge){return ge?ge.offsetLeft+ho(ge.offsetParent):0}function en(ge){if(Y()&&ss){let Tt=ge.currentTarget,$i=zn(Tt),Ri=ho(Tt),Ho=ge.pageX-Ri,Co=ge.pageY-$i,{left:io,bottom:rn,right:Es}=Y(),Ps=Es-io;return Ho>=io-Ps&&Co<=rn+Ps}}function Pr(ge){if(n(Ci)){let Tt=zn(ge.currentTarget),$i=ie().height,Ri=ge.pageY-Tt;if(en(ge)){D(yo,!1);return}Ri<40?D(yo,!0):Ri>$i-40?D(Li,!0):(D(yo,!1),p()||D(Li,!1))}}function Ar(ge){Pr(ge),!n(xn)&&!W()&&to(e.uiConfig.controls.hideTimeoutCursor),J()&&Ro&&Un&&e.store.actions.internal.moveCameraFocusPX(Un.clientX-ge.clientX,Un.clientY-ge.clientY,ge.timeStamp-Un.timeStamp),Un=ge}let So=null,dr=()=>{So=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),ds()},e.uiConfig.doubleForwardActivationTime)},Wn=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),So&&clearTimeout(So),So=null},ps=ge=>{ge.preventDefault(),ge.button===0&&(Ro=!0,e.store.actions.internal.holdCamera(),oe()&&dr()),!Ro&&to(e.uiConfig.controls.hideTimeoutCursor)},tt=ge=>{ge.preventDefault(),ge.button===0&&(Un=ge,Ro=!1,e.store.actions.internal.releaseCamera()),!W()&&to(e.uiConfig.controls.hideTimeoutCursor)},Nt=ge=>{ge.preventDefault(),wn&&(Yt({message:"double click on video"}),lo(),to(e.uiConfig.controls.hideTimeoutCursor))},Ti=ge=>{var Tt;if(ge.preventDefault(),W()){Wn();return}if(So&&Wn(),de()||p()){Vi();return}if(!(R()&&!hi)){if(n(Wi))return Ir();if((Tt=Pt())==null||Tt.focus(),!qe()){e.firstStart(),to(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||ae()!==Kb.PLAYING)&&e.store.actions.internal.togglePlay(),to(e.uiConfig.controls.hideTimeoutCursor)}},tn=ge=>{Vi(),$o.set(!0),to(e.uiConfig.controls.hideTimeout),ge&&us(e.uiConfig.controls.hideHotKeyHelpers,ge)},Oo=()=>{var ge,Tt;v()||(Vi(),(ge=e.store.callbacks)!=null&&ge.onOpenHotKeyMap?(Tt=e.store.callbacks)==null||Tt.onOpenHotKeyMap(pe()):Lo.update($i=>!$i))},qr=()=>{$o.set(!0)},on=e.store.ui.contextMenu.openedByBtnKeyboard$,cr=e.store.ui.contextMenu.btnRef$,Gr=K(void 0),Is=e.store.ui.contextMenu.openedByHotKey$,Gs=e.store.ui.contextMenu.lastActiveElem$,Kn=K(!1),ba=e.store.ui.previewTrackActive;He(()=>{Cs.set(n(bn))}),He(()=>{D(Mo,n(ao)&&ae()!==Kb.PLAYING,!0),n(ao)||Et(()=>D(ao,!0))}),He(()=>{var Tt,$i;let ge=(n(Mo)||R()||p()||ee()||$e()||Ee()||ce()||n(Kn))&&!n(xn)&&(a()==="video"||a()==="ads"&&(e.uiConfig.controls.showOnStartupAtAutoplay||Qe()!=="inactive"))&&!r()&&E();gi.set(ge),!ge&&!ce()&&((Tt=n(Zo))!=null&&Tt.contains(Ou()))&&(($i=Pt())==null||$i.focus())}),He(()=>{!ee()&&n(Cn)&&!u()&&to(e.uiConfig.controls.hideTimeoutCursor),Et(()=>D(Cn,ee(),!0))}),He(()=>{n(gt),p(),fe(),Et(()=>zd(n(gt),p(),fe()))}),He(()=>{n(Gr),de(),ve(),X(),Et(()=>{let ge=ve()||X();zd(n(Gr),de(),ge)})}),He(()=>{let ge=N();ge&&(de(),Et(()=>Bl(ge,de(),on)))}),He(()=>{let ge=me();ge&&(de(),Et(()=>D_(ge,de(),Is)))}),He(()=>{var ge;!ue()&&w()&&(Et(()=>It.set(!1)),(ge=Pt())==null||ge.focus())}),He(()=>{_()&&Vi()});let ft=K(void 0),li=ge=>{Br.set(er(rr(),{title:n(ft)},"title",ge))},No=(ge,Tt)=>{var Co,io;let $i=(io=(Co=e.store.callbacks)==null?void 0:Co.uiInfo)==null?void 0:io.onUpcomingLiveViewStateChanged;if(!$i)return;let Ri=!!Tt,Ho=Ye(Ye({},er(n(Ci),{upcomingLiveScreen:Tt},"upcomingLiveScreen",Ri)),ge);$i(Ho)},ur="",kr=m(()=>{var ge;return n(Wt)?ur:(ge=e.getVideoDeeplink)==null?void 0:ge.call(e,Re())});He(()=>{ur=n(kr)});var Bo=ET();vt("blur",ka,Vi);var Ii=le(Bo);Ii.__mousemove=Ar;var fs=C(Ii);let co=m(()=>a()==="ads"),Ki=m(()=>n(Wi)?Ir:void 0);it(Gf(fs,{startDoubleForwardActivationTimer:dr,stopDoubleForward:Wn,toggleFullscreen:lo,hideContextMenu:Vi,showHotKeyHelpers:tn,showKeyMap:Oo,get isAds(){return n(co)},get fakePlayButtonHandler(){return n(Ki)},get nextButtonActive(){return G()},get prevButtonActive(){return Ne()},children:(ge,Tt)=>{var $i=TT(),Ri=le($i);nl(Ri,{get hideCursor(){return n(wo)},onClick:Ti,onContextMenu:Ni,onMouseDown:ps,onMouseUp:tt,onDblClick:Nt,get videoContainer(){return lt()},set videoContainer(io){lt(io)}});var Ho=A(Ri,2);Oa(Ho,()=>"slot",!1,(io,rn)=>{no(io,()=>({name:ol}))});var Co=A(Ho,2);Rs(Co,Je,io=>{var rn=CT(),Es=le(rn);let Ps=m(()=>a()!=="thumb"||r()||xi&&e.autoplay);el(Es,{get hidden(){return n(Ps)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:Ni,onClick:Zt});var Ys=A(Es,2);{var jr=Ge=>{Av(Ge,{})};M(Ys,Ge=>{ke()&&Ge(jr)})}var js=A(Ys,2);Ev(js,{});var In=A(js,2);Pv(In,{get isVisible(){return W()}});var $a=A(In,2);{var sl=Ge=>{let vi=m(()=>{var Uo;return(Uo=e.live)==null?void 0:Uo.startTime});$c(Ge,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(vi)},onUpcomingLiveViewStateChanged:No,onContextMenu:Ni,onClick:Zt})};M($a,Ge=>{a()==="LiveWaitingStart"&&Ge(sl)})}var Lr=A($a,2);{var ed=Ge=>{tl(Ge,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:Ni,onClick:Zt})};M(Lr,Ge=>{a()==="LiveWaitingRecover"&&Ge(ed)})}var al=A(Lr,2);{var ll=Ge=>{tl(Ge,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:Ni,onClick:Zt})};M(al,Ge=>{a()==="LiveWaitingRecord"&&Ge(ll)})}var dl=A(al,2);{var td=Ge=>{var vi=yT();let Uo;var En=C(vi);Nd(En,{get adsSlotId(){return ni()},get adsParams(){return wt()},get adsAutoplayParam(){return Rt()},get duration(){return Dt()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson}}),S(vi),O(Pn=>Uo=te(vi,1,"ads-container s-9",null,Uo,Pn),[()=>({hidden:a()!=="ads"})]),$(Ge,vi)};M(dl,Ge=>{e.showAds&&qe()&&Ge(td)})}var ya=A(dl,2);{var cl=Ge=>{let vi=m(()=>!qt()&&e.showAutoplayNext&&I());Kf(Ge,{get title(){return be()},get thumb(){return Oe()},get isHide(){return n(vi)},clickCloseIcon:()=>D(Vo,!0)})};M(ya,Ge=>{n(xo)&&be()&&Oe()&&Ge(cl)})}var mt=A(ya,2);{var dt=Ge=>{let vi=m(()=>w()?"md":"sm"),Uo=m(()=>{var En;return(En=e.store.callbacks)==null?void 0:En.onTitleClicked});nv(Ge,{get title(){return e.title},get isHidden(){return n(Wt)},onVisibilityChanged:li,get titleLinkHref(){return n(kr)},onMouseEnter:()=>{D(Kn,!0)},onMouseLeave:()=>{D(Kn,!1)},get size(){return n(vi)},get onTitleClicked(){return n(Uo)},get ref(){return n(ft)},set ref(En){D(ft,En,!0)}})};M(mt,Ge=>{n(mi)&&Ge(dt)})}var Di=A(mt,2);{var Fo=Ge=>{let vi=m(()=>a()==="video"&&b());_c(Ge,{get isShifted(){return n(vi)}})};M(Di,Ge=>{J()&&Ge(Fo)})}var Qi=A(Di,2);{var _i=Ge=>{var vi=xT(),Uo=C(vi);Dd(Uo,{}),S(vi),$(Ge,vi)};M(Qi,Ge=>{j()&&Ge(_i)})}var Bi=A(Qi,2);{var xa=Ge=>{bc(Ge,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return ne()},onClick:Ti,onContextMenu:Ni,onDblClick:Nt})};M(Bi,Ge=>{Ee()&&Ge(xa)})}var ul=A(Bi,2);{var gp=Ge=>{Za(Ge,{get shifted(){return b()},get captions(){return Se()},get position(){return Le()},get playerSize(){return ie()}})};M(ul,Ge=>{n(Sn)&&Ge(gp)})}var Dc=A(ul,2);{var hp=Ge=>{var vi=wT();vi.__contextmenu=Ni,vi.__click=[$T,de,eo,p,ui,Vi];var Uo=C(vi);Ja(Uo,{}),S(vi),$(Ge,vi)};M(Dc,Ge=>{r()&&Ge(hp)})}var Oc=A(Dc,2);{var _p=Ge=>{let vi=m(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),Uo=m(()=>a()==="ads"),En=m(()=>e.canRewindLive&&ze()!==0);gc(Ge,{get bottomHidden(){return n(vi)},get bottomNoSmooth(){return z()},get showControls(){return b()},get isAds(){return n(Uo)},get canRewindLive(){return n(En)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Qt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Te()},get nextButtonActive(){return G()},get prevButtonActive(){return Ne()},get isOneVideoPlaylist(){return Ie()},customFullscreenSupported:wn,toggleFullscreen:lo,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(as)},set playerControlsWrapperRef(Pn){D(as,Pn,!0)},get playerControlsRef(){return n(Zo)},set playerControlsRef(Pn){D(Zo,Pn,!0)}})};M(Oc,Ge=>{qe()&&Ge(_p)})}var Nc=A(Oc,2);{var bp=Ge=>{var vi=ST(),Uo=C(vi);let En=m(()=>{var Pn;return(Pn=n(Zo))==null?void 0:Pn.clientHeight});wc(Uo,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(En)},returnFocus:()=>{var Pn;return(Pn=Pt())==null?void 0:Pn.focus()},get ref(){return n(gt)},set ref(Pn){D(gt,Pn,!0)}}),S(vi),$(Ge,vi)};M(Nc,Ge=>{!Ee()&&a()!=="ads"&&Ge(bp)})}var Bc=A(Nc,2);let pl=m(()=>!n(Kr));Fd(Bc,{get isLive(){return Ce()},get isHidden(){return n(pl)},get isPlaying(){return we()},get position(){return Le()},get duration(){return ze()}});var Hc=A(Bc,2);iv(Hc,{get data(){return yn}});var Xs=A(Hc,2);Wf(Xs,{get supportLink(){return e.supportLink},returnFocus:()=>{var Ge;return(Ge=Pt())==null?void 0:Ge.focus()},get visible(){return de()},get playerContainerRef(){return n(Ci)},get position(){return Fe()},get menuElementRef(){return n(Gr)},set menuElementRef(Ge){D(Gr,Ge,!0)}});var wa=A(Xs,2);{var $p=Ge=>{Sc(Ge,{onClose:_n,onSelectAutoQuality:()=>{gn("auto"),_n()}})};M(wa,Ge=>{n(Wr)&&Ge($p)})}var id=A(wa,2);{var od=Ge=>{za(Ge,{})};M(id,Ge=>{n(Jo)&&Ge(od)})}var nd=A(id,2);{var yp=Ge=>{Xf(Ge,{})};M(nd,Ge=>{rt()&&Ge(yp)})}var Fc=A(nd,2);{var xp=Ge=>{Qd(Ge,{})};M(Fc,Ge=>{ut()&&Ge(xp)})}$(io,rn)}),$(ge,$i)},$$slots:{default:!0}}),ge=>Pt(ge),()=>Pt());var nn=A(fs,2);it(nn,ge=>D(bn,ge),()=>n(bn)),S(Ii),it(Ii,ge=>D(Ci,ge),()=>n(Ci));var Qn=A(Ii,2);{var Yr=ge=>{var Tt=IT();$(ge,Tt)};M(Qn,ge=>{Mt()&&ge(Yr)})}vt("mouseenter",Ii,go),vt("mouseleave",Ii,Tn),vt("click",Ii,qr,!0),vt("focusin",Ii,Do,!0),$(t,Bo),H(),o()}Ze(["mousemove","contextmenu","click"]);import{clientChecker as Tc,PlaybackState as BT}from"@vkontakte/videoplayer-core/es2015";import{noop as HT}from"@vkontakte/videoplayer-shared/es2015";var AT=L('<div></div> <div class="info s-j"><div class="triangles-wrapper s-j"><div></div> <div></div> <div></div></div> <p class="step-caption s-j"> </p></div>',1),kT=L("<div><!></div>"),LT={hash:"s-j",code:".double-click-area.s-j{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-j{left:0}.double-click-area.right.s-j{right:0}.semicircle.s-j{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-j{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-j{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-j{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-j,.triangles-wrapper.s-j{display:flex;justify-content:center}.triangles-wrapper.s-j{margin-bottom:10px;position:relative}.triangle.s-j{animation:s-j-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-j:nth-child(3),.triangle.right.s-j:first-child{animation-delay:0s}.triangle.left.s-j:nth-child(2),.triangle.right.s-j:nth-child(2){animation-delay:.1s}.triangle.left.s-j:first-child,.triangle.right.s-j:nth-child(3){animation-delay:.2s}@keyframes s-j-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-j{border-right:8px solid var(--white)}.triangle.right.s-j{border-left:8px solid var(--white)}.triangle.s-j:not(:last-child){margin-right:5px}.step-caption.s-j{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function sp(t,e){B(e,!0),Q(t,LT);let i=g(e,"seekStep",3,0),o=K(!1),s=0,a=0,l=K(ri(i())),d=f=>{f.stopPropagation(),a+=1,D(l,i()*(a-1)),a===1?e.handleSingleFirstClick(f):(D(o,!0),e.handleSecondClick()),window.clearTimeout(s),s=window.setTimeout(()=>{a=0,D(o,!1)},300)};ln(()=>{window.clearTimeout(s)});var r=kT();r.__click=d;var u=C(r);{var p=f=>{var v=AT(),b=le(v),y=A(b,2),_=C(y),w=C(_),I=A(w,2),T=A(I,2);S(_);var R=A(_,2),k=C(R,!0);S(R),S(y),O(P=>{var E,W,U,z;te(b,1,`semicircle ${(E=e.side)!=null?E:""}`,"s-j"),te(w,1,`triangle ${(W=e.side)!=null?W:""}`,"s-j"),te(I,1,`triangle ${(U=e.side)!=null?U:""}`,"s-j"),te(T,1,`triangle ${(z=e.side)!=null?z:""}`,"s-j"),he(k,P)},[()=>q("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),$(f,v)};M(u,f=>{n(o)&&f(p)})}S(r),O(()=>{var f;return te(r,1,`double-click-area ${(f=e.side)!=null?f:""}`,"s-j")}),$(t,r),H()}Ze(["click"]);var MT=(t,e,i)=>{e(!1),i()},VT=L('<div class="overlay s-k"></div> <div class="next-video s-k"><div class="top s-k"><div class="caption s-k"> </div> <!></div> <div class="row s-k"><div class="column s-k"><div class="thumb s-k"><div></div> <!></div></div> <div class="column s-k"><div class="title s-k"> </div></div></div></div>',1),RT={hash:"s-k",code:".overlay.s-k{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-k{display:flex;flex-direction:column;left:50%;margin:0 auto;max-width:362px;min-width:320px;padding-bottom:12px;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:var(--end-screen-mobile-z-index)}.top.s-k{display:flex;justify-content:space-between}.caption.s-k{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-k{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-k{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-k{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-k,.thumb-overlay.s-k{height:100%;width:100%}.thumb-overlay.s-k{position:absolute}.thumb-overlay.withOpacity.s-k{background:var(--black);opacity:.3}.title.s-k{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Lv(t,e){B(e,!0),Q(t,RT);let[i,o]=Be(),s=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(r,"$timerNextVideoRunning$",i),l=xe(),d=l.ui.autoplayNextEnabled$,r=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,p=l.actions.internal.nextVideoAnnouncementShow,f=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,b=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),v()},_=()=>{e.clickCloseIcon(),b()};kt(()=>{e.isHide||p(),e.isHide&&s()&&(u(!1),v())});var w=Ve(),I=le(w);{var T=R=>{var k=VT(),P=A(le(k),2),E=C(P),W=C(E),U=C(W,!0);S(W);var z=A(W,2);Hs(z,{onClick:_}),S(E);var Y=A(E,2);Y.__click=[MT,u,f];var ie=C(Y),J=C(ie),oe=C(J);let de;var ae=A(oe,2);{var pe=ce=>{qd(ce,{get isRunning(){return a()},onTimerEnded:y})};M(ae,ce=>{s()&&ce(pe)})}S(J),S(ie);var ee=A(ie,2),$e=C(ee),Ee=C($e,!0);S($e),S(ee),S(Y),S(P),O((ce,Qe)=>{he(U,ce),Ke(J,`background-image: url('${e.thumb}')`),de=te(oe,1,"thumb-overlay s-k",null,de,Qe),he(Ee,e.title)},[()=>s()?q("end_screen_next_video"):q("end_screen_recommended_video"),()=>({withOpacity:s()})]),$(R,k)};M(I,R=>{e.isHide||R(T)})}$(t,w),H(),o()}Ze(["click"]);import{clientChecker as DT}from"@vkontakte/videoplayer-core/es2015";var Qb=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;kt(()=>{DT.device.isIOS&&(o=setTimeout(()=>{let a=t().querySelector("video");if(!a)return;let l=()=>e(!0),d=()=>e(!1);a.addEventListener("webkitbeginfullscreen",l),a.addEventListener("webkitendfullscreen",d),i=()=>{a.removeEventListener("webkitbeginfullscreen",l),a.removeEventListener("webkitendfullscreen",d)}},0))}),ln(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as OT}from"@vkontakte/videoplayer-core/es2015";var ap=class{constructor(e){this.video=e}getTracksArray(){return Array.from(this.video.getElementsByTagName("track"))}attach(e,i=!1){let o=document.createElement("track");o.setAttribute("src",e.url),o.setAttribute("id",e.id),e.label&&o.setAttribute("label",e.label),e.language&&o.setAttribute("srclang",e.language),i&&(o.track.mode="showing"),this.video.appendChild(o)}detachAll(){for(let e of this.getTracksArray())this.video.removeChild(e)}updateSrc(e){let i=this.getTracksArray().find(o=>o.id===e.id);i&&(i.src=e.url)}getCurrentShowingId(){var e,i;return(i=(e=this.getTracksArray().find(o=>o.track.mode==="showing"))==null?void 0:e.id)!=null?i:null}};import{clientChecker as NT}from"@vkontakte/videoplayer-core/es2015";var qb=({store:t,getFullscreenTarget:e})=>{let{isFullscreen:i}=t.ui,{setSubtitle:o}=t.actions.internal,{currentSubtitle$:s,availableSubtitlesList$:a,currentFormat$:l,availableTextTracks$:d}=t.state,r=null,u=()=>e().querySelector("video"),p=()=>NT.device.isIOS&&_e(l)===OT.DASH_LIVE_CMAF,f=()=>{r==null||r(),r=null},v=b=>{if(f(),!p()||!b)return;let y=u();if(!y)return;let _=new ap(y),w=_e(d),I=_e(a),T=_e(s);for(let P of w)I.some(W=>W.value===P.id)&&_.attach(P,T.value===P.id);let R=d.subscribe(P=>{for(let E of P)_.updateSrc(E)}),k=()=>{let P=_.getCurrentShowingId();o(_e(a).find(E=>E.value===P))};y.textTracks.addEventListener("change",k),r=()=>{R(),_.detachAll(),y.textTracks.removeEventListener("change",k)}};kt(()=>i.subscribe(v)),ln(f)};var FT=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},UT=L("<!> <!>",1),zT=L("<div><!></div>"),WT=L('<div class="spherical-video-icon s-8"><!></div>'),KT=L("<div><!></div>"),QT=L('<div class="settings-mobile s-8"><!></div>'),qT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),GT=L('<div class="player-wrapper s-8" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),YT={hash:"s-8",code:".player-wrapper.s-8{height:100%;position:absolute;width:100%}.player-wrapper.s-8 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-8{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-8{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-mobile.s-8{align-items:center;display:flex;left:50%;max-width:320px;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);width:90%;z-index:var(--settings-menu-z-index)}"};function Mv(t,e){var wn,Kr;B(e,!0),Q(t,YT);let[i,o]=Be(),s=()=>x(Oe,"$playerPhase",i),a=()=>x(bi,"$isLoaderVisible",i),l=()=>x(G,"$adPlaybackState",i),d=()=>x(gi,"$crashed",i),r=()=>x(Ts,"$notificationsToShow$",i),u=()=>x(Te,"$playbackState$",i),p=()=>x(Rt,"$graphIsOpened$",i),f=()=>x(qe,"$interactiveHideMobileControls",i),v=()=>x(Mi,"$isEnded$",i),b=()=>x(pi,"$isInteractiveExpectation$",i),y=()=>x(ht,"$controlsVisible",i),_=()=>x(fi,"$touched",i),w=()=>x(Ct,"$autoplayNextEnabled$",i),I=()=>x(si,"$postrollPassed",i),T=()=>x(gn,"$bottomNoSmooth",i),R=()=>x(at,"$videoSize",i),k=()=>x(Ao,"$playerSize",i),P=()=>x(Ie,"$isFullscreen",i),E=()=>x(Ne,"$position$",i),W=()=>x(be,"$duration$",i),U=()=>x(so,"$loadedMetadata",i),z=()=>x(Ue,"$settingsMenuVisible",i),Y=()=>x(qt,"$scrubbingInProgress",i),ie=()=>x(Pt,"$volumeChangingInProgress",i),J=()=>x(Ai,"$chromecastConnected$",i),oe=()=>x(ye,"$isControlsAvailable",i),de=()=>x(Ut,"$isInteractiveTime$",i),ae=()=>x(Ji,"$isActiveLive",i),pe=()=>x(st,"$settingsMenuOpenedByKeyboard",i),ee=()=>x(Qt,"$language$",i),$e=()=>x(ai,"$disabledControls$",i),Ee=()=>x(pn,"$is3DVideo",i),ce=()=>x(F,"$icon3DVideoVisible",i),Qe=()=>x(Zi,"$chromecastDeviceName$",i),fe=()=>x(Si,"$currentSubtitle$",i),ve=()=>x(eo,"$currentSubtitleCaptions$",i),X=()=>x(bo,"$realDuration$",i),N=()=>x(pt,"$isLive$",i),me=()=>x(di,"$isPlaying$",i),ue=()=>x(Yt,"$debugPanelVisible",i),Re=g(e,"videoContainer",15),Je=g(e,"adsSlotId",3,void 0),ke=g(e,"adsParams",3,void 0),j=g(e,"adsAutoplayParam",3,void 0),ne=g(e,"duration",3,void 0),Se=g(e,"logoTargetUrl",3,""),Le=g(e,"showNextPrevButtons",3,!1),ze=g(e,"nextButtonActive",3,!1),Ce=g(e,"prevButtonActive",3,!1),we=g(e,"endScreenVideoTitle",3,void 0),Fe=g(e,"endScreenVideoThumb",3,void 0),rt=g(e,"isOneVideoPlaylist",3,!1),ut=g(e,"showMiniTimer",3,!1),Mt=g(e,"fullScreenTarget",3,void 0),lt=g(e,"playerStarted",3,!1),ni=g(e,"showEndScreen",3,!0),{notifications$:wt,graphIsOpened$:Rt}=_o(),Dt=e.store.getLogger().createComponentLog("Root component"),Qt=e.store.interfaceLanguage$,Te=e.store.state.playbackState$,G=e.store.ads.playbackState,Ne=e.store.state.positionWithScrubbing$,be=e.store.state.duration$,Oe=e.store.playerPhase,Ie=e.store.ui.isFullscreen,ht=e.store.ui.controlsVisible,ye=e.store.ui.isControlsAvailable,qe=e.store.ui.interactiveHideMobileControls,Ue=e.store.ui.settingsMenu.visible$,st=e.store.ui.settingsMenu.openedByBtnKeyboard$,qt=e.store.ui.scrubbingInProgress,Pt=e.store.ui.volumeChangingInProgress,Yt=e.store.ui.debugPanelVisible,bi=e.store.state.isLoaderVisible,Mi=e.store.state.isEnded$,Ai=e.store.state.chromecastConnected$,Zi=e.store.state.chromecastDeviceName$,si=e.store.ads.postrollPassed,pt=e.store.state.isLive$,di=e.store.state.isPlaying$,Ji=e.store.state.isActiveLive$,It=e.store.state.isRewindableLive$,gi=e.store.state.crashed$,ui=e.store.webApi.annotationsApi,We=e.store.webApi.pictureInPictureApi,at=e.store.state.videoSize$,Si=e.store.state.currentSubtitle$,eo=e.store.state.currentSubtitleCaptions$,bo=e.store.state.duration$,Ao=e.store.ui.playerSize,pn=e.store.ui.is3DVideo,F=e.store.ui.icon3DVideoVisible,ot=e.store.state.isInteractive,Ut=e.store.state.isInteractiveTime$,pi=e.store.state.isInteractiveExpectation$,ct=e.store.state.hasInteractiveBranches,ai=e.store.ui.controls.disabledControls$,fi=e.store.ui.touched,Gt=e.store.ui.overlayContainer$,Ct=e.store.ui.autoplayNextEnabled$,so=e.store.state.loadedMetadata$,ko=e.store.actions.internal.closeSettingsMenu,Nn=(wn=e.store.callbacks)==null?void 0:wn.onDisabledPlayPrevChapterClick,fn=(Kr=e.store.callbacks)==null?void 0:Kr.onDisabledSeekToInteractiveClick,ki=e.store.actions.internal.setQuality,xi=K(void 0),Xo=K(void 0),ir=K(void 0),hi=K(void 0),$o,mn,Lo=m(()=>(s()==="video"&&a()||s()==="ads"&&l()==="inactive")&&!d()),vn=K(void 0),{closeNotification:Cs,notificationsToShow$:Ts}=wt,ss=m(()=>!!r().slow_video),xr=()=>Cs("slow_video"),gn=se(!1),hn,or=K(!1),wr=m(()=>u()!==BT.PLAYING),nr=K(!1),Br=m(()=>p()||f()||!n(or)&&(v()&&!!ct||n(wr)&&b())),Hr=K(!0),Bn=m(()=>e.uiConfig.features.thumbTimer&&ut()&&s()==="video"&&!y()&&!d()&&!ot&&(e.uiConfig.hideThumbTimerAfterTouch&&!_()||!e.uiConfig.hideThumbTimerAfterTouch)),rr=K(!1),Hn=m(()=>(ni()||e.showAutoplayNext&&w())&&!!we()&&!!Fe()&&(e.showAds&&I()||!e.showAds)&&v()&&!d()&&!n(rr)),sr=K(!1);We==null||We.setContext(dd());let Fr=St=>{St&&!ot&&e.uiConfig.controls.showOnStartupAtAutoplay&&Ci(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:Fr});let Ur=()=>{clearTimeout($o),D(or,!1),f()&&qe.set(!1)},Ci=St=>{Ur(),D(or,!0),$o=setTimeout(()=>D(or,!1),St);let mi=St-100;hn=setTimeout(()=>{T()&&gn.set(!1)},mi>0?mi:St)},as=pn.subscribe(St=>{F.set(St),St&&(clearTimeout(mn),mn=setTimeout(()=>F.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Zo=(...mi)=>bt(null,[...mi],function*(St=da()){var Wt,Vo,xo,Sn,wo,Cn;if(St&&!Tc.device.isIOS){let Wi=Od(),Ir=Sr(),Ro=Tc.browser.isSamsungBrowser&&Wi===e.shadowRootContainer;St=Wi===Ir||Ro}if(St){Ci(e.uiConfig.controls.hideTimeoutFullscreen);try{yield We==null?void 0:We.exit()}catch(Wi){Dt({message:String(Wi)})}try{let Wi=(Wt=R())!=null&&Wt.width&&((Vo=R())!=null&&Vo.height)?R():k();yield I_(Wi)}catch(Wi){Dt({message:String(Wi)})}}Ie.set(St),e.store.getAdmanWrapper().setFullscreen(St),P()?(Sn=(xo=e.store.callbacks)==null?void 0:xo.onFullscreenEnter)==null||Sn.call(xo):(Cn=(wo=e.store.callbacks)==null?void 0:wo.onFullscreenExit)==null||Cn.call(wo)}),gt=St=>{Ao.set(St)},jt=()=>{if(n(xi)){let{width:St,height:mi}=n(xi).getBoundingClientRect();Ao.set({width:St,height:mi})}};kt(()=>{var St;return Pu(Zo),e.uiConfig.features.annotationsInside&&(ui==null||ui.init(n(xi))),We==null||We.assignPlayerContainer(n(xi)),e.uiConfig.disablePiPResizeHandling||We==null||We.setExternalEventHandlers({resize:gt,leavepictureinpicture:jt}),D(Hr,!Tc.device.isIphoneOrOldIpad),e.interactiveContainer&&((St=Re().parentElement)==null||St.insertBefore(e.interactiveContainer,Re().nextSibling)),()=>{clearTimeout($o),clearTimeout(hn),clearTimeout(mn),as(),We==null||We.dispose().catch(mi=>{Dt({message:String(mi)})}),Au(Zo)}});let ar=K(!0),Fn=K(!0),zr=St=>{let mi=E()+(St==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;mi<0?(D(ar,!1),mi=0):mi>=W()&&(D(Fn,!1),mi=W()),D(nr,!0),e.seekTime(mi)},Sr=()=>Tc.device.isIOS?n(xi):!e.uiConfig.allowChangingFullscreenTarget||!Mt()?e.outerContainerRef:Mt().contains(e.outerContainerRef)?Mt():e.outerContainerRef,Wr=()=>bt(null,null,function*(){try{if(da())yield Eu(document),Dt({message:"exit fullscreen"});else{if(Dt({message:"request fullscreen"}),Tc.device.isIOS&&!U())return;yield Iu(Sr())}}catch(St){Dt({message:String(St)})}}),_n=()=>{ko()},Jo=St=>{if(St.preventDefault(),z()){_n();return}if(!lt()){e.firstStart(),Ci(e.uiConfig.controls.hideTimeoutCursor);return}D(nr,!1),y()?Ur():Ci(e.uiConfig.controls.hideTimeoutMobile)},bn=()=>{fi.set(!0)},Cr=()=>{ot||(gn.set(!0),Ci(e.uiConfig.controls.hideTimeoutCursor))},Tr=St=>{Nn&&(Nn(St),Ci(e.uiConfig.controls.hideTimeoutMobile))},$n=St=>{fn&&(fn(St),Ci(e.uiConfig.controls.hideTimeoutMobile))};He(()=>{Gt.set(n(vn))}),He(()=>{ht.set((n(wr)||z()||Y()||ie()||J()||!n(Hn)&&(v()||n(or)&&!n(nr)))&&!n(Br)&&s()==="video"&&!d()&&oe())}),He(()=>{!Y()&&n(sr)&&!de()&&Ci(e.uiConfig.controls.hideTimeoutMobile),D(sr,Y(),!0)}),He(()=>{D(ar,E()>0),D(Fn,!ae()&&E()<W(),!0)}),He(()=>{zd(n(hi),z(),pe(),!0)});let yn=q("aria_label_video_player");Qb({fullScreenChangeHandler:Zo,getFullscreenTarget:Sr}),qb({store:e.store,getFullscreenTarget:Sr});let lr=(St,mi)=>{var Sn,wo;let Wt=(wo=(Sn=e.store.callbacks)==null?void 0:Sn.uiInfo)==null?void 0:wo.onUpcomingLiveViewStateChanged;if(!Wt)return;let Vo=!!mi,xo=Ye(Ye({},er(n(xi),{upcomingLiveScreen:mi},"upcomingLiveScreen",Vo)),St);Wt(xo)};var Li=GT();vt("blur",ka,_n);var yo=C(Li);nl(yo,{onClick:Jo,get videoContainer(){return Re()},set videoContainer(St){Re(St)}});var Mo=A(yo,2);Oa(Mo,()=>"slot",!1,(St,mi)=>{no(St,()=>({name:ol}))});var ao=A(Mo,2);Rs(ao,ee,St=>{var mi=qT(),Wt=le(mi);let Vo=m(()=>s()!=="thumb"||d()||ot&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);el(Wt,{get hidden(){return n(Vo)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var xo=A(Wt,2);{var Sn=tt=>{var Nt=UT(),Ti=le(Nt);{var tn=on=>{let cr=m(()=>e.uiConfig.controls.seekStepMobile/1e3);sp(on,{side:"left",get seekStep(){return n(cr)},handleSingleFirstClick:Jo,handleSecondClick:()=>zr("backward")})};M(Ti,on=>{n(ar)&&on(tn)})}var Oo=A(Ti,2);{var qr=on=>{let cr=m(()=>e.uiConfig.controls.seekStepMobile/1e3);sp(on,{side:"right",get seekStep(){return n(cr)},handleSingleFirstClick:Jo,handleSecondClick:()=>zr("forward")})};M(Oo,on=>{n(Fn)&&on(qr)})}$(tt,Nt)};M(xo,tt=>{e.canRewindLive&&It&&!$e().has("TIMELINE")&&tt(Sn)})}var wo=A(xo,2);{var Cn=tt=>{let Nt=m(()=>{var Ti;return(Ti=e.live)==null?void 0:Ti.startTime});$c(tt,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(Nt)},onUpcomingLiveViewStateChanged:lr})};M(wo,tt=>{s()==="LiveWaitingStart"&&tt(Cn)})}var Wi=A(wo,2);{var Ir=tt=>{tl(tt,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};M(Wi,tt=>{s()==="LiveWaitingRecover"&&tt(Ir)})}var Ro=A(Wi,2);{var Un=tt=>{tl(tt,{kind:"record",get thumbUrl(){return e.thumbUrl}})};M(Ro,tt=>{s()==="LiveWaitingRecord"&&tt(Un)})}var ls=A(Ro,2);{var ds=tt=>{var Nt=zT();let Ti;var tn=C(Nt);Nd(tn,{get adsSlotId(){return Je()},get adsParams(){return ke()},get adsAutoplayParam(){return j()},get duration(){return ne()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson}}),S(Nt),O(Oo=>Ti=te(Nt,1,"ads-container s-8",null,Ti,Oo),[()=>({hidden:s()!=="ads"})]),$(tt,Nt)};M(ls,tt=>{e.showAds&<()&&tt(ds)})}var cs=A(ls,2);{var to=tt=>{let Nt=m(()=>!ni()&&e.showAutoplayNext&&w());Lv(tt,{get title(){return we()},get thumb(){return Fe()},get isHide(){return n(Nt)},clickCloseIcon:()=>D(rr,!0)})};M(cs,tt=>{n(Hn)&&we()&&Fe()&&tt(to)})}var us=A(cs,2);{var Qr=tt=>{_c(tt,{})};M(us,tt=>{Ee()&&tt(Qr)})}var vo=A(us,2);{var Er=tt=>{var Nt=WT(),Ti=C(Nt);Dd(Ti,{}),S(Nt),$(tt,Nt)};M(vo,tt=>{ce()&&tt(Er)})}var et=A(vo,2);{var _t=tt=>{bc(tt,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Qe()},onClick:Jo})};M(et,tt=>{J()&&tt(_t)})}var Zt=A(et,2);{var Vi=tt=>{Za(tt,{get shifted(){return y()},get captions(){return ve()},get position(){return E()},get playerSize(){return k()},isMobile:!0})};M(Zt,tt=>{fe().value!=="off"&&tt(Vi)})}var lo=A(Zt,2);{var Ni=tt=>{var Nt=KT();Nt.__click=[FT,z,Ue,_n];var Ti=C(Nt);Ja(Ti,{}),S(Nt),$(tt,Nt)};M(lo,tt=>{d()&&tt(Ni)})}var go=A(lo,2);{var Do=tt=>{let Nt=m(()=>s()==="thumb"||s()==="LiveWaitingStart"||s()==="LiveWaitingRecover"||s()==="LiveWaitingRecord"||s()==="ads"),Ti=m(()=>s()==="ads"),tn=m(()=>e.canRewindLive&&X()!==0);gc(tt,{get bottomHidden(){return n(Nt)},get showControls(){return y()},get bottomNoSmooth(){return T()},get isAds(){return n(Ti)},get canRewindLive(){return n(tn)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Se()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Le()},get nextButtonActive(){return ze()},get prevButtonActive(){return Ce()},get isOneVideoPlaylist(){return rt()},get customFullscreenSupported(){return n(Hr)},get endScreenShown(){return n(Hn)},toggleFullscreen:Wr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:Tr,onDisabledSeekToInteractiveClick:$n,get playerControlsWrapperRef(){return n(Xo)},set playerControlsWrapperRef(Oo){D(Xo,Oo,!0)},get playerControlsRef(){return n(ir)},set playerControlsRef(Oo){D(ir,Oo,!0)}})};M(go,tt=>{lt()&&tt(Do)})}var Tn=A(go,2);{var zn=tt=>{var Nt=QT(),Ti=C(Nt);wc(Ti,{get supportLink(){return e.supportLink},get returnFocus(){return HT},get ref(){return n(hi)},set ref(tn){D(hi,tn,!0)}}),S(Nt),$(tt,Nt)};M(Tn,tt=>{z()&&tt(zn)})}var ho=A(Tn,2);let en=m(()=>!n(Bn));Fd(ho,{get isLive(){return N()},get isHidden(){return n(en)},get isPlaying(){return me()},get position(){return E()},get duration(){return W()}});var Pr=A(ho,2);{var Ar=tt=>{za(tt,{})};M(Pr,tt=>{n(Lo)&&tt(Ar)})}var So=A(Pr,2);{var dr=tt=>{Qd(tt,{})};M(So,tt=>{ue()&&tt(dr)})}var Wn=A(So,2);{var ps=tt=>{Sc(tt,{onClose:xr,onSelectAutoQuality:()=>{ki("auto"),xr()}})};M(Wn,tt=>{n(ss)&&tt(ps)})}$(St,mi)});var xn=A(ao,2);it(xn,St=>D(vn,St),()=>n(vn)),S(Li),it(Li,St=>D(xi,St),()=>n(xi)),O(()=>De(Li,"aria-label",yn)),vt("click",Li,bn,!0),vt("focusin",Li,Cr,!0),$(t,Li),H(),o()}Ze(["click"]);import{debounceFn as jT}from"@vkontakte/videoplayer-shared/es2015";var XT=L('<div class="time-container s-7"><!></div>'),ZT=L('<div class="player-wrapper s-7" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),JT={hash:"s-7",code:".player-wrapper.s-7{height:100%;position:absolute;width:100%}.player-wrapper.s-7 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.timeline.s-7{bottom:0;left:0;opacity:0;opacity:1;position:absolute;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.visible.s-7{opacity:1}.time-container.s-7{bottom:8px;position:absolute;right:8px;z-index:var(--thumb-timer-z-index)}"};function Vv(t,e){B(e,!0),Q(t,JT);let[i,o]=Be(),s=()=>x(de,"$scrubbingInProgress",i),a=()=>x(J,"$playerSize",i),l=()=>x(E,"$isPlaying$",i),d=()=>x(k,"$duration$",i),r=()=>x(z,"$positionWithScrubbing$",i),u=()=>x(T,"$playerPhase",i),p=()=>x(R,"$crashed$",i),f=()=>x(W,"$currentSubtitle$",i),v=()=>x(U,"$currentSubtitleCaptions$",i),b=()=>x(P,"$positionExact$",i),y=()=>x(Y,"$isLive$",i),_=()=>x(ie,"$isRewindableLive$",i),w=g(e,"outsideDuration",3,0),I=g(e,"videoContainer",15),{playerPhase:T,state:{crashed$:R,duration$:k,positionExact$:P,isPlaying$:E,currentSubtitle$:W,currentSubtitleCaptions$:U,positionWithScrubbing$:z,isLive$:Y,isRewindableLive$:ie},ui:{playerSize:J,controls:oe,scrubbingInProgress:de},actions:{internal:{getVideoElement:ae}}}=xe(),pe=8,ee=K(!1),$e=ri({}),Ee=K(!1),ce=m(()=>!s()&&!n(Ee)),Qe=()=>{D(ee,!0)},fe=()=>{D(ee,!1)},ve=jT(Yl,260);He(()=>{a(),ve(ae(),oe,$e,n(ee))});let X=m(()=>l()?jo(d()-r()):jo(isFinite(d())?d():w()));var N=ZT(),me=C(N);nl(me,{hideCursor:!1,get videoContainer(){return I()},set videoContainer(we){I(we)}});var ue=A(me,2);Oa(ue,()=>"slot",!1,(we,Fe)=>{no(we,()=>({name:ol}))});var Re=A(ue,2);let Je=m(()=>u()!=="thumb"||p());el(Re,{get hidden(){return n(Je)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var ke=A(Re,2);{var j=we=>{Za(we,{shifted:!1,get captions(){return v()},get position(){return b()},get playerSize(){return a()}})};M(ke,we=>{f().value!=="off"&&n(ce)&&we(j)})}var ne=A(ke,2);{var Se=we=>{var Fe=XT(),rt=C(Fe);Hd(rt,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(X)}}),S(Fe),$(we,Fe)};M(ne,we=>{n(ce)&&we(Se)})}var Le=A(ne,2);let ze;var Ce=C(Le);ja(Ce,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return _()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:pe,tooltipRightOffset:pe,get ref(){return $e.timeline},set ref(we){$e.timeline=we}}),S(Le),S(N),O(we=>ze=te(Le,1,"timeline s-7",null,ze,we),[()=>({visible:n(ee)})]),vt("mouseenter",N,Qe),vt("mouseleave",N,fe),vt("mouseenter",Le,()=>D(Ee,!0)),vt("mouseleave",Le,()=>D(Ee,!1)),$(t,N),H(),o()}var nI=L("<div><!></div>"),rI={hash:"s-2",code:'.vk-vp-root.s-2{--white:#fff;--black:#000;--red:#ff3347;--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--controls-desktop-padding-horizontal-minimal-view:8px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px;--interactive-episode-complete:#5c9ce6;--slider-bg:hsla(0,0%,100%,.4);--slider-filled-bg:var(--white);--slider-handle-bg:var(--white);--slider-loaded-bg:hsla(0,0%,100%,.4);--slider-height:3px;--slider-video-episode-gap:1.5px;--slider-radius:0px;--slider-handle-size:12px;--slider-filled-ads:#67a5eb;--slider-disabled-color:hsla(0,0%,97%,.31);--slider-volume-height:5px;--slider-volume-radius:calc(var(--slider-volume-height)/2);--slider-volume-handle-size:13px;--timeline-slider-filled-active-live-bg:var(--red);--timeline-slider-handle-active-live-bg:var(--red);--timeline-slider-bg:var(--slider-bg);--timeline-slider-filled-bg:var(--slider-filled-bg);--timeline-slider-handle-bg:var(--slider-handle-bg);--timeline-slider-loaded-bg:var(--slider-loaded-bg);--volume-slider-bg:var(--slider-bg);--volume-slider-filled-bg:var(--slider-filled-bg);--volume-slider-handle-bg:var(--slider-handle-bg);--controls-time:var(--white);--controls-gradient:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.005) 6.67%,rgba(0,0,0,.02) 13.33%,rgba(1,1,1,.04) 20%,rgba(1,1,1,.07) 26.67%,rgba(2,2,2,.11) 33.33%,rgba(3,3,3,.16) 40%,rgba(4,4,4,.22) 46.67%,rgba(6,6,6,.28) 53.33%,rgba(7,7,7,.33) 60%,rgba(8,8,8,.38) 66.67%,rgba(9,9,9,.42) 73.33%,rgba(9,9,9,.46) 80%,hsla(0,0%,4%,.48) 86.67%,hsla(0,0%,4%,.5));--timeline-preview-shadow:rgba(0,0,0,.08);--timeline-preview-bg:#222;--timeline-padding-horizontal:10px;--timeline-padding-vertical-top:3px;--timeline-padding-vertical-bottom:4px;--timeline-height:calc(var(--timeline-padding-vertical-bottom) + var(--timeline-padding-vertical-top) + var(--slider-height));--preview-track-frame-height-vertical:114px;--preview-track-frame-height-horizontal:65px;--preview-track-controls-top:16px;--preview-track-time-line-height:16px;--preview-track-bottom-offset:10px;--preview-track-height:calc(var(--preview-track-frame-height-vertical) + var(--preview-track-bottom-offset));--preview-track-controls-top-offset:calc(var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height));--settings-bg:rgba(0,0,0,.72);--settings-item-bg-hover:hsla(0,0%,100%,.08);--settings-radius:8px;--mobile-settings-bg:#2c2d2e;--divider-border:1px solid var(--white-alpha-24);--toggle-color-separator:#363738;--toggle-color-off:#656565;--toggle-color-on:#71aaeb;--toggle-color-autoplay-on:var(--white);--notification-bg:#2c2d2e;--notification-radius:8px;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--controls-container-z-index:1;--ads-container-z-index:1;--end-screen-mobile-z-index:1;--notification-z-index:1;--thumb-timer-z-index:2;--debug-panel-z-index:2;--modal-z-index:2;--settings-menu-z-index:2;--context-menu-z-index:3;--hot-key-helpers-container-z-index:3;--overlay-container-z-index:4;--rotate-transition-duration:0.25s;--btn-color:var(--white);--double-forward-bg:rgba(0,0,0,.6);background:var(--black);color:var(--white);font-family:var(--vk-vp-custom-font,var(--font));font-size:12px;height:100%;line-height:normal;outline:0;overflow:hidden;position:relative;user-select:none;width:100%}.vk-vp-root.visible-outside.s-2{overflow:visible}.vk-vp-root.s-2 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-2 button{background:transparent;border:none;color:inherit;font:inherit;line-height:normal;margin:0;overflow:visible;padding:0;width:auto;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}.vk-vp-root.s-2 p{margin:0}.vk-vp-root.s-2 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-2 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-2 :focus,.vk-vp-root.s-2 :focus-visible{outline:none}.vk-vp-root.s-2 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-2 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-2 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-2 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-2 .overlay-container{height:100%;left:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:var(--overlay-container-z-index)}.vk-vp-root.s-2 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-2 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function Dv(t,e){B(e,!0),Q(t,rI);let[i,o]=Be(),s=()=>x(lt,"$isLive$",i),a=()=>x(ui,"$availableSubtitlesList$",i),l=()=>x(We,"$isPreviewTrackHorizontallyAligned$",i),d=g(e,"sources",7),r=g(e,"store",7),u=g(e,"microStoresRoot",7),p=g(e,"videoConfig",7),f=g(e,"uiConfig",7),v=g(e,"title",7),b=g(e,"thumbUrl",7),y=g(e,"interactiveContainer",7),_=g(e,"interactiveController",7),w=g(e,"subtitles",7),I=g(e,"subtitlesForcedLanguage",7),T=g(e,"live",7),R=g(e,"preload",7),k=g(e,"autoplay",7),P=g(e,"volume",7,void 0),E=g(e,"muted",7,void 0),W=g(e,"fromTime",7),U=g(e,"canRewindLive",7),z=g(e,"showAds",7),Y=g(e,"adsSlotId",7,void 0),ie=g(e,"adsParams",7,void 0),J=g(e,"adsAutoplayParam",7,void 0),oe=g(e,"duration",7,void 0),de=g(e,"logoClickable",7),ae=g(e,"logoHidden",7),pe=g(e,"isMobile",7),ee=g(e,"showNextPrevButtons",7,!1),$e=g(e,"nextButtonActive",7,!1),Ee=g(e,"prevButtonActive",7,!1),ce=g(e,"endScreenVideoTitle",7,void 0),Qe=g(e,"endScreenVideoThumb",7,void 0),fe=g(e,"isOneVideoPlaylist",7,!1),ve=g(e,"supportLink",7),X=g(e,"shadowRootContainer",7),N=g(e,"outerContainerRef",7),me=g(e,"fullScreenTarget",7,void 0),ue=g(e,"failoverHosts",7,void 0),Re=g(e,"showMiniTimer",7,!1),Je=g(e,"saveRate",7),ke=g(e,"seekToInteractive",7,Gb),j=g(e,"playPrevChapter",7,Gb),ne=g(e,"volumeMultiplier",7),Se=g(e,"showAutoplayNext",7),Le=g(e,"showEndScreen",7,!0),ze=g(e,"keyboardControls",15,void 0),{subscribers:Ce,stores:we}=u();Dh(f());let Fe=Lt(),rt=f().logoLink,ut=r().ui.debugPanelVisible,Mt=r().ui.playerSize,lt=r().state.isLive$,wt=r().state.isInteractive&&Rv.device.isAndroid,Rt=K(void 0),Dt=null,Qt=K(!1);r().getAdmanWrapper().init({switchFromAdsToVideo:r().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:r().actions.internal.switchFromVideoToAds,setMuted:r().actions.external.setMuted},r().ads,{vsid:r().vsid}),Qh(r(),we),He(()=>{var F,ot;r().ui.isMobile.set(pe()),(ot=(F=p().callbacks)==null?void 0:F.onDomReady)==null||ot.call(F)});let Te=(F=!1)=>{D(Qt,!0),F?r().actions.external.firstStart(z()):r().actions.internal.firstStart(z())},G=()=>{if(Fe.features.qualityDetailsSubMenuEnabled){let F=v_(r().videoId);if(F)switch(F.type){case"high_quality":r().actions.internal.setHighQualityEnabled(!0,F.appliesTo);break;case"traffic_saving":r().actions.internal.setTrafficSavingEnabled(!0,F.appliesTo);break;case"exact_quality":r().actions.internal.setQuality(F.quality);break}}else{g_(r().videoId),Af()&&r().actions.internal.setTrafficSavingEnabled(!0);let ot=If(r().videoId);ot&&r().actions.internal.setQuality(ot)}};function Ne(F){var ai,fi,Gt;let ot=d()||F;ot&&r().initVideo({container:n(Rt),sources:ot,failoverHosts:ue(),subtitles:w(),subtitlesForcedLanguage:I(),volumeMultiplier:ne()});let Ut=tI.get(kd)==="true";ut.set(Ut),W()>0&&r().actions.external.seekTime(W());let pi=pe()?Fe.volumeDefault:(fi=(ai=P())!=null?ai:xu())!=null?fi:Fe.volumeDefault,ct=(Gt=E())!=null?Gt:d_();if(r().actions.external.setVolume(pi),r().actions.external.setMuted(ct),r().getAdmanWrapper().setInitialVolume(ct?0:pi),G(),Fe.features.saveRate&&Je()){let Ct=p_();Ct&&!s()&&r().actions.internal.setPlaybackRate(Ct)}if(Se()){let Ct=m_();Ct&&r().actions.internal.setAutoplayNextEnabled(Ct)}r().ui.isAutoplay.set(k()),k()&&Te(),R()&&Fe.features.preload&&r().actions.internal.preload()}let be=F=>{if(window.ResizeObserver){let ot,Ut;Dt=new ResizeObserver(iI(pi=>{let ct=pi[0];if(ct.contentBoxSize){let ai=Array.isArray(ct.contentBoxSize)?ct.contentBoxSize[0]:ct.contentBoxSize;ot=ai.inlineSize,Ut=ai.blockSize}else ct.contentRect&&(ot=ct.contentRect.width,Ut=ct.contentRect.height);Mt.set({width:ot,height:Ut})},300)),Dt.observe(F)}F.clientWidth&&F.clientHeight&&Mt.set({width:F.clientWidth,height:F.clientHeight})},Oe=()=>{document.hidden&&r().actions.external.stop()};kt(()=>{var Ut,pi,ct,ai;wt&&document.addEventListener("visibilitychange",Oe),Fe.debugLog&&r().actions.internal.startLogging(),be(n(Rt));let F=Ce.map(fi=>fi.init({store:r(),microStores:we,config:p(),interactiveController:_(),uiConfig:f()})),ot=()=>{wt&&document.removeEventListener("visibilitychange",Oe),Dt==null||Dt.disconnect(),F.forEach(fi=>fi.unsubscribe()),r().destroy()};return((Ut=T())==null?void 0:Ut.status)==="upcoming"?(r().actions.internal.setLiveWaitingStart(!0),ot):((pi=T())==null?void 0:pi.status)==="waiting"?(r().actions.internal.setLiveWaitingRecover(!0),ot):(((ct=T())==null?void 0:ct.status)==="finished"||((ai=T())==null?void 0:ai.status)==="postlive")&&!(d()&&eI(d()))?(r().actions.internal.setLiveWaitingRecord(!0),ot):(Ne(),ot)});function Ie(){n(Qt)?r().actions.external.play():Te(!0)}function ht(){r().actions.external.pause()}function ye(F){r().actions.external.setMuted(F)}function qe(){r().actions.external.toggleSubtitle()}function Ue(F,ot){r().actions.external.changeSubtitle(F,ot)}function st(F){r().actions.external.changeAudioStream(F)}function qt(){var F;(F=r().webApi.slotsApi)!=null&&F.haveSlots()&&r().actions.external.hideControls()}function Pt(){var F;(F=r().webApi.slotsApi)!=null&&F.haveSlots()&&r().actions.external.showControls()}function Yt(F){pe()||F>=0&&F<=1&&r().actions.external.setVolume(F)}function bi(F){r().actions.internal.seekTime(F,oI.UNKNOWN)}function Mi(F){r().actions.external.seekEpisodeStartTime(F)}function Ai(){r().actions.external.returnFocusToEpisodes()}function Zi(F){r().actions.external.setPlaybackRate(F)}function si(F){r().actions.external.setAutoQualityLimits(F)}function pt(){r().actions.external.setQuality("auto")}function di(F){r().actions.external.setTrafficSavingEnabled(F)}function Ji(F){r().actions.external.setHighQualityEnabled(F)}let It=Ku(Fe.view),gi=p().playerView==="preview",ui=r().state.availableSubtitlesList$;if(Fe.features.initSubtitles){let F=!1;He(()=>{var ot;if(!F&&a().length){F=!0;let Ut;if(Fe.features.userVideoPrefs&&r().videoId){let ct=Tu(Fe.userSalt,String(r().videoId));ct!=null&&ct.subtitleTrackId&&(Ut=a().find(ai=>ai.value===ct.subtitleTrackId))}let pi=(ot=I())!=null?ot:Lf();pi&&(Ut=a().find(ct=>ct.language===pi)),r().actions.internal.setSubtitle(Ut)}})}let We=r().ui.isPreviewTrackHorizontallyAligned;var at=nI();let Si;var eo=C(at);{var bo=F=>{Mv(F,{get store(){return r()},get uiConfig(){return Fe},get thumbUrl(){return b()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return k()},get canRewindLive(){return U()},get showAds(){return z()},get adsSlotId(){return Y()},get adsParams(){return ie()},get adsAutoplayParam(){return J()},get duration(){return oe()},get logoClickable(){return de()},get logoHidden(){return ae()},get logoTargetUrl(){return rt},get nextButtonActive(){return $e()},get prevButtonActive(){return Ee()},get endScreenVideoTitle(){return ce()},get endScreenVideoThumb(){return Qe()},get isOneVideoPlaylist(){return fe()},get supportLink(){return ve()},get shadowRootContainer(){return X()},get outerContainerRef(){return N()},get fullScreenTarget(){return me()},get showMiniTimer(){return Re()},get playerStarted(){return n(Qt)},get seekToInteractive(){return ke()},get playPrevChapter(){return j()},firstStart:Te,seekTime:bi,get showEndScreen(){return Le()},get showAutoplayNext(){return Se()},get showNextPrevButtons(){return ee()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson},get videoContainer(){return n(Rt)},set videoContainer(ot){D(Rt,ot,!0)}})},Ao=F=>{var ot=Ve(),Ut=le(ot);{var pi=ai=>{Vv(ai,{get thumbUrl(){return b()},get outsideDuration(){return oe()},get canRewindLive(){return U()},get videoContainer(){return n(Rt)},set videoContainer(fi){D(Rt,fi,!0)}})},ct=ai=>{kv(ai,{get store(){return r()},get uiConfig(){return Fe},get title(){return v()},get thumbUrl(){return b()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return k()},get canRewindLive(){return U()},get showAds(){return z()},get adsSlotId(){return Y()},get adsParams(){return ie()},get adsAutoplayParam(){return J()},get duration(){return oe()},get logoClickable(){return de()},get logoHidden(){return ae()},get logoTargetUrl(){return rt},get nextButtonActive(){return $e()},get prevButtonActive(){return Ee()},get endScreenVideoTitle(){return ce()},get endScreenVideoThumb(){return Qe()},get isOneVideoPlaylist(){return fe()},get supportLink(){return ve()},get shadowRootContainer(){return X()},get outerContainerRef(){return N()},get fullScreenTarget(){return me()},get showMiniTimer(){return Re()},get playerStarted(){return n(Qt)},get seekToInteractive(){return ke()},get playPrevChapter(){return j()},firstStart:Te,get showEndScreen(){return Le()},get showAutoplayNext(){return Se()},get showNextPrevButtons(){return ee()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(Rt)},set videoContainer(fi){D(Rt,fi,!0)},get keyboardControls(){return ze()},set keyboardControls(fi){ze(fi)}})};M(Ut,ai=>{gi?ai(pi):ai(ct,!1)})}$(F,ot)};M(eo,F=>{pe()?F(bo):F(Ao,!1)})}S(at),O(F=>{Si=te(at,1,"vk-vp-root s-2",null,Si,F),Ke(at,It)},[()=>({"root--miui-browser":Rv.device.isMobile&&Rv.browser.isMiuiBrowser,"visible-outside":gi,"preview-track-horizontally-alinged":l()})]),$(t,at);var pn=H({initVideo:Ne,play:Ie,pause:ht,setMuted:ye,toggleSubtitle:qe,changeSubtitle:Ue,changeAudioStream:st,hideControls:qt,showControls:Pt,setVolume:Yt,seekTime:bi,seekEpisodeStartTime:Mi,returnFocusToEpisodes:Ai,setPlaybackRate:Zi,setAutoQualityLimits:si,setAutoQuality:pt,toggleTrafficSaving:di,toggleHighQuality:Ji,get sources(){return d()},set sources(F){d(F)},get store(){return r()},set store(F){r(F)},get microStoresRoot(){return u()},set microStoresRoot(F){u(F)},get videoConfig(){return p()},set videoConfig(F){p(F)},get uiConfig(){return f()},set uiConfig(F){f(F)},get title(){return v()},set title(F){v(F)},get thumbUrl(){return b()},set thumbUrl(F){b(F)},get interactiveContainer(){return y()},set interactiveContainer(F){y(F)},get interactiveController(){return _()},set interactiveController(F){_(F)},get subtitles(){return w()},set subtitles(F){w(F)},get subtitlesForcedLanguage(){return I()},set subtitlesForcedLanguage(F){I(F)},get live(){return T()},set live(F){T(F)},get preload(){return R()},set preload(F){R(F)},get autoplay(){return k()},set autoplay(F){k(F)},get volume(){return P()},set volume(F){P(F)},get muted(){return E()},set muted(F){E(F)},get fromTime(){return W()},set fromTime(F){W(F)},get canRewindLive(){return U()},set canRewindLive(F){U(F)},get showAds(){return z()},set showAds(F){z(F)},get adsSlotId(){return Y()},set adsSlotId(F){Y(F)},get adsParams(){return ie()},set adsParams(F){ie(F)},get adsAutoplayParam(){return J()},set adsAutoplayParam(F){J(F)},get duration(){return oe()},set duration(F){oe(F)},get logoClickable(){return de()},set logoClickable(F){de(F)},get logoHidden(){return ae()},set logoHidden(F){ae(F)},get isMobile(){return pe()},set isMobile(F){pe(F)},get showNextPrevButtons(){return ee()},set showNextPrevButtons(F){ee(F)},get nextButtonActive(){return $e()},set nextButtonActive(F){$e(F)},get prevButtonActive(){return Ee()},set prevButtonActive(F){Ee(F)},get endScreenVideoTitle(){return ce()},set endScreenVideoTitle(F){ce(F)},get endScreenVideoThumb(){return Qe()},set endScreenVideoThumb(F){Qe(F)},get isOneVideoPlaylist(){return fe()},set isOneVideoPlaylist(F){fe(F)},get supportLink(){return ve()},set supportLink(F){ve(F)},get shadowRootContainer(){return X()},set shadowRootContainer(F){X(F)},get outerContainerRef(){return N()},set outerContainerRef(F){N(F)},get fullScreenTarget(){return me()},set fullScreenTarget(F){me(F)},get failoverHosts(){return ue()},set failoverHosts(F){ue(F)},get showMiniTimer(){return Re()},set showMiniTimer(F){Re(F)},get saveRate(){return Je()},set saveRate(F){Je(F)},get showAutoplayNext(){return Se()},set showAutoplayNext(F){Se(F)},get seekToInteractive(){return ke()},set seekToInteractive(F){ke(F)},get playPrevChapter(){return j()},set playPrevChapter(F){j(F)},get volumeMultiplier(){return ne()},set volumeMultiplier(F){ne(F)},get showEndScreen(){return Le()},set showEndScreen(F){Le(F)},get keyboardControls(){return ze()},set keyboardControls(F){ze(F)}});return o(),pn}var sI=Ae('<defs><path id="rect" d="m2.72 0c.45 0 .6.05.77.13a1 1 0 01.38.38c.09.16.13.33.13.77v1.44c0 .44-.04.6-.13.77a1 1 0 01-.38.38c-.16.08-.32.13-.77.13h-1.44c-.44 0-.6-.05-.77-.13a1 1 0 01-.37-.38c-.1-.16-.14-.33-.14-.77v-1.44c0-.44.05-.6.13-.77a1 1 0 01.38-.38c.17-.08.33-.13.77-.13z"></path></defs><path d="M38.24 6c3.57 0 4.86.37 6.17 1.07a7.3 7.3 0 0 1 3.02 3.02c.7 1.3 1.07 2.6 1.07 6.17v23.49c0 3.56-.37 4.85-1.07 6.16a7.3 7.3 0 0 1-3.02 3.02c-1.3.7-2.6 1.07-6.16 1.07h-19.5c-3.56 0-4.85-.37-6.16-1.07a7.3 7.3 0 0 1-3.02-3.02c-.7-1.3-1.07-2.6-1.07-6.16v-23.5c0-3.56.37-4.85 1.07-6.16a7.3 7.3 0 0 1 3.02-3.02C13.9 6.37 15.2 6 18.76 6zm.32 3h-19.8c-2.8 0-3.77.19-4.75.71a4.3 4.3 0 0 0-1.8 1.8c-.5.95-.7 1.87-.7 4.43l-.01 23.8c0 2.8.19 3.76.71 4.75a4.3 4.3 0 0 0 1.8 1.8c.98.52 1.95.71 4.75.71h19.49c2.8 0 3.76-.19 4.74-.71a4.3 4.3 0 0 0 1.8-1.8c.52-.98.71-1.95.71-4.74v-23.5c0-2.8-.19-3.75-.71-4.74a4.3 4.3 0 0 0-1.8-1.8c-.95-.5-1.87-.7-4.43-.7z"></path><use xlink:href="#rect" x="16.5" y="14"></use><use xlink:href="#rect" x="16.5" y="22"></use><use xlink:href="#rect" x="16.5" y="30"></use><use xlink:href="#rect" x="16.5" y="38"></use><use xlink:href="#rect" x="37" y="14"></use><use xlink:href="#rect" x="37" y="22"></use><use xlink:href="#rect" x="37" y="30"></use><use xlink:href="#rect" x="37" y="38"></use>',1);function Ov(t,e){let i=g(e,"isWhite",3,!1),o=m(()=>i()?"#fff":"#909499");je(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(s,a)=>{var l=sI();Xt(9),$(s,l)},$$slots:{default:!0}})}var aI=L('<div class="title s-1"> </div>'),lI=L('<div class="playerStub s-1"><!> <!></div>'),dI={hash:"s-1",code:".playerStub.s-1{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}.title.s-1{box-sizing:border-box;color:#fff;font-size:15px;left:0;overflow:hidden;padding:18px 20px 10px;position:absolute;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}"};function Nv(t,e){Q(t,dI);var i=lI(),o=C(i);{var s=d=>{var r=aI(),u=C(r,!0);S(r),O(()=>he(u,e.title)),$(d,r)};M(o,d=>{e.title&&d(s)})}var a=A(o,2);{var l=d=>{let r=m(()=>!!e.thumbUrl);Ov(d,{get isWhite(){return n(r)}})};M(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}S(i),O(()=>Ke(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),$(t,i)}var cI=L('<div class="playerError s-3"><!></div>'),uI={hash:"s-3",code:".playerError.s-3{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}"};function Bv(t){Q(t,uI);var e=cI(),i=C(e);Ja(i,{}),S(e),$(t,e)}import{AppTracer as DI,now as OI,ValueSubject as NI,withoutNullable as BI}from"@vkontakte/videoplayer-shared/es2015";import{cloneDeepWith as HI,InterfaceLanguage as FI,isNonNullable as i$,Logger as UI,Observable as zI,Subscription as o$,once as WI,InternalsExposure as KI,skip as QI,getPlayerId as qI}from"@vkontakte/videoplayer-shared/es2015";import{clientChecker as n$,isMobile as GI}from"@vkontakte/videoplayer-core/es2015";import{OneStat as YI,ThinOneStat as jI,MediascopePixel as XI}from"@vkontakte/videoplayer-statistics/es2015";import{Logger as pI,Subscription as fI}from"@vkontakte/videoplayer-shared/es2015";var lp=class{constructor(){this.subscription=new fI,this.logger=new pI,this.log=this.logger.createComponentLog("MediaSessionApi")}isSupported(){return"mediaSession"in navigator}setMetaData({title:e,artist:i="",thumbUrl:o=""}){this.isSupported()&&(navigator.mediaSession.metadata=new MediaMetadata({title:e,artist:i,artwork:[{src:o,sizes:"96x96",type:"image/png"},{src:o,sizes:"128x128",type:"image/png"},{src:o,sizes:"192x192",type:"image/png"},{src:o,sizes:"256x256",type:"image/png"},{src:o,sizes:"384x384",type:"image/png"},{src:o,sizes:"512x512",type:"image/png"}]}))}updateActionHandlers(e){this.resetActionHandlers(),this.setActionHandlers(e)}resetActionHandlers(){let e=[["play",null],["pause",null],["stop",null],["nexttrack",null],["previoustrack",null],["seekto",null],["seekbackward",null],["seekforward",null]];this.setActionHandlers(e)}setActionHandlers(e){var i,o;if(this.isSupported())for(let[s,a]of e)try{(o=(i=navigator.mediaSession).setActionHandler)==null||o.call(i,s,a)}catch(l){throw new Error(`The media session action "${s}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{var a,l;let o=_e(e.state.currentPlaybackRate$),s=_e(e.state.duration$);if(!(!isFinite(i)||!isFinite(s)))try{(l=(a=navigator.mediaSession).setPositionState)==null||l.call(a,{position:i,playbackRate:o,duration:s})}catch(d){this.log({message:`MediaSession setPositionState can't call with position: ${i} and duration: ${s}`})}})))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};function Ic(t,e){var s,a;let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let l of i)o[l]=(a=(s=e[l])!=null?s:t[l])!=null?a:void 0;return o}var Yb="Inner error. Unexpectedly root annotation container null reference exception",jb="Annotation with such name already exists",Xb="Annotation with such name does not exist";var Jl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as mI,Subscription as vI,throttleFn as gI}from"@vkontakte/videoplayer-shared/es2015";var hI="1",_I=100,dp=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new vI}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=gI(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},_I);this.subscriptions.add(mI(this.rootAnnotationsContainer).subscribe(({width:o,height:s})=>{this.playerSize={width:o,height:s},i()})),this.mutationObserver=new MutationObserver(i),this.mutationObserver.observe(this.rootAnnotationsContainer,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}add(e,i){var o;if(!this.rootAnnotationsContainer)throw new Jl(Yb);if(this.annotations.has(e))throw new Jl(jb);i.style.zIndex=(o=i.style.zIndex)!=null?o:hI,i.style.position="absolute",this.rootAnnotationsContainer.append(i),this.annotations.set(e,i)}get(e){let i=this.annotations.get(e);if(!i)throw new Jl(Xb);return i}remove(e){let i=this.get(e);this.annotations.delete(e)&&i.remove()}clear(){for(let e in this.annotations.keys())this.remove(e)}destroy(){var e;this.annotations.clear(),this.subscriptions.unsubscribe(),(e=this.mutationObserver)==null||e.disconnect(),this.rootAnnotationsContainer=null}isElementExceedsBoundaries(e,i,o){let s=e.offsetTop,a=e.offsetLeft,l=e.offsetWidth,d=e.offsetHeight;return s<0||a<0||a+l>i||s+d>o}registryRootContainer(e){}addLayer(e){return document.createElement("div")}getLayer(e){}removeLayer(e){}clearLayer(e){}detach(){}reattach(){}};import{assertNonNullable as cp,Subscription as bI}from"@vkontakte/videoplayer-shared/es2015";var un=class{init({store:e,microStores:i,interactiveController:o,config:s}){return cp(e),cp(i),cp(s),s.interactiveData&&cp(o),this.subscription=new bI,this.subscription}};var Ec=class extends un{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$=Jt(Ye({},se(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{isInteractiveExpectation$:s}=i.store.state;return o.add(s.subscribe(a=>{this.state$.set(a?!0:null)})),o}};var Pc=class extends un{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$=Jt(Ye({},se(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{microStores:s,store:a}=i,{fakeIsPlaying$:l}=s,{isInteractiveExpectation$:d,isPlaying$:r}=a.state,{controlsVisible:u,isMobile:p}=a.ui,f=_e(p),v=()=>f&&_e(u);return o.add(u.subscribe(b=>{if(!f)return;let y=_e(l);_e(r)?this.state$.set(b):y!==null&&this.state$.set(!y||b)})),o.add(r.subscribe(b=>{this.state$.set(!b||v())})),o.add(l.subscribe(b=>{if(b===null)return;let y=_e(d);if(v()){this.state$.set(!0);return}y&&this.state$.set(!b)})),o}};var Ac=class extends un{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=se("tooltip_chapter_without_interactive")}init(i){let o=super.init(i),{store:s}=i;return o.add(s.state.interactiveEpisodes$.subscribe(a=>{a.length&&(a.every(l=>l.completed)?this.state$.set("tooltip_interactive_of_chapter_completed"):this.state$.set("tooltip_disabled_when_interactive"))})),o}};import{combine as $I}from"@vkontakte/videoplayer-shared/es2015";var Hv=se(!1),up=null,kc=class extends un{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$=Jt(Ye({},Hv),{set:(i,o=!1)=>{i!==_e(Hv)&&(this.clearTimeout(),Hv.set(i),!i&&up&&(up=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()})}init(i){let o=super.init(i),{store:s,config:a}=i,{isInteractiveTime$:l,isPlaying$:d}=s.state,r=s.ui.controlsVisible,{interactiveTimeIndicator:u}=s.ui.controls;o.add(r.subscribe(f=>{_e(l)&&f&&this.state$.set(!1)}));let p=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add($I({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:f,isInteractiveTime$:v,interactiveTimeIndicator:b})=>{var y,_;if(!(!f||!(b!=null&&b.isDisplayed))){if(!v)return this.state$.set(!1);p.tooltipHelpHintActive&&up===null&&(up=!0,p.tooltipHelpHintActive=!1,this.state$.set(!0),(_=(y=s.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||_.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as yI,noop as xI}from"@vkontakte/videoplayer-shared/es2015";var Lc=class extends un{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$=Jt(Ye({},se(null)),{toggle:xI});this.checkIfShouldHide=i=>Fs(i,"s")}init(i){let o=super.init(i),{store:s,interactiveController:a}=i,l=s.ui.currentGridType$,d=s.getLogger().createComponentLog("GraphIsOpened microStore");return this.state$.toggle=()=>bt(this,null,function*(){if(this.checkIfShouldHide(_e(l)))return;let r=_e(this.state$),{isEnded$:u,playbackState$:p}=s.state,{disabledControls$:f}=s.ui.controls,v=_e(u),b=_e(p);if(r)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1),f.remove(bf),!v&&this.graphMadePause&&s.actions.internal.play()}catch(y){d({message:"Cant hide graph"})}else{this.graphMadePause=b==="playing";try{yield a==null?void 0:a.toggleGraphView(!0),this.state$.set(!0),f.add(bf),!v&&this.graphMadePause&&s.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}}),o.add(yI({graphIsOpened:this.state$,currentGridType:l}).subscribe(p=>bt(this,[p],function*({graphIsOpened:r,currentGridType:u}){if(this.checkIfShouldHide(u)&&r)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1)}catch(v){d({message:"Cant hide graph"})}}))),o}};import{ValueSubject as Zb}from"@vkontakte/videoplayer-shared/es2015";var Mc=class extends un{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:se(!1),isEnabled$:se(!1),type$:se(void 0)}}init(i){let o=super.init(i),{store:s}=i,{info:{isActive$:a,isEnabled$:l,type:d}}=s.webApi.pictureInPictureApi||{info:{isActive$:new Zb(!1),isEnabled$:new Zb(!1)}};return o.add(a.subscribe(r=>{this.state$.isActive$.set(r)})),o.add(l.subscribe(r=>{this.state$.isEnabled$.set(r)})),this.state$.type$.set(d),o}};import{filter as CI,filterChanged as TI}from"@vkontakte/videoplayer-shared/es2015";import{safeStorage as Fv}from"@vkontakte/videoplayer-shared/es2015";var Jb=({maxShowCount:t,timeout:e})=>{let i=[t!==0?wI({maxCount:t}):void 0,e!==0?SI({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(s=>s.notificationShowed(o)),canShowNotification:o=>i.every(s=>s.canShowNotification(o))}},wI=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,s;e[i]=((o=e[i])!=null?o:0)+1,Fv.set("videoplayer_notifications_manager_count",JSON.stringify((s=e[i])!=null?s:0))},canShowNotification:i=>{var o;return((o=e[i])!=null?o:0)<t}}},SI=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Fv.get(e)||"{}")}catch(a){return{}}},o=a=>Fv.set(e,JSON.stringify(a)),s=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o(Jt(Ye({},i()),{[a]:{timeout:t,launchTime:Date.now()}}))},canShowNotification:a=>{let l=i()[a];if(l){let d=Date.now()-l.launchTime>t;return d&&s(a),d}else return!0}}};var Vc=class extends un{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:se({}),showNotification:i=>{this.state$.notificationsToShow$.update(o=>(o[i]=!0,o)),this.notificationManager.notificationShowed(i)},closeNotification:i=>{this.state$.notificationsToShow$.update(o=>(delete o[i],o))}}}init(i){let o=super.init(i),{store:s,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:l,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:r}}}=i;this.notificationManager=Jb({maxShowCount:a,timeout:l});let u=s.getPlayer();return o.add(u.events.severeStallOccured$.pipe(TI(),CI(p=>p)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(r&&s.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var e$=()=>[Ec,Pc,Ac,kc,Lc,Mc,Vc].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:Jt(Ye({},e),{[o.stateName]:o.state$})}},{subscribers:[],stores:{}});import{devNull as Rc}from"@vkontakte/videoplayer-shared/es2015";var pp=class{constructor(e){this.getActiveElement=e;this.focusableElements=[];this.isActive=!1;this.handleTabKey=e=>{if(this.updateFocusableElements(),!this.focusableElements.length)return;let i=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1],s=this.getActiveElement();e.shiftKey&&s===i?(e.preventDefault(),o.focus()):!e.shiftKey&&s===o&&(e.preventDefault(),i.focus())}}activate(){this.isActive||(document.addEventListener("keydown",this.handleTabKey),this.isActive=!0)}deactivate(){this.isActive&&(document.removeEventListener("keydown",this.handleTabKey),this.isActive=!1,this.focusableElements=[])}updateFocusableElements(){this.isActive&&(this.focusableElements=this.getFocusableElements())}getFocusableElements(){let e=["button:not([disabled])","[href]:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"]):not([disabled])'].join(", ");return Array.from(this.container.querySelectorAll(e)).filter(i=>!i.disabled&&i.offsetParent!==null)}destroy(){this.deactivate()}setContainer(e){this.container=e}};var fp=class{constructor(e){this.shadowRoot=e;this.lastFocusedNode=null;this.init=()=>{this.shadowRoot.addEventListener("focusin",this.handleFocusChange)};this.handleFocusChange=()=>{this.lastFocusedNode=this.shadowRoot.activeElement};this.restoreFocus=()=>{var e;(e=this.lastFocusedNode)==null||e.focus()};this.focusLock=new pp(()=>this.lastFocusedNode),this.init()}destroy(){this.shadowRoot.removeEventListener("focusin",this.handleFocusChange),this.focusLock.destroy()}getLastFocusedNode(){return this.lastFocusedNode}activateLock(){this.focusLock.activate()}deactivateLock(){this.focusLock.deactivate()}setContainerForFocusLock(e){this.focusLock.setContainer(e)}};var II=L('<div class="root s-4"><!></div>'),EI={hash:"s-4",code:".root.s-4{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:1}"};function Uv(t,e){B(e,!0),Q(t,EI);let i=null,o=K(null);He(()=>(n(o)&&(i=window.setTimeout(()=>{D(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function s(r){e.playbackStatusShow&&D(o,r?"prev":"next",!0)}var a=Ve(),l=le(a);{var d=r=>{var u=Ve(),p=le(u);Rs(p,()=>n(o),f=>{var v=II(),b=C(v);let y=m(()=>n(o)==="prev");Cc(b,{get duration(){return e.animationDuration},get Icon(){return ha},get reversed(){return n(y)}}),S(v),$(f,v)}),$(r,u)};M(l,r=>{e.playbackStatusShow&&n(o)&&r(d)})}return $(t,a),H({startVideoChangedAnimation:s})}import{getWindow as PI}from"@vkontakte/videoplayer-shared/es2015";var zv=PI().HTMLElement||class{constructor(){this.isConnected=!1}};var AI=Object.defineProperty,kI=Object.defineProperties,LI=Object.getOwnPropertyDescriptors,t$=Object.getOwnPropertySymbols,MI=Object.prototype.hasOwnProperty,VI=Object.prototype.propertyIsEnumerable,Kv=(t,e,i)=>e in t?AI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,rl=(t,e)=>{for(var i in e||(e={}))MI.call(e,i)&&Kv(t,i,e[i]);if(t$)for(var i of t$(e))VI.call(e,i)&&Kv(t,i,e[i]);return t},RI=(t,e)=>kI(t,LI(e)),Kt=(t,e,i)=>Kv(t,typeof e!="symbol"?e+"":e,i),mp=(t,e,i)=>new Promise((o,s)=>{var a=r=>{try{d(i.next(r))}catch(u){s(u)}},l=r=>{try{d(i.throw(r))}catch(u){s(u)}},d=r=>r.done?o(r.value):Promise.resolve(r.value).then(a,l);d((i=i.apply(t,e)).next())}),ZI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:FI.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:GI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},tr=K(void 0),Wv=ri({animationDuration:0,playbackStatusShow:!1}),vp=class extends zv{constructor(){super(),Kt(this,"svelteStubComponent"),Kt(this,"svelteRootComponent"),Kt(this,"sveltePersistentLayerComponent"),Kt(this,"svelteErrorComponent"),Kt(this,"store"),Kt(this,"microStoresRoot"),Kt(this,"statistics"),Kt(this,"_shadowRoot"),Kt(this,"playerContainer"),Kt(this,"rootContainer"),Kt(this,"stateContainer"),Kt(this,"shadowRootContainer"),Kt(this,"playerId"),Kt(this,"uiConfig"),Kt(this,"coreConfig"),Kt(this,"statisticsConfig"),Kt(this,"metaConfig"),Kt(this,"interactiveController"),Kt(this,"interactiveContainer"),Kt(this,"graphMadePause"),Kt(this,"currentPlayingVideoIndex",0),Kt(this,"needToRepeatPlaylist",!1),Kt(this,"videoConfig"),Kt(this,"pictureInPictureApi"),Kt(this,"mediaSessionApi"),Kt(this,"unsubscribePlayerPhaseSubscription"),Kt(this,"logger"),Kt(this,"log"),Kt(this,"subscription"),Kt(this,"interactiveSubscription"),Kt(this,"annotationsApi"),Kt(this,"slotsApi"),Kt(this,"focusManager"),Kt(this,"prevIsid"),Kt(this,"isInited",!1),Kt(this,"postponedInitParams",null),Kt(this,"internalsExposure",null),Kt(this,"shadowDOMCallbacksDisabled",!1),Kt(this,"fatalError$",new NI(null)),Kt(this,"createOneStat",(e,i={})=>{var o,s,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:r,statUserSalt:u,statTrackCode:p,statVKAppId:f,refreshStatAuthToken:v,autoplay:b,isMobile:y,isTouch:_,refDomain:w,deviceId:I,interactiveData:T}=Ic(this.videoConfig,i),R=(o=T==null?void 0:T.projectInfo)==null?void 0:o.pid,k=(a=(s=this.interactiveController)==null?void 0:s.state.isReplay$.getValue())!=null?a:!1;k&&(this.prevIsid=void 0);let{unitedVideoId:P,isClip:E=!1}=e;if(this.uiConfig.features.statistics&&P)try{return new YI(rl({movieId:P,albumId:d,place:r,trackCode:p,vkAppId:f,autoplay:(l=b&&!this.interactiveController)!=null?l:!1,mobile:_!=null?_:y,clip:E,refDomain:w,deviceId:I,isPreviewPlayerView:this.videoConfig.playerView==="preview"},R&&(!this.isInited||k)&&{projectId:Number(R)}),rl({refreshAuthToken:v,userSalt:u,config:this.statisticsConfig},this.interactiveController&&{useIsid:!0,isid:this.prevIsid}))}catch(U){console.error(U),this.log({message:U.message})}}),Rc.create("ui"),this.logger=new UI,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new o$,this.interactiveSubscription=new o$,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=ts(Bv,{target:this.playerContainer}))})}connectedCallback(){var e,i;if(this.rootContainer)return;this.initPlayerRootContainers();let o=(e=this.getAttribute("stub-title"))!=null?e:void 0,s=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=ri({title:o,thumbUrl:s}),l={target:this.playerContainer,props:a};this.svelteStubComponent=ts(Nv,l),this.sveltePersistentLayerComponent=ts(Uv,{target:this.playerContainer,props:Wv}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;Wv.animationDuration=e,Wv.playbackStatusShow=i&&o}disconnectedCallback(){var e,i,o,s,a,l,d;this.shadowDOMCallbacksDisabled||((e=this.annotationsApi)==null||e.destroy(),(i=this.slotsApi)==null||i.destroy(),(o=this.focusManager)==null||o.destroy(),(s=this.mediaSessionApi)==null||s.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteErrorComponent),this.unmountComponent(this.sveltePersistentLayerComponent),this.subscription.unsubscribe(),(a=this.unsubscribePlayerPhaseSubscription)==null||a.call(this),(l=this.interactiveController)==null||l.destroy(),this.interactiveSubscription.unsubscribe(),(d=this.internalsExposure)==null||d.destroy(),Rc.destroy("ui"))}initPlayerRootContainers(){this.rootContainer=document.createElement("div"),this.rootContainer.style.position="relative",this.rootContainer.className="root-container",this.rootContainer.style.width="100%",this.rootContainer.style.height="100%",this.rootContainer.style.minHeight="206px",this.shadowRootContainer=document.createElement("div"),this.shadowRootContainer.style.position="absolute",this.shadowRootContainer.className="shadow-root-container",this.shadowRootContainer.style.width="100%",this.shadowRootContainer.style.height="100%",this._shadowRoot=this.shadowRootContainer.attachShadow({mode:"open"}),this.playerContainer=document.createElement("div"),this.playerContainer.style.all="initial",this.playerContainer.style.display="block",this.playerContainer.style.contain="strict",this.playerContainer.style.width="100%",this.playerContainer.style.height="100%",this._shadowRoot.append(this.playerContainer),this.rootContainer.append(this.shadowRootContainer),this.stateContainer=document.createElement("div"),this.stateContainer.className="state-container",this.stateContainer.style.width="1px",this.stateContainer.style.height="1px",this.stateContainer.style.position="absolute",this.stateContainer.style.backgroundColor="transparent",this.stateContainer.style.left="-100000px",this.append(this.rootContainer),this.append(this.stateContainer)}needToShowNextPrevButtons(){return this.videoConfig?this.videoConfig.videos.length>1&&this.videoConfig.showNextPrevButtons:!1}isNextButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1||this.needToRepeatPlaylist):!1}isPrevButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex>0||this.needToRepeatPlaylist):!1}isControlDisabled(e){var i;let o=(i=this.store)==null?void 0:i.ui.controls.disabledControls$;return(o==null?void 0:o.includes(e))||!1}getNextVideoInfo(){if(!this.videoConfig)return{nextVideoTitle:void 0,nextVideoThumb:void 0};let e=this.videoConfig.videos[this.currentPlayingVideoIndex+1]||{};return{nextVideoTitle:e.title,nextVideoThumb:e.thumbUrl}}createThinOneStat(e,i={}){if(!this.videoConfig)return;let{deviceId:o,preload:s,refreshStatAuthToken:a}=Ic(this.videoConfig,i),{unitedVideoId:l}=e;if(this.uiConfig.features.thinStatistics&&l)return new jI.ThinOneStat({deviceId:o,movieId:l,preload:s,isPreviewPlayerView:this.videoConfig.playerView==="preview"},{config:this.statisticsConfig,refreshAuthToken:a})}createPlayer(e,i={},o){var s,a,l,d,r,u,p,f,v,b;if(!this.videoConfig)return;let{albumId:y,statPlace:_,statAuthToken:w,preload:I,autoplay:T,volume:R,muted:k,fromTime:P,canRewindLive:E,supportLink:W,showAds:U,adsSlotId:z,adsParams:Y={},adsAutoplayParam:ie,interfaceLanguage:J,isCyrillicRelatedInterface:oe,logoClickable:de,logoHidden:ae,isMobile:pe,isTouch:ee,isAudioDisabled:$e,isLiveCatchUpMode:Ee,fullScreenTarget:ce,failoverHosts:Qe,canDownload:fe,callbacks:ve,interactiveData:X,showThumbTimer:N,additionalButtons:me=[],additionalSettingsMenuItems:ue=[],additionalContextMenuItems:Re=[],repeat:Je,loop:ke,saveRate:j,volumeMultiplier:ne,showEndScreen:Se,showAutoplayNext:Le,mediascopePixels:ze}=Ic(this.videoConfig,i),{sources:Ce,title:we,thumbUrl:Fe,unitedVideoId:rt,isClip:ut=!1,duration:Mt,adsParams:lt={},videoEpisodes:ni,previewThumbsData:wt,subtitles:Rt,subtitlesForcedLanguage:Dt,live:Qt,adsExternalApi:Te,adsJson:G}=e;if(!Ce&&!Qt){let si=new Error("empty sources and live");this.fatalError$.next(si),(s=ve.onCrashed)==null||s.call(ve,si.message);return}let Ne=rl(rl({},Y),lt),be=this.getNextVideoInfo(),Oe={sources:Ce,title:we,thumbUrl:Fe,subtitles:Rt,subtitlesForcedLanguage:Dt,unitedVideoId:rt,isClip:ut,live:Qt,albumId:y,statPlace:_,autoplay:T,muted:k,volume:R,fromTime:P,canRewindLive:E,showAds:U,adsSlotId:z,adsParams:Ne,adsAutoplayParam:ie,duration:Mt,logoClickable:de,logoHidden:ae,isTouch:ee!=null?ee:pe,repeat:Je,loop:ke,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:be.nextVideoTitle,endScreenVideoThumb:be.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},Ie={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(Oe)}`});let ht=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),ye=(ht==null?void 0:ht.oneStat)||this.createOneStat(e,i),qe=this.createThinOneStat(e,i),Ue;ze&&(Ue=new XI({pixels:ze})),(ye||qe)&&(this.statistics=new Gu(ye,qe,Ue,ht==null?void 0:ht.statSubscription));let st=this.uiConfig.features.apptracer.enabled?new DI("videoplayer",this.uiConfig.features.apptracer,{version:Dl,env:bu},BI({movieId:rt,albumId:y,place:_,autoplay:(l=T&&!this.interactiveController)!=null?l:!1,mobile:ee!=null?ee:pe,clip:ut})):void 0;this.interactiveController&&((u=this.prevIsid)!=null||(this.prevIsid=(r=(d=this.statistics)==null?void 0:d.oneStat)==null?void 0:r.isid$.getValue()));let qt=!!X,Pt=[],Yt="tooltip_interactive_go_back_disabled_first";if(qt&&this.interactiveController){let si=this.interactiveController.state.isInitialChapter$.getValue(),pt=this.interactiveController.getHistoryState();si&&Pt.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Pt.push("SEEK_TO_INTERACTIVE_BUTTON"),pt.hasPrevChapter$.getValue()||(Pt.push("PLAY_PREV_CHAPTER_BUTTON"),si||(pt.isGoBackLimited$.getValue()?Yt="tooltip_interactive_go_back_disabled_limit":Yt="tooltip_interactive_go_back_disabled"))}let bi=()=>{var si;this.isInited=!1,this.prevIsid=void 0;let pt=(o==null?void 0:o.info.isEnded$.getValue())&&((si=this.interactiveController)==null?void 0:si.state.isEndChapter$.getValue());ve.onReplayInteractiveVideo&&!pt?ve.onReplayInteractiveVideo():this.replayInteractiveVideo()},Mi=Je&&this.videoConfig.videos.length===1;this.store=pb({player:o,interfaceLanguage:J,isCyrillicRelatedInterface:oe,videoId:rt,isClip:ut,isLiveCatchUpMode:Ee,isAudioDisabled:$e,statAuthToken:w,callbacks:ve,webApi:Ie,videoEpisodes:ni,previewThumbsData:wt,canDownload:fe,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,disabledControls:Pt,isInteractive:qt,saveRate:j,interactiveRanges$:(p=this.interactiveController)==null?void 0:p.state.interactiveRanges$,isInteractiveTime$:(f=this.interactiveController)==null?void 0:f.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:bi,playPrevChapterDisabledTooltip:Yt,hasInteractiveBranches:!!((b=(v=this.interactiveController)==null?void 0:v.getChapterBranches())!=null&&b.length),additionalButtons:this.uiConfig.features.additionalButtons?me:[],additionalSettingsMenuItems:ue!=null?ue:[],additionalContextMenuItems:Re!=null?Re:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:si=>{var pt;return(pt=this.sveltePersistentLayerComponent)==null?void 0:pt.startVideoChangedAnimation(si)},looped:this.uiConfig.features.useLoopSetting?ke:Mi,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId,appTracer:st});let{stores:Ai}=this.microStoresRoot=e$(),Zi=()=>{var si,pt,di,Ji,It,gi;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(We=>{var at;return(at=ve==null?void 0:ve.onCurrentFormatChanged)==null?void 0:at.call(ve,We)})),this.subscription.add(Ai.interactiveControlsOpacity$.subscribe(We=>{var at;We!==null&&((at=this==null?void 0:this.interactiveController)==null||at.setDisabledControls(We))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(We=>{var at;return(at=ve==null?void 0:ve.onThroughputEstimationChanged)==null?void 0:at.call(ve,We)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(We=>{var at;return(at=ve==null?void 0:ve.onTrafficSavingEnabledChanged)==null?void 0:at.call(ve,We)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(We=>{var at;return(at=ve==null?void 0:ve.onHighQualityEnabledChanged)==null?void 0:at.call(ve,We)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(We=>{var at;return(at=ve==null?void 0:ve.onAutoQualityEnabledChanged)==null?void 0:at.call(ve,!!We)})),this.subscription.add(new zI(We=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(at=>We.next(at)))}).pipe(QI(1)).subscribe(We=>{var at;return(at=ve==null?void 0:ve.onCurrentPlaybackRateChanged)==null?void 0:at.call(ve,We)})),this.subscription.add(this.store.state.volume$.subscribe(We=>{var at;return(at=ve==null?void 0:ve.onVolumeChange)==null?void 0:at.call(ve,We)})),this.subscription.add(this.store.state.muted$.subscribe(We=>{var at,Si,eo,bo;if(We)(at=ve==null?void 0:ve.onMute)==null||at.call(ve);else{let Ao=(eo=((Si=this.store)==null?void 0:Si.state.volume$)&&_e(this.store.state.volume$))!=null?eo:0;(bo=ve==null?void 0:ve.onUnmute)==null||bo.call(ve,Ao)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(We=>{var at;return(at=ve==null?void 0:ve.onVideoBitrateChanged)==null?void 0:at.call(ve,We)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(We=>{var at;let Si=(at=this.store)==null?void 0:at.ui.controls.disabledControls$;Si&&(We&&!Si.includes(Ld)&&Si.add(Ld),We||Si.remove(Ld))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(We=>mp(this,null,function*(){var at;if(!n$.browser.isSamsungBrowser||!We||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&(yield this.replayInteractiveChapter((at=this.videoConfig)==null?void 0:at.callbacks.onExternalFullscreenExit))}))),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(We=>{var at;return(at=ve==null?void 0:ve.onVSIDChanged)==null?void 0:at.call(ve,We)})),this.initMediaSession(),D(tr,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:Ce,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:we,thumbUrl:Fe,subtitles:Rt,subtitlesForcedLanguage:Dt,live:Qt,preload:I,autoplay:T,muted:k,volume:R,fromTime:P,canRewindLive:E,supportLink:W,showAds:U,adsSlotId:z,adsParams:Ne,adsAutoplayParam:ie,duration:Mt,logoClickable:de,logoHidden:ae,isMobile:ee!=null?ee:pe,failoverHosts:Qe,fullScreenTarget:ce,saveRate:j,shadowRootContainer:this.shadowRootContainer,showMiniTimer:N,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:be.nextVideoTitle,endScreenVideoThumb:be.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:ne,showEndScreen:Se,showAutoplayNext:Le,adsExternalApi:Te,adsJson:G,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let ui={target:this.playerContainer,props:n(tr)};this.svelteRootComponent=ts(Dv,ui),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(di=(pt=(si=this.videoConfig)==null?void 0:si.callbacks)==null?void 0:pt.onInited)==null||di.call(pt)),(Ji=this.internalsExposure)==null||Ji.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((gi=(It=this.videoConfig)==null?void 0:It.callbacks)!=null&&gi.onDevNullLog)?Rc.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Rc.destroy("ui")};this.coreConfig.asyncResolveClientChecker?n$.isInited$.subscribe(si=>{si&&(console.log("UI SDK async start"),Zi())}):Zi()}addPlayerInfoSubscriptions(){var e,i;let o=this.store,s=(e=this.microStoresRoot)==null?void 0:e.stores;if(!o||!s)return;let a=(i=this.videoConfig)==null?void 0:i.callbacks;a&&this.subscription.add(o.playerPhase.subscribe(d=>{var r;return(r=a.onPlayerPhaseChanged)==null?void 0:r.call(a,d)})).add(o.state.playbackState$.subscribe(d=>{var r;return d&&((r=a.onPlaybackStateChanged)==null?void 0:r.call(a,d))})).add(o.state.playbackStateRealistic$.subscribe(d=>{d?this.stateContainer.setAttribute("data-playback-state",d):this.stateContainer.removeAttribute("data-playback-state")})).add(o.state.isLive$.subscribe(d=>{var r;return(r=a.onIsLiveChanged)==null?void 0:r.call(a,d)})).add(o.state.isActiveLive$.subscribe(d=>{var r;return(r=a.onIsActiveLiveChanged)==null?void 0:r.call(a,d)})).add(o.state.isAudioAvailable$.subscribe(d=>{var r;return(r=a.onIsAudioAvailableChanged)==null?void 0:r.call(a,d)})).add(o.state.currentQuality$.subscribe(d=>{var r;return(r=a.onCurrentQualityChanged)==null?void 0:r.call(a,d)})).add(o.state.availableQualities$.subscribe(d=>{var r;return(r=a.onAvailableQualitiesChanged)==null?void 0:r.call(a,d.map(({value:u})=>u).filter(u=>u!=="auto"))})).add(o.state.availableAudioStreams$.subscribe(d=>{d.length>1&&a.onAudioLanguagesAvailable&&a.onAudioLanguagesAvailable()})).add(s.pictureInPicture$.isActive$.subscribe(d=>{var r,u,p;qu(this.pictureInPictureApi)&&this.uiConfig.features.dpip&&!((r=this.videoConfig)!=null&&r.playerView)&&o.actions.external.setMinimalView(d),d?(u=a.onPiPEnter)==null||u.call(a):(p=a.onPiPExit)==null||p.call(a)}));let l=a==null?void 0:a.uiInfo;l&&this.subscription.add(o.ui.controlsVisible.subscribe(d=>{var r;return(r=l.onControlsVisibleChanged)==null?void 0:r.call(l,d)})).add(o.ui.isMobile.subscribe(d=>{var r;return(r=l.onIsMobileChanged)==null?void 0:r.call(l,d)})).add(o.ui.playerSize.subscribe(d=>{var r;return(r=l.onPlayerSizeChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.prevButton.subscribe(d=>{var r;return(r=l.onPrevButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.playButton.subscribe(d=>{var r;return(r=l.onPlayButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.replayButton.subscribe(d=>{var r;return(r=l.onReplayButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.nextButton.subscribe(d=>{var r;return(r=l.onNextButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.playPrevChapterButton.subscribe(d=>{var r;return(r=l.onPlayPrevChapterChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.seekToInteractiveButton.subscribe(d=>{var r;return(r=l.onSeekToInteractiveButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.interactiveGraphButton.subscribe(d=>{var r;return(r=l.onGraphButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.liveButton.subscribe(d=>{var r;return(r=l.onLiveButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.time.subscribe(d=>{var r;return(r=l.onTimeUpdateChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.episodes.subscribe(d=>{var r;return(r=l.onEpisodesChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.subtitles.subscribe(d=>{var r;return(r=l.onSubtitlesChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.topLeft.subscribe(d=>{var r;return(r=l.onTopLeftControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.topRight.subscribe(d=>{var r;return(r=l.onTopRightControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.bottomLeft.subscribe(d=>{var r;return(r=l.onBottomLeftControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.bottomRight.subscribe(d=>{var r;return(r=l.onBottomRightControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.middle.subscribe(d=>{var r;return(r=l.onMiddleControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.bottom.subscribe(d=>{var r;return(r=l.onBottomControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.videoTitleInfo.subscribe(d=>{var r;return(r=l.onTitleChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.settings.subscribe(d=>{var r;return(r=l.onSettingsChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.fullscreen.subscribe(d=>{var r;return(r=l.onFullscreenChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.chromecast.subscribe(d=>{var r;return(r=l.onChromecastChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.pip.subscribe(d=>{var r;return(r=l.onPipChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls["theater-mode-button"].subscribe(d=>{var r;return(r=l.onTheaterModeChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.vkLogo.subscribe(d=>{var r;return(r=l.onVkLogoChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.interactiveTimeIndicator.subscribe(d=>{var r;return(r=l.onInteractiveTimeIndicatorChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.timeline.subscribe(d=>{var r;return(r=l.onTimelineChanged)==null?void 0:r.call(l,d)}))}playNextVideo(){this.videoConfig&&(this.currentPlayingVideoIndex++,this.currentPlayingVideoIndex>=this.videoConfig.videos.length&&(this.currentPlayingVideoIndex=0),this.log({message:`play next video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}playPrevVideo(){this.videoConfig&&(this.currentPlayingVideoIndex--,this.currentPlayingVideoIndex<0&&(this.currentPlayingVideoIndex=this.videoConfig.videos.length-1),this.log({message:`play prev video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}createPlayerWithCurrentVideo(e,i=!0){var o;if(!this.videoConfig)return;let s=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!s){this.log({message:"no next video"});return}this.isInited&&i$(s.unitedVideoId)&&((o=this.store)==null||o.actions.internal.nextMovie(s.unitedVideoId)),this.unmountComponent(this.svelteRootComponent),this.createPlayer(s,{autoplay:i,fromTime:0},e)}playPrevChapter(){var e;(e=this.interactiveController)==null||e.playPrevChapter()}seekToInteractive(){var e;let i=(e=this.interactiveController)==null?void 0:e.getNextInteractiveStartTime();typeof i=="number"&&this.seekTime(i/1e3)}initInteractives(){return mp(this,null,function*(){var e,i,o,s,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=yield import("@vkontakte/videoplayer-interactive/es2015");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let r=(i=this.store)==null?void 0:i.interfaceLanguage$,u=r?_e(r):this.videoConfig.interfaceLanguage,{projectInfo:p,initChapterId:f,historyApi:v,videoLoader:b}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:p,initChapterId:f,historyApi:v,vkVideoLoader:b,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,isTouch:this.videoConfig.isTouch,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation,controlsTapPlace:this.uiConfig.features.interactiveControlsTapPlace,controlsFillAnimation:this.uiConfig.features.interactiveControlsFillAnimation,controlsHideAnimation:this.uiConfig.features.interactiveControlsHideAnimation},endChapterHistoryFix:this.uiConfig.features.interactiveHistoryEndChapterFix});let{isInteractiveExpectation$:y,isSeekable$:_}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(_.subscribe(I=>{if(!this.isInited)return;let T=this.store;I?T.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):T.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(y.subscribe(I=>{this.store&&this.store.state.isInteractiveExpectation$.set(I)}));let w=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(I=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]=RI(rl({},I.config),{title:(p==null?void 0:p.title)||I.config.title});let T=w?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(I.player,T),w&&(w=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:I,actionType:T})=>{var R,k,P,E,W,U;if(!this.store||!this.microStoresRoot)return;let z=y.getValue();if(I==="action-choice"&&T==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Md)),I==="action-choice-canceled"){let Y=_e(this.store.state.isPlaying$)||z;if(((P=(R=this.videoConfig)==null?void 0:R.isTouch)!=null?P:(k=this.videoConfig)!=null&&k.isMobile)&&Y){this.store.ui.interactiveHideMobileControls.set(!0);return}(U=(E=this.videoConfig)==null?void 0:(W=E.callbacks).onDisabledInteractiveClick)==null||U.call(W)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:I,removeAllOpenURI:T})=>{this.store&&I==="container-fake-removed"&&T&&this.store.ui.controls.disabledControls$.remove(Md)})),yield this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(s=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&s.onInteractiveHistoryChanged){let I=this.interactiveController.getHistoryState();this.subscription.add(I.history$.subscribe(T=>{var R,k,P;T.length&&((P=(k=(R=this.videoConfig)==null?void 0:R.callbacks)==null?void 0:k.onInteractiveHistoryChanged)==null||P.call(k,T))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(I=>{var T,R,k;(k=(T=this.videoConfig)==null?void 0:(R=T.callbacks).onInteractiveChapterChanged)==null||k.call(R,I.chapter,I.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var I,T,R,k;(I=this.microStoresRoot)==null||I.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(k=(T=this.videoConfig)==null?void 0:(R=T.callbacks).onInteractiveTimeIndicatorClick)==null||k.call(R)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(I=>{this.log({message:I.toString()})}))}catch(d){this.log({message:d.message})}})}initPlayer(e,i={}){var o,s,a,l,d,r,u,p,f,v,b,y,_,w,I,T,R,k,P,E,W;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let U=new Error("empty videos");this.fatalError$.next(U),(s=(o=e.callbacks)==null?void 0:o.onCrashed)==null||s.call(o,U.message);return}else this.fatalError$.next(null);this.videoConfig=Ic(ZI,HI(e,U=>U instanceof zv?U:void 0)),(a=this.playerId)!=null||(this.playerId=qI(e.playerId)),this.uiConfig=Rh((l=i.ui)!=null?l:{}),this.updatePersistentLayerProps(),this.coreConfig=(d=i.core)!=null?d:{},this.statisticsConfig=(r=i.statistics)!=null?r:{},this.metaConfig=i.meta,this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer&&(this.rootContainer.style.minHeight="unset"),this.style.display="block",this.style.width="100%",this.style.height="100%"),this.videoConfig.playerView==="preview"&&(this.playerContainer.style.contain="none"),this.uiConfig.features.exposeInternalsToGlobal&&((u=this.internalsExposure)!=null||(this.internalsExposure=new KI("ui",this.playerId))),Rc.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((p=this.videoConfig)==null?void 0:p.showAds)],numbers:[OI()]}),i$(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(v=(f=this.uiConfig.features.mediaSession)!=null?f:this.videoConfig.isMediaSessionEnabled)!=null?v:!0),this.uiConfig.ads.paramsOverride=rl({preview:(b=this.uiConfig.ads.preview)!=null?b:this.videoConfig.adsPreviewParam},this.uiConfig.ads.paramsOverride),this.videoConfig.isTouch=(_=(y=this.uiConfig.isMobile)!=null?y:this.videoConfig.isTouch)!=null?_:this.videoConfig.isMobile,(w=this.videoConfig).autoplay&&(w.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(I=this.uiConfig.ads.enable)!=null?I:this.videoConfig.showAds,this.videoConfig.adsSlotId=(T=this.uiConfig.ads.slot)!=null?T:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((R=this.uiConfig.showLogo)!=null?R:!this.videoConfig.logoHidden),(k=this.videoConfig).canRewindLive&&(k.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(P=this.videoConfig.supportLink)!=null?P:this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=this.uiConfig.features.autoplayNext&&this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=this.uiConfig.features.nextPrevButtons&&this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((E=this.videoConfig.videos)!=null&&E[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip&&(this.pictureInPictureApi=Am(this.videoConfig.pipEnabled!==!1,this.uiConfig.features.dpip)),this.mediaSessionApi=this.uiConfig.features.mediaSession?new lp:void 0,this.slotsApi=this.uiConfig.features.slots?new rp(this.uiConfig.disabledSlotIds):void 0,this.annotationsApi=this.uiConfig.features.annotations?new dp(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new fp(this._shadowRoot):void 0,this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.isInited=!1,this.prevIsid=void 0,this.interactiveController&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveSubscription.unsubscribe()),this.videoConfig.interactiveData?this.initInteractives():this.createPlayer(this.videoConfig.videos[this.currentPlayingVideoIndex]),qu(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(W=this.slotsApi)==null||W.init(this.shadowRootContainer,this.store)}isOneVideoPlaylist(){return this.videoConfig?this.videoConfig.videos.length===1:!1}updateVideos(e,i){if(!this.videoConfig)return;this.log({message:`update ${i} videos, videos: ${JSON.stringify(e)}`}),i==="prev"?(this.videoConfig.videos.splice(0,this.currentPlayingVideoIndex),this.videoConfig.videos.unshift(...e),this.currentPlayingVideoIndex=e.length):i==="next"&&(this.videoConfig.videos.splice(this.currentPlayingVideoIndex+1),this.videoConfig.videos.push(...e));let o=this.getNextVideoInfo();n(tr)&&(n(tr).showNextPrevButtons=this.needToShowNextPrevButtons(),n(tr).nextButtonActive=this.isNextButtonActive(),n(tr).prevButtonActive=this.isPrevButtonActive(),n(tr).endScreenVideoTitle=o.nextVideoTitle,n(tr).endScreenVideoThumb=o.nextVideoThumb,n(tr).isOneVideoPlaylist=this.isOneVideoPlaylist())}updatePrevVideos(e){this.updateVideos(e,"prev")}updateNextVideos(e){this.updateVideos(e,"next")}initMediaSession(){var e,i;this.mediaSessionApi&&((e=this.unsubscribePlayerPhaseSubscription)==null||e.call(this),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=(i=this.store)==null?void 0:i.playerPhase.subscribe(o=>{o==="video"?this.setupMediaSessionForVideo():o==="ads"&&this.setupMediaSessionForAds()}))}setupMediaSessionForVideo(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let{title:e,thumbUrl:i}=rl({},this.videoConfig.videos[this.currentPlayingVideoIndex]),o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",s=>this.seekTime(s.seekTime)]];this.videoConfig.videos.length>1&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1&&o.push(["nexttrack",()=>{var s,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(s=this.videoConfig)==null?void 0:s.callbacks)==null?void 0:a.onNextVideoClick)==null||l.call(a)}catch(d){this.log({message:"onNextVideoClick callback failed to execute"})}else this.playNextVideo()}]),this.currentPlayingVideoIndex>0&&o.push(["previoustrack",()=>{var s,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(s=this.videoConfig)==null?void 0:s.callbacks)==null?void 0:a.onPrevVideoClick)==null||l.call(a)}catch(d){this.log({message:"onPrevVideoClick callback failed to execute"})}else this.playPrevVideo()}])),this.mediaSessionApi.setMetaData({title:e,thumbUrl:i}),this.mediaSessionApi.updateActionHandlers(o),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}setupMediaSessionForAds(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let e="Реклама",i=[["play",()=>this.play()],["pause",()=>this.pause()]];this.mediaSessionApi.setMetaData({title:e}),this.mediaSessionApi.updateActionHandlers(i),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}moveTo(e){this.shadowDOMCallbacksDisabled=!0,e.append(this),this.shadowDOMCallbacksDisabled=!1}play(){var e,i,o,s;this.isControlDisabled("PLAY_BUTTON")||(e=this.store)!=null&&e.playerPhase.is("LiveWaitingStart")||(i=this.store)!=null&&i.playerPhase.is("LiveWaitingRecover")||(o=this.store)!=null&&o.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),(s=this.svelteRootComponent)==null||s.play())}pause(){var e;this.log({message:"pause"}),(e=this.svelteRootComponent)==null||e.pause()}stop(){var e;if(!this.videoConfig)return;this.log({message:"stop"});let i=!!this.interactiveController;i&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveContainer=void 0,this.interactiveSubscription.unsubscribe()),this.unmountComponent(this.svelteStubComponent),(e=this.mediaSessionApi)==null||e.destroy();let o=this.videoConfig.videos[0];o&&(this.unmountComponent(this.svelteRootComponent),i?(this.videoConfig.autoplay=!1,this.initInteractives()):this.createPlayer(o))}setMuted(e){var i;this.log({message:`set muted, muted: ${e}`}),(i=this.svelteRootComponent)==null||i.setMuted(e)}toggleSubtitle(){var e;this.log({message:"toggle subtitle"}),(e=this.svelteRootComponent)==null||e.toggleSubtitle()}changeSubtitle(e,i){var o;this.log({message:"change subtitle"}),(o=this.svelteRootComponent)==null||o.changeSubtitle(e,i)}hideControls(){var e;this.log({message:"hide controls"}),(e=this.svelteRootComponent)==null||e.hideControls()}showControls(){var e;this.log({message:"show controls"}),(e=this.svelteRootComponent)==null||e.showControls()}setPiPEnabled(e){var i,o;(o=(i=this.store)==null?void 0:i.webApi.pictureInPictureApi)==null||o.setEnabled(e)}setVolume(e){var i;this.log({message:`set volume, volume: ${e}`}),(i=this.svelteRootComponent)==null||i.setVolume(e)}setRepeat(e){this.log({message:`set repeat, repeat: ${e}`}),this.needToRepeatPlaylist=e,n(tr)&&(n(tr).needToRepeatPlaylist=this.needToRepeatPlaylist,n(tr).showNextPrevButtons=this.needToShowNextPrevButtons(),n(tr).nextButtonActive=this.isNextButtonActive(),n(tr).prevButtonActive=this.isPrevButtonActive())}seekTime(e){var i;this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekTime(e))}seekEpisodeStartTime(e){var i;this.log({message:`seek episode start time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekEpisodeStartTime(e)}returnFocusToEpisodes(){var e;this.log({message:"return focus to episodes button"}),(e=this.svelteRootComponent)==null||e.returnFocusToEpisodes()}setPlaybackRate(e){var i;this.log({message:`set playback rate to: ${e}`}),(i=this.svelteRootComponent)==null||i.setPlaybackRate(e)}setAutoQualityLimits(e){var i,o,s;this.log({message:`set auto quality limitation. Max: ${(i=e.max)!=null?i:"none"}. Min: ${(o=e.min)!=null?o:"none"}`}),(s=this.svelteRootComponent)==null||s.setAutoQualityLimits(e)}setAutoQuality(){var e;(e=this.svelteRootComponent)==null||e.setAutoQuality()}toggleTrafficSaving(e){var i;(i=this.svelteRootComponent)==null||i.toggleTrafficSaving(e)}toggleHighQuality(e){var i;(i=this.svelteRootComponent)==null||i.toggleHighQuality(e)}changeAudioStream(e){var i;(i=this.svelteRootComponent)==null||i.changeAudioStream(e)}addLanguage(e){var i;(i=this.store)==null||i.actions.internal.addLanguage(e)}setLanguage(e){return mp(this,null,function*(){var i;yield(i=this.store)==null?void 0:i.actions.internal.setLanguage(e)})}setLiveStart(e){var i,o;let s=this.isLiveTailPlaying();this.log({message:`live started: liveTailPlaying = ${s}`}),s||((i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!1),(o=this.store)==null||o.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){var e;this.log({message:"live waiting"}),(e=this.store)==null||e.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){var e;let i=(e=this.store)==null?void 0:e.getPlayer();if(!i)return!1;let{info:o}=i;return o.canPlayLiveTailBuffer$.getValue()&&!o.isStalled$.getValue()&&!o.atLiveEdge$.getValue()}setLiveWaitingRecover(e=!1){var i;let o=this.isLiveTailPlaying(),s=e||!o;this.log({message:`live waiting recover: forceImmediate = ${e}, liveTailPlaying = ${o}`});let a=()=>{var l;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!0)};s&&a(),(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var l;s||a(),(l=this.store)==null||l.destroy()})}setLiveWaitingRecord(){var e;let i=this.isLiveTailPlaying(),o=!i;this.log({message:`live waiting record: liveTailPlaying = ${i}`});let s=()=>{var a;(a=this.store)==null||a.actions.internal.setLiveWaitingRecord(!0)};o&&s(),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var a;o||s(),(a=this.store)==null||a.destroy()})}setLiveEnd(e){var i;let o=this.isLiveTailPlaying(),s=!o;this.log({message:`live ended: liveTailPlaying = ${o}`});let a=()=>{var l,d;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!1),(d=this.store)==null||d.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};if(s){a();return}(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=a)}setLiveLowLatency(e){var i;this.log({message:"live switch to low latency "+e}),(i=this.store)==null||i.actions.external.setLiveLowLatency(e)}setLooped(e){var i;(i=this.store)==null||i.actions.internal.setLooped(e)}getDebugData(){var e,i;return(i=(e=this.store)==null?void 0:e.actions.internal.getDebugTextData())!=null?i:""}getDeviceId(){var e,i,o;return(o=(i=(e=this.statistics)==null?void 0:e.oneStat)==null?void 0:i.getDeviceId())!=null?o:void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}replayInteractiveChapter(e){return mp(this,null,function*(){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let s=_e(this.store.state.positionExact$),l=_e(this.store.state.interactiveEpisodes$).find(r=>!r.completed);this.interactiveController.events.playerChanged$.pipe(WI()).subscribe(()=>{l&&s>=l.time?this.seekTime(l.time):this.seekTime(s),e==null||e()});let d=this.interactiveController.getCurrentChapter();yield this.interactiveController.setChapter({chapterId:(o=d==null?void 0:d.chapter)==null?void 0:o.id,pushToHistory:!1})}})}showInteractiveIndicatorTooltip(e,i=!1){var o;(o=this.microStoresRoot)==null||o.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){var e;(e=this.store)==null||e.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}handleTimerNextVideo(e){var i;(i=this.store)==null||i.actions.internal.setTimerNextVideoRunning(e)}togglePictureInPicture(){var e;(e=this.store)==null||e.actions.internal.togglePictureInPicture()}focus(){var e,i,o;(o=(i=(e=this.svelteRootComponent)==null?void 0:e.keyboardControls)==null?void 0:i.focus)==null||o.call(i)}restoreFocus(){var e;(e=this.focusManager)==null||e.restoreFocus()}handleExternalKeyboardEvent(e){var i,o;return!!((o=(i=this.svelteRootComponent)==null?void 0:i.keyboardControls)!=null&&o.handleExternalKeyboardEvent(e))}setAutoplayNext(e){var i;(i=this.store)==null||i.actions.internal.setAutoplayNextEnabled(e)}getTotalViewTime(){var e,i;return(i=(e=this.statistics)==null?void 0:e.thinOneStat)==null?void 0:i.getTotalViewTime()}unmountComponent(e){e&&Da(e)}};import{InterfaceLanguage as Vne,VKNumericLanguage as Rne,loadVKLangPack as Dne}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as Nne,VideoFormat as Bne}from"@vkontakte/videoplayer-core/es2015";var Cne=()=>{window.customElements.define("vk-video-player",vp)};export{Yu as ControlButtonType,ys as GridTypes,Vne as InterfaceLanguage,Wd as MenuItemType,xs as PlayerPhase,Dl as VERSION,Rne as VKNumericLanguage,Bne as VideoFormat,Nne as VideoQuality,Wl as isDpipSupported,ga as isPiPSupported,Dne as loadVKLangPack,Cne as registerPlayerWebComponent};
|