@vkontakte/videoplayer 1.1.79-dev.f4244a7e.0 → 1.1.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015.cjs.js +33 -33
- package/es2015.esm.js +33 -33
- package/es2018.cjs.js +35 -35
- package/es2018.esm.js +35 -35
- package/es2024.cjs.js +37 -37
- package/es2024.esm.js +37 -37
- package/esnext.cjs.js +37 -37
- package/esnext.esm.js +37 -37
- package/evergreen.esm.js +37 -37
- package/package.json +5 -5
- package/types/components/Menus/subMenuTabs/types.d.ts +0 -4
- package/types/components/Root/types.d.ts +1 -0
- package/types/config.d.ts +9 -0
- package/types/types/index.d.ts +2 -0
package/es2018.esm.js
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer v1.1.79
|
|
3
|
-
* Thu,
|
|
2
|
+
* @vkontakte/videoplayer v1.1.79
|
|
3
|
+
* Thu, 04 Dec 2025 16:03:01 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-1-79/doc/
|
|
5
5
|
*/
|
|
6
|
-
var jb=Object.defineProperty;var
|
|
6
|
+
var jb=Object.defineProperty;var Hv=t=>{throw TypeError(t)};var Xb=(t,e,i)=>e in t?jb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var ar=(t,e,i)=>Xb(t,typeof e!="symbol"?e+"":e,i),$p=(t,e,i)=>e.has(t)||Hv("Cannot "+i);var Ai=(t,e,i)=>($p(t,e,"read from private field"),i?i.call(t):e.get(t)),Qs=(t,e,i)=>e.has(t)?Hv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),rl=(t,e,i,o)=>($p(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),Uv=(t,e,i)=>($p(t,e,"access private method"),i);var Gs="[",Ys="[!",ha="]",is={};var Ji=Symbol(),Fn=Symbol("filename"),zv=Symbol("hmr"),Wv="http://www.w3.org/1999/xhtml",Dc="http://www.w3.org/2000/svg";var yp="@attach";var Bc=!0;var qv,Qv,Kv=(Qv=(qv=globalThis.process)==null?void 0:qv.env)==null?void 0:Qv.NODE_ENV,Ie=Kv&&!Kv.toLowerCase().startsWith("prod");var lr=Array.isArray,Gv=Array.prototype.indexOf,Zl=Array.from,xp=Object.keys,mo=Object.defineProperty,Ko=Object.getOwnPropertyDescriptor,Fc=Object.getOwnPropertyDescriptors,wp=Object.prototype,Yv=Array.prototype,_a=Object.getPrototypeOf,Sp=Object.isExtensible;function js(t){return typeof t=="function"}var mt=()=>{};function jv(t){return t()}function Xs(t){for(var e=0;e<t.length;e++)t[e]()}var qo=Symbol("$state"),sl=Symbol("legacy props"),Xv=Symbol(""),Hc=Symbol("proxy path"),Uc=1,al=3,dr=8;function zc(t){return t===this.v}function ll(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Zv(t,e){return t!==e}function dl(t){return!ll(t,this.v)}function Jv(){if(Ie){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 eg(t){if(Ie){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 tg(){if(Ie){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 ig(t){if(Ie){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 og(){if(Ie){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 ng(){if(Ie){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 rg(){if(Ie){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 sg(t){if(Ie){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 ag(t){if(Ie){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 lg(t){if(Ie){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
|
|
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 dg(){if(Ie){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 cg(){if(Ie){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 ug(){if(Ie){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 os=!1,ns=!1;function pg(){os=!0}var Jl=null;function ys(t){let e=Error(),i=e.stack;if(i){let o=i.split(`
|
|
23
23
|
`),r=[`
|
|
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")||r.push(l)}}if(r.length===1)return null;
|
|
25
|
-
`)}),
|
|
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")||r.push(l)}}if(r.length===1)return null;mo(e,"stack",{value:r.join(`
|
|
25
|
+
`)}),mo(e,"name",{value:`${t}Error`})}return e}function Wr(t,e){return t.label=e,Wc(t.v,e),t}function Wc(t,e){var i;return(i=t==null?void 0:t[Hc])==null||i.call(t,e),t}function cl(t){if(Ie){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 zt=null;function ed(t){zt=t}var cr=null;function td(t){cr=t}function ul(t){return Ip("getContext").get(t)}function pl(t,e){return Ip("setContext").set(t,e),e}function id(){return Ip("getAllContexts")}function B(t,e=!1,i){var o=zt={p:zt,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};os&&!e&&(zt.l={s:null,u:null,r1:[],r2:Pr(!1)}),Ao(()=>{o.d=!0}),Ie&&(zt.function=i,cr=i)}function F(t){var l,d;let e=zt;if(e!==null){t!==void 0&&(e.x=t);let s=e.e;if(s!==null){var i=ht,o=Rt;e.e=null;try{for(var r=0;r<s.length;r++){var a=s[r];vo(a.effect),Fi(a.reaction),Lo(a.fn)}}finally{vo(i),Fi(o)}}zt=e.p,Ie&&(cr=(d=(l=e.p)==null?void 0:l.function)!=null?d:null),e.m=!0}return t||{}}function rs(){return!os||zt!==null&&zt.l===null}function Ip(t){var e;return zt===null&&cl(t),(e=zt.c)!=null?e:zt.c=new Map(Jb(zt)||void 0)}function Jb(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var e$=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function ai(t){if(typeof t!="object"||t===null||qo in t)return t;let e=_a(t);if(e!==wp&&e!==Yv)return t;var i=new Map,o=lr(t),r=W(0),a=Ie&&ns?ys("CreatedAt"):null,l=Rt,d=v=>{var p=Rt;Fi(l);var f=v();return Fi(p),f};o&&i.set("length",W(t.length,a));var s="";function u(v){s=v,Wr(r,`${s} version`);for(let[p,f]of i)Wr(f,ba(s,p))}return new Proxy(t,{defineProperty(v,p,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&dg();var $=i.get(p);return $===void 0?$=d(()=>{var y=W(f.value,a);return i.set(p,y),Ie&&typeof p=="string"&&Wr(y,ba(s,p)),y}):O($,f.value,!0),!0},deleteProperty(v,p){var f=i.get(p);if(f===void 0){if(p in v){let g=d(()=>W(Ji,a));i.set(p,g),Ep(r),Ie&&Wr(g,ba(s,p))}}else{if(o&&typeof p=="string"){var $=i.get("length"),y=Number(p);Number.isInteger(y)&&y<$.v&&O($,y)}O(f,Ji),Ep(r)}return!0},get(v,p,f){var w;if(p===qo)return t;if(Ie&&p===Hc)return u;var $=i.get(p),y=p in v;if($===void 0&&(!y||(w=Ko(v,p))!=null&&w.writable)&&($=d(()=>{var C=ai(y?v[p]:Ji),I=W(C,a);return Ie&&Wr(I,ba(s,p)),I}),i.set(p,$)),$!==void 0){var g=n($);return g===Ji?void 0:g}return Reflect.get(v,p,f)},getOwnPropertyDescriptor(v,p){var f=Reflect.getOwnPropertyDescriptor(v,p);if(f&&"value"in f){var $=i.get(p);$&&(f.value=n($))}else if(f===void 0){var y=i.get(p),g=y==null?void 0:y.v;if(y!==void 0&&g!==Ji)return{enumerable:!0,configurable:!0,value:g,writable:!0}}return f},has(v,p){var g;if(p===qo)return!0;var f=i.get(p),$=f!==void 0&&f.v!==Ji||Reflect.has(v,p);if(f!==void 0||ht!==null&&(!$||(g=Ko(v,p))!=null&&g.writable)){f===void 0&&(f=d(()=>{var w=$?ai(v[p]):Ji,C=W(w,a);return Ie&&Wr(C,ba(s,p)),C}),i.set(p,f));var y=n(f);if(y===Ji)return!1}return $},set(v,p,f,$){var A;var y=i.get(p),g=p in v;if(o&&p==="length")for(var w=f;w<y.v;w+=1){var C=i.get(w+"");C!==void 0?O(C,Ji):w in v&&(C=d(()=>W(Ji,a)),i.set(w+"",C),Ie&&Wr(C,ba(s,w)))}if(y===void 0)(!g||(A=Ko(v,p))!=null&&A.writable)&&(y=d(()=>W(void 0,a)),O(y,ai(f)),i.set(p,y),Ie&&Wr(y,ba(s,p)));else{g=y.v!==Ji;var I=d(()=>ai(f));O(y,I)}var N=Reflect.getOwnPropertyDescriptor(v,p);if(N!=null&&N.set&&N.set.call($,f),!g){if(o&&typeof p=="string"){var k=i.get("length"),E=Number(p);Number.isInteger(E)&&E>=k.v&&O(k,E+1)}Ep(r)}return!0},ownKeys(v){n(r);var p=Reflect.ownKeys(v).filter(y=>{var g=i.get(y);return g===void 0||g.v!==Ji});for(var[f,$]of i)$.v!==Ji&&!(f in v)&&p.push(f);return p},setPrototypeOf(){cg()}})}function ba(t,e){var i;return typeof e=="symbol"?`${t}[Symbol(${(i=e.description)!=null?i:""})]`:e$.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function Ep(t,e=1){O(t,t.v+e)}function fl(t){try{if(t!==null&&typeof t=="object"&&qo in t)return t[qo]}catch(e){}return t}function kp(t,e){return Object.is(fl(t),fl(e))}function Kr(t){var e=2050,i=Rt!==null&&(Rt.f&2)!==0?Rt:null;ht===null||i!==null&&(i.f&256)!==0?e|=256:ht.f|=1048576;let o={ctx:zt,deps:null,effects:null,equals:zc,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:i!=null?i:ht};return Ie&&ns&&(o.created=ys("CreatedAt")),o}function m(t){let e=Kr(t);return Qc(e),e}function _n(t){let e=Kr(t);return e.equals=dl,e}function Kc(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)Hi(e[i])}}var Pp=[];function t$(t){for(var e=t.parent;e!==null;){if((e.f&2)===0)return e;e=e.parent}return null}function Mp(t){var e,i=ht;if(vo(t$(t)),Ie){let o=$a;Ap(new Set);try{Pp.includes(t)&&Jv(),Pp.push(t),Kc(t),e=qc(t)}finally{vo(i),Ap(o),Pp.pop()}}else try{Kc(t),e=qc(t)}finally{vo(i)}return e}function Vp(t){var e=Mp(t);if(t.equals(e)||(t.v=e,t.wv=od()),!xs){var i=(ws||(t.f&256)!==0)&&t.deps!==null?4096:1024;bn(t,i)}}var $a=new Set,ml=new Map;function Ap(t){$a=t}function Pr(t,e){var i={f:0,v:t,reactions:null,equals:zc,rv:0,wv:0};return Ie&&ns&&(i.created=e!=null?e:ys("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function W(t,e){let i=Pr(t,e);return Qc(i),i}function ss(t,e=!1,i=!0){var r,a;let o=Pr(t);return e||(o.equals=dl),os&&i&&zt!==null&&zt.l!==null&&((a=(r=zt.l).s)!=null?a:r.s=[]).push(o),o}function O(t,e,i=!1){var r;Rt!==null&&(!fr||(Rt.f&262144)!==0)&&rs()&&(Rt.f&262162)!==0&&!((r=Go)!=null&&r[1].includes(t)&&Go[0]===Rt)&&ug();let o=i?ai(e):e;return Ie&&Wc(o,t.label),vl(t,o)}function vl(t,e){if(!t.equals(e)){var i=t.v;if(xs?ml.set(t,e):ml.set(t,i),t.v=e,Ie&&ns&&(t.updated=ys("UpdatedAt"),ht!==null&&(t.set_during_effect=!0)),(t.f&2)!==0&&((t.f&2048)!==0&&Mp(t),bn(t,(t.f&256)===0?1024:4096)),t.wv=od(),mg(t,2048),rs()&&ht!==null&&(ht.f&1024)!==0&&(ht.f&96)===0&&(pr===null?vg([t]):pr.push(t)),Ie&&$a.size>0){let o=Array.from($a);for(let r of o)(r.f&1024)!==0&&bn(r,4096),xa(r)&&gl(r);$a.clear()}}return e}function mg(t,e){var i=t.reactions;if(i!==null)for(var o=rs(),r=i.length,a=0;a<r;a++){var l=i[a],d=l.f;if((d&2048)===0&&!(!o&&l===ht)){if(Ie&&(d&262144)!==0){$a.add(l);continue}bn(l,e),(d&1280)!==0&&((d&2)!==0?mg(l,4096):rd(l))}}}var hl="font-weight: bold",_l="font-weight: normal";function gg(t,e,i){Ie?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`,_l
|
|
29
|
+
https://svelte.dev/e/hydration_attribute_changed`,hl,_l):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function hg(t){Ie?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`,_l
|
|
31
|
+
https://svelte.dev/e/hydration_html_changed`,hl,_l):console.warn("https://svelte.dev/e/hydration_html_changed")}function Zs(t){Ie?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`,_l
|
|
33
|
+
https://svelte.dev/e/hydration_mismatch`,hl,_l):console.warn("https://svelte.dev/e/hydration_mismatch")}function _g(){Ie?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`,_l
|
|
35
|
+
https://svelte.dev/e/lifecycle_double_unmount`,hl,_l):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function bg(){Ie?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",hl,_l):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Gc(t){Ie?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`,_l
|
|
37
|
+
https://svelte.dev/e/state_proxy_equality_mismatch`,hl,_l):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var Je=!1;function go(t){Je=t}var _t;function xi(t){if(t===null)throw Zs(),is;return _t=t}function Ui(){return xi(Yo(_t))}function S(t){if(Je){if(Yo(_t)!==null)throw Zs(),is;_t=t}}function ci(t=1){if(Je){for(var e=t,i=_t;e--;)i=Yo(i);_t=i}}function wa(){for(var t=0,e=_t;;){if(e.nodeType===dr){var i=e.data;if(i===ha){if(t===0)return e;t-=1}else(i===Gs||i===Ys)&&(t+=1)}var o=Yo(e);e.remove(),e=o}}function Yc(t){if(!t||t.nodeType!==dr)throw Zs(),is;return t.data}function $g(){let t=Array.prototype,e=Array.__svelte_cleanup;e&&e();let{indexOf:i,lastIndexOf:o,includes:r}=t;t.indexOf=function(a,l){let d=i.call(this,a,l);if(d===-1){for(let s=l!=null?l:0;s<this.length;s+=1)if(fl(this[s])===a){Gc("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 s=0;s<=(l!=null?l:this.length-1);s+=1)if(fl(this[s])===a){Gc("array.lastIndexOf(...)");break}}return d},t.includes=function(a,l){let d=r.call(this,a,l);if(!d){for(let s=0;s<this.length;s+=1)if(fl(this[s])===a){Gc("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{t.indexOf=i,t.lastIndexOf=o,t.includes=r}}var Sa,yg,sd,xg,wg;function jc(){if(Sa===void 0){Sa=window,yg=document,sd=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;xg=Ko(e,"firstChild").get,wg=Ko(e,"nextSibling").get,Sp(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Sp(i)&&(i.__t=void 0),Ie&&(t.__svelte_meta=null,$g())}}function $n(t=""){return document.createTextNode(t)}function Si(t){return xg.call(t)}function Yo(t){return wg.call(t)}function T(t,e){if(!Je)return Si(t);var i=Si(_t);if(i===null)i=_t.appendChild($n());else if(e&&i.nodeType!==al){var o=$n();return i==null||i.before(o),xi(o),o}return xi(i),i}function de(t,e){var r,a;if(!Je){var i=Si(t);return i.nodeType===8&&i.data===""?Yo(i):i}if(e&&((r=_t)==null?void 0:r.nodeType)!==al){var o=$n();return(a=_t)==null||a.before(o),xi(o),o}return _t}function L(t,e=1,i=!1){let o=Je?_t:t;for(var r;e--;)r=o,o=Yo(o);if(!Je)return o;if(i&&(o==null?void 0:o.nodeType)!==al){var a=$n();return o===null?r==null||r.after(a):o.before(a),xi(a),a}return xi(o),o}function ad(t){t.textContent=""}function Op(t){ht===null&&Rt===null&&ig(t),Rt!==null&&(Rt.f&256)!==0&&ht===null&&tg(),xs&&eg(t)}function i$(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function Ta(t,e,i,o=!0){var s;var r=ht;if(Ie)for(;r!==null&&(r.f&262144)!==0;)r=r.parent;var a={ctx:zt,deps:null,nodes_start:null,nodes_end:null,f:t|2048,first:null,fn:e,last:null,next:null,parent:r,prev:null,teardown:null,transitions:null,wv:0};if(Ie&&(a.component_function=cr),i)try{gl(a),a.f|=32768}catch(u){throw Hi(a),u}else e!==null&&rd(a);var l=i&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&1048704)===0;if(!l&&o&&(r!==null&&i$(a,r),Rt!==null&&(Rt.f&2)!==0)){var d=Rt;((s=d.effects)!=null?s:d.effects=[]).push(a)}return a}function Ao(t){let e=Ta(8,null,!1);return bn(e,1024),e.teardown=t,e}function Ne(t){var r;Op("$effect");var e=ht!==null&&(ht.f&32)!==0&&zt!==null&&!zt.m;if(Ie&&mo(t,"name",{value:"$effect"}),e){var i=zt;((r=i.e)!=null?r:i.e=[]).push({fn:t,effect:ht,reaction:Rt})}else{var o=Lo(t);return o}}function cd(t){return Op("$effect.pre"),Ie&&mo(t,"name",{value:"$effect.pre"}),jo(t)}function Jc(t){let e=Ta(64,t,!0);return()=>{Hi(e)}}function Tg(t){let e=Ta(64,t,!0);return(i={})=>new Promise(o=>{i.outro?Wn(e,()=>{Hi(e),o(void 0)}):(Hi(e),o(void 0))})}function Lo(t){return Ta(4,t,!1)}function jo(t){return Ta(8,t,!0)}function D(t,e=[],i=Kr){if(Ie)return jo(()=>{var r=ht,a=()=>t(...l.map(n));mo(r.fn,"name",{value:"{expression}"}),mo(a,"name",{value:"{expression}"});let l=e.map(i);zi(a)});let o=e.map(i);return zi(()=>t(...o.map(n)))}function zi(t,e=0){return Ta(24|e,t,!0)}function Li(t,e=!0){return Ta(40,t,!0,e)}function Dp(t){var e=t.teardown;if(e!==null){let i=xs,o=Rt;Rp(!0),Fi(null);try{e.call(null)}finally{Rp(i),Fi(o)}}}function Bp(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:Hi(i,e),i=o}}function Cg(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&32)===0&&Hi(e),e=i}}function Hi(t,e=!0){var i=!1;(e||(t.f&524288)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(Fp(t.nodes_start,t.nodes_end),i=!0),Bp(t,e&&!i),ud(t,0),bn(t,16384);var o=t.transitions;if(o!==null)for(let a of o)a.stop();Dp(t);var r=t.parent;r!==null&&r.first!==null&&Hp(t),Ie&&(t.component_function=null),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Fp(t,e){for(;t!==null;){var i=t===e?null:Yo(t);t.remove(),t=i}}function Hp(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 Wn(t,e){var i=[];eu(t,i,!0),Up(i,()=>{Hi(t),e&&e()})}function Up(t,e){var i=t.length;if(i>0){var o=()=>--i||e();for(var r of t)r.out(o)}else e()}function eu(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 r=o.next,a=(o.f&65536)!==0||(o.f&32)!==0;eu(o,e,a?i:!1),o=r}}}function Ts(t){Ig(t,!0)}function Ig(t,e){if((t.f&8192)!==0){t.f^=8192;for(var i=t.first;i!==null;){var o=i.next,r=(i.f&65536)!==0||(i.f&32)!==0;Ig(i,r?e:!1),i=o}if(t.transitions!==null)for(let a of t.transitions)(a.is_global||e)&&a.in()}}var pd=[],zp=[];function Eg(){var t=pd;pd=[],Xs(t)}function o$(){var t=zp;zp=[],Xs(t)}function yn(t){pd.length===0&&queueMicrotask(Eg),pd.push(t)}function kg(){pd.length>0&&Eg(),zp.length>0&&o$()}function Ag(t){var e=ht;if(Ie&&t instanceof Error&&n$(t,e),(e.f&32768)===0){if((e.f&128)===0)throw t;e.fn(t)}else fd(t,e)}function fd(t,e){for(;e!==null;){if((e.f&128)!==0)try{e.fn(t);return}catch(i){}e=e.parent}throw t}var Pg=new WeakSet;function n$(t,e){var l,d;if(Pg.has(t))return;Pg.add(t);let i=Ko(t,"message");if(!(i&&!i.configurable)){for(var o=sd?" ":" ",r=`
|
|
38
38
|
${o}in ${((l=e.fn)==null?void 0:l.name)||"<unknown>"}`,a=e.ctx;a!==null;)r+=`
|
|
39
|
-
${o}in ${(d=a.function)==null?void 0:d[
|
|
39
|
+
${o}in ${(d=a.function)==null?void 0:d[Fn].split("/").pop()}`,a=a.p;mo(t,"message",{value:t.message+`
|
|
40
40
|
${r}
|
|
41
|
-
`}),t.stack&&
|
|
41
|
+
`}),t.stack&&mo(t,"stack",{value:t.stack.split(`
|
|
42
42
|
`).filter(s=>!s.includes("svelte/src/internal")).join(`
|
|
43
|
-
`)})}}var xa=!1,$l=null,wa=!1,$s=!1;function Mp(t){$s=t}var md=[],vd=[],Rt=null,mr=!1;function Ui(t){Rt=t}var gt=null;function mo(t){gt=t}var Qo=null;function qc(t){Rt!==null&&Rt.f&2097152&&(Qo===null?Qo=[Rt,[t]]:Qo[1].push(t))}var Cn=null,vr=0,fr=null;function fg(t){fr=t}var Lg=1,tu=0,ys=!1,iu=null;function od(){return++Lg}function _a(t){var f,p;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&>!==null&&!ys,s=i.length;if(l||d){var u=t,m=u.parent;for(r=0;r<s;r++)a=i[r],(l||!((f=a==null?void 0:a.reactions)!=null&&f.includes(u)))&&((p=a.reactions)!=null?p: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],_a(a)&&Lp(a),a.wv>t.wv)return!0}(!o||gt!==null&&!ys)&&xn(t,1024)}return!1}function Mg(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];Qo!=null&&Qo[1].includes(t)&&Qo[0]===Rt||((a.f&2)!==0?Mg(a,e,!1):e===a&&(i?xn(a,2048):(a.f&1024)!==0&&xn(a,4096),rd(a)))}}function Kc(t){var $,y;var e=Cn,i=vr,o=fr,r=Rt,a=ys,l=Qo,d=Ut,s=mr,u=t.f;Cn=null,vr=0,fr=null,ys=(u&256)!==0&&(mr||!wa||Rt===null),Rt=(u&96)===0?t:null,Qo=null,ed(t.ctx),mr=!1,tu++,t.f|=2097152;try{var m=(0,t.fn)(),f=t.deps;if(Cn!==null){var p;if(ud(t,vr),f!==null&&vr>0)for(f.length=vr+Cn.length,p=0;p<Cn.length;p++)f[vr+p]=Cn[p];else t.deps=f=Cn;if(!ys||(u&2)!==0&&t.reactions!==null)for(p=vr;p<f.length;p++)((y=($=f[p]).reactions)!=null?y:$.reactions=[]).push(t)}else f!==null&&vr<f.length&&(ud(t,vr),f.length=vr);if(ls()&&fr!==null&&!mr&&f!==null&&(t.f&6146)===0)for(p=0;p<fr.length;p++)Mg(fr[p],t);return r!==null&&r!==t&&(tu++,fr!==null&&(o===null?o=fr:o.push(...fr))),m}catch(_){kg(_)}finally{Cn=e,vr=i,fr=o,Rt=r,ys=a,Qo=l,ed(d),mr=s,t.f^=2097152}}function r$(t,e){let i=e.reactions;if(i!==null){var o=qv.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&&(Cn===null||!Cn.includes(e))&&(xn(e,4096),(e.f&768)===0&&(e.f^=512),Wc(e),ud(e,0))}function ud(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)r$(t,i[o])}function hl(t){var e=t.f;if((e&16384)===0){xn(t,1024);var i=gt,o=wa;if(gt=t,wa=!0,Ie){var r=ur;td(t.component_function)}try{(e&16)!==0?Sg(t):Op(t),Np(t);var a=Kc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Lg,Ie&&as&&(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);Ie&&vd.push(t)}finally{wa=o,gt=i,Ie&&td(r)}}}function Pg(){console.error("Last ten effects were: ",vd.slice(-10).map(t=>t.fn)),vd=[]}function s$(){try{tg()}catch(t){if(Ie&&fo(t,"stack",{value:""}),$l!==null)if(Ie)try{fd(t,$l)}catch(e){throw Pg(),e}else fd(t,$l);else throw Ie&&Pg(),t}}function zp(){var t=wa;try{var e=0;for(wa=!0;md.length>0;){e++>1e3&&s$();var i=md,o=i.length;md=[];for(var r=0;r<o;r++){var a=l$(i[r]);a$(a)}vl.clear()}}finally{xa=!1,wa=t,$l=null,Ie&&(vd=[])}}function a$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&_a(o)&&(hl(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?Bp(o):o.fn=null))}}function rd(t){xa||(xa=!0,queueMicrotask(zp));for(var e=$l=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 l$(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:_a(i)&&hl(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 yl(t){var e;for(t&&(xa=!0,zp(),xa=!0,e=t());;){if(Ig(),md.length===0)return xa=!1,$l=null,Ie&&(vd=[]),e;xa=!0,zp()}}async function go(){await Promise.resolve(),yl()}function n(t){var e=t.f,i=(e&2)!==0;if(iu!==null&&iu.add(t),Rt!==null&&!mr){if(!(Qo!=null&&Qo[1].includes(t))||Qo[0]!==Rt){var o=Rt.deps;t.rv<tu&&(t.rv=tu,Cn===null&&o!==null&&o[vr]===t?vr++:Cn===null?Cn=[t]:(!ys||!Cn.includes(t))&&Cn.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,_a(r)&&Lp(r)),Ie&&as&&!mr&&Jl!==null&&Rt!==null&&Jl.reaction===Rt)if(t.trace)t.trace();else{var l=bs("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 $s&&vl.has(t)?vl.get(t):t.v}function Ct(t){var e=mr;try{return mr=!0,t()}finally{mr=e}}var d$=-7169;function xn(t,e){t.f=t.f&d$|e}function nu(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Ko in t)ou(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&Ko in i&&ou(i)}}}function ou(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{ou(t[o],e)}catch(r){}let i=ma(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){let o=Bc(i);for(let r in o){let a=o[r].get;if(a)try{a.call(t)}catch(l){}}}}}function Wp(t,e){if(e){let i=document.body;t.autofocus=!0,Sn(()=>{document.activeElement===i&&t.focus()})}}function gd(t){var e=Rt,i=gt;Ui(null),mo(null);try{return t()}finally{Ui(e),mo(i)}}var Kp=new Set,ru=new Set;function Sa(t){if(!Ze)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 qp(t,e,i,o={}){function r(a){if(o.capture||xl.call(e,a),!a.cancelBubble)return gd(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Sn(()=>{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=qp(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Ao(()=>{e.removeEventListener(t,l,a)})}function et(t){for(var e=0;e<t.length;e++)Kp.add(t[e]);for(var i of ru)i(t)}function xl(t){var T;var e=this,i=e.ownerDocument,o=t.type,r=((T=t.composedPath)==null?void 0:T.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){fo(t,"currentTarget",{configurable:!0,get(){return a||i}});var m=Rt,f=gt;Ui(null),mo(null);try{for(var p,$=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var _=a["__"+o];if(_!=null&&(!a.disabled||t.target===a))if(dr(_)){var[S,...I]=_;S.apply(a,[t,...I])}else _.call(a,t)}catch(N){p?$.push(N):p=N}if(t.cancelBubble||y===e||y===null)break;a=y}if(p){for(let N of $)queueMicrotask(()=>{throw N});throw p}}finally{t.__root=e,delete t.currentTarget,Ui(m),mo(f)}}}var u$;function Vg(){u$=void 0}function wl(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Mo(t,e){var i=gt;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function M(t,e){var i=(e&1)!==0,o=(e&2)!==0,r,a=!t.startsWith("<!>");return()=>{if(Ze)return Mo(ht,null),ht;r===void 0&&(r=wl(a?t:"<!>"+t),i||(r=Si(r)));var l=o||sd?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=Si(l),s=l.lastChild;Mo(d,s)}else Mo(l,l);return l}}function m$(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(Ze)return Mo(ht,null),ht;if(!l){var d=wl(a),s=Si(d);if(r)for(l=document.createDocumentFragment();Si(s);)l.appendChild(Si(s));else l=Si(s)}var u=l.cloneNode(!0);if(r){var m=Si(u),f=u.lastChild;Mo(m,f)}else Mo(u,u);return u}}function Ce(t,e){return m$(t,e,"svg")}function cs(t=""){if(!Ze){var e=wn(t+"");return Mo(e,e),e}var i=ht;return i.nodeType!==ll&&(i.before(i=wn()),xi(i)),Mo(i,i),i}function Ae(){if(Ze)return Mo(ht,null),ht;var t=document.createDocumentFragment(),e=document.createComment(""),i=wn();return t.append(e,i),Mo(e,i),t}function b(t,e){if(Ze){gt.nodes_end=ht,Wi();return}t!==null&&t.before(e)}var v$=/\r/g;function Ng(t){t=t.replace(v$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function Og(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var g$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Dg(t){return g$.includes(t)}var h$=["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 _$={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 Bg(t){var e;return t=t.toLowerCase(),(e=_$[t])!=null?e:t}var lk=[...h$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var b$=["touchstart","touchmove"];function Fg(t){return b$.includes(t)}var $$=["$state","$state.raw","$derived","$derived.by"],dk=[...$$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var y$=["textarea","script","style","title"];function Hg(t){return y$.includes(t)}function su(t){return t==null?void 0:t.replace(/\//g,"/")}var hd=!0;function au(t){hd=t}function me(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 qr(t,e){return Ug(t,e)}function Gp(t,e){var l;Yc(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=Ze,r=ht;try{for(var a=Si(i);a&&(a.nodeType!==cr||a.data!==Us);)a=Go(a);if(!a)throw rs;vo(!0),xi(a),Wi();let d=Ug(t,{...e,anchor:a});if(ht===null||ht.nodeType!==cr||ht.data!==fa)throw qs(),rs;return vo(!1),d}catch(d){if(d===rs)return e.recover===!1&&ig(),Yc(),ad(i),vo(!1),qr(t,e);throw d}finally{vo(o),xi(r),Vg()}}var Sl=new Map;function Ug(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){Yc();var d=new Set,s=f=>{for(var p=0;p<f.length;p++){var $=f[p];if(!d.has($)){d.add($);var y=Fg($);e.addEventListener($,xl,{passive:y});var _=Sl.get($);_===void 0?(document.addEventListener($,xl,{passive:y}),Sl.set($,1)):Sl.set($,_+1)}}};s(Zl(Kp)),ru.add(s);var u=void 0,m=wg(()=>{var f=i!=null?i:e.appendChild(wn());return Vi(()=>{if(a){B({});var p=Ut;p.c=a}r&&(o.$$events=r),Ze&&Mo(f,null),hd=l,u=t(f,o)||{},hd=!0,Ze&&(gt.nodes_end=ht),a&&F()}),()=>{var y;for(var p of d){e.removeEventListener(p,xl);var $=Sl.get(p);--$===0?(document.removeEventListener(p,xl),Sl.delete(p)):Sl.set(p,$)}ru.delete(s),f!==i&&((y=f.parentNode)==null||y.removeChild(f))}});return Qp.set(u,m),u}var Qp=new WeakMap;function Ca(t,e){let i=Qp.get(t);return i?(Qp.delete(t),i(e)):(Ie&&gg(),Promise.resolve())}function ii(t,e,...i){var o=t,r=ft,a;Ki(()=>{r!==(r=e())&&(a&&(zi(a),a=null),Ie&&r==null&&og(),a=Vi(()=>r(o,...i)))},65536),Ze&&(o=ht)}if(Ie){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;sg(e)},set:o=>{i=o}})}};C$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var C$;function At(t){Ut===null&&ul("onMount"),ss&&Ut.l!==null?S$(Ut).m.push(t):Ne(()=>{let e=Ct(t);if(typeof e=="function")return e})}function un(t){Ut===null&&ul("onDestroy"),At(()=>()=>Ct(t))}function S$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var zg=new Map;function Wg(t,e){var i=zg.get(t);i||(i=new Set,zg.set(t,i)),i.add(e)}function R(t,e,[i,o]=[0,0]){Ze&&i===0&&Wi();var r=t,a=null,l=null,d=Zi,s=i>0?65536:0,u=!1;let m=(p,$=!0)=>{u=!0,f($,p)},f=(p,$)=>{if(d===(d=p))return;let y=!1;if(Ze&&o!==-1){if(i===0){let S=Gc(r);S===Us?o=0:S===zs?o=1/0:(o=parseInt(S.substring(1)),o!==o&&(o=d?1/0:-1))}let _=o>i;!!d===_&&(r=ba(),xi(r),vo(!1),y=!0,o=-1)}d?(a?ws(a):$&&(a=Vi(()=>$(r))),l&&qn(l,()=>{l=null})):(l?ws(l):$&&(l=Vi(()=>$(r,[i+1,o]))),a&&qn(a,()=>{a=null})),y&&vo(!0)};Ki(()=>{u=!1,e(m),u||f(null,null)},s),Ze&&(r=ht)}function Ss(t,e,i){Ze&&Wi();var o=t,r=Zi,a,l=ls()?jv:dl;Ki(()=>{l(r,r=e())&&(a&&qn(a),a=Vi(()=>i(o)))}),Ze&&(o=ht)}var Gs=null;function Xp(t){Gs=t}function _d(t,e){return e}function E$(t,e,i,o){for(var r=[],a=e.length,l=0;l<a;l++)Jc(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(),Qs(t,e[0].prev,e[a-1].next)}Fp(r,()=>{for(var u=0;u<a;u++){var m=e[u];d||(o.delete(m.k),Qs(t,m.prev,m.next)),zi(m.e,!d)}})}function bi(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=Ze?xi(Si(u)):u.appendChild(wn())}Ze&&Wi();var m=null,f=!1,p=yn(()=>{var $=i();return dr($)?$:$==null?[]:Zl($)});Ki(()=>{var $=n(p),y=$.length;if(f&&y===0)return;f=y===0;let _=!1;if(Ze){var S=Gc(l)===zs;S!==(y===0)&&(l=ba(),xi(l),vo(!1),_=!0)}if(Ze){for(var I=null,T,N=0;N<y;N++){if(ht.nodeType===cr&&ht.data===fa){l=ht,_=!0,vo(!1);break}var k=$[N],E=o(k,N);T=Qg(ht,d,I,null,k,E,N,r,e,i),d.items.set(E,T),I=T}y>0&&xi(ba())}Ze||k$($,d,l,r,e,o,i),a!==null&&(y===0?m?ws(m):m=Vi(()=>a(l)):m!==null&&qn(m,()=>{m=null})),_&&vo(!0),n(p)}),Ze&&(l=ht)}function k$(t,e,i,o,r,a,l){var Z,we,ue,re;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,m=e.items,f=e.first,p=f,$,y=null,_,S=[],I=[],T,N,k,E;if(d)for(E=0;E<u;E+=1)T=t[E],N=a(T,E),k=m.get(N),k!==void 0&&((Z=k.a)==null||Z.measure(),(_!=null?_:_=new Set).add(k));for(E=0;E<u;E+=1){if(T=t[E],N=a(T,E),k=m.get(N),k===void 0){var A=p?p.e.nodes_start:i;y=Qg(A,e,y,y===null?e.first:y.next,T,N,E,o,r,l),m.set(N,y),S=[],I=[],p=y.next;continue}if(s&&P$(k,T,E,r),(k.e.f&8192)!==0&&(ws(k.e),d&&((we=k.a)==null||we.unfix(),(_!=null?_:_=new Set).delete(k))),k!==p){if($!==void 0&&$.has(k)){if(S.length<I.length){var W=I[0],H;y=W.prev;var z=S[0],Y=S[S.length-1];for(H=0;H<S.length;H+=1)Kg(S[H],W,i);for(H=0;H<I.length;H+=1)$.delete(I[H]);Qs(e,z.prev,Y.next),Qs(e,y,z),Qs(e,Y,W),p=W,y=Y,E-=1,S=[],I=[]}else $.delete(k),Kg(k,p,i),Qs(e,k.prev,k.next),Qs(e,k,y===null?e.first:y.next),Qs(e,y,k),y=k;continue}for(S=[],I=[];p!==null&&p.k!==N;)(p.e.f&8192)===0&&($!=null?$:$=new Set).add(p),I.push(p),p=p.next;if(p===null)continue;k=p}S.push(k),y=k,p=k.next}if(p!==null||$!==void 0){for(var ae=$===void 0?[]:Zl($);p!==null;)(p.e.f&8192)===0&&ae.push(p),p=p.next;var j=ae.length;if(j>0){var ne=(r&4)!==0&&u===0?i:null;if(d){for(E=0;E<j;E+=1)(ue=ae[E].a)==null||ue.measure();for(E=0;E<j;E+=1)(re=ae[E].a)==null||re.fix()}E$(e,ae,ne,m)}}d&&Sn(()=>{var _e;if(_!==void 0)for(k of _)(_e=k.a)==null||_e.apply()}),gt.first=e.first&&e.first.e,gt.last=y&&y.e}function P$(t,e,i,o){(o&1)!==0&&gl(t.v,e),(o&2)!==0?gl(t.i,i):t.i=i}function Qg(t,e,i,o,r,a,l,d,s,u){var m=Gs,f=(s&1)!==0,p=(s&16)===0,$=f?p?ds(r,!1,!1):Tr(r):r,y=(s&2)===0?l:Tr(l);Ie&&f&&($.trace=()=>{var S=typeof y=="number"?l:y.v;u()[S]});var _={i:y,v:$,k:a,a:null,e:null,prev:i,next:o};Gs=_;try{return _.e=Vi(()=>d(t,$,y,u),Ze),_.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{Gs=m}}function Kg(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=Go(a);r.before(a),a=l}}function Qs(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 A$(t,e,i){var a,l;if(!e||e===Ng(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=ur)!=null&&l[Un]&&(o=`in ${ur[Un]}`),vg(su(o))}function bd(t,e,i=!1,o=!1,r=!1){var a=t,l="";D(()=>{var $;var d=gt;if(l===(l=($=e())!=null?$:"")){Ze&&Wi();return}if(d.nodes_start!==null&&(Dp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(Ze){for(var s=ht.data,u=Wi(),m=u;u!==null&&(u.nodeType!==cr||u.data!=="");)m=u,u=Go(u);if(u===null)throw qs(),rs;Ie&&!r&&A$(u.parentNode,s,l),Mo(ht,m),a=xi(u);return}var f=l+"";i?f=`<svg>${f}</svg>`:o&&(f=`<math>${f}</math>`);var p=wl(f);if((i||o)&&(p=Si(p)),Mo(Si(p),p.lastChild),i||o)for(;Si(p);)a.before(Si(p));else a.before(p)}})}function Ri(t,e,i){Ze&&Wi();var o=t,r,a;Ki(()=>{r!==(r=e())&&(a&&(qn(a),a=null),r&&(a=Vi(()=>i(o,r))))},65536),Ze&&(o=ht)}function Ta(t,e,i,o,r,a){var y;let l=Ze;Ze&&Wi();var d=Ie&&a&&((y=Ut)==null?void 0:y.function[Un]),s,u,m=null;Ze&&ht.nodeType===Hc&&(m=ht,Wi());var f=Ze?ht:t,p,$=Gs;Ki(()=>{let _=e()||null;var S=r?r():i||_==="svg"?Oc:null;if(_!==s){var I=Gs;Xp($),p&&(_===null?qn(p,()=>{p=null,u=null}):_===u?ws(p):(zi(p),au(!1))),_&&_!==u&&(p=Vi(()=>{if(m=Ze?m:S?document.createElementNS(S,_):document.createElement(_),Ie&&a&&(m.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),Mo(m,m),o){Ze&&Hg(_)&&m.append(document.createComment(""));var T=Ze?Si(m):m.appendChild(wn());Ze&&(T===null?vo(!1):xi(T)),o(m,T)}gt.nodes_end=m,f.before(m)})),s=_,s&&(u=s),au(!0),Xp(I)}},65536),l&&(vo(!0),xi(f))}var Jp;function Gg(t){return Jp=t.target,new Zp(t)}var Cs,Ir,Zp=class{constructor(e){Hs(this,Cs);Hs(this,Ir);var a,l;var i=new Map,o=(d,s)=>{var u=ds(s,!1,!1);return i.set(d,u),u};let r=new Proxy({...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===al?!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 O((m=i.get(s))!=null?m:o(s,u),u),Reflect.set(d,s,u)}});sl(this,Ir,(e.hydrate?Gp:qr)(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)&&yl(),sl(this,Cs,r.$$events);for(let d of Object.keys(Mi(this,Ir)))d==="$set"||d==="$destroy"||d==="$on"||fo(this,d,{get(){return Mi(this,Ir)[d]},set(s){Mi(this,Ir)[d]=s},enumerable:!0});Mi(this,Ir).$set=d=>{Object.assign(r,d)},Mi(this,Ir).$destroy=()=>{Ca(Mi(this,Ir))}}$set(e){Mi(this,Ir).$set(e)}$on(e,i){Mi(this,Cs)[e]=Mi(this,Cs)[e]||[];let o=(...r)=>i.call(this,...r);return Mi(this,Cs)[e].push(o),()=>{Mi(this,Cs)[e]=Mi(this,Cs)[e].filter(r=>r!==o)}}$destroy(){Mi(this,Ir).$destroy()}};Cs=new WeakMap,Ir=new WeakMap;function Q(t,e){Sn(()=>{var r,a,l;var i=t.getRootNode(),o=i.host?i:(l=(r=i.head)!=null?r:i.ownerDocument.head)!=null?l:(a=Jp)==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),Ie&&Wg(e.hash,d)}})}function Ts(t,e){var i=void 0,o;Ki(()=>{i!==(i=e())&&(o&&(zi(o),o=null),i&&(o=Vi(()=>{Lo(()=>i(t))})))})}function Yg(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=Yg(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function jg(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=Yg(t))&&(o&&(o+=" "),o+=e);return o}function $d(t){return typeof t=="object"?jg(t):t!=null?t:""}var Xg=[...`
|
|
44
|
-
\r\f \v\uFEFF`];function Jg(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||Xg.includes(o[l-1]))&&(d===o.length||Xg.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function Zg(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 ef(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function eh(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(ef)),r&&s.push(...Object.keys(r).map(ef));var u=0,m=-1;let _=t.length;for(var f=0;f<_;f++){var p=t[f];if(d?p==="/"&&t[f-1]==="*"&&(d=!1):a?a===p&&(a=!1):p==="/"&&t[f+1]==="*"?d=!0:p==='"'||p==="'"?a=p:p==="("?l++:p===")"&&l--,!d&&a===!1&&l===0){if(p===":"&&m===-1)m=f;else if(p===";"||f===_-1){if(m!==-1){var $=ef(t.substring(u,m).trim());if(!s.includes($)){p!==";"&&f++;var y=t.substring(u,f).trim();i+=" "+y+";"}}u=f+1,m=-1}}}}return o&&(i+=Zg(o)),r&&(i+=Zg(r,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function se(t,e,i,o,r,a){var l=t.__className;if(Ze||l!==i||l===void 0){var d=Jg(i,o,a);(!Ze||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 tf(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 qe(t,e,i,o){var r=t.__style;if(Ze||r!==e){var a=eh(e,o);(!Ze||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(tf(t,i==null?void 0:i[0],o[0]),tf(t,i==null?void 0:i[1],o[1],"important")):tf(t,i,o));return o}function yd(t,e,i){if(t.multiple){if(e==null)return;if(!dr(e))return hg();for(var o of t.options)o.selected=e.includes(th(o));return}for(o of t.options){var r=th(o);if(Ip(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function of(t){var e=new MutationObserver(()=>{yd(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Ao(()=>{e.disconnect()})}function th(t){return"__value"in t?t.__value:t.value}var Cl=Symbol("class"),Tl=Symbol("style"),nh=Symbol("is custom element"),rh=Symbol("is html");function sh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Me(t,e,i,o){var r=lh(t);if(Ze&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||B$(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[Yv]=i),i==null?t.removeAttribute(e):typeof i!="string"&&dh(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function ah(t,e,i,o,r=!1){var k;var a=lh(t),l=a[nh],d=!a[rh];let s=Ze&&l;s&&vo(!1);var u=e||{},m=t.tagName==="OPTION";for(var f in e)f in i||(i[f]=null);i.class?i.class=$d(i.class):(o||i[Cl])&&(i.class=null),i[Tl]&&((k=i.style)!=null||(i.style=null));var p=dh(t);for(let E in i){let A=i[E];if(m&&E==="value"&&A==null){t.value=t.__value="",u[E]=A;continue}if(E==="class"){var $=t.namespaceURI==="http://www.w3.org/1999/xhtml";se(t,$,A,o,e==null?void 0:e[Cl],i[Cl]),u[E]=A,u[Cl]=i[Cl];continue}if(E==="style"){qe(t,A,e==null?void 0:e[Tl],i[Tl]),u[E]=A,u[Tl]=i[Tl];continue}var y=u[E];if(!(A===y&&!(A===void 0&&t.hasAttribute(E)))){u[E]=A;var _=E[0]+E[1];if(_!=="$$")if(_==="on"){let W={},H="$$"+E,z=E.slice(2);var S=Dg(z);if(Og(z)&&(z=z.slice(0,-7),W.capture=!0),!S&&y){if(A!=null)continue;t.removeEventListener(z,u[H],W),u[H]=null}if(A!=null)if(S)t[`__${z}`]=A,et([z]);else{let Y=function(ae){u[E].call(this,ae)};var N=Y;u[H]=qp(z,t,Y,W)}else S&&(t[`__${z}`]=void 0)}else if(E==="style")Me(t,E,A);else if(E==="autofocus")Wp(t,!!A);else if(!l&&(E==="__value"||E==="value"&&A!=null))t.value=t.__value=A;else if(E==="selected"&&m)sh(t,A);else{var I=E;d||(I=Bg(I));var T=I==="defaultValue"||I==="defaultChecked";if(A==null&&!l&&!T)if(a[E]=null,I==="value"||I==="checked"){let W=t,H=e===void 0;if(I==="value"){let z=W.defaultValue;W.removeAttribute(I),W.defaultValue=z,W.value=W.__value=H?z:null}else{let z=W.defaultChecked;W.removeAttribute(I),W.defaultChecked=z,W.checked=H?z:!1}}else t.removeAttribute(E);else T||p.includes(I)&&(l||typeof A!="string")?t[I]=A:typeof A!="function"&&Me(t,I,A,r)}}}return s&&vo(!0),u}function Ji(t,e,i=[],o,r=!1,a=zr){let l=i.map(a);var d=void 0,s={},u=t.nodeName==="SELECT",m=!1;if(Ki(()=>{var p=e(...l.map(n)),$=ah(t,d,p,o,r);m&&u&&"value"in p&&yd(t,p.value,!1);for(let _ of Object.getOwnPropertySymbols(s))p[_]||zi(s[_]);for(let _ of Object.getOwnPropertySymbols(p)){var y=p[_];_.description===bp&&(!d||y!==d[_])&&(s[_]&&zi(s[_]),s[_]=Vi(()=>Ts(t,()=>y))),$[_]=y}d=$}),u){var f=t;Lo(()=>{yd(f,d.value),of(f)})}m=!0}function lh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[nh]:t.nodeName.includes("-"),[rh]:t.namespaceURI===Uv}}var ih=new Map;function dh(t){var e=ih.get(t.nodeName);if(e)return e;ih.set(t.nodeName,e=[]);for(var i,o=t,r=Element.prototype;r!==o;){i=Bc(o);for(var a in i)i[a].set&&e.push(a);o=ma(o)}return e}function B$(t,e,i){var o;Ie&&(e==="srcset"&&F$(t,i)||nf((o=t.getAttribute(e))!=null?o:"",i)||mg(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function nf(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function oh(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function F$(t,e){var i=oh(t.srcset),o=oh(e);return o.length===i.length&&o.every(([r,a],l)=>a===i[l][1]&&(nf(i[l][0],r)||nf(r,i[l][0])))}var H$=Dc?()=>performance.now():()=>Date.now(),Qr={tick:t=>(Dc?requestAnimationFrame:ft)(t),now:()=>H$(),tasks:new Set};function ch(){let t=Qr.now();Qr.tasks.forEach(e=>{e.c(t)||(Qr.tasks.delete(e),e.f())}),Qr.tasks.size!==0&&Qr.tick(ch)}function uh(t){let e;return Qr.tasks.size===0&&Qr.tick(ch),{promise:new Promise(i=>{Qr.tasks.add(e={c:t,f:i})}),abort(){Qr.tasks.delete(e)}}}function lu(t,e){gd(()=>{t.dispatchEvent(new CustomEvent(e))})}function K$(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 ph(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=K$(r.trim());e[l]=a.trim()}return e}var q$=t=>t;function Gr(t,e,i,o){var N;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,f=e.style.overflow,p,$;function y(){var A;var k=Rt,E=gt;Ui(null),mo(null);try{return u!=null?u:u=i()(e,(A=o==null?void 0:o())!=null?A:{},{direction:s})}finally{Ui(k),mo(E)}}var _={is_global:d,in(){var k;if(e.inert=m,!r){$==null||$.abort(),(k=$==null?void 0:$.reset)==null||k.call($);return}a||p==null||p.abort(),lu(e,"introstart"),p=rf(e,y(),$,1,()=>{lu(e,"introend"),p==null||p.abort(),p=u=void 0,e.style.overflow=f})},out(k){if(!a){k==null||k(),u=void 0;return}e.inert=!0,lu(e,"outrostart"),$=rf(e,y(),p,0,()=>{lu(e,"outroend"),k==null||k()})},stop:()=>{p==null||p.abort(),$==null||$.abort()}},S=gt;if(((N=S.transitions)!=null?N:S.transitions=[]).push(_),r&&hd){var I=d;if(!I){for(var T=S.parent;T&&(T.f&65536)!==0;)for(;(T=T.parent)&&(T.f&16)===0;);I=!T||(T.f&32768)!==0}I&&Lo(()=>{Ct(()=>_.in())})}}function rf(t,e,i,o,r){var a=o===1;if(Ws(e)){var l,d=!1;return Sn(()=>{if(!d){var S=e({direction:a?"in":"out"});l=rf(t,S,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:ft,deactivate:ft,reset:ft,t:()=>o};let{delay:s=0,css:u,tick:m,easing:f=q$}=e;var p=[];if(a&&i===void 0&&(m&&m(0,1),u)){var $=ph(u(0,1));p.push($,$)}var y=()=>1-o,_=t.animate(p,{duration:s,fill:"forwards"});return _.onfinish=()=>{var z;_.cancel();var S=(z=i==null?void 0:i.t())!=null?z:1-o;i==null||i.abort();var I=o-S,T=e.duration*Math.abs(I),N=[];if(T>0){var k=!1;if(u)for(var E=Math.ceil(T/16.666666666666668),A=0;A<=E;A+=1){var W=S+I*f(A/E),H=ph(u(W,1-W));N.push(H),k||(k=H.overflow==="hidden")}k&&(t.style.overflow="hidden"),y=()=>{var Y=_.currentTime;return S+I*f(Y/T)},m&&uh(()=>{if(_.playState!=="running")return!1;var Y=y();return m(Y,1-Y),!0})}_=t.animate(N,{duration:T,fill:"forwards"}),_.onfinish=()=>{y=()=>o,m==null||m(o,1-o),r()}},{abort:()=>{_&&(_.cancel(),_.effect=null,_.onfinish=ft)},deactivate:()=>{r=ft},reset:()=>{o===0&&(m==null||m(1,0))},t:()=>y()}}function sf(t,e,i){var o=Wo(t,e);o&&o.set&&(t[e]=i,Ao(()=>{t[e]=null}))}var Ys,Il,xd,cu,fh,uu=class uu{constructor(e){Hs(this,cu);Hs(this,Ys,new WeakMap);Hs(this,Il);Hs(this,xd);sl(this,xd,e)}observe(e,i){var o=Mi(this,Ys).get(e)||new Set;return o.add(i),Mi(this,Ys).set(e,o),Fv(this,cu,fh).call(this).observe(e,Mi(this,xd)),()=>{var r=Mi(this,Ys).get(e);r.delete(i),r.size===0&&(Mi(this,Ys).delete(e),Mi(this,Il).unobserve(e))}}};Ys=new WeakMap,Il=new WeakMap,xd=new WeakMap,cu=new WeakSet,fh=function(){var e;return(e=Mi(this,Il))!=null?e:sl(this,Il,new ResizeObserver(i=>{for(var o of i){uu.entries.set(o.target,o);for(var r of Mi(this,Ys).get(o.target)||[])r(o)}}))},lr(uu,"entries",new WeakMap);var af=uu;var Q$=new af({box:"border-box"});function Tn(t,e,i){var o=Q$.observe(t,()=>i(t[e]));Lo(()=>(Ct(()=>i(t[e])),o))}function mh(t,e){return t===e||(t==null?void 0:t[Ko])===e}function Ye(t={},e,i,o){return Lo(()=>{var r,a;return Yo(()=>{r=a,a=(o==null?void 0:o())||[],Ct(()=>{t!==i(...a)&&(e(t,...a),r&&mh(i(...r),t)&&e(null,...r))})}),()=>{Sn(()=>{a&&mh(i(...a),t)&&e(null,...a)})}}),t}function bo(t=!1){let e=Ut,i=e.l.u;if(!i)return;let o=()=>nu(e.s);if(t){let r=0,a={},l=zr(()=>{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(()=>{vh(e,o),Ks(i.b)}),Ne(()=>{let r=Ct(()=>i.m.map(Gv));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&Ne(()=>{vh(e,o),Ks(i.a)})}function vh(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),ft;let o=Ct(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var El=[];function Er(t,e){return{subscribe:le(t,e).subscribe}}function le(t,e=ft){let i=null,o=new Set;function r(d){if(dl(t,d)&&(t=d,i)){let s=!El.length;for(let u of o)u[1](),El.push(u,t);if(s){for(let u=0;u<El.length;u+=2)El[u][0](El[u+1]);El.length=0}}}function a(d){r(d(t))}function l(d,s=ft){let u=[d,s];return o.add(u),o.size===1&&(i=e(r,a)||ft),d(t),()=>{o.delete(u),o.size===0&&i&&(i(),i=null)}}return{set:r,update:a,subscribe:l}}function pi(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 Er(i,(l,d)=>{let s=!1,u=[],m=0,f=ft,p=()=>{if(m)return;f();let y=e(o?u[0]:u,l,d);a?l(y):f=typeof y=="function"?y:ft},$=r.map((y,_)=>wd(y,S=>{u[_]=S,m&=~(1<<_),s&&p()},()=>{m|=1<<_}));return s=!0,p(),function(){Ks($),f(),s=!1}})}function ge(t){let e;return wd(t,i=>e=i)(),e}var pu=!1,lf=Symbol();function x(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:ds(void 0),unsubscribe:ft};if(o.store!==t&&!(lf in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=ft;else{var r=!0;o.unsubscribe=wd(t,l=>{r?o.source.v=l:O(o.source,l)}),r=!1}return t&&lf in i?ge(t):n(o.source)}function Ve(){let t={};function e(){Ao(()=>{for(var i in t)t[i].unsubscribe();fo(t,lf,{enumerable:!1,value:!0})})}return[t,e]}function df(t){var e=pu;try{return pu=!1,[t(),pu]}finally{pu=e}}var e1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Ie&&rg(`${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 In(t,e,i){return new Proxy(Ie?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},e1)}var t1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(Ws(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];Ws(r)&&(r=r());let a=Wo(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(Ws(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let r=Wo(o,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===Ko||e===al)return!1;for(let i of t.props)if(Ws(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(Ws(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 Yr(...t){return new Proxy({props:t},t1)}function gh(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,H;var r=(i&1)!==0,a=!ss||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,s=!1,u;l?[u,s]=df(()=>t[e]):u=t[e];var m=Ko in t||al in t,f=l&&((H=(W=Wo(t,e))==null?void 0:W.set)!=null?H:m&&e in t&&(z=>t[e]=z))||void 0,p=o,$=!0,y=!1,_=()=>(y=!0,$&&($=!1,d?p=Ct(o):p=o),p);u===void 0&&o!==void 0&&(f&&a&&ng(e),u=_(),f&&f(u));var S;if(a)S=()=>{var z=t[e];return z===void 0?_():($=!0,y=!1,z)};else{var I=(r?zr:yn)(()=>t[e]);I.f|=131072,S=()=>{var z=n(I);return z!==void 0&&(p=void 0),z===void 0?p:z}}if((i&4)===0&&a)return S;if(f){var T=t.$$legacy;return function(z,Y){return arguments.length>0?((!a||!Y||T||s)&&f(Y?S():z),z):S()}}var N=!1,k=!1,E=ds(u),A=zr(()=>{var z=S(),Y=n(E);return N?(N=!1,k=!0,Y):(k=!1,E.v=z)});return l&&n(A),r||(A.equals=cl),function(z,Y){if(iu!==null&&(N=k,S(),n(E)),arguments.length>0){let ae=Y?n(A):a&&l?ai(z):z;if(!A.equals(ae)){if(N=!0,O(E,ae),y&&p!==void 0&&(p=ae),gh(A))return z;Ct(()=>n(A))}return z}return gh(A)?A.v:n(A)}}var i1;typeof HTMLElement=="function"&&(i1=class extends HTMLElement{constructor(e,i,o){super();lr(this,"$$ctor");lr(this,"$$s");lr(this,"$$c");lr(this,"$$cn",!1);lr(this,"$$d",{});lr(this,"$$r",!1);lr(this,"$$p_d",{});lr(this,"$$l",{});lr(this,"$$l_u",new Map);lr(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))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(a){return l=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),b(l,d)}};var e=i;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let o={},r=o1(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]=cf(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=Gg({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:o,$$host:this}}),this.$$me=Zc(()=>{Yo(()=>{var a;this.$$r=!0;for(let l of $p(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=cf(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]=cf(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 $p(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function cf(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 o1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var hh="5";var _h,bh,$h;typeof window!="undefined"&&(($h=(bh=(_h=window.__svelte)!=null?_h:window.__svelte={}).v)!=null?$h:bh.v=new Set).add(hh);import{areValidLiveRecordSources as yT,clientChecker as yv}from"@vkontakte/videoplayer-core/es2018";import"@vkontakte/videoplayer-core/es2018";import{noop as Eb,safeStorage as xT,throttleFn as wT}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as ST}from"@vkontakte/videoplayer-statistics/es2018";import{InterfaceLanguage as n1,fillWithDefault as r1,VideoQuality as yh}from"@vkontakte/videoplayer-shared/es2018";var s1={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:n1.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:yh.Q_480P,highQualityLimit:yh.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,returnFocusOnControlsHide:!1,sentry:{dsn:"https://e349fd23c68f405388980d0868d0ff27@sentry.mvk.com/126",sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},features:{autoplay:!0,statistics:!0,thinStatistics:!1,sentry:!0,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,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},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},xh=t=>r1(t,s1),wh=t=>fl("ui-config",t),Lt=()=>pl("ui-config");var Sd="vk_player_debug_panel_opened";var Sh="videoplayer",Ch="videoplayer";var us={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Th=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Ih=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Eh=new Set(["ShiftRight","ShiftLeft"]);var kh=["TIMELINE"],Cd=[...kh,"GRAPH_BUTTON"],uf=[...kh,"PLAY_BUTTON"],Td=[...Cd,"PLAY_BUTTON"];var ps=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(ps||{}),Id={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Ph,VERSION as a1}from"@vkontakte/videoplayer-shared/es2018";import{VERSION as l1}from"@vkontakte/videoplayer-core/es2018";import{VERSION as d1}from"@vkontakte/videoplayer-statistics/es2018";var fu="prod",kl="1.1.79-dev.f4244a7e.0";var Ea=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Ah=Symbol("storeContext"),Lh=Symbol("microStoresContext"),Mh=(t,e)=>{fl(Ah,t),fl(Lh,e),fu==="dev"&&(window.app={store:t,microStores:e})},ve=()=>{let t=pl(Ah);return Ph(t,"Store context is empty!"),t},$o=()=>{let t=pl(Lh);return Ph(t,"MicroStores context is empty!"),t},oi=(t,e)=>vu(t,t.getValue(),e),vu=(t,e,i)=>Er(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),Vh=(t,e,i,o)=>{var W,H,z,Y,ae,j,ne,Z,we;let r=t.info,{width:a,height:l}=ge(i.ui.playerSize),d=(H=(W=r.throughputEstimation$.getValue())==null?void 0:W.toFixed(0))!=null?H:0,s=(Y=(z=r.rttEstimation$.getValue())==null?void 0:z.toFixed(0))!=null?Y:0,u=r.isAutoQualityEnabled$.getValue()?"auto":"manual",m=`${kl} (core: ${l1}, stat: ${d1}, shared: ${a1})`,f=ge(i.state.errorLog$),p=f.length?`
|
|
45
|
-
`+
|
|
43
|
+
`)})}}var Ca=!1,bl=null,Ia=!1,xs=!1;function Rp(t){xs=t}var md=[],vd=[],Rt=null,fr=!1;function Fi(t){Rt=t}var ht=null;function vo(t){ht=t}var Go=null;function Qc(t){Rt!==null&&Rt.f&2097152&&(Go===null?Go=[Rt,[t]]:Go[1].push(t))}var xn=null,mr=0,pr=null;function vg(t){pr=t}var Vg=1,iu=0,ws=!1,ou=null;function od(){return++Vg}function xa(t){var p,f;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&&ht!==null&&!ws,s=i.length;if(l||d){var u=t,v=u.parent;for(r=0;r<s;r++)a=i[r],(l||!((p=a==null?void 0:a.reactions)!=null&&p.includes(u)))&&((f=a.reactions)!=null?f:a.reactions=[]).push(u);l&&(u.f^=512),d&&v!==null&&(v.f&256)===0&&(u.f^=256)}for(r=0;r<s;r++)if(a=i[r],xa(a)&&Vp(a),a.wv>t.wv)return!0}(!o||ht!==null&&!ws)&&bn(t,1024)}return!1}function Rg(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];Go!=null&&Go[1].includes(t)&&Go[0]===Rt||((a.f&2)!==0?Rg(a,e,!1):e===a&&(i?bn(a,2048):(a.f&1024)!==0&&bn(a,4096),rd(a)))}}function qc(t){var $,y;var e=xn,i=mr,o=pr,r=Rt,a=ws,l=Go,d=zt,s=fr,u=t.f;xn=null,mr=0,pr=null,ws=(u&256)!==0&&(fr||!Ia||Rt===null),Rt=(u&96)===0?t:null,Go=null,ed(t.ctx),fr=!1,iu++,t.f|=2097152;try{var v=(0,t.fn)(),p=t.deps;if(xn!==null){var f;if(ud(t,mr),p!==null&&mr>0)for(p.length=mr+xn.length,f=0;f<xn.length;f++)p[mr+f]=xn[f];else t.deps=p=xn;if(!ws||(u&2)!==0&&t.reactions!==null)for(f=mr;f<p.length;f++)((y=($=p[f]).reactions)!=null?y:$.reactions=[]).push(t)}else p!==null&&mr<p.length&&(ud(t,mr),p.length=mr);if(rs()&&pr!==null&&!fr&&p!==null&&(t.f&6146)===0)for(f=0;f<pr.length;f++)Rg(pr[f],t);return r!==null&&r!==t&&(iu++,pr!==null&&(o===null?o=pr:o.push(...pr))),v}catch(g){Ag(g)}finally{xn=e,mr=i,pr=o,Rt=r,ws=a,Go=l,ed(d),fr=s,t.f^=2097152}}function r$(t,e){let i=e.reactions;if(i!==null){var o=Gv.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&&(xn===null||!xn.includes(e))&&(bn(e,4096),(e.f&768)===0&&(e.f^=512),Kc(e),ud(e,0))}function ud(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)r$(t,i[o])}function gl(t){var e=t.f;if((e&16384)===0){bn(t,1024);var i=ht,o=Ia;if(ht=t,Ia=!0,Ie){var r=cr;td(t.component_function)}try{(e&16)!==0?Cg(t):Bp(t),Dp(t);var a=qc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Vg,Ie&&ns&&(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);Ie&&vd.push(t)}finally{Ia=o,ht=i,Ie&&td(r)}}}function Lg(){console.error("Last ten effects were: ",vd.slice(-10).map(t=>t.fn)),vd=[]}function s$(){try{og()}catch(t){if(Ie&&mo(t,"stack",{value:""}),bl!==null)if(Ie)try{fd(t,bl)}catch(e){throw Lg(),e}else fd(t,bl);else throw Ie&&Lg(),t}}function Kp(){var t=Ia;try{var e=0;for(Ia=!0;md.length>0;){e++>1e3&&s$();var i=md,o=i.length;md=[];for(var r=0;r<o;r++){var a=l$(i[r]);a$(a)}ml.clear()}}finally{Ca=!1,Ia=t,bl=null,Ie&&(vd=[])}}function a$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&xa(o)&&(gl(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?Hp(o):o.fn=null))}}function rd(t){Ca||(Ca=!0,queueMicrotask(Kp));for(var e=bl=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 l$(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:xa(i)&&gl(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 $l(t){var e;for(t&&(Ca=!0,Kp(),Ca=!0,e=t());;){if(kg(),md.length===0)return Ca=!1,bl=null,Ie&&(vd=[]),e;Ca=!0,Kp()}}async function ho(){await Promise.resolve(),$l()}function n(t){var e=t.f,i=(e&2)!==0;if(ou!==null&&ou.add(t),Rt!==null&&!fr){if(!(Go!=null&&Go[1].includes(t))||Go[0]!==Rt){var o=Rt.deps;t.rv<iu&&(t.rv=iu,xn===null&&o!==null&&o[mr]===t?mr++:xn===null?xn=[t]:(!ws||!xn.includes(t))&&xn.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,xa(r)&&Vp(r)),Ie&&ns&&!fr&&Jl!==null&&Rt!==null&&Jl.reaction===Rt)if(t.trace)t.trace();else{var l=ys("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 xs&&ml.has(t)?ml.get(t):t.v}function Tt(t){var e=fr;try{return fr=!0,t()}finally{fr=e}}var d$=-7169;function bn(t,e){t.f=t.f&d$|e}function ru(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(qo in t)nu(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&qo in i&&nu(i)}}}function nu(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{nu(t[o],e)}catch(r){}let i=_a(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 qp(t,e){if(e){let i=document.body;t.autofocus=!0,yn(()=>{document.activeElement===i&&t.focus()})}}function gd(t){var e=Rt,i=ht;Fi(null),vo(null);try{return t()}finally{Fi(e),vo(i)}}var Qp=new Set,su=new Set;function Ea(t){if(!Je)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 Gp(t,e,i,o={}){function r(a){if(o.capture||yl.call(e,a),!a.cancelBubble)return gd(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?yn(()=>{e.addEventListener(t,r,o)}):e.addEventListener(t,r,o),r}function rt(t,e,i,o,r){var a={capture:o,passive:r},l=Gp(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Ao(()=>{e.removeEventListener(t,l,a)})}function Xe(t){for(var e=0;e<t.length;e++)Qp.add(t[e]);for(var i of su)i(t)}function yl(t){var I;var e=this,i=e.ownerDocument,o=t.type,r=((I=t.composedPath)==null?void 0:I.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){mo(t,"currentTarget",{configurable:!0,get(){return a||i}});var v=Rt,p=ht;Fi(null),vo(null);try{for(var f,$=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var g=a["__"+o];if(g!=null&&(!a.disabled||t.target===a))if(lr(g)){var[w,...C]=g;w.apply(a,[t,...C])}else g.call(a,t)}catch(N){f?$.push(N):f=N}if(t.cancelBubble||y===e||y===null)break;a=y}if(f){for(let N of $)queueMicrotask(()=>{throw N});throw f}}finally{t.__root=e,delete t.currentTarget,Fi(v),vo(p)}}}var u$;function Ng(){u$=void 0}function xl(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Mo(t,e){var i=ht;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function M(t,e){var i=(e&1)!==0,o=(e&2)!==0,r,a=!t.startsWith("<!>");return()=>{if(Je)return Mo(_t,null),_t;r===void 0&&(r=xl(a?t:"<!>"+t),i||(r=Si(r)));var l=o||sd?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=Si(l),s=l.lastChild;Mo(d,s)}else Mo(l,l);return l}}function m$(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(Je)return Mo(_t,null),_t;if(!l){var d=xl(a),s=Si(d);if(r)for(l=document.createDocumentFragment();Si(s);)l.appendChild(Si(s));else l=Si(s)}var u=l.cloneNode(!0);if(r){var v=Si(u),p=u.lastChild;Mo(v,p)}else Mo(u,u);return u}}function Ce(t,e){return m$(t,e,"svg")}function as(t=""){if(!Je){var e=$n(t+"");return Mo(e,e),e}var i=_t;return i.nodeType!==al&&(i.before(i=$n()),xi(i)),Mo(i,i),i}function Ae(){if(Je)return Mo(_t,null),_t;var t=document.createDocumentFragment(),e=document.createComment(""),i=$n();return t.append(e,i),Mo(e,i),t}function b(t,e){if(Je){ht.nodes_end=_t,Ui();return}t!==null&&t.before(e)}var v$=/\r/g;function Dg(t){t=t.replace(v$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function Bg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var g$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Fg(t){return g$.includes(t)}var h$=["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 _$={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 Hg(t){var e;return t=t.toLowerCase(),(e=_$[t])!=null?e:t}var dP=[...h$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var b$=["touchstart","touchmove"];function Ug(t){return b$.includes(t)}var $$=["$state","$state.raw","$derived","$derived.by"],cP=[...$$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var y$=["textarea","script","style","title"];function zg(t){return y$.includes(t)}function au(t){return t==null?void 0:t.replace(/\//g,"/")}var hd=!0;function lu(t){hd=t}function me(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 Gr(t,e){return Wg(t,e)}function jp(t,e){var l;jc(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=Je,r=_t;try{for(var a=Si(i);a&&(a.nodeType!==dr||a.data!==Gs);)a=Yo(a);if(!a)throw is;go(!0),xi(a),Ui();let d=Wg(t,{...e,anchor:a});if(_t===null||_t.nodeType!==dr||_t.data!==ha)throw Zs(),is;return go(!1),d}catch(d){if(d===is)return e.recover===!1&&ng(),jc(),ad(i),go(!1),Gr(t,e);throw d}finally{go(o),xi(r),Ng()}}var wl=new Map;function Wg(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){jc();var d=new Set,s=p=>{for(var f=0;f<p.length;f++){var $=p[f];if(!d.has($)){d.add($);var y=Ug($);e.addEventListener($,yl,{passive:y});var g=wl.get($);g===void 0?(document.addEventListener($,yl,{passive:y}),wl.set($,1)):wl.set($,g+1)}}};s(Zl(Qp)),su.add(s);var u=void 0,v=Tg(()=>{var p=i!=null?i:e.appendChild($n());return Li(()=>{if(a){B({});var f=zt;f.c=a}r&&(o.$$events=r),Je&&Mo(p,null),hd=l,u=t(p,o)||{},hd=!0,Je&&(ht.nodes_end=_t),a&&F()}),()=>{var y;for(var f of d){e.removeEventListener(f,yl);var $=wl.get(f);--$===0?(document.removeEventListener(f,yl),wl.delete(f)):wl.set(f,$)}su.delete(s),p!==i&&((y=p.parentNode)==null||y.removeChild(p))}});return Yp.set(u,v),u}var Yp=new WeakMap;function ka(t,e){let i=Yp.get(t);return i?(Yp.delete(t),i(e)):(Ie&&_g(),Promise.resolve())}function ii(t,e,...i){var o=t,r=mt,a;zi(()=>{r!==(r=e())&&(a&&(Hi(a),a=null),Ie&&r==null&&rg(),a=Li(()=>r(o,...i)))},65536),Je&&(o=_t)}if(Ie){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;lg(e)},set:o=>{i=o}})}};T$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var T$;function At(t){zt===null&&cl("onMount"),os&&zt.l!==null?S$(zt).m.push(t):Ne(()=>{let e=Tt(t);if(typeof e=="function")return e})}function an(t){zt===null&&cl("onDestroy"),At(()=>()=>Tt(t))}function S$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var Kg=new Map;function qg(t,e){var i=Kg.get(t);i||(i=new Set,Kg.set(t,i)),i.add(e)}function R(t,e,[i,o]=[0,0]){Je&&i===0&&Ui();var r=t,a=null,l=null,d=Ji,s=i>0?65536:0,u=!1;let v=(f,$=!0)=>{u=!0,p($,f)},p=(f,$)=>{if(d===(d=f))return;let y=!1;if(Je&&o!==-1){if(i===0){let w=Yc(r);w===Gs?o=0:w===Ys?o=1/0:(o=parseInt(w.substring(1)),o!==o&&(o=d?1/0:-1))}let g=o>i;!!d===g&&(r=wa(),xi(r),go(!1),y=!0,o=-1)}d?(a?Ts(a):$&&(a=Li(()=>$(r))),l&&Wn(l,()=>{l=null})):(l?Ts(l):$&&(l=Li(()=>$(r,[i+1,o]))),a&&Wn(a,()=>{a=null})),y&&go(!0)};zi(()=>{u=!1,e(v),u||p(null,null)},s),Je&&(r=_t)}function Cs(t,e,i){Je&&Ui();var o=t,r=Ji,a,l=rs()?Zv:ll;zi(()=>{l(r,r=e())&&(a&&Wn(a),a=Li(()=>i(o)))}),Je&&(o=_t)}var ea=null;function Jp(t){ea=t}function _d(t,e){return e}function E$(t,e,i,o){for(var r=[],a=e.length,l=0;l<a;l++)eu(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(),Js(t,e[0].prev,e[a-1].next)}Up(r,()=>{for(var u=0;u<a;u++){var v=e[u];d||(o.delete(v.k),Js(t,v.prev,v.next)),Hi(v.e,!d)}})}function gi(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=Je?xi(Si(u)):u.appendChild($n())}Je&&Ui();var v=null,p=!1,f=_n(()=>{var $=i();return lr($)?$:$==null?[]:Zl($)});zi(()=>{var $=n(f),y=$.length;if(p&&y===0)return;p=y===0;let g=!1;if(Je){var w=Yc(l)===Ys;w!==(y===0)&&(l=wa(),xi(l),go(!1),g=!0)}if(Je){for(var C=null,I,N=0;N<y;N++){if(_t.nodeType===dr&&_t.data===ha){l=_t,g=!0,go(!1);break}var k=$[N],E=o(k,N);I=Yg(_t,d,C,null,k,E,N,r,e,i),d.items.set(E,I),C=I}y>0&&xi(wa())}Je||k$($,d,l,r,e,o,i),a!==null&&(y===0?v?Ts(v):v=Li(()=>a(l)):v!==null&&Wn(v,()=>{v=null})),g&&go(!0),n(f)}),Je&&(l=_t)}function k$(t,e,i,o,r,a,l){var Z,we,ue,ne;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,v=e.items,p=e.first,f=p,$,y=null,g,w=[],C=[],I,N,k,E;if(d)for(E=0;E<u;E+=1)I=t[E],N=a(I,E),k=v.get(N),k!==void 0&&((Z=k.a)==null||Z.measure(),(g!=null?g:g=new Set).add(k));for(E=0;E<u;E+=1){if(I=t[E],N=a(I,E),k=v.get(N),k===void 0){var A=f?f.e.nodes_start:i;y=Yg(A,e,y,y===null?e.first:y.next,I,N,E,o,r,l),v.set(N,y),w=[],C=[],f=y.next;continue}if(s&&P$(k,I,E,r),(k.e.f&8192)!==0&&(Ts(k.e),d&&((we=k.a)==null||we.unfix(),(g!=null?g:g=new Set).delete(k))),k!==f){if($!==void 0&&$.has(k)){if(w.length<C.length){var Q=C[0],H;y=Q.prev;var z=w[0],Y=w[w.length-1];for(H=0;H<w.length;H+=1)Qg(w[H],Q,i);for(H=0;H<C.length;H+=1)$.delete(C[H]);Js(e,z.prev,Y.next),Js(e,y,z),Js(e,Y,Q),f=Q,y=Y,E-=1,w=[],C=[]}else $.delete(k),Qg(k,f,i),Js(e,k.prev,k.next),Js(e,k,y===null?e.first:y.next),Js(e,y,k),y=k;continue}for(w=[],C=[];f!==null&&f.k!==N;)(f.e.f&8192)===0&&($!=null?$:$=new Set).add(f),C.push(f),f=f.next;if(f===null)continue;k=f}w.push(k),y=k,f=k.next}if(f!==null||$!==void 0){for(var le=$===void 0?[]:Zl($);f!==null;)(f.e.f&8192)===0&&le.push(f),f=f.next;var X=le.length;if(X>0){var re=(r&4)!==0&&u===0?i:null;if(d){for(E=0;E<X;E+=1)(ue=le[E].a)==null||ue.measure();for(E=0;E<X;E+=1)(ne=le[E].a)==null||ne.fix()}E$(e,le,re,v)}}d&&yn(()=>{var _e;if(g!==void 0)for(k of g)(_e=k.a)==null||_e.apply()}),ht.first=e.first&&e.first.e,ht.last=y&&y.e}function P$(t,e,i,o){(o&1)!==0&&vl(t.v,e),(o&2)!==0?vl(t.i,i):t.i=i}function Yg(t,e,i,o,r,a,l,d,s,u){var v=ea,p=(s&1)!==0,f=(s&16)===0,$=p?f?ss(r,!1,!1):Pr(r):r,y=(s&2)===0?l:Pr(l);Ie&&p&&($.trace=()=>{var w=typeof y=="number"?l:y.v;u()[w]});var g={i:y,v:$,k:a,a:null,e:null,prev:i,next:o};ea=g;try{return g.e=Li(()=>d(t,$,y,u),Je),g.e.prev=i&&i.e,g.e.next=o&&o.e,i===null?e.first=g:(i.next=g,i.e.next=g.e),o!==null&&(o.prev=g,o.e.prev=g.e),g}finally{ea=v}}function Qg(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=Yo(a);r.before(a),a=l}}function Js(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 A$(t,e,i){var a,l;if(!e||e===Dg(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=cr)!=null&&l[Fn]&&(o=`in ${cr[Fn]}`),hg(au(o))}function bd(t,e,i=!1,o=!1,r=!1){var a=t,l="";D(()=>{var $;var d=ht;if(l===(l=($=e())!=null?$:"")){Je&&Ui();return}if(d.nodes_start!==null&&(Fp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(Je){for(var s=_t.data,u=Ui(),v=u;u!==null&&(u.nodeType!==dr||u.data!=="");)v=u,u=Yo(u);if(u===null)throw Zs(),is;Ie&&!r&&A$(u.parentNode,s,l),Mo(_t,v),a=xi(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var f=xl(p);if((i||o)&&(f=Si(f)),Mo(Si(f),f.lastChild),i||o)for(;Si(f);)a.before(Si(f));else a.before(f)}})}function Mi(t,e,i){Je&&Ui();var o=t,r,a;zi(()=>{r!==(r=e())&&(a&&(Wn(a),a=null),r&&(a=Li(()=>i(o,r))))},65536),Je&&(o=_t)}function Pa(t,e,i,o,r,a){var y;let l=Je;Je&&Ui();var d=Ie&&a&&((y=zt)==null?void 0:y.function[Fn]),s,u,v=null;Je&&_t.nodeType===Uc&&(v=_t,Ui());var p=Je?_t:t,f,$=ea;zi(()=>{let g=e()||null;var w=r?r():i||g==="svg"?Dc:null;if(g!==s){var C=ea;Jp($),f&&(g===null?Wn(f,()=>{f=null,u=null}):g===u?Ts(f):(Hi(f),lu(!1))),g&&g!==u&&(f=Li(()=>{if(v=Je?v:w?document.createElementNS(w,g):document.createElement(g),Ie&&a&&(v.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),Mo(v,v),o){Je&&zg(g)&&v.append(document.createComment(""));var I=Je?Si(v):v.appendChild($n());Je&&(I===null?go(!1):xi(I)),o(v,I)}ht.nodes_end=v,p.before(v)})),s=g,s&&(u=s),lu(!0),Jp(C)}},65536),l&&(go(!0),xi(p))}var tf;function jg(t){return tf=t.target,new ef(t)}var Is,Ar,ef=class{constructor(e){Qs(this,Is);Qs(this,Ar);var a,l;var i=new Map,o=(d,s)=>{var u=ss(s,!1,!1);return i.set(d,u),u};let r=new Proxy({...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===sl?!0:(n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s))),Reflect.has(d,s))},set(d,s,u){var v;return O((v=i.get(s))!=null?v:o(s,u),u),Reflect.set(d,s,u)}});rl(this,Ar,(e.hydrate?jp:Gr)(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)&&$l(),rl(this,Is,r.$$events);for(let d of Object.keys(Ai(this,Ar)))d==="$set"||d==="$destroy"||d==="$on"||mo(this,d,{get(){return Ai(this,Ar)[d]},set(s){Ai(this,Ar)[d]=s},enumerable:!0});Ai(this,Ar).$set=d=>{Object.assign(r,d)},Ai(this,Ar).$destroy=()=>{ka(Ai(this,Ar))}}$set(e){Ai(this,Ar).$set(e)}$on(e,i){Ai(this,Is)[e]=Ai(this,Is)[e]||[];let o=(...r)=>i.call(this,...r);return Ai(this,Is)[e].push(o),()=>{Ai(this,Is)[e]=Ai(this,Is)[e].filter(r=>r!==o)}}$destroy(){Ai(this,Ar).$destroy()}};Is=new WeakMap,Ar=new WeakMap;function q(t,e){yn(()=>{var r,a,l;var i=t.getRootNode(),o=i.host?i:(l=(r=i.head)!=null?r:i.ownerDocument.head)!=null?l:(a=tf)==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),Ie&&qg(e.hash,d)}})}function Es(t,e){var i=void 0,o;zi(()=>{i!==(i=e())&&(o&&(Hi(o),o=null),i&&(o=Li(()=>{Lo(()=>i(t))})))})}function Xg(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=Xg(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function Zg(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=Xg(t))&&(o&&(o+=" "),o+=e);return o}function $d(t){return typeof t=="object"?Zg(t):t!=null?t:""}var Jg=[...`
|
|
44
|
+
\r\f \v\uFEFF`];function th(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||Jg.includes(o[l-1]))&&(d===o.length||Jg.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function eh(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 of(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function ih(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(of)),r&&s.push(...Object.keys(r).map(of));var u=0,v=-1;let g=t.length;for(var p=0;p<g;p++){var f=t[p];if(d?f==="/"&&t[p-1]==="*"&&(d=!1):a?a===f&&(a=!1):f==="/"&&t[p+1]==="*"?d=!0:f==='"'||f==="'"?a=f:f==="("?l++:f===")"&&l--,!d&&a===!1&&l===0){if(f===":"&&v===-1)v=p;else if(f===";"||p===g-1){if(v!==-1){var $=of(t.substring(u,v).trim());if(!s.includes($)){f!==";"&&p++;var y=t.substring(u,p).trim();i+=" "+y+";"}}u=p+1,v=-1}}}}return o&&(i+=eh(o)),r&&(i+=eh(r,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function se(t,e,i,o,r,a){var l=t.__className;if(Je||l!==i||l===void 0){var d=th(i,o,a);(!Je||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 nf(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 qe(t,e,i,o){var r=t.__style;if(Je||r!==e){var a=ih(e,o);(!Je||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(nf(t,i==null?void 0:i[0],o[0]),nf(t,i==null?void 0:i[1],o[1],"important")):nf(t,i,o));return o}function yd(t,e,i){if(t.multiple){if(e==null)return;if(!lr(e))return bg();for(var o of t.options)o.selected=e.includes(oh(o));return}for(o of t.options){var r=oh(o);if(kp(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function rf(t){var e=new MutationObserver(()=>{yd(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Ao(()=>{e.disconnect()})}function oh(t){return"__value"in t?t.__value:t.value}var Sl=Symbol("class"),Tl=Symbol("style"),sh=Symbol("is custom element"),ah=Symbol("is html");function lh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Me(t,e,i,o){var r=ch(t);if(Je&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||B$(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[Xv]=i),i==null?t.removeAttribute(e):typeof i!="string"&&uh(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function dh(t,e,i,o,r=!1){var k;var a=ch(t),l=a[sh],d=!a[ah];let s=Je&&l;s&&go(!1);var u=e||{},v=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=$d(i.class):(o||i[Sl])&&(i.class=null),i[Tl]&&((k=i.style)!=null||(i.style=null));var f=uh(t);for(let E in i){let A=i[E];if(v&&E==="value"&&A==null){t.value=t.__value="",u[E]=A;continue}if(E==="class"){var $=t.namespaceURI==="http://www.w3.org/1999/xhtml";se(t,$,A,o,e==null?void 0:e[Sl],i[Sl]),u[E]=A,u[Sl]=i[Sl];continue}if(E==="style"){qe(t,A,e==null?void 0:e[Tl],i[Tl]),u[E]=A,u[Tl]=i[Tl];continue}var y=u[E];if(!(A===y&&!(A===void 0&&t.hasAttribute(E)))){u[E]=A;var g=E[0]+E[1];if(g!=="$$")if(g==="on"){let Q={},H="$$"+E,z=E.slice(2);var w=Fg(z);if(Bg(z)&&(z=z.slice(0,-7),Q.capture=!0),!w&&y){if(A!=null)continue;t.removeEventListener(z,u[H],Q),u[H]=null}if(A!=null)if(w)t[`__${z}`]=A,Xe([z]);else{let Y=function(le){u[E].call(this,le)};var N=Y;u[H]=Gp(z,t,Y,Q)}else w&&(t[`__${z}`]=void 0)}else if(E==="style")Me(t,E,A);else if(E==="autofocus")qp(t,!!A);else if(!l&&(E==="__value"||E==="value"&&A!=null))t.value=t.__value=A;else if(E==="selected"&&v)lh(t,A);else{var C=E;d||(C=Hg(C));var I=C==="defaultValue"||C==="defaultChecked";if(A==null&&!l&&!I)if(a[E]=null,C==="value"||C==="checked"){let Q=t,H=e===void 0;if(C==="value"){let z=Q.defaultValue;Q.removeAttribute(C),Q.defaultValue=z,Q.value=Q.__value=H?z:null}else{let z=Q.defaultChecked;Q.removeAttribute(C),Q.defaultChecked=z,Q.checked=H?z:!1}}else t.removeAttribute(E);else I||f.includes(C)&&(l||typeof A!="string")?t[C]=A:typeof A!="function"&&Me(t,C,A,r)}}}return s&&go(!0),u}function eo(t,e,i=[],o,r=!1,a=Kr){let l=i.map(a);var d=void 0,s={},u=t.nodeName==="SELECT",v=!1;if(zi(()=>{var f=e(...l.map(n)),$=dh(t,d,f,o,r);v&&u&&"value"in f&&yd(t,f.value,!1);for(let g of Object.getOwnPropertySymbols(s))f[g]||Hi(s[g]);for(let g of Object.getOwnPropertySymbols(f)){var y=f[g];g.description===yp&&(!d||y!==d[g])&&(s[g]&&Hi(s[g]),s[g]=Li(()=>Es(t,()=>y))),$[g]=y}d=$}),u){var p=t;Lo(()=>{yd(p,d.value),rf(p)})}v=!0}function ch(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[sh]:t.nodeName.includes("-"),[ah]:t.namespaceURI===Wv}}var nh=new Map;function uh(t){var e=nh.get(t.nodeName);if(e)return e;nh.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=_a(o)}return e}function B$(t,e,i){var o;Ie&&(e==="srcset"&&F$(t,i)||sf((o=t.getAttribute(e))!=null?o:"",i)||gg(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function sf(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function rh(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function F$(t,e){var i=rh(t.srcset),o=rh(e);return o.length===i.length&&o.every(([r,a],l)=>a===i[l][1]&&(sf(i[l][0],r)||sf(r,i[l][0])))}var H$=Bc?()=>performance.now():()=>Date.now(),Yr={tick:t=>(Bc?requestAnimationFrame:mt)(t),now:()=>H$(),tasks:new Set};function ph(){let t=Yr.now();Yr.tasks.forEach(e=>{e.c(t)||(Yr.tasks.delete(e),e.f())}),Yr.tasks.size!==0&&Yr.tick(ph)}function fh(t){let e;return Yr.tasks.size===0&&Yr.tick(ph),{promise:new Promise(i=>{Yr.tasks.add(e={c:t,f:i})}),abort(){Yr.tasks.delete(e)}}}function du(t,e){gd(()=>{t.dispatchEvent(new CustomEvent(e))})}function K$(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 mh(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=K$(r.trim());e[l]=a.trim()}return e}var q$=t=>t;function jr(t,e,i,o){var N;var r=(t&1)!==0,a=(t&2)!==0,l=r&&a,d=(t&4)!==0,s=l?"both":r?"in":"out",u,v=e.inert,p=e.style.overflow,f,$;function y(){var A;var k=Rt,E=ht;Fi(null),vo(null);try{return u!=null?u:u=i()(e,(A=o==null?void 0:o())!=null?A:{},{direction:s})}finally{Fi(k),vo(E)}}var g={is_global:d,in(){var k;if(e.inert=v,!r){$==null||$.abort(),(k=$==null?void 0:$.reset)==null||k.call($);return}a||f==null||f.abort(),du(e,"introstart"),f=af(e,y(),$,1,()=>{du(e,"introend"),f==null||f.abort(),f=u=void 0,e.style.overflow=p})},out(k){if(!a){k==null||k(),u=void 0;return}e.inert=!0,du(e,"outrostart"),$=af(e,y(),f,0,()=>{du(e,"outroend"),k==null||k()})},stop:()=>{f==null||f.abort(),$==null||$.abort()}},w=ht;if(((N=w.transitions)!=null?N:w.transitions=[]).push(g),r&&hd){var C=d;if(!C){for(var I=w.parent;I&&(I.f&65536)!==0;)for(;(I=I.parent)&&(I.f&16)===0;);C=!I||(I.f&32768)!==0}C&&Lo(()=>{Tt(()=>g.in())})}}function af(t,e,i,o,r){var a=o===1;if(js(e)){var l,d=!1;return yn(()=>{if(!d){var w=e({direction:a?"in":"out"});l=af(t,w,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:mt,deactivate:mt,reset:mt,t:()=>o};let{delay:s=0,css:u,tick:v,easing:p=q$}=e;var f=[];if(a&&i===void 0&&(v&&v(0,1),u)){var $=mh(u(0,1));f.push($,$)}var y=()=>1-o,g=t.animate(f,{duration:s,fill:"forwards"});return g.onfinish=()=>{var z;g.cancel();var w=(z=i==null?void 0:i.t())!=null?z:1-o;i==null||i.abort();var C=o-w,I=e.duration*Math.abs(C),N=[];if(I>0){var k=!1;if(u)for(var E=Math.ceil(I/16.666666666666668),A=0;A<=E;A+=1){var Q=w+C*p(A/E),H=mh(u(Q,1-Q));N.push(H),k||(k=H.overflow==="hidden")}k&&(t.style.overflow="hidden"),y=()=>{var Y=g.currentTime;return w+C*p(Y/I)},v&&fh(()=>{if(g.playState!=="running")return!1;var Y=y();return v(Y,1-Y),!0})}g=t.animate(N,{duration:I,fill:"forwards"}),g.onfinish=()=>{y=()=>o,v==null||v(o,1-o),r()}},{abort:()=>{g&&(g.cancel(),g.effect=null,g.onfinish=mt)},deactivate:()=>{r=mt},reset:()=>{o===0&&(v==null||v(1,0))},t:()=>y()}}function lf(t,e,i){var o=Ko(t,e);o&&o.set&&(t[e]=i,Ao(()=>{t[e]=null}))}var ta,Cl,xd,uu,vh,pu=class pu{constructor(e){Qs(this,uu);Qs(this,ta,new WeakMap);Qs(this,Cl);Qs(this,xd);rl(this,xd,e)}observe(e,i){var o=Ai(this,ta).get(e)||new Set;return o.add(i),Ai(this,ta).set(e,o),Uv(this,uu,vh).call(this).observe(e,Ai(this,xd)),()=>{var r=Ai(this,ta).get(e);r.delete(i),r.size===0&&(Ai(this,ta).delete(e),Ai(this,Cl).unobserve(e))}}};ta=new WeakMap,Cl=new WeakMap,xd=new WeakMap,uu=new WeakSet,vh=function(){var e;return(e=Ai(this,Cl))!=null?e:rl(this,Cl,new ResizeObserver(i=>{for(var o of i){pu.entries.set(o.target,o);for(var r of Ai(this,ta).get(o.target)||[])r(o)}}))},ar(pu,"entries",new WeakMap);var df=pu;var Q$=new df({box:"border-box"});function wn(t,e,i){var o=Q$.observe(t,()=>i(t[e]));Lo(()=>(Tt(()=>i(t[e])),o))}function gh(t,e){return t===e||(t==null?void 0:t[qo])===e}function Ye(t={},e,i,o){return Lo(()=>{var r,a;return jo(()=>{r=a,a=(o==null?void 0:o())||[],Tt(()=>{t!==i(...a)&&(e(t,...a),r&&gh(i(...r),t)&&e(null,...r))})}),()=>{yn(()=>{a&&gh(i(...a),t)&&e(null,...a)})}}),t}function $o(t=!1){let e=zt,i=e.l.u;if(!i)return;let o=()=>ru(e.s);if(t){let r=0,a={},l=Kr(()=>{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(()=>{hh(e,o),Xs(i.b)}),Ne(()=>{let r=Tt(()=>i.m.map(jv));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&Ne(()=>{hh(e,o),Xs(i.a)})}function hh(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),mt;let o=Tt(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Il=[];function Lr(t,e){return{subscribe:ae(t,e).subscribe}}function ae(t,e=mt){let i=null,o=new Set;function r(d){if(ll(t,d)&&(t=d,i)){let s=!Il.length;for(let u of o)u[1](),Il.push(u,t);if(s){for(let u=0;u<Il.length;u+=2)Il[u][0](Il[u+1]);Il.length=0}}}function a(d){r(d(t))}function l(d,s=mt){let u=[d,s];return o.add(u),o.size===1&&(i=e(r,a)||mt),d(t),()=>{o.delete(u),o.size===0&&i&&(i(),i=null)}}return{set:r,update:a,subscribe:l}}function ui(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 Lr(i,(l,d)=>{let s=!1,u=[],v=0,p=mt,f=()=>{if(v)return;p();let y=e(o?u[0]:u,l,d);a?l(y):p=typeof y=="function"?y:mt},$=r.map((y,g)=>wd(y,w=>{u[g]=w,v&=~(1<<g),s&&f()},()=>{v|=1<<g}));return s=!0,f(),function(){Xs($),p(),s=!1}})}function ge(t){let e;return wd(t,i=>e=i)(),e}var fu=!1,cf=Symbol();function x(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:ss(void 0),unsubscribe:mt};if(o.store!==t&&!(cf in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=mt;else{var r=!0;o.unsubscribe=wd(t,l=>{r?o.source.v=l:O(o.source,l)}),r=!1}return t&&cf in i?ge(t):n(o.source)}function Ve(){let t={};function e(){Ao(()=>{for(var i in t)t[i].unsubscribe();mo(t,cf,{enumerable:!1,value:!0})})}return[t,e]}function uf(t){var e=fu;try{return fu=!1,[t(),fu]}finally{fu=e}}var ey={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Ie&&ag(`${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 Sn(t,e,i){return new Proxy(Ie?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},ey)}var ty={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(js(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];js(r)&&(r=r());let a=Ko(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(js(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let r=Ko(o,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===qo||e===sl)return!1;for(let i of t.props)if(js(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(js(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 ks(...t){return new Proxy({props:t},ty)}function _h(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function h(t,e,i,o){var Q,H;var r=(i&1)!==0,a=!os||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,s=!1,u;l?[u,s]=uf(()=>t[e]):u=t[e];var v=qo in t||sl in t,p=l&&((H=(Q=Ko(t,e))==null?void 0:Q.set)!=null?H:v&&e in t&&(z=>t[e]=z))||void 0,f=o,$=!0,y=!1,g=()=>(y=!0,$&&($=!1,d?f=Tt(o):f=o),f);u===void 0&&o!==void 0&&(p&&a&&sg(e),u=g(),p&&p(u));var w;if(a)w=()=>{var z=t[e];return z===void 0?g():($=!0,y=!1,z)};else{var C=(r?Kr:_n)(()=>t[e]);C.f|=131072,w=()=>{var z=n(C);return z!==void 0&&(f=void 0),z===void 0?f:z}}if((i&4)===0&&a)return w;if(p){var I=t.$$legacy;return function(z,Y){return arguments.length>0?((!a||!Y||I||s)&&p(Y?w():z),z):w()}}var N=!1,k=!1,E=ss(u),A=Kr(()=>{var z=w(),Y=n(E);return N?(N=!1,k=!0,Y):(k=!1,E.v=z)});return l&&n(A),r||(A.equals=dl),function(z,Y){if(ou!==null&&(N=k,w(),n(E)),arguments.length>0){let le=Y?n(A):a&&l?ai(z):z;if(!A.equals(le)){if(N=!0,O(E,le),y&&f!==void 0&&(f=le),_h(A))return z;Tt(()=>n(A))}return z}return _h(A)?A.v:n(A)}}var iy;typeof HTMLElement=="function"&&(iy=class extends HTMLElement{constructor(e,i,o){super();ar(this,"$$ctor");ar(this,"$$s");ar(this,"$$c");ar(this,"$$cn",!1);ar(this,"$$d",{});ar(this,"$$r",!1);ar(this,"$$p_d",{});ar(this,"$$l",{});ar(this,"$$l_u",new Map);ar(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))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(a){return l=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),b(l,d)}};var e=i;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let o={},r=oy(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]=pf(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=jg({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:o,$$host:this}}),this.$$me=Jc(()=>{jo(()=>{var a;this.$$r=!0;for(let l of xp(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=pf(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]=pf(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 xp(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function pf(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 oy(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var bh="5";var $h,yh,xh;typeof window!="undefined"&&((xh=(yh=($h=window.__svelte)!=null?$h:window.__svelte={}).v)!=null?xh:yh.v=new Set).add(bh);import{areValidLiveRecordSources as xC,clientChecker as wv}from"@vkontakte/videoplayer-core/es2018";import"@vkontakte/videoplayer-core/es2018";import{noop as Pb,safeStorage as wC,throttleFn as SC}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as TC}from"@vkontakte/videoplayer-statistics/es2018";import{InterfaceLanguage as ny,fillWithDefault as ry,VideoQuality as wh}from"@vkontakte/videoplayer-shared/es2018";var sy={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:ny.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:wh.Q_480P,highQualityLimit:wh.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,returnFocusOnControlsHide:!1,sentry:{dsn:"https://e349fd23c68f405388980d0868d0ff27@sentry.mvk.com/126",sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},features:{autoplay:!0,statistics:!0,thinStatistics:!1,sentry:!0,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,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},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"},Sh=t=>ry(t,sy),Th=t=>pl("ui-config",t),Lt=()=>ul("ui-config");var Sd="vk_player_debug_panel_opened";var Ch="videoplayer",Ih="videoplayer";var ls={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Eh=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),kh=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Ph=new Set(["ShiftRight","ShiftLeft"]);var Ah=["TIMELINE"],Td=[...Ah,"GRAPH_BUTTON"],ff=[...Ah,"PLAY_BUTTON"],Cd=[...Td,"PLAY_BUTTON"];var ds=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(ds||{}),Id={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Lh,VERSION as ay}from"@vkontakte/videoplayer-shared/es2018";import{VERSION as ly}from"@vkontakte/videoplayer-core/es2018";import{VERSION as dy}from"@vkontakte/videoplayer-statistics/es2018";var mu="prod",El="1.1.79";var La=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Mh=Symbol("storeContext"),Vh=Symbol("microStoresContext"),Rh=(t,e)=>{pl(Mh,t),pl(Vh,e),mu==="dev"&&(window.app={store:t,microStores:e})},ve=()=>{let t=ul(Mh);return Lh(t,"Store context is empty!"),t},yo=()=>{let t=ul(Vh);return Lh(t,"MicroStores context is empty!"),t},oi=(t,e)=>gu(t,t.getValue(),e),gu=(t,e,i)=>Lr(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),Nh=(t,e,i,o)=>{var Q,H,z,Y,le,X,re,Z,we;let r=t.info,{width:a,height:l}=ge(i.ui.playerSize),d=(H=(Q=r.throughputEstimation$.getValue())==null?void 0:Q.toFixed(0))!=null?H:0,s=(Y=(z=r.rttEstimation$.getValue())==null?void 0:z.toFixed(0))!=null?Y:0,u=r.isAutoQualityEnabled$.getValue()?"auto":"manual",v=`${El} (core: ${ly}, stat: ${dy}, shared: ${ay})`,p=ge(i.state.errorLog$),f=p.length?`
|
|
45
|
+
`+p.map((ue,ne)=>{var Re;let _e=`${ne}) Type: ${ue.id}
|
|
46
46
|
`,xe=`Message: ${ue.message} (${ue.thrown})
|
|
47
47
|
`,J=`Trace: ${(Re=ue.thrown)==null?void 0:Re.stack}
|
|
48
48
|
`;return _e+xe+J}).join(`
|
|
49
|
-
`):void 0,$=i.state.isAudioDisabled?"disabled":ge(i.state.isAudioAvailable$)?void 0:"unavailable",y=t.info.currentVideoStream$.getValue(),
|
|
50
|
-
`)},Rh=(t,e,i)=>{var W,H,z,Y;let o=t.info,{width:r,height:a}=ge(i.ui.playerSize),l={version:kl,viewport:`${r}x${a}`,volume:Math.round(ge(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(),f=o.isLive$.getValue(),p=o.liveBufferTime$.getValue();m&&(f&&p?l.buffer=m.end-p:l.buffer=Math.max(m.end-ge(i.state.positionExact$),0)),l.position=ge(i.state.positionExact$);let $=o.throughputEstimation$.getValue();$&&(l.speed=$);let y=o.videoBitrate$.getValue();y&&(l.bitrate=y);let _=o.liveLatency$.getValue();_&&(l.liveLatency=_);let S=o.currentVideoSegmentLength$.getValue();S&&(l.currentVideoSegmentLength=S);let I=o.currentAudioSegmentLength$.getValue();I&&(l.currentAudioSegmentLength=I);let T=ge(i.vsid);typeof T=="string"&&(l.vsid=T);let N=(W=t.info.currentVideoStream$.getValue())==null?void 0:W.codec;N&&(l.videoCodec=N);let k=(H=t.info.currentAudioStream$.getValue())==null?void 0:H.codec;k&&(l.audioCodec=k),((z=t.info.currentVideoStream$.getValue())==null?void 0:z.hdr)&&(l.hdr=!0);let A=(Y=t.info.currentAudioStream$.getValue())==null?void 0:Y.language;return A&&(l.audioLanguage=A),l},Nh=(t,e)=>Ea(t,e,"mp4"),Oh=t=>!t.type,Dh=t=>!!t.type,Bh=()=>{let e=[],i=0;return{add:(o,r)=>{e[i]=[o,r],i=(i+1)%10},find:o=>e.find(([r])=>r===o)}},mu=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}async download(e){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=await fetch(e,{signal:this.destroyController.signal});if(i.ok)return await 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 vf,safeStorage as Ci}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-core/es2018";var c1="vk_player_",Fh="vk_player_prefer_traffic_saving_enabled",Hh="vk_player_preferred_volume",Uh="vk_player_prefer_volume_mute",gf="vk_player_preferred_quality",pf="vk_player_preferred_default_quality_settings",ff="vk_player_preferred_quality_settings_by_video",zh="vk_player_preferred_stream_language",Wh="vk_player_preferred_rate",Kh="vk_player_preferred_autoplay_next",mf="vk_player_preferred_subtitles_language",qh="vk_player_user_video_prefs",Qh=`${c1}preview_track_close_tooltip`,Gh=t=>t>1?1:t<0?0:t,hf=t=>Ci.set(Hh,Gh(t).toString(10)),gu=()=>{let t=Ci.get(Hh);return vf(t)?void 0:Gh(parseFloat(t))},_f=(t,e)=>Ci.set(gf,JSON.stringify({videoId:t,value:e})),hu=()=>Ci.remove(gf),bf=t=>{let e=Ci.get(gf);if(vf(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){hu();return}return o},Yh=(t,e)=>{e?Ci.set(t,"true"):Ci.remove(t)},$f=t=>Ci.get(t)==="true",yf=t=>Yh(Uh,t),jh=()=>$f(Uh),Ed=t=>Yh(Fh,t),xf=()=>$f(Fh),Xh=()=>Ci.get(zh),wf=t=>Ci.set(zh,t),Sf=()=>Ci.get(mf),Cf=t=>{t?Ci.set(mf,t):Ci.remove(mf)},Zh=t=>Ci.set(Wh,JSON.stringify({rate:t})),Jh=()=>{let t=Ci.get(Wh);if(vf(t))return;let{rate:e}=JSON.parse(t);return e},e_=t=>{Ci.set(Kh,String(t))},t_=()=>$f(Kh),u1=()=>{let t=m=>{Ci.set(pf,JSON.stringify(m))},e=()=>{try{let m=Ci.get(pf);return m?JSON.parse(m):null}catch(m){return null}},i=()=>{try{let m=Ci.get(ff);return m?JSON.parse(m):null}catch(m){return null}},o=m=>{Ci.set(ff,JSON.stringify(m))},r=m=>{u(m);let f=m?i():null;if(f&&(f==null?void 0:f.videoId)===m)return{...f,appliesTo:"to-video"};f&&a();let p=e();return p?{...p,appliesTo:"as-default"}:(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{Ci.remove(ff)},l=()=>{Ci.remove(pf)},d=(m,f="as-default")=>{m.type==="exact_quality"||f==="to-video"?o(m):t(m)},s=m=>{let f=r(m);if(f){switch(f.type){case"traffic_saving":Ed(!0);break;case"exact_quality":_f(m,f.quality)}a(),l()}},u=m=>{let f=bf(m);if(f){o({type:"exact_quality",videoId:m,quality:f});return}xf()&&t({type:"traffic_saving",videoId:m}),Ed(!1),hu()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:Sf,savePreferredSubtitlesLanguage:Cf}},{getPreferredQualitySettings:i_,migrateSettingsToLegacyWay:o_,savePreferredQualitySettings:_u,savePreferredDefaultQualitySettings:MV,removePreferredQualitySettingsByVideo:VV,getPreferredDefaultQualitySettings:bu}=u1(),p1=3,f1=3,n_=()=>{let t=Ci.get(qh);if(t)try{return JSON.parse(t)}catch(e){return null}return null},$u=(t,e)=>{var r,a;let i=n_();return(a=(r=i==null?void 0:i[t])==null?void 0:r[e])!=null?a:null},Tf=(t,e,i)=>{var l,d,s;let o=(l=n_())!=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=m1(o);Ci.set(qh,JSON.stringify(a))};function m1(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(f1),e.reduce((o,[r])=>(o[r]=v1(t[r]),o),{})}function v1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(p1),Object.fromEntries(e)}function r_(){Ci.set(Qh,JSON.stringify(!0))}function s_(){let t=Ci.get(Qh);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Cb}from"@vkontakte/videoplayer-core/es2018";cg();var js="var(--btn-color, #fff)";var g1=Ce('<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),h1=Ce('<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 m;B(e,!0);let i=g(e,"width",19,()=>"24"),o=g(e,"height",19,()=>"24"),r=g(e,"fill",3,js),a=(m=e.viewBox)!=null?m:`0 0 ${i()} ${o()}`;var l=h1(),d=C(l);{var s=f=>{var p=g1(),$=de(p),y=C($);ii(y,()=>e.children),w($),li(),b(f,p)},u=f=>{var p=Ae(),$=de(p);ii($,()=>e.children),b(f,p)};R(d,f=>{e.shadow?f(s):f(u,!1)})}w(l),D(()=>{Me(l,"aria-label",e.ariaLabel),Me(l,"aria-hidden",!e.ariaLabel),Me(l,"width",i()),Me(l,"height",o()),Me(l,"viewBox",a),Me(l,"fill",r()),qe(l,e.style),Me(l,"data-testid",e.testId)}),b(t,l),F()}import{isNullable as d_,InterfaceLanguage as c_}from"@vkontakte/videoplayer-shared/es2018";var _1={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:`Видео грузится слишком медленно,
|
|
49
|
+
`):void 0,$=i.state.isAudioDisabled?"disabled":ge(i.state.isAudioAvailable$)?void 0:"unavailable",y=t.info.currentVideoStream$.getValue(),g=t.info.currentAudioStream$.getValue(),w=[];y&&w.push(`Video: ${(le=y==null?void 0:y.codec)!=null?le:""}`+(y!=null&&y.hdr?" (HDR)":"")),g&&w.push(`Audio: ${(X=g==null?void 0:g.codec)!=null?X:""}`+(g!=null&&g.language?` (${g.language})`:""));let C=r.currentQuality$.getValue(),I="";if(C){let ue=r.availableQualitiesFps$.getValue()[C];I=ue?`${ue}fps`:""}let N=r.httpConnectionType$.getValue(),k=(Z=(re=r.currentBuffer$.getValue())==null?void 0:re.end)!=null?Z:0,E=Math.max(k-ge(i.state.positionExact$),0),A={Version:v,Browser:navigator.userAgent,Config:t.experimental.tuningConfigName$.getValue().join(", "),"United video id":String(i.videoId),TraceId:o,VSID:ge(i.vsid),"Content host":r.hostname$.getValue(),"Connection type":N?N+(r.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${d}Kbps @ ${s}ms RTT`,Format:r.currentFormat$.getValue(),"Available Formats":e!=null&&e.sources?Object.keys(e.sources).join(", "):"",Streams:w.join(", "),Quality:`${u} ${C!=null?C:""} ${I}`,"Available qualities":r.availableQualities$.getValue().join(", "),Audio:$,Position:`${ge(i.state.positionExact$)}s`,Buffer:`${E}s`,State:`${ge(i.playerPhase)} ${(we=r.playbackState$.getValue())!=null?we:""}`,"Player size":`${a}x${l}`,URL:window.location.href,Errors:f};return Object.entries(A).filter(([ue,ne])=>ne!==void 0).map(([ue,ne])=>`${ue}: ${ne}`).join(`
|
|
50
|
+
`)},Oh=(t,e,i)=>{var Q,H,z,Y;let o=t.info,{width:r,height:a}=ge(i.ui.playerSize),l={version:El,viewport:`${r}x${a}`,volume:Math.round(ge(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 v=o.currentBuffer$.getValue(),p=o.isLive$.getValue(),f=o.liveBufferTime$.getValue();v&&(p&&f?l.buffer=v.end-f:l.buffer=Math.max(v.end-ge(i.state.positionExact$),0)),l.position=ge(i.state.positionExact$);let $=o.throughputEstimation$.getValue();$&&(l.speed=$);let y=o.videoBitrate$.getValue();y&&(l.bitrate=y);let g=o.liveLatency$.getValue();g&&(l.liveLatency=g);let w=o.currentVideoSegmentLength$.getValue();w&&(l.currentVideoSegmentLength=w);let C=o.currentAudioSegmentLength$.getValue();C&&(l.currentAudioSegmentLength=C);let I=ge(i.vsid);typeof I=="string"&&(l.vsid=I);let N=(Q=t.info.currentVideoStream$.getValue())==null?void 0:Q.codec;N&&(l.videoCodec=N);let k=(H=t.info.currentAudioStream$.getValue())==null?void 0:H.codec;k&&(l.audioCodec=k),((z=t.info.currentVideoStream$.getValue())==null?void 0:z.hdr)&&(l.hdr=!0);let A=(Y=t.info.currentAudioStream$.getValue())==null?void 0:Y.language;return A&&(l.audioLanguage=A),l},Dh=(t,e)=>La(t,e,"mp4"),Bh=t=>!t.type,Fh=t=>!!t.type,Hh=()=>{let e=[],i=0;return{add:(o,r)=>{e[i]=[o,r],i=(i+1)%10},find:o=>e.find(([r])=>r===o)}},vu=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}async download(e){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=await fetch(e,{signal:this.destroyController.signal});if(i.ok)return await 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 hf,safeStorage as Ti}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-core/es2018";var cy="vk_player_",Uh="vk_player_prefer_traffic_saving_enabled",zh="vk_player_preferred_volume",Wh="vk_player_prefer_volume_mute",_f="vk_player_preferred_quality",mf="vk_player_preferred_default_quality_settings",vf="vk_player_preferred_quality_settings_by_video",Kh="vk_player_preferred_stream_language",qh="vk_player_preferred_rate",Qh="vk_player_preferred_autoplay_next",gf="vk_player_preferred_subtitles_language",Gh="vk_player_user_video_prefs",Yh=`${cy}preview_track_close_tooltip`,jh=t=>t>1?1:t<0?0:t,bf=t=>Ti.set(zh,jh(t).toString(10)),hu=()=>{let t=Ti.get(zh);return hf(t)?void 0:jh(parseFloat(t))},$f=(t,e)=>Ti.set(_f,JSON.stringify({videoId:t,value:e})),_u=()=>Ti.remove(_f),yf=t=>{let e=Ti.get(_f);if(hf(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){_u();return}return o},Xh=(t,e)=>{e?Ti.set(t,"true"):Ti.remove(t)},xf=t=>Ti.get(t)==="true",wf=t=>Xh(Wh,t),Zh=()=>xf(Wh),Ed=t=>Xh(Uh,t),Sf=()=>xf(Uh),Jh=()=>Ti.get(Kh),Tf=t=>Ti.set(Kh,t),Cf=()=>Ti.get(gf),If=t=>{t?Ti.set(gf,t):Ti.remove(gf)},e_=t=>Ti.set(qh,JSON.stringify({rate:t})),t_=()=>{let t=Ti.get(qh);if(hf(t))return;let{rate:e}=JSON.parse(t);return e},i_=t=>{Ti.set(Qh,String(t))},o_=()=>xf(Qh),uy=()=>{let t=v=>{Ti.set(mf,JSON.stringify(v))},e=()=>{try{let v=Ti.get(mf);return v?JSON.parse(v):null}catch(v){return null}},i=()=>{try{let v=Ti.get(vf);return v?JSON.parse(v):null}catch(v){return null}},o=v=>{Ti.set(vf,JSON.stringify(v))},r=v=>{u(v);let p=v?i():null;if(p&&(p==null?void 0:p.videoId)===v)return{...p,appliesTo:"to-video"};p&&a();let f=e();return f?{...f,appliesTo:"as-default"}:(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{Ti.remove(vf)},l=()=>{Ti.remove(mf)},d=(v,p="as-default")=>{v.type==="exact_quality"||p==="to-video"?o(v):t(v)},s=v=>{let p=r(v);if(p){switch(p.type){case"traffic_saving":Ed(!0);break;case"exact_quality":$f(v,p.quality)}a(),l()}},u=v=>{let p=yf(v);if(p){o({type:"exact_quality",videoId:v,quality:p});return}Sf()&&t({type:"traffic_saving",videoId:v}),Ed(!1),_u()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:Cf,savePreferredSubtitlesLanguage:If}},{getPreferredQualitySettings:n_,migrateSettingsToLegacyWay:r_,savePreferredQualitySettings:bu,savePreferredDefaultQualitySettings:V8,removePreferredQualitySettingsByVideo:R8,getPreferredDefaultQualitySettings:$u}=uy(),py=3,fy=3,s_=()=>{let t=Ti.get(Gh);if(t)try{return JSON.parse(t)}catch(e){return null}return null},yu=(t,e)=>{var r,a;let i=s_();return(a=(r=i==null?void 0:i[t])==null?void 0:r[e])!=null?a:null},Ef=(t,e,i)=>{var l,d,s;let o=(l=s_())!=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=my(o);Ti.set(Gh,JSON.stringify(a))};function my(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(fy),e.reduce((o,[r])=>(o[r]=vy(t[r]),o),{})}function vy(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(py),Object.fromEntries(e)}function a_(){Ti.set(Yh,JSON.stringify(!0))}function l_(){let t=Ti.get(Yh);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Ib}from"@vkontakte/videoplayer-core/es2018";pg();var ia="var(--btn-color, #fff)";var gy=Ce('<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),hy=Ce('<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 v;B(e,!0);let i=h(e,"width",19,()=>"24"),o=h(e,"height",19,()=>"24"),r=h(e,"fill",3,ia),a=(v=e.viewBox)!=null?v:`0 0 ${i()} ${o()}`;var l=hy(),d=T(l);{var s=p=>{var f=gy(),$=de(f),y=T($);ii(y,()=>e.children),S($),ci(),b(p,f)},u=p=>{var f=Ae(),$=de(f);ii($,()=>e.children),b(p,f)};R(d,p=>{e.shadow?p(s):p(u,!1)})}S(l),D(()=>{Me(l,"aria-label",e.ariaLabel),Me(l,"aria-hidden",!e.ariaLabel),Me(l,"width",i()),Me(l,"height",o()),Me(l,"viewBox",a),Me(l,"fill",r()),qe(l,e.style),Me(l,"data-testid",e.testId)}),b(t,l),F()}import{isNullable as u_,InterfaceLanguage as p_}from"@vkontakte/videoplayer-shared/es2018";var _y={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:"Выйти из режима точной перемотки"},d_=_y;var by={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"},
|
|
55
|
-
`),o,r;for(let a=0;a<i.length;++a){if(o=
|
|
56
|
-
`).filter(i=>!!i)[0]}function I1(t){try{let e=T1(t);if(e)return e}catch(e){}return{value:p_(t),type:t&&t.name,stacktrace:{frames:[]}}}function E1(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var xu=class{constructor(e){if(e&&e.dsn){let i=C1.exec(e.dsn),o=i?i.slice(1):[],r=o[5].split("/"),a=r.slice(0,-1).join("/");this.apiUrl=o[0]+"://"+o[3]+(o[4]?":"+o[4]:"")+(a?"/"+a:"")+"/api/"+r.pop()+"/store/",this.authHeader="Sentry sentry_version=7,sentry_key="+o[1]+(o[2]?",sentry_secret="+o[2]:"")}this.environment=e&&e.environment}prepare(e){return{...this.getRequestBlank(),exception:{values:[I1(e)]}}}report(e){this.send(this.prepare(e))}send(e){!this.apiUrl||!e||this.createRequest(e)}createRequest(e){let i=new XMLHttpRequest;i.open("POST",this.apiUrl,!0),i.setRequestHeader("Content-type","application/json"),i.setRequestHeader(S1,this.authHeader||""),i.send(JSON.stringify(e))}getRequestBlank(){return{platform:"javascript",event_id:E1(),sdk:{name:"micro-sentry.javascript.core",version:"0.0.0"},timestamp:Date.now()/1e3,environment:this.environment}}};function f_(t,e){return Object.prototype.toString.call(e)==="[object RegExp]"?e.test(t):typeof e=="string"?t.indexOf(e)!==-1:!1}function k1(){return window}var wu=class t extends xu{constructor(e,i=k1()){super(e),this.options=e,this.window=i,this.destroyed=!1,this._state={};let{plugins:o=[],beforeSend:r=u=>u,beforeBreadcrumb:a=u=>u,blacklistUrls:l=[],ignoreErrors:d=[],release:s=void 0}=this.options||{};this.plugins=o.map(u=>new u(this)),this.beforeSend=r,this.beforeBreadcrumb=a,this.blacklistUrls=l,this.ignoreErrors=d,this.release=s}get state(){return this._state}clearState(){this._state={}}setTags(e){return this.setKeyState("tags",{...e}),this}setTag(e,i){return this.extendState({tags:{[e]:i}}),this}setExtra(e,i){return this.extendState({extra:{[e]:i}}),this}setExtras(e){return this.setKeyState("extra",{...e}),this}setUser(e){return this.setKeyState("user",{...e}),this}clone(){let e=new t({...this.options,plugins:[]});return e.extendState(this.state),e}withScope(e){let i=this.clone();e(i),i.destroy(),this.setBreadcrumbs(void 0)}addBreadcrumb(e){this.extendState({breadcrumbs:[{timestamp:Date.now()/1e3,...this.beforeBreadcrumb(e)}]})}setBreadcrumbs(e){this.setKeyState("breadcrumbs",e)}captureMessage(e,i){this.send({...this.getRequestBlank(),message:e,level:i})}destroy(){this.destroyed=!0,this.plugins.forEach(e=>{e.destroy&&e.destroy()})}isIgnoredError(e){return this.ignoreErrors.length?this.getPossibleEventMessages(e).some(i=>this.ignoreErrors.some(o=>f_(i,o))):!1}getRequestBlank(){return{request:{url:this.window.location.toString(),headers:{"User-Agent":this.window.navigator.userAgent}},...super.getRequestBlank(),sdk:{name:"micro-sentry.javascript.browser",version:"0.0.0"},...this.state}}send(e){this.destroyed||this.isDeniedUrl(e)||this.isIgnoredError(e)||(super.send(this.beforeSend({release:this.release,...e})),this.setBreadcrumbs(void 0))}getPossibleEventMessages(e){if(e.message)return[e.message];if(e.exception)try{let{type:i="",value:o=""}=e.exception.values&&e.exception.values[0]||{};return[`${o}`,`${i}: ${o}`]}catch(i){return[]}return[]}isDeniedUrl(e){if(!this.blacklistUrls.length)return!1;let i=this.getEventFilterUrl(e);return i?this.blacklistUrls.some(o=>f_(i,o)):!1}getEventFilterUrl(e){try{if(e.exception){let i=e.exception.values&&e.exception.values[0].stacktrace&&e.exception.values[0].stacktrace.frames;return i&&i[i.length-1].filename||null}return null}catch(i){return null}}extendState(e){this._state=Object.keys(e).reduce((i,o)=>{let r=this._state[o],a=Array.isArray(r)?r:null,l=e[o],d=Array.isArray(l)?l:null;return{...i,[o]:a||d?[...a||[],...d||[]]:{...typeof r!="string"?r:{},...typeof l!="string"?l:{}}}},this._state)}setKeyState(e,i){this._state[e]=i}};import{isNonNullable as Su,Subscription as P1}from"@vkontakte/videoplayer-shared/es2018";var Cu=null,ka=class{constructor(e,i,o={}){!Cu&&e.dsn&&(this.sentryClient=new wu({dsn:e.dsn,environment:i.env}),this.version=i.version,this.sentrySubscription=new P1,this.options=e,this.context=o,Cu=this)}destroy(){var e,i;(e=this.sentryClient)==null||e.destroy(),(i=this.sentrySubscription)==null||i.unsubscribe(),Cu=null}logIError(e,i=!1){e.thrown&&this.report(e.thrown,{fatal:i,errorType:e.id,category:e.category},{message:e.message,errorData:e.data})}report(e,i={},o={}){let{sentryClient:r,context:a,options:l}=this,{sampleRate:d=0,whiteErrorIdList:s,whiteErrorCategoryList:u=[],blackErrorIdList:m,blackErrorCategoryList:f}=l,{errorType:p,category:$}=i;if(Su($)&&f.includes($)||Su(p)&&m.includes(p))return;if(Math.random()<=d||Su($)&&u.includes($)||Su(p)&&s.includes(p)){Object.keys(i).length&&r.setTags({version:this.version,...i}),(Object.keys(a).length||Object.keys(o).length)&&r.setExtras({...a,...o});try{p&&r.captureMessage(p,i.fatal?Pl.fatal:Pl.error),r.report(e)}catch(_){console.error(_)}}}static getInstance(){return Cu}};var fs=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(fs||{});var Tu=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()},Iu=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),m_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,v_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Pd=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},Xs=()=>!!Pd(),Eu=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},ku=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},g_=t=>{let e=window.screen;return(async r=>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 h_}from"@vkontakte/videoplayer-core/es2018";var __=()=>({title:G("hotkey_map_modal_title"),closeBtnText:G("hotkey_map_modal_close_btn_text"),groups:[{title:G("hotkey_map_group_title_common"),items:[{description:G("hotkey_map_item_mute_description"),value:G("hotkey_map_item_mute_value")},{description:G("hotkey_map_item_volume_up_description"),value:G("hotkey_map_item_volume_up_value")},{description:G("hotkey_map_item_volume_down_description"),value:G("hotkey_map_item_volume_down_value")},{description:G("hotkey_map_item_pip_description"),value:G("hotkey_map_item_pip_value")},{description:G("hotkey_map_item_full_screen_description"),value:G("hotkey_map_item_full_screen_value")},{description:G("hotkey_map_item_show_context_menu_description"),value:G("hotkey_map_item_show_context_menu_value")},{description:G("hotkey_map_item_show_hotkey_map_description"),value:G("hotkey_map_item_show_hotkey_map_value")}]},{title:G("hotkey_map_group_title_playback"),items:[{description:G("hotkey_map_item_play_toggle_description"),value:G("hotkey_map_item_play_toggle_value")},{description:G("hotkey_map_item_seek_backward_description"),value:G("hotkey_map_item_seek_backward_value")},{description:G("hotkey_map_item_seek_forward_description"),value:G("hotkey_map_item_seek_forward_value")},{description:G("hotkey_map_item_fast_seek_backward_description"),value:G("hotkey_map_item_fast_seek_backward_value")},{description:G("hotkey_map_item_fast_seek_forward_description"),value:G("hotkey_map_item_fast_seek_forward_value")},{description:G("hotkey_map_item_rate_down_description"),value:G("hotkey_map_item_rate_down_value")},{description:G("hotkey_map_item_rate_up_description"),value:G("hotkey_map_item_rate_up_value")},{description:G("hotkey_map_item_prev_frame_description"),value:G("hotkey_map_item_prev_frame_value")},{description:G("hotkey_map_item_next_frame_description"),value:G("hotkey_map_item_next_frame_value")},{description:G("hotkey_map_item_jump_seek_description"),value:G("hotkey_map_item_jump_seek_value")},{description:G("hotkey_map_item_next_video_description"),value:G("hotkey_map_item_next_video_value")},{description:G("hotkey_map_item_prev_video_description"),value:G("hotkey_map_item_prev_video_value")}]},{title:G("hotkey_map_group_title_subtitles"),items:[{description:G("hotkey_map_item_subtitles_toggle_description"),value:G("hotkey_map_item_subtitles_toggle_value")}]},{title:G("hotkey_map_group_title_episodes"),items:[{description:G("hotkey_map_item_prev_episode_description"),value:h_.device.isApple?G("hotkey_map_item_prev_episode_mac_value"):G("hotkey_map_item_prev_episode_pc_value")},{description:G("hotkey_map_item_next_episode_description"),value:h_.device.isApple?G("hotkey_map_item_next_episode_mac_value"):G("hotkey_map_item_next_episode_pc_value")}]}]});import{debounceFn as A1,ValueSubject as Pf}from"@vkontakte/videoplayer-shared/es2018";var Pa=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:A1(this.onResize.bind(this),300)};this.info={isActive$:new Pf(!1),isEnabled$:new Pf(!1),type:0};this.info.isEnabled$=new Pf(e)}isSupported(){return document.pictureInPictureEnabled}isActive(){return this.info.isActive$.getValue()}setContext(e){this.svelteContext=e}async revealPictureInPicture(){this.isRequested&&(this.removeEventHandlers(),await this.request(),this.addEventHandlers())}async request(){var e;if(!(!this.isSupported()||this.isActive()))try{await((e=this.videoElement)==null?void 0:e.requestPictureInPicture())}catch(i){this.isRequested=!1}}async exit(){!this.isSupported()||!this.isActive()||await document.exitPictureInPicture()}assignPlayerContainer(e){this.isSupported()&&(this.playerContainer=e)}updateVideoElement(){this.isSupported()&&this.exit().finally(()=>{var e;this.removeEventHandlers(),this.videoElement=(e=this.playerContainer)==null?void 0:e.querySelector("video"),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={...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)}async dispose(){this.removeEventHandlers(),await this.exit(),this.info.isActive$.next(!1),this.isRequested=!1}onEnterPictureInPicture(e){var r,a;let o=e.pictureInPictureWindow;o&&(this.info.isActive$.next(!0),this.isRequested=!0,o.addEventListener("resize",this.eventHandlers.resize),(a=(r=this.externalEventHandlers).enterpictureinpicture)==null||a.call(r,e))}onLeavePictureInPicture(e){var r,a;let o=e.pictureInPictureWindow;this.info.isActive$.next(!1),this.isRequested=!1,this.eventHandlers.resize.cancel(),o==null||o.removeEventListener("resize",this.eventHandlers.resize),(a=(r=this.externalEventHandlers).leavepictureinpicture)==null||a.call(r,e)}onResize(e){var i,o;(o=(i=this.externalEventHandlers).resize)==null||o.call(i,e)}setEnabled(e){this.info.isEnabled$.next(e)}};function Aa(t){return t instanceof Pa}import{devNull as b_,now as $_}from"@vkontakte/videoplayer-shared/es2018";function Lf(t,e){B(e,!1);let i=ve();At(()=>{i.getAdmanWrapper().startPostroll()}),bo(),F()}import{noop as V1}from"@vkontakte/videoplayer-shared/es2018";var L1=Ce('<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>'),M1=Ce('<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 kr(t,e){B(e,!0);let i=g(e,"direction",3,"left"),o=g(e,"useBtnColor",3,!1),r=v(()=>["up","down"].includes(i())),a=v(()=>["right","down"].includes(i())),l=v(()=>`chevron-icon--${i()}`),d=v(()=>(()=>{let m="";return n(a)&&(m+="transform: rotate(180deg);"),m.length?m:void 0})()),s=v(()=>o()?js:"currentColor"),u=v(()=>n(r)?"7":"16");je(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,f)=>{var p=Ae(),$=de(p);{var y=S=>{var I=L1();b(S,I)},_=S=>{var I=M1();b(S,I)};R($,S=>{n(r)?S(y):S(_,!1)})}b(m,p)},$$slots:{default:!0}}),F()}var R1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},N1=M('<div class="skip s-17"> <!></div>'),O1=M("<div><!></div>"),D1={hash:"s-17",code:".container.s-17{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-17{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-17{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-17{color:var(--white);cursor:pointer}.skippable.s-17:hover{color:hsla(0,0%,100%,.75)}"};function Mf(t,e){B(e,!0),Q(t,D1);let[i,o]=Ve(),r=()=>x(u,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"secondsToWatchBeforeSkip",3,0),d=g(e,"skipAd",3,V1),u=ve().ui.isMobile,m=v(()=>a()>0&&a()>=l());var f=O1();let p;f.__click=[R1,m,d];var $=C(f);{var y=S=>{var I=N1(),T=C(I),N=L(T);kr(N,{direction:"right"}),w(I),D(k=>me(T,`${k!=null?k:""} `),[()=>G("skip_ads_now")]),b(S,I)},_=S=>{var I=cs();D(T=>me(I,T),[()=>G("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),b(S,I)};R($,S=>{n(m)?S(y):S(_,!1)})}w(f),D(S=>p=se(f,1,"container s-17",null,p,S),[()=>({"container-mobile":r(),skippable:n(m)})]),b(t,f),F(),o()}et(["click"]);var B1=M('<button class="go-to-site s-16"> </button>'),F1={hash:"s-16",code:"button.go-to-site.s-16{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 Vf(t,e){B(e,!1),Q(t,F1),bo();var i=B1(),o=C(i,!0);w(i),D(r=>me(o,r),[()=>G("visit_advertiser")],yn),b(t,i),F()}var H1=M('<div class="top-gradient-mobile s-j"></div>'),U1=M('<div class="container s-j"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),z1={hash:"s-j",code:".container.s-j{height:100%;width:100%}.top-gradient-mobile.s-j{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 Ld(t,e){B(e,!0),Q(t,z1);let[i,o]=Ve(),r=()=>x(H,"$canSkipAd",i),a=()=>x(W,"$adPlaybackState",i),l=()=>x(T,"$isMobile",i),d=()=>x(z,"$adPosition",i),s=()=>x(Y,"$secondsToWatchBeforeSkipAd",i),u=()=>x(I,"$isVideoEnded",i),m=g(e,"adsSlotId",3,void 0),f=g(e,"adsParams",3,void 0),p=g(e,"adsAutoplayParam",3,void 0),$=g(e,"duration",3,0),y=g(e,"adsExternalApi",3,void 0),_=ve(),S=Lt(),I=_.state.isEnded$,T=_.ui.isMobile,N=S.ads.isMobileGoToSiteButton,k=q(void 0),E=q(void 0),A=!1,W=_.ads.playbackState,H=_.ads.canSkip,z=_.ads.position,Y=_.ads.secondsToWatchBeforeSkip,ae=v(()=>r()&&a()!=="inactive"),j=v(()=>l()&&a()!=="inactive"&&N);At(()=>{let P=_.getAdmanWrapper();if(b_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[$_(),m()]}),!m()){P.onAdmanLoadingError();return}let ze=()=>{var Ee;let{width:Oe,height:De}=ge(_.ui.playerSize),tt=ge(_.ui.isFullscreen),U=(Ee=p())!=null?Ee:ge(_.ui.isAutoplay),Pe=S.ads.paramsOverride;return{width:Oe,height:De,isFullscreen:tt,isAutoplay:U,adsContainer:n(k),adsVideoElement:n(E),slotId:m(),params:f(),paramsOverride:Pe,duration:$(),externalApi:y()}},Te=async Oe=>{Oe&&await go();let De=ze();await P.initAdman(De),A=!0},X=new AbortController,ie=()=>{X.abort()};return window.AdmanHTML?Te(!0).catch(()=>{P.onAdmanLoadingError()}):P.loadAdman(X.signal).then(()=>Te(!1)).catch(()=>{P.onAdmanLoadingError()}),()=>{b_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[$_(),m()]}),!A&&ie()}});var ne=U1(),Z=C(ne);{var we=P=>{var ze=H1();b(P,ze)};R(Z,P=>{l()&&P(we)})}var ue=L(Z,2);Ye(ue,P=>O(E,P),()=>n(E));var re=L(ue,2);{var _e=P=>{Mf(P,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return _.actions.internal.skipAd}})};R(re,P=>{n(ae)&&P(_e)})}var xe=L(re,2);{var J=P=>{Lf(P,{})};R(xe,P=>{u()&&P(J)})}var Re=L(xe,2);{var pe=P=>{Vf(P,{})};R(Re,P=>{n(j)&&P(pe)})}w(ne),Ye(ne,P=>O(k,P),()=>n(k)),b(t,ne),F(),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 W1=Ce('<path fill="#fff"></path>'),K1=Ce("<path></path><!>",1);function Md(t,e){let i=g(e,"isActive",3,!1),o=v(()=>i()?"live-active-icon":"live-icon"),r=v(()=>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(r)},children:(l,d)=>{var s=K1(),u=de(s),m=L(u);{var f=p=>{var $=W1();Me($,"d",a),b(p,$)};R(m,p=>{i()&&p(f)})}D(()=>Me(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`)),b(l,s)},$$slots:{default:!0}})}var q1=M('<div class="equalizer s-d"><div class="col s-d"></div> <div class="col s-d"></div> <div class="col s-d"></div></div>'),Q1=M('<div class="live-icon s-d"><!></div>'),G1=M('<span class="text s-d"> </span>'),Y1=M("<div><!> <!></div>"),j1={hash:"s-d",code:".wrapper.s-d{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-d{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-d{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-d .equalizer:where(.s-d){margin-top:-2px}.equalizer.s-d .col:where(.s-d){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-d .equalizer:where(.s-d) .col:where(.s-d){animation-play-state:running}.equalizer.s-d .col:where(.s-d):first-child{animation-name:s-d-thumb-timer-equalizer-col1;left:0}.equalizer.s-d .col:where(.s-d):nth-child(2){animation-name:s-d-thumb-timer-equalizer-col2;left:3px}.equalizer.s-d .col:where(.s-d):nth-child(3){animation-name:s-d-thumb-timer-equalizer-col3;left:6px}.live-icon.s-d{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-d-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-d-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-d-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-d{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function Vd(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=Y1();let l;var d=C(a);{var s=p=>{var $=q1();b(p,$)};R(d,p=>{i()&&p(s)})}var u=L(d,2);{var m=p=>{var $=Q1(),y=C($);Md(y,{isActive:!0}),w($),b(p,$)},f=p=>{var $=G1(),y=C($,!0);w($),D(()=>me(y,e.time)),b(p,$)};R(u,p=>{o()?p(m):p(f,!1)})}w(a),D(p=>l=se(a,1,"wrapper s-d",null,l,p),[()=>({live:o(),playing:r()})]),b(t,a)}var Al=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var X1=M('<div role="timer" data-testid="thumb-timer"><!></div>'),Z1={hash:"s-i",code:".thumb-timer.s-i{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 Rd(t,e){B(e,!0),Q(t,Z1);let[i,o]=Ve(),r=()=>x(m,"$disabled",i),a=g(e,"isHidden",3,!1),l=g(e,"isLive",3,!1),d=g(e,"isPlaying",3,!1),s=Lt(),u=v(()=>jo(e.duration-e.position)),m=le(!1);var f=X1();let p;var $=C(f);Vd($,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),w(f),Ts(f,()=>Al(a()&&s.features.usePerformanceFix,m,s.disableInvisibleComponentsTimeout)),D(y=>p=se(f,1,"thumb-timer s-i",null,p,y),[()=>({"out-of-flow":r(),hidden:a()})]),b(t,f),F(),o()}var Ll=t=>{if(!navigator.clipboard){y_(t);return}navigator.clipboard.writeText(t).catch(()=>y_(t))};function y_(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 dy}from"@vkontakte/videoplayer-core/es2018";import{clientChecker as x_}from"@vkontakte/videoplayer-core/es2018";var Rf="focus-hidden";var Pr=t=>{t.stopPropagation(),t.preventDefault()},Nf=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Rf)},ey=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},ty=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},iy=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},oy=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},w_=t=>t.code==="Escape",ny=t=>t.code==="ArrowLeft",Nd=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},S_=t=>{iy(t)?(Pr(t),ty(t.target)):oy(t)&&(Pr(t),ey(t.target))},ea=t=>!x_.device.isAndroid&&(t==null?void 0:t.detail)===0||x_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Ml=async(t,e,i)=>{await go(),t&&!t.classList.contains("opened")&&!e&&ge(i)&&(await go(),i.set(!1),t.focus())},C_=async(t,e,i)=>{await go(),t&&!e&&ge(i)&&(i.set(!1),t.focus())},Od=async(t,e,i,o=!1)=>{if(await go(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Rf,!i),a==null||a.focus()}},T_=async(t,e)=>{setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)},Pu=(t,e)=>{S_(t),Nf(t.target),w_(t)&&(Pr(t),e())},Au=async(t,e)=>{Nd(t,["ArrowRight"])&&(Pr(t),e())},I_=async(t,e,i)=>{if(S_(t),ny(t)){Pr(t),e();return}w_(t)&&(Pr(t),i())},Vl=(t,e)=>{Nd(t)&&(Pr(t),e())},E_=(t,e,i)=>{if(Nd(t))Pr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Pr(t);return}o==="ArrowRight"&&!e&&(i(!0),Pr(t))}},k_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},P_=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 Lu,isValidURL as cy}from"@vkontakte/videoplayer-shared/es2018";var jr={"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 A_}from"@vkontakte/videoplayer-shared/es2018";var sy=(t,e)=>{Vl(t,()=>e())},ay=M('<li class="item s-1t" role="menuitem" tabindex="0"> </li>'),ly={hash:"s-1t",code:".item.s-1t{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-1t:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function Of(t,e){B(e,!0),Q(t,ly);let i=g(e,"onClick",3,A_),o=g(e,"closeContextMenu",3,A_),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=ay();a.__click=r,a.__keydown=[sy,r];var l=C(a,!0);w(a),D(()=>{var d;Me(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Me(a,"data-testid",e.id),me(l,e.label)}),b(t,a),F()}et(["click","keydown"]);var Ma=(t,e)=>t.weight-e.weight;var Dd=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Dd||{});var uy=(t,e)=>{Pu(t,e)},py=t=>{t.preventDefault()},fy=M('<ul role="menu" class="s-1a"></ul>'),my={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 Df(t,e){B(e,!0),Q(t,my);let[i,o]=Ve(),r=()=>x(we,"$playerPhase",i),a=()=>x(ae,"$isLive$",i),l=()=>x(ue,"$isPiPEnabled$",i),d=()=>x(Y,"$chromecastState$",i),s=()=>x(re,"$pictureInPictureApiIsActive$",i),u=()=>x(Z,"$isLooped$",i),m=()=>x(j,"$positionExact$",i),f=()=>x(W,"$additionalContextMenuItems$",i),p=g(e,"visible",3,!1),$=g(e,"position",19,()=>({top:0,left:0})),y=g(e,"playerContainerRef",3,void 0),_=g(e,"menuElementRef",15,void 0),S=q(0),I=q(0),T=ve(),{pictureInPicture$:N}=$o(),k=Lt(),E=T.ui.contextMenu.visible$,A=T.ui.debugPanelVisible,W=T.ui.additionalContextMenuItems$,H=T.ui.t,z=T.actions.internal.togglePictureInPicture,Y=T.state.chromecastState$,ae=T.state.isLive$,j=T.state.positionExact$,ne=T.state.isInteractive,Z=T.state.looped$,we=T.playerPhase,{isEnabled$:ue,isActive$:re}=N,_e=v(()=>r()==="video"),xe=v(()=>!!a()&&n(_e)),J=v(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),Re=v(()=>{var ce;return k.features.copyVideoLink&&((ce=T.callbacks)==null?void 0:ce.onCopyVideoLink)}),pe=v(()=>n(Re)&&!n(J)&&!ne&&!n(xe)),P=v(()=>{var ce;return!!((ce=T.callbacks)!=null&&ce.onCopyEmbedCodeClicked)}),ze=v(()=>l()&&d()!==dy.CONNECTED&&!ne&&n(_e)),Te=v(()=>!ne&&!n(J)&&!n(xe)),X=v(()=>k.features.videoRotate&&!ne&&!n(J)),ie=v(()=>k.showSupport&&!s()),Oe=v(()=>k.features.saveTraceInfoToFile),De=()=>{var ce;E.set(!1),(ce=e.returnFocus)==null||ce.call(e)},tt=(ce,Ue)=>{if(!_()||!y())return;let Qe=_().getBoundingClientRect(),st=y().getBoundingClientRect();O(S,ce-st.left),O(I,Ue-st.top),n(S)+Qe.width>st.width&&O(S,st.width-Qe.width),n(I)+Qe.height>st.height&&O(I,st.height-Qe.height),O(S,Math.max(n(S),0),!0),O(I,Math.max(n(I),0),!0)};Ne(()=>{(async()=>{if(_()&&y()){await go();let{top:Ue,left:Qe,bottom:st,right:Dt}=$(),Bt=Qe!=null?Qe:0,ei=Ue!=null?Ue:0,hi=_().getBoundingClientRect();Lu(Qe)&&!Lu(Dt)&&(Bt=Dt-hi.width),Lu(Ue)&&!Lu(st)&&(ei=st-hi.height),Bt=Math.max(Bt,0),ei=Math.max(ei,0),tt(Bt,ei)}})()});let U=()=>{T.actions.internal.videoRotate()},Pe=()=>{cy(e.supportLink)&&window.open(e.supportLink,"_blank"),T.actions.internal.reportProblem(),T.actions.internal.pause()},Ee=()=>{let ce=T.actions.internal.getDebugTextData();if(k.features.saveDebugInfoToFile){let Ue=new Blob([...ce],{type:"plain/text"}),Qe=window.URL.createObjectURL(Ue);Ea(Qe,"vk_player_debug_info","txt")}else Ll(T.actions.internal.getDebugTextData())},He=()=>{let ce=T.actions.internal.getTraceTextData(),Ue=new Blob([...ce],{type:"application/json"}),Qe=window.URL.createObjectURL(Ue);Ea(Qe,"vk_player_trace_info","json")},Xe=()=>{A.set(!0)},ye=async()=>{var ce;try{z()}finally{(ce=e.returnFocus)==null||ce.call(e)}},ke=()=>{T.actions.internal.setLooped(!u())},Be=()=>{var ce,Ue;if(n(P)){let Qe=(Ue=(ce=T.callbacks)==null?void 0:ce.onCopyEmbedCodeClicked)==null?void 0:Ue.call(ce);Qe&&Ll(Qe)}},Nt=(ce=!1)=>{var Ue,Qe;if((Ue=T.callbacks)!=null&&Ue.onCopyVideoLink){let st=(Qe=T.callbacks)==null?void 0:Qe.onCopyVideoLink(ce,m());st&&Ll(st)}},ut=v(()=>k.features.saveDebugInfoToFile?H("menu_save_debug"):H("menu_copy_debug")),Ot=v(()=>n(Re)?{id:"copy-link",weight:jr["copy-link"],label:H("menu_copy_video_link"),onClick:()=>Nt()}:void 0),rt=v(()=>n(pe)?{id:"copy-link-timestamp",weight:jr["copy-link-timestamp"],label:H("menu_copy_video_link_with_timestamp"),onClick:()=>Nt(!0)}:void 0),wt=v(()=>n(P)?{id:"copy-embed-code",weight:jr["copy-embed-code"],label:H("menu_copy_embed_code"),onClick:Be}:void 0),Zt=v(()=>n(ze)?{id:"pip",weight:jr.pip,label:s()?H("menu_pip_close"):H("menu_pip"),onClick:ye}:void 0),Mt=v(()=>n(Te)?{id:"video-loop",weight:jr["video-loop"],label:u()?H("menu_video_loop_off"):H("menu_video_loop_on"),ariaLabel:H("aria_label_menu_loop"),onClick:ke}:void 0),$e=v(()=>n(X)?{id:"rotate",weight:jr.rotate,label:H("menu_video_rotate"),ariaLabel:H("aria_label_menu_rotate"),onClick:U}:void 0),be=v(()=>n(ie)?{id:"report",weight:jr.report,label:H("menu_report"),ariaLabel:`${H("menu_report")}. ${H("aria_label_new_tab_alert")}`,onClick:Pe}:void 0),ee=v(()=>({id:"save-debug",weight:jr["save-debug"],label:n(ut),onClick:Ee})),it=v(()=>n(Oe)?{id:"save-trace",weight:jr["save-trace"],label:H("menu_save_debug"),onClick:He}:void 0),fe=v(()=>({id:"debug-info",weight:jr["debug-info"],label:H("menu_debug_overlay"),ariaLabel:H("aria_label_menu_debug_overlay"),onClick:Xe})),Le=v(()=>[n(Ot),n(rt),n(wt),n(Zt),n(Mt),n($e),n(be),n(ee),n(it),n(fe),...f()].filter(ce=>!!ce).sort(Ma));var _t=Ae(),Et=de(_t);{var dt=ce=>{var Ue=fy();Ue.__contextmenu=[py],Ue.__keydown=[uy,De],bi(Ue,21,()=>n(Le),Qe=>Qe.id,(Qe,st)=>{Of(Qe,{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:De})}),w(Ue),Ye(Ue,Qe=>_(Qe),()=>_()),D(()=>{var Qe,st;return qe(Ue,`top: ${(Qe=n(I))!=null?Qe:""}px; left: ${(st=n(S))!=null?st:""}px;`)}),b(ce,Ue)};R(Et,ce=>{p()&&ce(dt)})}b(t,_t),F(),o()}et(["contextmenu","keydown"]);var Mu=class{constructor(e){this.value=e,this.next=null}};var Rl=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Mu(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 vy=M('<div class="container s-15"><canvas class="s-15"></canvas></div>'),gy={hash:"s-15",code:".container.s-15{display:inline-block;height:16px;width:120px}canvas.s-15{margin-top:2px;transform:scaleY(-1)}"};function Bd(t,e){B(e,!0),Q(t,gy);let i=g(e,"values",19,()=>[]),o=q(void 0),r=q(null),a=16,l=120,d=60,s=l/d;At(()=>{n(o).width=l,n(o).height=a,O(r,n(o).getContext("2d"),!0)});function u(p,$,y,_,S){S===0&&(S=1),p.fillStyle="#fff",p.fillRect($,y,_,S)}Ne(()=>{let p="";if(n(r)){let $=i()[0];for(let _=1;_<i().length;_++)i()[_]>$&&($=i()[_]);n(r).clearRect(0,0,l,a);let y=d-1;for(let _=i().length-1;_>=0;_--){let S=y*s,I=$>0?a*(i()[_]/$):0;u(n(r),S,0,s,I),p=I+" "+p,y--}}});var m=vy(),f=C(m);Ye(f,p=>O(o,p),()=>n(o)),w(m),b(t,m),F()}import{safeStorage as L_}from"@vkontakte/videoplayer-shared/es2018";var hy=(t,e)=>{t.stopPropagation(),L_.remove(Sd),e.set(!1)},_y=M('<div class="s-r"><div class="s-r">Video id</div> <span> </span></div>'),by=M('<div class="s-r"><div class="s-r">VSID</div> <span> </span></div>'),$y=M('<div class="s-r"><div class="s-r">Provider</div> <span> </span></div>'),yy=M('<div class="s-r"><div class="s-r">Streams</div> <span> </span></div>'),xy=M('<div class="s-r"><div class="s-r">Viewport</div> <span> </span></div>'),wy=M('<div class="s-r"><div class="s-r">Video size</div> <span> </span></div>'),Sy=M('<div class="s-r"><div class="s-r">CDN host</div> <span> </span></div>'),Cy=M('<div class="s-r"><div class="s-r">Volume</div> <span> </span></div>'),Ty=M('<div class="s-r"><div class="s-r">Position</div> <span> </span></div>'),Iy=M('<div class="s-r"><div class="s-r">Buffer</div> <span> </span></div>'),Ey=M('<div class="s-r"><div class="s-r">Live latency</div> <span> </span></div>'),ky=M('<div class="s-r"><div class="s-r">Segment</div> <span> </span></div>'),Py=M('<div class="s-r"><div class="s-r">Network</div> <!> <span> </span></div>'),Ay=M('<div class="s-r"><div class="s-r">V bitrate</div> <!> <span> </span></div>'),Ly=M('<div role="region"><button class="close s-r" title="закрыть">[x]</button> <div class="content s-r"><div class="s-r"><div class="s-r">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-r"><div class="s-r">Dropped</div> <span> </span></div> <!> <!> <div class="s-r"><div class="s-r">FPS</div> <!> <span> </span></div></div></div>'),My={hash:"s-r",code:".container.s-r{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-r{left:16px;top:16px}button.close.s-r{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-r{padding:5px}.content.s-r>div:where(.s-r)>div:where(.s-r){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Fd(t,e){B(e,!0),Q(t,My);let[i,o]=Ve(),r=()=>x(d,"$isMobile",i),a=ve(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=q(ai(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),m=q(0),f=q(0),p=q(0),$=new Rl(60),y=new Rl(60),_=new Rl(60),S=q(ai([])),I=q(ai([])),T=q(ai([])),N=G("aria_label_debug_panel");At(()=>{L_.set(Sd,"true"),a.actions.internal.startLogging(),u&&(O(f,u.getVideoPlaybackQuality().droppedVideoFrames,!0),O(m,u.getVideoPlaybackQuality().totalVideoFrames,!0));let $e=window.setInterval(()=>{O(s,a.actions.internal.getDebugPanelData(),!0)},500),be;return u&&(be=window.setInterval(()=>{if(u){O(f,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let ee=u.getVideoPlaybackQuality().totalVideoFrames;O(p,ee-n(m)),O(m,ee,!0),$.push(n(p)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&_.push(n(s).bitrate),O(S,$.getValuesFromBottom(),!0),O(I,y.getValuesFromBottom(),!0),O(T,_.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval($e),be&&clearInterval(be)}});var k=Ly();let E;var A=C(k);A.__click=[hy,l];var W=L(A,2),H=C(W),z=L(C(H),2),Y=C(z,!0);w(z),w(H);var ae=L(H,2);{var j=$e=>{var be=_y(),ee=L(C(be),2),it=C(ee,!0);w(ee),w(be),D(()=>me(it,n(s).id)),b($e,be)};R(ae,$e=>{n(s).id&&$e(j)})}var ne=L(ae,2);{var Z=$e=>{var be=by(),ee=L(C(be),2),it=C(ee,!0);w(ee),w(be),D(()=>me(it,n(s).vsid)),b($e,be)};R(ne,$e=>{n(s).vsid&&$e(Z)})}var we=L(ne,2);{var ue=$e=>{var be=$y(),ee=L(C(be),2),it=C(ee,!0);w(ee),w(be),D(()=>me(it,n(s).provider)),b($e,be)};R(we,$e=>{n(s).provider&&$e(ue)})}var re=L(we,2);{var _e=$e=>{var be=yy(),ee=L(C(be),2),it=C(ee);w(ee),w(be),D(()=>{var fe,Le;return me(it,`Video: ${(fe=n(s).videoCodec||"")!=null?fe:""} ${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"},c_=by;var Ps=new Map;Ps.set(p_.EN,c_);Ps.set(p_.RU,d_);var f_=new Map,kf=({language:t,pack:e,fallback:i})=>{if(Ps.has(t)){let o=Ps.get(t);Ps.set(t,{...o,...e})}else Ps.set(t,e);f_.set(t,i)},Pf=t=>Ps.has(t),Af=(t,e,i,o)=>{var l;let r=Ps.get(t),a=r==null?void 0:r[e];if(u_(a)){let d=(l=f_.get(t))!=null?l:o,s=d?Ps.get(d):void 0;a=s==null?void 0:s[e]}return u_(a)?e+Object.values(i!=null?i:{}).join(" "):i?a.replaceAll(/{(\w+?)}/g,(d,s)=>{var u;return(u=i[s])!=null?u:""}):a},G=(t,e)=>{let{interfaceLanguage$:i}=ve(),o=ge(i),r=Lt();return Af(o,t,e,r.defaultLanguage)};var $y=Ce('<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 kd(t,e){B(e,!1);let i=G("video360");$o(),je(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,r)=>{var a=$y();b(o,a)},$$slots:{default:!0}}),F()}import"@vkontakte/videoplayer-core/es2018";var kl;(function(t){t.fatal="fatal",t.error="error",t.warning="warning",t.log="log",t.info="info",t.debug="debug",t.critical="critical"})(kl||(kl={}));var yy=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,xy=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,wy=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,xu="?",Sy="X-Sentry-Auth",Ty=/^(?:(\w+):)\/\/(?:([\w-]+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Cy(t){if(!t.stack)return null;let e=[],i=t.stack.split(`
|
|
55
|
+
`),o,r;for(let a=0;a<i.length;++a){if(o=yy.exec(i[a]))r={filename:o[2]&&o[2].indexOf("address at ")===0?o[2].substr(11):o[2],function:o[1]||xu,lineno:o[3]?+o[3]:null,colno:o[4]?+o[4]:null};else if(o=wy.exec(i[a]))r={filename:o[2],function:o[1]||xu,lineno:+o[3],colno:o[4]?+o[4]:null};else if(o=xy.exec(i[a]))a===0&&!o[5]&&t.columnNumber!==void 0&&(e[0].column=t.columnNumber+1),r={filename:o[3],function:o[1]||xu,lineno:o[4]?+o[4]:null,colno:o[5]?+o[5]:null};else continue;!r.function&&r.lineno&&(r.function=xu),e.push(r)}return e.length?{value:m_(t),type:t.name,stacktrace:{frames:e.reverse()}}:null}function m_(t){return(t&&t.message||"No error message").split(`
|
|
56
|
+
`).filter(i=>!!i)[0]}function Iy(t){try{let e=Cy(t);if(e)return e}catch(e){}return{value:m_(t),type:t&&t.name,stacktrace:{frames:[]}}}function Ey(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var wu=class{constructor(e){if(e&&e.dsn){let i=Ty.exec(e.dsn),o=i?i.slice(1):[],r=o[5].split("/"),a=r.slice(0,-1).join("/");this.apiUrl=o[0]+"://"+o[3]+(o[4]?":"+o[4]:"")+(a?"/"+a:"")+"/api/"+r.pop()+"/store/",this.authHeader="Sentry sentry_version=7,sentry_key="+o[1]+(o[2]?",sentry_secret="+o[2]:"")}this.environment=e&&e.environment}prepare(e){return{...this.getRequestBlank(),exception:{values:[Iy(e)]}}}report(e){this.send(this.prepare(e))}send(e){!this.apiUrl||!e||this.createRequest(e)}createRequest(e){let i=new XMLHttpRequest;i.open("POST",this.apiUrl,!0),i.setRequestHeader("Content-type","application/json"),i.setRequestHeader(Sy,this.authHeader||""),i.send(JSON.stringify(e))}getRequestBlank(){return{platform:"javascript",event_id:Ey(),sdk:{name:"micro-sentry.javascript.core",version:"0.0.0"},timestamp:Date.now()/1e3,environment:this.environment}}};function v_(t,e){return Object.prototype.toString.call(e)==="[object RegExp]"?e.test(t):typeof e=="string"?t.indexOf(e)!==-1:!1}function ky(){return window}var Su=class t extends wu{constructor(e,i=ky()){super(e),this.options=e,this.window=i,this.destroyed=!1,this._state={};let{plugins:o=[],beforeSend:r=u=>u,beforeBreadcrumb:a=u=>u,blacklistUrls:l=[],ignoreErrors:d=[],release:s=void 0}=this.options||{};this.plugins=o.map(u=>new u(this)),this.beforeSend=r,this.beforeBreadcrumb=a,this.blacklistUrls=l,this.ignoreErrors=d,this.release=s}get state(){return this._state}clearState(){this._state={}}setTags(e){return this.setKeyState("tags",{...e}),this}setTag(e,i){return this.extendState({tags:{[e]:i}}),this}setExtra(e,i){return this.extendState({extra:{[e]:i}}),this}setExtras(e){return this.setKeyState("extra",{...e}),this}setUser(e){return this.setKeyState("user",{...e}),this}clone(){let e=new t({...this.options,plugins:[]});return e.extendState(this.state),e}withScope(e){let i=this.clone();e(i),i.destroy(),this.setBreadcrumbs(void 0)}addBreadcrumb(e){this.extendState({breadcrumbs:[{timestamp:Date.now()/1e3,...this.beforeBreadcrumb(e)}]})}setBreadcrumbs(e){this.setKeyState("breadcrumbs",e)}captureMessage(e,i){this.send({...this.getRequestBlank(),message:e,level:i})}destroy(){this.destroyed=!0,this.plugins.forEach(e=>{e.destroy&&e.destroy()})}isIgnoredError(e){return this.ignoreErrors.length?this.getPossibleEventMessages(e).some(i=>this.ignoreErrors.some(o=>v_(i,o))):!1}getRequestBlank(){return{request:{url:this.window.location.toString(),headers:{"User-Agent":this.window.navigator.userAgent}},...super.getRequestBlank(),sdk:{name:"micro-sentry.javascript.browser",version:"0.0.0"},...this.state}}send(e){this.destroyed||this.isDeniedUrl(e)||this.isIgnoredError(e)||(super.send(this.beforeSend({release:this.release,...e})),this.setBreadcrumbs(void 0))}getPossibleEventMessages(e){if(e.message)return[e.message];if(e.exception)try{let{type:i="",value:o=""}=e.exception.values&&e.exception.values[0]||{};return[`${o}`,`${i}: ${o}`]}catch(i){return[]}return[]}isDeniedUrl(e){if(!this.blacklistUrls.length)return!1;let i=this.getEventFilterUrl(e);return i?this.blacklistUrls.some(o=>v_(i,o)):!1}getEventFilterUrl(e){try{if(e.exception){let i=e.exception.values&&e.exception.values[0].stacktrace&&e.exception.values[0].stacktrace.frames;return i&&i[i.length-1].filename||null}return null}catch(i){return null}}extendState(e){this._state=Object.keys(e).reduce((i,o)=>{let r=this._state[o],a=Array.isArray(r)?r:null,l=e[o],d=Array.isArray(l)?l:null;return{...i,[o]:a||d?[...a||[],...d||[]]:{...typeof r!="string"?r:{},...typeof l!="string"?l:{}}}},this._state)}setKeyState(e,i){this._state[e]=i}};import{isNonNullable as Tu,Subscription as Py}from"@vkontakte/videoplayer-shared/es2018";var Cu=null,Ma=class{constructor(e,i,o={}){!Cu&&e.dsn&&(this.sentryClient=new Su({dsn:e.dsn,environment:i.env}),this.version=i.version,this.sentrySubscription=new Py,this.options=e,this.context=o,Cu=this)}destroy(){var e,i;(e=this.sentryClient)==null||e.destroy(),(i=this.sentrySubscription)==null||i.unsubscribe(),Cu=null}logIError(e,i=!1){e.thrown&&this.report(e.thrown,{fatal:i,errorType:e.id,category:e.category},{message:e.message,errorData:e.data})}report(e,i={},o={}){let{sentryClient:r,context:a,options:l}=this,{sampleRate:d=0,whiteErrorIdList:s,whiteErrorCategoryList:u=[],blackErrorIdList:v,blackErrorCategoryList:p}=l,{errorType:f,category:$}=i;if(Tu($)&&p.includes($)||Tu(f)&&v.includes(f))return;if(Math.random()<=d||Tu($)&&u.includes($)||Tu(f)&&s.includes(f)){Object.keys(i).length&&r.setTags({version:this.version,...i}),(Object.keys(a).length||Object.keys(o).length)&&r.setExtras({...a,...o});try{f&&r.captureMessage(f,i.fatal?kl.fatal:kl.error),r.report(e)}catch(g){console.error(g)}}}static getInstance(){return Cu}};var cs=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(cs||{});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(),g_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,h_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Pd=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},oa=()=>!!Pd(),ku=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},Pu=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},__=t=>{let e=window.screen;return(async r=>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 b_}from"@vkontakte/videoplayer-core/es2018";var $_=()=>({title:G("hotkey_map_modal_title"),closeBtnText:G("hotkey_map_modal_close_btn_text"),groups:[{title:G("hotkey_map_group_title_common"),items:[{description:G("hotkey_map_item_mute_description"),value:G("hotkey_map_item_mute_value")},{description:G("hotkey_map_item_volume_up_description"),value:G("hotkey_map_item_volume_up_value")},{description:G("hotkey_map_item_volume_down_description"),value:G("hotkey_map_item_volume_down_value")},{description:G("hotkey_map_item_pip_description"),value:G("hotkey_map_item_pip_value")},{description:G("hotkey_map_item_full_screen_description"),value:G("hotkey_map_item_full_screen_value")},{description:G("hotkey_map_item_show_context_menu_description"),value:G("hotkey_map_item_show_context_menu_value")},{description:G("hotkey_map_item_show_hotkey_map_description"),value:G("hotkey_map_item_show_hotkey_map_value")}]},{title:G("hotkey_map_group_title_playback"),items:[{description:G("hotkey_map_item_play_toggle_description"),value:G("hotkey_map_item_play_toggle_value")},{description:G("hotkey_map_item_seek_backward_description"),value:G("hotkey_map_item_seek_backward_value")},{description:G("hotkey_map_item_seek_forward_description"),value:G("hotkey_map_item_seek_forward_value")},{description:G("hotkey_map_item_fast_seek_backward_description"),value:G("hotkey_map_item_fast_seek_backward_value")},{description:G("hotkey_map_item_fast_seek_forward_description"),value:G("hotkey_map_item_fast_seek_forward_value")},{description:G("hotkey_map_item_rate_down_description"),value:G("hotkey_map_item_rate_down_value")},{description:G("hotkey_map_item_rate_up_description"),value:G("hotkey_map_item_rate_up_value")},{description:G("hotkey_map_item_prev_frame_description"),value:G("hotkey_map_item_prev_frame_value")},{description:G("hotkey_map_item_next_frame_description"),value:G("hotkey_map_item_next_frame_value")},{description:G("hotkey_map_item_jump_seek_description"),value:G("hotkey_map_item_jump_seek_value")},{description:G("hotkey_map_item_next_video_description"),value:G("hotkey_map_item_next_video_value")},{description:G("hotkey_map_item_prev_video_description"),value:G("hotkey_map_item_prev_video_value")}]},{title:G("hotkey_map_group_title_subtitles"),items:[{description:G("hotkey_map_item_subtitles_toggle_description"),value:G("hotkey_map_item_subtitles_toggle_value")}]},{title:G("hotkey_map_group_title_episodes"),items:[{description:G("hotkey_map_item_prev_episode_description"),value:b_.device.isApple?G("hotkey_map_item_prev_episode_mac_value"):G("hotkey_map_item_prev_episode_pc_value")},{description:G("hotkey_map_item_next_episode_description"),value:b_.device.isApple?G("hotkey_map_item_next_episode_mac_value"):G("hotkey_map_item_next_episode_pc_value")}]}]});import{debounceFn as Ay,ValueSubject as Lf}from"@vkontakte/videoplayer-shared/es2018";var Va=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:Ay(this.onResize.bind(this),300)};this.info={isActive$:new Lf(!1),isEnabled$:new Lf(!1),type:0};this.info.isEnabled$=new Lf(e)}isSupported(){return document.pictureInPictureEnabled}isActive(){return this.info.isActive$.getValue()}setContext(e){this.svelteContext=e}async revealPictureInPicture(){this.isRequested&&(this.removeEventHandlers(),await this.request(),this.addEventHandlers())}async request(){var e;if(!(!this.isSupported()||this.isActive()))try{await((e=this.videoElement)==null?void 0:e.requestPictureInPicture())}catch(i){this.isRequested=!1}}async exit(){!this.isSupported()||!this.isActive()||await document.exitPictureInPicture()}assignPlayerContainer(e){this.isSupported()&&(this.playerContainer=e)}updateVideoElement(){this.isSupported()&&this.exit().finally(()=>{var e;this.removeEventHandlers(),this.videoElement=(e=this.playerContainer)==null?void 0:e.querySelector("video"),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={...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)}async dispose(){this.removeEventHandlers(),await this.exit(),this.info.isActive$.next(!1),this.isRequested=!1}onEnterPictureInPicture(e){var r,a;let o=e.pictureInPictureWindow;o&&(this.info.isActive$.next(!0),this.isRequested=!0,o.addEventListener("resize",this.eventHandlers.resize),(a=(r=this.externalEventHandlers).enterpictureinpicture)==null||a.call(r,e))}onLeavePictureInPicture(e){var r,a;let o=e.pictureInPictureWindow;this.info.isActive$.next(!1),this.isRequested=!1,this.eventHandlers.resize.cancel(),o==null||o.removeEventListener("resize",this.eventHandlers.resize),(a=(r=this.externalEventHandlers).leavepictureinpicture)==null||a.call(r,e)}onResize(e){var i,o;(o=(i=this.externalEventHandlers).resize)==null||o.call(i,e)}setEnabled(e){this.info.isEnabled$.next(e)}};function Ra(t){return t instanceof Va}import{devNull as y_,now as x_}from"@vkontakte/videoplayer-shared/es2018";function Vf(t,e){B(e,!1);let i=ve();At(()=>{i.getAdmanWrapper().startPostroll()}),$o(),F()}import{noop as Vy}from"@vkontakte/videoplayer-shared/es2018";var Ly=Ce('<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>'),My=Ce('<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 Mr(t,e){B(e,!0);let i=h(e,"direction",3,"left"),o=h(e,"useBtnColor",3,!1),r=m(()=>["up","down"].includes(i())),a=m(()=>["right","down"].includes(i())),l=m(()=>`chevron-icon--${i()}`),d=m(()=>(()=>{let v="";return n(a)&&(v+="transform: rotate(180deg);"),v.length?v:void 0})()),s=m(()=>o()?ia:"currentColor"),u=m(()=>n(r)?"7":"16");je(t,{width:"12",get height(){return n(u)},get fill(){return n(s)},get testId(){return n(l)},get style(){return n(d)},children:(v,p)=>{var f=Ae(),$=de(f);{var y=w=>{var C=Ly();b(w,C)},g=w=>{var C=My();b(w,C)};R($,w=>{n(r)?w(y):w(g,!1)})}b(v,f)},$$slots:{default:!0}}),F()}var Ry=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},Ny=M('<div class="skip s-1i"> <!></div>'),Oy=M("<div><!></div>"),Dy={hash:"s-1i",code:".container.s-1i{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-1i{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-1i{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-1i{color:var(--white);cursor:pointer}.skippable.s-1i:hover{color:hsla(0,0%,100%,.75)}"};function Rf(t,e){B(e,!0),q(t,Dy);let[i,o]=Ve(),r=()=>x(u,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"secondsToWatchBeforeSkip",3,0),d=h(e,"skipAd",3,Vy),u=ve().ui.isMobile,v=m(()=>a()>0&&a()>=l());var p=Oy();let f;p.__click=[Ry,v,d];var $=T(p);{var y=w=>{var C=Ny(),I=T(C),N=L(I);Mr(N,{direction:"right"}),S(C),D(k=>me(I,`${k!=null?k:""} `),[()=>G("skip_ads_now")]),b(w,C)},g=w=>{var C=as();D(I=>me(C,I),[()=>G("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),b(w,C)};R($,w=>{n(v)?w(y):w(g,!1)})}S(p),D(w=>f=se(p,1,"container s-1i",null,f,w),[()=>({"container-mobile":r(),skippable:n(v)})]),b(t,p),F(),o()}Xe(["click"]);var By=M('<button class="go-to-site s-1h"> </button>'),Fy={hash:"s-1h",code:"button.go-to-site.s-1h{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 Nf(t,e){B(e,!1),q(t,Fy),$o();var i=By(),o=T(i,!0);S(i),D(r=>me(o,r),[()=>G("visit_advertiser")],_n),b(t,i),F()}var Hy=M('<div class="top-gradient-mobile s-l"></div>'),Uy=M('<div class="container s-l"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),zy={hash:"s-l",code:".container.s-l{height:100%;width:100%}.top-gradient-mobile.s-l{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 Ld(t,e){B(e,!0),q(t,zy);let[i,o]=Ve(),r=()=>x(H,"$canSkipAd",i),a=()=>x(Q,"$adPlaybackState",i),l=()=>x(I,"$isMobile",i),d=()=>x(z,"$adPosition",i),s=()=>x(Y,"$secondsToWatchBeforeSkipAd",i),u=()=>x(C,"$isVideoEnded",i),v=h(e,"adsSlotId",3,void 0),p=h(e,"adsParams",3,void 0),f=h(e,"adsAutoplayParam",3,void 0),$=h(e,"duration",3,0),y=h(e,"adsExternalApi",3,void 0),g=ve(),w=Lt(),C=g.state.isEnded$,I=g.ui.isMobile,N=w.ads.isMobileGoToSiteButton,k=W(void 0),E=W(void 0),A=!1,Q=g.ads.playbackState,H=g.ads.canSkip,z=g.ads.position,Y=g.ads.secondsToWatchBeforeSkip,le=m(()=>r()&&a()!=="inactive"),X=m(()=>l()&&a()!=="inactive"&&N);At(()=>{let P=g.getAdmanWrapper();if(y_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[x_(),v()]}),!v()){P.onAdmanLoadingError();return}let We=()=>{var Ee;let{width:Oe,height:De}=ge(g.ui.playerSize),tt=ge(g.ui.isFullscreen),U=(Ee=f())!=null?Ee:ge(g.ui.isAutoplay),Pe=w.ads.paramsOverride;return{width:Oe,height:De,isFullscreen:tt,isAutoplay:U,adsContainer:n(k),adsVideoElement:n(E),slotId:v(),params:p(),paramsOverride:Pe,duration:$(),externalApi:y()}},Te=async Oe=>{Oe&&await ho();let De=We();await P.initAdman(De),A=!0},j=new AbortController,ie=()=>{j.abort()};return window.AdmanHTML?Te(!0).catch(()=>{P.onAdmanLoadingError()}):P.loadAdman(j.signal).then(()=>Te(!1)).catch(()=>{P.onAdmanLoadingError()}),()=>{y_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[x_(),v()]}),!A&&ie()}});var re=Uy(),Z=T(re);{var we=P=>{var We=Hy();b(P,We)};R(Z,P=>{l()&&P(we)})}var ue=L(Z,2);Ye(ue,P=>O(E,P),()=>n(E));var ne=L(ue,2);{var _e=P=>{Rf(P,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return g.actions.internal.skipAd}})};R(ne,P=>{n(le)&&P(_e)})}var xe=L(ne,2);{var J=P=>{Vf(P,{})};R(xe,P=>{u()&&P(J)})}var Re=L(xe,2);{var pe=P=>{Nf(P,{})};R(Re,P=>{n(X)&&P(pe)})}S(re),Ye(re,P=>O(k,P),()=>n(k)),b(t,re),F(),o()}var Xo=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 Wy=Ce('<path fill="#fff"></path>'),Ky=Ce("<path></path><!>",1);function Md(t,e){let i=h(e,"isActive",3,!1),o=m(()=>i()?"live-active-icon":"live-icon"),r=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(r)},children:(l,d)=>{var s=Ky(),u=de(s),v=L(u);{var p=f=>{var $=Wy();Me($,"d",a),b(f,$)};R(v,f=>{i()&&f(p)})}D(()=>Me(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`)),b(l,s)},$$slots:{default:!0}})}var qy=M('<div class="equalizer s-d"><div class="col s-d"></div> <div class="col s-d"></div> <div class="col s-d"></div></div>'),Qy=M('<div class="live-icon s-d"><!></div>'),Gy=M('<span class="text s-d"> </span>'),Yy=M("<div><!> <!></div>"),jy={hash:"s-d",code:".wrapper.s-d{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-d{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-d{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-d .equalizer:where(.s-d){margin-top:-2px}.equalizer.s-d .col:where(.s-d){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-d .equalizer:where(.s-d) .col:where(.s-d){animation-play-state:running}.equalizer.s-d .col:where(.s-d):first-child{animation-name:s-d-thumb-timer-equalizer-col1;left:0}.equalizer.s-d .col:where(.s-d):nth-child(2){animation-name:s-d-thumb-timer-equalizer-col2;left:3px}.equalizer.s-d .col:where(.s-d):nth-child(3){animation-name:s-d-thumb-timer-equalizer-col3;left:6px}.live-icon.s-d{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-d-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-d-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-d-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-d{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function Vd(t,e){q(t,jy);let i=h(e,"withEqualizer",3,!1),o=h(e,"isLive",3,!1),r=h(e,"isPlaying",3,!1);var a=Yy();let l;var d=T(a);{var s=f=>{var $=qy();b(f,$)};R(d,f=>{i()&&f(s)})}var u=L(d,2);{var v=f=>{var $=Qy(),y=T($);Md(y,{isActive:!0}),S($),b(f,$)},p=f=>{var $=Gy(),y=T($,!0);S($),D(()=>me(y,e.time)),b(f,$)};R(u,f=>{o()?f(v):f(p,!1)})}S(a),D(f=>l=se(a,1,"wrapper s-d",null,l,f),[()=>({live:o(),playing:r()})]),b(t,a)}var Pl=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var Xy=M('<div role="timer" data-testid="thumb-timer"><!></div>'),Zy={hash:"s-o",code:".thumb-timer.s-o{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 Rd(t,e){B(e,!0),q(t,Zy);let[i,o]=Ve(),r=()=>x(v,"$disabled",i),a=h(e,"isHidden",3,!1),l=h(e,"isLive",3,!1),d=h(e,"isPlaying",3,!1),s=Lt(),u=m(()=>Xo(e.duration-e.position)),v=ae(!1);var p=Xy();let f;var $=T(p);Vd($,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(p),Es(p,()=>Pl(a()&&s.features.usePerformanceFix,v,s.disableInvisibleComponentsTimeout)),D(y=>f=se(p,1,"thumb-timer s-o",null,f,y),[()=>({"out-of-flow":r(),hidden:a()})]),b(t,p),F(),o()}var Al=t=>{if(!navigator.clipboard){w_(t);return}navigator.clipboard.writeText(t).catch(()=>w_(t))};function w_(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 d1}from"@vkontakte/videoplayer-core/es2018";import{clientChecker as S_}from"@vkontakte/videoplayer-core/es2018";var Of="focus-hidden";var Vr=t=>{t.stopPropagation(),t.preventDefault()},Df=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Of)},e1=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},t1=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},i1=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},o1=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},T_=t=>t.code==="Escape",n1=t=>t.code==="ArrowLeft",Nd=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},C_=t=>{i1(t)?(Vr(t),t1(t.target)):o1(t)&&(Vr(t),e1(t.target))},sa=t=>!S_.device.isAndroid&&(t==null?void 0:t.detail)===0||S_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Ll=async(t,e,i)=>{await ho(),t&&!t.classList.contains("opened")&&!e&&ge(i)&&(await ho(),i.set(!1),t.focus())},I_=async(t,e,i)=>{await ho(),t&&!e&&ge(i)&&(i.set(!1),t.focus())},Od=async(t,e,i,o=!1)=>{if(await ho(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Of,!i),a==null||a.focus()}},E_=async(t,e)=>{setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)},Au=(t,e)=>{C_(t),Df(t.target),T_(t)&&(Vr(t),e())},Lu=async(t,e)=>{Nd(t,["ArrowRight"])&&(Vr(t),e())},k_=async(t,e,i)=>{if(C_(t),n1(t)){Vr(t),e();return}T_(t)&&(Vr(t),i())},Ml=(t,e)=>{Nd(t)&&(Vr(t),e())},P_=(t,e,i)=>{if(Nd(t))Vr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Vr(t);return}o==="ArrowRight"&&!e&&(i(!0),Vr(t))}},A_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},L_=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 Mu,isValidURL as c1}from"@vkontakte/videoplayer-shared/es2018";var Xr={"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 M_}from"@vkontakte/videoplayer-shared/es2018";var s1=(t,e)=>{Ml(t,()=>e())},a1=M('<li class="item s-1l" role="menuitem" tabindex="0"> </li>'),l1={hash:"s-1l",code:".item.s-1l{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-1l:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function Bf(t,e){B(e,!0),q(t,l1);let i=h(e,"onClick",3,M_),o=h(e,"closeContextMenu",3,M_),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=a1();a.__click=r,a.__keydown=[s1,r];var l=T(a,!0);S(a),D(()=>{var d;Me(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Me(a,"data-testid",e.id),me(l,e.label)}),b(t,a),F()}Xe(["click","keydown"]);var Oa=(t,e)=>t.weight-e.weight;var Dd=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Dd||{});var u1=(t,e)=>{Au(t,e)},p1=t=>{t.preventDefault()},f1=M('<ul role="menu" class="s-q"></ul>'),m1={hash:"s-q",code:"ul.s-q{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 Ff(t,e){B(e,!0),q(t,m1);let[i,o]=Ve(),r=()=>x(we,"$playerPhase",i),a=()=>x(le,"$isLive$",i),l=()=>x(ue,"$isPiPEnabled$",i),d=()=>x(Y,"$chromecastState$",i),s=()=>x(ne,"$pictureInPictureApiIsActive$",i),u=()=>x(Z,"$isLooped$",i),v=()=>x(X,"$positionExact$",i),p=()=>x(Q,"$additionalContextMenuItems$",i),f=h(e,"visible",3,!1),$=h(e,"position",19,()=>({top:0,left:0})),y=h(e,"playerContainerRef",3,void 0),g=h(e,"menuElementRef",15,void 0),w=W(0),C=W(0),I=ve(),{pictureInPicture$:N}=yo(),k=Lt(),E=I.ui.contextMenu.visible$,A=I.ui.debugPanelVisible,Q=I.ui.additionalContextMenuItems$,H=I.ui.t,z=I.actions.internal.togglePictureInPicture,Y=I.state.chromecastState$,le=I.state.isLive$,X=I.state.positionExact$,re=I.state.isInteractive,Z=I.state.looped$,we=I.playerPhase,{isEnabled$:ue,isActive$:ne}=N,_e=m(()=>r()==="video"),xe=m(()=>!!a()&&n(_e)),J=m(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),Re=m(()=>{var ce;return k.features.copyVideoLink&&((ce=I.callbacks)==null?void 0:ce.onCopyVideoLink)}),pe=m(()=>n(Re)&&!n(J)&&!re&&!n(xe)),P=m(()=>{var ce;return!!((ce=I.callbacks)!=null&&ce.onCopyEmbedCodeClicked)}),We=m(()=>l()&&d()!==d1.CONNECTED&&!re&&n(_e)),Te=m(()=>!re&&!n(J)&&!n(xe)),j=m(()=>k.features.videoRotate&&!re&&!n(J)),ie=m(()=>k.showSupport&&!s()),Oe=m(()=>k.features.saveTraceInfoToFile),De=()=>{var ce;E.set(!1),(ce=e.returnFocus)==null||ce.call(e)},tt=(ce,ze)=>{if(!g()||!y())return;let Qe=g().getBoundingClientRect(),at=y().getBoundingClientRect();O(w,ce-at.left),O(C,ze-at.top),n(w)+Qe.width>at.width&&O(w,at.width-Qe.width),n(C)+Qe.height>at.height&&O(C,at.height-Qe.height),O(w,Math.max(n(w),0),!0),O(C,Math.max(n(C),0),!0)};Ne(()=>{(async()=>{if(g()&&y()){await ho();let{top:ze,left:Qe,bottom:at,right:Dt}=$(),Bt=Qe!=null?Qe:0,ti=ze!=null?ze:0,vi=g().getBoundingClientRect();Mu(Qe)&&!Mu(Dt)&&(Bt=Dt-vi.width),Mu(ze)&&!Mu(at)&&(ti=at-vi.height),Bt=Math.max(Bt,0),ti=Math.max(ti,0),tt(Bt,ti)}})()});let U=()=>{I.actions.internal.videoRotate()},Pe=()=>{c1(e.supportLink)&&window.open(e.supportLink,"_blank"),I.actions.internal.reportProblem(),I.actions.internal.pause()},Ee=()=>{let ce=I.actions.internal.getDebugTextData();if(k.features.saveDebugInfoToFile){let ze=new Blob([...ce],{type:"plain/text"}),Qe=window.URL.createObjectURL(ze);La(Qe,"vk_player_debug_info","txt")}else Al(I.actions.internal.getDebugTextData())},Ue=()=>{let ce=I.actions.internal.getTraceTextData(),ze=new Blob([...ce],{type:"application/json"}),Qe=window.URL.createObjectURL(ze);La(Qe,"vk_player_trace_info","json")},Ze=()=>{A.set(!0)},ye=async()=>{var ce;try{z()}finally{(ce=e.returnFocus)==null||ce.call(e)}},ke=()=>{I.actions.internal.setLooped(!u())},Be=()=>{var ce,ze;if(n(P)){let Qe=(ze=(ce=I.callbacks)==null?void 0:ce.onCopyEmbedCodeClicked)==null?void 0:ze.call(ce);Qe&&Al(Qe)}},Nt=(ce=!1)=>{var ze,Qe;if((ze=I.callbacks)!=null&&ze.onCopyVideoLink){let at=(Qe=I.callbacks)==null?void 0:Qe.onCopyVideoLink(ce,v());at&&Al(at)}},pt=m(()=>k.features.saveDebugInfoToFile?H("menu_save_debug"):H("menu_copy_debug")),Ot=m(()=>n(Re)?{id:"copy-link",weight:Xr["copy-link"],label:H("menu_copy_video_link"),onClick:()=>Nt()}:void 0),st=m(()=>n(pe)?{id:"copy-link-timestamp",weight:Xr["copy-link-timestamp"],label:H("menu_copy_video_link_with_timestamp"),onClick:()=>Nt(!0)}:void 0),wt=m(()=>n(P)?{id:"copy-embed-code",weight:Xr["copy-embed-code"],label:H("menu_copy_embed_code"),onClick:Be}:void 0),ei=m(()=>n(We)?{id:"pip",weight:Xr.pip,label:s()?H("menu_pip_close"):H("menu_pip"),onClick:ye}:void 0),Mt=m(()=>n(Te)?{id:"video-loop",weight:Xr["video-loop"],label:u()?H("menu_video_loop_off"):H("menu_video_loop_on"),ariaLabel:H("aria_label_menu_loop"),onClick:ke}:void 0),$e=m(()=>n(j)?{id:"rotate",weight:Xr.rotate,label:H("menu_video_rotate"),ariaLabel:H("aria_label_menu_rotate"),onClick:U}:void 0),be=m(()=>n(ie)?{id:"report",weight:Xr.report,label:H("menu_report"),ariaLabel:`${H("menu_report")}. ${H("aria_label_new_tab_alert")}`,onClick:Pe}:void 0),ee=m(()=>({id:"save-debug",weight:Xr["save-debug"],label:n(pt),onClick:Ee})),it=m(()=>n(Oe)?{id:"save-trace",weight:Xr["save-trace"],label:H("menu_save_debug"),onClick:Ue}:void 0),fe=m(()=>({id:"debug-info",weight:Xr["debug-info"],label:H("menu_debug_overlay"),ariaLabel:H("aria_label_menu_debug_overlay"),onClick:Ze})),Le=m(()=>[n(Ot),n(st),n(wt),n(ei),n(Mt),n($e),n(be),n(ee),n(it),n(fe),...p()].filter(ce=>!!ce).sort(Oa));var bt=Ae(),Et=de(bt);{var ut=ce=>{var ze=f1();ze.__contextmenu=[p1],ze.__keydown=[u1,De],gi(ze,21,()=>n(Le),Qe=>Qe.id,(Qe,at)=>{Bf(Qe,{get id(){return n(at).id},get label(){return n(at).label},get ariaLabel(){return n(at).ariaLabel},get onClick(){return n(at).onClick},closeContextMenu:De})}),S(ze),Ye(ze,Qe=>g(Qe),()=>g()),D(()=>{var Qe,at;return qe(ze,`top: ${(Qe=n(C))!=null?Qe:""}px; left: ${(at=n(w))!=null?at:""}px;`)}),b(ce,ze)};R(Et,ce=>{f()&&ce(ut)})}b(t,bt),F(),o()}Xe(["contextmenu","keydown"]);var Vu=class{constructor(e){this.value=e,this.next=null}};var Vl=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 v1=M('<div class="container s-1g"><canvas class="s-1g"></canvas></div>'),g1={hash:"s-1g",code:".container.s-1g{display:inline-block;height:16px;width:120px}canvas.s-1g{margin-top:2px;transform:scaleY(-1)}"};function Bd(t,e){B(e,!0),q(t,g1);let i=h(e,"values",19,()=>[]),o=W(void 0),r=W(null),a=16,l=120,d=60,s=l/d;At(()=>{n(o).width=l,n(o).height=a,O(r,n(o).getContext("2d"),!0)});function u(f,$,y,g,w){w===0&&(w=1),f.fillStyle="#fff",f.fillRect($,y,g,w)}Ne(()=>{let f="";if(n(r)){let $=i()[0];for(let g=1;g<i().length;g++)i()[g]>$&&($=i()[g]);n(r).clearRect(0,0,l,a);let y=d-1;for(let g=i().length-1;g>=0;g--){let w=y*s,C=$>0?a*(i()[g]/$):0;u(n(r),w,0,s,C),f=C+" "+f,y--}}});var v=v1(),p=T(v);Ye(p,f=>O(o,f),()=>n(o)),S(v),b(t,v),F()}import{safeStorage as V_}from"@vkontakte/videoplayer-shared/es2018";var h1=(t,e)=>{t.stopPropagation(),V_.remove(Sd),e.set(!1)},_1=M('<div class="s-k"><div class="s-k">Video id</div> <span> </span></div>'),b1=M('<div class="s-k"><div class="s-k">VSID</div> <span> </span></div>'),$1=M('<div class="s-k"><div class="s-k">Provider</div> <span> </span></div>'),y1=M('<div class="s-k"><div class="s-k">Streams</div> <span> </span></div>'),x1=M('<div class="s-k"><div class="s-k">Viewport</div> <span> </span></div>'),w1=M('<div class="s-k"><div class="s-k">Video size</div> <span> </span></div>'),S1=M('<div class="s-k"><div class="s-k">CDN host</div> <span> </span></div>'),T1=M('<div class="s-k"><div class="s-k">Volume</div> <span> </span></div>'),C1=M('<div class="s-k"><div class="s-k">Position</div> <span> </span></div>'),I1=M('<div class="s-k"><div class="s-k">Buffer</div> <span> </span></div>'),E1=M('<div class="s-k"><div class="s-k">Live latency</div> <span> </span></div>'),k1=M('<div class="s-k"><div class="s-k">Segment</div> <span> </span></div>'),P1=M('<div class="s-k"><div class="s-k">Network</div> <!> <span> </span></div>'),A1=M('<div class="s-k"><div class="s-k">V bitrate</div> <!> <span> </span></div>'),L1=M('<div role="region"><button class="close s-k" title="закрыть">[x]</button> <div class="content s-k"><div class="s-k"><div class="s-k">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-k"><div class="s-k">Dropped</div> <span> </span></div> <!> <!> <div class="s-k"><div class="s-k">FPS</div> <!> <span> </span></div></div></div>'),M1={hash:"s-k",code:".container.s-k{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-k{left:16px;top:16px}button.close.s-k{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-k{padding:5px}.content.s-k>div:where(.s-k)>div:where(.s-k){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Fd(t,e){B(e,!0),q(t,M1);let[i,o]=Ve(),r=()=>x(d,"$isMobile",i),a=ve(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=W(ai(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),v=W(0),p=W(0),f=W(0),$=new Vl(60),y=new Vl(60),g=new Vl(60),w=W(ai([])),C=W(ai([])),I=W(ai([])),N=G("aria_label_debug_panel");At(()=>{V_.set(Sd,"true"),a.actions.internal.startLogging(),u&&(O(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),O(v,u.getVideoPlaybackQuality().totalVideoFrames,!0));let $e=window.setInterval(()=>{O(s,a.actions.internal.getDebugPanelData(),!0)},500),be;return u&&(be=window.setInterval(()=>{if(u){O(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let ee=u.getVideoPlaybackQuality().totalVideoFrames;O(f,ee-n(v)),O(v,ee,!0),$.push(n(f)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&g.push(n(s).bitrate),O(w,$.getValuesFromBottom(),!0),O(C,y.getValuesFromBottom(),!0),O(I,g.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval($e),be&&clearInterval(be)}});var k=L1();let E;var A=T(k);A.__click=[h1,l];var Q=L(A,2),H=T(Q),z=L(T(H),2),Y=T(z,!0);S(z),S(H);var le=L(H,2);{var X=$e=>{var be=_1(),ee=L(T(be),2),it=T(ee,!0);S(ee),S(be),D(()=>me(it,n(s).id)),b($e,be)};R(le,$e=>{n(s).id&&$e(X)})}var re=L(le,2);{var Z=$e=>{var be=b1(),ee=L(T(be),2),it=T(ee,!0);S(ee),S(be),D(()=>me(it,n(s).vsid)),b($e,be)};R(re,$e=>{n(s).vsid&&$e(Z)})}var we=L(re,2);{var ue=$e=>{var be=$1(),ee=L(T(be),2),it=T(ee,!0);S(ee),S(be),D(()=>me(it,n(s).provider)),b($e,be)};R(we,$e=>{n(s).provider&&$e(ue)})}var ne=L(we,2);{var _e=$e=>{var be=y1(),ee=L(T(be),2),it=T(ee);S(ee),S(be),D(()=>{var fe,Le;return me(it,`Video: ${(fe=n(s).videoCodec||"")!=null?fe:""} ${n(s).hdr?"(HDR)":""}
|
|
57
57
|
&
|
|
58
|
-
Audio: ${(Le=n(s).audioCodec||"")!=null?Le:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),b($e,be)};R(re,$e=>{(n(s).videoCodec||n(s).audioCodec)&&$e(_e)})}var xe=L(re,2);{var J=$e=>{var be=xy(),ee=L(C(be),2),it=C(ee,!0);w(ee),w(be),D(()=>me(it,n(s).viewport)),b($e,be)};R(xe,$e=>{n(s).viewport&&$e(J)})}var Re=L(xe,2);{var pe=$e=>{var be=wy(),ee=L(C(be),2),it=C(ee,!0);w(ee),w(be),D(()=>me(it,n(s).videoSize)),b($e,be)};R(Re,$e=>{n(s).videoSize&&$e(pe)})}var P=L(Re,2);{var ze=$e=>{var be=Sy(),ee=L(C(be),2),it=C(ee,!0);w(ee),w(be),D(()=>me(it,n(s).cdn)),b($e,be)};R(P,$e=>{n(s).cdn&&$e(ze)})}var Te=L(P,2);{var X=$e=>{var be=Cy(),ee=L(C(be),2),it=C(ee);w(ee),w(be),D(()=>{var fe;return me(it,`${(fe=n(s).volume)!=null?fe:""} %`)}),b($e,be)};R(Te,$e=>{n(s).volume&&$e(X)})}var ie=L(Te,2);{var Oe=$e=>{var be=Ty(),ee=L(C(be),2),it=C(ee);w(ee),w(be),D(fe=>me(it,`${fe!=null?fe:""} s`),[()=>n(s).position.toFixed(2)]),b($e,be)};R(ie,$e=>{n(s).position&&$e(Oe)})}var De=L(ie,2);{var tt=$e=>{var be=Iy(),ee=L(C(be),2),it=C(ee);w(ee),w(be),D(fe=>me(it,`${fe!=null?fe:""} s`),[()=>n(s).buffer.toFixed(2)]),b($e,be)};R(De,$e=>{n(s).buffer&&$e(tt)})}var U=L(De,2);{var Pe=$e=>{var be=Ey(),ee=L(C(be),2),it=C(ee);w(ee),w(be),D(fe=>me(it,`${fe!=null?fe:""} s`),[()=>n(s).liveLatency.toFixed(2)]),b($e,be)};R(U,$e=>{n(s).liveLatency&&$e(Pe)})}var Ee=L(U,2);{var He=$e=>{var be=ky(),ee=L(C(be),2),it=C(ee,!0);w(ee),w(be),D(fe=>me(it,fe),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:fe})=>fe).map(({value:fe,title:Le})=>`${Le} ${((fe!=null?fe:0)/1e3).toFixed(2)} s`).join(" & ")]),b($e,be)};R(Ee,$e=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&$e(He)})}var Xe=L(Ee,2),ye=L(C(Xe),2),ke=C(ye);w(ye),w(Xe);var Be=L(Xe,2);{var Nt=$e=>{var be=Py(),ee=L(C(be),2);Bd(ee,{get values(){return n(I)}});var it=L(ee,2),fe=C(it);w(it),w(be),D(Le=>me(fe,`${Le!=null?Le:""} Kbps`),[()=>n(s).speed.toFixed(2)]),b($e,be)};R(Be,$e=>{n(s).speed&&$e(Nt)})}var ut=L(Be,2);{var Ot=$e=>{var be=Ay(),ee=L(C(be),2);Bd(ee,{get values(){return n(T)}});var it=L(ee,2),fe=C(it);w(it),w(be),D(Le=>me(fe,`${Le!=null?Le:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),b($e,be)};R(ut,$e=>{n(s).bitrate&&$e(Ot)})}var rt=L(ut,2),wt=L(C(rt),2);Bd(wt,{get values(){return n(S)}});var Zt=L(wt,2),Mt=C(Zt,!0);w(Zt),w(rt),w(W),w(k),D($e=>{var be,ee;E=se(k,1,"container s-r",null,E,$e),Me(k,"aria-label",N),me(Y,n(s).version),me(ke,`${(be=n(f))!=null?be:""} / ${(ee=n(m))!=null?ee:""} frames`),me(Mt,n(p))},[()=>({"container-mobile":r()})]),b(t,k),F(),o()}et(["click"]);import{noop as Vy}from"@vkontakte/videoplayer-shared/es2018";var Ry=(t,e)=>{t.stopPropagation(),e()()},Ny=M('<div class="close s-z"></div>'),Oy={hash:"s-z",code:'.close.s-z{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-z:hover{opacity:1}.close.s-z:after,.close.s-z:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-z:before{transform:rotate(45deg)}.close.s-z:after{transform:rotate(-45deg)}'};function Es(t,e){B(e,!0),Q(t,Oy);let i=g(e,"onClick",3,Vy);var o=Ny();o.__click=[Ry,i],b(t,o),F()}et(["click"]);import{noop as By}from"@vkontakte/videoplayer-shared/es2018";var pn=t=>`width:${t}px;height:${t}px;`;var Dy=Ce('<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 En(t,e){B(e,!0);let i=v(()=>pn(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,r)=>{var a=Dy();b(o,a)},$$slots:{default:!0}}),F()}var Fy=M('<div class="timer s-10"><canvas class="timer-canvas s-10" width="100" height="100"></canvas> <!></div>'),Hy={hash:"s-10",code:".timer.s-10{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-10:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-10{height:50px;position:absolute;width:50px}"};function Hd(t,e){B(e,!0),Q(t,Hy);let i=g(e,"isRunning",3,!0),o=g(e,"onTimerEnded",3,By),r=5e3,a=q(void 0),l,d,s=0,u;Ne(()=>{i()&&Ct(()=>{d=Date.now(),s=requestAnimationFrame(f)})});let m=()=>{s&&(cancelAnimationFrame(s),s=0)},f=()=>{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(f)):o()())};At(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),un(()=>{m()});var p=Fy(),$=C(p);Ye($,_=>O(a,_),()=>n(a));var y=L($,2);En(y,{get size(){return"24"}}),w(p),b(t,p),F()}var Uy=(t,e,i)=>{e(!1),i()},zy=M('<div class="overlay s-1c"></div> <div class="next-video s-1c"><div class="top s-1c"><div class="caption s-1c"> </div> <!></div> <div class="row s-1c"><div class="column s-1c"><div class="thumb s-1c"><div></div> <!></div></div> <div class="column s-1c"><div class="title s-1c"> </div></div></div></div>',1),Wy={hash:"s-1c",code:".overlay.s-1c{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-1c{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-1c{display:flex;justify-content:space-between}.caption.s-1c{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-1c{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-1c{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-1c{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-1c,.thumb-overlay.s-1c{height:100%;width:100%}.thumb-overlay.s-1c{position:absolute}.thumb-overlay.withOpacity.s-1c{background:var(--black);opacity:.3}.title.s-1c{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Bf(t,e){B(e,!0),Q(t,Wy);let[i,o]=Ve(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=ve(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,m=l.actions.internal.nextVideoAnnouncementShow,f=l.actions.internal.nextVideoAnnouncementClick,p=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),p())},_=()=>{e.clickCloseIcon(),$()};At(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),p())});var S=Ae(),I=de(S);{var T=N=>{var k=zy(),E=L(de(k),2),A=C(E),W=C(A),H=C(W,!0);w(W);var z=L(W,2);Es(z,{onClick:_}),w(A);var Y=L(A,2);Y.__click=[Uy,u,f];var ae=C(Y),j=C(ae),ne=C(j);let Z;var we=L(ne,2);{var ue=J=>{let Re=v(()=>a()&&r());Hd(J,{get isRunning(){return n(Re)},onTimerEnded:y})};R(we,J=>{r()&&J(ue)})}w(j),w(ae);var re=L(ae,2),_e=C(re),xe=C(_e,!0);w(_e),w(re),w(Y),w(E),D((J,Re)=>{me(H,J),qe(j,`background-image: url('${e.thumb}')`),Z=se(ne,1,"thumb-overlay s-1c",null,Z,Re),me(xe,e.title)},[()=>G("end_screen_next_video"),()=>({withOpacity:r()})]),b(N,k)};R(I,N=>{e.isHide||N(T)})}b(t,S),F(),o()}et(["click"]);import{PlaybackState as Va}from"@vkontakte/videoplayer-core/es2018";import{checkNever as qy}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as Qn}from"@vkontakte/videoplayer-statistics/es2018";var Ff=(t,e)=>Math.min(+(t+e).toFixed(2),1),Hf=(t,e)=>Math.max(+(t-e).toFixed(2),0),Vu=(t,e,i)=>{let o=Ff(e,i);e<1&&t.actions.internal.setVolume(o)},Ru=(t,e,i)=>{let o=Hf(e,i);e>0&&t.actions.internal.setVolume(o)};var ta=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:r})=>t?i?!0:(o==null||o(),!1):e?!0:(r==null||r(),!1);function Nu(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var Qy=(t,e)=>{e(t)},Gy=M('<div class="keyboard-controls s-1e" tabindex="-1" role="region"><!></div>'),Yy={hash:"s-1e",code:".keyboard-controls.s-1e{bottom:0;left:0;position:absolute;right:0;top:0}"};function Uf(t,e){var ee,it;B(e,!0),Q(t,Yy);let[i,o]=Ve(),r=()=>x(we,"$disabledControls$",i),a=()=>x(tt,"$isInteractiveTime$",i),l=()=>x(U,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>x(z,"$playbackState$",i),s=()=>x(ze,"$isEnded$",i),u=()=>x(pe,"$doubleForwardAvailable$",i),m=()=>x(Re,"$doubleForwardOn$",i),f=()=>x(Te,"$overlayContainer$",i),p=()=>x(ae,"$adPlaybackState",i),$=()=>x(j,"$positionExact$",i),y=()=>x(ne,"$duration$",i),_=()=>x(Oe,"$isAudioAvailable$",i),S=()=>x(Z,"$volume$",i),I=()=>x(Y,"$canChangePlaybackSpeed$",i),T=()=>x(ue,"$muted$",i),N=()=>x(re,"$currentSubtitle$",i),k=g(e,"nextButtonActive",3,!1),E=g(e,"prevButtonActive",3,!1),A=ve(),W=Lt(),H=A.getLogger().createComponentLog("KeyboardControls component"),z=A.state.playbackState$,Y=A.state.canChangePlaybackSpeed$,ae=A.ads.playbackState,j=A.state.positionExact$,ne=A.state.duration$,Z=A.state.volume$,we=A.ui.controls.disabledControls$,ue=A.state.muted$,re=A.state.currentSubtitle$,_e=A.ui.contextMenu.openedByHotKey$,xe=A.ui.contextMenu.lastActiveElem$,J=A.ui.contextMenu.visible$,Re=A.ui.doubleForwardOn$,pe=A.ui.doubleForwardAvailable$,P=A.ui.contextMenu.position$,ze=A.state.isEnded$,Te=A.ui.overlayContainer$,X=(ee=A.callbacks)==null?void 0:ee.onAudioDoesNotExistHint,ie=(it=A.callbacks)==null?void 0:it.onAudioDisabledHint,Oe=A.state.isAudioAvailable$,De=A.state.isAudioDisabled,tt=A.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:U}=$o(),Pe=0,Ee=!0,He=q(void 0),Xe=fe=>(fe!==Ee&&(Ee=fe,Pe=0),Pe+=1,(W.controls.seekStepKeyboard+W.controls.seekStepKeyboard*Pe)/1e3),ye=!0,ke=({type:fe,repeat:Le,disableDoubleForward:_t})=>{let Et=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&U.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{A.actions.internal.togglePlay();let ce="PLAY";d()===Va.PAUSED?ce="PAUSE":s()&&(ce="REPLAY"),e.showHotKeyHelpers({type:ce})}},dt=fe==="down";if(!u()||_t){dt&&Et(),ye=!0;return}if(dt)ye=!1;else if(ye)return;if(dt){!Le&&e.startDoubleForwardActivationTimer();return}m()||Et(),e.stopDoubleForward(),ye=!0},Be=fe=>{let Le=P_(f());P.set(Le),xe.set(fe.target),_e.set(!0),J.set(!0)},Nt=(fe,Le=!1)=>{var ui,fi;let _t=fe.target,Et=(ui=_t==null?void 0:_t.getAttribute("role"))==null?void 0:ui.includes("menuitem"),dt=_t.classList.contains("btn"),ce=fe.code;if(dt&&ce==="Space")return!1;let Ue=Ih.has(ce);if(Et&&Ue)return!1;let Qe=!Th.has(ce);if(fe.ctrlKey&&Qe||fe.altKey&&Qe||fe.metaKey)return!1;let st=Et&&ce==="Escape";Eh.has(ce)||st||e.hideContextMenu();let Dt=d()===Va.PLAYING||d()===Va.PAUSED,Bt=e.isAds&&(p()==="paused"||p()==="playing"),ei=!Bt&&!r().has("TIMELINE"),hi=fe.shiftKey&&["Digit1","Numpad1"].includes(ce);if(!hi&&!(Dt||Bt))return!1;H({message:`key down, code: ${ce}, isExternal = ${Le}`});let Qi=!1,Vt=()=>{Qi=!0,Le||fe.preventDefault()};if(hi)return Be(fe),Vt(),!0;switch(ce){case"KeyJ":case"ArrowLeft":{if(!ei)break;if(fe.ctrlKey||fe.altKey){let vt=A.actions.internal.getPrevEpisode();A.actions.internal.seekToPrevEpisode(vt),vt&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:vt.text}),Vt()}else{let vt=fe.shiftKey?Xe(!1):W.controls.seekStepKeyboard/1e3,Gt=Math.max($()-vt,0);$()>0&&(A.actions.internal.seekTime(Gt,Qn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:vt.toString()}),Vt())}break}case"KeyL":case"ArrowRight":{if(!ei)break;if(fe.ctrlKey||fe.altKey){let vt=A.actions.internal.getNextEpisode();A.actions.internal.seekToNextEpisode(vt),vt&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:vt.text}),Vt()}else{let vt=fe.shiftKey?Xe(!0):W.controls.seekStepKeyboard/1e3,Gt=Math.min($()+vt,y());Math.round($())<Math.round(y())&&(A.actions.internal.seekTime(Gt,Qn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:vt.toString()}),Vt())}break}case"ArrowUp":{if(ta({isAudioDisabled:De,audioDisabledHintCallback:ie,isAudioAvailable:_(),audioIsNotExistHintCallback:X,isAds:e.isAds})){let vt=S(),Gt=W.controls.volumeStepKeyboard,$i=vt<=1;if(Vu(A,vt,Gt),$i){let Gi=Math.round(Ff(vt,Gt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Gi}})}}Vt();break}case"ArrowDown":{if(ta({isAudioDisabled:De,audioDisabledHintCallback:ie,isAudioAvailable:_(),audioIsNotExistHintCallback:X,isAds:e.isAds})){let vt=S(),Gt=W.controls.volumeStepKeyboard,$i=vt>=0;if(Ru(A,vt,Gt),$i){let Gi=Math.round(Hf(vt,Gt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Gi}})}}Vt();break}case"Comma":{if(fe.shiftKey){if(!m()&&I()){let vt=A.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:vt==null?void 0:vt.displayValue}),Vt()}}else{if(Bt||d()!==Va.PAUSED)break;let vt=Math.max($()-W.controls.seekStepFrame/1e3,0);$()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),A.actions.internal.clearDelayedBufferingCheckTimeout(),A.actions.internal.seekTime(vt,Qn.DOUBLE_TAP),Vt())}break}case"Period":{if(fe.shiftKey){if(!m()&&I()){let vt=A.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:vt==null?void 0:vt.displayValue}),Vt()}}else{if(Bt||d()!==Va.PAUSED)break;let vt=Math.min($()+W.controls.seekStepFrame/1e3,y());$()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),A.actions.internal.clearDelayedBufferingCheckTimeout(),A.actions.internal.seekTime(vt,Qn.DOUBLE_TAP),Vt())}break}case"KeyK":case"Space":ke({type:"down",repeat:fe.repeat,disableDoubleForward:"KeyK"===ce}),Vt();break;case"KeyM":{ta({isAudioDisabled:De,audioDisabledHintCallback:ie,isAudioAvailable:_(),audioIsNotExistHintCallback:X,isAds:e.isAds})&&(e.showHotKeyHelpers({type:T()?"VOLUME":"MUTE"}),A.actions.internal.toggleMuted()),Vt();break}case"KeyF":e.toggleFullscreen(),Vt();break;case"KeyC":A.actions.internal.toggleSubtitle(),N().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(fi=N())==null?void 0:fi.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),Vt();break;case"KeyI":A.actions.internal.togglePictureInPicture(),Vt();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.1,Qn.DOUBLE_TAP),Vt();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.2,Qn.DOUBLE_TAP),Vt();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.3,Qn.DOUBLE_TAP),Vt();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.4,Qn.DOUBLE_TAP),Vt();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.5,Qn.DOUBLE_TAP),Vt();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.6,Qn.DOUBLE_TAP),Vt();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.7,Qn.DOUBLE_TAP),Vt();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.8,Qn.DOUBLE_TAP),Vt();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.9,Qn.DOUBLE_TAP),Vt();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(0,Qn.DOUBLE_TAP),Vt();break;case"Slash":{fe.shiftKey&&W.features.hotKeyMapModal&&(e.showKeyMap(),Vt());break}case"KeyN":fe.shiftKey&&k()&&(A.actions.internal.nextVideoClick(),Vt());break;case"KeyP":fe.shiftKey&&E()&&(A.actions.internal.prevVideoClick(),Vt());break;case"ShiftLeft":case"ShiftRight":Vt();break;case"Tab":case"Escape":case"Enter":break;default:qy(ce);break}return Qi},ut=fe=>{let Le=fe.code;if(fe.ctrlKey||fe.altKey||fe.metaKey)return;let _t=d()===Va.PLAYING||d()===Va.PAUSED,Et=e.isAds&&(p()==="paused"||p()==="playing");if(_t||Et)switch(Le){case"ShiftLeft":case"ShiftRight":Pe=0;break;case"Space":ke({type:"up"});break}},Ot=G("aria_label_video_player"),rt=()=>{var fe;return(fe=n(He))==null?void 0:fe.focus()},wt=()=>n(He)===Nu(),Zt=fe=>fe.type==="keydown"?Nt(fe,!0):(fe.type==="keyup"&&ut(fe),!1);var Mt=Gy();Mt.__keyup=ut,Mt.__keydown=[Qy,Nt];var $e=C(Mt);ii($e,()=>{var fe;return(fe=e.children)!=null?fe:ft}),w(Mt),Ye(Mt,fe=>O(He,fe),()=>n(He)),D(()=>Me(Mt,"aria-label",Ot)),b(t,Mt);var be=F({focus:rt,isFocused:wt,handleExternalKeyboardEvent:Zt});return o(),be}et(["keyup","keydown"]);var jy=M('<div class="container s-p"><div class="dot s-p"></div> <div class="dot s-p"></div> <div class="dot s-p"></div></div>'),Xy={hash:"s-p",code:".container.s-p{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-p:first-child{animation-delay:0s}.dot.s-p:nth-child(2){animation-delay:.18s}.dot.s-p:nth-child(3){animation-delay:.36s}@keyframes s-p-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-p{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-p-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-p+.dot:where(.s-p){margin-left:4px}"};function Ra(t,e){Q(t,Xy);let i=g(e,"style",3,"");var o=jy();D(()=>qe(o,i())),b(t,o)}var Zy=Ce('<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 zf(t,e){je(t,{get fill(){return e.fill},children:(i,o)=>{var r=Zy();b(i,r)},$$slots:{default:!0}})}import{noop as Nl}from"@vkontakte/videoplayer-shared/es2018";var Jy=t=>{t.stopPropagation()},e0=M("<button><!></button>"),t0={hash:"s-1x",code:"button.btn.s-1x{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-1x{width:100%}button.btn--live.s-1x{padding:10px 4px}button.btn-jc-l.s-1x{justify-content:left}button.btn-m.s-1x{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-1x,button.btn-m--play.s-1x{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1x{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1x,button.btn-m--prev.s-1x{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1x{right:calc(100% + 35px)}button.btn-m--next.s-1x{left:calc(100% + 35px)}button.btn.s-1x:disabled{cursor:default;pointer-events:none}button.btn.s-1x:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1x:not(:disabled):hover{opacity:.8}button.pr-0.s-1x{padding-right:0}button.pl-0.s-1x{padding-left:0}"};function zt(t,e){B(e,!0),Q(t,t0);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),f=g(e,"tabIndex",3,0),p=g(e,"click",3,Nl),$=g(e,"focus",3,Nl),y=g(e,"blur",3,Nl),_=v(()=>p()===Nl?null:k=>{k.stopPropagation(),p()(k)}),S=v(()=>$()===Nl?null:k=>{k.preventDefault(),$()()}),I=v(()=>y()===Nl?null:k=>{k.preventDefault(),y()()});var T=e0();T.__pointerdown=[Jy],T.__click=function(...k){var E;(E=n(_))==null||E.apply(this,k)};var N=C(T);ii(N,()=>{var k;return(k=e.children)!=null?k:ft}),w(T),Ye(T,k=>s(k),()=>s()),D(()=>{var k,E,A,W,H,z,Y,ae;se(T,1,`btn ${(k=i())!=null?k:""}`,"s-1x"),qe(T,o()||null),T.disabled=(E=r())!=null?E:null,Me(T,"aria-hidden",(A=l())!=null?A:null),Me(T,"aria-label",(W=d())!=null?W:null),Me(T,"aria-keyshortcuts",(H=u())!=null?H:null),Me(T,"aria-expanded",(z=m())!=null?z:null),Me(T,"data-testid",(Y=a())!=null?Y:null),Me(T,"tabindex",f()),Me(T,"role",e.role),Me(T,"aria-checked",(ae=e.areaChecked)!=null?ae:null)}),mt("focus",T,function(...k){var E;(E=n(S))==null||E.apply(this,k)}),mt("blur",T,function(...k){var E;(E=n(I))==null||E.apply(this,k)}),b(t,T),F()}et(["pointerdown","click"]);var i0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},o0=M('<div class="modal-header s-1m"><h3 class="modal-title s-1m"> </h3> <!></div>'),n0=M('<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>'),r0={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 Wf(t,e){B(e,!0),Q(t,r0);let i=g(e,"showHeader",3,!0),o=g(e,"showCloseCross",3,!0),r=q(void 0),a=q(void 0),{webApi:{focusManager:l}}=ve(),d=G("hotkey_map_modal_close_btn_text");At(()=>{var _;return(_=n(r))==null||_.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var s=n0();s.__keydown=[i0,e];var u=C(s),m=C(u);{var f=_=>{var S=o0(),I=C(S),T=C(I,!0);w(I);var N=L(I,2);{var k=E=>{zt(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(A,W)=>{zf(A,{fill:"currentColor"})},$$slots:{default:!0}})};R(N,E=>{o()&&E(k)})}w(S),D(()=>me(T,e.title)),b(_,S)};R(m,_=>{i()&&_(f)})}var p=L(m,2),$=C(p),y=C($);ii(y,()=>{var _;return(_=e.children)!=null?_:ft}),w($),w(p),Ye(p,_=>O(r,_),()=>n(r)),w(u),Ye(u,_=>O(a,_),()=>n(a)),w(s),b(t,s),F()}et(["keydown"]);var s0=new Set(["BR"]),M_=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;s0.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var a0=M('<li class="hot-key-map-item s-1f"><span class="hot-key-map-item-description s-1f"><!></span> <span class="hot-key-map-item-value s-1f"> </span></li>'),l0=M('<div class="hot-key-map-group s-1f"><h5 class="hot-key-map-group-title s-1f"> </h5> <ul class="hot-key-map-group-items s-1f"></ul></div>'),d0=M('<div class="hot-key-map s-1f"></div>'),c0={hash:"s-1f",code:'.hot-key-map.s-1f{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-1f{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-1f:last-child{border-bottom:none}.hot-key-map-group-title.s-1f{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-1f,.hot-key-map-item.s-1f{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-1f{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-1f{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-1f{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-1f{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-1f,.hot-key-map-item-value.s-1f{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function Kf(t,e){B(e,!1),Q(t,c0);let[i,o]=Ve(),r=()=>x(l,"$data",i),a=ve(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};bo(),Wf(t,{get title(){return r().title},onClose:s,children:(u,m)=>{var f=d0();bi(f,5,()=>r().groups,({title:p,items:$})=>p,(p,$)=>{let y=()=>n($).title,_=()=>n($).items;var S=l0(),I=C(S),T=C(I,!0);w(I);var N=L(I,2);bi(N,5,_,({description:k,value:E})=>E,(k,E)=>{let A=()=>n(E).description,W=()=>n(E).value;var H=a0(),z=C(H),Y=C(z);bd(Y,()=>M_(A())),w(z);var ae=L(z,2),j=C(ae,!0);w(ae),w(H),D(()=>me(j,W())),b(k,H)}),w(N),w(S),D(()=>me(T,y())),b(p,S)}),w(f),b(u,f)},$$slots:{default:!0}}),F(),o()}import{noop as sb}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as eb,PlaybackState as Mm}from"@vkontakte/videoplayer-core/es2018";import{getVideoQualityLabel as $0}from"@vkontakte/videoplayer-shared/es2018";var u0=M('<div class="pillow s-1y"><!></div>'),p0={hash:"s-1y",code:".pillow.s-1y{background-color:#679ff8;color:var(--white);font-size:6px;font-weight:600;-webkit-font-smoothing:antialiased;border-radius:12px;padding:2px 4px}"};function qf(t,e){Q(t,p0);var i=u0(),o=C(i);ii(o,()=>{var r;return(r=e.children)!=null?r:ft}),w(i),D(()=>Me(i,"data-testid",e.testId)),b(t,i)}import{VideoQuality as Ud}from"@vkontakte/videoplayer-shared/es2018";var f0=Ce('<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 Qf(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=f0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=C(o);ii(r,()=>{var a;return(a=e.children)!=null?a:ft}),li(),w(o),b(t,o)}var m0=Ce('<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 Gf(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=m0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=C(o);ii(r,()=>{var a;return(a=e.children)!=null?a:ft}),li(),w(o),b(t,o)}var v0=Ce('<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 Yf(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=v0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);ii(r,()=>{var a;return(a=e.children)!=null?a:ft}),li(),w(o),b(t,o)}var g0=Ce('<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 jf(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=g0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);ii(r,()=>{var a;return(a=e.children)!=null?a:ft}),li(),w(o),b(t,o)}var h0=Ce('<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 Xf(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=h0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img",...i}));var r=C(o);ii(r,()=>{var a;return(a=e.children)!=null?a:ft}),li(),w(o),b(t,o)}var Ou=t=>{switch(t){case Ud.Q_720P:return Yf;case Ud.Q_1080P:return jf;case Ud.Q_1440P:return Xf;case Ud.Q_2160P:return Qf;case Ud.Q_4320P:return Gf}};var _0=Ce('<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 Zf(t,e){je(t,{get testId(){return e.testId},children:(i,o)=>{var r=_0();b(i,r)},$$slots:{default:!0}})}var b0=Ce('<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 Jf(t,e){je(t,{get testId(){return e.testId},children:(i,o)=>{var r=b0();b(i,r)},$$slots:{default:!0}})}var y0=M('<div aria-hidden="true"><!> <!></div>'),x0={hash:"s-1q",code:".icon.s-1q{display:flex;height:24px;position:relative;width:24px}.icon.s-1q .pillow{position:absolute;right:-9px;top:1px}.icon.triple.s-1q .pillow{right:-13px}.icon.s-1q svg[data-testid=settings-icon--labeled] ._full{opacity:0;visibility:hidden}"};function zd(t,e){B(e,!0),Q(t,x0);let i=g(e,"isMobile",3,!1),o=g(e,"currentQuality",3,void 0),r=v(()=>o()?$0(o()):""),a=v(()=>Ou(o())),l=v(()=>n(r).length>2);var d=Ae(),s=de(d);{var u=f=>{Zf(f,{testId:"settings-mobile-icon"})},m=f=>{var p=y0();let $;var y=C(p);{var _=T=>{let N=v(()=>`${n(r)}-pill-icon`);qf(T,{get testId(){return n(N)},children:(k,E)=>{var A=Ae(),W=de(A);Ri(W,()=>n(a),(H,z)=>{z(H,{})}),b(k,A)},$$slots:{default:!0}})};R(y,T=>{n(a)&&T(_)})}var S=L(y,2);let I=v(()=>n(a)?"settings-icon--labeled":"settings-icon");Jf(S,{get testId(){return n(I)}}),w(p),D(T=>$=se(p,1,"icon s-1q",null,$,T),[()=>({triple:n(l)})]),b(f,p)};R(s,f=>{i()?f(u):f(m,!1)})}b(t,d),F()}var w0=M('<span class="settings-icon-wrapper s-1z"><!></span>'),S0={hash:"s-1z",code:".settings-icon-wrapper.s-1z{position:relative;width:24px}"};function Ol(t,e){B(e,!0),Q(t,S0);let[i,o]=Ve(),r=()=>x(u,"$settingsMenuVisible",i),a=()=>x(p,"$isMobile",i),l=()=>x(s,"$currentQuality",i),d=ve(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,m=d.actions.internal.openSettingsMenu,f=d.actions.internal.closeSettingsMenu,p=d.ui.isMobile,$=d.ui.t,y=q(void 0);Ne(()=>{n(y)&&Ct(()=>{e.ref$.set(n(y))})});let _=$("aria_label_settings");async function S(T){let N=ea(T);r()?f():m(N,go)}let I=v(()=>r()?"opened":"");zt(t,{get className(){return n(I)},testId:"settings-btn",click:S,get ariaLabel(){return _},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(T){O(y,T,!0)},children:(T,N)=>{var k=w0(),E=C(k);zd(E,{get isMobile(){return a()},get currentQuality(){return l()}}),w(k),b(T,k)},$$slots:{default:!0}}),F(),o()}var C0=Ce('<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),T0=Ce("<path></path>");function ia(t,e){B(e,!0);let i=v(()=>`subtitles-icon-${e.type==="off"?"off":e.type==="outline"?"outline":""}`),o=v(()=>pn(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:(r,a)=>{var l=Ae(),d=de(l);{var s=m=>{var f=C0();li(),b(m,f)},u=m=>{var f=T0();D(()=>Me(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
|
|
58
|
+
Audio: ${(Le=n(s).audioCodec||"")!=null?Le:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),b($e,be)};R(ne,$e=>{(n(s).videoCodec||n(s).audioCodec)&&$e(_e)})}var xe=L(ne,2);{var J=$e=>{var be=x1(),ee=L(T(be),2),it=T(ee,!0);S(ee),S(be),D(()=>me(it,n(s).viewport)),b($e,be)};R(xe,$e=>{n(s).viewport&&$e(J)})}var Re=L(xe,2);{var pe=$e=>{var be=w1(),ee=L(T(be),2),it=T(ee,!0);S(ee),S(be),D(()=>me(it,n(s).videoSize)),b($e,be)};R(Re,$e=>{n(s).videoSize&&$e(pe)})}var P=L(Re,2);{var We=$e=>{var be=S1(),ee=L(T(be),2),it=T(ee,!0);S(ee),S(be),D(()=>me(it,n(s).cdn)),b($e,be)};R(P,$e=>{n(s).cdn&&$e(We)})}var Te=L(P,2);{var j=$e=>{var be=T1(),ee=L(T(be),2),it=T(ee);S(ee),S(be),D(()=>{var fe;return me(it,`${(fe=n(s).volume)!=null?fe:""} %`)}),b($e,be)};R(Te,$e=>{n(s).volume&&$e(j)})}var ie=L(Te,2);{var Oe=$e=>{var be=C1(),ee=L(T(be),2),it=T(ee);S(ee),S(be),D(fe=>me(it,`${fe!=null?fe:""} s`),[()=>n(s).position.toFixed(2)]),b($e,be)};R(ie,$e=>{n(s).position&&$e(Oe)})}var De=L(ie,2);{var tt=$e=>{var be=I1(),ee=L(T(be),2),it=T(ee);S(ee),S(be),D(fe=>me(it,`${fe!=null?fe:""} s`),[()=>n(s).buffer.toFixed(2)]),b($e,be)};R(De,$e=>{n(s).buffer&&$e(tt)})}var U=L(De,2);{var Pe=$e=>{var be=E1(),ee=L(T(be),2),it=T(ee);S(ee),S(be),D(fe=>me(it,`${fe!=null?fe:""} s`),[()=>n(s).liveLatency.toFixed(2)]),b($e,be)};R(U,$e=>{n(s).liveLatency&&$e(Pe)})}var Ee=L(U,2);{var Ue=$e=>{var be=k1(),ee=L(T(be),2),it=T(ee,!0);S(ee),S(be),D(fe=>me(it,fe),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:fe})=>fe).map(({value:fe,title:Le})=>`${Le} ${((fe!=null?fe:0)/1e3).toFixed(2)} s`).join(" & ")]),b($e,be)};R(Ee,$e=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&$e(Ue)})}var Ze=L(Ee,2),ye=L(T(Ze),2),ke=T(ye);S(ye),S(Ze);var Be=L(Ze,2);{var Nt=$e=>{var be=P1(),ee=L(T(be),2);Bd(ee,{get values(){return n(C)}});var it=L(ee,2),fe=T(it);S(it),S(be),D(Le=>me(fe,`${Le!=null?Le:""} Kbps`),[()=>n(s).speed.toFixed(2)]),b($e,be)};R(Be,$e=>{n(s).speed&&$e(Nt)})}var pt=L(Be,2);{var Ot=$e=>{var be=A1(),ee=L(T(be),2);Bd(ee,{get values(){return n(I)}});var it=L(ee,2),fe=T(it);S(it),S(be),D(Le=>me(fe,`${Le!=null?Le:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),b($e,be)};R(pt,$e=>{n(s).bitrate&&$e(Ot)})}var st=L(pt,2),wt=L(T(st),2);Bd(wt,{get values(){return n(w)}});var ei=L(wt,2),Mt=T(ei,!0);S(ei),S(st),S(Q),S(k),D($e=>{var be,ee;E=se(k,1,"container s-k",null,E,$e),Me(k,"aria-label",N),me(Y,n(s).version),me(ke,`${(be=n(p))!=null?be:""} / ${(ee=n(v))!=null?ee:""} frames`),me(Mt,n(f))},[()=>({"container-mobile":r()})]),b(t,k),F(),o()}Xe(["click"]);import{noop as V1}from"@vkontakte/videoplayer-shared/es2018";var R1=(t,e)=>{t.stopPropagation(),e()()},N1=M('<div class="close s-1e"></div>'),O1={hash:"s-1e",code:'.close.s-1e{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-1e:hover{opacity:1}.close.s-1e:after,.close.s-1e:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-1e:before{transform:rotate(45deg)}.close.s-1e:after{transform:rotate(-45deg)}'};function As(t,e){B(e,!0),q(t,O1);let i=h(e,"onClick",3,V1);var o=N1();o.__click=[R1,i],b(t,o),F()}Xe(["click"]);import{noop as B1}from"@vkontakte/videoplayer-shared/es2018";var ln=t=>`width:${t}px;height:${t}px;`;var D1=Ce('<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 Tn(t,e){B(e,!0);let i=m(()=>ln(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,r)=>{var a=D1();b(o,a)},$$slots:{default:!0}}),F()}var F1=M('<div class="timer s-1d"><canvas class="timer-canvas s-1d" width="100" height="100"></canvas> <!></div>'),H1={hash:"s-1d",code:".timer.s-1d{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-1d:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-1d{height:50px;position:absolute;width:50px}"};function Hd(t,e){B(e,!0),q(t,H1);let i=h(e,"isRunning",3,!0),o=h(e,"onTimerEnded",3,B1),r=5e3,a=W(void 0),l,d,s=0,u;Ne(()=>{i()&&Tt(()=>{d=Date.now(),s=requestAnimationFrame(p)})});let v=()=>{s&&(cancelAnimationFrame(s),s=0)},p=()=>{v(),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()())};At(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),an(()=>{v()});var f=F1(),$=T(f);Ye($,g=>O(a,g),()=>n(a));var y=L($,2);Tn(y,{get size(){return"24"}}),S(f),b(t,f),F()}var U1=(t,e,i)=>{e(!1),i()},z1=M('<div class="overlay s-p"></div> <div class="next-video s-p"><div class="top s-p"><div class="caption s-p"> </div> <!></div> <div class="row s-p"><div class="column s-p"><div class="thumb s-p"><div></div> <!></div></div> <div class="column s-p"><div class="title s-p"> </div></div></div></div>',1),W1={hash:"s-p",code:".overlay.s-p{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-p{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-p{display:flex;justify-content:space-between}.caption.s-p{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-p{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-p{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-p{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-p,.thumb-overlay.s-p{height:100%;width:100%}.thumb-overlay.s-p{position:absolute}.thumb-overlay.withOpacity.s-p{background:var(--black);opacity:.3}.title.s-p{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Hf(t,e){B(e,!0),q(t,W1);let[i,o]=Ve(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=ve(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,v=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,f=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),f())},g=()=>{e.clickCloseIcon(),$()};At(()=>{e.isHide||v(),e.isHide&&r()&&(u(!1),f())});var w=Ae(),C=de(w);{var I=N=>{var k=z1(),E=L(de(k),2),A=T(E),Q=T(A),H=T(Q,!0);S(Q);var z=L(Q,2);As(z,{onClick:g}),S(A);var Y=L(A,2);Y.__click=[U1,u,p];var le=T(Y),X=T(le),re=T(X);let Z;var we=L(re,2);{var ue=J=>{let Re=m(()=>a()&&r());Hd(J,{get isRunning(){return n(Re)},onTimerEnded:y})};R(we,J=>{r()&&J(ue)})}S(X),S(le);var ne=L(le,2),_e=T(ne),xe=T(_e,!0);S(_e),S(ne),S(Y),S(E),D((J,Re)=>{me(H,J),qe(X,`background-image: url('${e.thumb}')`),Z=se(re,1,"thumb-overlay s-p",null,Z,Re),me(xe,e.title)},[()=>G("end_screen_next_video"),()=>({withOpacity:r()})]),b(N,k)};R(C,N=>{e.isHide||N(I)})}b(t,w),F(),o()}Xe(["click"]);import{PlaybackState as Da}from"@vkontakte/videoplayer-core/es2018";import{checkNever as q1}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as Kn}from"@vkontakte/videoplayer-statistics/es2018";var Uf=(t,e)=>Math.min(+(t+e).toFixed(2),1),zf=(t,e)=>Math.max(+(t-e).toFixed(2),0),Ru=(t,e,i)=>{let o=Uf(e,i);e<1&&t.actions.internal.setVolume(o)},Nu=(t,e,i)=>{let o=zf(e,i);e>0&&t.actions.internal.setVolume(o)};var aa=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:r})=>t?i?!0:(o==null||o(),!1):e?!0:(r==null||r(),!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 Q1=(t,e)=>{e(t)},G1=M('<div class="keyboard-controls s-m" tabindex="-1" role="region"><!></div>'),Y1={hash:"s-m",code:".keyboard-controls.s-m{bottom:0;left:0;position:absolute;right:0;top:0}"};function Wf(t,e){var ee,it;B(e,!0),q(t,Y1);let[i,o]=Ve(),r=()=>x(we,"$disabledControls$",i),a=()=>x(tt,"$isInteractiveTime$",i),l=()=>x(U,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>x(z,"$playbackState$",i),s=()=>x(We,"$isEnded$",i),u=()=>x(pe,"$doubleForwardAvailable$",i),v=()=>x(Re,"$doubleForwardOn$",i),p=()=>x(Te,"$overlayContainer$",i),f=()=>x(le,"$adPlaybackState",i),$=()=>x(X,"$positionExact$",i),y=()=>x(re,"$duration$",i),g=()=>x(Oe,"$isAudioAvailable$",i),w=()=>x(Z,"$volume$",i),C=()=>x(Y,"$canChangePlaybackSpeed$",i),I=()=>x(ue,"$muted$",i),N=()=>x(ne,"$currentSubtitle$",i),k=h(e,"nextButtonActive",3,!1),E=h(e,"prevButtonActive",3,!1),A=ve(),Q=Lt(),H=A.getLogger().createComponentLog("KeyboardControls component"),z=A.state.playbackState$,Y=A.state.canChangePlaybackSpeed$,le=A.ads.playbackState,X=A.state.positionExact$,re=A.state.duration$,Z=A.state.volume$,we=A.ui.controls.disabledControls$,ue=A.state.muted$,ne=A.state.currentSubtitle$,_e=A.ui.contextMenu.openedByHotKey$,xe=A.ui.contextMenu.lastActiveElem$,J=A.ui.contextMenu.visible$,Re=A.ui.doubleForwardOn$,pe=A.ui.doubleForwardAvailable$,P=A.ui.contextMenu.position$,We=A.state.isEnded$,Te=A.ui.overlayContainer$,j=(ee=A.callbacks)==null?void 0:ee.onAudioDoesNotExistHint,ie=(it=A.callbacks)==null?void 0:it.onAudioDisabledHint,Oe=A.state.isAudioAvailable$,De=A.state.isAudioDisabled,tt=A.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:U}=yo(),Pe=0,Ee=!0,Ue=W(void 0),Ze=fe=>(fe!==Ee&&(Ee=fe,Pe=0),Pe+=1,(Q.controls.seekStepKeyboard+Q.controls.seekStepKeyboard*Pe)/1e3),ye=!0,ke=({type:fe,repeat:Le,disableDoubleForward:bt})=>{let Et=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&U.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{A.actions.internal.togglePlay();let ce="PLAY";d()===Da.PAUSED?ce="PAUSE":s()&&(ce="REPLAY"),e.showHotKeyHelpers({type:ce})}},ut=fe==="down";if(!u()||bt){ut&&Et(),ye=!0;return}if(ut)ye=!1;else if(ye)return;if(ut){!Le&&e.startDoubleForwardActivationTimer();return}v()||Et(),e.stopDoubleForward(),ye=!0},Be=fe=>{let Le=L_(p());P.set(Le),xe.set(fe.target),_e.set(!0),J.set(!0)},Nt=(fe,Le=!1)=>{var di,pi;let bt=fe.target,Et=(di=bt==null?void 0:bt.getAttribute("role"))==null?void 0:di.includes("menuitem"),ut=bt.classList.contains("btn"),ce=fe.code;if(ut&&ce==="Space")return!1;let ze=kh.has(ce);if(Et&&ze)return!1;let Qe=!Eh.has(ce);if(fe.ctrlKey&&Qe||fe.altKey&&Qe||fe.metaKey)return!1;let at=Et&&ce==="Escape";Ph.has(ce)||at||e.hideContextMenu();let Dt=d()===Da.PLAYING||d()===Da.PAUSED,Bt=e.isAds&&(f()==="paused"||f()==="playing"),ti=!Bt&&!r().has("TIMELINE"),vi=fe.shiftKey&&["Digit1","Numpad1"].includes(ce);if(!vi&&!(Dt||Bt))return!1;H({message:`key down, code: ${ce}, isExternal = ${Le}`});let Wi=!1,Vt=()=>{Wi=!0,Le||fe.preventDefault()};if(vi)return Be(fe),Vt(),!0;switch(ce){case"KeyJ":case"ArrowLeft":{if(!ti)break;if(fe.ctrlKey||fe.altKey){let vt=A.actions.internal.getPrevEpisode();A.actions.internal.seekToPrevEpisode(vt),vt&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:vt.text}),Vt()}else{let vt=fe.shiftKey?Ze(!1):Q.controls.seekStepKeyboard/1e3,Gt=Math.max($()-vt,0);$()>0&&(A.actions.internal.seekTime(Gt,Kn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:vt.toString()}),Vt())}break}case"KeyL":case"ArrowRight":{if(!ti)break;if(fe.ctrlKey||fe.altKey){let vt=A.actions.internal.getNextEpisode();A.actions.internal.seekToNextEpisode(vt),vt&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:vt.text}),Vt()}else{let vt=fe.shiftKey?Ze(!0):Q.controls.seekStepKeyboard/1e3,Gt=Math.min($()+vt,y());Math.round($())<Math.round(y())&&(A.actions.internal.seekTime(Gt,Kn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:vt.toString()}),Vt())}break}case"ArrowUp":{if(aa({isAudioDisabled:De,audioDisabledHintCallback:ie,isAudioAvailable:g(),audioIsNotExistHintCallback:j,isAds:e.isAds})){let vt=w(),Gt=Q.controls.volumeStepKeyboard,hi=vt<=1;if(Ru(A,vt,Gt),hi){let Ki=Math.round(Uf(vt,Gt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Ki}})}}Vt();break}case"ArrowDown":{if(aa({isAudioDisabled:De,audioDisabledHintCallback:ie,isAudioAvailable:g(),audioIsNotExistHintCallback:j,isAds:e.isAds})){let vt=w(),Gt=Q.controls.volumeStepKeyboard,hi=vt>=0;if(Nu(A,vt,Gt),hi){let Ki=Math.round(zf(vt,Gt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Ki}})}}Vt();break}case"Comma":{if(fe.shiftKey){if(!v()&&C()){let vt=A.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:vt==null?void 0:vt.displayValue}),Vt()}}else{if(Bt||d()!==Da.PAUSED)break;let vt=Math.max($()-Q.controls.seekStepFrame/1e3,0);$()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),A.actions.internal.clearDelayedBufferingCheckTimeout(),A.actions.internal.seekTime(vt,Kn.DOUBLE_TAP),Vt())}break}case"Period":{if(fe.shiftKey){if(!v()&&C()){let vt=A.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:vt==null?void 0:vt.displayValue}),Vt()}}else{if(Bt||d()!==Da.PAUSED)break;let vt=Math.min($()+Q.controls.seekStepFrame/1e3,y());$()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),A.actions.internal.clearDelayedBufferingCheckTimeout(),A.actions.internal.seekTime(vt,Kn.DOUBLE_TAP),Vt())}break}case"KeyK":case"Space":ke({type:"down",repeat:fe.repeat,disableDoubleForward:"KeyK"===ce}),Vt();break;case"KeyM":{aa({isAudioDisabled:De,audioDisabledHintCallback:ie,isAudioAvailable:g(),audioIsNotExistHintCallback:j,isAds:e.isAds})&&(e.showHotKeyHelpers({type:I()?"VOLUME":"MUTE"}),A.actions.internal.toggleMuted()),Vt();break}case"KeyF":e.toggleFullscreen(),Vt();break;case"KeyC":A.actions.internal.toggleSubtitle(),N().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(pi=N())==null?void 0:pi.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),Vt();break;case"KeyI":A.actions.internal.togglePictureInPicture(),Vt();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.1,Kn.DOUBLE_TAP),Vt();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.2,Kn.DOUBLE_TAP),Vt();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.3,Kn.DOUBLE_TAP),Vt();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.4,Kn.DOUBLE_TAP),Vt();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.5,Kn.DOUBLE_TAP),Vt();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.6,Kn.DOUBLE_TAP),Vt();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.7,Kn.DOUBLE_TAP),Vt();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.8,Kn.DOUBLE_TAP),Vt();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.9,Kn.DOUBLE_TAP),Vt();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(0,Kn.DOUBLE_TAP),Vt();break;case"Slash":{fe.shiftKey&&Q.features.hotKeyMapModal&&(e.showKeyMap(),Vt());break}case"KeyN":fe.shiftKey&&k()&&(A.actions.internal.nextVideoClick(),Vt());break;case"KeyP":fe.shiftKey&&E()&&(A.actions.internal.prevVideoClick(),Vt());break;case"ShiftLeft":case"ShiftRight":Vt();break;case"Tab":case"Escape":case"Enter":break;default:q1(ce);break}return Wi},pt=fe=>{let Le=fe.code;if(fe.ctrlKey||fe.altKey||fe.metaKey)return;let bt=d()===Da.PLAYING||d()===Da.PAUSED,Et=e.isAds&&(f()==="paused"||f()==="playing");if(bt||Et)switch(Le){case"ShiftLeft":case"ShiftRight":Pe=0;break;case"Space":ke({type:"up"});break}},Ot=G("aria_label_video_player"),st=()=>{var fe;return(fe=n(Ue))==null?void 0:fe.focus()},wt=()=>n(Ue)===Ou(),ei=fe=>fe.type==="keydown"?Nt(fe,!0):(fe.type==="keyup"&&pt(fe),!1);var Mt=G1();Mt.__keyup=pt,Mt.__keydown=[Q1,Nt];var $e=T(Mt);ii($e,()=>{var fe;return(fe=e.children)!=null?fe:mt}),S(Mt),Ye(Mt,fe=>O(Ue,fe),()=>n(Ue)),D(()=>Me(Mt,"aria-label",Ot)),b(t,Mt);var be=F({focus:st,isFocused:wt,handleExternalKeyboardEvent:ei});return o(),be}Xe(["keyup","keydown"]);var j1=M('<div class="container s-x"><div class="dot s-x"></div> <div class="dot s-x"></div> <div class="dot s-x"></div></div>'),X1={hash:"s-x",code:".container.s-x{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-x:first-child{animation-delay:0s}.dot.s-x:nth-child(2){animation-delay:.18s}.dot.s-x:nth-child(3){animation-delay:.36s}@keyframes s-x-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-x{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-x-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-x+.dot:where(.s-x){margin-left:4px}"};function Ba(t,e){q(t,X1);let i=h(e,"style",3,"");var o=j1();D(()=>qe(o,i())),b(t,o)}var Z1=Ce('<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){je(t,{get fill(){return e.fill},children:(i,o)=>{var r=Z1();b(i,r)},$$slots:{default:!0}})}import{noop as Rl}from"@vkontakte/videoplayer-shared/es2018";var J1=t=>{t.stopPropagation()},e0=M("<button><!></button>"),t0={hash:"s-1k",code:"button.btn.s-1k{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-1k{width:100%}button.btn--live.s-1k{padding:10px 4px}button.btn-jc-l.s-1k{justify-content:left}button.btn-m.s-1k{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-1k,button.btn-m--play.s-1k{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1k{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1k,button.btn-m--prev.s-1k{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1k{right:calc(100% + 35px)}button.btn-m--next.s-1k{left:calc(100% + 35px)}button.btn.s-1k:disabled{cursor:default;pointer-events:none}button.btn.s-1k:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1k:not(:disabled):hover{opacity:.8}button.pr-0.s-1k{padding-right:0}button.pl-0.s-1k{padding-left:0}"};function Wt(t,e){B(e,!0),q(t,t0);let i=h(e,"className",3,""),o=h(e,"style",3,""),r=h(e,"disabled",3,void 0),a=h(e,"testId",3,void 0),l=h(e,"ariaHidden",3,void 0),d=h(e,"ariaLabel",3,void 0),s=h(e,"ref",15,void 0),u=h(e,"ariaKeyShortCut",3,void 0),v=h(e,"ariaExpanded",3,void 0),p=h(e,"tabIndex",3,0),f=h(e,"click",3,Rl),$=h(e,"focus",3,Rl),y=h(e,"blur",3,Rl),g=m(()=>f()===Rl?null:k=>{k.stopPropagation(),f()(k)}),w=m(()=>$()===Rl?null:k=>{k.preventDefault(),$()()}),C=m(()=>y()===Rl?null:k=>{k.preventDefault(),y()()});var I=e0();I.__pointerdown=[J1],I.__click=function(...k){var E;(E=n(g))==null||E.apply(this,k)};var N=T(I);ii(N,()=>{var k;return(k=e.children)!=null?k:mt}),S(I),Ye(I,k=>s(k),()=>s()),D(()=>{var k,E,A,Q,H,z,Y,le;se(I,1,`btn ${(k=i())!=null?k:""}`,"s-1k"),qe(I,o()||null),I.disabled=(E=r())!=null?E:null,Me(I,"aria-hidden",(A=l())!=null?A:null),Me(I,"aria-label",(Q=d())!=null?Q:null),Me(I,"aria-keyshortcuts",(H=u())!=null?H:null),Me(I,"aria-expanded",(z=v())!=null?z:null),Me(I,"data-testid",(Y=a())!=null?Y:null),Me(I,"tabindex",p()),Me(I,"role",e.role),Me(I,"aria-checked",(le=e.areaChecked)!=null?le:null)}),rt("focus",I,function(...k){var E;(E=n(w))==null||E.apply(this,k)}),rt("blur",I,function(...k){var E;(E=n(C))==null||E.apply(this,k)}),b(t,I),F()}Xe(["pointerdown","click"]);var i0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},o0=M('<div class="modal-header s-18"><h3 class="modal-title s-18"> </h3> <!></div>'),n0=M('<div class="modal-overlay s-18"><div class="modal-container s-18" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-18" tabindex="0" role="scrollbar"><div class="modal-main s-18"><!></div></div></div></div>'),r0={hash:"s-18",code:'.modal-overlay.s-18{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-18{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-18{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-18{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-18{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-18::-webkit-scrollbar{width:8px}.modal-scroll.s-18::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-18::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-18::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-18{margin:-8px -4px 0 0}'};function qf(t,e){B(e,!0),q(t,r0);let i=h(e,"showHeader",3,!0),o=h(e,"showCloseCross",3,!0),r=W(void 0),a=W(void 0),{webApi:{focusManager:l}}=ve(),d=G("hotkey_map_modal_close_btn_text");At(()=>{var g;return(g=n(r))==null||g.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var s=n0();s.__keydown=[i0,e];var u=T(s),v=T(u);{var p=g=>{var w=o0(),C=T(w),I=T(C,!0);S(C);var N=L(C,2);{var k=E=>{Wt(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(A,Q)=>{Kf(A,{fill:"currentColor"})},$$slots:{default:!0}})};R(N,E=>{o()&&E(k)})}S(w),D(()=>me(I,e.title)),b(g,w)};R(v,g=>{i()&&g(p)})}var f=L(v,2),$=T(f),y=T($);ii(y,()=>{var g;return(g=e.children)!=null?g:mt}),S($),S(f),Ye(f,g=>O(r,g),()=>n(r)),S(u),Ye(u,g=>O(a,g),()=>n(a)),S(s),b(t,s),F()}Xe(["keydown"]);var s0=new Set(["BR"]),R_=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;s0.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var a0=M('<li class="hot-key-map-item s-n"><span class="hot-key-map-item-description s-n"><!></span> <span class="hot-key-map-item-value s-n"> </span></li>'),l0=M('<div class="hot-key-map-group s-n"><h5 class="hot-key-map-group-title s-n"> </h5> <ul class="hot-key-map-group-items s-n"></ul></div>'),d0=M('<div class="hot-key-map s-n"></div>'),c0={hash:"s-n",code:'.hot-key-map.s-n{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-n{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-n:last-child{border-bottom:none}.hot-key-map-group-title.s-n{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-n,.hot-key-map-item.s-n{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-n{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-n{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-n{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-n{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-n,.hot-key-map-item-value.s-n{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,c0);let[i,o]=Ve(),r=()=>x(l,"$data",i),a=ve(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};$o(),qf(t,{get title(){return r().title},onClose:s,children:(u,v)=>{var p=d0();gi(p,5,()=>r().groups,({title:f,items:$})=>f,(f,$)=>{let y=()=>n($).title,g=()=>n($).items;var w=l0(),C=T(w),I=T(C,!0);S(C);var N=L(C,2);gi(N,5,g,({description:k,value:E})=>E,(k,E)=>{let A=()=>n(E).description,Q=()=>n(E).value;var H=a0(),z=T(H),Y=T(z);bd(Y,()=>R_(A())),S(z);var le=L(z,2),X=T(le,!0);S(le),S(H),D(()=>me(X,Q())),b(k,H)}),S(N),S(w),D(()=>me(I,y())),b(f,w)}),S(p),b(u,p)},$$slots:{default:!0}}),F(),o()}import{noop as lb}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as ib,PlaybackState as Rm}from"@vkontakte/videoplayer-core/es2018";import{getVideoQualityLabel as $0}from"@vkontakte/videoplayer-shared/es2018";var u0=M('<div class="pillow s-1y"><!></div>'),p0={hash:"s-1y",code:".pillow.s-1y{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,p0);var i=u0(),o=T(i);ii(o,()=>{var r;return(r=e.children)!=null?r:mt}),S(i),D(()=>Me(i,"data-testid",e.testId)),b(t,i)}import{VideoQuality as Ud}from"@vkontakte/videoplayer-shared/es2018";var f0=Ce('<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=Sn(e,["$$slots","$$events","$$legacy","children"]);var o=f0();eo(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=T(o);ii(r,()=>{var a;return(a=e.children)!=null?a:mt}),ci(),S(o),b(t,o)}var m0=Ce('<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=Sn(e,["$$slots","$$events","$$legacy","children"]);var o=m0();eo(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=T(o);ii(r,()=>{var a;return(a=e.children)!=null?a:mt}),ci(),S(o),b(t,o)}var v0=Ce('<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=Sn(e,["$$slots","$$events","$$legacy","children"]);var o=v0();eo(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img",...i}));var r=T(o);ii(r,()=>{var a;return(a=e.children)!=null?a:mt}),ci(),S(o),b(t,o)}var g0=Ce('<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=Sn(e,["$$slots","$$events","$$legacy","children"]);var o=g0();eo(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img",...i}));var r=T(o);ii(r,()=>{var a;return(a=e.children)!=null?a:mt}),ci(),S(o),b(t,o)}var h0=Ce('<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=Sn(e,["$$slots","$$events","$$legacy","children"]);var o=h0();eo(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img",...i}));var r=T(o);ii(r,()=>{var a;return(a=e.children)!=null?a:mt}),ci(),S(o),b(t,o)}var Du=t=>{switch(t){case Ud.Q_720P:return Xf;case Ud.Q_1080P:return Zf;case Ud.Q_1440P:return Jf;case Ud.Q_2160P:return Yf;case Ud.Q_4320P:return jf}};var _0=Ce('<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){je(t,{get testId(){return e.testId},children:(i,o)=>{var r=_0();b(i,r)},$$slots:{default:!0}})}var b0=Ce('<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){je(t,{get testId(){return e.testId},children:(i,o)=>{var r=b0();b(i,r)},$$slots:{default:!0}})}var y0=M('<div aria-hidden="true"><!> <!></div>'),x0={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 zd(t,e){B(e,!0),q(t,x0);let i=h(e,"isMobile",3,!1),o=h(e,"currentQuality",3,void 0),r=m(()=>o()?$0(o()):""),a=m(()=>Du(o())),l=m(()=>n(r).length>2);var d=Ae(),s=de(d);{var u=p=>{em(p,{testId:"settings-mobile-icon"})},v=p=>{var f=y0();let $;var y=T(f);{var g=I=>{let N=m(()=>`${n(r)}-pill-icon`);Gf(I,{get testId(){return n(N)},children:(k,E)=>{var A=Ae(),Q=de(A);Mi(Q,()=>n(a),(H,z)=>{z(H,{})}),b(k,A)},$$slots:{default:!0}})};R(y,I=>{n(a)&&I(g)})}var w=L(y,2);let C=m(()=>n(a)?"settings-icon--labeled":"settings-icon");tm(w,{get testId(){return n(C)}}),S(f),D(I=>$=se(f,1,"icon s-1v",null,$,I),[()=>({triple:n(l)})]),b(p,f)};R(s,p=>{i()?p(u):p(v,!1)})}b(t,d),F()}var w0=M('<span class="settings-icon-wrapper s-1z"><!></span>'),S0={hash:"s-1z",code:".settings-icon-wrapper.s-1z{position:relative;width:24px}"};function Nl(t,e){B(e,!0),q(t,S0);let[i,o]=Ve(),r=()=>x(u,"$settingsMenuVisible",i),a=()=>x(f,"$isMobile",i),l=()=>x(s,"$currentQuality",i),d=ve(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,v=d.actions.internal.openSettingsMenu,p=d.actions.internal.closeSettingsMenu,f=d.ui.isMobile,$=d.ui.t,y=W(void 0);Ne(()=>{n(y)&&Tt(()=>{e.ref$.set(n(y))})});let g=$("aria_label_settings");async function w(I){let N=sa(I);r()?p():v(N,ho)}let C=m(()=>r()?"opened":"");Wt(t,{get className(){return n(C)},testId:"settings-btn",click:w,get ariaLabel(){return g},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(I){O(y,I,!0)},children:(I,N)=>{var k=w0(),E=T(k);zd(E,{get isMobile(){return a()},get currentQuality(){return l()}}),S(k),b(I,k)},$$slots:{default:!0}}),F(),o()}var T0=Ce('<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),C0=Ce("<path></path>");function la(t,e){B(e,!0);let i=m(()=>`subtitles-icon-${e.type==="off"?"off":e.type==="outline"?"outline":""}`),o=m(()=>ln(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:(r,a)=>{var l=Ae(),d=de(l);{var s=v=>{var p=T0();ci(),b(v,p)},u=v=>{var p=C0();D(()=>Me(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
|
|
59
59
|
${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":""}
|
|
60
|
-
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`)),b(m,f)};R(d,m=>{e.type==="off"?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}}),F()}function em(t,e){B(e,!0);let i=g(e,"isSubtitlesEnabled",3,!1),r=ve().ui.t,a=v(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));zt(t,{testId:"btn-Subtitles",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return us.KeyC},role:"button",children:(l,d)=>{let s=v(()=>i()?void 0:"outline");ia(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),F()}var I0=M('<span class="duration s-21" data-testid="video_duration"> </span>'),E0=M('<div><span class="current s-21" data-testid="current_time"> </span> <!></div>'),k0={hash:"s-21",code:'.time.s-21{align-items:center;color:var(--controls-time);display:flex;font-variant-numeric:tabular-nums;font-weight:500;padding:12px 6px}.time.mobile.s-21{padding:0 0 0 8px}.current.s-21{position:relative}.duration.s-21{opacity:.7}.duration.s-21:before{content:" / ";white-space:pre}'};function Wd(t,e){B(e,!0),Q(t,k0);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=Lt(),d=le(!1),s=v(()=>jo(e.duration)),u=v(()=>jo(e.position));var m=E0();let f;var p=C(m),$=C(p,!0);w(p);var y=L(p,2);{var _=S=>{var I=I0(),T=C(I,!0);w(I),D(()=>me(T,n(s))),b(S,I)};R(y,S=>{r()&&S(_)})}w(m),Ts(m,()=>Al(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),Ye(m,S=>a(S),()=>a()),D(S=>{f=se(m,1,"time s-21",null,f,S),me($,n(u))},[()=>({mobile:i()})]),b(t,m),F()}import{noop as Du}from"@vkontakte/videoplayer-shared/es2018";var P0=Ce('<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),A0=Ce("<path></path>"),L0=Ce('<path d="M14 3.96997C14.5523 3.96997 15 4.41769 15 4.96997V20.97C15 21.5223 14.5523 21.97 14 21.97C13.3585 21.97 12.7422 21.7208 12.2808 21.2751L6.79013 15.97H4C2.89543 15.97 2 15.0745 2 13.97V11.97C2 10.8654 2.89543 9.96997 4 9.96997H6.765L12.2794 4.66337C12.7417 4.21849 13.3584 3.96997 14 3.96997Z"></path><!>',1);function oa(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=v(()=>r(i(),o())),l=v(()=>pn(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";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,m)=>{var f=L0(),p=L(de(f));{var $=_=>{var S=P0();li(),b(_,S)},y=_=>{var S=A0();D(()=>Me(S,"d",`${d}${n(a)==="max"?s:""}`)),b(_,S)};R(p,_=>{n(a)==="off"?_($):_(y,!1)})}b(u,f)},$$slots:{default:!0}}),F()}import{isNonNullable as R_,noop as Gn}from"@vkontakte/videoplayer-shared/es2018";import{noop as im}from"@vkontakte/videoplayer-shared/es2018";import{noop as V0}from"@vkontakte/videoplayer-shared/es2018";var M0=M('<div class="overlay"><!></div>');function tm(t,e){B(e,!0);let[i,o]=Ve(),r=()=>x(l,"$overlayContainer$",i),l=ve().ui.overlayContainer$,d=q(void 0),s=p=>{!p||!n(d)||!p.contains(n(d))||p.removeChild(n(d))},u=p=>{!p||!n(d)||p.contains(n(d))||p.appendChild(n(d))};Ne(()=>{u(r())}),At(()=>(u(r()),()=>s(r())));var m=M0(),f=C(m);ii(f,()=>{var p;return(p=e.children)!=null?p:ft}),w(m),Ye(m,p=>O(d,p),()=>n(d)),b(t,m),F(),o()}var R0=M('<div class="tooltip s-1o"><div class="content s-1o"> </div> <div class="tooltip-pointer s-1o"></div></div>'),N0=M("<div><!></div> <!>",1),O0={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 Na(t,e){B(e,!0),Q(t,O0);let[i,o]=Ve(),r=()=>x(Y,"$overlayContainer$",i),a=()=>x(z,"$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),f=g(e,"isFullWidthWrapper",3,!1),p=g(e,"maxTooltipWidth",3,void 0),$=g(e,"placement",3,"top"),y=g(e,"onVisibilityChange",3,V0),_=5,S=q(void 0),I=q(void 0),T,N=q(0),k=q(0),E=q(0),A=q(0),W=Lt(),H=ve(),z=H.ui.playerSize,Y=H.ui.overlayContainer$;Ne(()=>{Ct(()=>{y()(s())})});let ae=H.getLogger().createComponentLog("Tooltip component"),j=()=>{if(!r()||!n(I)||!n(S))return;O(k,_);let U=r().getBoundingClientRect(),Pe=n(S).getBoundingClientRect(),Ee=Pe.width,He=n(I).clientWidth,Xe=a().width,ye=(Ee-He)/2,ke=Pe.left+u()-U.left,Be=ke+ye,Nt=Pe.top+m()-U.top,ut=He/2-_,Ot=Be<8,rt=Be+He>Xe-8;Ot&&(Be=8,ut=ke+Pe.width/2-2.5*_),rt&&(Be=Xe-8-He,ut=Pe.left-U.left+Pe.width/2-Be-_),O(E,Be,!0),O(A,Nt),O(N,ut,!0)},ne=()=>{!r()||!n(I)||!n(S)||O(k,-_)},Z=()=>{if(!r()||!n(I)||!n(S))return;O(N,_);let U=r().getBoundingClientRect(),Pe=n(S).getBoundingClientRect(),Ee=Pe.height,He=n(I).clientHeight,Xe=(Ee-He)/2+He,ye=Pe.left+u()-U.left-n(I).clientWidth,ke=2,Be=ye-_;Be<8&&(Be=8);let ut=Pe.top+m()-U.top+Xe,Ot=ke-Xe/2,rt=ke-_;O(E,Be,!0),O(A,ut),O(k,Ot),O(N,rt)},we=()=>{!r()||!n(I)||!n(S)||O(N,-_)},ue=()=>{switch($()){case"top":j();break;case"bottom":ne();break;case"left":Z();break;default:we()}},re=()=>{try{if(!r()||!n(S))return;ue(),s(!0)}catch(U){ae({message:String(U)})}},_e=()=>{s(!1)},xe=()=>{n(I)&&(T||(T=window.setTimeout(re,W.controls.hideTimeoutTooltips)),s()&&re())},J=()=>{_e(),window.clearTimeout(T),T=void 0},Re=(U,Pe,Ee)=>{let He="";switch($()){case"top":He=`transform: translate(${U}px, ${Pe}px);`;break;case"bottom":He=`transform: translate(${U}px, ${Pe}px); top: auto; bottom: 100%;`;break;case"left":He=`transform: translate(${U}px, ${Pe}px); left: 0; right: auto;`;break;default:He=`transform: translate(${U}px, ${Pe}px);`}return He+=` max-width: ${p()===void 0?"auto":`${p()}px`};`,He+=` opacity: ${Ee?1:0}; visibility: ${Ee?"visible":"hidden"}`,He},pe=(U,Pe)=>{let Ee="";switch($()){case"top":Ee=`transform: translate(${U}px, ${Pe}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":Ee=`transform: translate(${U}px, ${Pe}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":Ee=`transform: translate(${U}px, ${Pe}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:Ee=`transform: translate(${U}px, ${Pe}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return Ee},P=v(()=>Re(n(E),n(A),s())),ze=v(()=>pe(n(N),n(k)));At(ue),un(()=>window.clearTimeout(T));var Te=N0(),X=de(Te);let ie;X.__pointermove=xe,X.__pointerdown=J,X.__pointerup=function(...U){var Pe;(Pe=e.disableMouseupTooltipShow?void 0:xe)==null||Pe.apply(this,U)};var Oe=C(X);ii(Oe,()=>{var U;return(U=e.children)!=null?U:ft}),w(X),Ye(X,U=>O(S,U),()=>n(S));var De=L(X,2);{var tt=U=>{tm(U,{children:(Pe,Ee)=>{var He=R0(),Xe=C(He),ye=C(Xe,!0);w(Xe);var ke=L(Xe,2);w(He),Ye(He,Be=>O(I,Be),()=>n(I)),D(()=>{qe(He,n(P)),me(ye,d()),qe(ke,n(ze))}),b(Pe,He)},$$slots:{default:!0}})};R(De,U=>{d()&&!l()&&U(tt)})}D(U=>ie=se(X,1,"tooltip-wrapper s-1o",null,ie,U),[()=>({"full-width":f()})]),mt("pointerenter",X,xe),mt("pointerleave",X,J),b(t,Te),F(),o()}et(["pointermove","pointerdown","pointerup"]);var V_=t=>{t.stopPropagation()},D0=M("<div><!></div>"),B0={hash:"s-18",code:".btn-container.s-18{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-18{min-width:0;width:100%}"};function Vo(t,e){B(e,!0),Q(t,B0);let[i,o]=Ve(),r=()=>x(u,"$isGraphOpened$",i),a=()=>x(s,"$isMobile",i),l=ve(),d=$o(),s=l.ui.isMobile,u=d.graphIsOpened$,m=l.ui.t,f=g(e,"className",3,""),p=g(e,"disabled",3,!1),$=g(e,"hasTooltip",3,!0),y=g(e,"ref",15,void 0),_=g(e,"width",15,void 0),S=g(e,"isFullWidthTooltip",3,!0),I=g(e,"tooltipContent",3,""),T=g(e,"tooltipVisible",3,!1),N=g(e,"tooltipPlacement",3,"top"),k=g(e,"disabledTooltipContent",19,()=>m("tooltip_button_disabled")),E=g(e,"isAriaHidden",3,!1),A=g(e,"onTooltipVisibilityChange",3,im),W=g(e,"initialTranslateXPx",3,0),H=g(e,"initialTranslateYPx",19,()=>-18),z=g(e,"mouseEnter",3,im),Y=g(e,"mouseLeave",3,im),ae=v(()=>p()?r()?m("tooltip_disabled_when_graph_on"):k():I()),j=q(!1);Ne(()=>{T()||O(j,!1)});var ne=D0();ne.__pointerdown=[V_],ne.__click=[V_];var Z=C(ne);{var we=re=>{Na(re,{get content(){return n(ae)},get translateX(){return W()},get translateY(){return H()},get isFullWidthWrapper(){return S()},get placement(){return N()},get onVisibilityChange(){return A()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(j)},set active(_e){O(j,_e,!0)},children:(_e,xe)=>{var J=Ae(),Re=de(J);ii(Re,()=>{var pe;return(pe=e.children)!=null?pe:ft}),b(_e,J)},$$slots:{default:!0}})},ue=re=>{var _e=Ae(),xe=de(_e);ii(xe,()=>{var J;return(J=e.children)!=null?J:ft}),b(re,_e)};R(Z,re=>{$()&&n(ae)&&!a()?re(we):re(ue,!1)})}w(ne),Ye(ne,re=>y(re),()=>y()),D(()=>{var re;se(ne,1,`btn-container ${(re=f())!=null?re:""}`,"s-18"),Me(ne,"aria-hidden",E()||null)}),mt("mouseenter",ne,function(...re){var _e;(_e=z())==null||_e.apply(this,re)}),mt("mouseleave",ne,function(...re){var _e;(_e=Y())==null||_e.apply(this,re)}),Tn(ne,"clientWidth",_),b(t,ne),F(),o()}et(["pointerdown","click"]);var F0=Ce('<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 Kd(t,e){let i=v(()=>(e.completed,"interactive-episode-completed-icon"));je(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,r)=>{var a=F0(),l=de(a),d=L(l);D(()=>{Me(l,"fill",js),Me(l,"fill-opacity",e.completed?1:.24),Me(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),b(o,a)},$$slots:{default:!0}})}var H0=M("<div><!></div>"),U0={hash:"s-x",code:".interactive-episode-icon.s-x{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-x{opacity:.4;pointer-events:none}"};function om(t,e){B(e,!0),Q(t,U0);let o=ve().ui.t,r=q(0),a=v(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Vo(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=H0();let u;var m=C(s);let f=v(()=>!!e.videoEpisode.completed);Kd(m,{get completed(){return n(f)}}),w(s),D(p=>{u=se(s,1,"interactive-episode-icon s-x",null,u,p),qe(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),Tn(s,"clientWidth",p=>O(r,p)),b(l,s)},$$slots:{default:!0}}),F()}var z0=M('<div><div class="video-episode-inner s-y"><div class="video-episode-loaded s-y"></div> <div></div></div></div>'),W0=M('<div class="video-episodes-wrap s-y"></div>'),K0={hash:"s-y",code:".video-episodes-wrap.s-y{height:100%;position:absolute;width:100%}.video-episode.s-y{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-y:first-child{padding-left:0}.video-episode.s-y:last-child{padding-right:0}.video-episode.s-y:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-y,.video-episode-inner.s-y,.video-episode-loaded.s-y{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-y{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-y:first-child .video-episode-inner:where(.s-y),.video-episode.s-y:last-child .video-episode-inner:where(.s-y){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-y{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-y,.video-episode-loaded.s-y{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-y{background-color:var(--slider-filled-bg)}"};function nm(t,e){Q(t,K0);let i=g(e,"videoEpisodes",19,()=>[]);var o=W0();bi(o,21,i,r=>r.from,(r,a)=>{var l=z0();let d;var s=C(l),u=C(s),m=L(u,2);let f;w(s),w(l),D((p,$)=>{d=se(l,1,"video-episode s-y",null,d,p),qe(l,`left: ${n(a).from}%; width: ${n(a).width}%`),qe(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),f=se(m,1,"video-episode-filled s-y",null,f,$),qe(m,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),b(r,l)}),w(o),b(t,o)}function q0(t,e,i,o,r,a,l){if(t.preventDefault(),e()&&O(i,e().getBoundingClientRect(),!0),o()||n(r)||!e())return;O(r,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function Q0(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 G0(t,e,i,o,r){if(t.preventDefault(),e()||!n(i))return;O(i,!1);let a=o(t.clientX,t.clientY);r()(a,t)}function Y0(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function j0(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),O(r,!1),a()(l)}var X0=M("<div></div>"),Z0=M('<div class="bars s-n"><div class="loaded s-n"></div> <div></div></div>'),J0=M('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),ex={hash:"s-n",code:'.interactive-icons.s-n{position:absolute;top:-28px;width:calc(100% - 20px)}.interactive-icons.mobile.s-n{top:-10px}.slider.s-n{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-n{cursor:default}.slider.s-n: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-n{background:var(--slider-bg);overflow:hidden}.bars.s-n,.loaded.s-n{border-radius:var(--slider-radius);height:100%;position:absolute;width:100%}.loaded.s-n{background:var(--slider-loaded-bg);left:-100%;transition:transform .2s;will-change:transform}.filled.s-n{background-color:var(--slider-filled-bg);border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.slider.square.s-n,.slider.square.s-n .filled:where(.s-n),.slider.square.s-n .loaded:where(.s-n),.slider.square.s-n>.bars:where(.s-n){border-radius:unset}.filled.active-live.s-n{background-color:var(--timeline-slider-filled-active-live-bg)}.filled.ads.s-n{background-color:var(--slider-filled-ads)}.handleWrap.s-n{left:-100%;position:absolute;width:100%}.handle.s-n{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-n{background-color:var(--timeline-slider-handle-active-live-bg)}.handle-always-visible.s-n .handle:where(.s-n),.slider-dragging.s-n .handle:where(.s-n),.slider.s-n:hover .handle:where(.s-n){opacity:1;transform:scale(1);visibility:visible}.slider-dragging.s-n .handle:where(.s-n){transform:scale(1.3)}.slider-vertical.s-n{left:-8px;position:absolute;top:-18px;transform:rotate(-90deg);transform-origin:0 0}.slider.disabled.s-n{cursor:default;opacity:.4}'};function Oa(t,e){B(e,!0),Q(t,ex);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,()=>[]),f=g(e,"withWheelHandler",3,!1),p=g(e,"isInteractive",3,!1),$=g(e,"disabled",3,!1),y=g(e,"hideHandel",3,!1),_=g(e,"onPointerDown",3,Gn),S=g(e,"onHandleMove",3,Gn),I=g(e,"onPointerUp",3,Gn),T=g(e,"onPointerEnter",3,Gn),N=g(e,"onPointerMove",3,Gn),k=g(e,"onPointerLeave",3,Gn),E=g(e,"onMouseEnter",3,Gn),A=g(e,"onMouseLeave",3,Gn),W=g(e,"onWheelUp",3,Gn),H=g(e,"onWheelDown",3,Gn),z=g(e,"onWheelLeft",3,Gn),Y=g(e,"onWheelRight",3,Gn),ae=g(e,"onDisabledClick",3,Gn),j=g(e,"loadedProgress",3,0),ne=g(e,"filledProgress",3,0),Z=g(e,"handleProgress",3,0),we=g(e,"ariaLabel",3,""),ue=g(e,"ariaValueMin",3,void 0),re=g(e,"ariaValueMax",3,void 0),_e=g(e,"ariaValueNow",3,void 0),xe=g(e,"ariaValueText",3,""),J=g(e,"onContextMenu",3,Gn),Re=g(e,"handleAlwaysVisible",3,!1),pe=Lt(),P=q(void 0),ze=q(!1),Te=v(()=>{var Le;return(Le=re())!=null?Le:0}),X=v(()=>{var Le;return R_(m())&&((Le=m()[m().length-1])==null?void 0:Le.time)<n(Te)}),ie=v(()=>R_(m())&&m().length&&n(X)&&n(Te)?Xe(j()*100,ne()*100):[]);function Oe(Le){if(Le.preventDefault(),i()&&O(P,i().getBoundingClientRect(),!0),$())return;let _t=Ee(Le.clientX,Le.clientY),Et=He(Le.clientX);T()(_t,Et,n(P).width)}function De(Le){Le.preventDefault(),!$()&&k()()}function tt(){E()()}function U(){A()()}function Pe(Le){$()||f()&&(Le.preventDefault(),Le.deltaY<0?W()():Le.deltaY>0?H()():Le.deltaX>0?Y()():z()())}function Ee(Le,_t){return l()?Math.max(0,Math.min(1,(n(P).height-(_t-n(P).top))/n(P).height)):Math.min(Math.max(Le-n(P).x,0),n(P).width)/n(P).width}function He(Le){return Math.min(Math.max(Le-n(P).x,0),n(P).width)}function Xe(Le,_t){let Et=pe.features.episodesClustering&&!p()?pe.episodeMinWidthPc:0,dt=[],ce=m()[0].time/n(Te)*100,Ue=0,Qe=0;for(let Bt=1;Bt<m().length;Bt++)Ue=m()[Bt].time/n(Te)*100,Ue-ce>Et&&(dt.push({from:ce,width:Math.max(0,Ue-ce),loadedWidth:Math.max(0,Math.min(Ue,Le)-ce),filledWidth:Math.max(0,Math.min(Ue,_t)-ce),interactive:m()[Bt-1].interactive,completed:m()[Bt-1].completed}),ce=m()[Bt].time/n(Te)*100,Qe++);let st={from:ce,width:Math.max(0,100-ce),loadedWidth:Math.max(0,Math.min(Le,100)-ce),filledWidth:Math.max(0,Math.min(_t,100)-ce),interactive:m()[Qe].interactive,completed:m()[Qe].completed};100-ce<Et?(Qe-=1,dt[Qe].width+=100-ce,dt[Qe].loadedWidth+=Math.max(0,Math.min(Le,100)-ce),dt[Qe].filledWidth+=Math.max(0,Math.min(_t,100)-ce)):dt[Qe]=st;let Dt=m()[0].time;if(Dt!==0){let Bt=Dt/n(Te)*100;dt.unshift({from:0,width:Bt,loadedWidth:Math.min(Bt,Le),filledWidth:Math.min(Bt,_t)})}return dt}function ye(Le){return Math.max(0,Math.min(100,Le*100))}let ke=v(()=>ye(j())),Be=v(()=>ye(ne()));var Nt=J0(),ut=de(Nt);{var Ot=Le=>{var _t=X0();let Et;bi(_t,21,()=>n(ie),dt=>dt.from,(dt,ce)=>{var Ue=Ae(),Qe=de(Ue);{var st=Dt=>{om(Dt,{get videoEpisode(){return n(ce)},get disabled(){return $()}})};R(Qe,Dt=>{n(ce).interactive&&Dt(st)})}b(dt,Ue)}),w(_t),D(dt=>Et=se(_t,1,"interactive-icons s-n",null,Et,dt),[()=>({mobile:s(),hidden:s()&&!n(ze)})]),b(Le,_t)};R(ut,Le=>{p()&&Le(Ot)})}var rt=L(ut,2);let wt;rt.__pointerdown=[q0,i,P,$,ze,Ee,_],rt.__pointermove=[Q0,$,Ee,He,N,P,ze,S],rt.__pointerup=[G0,$,ze,Ee,I],rt.__click=[Y0,$,ae,Ee],rt.__contextmenu=[j0,Ee,$,ae,ze,J];var Zt=C(rt);{var Mt=Le=>{nm(Le,{get videoEpisodes(){return n(ie)},get disabled(){return $()},get isMobile(){return s()}})},$e=Le=>{var _t=Z0(),Et=C(_t),dt=L(Et,2);let ce;w(_t),D(Ue=>{Me(Et,"data-value",n(ke)),qe(Et,`transform: translateX(${n(ke)}%);`),ce=se(dt,1,"filled s-n",null,ce,Ue),Me(dt,"data-value",n(Be)),qe(dt,`transform: translateX(${n(Be)}%);`)},[()=>({"active-live":d()})]),b(Le,_t)};R(Zt,Le=>{n(ie).length?Le(Mt):Le($e,!1)})}var be=L(Zt,2);let ee;var it=C(be);let fe;w(be),w(rt),Ye(rt,Le=>i(Le),()=>i()),D((Le,_t,Et,dt)=>{var ce,Ue;wt=se(rt,1,`slider ${(ce=o())!=null?ce:""}`,"s-n",wt,Le),Me(rt,"aria-label",we()),Me(rt,"aria-valuemin",ue()),Me(rt,"aria-valuemax",re()),Me(rt,"aria-valuenow",_e()),Me(rt,"aria-valuetext",xe()),Me(rt,"data-testid",(Ue=r())!=null?Ue:null),ee=se(be,1,"handleWrap s-n",null,ee,_t),qe(be,Et),fe=se(it,1,"handle s-n",null,fe,dt)},[()=>({disabled:$(),"slider-dragging":n(ze),hidden:a(),"handle-always-visible":Re(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${ye(Z())}%);`,()=>({"active-live":d()})]),mt("pointerenter",rt,Oe),mt("pointerleave",rt,De),mt("mouseenter",rt,tt),mt("mouseleave",rt,U),mt("wheel",rt,Pe),b(t,Nt),F()}et(["pointerdown","pointermove","pointerup","click","contextmenu"]);var eo=(t,e)=>Id[t]>=Id[e];var ks=(t,e)=>Id[t]<=Id[e],N_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var ix=M("<div><!></div>"),ox=M("<div><!> <!></div>"),nx={hash:"s-28",code:".volumeBar-container.s-28{align-items:center;display:flex}.vertical.s-28 .btn,.vertical.s-28 .tooltip-wrapper,.volumeBar-container.vertical.s-28{width:40px}.volumeBar.s-28{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-28{padding:0 8px 0 0;width:0}"};function rm(t,e){var He,Xe;B(e,!0),Q(t,nx);let[i,o]=Ve(),r=()=>x(N,"$isAudioAvailable$",i),a=()=>x(p,"$muted$",i),l=()=>x(f,"$volume$",i),d=()=>x(S,"$currentGridType$",i),s=()=>x(Oe,"$controlsVisible",i),u=ve(),m=Lt(),f=u.state.volume$,p=u.state.muted$,{setVolume:$,startVolumeChanging:y,stopVolumeChanging:_}=u.actions.internal,S=u.ui.currentGridType$,I=(He=u.callbacks)==null?void 0:He.onAudioDoesNotExistHint,T=(Xe=u.callbacks)==null?void 0:Xe.onAudioDisabledHint,N=u.state.isAudioAvailable$,k=u.state.isAudioDisabled,E=u.ui.t,A=q(!1),W,H=v(()=>e.isAds||r()),z=v(()=>!n(H)||a()||l()===0),Y=v(()=>ks(d(),"l")),ae=v(()=>n(Y)?"":n(z)?!r()||k?E("tooltip_sound_unavailable"):E("tooltip_volume"):E("tooltip_volume_muted")),j=v(()=>n(z)?E("tooltip_volume"):E("tooltip_volume_muted")),ne=v(()=>n(z)?0:l()),Z=!1,we=v(()=>e.isAds?!1:k?!T:r()?!1:!I);function ue(ye){y(),$(ye)}function re(){Vu(u,l(),m.controls.volumeStepWheel)}function _e(){Ru(u,l(),m.controls.volumeStepWheel)}function xe(ye){$(ye)}function J(ye){$(ye),_()}function Re(){Z=!0}function pe(){Z=!1,Te()}function P(){clearTimeout(W),O(A,!0)}function ze(){Te()}function Te(){W=window.setTimeout(()=>{Z||O(A,!1)},m.controls.volumeBarTimeout)}function X(ye){ye.preventDefault(),ye.deltaY<0?re():ye.deltaY>0&&_e()}let ie=q(!1),Oe=u.ui.controlsVisible;Ne(()=>{s()||O(ie,!1)});var De=ox();let tt;var U=C(De);Na(U,{get content(){return n(ae)},translateY:-18,get active(){return n(ie)},set active(ye){O(ie,ye,!0)},children:(ye,ke)=>{let Be=v(()=>n(Y)?"btn-volume-vertical":"btn-volume-horizontal");zt(ye,{className:"btn-full-opacity",get disabled(){return n(we)},get testId(){return n(Be)},get ariaLabel(){return n(j)},get click(){return e.click},get ariaKeyShortCut(){return us.KeyM},role:"button",children:(Nt,ut)=>{oa(Nt,{get size(){return"24"},get volume(){return l()},get muted(){return n(z)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var Pe=L(U,2);{var Ee=ye=>{var ke=ix();let Be;var Nt=C(ke);let ut=v(()=>n(Y)?"volumeBar-slider-vertical":""),Ot=v(()=>n(Y)&&!n(A)),rt=v(()=>n(Y)?Re:Du),wt=v(()=>n(Y)?pe:Du),Zt=v(()=>Math.round(n(ne)*100)),Mt=v(()=>`${Math.round(n(ne)*100)}%`),$e=v(()=>n(Y)?"volume-slider-vertical":"volume-slider");Oa(Nt,{get className(){return n(ut)},get isHidden(){return n(Ot)},get isVertical(){return n(Y)},withWheelHandler:!0,onWheelUp:re,onWheelDown:_e,onPointerDown:ue,onHandleMove:xe,onPointerUp:J,get onPointerEnter(){return n(rt)},get onPointerLeave(){return n(wt)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(Zt)},get ariaValueText(){return n(Mt)},get filledProgress(){return n(ne)},get handleProgress(){return n(ne)},get testId(){return n($e)}}),w(ke),D(be=>Be=se(ke,1,"volumeBar s-28",null,Be,be),[()=>({"volumeBar-vertical":n(Y)})]),b(ye,ke)};R(Pe,ye=>{n(H)&&ye(Ee)})}w(De),D(ye=>tt=se(De,1,"volumeBar-container s-28",null,tt,ye),[()=>({vertical:n(Y)})]),mt("mouseenter",De,function(...ye){var ke;(ke=n(Y)?P:Du)==null||ke.apply(this,ye)}),mt("mouseleave",De,function(...ye){var ke;(ke=n(Y)?ze:Du)==null||ke.apply(this,ye)}),mt("wheel",De,X),b(t,De),F(),o()}import{noop as ax}from"@vkontakte/videoplayer-shared/es2018";var rx=Ce('<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>'),sx=Ce('<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 sm(t,e){let i=g(e,"isFullscreen",8,!1),o=yn(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");je(t,{get testId(){return n(o)},children:(r,a)=>{var l=Ae(),d=de(l);{var s=m=>{var f=rx();b(m,f)},u=m=>{var f=sx();b(m,f)};R(d,m=>{i()?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}})}function qd(t,e){B(e,!0);let i=g(e,"isFullscreen",3,!1),o=g(e,"click",3,ax),r=ve(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=v(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));zt(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let m=ea(u);a.set(m),o()()},get ariaKeyShortCut(){return us.KeyF},role:"button",children:(u,m)=>{sm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),F()}var lx=Ce('<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 am(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=lx();Ji(o,()=>({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=C(o);ii(r,()=>{var a;return(a=e.children)!=null?a:ft}),li(),w(o),b(t,o)}var dx=Ce('<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 lm(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=dx();Ji(o,()=>({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=C(o);ii(r,()=>{var a;return(a=e.children)!=null?a:ft}),li(6),w(o),b(t,o)}var cx={hash:"s-2a",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 dm(t,e){B(e,!0),Q(t,cx);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=v(()=>!o()&&!i()?91:i()?l:95),s=v(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=v(()=>`0 0 ${n(d)} 24`);lm(t,{get width(){return n(d)},height:"24",get viewBox(){return n(u)},get"data-testid"(){return n(s)},get"data-logo"(){return r()}}),F()}function Qd(t,e){B(e,!0);let[i,o]=Ve(),r=()=>x($,"$isMobile",i),a=()=>x(p,"$currentGridType$",i),l=()=>x(_,"$isCyrillicRelatedInterface$",i),d=g(e,"ref",15,void 0),s=g(e,"logoClickable",3,!1),u=g(e,"targetUrl",3,""),m=Lt(),f=ve(),p=f.ui.currentGridType$,$=f.ui.isMobile,y=f.ui.t,_=f.isCyrillicRelatedInterface$,S=v(()=>m.logoType!=="vk"),I=v(()=>n(S)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),T=v(()=>(r()&&ks(a(),"m")||ks(a(),"l"))&&n(S)),N=()=>{var A,W;e.click(),(A=f.callbacks)!=null&&A.onLogoClicked?(W=f.callbacks)==null||W.onLogoClicked():u()&&window.open(u(),"_blank")},k=v(()=>!s()),E=v(()=>n(S)?"btn-vk-video-logo":"btn-vk-logo");zt(t,{className:"btn-full-opacity",get disabled(){return n(k)},click:N,get testId(){return n(E)},get ariaLabel(){return n(I)},get ref(){return d()},set ref(A){d(A)},children:(A,W)=>{var H=Ae(),z=de(H);{var Y=j=>{dm(j,{get logo(){return m.logoType},get short(){return n(T)},get isCyrillic(){return l()}})},ae=j=>{am(j,{})};R(z,j=>{n(S)?j(Y):j(ae,!1)})}b(A,H)},$$slots:{default:!0}}),F(),o()}import{ChromecastState as mx}from"@vkontakte/videoplayer-core/es2018";import{ChromecastState as D_}from"@vkontakte/videoplayer-core/es2018";var ux=Ce('<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-w"></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-w"></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-w"></path>',1),px=Ce('<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),fx={hash:"s-w",code:".animated.s-w{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-w{animation-name:s-w-wave1}.wave2.animated.s-w{animation-name:s-w-wave2}.wave3.animated.s-w{animation-name:s-w-wave3}@keyframes s-w-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-w-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-w-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function Gd(t,e){B(e,!0),Q(t,fx);let i=g(e,"isMobile",3,!1),o=v(()=>e.iconState===D_.CONNECTED),r=v(()=>e.iconState===D_.CONNECTING),a=v(()=>n(o)?"#2688EB":js),l=v(()=>e.size?pn(e.size):void 0);var d=Ae(),s=de(d);{var u=f=>{je(f,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(p,$)=>{var y=ux();li(2),b(p,y)},$$slots:{default:!0}})},m=f=>{je(f,{get style(){return n(l)},testId:"chromecast-icon",children:(p,$)=>{var y=px(),_=de(y);let S;var I=L(_);let T;var N=L(I);let k;var E=L(N);let A;var W=L(E);let H;D((z,Y,ae,j,ne)=>{S=se(_,0,"wave2 s-w",null,S,z),T=se(I,0,"wave3 s-w",null,T,Y),k=se(N,0,"wave1 s-w",null,k,ae),A=se(E,0,"s-w",null,A,j),H=se(W,0,"s-w",null,H,ne)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:n(o)}),()=>({hidden:!n(o)})]),b(p,y)},$$slots:{default:!0}})};R(s,f=>{i()?f(u):f(m,!1)})}b(t,d),F()}import{noop as vx}from"@vkontakte/videoplayer-shared/es2018";function Yd(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"click",3,vx),l=ve().ui.t,d=v(()=>e.state===mx.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)=>{Gd(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),F()}import{noop as hx}from"@vkontakte/videoplayer-shared/es2018";var gx=Ce('<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 cm(t){je(t,{testId:"episodes-icon",children:(e,i)=>{var o=gx();li(2),b(e,o)},$$slots:{default:!0}})}var Bu=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var _x=M('<span class="text mobile s-24"> </span> <div class="chevron-episodes s-24" data-testid="btn-episodes_icon"><!></div>',1),bx=M('<span class="text s-24"> </span>'),$x=M('<span class="text count s-24"> </span>'),yx=M('<span class="icon s-24"><!></span> <!>',1),xx={hash:"s-24",code:".icon.s-24{flex-shrink:0}.text.s-24{overflow:hidden;padding:0 8px;text-overflow:ellipsis;white-space:nowrap}.text.count.s-24{overflow:visible}.text.mobile.s-24{padding:0 3px 0 4px}.chevron-episodes.s-24{margin-bottom:-6px;opacity:.7;transform:scale(.8)}"};function jd(t,e){var Z,we,ue;B(e,!0),Q(t,xx);let[i,o]=Ve(),r=()=>x(y,"$currentGridType$",i),a=()=>x(_,"$openedByKeyboard$",i),l=()=>x(S,"$panelOpened$",i),d=()=>x(I,"$isMobile",i),s=g(e,"position",3,0),u=g(e,"duration",3,0),m=g(e,"timeCodes",19,()=>[]),f=ve(),p=(we=(Z=f.callbacks)==null?void 0:Z.onEpisodeChanged)!=null?we:hx,$=!!((ue=f.callbacks)!=null&&ue.onEpisodeClicked),y=f.ui.currentGridType$,_=f.ui.episodes.openedByKeyboard$,S=f.ui.episodes.panelOpened$,I=f.ui.isMobile,T=f.ui.t,N=q(void 0),k=re=>{var xe,J,Re;if(!!((xe=f.callbacks)!=null&&xe.onEpisodeClicked)){let pe=ea(re);_.set(pe),S.set(!0),(Re=(J=f.callbacks)==null?void 0:J.onEpisodeClicked)==null||Re.call(J,pe)}},E=q(null),A=v(()=>s()/u());Ne(()=>{var _e;let re=Bu(n(A),u(),m());re?((_e=n(E))==null?void 0:_e.time)!==re.time&&(p(re),O(E,re,!0)):O(E,null)});let W=v(()=>{var re;return((re=n(E))==null?void 0:re.text)||""}),H=v(()=>eo(r(),"xl")?"FULL":eo(r(),"m")?"COUNT":"SHORT"),z=v(()=>`${T("tooltip_episodes")}: ${n(W)}`),Y=async(re,_e,xe)=>{await go(),(re==null?void 0:re.getAttribute("aria-expanded"))==="false"&&_e&&!xe&&Ct(()=>{_.set(!1),re.focus()})};Ne(()=>{Y(n(N),a(),l())});var ae=Ae(),j=de(ae);{var ne=re=>{let _e=v(()=>d()?"px-0":""),xe=v(()=>!$);zt(re,{get className(){var J;return`w-max btn-full-opacity btn-jc-l ${(J=n(_e))!=null?J:""}`},testId:"btn-episodes",click:k,get disabled(){return n(xe)},get ariaExpanded(){return l()},get ariaLabel(){return n(z)},get ref(){return n(N)},set ref(J){O(N,J,!0)},children:(J,Re)=>{var pe=Ae(),P=de(pe);{var ze=X=>{var ie=_x(),Oe=de(ie),De=C(Oe,!0);w(Oe);var tt=L(Oe,2),U=C(tt);kr(U,{direction:"right"}),w(tt),D(()=>me(De,n(W))),b(X,ie)},Te=X=>{var ie=yx(),Oe=de(ie),De=C(Oe);cm(De,{}),w(Oe);var tt=L(Oe,2);{var U=Ee=>{var He=bx(),Xe=C(He,!0);w(He),D(()=>me(Xe,n(W))),b(Ee,He)},Pe=(Ee,He)=>{{var Xe=ye=>{var ke=$x(),Be=C(ke,!0);w(ke),D(()=>me(Be,m().length)),b(ye,ke)};R(Ee,ye=>{n(H)==="COUNT"&&ye(Xe)},He)}};R(tt,Ee=>{n(H)==="FULL"?Ee(U):Ee(Pe,!1)})}b(X,ie)};R(P,X=>{d()?X(ze):X(Te,!1)})}b(J,pe)},$$slots:{default:!0}})};R(j,re=>{n(E)&&re(ne)})}b(t,ae),F(),o()}import{debounceFn as tb}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as Ax,PlaybackState as Fl,Player as Lx,PredefinedQualityLimits as vs,VideoFormat as Zd,clientChecker as W_}from"@vkontakte/videoplayer-core/es2018";import{assertNonNullable as gr,getHighestQuality as Mx,InterfaceLanguage as Vx,isInvariantQuality as Rx,isNonNullable as Nx,loadVKLangPack as Ox,Logger as Dx,map as K_,merge as Bx,Observable as qu,Subject as Jd,Subscription as gm,TracerFactory as Fx,ValueSubject as Hx,VideoQuality as Ux,devNull as zx,now as Wx,filter as Kx,once as qx}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as As}from"@vkontakte/videoplayer-statistics/es2018";import{detectEmbed as wx,devNull as ni,isNonNullable as Sx,now as ri}from"@vkontakte/videoplayer-shared/es2018";import{addScript as Cx,Subject as fn,clearVideoElement as Tx}from"@vkontakte/videoplayer-shared/es2018";var Ix="//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 fn,loadStarted$:new fn,loadEnded$:new fn,loadError$:new fn,ready$:new fn,slotRequested$:new fn,started$:new fn,timeRemained$:new fn,paused$:new fn,resumed$:new fn,ended$:new fn,empty$:new fn,skipped$:new fn,clicked$:new fn,closed$:new fn,error$:new fn};this.loadAdman=e=>(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[ri()]}),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?(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[ri()]}),i(),this.events.loadEnded$.next()):(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[ri()]}),o())};Cx(Ix,e,this.loadTimeout).then(()=>{ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[ri()]}),window.AdmanHTML?(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[ri()]}),i(),this.events.loadEnded$.next()):(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[ri()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[ri()]}),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?(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[ri()]}),i(),this.events.loadEnded$.next()):(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[ri()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[ri()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[ri()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[ri()]}),!d&&(window.AdmanHTML?(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[ri()]}),i(),this.events.loadEnded$.next()):(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[ri()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[ri()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[ri(),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?ge(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;ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),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;ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),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(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[ri()]}),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;ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),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;ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),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")=>{ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[ri()]}),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"),ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[ri()]}),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")}async initAdman(e){var N,k;if(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[ri(),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:f}=e;this.externalApi=f;let p,$=this.playerState&&ge(this.playerState.vsid);$&&(this.isVsidOriginal?p=$:p=parseInt($,36));let{isEmbed:y,immediateOrigin:_}=wx(),S=(N=y?_:window.location.href)!=null?N:window.location.href,I={...s,dl:encodeURIComponent(S),autoplay:r?1:0,player_width:i,player_height:o,...p?{request_id:p}:{},duration:m,...u};I=Object.fromEntries(Object.entries(I).filter(([E,A])=>Sx(A)));let T={slot:d,wrapper:a,videoEl:l,videoQuality:o,params:I,browser:{mobile:!1}};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),(k=this.externalApi)!=null&&k.videoGetAds){let A=await this.safeExternalCall(this.externalApi.videoGetAds,I);A&&(delete T.slot,delete T.params,Object.assign(T,{json:A}))}E.init(T),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(T)}`})}catch(E){ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[ri()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){var o,r,a;if(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[ri()]}),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(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),this.adsState){this.log({message:"toggle play"});let i=ge(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(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[ri()]}),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(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),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(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),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(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),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(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),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,f,p;ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[ri()]}),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),(f=this.adman)==null||f.onError(void 0),(p=this.adman)==null||p.destroy(),this.videoElement&&Tx(this.videoElement),this.isDestroyed=!0}async safeExternalCall(e,...i){var o;try{return await e(...i)}catch(r){return this.onAdError((o=r==null?void 0:r.message)!=null?o:"External call failed"),null}}};var B_=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 um=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 Hu,{startTime:m,endTime:f}=u.parse(s);l.startTime=m,l.endTime=f}else if(s.trim()!==""){let u=new pm,{texts:m}=u.parse(s);l.texts=[...l.texts,...m]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},Hu=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}},pm=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,f)=>{let p=l.indexOf(f,d);return m===-1||m>p?p:m},-1);if(u===-1){s.push(l.substring(d));break}s.push(l.substring(d,u)),d=u+1}return s}}),a=new Hu;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}},F_=um;import{isNonNullable as fm}from"@vkontakte/videoplayer-shared/es2018";var Da,ki,mm=0,vm=!1,H_="",U_=(t,e=0,i=0)=>t<e&&t<i,Uu=(t,e=0,i=0)=>t>=e&&t<=i,Ex=(t,e=0,i=0)=>t>e&&t>i,z_=(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})=>Uu(t,u,m));let a=t>=mm,l=t<mm;if(mm=t,l&&(vm=!1),fm(Da)&&Uu(t,Da.startTime,Da.endTime)&&H_===e.value)return Da;if(!fm(ki)&&(r!=null&&r.length)&&!vm){ki=r.find(({startTime:u,endTime:m})=>Uu(t,u,m)||a&&U_(t,u,m)),Da=void 0,!fm(ki)&&r[r.length-1].endTime<t&&(vm=!0);return}else{if(Uu(t,ki==null?void 0:ki.startTime,ki==null?void 0:ki.endTime))return Da=ki,ki=void 0,H_=e.value,Da;(a&&Ex(t,ki==null?void 0:ki.startTime,ki==null?void 0:ki.endTime)||l&&U_(t,ki==null?void 0:ki.startTime,ki==null?void 0:ki.endTime))&&(ki=void 0)}};var zu={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"},kx={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"},Xd=t=>{var e,i;return(i=(e=zu[t])!=null?e:zu[kx[t]])!=null?i:void 0};import{Subscription as Px}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-statistics/es2018";var Wu=class{constructor(e,i,o,r=new Px){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 Ku=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(Ku||{});var ms=t=>t!=null?t:0,Ps=(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(ms(i==null?void 0:i.top)-ms(o==null?void 0:o.top)),left:Math.round(ms(i==null?void 0:i.left)-ms(o==null?void 0:o.left)),bottom:Math.round(ms(i==null?void 0:i.bottom)-ms(o==null?void 0:o.top)),right:Math.round(ms(i==null?void 0:i.right)-ms(o==null?void 0:o.left))}},Dl=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:ms(e==null?void 0:e.width),height:ms(e==null?void 0:e.height)}};var kn="off";var Bl=t=>!!(Math.round(Math.abs(t)/90)%2);var q_=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:m,previewThumbsData:f,uiConfig:p,coreConfig:$,player:y,disabledControls:_,isInteractive:S,interactiveRanges$:I,isInteractiveTime$:T,replayInteractive:N,stopPlayer:k,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:A,additionalButtons:W,additionalSettingsMenuItems:H,additionalContextMenuItems:z,playPrevVideo:Y,playNextVideo:ae,onVideoChanged:j,looped:ne=!1,statistics:Z,saveRate:we,internalsExposure:ue,playerView:re,playerId:_e})=>{var Nv,Ov,Dv;let xe={...$,configName:[...(Nv=$.configName)!=null?Nv:[],"ui"],isAudioDisabled:l,live:{...(Ov=$.live)!=null?Ov:{},isLiveCatchUpMode:!!r}},J=p,Re=Fx.createRootTracer(J.features.tracer),pe=Re.createComponentTracer("Store"),P=y||new Lx(xe,Re,{playerId:_e,onDevNullLog:s==null?void 0:s.onDevNullLog});ue==null||ue.expose({corePlayer:P});let ze=new Dx,Te=new Fu(ze,{loadTimeout:J.ads.loadTimeout,initTimeout:J.ads.initTimeout,runtimeTimeout:J.ads.runtimeTimeout,useAdmanFromNPM:J.ads.useAdmanFromNPM,volumeMultiplier:J.ads.volumeMultiplier,isVsidOriginal:J.ads.isVsidOriginal}),X=ka.getInstance(),ie=u==null?void 0:u.pictureInPictureApi,Oe=u==null?void 0:u.annotationsApi,De=u==null?void 0:u.slotsApi,tt=u==null?void 0:u.focusManager,U=ze.createComponentLog("Store"),Pe,Ee,He={},Xe=new mu,ye=new gm,ke="",Be=le(!1),Nt=Z&&Z.oneStat?oi(Z.oneStat.vsid$):Er(void 0),ut=le(Xs()),Ot=le(!1),rt=()=>m_(document,W_.device.isIOS),wt=(Dv=ie==null?void 0:ie.info.isActive$)!=null?Dv:new Hx(!1),Zt=le(0),Mt=le(!1),$e=le(!1),be=le([]),ee=Bx(P.events.fatalError$,P.events.managedError$).subscribe(c=>be.update(h=>[...h,c])),it=Er(!1,c=>{let h=P.events.fatalError$.subscribe(()=>c(!0));return()=>h.unsubscribe()}),fe=async c=>{var oe;let h=Object.values(Vx).includes(c);if(J.downloadVKLanguages&&(h&&J.updateBuiltinLanguages||!Ef(c))){let Se;try{Se=await Ox(c,Sh,Ch)}catch(Je){(oe=Z==null?void 0:Z.oneStat)==null||oe.logError({errorType:"VKLangPack",fatal:!1}),X==null||X.report(Je,{errorType:"VKLangPack",fatal:!1})}Se&&(If({language:c,pack:Se,fallback:J.defaultLanguage}),Le.set(c),_t.update(Je=>Je+1))}Ef(c)&&Le.set(c)},Le=le(t),_t=le(0),Et=le(e);fe(t);let dt=(c,h)=>{let V=ge(Le);return kf(V,c,h,J.defaultLanguage)},ce=le("thumb");ce.subscribe(c=>{c==="ads"&&P.info.playbackState$.getValue()&&st()});let Ue=(()=>{let c=pi([it,ce],([h,V])=>h?"crashed":V);return{...c,is:h=>ge(c)===h}})(),Qe=le(),st=()=>{Qe.set({muted:P.info.muted$.getValue()})},Dt=(()=>{let c=le(new Set(_));return{...c,add:h=>{c.update(V=>new Set([...V].concat(h)))},remove:h=>{c.update(V=>{let oe=[...V];return new Set(Array.isArray(h)?oe.filter(Se=>!h.includes(Se)):oe.filter(Se=>Se!==h))})},includes:h=>{let V=ge(c);return Array.isArray(h)?h.every(oe=>V.has(oe)):V.has(h)}}})(),Bt=le({width:0,height:0}),ei=null,hi=P.info.isBuffering$,Qi=Er(hi.getValue(),c=>{let h=hi.subscribe(V=>{V&&ei===null?ei=window.setTimeout(()=>{c(hi.getValue()),ei=null},J.loaderDelay):c(V)});return()=>{h.unsubscribe(),ei&&clearTimeout(ei)}});pe.log("create store"),U({message:"create store"});let Vt=c=>{let h=c.container,V=()=>{jt=new MutationObserver(Se=>{let{removedNodes:Je}=Se[0];Je.length&&h.append(P.experimental.element$.getValue())}),jt.observe(h,{childList:!0})},oe=P.experimental.element$.getValue();if(oe)h.append(oe),V();else{let Se=P.experimental.element$.pipe(Kx(Je=>!!Je),qx()).subscribe(Je=>{h.append(Je),V()});ye.add(Se)}},ui=c=>{U({message:`init video, config: ${JSON.stringify(c)}`}),S?Vt(c):(zx.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[Wx()]}),P.initVideo(c)),pe.log("init video",{isInteractive:S}),c.subtitles&&P.setExternalTextTracks(c.subtitles),Pe=c,ke=c.subtitlesForcedLanguage||""},fi=new Jd,vt=c=>fi.next(c),Gt=new Jd,$i=new Jd,Gi=new Jd,jt=null,Tt={actionRewind$:Gt,actionSeek$:$i,inPiP$:wt,inFullscreen$:new qu(c=>ut.subscribe(h=>c.next(h))),actionSetSubtitle$:Gi,nextMovie$:fi},We=new Jd,yi={actionSeek$:$i,actionSubtitlesSwitched$:We,playerSize$:new qu(c=>Bt.subscribe(h=>c.next(h))),inPiP$:wt,inFullscreen$:new qu(c=>ut.subscribe(h=>c.next(h))),isLoaderVisible$:new qu(c=>Qi.subscribe(h=>c.next(h)))};if(Z){let{oneStat:c,thinOneStat:h,mediascopePixel:V,statSubscription:oe}=Z;c&&(S||oe.add(c.attachTo(P)),oe.add(c.attachToUi(Tt)),oe.add(c.attachToAds(Te.events)),c.authorize(a).catch(Se=>{U({message:`onestat auth error ${String(Se)}`})}),V&&V.attachTo(P)),h&&(oe.add(h.attachTo(P,Te.events)),oe.add(h.attachToUi(yi)),oe.add(h.attachToAds(Te.events)),h.updateContext({isMobile:ge(Be)}),h.authorize(a))}if(X){let c=new gm,h=(V,oe)=>c.add(V.subscribe(oe));if(h(P.events.managedError$,V=>{X.logIError(V)}),h(P.events.fatalError$,V=>{X.logIError(V,!0)}),Z){let{oneStat:V}=Z;V&&h(V.experimental.error$,oe=>{X.logIError(oe)})}X.sentrySubscription.add(c)}let ho=()=>{if(W_.device.isIOS&&Ee)try{v_(Ee)}catch(c){U({message:`exitIosSafariFullscreen failed: ${c}`})}};ye.add(P.experimental.element$.subscribe(c=>{c&&(Ee=c,c.classList.add("player-media"),Aa(ie)&&ie.updateVideoElement(),S&&c.setAttribute("pip","false"),re==="preview"&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(P.events.ended$.subscribe(()=>{var c;ho(),(c=s==null?void 0:s.onEnded)==null||c.call(s)})).add(P.events.looped$.subscribe(()=>{var c;(c=s==null?void 0:s.onLooped)==null||c.call(s)})).add(P.events.started$.subscribe(async()=>{var h,V;Aa(ie)&&await(ie==null?void 0:ie.revealPictureInPicture());let c=P.info.muted$.getValue();(h=s==null?void 0:s.onStarted)==null||h.call(s),(V=He.onStarted)==null||V.call(He,c)})).add(P.events.willSeek$.subscribe(({from:c,to:h})=>{var V;(V=s==null?void 0:s.onSeek)==null||V.call(s,c,h)})).add(P.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=s==null?void 0:s.onAutoplaySoundProhibited)==null||c.call(s)})).add(P.info.position$.subscribe(c=>{var V;let h=P.info.duration$.getValue();isFinite(h)&&h>0&&((V=s==null?void 0:s.onTimeupdate)==null||V.call(s,h,c),Te.setPosition(c,h))})).add(P.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(P.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(P.events.loadedMetadata$.subscribe(()=>{Mt.set(!0)})).add(P.info.is3DVideo$.subscribe(c=>{$e.set(c)})).add(P.info.isEnded$.subscribe(c=>{S&&(c?(T!=null&&T.getValue()&&Dt.add(Td),Dt.add("PLAY_BUTTON")):Dt.remove("PLAY_BUTTON"))})).add(P.info.liveTime$.subscribe(c=>{var h;(h=s==null?void 0:s.onLiveTime)==null||h.call(s,c)})).add(P.info.isStalled$.subscribe(c=>{var h;(h=s==null?void 0:s.onStalledChanged)==null||h.call(s,c)})).add(P.info.isLiveEnded$.subscribe(c=>{var h;return c&&((h=s==null?void 0:s.onLiveEnded)==null?void 0:h.call(s))})).add(Te.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(Te.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(Te.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(Te.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(Te.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(Te.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(Te.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(Te.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(Te.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(Te.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(Te.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(Te.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(Te.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(Te.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 yo=new gm,vn=()=>{var Je,It,Ht;let{debugLog:c}=J,h,V="#9df7b7",oe="#efd169";if(c&&c!==!0){let{colors:Qt}=c;h=c.tag,V=(Je=Qt==null?void 0:Qt[0])!=null?Je:V,oe=(Ht=(It=Qt==null?void 0:Qt[1])!=null?It:Qt==null?void 0:Qt[0])!=null?Ht:oe}let Se=h?`: ${h}`:"";yo.add(P.events.log$.subscribe(Qt=>{console.debug(`%c sdk${Se} `,`background:${V};`,`sdk component: ${Qt.component}`,Qt.message)})).add(ze.log$.subscribe(Qt=>{console.debug(`%c ui${Se} `,`background:${oe};`,`ui component: ${Qt.component}.`,Qt.message)}))},St=()=>{yo.unsubscribe()},Ft=(c,h)=>{pe.log("start camera manual rotation",{mx:c,my:h}),P.startCameraManualRotation(c,h)},K=(c=!1)=>{pe.log("stop camera manual rotation",{immediate:c}),P.stopCameraManualRotation(c)},kt=(c,h,V)=>{pe.log("move camera focus px",{xpx:c,ypx:h,dt:V}),P.moveCameraFocusPX(c,h,V)},si=()=>{P.holdCamera()},at=()=>{P.releaseCamera()},xt=Er(P.info.position$.getValue(),c=>{let h,V,oe=()=>{let Se=P.info.playbackState$.getValue(),Je=P.info.isLive$.getValue(),It=P.info.duration$.getValue(),Ht=P.info.position$.getValue();if(Se&&[Fl.PLAYING,Fl.PAUSED].includes(Se)){let Qt=Je?Ht-It:P.getExactTime();Qt!==V&&c(Qt),V=Qt}h=requestAnimationFrame(oe)};return oe(),()=>cancelAnimationFrame(h)}),qt=oi(P.info.playbackState$),ot=oi(P.info.isBuffering$),Ni=pi([qt,ot],([c,h])=>h?"buffering":c),Oi=oi(P.info.currentBuffer$),Xo=oi(P.info.isEnded$),xo=oi(P.info.isLive$),Di=J.features.playbackRate?oi(P.info.canChangePlaybackSpeed$):Er(!1),Yi=oi(P.info.liveBufferTime$),Ar=oi(P.info.volume$),_o=oi(P.info.muted$),io=vu(P.info.predefinedQualityLimitType$.pipe(K_(c=>c===vs.TRAFFIC_SAVING)),P.info.predefinedQualityLimitType$.getValue()===vs.TRAFFIC_SAVING),Ti=vu(P.info.predefinedQualityLimitType$.pipe(K_(c=>c===vs.HIGH_QUALITY)),P.info.predefinedQualityLimitType$.getValue()===vs.HIGH_QUALITY),Zo=oi(P.info.autoQualityLimitingAvailable$),Jo=oi(P.info.availableQualities$),Pn=oi(P.info.availableQualitiesFps$),Xn=oi(P.info.chromecastState$),Lr=oi(P.info.chromecastDeviceName$),Zr=oi(P.info.currentFormat$),hs=oi(P.info.throughputEstimation$),Jr=oi(P.info.videoBitrate$),Zn=oi(P.info.intrinsicVideoSize$),hr=oi(P.info.duration$),gn=oi(P.info.isAudioAvailable$),An=()=>{ei&&clearTimeout(ei),ei=null},Ro=pi([hr,xo],([c,h])=>h?-c:c),Ln=pi([qt],([c])=>c===Fl.PLAYING),Jn=oi(P.info.atLiveEdge$),_r=oi(P.info.atLiveDurationEdge$),br=oi(P.info.position$),Mr=pi([br,hr],([c,h])=>isFinite(c)&&isFinite(h)&&!!h),oo=pi([Xn],([c])=>c===Ax.CONNECTED),Vr=oi(P.info.availableVideoStreams$),Mn=J.features.audioLanguages?oi(P.info.availableAudioStreams$):Er([]),Vn=oi(P.info.currentVideoStream$),no=oi(P.info.currentAudioStream$),Rr=c=>{c.language&&wf(c.language),P.setVideoStream(c)},Rn=(c,h)=>{P.setAudioStream(c),To(h)&&(c.language&&wf(c.language),J.features.userVideoPrefs&&i&&Tf(J.userSalt,String(i),{audioTrackId:c.id}))},pt=c=>{let h;if(c.length===1&&(h=c.at(0)),h!=null||(h=c.find(oe=>"isDefault"in oe&&oe.isDefault)),J.features.userVideoPrefs&&i){let oe=$u(J.userSalt,String(i));if(oe!=null&&oe.audioTrackId){let Se=c.find(Je=>Je.id===oe.audioTrackId);h=Se!=null?Se:h}}let V=Xh();return V&&(h!=null||(h=c.find(({language:oe})=>V===oe))),h!=null||(h=c.at(0)),h},di=c=>{pe.log("change audio stream",{id:c});let h=P.info.availableAudioStreams$.getValue().find(V=>V.id===c);h&&Rn(h,!0)},$r=!1;ye.add(P.info.availableAudioStreams$.subscribe(c=>{if(!$r&&c.length){let h=pt(c);h&&(P.setAudioStream(h),$r=!0)}})),Mn.subscribe(c=>{var h;(h=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||h.call(s,c.map(({label:V="",id:oe="",language:Se=""})=>({label:V,language:Se,id:oe})))}),no.subscribe(c=>{var h;return c&&((h=s==null?void 0:s.onAudioStreamChanged)==null?void 0:h.call(s,c.id))});let er=!1;ye.add(P.info.availableVideoStreams$.subscribe(c=>{if(!er&&c.length){let h=pt(c);h&&(P.setVideoStream(h),er=!0)}}));let tr=le(void 0),en=oi(P.info.isAutoQualityEnabled$,c=>c&&tr.set(void 0)),yr=oi(P.info.currentQuality$,()=>tr.set(void 0)),tn=pi([tr,yr],([c,h])=>c!=null?c:h),hn=pi(Zr,c=>c!==Zd.MPEG),Nn=pi([Jo,Pn,en,tn,hn],([c,h,V,oe,Se])=>{let Je=[];Se&&Je.push({value:"auto",displayValue:dt("auto_quality_option"),selected:V});let It=c.filter(Ht=>!Rx(Ht));for(let Ht of It){let Qt=h[Ht];Je.push({value:Ht,displayValue:`${Ht}${Qt?B_(Qt):""}`,selected:V?!1:Ht===oe})}return Je}),On=oi(P.info.currentPlaybackRate$),No=pi([On,Jn,_r],([c,h,V])=>{let oe=V||S?1:J.controls.playbackRateMin,Se=h?1:J.controls.playbackRateMax,Je=J.controls.playbackRateStep,It=[];for(let Ht=oe;Ht<=Se;Ht+=Je)It.push({value:Ht,displayValue:Ht===1?dt("playback_rate_1"):dt("playback_rate",{multiplier:Ht.toString(10)}),selected:c===Ht});return It}),wo=()=>({displayValue:dt("subtitles_off"),value:kn,language:""}),ir=le(wo()),So=pi([ir,_t],([c],h)=>{c.value===kn?h(wo()):h(c)}),Bi=J.features.subtitles?oi(P.info.availableTextTracks$):Er([]),Dn=Bh(),or=pi([Bi,So],([c,h],V)=>{var Je;let oe=[],Se=c.find(({id:It})=>It===h.value);if(Se!=null&&Se.url){let[,It]=(Je=Dn.find(Se.url))!=null?Je:[];if(It){V(It);return}Xe.download(Se.url).then(Ht=>{if(!Ht||Xe.isDestroyed())return;let Qt=new F_,Fs=Se.language;if(Fs){let Gb=!!Se.isAuto,Yb=Qt.parse(Ht,Fs);oe.push({lang:Fs,subtitles:Yb,isAuto:Gb,id:Se.id})}Dn.add(Se.url,oe),ge(So).value===h.value&&V(oe)}).catch(Ht=>{var Qt;(Qt=Z==null?void 0:Z.oneStat)==null||Qt.logError({errorType:"Subtitles download",fatal:!1}),X==null||X.report(Ht,{errorType:"Subtitles download",fatal:!1})})}V(oe)}),Nr=pi([On,Ln,So],([c,h,V],oe)=>{let It;if(P.info.isLive$.getValue()&&h&&V.value!==kn){let Qt=()=>{let Fs=1e3/(3*c);It=setTimeout(Qt,Fs),oe(Date.now())};return Qt(),()=>clearTimeout(It)}}),Bn=pi([Bi,So],([c,h])=>{if(!c.length)return[];let V=[];for(let{language:oe,isAuto:Se,id:Je}of c){let It=oe&&Xd(oe);oe&&It&&V.push({displayValue:Se?dt("subtitles_auto",{language:It}):It,value:Je,selected:(h==null?void 0:h.value)===Je,isAuto:Se,language:oe})}return V.length?(V.unshift({...wo(),selected:(h==null?void 0:h.value)===kn}),V):[]}),Co={available:[],prev:[]},Or=()=>{var h,V;let c=P.experimental.getCurrentTime$.getValue();return(V=(h=c==null?void 0:c())!=null?h:Ee==null?void 0:Ee.currentTime)!=null?V:0},bt=pi([xt,So,or,Nr],([c,h,V,oe])=>{var Je;let Se=P.info.isLive$.getValue();if(Se&&Co.prev!==V){let It=V.find(({id:Qt})=>Qt===h.value),Ht=Co.prev.find(({id:Qt})=>Qt===h.value);if(It){let Qt={...It,subtitles:[...(Je=Ht==null?void 0:Ht.subtitles)!=null?Je:[],...It.subtitles]};Co.available=[Qt],Co.prev=V}}if(h&&h.value!==kn){let It=Se?Or():c,Ht=Se?Co.available:V;return z_(It,h,Ht,Se)}}),$t=pi([bt],([c])=>c!=null&&c.texts?c.texts:[]);ye.add(So.subscribe(c=>{var h,V;if(c.value===kn)(h=s==null?void 0:s.onSubtitleOff)==null||h.call(s);else{let oe=Object.entries(zu).find(([Se,Je])=>Je===c.displayValue);(V=s==null?void 0:s.onSubtitleOn)==null||V.call(s,oe?oe[0]:"",c.value)}}));let ro=le(!0),Pi=pi([Oi,Ro,br,Yi],([c,h,V,oe])=>{var Ht;let Se=(Ht=c==null?void 0:c.end)!=null?Ht:0;if(!oe)return Se/h;let It=-V+oe-h;return(Se-It)/h}),ji=oi(P.info.availableSources$),Oo=pi([ji],([c])=>Object.keys((c==null?void 0:c[Zd.MPEG])||{}).length>0),Do=()=>{var V,oe,Se;let c=Object.keys(((oe=(V=P.info.availableSources$)==null?void 0:V.getValue())==null?void 0:oe[Zd.MPEG])||{}),h=Mx(c)||Ux.Q_144P;return(Se=Pe.sources[Zd.MPEG])==null?void 0:Se[h]},so=()=>{var h;let c=Do();if(c)pe.log("download video",{url:c}),Nh(c,((h=Pe==null?void 0:Pe.meta)==null?void 0:h.title)||"video");else{let V="There is no URL for download video";pe.log("download video",{message:V}),U({message:V})}},Ii=()=>{U({message:"toggle muted"});let c=P.info.muted$.getValue();P.info.volume$.getValue()===0&&!c?on(Fr(),!1):ao(!c,!1)},Dr=()=>{var c;if(Kt.ui.settingsMenu.visible$.set(!1),!ge(Kt.ui.settingsSubMenu.visible$)){let h=ge(Kt.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&h){let oe=Dl(h),Se={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:oe,position:Se,name:"settings"})}}pe.log("close settings menu")},Br=async(c,h=()=>Promise.resolve())=>{var Se;Kt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Kt.ui.settingsMenu.visible$.set(!0),await h();let V=ge(Kt.ui.settingsMenu.ref$),oe=rl();if((Se=s==null?void 0:s.uiInfo)!=null&&Se.onSettingsMenu&&V&&oe){let It=Dl(V),Ht=Ps(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:It,position:Ht,name:"settings"})}pe.log("open settings menu",{wasOpenedByKeyboard:c})},es=(c,h=!1)=>{var Je;Kt.ui.settingsSubMenu.visible$.set(!1);let V=ge(Kt.ui.settingsMenu.ref$),oe=rl(),Se=ge(Kt.ui.settingsMenu.visible$);if((Je=s==null?void 0:s.uiInfo)!=null&&Je.onSettingsMenu&&V&&oe)if(Se&&!h){let Ht=Dl(V),Qt=Ps(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:Ht,position:Qt,name:"settings"})}else{let Ht=Dl(c),Qt={top:0,left:0,bottom:0,right:0},Fs=ge(Kt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:Ht,position:Qt,name:Fs})}pe.log("close settings sub menu")},ts=(c,h)=>{var oe;Kt.ui.settingsSubMenu.visible$.set(!0),Kt.ui.settingsSubMenu.ref$.set(h),Kt.ui.settingsSubMenu.name$.set(c);let V=rl();if((oe=s==null?void 0:s.uiInfo)!=null&&oe.onSettingsMenu&&h&&V){let Je=Dl(h),It=Ps(h,V);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:Je,position:It})}pe.log("open settings sub menu",{name:c})},Fr=()=>{var h;let c=Math.max(J.volumeMinRestore,(h=gu())!=null?h:0);return c===0?J.volumeDefault:c},To=c=>{let h=J.features.savePreferredStatesOnUserActionOnly;return!h||h&&!c},on=(c,h)=>{let V=c===0?Fr():c,oe=P.info.muted$.getValue();U({message:`set volume, volume: ${c}, preferredVolume: ${V}`});let Se=!l||Ue.is("ads");oe&&c>0&&Se&&(oe=!1,To(h)&&yf(!1)),P.setVolume(c,oe),Te.setVolume(c),To(h)&&hf(V)},ao=(c,h)=>{let V=P.info.volume$.getValue();U({message:`set muted, currentVolume: ${V}, mute: ${c}`});let oe=Ue.is("ads");if(P.setMuted(c,oe),Te.setVolume(c?0:V),To(h)&&(!oe||!c)&&yf(c),!c&&V===0){let Se=Fr();P.setVolume(Se),To(h)&&hf(Se),Te.setVolume(Se)}},xr=le(!1),Bo=c=>{var h,V;pe.log("set looped",{isLooped:c}),xr.set(c),P.setLooped(c),(V=(h=s==null?void 0:s.uiInfo)==null?void 0:h.onLoopedChanged)==null||V.call(h,c)};Bo(ne);let is=()=>{var c,h;(h=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||h.call(c)},Ke=(c,h=!1)=>{var V;U({message:`set autoplayNextEnabled, value: ${c}`}),pe.log("set autoplay next enabled",{autoplayNextEnabled:c}),Kt.ui.autoplayNextEnabled$.set(c),e_(c),h&&((V=s==null?void 0:s.onSetAutoplayNextEnabled)==null||V.call(s,c))},Pt=c=>{U({message:`set timerNextVideoRunning, value: ${c}`}),pe.log("set timer next video running",{timerNextVideoRunning:c}),Kt.ui.timerNextVideoRunning$.set(c)},vi=(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(oe){U({message:"onPrevVideoClick callback failed to execute"})}j(!0),h&&Y()},Io=(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(oe){U({message:"onNextVideoClick callback failed to execute"})}j(!1),h&&ae()},Eo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},Fo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},lo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},Xi=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},_n=()=>{P.prepare()},bn=()=>{gr(Kt);let c=ge(Kt.ui.controls.disabledControls$),h=ge(Kt.playerPhase),V={playerPhase:h,isInteractive:S,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(U({message:"toggle play"}),h==="ads"){V.action="play",pe.log("toggle adman play",V),Te.togglePlay();return}let oe=()=>{var Je;U({message:"toggle play, call player.play"}),V.action="play",P.play(),(Je=s==null?void 0:s.onPlay)==null||Je.call(s)},Se=()=>{var Je;U({message:"toggle play, call player.pause"}),V.action="pause",P.pause(),(Je=s==null?void 0:s.onPause)==null||Je.call(s)};if(P.info.isEnded$.getValue()){if(U({message:"toggle play, video ended, seek to 0"}),Gt.next(),$i.next(As.REWIND),S){N==null||N();return}P.seekTime(0),oe()}else P.info.playbackState$.getValue()!==Fl.PLAYING?oe():Se();pe.log("toggle play",V)},co=(c,{changeReason:h="default",appliesTo:V="to-video"}={},oe)=>{U({message:`set quality, quality: ${c}`}),pe.log("set quality",{quality:c}),P.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Se}=J.features;hu(),c!=="auto"?(Se?(_u({type:"exact_quality",quality:c,videoId:i},V),P.setPredefinedQualityLimits(vs.UNKNOWN)):_f(i,c),tr.set(c),P.setQuality(c)):Se&&h==="default"&&(rr("auto_quality",V,oe),ge(io)&&ko(!1,void 0,oe),ge(Ti)&&Fn(!1,void 0,oe))},ko=(c,h="as-default",V)=>{U({message:`set trafficSavingEnabled, value: ${c}`}),pe.log("set traffic saving enabled",{trafficSavingEnabled:c});let oe=c?vs.TRAFFIC_SAVING:vs.UNKNOWN;J.features.qualityDetailsSubMenuEnabled?(nr(oe,h,V),Ed(!1)):(P.setPredefinedQualityLimits(oe),To(V)&&Ed(c))},Fn=(c,h="as-default",V)=>{U({message:`set highQualityEnabled, value: ${c}`}),pe.log("set high quality enabled",{highQualityEnabled:c}),nr(c?vs.HIGH_QUALITY:vs.UNKNOWN,h,V)},nr=(c,h,V)=>{c!==vs.UNKNOWN&&(ge(Zo)&&!ge(en)&&co("auto",{appliesTo:h,changeReason:"limit-changed"},V),rr(c,h,V)),P.setPredefinedQualityLimits(c)},rr=(c,h,V)=>{To(V)&&(_u({type:c,videoId:i},h),h==="as-default"&&_u({type:c,videoId:i},"to-video"))},Hn=(c,h=!0)=>{pe.log("set playback rate",{playbackRate:c}),P.setPlaybackRate(c),J.features.saveRate&&we&&!P.info.isLive$.getValue()&&h&&Zh(c)},_s=()=>{let c=ge(Di),h=ge(No),V=h.findIndex(({selected:Se})=>Se);if(V===h.length-1||!c)return h[V];let oe=h[V+1];return Hn(oe.value),oe},os=()=>{let c=ge(Di),h=ge(No),V=h.findIndex(({selected:Se})=>Se);if(V===0||!c)return h[V];let oe=h[V-1];return Hn(oe.value),oe},Ge=(c={...wo(),selected:!1},h)=>{pe.log("set subtitles",{...c}),c.value!==kn&&Gi.next(c.isAuto?c.value+"_auto":c.value),We.next({enabled:c.value!==kn,lang:c.language,auto:!!c.isAuto}),ir.set(c),To(h)&&(Cf(c.value===kn?void 0:c.language),J.features.userVideoPrefs&&i&&Tf(J.userSalt,String(i),{subtitleTrackId:c.value===kn?void 0:c.value}))},Wt=c=>{pe.log("toggle subtitles");let h=ge(So);(h==null?void 0:h.value)===kn?Ho(c):nn(c)},wi=(c,h)=>{pe.log("change subtitle",{enabled:c}),c?Ho(!0,h):nn(!0)},Ho=(c,h)=>{pe.log("subtitle on");let V=ge(Bn),oe=ge(Le),Se=ke!=null?ke:oe,Je;h&&(Je=V.find(It=>It.value===h)),Je!=null||(Je=V.filter(It=>It.value!==kn).find(It=>It.language===Se)),Ge(Je!=null?Je:V[1],c)},nn=c=>{pe.log("subtitle off"),Ge(void 0,c)};ye.add(P.info.availableTextTracks$.subscribe(c=>{var V;function h(){let oe=[];for(let{language:Se,isAuto:Je,id:It}of c){let Ht=Se&&Xd(Se);Se&&Ht&&oe.push({id:It,language:Se,title:Je?dt("subtitles_auto",{language:Ht}):Ht})}return oe}(V=s==null?void 0:s.onAvailableSubtitlesChanged)==null||V.call(s,h())}));let sr=le(!0),rn=c=>{sr.set(c)},Uo=(c,h,V=!0)=>{var oe;if(U({message:`seek to time, time: ${c}`}),pe.log("seek to time",{time:c,action:h,forcePrecise:V}),$i.next(h),P.info.isLive$.getValue()){let Se=P.info.duration$.getValue(),Je=Math.min(0,Se+c);P.seekTime(Je,V)}else{if(T!=null&&T.getValue())return;P.info.isEnded$.getValue()&&(U({message:"seek after ended, call callbacks.onPlay"}),(oe=s==null?void 0:s.onPlay)==null||oe.call(s)),P.seekTime(Mv(c),V)}},Rs=c=>{U({message:`seek to episode start time: ${c}`}),pe.log("seek to episode start time",{time:c}),Uo(c,As.EPISODE,!0)},sn=(c,h,V=!1)=>{U({message:`seek to percent, percent: ${c}`}),pe.log("seek to percent",{percent:c,action:h});let oe=ge(Ro)*c;Uo(oe,h,V)},Ns=c=>{U({message:`seek external, time: ${c}`}),pe.log("seek external",{time:c}),$i.next(As.UNKNOWN),P.seekTime(P.info.isLive$.getValue()?-c:c)},ra=c=>{var oe,Se;let h=(oe=c.max)!=null?oe:"none",V=(Se=c.min)!=null?Se:"none";U({message:`set auto quality limitation. Max: ${h}. Min: ${V}`}),pe.log("set auto quality limits",{max:h,min:V}),P.setAutoQualityLimits(c)},sa=c=>{U({message:`seek external to episode start time: ${c}`}),pe.log("seek external to episode start time",{time:c}),Uo(c,As.EPISODE,!0)},lt=c=>{U({message:`set playback rate to: ${c}`}),pe.log("set playback rate external",{playbackRate:c}),P.setPlaybackRate(c)},Xt=le(!1),uo=le(!1),he=pi([Ro],([c])=>!!f&&c>=J.suitableDurationForUsingRichSeek&&J.features.useRichSeek&&!S),yt=((f==null?void 0:f.frameWidth)||0)>=((f==null?void 0:f.frameHeight)||0),Jt=pi([Zt],([c])=>{let h=Bl(c);return yt?!h:h});ye.add(Ue.subscribe(c=>{c!=="video"&&Xt.set(!1)}));let _i=le(void 0),Ai=le(!1),ci=c=>{U({message:`start scrubbing, progress: ${c}`}),pe.log("start scrubbing",{progress:c}),Ai.set(!0),ti(c)},ti=c=>{_i.set(c)},po,an,ln=()=>{_i.set(void 0),Ai.set(!1)},Ei=()=>{clearTimeout(an),clearTimeout(po),po=window.setTimeout(()=>{ln()},500),Ee==null||Ee.removeEventListener("seeked",Ei)},Gl=(c,h=!1)=>{U({message:`complete scrubbing, progress: ${c}`}),pe.log("complete scrubbing",{progress:c}),sn(c,As.SLIDER,h),ge(Kt.ui.isMobile)&&ge(Kt.state.currentFormat$)===Zd.HLS?(Ee==null||Ee.addEventListener("seeked",Ei),an=window.setTimeout(()=>{Ei()},300)):ln()},ja=pi([xt,Ro,_i],([c,h,V],oe)=>{oe(Nx(V)?V*h:c)}),Os=le(!1),Xa=()=>{Os.set(!0)},Za=()=>{Os.set(!1)},wr=pi([Bt],([{width:c}],h)=>{let V=N_(c);h(V)}),aa=W.filter(c=>Oh(c)),Ds=pi([wr,Be],([c,h])=>h?aa.filter(V=>!V.hideOnMobile):aa.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(c))})),Hr=le(W.filter(c=>Dh(c))),ns=pi([Hr,wr],([c,h])=>c.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(h))})),Bs=pi([ns,Ds],([c,h])=>[...J.features.additionalButtonsDesktopControlPanelRight?c.filter(V=>V.type==="desktop-control-panel-right"):[],...J.features.additionalButtons?h.map((V,oe)=>{var Se;return{id:oe,weight:oe,type:"desktop-control-panel-right",testId:V.testId,icon:V.iconUrl,onClick:V.onClick,ariaLabel:(Se=V.ariaLabel)!=null?Se:V.tooltip,tooltipText:V.tooltip}}):[]]),ar=le(H),Ja=pi([ar],([c])=>J.features.additionalSettingsMenuItems?c.map(h=>h.type==="SWITCH"?{...h,onClick:h.onChangeEnabled}:h):[]),el=(c,h)=>{let V=ge(Hr).map(oe=>oe.id!==c?oe:{...oe,...h});Hr.set(V)},Yl=c=>{let h=ge(Hr);if(h.some(V=>V.id===c.id)){U({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),Hr.set(h)},tl=c=>{let h=ge(Hr);if(!h.some(V=>V.id===c)){U({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),Hr.set(h)},il=c=>{$i.next(As.LIVE),U({message:"live switch to low latency "+c}),pe.log("live switch to low latency "+c),P.setLiveLowLatency(c)},ol=(c,h)=>{let V=ge(ar).map(oe=>oe.id!==c?oe:{...oe,...h});ar.set(V)},jl=c=>{let h=ge(ar);if(h.some(V=>V.id===c.id)){U({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),ar.set(h)},la=c=>{let h=ge(ar);if(!h.some(V=>V.id===c)){U({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),ar.set(h)},Sr=le(z),nt=pi([Sr],([c])=>J.features.additionalContextMenuItems?c:[]),ct=(c,h)=>{let V=ge(Sr).map(oe=>oe.id!==c?oe:{...oe,...h});Sr.set(V)},Fi=c=>{let h=ge(Sr);if(h.some(V=>V.id===c.id)){U({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),Sr.set(h)},zo=c=>{let h=ge(Sr);if(!h.some(V=>V.id===c)){U({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),Sr.set(h)},Hi=pi([Be,it],([c,h],V)=>{V(c&&h)}),gi=()=>{$i.next(As.LIVE),U({message:"switch to active live"}),pe.log("switch to active live"),P.seekTime(0),P.info.playbackState$.getValue()!==Fl.PLAYING&&Kt.actions.internal.togglePlay()},Li=()=>{pe.log("skip adman"),Te.skip()},da=(c=!0)=>{var oe;gr(Kt),U({message:`switch from ads to video, callPlay: ${c}`}),pe.log("switch from ads to video",{callPlay:c}),ce.set("video"),c&&P.play(),l&&ao(!0,!0);let h=(oe=ge(Qe))==null?void 0:oe.muted,V=!P.info.muted$.getValue();h!==void 0&&!V&&ao(h,!0),Qe.set(void 0)},nl=()=>{gr(Kt),U({message:"switch from video to ads"}),pe.log("switch from video to ads"),Kt.actions.internal.pause(),ho(),ce.set("ads")},fp=c=>{gr(Kt);let h=c?"LiveWaitingStart":"thumb";pe.log("set live waiting start",{state:c,playerPhase:h}),ce.set(h)},kc=c=>{gr(Kt);let h=c?"LiveWaitingRecover":"thumb";pe.log("set live waiting recover",{state:c,playerPhase:h}),ce.set(h)},Pc=c=>{gr(Kt);let h=c?"LiveWaitingRecord":"thumb";pe.log("set live waiting record",{state:c,playerPhase:h}),ce.set(h)},Ac=()=>(gr(Kt),pe.log("get debug text data"),Vh(P,Pe,Kt,Re.getTraceId())),mp=()=>(gr(Kt),JSON.stringify(Re.getFinishedSpans())),Lc=()=>(gr(Kt),Rh(P,Pe,Kt)),rl=()=>Ee,Mc=()=>{U({message:"toggle chromecast"}),pe.log("toggle chromecast"),P.toggleChromecast()},ca=c=>{var V;if(gr(Kt),P.info.isEnded$.getValue())return;let h=!c;if(ge(Kt.playerPhase)==="ads"){U({message:`pause ads, internalCall: ${h}`}),pe.log("pause ads",{internalCall:h}),Te.pause();return}U({message:`pause video, internalCall: ${h}`}),pe.log("pause video",{internalCall:h}),h&&((V=s==null?void 0:s.onPause)==null||V.call(s)),P.pause()},ua=c=>{var V;gr(Kt);let h=!c;if(ge(Kt.playerPhase)==="ads"){U({message:`play ads, internalCall: ${h}`}),pe.log("play ads",{internalCall:h}),Te.play();return}U({message:`play video, internalCall: ${h}`}),pe.log("play video",{internalCall:h}),h&&((V=s==null?void 0:s.onPlay)==null||V.call(s)),P.play()},vp=c=>{gr(Kt);let h=!c;if(ge(Kt.playerPhase)==="ads"){U({message:"player cannot be stopped during ads via external method"});return}U({message:`player will be stopped, internalCall: ${h}`}),k==null||k()},Vc=(c,h)=>{gr(Kt),U({message:`first start, show ads: ${c}, internalCall: ${!h}`}),pe.log("first start",{showAds:c,external:h}),c?ce.set("ads"):(ce.set("video"),h?P.play():Kt.actions.internal.togglePlay())},Xl=()=>(U({message:"getting time codes"}),m),Fe=()=>{let c=Xl();if(!c||[0,1].includes(c.length))return;let h=P.info.position$.getValue();return c.find(V=>V.time>h)},mi=c=>{let h=c;h||(h=Fe());let V=P.info.position$.getValue();pe.log("seek to next episode",{currentTime:V,...h}),h&&(U({message:"seek to next episode"}),Uo(h.time,As.EPISODE,!0))},Po=()=>{let c=Xl();if(!c||[0,1].includes(c.length))return;let h=P.info.position$.getValue(),V=c.findIndex(Se=>Se.time>h),oe=V===-1?c.length-2:V-2;if(!(oe<0))return c[oe]},pa=c=>{let h=c;h||(h=Po());let V=P.info.position$.getValue();pe.log("seek to prev episode",{currentTime:V,...h}),h&&(U({message:"seek to prev episode"}),Uo(h.time,As.EPISODE,!0))},$n=()=>(U({message:"getting preview thumbs data"}),pe.log("get preview thumbs data",{...f}),f),Db=async()=>{let c=ie==null?void 0:ie.isActive(),h="none";ie!=null&&ie.isActive()?(h="exit",await(ie==null?void 0:ie.exit())):(h="request",await(ie==null?void 0:ie.request())),pe.log("toggle picture in picture",{isActive:c,action:h})},Bb=(c=-90)=>{pe.log("rotate video",{alphaDiff:c}),Zt.update(h=>h+c)},Rc=le([]);I==null||I.subscribe(c=>{let h=[];for(let V=0;V<c.length;V++){let{range:[oe,Se],subjects:Je}=c[V];V===0&&oe!==0&&h.push({time:0,text:"",interactive:!1,completed:!0}),h.push({time:oe/1e3,text:"",interactive:!0,completed:J.features.interactiveTimeOpenUri?!Je.length||Je.every(It=>It.isRemoved):!Je.length}),Se!==1/0&&h.push({time:Se/1e3,text:"",interactive:!1,completed:!0})}Rc.set(h)});let Fb=le(!1);T==null||T.subscribe(c=>{c&&ge(Ai)&&ln()});let Mv=c=>{if(!S)return c;let h=ge(Rc),V=ge(Ro),Se=ge(br)/V,Je=h.find(It=>It.interactive&&!It.completed&&It.time>Se);return typeof(Je==null?void 0:Je.time)=="number"?Math.min(c,Je.time-.05):c},Hb=()=>{Kt.ui.episodes.panelOpened$.set(!1)},Ub=()=>{pe.log("destroy store"),clearTimeout(an),clearTimeout(po),ye.unsubscribe(),yo.unsubscribe(),P.destroy(),Te.destroy(),Z==null||Z.destroy(),X==null||X.destroy(),ee.unsubscribe(),jt==null||jt.disconnect(),jt=null,Xe.destroy()},zb=pi([Jn,Ue,Di],([c,h,V])=>p.features.doubleForwardAvailable&&!c&&h==="video"&&V),gp=le(!1),Vv=2,Nc=null,Rv=c=>{if(!ge(Ln)&&c)return;let h=P.info.currentPlaybackRate$.getValue();c?h!==Vv&&(Nc=h,Hn(Vv,!1),gp.set(!0)):(Nc&&Hn(Nc,!1),gp.set(!1),Nc=null)};Ue.subscribe(c=>{c!=="video"&&Rv(!1)});let Wb=()=>{ca(!1),Xt.set(!0)},Kb=()=>{ua(!1),Xt.set(!1)},hp=!1,qb=()=>{uo.set(!0),hp=P.info.playbackState$.getValue()===Fl.PLAYING,ca(!1)},Qb=()=>{uo.set(!1),!ge(Xt)&&hp&&ua(!1),hp=!1};P.events.playing$.subscribe(()=>{ge(Xt)&&ca(!1)});let Kt={interfaceLanguage$:Le,isCyrillicRelatedInterface$:Et,initVideo:ui,videoId:i,isClip:o,playerPhase:Ue,vsid:Nt,state:{positionExact$:xt,positionWithScrubbing$:ja,duration$:Ro,playbackState$:qt,playbackStateRealistic$:Ni,isPlaying$:Ln,isLoaderVisible:Qi,bufferedProgress$:Pi,isLive$:xo,canChangePlaybackSpeed$:Di,isActiveLive$:Jn,isOldestAvailableLive$:_r,isRewindableLive$:Mr,isEnded$:Xo,muted$:_o,volume$:Ar,trafficSavingEnabled$:io,highQualityEnabled$:Ti,autoQualityLimitingAvailable$:Zo,availableVideoStreams$:Vr,availableAudioStreams$:Mn,videoStream$:Vn,audioStream$:no,currentQuality$:tn,isAutoQualityEnabled$:en,availableQualities$:Nn,currentPlaybackRate$:On,availablePlaybackRates$:No,currentSubtitle$:So,availableTextTracks$:Bi,availableSubtitlesList$:Bn,currentSubtitleCaptions$:$t,isAutoSubtitleCaptionVisible$:ro,chromecastState$:Xn,chromecastDeviceName$:Lr,chromecastConnected$:oo,currentFormat$:Zr,throughputEstimation$:hs,videoBitrate$:Jr,videoSize$:Zn,errorLog$:be,crashed$:it,isAudioAvailable$:gn,isAudioDisabled:!!l,canDownload:J.features.download&&!!d,availableSources$:ji,hasMpegSources$:Oo,isInteractive:S,showInteractiveGraph:J.features.interactiveGraph,showSeekToInteractive:J.features.seekToInteractive,showPlayPrevChapter:J.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:J.features.interactiveTimeIndicator&&!!ge(Rc).length,interactiveEpisodes$:Rc,isInteractiveTime$:T?oi(T):le(!1),isInteractiveExpectation$:Fb,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:A,looped$:xr,loadedMetadata$:Mt,isAutoQualityAvailable$:hn,previewTrackActive:Xt,previewTrackDragInProgress:uo},ui:{t:dt,controlsVisible:le(!1),touched:le(!1),controls:{prevButton:le(void 0),playButton:le(void 0),replayButton:le(void 0),nextButton:le(void 0),playPrevChapterButton:le(void 0),seekToInteractiveButton:le(void 0),interactiveGraphButton:le(void 0),liveButton:le(void 0),time:le(void 0),episodes:le(void 0),volume:le(void 0),subtitles:le(void 0),settings:le(void 0),context:le(void 0),chromecast:le(void 0),pip:le(void 0),fullscreen:le(void 0),vkLogo:le(void 0),interactiveTimeIndicator:le(void 0),timeline:le(void 0),autoplayNextToggle:le(void 0),additionalButtons:W.length?W.reduce(c=>[...c,le(void 0)],[]):[],disabledControls$:Dt},modals:{hotKeyMap:{show:le(!1),data:le({title:"",closeBtnText:"",groups:[]})}},isFullscreen:ut,isFullscreenOpenedByKeyboard:Ot,rotateAlpha:Zt,isAutoplay:le(!1),debugPanelVisible:le(!1),episodes:{panelOpened$:le(!1),openedByKeyboard$:le(!1)},contextMenu:{visible$:le(!1),btnRef$:le(void 0),openedByBtnKeyboard$:le(!1),openedByHotKey$:le(!1),lastActiveElem$:le(void 0),showContextMenuBtn$:le(!1),position$:le({top:0,left:0})},playerSize:Bt,isMobile:Be,mobileNotReportControlHidden$:Hi,icon3DVideoVisible:le(!1),scrubbingInProgress:Ai,volumeChangingInProgress:Os,is3DVideo:$e,currentGridType$:wr,additionalButtonsDeprecated$:Ds,additionalDesktopControlPanelRightButtons$:Bs,additionalSettingsMenuItems$:Ja,additionalContextMenuItems$:nt,interactiveHideMobileControls:le(!1),overlayContainer$:le(void 0),startedByKeyboard$:le(!1),autoplayNextEnabled$:le(!1),timerNextVideoRunning$:le(!0),settingsMenu:{visible$:le(!1),ref$:le(void 0),openedByBtnKeyboard$:le(!1)},settingsSubMenu:{visible$:le(!1),ref$:le(void 0),name$:le(void 0)},userActionsDisabled:le(!1),hiddenControls:{volume:le(!1),vkLogo:le(!1),pip:le(!1),chromecast:le(!1),settings:le(!1)},isControlsAvailable:sr,controlBlocks:{topLeft:le(void 0),topRight:le(void 0),middle:le(void 0),bottom:le(void 0),bottomLeft:le(void 0),bottomRight:le(void 0)},videoTitleInfo:le(void 0),doubleForwardOn$:gp,doubleForwardAvailable$:zb,previewTrackNotificationVisible:le(!1),previewTrackActive:Xt,previewTrackDragInProgress:uo,previewTrackAvailable:he,isPreviewTrackHorizontallyAligned:Jt},ads:{position:le(0),duration:le(0),playbackState:le("inactive"),canSkip:le(!1),secondsToWatchBeforeSkip:le(0),postrollPassed:le(!1)},webApi:{pictureInPictureApi:ie,annotationsApi:Oe,slotsApi:De,focusManager:tt},actions:{internal:{preload:_n,firstStart:c=>Vc(c,!1),play:()=>ua(!1),pause:()=>ca(!1),togglePlay:bn,toggleMuted:Ii,openSettingsMenu:Br,closeSettingsMenu:Dr,openSettingsSubMenu:ts,closeSettingsSubMenu:es,setVolume:c=>on(c,!1),setMuted:c=>ao(c,!1),startVolumeChanging:Xa,stopVolumeChanging:Za,setVideoStream:Rr,setAudioStream:c=>Rn(c,!1),setQuality:(c,h)=>co(c,h,!1),setTrafficSavingEnabled:(c,h)=>ko(c,h,!1),setHighQualityEnabled:(c,h)=>Fn(c,h,!1),setPlaybackRate:Hn,incrementPlaybackRate:_s,decrementPlaybackRate:os,setSubtitle:c=>Ge(c,!1),toggleSubtitle:()=>Wt(!1),togglePictureInPicture:Db,startScrubbing:ci,progressScrubbing:ti,completeScrubbing:Gl,toggleChromecast:Mc,switchToActiveLive:gi,switchFromAdsToVideo:da,switchFromVideoToAds:nl,skipAd:Li,setLiveWaitingStart:fp,setLiveWaitingRecover:kc,setLiveWaitingRecord:Pc,getDebugTextData:Ac,getTraceTextData:mp,getDebugPanelData:Lc,getVideoElement:rl,seekTime:(c,h,V)=>Uo(c,h,V),clearDelayedBufferingCheckTimeout:An,seekEpisodeStartTime:Rs,seekToPercent:sn,getNextEpisode:Fe,seekToNextEpisode:mi,getPrevEpisode:Po,seekToPrevEpisode:pa,startLogging:vn,stopLogging:St,startCameraManualRotation:Ft,stopCameraManualRotation:K,moveCameraFocusPX:kt,holdCamera:si,releaseCamera:at,getVideoEpisodes:Xl,getPreviewThumbsData:$n,downloadVideo:so,addLanguage:If,setLanguage:fe,nextMovie:vt,videoRotate:Bb,correctSeekTimeToInteractive:Mv,replayInteractive:N,setLooped:Bo,reportProblem:is,setAutoplayNextEnabled:Ke,setTimerNextVideoRunning:Pt,prevVideoClick:vi,nextVideoClick:Io,nextVideoAnnouncementShow:Eo,nextVideoAnnouncementClick:Fo,nextVideoAnnouncementAuto:lo,nextVideoAnnouncementCancel:Xi,checkFullscreenSupport:rt,changeDoubleForwardOn:Rv,closePreviewTrack:Kb,previewTrackOpened:Wb,previewTrackDragStarted:qb,previewTrackDragFinished:Qb},external:{firstStart:c=>Vc(c,!0),play:()=>ua(!0),pause:()=>ca(!0),stop:()=>vp(!0),seekTime:c=>Ns(c),seekEpisodeStartTime:c=>sa(c),setPlaybackRate:c=>lt(c),setAutoQualityLimits:c=>ra(c),setMuted:c=>ao(c,!0),toggleSubtitle:()=>Wt(!0),changeSubtitle:wi,setVolume:c=>on(c,!0),returnFocusToEpisodes:Hb,updateAdditionalSettingsItem:ol,addAdditionalSettingsItem:jl,removeAdditionalSettingsItem:la,updateAdditionalContextItem:ct,addAdditionalContextItem:Fi,removeAdditionalContextItem:zo,updateAdditionalButton:el,addAdditionalButton:Yl,removeAdditionalButton:tl,setLiveLowLatency:il,hideControls:()=>rn(!1),showControls:()=>rn(!0),setQuality:c=>co(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>ko(c,"to-video",!0),setHighQualityEnabled:c=>Fn(c,"to-video",!0),changeAudioStream:di}},callbacks:s,setUiCallbacks:c=>{He={...c}},getAdmanWrapper:()=>Te,getLogger:()=>ze,getPlayer:()=>P,destroy:Ub};return Kt};function Yn(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}=Ps(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 Qx=["disabledControls$","additionalButtons"],Gx=["interactiveTimeIndicator"],Ul=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!Qx.includes(r)){let l=o||Gx.includes(r);a.set(Yn(t,i,r,l))}}};var Qu=async(t,e,i)=>{await go(),e&&i&&(i.focus(),t.set(!1))};var Yx=Ce('<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 hm(t){je(t,{children:(e,i)=>{var o=Yx();b(e,o)},$$slots:{default:!0}})}function _m(t,e){B(e,!0);let[i,o]=Ve(),r=()=>x(s,"$contextMenuVisible$",i),a=g(e,"disabled",3,!1),l=g(e,"ariaLabel",3,""),d=ve(),s=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,m=d.ui.contextMenu.showContextMenuBtn$,f=d.ui.contextMenu.position$,p=d.ui.contextMenu.btnRef$,$=q(void 0);Ne(()=>{n($)&&Ct(()=>{p.set(n($))})});let y=T=>{let N=ea(T),k=k_(n($));f.set(k),u.set(N),s.set(!r())},_=()=>{m.set(!0)},S=()=>{m.set(!1)},I=v(()=>r()?"opened":"");zt(t,{get className(){return n(I)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:_,blur:S,get ariaExpanded(){return r()},get ref(){return n($)},set ref(T){O($,T,!0)},children:(T,N)=>{hm(T,{})},$$slots:{default:!0}}),F(),o()}var jx=t=>{t.stopPropagation()},Xx=M("<div><!> <div></div> <div></div></div>"),Zx={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 ec(t,e){var X;B(e,!0),Q(t,Zx);let[i,o]=Ve(),r=()=>x(S,"$isMobile",i),a=()=>x(k,"$areControlsVisible",i),l=()=>x(A,"$currentGridType$",i),d=()=>x(T,"$isInteractiveTime$",i),s=()=>x(_,"$interactiveControlsOpacity$",i),u=()=>x(N,"$showInteractiveTimeIndicatorTooltip$",i),m=()=>x(I,"$isFullscreen",i),f=g(e,"ref",15,void 0),p=q(void 0),$=ve(),y=$o(),{interactiveControlsOpacity$:_}=y,S=$.ui.isMobile,I=$.ui.isFullscreen,T=$.state.isInteractiveTime$,N=y.showInteractiveTimeIndicatorTooltip$,k=$.ui.controlsVisible,E=(X=$.callbacks)==null?void 0:X.onInteractiveTimeIndicatorClick,A=$.ui.currentGridType$,W=v(()=>!r()&&a()),H=v(()=>ks(l(),"s")),z=v(()=>!d()||!!s()||n(W)),Y=q(!1);Ne(()=>{O(Y,n(z),!0)});let ae=()=>{O(Y,!0)},j=()=>{var ie;ne(),(ie=n(p))==null||ie.addEventListener("animationiteration",ae,{once:!0})},ne=()=>{var ie;O(Y,!1),(ie=n(p))==null||ie.removeEventListener("animationiteration",ae)},Z=ie=>{N.set(ie)},we=v(()=>u()&&!n(z));Ne(()=>{u()?j():ne()});let ue=()=>{n(z)||(N.set(!0),E==null||E())};un(()=>{N.clearTimeout(),ne()});let re=()=>{N.set(!1)},_e=G("tooltip_interactive_interaction_time_indicator");var xe=Xx();let J;xe.__mousemove=[jx],xe.__click=ue;var Re=C(xe);Vo(Re,{get tooltipContent(){return _e},get tooltipVisible(){return n(we)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:Z,get ref(){return f()},set ref(ie){f(ie)},children:(ie,Oe)=>{Kd(ie,{completed:!0})},$$slots:{default:!0}});var pe=L(Re,2);let P;Ye(pe,ie=>f(ie),()=>f());var ze=L(pe,2);let Te;Ye(ze,ie=>O(p,ie),()=>n(p)),w(xe),D((ie,Oe,De)=>{J=se(xe,1,"interactive-episode-icon-animated s-26",null,J,ie),P=se(pe,1,"ref-block s-26",null,P,Oe),Te=se(ze,1,"pulse s-26",null,Te,De)},[()=>({mobile:r(),fullscreen:m(),invisible:n(z),"icon-small":n(H)}),()=>({hidden:n(z)}),()=>({paused:n(Y)})]),mt("mouseleave",xe,re),b(t,xe),F(),o()}et(["mousemove","click"]);function Gu(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);Vo(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=Ae();let m=v(()=>e.buttonComponent);var f=de(u);Ri(f,()=>n(m),(p,$)=>{$(p,Yr(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),b(d,u)},$$slots:{default:!0}}),F()}var Ls={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var e2=Ce('<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 na(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=v(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),r=v(()=>`${pn(e.size)}${n(o)}`),a=v(()=>i()?"prev-icon":"next-icon");je(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=e2();b(l,s)},$$slots:{default:!0}}),F()}var t2=M('<div class="icon-background-mobile s-23"><!></div>'),i2={hash:"s-23",code:".icon-background-mobile.s-23{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 Ba(t,e){B(e,!0),Q(t,i2);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"disabled",3,!1),l=ve().ui.t,d=v(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),s=v(()=>e.type==="prev"?l("hotkey_map_item_prev_video_value"):l("hotkey_map_item_next_video_value")),u=v(()=>`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,f)=>{var p=Ae(),$=de(p);{var y=S=>{var I=t2(),T=C(I);let N=v(()=>e.type==="prev");na(T,{get size(){return"32"},get reversed(){return n(N)}}),w(I),b(S,I)},_=S=>{let I=v(()=>e.type==="prev");na(S,{get size(){return"24"},get reversed(){return n(I)}})};R($,S=>{o()?S(y):S(_,!1)})}b(m,p)},$$slots:{default:!0}}),F()}var o2=Ce('<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=v(()=>pn(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,r)=>{var a=o2();b(o,a)},$$slots:{default:!0}}),F()}import{noop as n2}from"@vkontakte/videoplayer-shared/es2018";var r2=M('<div class="icon-background-mobile s-27"></div>'),s2=M("<!> <div><!></div>",1),a2={hash:"s-27",code:".mobile.s-27{align-items:center;display:flex;justify-content:center;position:relative}.icon-background-mobile.s-27{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 zl(t,e){B(e,!0),Q(t,a2);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,n2),d=G("tooltip_restart"),s=v(()=>`${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 us.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,m)=>{var f=s2(),p=de(f);{var $=T=>{var N=r2();b(T,N)};R(p,T=>{o()&&T($)})}var y=L(p,2);let _;var S=C(y);let I=v(()=>o()?"48":"24");tc(S,{get size(){return n(I)}}),w(y),D(T=>_=se(y,1,"s-27",null,_,T),[()=>({mobile:o()})]),b(u,f)},$$slots:{default:!0}}),F()}var l2=Ce('<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 Ms(t,e){B(e,!0);let i=v(()=>pn(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,r)=>{var a=l2();b(o,a)},$$slots:{default:!0}}),F()}import{noop as d2}from"@vkontakte/videoplayer-shared/es2018";var c2=M('<div class="icon-background-mobile s-22"><!></div>'),u2={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 Wl(t,e){B(e,!0),Q(t,u2);let[i,o]=Ve(),r=()=>x(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,""),f=g(e,"click",3,d2),$=ve().ui.t,{toggle:y}=a,_=v(()=>y),S=v(()=>r()!==null),I=v(()=>n(S)?r():s()),T=v(()=>n(I)?$("tooltip_pause"):$("tooltip_play")),N=v(()=>n(I)?Ms:En),k=v(()=>`${d()?"btn-m--play":""} ${m()}`),E=v(()=>n(S)?n(_):f());zt(t,{get className(){return n(k)},testId:"play-btn",get click(){return n(E)},get disabled(){return u()},get ariaLabel(){return n(T)},get ariaKeyShortCut(){return us.KeyK},get ref(){return l()},set ref(A){l(A)},children:(A,W)=>{var H=Ae();let z=v(()=>n(N));var Y=de(H);{var ae=ne=>{var Z=c2(),we=C(Z);Ri(we,()=>n(z),(ue,re)=>{re(ue,{get size(){return"48"}})}),w(Z),b(ne,Z)},j=ne=>{var Z=Ae(),we=de(Z);Ri(we,()=>n(z),(ue,re)=>{re(ue,{get size(){return"24"}})}),b(ne,Z)};R(Y,ne=>{d()?ne(ae):ne(j,!1)})}b(A,H)},$$slots:{default:!0}}),F(),o()}var p2=Ce('<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 bm(t){je(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=p2();b(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=G("tooltip_interactive_go_back"),l=v(()=>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)=>{bm(d,{})},$$slots:{default:!0}}),F()}var f2=M('<span class="gutter s-25"><span><!></span></span>'),m2={hash:"s-25",code:".gutter.s-25{--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-25{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-25{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,m2);let[i,o]=Ve(),r=()=>x(s,"$autoplayNextEnabled$",i),a=g(e,"ref",15,void 0),l=ve(),d=l.ui.t,s=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,m=()=>{u(!r(),!0)},f=d("aria_label_autoplay"),p="12",$="#000",y=v(()=>r()?"true":"false");zt(t,{click:m,get ariaLabel(){return f},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref(_){a(_)},children:(_,S)=>{var I=f2(),T=C(I);let N;var k=C(T);{var E=W=>{En(W,{get size(){return p},fill:$})},A=W=>{Ms(W,{get size(){return p},fill:$})};R(k,W=>{r()?W(E):W(A,!1)})}w(T),w(I),D(W=>N=se(T,1,"toggler s-25",null,N,W),[()=>({enabled:r()})]),b(_,I)},$$slots:{default:!0}}),F(),o()}var v2=Ce('<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 $m(t){je(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=v2();li(),b(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=G("tooltip_interactive_seek"),l=v(()=>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)=>{$m(d,{})},$$slots:{default:!0}}),F()}var g2=Ce('<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>'),h2=Ce('<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 ym(t,e){let i=g(e,"isOpened",3,!1),o=v(()=>i()?"graph-close-icon":"graph-open-icon");je(t,{get testId(){return n(o)},children:(r,a)=>{var l=h2(),d=L(de(l));{var s=u=>{var m=g2();b(u,m)};R(d,u=>{i()&&u(s)})}b(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=ve().ui.t,s=v(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=v(()=>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,f)=>{let p=v(()=>!!a());ym(m,{get isOpened(){return n(p)}})},$$slots:{default:!0}}),F()}import{PlaybackState as Q_}from"@vkontakte/videoplayer-core/es2018";function sc(t,e){B(e,!0);let[i,o]=Ve(),r=()=>x(u,"$playbackState$",i),a=g(e,"isMobile",3,!1),l=g(e,"isLiveActive",3,!1),d=g(e,"ariaLabel",3,""),s=ve(),u=s.state.playbackState$,m=s.actions.internal.switchToActiveLive,f=s.actions.internal.togglePlay,p=v(()=>()=>{if(!l()){m();return}r()===Q_.PAUSED&&f()}),$=v(()=>a()?"":"btn--live btn-full-opacity"),y=v(()=>l()?"btn-live":"btn-live-offset"),_=v(()=>l()&&r()===Q_.PLAYING);zt(t,{get className(){return n($)},get testId(){return n(y)},get disabled(){return n(_)},get ariaLabel(){return d()},get click(){return n(p)},children:(S,I)=>{Md(S,{get isActive(){return l()}})},$$slots:{default:!0}}),F(),o()}import{noop as G_}from"@vkontakte/videoplayer-shared/es2018";var _2=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),b2=M('<img class="icon" aria-hidden="true"/>');function Fa(t,e){"use strict";let i=q(!1),o=()=>{O(i,!0)};var r=Ae(),a=de(r);{var l=s=>{var u=_2();b(s,u)},d=s=>{var u=b2();D(()=>Me(u,"src",e.icon)),mt("error",u,o),Sa(u),b(s,u)};R(a,s=>{n(i)?s(l):s(d,!1)})}b(t,r)}function xm(t,e){B(e,!0);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,G_),r=g(e,"ref",15),a=v(()=>o()===G_),l=v(()=>n(a)||i()),d=v(()=>n(a)?"btn-full-opacity":"");Vo(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=v(()=>{var f;return(f=e.testId)!=null?f: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:(f,p)=>{Fa(f,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),F()}var Y_=t=>!!t.buttonComponent;var Vs={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var Yu=(t,e,i,o)=>{if(t)for(let[r,a]of Object.entries(e))a.set(Yn(t,i,r,o))};import{interpolate as wm}from"@vkontakte/videoplayer-shared/es2018";var j_=10,X_=40,Sm=.2,y2=.5,x2=65,w2=114,S2=4,Z_=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=v(()=>i?x2:w2),r=q(!1),a=q(0),l=q(0),d=v(()=>n(o)+j_-X_-S2),s=v(()=>wm(n(a),[Sm,1],[0,-n(d)])),u=v(()=>wm(n(a),[Sm,1],[0,X_])),m=v(()=>wm(n(a),[Sm,1],[0,n(o)+j_]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(m),onPointerDown:_=>{var S;O(l,((S=e())==null?void 0:S.getBoundingClientRect().bottom)||0,!0),O(r,!0)},onPointerMove:_=>{if(!n(r))return;let S=Math.max(Math.min(_.clientY-n(l),0),-n(d));O(a,Math.abs(S/n(d)),!0)},onPointerUp:()=>{O(r,!1),O(a,n(a)>=y2?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{O(a,0)}}};var C2=t=>t;function gs(t,{delay:e=0,duration:i=400,easing:o=C2}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var T2=M('<span class="root s-2d"> </span>'),I2={hash:"s-2d",code:".root.s-2d{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 Cm(t,e){Q(t,I2);var i=T2(),o=C(i,!0);w(i),D(()=>me(o,e.time)),b(t,i)}var E2=M('<div class="tooltip-wrapper s-v"><div><!></div></div>'),k2={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 Tm(t,e){Q(t,k2);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=q(void 0),u=q(void 0);function m(S){if(!n(u))return 0;let{width:I}=n(u).getBoundingClientRect(),T=I/2;return S<T?T+l():S>e.containerWidth-T?e.containerWidth-T-d():S}let f=v(()=>m(r()));var p=E2(),$=C(p);let y;var _=C($);ii(_,()=>{var S;return(S=e.children)!=null?S:ft}),w($),Ye($,S=>O(u,S),()=>n(u)),w(p),Ye(p,S=>O(s,S),()=>n(s)),D(S=>{qe(p,`transform: translate(${n(f)}px, ${a()}px);`),y=se($,1,"tooltip s-v",null,y,S),qe($,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,p)}var J_=t=>Math.abs(t)/90%4===1;var P2=M('<div class="preview s-u"></div>'),A2=M('<div class="time s-u"> </div>'),L2=M('<div><!> <div class="episode s-u"><!></div> <!></div>'),M2={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)}.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)}"};function Im(t,e){B(e,!0),Q(t,M2);let[i,o]=Ve(),r=()=>x(y,"$rotateAlpha",i),a=()=>x(_,"$playerSize",i),l={MOBILE:150,DESKTOP:278},d=g(e,"time",3,""),s=g(e,"isMobile",3,!1),u=g(e,"videoEpisodes",19,()=>[]),m=g(e,"progress",3,0),f=g(e,"duration",3,0),p=g(e,"isInteractive",3,!1),$=ve(),y=$.ui.rotateAlpha,_=$.ui.playerSize,S=q(0),I=q(0),T=q(""),N=q(0),k=q(0),E=q(0),A=q(0),W=v(()=>Bu(m(),f(),u())),H=v(()=>Bl(r())),z=v(()=>J_(r())),Y=v(ne),ae=v(()=>(n(z)?1:-1)*(n(S)/2-n(I)/2)),j=v(()=>n(ae)*-1);Ne(()=>{(X=>{O(S,X.width,!0),O(I,X.height,!0)})(we())}),Ne(()=>{(X=>{O(T,X.imgSrc,!0),O(N,X.imgWidth,!0),O(k,X.imgHeight,!0),O(E,X.imgOffsetX,!0),O(A,X.imgOffsetY,!0)})(ue(m()))});function ne(){var De;let X=s()?l.MOBILE:l.DESKTOP,{isVertical:ie}=Z(),Oe=30;return(De=n(W))!=null&&De.text&&(Oe+=16),(ie||n(H))&&(Oe+=18,Oe+=50),Math.min(Math.max(a().height-Oe,0),X)}function Z(){let X=e.previewThumbsData.frameWidth,ie=e.previewThumbsData.frameHeight,Oe=ie>X;return{width:X,height:ie,isHorizontal:!Oe,isVertical:Oe}}function we(){let{height:X,isHorizontal:ie,isVertical:Oe,width:De}=Z();return ie&&(X=X/De*n(Y),De=n(Y)),Oe&&(De=De/X*n(Y),X=n(Y)),{width:De,height:X}}function ue(X){let ie;e.previewThumbsData.isUV?ie=Math.floor(f()*X/e.previewThumbsData.frequency):ie=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*X)));let Oe=Math.floor(ie/e.previewThumbsData.countPerImage),De=Math.floor(ie%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),tt=ie%e.previewThumbsData.countPerRow,U=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&Oe===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(U=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&U++);let Pe=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&Oe===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(Pe=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let Ee=n(S)*Pe,He=n(I)*U,Xe=-tt*n(S),ye=-De*n(I);return{imgSrc:e.previewThumbsData.links[Oe],imgWidth:Ee,imgHeight:He,imgOffsetX:Xe,imgOffsetY:ye}}var re=L2();let _e;var xe=C(re);{var J=X=>{var ie=P2();D(()=>qe(ie,`width: ${n(S)}px; height: ${n(I)}px; background-image: url(${n(T)}); background-size: ${n(N)}px ${n(k)}px; background-position: ${n(E)}px ${n(A)}px;
|
|
61
|
-
transform: rotate(${r()}deg) ${n(H)?`translate(${n(
|
|
62
|
-
`)),b(X,ie)};R(xe,X=>{n(T)&&X(J)})}var Re=L(xe,2),pe=C(Re);{var P=X=>{var ie=Ae(),Oe=de(ie);{var De=U=>{var Pe=cs();D(Ee=>me(Pe,Ee),[()=>G("tooltip_episode_unfinished")]),b(U,Pe)},tt=U=>{var Pe=cs();D(()=>me(Pe,n(W).text||"")),b(U,Pe)};R(Oe,U=>{p()&&n(W).completed===!1?U(De):U(tt,!1)})}b(X,ie)};R(pe,X=>{n(W)&&X(P)})}w(Re);var ze=L(Re,2);{var Te=X=>{var ie=A2(),Oe=C(ie,!0);w(ie),D(()=>me(Oe,d())),b(X,ie)};R(ze,X=>{p()||X(Te)})}w(re),D(X=>{_e=se(re,1,"timeline-preview s-u",null,_e,X),qe(re,`width: ${n(H)?n(I):n(S)}px;`)},[()=>({mobile:s()})]),b(t,re),F(),o()}var V2=M('<span class="time s-f"> </span>'),R2=M("<!> <!>",1),N2={hash:"s-f",code:".time.s-f{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 Em(t,e){var fe,Le,_t,Et,dt;B(e,!0),Q(t,N2);let[i,o]=Ve(),r=()=>x(j,"$interactiveEpisodes$",i),a=()=>x(A,"$duration$",i),l=()=>x(E,"$position$",i),d=()=>x(we,"$isInteractiveExpectation$",i),s=()=>x(Z,"$isInteractiveTime$",i),u=()=>x(xe,"$previewTrackActive",i),m=()=>x(W,"$isLive$",i),f=()=>x(_e,"$disabledControls$",i),p=()=>x(z,"$isMobile",i),$=()=>x(H,"$isActiveLive$",i),y=()=>x(k,"$bufferedProgress$",i),_=g(e,"showTimeline",3,!1),S=g(e,"withEpisodes",3,!0),I=g(e,"ref",15,void 0),T=ve(),N=Lt(),k=T.state.bufferedProgress$,E=T.state.positionWithScrubbing$,A=T.state.duration$,W=T.state.isLive$,H=T.state.isActiveLive$,z=T.ui.isMobile,Y=N.features.episodes&&S()?T.actions.internal.getVideoEpisodes():void 0,ae=T.actions.internal.getPreviewThumbsData(),j=T.state.interactiveEpisodes$,ne=T.state.isInteractive,Z=T.state.isInteractiveTime$,we=T.state.isInteractiveExpectation$,ue=T.actions.internal.correctSeekTimeToInteractive,re=(fe=T.callbacks)==null?void 0:fe.onDisabledTimelineClick,_e=T.ui.controls.disabledControls$,xe=T.ui.previewTrackActive,J=(_t=(Le=T.callbacks)==null?void 0:Le.uiInfo)==null?void 0:_t.onTimelineMouseEnter,Re=(dt=(Et=T.callbacks)==null?void 0:Et.uiInfo)==null?void 0:dt.onTimelineMouseLeave,pe=T.ui.t,P=N.features.interactiveResponsiveUi,ze=v(()=>ne?r():Y),Te=v(()=>jo(a())),X=v(()=>jo(l())),ie=v(()=>l()/a()),Oe=v(()=>d()||s()),De=q(!1),tt=q(""),U=q(0),Pe=q(0),Ee=q(0),He=v(()=>({containerWidth:n(Pe),translateXPx:n(U),translateYPx:ne&&ae?-36:-16,active:n(De)&&_()&&!n(Oe)&&!P&&!u(),pointer:!N.features.timelinePreview||!ae||m()})),Xe=pe("aria_timeline"),ye=v(()=>pe("aria_timeline_value",{position:n(X),duration:n(Te)}));function ke(ce){return!ue||!ne?ce:ue(ce*a())/a()}function Be(ce,Ue){var Qe;(Qe=e.onSliderPointerDown)==null||Qe.call(e,Ue),T.actions.internal.startScrubbing(ke(ce))}function Nt(ce){s()||T.actions.internal.progressScrubbing(ke(ce))}function ut(ce){var Ue;T.actions.internal.completeScrubbing(ke(ce)),O(De,!1),(Ue=e.onSliderPointerUp)==null||Ue.call(e)}function Ot(ce,Ue,Qe){var st;(st=e.onSliderPointerEnter)==null||st.call(e,ce),Zt(ce,Ue,Qe),O(De,!0)}function rt(ce,Ue,Qe,st){var Dt;(Dt=e.onSliderMove)==null||Dt.call(e,st,ce),Zt(ce,Ue,Qe),O(De,!0)}function wt(){var ce;O(De,!1),(ce=e.onSliderLeave)==null||ce.call(e)}function Zt(ce,Ue,Qe){O(Ee,ke(ce),!0),O(U,Ue,!0),Qe&&O(Pe,Qe,!0),O(tt,Mt(ce),!0)}function Mt(ce){let Ue=jo((m()?1-ce:ce)*a());return m()?`-${Ue}`:Ue}let $e=v(()=>f().has("TIMELINE"));var be=R2(),ee=de(be);Tm(ee,Yr(()=>n(He),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(ce,Ue)=>{var Qe=Ae(),st=de(Qe);{var Dt=ei=>{Im(ei,{get time(){return n(tt)},get isMobile(){return p()},get videoEpisodes(){return n(ze)},get previewThumbsData(){return ae},get progress(){return n(Ee)},get duration(){return a()},get isInteractive(){return ne}})},Bt=ei=>{var hi=V2(),Qi=C(hi,!0);w(hi),D(()=>me(Qi,n(tt))),b(ei,hi)};R(st,ei=>{N.features.timelinePreview&&ae&&!m()?ei(Dt):ei(Bt,!1)})}b(ce,Qe)},$$slots:{default:!0}}));var it=L(ee,2);Oa(it,{className:"timeline-slider",get isActiveLive(){return $()},get isMobile(){return p()},get ariaLabel(){return Xe},ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return l()},get ariaValueText(){return n(ye)},get loadedProgress(){return y()},get filledProgress(){return n(ie)},get handleProgress(){return n(ie)},get videoEpisodes(){return n(ze)},onPointerDown:Be,onHandleMove:Nt,onPointerMove:rt,onPointerUp:ut,onPointerEnter:Ot,onPointerLeave:wt,get onMouseEnter(){return J},get onMouseLeave(){return Re},get onDisabledClick(){return re},get isInteractive(){return ne},get disabled(){return n($e)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:ut,get ref(){return I()},set ref(ce){I(ce)}}),b(t,be),F(),o()}var O2={hash:"s-g",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,O2);let[i,o]=Ve(),r=()=>x(s,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"duration",3,0),d=ve(),s=d.ui.isMobile,u=d.ui.t,m=v(()=>jo(l())),f=v(()=>jo(a())),p=v(()=>a()/l()),$=v(()=>u("aria_timeline_value",{position:n(f),duration:n(m)})),y=v(()=>Math.round(n(p)*100));Oa(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n($)},get filledProgress(){return n(p)},hideHandel:!0,get squareBorders(){return r()}}),F(),o()}var D2=M("<div><!></div>"),B2=M("<div></div>"),F2={hash:"s-a",code:".timeline.s-a{align-items:center;bottom:0;box-sizing:border-box;display:flex;min-width:86px;pointer-events:all;position:relative;width:100%}.timeline.mobile.s-a{height:16px;margin-top:6px;padding:6px 12px 7px}.withoutPadding.s-a{padding:0}.timeline-stub.s-a{min-width:20px;width:100%}.timeline-stub.mobile.s-a{height:8px}"};function Ha(t,e){B(e,!0),Q(t,F2);let[i,o]=Ve(),r=()=>x(S,"$isLive$",i),a=()=>x(N,"$isMobile",i),l=()=>x(k,"$disabled",i),d=()=>x(T,"$adPosition",i),s=()=>x(I,"$adDuration",i),u=g(e,"isAds",3,!1),m=g(e,"isHidden",3,!1),f=g(e,"timelineNotAvailable",3,!1),p=g(e,"needPadding",3,!0),$=g(e,"ref",15,void 0),y=ve(),_=Lt(),S=y.state.isLive$,I=y.ads.duration,T=y.ads.position,N=y.ui.isMobile,k=le(!1),E=v(()=>!f()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var A=Ae(),W=de(A);{var H=Y=>{var ae=D2();let j;var ne=C(ae);{var Z=ue=>{ac(ue,{get position(){return d()},get duration(){return s()}})},we=ue=>{Em(ue,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return n(E)},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(re){$(re)}})};R(ne,ue=>{u()?ue(Z):ue(we,!1)})}w(ae),Ts(ae,()=>Al(m()&&_.features.usePerformanceFix,k,_.disableInvisibleComponentsTimeout)),D(ue=>j=se(ae,1,"timeline s-a",null,j,ue),[()=>({withoutPadding:!p(),mobile:a(),"out-of-flow":l()})]),b(Y,ae)},z=Y=>{var ae=B2();let j;D(ne=>j=se(ae,1,"timeline-stub s-a",null,j,ne),[()=>({mobile:a()})]),b(Y,ae)};R(W,Y=>{n(E)?Y(H):Y(z,!1)})}b(t,A),F(),o()}import{getRangeAroundIndex as H2}from"@vkontakte/videoplayer-shared/es2018";var U2=(t,e,i,o,r,a,l)=>{O(e,!0),O(i,t.clientX,!0),O(o,n(r),!0),a(l())},z2=M("<div></div>"),W2=M('<div><div class="track s-2c"></div></div>'),K2={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 Pm(t,e){B(e,!0),Q(t,K2);let[i,o]=Ve(),r=()=>x(N,"$rotateAlpha",i),a=()=>x(_,"$position$",i),l=()=>x(y,"$duration$",i),d=ve(),{countPerImage:s=0,countPerRow:u=0,countTotal:m=0,links:f=[],frameHeight:p=0,frameWidth:$=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:_}=d.state,{startScrubbing:S,progressScrubbing:I,completeScrubbing:T}=d.actions.internal,N=d.ui.rotateAlpha,k=q(void 0),E=q(!1),A=q(0),W=q(0),H=q(0),z=q(0),Y=v(()=>p<=$),ae=v(()=>Bl(r())),j=v(()=>n(Y)?!n(ae):n(ae)),ne=114,Z=65,we=3,ue=v(()=>n(j)?ne:Z),re=v(()=>n(Y)?ne:Z),_e=v(()=>n(Y)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),xe=v(()=>m*n(ue)),J=q(0);Ne(()=>{O(z,Math.ceil(-n(H)/n(ue))-1),O(H,-n(xe)*a()/l())});let Re=()=>{T(pe(),!0)},pe=()=>l()*-n(H)/n(xe)/l(),P=!1,ze=ye=>{if(!n(E))return!1;let ke=ye.clientX-n(A);O(H,n(W)+ke),O(H,Math.max(Math.min(n(H),0),-n(xe)),!0),Math.abs(ke)>1&&(P=!0),I(pe())},Te=ye=>{n(E)&&(O(E,!1),!P&&ye&&O(H,-(ye.offsetX-n(J)/2)),P=!1,Re())},X=()=>{n(E)&&Te()},ie=v(()=>s/u),Oe=(ye,ke)=>{if(ye!==f.length-1)return u;let Be=0,Nt=ke*u;for(let ut=1;ut<=u;ut++)ye*s+Be+Nt<m&&Be++;return Be},De=v(()=>Math.floor(n(z)/s)),tt=v(()=>H2(3,n(De),f.length-1)),U=(ye,ke,Be)=>{let Nt=s*n(ue);return ye*Nt+ke*n(ue)*u+n(J)/2-we/2+Be*n(ue)},Pe=v(()=>[`--row-numbers: ${n(ie)}`,`--column-numbers: ${u}`,`--frame-width: ${n(re)}px`,`--frame-height: ${n(_e)}`].join(";"));var Ee=W2();let He;var Xe=C(Ee);Xe.__pointerdown=[U2,E,A,W,H,S,pe],Xe.__pointermove=ze,Xe.__pointerup=Te,bi(Xe,20,()=>n(tt),ye=>ye,(ye,ke)=>{var Be=Ae(),Nt=de(Be);bi(Nt,16,()=>Array.from({length:n(ie)},(ut,Ot)=>Ot),ut=>ut,(ut,Ot)=>{var rt=Ae(),wt=de(rt);bi(wt,16,()=>Array.from({length:Oe(ke,Ot)},(Zt,Mt)=>Mt),Zt=>Zt,(Zt,Mt)=>{var $e=z2();D((be,ee)=>{qe($e,be),se($e,1,ee,"s-2c")},[()=>`--row-index: ${Ot}; --column-index: ${Mt}; left: ${U(ke,Ot,Mt)}px; background-image: url(${f[ke]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),b(Zt,$e)}),b(ut,rt)}),b(ye,Be)}),w(Xe),w(Ee),Ye(Ee,ye=>O(k,ye),()=>n(k)),D(ye=>{He=se(Ee,1,"root s-2c",null,He,ye),qe(Ee,n(Pe)),qe(Xe,`transform: translateX(${n(H)}px); width: ${n(xe)}px;`)},[()=>({"is-vertical-video":!n(Y),"vertically-rotated":n(ae)})]),mt("mouseleave",Xe,X),Tn(Ee,"clientWidth",ye=>O(J,ye)),b(t,Ee),F(),o()}et(["pointerdown","pointermove","pointerup"]);var q2=M('<div class="notification s-2b"><span class="description s-2b"> </span></div>'),Q2={hash:"s-2b",code:".notification.s-2b{background:var(--notification-bg);border-radius:var(--notification-radius);padding:9px 14px 10px 12px}.description.s-2b{font-size:14px;line-height:18px}"};function Am(t,e){B(e,!1),Q(t,Q2);let i=340,{ui:{t:o}}=ve();bo();var r=q2(),a=C(r),l=C(a,!0);w(a),w(r),D(d=>me(l,d),[()=>o("preview_track_close_tooltip")],yn),Gr(3,r,()=>gs,()=>({duration:i})),b(t,r),F()}import{getRangeAroundIndex as G2}from"@vkontakte/videoplayer-shared/es2018";var Y2=M('<div class="preview-track-close tooltip s-29"><!></div>'),j2=M('<div class="preview-track-control s-29"><!> <div class="preview-track-close s-29"><!></div> <!></div>'),X2=M('<div class="wrapper-preview-track s-29"><!></div>'),Z2=M('<div class="enriched-timeline s-29"><!> <!> <!></div>'),J2={hash:"s-29",code:".enriched-timeline.s-29{padding:var(--timeline-padding-vertical-top) var(--timeline-padding-horizontal) var(--timeline-padding-vertical-bottom);pointer-events:auto;position:relative}.preview-track-control.s-29{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-29{pointer-events:auto;position:absolute;right:calc(var(--timeline-padding-horizontal))}.preview-track-close.tooltip.s-29{bottom:32px;opacity:0;transition:opacity .2s}.preview-track-close.s-29:hover+.tooltip:where(.s-29){opacity:1}.wrapper-preview-track.s-29{box-sizing:border-box;left:0;overflow:hidden;padding:0 calc(var(--timeline-padding-horizontal));position:absolute;right:0;z-index:-1}"};function Lm(t,e){B(e,!0),Q(t,J2);let[i,o]=Ve(),r=()=>x(_,"$playerSize",i),a=()=>x(y,"$duration$",i),l=()=>x(S,"$previewTrackActive",i),d=()=>x(p,"$position$",i),s=()=>x($,"$isRewindableLive$",i),u=g(e,"timelineRef",15,void 0),m=ve(),f=200,{positionWithScrubbing$:p,isRewindableLive$:$,duration$:y}=m.state,{playerSize:_,previewTrackActive:S}=m.ui,{countPerImage:I=0,links:T=[],frequency:N=0}=m.actions.internal.getPreviewThumbsData()||{},k=v(()=>r().width>100),E=q(!s_()),A=()=>{n(E)&&(r_(),O(E,!1))},W=ue=>{let re=Math.floor(a()*ue/N),_e=Math.floor(re/I),xe=G2(3,_e,T.length-1);for(let J of xe){let Re=new Image;Re.src=T[J]}},H=(ue,re)=>{W(re),!l()&&e.onTimelineMove(ue)};var z=Z2(),Y=C(z);{var ae=ue=>{var re=j2(),_e=C(re);let xe=v(()=>jo(d()));Cm(_e,{get time(){return n(xe)}});var J=L(_e,2),Re=C(J);Es(Re,{onClick:()=>m.actions.internal.closePreviewTrack()}),w(J);var pe=L(J,2);{var P=ze=>{var Te=Y2(),X=C(Te);Am(X,{}),w(Te),b(ze,Te)};R(pe,ze=>{n(E)&&ze(P)})}w(re),mt("mouseleave",J,A),Gr(3,re,()=>gs,()=>({duration:f})),b(ue,re)};R(Y,ue=>{l()&&ue(ae)})}var j=L(Y,2);let ne=v(()=>!n(k));Ha(j,{get isHidden(){return n(ne)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return s()},onSliderMove:H,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:W,get ref(){return u()},set ref(ue){u(ue)}});var Z=L(j,2);{var we=ue=>{var re=X2(),_e=C(re);Pm(_e,{}),w(re),D(()=>qe(re,`height: ${e.animatedPreviewTrackHeight}px;`)),b(ue,re)};R(Z,ue=>{e.previewTrackAvailable&&ue(we)})}w(z),D(()=>qe(z,`transform: translateY(${e.animatedOffsetY}px);`)),b(t,z),F(),o()}var tw=M('<div><!> <div class="controls s-12" data-testid="player_controls"><div class="controls-left s-12"><!> <!> <!></div> <div class="controls-right s-12"></div></div></div> <!>',1),iw={hash:"s-12",code:'.wrapper-bottom.s-12{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-12:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-12>:where(.s-12){pointer-events:auto}.controls.s-12{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-12,.controls-right.s-12{align-content:center;display:flex}.controls-left.s-12{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-12 >:not(:first-child),.controls-right.s-12 >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-12{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-12{transition:none}'};function Vm(t,e){var la,Sr;B(e,!0),Q(t,iw);let[i,o]=Ve(),r=()=>x(yo,"$disabledControls$",i),a=()=>x(ot,"$adPlaybackState",i),l=()=>x(Bt,"$playbackState$",i),d=()=>x(ho,"$currentSubtitle$",i),s=()=>x(Qi,"$isEnded$",i),u=()=>x(Xo,"$currentGridType$",i),m=()=>x(Vt,"$isLive$",i),f=()=>x(We,"$chromecastState$",i),p=()=>x(vt,"$isPictureInPictureActive",i),$=()=>x(Gt,"$pictureInPictureType$",i),y=()=>x(yi,"$availableSubtitlesList$",i),_=()=>x(Ft,"$contextMenuOpenedByKeyboard$",i),S=()=>x(St,"$showContextMenuBtn$",i),I=()=>x(fi,"$isRewindableLive$",i),T=()=>x(ui,"$isActiveLive$",i),N=()=>x(Jr,"$graphIsOpened$",i),k=()=>x(vn,"$contextMenuVisible$",i),E=()=>x(Ni,"$isFullscreen",i),A=()=>x(Di,"$autoplayNextEnabled",i),W=()=>x(n(Pi),"$prevButton",i),H=()=>x(n(ji),"$replayButton",i),z=()=>x(n(Oo),"$playButton",i),Y=()=>x(n(Do),"$nextButton",i),ae=()=>x(n(so),"$playPrevChapterButton",i),j=()=>x(n(Ii),"$seekToInteractiveButton",i),ne=()=>x(n(Dr),"$interactiveGraphButton",i),Z=()=>x(n(Br),"$liveButton",i),we=()=>x(n(es),"$time",i),ue=()=>x(n(ts),"$episodes",i),re=()=>x(n(Fr),"$vkLogo",i),_e=()=>x(n(To),"$volume",i),xe=()=>x(n(on),"$subtitles",i),J=()=>x(n(ao),"$settings",i),Re=()=>x(n(xr),"$context",i),pe=()=>x(n(Bo),"$fullscreen",i),P=()=>x(n(is),"$chromecast",i),ze=()=>x(xo,"$additionalDesktopControlPanelRightButtons$",i),Te=()=>x(Oi,"$playerSize",i),X=()=>x(Zo,"$isInteractiveTime$",i),ie=()=>x(Xt,"$previewTrackActive",i),Oe=()=>x($i,"$settingsMenuVisible",i),De=()=>x(lo,"$settingButtonRef$",i),tt=()=>x(K,"$startedByKeyboard$",i),U=()=>x(ei,"$isAudioAvailable$",i),Pe=()=>x(be,"$fakeIsPlaying$",i),Ee=()=>x(hs,"$seekToInteractiveDisabledTooltip$",i),He=()=>x(yt,"$isPreviewTrackHorizontallyAligned$",i),Xe=()=>x(he,"$previewTrackAvailable",i),ye=()=>x(uo,"$previewTrackDragInProgress",i),ke=()=>x(qt,"$adPosition",i),Be=()=>x(Dt,"$position$",i),Nt=()=>x(xt,"$adDuration",i),ut=()=>x(st,"$duration$",i),Ot=g(e,"playerControlsWrapperRef",15,void 0),rt=g(e,"playerControlsRef",15,void 0),wt=g(e,"isAds",3,!1),Zt=g(e,"logoTargetUrl",3,""),Mt=g(e,"isOneVideoPlaylist",3,!1),$e=g(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:be}=$o(),ee=ve(),it=$o(),fe=Lt(),Le=ee.actions.internal.toggleMuted,_t=ee.actions.internal.togglePlay,Et=ee.actions.internal.pause,dt=ee.actions.internal.toggleSubtitle,ce=ee.actions.internal.checkFullscreenSupport,Ue=(la=ee.callbacks)==null?void 0:la.onAudioDoesNotExistHint,Qe=(Sr=ee.callbacks)==null?void 0:Sr.onAudioDisabledHint,st=ee.state.duration$,Dt=ee.state.positionWithScrubbing$,Bt=ee.state.playbackState$,ei=ee.state.isAudioAvailable$,hi=ee.state.isAudioDisabled,Qi=ee.state.isEnded$,Vt=ee.state.isLive$,ui=ee.state.isActiveLive$,fi=ee.state.isRewindableLive$,{isActive$:vt,type$:Gt}=it.pictureInPicture$,$i=ee.ui.settingsMenu.visible$,Gi=ee.ui.settingsMenu.openedByBtnKeyboard$,jt=ee.ui.controls,Tt=ee.actions.internal.getVideoEpisodes(),We=ee.state.chromecastState$,yi=ee.state.availableSubtitlesList$,ho=ee.state.currentSubtitle$,yo=jt.disabledControls$,vn=ee.ui.contextMenu.visible$,St=ee.ui.contextMenu.showContextMenuBtn$,Ft=ee.ui.contextMenu.openedByBtnKeyboard$,K=ee.ui.startedByKeyboard$,kt=ee.ui.controlBlocks,si=ee.ui.previewTrackNotificationVisible,at=ee.ui.t,xt=ee.ads.duration,qt=ee.ads.position,ot=ee.ads.playbackState,Ni=ee.ui.isFullscreen,Oi=ee.ui.playerSize,Xo=ee.ui.currentGridType$,xo=ee.ui.additionalDesktopControlPanelRightButtons$,Di=ee.ui.autoplayNextEnabled$,Yi=ee.actions.internal.getVideoElement,Ar=ee.actions.internal.replayInteractive,_o=ee.actions.internal.prevVideoClick,io=ee.actions.internal.nextVideoClick,Ti=ee.state.isInteractive,Zo=ee.state.isInteractiveTime$,Jo=ee.state.showInteractiveGraph,Pn=ee.state.showSeekToInteractive,Xn=ee.state.showPlayPrevChapter,Lr=ee.state.showInteractiveTimeIndicator,Zr=ee.state.playPrevChapterDisabledTooltip,hs=it.seekToInteractiveDisabledTooltip$,Jr=it.graphIsOpened$,Zn=fe.features.interactiveResponsiveUi,hr=v(()=>r().has("EPISODE_BUTTON")),gn=v(()=>r().has("GRAPH_BUTTON")),An=v(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),Ro=v(()=>r().has("PLAY_BUTTON")),Ln=v(()=>r().has("REPLAY_BUTTON")),Jn=v(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),_r=()=>ee.actions.internal.toggleChromecast(),br=v(()=>wt()?a()==="playing":l()===Mm.PLAYING),Mr=v(()=>d().value!=="off"),oo=v(()=>s()&&!wt()||Ti),Vr=v(()=>Zn?n(oo)&&eo(u(),"m"):n(oo)),Mn=v(()=>!s()||Ti||wt()),Vn=v(()=>eo(u(),"m")),no=v(()=>e.showNextPrevButtons&&eo(u(),"m")&&!wt()&&e.nextButtonActive),Rr=v(()=>e.showNextPrevButtons&&eo(u(),"m")&&!wt()&&e.prevButtonActive),Rn=v(()=>!wt()&&!!m()),pt=v(()=>f()!==eb.NOT_AVAILABLE&&!(p()&&$()===1)&&eo(u(),"m")&&!Ti),di=v(()=>e.showAutoplayNext&&!Mt()&&eo(u(),"s")),$r=v(()=>y().length>0&&eo(u(),"m")),er=v(()=>_()||S()),tr=v(()=>eo(u(),"s")&&!wt()),en=v(()=>!e.logoHidden&&!wt()),yr=v(()=>fe.features.fullscreen&&ce()&&(e.logoHidden||eo(u(),Zn?"xs":"s"))&&!(p()&&$()===1)&&(Ti?$e():!0)),tn=v(()=>(!m()||wt())&&!(fe.features.interactiveHideTime&&Ti)),hn=v(()=>Jo&&eo(u(),"m")),Nn=v(()=>Zn?Pn&&eo(u(),"s"):Pn),On=v(()=>Zn?Xn&&eo(u(),"s"):Xn),No=v(()=>!wt()&&!m()&&!!(Tt!=null&&Tt.length)&&n(Vn)&&!n(hr)),wo=v(()=>!I()||!!T()),ir=v(()=>N()?at("tooltip_interactive_graph_on"):at("tooltip_interactive_graph_off")),So=v(()=>k()?at("tooltip_context_menu_close"):at("tooltip_context_menu_open")),Bi=(nt,ct)=>nt?ct&&ct===Mm.PAUSED?at("tooltip_play"):"":at("tooltip_live"),Dn=v(()=>Bi(n(wo),l())),or=v(()=>fe.logoType==="vk_video"?at("tooltip_vk_video_logo"):at("tooltip_vk_logo")),Nr=v(()=>n(Mr)?at("tooltip_subtitles_on"):at("tooltip_subtitles_off")),Bn=v(()=>E()?at("tooltip_fullscreen_on"):at("tooltip_fullscreen_off")),Co=v(()=>f()===eb.CONNECTED?at("tooltip_chromecast_on"):at("tooltip_chromecast_off")),Or=v(()=>A()?at("tooltip_autoplay_on"):at("tooltip_autoplay_off")),bt=q(0),$t=ai({}),ro=ai({}),Pi=v(()=>jt.prevButton),ji=v(()=>jt.replayButton),Oo=v(()=>jt.playButton),Do=v(()=>jt.nextButton),so=v(()=>jt.playPrevChapterButton),Ii=v(()=>jt.seekToInteractiveButton),Dr=v(()=>jt.interactiveGraphButton),Br=v(()=>jt.liveButton),es=v(()=>jt.time),ts=v(()=>jt.episodes),Fr=v(()=>jt.vkLogo),To=v(()=>jt.volume),on=v(()=>jt.subtitles),ao=v(()=>jt.settings),xr=v(()=>jt.context),Bo=v(()=>jt.fullscreen),is=v(()=>jt.chromecast),Ke=v(()=>({prevButton:W()?W().right-W().left:0,replayButton:H()?H().right-H().left:0,playButton:z()?z().right-z().left:0,nextButton:Y()?Y().right-Y().left:0,playPrevChapterButton:ae()?ae().right-ae().left:0,seekToInteractiveButton:j()?j().right-j().left:0,interactiveGraphButton:ne()?ne().right-ne().left:0,liveButton:Z()?Z().right-Z().left:0,time:we()?we().right-we().left:0,episodes:ue()?ue().right-ue().left:0,vkLogo:re()?re().right-re().left:0,volume:_e()?_e().right-_e().left:0,subtitles:xe()?xe().right-xe().left:0,settings:J()?J().right-J().left:0,context:Re()?Re().right-Re().left:0,fullscreen:pe()?pe().right-pe().left:0,chromecast:P()?P().right-P().left:0,additionalButtons:ze().length?ze().reduce(nt=>[...nt,40],[]):[]})),Pt=q(0);Ne(()=>{(!n(Pt)||n(Pt)<n(Ke).time)&&Ct(()=>O(Pt,n(Ke).time,!0))});let vi=q(!1);Ne(()=>{let nt=0;n(No)&&(eo(u(),"xl")?nt=n(Ke).time:nt=60);let ct=n(Ke).prevButton+n(Ke).playButton+n(Ke).nextButton+n(Ke).seekToInteractiveButton+n(Ke).interactiveGraphButton+n(Ke).liveButton+n(Pt)+nt;O(vi,n(tn)&&n(bt)>=ct,!0)});let Io=v(()=>n(vi)&&eo(u(),"m")),Eo=tb(Ul,260),Fo=tb(Yu,260);Ne(()=>{Te(),X(),ie(),Eo(Yi(),jt,$t,e.showControls),Fo(Yi(),kt,ro,e.showControls)}),Ne(()=>{ro.bottom=Ot()});let lo=le();Ne(()=>{Oe(),De()&&Ct(()=>Ml(De(),Oe(),Gi))});let Xi;Ne(()=>{tt(),Ct(()=>Qu(K,tt(),Xi))});function _n(){ta({isAudioDisabled:hi,isAudioAvailable:U(),isAds:wt(),audioIsNotExistHintCallback:Ue,audioDisabledHintCallback:Qe})&&Le()}let bn=Ti?Ar:_t,co=v(()=>Pe()!==null),ko=v(()=>n(co)?Pe():n(br)),Fn=v(()=>n(ko)?at("tooltip_pause"):at("tooltip_play")),nr=at("tooltip_episodes"),rr=v(()=>{var nt,ct,Fi,zo;return n(Rr)?{id:"prevButton",type:"desktop-control-panel-left",weight:Ls.prevButton,buttonComponent:Ba,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:_o.bind(null,!0)},tooltipEnabled:!((ct=(nt=ee.callbacks)==null?void 0:nt.uiInfo)!=null&&ct.onPrevButtonMouseEnter)&&!((zo=(Fi=ee.callbacks)==null?void 0:Fi.uiInfo)!=null&&zo.onPrevButtonMouseLeave),mouseEnter:()=>{var Hi,gi,Li;(Li=(gi=(Hi=ee.callbacks)==null?void 0:Hi.uiInfo)==null?void 0:gi.onPrevButtonMouseEnter)==null||Li.call(gi,Yn(Yi(),$t,"prevButton",e.showControls))},mouseLeave:()=>{var Hi,gi,Li;(Li=(gi=(Hi=ee.callbacks)==null?void 0:Hi.uiInfo)==null?void 0:gi.onPrevButtonMouseLeave)==null||Li.call(gi,Yn(Yi(),$t,"prevButton",e.showControls))},tooltipText:at("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),Hn=v(()=>n(Vr)?{id:"replayButton",type:"desktop-control-panel-left",weight:Ls.replayButton,buttonComponent:zl,buttonComponentProps:{disabled:n(Ln),click:bn},tooltipText:at("tooltip_restart"),disabled:n(Ln)}:void 0),_s=v(()=>n(Mn)?{id:"playButton",type:"desktop-control-panel-left",weight:Ls.playButton,buttonComponent:Wl,buttonComponentProps:{disabled:n(Ro),isPlaying:n(br),click:_t},tooltipText:n(Fn),disabled:n(Ro)}:void 0),os=v(()=>{var nt,ct,Fi,zo;return n(no)?{id:"nextButton",type:"desktop-control-panel-left",weight:Ls.nextButton,buttonComponent:Ba,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:io.bind(null,!0)},tooltipEnabled:!((ct=(nt=ee.callbacks)==null?void 0:nt.uiInfo)!=null&&ct.onNextButtonMouseEnter)&&!((zo=(Fi=ee.callbacks)==null?void 0:Fi.uiInfo)!=null&&zo.onNextButtonMouseLeave),mouseEnter:()=>{var Hi,gi,Li;(Li=(gi=(Hi=ee.callbacks)==null?void 0:Hi.uiInfo)==null?void 0:gi.onNextButtonMouseEnter)==null||Li.call(gi,Yn(Yi(),$t,"nextButton",e.showControls))},mouseLeave:()=>{var Hi,gi,Li;(Li=(gi=(Hi=ee.callbacks)==null?void 0:Hi.uiInfo)==null?void 0:gi.onNextButtonMouseLeave)==null||Li.call(gi,Yn(Yi(),$t,"nextButton",e.showControls))},tooltipText:at("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Ge=v(()=>Ti&&n(On)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Ls.playPrevChapterButton,buttonComponent:ic,buttonComponentProps:{disabled:n(Jn),click:e.playPrevChapter},tooltipText:at("tooltip_interactive_go_back"),disabledTooltipContent:at(Zr),disabled:n(Jn)}:void 0),Wt=v(()=>Ti&&n(Nn)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Ls.seekToInteractiveButton,buttonComponent:nc,buttonComponentProps:{disabled:n(An),click:e.seekToInteractive},tooltipText:at("tooltip_interactive_seek"),disabled:n(An),disabledTooltipContent:at(Ee())}:void 0),wi=v(()=>Ti&&n(hn)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Ls.interactiveGraphButton,buttonComponent:rc,buttonComponentProps:{disabled:n(gn),click:Jr.toggle,graphIsOpened:N()},tooltipText:n(ir)}:void 0),Ho=v(()=>n(Rn)?{id:"liveButton",type:"desktop-control-panel-left",weight:Ls.liveButton,buttonComponent:sc,buttonComponentProps:{isLiveActive:n(wo),ariaLabel:n(Dn)},tooltipText:n(Dn),disabled:n(wo)&&l()===Mm.PLAYING}:void 0),nn=v(()=>[n(rr),n(Hn),n(_s),n(os),n(Ge),n(Wt),n(wi),n(Ho)].filter(nt=>!!nt).sort(Ma)),sr=v(()=>n(en)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Vs.vkLogo,buttonComponent:Qd,buttonComponentProps:{targetUrl:Zt(),logoClickable:e.logoClickable,click:Et},tooltipText:n(or),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),rn=v(()=>n(di)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Vs.autoplayNext,buttonComponent:oc,tooltipText:n(Or)}:void 0),Uo=v(()=>({id:"volume",type:"desktop-control-panel-right",weight:Vs.volume,buttonComponent:rm,buttonComponentProps:{click:_n,isAds:wt()}})),Rs=v(()=>n($r)?{id:"subtitles",type:"desktop-control-panel-right",weight:Vs.subtitles,buttonComponent:em,buttonComponentProps:{isSubtitlesEnabled:n(Mr),click:dt},tooltipText:n(Nr)}:void 0),sn=v(()=>n(tr)?{id:"settings",type:"desktop-control-panel-right",weight:Vs.settings,buttonComponent:Ol,buttonComponentProps:{ref$:lo},tooltipText:Oe()?void 0:at("tooltip_settings_off")}:void 0),Ns=v(()=>fe.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Vs.context,buttonComponent:_m,buttonComponentProps:{ariaLabel:at("aria_label_context_menu")},className:n(er)?"":"out-of-view",tooltipText:n(So)}:void 0),ra=v(()=>n(yr)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Vs.fullscreen,buttonComponent:qd,buttonComponentProps:{isFullscreen:E(),click:e.toggleFullscreen},tooltipText:n(Bn)}:void 0),sa=v(()=>n(pt)?{id:"chromecast",type:"desktop-control-panel-right",weight:Vs.chromecast,buttonComponent:Yd,buttonComponentProps:{state:f(),click:_r},tooltipText:n(Co)}:void 0),lt=v(()=>[n(sr),n(rn),n(Uo),n(Rs),n(sn),n(Ns),n(ra),n(sa),...ze()].filter(nt=>!!nt).sort(Ma)),Xt=ee.ui.previewTrackActive,uo=ee.ui.previewTrackDragInProgress,he=ee.ui.previewTrackAvailable,yt=ee.ui.isPreviewTrackHorizontallyAligned,Jt=v(()=>Z_({onPreviewTrackOpened:ee.actions.internal.previewTrackOpened,getTimelineRef:()=>$t.timeline,isHorizontal:He()})),_i=v(()=>n(Jt).progressBarY),Ai=v(()=>n(Jt).controlsY),ci=v(()=>n(Jt).onPointerDown),ti=v(()=>n(Jt).onPointerMove),po=v(()=>n(Jt).onPointerUp),an=v(()=>n(Jt).calculatedHeight),ln=v(()=>n(Jt).closePreviewTrack);Ne(()=>{ie()?si.set(!1):n(ln)()});let Ei;At(()=>()=>Ei&&clearTimeout(Ei));let Gl=nt=>{ie()||!Xe()||(n(ci)(nt),Ei=setTimeout(()=>{ee.actions.internal.previewTrackDragStarted()},200))},ja=()=>{ie()||n(po)(),Ei&&clearTimeout(Ei),ye()&&ee.actions.internal.previewTrackDragFinished()},Os=nt=>{n(ti)(nt),!ie()&&Xe()&&!ie()&&si.set(!0)},Xa=()=>{si.set(!1)};var Za=tw(),wr=de(Za);let aa;var Ds=C(wr);{var Hr=nt=>{let ct=v(()=>n(_i)()),Fi=v(()=>n(an)());Lm(nt,{get animatedOffsetY(){return n(ct)},get animatedPreviewTrackHeight(){return n(Fi)},get canRewindLive(){return e.canRewindLive},get isAds(){return wt()},onTimelineMove:Os,onTimelinePointerDown:Gl,onTimelinePointerUp:ja,onTimelinePointerLeave:Xa,get previewTrackAvailable(){return Xe()},get timelineRef(){return $t.timeline},set timelineRef(zo){$t.timeline=zo}})};R(Ds,nt=>{e.showControls&&nt(Hr)})}var ns=L(Ds,2),Bs=C(ns),ar=C(Bs);bi(ar,17,()=>n(nn),nt=>nt.id,(nt,ct)=>{Gu(nt,{get buttonComponent(){return n(ct).buttonComponent},get buttonComponentProps(){return n(ct).buttonComponentProps},get tooltipText(){return n(ct).tooltipText},get disabledTooltipContent(){return n(ct).disabledTooltipContent},get disabled(){return n(ct).disabled},get className(){return n(ct).className},get tooltipEnabled(){return n(ct).tooltipEnabled},get mouseEnter(){return n(ct).mouseEnter},get mouseLeave(){return n(ct).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return $t[n(ct).id]},set ref(Fi){$t[n(ct).id]=Fi}})});var Ja=L(ar,2);{var el=nt=>{let ct=v(()=>!e.showControls),Fi=v(()=>wt()?ke():Be()),zo=v(()=>wt()?Nt():ut());Wd(nt,{get isHidden(){return n(ct)},isMobile:!1,get showDuration(){return n(Io)},get position(){return n(Fi)},get duration(){return n(zo)},get ref(){return $t.time},set ref(Hi){$t.time=Hi}})};R(Ja,nt=>{n(tn)&&nt(el)})}var Yl=L(Ja,2);let tl=v(()=>!n(No));Vo(Yl,{className:"w-max",get disabled(){return n(tl)},get tooltipContent(){return nr},get tooltipVisible(){return e.showControls},get ref(){return $t.episodes},set ref(nt){$t.episodes=nt},children:(nt,ct)=>{var Fi=Ae(),zo=de(Fi);{var Hi=gi=>{jd(gi,{get position(){return Be()},get duration(){return ut()},get timeCodes(){return Tt}})};R(zo,gi=>{n(No)&&gi(Hi)})}b(nt,Fi)},$$slots:{default:!0}}),w(Bs);var il=L(Bs,2);bi(il,21,()=>n(lt),nt=>nt.id,(nt,ct)=>{var Fi=Ae(),zo=de(Fi);{var Hi=Li=>{Gu(Li,{get buttonComponent(){return n(ct).buttonComponent},get buttonComponentProps(){return n(ct).buttonComponentProps},get tooltipText(){return n(ct).tooltipText},get disabledTooltipContent(){return n(ct).disabledTooltipContent},get disabled(){return n(ct).disabled},get className(){return n(ct).className},get tooltipVisible(){return e.showControls},get ref(){return $t[n(ct).id]},set ref(da){$t[n(ct).id]=da}})},gi=Li=>{let da=v(()=>!!n(ct).disabled);xm(Li,{get id(){return n(ct).id},get testId(){return n(ct).testId},get icon(){return n(ct).icon},get ariaLabel(){return n(ct).ariaLabel},get tooltipText(){return n(ct).tooltipText},get disabledTooltipContent(){return n(ct).disabledTooltipContent},get disabled(){return n(da)},get onClick(){return n(ct).onClick},get disableMouseupTooltipShow(){return n(ct).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return $t[n(ct).id]},set ref(nl){$t[n(ct).id]=nl}})};R(zo,Li=>{Y_(n(ct))?Li(Hi):Li(gi,!1)})}b(nt,Fi)}),w(il),w(ns),Ye(ns,nt=>rt(nt),()=>rt()),w(wr),Ye(wr,nt=>Ot(nt),()=>Ot());var ol=L(wr,2);{var jl=nt=>{ec(nt,{get ref(){return $t.interactiveTimeIndicator},set ref(ct){$t.interactiveTimeIndicator=ct}})};R(ol,nt=>{Lr&&nt(jl)})}D((nt,ct)=>{aa=se(wr,1,"wrapper-bottom s-12",null,aa,nt),qe(ns,ct),ns.inert=ie()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||ye()}),()=>`transform: translateY(${n(Ai)()}px);`]),Tn(Bs,"clientWidth",nt=>O(bt,nt)),b(t,Za),F(),o()}import{ChromecastState as ob,PlaybackState as nb}from"@vkontakte/videoplayer-core/es2018";import{noop as ib}from"@vkontakte/videoplayer-shared/es2018";var ow=M('<div class="icon icon-error-stub s-20"><div class="inner s-20"></div></div>'),nw=M('<img class="icon s-20" aria-hidden="true"/>'),rw={hash:"s-20",code:".icon.s-20{height:24px!important;width:24px!important}.inner.s-20{background-color:var(--white);height:16px;width:16px}"};function Rm(t,e){Q(t,rw);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,ib),r=v(()=>o()===ib),a=v(()=>n(r)||i()),l=q(!1),d=()=>{O(l,!0)},s=v(()=>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 f=Ae(),p=de(f);{var $=_=>{var S=ow();b(_,S)},y=_=>{var S=nw();D(()=>Me(S,"src",e.iconUrl)),mt("error",S,d),Sa(S),b(_,S)};R(p,_=>{n(l)?_($):_(y,!1)})}b(u,f)},$$slots:{default:!0}})}var sw=Ce('<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 Nm(t){je(t,{testId:"muted-icon",children:(e,i)=>{var o=sw();b(e,o)},$$slots:{default:!0}})}import{noop as aw}from"@vkontakte/videoplayer-shared/es2018";function ju(t,e){B(e,!0);let i=g(e,"muted",3,!1),o=g(e,"click",3,aw),r=g(e,"ref",15,void 0),l=ve().ui.t,d=v(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),s=v(()=>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 f=Ae(),p=de(f);{var $=_=>{Nm(_,{})},y=_=>{oa(_,{get size(){return"24"}})};R(p,_=>{i()?_($):_(y,!1)})}b(u,f)},$$slots:{default:!0}}),F()}var lw=Ce('<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>'),dw=Ce('<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>'),cw=Ce('<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 Om(t,e){let i=g(e,"isActive",3,!1),o=v(()=>i()?"pip-icon--active":"pip-icon");je(t,{get testId(){return n(o)},children:(r,a)=>{var l=cw(),d=L(de(l));{var s=m=>{var f=lw();b(m,f)},u=m=>{var f=dw();b(m,f)};R(d,m=>{i()?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}})}import{noop as uw}from"@vkontakte/videoplayer-shared/es2018";function Dm(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isPictureInPictureActive",3,!1),r=g(e,"click",3,uw),a=G("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)=>{Om(l,{get isActive(){return o()}})},$$slots:{default:!0}}),F()}import{debounceFn as rb}from"@vkontakte/videoplayer-shared/es2018";var pw=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},fw=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},mw=M("<div><!></div>"),vw=M("<div><!></div>"),gw=M("<div><!></div>"),hw=M("<!> <!> <!>",1),_w=M("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),bw=M('<div class="wrapper-middle s-13"><!></div>'),$w=M("<div><!></div> <!> <div><!></div>",1),yw=M('<div aria-hidden="true">·</div> <!>',1),xw=M('<!> <!> <div><div><div class="controls mobile s-13" data-testid="bottom-controls"><div class="controls-group contain s-13"><!> <!> <!> <!></div> <div class="controls-group s-13"><!> <!> <!></div></div> <!></div></div> <!>',1),ww={hash:"s-13",code:".wrapper-bottom.s-13{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-13>:where(.s-13){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-13{height:9px;padding:0 4px 4px}.wrapper-middle.s-13{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-13,.wrapper-top-right.s-13{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-13{right:8px;top:4px}.wrapper-top-left.s-13{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-13,.wrapper-middle-left-second.s-13,.wrapper-middle-right.s-13{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-13{left:12px}.wrapper-middle-left-second.s-13{left:64px}.wrapper-middle-right.s-13{right:12px}.controls.s-13{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-13,.controls-group.s-13{display:flex}.controls-group.contain.s-13{min-width:0}.controls-group.s-13 >:not(:first-child){margin-left:8px}.hidden.s-13{opacity:0;visibility:hidden}.controls-hidden.s-13{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-13{transition:none}.overlay-mobile.s-13{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-13,.wrapper-top-right.fullscreen.s-13{top:16px}.controls-wrapper.fullscreen.s-13{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-13{left:44px;top:12px}.wrapper-top-right.fullscreen.s-13{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-13{left:44px}.wrapper-middle-left-second.fullscreen.s-13{left:96px}.wrapper-middle-right.fullscreen.s-13{right:44px}.controls-wrapper.fullscreen.s-13{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function Bm(t,e){var Bo,is;B(e,!0),Q(t,ww);let[i,o]=Ve(),r=()=>x(Oi,"$seekToInteractiveDisabledTooltip$",i),a=()=>x(jt,"$disabledControls$",i),l=()=>x(Mt,"$playbackState$",i),d=()=>x(yo,"$adPlaybackState",i),s=()=>x(ee,"$isEnded$",i),u=()=>x(St,"$playerSize",i),m=()=>x(dt,"$scrubbingInProgress",i),f=()=>x($i,"$chromecastState$",i),p=()=>x(Ue,"$isPictureInPictureActive",i),$=()=>x(Qe,"$pictureInPictureType$",i),y=()=>x(ce,"$mobileNotReportControlHidden$",i),_=()=>x(fi,"$chromecastHidden",i),S=()=>x(rt,"$playerPhase",i),I=()=>x(Vt,"$pipHidden",i),T=()=>x(We,"$currentGridType$",i),N=()=>x(hi,"$vkLogoHidden",i),k=()=>x(ei,"$volumeHidden",i),E=()=>x(it,"$isLive$",i),A=()=>x(st,"$settingsMenuVisible",i),W=()=>x(Et,"$isRewindableLive$",i),H=()=>x(_t,"$isActiveLive$",i),z=()=>x($e,"$isAudioAvailable$",i),Y=()=>x(Le,"$muted$",i),ae=()=>x(fe,"$volume$",i),j=()=>x(at,"$isInteractiveTime$",i),ne=()=>x(Nn,"$settingButtonRef$",i),Z=()=>x(Tt,"$startedByKeyboard$",i),we=()=>x(vn,"$isFullscreen",i),ue=()=>x(Ft,"$additionalButtons$",i),re=()=>x(Qi,"$autoplayNextToggleHidden",i),_e=()=>x(Gi,"$crashed$",i),xe=()=>x(ui,"$settingsHidden",i),J=()=>x(Xo,"$graphIsOpened$",i),Re=()=>x(ho,"$adPosition",i),pe=()=>x(yi,"$adDuration",i),P=()=>x(Zt,"$position$",i),ze=()=>x(wt,"$duration$",i),Te=g(e,"playerControlsWrapperRef",15,void 0),X=g(e,"playerControlsRef",15,void 0),ie=g(e,"isAds",3,!1),Oe=g(e,"logoTargetUrl",3,""),De=g(e,"isOneVideoPlaylist",3,!1),tt=g(e,"customFullscreenSupported",3,!0),U=ve(),Pe=$o(),Ee=Lt(),He=U.actions.internal.toggleMuted,Xe=U.actions.internal.togglePlay,ye=U.actions.internal.pause,ke=U.actions.internal.prevVideoClick,Be=U.actions.internal.nextVideoClick,Nt=U.actions.internal.checkFullscreenSupport,ut=(Bo=U.callbacks)==null?void 0:Bo.onAudioDoesNotExistHint,Ot=(is=U.callbacks)==null?void 0:is.onAudioDisabledHint,rt=U.playerPhase,wt=U.state.duration$,Zt=U.state.positionWithScrubbing$,Mt=U.state.playbackState$,$e=U.state.isAudioAvailable$,be=U.state.isAudioDisabled,ee=U.state.isEnded$,it=U.state.isLive$,fe=U.state.volume$,Le=U.state.muted$,_t=U.state.isActiveLive$,Et=U.state.isRewindableLive$,dt=U.ui.scrubbingInProgress,ce=U.ui.mobileNotReportControlHidden$,{isActive$:Ue,type$:Qe}=Pe.pictureInPicture$,st=U.ui.settingsMenu.visible$,Dt=U.ui.settingsMenu.openedByBtnKeyboard$,Bt=U.ui.controls,{volume:ei,vkLogo:hi,autoplayNextToggle:Qi,pip:Vt,settings:ui,chromecast:fi}=U.ui.hiddenControls,vt=U.actions.internal.getVideoEpisodes(),Gt=U.webApi.pictureInPictureApi,$i=U.state.chromecastState$,Gi=U.state.crashed$,jt=Bt.disabledControls$,Tt=U.ui.startedByKeyboard$,We=U.ui.currentGridType$,yi=U.ads.duration,ho=U.ads.position,yo=U.ads.playbackState,vn=U.ui.isFullscreen,St=U.ui.playerSize,Ft=U.ui.additionalButtonsDeprecated$,K=U.actions.internal.getVideoElement,kt=U.actions.internal.replayInteractive,si=U.state.isInteractive,at=U.state.isInteractiveTime$,xt=U.state.showInteractiveGraph,qt=U.state.showSeekToInteractive,ot=U.state.showPlayPrevChapter,Ni=U.state.showInteractiveTimeIndicator,Oi=Pe.seekToInteractiveDisabledTooltip$,Xo=Pe.graphIsOpened$,xo=U.ui.controlBlocks,Di=v(()=>G(U.state.playPrevChapterDisabledTooltip)),Yi=v(()=>G(r())),Ar=v(()=>a().has("EPISODE_BUTTON")),_o=v(()=>a().has("GRAPH_BUTTON")),io=v(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),Ti=v(()=>a().has("PLAY_BUTTON")),Zo=v(()=>a().has("REPLAY_BUTTON")),Jo=v(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),Pn=v(()=>l()===nb.PLAYING),Xn=v(()=>d()==="paused"),Lr=v(()=>s()&&!ie()&&!si),Zr=v(()=>!s()||ie()),hs=v(()=>e.showNextPrevButtons&&!ie()&&e.prevButtonActive),Jr=v(()=>e.showNextPrevButtons&&!ie()&&e.nextButtonActive),Zn=v(()=>u().width>300),hr=v(()=>u().width>400),gn=v(m),An=v(()=>f()!==ob.NOT_AVAILABLE&&!(p()&&$()===1)&&!y()&&!si&&!_()),Ro=v(()=>S()==="LiveWaitingStart"),Ln=v(()=>!!Gt&&f()!==ob.CONNECTED&&!y()&&($()===1&&n(Ro)||!n(Ro))&&!n(gn)&&!si&&!I()),Jn=q(!1);At(()=>{let Ke=Gt==null?void 0:Gt.info.isActive$.subscribe(Pt=>O(Jn,Pt,!0));return()=>Ke==null?void 0:Ke.unsubscribe()});let _r=v(()=>!n(gn)&&eo(T(),"s")),br=v(()=>!e.logoHidden&&u().width>350&&!N()),Mr=v(()=>Ee.features.fullscreen&&Nt()&&!(p()&&$()===1)&&(si?tt():!0)&&!n(gn)&&!n(Jn)),oo=v(()=>!k()&&!n(gn)),Vr=v(()=>(!E()||ie())&&u().width>260&&!n(gn)&&!(Ee.features.interactiveHideTime&&si)),Mn=v(()=>A()||e.showControls),Vn=v(()=>!ie()&&!E()&&!!(vt!=null&&vt.length)&&n(Zn)&&!n(Ar)&&!n(gn)),no=v(()=>!W()||!!H()),Rr=v(()=>xt&&eo(T(),"m")),Rn=v(()=>!z()||Y()||ae()===0),pt=ai({}),di=ai({}),$r=rb(Ul,260),er=rb(Yu,260);Ne(()=>{u(),j(),$r(K(),Bt,pt,e.showControls),er(K(),xo,di,e.showControls)});let tr=()=>U.actions.internal.toggleChromecast();async function en(){Gt!=null&&Gt.isActive()?await(Gt==null?void 0:Gt.exit()):await(Gt==null?void 0:Gt.request())}function yr(){ta({isAudioDisabled:be,audioDisabledHintCallback:Ot,isAudioAvailable:z(),audioIsNotExistHintCallback:ut,isAds:ie()})&&He()}let tn=q(""),hn=(Ke,Pt)=>{if(!Ke){O(tn,G("tooltip_live"),!0);return}Pt&&Pt===nb.PAUSED&&O(tn,G("tooltip_play"),!0)};Ne(()=>{hn(n(no),l())});let Nn=le();Ne(()=>{ne()&&Ml(ne(),A(),Dt)}),Ne(()=>{Qu(Tt,Z(),pt.playButton)});var On=xw(),No=de(On);{var wo=Ke=>{var Pt=_w(),vi=de(Pt);let Io;var Eo=L(vi,2);let Fo;Ye(Eo,lt=>di.topLeft=lt,()=>di==null?void 0:di.topLeft);var lo=L(Eo,2);let Xi;var _n=C(lo);bi(_n,1,ue,({iconUrl:lt,ariaLabel:Xt,testId:uo,onClick:he,tooltip:yt})=>lt,(lt,Xt)=>{let uo=()=>n(Xt).iconUrl,he=()=>n(Xt).ariaLabel,yt=()=>n(Xt).testId,Jt=()=>n(Xt).onClick,_i=()=>n(Xt).tooltip,Ai=v(()=>{var ci;return(ci=he())!=null?ci:_i()});Rm(lt,{get iconUrl(){return uo()},get ariaLabel(){return n(Ai)},get testId(){return yt()},get onClick(){return Jt()}})});var bn=L(_n,2);{var co=lt=>{oc(lt,{get ref(){return pt.autoplayNextToggle},set ref(Xt){pt.autoplayNextToggle=Xt}})};R(bn,lt=>{e.showAutoplayNext&&!De()&&!re()&<(co)})}var ko=L(bn,2);{var Fn=lt=>{Yd(lt,{isMobile:!0,click:tr,get state(){return f()},get ref(){return pt.chromecast},set ref(Xt){pt.chromecast=Xt}})};R(ko,lt=>{n(An)&<(Fn)})}var nr=L(ko,2);{var rr=lt=>{Dm(lt,{click:en,get isPictureInPictureActive(){return p()},get ref(){return pt.pip},set ref(Xt){pt.pip=Xt}})};R(nr,lt=>{n(Ln)&<(rr)})}var Hn=L(nr,2);{var _s=lt=>{Ol(lt,{get ref$(){return Nn}})};R(Hn,lt=>{_e()&&!xe()&<(_s)})}var os=L(Hn,2);{var Ge=lt=>{Qd(lt,{get click(){return ye},get targetUrl(){return Oe()},get logoClickable(){return e.logoClickable},get ref(){return pt.vkLogo},set ref(Xt){pt.vkLogo=Xt}})};R(os,lt=>{n(br)&<(Ge)})}w(lo),Ye(lo,lt=>di.topRight=lt,()=>di==null?void 0:di.topRight);var Wt=L(lo,2);let wi;var Ho=C(Wt);{var nn=lt=>{let Xt=v(()=>ke.bind(null,!0));Ba(lt,{get click(){return n(Xt)},type:"prev",isMobile:!0,get ref(){return pt.prevButton},set ref(uo){pt.prevButton=uo}})};R(Ho,lt=>{n(hs)&<(nn)})}var sr=L(Ho,2);{var rn=lt=>{Wl(lt,{get disabled(){return n(Ti)},get click(){return Xe},isMobile:!0,get isPlaying(){return n(Pn)},get ref(){return pt.playButton},set ref(Xt){pt.playButton=Xt}})};R(sr,lt=>{n(Zr)&<(rn)})}var Uo=L(sr,2);{var Rs=lt=>{zl(lt,{get disabled(){return n(Zo)},get click(){return Xe},isMobile:!0,get ref(){return pt.replayButton},set ref(Xt){pt.replayButton=Xt}})};R(Uo,lt=>{n(Lr)&<(Rs)})}var sn=L(Uo,2);{var Ns=lt=>{let Xt=v(()=>Be.bind(null,!0));Ba(lt,{get click(){return n(Xt)},type:"next",isMobile:!0,get ref(){return pt.nextButton},set ref(uo){pt.nextButton=uo}})};R(sn,lt=>{n(Jr)&<(Ns)})}w(Wt),Ye(Wt,lt=>di.middle=lt,()=>di==null?void 0:di.middle);var ra=L(Wt,2);{var sa=lt=>{var Xt=hw(),uo=de(Xt);{var he=ci=>{var ti=mw();let po;ti.__click=[pw,Jo,e,Di];var an=C(ti);let ln=v(()=>!e.showControls);ic(an,{get hidden(){return n(ln)},get disabled(){return n(Jo)},get click(){return e.playPrevChapter},get ref(){return pt.playPrevChapterButton},set ref(Ei){pt.playPrevChapterButton=Ei}}),w(ti),D(Ei=>po=se(ti,1,"wrapper-middle-left s-13",null,po,Ei),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(ci,ti)};R(uo,ci=>{ot&&ci(he)})}var yt=L(uo,2);{var Jt=ci=>{var ti=vw();let po;var an=C(ti);let ln=v(()=>!e.showControls&&!J());rc(an,{get hidden(){return n(ln)},get disabled(){return n(_o)},get click(){return Xo.toggle},get graphIsOpened(){return J()},get ref(){return pt.interactiveGraphButton},set ref(Ei){pt.interactiveGraphButton=Ei}}),w(ti),D(Ei=>po=se(ti,1,$d(ot?"wrapper-middle-left-second":"wrapper-middle-left"),"s-13",po,Ei),[()=>({fullscreen:we(),hidden:!e.showControls&&!J()})]),b(ci,ti)};R(yt,ci=>{n(Rr)&&ci(Jt)})}var _i=L(yt,2);{var Ai=ci=>{var ti=gw();let po;ti.__click=[fw,io,e,Yi];var an=C(ti);let ln=v(()=>!e.showControls);nc(an,{get hidden(){return n(ln)},get disabled(){return n(io)},get click(){return e.seekToInteractive},get ref(){return pt.seekToInteractiveButton},set ref(Ei){pt.seekToInteractiveButton=Ei}}),w(ti),D(Ei=>po=se(ti,1,"wrapper-middle-right s-13",null,po,Ei),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(ci,ti)};R(_i,ci=>{qt&&ci(Ai)})}b(lt,Xt)};R(ra,lt=>{si&&!m()&<(sa)})}D((lt,Xt,uo,he)=>{Io=se(vi,1,"overlay-mobile s-13",null,Io,lt),Fo=se(Eo,1,"wrapper-top-left s-13",null,Fo,Xt),Xi=se(lo,1,"wrapper-top-right s-13",null,Xi,uo),wi=se(Wt,1,"wrapper-middle s-13",null,wi,he)},[()=>({hidden:!n(Mn)}),()=>({hidden:!e.showControls,fullscreen:we()}),()=>({hidden:!e.showControls&&!y(),fullscreen:we()}),()=>({hidden:!e.showControls||m()||e.endScreenShown&&e.showNextPrevButtons})]),b(Ke,Pt)};R(No,Ke=>{ie()||Ke(wo)})}var ir=L(No,2);{var So=Ke=>{var Pt=$w(),vi=de(Pt);let Io;var Eo=C(vi);ju(Eo,{get muted(){return Y()},click:yr,get ref(){return pt.volume},set ref(co){pt.volume=co}}),w(vi);var Fo=L(vi,2);{var lo=co=>{var ko=bw(),Fn=C(ko);let nr=v(()=>!n(Xn));Wl(Fn,{get disabled(){return n(Ti)},get click(){return Xe},isMobile:!0,get isPlaying(){return n(nr)},get ref(){return pt.playButton},set ref(rr){pt.playButton=rr}}),w(ko),b(co,ko)};R(Fo,co=>{n(Xn)&&co(lo)})}var Xi=L(Fo,2);let _n;var bn=C(Xi);ac(bn,{get position(){return Re()},get duration(){return pe()}}),w(Xi),D((co,ko)=>{Io=se(vi,1,"wrapper-top-right s-13",null,Io,co),_n=se(Xi,1,"wrapper-bottom ads-timeline-mobile s-13",null,_n,ko)},[()=>({fullscreen:we()}),()=>({fullscreen:we()})]),b(Ke,Pt)};R(ir,Ke=>{ie()&&d()!=="inactive"&&Ke(So)})}var Bi=L(ir,2);let Dn;var or=C(Bi);let Nr;var Bn=C(or),Co=C(Bn),Or=C(Co);{var bt=Ke=>{Vo(Ke,{get disabled(){return n(Zo)},get ref(){return pt.replayButton},set ref(Pt){pt.replayButton=Pt},children:(Pt,vi)=>{zl(Pt,{get disabled(){return n(Zo)},get click(){return kt}})},$$slots:{default:!0}})};R(Or,Ke=>{si&&Ke(bt)})}var $t=L(Or,2);{var ro=Ke=>{Vo(Ke,{get ref(){return pt.liveButton},set ref(Pt){pt.liveButton=Pt},children:(Pt,vi)=>{sc(Pt,{get isLiveActive(){return n(no)},isMobile:!0,get ariaLabel(){return n(tn)}})},$$slots:{default:!0}})};R($t,Ke=>{!ie()&&E()&&Ke(ro)})}var Pi=L($t,2);{var ji=Ke=>{let Pt=v(()=>ie()?Re():P()),vi=v(()=>ie()?pe():ze()),Io=v(()=>!e.showControls);Wd(Ke,{get showDuration(){return n(hr)},get position(){return n(Pt)},get duration(){return n(vi)},isMobile:!0,get isHidden(){return n(Io)},get ref(){return pt.time},set ref(Eo){pt.time=Eo}})};R(Pi,Ke=>{n(Vr)&&Ke(ji)})}var Oo=L(Pi,2);let Do=v(()=>!n(Vn));Vo(Oo,{className:"w-max",get disabled(){return n(Do)},get ref(){return pt.episodes},set ref(Ke){pt.episodes=Ke},children:(Ke,Pt)=>{var vi=Ae(),Io=de(vi);{var Eo=Fo=>{var lo=yw(),Xi=L(de(lo),2);jd(Xi,{get position(){return P()},get duration(){return ze()},get timeCodes(){return vt}}),b(Fo,lo)};R(Io,Fo=>{n(Vn)&&Fo(Eo)})}b(Ke,vi)},$$slots:{default:!0}}),w(Co),Ye(Co,Ke=>di.bottomLeft=Ke,()=>di==null?void 0:di.bottomLeft);var so=L(Co,2),Ii=C(so);{var Dr=Ke=>{Vo(Ke,{get ref(){return pt.volume},set ref(Pt){pt.volume=Pt},children:(Pt,vi)=>{ju(Pt,{get muted(){return n(Rn)},click:yr})},$$slots:{default:!0}})};R(Ii,Ke=>{n(oo)&&Ke(Dr)})}var Br=L(Ii,2);{var es=Ke=>{Vo(Ke,{get ref(){return pt.settings},set ref(Pt){pt.settings=Pt},children:(Pt,vi)=>{Ol(Pt,{get ref$(){return Nn}})},$$slots:{default:!0}})};R(Br,Ke=>{n(_r)&&Ke(es)})}var ts=L(Br,2);{var Fr=Ke=>{Vo(Ke,{get ref(){return pt.fullscreen},set ref(Pt){pt.fullscreen=Pt},children:(Pt,vi)=>{qd(Pt,{get click(){return e.toggleFullscreen},get isFullscreen(){return we()}})},$$slots:{default:!0}})};R(ts,Ke=>{n(Mr)&&Ke(Fr)})}w(so),Ye(so,Ke=>di.bottomRight=Ke,()=>di==null?void 0:di.bottomRight),w(Bn),Ye(Bn,Ke=>X(Ke),()=>X());var To=L(Bn,2);let on=v(()=>!e.showControls);Ha(To,{get isHidden(){return n(on)},get isAds(){return ie()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return W()},get ref(){return pt.timeline},set ref(Ke){pt.timeline=Ke}}),w(or),Ye(or,Ke=>di.bottom=Ke,()=>di==null?void 0:di.bottom),w(Bi),Ye(Bi,Ke=>Te(Ke),()=>Te());var ao=L(Bi,2);{var xr=Ke=>{ec(Ke,{get ref(){return pt.interactiveTimeIndicator},set ref(Pt){pt.interactiveTimeIndicator=Pt}})};R(ao,Ke=>{Ni&&Ke(xr)})}D((Ke,Pt)=>{Dn=se(Bi,1,"wrapper-bottom mobile s-13",null,Dn,Ke),Nr=se(or,1,"controls-wrapper s-13",null,Nr,Pt)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:we()})]),b(t,On),F(),o()}et(["click"]);function lc(t,e){B(e,!0);let[i,o]=Ve(),r=()=>x(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),f=g(e,"isOneVideoPlaylist",3,!1),p=g(e,"customFullscreenSupported",3,!0),$=g(e,"endScreenShown",3,!1),y=g(e,"onDisabledPlayPrevChapterClick",3,sb),_=g(e,"onDisabledSeekToInteractiveClick",3,sb),I=ve().ui.isMobile,T=q(!1);At(()=>{let A=setTimeout(()=>O(T,!0),0);return()=>clearTimeout(A)});var N=Ae(),k=de(N);{var E=A=>{var W=Ae(),H=de(W);{var z=ae=>{Bm(ae,{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 f()},get customFullscreenSupported(){return p()},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 _()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(j){l(j)},get playerControlsRef(){return d()},set playerControlsRef(j){d(j)}})},Y=ae=>{Vm(ae,{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 f()},get showAutoplayNext(){return m()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return p()},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)}})};R(H,ae=>{r()?ae(z):ae(Y,!1)})}b(A,W)};R(k,A=>{n(T)&&A(E)})}b(t,N),F(),o()}var Sw=Ce('<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=v(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=v(()=>`${pn(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:(r,a)=>{var l=Sw();b(r,l)},$$slots:{default:!0}}),F()}var Cw=Ce('<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 Fm(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=v(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),r=v(()=>`seek-icon-${i()?"backward":"forward"}`);je(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=Cw();b(a,d)},$$slots:{default:!0}}),F()}var Tw=M('<span class="hot-key-helpers-text s-1g"> </span>'),Iw=M('<div data-testid="hotkey-helper-icon" class="s-1g"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),Ew=M("<div><!></div>"),kw={hash:"s-1g",code:'.hot-key-helpers-container.s-1g{align-items:center;animation:s-1g-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-1g{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-1g{left:calc(75% - 100px)}.hot-key-helpers-text.s-1g{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-1g{animation:s-1g-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-1g-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-1g-fadeOut{0%{opacity:1}to{opacity:0}}'};function Hm(t,e){B(e,!0),Q(t,kw);let[i,o]=Ve(),r=()=>x(e.data,"$data",i),a=ve(),{features:l}=Lt(),d=a.ui.t,s=v(()=>!r()),u=v(()=>{var I;return((I=r())==null?void 0:I.type)==="BACKWARD_SEEK"}),m=v(()=>{var I;return((I=r())==null?void 0:I.type)==="FORWARD_SEEK"}),f=v(()=>{var I;return(I=r())==null?void 0:I.type}),p=v(()=>{var I,T;return(I=r())!=null&&I.t?d(r().t.key,{value:r().t.value||""}):(T=r())==null?void 0:T.text});var $=Ew();let y;var _=C($);{var S=I=>{var T=Iw(),N=de(T),k=C(N);{var E=X=>{let ie=v(()=>n(f)==="BACKWARD_SEEK");Fm(X,{get reversed(){return n(ie)},shadow:!0})};R(k,X=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(f))&&X(E)})}var A=L(k,2);{var W=X=>{Ms(X,{get size(){return"48"},shadow:!0})};R(A,X=>{n(f)==="PAUSE"&&!l.playbackStatusShow&&X(W)})}var H=L(A,2);{var z=X=>{En(X,{get size(){return"48"},shadow:!0})};R(H,X=>{n(f)==="PLAY"&&!l.playbackStatusShow&&X(z)})}var Y=L(H,2);{var ae=X=>{tc(X,{get size(){return"48"},shadow:!0})};R(Y,X=>{n(f)==="REPLAY"&&!l.playbackStatusShow&&X(ae)})}var j=L(Y,2);{var ne=X=>{ia(X,{get size(){return"48"},type:"off",shadow:!0})};R(j,X=>{n(f)==="SUBTITLES_OFF"&&X(ne)})}var Z=L(j,2);{var we=X=>{ia(X,{get size(){return"48"},shadow:!0})};R(Z,X=>{n(f)==="SUBTITLES_ON"&&X(we)})}var ue=L(Z,2);{var re=X=>{let ie=v(()=>n(f)==="RATE_DOWN");dc(X,{get size(){return"48"},get reversed(){return n(ie)},testId:"rate-change-icon",shadow:!0})};R(ue,X=>{["RATE_DOWN","RATE_UP"].includes(n(f))&&X(re)})}var _e=L(ue,2);{var xe=X=>{let ie=v(()=>n(f)==="EPISODE_PREV");na(X,{get size(){return"48"},get reversed(){return n(ie)},shadow:!0})};R(_e,X=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(f))&&X(xe)})}var J=L(_e,2);{var Re=X=>{oa(X,{get size(){return"48"},volume:0,shadow:!0})};R(J,X=>{n(f)==="MUTE"&&X(Re)})}var pe=L(J,2);{var P=X=>{oa(X,{get size(){return"48"},volume:1,shadow:!0})};R(pe,X=>{n(f)==="VOLUME"&&X(P)})}w(N);var ze=L(N,2);{var Te=X=>{var ie=Tw(),Oe=C(ie,!0);w(ie),D(()=>me(Oe,n(p))),b(X,ie)};R(ze,X=>{n(p)&&X(Te)})}D(()=>Me(N,"data-type",n(f))),b(I,T)};R(_,I=>{!n(s)&&n(f)&&I(S)})}w($),D(I=>y=se($,1,"hot-key-helpers-container s-1g",null,y,I),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(m)})]),b(t,$),F(),o()}var Pw=(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}},Aw=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},Lw=M('<div tabindex="0" role="button"><div class="button-block s-q" aria-hidden="true"><div class="button-row s-q"><div class="button button-up s-q"><!></div> <div class="button button-right s-q"><!></div></div> <div class="button-row s-q"><div class="button button-left s-q"><!></div> <div class="button button-down s-q"><!></div></div></div></div>'),Mw={hash:"s-q",code:".immersive-controls.s-q{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-q{left:20px;top:50px}.button-block.s-q{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-q{display:flex;flex-direction:row;position:relative}.button.s-q{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-q svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-q svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-q svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-q svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-q svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-q:hover svg{opacity:1}"};function cc(t,e){B(e,!0),Q(t,Mw);let i=g(e,"isShifted",3,!1),o=ve(),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=G("aria_label_spherical_control");var f=Lw();let p;f.__keydown=[Pw,r,a,l,s,d],f.__keyup=[Aw,r,u];var $=C(f),y=C($),_=C(y);_.__mousedown=a,_.__mouseup=u;var S=C(_);kr(S,{direction:"up",useBtnColor:!0}),w(_);var I=L(_,2);I.__mousedown=d,I.__mouseup=u;var T=C(I);kr(T,{direction:"up",useBtnColor:!0}),w(I),w(y);var N=L(y,2),k=C(N);k.__mousedown=s,k.__mouseup=u;var E=C(k);kr(E,{direction:"up",useBtnColor:!0}),w(k);var A=L(k,2);A.__mousedown=l,A.__mouseup=u;var W=C(A);kr(W,{direction:"up",useBtnColor:!0}),w(A),w(N),w($),w(f),D(H=>{p=se(f,1,"immersive-controls s-q",null,p,H),Me(f,"aria-label",m)},[()=>({"m-shifted":i()})]),mt("mouseleave",_,u),mt("mouseleave",I,u),mt("mouseleave",k,u),mt("mouseleave",A,u),b(t,f),F()}et(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as lb,Subscription as Vw,filterChanged as Rw,filter as Nw}from"@vkontakte/videoplayer-shared/es2018";var ab=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var Xu=class{constructor(){this.flickeringTimeout=ab(1e3);this.subscriptions=new Vw;this.isAuto=!1;this.isLive=!1;this.captions$=new lb([]);this.captionsPrepared$=new lb([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(Nw(()=>this.isEnabled()),Rw()).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 Ow=M('<span class="caption-line s-c"><span class="caption-segment s-c"> </span></span>'),Dw=M('<span class="caption-line s-c"><span class="caption-segment s-c"></span></span>'),Bw=M('<span class="caption-line s-c"><span class="caption-segment s-c"> </span></span>'),Fw=M('<div><span class="caption s-c"><!></span></div>'),Hw=M("<div><!></div>"),Uw={hash:"s-c",code:".subtitles-container.s-c{height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:transform var(--controls-transition-duration);width:100%}.subtitles-container.shifted.s-c{transform:translateY(calc(var(--controls-height)*-1))}.subtitles-container.preview-track-active.s-c{transform:translateY(calc(var(--preview-track-height)*-1))}.preview-track-active.s-c .subtitles-caption:where(.s-c){bottom:var(--preview-track-controls-top-offset)}.subtitles-caption.s-c{bottom:4%;display:flex;justify-content:center;left:4%;position:absolute;right:4%}.subtitles-caption.mobile.s-c{bottom:8%}.subtitles-container.auto.s-c .subtitles-caption:where(.s-c){left:var(--subtitles-caption-margin);right:var(--subtitles-caption-margin)}.caption.s-c{background:rgba(0,0,0,.4);border-radius:4px;display:block;overflow-wrap:normal;padding:4px 8px}.subtitles-container.auto.s-c .caption:where(.s-c){width:100%}.caption-line.s-c{display:block;text-align:center}.subtitles-container.auto.s-c .caption-line:where(.s-c){text-align:left}.caption-segment.s-c{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,Uw);let[i,o]=Ve(),r=()=>x(p,"$currentSubtitle$",i),a=()=>x(y,"$isLive$",i),l=()=>x(_,"$isFullscreen",i),d=()=>x(S,"$previewTrackActive",i),s=()=>x($,"$isAutoSubtitleCaptionVisible$",i),u=g(e,"isMobile",3,!1),m=ve(),f=Lt(),p=m.state.currentSubtitle$,$=m.state.isAutoSubtitleCaptionVisible$,y=m.state.isLive$,_=m.ui.isFullscreen,S=m.ui.previewTrackActive,I=v(()=>!!r().isAuto),T=v(()=>!!a()),N=v(()=>e.playerSize.width*.02),k=v(()=>u()&&!l()||n(N)<=f.minSubtitlesFontSize?f.minSubtitlesFontSize:n(N)),E=q(null);Ne(()=>{var j,ne,Z;(j=n(E))==null||j.setIsAuto(n(I)),(ne=n(E))==null||ne.setIsLive(n(T)),(Z=n(E))==null||Z.setCaptions(e.captions)});let A=q(ai([[]]));At(()=>{O(E,new Xu().subscribe(),!0);let j=n(E).captionsPrepared$.subscribe(ne=>{O(A,ne,!0)});return()=>{var ne;(ne=n(E))==null||ne.destroy(),j.unsubscribe()}}),At(()=>{if(n(I)){let j=window.setTimeout(()=>{$.set(!1)},f.autoSubtitlesTimeout);return()=>{window.clearTimeout(j)}}else $.set(!1)});let W=v(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var H=Hw();let z;var Y=C(H);{var ae=j=>{var ne=Fw();let Z;var we=C(ne),ue=C(we);{var re=xe=>{var J=Ow(),Re=C(J),pe=C(Re,!0);w(Re),w(J),D(P=>{var ze;qe(Re,`font-size: ${(ze=n(k))!=null?ze:""}px`),me(pe,P)},[()=>G("subtitles_auto_caption")]),b(xe,J)},_e=(xe,J)=>{{var Re=P=>{var ze=Ae(),Te=de(ze);bi(Te,17,()=>n(A),_d,(X,ie)=>{var Oe=Dw(),De=C(Oe);bi(De,21,()=>n(ie),({value:tt,timeAppeared:U})=>U,(tt,U)=>{let Pe=()=>n(U).value,Ee=()=>n(U).timeAppeared;var He=Ae(),Xe=de(He);{var ye=ke=>{var Be=cs();D(()=>me(Be,Pe())),b(ke,Be)};R(Xe,ke=>{(!Ee()||Ee()<=e.position)&&ke(ye)})}b(tt,He)}),w(De),w(Oe),D(()=>{var tt;return qe(De,`font-size: ${(tt=n(k))!=null?tt:""}px`)}),b(X,Oe)}),b(P,ze)},pe=P=>{var ze=Ae(),Te=de(ze);bi(Te,17,()=>e.captions,({value:X})=>X,(X,ie)=>{let Oe=()=>n(ie).value;var De=Bw(),tt=C(De),U=C(tt,!0);w(tt),w(De),D(()=>{var Pe;qe(tt,`font-size: ${(Pe=n(k))!=null?Pe:""}px`),me(U,Oe())}),b(X,De)}),b(P,ze)};R(xe,P=>{var ze;n(I)&&((ze=n(A))!=null&&ze.length)?P(Re):P(pe,!1)},J)}};R(ue,xe=>{n(I)&&s()?xe(re):xe(_e,!1)})}w(we),w(ne),D(xe=>{var J;Z=se(ne,1,"subtitles-caption s-c",null,Z,xe),qe(ne,`--subtitles-caption-margin: ${(J=n(W))!=null?J:""}%`)},[()=>({mobile:u()})]),b(j,ne)};R(Y,j=>{var ne;(e.captions.length||(ne=n(A))!=null&&ne.length)&&j(ae)})}w(H),D(j=>z=se(H,1,"subtitles-container s-c",null,z,j),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(I)&&!n(T)&&!s()})]),b(t,H),F(),o()}import{ChromecastState as zw}from"@vkontakte/videoplayer-core/es2018";var Ww=M('<div class="text s-l"> </div>'),Kw=M('<div><div class="icon_wrapper s-l"><!></div> <!></div>'),qw={hash:"s-l",code:".wrapper.s-l{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-l{background-size:cover}.icon_wrapper.s-l{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-l{margin-top:20px}"};function uc(t,e){B(e,!0),Q(t,qw);let i=g(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Lt();var r=Kw();let a;var l=C(r),d=C(l);Gd(d,{get size(){return"48"},get iconState(){return zw.CONNECTED}}),w(l);var s=L(l,2);{var u=m=>{var f=Ww(),p=C(f);w(f),D(()=>{var $;return me(p,`Видео воспроизводится на ${($=i())!=null?$:""}`)}),b(m,f)};R(s,m=>{i()&&m(u)})}w(r),D(m=>{a=se(r,1,"wrapper s-l",null,a,m),qe(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})]),b(t,r),F()}var Qw=Ce('<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 Um(t){je(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=Qw();b(e,o)},$$slots:{default:!0}})}var Gw=M('<div class="container s-4"><!></div>'),Yw={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 Wa(t){Q(t,Yw);var e=Gw(),i=C(e);Um(i,{}),w(e),b(t,e)}var jw=M('<div class="playButton s-b" tabindex="0" role="button"><div class="playButtonBackground s-b"></div> <!></div>'),Xw=M('<div data-testid="unstarted-thumb"><!></div>'),Zw={hash:"s-b",code:".container.s-b{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-b{opacity:0;visibility:hidden}.container.bgCover.s-b{background-size:cover}.playButton.s-b{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-b,.playButtonBackground.s-b{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-b{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-b:hover .playButtonBackground:where(.s-b){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-b svg{position:relative}"};function Ka(t,e){B(e,!0),Q(t,Zw);let i=g(e,"iconVisible",3,!0),o=ve(),r=Lt(),a=o.ui.startedByKeyboard$,l=G("tooltip_play"),d=$=>{var _;let y=$.code;["Enter","Space"].includes(y)&&($.stopPropagation(),$.preventDefault(),a.set(!0),(_=e.startVideo)==null||_.call(e))},s=$=>{var y,_;$.stopPropagation(),(y=e.startVideo)==null||y.call(e),(_=e.onClick)==null||_.call(e,$)};var u=Xw();let m;u.__click=s,u.__contextmenu=function(...$){var y;(y=e.onContextMenu)==null||y.apply(this,$)};var f=C(u);{var p=$=>{var y=jw();y.__keydown=d;var _=L(C(y),2);En(_,{get size(){return"48"}}),w(y),D(()=>Me(y,"aria-label",l)),b($,y)};R(f,$=>{i()&&$(p)})}return w(u),D($=>{m=se(u,1,"container s-b",null,m,$),qe(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:r.features.previewNoEmptySpace})]),b(t,u),F({handlePressKey:d,handleClick:s})}et(["click","contextmenu","keydown"]);var Jw=M('<div data-testid="video_title"><span> </span></div>'),eS={hash:"s-1i",code:".title.s-1i{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;color:var(--white);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}.hidden.s-1i{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function zm(t,e){B(e,!0),Q(t,eS);let i=g(e,"title",3,""),o=g(e,"isHidden",3,!1),r=g(e,"ref",15),a=q(void 0);At(()=>{var f;requestAnimationFrame(()=>{var p;(p=e.onVisibilityChanged)==null||p.call(e,!0)});function m(p){var $;p.propertyName==="transform"&&(($=e.onVisibilityChanged)==null||$.call(e,!o()))}return(f=n(a))==null||f.addEventListener("transitionend",m),()=>{var p;return(p=n(a))==null?void 0:p.removeEventListener("transitionend",m)}});var l=Jw();let d;var s=C(l),u=C(s,!0);w(s),Ye(s,m=>r(m),()=>r()),w(l),Ye(l,m=>O(a,m),()=>n(a)),D(m=>{d=se(l,1,"title s-1i",null,d,m),me(u,i())},[()=>({hidden:o()})]),b(t,l),F()}import{throttleFn as aS}from"@vkontakte/videoplayer-shared/es2018";var tS=M('<div class="timer__cell cell s-14"><span class="cell__value s-14"> </span> <span class="cell__unit s-14"> </span></div> <span class="timer__points s-14"> </span>',1),iS=M('<div class="timer__cell cell s-14"><span class="cell__value s-14"> </span> <span class="cell__unit s-14"> </span></div> <span class="timer__points s-14"> </span>',1),oS=M('<div class="timer__cell cell s-14"><span class="cell__value s-14"> </span> <span class="cell__unit s-14"> </span></div> <span class="timer__points s-14"> </span>',1),nS=M('<div class="timer__cell cell s-14"><span class="cell__value s-14"> </span> <span class="cell__unit s-14"> </span></div>'),rS=M("<div><!> <!> <!> <!></div>"),sS={hash:"s-14",code:".timer__container.s-14{align-items:flex-start;display:flex;justify-content:center}.cell.s-14{align-items:center;display:flex;flex-direction:column}.cell__value.s-14{font-size:48px;font-weight:600;line-height:1.2}.small.s-14 .cell__value:where(.s-14){font-size:24px}.cell__unit.s-14{font-size:14px;font-weight:400;line-height:1.2}.small.s-14 .cell__unit:where(.s-14){font-size:12px}.timer__points.s-14{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-14 .timer__points:where(.s-14){font-size:20px}"};function Wm(t,e){B(e,!0),Q(t,sS);let i=q(""),o=q(""),r=q(""),a=q(""),l,d=32,s=d/2,u=H=>String(H).padStart(2,"0"),m=H=>Math.max(H.length,1),f=H=>`${(e.isSmallSize?s:d)*m(H)}px`,p=H=>{let z=Math.floor(H/86400);z&&(H-=z*86400,O(i,u(z),!0));let Y=Math.floor(H/3600);O(o,u(Y),!0);let ae=Math.floor(H/60)%60;O(r,u(ae),!0);let j=H%60;O(a,u(j),!0)},$=()=>{let H=Math.floor(Date.now()/1e3),z=e.startTime-H;p(z),z>=1?l=requestAnimationFrame($):e.onTimerOver()};At(()=>{l=requestAnimationFrame($)}),un(()=>{cancelAnimationFrame(l)});var y=rS();let _;var S=C(y);{var I=H=>{var z=tS(),Y=de(z);let ae;var j=C(Y),ne=C(j,!0);w(j);var Z=L(j,2),we=C(Z,!0);w(Z),w(Y);var ue=L(Y,2),re=C(ue,!0);w(ue),D((_e,xe,J)=>{ae=qe(Y,"",ae,{width:_e}),me(ne,n(i)),me(we,xe),me(re,J)},[()=>f(n(i)),()=>G("waiting_live_day_value"),()=>G("waiting_live_colon")]),b(H,z)};R(S,H=>{n(i)&&H(I)})}var T=L(S,2);{var N=H=>{var z=iS(),Y=de(z);let ae;var j=C(Y),ne=C(j,!0);w(j);var Z=L(j,2),we=C(Z,!0);w(Z),w(Y);var ue=L(Y,2),re=C(ue,!0);w(ue),D((_e,xe,J)=>{ae=qe(Y,"",ae,{width:_e}),me(ne,n(o)),me(we,xe),me(re,J)},[()=>f(n(o)),()=>G("waiting_live_hour_value"),()=>G("waiting_live_colon")]),b(H,z)};R(T,H=>{n(o)&&H(N)})}var k=L(T,2);{var E=H=>{var z=oS(),Y=de(z);let ae;var j=C(Y),ne=C(j,!0);w(j);var Z=L(j,2),we=C(Z,!0);w(Z),w(Y);var ue=L(Y,2),re=C(ue,!0);w(ue),D((_e,xe,J)=>{ae=qe(Y,"",ae,{width:_e}),me(ne,n(r)),me(we,xe),me(re,J)},[()=>f(n(r)),()=>G("waiting_live_minute_value"),()=>G("waiting_live_colon")]),b(H,z)};R(k,H=>{n(r)&&H(E)})}var A=L(k,2);{var W=H=>{var z=nS();let Y;var ae=C(z),j=C(ae,!0);w(ae);var ne=L(ae,2),Z=C(ne,!0);w(ne),w(z),D((we,ue)=>{Y=qe(z,"",Y,{width:we}),me(j,n(a)),me(Z,ue)},[()=>f(n(a)),()=>G("waiting_live_second_value")]),b(H,z)};R(A,H=>{n(a)&&H(W)})}w(y),D(H=>_=se(y,1,"timer__container s-14",null,_,H),[()=>({small:e.isSmallSize})]),b(t,y),F()}var lS=M('<div class="waiting s-s"><span> </span></div>'),dS=M('<div class="upcoming-timer timer s-s"><span> </span> <!></div>'),cS=M('<div class="waiting-container s-s"><!></div>'),uS={hash:"s-s",code:'.waiting-container.s-s{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.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(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-s{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-s{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-s{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-s{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-s{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-s{font-size:15px}.medium.s-s{font-size:17px}'};function pc(t,e){B(e,!0),Q(t,uS);let i=g(e,"startTime",3,0),o=v(()=>i()<Math.floor(Date.now()/1e3)),r=q(void 0),a=q(void 0),l=0,d=q(void 0),s=q(void 0),u=v(()=>{var S,I;return((S=n(d))!=null?S:1/0)<=509||((I=n(s))!=null?I:1/0)<=320}),m=v(()=>{var S,I;return!n(u)&&(((S=n(d))!=null?S:1/0)<=699||((I=n(s))!=null?I:1/0)<=599)}),f=e.onUpcomingLiveViewStateChanged?aS(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let S={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"},I=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(S,I)})},300):void 0;Ne(()=>{n(s),n(d),n(o),f==null||f()}),un(()=>{if(cancelAnimationFrame(l),f==null||f.cancel(),e.onUpcomingLiveViewStateChanged){let S={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"};e.onUpcomingLiveViewStateChanged(S)}});var p=cS();p.__contextmenu=function(...S){var I;(I=e.onContextMenu)==null||I.apply(this,S)},p.__click=function(...S){var I;(I=e.onClick)==null||I.apply(this,S)};var $=C(p);{var y=S=>{var I=lS(),T=C(I);let N;var k=C(T,!0);w(T),w(I),Ye(I,E=>O(r,E),()=>n(r)),D((E,A)=>{N=se(T,1,"waiting__title s-s",null,N,E),me(k,A)},[()=>({medium:n(m),small:n(u)}),()=>G("waiting_live_upcoming_title")]),b(S,I)},_=S=>{var I=dS(),T=C(I);let N;var k=C(T,!0);w(T);var E=L(T,2);let A=v(()=>n(u)||n(m)),W=v(()=>i()||0);Wm(E,{get isSmallSize(){return n(A)},get startTime(){return n(W)},onTimerOver:()=>O(o,!0)}),w(I),Ye(I,H=>O(a,H),()=>n(a)),D((H,z)=>{N=se(T,1,"timer__title s-s",null,N,H),me(k,z)},[()=>({medium:n(m),small:n(u)}),()=>G("waiting_live_timer_title")]),b(S,I)};R($,S=>{n(o)?S(y):S(_,!1)})}w(p),D(()=>qe(p,`background-image: url(${e.thumbUrl})`)),Tn(p,"clientWidth",S=>O(d,S)),Tn(p,"clientHeight",S=>O(s,S)),b(t,p),F()}et(["contextmenu","click"]);var pS=M('<div class="waiting-container s-o"><div class="waiting-caption s-o"><!> <p class="waiting-title s-o"> </p></div></div>'),fS={hash:"s-o",code:'.waiting-container.s-o{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-o,.waiting-container.s-o:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-o:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-o{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-o{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function qa(t,e){B(e,!0),Q(t,fS);let i=g(e,"thumbUrl",3,""),o={recover:G("waiting_live_recover_title"),record:G("waiting_record_title")},r=v(()=>o[e.kind]||"");var a=pS();a.__contextmenu=function(...m){var f;(f=e.onContextMenu)==null||f.apply(this,m)},a.__click=function(...m){var f;(f=e.onClick)==null||f.apply(this,m)};var l=C(a),d=C(l);Ra(d,{style:"position: static; transform: translate(0, 0)"});var s=L(d,2),u=C(s,!0);w(s),w(l),w(a),D(()=>{qe(a,`background-image: url('${i()}')`),me(u,n(r))}),b(t,a),F()}et(["contextmenu","click"]);var mS=Ce('<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 Km(t){je(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=mS();b(e,o)},$$slots:{default:!0}})}var vS=M('<div class="select-icon s-1w"><!></div>'),gS={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,gS);var e=vS(),i=C(e);Km(i,{}),w(e),b(t,e)}var hS=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},_S=(t,e)=>{Vl(t,()=>e.item.selectItem(e.item.value))},bS=M("<p> </p>"),$S=M('<p class="sublabel s-1r"> </p>'),yS=M('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),xS={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 qm(t,e){B(e,!0),Q(t,xS);let i=g(e,"isMobile",3,!1);var o=yS();let r;o.__click=[hS,e],o.__keydown=[_S,e];var a=C(o);{var l=y=>{fc(y,{})};R(a,y=>{e.item.selected&&y(l)})}var d=L(a,2);let s;var u=C(d);{var m=y=>{var _=Ae(),S=de(_);Ri(S,()=>e.item.valueComponent,(I,T)=>{T(I,Yr(()=>{var N;return(N=e.item.valueComponentParams)!=null?N:{}}))}),b(y,_)},f=y=>{var _=bS();let S;var I=C(_,!0);w(_),D(T=>{var N;S=se(_,1,"label s-1r",null,S,T),me(I,(N=e.item.label)!=null?N:e.item.value)},[()=>({mobile:i()})]),b(y,_)};R(u,y=>{e.item.valueComponent?y(m):y(f,!1)})}var p=L(u,2);{var $=y=>{var _=$S(),S=C(_,!0);w(_),D(()=>me(S,e.item.sublabel)),b(y,_)};R(p,y=>{e.item.sublabel&&y($)})}w(d),w(o),D((y,_,S)=>{r=se(o,1,"item",null,r,y),Me(o,"data-value",e.item.value),Me(o,"aria-label",_),Me(o,"data-testid",e.item.dataTestid),s=se(d,1,"menu-item-value s-1r",null,s,S),Me(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()})]),b(t,o),F()}et(["click","keydown"]);var wS=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function Qm(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"refMenuItems",15),r=v(()=>()=>e.openSubMenuList(e.item.children)),a=v(()=>_=>Au(_,n(r)));var l=wS();let d;l.__click=function(..._){var S;(S=n(r))==null||S.apply(this,_)},l.__keydown=function(..._){var S;(S=n(a))==null||S.apply(this,_)};var s=C(l);{var u=_=>{fc(_,{})};R(s,_=>{e.item.selected&&_(u)})}var m=L(s,2);let f;var p=C(m);{var $=_=>{var S=Ae();let I=v(()=>e.item.valueComponent);var T=de(S);Ri(T,()=>n(I),(N,k)=>{k(N,Yr(()=>{var E;return(E=e.item.valueComponentParams)!=null?E:{}}))}),b(_,S)},y=_=>{var S=cs();D(()=>me(S,e.item.label)),b(_,S)};R(p,_=>{e.item.valueComponent?_($):_(y,!1)})}w(m),w(l),Ye(l,_=>o(o()[e.item.id]=_,!0),()=>{var _;return(_=o())==null?void 0:_[e.item.id]}),D((_,S)=>{var I;d=se(l,1,"item",null,d,_),Me(l,"aria-label",(I=e.item.ariaLabel)!=null?I:e.item.label),Me(l,"data-testid",e.item.id),f=se(m,1,"menu-item-value",null,f,S)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),b(t,l),F()}et(["click","keydown"]);var Xr={"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 CS=(t,e)=>{I_(t,e.returnFromSubMenu,e.closeSettingsMenu)},TS=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},IS=(t,e)=>{Nd(t)&&(Pr(t),e.returnFromSubMenu())},ES=M('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1k"> </p></li> <!></ul></div>'),kS={hash:"s-1k",code:".sub-menu.s-1k{--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-1k .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1k{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1k{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1k .items:where(.s-1k) .item.header:where(.s-1k){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-1k .title:where(.s-1k){margin-left:8px}.sub-menu.s-1k .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1k .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1k .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1k .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1k .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1k .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1k .item .sublabel{font-size:12px;line-height:14px}.item.s-1k:not(.mobile) p:where(.s-1k),.sub-menu.s-1k .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function Ym(t,e){B(e,!0),Q(t,kS);let[i,o]=Ve(),r=()=>x(f,"$isFullscreen",i),a=()=>x(p,"$playerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"playerControlsHeight",3,0),s=g(e,"ariaLabelReturnFromSubMenu",19,()=>G("aria_label_submenu_back")),u=g(e,"listRef",15);At(()=>{let j=e.items.findIndex(ne=>ne.selected);u().children[j+1].focus()});let m=ve(),f=m.ui.isFullscreen,p=m.ui.playerSize,$=q(void 0),y=q(0),_=q(0),S=v(()=>l()&&r()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n(_)-d()}px; overflow: auto;`),I=v(()=>Math.max(e.minWidth,n(y)));var T=ES();let N;var k=C(T);let E;k.__keydown=[CS,e];var A=C(k);let W;A.__click=[TS,e],A.__keydown=[IS,e];var H=C(A);kr(H,{direction:"left"});var z=L(H,2),Y=C(z,!0);w(z),w(A),Ye(A,j=>O($,j),()=>n($));var ae=L(A,2);bi(ae,17,()=>e.items,_d,(j,ne)=>{var Z=Ae(),we=de(Z);{var ue=_e=>{qm(_e,{get item(){return n(ne)},get isMobile(){return l()}})},re=(_e,xe)=>{{var J=Re=>{Qm(Re,{get isMobile(){return l()},get item(){return n(ne)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};R(_e,Re=>{n(ne).type==="OPEN_SUB_MENU"&&Re(J)},xe)}};R(we,_e=>{n(ne).type==="SELECT_VALUE"?_e(ue):_e(re,!1)})}b(j,Z)}),w(k),Ye(k,j=>u(j),()=>u()),w(T),D((j,ne,Z)=>{N=se(T,1,"sub-menu menu s-1k",null,N,j),Me(T,"data-testid",`${e.id}-sub-menu`),qe(T,`min-width: ${n(I)}px`),E=se(k,1,"items s-1k",null,E,ne),qe(k,n(S)),W=se(A,1,"item header back s-1k",null,W,Z),Me(A,"aria-label",s()),me(Y,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),Tn(A,"clientWidth",j=>O(y,j)),Tn(A,"clientHeight",j=>O(_,j)),b(t,T),F(),o()}et(["keydown","click"]);import{noop as PS}from"@vkontakte/videoplayer-shared/es2018";var AS=(t,e)=>Au(t,e()),LS=(t,e)=>{t.stopPropagation(),e()()},MS=M('<div class="value s-1j"> </div>'),VS=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),RS={hash:"s-1j",code:".value.s-1j{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function jm(t,e){B(e,!0),Q(t,RS);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,PS),r=g(e,"valueComponent",3,void 0),a=g(e,"iconProps",19,()=>({})),l=g(e,"ref",15);var d=VS();let s;d.__click=[LS,o],d.__keydown=[AS,o];var u=C(d),m=C(u);{var f=T=>{Fa(T,{get icon(){return e.icon}})},p=T=>{var N=Ae();let k=v(()=>e.icon);var E=de(N);Ri(E,()=>n(k),(A,W)=>{W(A,Yr(a))}),b(T,N)};R(m,T=>{typeof e.icon=="string"?T(f):T(p,!1)})}w(u);var $=L(u,2),y=C($,!0);w($);var _=L($,2);{var S=T=>{var N=Ae();let k=v(r);var E=de(N);Ri(E,()=>n(k),(A,W)=>{W(A,{})}),b(T,N)},I=T=>{var N=MS(),k=C(N,!0);w(N),D(()=>me(k,e.value)),b(T,N)};R(_,T=>{r()?T(S):T(I,!1)})}w(d),Ye(d,T=>l(T),()=>l()),D(T=>{s=se(d,1,"item",null,s,T),Me(d,"aria-label",e.ariaLabel),Me(d,"data-testid",e.id),me(y,e.label)},[()=>({mobile:i()})]),b(t,d),F()}et(["click","keydown"]);import{noop as cb}from"@vkontakte/videoplayer-shared/es2018";var NS=(t,e)=>{Vl(t,()=>e())},OS=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),DS=M('<img class="icon" aria-hidden="true"/>'),BS=M('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1l"> </div></li>'),FS={hash:"s-1l",code:".label.s-1l{overflow:hidden;text-overflow:ellipsis}"};function Xm(t,e){B(e,!0),Q(t,FS);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,cb),r=g(e,"closeSettings",3,cb),a=q(!1),l=()=>{O(a,!0)},d=S=>{S==null||S.stopPropagation(),o()(),r()()};var s=BS();let u;s.__click=d,s.__keydown=[NS,d];var m=C(s),f=C(m);{var p=S=>{var I=Ae(),T=de(I);{var N=E=>{var A=OS();b(E,A)},k=E=>{var A=DS();D(()=>Me(A,"src",e.icon)),mt("error",A,l),Sa(A),b(E,A)};R(T,E=>{n(a)?E(N):E(k,!1)})}b(S,I)},$=S=>{var I=Ae();let T=v(()=>e.icon);var N=de(I);Ri(N,()=>n(T),(k,E)=>{E(k,{})}),b(S,I)};R(f,S=>{typeof e.icon=="string"?S(p):S($,!1)})}w(m);var y=L(m,2),_=C(y,!0);w(y),w(s),D(S=>{var I;u=se(s,1,"item",null,u,S),Me(s,"aria-label",(I=e.ariaLabel)!=null?I:e.label),Me(s,"data-testid",e.id),me(_,e.label)},[()=>({mobile:i()})]),b(t,s),F()}et(["click","keydown"]);import{noop as zS}from"@vkontakte/videoplayer-shared/es2018";var HS=M('<div class="toggle_wrap s-1p"><div></div> <div class="toggle-label s-1p"></div></div>'),US={hash:"s-1p",code:'.toggle_wrap.s-1p{cursor:pointer;font-size:12px;line-height:15px;min-height:15px;padding:0;user-select:none}.toggle.s-1p{background-color:var(--toggle-color-separator);border-radius:45px;cursor:pointer;float:right;height:9px;margin-top:3px;width:28px}.toggle.s-1p: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-1p:after{background-color:var(--toggle-color-on);left:13px}.toggle-label.s-1p{overflow:hidden}'};function Zm(t,e){Q(t,US);let i=g(e,"enabled",3,!1);var o=HS(),r=C(o);let a;li(2),w(o),D(l=>a=se(r,1,"toggle s-1p",null,a,l),[()=>({on:i()})]),b(t,o)}var WS=(t,e,i)=>{E_(t,e(),o=>i()(o))},KS=(t,e,i)=>{t.stopPropagation(),e()(!i())},qS=M('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),QS=M('<li role="menuitem" tabindex="0"><!></li>');function Jm(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,zS),r=g(e,"enabled",3,!1),a=g(e,"tooltipText",3,void 0),l=g(e,"maxTooltipWidth",3,void 0);var d=QS();let s;d.__click=[KS,o,r],d.__keydown=[WS,r,o];var u=C(d);Na(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(m,f)=>{var p=qS();let $;var y=C(p),_=C(y);{var S=E=>{Fa(E,{get icon(){return e.icon}})},I=E=>{var A=Ae();let W=v(()=>e.icon);var H=de(A);Ri(H,()=>n(W),(z,Y)=>{Y(z,{})}),b(E,A)};R(_,E=>{typeof e.icon=="string"?E(S):E(I,!1)})}w(y);var T=L(y,2),N=C(T,!0);w(T);var k=L(T,2);Zm(k,{get enabled(){return r()}}),w(p),D(E=>{$=se(p,1,"switch-wrapper",null,$,E),me(N,e.label)},[()=>({mobile:i()})]),b(m,p)},$$slots:{default:!0}}),w(d),D(m=>{var f;s=se(d,1,"item switch-item",null,s,m),Me(d,"aria-label",(f=e.ariaLabel)!=null?f:e.label),Me(d,"data-testid",e.id)},[()=>({mobile:i()})]),b(t,d),F()}et(["click","keydown"]);import{isValidURL as _C,VideoQuality as yb}from"@vkontakte/videoplayer-shared/es2018";var ub=()=>{let t=q(ai([])),e=v(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{O(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{O(t,[],!0)}}};import{getVideoQualityLabel as GS}from"@vkontakte/videoplayer-shared/es2018";var YS=M('<div class="quality-icon s-1n"><!></div>'),jS=M('<div class="quality-label s-1n"><span> </span> <!></div>'),XS={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 Qa(t,e){B(e,!0),Q(t,XS);let i=g(e,"isSubCase",3,!1),o=v(()=>e.quality?GS(e.quality):""),r=v(()=>Ou(e.quality));var a=jS(),l=C(a);let d;var s=C(l,!0);w(l);var u=L(l,2);{var m=f=>{var p=YS();let $=v(()=>n(r));var y=C(p);Ri(y,()=>n($),(_,S)=>{S(_,{})}),w(p),D(()=>Me(p,"data-testid",`${n(o)}-icon`)),b(f,p)};R(u,f=>{n(r)&&!e.isMobile&&f(m)})}w(a),D(f=>{d=se(l,1,"s-1n",null,d,f),me(s,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),b(t,a),F()}import{VideoQuality as ZS}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as pb}from"@vkontakte/videoplayer-core/es2018";var fb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},mb=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=fb({quality:t,availableQualities:e});return i?t===pb.INVARIANT?G("auto_quality_invariant"):G("auto_quality",{actual:o}):o},vb=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===pb.INVARIANT?i:`${i}${fb({quality:t,availableQualities:e})}`:"...";var JS=M('<div class="menu-item-value-wrapper s-1u"><!></div>'),eC={hash:"s-1u",code:".menu-item-value-wrapper.s-1u{line-height:normal}"};function Kl(t,e){B(e,!0),Q(t,eC);let[i,o]=Ve(),r=()=>x(s,"$currentQuality$",i),a=()=>x(u,"$availableQualities$",i),l=()=>x(m,"$isMobile$",i),d=ve(),s=d.state.currentQuality$,u=d.state.availableQualities$,m=d.ui.isMobile,f=" · ",p=v(()=>e.prefix+(e.selected&&r()!==ZS.INVARIANT?f:"")),$=v(()=>vb({prefix:n(p),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=JS(),_=C(y);let S=v(()=>e.selected?r():void 0);Qa(_,{get quality(){return n(S)},get label(){return n($)},get isMobile(){return l()},isSubCase:!0}),w(y),b(t,y),F(),o()}var tC=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")},iC={br:!0,span:!0},ev=(t,e={})=>{var d,s,u,m,f,p,$;if(!t)return t;let i={...iC,...e},o=Object.keys(i);if(!o.length)return t;let r=tC(o),a=[],l=0;for(let y of t.matchAll(r)){let _=y[0],S=((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[S]){a.push(t.slice(l,I)),l=I+_.length;continue}let T=(f=y.groups)!=null&&f.childrenhtml?ev(y.groups.childrenhtml,i):"",N=(p=y.groups)!=null&&p.childrenhtml?_.replace(new RegExp(($=y.groups)==null?void 0:$.childrenhtml),()=>T||""):_;a.push(t.slice(l,I),N),l=I+_.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=ev(i());bo();var r=Ae(),a=de(r);{var l=d=>{var s=Ae(),u=de(s);bd(u,()=>o),b(d,s)};R(a,d=>{o&&d(l)})}b(t,r),F()}var oC=M('<p class="quality-applies sublabel s-1v"><!></p>'),nC={hash:"s-1v",code:".quality-applies.s-1v{color:hsla(0,0%,100%,.5);display:flex;justify-content:end;padding:3px 0}.quality-applies span{color:#70c1ff}"};function tv(t,e){B(e,!1),Q(t,nC),bo();var i=oC(),o=C(i);let r=yn(()=>G("quality_applience",{action:`<span>${G("quality_applience_action")}</span>`}));mc(o,{get message(){return n(r)}}),w(i),b(t,i),F()}var hb=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",selected:o,valueComponent:Kl,valueComponentParams:{prefix:G("other_quality"),selected:o},children:"quality-other-settings"}},iv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:G("auto_quality_limit"),valueComponent:e?Kl:void 0,valueComponentParams:{prefix:G("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),_b=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:tv,bottomBordered:!0,children:"quality-appliance"}),ov=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"quality-high",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:G("high_quality"),valueComponent:t?Kl:void 0,valueComponentParams:{prefix:G("high_quality"),selected:i},sublabel:G("high_quality_description")}),nv=({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:G("traffic_saving_quality"),valueComponent:t?Kl:void 0,valueComponentParams:{prefix:G("traffic_saving_quality"),selected:i},sublabel:G("traffic_saving_quality_description")});var Zu=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),Ju=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,r;if(i==="und"?r=void 0:i&&(r=(l=Xd(i))!=null?l:i),o&&i&&r){let d=e.filter(s=>s.label===o&&s.language===i);if(d.length===1)return G("audio_stream_display_language_label",{language:r,label:o});{let s=Zu(t,d);return G("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=Zu(t,d);return G("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=Zu(t,d);return G("audio_stream_display_language_index",{language:r,index:s})}}let a=Zu(t,e);return G("audio_stream_display_unknown",{index:a})};var rC={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:r}=t,a=[];return i&&a.push({handler:iv,selected:e&&!o&&!r||!1}),a.push({handler:nv,selected:o},{handler:ov,selected:r}),{title:G("submenu_quality"),id:"quality-settings",items:[_b(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),hb(t)]}},"quality-other-settings":({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"quality-other-settings",title:G("submenu_quality"),closeSettingsMenu:t,items:i.map(r=>({type:"SELECT_VALUE",value:r.value,valueComponent:Qa,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:G("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:iv,selected:((i=bu())==null?void 0:i.type)==="auto_quality"},{handler:nv,selected:((o=bu())==null?void 0:o.type)==="traffic_saving"},{handler:ov,selected:((r=bu())==null?void 0:r.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-languages":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-languages",title:G("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:Ju(r,e)}))}),"playback-rate":({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"playback-rate",title:G("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:G("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}))})},bb=({subMenuId:t,context:e})=>t?[rC[t](e)]:[];var sC=Ce('<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 rv(t){je(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=sC();b(e,o)},$$slots:{default:!0}})}var aC=Ce('<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 sv(t){je(t,{width:"18",height:"15",children:(e,i)=>{var o=aC();b(e,o)},$$slots:{default:!0}})}var lC=Ce('<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 av(t){je(t,{testId:"play-speed-icon",children:(e,i)=>{var o=lC();b(e,o)},$$slots:{default:!0}})}var dC=Ce('<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 lv(t){je(t,{testId:"download-icon",children:(e,i)=>{var o=dC();b(e,o)},$$slots:{default:!0}})}var cC=Ce('<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 dv(t){je(t,{testId:"report-icon",children:(e,i)=>{var o=cC();b(e,o)},$$slots:{default:!0}})}var uC=Ce('<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 ep(t){je(t,{children:(e,i)=>{var o=uC();b(e,o)},$$slots:{default:!0}})}var pC=Ce('<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=pC();b(e,o)},$$slots:{default:!0}})}var fC=M('<div class="menu-item-value-wrapper s-1s"><!></div>'),mC={hash:"s-1s",code:".menu-item-value-wrapper.s-1s{line-height:normal}"};function uv(t,e){B(e,!0),Q(t,mC);let[i,o]=Ve(),r=()=>x(u,"$currentQuality$",i),a=()=>x(m,"$availableQualities$",i),l=()=>x(f,"$isAutoQualityEnabled$",i),d=()=>x(p,"$isMobile$",i),s=ve(),u=s.state.currentQuality$,m=s.state.availableQualities$,f=s.state.isAutoQualityEnabled$,p=s.ui.isMobile,$=v(()=>mb({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=fC(),_=C(y);Qa(_,{get quality(){return r()},get label(){return n($)},get isMobile(){return d()}}),w(y),b(t,y),F(),o()}var gC={"quality-settings":({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?G("auto_quality_option"):e)||"";return{id:"quality-settings",type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_quality",{actual:o}),icon:zd,label:G("menu_quality"),value:e,valueComponent:uv,weight:Xr["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:Xr["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:G("aria_label_submenu_traffic_saving"),icon:rv,label:G("menu_traffic_saving"),enabled:t,tooltipText:G("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-languages-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=Ju(t,e);return{id:"audio-languages-settings",weight:Xr["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_audio_languages",{actual:i}),icon:sv,label:G("menu_audio_languages"),value:i,children:"audio-languages"}},"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:Xr["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_rate",{actual:i}),icon:av,label:G("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:Xr["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_subtitle",{actual:t.displayValue}),icon:ia,iconProps:{type:"outline"},label:G("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:Xr.download,type:"CLICK",onClick:t,label:G("download_video_caption"),ariaLabel:G("aria_label_menu_download"),icon:lv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:Xr.report,type:"CLICK",onClick:t,label:G("menu_report"),ariaLabel:`${G("menu_report")}. ${G("aria_label_new_tab_alert")}`,icon:dv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:Xr["copy-data"],type:"CLICK",onClick:t,label:G("menu_copy_debug"),ariaLabel:G("menu_copy_debug"),icon:ep,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:Xr["save-trace-info"],type:"CLICK",onClick:t,label:G("menu_save_debug"),ariaLabel:G("menu_save_debug"),icon:ep,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:Xr["debug-info"],type:"CLICK",onClick:t,ariaLabel:G("aria_label_menu_debug_overlay"),label:G("menu_debug_overlay"),icon:cv,isHiddenFor:["desktop"]})},$b=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>gC[r](e)),...i.map(r=>({...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(Ma)};var bC=(t,e)=>{Pu(t,e)},$C=M('<div><div> </div> <div class="close s-k"></div></div>'),yC=M('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),xC=M("<div><!> <!></div>"),wC={hash:"s-k",code:'.settings-menu-container.mobile.s-k{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-k ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-k .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-k .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-k .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-k .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-k .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-k .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-k{line-height:40px}.settings-menu.desktop.s-k{min-width:300px}.settings-menu-container.s-k .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-k .menu.mobile.hidden{display:none}.settings-menu-container.s-k .menu .item:not(.switch-item),.settings-menu-container.s-k .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-k .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-k .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-k .item:not(.switch-item),.settings-menu.s-k .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-k .item.mobile:not(.switch-item),.settings-menu.s-k .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-k .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-k .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-k .item.header.mobile:where(.s-k){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-k .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-k .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-k .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-k .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-k .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-k{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-k:after,.close.s-k:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-k:before{transform:rotate(45deg)}.close.s-k:after{transform:rotate(-45deg)}'};function vc(t,e){B(e,!0),Q(t,wC);let[i,o]=Ve(),r=()=>x(De,"$settingsMenuVisible",i),a=()=>x(tt,"$settingsMenuOpenedByKeyboard",i),l=()=>x(Be,"$debugPanelVisible",i),d=()=>x(Pe,"$isMobile",i),s=()=>x(ke,"$playerSize",i),u=()=>x(Oe,"$hasMpegSources$",i),m=()=>x(Ee,"$mobileNotReportControlHidden$",i),f=()=>x(J,"$autoQualityLimitingAvailable$",i),p=()=>x(X,"$availableSubtitlesList$",i),$=()=>x(He,"$isLiveWithPlaybackSpeed",i),y=()=>x(re,"$availableAudioStreams$",i),_=()=>x(ze,"$availablePlaybackRates$",i),S=()=>x(ue,"$currentAudioStream$",i),I=()=>x(P,"$currentPlaybackRate$",i),T=()=>x(Xe,"$trafficSavingEnabled",i),N=()=>x(_e,"$currentQuality$",i),k=()=>x(Re,"$isAutoQualityEnabled$",i),E=()=>x(Te,"$currentSubtitle$",i),A=()=>x(ut,"$additionalSettingsMenuItems$",i),W=()=>x(pe,"$isAutoQualityAvailable$",i),H=()=>x(xe,"$availableQualities$",i),z=()=>x(ye,"$highQualityEnabled",i),Y=g(e,"ref",15,void 0),ae=g(e,"playerControlsHeight",3,0),j=ai({}),ne=ai({}),Z=ve(),we=Lt(),ue=Z.state.audioStream$,re=Z.state.availableAudioStreams$,_e=Z.state.currentQuality$,xe=Z.state.availableQualities$,J=Z.state.autoQualityLimitingAvailable$,Re=Z.state.isAutoQualityEnabled$,pe=Z.state.isAutoQualityAvailable$,P=Z.state.currentPlaybackRate$,ze=Z.state.availablePlaybackRates$,Te=Z.state.currentSubtitle$,X=Z.state.availableSubtitlesList$,ie=Z.state.canDownload,Oe=Z.state.hasMpegSources$,De=Z.ui.settingsMenu.visible$,tt=Z.ui.settingsMenu.openedByBtnKeyboard$,U=Z.ui.settingsMenu.ref$,Pe=Z.ui.isMobile,Ee=Z.ui.mobileNotReportControlHidden$,He=Z.state.canChangePlaybackSpeed$,Xe=Z.state.trafficSavingEnabled$,ye=Z.state.highQualityEnabled$,ke=Z.ui.playerSize,Be=Z.ui.debugPanelVisible,Nt=Z.state.isInteractiveTime$,ut=Z.ui.additionalSettingsMenuItems$,Ot=Z.ui.t,rt=Z.actions.internal.downloadVideo,wt=Z.actions.internal.closeSettingsMenu,Zt=Z.actions.internal.openSettingsSubMenu,Mt=Z.actions.internal.closeSettingsSubMenu,$e=q(!1),be=q(void 0),ee=ub();Ne(()=>{!r()&&ee.current&&(Mt(ne[ee.current]),ee.popAllSubMenus())}),Ne(()=>{r()||O(be,void 0)}),Ne(()=>{!ee.current&&n(be)&&T_(j,n(be))}),Ne(()=>{Y()&&U.set(Y())});async function it(St){var K;ee.pushSubMenu(St),await go(),Zt(St,ne[St]);let Ft=(K=Y())==null?void 0:K.firstElementChild;Ft&&Nf(Ft)}function fe(St){var Ft;St==null||St.stopPropagation(),a()||(Ft=e.returnFocus)==null||Ft.call(e),wt(),O($e,!1)}function Le(St,Ft){Z.actions.internal.setQuality(St,{appliesTo:Ft}),fe()}function _t(St){Z.actions.internal.setAudioStream(St),fe()}function Et(St,Ft){Z.actions.internal.setTrafficSavingEnabled(St,Ft),we.features.qualityDetailsSubMenuEnabled&&fe()}function dt(St,Ft){Z.actions.internal.setHighQualityEnabled(St,Ft),fe()}function ce(St){Z.actions.internal.setPlaybackRate(St),fe()}function Ue(St){Z.actions.internal.setSubtitle(St),fe()}function Qe(){rt()}function st(){_C(e.supportLink)&&window.open(e.supportLink,"_blank"),Z.actions.internal.reportProblem(),Z.actions.internal.pause()}function Dt(){Ll(Z.actions.internal.getDebugTextData())}let Bt=()=>{let St=Z.actions.internal.getTraceTextData(),Ft=new Blob([...St],{type:"application/json"}),K=window.URL.createObjectURL(Ft);Ea(K,"vk_player_trace_info","json")};function ei(){Be.set(!l())}function hi(){O($e,!0)}function Qi(){O($e,!1)}function Vt(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-ae()}px; overflow: auto;`}let ui=v(()=>ie&&u()&&!m()),fi=v(()=>we.features.trafficSaving&&!m()&&f()&&!we.features.qualityDetailsSubMenuEnabled),vt=v(()=>p().length>0&&!m()),Gt=v(()=>!!$()&&!m()),$i=v(()=>we.features.audioLanguages&&y().length>=2&&!m()),Gi=v(()=>!m());At(()=>Nt.subscribe(St=>{St&&!d()&&!n($e)&&!a()&&fe()}));let jt=v(()=>{let St=[n(Gi)&&"quality-settings",n($i)&&"audio-languages-settings",n(Gt)&&"playback-rate-settings",n(vt)&&"subtitles-settings",n(fi)&&"traffic-saving-switch",n(ui)&&"download",we.showSupport&&"show-support","copy-data",we.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(Ft=>!!Ft);return $b({items:St,context:{qualityDetailsSubMenuEnabled:we.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:_(),currentAudioStream:S(),availableAudioStreams:y(),currentPlaybackRate:I(),selectPlaybackRate:ce,trafficSavingEnabled:T(),toggleTrafficSaving:Et,currentQuality:N()||yb.INVARIANT,isAutoQualityEnabled:k()||!1,currentSubtitle:E(),isMobile:d(),onDownloadClick:Qe,onCopyDataClick:Dt,onReportProblemClick:st,onSaveTraceDataClick:Bt,toggleShowDebugInfo:ei},additionalSettingsMenuItems:A()})}),Tt=v(()=>bb({subMenuId:ee.current,context:{availablePlaybackRates:_(),selectPlaybackRate:ce,trafficSavingEnabled:T(),toggleTrafficSaving:Et,currentQuality:N()||yb.INVARIANT,isAutoQualityEnabled:k()||!1,isAutoQualityAvailable:W()||!1,availableQualities:H(),highQualityEnabled:z(),toggleHighQuality:dt,availableAudioStreams:y(),availableSubtitlesList:p(),closeSettingsMenu:wt,currentAudioStream:S(),isMobile:d(),selectAudioLanguage:_t,selectQuality:Le,selectSubtitle:Ue}}));var We=xC();let yi;var ho=C(We);{var yo=St=>{var Ft=yC();let K;Ft.__keydown=[bC,wt];var kt=C(Ft);{var si=qt=>{var ot=$C();let Ni;var Oi=C(ot),Xo=C(Oi,!0);w(Oi);var xo=L(Oi,2);xo.__click=fe,w(ot),D((Di,Yi)=>{Ni=se(ot,1,"item header s-k",null,Ni,Di),me(Xo,Yi)},[()=>({mobile:d()}),()=>Ot("submenu_settings")]),b(qt,ot)};R(kt,qt=>{d()&&qt(si)})}var at=L(kt,2);let xt;bi(at,21,()=>n(jt),qt=>qt.id,(qt,ot)=>{var Ni=Ae(),Oi=de(Ni);{var Xo=Di=>{jm(Di,{get isMobile(){return d()},get id(){return n(ot).id},get icon(){return n(ot).icon},get iconProps(){return n(ot).iconProps},get label(){return n(ot).label},get ariaLabel(){return n(ot).ariaLabel},get value(){return n(ot).value},get valueComponent(){return n(ot).valueComponent},onClick:()=>{it(n(ot).children),O(be,n(ot).id,!0)},get ref(){return j[n(ot).id]},set ref(Yi){j[n(ot).id]=Yi}})},xo=(Di,Yi)=>{{var Ar=io=>{let Ti=v(()=>`${n(ot).id}-menu-item`);Xm(io,{get isMobile(){return d()},get id(){return n(Ti)},get onClick(){return n(ot).onClick},get icon(){return n(ot).icon},get label(){return n(ot).label},get ariaLabel(){return n(ot).ariaLabel},closeSettings:fe})},_o=(io,Ti)=>{{var Zo=Jo=>{let Pn=v(()=>`${n(ot).id}-menu-item`);Jm(Jo,{get isMobile(){return d()},get id(){return n(Pn)},get onClick(){return n(ot).onClick},get icon(){return n(ot).icon},get label(){return n(ot).label},get ariaLabel(){return n(ot).ariaLabel},get enabled(){return n(ot).enabled},get tooltipText(){return n(ot).tooltipText},get maxTooltipWidth(){return n(ot).maxTooltipWidth}})};R(io,Jo=>{n(ot).type==="SWITCH"&&Jo(Zo)},Ti)}};R(Di,io=>{n(ot).type==="CLICK"?io(Ar):io(_o,!1)},Yi)}};R(Oi,Di=>{n(ot).type==="OPEN_SUB_MENU"?Di(Xo):Di(xo,!1)})}b(qt,Ni)}),w(at),Ye(at,qt=>Y(qt),()=>Y()),w(Ft),D((qt,ot,Ni)=>{K=se(Ft,1,"settings-menu menu s-k",null,K,qt),xt=se(at,1,"items",null,xt,ot),qe(at,Ni)},[()=>({desktop:!d(),mobile:d(),hidden:!!ee.current}),()=>({mobile:d()}),Vt]),mt("mouseenter",Ft,hi),mt("mouseleave",Ft,Qi),b(St,Ft)};R(ho,St=>{r()&&St(yo)})}var vn=L(ho,2);bi(vn,17,()=>n(Tt),St=>St.id,(St,Ft)=>{let K=v(()=>{var kt;return(kt=n(Ft).minWidth)!=null?kt:137});Ym(St,{get isMobile(){return d()},get playerControlsHeight(){return ae()},get returnFromSubMenu(){return ee.popSubMenu},get id(){return n(Ft).id},get title(){return n(Ft).title},get closeSettingsMenu(){return wt},openSubMenuList:it,get items(){return n(Ft).items},get minWidth(){return n(K)},get refMenuItems(){return j},get listRef(){return ne[n(Ft).id]},set listRef(kt){ne[n(Ft).id]=kt}})}),w(We),D(St=>yi=se(We,1,"settings-menu-container s-k",null,yi,St),[()=>({mobile:d(),hidden:!r()})]),b(t,We),F(),o()}et(["keydown","click"]);var SC=M('<button class="btn s-11"> </button>'),CC={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 pv(t,e){Q(t,CC);var i=SC();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=C(i,!0);w(i),D(()=>me(o,e.label)),b(t,i)}et(["click"]);var TC=M('<div class="container s-t"><div class="notification s-t"><div><p class="description s-t"><!></p> <!></div> <!></div></div>'),IC={hash:"s-t",code:".container.s-t{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-t{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-t{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function gc(t,e){B(e,!0),Q(t,IC);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Lt(),{ui:{t:r}}=ve(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=TC(),d=C(l),s=C(d),u=C(s),m=C(u);mc(m,{get message(){return a}}),w(u);var f=L(u,2);{var p=y=>{let _=v(()=>r("slow_video_notification_button"));pv(y,{get label(){return n(_)},get onClick(){return e.onSelectAutoQuality}})};R(f,y=>{o||y(p)})}w(s);var $=L(s,2);Es($,{get onClick(){return e.onClose}}),w(d),w(l),Gr(3,d,()=>gs,()=>({duration:i})),b(t,l),F()}import{isIntersecting as xb,Subscription as EC}from"@vkontakte/videoplayer-shared/es2018";var Ga="annotation",tp=class{constructor(){this.slots=new Map}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var d;let{overlay:o,id:r,controlsBehaviour:a,hideAllControls:l}=i;e.setAttribute("slot",Ga),this.setupSlotStyles(e,o),this.shadowRootContainer.append(e),this.slots.set(r,{rootElement:e,options:i}),a&&this.runHidingControlsWhenIntersected(r,a),l&&((d=this.store)==null||d.ui.isControlsAvailable.set(!1))}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"}}async runHidingControlsWhenIntersected(e,{observedSlotElementId:i,controlsToObserve:o}){var m;let r=this.slots.get(e);if(!r)return;let a=await this.findSlotElement(r.rootElement,i,e),{controls:l,hiddenControls:d}=((m=this.store)==null?void 0:m.ui)||{},s=new MutationObserver(f=>f.forEach(()=>{let p=Ps(a,this.shadowRootContainer);o.forEach($=>{let y=l==null?void 0:l[$],_=y?ge(y):null,S=d==null?void 0:d[$];_&&(S==null||S.set(xb(_,p)))})}));s.observe(a,{childList:!0,subtree:!0}),r.observer=s;let u=new EC;o.forEach(f=>{l&&u.add(l[f].subscribe(p=>{let $=d==null?void 0:d[f];p&&p.isDisplayed?$==null||$.set(xb(p,Ps(a,this.shadowRootContainer))):$==null||$.set(!1)}))}),r.subs=u}async findSlotElement(e,i,o){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(f=>f==null?void 0:f.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(f=>{var p,$;($=(p=this.store)==null?void 0:p.ui.hiddenControls[f])==null||$.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var kC=M('<div class="container s-5"><!></div>'),PC={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,PC);let i=g(e,"reversed",3,!1);var o=Ae(),r=de(o);Ss(r,()=>e.Icon,a=>{var l=kC(),d=C(l);Ri(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),w(l),D(()=>qe(l,`animation-duration: ${e.duration}ms`)),b(a,l)}),b(t,o),F()}import{PlaybackState as wb}from"@vkontakte/videoplayer-core/es2018";var AC=M('<div class="container s-1b"><!></div>'),LC={hash:"s-1b",code:".container.s-1b{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function fv(t,e){B(e,!0),Q(t,LC);let[i,o]=Ve(),r=()=>x(s,"$playbackState$",i),a=()=>x(m,"$previewTrackActive",i),l=()=>x(f,"$previewTrackDragInProgress",i),d=()=>x(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:m,previewTrackDragInProgress:f}}=ve(),{features:{playbackStatusShow:p},playbackStatusAnimationDuration:$}=Lt(),y=0,_=q(null),S=q(!1);Ne(()=>{r()===wb.PLAYING?O(_,En,!0):r()===wb.PAUSED?O(_,Ms,!0):O(_,null)}),Ne(()=>{if(!(!p||a()||l()))return y=window.setTimeout(()=>{y=0,O(_,null)},$),()=>{y&&(window.clearTimeout(y),y=0)}}),Ne(()=>{d()&&!n(S)&&(O(S,!0),O(_,null))});var I=Ae(),T=de(I);{var N=k=>{var E=AC(),A=C(E);hc(A,{get duration(){return $},get Icon(){return n(_)}}),w(E),b(k,E)};R(T,k=>{n(_)&&p&&k(N)})}b(t,I),F(),o()}var MC=M('<div><div data-testid="video-container"></div></div>'),VC={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 Ya(t,e){B(e,!0),Q(t,VC);let[i,o]=Ve(),r=()=>x(m,"$rotateAlpha",i),a=()=>x(f,"$playerSize",i),l=()=>x(u,"$playerPhase",i),d=()=>x(p,"$isPlaying$",i),s=g(e,"videoContainer",15),{playerPhase:u,ui:{rotateAlpha:m,playerSize:f},state:{isPlaying$:p}}=ve(),{isSmoothVideoRotate:$}=Lt(),y=v(()=>s()&&r()%180?a().height/a().width:1);var _=MC();let S;_.__contextmenu=function(...N){var k;(k=e.onContextMenu)==null||k.apply(this,N)},_.__mousedown=function(...N){var k;(k=e.onMouseDown)==null||k.apply(this,N)},_.__mouseup=function(...N){var k;(k=e.onMouseUp)==null||k.apply(this,N)},_.__click=function(...N){var k;(k=e.onClick)==null||k.apply(this,N)},_.__dblclick=function(...N){var k;(k=e.onDblClick)==null||k.apply(this,N)};var I=C(_);let T;Ye(I,N=>s(N),()=>s()),w(_),D((N,k)=>{S=se(_,1,"video-wrapper s-e",null,S,N),T=se(I,1,"video-container s-e",null,T,k),qe(I,`transform: rotate(${r()}deg) scale(${n(y)})`),Me(I,"data-is-playing",d())},[()=>({hidden:l()!=="video",nocursor:e.hideCursor}),()=>({"fast-rotate":!$})]),b(t,_),F(),o()}et(["contextmenu","mousedown","mouseup","click","dblclick"]);var RC=M('<div><span class="text s-1h"> </span> <!></div>'),NC={hash:"s-1h",code:".root.s-1h{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-1h,.root.visible.s-1h{transform:translateX(-50%)}.root.visible.s-1h{opacity:1;visibility:visible}.text.s-1h{font-size:13px;font-weight:600;line-height:16px}"};function mv(t,e){B(e,!0),Q(t,NC);let{ui:{t:i}}=ve();var o=RC();let r;var a=C(o),l=C(a,!0);w(a);var d=L(a,2);dc(d,{get size(){return"16"},fill:"currentColor"}),w(o),D((s,u)=>{r=se(o,1,"root s-1h",null,r,s),me(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),b(t,o),F()}var OC=M('<div class="container s-1d" role="button" data-testid="preview-track-overlay"><div class="icon s-1d"><!></div></div>'),DC={hash:"s-1d",code:".container.s-1d{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-1d,.icon.s-1d{align-items:center;display:flex;justify-content:center}.icon.s-1d{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-1d:hover .icon:where(.s-1d){transform:scale(1.15)}"};function vv(t,e){B(e,!1),Q(t,DC);let o=ve().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};bo();var l=OC();l.__click=a;var d=C(l),s=C(d);return En(s,{get size(){return"32"}}),w(d),w(l),Gr(3,l,()=>gs,()=>({duration:r})),b(t,l),sf(e,"handleClick",a),F({handleClick:a})}et(["click"]);var BC=M('<div class="container s-19"><div class="notification s-19"><span class="text s-19"> </span></div></div>'),FC={hash:"s-19",code:".container.s-19{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-19{background-color:var(--black-alpha-40);border-radius:var(--notification-radius);padding:10px 16px}.text.s-19{font-size:14px;font-weight:500;line-height:18px}"};function gv(t,e){B(e,!1),Q(t,FC);let{ui:{t:i}}=ve();bo();var o=BC(),r=C(o),a=C(r),l=C(a,!0);w(a),w(r),w(o),D(d=>me(l,d),[()=>i("preview_track_notification_text")],yn),Gr(3,r,()=>gs,()=>({duration:340})),b(t,o),F()}var HC=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},UC=M("<div><!></div>"),zC=M('<div class="spherical-video-icon s-9"><!></div>'),WC=M("<div><!></div>"),KC=M('<div class="settings-menu s-9"><!></div>'),qC=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),QC=M("<!> <!> <!>",1),GC=M('<div class="blocked s-9"></div>'),YC=M('<div class="player-wrapper s-9"><!> <div class="overlay-container"></div></div> <!>',1),jC={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 hv(t,e){B(e,!0),Q(t,jC);let[i,o]=Ve(),r=()=>x(di,"$notificationsToShow$",i),a=()=>x(ui,"$playerPhase",i),l=()=>x(ho,"$isLoaderVisible",i),d=()=>x(hi,"$adPlaybackState",i),s=()=>x(si,"$crashed",i),u=()=>x(Di,"$isInteractiveTime$",i),m=()=>x($i,"$settingsMenuVisible",i),f=()=>x(Yi,"$isInteractiveExpectation$",i),p=()=>x(Gt,"$controlsVisible",i),$=()=>x(_o,"$touched",i),y=()=>x(Mr,"$graphIsOpened$",i),_=()=>x(fi,"$isFullscreen",i),S=()=>x(hs,"$autoplayNextEnabled$",i),I=()=>x(Ft,"$postrollPassed",i),T=()=>x(yo,"$isEnded$",i),N=()=>x(On,"$cursorInside",i),k=()=>x(Zn,"$isControlsAvailable",i),E=()=>x(gn,"$doubleForwardOn$",i),A=()=>x(_r,"$fakeIsPlaying$",i),W=()=>x(yr,"$bottomNoSmooth",i),H=()=>x(Jo,"$interactiveTimeIndicator",i),z=()=>x(Ni,"$playerSize",i),Y=()=>x(Oi,"$is3DVideo",i),ae=()=>x(An,"$doubleForwardAvailable$",i),j=()=>x(We,"$contextMenuVisible$",i),ne=()=>x(ei,"$playbackState$",i),Z=()=>x(io,"$hotKeyMapData",i),we=()=>x(jt,"$scrubbingInProgress",i),ue=()=>x(Tt,"$volumeChangingInProgress",i),re=()=>x(vn,"$chromecastConnected$",i),_e=()=>x(hn,"$controlsTimeoutActive",i),xe=()=>x(Gi,"$settingsMenuOpenedByKeyboard",i),J=()=>x(os,"$contextMenuOpenedByKeyboard$",i),Re=()=>x(wi,"$contextMenuOpenedByHotKey$",i),pe=()=>x(Ge,"$contextMenuButtonRef$",i),P=()=>x(Ho,"$contextMenuLastActiveElem$",i),ze=()=>x(vt,"$isFullscreenOpenedByKeyboard",i),Te=()=>x(Bt,"$language$",i),X=()=>x(nn,"$previewTrackActive$",i),ie=()=>x(Xo,"$icon3DVideoVisible",i),Oe=()=>x(St,"$chromecastDeviceName$",i),De=()=>x(qt,"$currentSubtitle$",i),tt=()=>x(ot,"$currentSubtitleCaptions$",i),U=()=>x(Qi,"$position$",i),Pe=()=>x(Vt,"$duration$",i),Ee=()=>x(K,"$isLive$",i),He=()=>x(kt,"$isPlaying$",i),Xe=()=>x(Xn,"$contextMenuPosition$",i),ye=()=>x(Ro,"$previewTrackNotificationVisible$",i),ke=()=>x(Ti,"$showHotKeyMap",i),Be=()=>x(yi,"$debugPanelVisible",i),Nt=()=>x(Jr,"$userActionsDisabled$",i),ut=g(e,"videoContainer",15),Ot=g(e,"adsSlotId",3,void 0),rt=g(e,"adsParams",3,void 0),wt=g(e,"adsAutoplayParam",3,void 0),Zt=g(e,"duration",3,void 0),Mt=g(e,"logoTargetUrl",3,""),$e=g(e,"showNextPrevButtons",3,!1),be=g(e,"nextButtonActive",3,!1),ee=g(e,"prevButtonActive",3,!1),it=g(e,"endScreenVideoTitle",3,void 0),fe=g(e,"endScreenVideoThumb",3,void 0),Le=g(e,"isOneVideoPlaylist",3,!1),_t=g(e,"shadowRootContainer",3,void 0),Et=g(e,"outerContainerRef",3,void 0),dt=g(e,"playerStarted",3,!1),ce=g(e,"fullScreenTarget",3,void 0),Ue=g(e,"showMiniTimer",3,!1),Qe=g(e,"showEndScreen",3,!0),st=g(e,"keyboardControls",15),Dt=e.store.getLogger().createComponentLog("Root component"),Bt=e.store.interfaceLanguage$,ei=e.store.state.playbackState$,hi=e.store.ads.playbackState,Qi=e.store.state.positionWithScrubbing$,Vt=e.store.state.duration$,ui=e.store.playerPhase,fi=e.store.ui.isFullscreen,vt=e.store.ui.isFullscreenOpenedByKeyboard,Gt=e.store.ui.controlsVisible,$i=e.store.ui.settingsMenu.visible$,Gi=e.store.ui.settingsMenu.openedByBtnKeyboard$,jt=e.store.ui.scrubbingInProgress,Tt=e.store.ui.volumeChangingInProgress,We=e.store.ui.contextMenu.visible$,yi=e.store.ui.debugPanelVisible,ho=e.store.state.isLoaderVisible,yo=e.store.state.isEnded$,vn=e.store.state.chromecastConnected$,St=e.store.state.chromecastDeviceName$,Ft=e.store.ads.postrollPassed,K=e.store.state.isLive$,kt=e.store.state.isPlaying$,si=e.store.state.crashed$,at=e.store.webApi.annotationsApi,xt=e.store.webApi.pictureInPictureApi,qt=e.store.state.currentSubtitle$,ot=e.store.state.currentSubtitleCaptions$,Ni=e.store.ui.playerSize,Oi=e.store.ui.is3DVideo,Xo=e.store.ui.icon3DVideoVisible,xo=e.store.state.isInteractive,Di=e.store.state.isInteractiveTime$,Yi=e.store.state.isInteractiveExpectation$,Ar=e.store.state.hasInteractiveBranches,_o=e.store.ui.touched,io=e.store.ui.modals.hotKeyMap.data,Ti=e.store.ui.modals.hotKeyMap.show,Zo=e.store.ui.overlayContainer$,Jo=e.store.ui.controls.interactiveTimeIndicator,Pn=e.store.state.showInteractiveTimeIndicator,Xn=e.store.ui.contextMenu.position$,Lr=e.store.actions.internal.setQuality,Zr=e.store.actions.internal.closeSettingsMenu,hs=e.store.ui.autoplayNextEnabled$,Jr=e.store.ui.userActionsDisabled,Zn=e.store.ui.isControlsAvailable,hr=e.store.ui.videoTitleInfo,gn=e.store.ui.doubleForwardOn$,An=e.store.ui.doubleForwardAvailable$,Ro=e.store.ui.previewTrackNotificationVisible,Ln=e.store.actions.internal.getVideoElement,Jn=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:_r,notifications$:br,graphIsOpened$:Mr}=$o(),oo=q(void 0),Vr=q(void 0),Mn=q(void 0),Vn=q(void 0),no,Rr,Rn;io.set(__());let{closeNotification:pt,notificationsToShow$:di}=br,$r=v(()=>!!r().slow_video),er=()=>pt("slow_video"),tr=v(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),en=q(void 0),yr=le(!1),tn,hn=le(!1),Nn=le(),On=le(!1),No=q(!1),wo=q(!1),ir=q(!1),So=q(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),Bi=v(()=>u()&&!m()&&!(n(No)||n(wo))&&!(n(ir)&&!f())),Dn=!0,or=v(()=>e.uiConfig.features.thumbTimer&&Ue()&&a()==="video"&&!p()&&!s()&&!xo&&(e.uiConfig.hideThumbTimerAfterTouch&&!$()||!e.uiConfig.hideThumbTimerAfterTouch)),Nr=v(()=>a()==="video"&&!y()&&_()),Bn=q(!1),Co=v(()=>(Qe()||e.showAutoplayNext&&S())&&!!it()&&!!fe()&&(e.showAds&&I()||!e.showAds)&&T()&&!s()&&!n(Bn)),Or=v(()=>N()&&!(p()||n(Co))&&!u()&&k()&&!E()),bt=q(!1),$t=v(()=>A()!==null),{toggle:ro}=_r,Pi=!1,ji=null;xt==null||xt.setContext(id());let Oo=()=>{e.autoplay&&!xo&&e.uiConfig.controls.showOnStartupAtAutoplay&&Ii(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:Oo});let Do=()=>{window.clearTimeout(no),hn.set(!1)},so=()=>{window.clearTimeout(Rr),Nn.set(null)},Ii=he=>{Do(),hn.set(!0),no=window.setTimeout(()=>hn.set(!1),he);let yt=he-100;tn=window.setTimeout(()=>{W()&&yr.set(!1)},yt>0?yt:he)},Dr=(he,yt)=>{so(),Nn.set(yt),Rr=window.setTimeout(()=>Nn.set(null),he)},Br=Oi.subscribe(he=>{Xo.set(he),he&&(window.clearTimeout(Rn),Rn=window.setTimeout(()=>Xo.set(!1),e.uiConfig.controls.hide360IconTimeout))}),es=async()=>{var yt,Jt,_i,Ai;let he=Xs();if(he){let ci=Pd(),ti=To();he=ci===ti||ci===_t()}if(he){Ii(e.uiConfig.controls.hideTimeoutFullscreen);try{await(xt==null?void 0:xt.exit())}catch(ci){Dt({message:String(ci)})}}fi.set(he),e.store.getAdmanWrapper().setFullscreen(he),_()?(Jt=(yt=e.store.callbacks)==null?void 0:yt.onFullscreenEnter)==null||Jt.call(yt):(Ai=(_i=e.store.callbacks)==null?void 0:_i.onFullscreenExit)==null||Ai.call(_i)},ts=he=>{let{width:yt,height:Jt}=he.target;Ni.set({width:yt,height:Jt})},Fr=()=>{let{width:he,height:yt}=n(oo).getBoundingClientRect();Ni.set({width:he,height:yt})};At(()=>{var yt;return Eu(es),e.uiConfig.features.annotationsInside&&(at==null||at.init(n(oo))),Aa(xt)&&(xt==null||xt.assignPlayerContainer(n(oo)),xt==null||xt.setExternalEventHandlers({resize:ts,leavepictureinpicture:Fr})),e.interactiveContainer&&((yt=ut().parentElement)==null||yt.insertBefore(e.interactiveContainer,ut().nextSibling)),()=>{window.clearTimeout(no),window.clearTimeout(tn),window.clearTimeout(Rr),window.clearTimeout(Rn),Br(),xt==null||xt.dispose().catch(Jt=>{Dt({message:String(Jt)})}),ku(es)}});let To=()=>{let he=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!Et()?n(oo):Et(),yt=he.getRootNode(),Jt=yt instanceof ShadowRoot?yt.host:yt,_i=ce()instanceof HTMLElement&&ce().contains(Jt);return e.uiConfig.allowChangingFullscreenTarget&&ce()&&_i?ce():he},on=()=>{We.set(!1)},ao=()=>{Zr(),on()},xr=async()=>{if(!Jn()){Dt({message:"fullscreen disabled"});return}on(),Xs()?(await Iu(document),Dt({message:"exit fullscreen"})):(Dt({message:"request fullscreen"}),await Tu(To()))},Bo=he=>{y()||(he.preventDefault(),We.set(!0),Xn.set({left:he.clientX,top:he.clientY}))};function is(){On.set(!0),xo||Ii(e.uiConfig.controls.hideTimeoutCursor)}function Ke(he){var Ai,ci;let{relatedTarget:yt}=he,_i=!!(yt&&((Ai=n(Mn))!=null&&Ai.contains(yt)))&&((ci=st())==null?void 0:ci.isFocused());!xo&&!_i&&(yr.set(!0),Ii(e.uiConfig.controls.hideTimeoutCursor))}function Pt(){On.set(!1),O(wo,!1),O(No,!1),Pi=!1,e.store.actions.internal.releaseCamera(),Ii(e.uiConfig.controls.hideTimeout),E()&&bn()}function vi(he){return he?he.offsetTop+vi(he.offsetParent):0}function Io(he){return he?he.offsetLeft+Io(he.offsetParent):0}function Eo(he){if(H()&&Pn){let yt=he.currentTarget,Jt=vi(yt),_i=Io(yt),Ai=he.pageX-_i,ci=he.pageY-Jt,{left:ti,bottom:po,right:an}=H(),ln=an-ti;return Ai>=ti-ln&&ci<=po+ln}}function Fo(he){if(n(oo)){let yt=vi(he.currentTarget),Jt=z().height,_i=he.pageY-yt;if(Eo(he)){O(wo,!1);return}_i<40?O(wo,!0):_i>Jt-40?O(No,!0):(O(wo,!1),m()||O(No,!1))}}function lo(he){Fo(he),!n(Bi)&&!E()&&Ii(e.uiConfig.controls.hideTimeoutCursor),Y()&&Pi&&ji&&e.store.actions.internal.moveCameraFocusPX(ji.clientX-he.clientX,ji.clientY-he.clientY,he.timeStamp-ji.timeStamp),ji=he}let Xi=null,_n=()=>{Xi=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),Do()},e.uiConfig.doubleForwardActivationTime)},bn=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),Xi&&clearTimeout(Xi),Xi=null},co=he=>{he.preventDefault(),he.button===0&&(Pi=!0,e.store.actions.internal.holdCamera(),ae()&&_n()),!Pi&&Ii(e.uiConfig.controls.hideTimeoutCursor)},ko=he=>{he.preventDefault(),he.button===0&&(ji=he,Pi=!1,e.store.actions.internal.releaseCamera()),!E()&&Ii(e.uiConfig.controls.hideTimeoutCursor)},Fn=he=>{he.preventDefault(),Dn&&(Dt({message:"double click on video"}),xr(),Ii(e.uiConfig.controls.hideTimeoutCursor))},nr=he=>{var yt;if(he.preventDefault(),E()){bn();return}if(Xi&&bn(),j()||m()){ao();return}if(!(T()&&!Ar)){if(n($t))return ro();if((yt=st())==null||yt.focus(),!dt()){e.firstStart(),Ii(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||ne()!==Cb.PLAYING)&&e.store.actions.internal.togglePlay(),Ii(e.uiConfig.controls.hideTimeoutCursor)}},rr=he=>{ao(),_o.set(!0),Ii(e.uiConfig.controls.hideTimeout),he&&Dr(e.uiConfig.controls.hideHotKeyHelpers,he)},Hn=()=>{var he,yt;ao(),(he=e.store.callbacks)!=null&&he.onOpenHotKeyMap?(yt=e.store.callbacks)==null||yt.onOpenHotKeyMap(Z()):Ti.update(Jt=>!Jt)},_s=()=>{_o.set(!0)},os=e.store.ui.contextMenu.openedByBtnKeyboard$,Ge=e.store.ui.contextMenu.btnRef$,Wt=q(void 0),wi=e.store.ui.contextMenu.openedByHotKey$,Ho=e.store.ui.contextMenu.lastActiveElem$,nn=e.store.ui.previewTrackActive;Ne(()=>{Zo.set(n(en))}),Ne(()=>{O(ir,n(So)&&ne()!==Cb.PLAYING,!0),n(So)||Ct(()=>O(So,!0))}),Ne(()=>{var yt,Jt;let he=(n(ir)||T()||m()||we()||ue()||re()||_e())&&!n(Bi)&&(a()==="video"||a()==="ads")&&!s()&&k();Gt.set(he),!he&&!_e()&&e.uiConfig.returnFocusOnControlsHide&&((yt=n(Mn))!=null&&yt.contains(Nu()))&&((Jt=st())==null||Jt.focus())}),Ne(()=>{!we()&&n(bt)&&!u()&&Ii(e.uiConfig.controls.hideTimeoutCursor),Ct(()=>O(bt,we(),!0))}),Ne(()=>{n(Vn),m(),xe(),Ct(()=>Od(n(Vn),m(),xe()))}),Ne(()=>{n(Wt),j(),J(),Re(),Ct(()=>{let he=J()||Re();Od(n(Wt),j(),he)})}),Ne(()=>{let he=pe();he&&(j(),Ct(()=>Ml(he,j(),os)))}),Ne(()=>{let he=P();he&&(j(),Ct(()=>C_(he,j(),wi)))}),Ne(()=>{var he;!ze()&&_()&&(Ct(()=>vt.set(!1)),(he=st())==null||he.focus())}),Ne(()=>{y()&&ao()});let sr=q(void 0),rn=he=>{hr.set(Yn(Ln(),{title:n(sr)},"title",he))},Uo=(he,yt)=>{var ci,ti;let Jt=(ti=(ci=e.store.callbacks)==null?void 0:ci.uiInfo)==null?void 0:ti.onUpcomingLiveViewStateChanged;if(!Jt)return;let _i=!!yt,Ai={...Yn(n(oo),{upcomingLiveScreen:yt},"upcomingLiveScreen",_i),...he};Jt(Ai)};var Rs=YC();mt("blur",$a,ao);var sn=de(Rs);sn.__mousemove=lo;var Ns=C(sn);let ra=v(()=>a()==="ads"),sa=v(()=>n($t)?ro:void 0);Ye(Uf(Ns,{startDoubleForwardActivationTimer:_n,stopDoubleForward:bn,toggleFullscreen:xr,hideContextMenu:ao,showHotKeyHelpers:rr,showKeyMap:Hn,get isAds(){return n(ra)},get fakePlayButtonHandler(){return n(sa)},get nextButtonActive(){return be()},get prevButtonActive(){return ee()},children:(he,yt)=>{var Jt=QC(),_i=de(Jt);Ya(_i,{get hideCursor(){return n(Or)},onClick:nr,onContextMenu:Bo,onMouseDown:co,onMouseUp:ko,onDblClick:Fn,get videoContainer(){return ut()},set videoContainer(ti){ut(ti)}});var Ai=L(_i,2);Ta(Ai,()=>"slot",!1,(ti,po)=>{Ji(ti,()=>({name:Ga}))});var ci=L(Ai,2);Ss(ci,Te,ti=>{var po=qC(),an=de(po);let ln=v(()=>a()!=="thumb"||s()||xo&&e.autoplay);Ka(an,{get hidden(){return n(ln)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:Bo,onClick:on});var Ei=L(an,2);{var Gl=Fe=>{vv(Fe,{})};R(Ei,Fe=>{X()&&Fe(Gl)})}var ja=L(Ei,2);fv(ja,{});var Os=L(ja,2);mv(Os,{get isVisible(){return E()}});var Xa=L(Os,2);{var Za=Fe=>{let mi=v(()=>{var Po;return(Po=e.live)==null?void 0:Po.startTime});pc(Fe,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(mi)},onUpcomingLiveViewStateChanged:Uo,onContextMenu:Bo,onClick:on})};R(Xa,Fe=>{a()==="LiveWaitingStart"&&Fe(Za)})}var wr=L(Xa,2);{var aa=Fe=>{qa(Fe,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:Bo,onClick:on})};R(wr,Fe=>{a()==="LiveWaitingRecover"&&Fe(aa)})}var Ds=L(wr,2);{var Hr=Fe=>{qa(Fe,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:Bo,onClick:on})};R(Ds,Fe=>{a()==="LiveWaitingRecord"&&Fe(Hr)})}var ns=L(Ds,2);{var Bs=Fe=>{var mi=UC();let Po;var pa=C(mi);Ld(pa,{get adsSlotId(){return Ot()},get adsParams(){return rt()},get adsAutoplayParam(){return wt()},get duration(){return Zt()},get adsExternalApi(){return e.adsExternalApi}}),w(mi),D($n=>Po=se(mi,1,"ads-container s-9",null,Po,$n),[()=>({hidden:a()!=="ads"})]),b(Fe,mi)};R(ns,Fe=>{e.showAds&&dt()&&Fe(Bs)})}var ar=L(ns,2);{var Ja=Fe=>{let mi=v(()=>!Qe()&&e.showAutoplayNext&&S());Bf(Fe,{get title(){return it()},get thumb(){return fe()},get isHide(){return n(mi)},clickCloseIcon:()=>O(Bn,!0)})};R(ar,Fe=>{n(Co)&&it()&&fe()&&Fe(Ja)})}var el=L(ar,2);{var Yl=Fe=>{let mi=v(()=>!p());zm(Fe,{get title(){return e.title},get isHidden(){return n(mi)},onVisibilityChanged:rn,get ref(){return n(sr)},set ref(Po){O(sr,Po,!0)}})};R(el,Fe=>{n(Nr)&&Fe(Yl)})}var tl=L(el,2);{var il=Fe=>{let mi=v(()=>a()==="video"&&p());cc(Fe,{get isShifted(){return n(mi)}})};R(tl,Fe=>{Y()&&Fe(il)})}var ol=L(tl,2);{var jl=Fe=>{var mi=zC(),Po=C(mi);kd(Po,{}),w(mi),b(Fe,mi)};R(ol,Fe=>{ie()&&Fe(jl)})}var la=L(ol,2);{var Sr=Fe=>{uc(Fe,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Oe()}})};R(la,Fe=>{re()&&Fe(Sr)})}var nt=L(la,2);{var ct=Fe=>{za(Fe,{get shifted(){return p()},get captions(){return tt()},get position(){return U()},get playerSize(){return z()}})};R(nt,Fe=>{De().value!=="off"&&Fe(ct)})}var Fi=L(nt,2);{var zo=Fe=>{var mi=WC();mi.__contextmenu=Bo,mi.__click=[HC,j,We,m,$i,ao];var Po=C(mi);Wa(Po,{}),w(mi),b(Fe,mi)};R(Fi,Fe=>{s()&&Fe(zo)})}var Hi=L(Fi,2);{var gi=Fe=>{let mi=v(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),Po=v(()=>a()==="ads"),pa=v(()=>e.canRewindLive&&Pe()!==0);lc(Fe,{get bottomHidden(){return n(mi)},get bottomNoSmooth(){return W()},get showControls(){return p()},get isAds(){return n(Po)},get canRewindLive(){return n(pa)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Mt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return $e()},get nextButtonActive(){return be()},get prevButtonActive(){return ee()},get isOneVideoPlaylist(){return Le()},customFullscreenSupported:Dn,toggleFullscreen:xr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(Vr)},set playerControlsWrapperRef($n){O(Vr,$n,!0)},get playerControlsRef(){return n(Mn)},set playerControlsRef($n){O(Mn,$n,!0)}})};R(Hi,Fe=>{dt()&&Fe(gi)})}var Li=L(Hi,2);{var da=Fe=>{var mi=KC(),Po=C(mi);let pa=v(()=>{var $n;return($n=n(Mn))==null?void 0:$n.clientHeight});vc(Po,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(pa)},returnFocus:()=>{var $n;return($n=st())==null?void 0:$n.focus()},get ref(){return n(Vn)},set ref($n){O(Vn,$n,!0)}}),w(mi),b(Fe,mi)};R(Li,Fe=>{!re()&&a()!=="ads"&&Fe(da)})}var nl=L(Li,2);let fp=v(()=>!n(or));Rd(nl,{get isLive(){return Ee()},get isHidden(){return n(fp)},get isPlaying(){return He()},get position(){return U()},get duration(){return Pe()}});var kc=L(nl,2);Hm(kc,{get data(){return Nn}});var Pc=L(kc,2);Df(Pc,{get supportLink(){return e.supportLink},returnFocus:()=>{var Fe;return(Fe=st())==null?void 0:Fe.focus()},get visible(){return j()},get playerContainerRef(){return n(oo)},get position(){return Xe()},get menuElementRef(){return n(Wt)},set menuElementRef(Fe){O(Wt,Fe,!0)}});var Ac=L(Pc,2);{var mp=Fe=>{gc(Fe,{onClose:er,onSelectAutoQuality:()=>{Lr("auto"),er()}})};R(Ac,Fe=>{n($r)&&Fe(mp)})}var Lc=L(Ac,2);{var rl=Fe=>{gv(Fe,{})};R(Lc,Fe=>{ye()&&Fe(rl)})}var Mc=L(Lc,2);{var ca=Fe=>{Ra(Fe,{})};R(Mc,Fe=>{n(tr)&&Fe(ca)})}var ua=L(Mc,2);{var vp=Fe=>{Kf(Fe,{})};R(ua,Fe=>{ke()&&Fe(vp)})}var Vc=L(ua,2);{var Xl=Fe=>{Fd(Fe,{})};R(Vc,Fe=>{Be()&&Fe(Xl)})}b(ti,po)}),b(he,Jt)},$$slots:{default:!0}}),he=>st(he),()=>st());var lt=L(Ns,2);Ye(lt,he=>O(en,he),()=>n(en)),w(sn),Ye(sn,he=>O(oo,he),()=>n(oo));var Xt=L(sn,2);{var uo=he=>{var yt=GC();b(he,yt)};R(Xt,he=>{Nt()&&he(uo)})}mt("mouseenter",sn,is),mt("mouseleave",sn,Pt),mt("click",sn,_s,!0),mt("focusin",sn,Ke,!0),b(t,Rs),F(),o()}et(["mousemove","contextmenu","click"]);import{clientChecker as _c,PlaybackState as sT}from"@vkontakte/videoplayer-core/es2018";import{noop as aT}from"@vkontakte/videoplayer-shared/es2018";var XC=M('<div></div> <div class="info s-m"><div class="triangles-wrapper s-m"><div></div> <div></div> <div></div></div> <p class="step-caption s-m"> </p></div>',1),ZC=M("<div><!></div>"),JC={hash:"s-m",code:".double-click-area.s-m{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-m{left:0}.double-click-area.right.s-m{right:0}.semicircle.s-m{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-m{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-m{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-m{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-m,.triangles-wrapper.s-m{display:flex;justify-content:center}.triangles-wrapper.s-m{margin-bottom:10px;position:relative}.triangle.s-m{animation:s-m-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-m:nth-child(3),.triangle.right.s-m:first-child{animation-delay:0s}.triangle.left.s-m:nth-child(2),.triangle.right.s-m:nth-child(2){animation-delay:.1s}.triangle.left.s-m:first-child,.triangle.right.s-m:nth-child(3){animation-delay:.2s}@keyframes s-m-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-m{border-right:8px solid var(--white)}.triangle.right.s-m{border-left:8px solid var(--white)}.triangle.s-m:not(:last-child){margin-right:5px}.step-caption.s-m{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function ip(t,e){B(e,!0),Q(t,JC);let i=g(e,"seekStep",3,0),o=q(!1),r=0,a=0,l=q(ai(i())),d=f=>{f.stopPropagation(),a+=1,O(l,i()*(a-1)),a===1?e.handleSingleFirstClick(f):(O(o,!0),e.handleSecondClick()),window.clearTimeout(r),r=window.setTimeout(()=>{a=0,O(o,!1)},300)};un(()=>{window.clearTimeout(r)});var s=ZC();s.__click=d;var u=C(s);{var m=f=>{var p=XC(),$=de(p),y=L($,2),_=C(y),S=C(_),I=L(S,2),T=L(I,2);w(_);var N=L(_,2),k=C(N,!0);w(N),w(y),D(E=>{var A,W,H,z;se($,1,`semicircle ${(A=e.side)!=null?A:""}`,"s-m"),se(S,1,`triangle ${(W=e.side)!=null?W:""}`,"s-m"),se(I,1,`triangle ${(H=e.side)!=null?H:""}`,"s-m"),se(T,1,`triangle ${(z=e.side)!=null?z:""}`,"s-m"),me(k,E)},[()=>G("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),b(f,p)};R(u,f=>{n(o)&&f(m)})}w(s),D(()=>{var f;return se(s,1,`double-click-area ${(f=e.side)!=null?f:""}`,"s-m")}),b(t,s),F()}et(["click"]);var eT=(t,e,i)=>{e(!1),i()},tT=M('<div class="overlay s-h"></div> <div class="next-video s-h"><div class="top s-h"><div class="caption s-h"> </div> <!></div> <div class="row s-h"><div class="column s-h"><div class="thumb s-h"><div></div> <!></div></div> <div class="column s-h"><div class="title s-h"> </div></div></div></div>',1),iT={hash:"s-h",code:".overlay.s-h{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-h{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-h{display:flex;justify-content:space-between}.caption.s-h{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-h{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-h{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-h{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-h,.thumb-overlay.s-h{height:100%;width:100%}.thumb-overlay.s-h{position:absolute}.thumb-overlay.withOpacity.s-h{background:var(--black);opacity:.3}.title.s-h{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function _v(t,e){B(e,!0),Q(t,iT);let[i,o]=Ve(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=ve(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,m=l.actions.internal.nextVideoAnnouncementShow,f=l.actions.internal.nextVideoAnnouncementClick,p=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),p()},_=()=>{e.clickCloseIcon(),$()};At(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),p())});var S=Ae(),I=de(S);{var T=N=>{var k=tT(),E=L(de(k),2),A=C(E),W=C(A),H=C(W,!0);w(W);var z=L(W,2);Es(z,{onClick:_}),w(A);var Y=L(A,2);Y.__click=[eT,u,f];var ae=C(Y),j=C(ae),ne=C(j);let Z;var we=L(ne,2);{var ue=J=>{Hd(J,{get isRunning(){return a()},onTimerEnded:y})};R(we,J=>{r()&&J(ue)})}w(j),w(ae);var re=L(ae,2),_e=C(re),xe=C(_e,!0);w(_e),w(re),w(Y),w(E),D((J,Re)=>{me(H,J),qe(j,`background-image: url('${e.thumb}')`),Z=se(ne,1,"thumb-overlay s-h",null,Z,Re),me(xe,e.title)},[()=>r()?G("end_screen_next_video"):G("end_screen_recommended_video"),()=>({withOpacity:r()})]),b(N,k)};R(I,N=>{e.isHide||N(T)})}b(t,S),F(),o()}et(["click"]);import{clientChecker as oT}from"@vkontakte/videoplayer-core/es2018";var Tb=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;At(()=>{oT.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))}),un(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as nT}from"@vkontakte/videoplayer-core/es2018";var op=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 rT}from"@vkontakte/videoplayer-core/es2018";var Ib=({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=()=>rT.device.isIOS&&ge(l)===nT.DASH_LIVE_CMAF,f=()=>{s==null||s(),s=null},p=$=>{if(f(),!m()||!$)return;let y=u();if(!y)return;let _=new op(y),S=ge(d),I=ge(a),T=ge(r);for(let E of S)I.some(W=>W.value===E.id)&&_.attach(E,T.value===E.id);let N=d.subscribe(E=>{for(let A of E)_.updateSrc(A)}),k=()=>{let E=_.getCurrentShowingId();o(ge(a).find(A=>A.value===E))};y.textTracks.addEventListener("change",k),s=()=>{N(),_.detachAll(),y.textTracks.removeEventListener("change",k)}};At(()=>i.subscribe(p)),un(f)};var lT=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},dT=M("<!> <!>",1),cT=M("<div><!></div>"),uT=M('<div class="spherical-video-icon s-7"><!></div>'),pT=M("<div><!></div>"),fT=M('<div class="settings-mobile s-7"><!></div>'),mT=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),vT=M('<div class="player-wrapper s-7" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),gT={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%}.spherical-video-icon.s-7{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-7{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-mobile.s-7{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 bv(t,e){var Co,Or;B(e,!0),Q(t,gT);let[i,o]=Ve(),r=()=>x(_t,"$playerPhase",i),a=()=>x(hi,"$isLoaderVisible",i),l=()=>x(it,"$adPlaybackState",i),d=()=>x(jt,"$crashed",i),s=()=>x(hs,"$notificationsToShow$",i),u=()=>x(ee,"$playbackState$",i),m=()=>x(Mt,"$graphIsOpened$",i),f=()=>x(Ue,"$interactiveHideMobileControls",i),p=()=>x(Qi,"$isEnded$",i),$=()=>x(at,"$isInteractiveExpectation$",i),y=()=>x(dt,"$controlsVisible",i),_=()=>x(ot,"$touched",i),S=()=>x(Oi,"$autoplayNextEnabled$",i),I=()=>x(fi,"$postrollPassed",i),T=()=>x(hr,"$bottomNoSmooth",i),N=()=>x(yi,"$videoSize",i),k=()=>x(St,"$playerSize",i),E=()=>x(Et,"$isFullscreen",i),A=()=>x(fe,"$position$",i),W=()=>x(Le,"$duration$",i),H=()=>x(Xo,"$loadedMetadata",i),z=()=>x(Qe,"$settingsMenuVisible",i),Y=()=>x(Dt,"$scrubbingInProgress",i),ae=()=>x(Bt,"$volumeChangingInProgress",i),j=()=>x(Vt,"$chromecastConnected$",i),ne=()=>x(ce,"$isControlsAvailable",i),Z=()=>x(si,"$isInteractiveTime$",i),we=()=>x($i,"$isActiveLive",i),ue=()=>x(st,"$settingsMenuOpenedByKeyboard",i),re=()=>x(be,"$language$",i),_e=()=>x(qt,"$disabledControls$",i),xe=()=>x(Ft,"$is3DVideo",i),J=()=>x(K,"$icon3DVideoVisible",i),Re=()=>x(ui,"$chromecastDeviceName$",i),pe=()=>x(ho,"$currentSubtitle$",i),P=()=>x(yo,"$currentSubtitleCaptions$",i),ze=()=>x(vn,"$realDuration$",i),Te=()=>x(vt,"$isLive$",i),X=()=>x(Gt,"$isPlaying$",i),ie=()=>x(ei,"$debugPanelVisible",i),Oe=g(e,"videoContainer",15),De=g(e,"adsSlotId",3,void 0),tt=g(e,"adsParams",3,void 0),U=g(e,"adsAutoplayParam",3,void 0),Pe=g(e,"duration",3,void 0),Ee=g(e,"logoTargetUrl",3,""),He=g(e,"showNextPrevButtons",3,!1),Xe=g(e,"nextButtonActive",3,!1),ye=g(e,"prevButtonActive",3,!1),ke=g(e,"endScreenVideoTitle",3,void 0),Be=g(e,"endScreenVideoThumb",3,void 0),Nt=g(e,"isOneVideoPlaylist",3,!1),ut=g(e,"showMiniTimer",3,!1),Ot=g(e,"fullScreenTarget",3,void 0),rt=g(e,"playerStarted",3,!1),wt=g(e,"showEndScreen",3,!0),{notifications$:Zt,graphIsOpened$:Mt}=$o(),$e=e.store.getLogger().createComponentLog("Root component"),be=e.store.interfaceLanguage$,ee=e.store.state.playbackState$,it=e.store.ads.playbackState,fe=e.store.state.positionWithScrubbing$,Le=e.store.state.duration$,_t=e.store.playerPhase,Et=e.store.ui.isFullscreen,dt=e.store.ui.controlsVisible,ce=e.store.ui.isControlsAvailable,Ue=e.store.ui.interactiveHideMobileControls,Qe=e.store.ui.settingsMenu.visible$,st=e.store.ui.settingsMenu.openedByBtnKeyboard$,Dt=e.store.ui.scrubbingInProgress,Bt=e.store.ui.volumeChangingInProgress,ei=e.store.ui.debugPanelVisible,hi=e.store.state.isLoaderVisible,Qi=e.store.state.isEnded$,Vt=e.store.state.chromecastConnected$,ui=e.store.state.chromecastDeviceName$,fi=e.store.ads.postrollPassed,vt=e.store.state.isLive$,Gt=e.store.state.isPlaying$,$i=e.store.state.isActiveLive$,Gi=e.store.state.isRewindableLive$,jt=e.store.state.crashed$,Tt=e.store.webApi.annotationsApi,We=e.store.webApi.pictureInPictureApi,yi=e.store.state.videoSize$,ho=e.store.state.currentSubtitle$,yo=e.store.state.currentSubtitleCaptions$,vn=e.store.state.duration$,St=e.store.ui.playerSize,Ft=e.store.ui.is3DVideo,K=e.store.ui.icon3DVideoVisible,kt=e.store.state.isInteractive,si=e.store.state.isInteractiveTime$,at=e.store.state.isInteractiveExpectation$,xt=e.store.state.hasInteractiveBranches,qt=e.store.ui.controls.disabledControls$,ot=e.store.ui.touched,Ni=e.store.ui.overlayContainer$,Oi=e.store.ui.autoplayNextEnabled$,Xo=e.store.state.loadedMetadata$,xo=e.store.actions.internal.closeSettingsMenu,Di=(Co=e.store.callbacks)==null?void 0:Co.onDisabledPlayPrevChapterClick,Yi=(Or=e.store.callbacks)==null?void 0:Or.onDisabledSeekToInteractiveClick,Ar=e.store.actions.internal.setQuality,_o=q(void 0),io=q(void 0),Ti=q(void 0),Zo=q(void 0),Jo,Pn,Xn=v(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),Lr=q(void 0),{closeNotification:Zr,notificationsToShow$:hs}=Zt,Jr=v(()=>!!s().slow_video),Zn=()=>Zr("slow_video"),hr=le(!1),gn,An=q(!1),Ro=v(()=>u()!==sT.PLAYING),Ln=q(!1),Jn=v(()=>m()||f()||!n(An)&&(p()&&!!xt||n(Ro)&&$())),_r=q(!0),br=v(()=>e.uiConfig.features.thumbTimer&&ut()&&r()==="video"&&!y()&&!d()&&!kt&&(e.uiConfig.hideThumbTimerAfterTouch&&!_()||!e.uiConfig.hideThumbTimerAfterTouch)),Mr=q(!1),oo=v(()=>(wt()||e.showAutoplayNext&&S())&&!!ke()&&!!Be()&&(e.showAds&&I()||!e.showAds)&&p()&&!d()&&!n(Mr)),Vr=q(!1);We==null||We.setContext(id());let Mn=bt=>{bt&&!kt&&no(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:Mn});let Vn=()=>{clearTimeout(Jo),O(An,!1),f()&&Ue.set(!1)},no=bt=>{Vn(),O(An,!0),Jo=setTimeout(()=>O(An,!1),bt);let $t=bt-100;gn=setTimeout(()=>{T()&&hr.set(!1)},$t>0?$t:bt)},Rr=Ft.subscribe(bt=>{K.set(bt),bt&&(clearTimeout(Pn),Pn=setTimeout(()=>K.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Rn=async(bt=Xs())=>{var $t,ro,Pi,ji,Oo,Do;if(bt&&!_c.device.isIOS){let so=Pd(),Ii=en(),Dr=_c.browser.isSamsungBrowser&&so===e.shadowRootContainer;bt=so===Ii||Dr}if(bt){no(e.uiConfig.controls.hideTimeoutFullscreen);try{await(We==null?void 0:We.exit())}catch(so){$e({message:String(so)})}try{let so=($t=N())!=null&&$t.width&&((ro=N())!=null&&ro.height)?N():k();await g_(so)}catch(so){$e({message:String(so)})}}Et.set(bt),e.store.getAdmanWrapper().setFullscreen(bt),E()?(ji=(Pi=e.store.callbacks)==null?void 0:Pi.onFullscreenEnter)==null||ji.call(Pi):(Do=(Oo=e.store.callbacks)==null?void 0:Oo.onFullscreenExit)==null||Do.call(Oo)},pt=bt=>{let $t=bt,{width:ro,height:Pi}=$t.target;St.set({width:ro,height:Pi})},di=()=>{let{width:bt,height:$t}=n(_o).getBoundingClientRect();St.set({width:bt,height:$t})};At(()=>{var bt;return Eu(Rn),e.uiConfig.features.annotationsInside&&(Tt==null||Tt.init(n(_o))),Aa(We)&&(We==null||We.assignPlayerContainer(n(_o)),We==null||We.setExternalEventHandlers({resize:pt,leavepictureinpicture:di})),O(_r,!_c.device.isIphoneOrOldIpad),e.interactiveContainer&&((bt=Oe().parentElement)==null||bt.insertBefore(e.interactiveContainer,Oe().nextSibling)),()=>{clearTimeout(Jo),clearTimeout(gn),clearTimeout(Pn),Rr(),We==null||We.dispose().catch($t=>{$e({message:String($t)})}),ku(Rn)}});let $r=q(!0),er=q(!0),tr=bt=>{let $t=A()+(bt==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;$t<0?(O($r,!1),$t=0):$t>=W()&&(O(er,!1),$t=W()),O(Ln,!0),e.seekTime($t)},en=()=>_c.device.isIOS?n(_o):!e.uiConfig.allowChangingFullscreenTarget||!Ot()?e.outerContainerRef:Ot().contains(e.outerContainerRef)?Ot():e.outerContainerRef,yr=async()=>{try{if(Xs())await Iu(document),$e({message:"exit fullscreen"});else{if($e({message:"request fullscreen"}),_c.device.isIOS&&!H())return;await Tu(en())}}catch(bt){$e({message:String(bt)})}},tn=()=>{xo()},hn=bt=>{if(bt.preventDefault(),z()){tn();return}if(!rt()){e.firstStart(),no(e.uiConfig.controls.hideTimeoutCursor);return}O(Ln,!1),y()?Vn():no(e.uiConfig.controls.hideTimeoutMobile)},Nn=()=>{ot.set(!0)},On=()=>{kt||(hr.set(!0),no(e.uiConfig.controls.hideTimeoutCursor))},No=bt=>{Di&&(Di(bt),no(e.uiConfig.controls.hideTimeoutMobile))},wo=bt=>{Yi&&(Yi(bt),no(e.uiConfig.controls.hideTimeoutMobile))};Ne(()=>{Ni.set(n(Lr))}),Ne(()=>{dt.set((n(Ro)||z()||Y()||ae()||j()||!n(oo)&&(p()||n(An)&&!n(Ln)))&&!n(Jn)&&r()==="video"&&!d()&&ne())}),Ne(()=>{!Y()&&n(Vr)&&!Z()&&no(e.uiConfig.controls.hideTimeoutMobile),O(Vr,Y(),!0)}),Ne(()=>{O($r,A()>0),O(er,!we()&&A()<W(),!0)}),Ne(()=>{Od(n(Zo),z(),ue(),!0)});let ir=G("aria_label_video_player");Tb({fullScreenChangeHandler:Rn,getFullscreenTarget:en}),Ib({store:e.store,getFullscreenTarget:en});let So=(bt,$t)=>{var Oo,Do;let ro=(Do=(Oo=e.store.callbacks)==null?void 0:Oo.uiInfo)==null?void 0:Do.onUpcomingLiveViewStateChanged;if(!ro)return;let Pi=!!$t,ji={...Yn(n(_o),{upcomingLiveScreen:$t},"upcomingLiveScreen",Pi),...bt};ro(ji)};var Bi=vT();mt("blur",$a,tn);var Dn=C(Bi);Ya(Dn,{onClick:hn,get videoContainer(){return Oe()},set videoContainer(bt){Oe(bt)}});var or=L(Dn,2);Ta(or,()=>"slot",!1,(bt,$t)=>{Ji(bt,()=>({name:Ga}))});var Nr=L(or,2);Ss(Nr,re,bt=>{var $t=mT(),ro=de($t);let Pi=v(()=>r()!=="thumb"||d()||kt&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);Ka(ro,{get hidden(){return n(Pi)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var ji=L(ro,2);{var Oo=Ge=>{var Wt=dT(),wi=de(Wt);{var Ho=rn=>{let Uo=v(()=>e.uiConfig.controls.seekStepMobile/1e3);ip(rn,{side:"left",get seekStep(){return n(Uo)},handleSingleFirstClick:hn,handleSecondClick:()=>tr("backward")})};R(wi,rn=>{n($r)&&rn(Ho)})}var nn=L(wi,2);{var sr=rn=>{let Uo=v(()=>e.uiConfig.controls.seekStepMobile/1e3);ip(rn,{side:"right",get seekStep(){return n(Uo)},handleSingleFirstClick:hn,handleSecondClick:()=>tr("forward")})};R(nn,rn=>{n(er)&&rn(sr)})}b(Ge,Wt)};R(ji,Ge=>{e.canRewindLive&&Gi&&!_e().has("TIMELINE")&&Ge(Oo)})}var Do=L(ji,2);{var so=Ge=>{let Wt=v(()=>{var wi;return(wi=e.live)==null?void 0:wi.startTime});pc(Ge,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(Wt)},onUpcomingLiveViewStateChanged:So})};R(Do,Ge=>{r()==="LiveWaitingStart"&&Ge(so)})}var Ii=L(Do,2);{var Dr=Ge=>{qa(Ge,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};R(Ii,Ge=>{r()==="LiveWaitingRecover"&&Ge(Dr)})}var Br=L(Ii,2);{var es=Ge=>{qa(Ge,{kind:"record",get thumbUrl(){return e.thumbUrl}})};R(Br,Ge=>{r()==="LiveWaitingRecord"&&Ge(es)})}var ts=L(Br,2);{var Fr=Ge=>{var Wt=cT();let wi;var Ho=C(Wt);Ld(Ho,{get adsSlotId(){return De()},get adsParams(){return tt()},get adsAutoplayParam(){return U()},get duration(){return Pe()},get adsExternalApi(){return e.adsExternalApi}}),w(Wt),D(nn=>wi=se(Wt,1,"ads-container s-7",null,wi,nn),[()=>({hidden:r()!=="ads"})]),b(Ge,Wt)};R(ts,Ge=>{e.showAds&&rt()&&Ge(Fr)})}var To=L(ts,2);{var on=Ge=>{let Wt=v(()=>!wt()&&e.showAutoplayNext&&S());_v(Ge,{get title(){return ke()},get thumb(){return Be()},get isHide(){return n(Wt)},clickCloseIcon:()=>O(Mr,!0)})};R(To,Ge=>{n(oo)&&ke()&&Be()&&Ge(on)})}var ao=L(To,2);{var xr=Ge=>{cc(Ge,{})};R(ao,Ge=>{xe()&&Ge(xr)})}var Bo=L(ao,2);{var is=Ge=>{var Wt=uT(),wi=C(Wt);kd(wi,{}),w(Wt),b(Ge,Wt)};R(Bo,Ge=>{J()&&Ge(is)})}var Ke=L(Bo,2);{var Pt=Ge=>{uc(Ge,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Re()}})};R(Ke,Ge=>{j()&&Ge(Pt)})}var vi=L(Ke,2);{var Io=Ge=>{za(Ge,{get shifted(){return y()},get captions(){return P()},get position(){return A()},get playerSize(){return k()},isMobile:!0})};R(vi,Ge=>{pe().value!=="off"&&Ge(Io)})}var Eo=L(vi,2);{var Fo=Ge=>{var Wt=pT();Wt.__click=[lT,z,Qe,tn];var wi=C(Wt);Wa(wi,{}),w(Wt),b(Ge,Wt)};R(Eo,Ge=>{d()&&Ge(Fo)})}var lo=L(Eo,2);{var Xi=Ge=>{let Wt=v(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),wi=v(()=>r()==="ads"),Ho=v(()=>e.canRewindLive&&ze()!==0);lc(Ge,{get bottomHidden(){return n(Wt)},get showControls(){return y()},get bottomNoSmooth(){return T()},get isAds(){return n(wi)},get canRewindLive(){return n(Ho)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Ee()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return He()},get nextButtonActive(){return Xe()},get prevButtonActive(){return ye()},get isOneVideoPlaylist(){return Nt()},get customFullscreenSupported(){return n(_r)},get endScreenShown(){return n(oo)},toggleFullscreen:yr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:No,onDisabledSeekToInteractiveClick:wo,get playerControlsWrapperRef(){return n(io)},set playerControlsWrapperRef(nn){O(io,nn,!0)},get playerControlsRef(){return n(Ti)},set playerControlsRef(nn){O(Ti,nn,!0)}})};R(lo,Ge=>{rt()&&Ge(Xi)})}var _n=L(lo,2);{var bn=Ge=>{var Wt=fT(),wi=C(Wt);vc(wi,{get supportLink(){return e.supportLink},get returnFocus(){return aT},get ref(){return n(Zo)},set ref(Ho){O(Zo,Ho,!0)}}),w(Wt),b(Ge,Wt)};R(_n,Ge=>{z()&&Ge(bn)})}var co=L(_n,2);let ko=v(()=>!n(br));Rd(co,{get isLive(){return Te()},get isHidden(){return n(ko)},get isPlaying(){return X()},get position(){return A()},get duration(){return W()}});var Fn=L(co,2);{var nr=Ge=>{Ra(Ge,{})};R(Fn,Ge=>{n(Xn)&&Ge(nr)})}var rr=L(Fn,2);{var Hn=Ge=>{Fd(Ge,{})};R(rr,Ge=>{ie()&&Ge(Hn)})}var _s=L(rr,2);{var os=Ge=>{gc(Ge,{onClose:Zn,onSelectAutoQuality:()=>{Ar("auto"),Zn()}})};R(_s,Ge=>{n(Jr)&&Ge(os)})}b(bt,$t)});var Bn=L(Nr,2);Ye(Bn,bt=>O(Lr,bt),()=>n(Lr)),w(Bi),Ye(Bi,bt=>O(_o,bt),()=>n(_o)),D(()=>Me(Bi,"aria-label",ir)),mt("click",Bi,Nn,!0),mt("focusin",Bi,On,!0),b(t,Bi),F(),o()}et(["click"]);function np(t){let e="";return to(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),to(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),to(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),to(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),to(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),to(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),to(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),to(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),to(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),to(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),to(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),to(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),to(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),to(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),to(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),to(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),to(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),to(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),to(t.font)&&(e+=`--font:${t.font};`),to(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),to(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function to(t){return typeof t=="string"&&!t.includes(";")}import{debounceFn as hT}from"@vkontakte/videoplayer-shared/es2018";var _T=M('<div class="time-container s-8"><!></div>'),bT=M('<div class="player-wrapper s-8" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),$T={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%}.timeline.s-8{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-8{opacity:1}.time-container.s-8{bottom:8px;position:absolute;right:8px;z-index:var(--thumb-timer-z-index)}"};function $v(t,e){B(e,!0),Q(t,$T);let[i,o]=Ve(),r=()=>x(Z,"$scrubbingInProgress",i),a=()=>x(j,"$playerSize",i),l=()=>x(A,"$isPlaying$",i),d=()=>x(k,"$duration$",i),s=()=>x(z,"$positionWithScrubbing$",i),u=()=>x(T,"$playerPhase",i),m=()=>x(N,"$crashed$",i),f=()=>x(W,"$currentSubtitle$",i),p=()=>x(H,"$currentSubtitleCaptions$",i),$=()=>x(E,"$positionExact$",i),y=()=>x(Y,"$isLive$",i),_=()=>x(ae,"$isRewindableLive$",i),S=g(e,"outsideDuration",3,0),I=g(e,"videoContainer",15),{playerPhase:T,state:{crashed$:N,duration$:k,positionExact$:E,isPlaying$:A,currentSubtitle$:W,currentSubtitleCaptions$:H,positionWithScrubbing$:z,isLive$:Y,isRewindableLive$:ae},ui:{playerSize:j,controls:ne,scrubbingInProgress:Z},actions:{internal:{getVideoElement:we}}}=ve(),ue=8,re=q(!1),_e=ai({}),xe=q(!1),J=v(()=>!r()&&!n(xe)),Re=()=>{O(re,!0)},pe=()=>{O(re,!1)},P=hT(Ul,260);Ne(()=>{a(),P(we(),ne,_e,n(re))});let ze=v(()=>l()?jo(d()-s()):jo(isFinite(d())?d():S()));var Te=bT(),X=C(Te);Ya(X,{hideCursor:!1,get videoContainer(){return I()},set videoContainer(ke){I(ke)}});var ie=L(X,2);Ta(ie,()=>"slot",!1,(ke,Be)=>{Ji(ke,()=>({name:Ga}))});var Oe=L(ie,2);let De=v(()=>u()!=="thumb"||m());Ka(Oe,{get hidden(){return n(De)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var tt=L(Oe,2);{var U=ke=>{za(ke,{shifted:!1,get captions(){return p()},get position(){return $()},get playerSize(){return a()}})};R(tt,ke=>{f().value!=="off"&&n(J)&&ke(U)})}var Pe=L(tt,2);{var Ee=ke=>{var Be=_T(),Nt=C(Be);Vd(Nt,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(ze)}}),w(Be),b(ke,Be)};R(Pe,ke=>{n(J)&&ke(Ee)})}var He=L(Pe,2);let Xe;var ye=C(He);Ha(ye,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return _()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:ue,tooltipRightOffset:ue,get ref(){return _e.timeline},set ref(ke){_e.timeline=ke}}),w(He),w(Te),D(ke=>Xe=se(He,1,"timeline s-8",null,Xe,ke),[()=>({visible:n(re)})]),mt("mouseenter",Te,Re),mt("mouseleave",Te,pe),mt("mouseenter",He,()=>O(xe,!0)),mt("mouseleave",He,()=>O(xe,!1)),b(t,Te),F(),o()}var CT=M("<div><!></div>"),TT={hash:"s-3",code:'.vk-vp-root.s-3{--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-3{overflow:visible}.vk-vp-root.s-3 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-3 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-3 p{margin:0}.vk-vp-root.s-3 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-3 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-3 :focus,.vk-vp-root.s-3 :focus-visible{outline:none}.vk-vp-root.s-3 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-3 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-3 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-3 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-3 .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-3 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-3 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function xv(t,e){B(e,!0),Q(t,TT);let[i,o]=Ve(),r=()=>x(rt,"$isLive$",i),a=()=>x(Tt,"$availableSubtitlesList$",i),l=()=>x(We,"$isPreviewTrackHorizontallyAligned$",i),d=g(e,"sources",7),s=g(e,"store",7),u=g(e,"microStoresRoot",7),m=g(e,"videoConfig",7),f=g(e,"uiConfig",7),p=g(e,"title",7),$=g(e,"thumbUrl",7),y=g(e,"interactiveContainer",7),_=g(e,"interactiveController",7),S=g(e,"subtitles",7),I=g(e,"subtitlesForcedLanguage",7),T=g(e,"live",7),N=g(e,"preload",7),k=g(e,"autoplay",7),E=g(e,"volume",7,void 0),A=g(e,"muted",7,void 0),W=g(e,"fromTime",7),H=g(e,"canRewindLive",7),z=g(e,"showAds",7),Y=g(e,"adsSlotId",7,void 0),ae=g(e,"adsParams",7,void 0),j=g(e,"adsAutoplayParam",7,void 0),ne=g(e,"duration",7,void 0),Z=g(e,"logoClickable",7),we=g(e,"logoHidden",7),ue=g(e,"isMobile",7),re=g(e,"showNextPrevButtons",7,!1),_e=g(e,"nextButtonActive",7,!1),xe=g(e,"prevButtonActive",7,!1),J=g(e,"endScreenVideoTitle",7,void 0),Re=g(e,"endScreenVideoThumb",7,void 0),pe=g(e,"isOneVideoPlaylist",7,!1),P=g(e,"supportLink",7),ze=g(e,"shadowRootContainer",7),Te=g(e,"outerContainerRef",7),X=g(e,"fullScreenTarget",7,void 0),ie=g(e,"failoverHosts",7,void 0),Oe=g(e,"showMiniTimer",7,!1),De=g(e,"saveRate",7),tt=g(e,"seekToInteractive",7,Eb),U=g(e,"playPrevChapter",7,Eb),Pe=g(e,"volumeMultiplier",7),Ee=g(e,"showAutoplayNext",7),He=g(e,"showEndScreen",7,!0),Xe=g(e,"keyboardControls",15,void 0),{subscribers:ye,stores:ke}=u();wh(f());let Be=Lt(),Nt=f().logoLink,ut=s().ui.debugPanelVisible,Ot=s().ui.playerSize,rt=s().state.isLive$,Zt=s().state.isInteractive&&yv.device.isAndroid,Mt=q(void 0),$e=null,be=q(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{vsid:s().vsid}),Mh(s(),ke),Ne(()=>{var K,kt;s().ui.isMobile.set(ue()),(kt=(K=m().callbacks)==null?void 0:K.onDomReady)==null||kt.call(K)});let ee=(K=!1)=>{O(be,!0),K?s().actions.external.firstStart(z()):s().actions.internal.firstStart(z())},it=()=>{if(Be.features.qualityDetailsSubMenuEnabled){let K=i_(s().videoId);if(K)switch(K.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,K.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,K.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(K.quality);break}}else{o_(s().videoId),xf()&&s().actions.internal.setTrafficSavingEnabled(!0);let kt=bf(s().videoId);kt&&s().actions.internal.setQuality(kt)}};function fe(K){var qt,ot,Ni;let kt=d()||K;kt&&s().initVideo({container:n(Mt),sources:kt,failoverHosts:ie(),subtitles:S(),subtitlesForcedLanguage:I(),volumeMultiplier:Pe()});let si=xT.get(Sd)==="true";ut.set(si),W()>0&&s().actions.external.seekTime(W());let at=ue()?Be.volumeDefault:(ot=(qt=E())!=null?qt:gu())!=null?ot:Be.volumeDefault,xt=(Ni=A())!=null?Ni:jh();if(s().actions.external.setVolume(at),s().actions.external.setMuted(xt),s().getAdmanWrapper().setInitialVolume(xt?0:at),it(),Be.features.saveRate&&De()){let Oi=Jh();Oi&&!r()&&s().actions.internal.setPlaybackRate(Oi)}if(Ee()){let Oi=t_();Oi&&s().actions.internal.setAutoplayNextEnabled(Oi)}s().ui.isAutoplay.set(k()),k()&&ee(),N()&&Be.features.preload&&s().actions.internal.preload()}let Le=K=>{if(window.ResizeObserver){let kt,si;$e=new ResizeObserver(wT(at=>{let xt=at[0];if(xt.contentBoxSize){let qt=Array.isArray(xt.contentBoxSize)?xt.contentBoxSize[0]:xt.contentBoxSize;kt=qt.inlineSize,si=qt.blockSize}else xt.contentRect&&(kt=xt.contentRect.width,si=xt.contentRect.height);Ot.set({width:kt,height:si})},300)),$e.observe(K)}Ot.set({width:K.clientWidth,height:K.clientHeight})},_t=()=>{document.hidden&&s().actions.external.stop()};At(()=>{var si,at,xt,qt;Zt&&document.addEventListener("visibilitychange",_t),Be.debugLog&&s().actions.internal.startLogging(),Le(n(Mt));let K=ye.map(ot=>ot.init({store:s(),microStores:ke,config:m(),interactiveController:_(),uiConfig:f()})),kt=()=>{Zt&&document.removeEventListener("visibilitychange",_t),$e==null||$e.disconnect(),K.forEach(ot=>ot.unsubscribe()),s().destroy()};return((si=T())==null?void 0:si.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),kt):((at=T())==null?void 0:at.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),kt):(((xt=T())==null?void 0:xt.status)==="finished"||((qt=T())==null?void 0:qt.status)==="postlive")&&!(d()&&yT(d()))?(s().actions.internal.setLiveWaitingRecord(!0),kt):(fe(),kt)});function Et(){n(be)?s().actions.external.play():ee(!0)}function dt(){s().actions.external.pause()}function ce(K){s().actions.external.setMuted(K)}function Ue(){s().actions.external.toggleSubtitle()}function Qe(K,kt){s().actions.external.changeSubtitle(K,kt)}function st(K){s().actions.external.changeAudioStream(K)}function Dt(){var K;(K=s().webApi.slotsApi)!=null&&K.haveSlots()&&s().actions.external.hideControls()}function Bt(){var K;(K=s().webApi.slotsApi)!=null&&K.haveSlots()&&s().actions.external.showControls()}function ei(K){ue()||K>=0&&K<=1&&s().actions.external.setVolume(K)}function hi(K){s().actions.internal.seekTime(K,ST.UNKNOWN)}function Qi(K){s().actions.external.seekEpisodeStartTime(K)}function Vt(){s().actions.external.returnFocusToEpisodes()}function ui(K){s().actions.external.setPlaybackRate(K)}function fi(K){s().actions.external.setAutoQualityLimits(K)}function vt(){s().actions.external.setQuality("auto")}function Gt(K){s().actions.external.setTrafficSavingEnabled(K)}function $i(K){s().actions.external.setHighQualityEnabled(K)}let Gi=np(Be.view),jt=m().playerView==="preview",Tt=s().state.availableSubtitlesList$;if(Be.features.initSubtitles){let K=!1;Ne(()=>{var kt;if(!K&&a().length){K=!0;let si;if(Be.features.userVideoPrefs&&s().videoId){let xt=$u(Be.userSalt,String(s().videoId));xt!=null&&xt.subtitleTrackId&&(si=a().find(qt=>qt.value===xt.subtitleTrackId))}let at=(kt=I())!=null?kt:Sf();at&&(si=a().find(xt=>xt.language===at)),s().actions.internal.setSubtitle(si)}})}let We=s().ui.isPreviewTrackHorizontallyAligned;var yi=CT();let ho;var yo=C(yi);{var vn=K=>{bv(K,{get store(){return s()},get uiConfig(){return Be},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return k()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return Y()},get adsParams(){return ae()},get adsAutoplayParam(){return j()},get duration(){return ne()},get logoClickable(){return Z()},get logoHidden(){return we()},get logoTargetUrl(){return Nt},get nextButtonActive(){return _e()},get prevButtonActive(){return xe()},get endScreenVideoTitle(){return J()},get endScreenVideoThumb(){return Re()},get isOneVideoPlaylist(){return pe()},get supportLink(){return P()},get shadowRootContainer(){return ze()},get outerContainerRef(){return Te()},get fullScreenTarget(){return X()},get showMiniTimer(){return Oe()},get playerStarted(){return n(be)},get seekToInteractive(){return tt()},get playPrevChapter(){return U()},firstStart:ee,seekTime:hi,get showEndScreen(){return He()},get showAutoplayNext(){return Ee()},get showNextPrevButtons(){return re()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(Mt)},set videoContainer(kt){O(Mt,kt,!0)}})},St=K=>{var kt=Ae(),si=de(kt);{var at=qt=>{$v(qt,{get thumbUrl(){return $()},get outsideDuration(){return ne()},get canRewindLive(){return H()},get videoContainer(){return n(Mt)},set videoContainer(ot){O(Mt,ot,!0)}})},xt=qt=>{hv(qt,{get store(){return s()},get uiConfig(){return Be},get title(){return p()},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return k()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return Y()},get adsParams(){return ae()},get adsAutoplayParam(){return j()},get duration(){return ne()},get logoClickable(){return Z()},get logoHidden(){return we()},get logoTargetUrl(){return Nt},get nextButtonActive(){return _e()},get prevButtonActive(){return xe()},get endScreenVideoTitle(){return J()},get endScreenVideoThumb(){return Re()},get isOneVideoPlaylist(){return pe()},get supportLink(){return P()},get shadowRootContainer(){return ze()},get outerContainerRef(){return Te()},get fullScreenTarget(){return X()},get showMiniTimer(){return Oe()},get playerStarted(){return n(be)},get seekToInteractive(){return tt()},get playPrevChapter(){return U()},firstStart:ee,get showEndScreen(){return He()},get showAutoplayNext(){return Ee()},get showNextPrevButtons(){return re()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(Mt)},set videoContainer(ot){O(Mt,ot,!0)},get keyboardControls(){return Xe()},set keyboardControls(ot){Xe(ot)}})};R(si,qt=>{jt?qt(at):qt(xt,!1)})}b(K,kt)};R(yo,K=>{ue()?K(vn):K(St,!1)})}w(yi),D(K=>{ho=se(yi,1,"vk-vp-root s-3",null,ho,K),qe(yi,Gi)},[()=>({"root--miui-browser":yv.device.isMobile&&yv.browser.isMiuiBrowser,"visible-outside":jt,"preview-track-horizontally-alinged":l()})]),b(t,yi);var Ft=F({initVideo:fe,play:Et,pause:dt,setMuted:ce,toggleSubtitle:Ue,changeSubtitle:Qe,changeAudioStream:st,hideControls:Dt,showControls:Bt,setVolume:ei,seekTime:hi,seekEpisodeStartTime:Qi,returnFocusToEpisodes:Vt,setPlaybackRate:ui,setAutoQualityLimits:fi,setAutoQuality:vt,toggleTrafficSaving:Gt,toggleHighQuality:$i,get sources(){return d()},set sources(K){d(K)},get store(){return s()},set store(K){s(K)},get microStoresRoot(){return u()},set microStoresRoot(K){u(K)},get videoConfig(){return m()},set videoConfig(K){m(K)},get uiConfig(){return f()},set uiConfig(K){f(K)},get title(){return p()},set title(K){p(K)},get thumbUrl(){return $()},set thumbUrl(K){$(K)},get interactiveContainer(){return y()},set interactiveContainer(K){y(K)},get interactiveController(){return _()},set interactiveController(K){_(K)},get subtitles(){return S()},set subtitles(K){S(K)},get subtitlesForcedLanguage(){return I()},set subtitlesForcedLanguage(K){I(K)},get live(){return T()},set live(K){T(K)},get preload(){return N()},set preload(K){N(K)},get autoplay(){return k()},set autoplay(K){k(K)},get volume(){return E()},set volume(K){E(K)},get muted(){return A()},set muted(K){A(K)},get fromTime(){return W()},set fromTime(K){W(K)},get canRewindLive(){return H()},set canRewindLive(K){H(K)},get showAds(){return z()},set showAds(K){z(K)},get adsSlotId(){return Y()},set adsSlotId(K){Y(K)},get adsParams(){return ae()},set adsParams(K){ae(K)},get adsAutoplayParam(){return j()},set adsAutoplayParam(K){j(K)},get duration(){return ne()},set duration(K){ne(K)},get logoClickable(){return Z()},set logoClickable(K){Z(K)},get logoHidden(){return we()},set logoHidden(K){we(K)},get isMobile(){return ue()},set isMobile(K){ue(K)},get showNextPrevButtons(){return re()},set showNextPrevButtons(K){re(K)},get nextButtonActive(){return _e()},set nextButtonActive(K){_e(K)},get prevButtonActive(){return xe()},set prevButtonActive(K){xe(K)},get endScreenVideoTitle(){return J()},set endScreenVideoTitle(K){J(K)},get endScreenVideoThumb(){return Re()},set endScreenVideoThumb(K){Re(K)},get isOneVideoPlaylist(){return pe()},set isOneVideoPlaylist(K){pe(K)},get supportLink(){return P()},set supportLink(K){P(K)},get shadowRootContainer(){return ze()},set shadowRootContainer(K){ze(K)},get outerContainerRef(){return Te()},set outerContainerRef(K){Te(K)},get fullScreenTarget(){return X()},set fullScreenTarget(K){X(K)},get failoverHosts(){return ie()},set failoverHosts(K){ie(K)},get showMiniTimer(){return Oe()},set showMiniTimer(K){Oe(K)},get saveRate(){return De()},set saveRate(K){De(K)},get showAutoplayNext(){return Ee()},set showAutoplayNext(K){Ee(K)},get seekToInteractive(){return tt()},set seekToInteractive(K){tt(K)},get playPrevChapter(){return U()},set playPrevChapter(K){U(K)},get volumeMultiplier(){return Pe()},set volumeMultiplier(K){Pe(K)},get showEndScreen(){return He()},set showEndScreen(K){He(K)},get keyboardControls(){return Xe()},set keyboardControls(K){Xe(K)}});return o(),Ft}var IT=Ce('<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 wv(t,e){let i=g(e,"isWhite",3,!1),o=v(()=>i()?"#fff":"#909499");je(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(r,a)=>{var l=IT();li(9),b(r,l)},$$slots:{default:!0}})}var ET=M('<div class="title s-0"> </div>'),kT=M('<div class="playerStub s-0"><!> <!></div>'),PT={hash:"s-0",code:".playerStub.s-0{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-0{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 Sv(t,e){Q(t,PT);var i=kT(),o=C(i);{var r=d=>{var s=ET(),u=C(s,!0);w(s),D(()=>me(u,e.title)),b(d,s)};R(o,d=>{e.title&&d(r)})}var a=L(o,2);{var l=d=>{let s=v(()=>!!e.thumbUrl);wv(d,{get isWhite(){return n(s)}})};R(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}w(i),D(()=>qe(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}var AT=M('<div class="playerError s-1"><!></div>'),LT={hash:"s-1",code:".playerError.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%}"};function Cv(t){Q(t,LT);var e=AT(),i=C(e);Wa(i,{}),w(e),b(t,e)}import{now as sI,ValueSubject as aI}from"@vkontakte/videoplayer-shared/es2018";import{cloneDeepWith as lI,InterfaceLanguage as dI,isNonNullable as Av,Logger as cI,Observable as uI,Subscription as Nb,once as pI,InternalsExposure as fI,skip as mI,getPlayerId as vI}from"@vkontakte/videoplayer-shared/es2018";import{clientChecker as Ob,isMobile as gI}from"@vkontakte/videoplayer-core/es2018";import{OneStat as hI,ThinOneStat as _I,MediascopePixel as bI}from"@vkontakte/videoplayer-statistics/es2018";import{Logger as MT,Subscription as VT}from"@vkontakte/videoplayer-shared/es2018";var rp=class{constructor(){this.subscription=new VT,this.logger=new MT,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=ge(e.state.currentPlaybackRate$),r=ge(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 Iv,detectEmbed as FT}from"@vkontakte/videoplayer-shared/es2018";var RT=Ce('<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),NT=M('<div><div><!></div> <span class="title s-6"> </span></div>'),OT={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 Tv(t,e){B(e,!0),Q(t,OT);let[i,o]=Ve(),r=()=>x(u,"$interfaceLanguage$",i),a=()=>x(m,"$isMobile$",i),l=ve(),d=Lt(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,m=l.ui.isMobile,f=l.ui.t,p=v(()=>r()&&f("pip_dummy_title")),$=np(d.view);var y=NT();let _;var S=C(y);let I;var T=C(S);je(T,{width:"57",height:"56",testId:"pip-dummy-icon",children:(E,A)=>{var W=RT();li(),b(E,W)},$$slots:{default:!0}}),w(S);var N=L(S,2),k=C(N,!0);w(N),w(y),D((E,A)=>{_=se(y,1,"player-pip-dummy s-6",null,_,E),qe(y,$),I=se(S,1,"dummy-image s-6",null,I,A),me(k,n(p))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),b(t,y),F(),o()}var DT=Object.defineProperty,BT=(t,e,i)=>e in t?DT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,ql=(t,e,i)=>BT(t,typeof e!="symbol"?e+"":e,i),HT=460,UT=280,bc=class{constructor({enabled:e=!0}={enabled:!0}){ql(this,"playerDomElement"),ql(this,"playerParentShadowRoot"),ql(this,"playerDummyElement"),ql(this,"svelteContext"),ql(this,"pipWindow"),ql(this,"info",{isActive$:new Iv(!1),isEnabled$:new Iv(!1),type:1}),this.info.isEnabled$=new Iv(e)}isSupported(){let{isEmbed:e}=FT();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}async request(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=await documentPictureInPicture.requestWindow({width:HT,height:UT,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(`
|
|
63
|
-
`),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=qr(Tv,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||(Ca(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})}async exit(){return new Promise(e=>{var i;this.pipWindow&&((i=documentPictureInPicture.window)==null||i.close()),e()})}async dispose(){await this.exit()}setEnabled(e){this.info.isEnabled$.next(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 kb(t){return t instanceof bc}var sp=class{static getLatestSupportedVersion(e){let i=new Pa(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 Pb="Inner error. Unexpectedly root annotation container null reference exception",Ab="Annotation with such name already exists",Lb="Annotation with such name does not exist";var Ql=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as zT,Subscription as WT,throttleFn as KT}from"@vkontakte/videoplayer-shared/es2018";var qT="1",QT=100,ap=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new WT}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=KT(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},QT);this.subscriptions.add(zT(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 Ql(Pb);if(this.annotations.has(e))throw new Ql(Ab);i.style.zIndex=(o=i.style.zIndex)!=null?o:qT,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 Ql(Lb);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 lp,Subscription as GT}from"@vkontakte/videoplayer-shared/es2018";var mn=class{init({store:e,microStores:i,interactiveController:o,config:r}){return lp(e),lp(i),lp(r),r.interactiveData&&lp(o),this.subscription=new GT,this.subscription}};var yc=class extends mn{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$={...le(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 mn{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$={...le(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,f=ge(m),p=()=>f&&ge(u);return o.add(u.subscribe($=>{if(!f)return;let y=ge(l);ge(s)?this.state$.set($):y!==null&&this.state$.set(!y||$)})),o.add(s.subscribe($=>{this.state$.set(!$||p())})),o.add(l.subscribe($=>{if($===null)return;let y=ge(d);if(p()){this.state$.set(!0);return}y&&this.state$.set(!$)})),o}};var wc=class extends mn{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=le("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 YT}from"@vkontakte/videoplayer-shared/es2018";var Ev=le(!1),dp=null,Sc=class extends mn{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$={...Ev,set:(i,o=!1)=>{i!==ge(Ev)&&(this.clearTimeout(),Ev.set(i),!i&&dp&&(dp=!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(f=>{ge(l)&&f&&this.state$.set(!1)}));let m=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(YT({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:f,isInteractiveTime$:p,interactiveTimeIndicator:$})=>{var y,_;if(!(!f||!($!=null&&$.isDisplayed))){if(!p)return this.state$.set(!1);m.tooltipHelpHintActive&&dp===null&&(dp=!0,m.tooltipHelpHintActive=!1,this.state$.set(!0),(_=(y=r.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||_.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as jT,noop as XT}from"@vkontakte/videoplayer-shared/es2018";var Cc=class extends mn{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$={...le(null),toggle:XT};this.checkIfShouldHide=i=>ks(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=async()=>{if(this.checkIfShouldHide(ge(l)))return;let s=ge(this.state$),{isEnded$:u,playbackState$:m}=r.state,{disabledControls$:f}=r.ui.controls,p=ge(u),$=ge(m);if(s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1),f.remove(uf),!p&&this.graphMadePause&&r.actions.internal.play()}catch(y){d({message:"Cant hide graph"})}else{this.graphMadePause=$==="playing";try{await(a==null?void 0:a.toggleGraphView(!0)),this.state$.set(!0),f.add(uf),!p&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}},o.add(jT({graphIsOpened:this.state$,currentGridType:l}).subscribe(async({graphIsOpened:s,currentGridType:u})=>{if(this.checkIfShouldHide(u)&&s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1)}catch(f){d({message:"Cant hide graph"})}})),o}};import{ValueSubject as Mb}from"@vkontakte/videoplayer-shared/es2018";var Tc=class extends mn{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:le(!1),isEnabled$:le(!1),type$:le(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 Mb(!1),isEnabled$:new Mb(!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 eI,filterChanged as tI}from"@vkontakte/videoplayer-shared/es2018";import{safeStorage as kv}from"@vkontakte/videoplayer-shared/es2018";var Vb=({maxShowCount:t,timeout:e})=>{let i=[t!==0?ZT({maxCount:t}):void 0,e!==0?JT({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},ZT=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,kv.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}}},JT=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(kv.get(e)||"{}")}catch(a){return{}}},o=a=>kv.set(e,JSON.stringify(a)),r=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o({...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 mn{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:le({}),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=Vb({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe(tI(),eI(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 Rb=()=>[yc,xc,wc,Sc,Cc,Tc,Ic].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:{...e,[o.stateName]:o.state$}}},{subscribers:[],stores:{}});import{devNull as Ec}from"@vkontakte/videoplayer-shared/es2018";var cp=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 up=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 cp(()=>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=M('<div class="root s-2"><!></div>'),oI={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 Pv(t,e){B(e,!0),Q(t,oI);let i=null,o=q(null);Ne(()=>(n(o)&&(i=window.setTimeout(()=>{O(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function r(s){e.playbackStatusShow&&O(o,s?"prev":"next",!0)}var a=Ae(),l=de(a);{var d=s=>{var u=Ae(),m=de(u);Ss(m,()=>n(o),f=>{var p=iI(),$=C(p);let y=v(()=>n(o)==="prev");hc($,{get duration(){return e.animationDuration},get Icon(){return na},get reversed(){return n(y)}}),w(p),b(f,p)}),b(s,u)};R(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return b(t,a),F({startVideoChangedAnimation:r})}var nI=Object.defineProperty,rI=(t,e,i)=>e in t?nI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Yt=(t,e,i)=>rI(t,typeof e!="symbol"?e+"":e,i),$I={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:dI.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:gI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},jn=q(void 0),Lv=ai({animationDuration:0,playbackStatusShow:!1}),pp=class extends HTMLElement{constructor(){super(),Yt(this,"svelteStubComponent"),Yt(this,"svelteRootComponent"),Yt(this,"sveltePersistentLayerComponent"),Yt(this,"svelteErrorComponent"),Yt(this,"store"),Yt(this,"microStoresRoot"),Yt(this,"statistics"),Yt(this,"sentry"),Yt(this,"_shadowRoot"),Yt(this,"playerContainer"),Yt(this,"rootContainer"),Yt(this,"stateContainer"),Yt(this,"shadowRootContainer"),Yt(this,"playerId"),Yt(this,"uiConfig"),Yt(this,"coreConfig"),Yt(this,"statisticsConfig"),Yt(this,"interactiveController"),Yt(this,"interactiveContainer"),Yt(this,"graphMadePause"),Yt(this,"currentPlayingVideoIndex",0),Yt(this,"needToRepeatPlaylist",!1),Yt(this,"videoConfig"),Yt(this,"pictureInPictureApi"),Yt(this,"mediaSessionApi"),Yt(this,"unsubscribePlayerPhaseSubscription"),Yt(this,"logger"),Yt(this,"log"),Yt(this,"subscription"),Yt(this,"interactiveSubscription"),Yt(this,"annotationsApi"),Yt(this,"slotsApi"),Yt(this,"focusManager"),Yt(this,"prevIsid"),Yt(this,"isInited",!1),Yt(this,"postponedInitParams",null),Yt(this,"internalsExposure",null),Yt(this,"shadowDOMCallbacksDisabled",!1),Yt(this,"fatalError$",new aI(null)),Yt(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:m,statVKAppId:f,refreshStatAuthToken:p,autoplay:$,isMobile:y,isTouch:_,refDomain:S,deviceId:I,interactiveData:T}=$c(this.videoConfig,i),N=(o=T==null?void 0:T.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:E,isClip:A=!1}=e;if(this.uiConfig.features.statistics&&E)try{return new hI({movieId:E,albumId:d,place:s,trackCode:m,vkAppId:f,autoplay:(l=$&&!this.interactiveController)!=null?l:!1,mobile:_!=null?_:y,clip:A,refDomain:S,deviceId:I,isPreviewPlayerView:this.videoConfig.playerView==="preview",...N&&(!this.isInited||k)&&{projectId:Number(N)}},{refreshAuthToken:p,userSalt:u,config:this.statisticsConfig,...this.interactiveController&&{useIsid:!0,isid:this.prevIsid}})}catch(H){console.error(H),this.log({message:H.message})}}),Ec.create("ui"),this.logger=new cI,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Nb,this.interactiveSubscription=new Nb,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=qr(Cv,{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=ai({title:o,thumbUrl:r}),l={target:this.playerContainer,props:a};this.svelteStubComponent=qr(Sv,l),this.sveltePersistentLayerComponent=qr(Pv,{target:this.playerContainer,props:Lv}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;Lv.animationDuration=e,Lv.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 _I.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,f,p,$;if(!this.videoConfig)return;let{albumId:y,statPlace:_,statAuthToken:S,preload:I,autoplay:T,volume:N,muted:k,fromTime:E,canRewindLive:A,supportLink:W,showAds:H,adsSlotId:z,adsParams:Y={},adsAutoplayParam:ae,interfaceLanguage:j,isCyrillicRelatedInterface:ne,logoClickable:Z,logoHidden:we,isMobile:ue,isTouch:re,isAudioDisabled:_e,isLiveCatchUpMode:xe,fullScreenTarget:J,failoverHosts:Re,canDownload:pe,callbacks:P,interactiveData:ze,showThumbTimer:Te,additionalButtons:X=[],additionalSettingsMenuItems:ie=[],additionalContextMenuItems:Oe=[],repeat:De,loop:tt,saveRate:U,volumeMultiplier:Pe,showEndScreen:Ee,showAutoplayNext:He,mediascopePixels:Xe}=$c(this.videoConfig,i),{sources:ye,title:ke,thumbUrl:Be,unitedVideoId:Nt,isClip:ut=!1,duration:Ot,adsParams:rt={},videoEpisodes:wt,previewThumbsData:Zt,subtitles:Mt,subtitlesForcedLanguage:$e,live:be,adsExternalApi:ee}=e;if(!ye&&!be){let ui=new Error("empty sources and live");this.fatalError$.next(ui),(r=P.onCrashed)==null||r.call(P,ui.message);return}let it={...Y,...rt},fe=this.getNextVideoInfo(),Le={sources:ye,title:ke,thumbUrl:Be,subtitles:Mt,subtitlesForcedLanguage:$e,unitedVideoId:Nt,isClip:ut,live:be,albumId:y,statPlace:_,autoplay:T,muted:k,volume:N,fromTime:E,canRewindLive:A,showAds:H,adsSlotId:z,adsParams:it,adsAutoplayParam:ae,duration:Ot,logoClickable:Z,logoHidden:we,isTouch:re!=null?re:ue,repeat:De,loop:tt,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:fe.nextVideoTitle,endScreenVideoThumb:fe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},_t={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(Le)}`});let Et=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),dt=(Et==null?void 0:Et.oneStat)||this.createOneStat(e,i),ce=this.createThinOneStat(e,i),Ue;Xe&&(Ue=new bI({pixels:Xe})),(dt||ce)&&(this.statistics=new Wu(dt,ce,Ue,Et==null?void 0:Et.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new ka(this.uiConfig.sentry,{version:kl,env:fu},{movieId:Nt,albumId:y,place:_,autoplay:(l=T&&!this.interactiveController)!=null?l:!1,mobile:re!=null?re:ue,clip:ut}),this.interactiveController&&((u=this.prevIsid)!=null||(this.prevIsid=(s=(d=this.statistics)==null?void 0:d.oneStat)==null?void 0:s.isid$.getValue())),this.sentry={...this.sentry,...ka.getInstance()};let st=!!ze,Dt=[],Bt="tooltip_interactive_go_back_disabled_first";if(st&&this.interactiveController){let ui=this.interactiveController.state.isInitialChapter$.getValue(),fi=this.interactiveController.getHistoryState();ui&&Dt.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Dt.push("SEEK_TO_INTERACTIVE_BUTTON"),fi.hasPrevChapter$.getValue()||(Dt.push("PLAY_PREV_CHAPTER_BUTTON"),ui||(fi.isGoBackLimited$.getValue()?Bt="tooltip_interactive_go_back_disabled_limit":Bt="tooltip_interactive_go_back_disabled"))}let ei=()=>{var ui;this.isInited=!1,this.prevIsid=void 0;let fi=(o==null?void 0:o.info.isEnded$.getValue())&&((ui=this.interactiveController)==null?void 0:ui.state.isEndChapter$.getValue());P.onReplayInteractiveVideo&&!fi?P.onReplayInteractiveVideo():this.replayInteractiveVideo()},hi=De&&this.videoConfig.videos.length===1;this.store=q_({player:o,interfaceLanguage:j,isCyrillicRelatedInterface:ne,videoId:Nt,isClip:ut,isLiveCatchUpMode:xe,isAudioDisabled:_e,statAuthToken:S,callbacks:P,webApi:_t,videoEpisodes:wt,previewThumbsData:Zt,canDownload:pe,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:Dt,isInteractive:st,saveRate:U,interactiveRanges$:(m=this.interactiveController)==null?void 0:m.state.interactiveRanges$,isInteractiveTime$:(f=this.interactiveController)==null?void 0:f.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:ei,playPrevChapterDisabledTooltip:Bt,hasInteractiveBranches:!!(($=(p=this.interactiveController)==null?void 0:p.getChapterBranches())!=null&&$.length),additionalButtons:this.uiConfig.features.additionalButtons?X:[],additionalSettingsMenuItems:ie!=null?ie:[],additionalContextMenuItems:Oe!=null?Oe:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:ui=>{var fi;return(fi=this.sveltePersistentLayerComponent)==null?void 0:fi.startVideoChangedAnimation(ui)},looped:this.uiConfig.features.useLoopSetting?tt:hi,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId});let{stores:Qi}=this.microStoresRoot=Rb(),Vt=()=>{var ui,fi,vt,Gt,$i,Gi;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(Tt=>{var We;return(We=P==null?void 0:P.onCurrentFormatChanged)==null?void 0:We.call(P,Tt)})),this.subscription.add(Qi.interactiveControlsOpacity$.subscribe(Tt=>{var We;Tt!==null&&((We=this==null?void 0:this.interactiveController)==null||We.setDisabledControls(Tt))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(Tt=>{var We;return(We=P==null?void 0:P.onThroughputEstimationChanged)==null?void 0:We.call(P,Tt)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(Tt=>{var We;return(We=P==null?void 0:P.onTrafficSavingEnabledChanged)==null?void 0:We.call(P,Tt)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(Tt=>{var We;return(We=P==null?void 0:P.onHighQualityEnabledChanged)==null?void 0:We.call(P,Tt)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(Tt=>{var We;return(We=P==null?void 0:P.onAutoQualityEnabledChanged)==null?void 0:We.call(P,!!Tt)})),this.subscription.add(new uI(Tt=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(We=>Tt.next(We)))}).pipe(mI(1)).subscribe(Tt=>{var We;return(We=P==null?void 0:P.onCurrentPlaybackRateChanged)==null?void 0:We.call(P,Tt)})),this.subscription.add(this.store.state.volume$.subscribe(Tt=>{var We;return(We=P==null?void 0:P.onVolumeChange)==null?void 0:We.call(P,Tt)})),this.subscription.add(this.store.state.muted$.subscribe(Tt=>{var We,yi,ho,yo;if(Tt)(We=P==null?void 0:P.onMute)==null||We.call(P);else{let vn=(ho=((yi=this.store)==null?void 0:yi.state.volume$)&&ge(this.store.state.volume$))!=null?ho:0;(yo=P==null?void 0:P.onUnmute)==null||yo.call(P,vn)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(Tt=>{var We;return(We=P==null?void 0:P.onVideoBitrateChanged)==null?void 0:We.call(P,Tt)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(Tt=>{var We;let yi=(We=this.store)==null?void 0:We.ui.controls.disabledControls$;yi&&(Tt&&!yi.includes(Cd)&&yi.add(Cd),Tt||yi.remove(Cd))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(async Tt=>{var We;if(!Ob.browser.isSamsungBrowser||!Tt||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&await this.replayInteractiveChapter((We=this.videoConfig)==null?void 0:We.callbacks.onExternalFullscreenExit)})),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(Tt=>{var We;return(We=P==null?void 0:P.onVSIDChanged)==null?void 0:We.call(P,Tt)})),this.initMediaSession(),O(jn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:ye,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:ke,thumbUrl:Be,subtitles:Mt,subtitlesForcedLanguage:$e,live:be,preload:I,autoplay:T,muted:k,volume:N,fromTime:E,canRewindLive:A,supportLink:W,showAds:H,adsSlotId:z,adsParams:it,adsAutoplayParam:ae,duration:Ot,logoClickable:Z,logoHidden:we,isMobile:re!=null?re:ue,failoverHosts:Re,fullScreenTarget:J,saveRate:U,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Te,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:fe.nextVideoTitle,endScreenVideoThumb:fe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:Pe,showEndScreen:Ee,showAutoplayNext:He,adsExternalApi:ee},!0);let jt={target:this.playerContainer,props:n(jn)};this.svelteRootComponent=qr(xv,jt),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(vt=(fi=(ui=this.videoConfig)==null?void 0:ui.callbacks)==null?void 0:fi.onInited)==null||vt.call(fi)),(Gt=this.internalsExposure)==null||Gt.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=($i=this.videoConfig)==null?void 0:$i.callbacks)!=null&&Gi.onDevNullLog)?Ec.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Ec.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Ob.isInited$.subscribe(ui=>{ui&&(console.log("UI SDK async start"),Vt())}):Vt()}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.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&&Av(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)}async initInteractives(){var e,i,o,r,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=await import("@vkontakte/videoplayer-interactive/es2018");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let s=(i=this.store)==null?void 0:i.interfaceLanguage$,u=s?ge(s):this.videoConfig.interfaceLanguage,{projectInfo:m,initChapterId:f,historyApi:p,videoLoader:$}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:m,initChapterId:f,historyApi:p,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$:_}=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 S=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(I=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]={...I.config,title:(m==null?void 0:m.title)||I.config.title};let T=S?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(I.player,T),S&&(S=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:I,actionType:T})=>{var N,k,E,A,W,H;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(Td)),I==="action-choice-canceled"){let Y=ge(this.store.state.isPlaying$)||z;if(((E=(N=this.videoConfig)==null?void 0:N.isTouch)!=null?E:(k=this.videoConfig)!=null&&k.isMobile)&&Y){this.store.ui.interactiveHideMobileControls.set(!0);return}(H=(A=this.videoConfig)==null?void 0:(W=A.callbacks).onDisabledInteractiveClick)==null||H.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(Td)})),await 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(T=>{var N,k,E;T.length&&((E=(k=(N=this.videoConfig)==null?void 0:N.callbacks)==null?void 0:k.onInteractiveHistoryChanged)==null||E.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,N,k;(k=(T=this.videoConfig)==null?void 0:(N=T.callbacks).onInteractiveChapterChanged)==null||k.call(N,I.chapter,I.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var I,T,N,k;(I=this.microStoresRoot)==null||I.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(k=(T=this.videoConfig)==null?void 0:(N=T.callbacks).onInteractiveTimeIndicatorClick)==null||k.call(N)})),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,f,p,$,y,_,S,I,T,N,k,E,A,W,H,z,Y,ae;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let j=new Error("empty videos");this.fatalError$.next(j),(r=(o=e.callbacks)==null?void 0:o.onCrashed)==null||r.call(o,j.message);return}else this.fatalError$.next(null);if(this.videoConfig=$c($I,lI(e,j=>j instanceof HTMLElement?j:void 0)),this.playerId=vI(e.playerId),this.uiConfig=xh((a=i.ui)!=null?a:{}),this.updatePersistentLayerProps(),this.coreConfig=(l=i.core)!=null?l:{configName:[]},this.statisticsConfig=(d=i.statistics)!=null?d:{},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.sentry={config:(s=this.uiConfig.sentry)!=null?s:{}},this.uiConfig.features.exposeInternalsToGlobal&&((u=this.internalsExposure)!=null||(this.internalsExposure=new fI("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:[sI()]}),Av(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(p=(f=this.uiConfig.features.mediaSession)!=null?f:this.videoConfig.isMediaSessionEnabled)!=null?p:!0),Av(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(y=($=this.uiConfig.features.pip)!=null?$:this.videoConfig.isPictureInPictureEnabled)!=null?y:!0,this.uiConfig.features.dpip=(S=(_=this.uiConfig.features.dpip)!=null?_:this.videoConfig.isPictureInPictureEnabled)!=null?S:!0),this.uiConfig.ads.paramsOverride={preview:(I=this.uiConfig.ads.preview)!=null?I:this.videoConfig.adsPreviewParam,...this.uiConfig.ads.paramsOverride},this.videoConfig.isTouch=(N=(T=this.uiConfig.isMobile)!=null?T:this.videoConfig.isTouch)!=null?N:this.videoConfig.isMobile,(k=this.videoConfig).autoplay&&(k.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(E=this.uiConfig.ads.enable)!=null?E:this.videoConfig.showAds,this.videoConfig.adsSlotId=(A=this.uiConfig.ads.slot)!=null?A:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((W=this.uiConfig.showLogo)!=null?W:!this.videoConfig.logoHidden),(H=this.videoConfig).canRewindLive&&(H.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(z=this.videoConfig.supportLink)!=null?z: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&&((Y=this.videoConfig.videos)!=null&&Y[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let j={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=sp.getLatestSupportedVersion(j):this.pictureInPictureApi=new Pa(j)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new rp:void 0,this.slotsApi=this.uiConfig.features.slots?new tp:void 0,this.annotationsApi=this.uiConfig.features.annotations?new ap(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new up(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]),kb(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(ae=this.slotsApi)==null||ae.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(jn)&&(n(jn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(jn).nextButtonActive=this.isNextButtonActive(),n(jn).prevButtonActive=this.isPrevButtonActive(),n(jn).endScreenVideoTitle=o.nextVideoTitle,n(jn).endScreenVideoThumb=o.nextVideoThumb,n(jn).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}={...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(jn)&&(n(jn).needToRepeatPlaylist=this.needToRepeatPlaylist,n(jn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(jn).nextButtonActive=this.isNextButtonActive(),n(jn).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)}async setLanguage(e){var i;await((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()}async replayInteractiveChapter(e){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let r=ge(this.store.state.positionExact$),l=ge(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe(pI()).subscribe(()=>{l&&r>=l.time?this.seekTime(l.time):this.seekTime(r),e==null||e()});let d=this.interactiveController.getCurrentChapter();await 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&&Ca(e)}};import{InterfaceLanguage as hoe,VKNumericLanguage as _oe,loadVKLangPack as boe}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as yoe,VideoFormat as xoe}from"@vkontakte/videoplayer-core/es2018";var doe=()=>{window.customElements.define("vk-video-player",pp)};export{Ku as ControlButtonType,ps as GridTypes,hoe as InterfaceLanguage,Dd as MenuItemType,fs as PlayerPhase,kl as VERSION,_oe as VKNumericLanguage,xoe as VideoFormat,yoe as VideoQuality,boe as loadVKLangPack,doe as registerPlayerWebComponent};
|
|
60
|
+
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`)),b(v,p)};R(d,v=>{e.type==="off"?v(s):v(u,!1)})}b(r,l)},$$slots:{default:!0}}),F()}function im(t,e){B(e,!0);let i=h(e,"isSubtitlesEnabled",3,!1),r=ve().ui.t,a=m(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));Wt(t,{testId:"btn-Subtitles",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return ls.KeyC},role:"button",children:(l,d)=>{let s=m(()=>i()?void 0:"outline");la(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),F()}var I0=M('<span class="duration s-22" data-testid="video_duration"> </span>'),E0=M('<div><span class="current s-22" data-testid="current_time"> </span> <!></div>'),k0={hash:"s-22",code:'.time.s-22{align-items:center;color:var(--controls-time);display:flex;font-variant-numeric:tabular-nums;font-weight:500;padding:12px 6px}.time.mobile.s-22{padding:0 0 0 8px}.current.s-22{position:relative}.duration.s-22{opacity:.7}.duration.s-22:before{content:" / ";white-space:pre}'};function Wd(t,e){B(e,!0),q(t,k0);let i=h(e,"isMobile",3,!1),o=h(e,"isHidden",3,!1),r=h(e,"showDuration",3,!0),a=h(e,"ref",15),l=Lt(),d=ae(!1),s=m(()=>Xo(e.duration)),u=m(()=>Xo(e.position));var v=E0();let p;var f=T(v),$=T(f,!0);S(f);var y=L(f,2);{var g=w=>{var C=I0(),I=T(C,!0);S(C),D(()=>me(I,n(s))),b(w,C)};R(y,w=>{r()&&w(g)})}S(v),Es(v,()=>Pl(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),Ye(v,w=>a(w),()=>a()),D(w=>{p=se(v,1,"time s-22",null,p,w),me($,n(u))},[()=>({mobile:i()})]),b(t,v),F()}import{noop as Bu}from"@vkontakte/videoplayer-shared/es2018";var P0=Ce("<path></path>");function da(t,e){B(e,!0);let i=h(e,"volume",3,1),o=h(e,"muted",3,!1),r=(p,f)=>f?"off":p>.5?"max":p>.2?"mid":p>0?"min":"off",a=m(()=>r(i(),o())),l=m(()=>ln(e.size)),d="M4 19.9a2 2 90 011.88-2l5.68-.32a4 4 90 002.5-1.08l8.58-8a2 2 90 013.36 1.44v28.12a2 2 90 01-3.36 1.46l-8.58-8.02a4 4 90 00-2.52-1.08l-5.66-.32a2 2 90 01-1.88-2z",s="M44.92 16.52a1.8 1.8 90 012.56 2.56L42.54 24l4.94 4.92a1.8 1.8 90 11-2.56 2.56L40 26.54l-4.92 4.94a1.8 1.8 90 01-2.56-2.56L37.46 24l-4.94-4.92a1.8 1.8 90 112.56-2.56L40 21.46z",u="M31.5 17.8a1.8 1.8 90 012.54-.14A8.6 8.6 90 0136.8 24c0 2.52-1.06 4.8-2.76 6.34a1.8 1.8 90 11-2.4-2.68c.92-.84 1.56-2.16 1.56-3.66s-.64-2.8-1.58-3.66a1.8 1.8 90 01-.12-2.54",v="M37.62 13.34a1.8 1.8 90 012.54.2 16 16 90 010 20.9 1.8 1.8 90 01-2.74-2.32 12.4 12.4 90 000-16.24 1.8 1.8 90 01.2-2.54";je(t,{get width(){return"48"},get height(){return"48"},get style(){return n(l)},get testId(){var p;return`volume-${(p=n(a))!=null?p:""}-icon`},get shadow(){return e.shadow},children:(p,f)=>{var $=P0();D(()=>Me($,"d",`M4 19.9a2 2 90 011.88-2l5.68-.32a4 4 90 002.5-1.08l8.58-8a2 2 90 013.36 1.44v28.12a2 2 90 01-3.36 1.46l-8.58-8.02a4 4 90 00-2.52-1.08l-5.66-.32a2 2 90 01-1.88-2z${n(a)==="off"?s:`${u}${n(a)==="max"?v:""}`}`)),b(p,$)},$$slots:{default:!0}}),F()}import{isNonNullable as O_,noop as qn}from"@vkontakte/videoplayer-shared/es2018";import{noop as nm}from"@vkontakte/videoplayer-shared/es2018";import{noop as L0}from"@vkontakte/videoplayer-shared/es2018";var A0=M('<div class="overlay"><!></div>');function om(t,e){B(e,!0);let[i,o]=Ve(),r=()=>x(l,"$overlayContainer$",i),l=ve().ui.overlayContainer$,d=W(void 0),s=f=>{!f||!n(d)||!f.contains(n(d))||f.removeChild(n(d))},u=f=>{!f||!n(d)||f.contains(n(d))||f.appendChild(n(d))};Ne(()=>{u(r())}),At(()=>(u(r()),()=>s(r())));var v=A0(),p=T(v);ii(p,()=>{var f;return(f=e.children)!=null?f:mt}),S(v),Ye(v,f=>O(d,f),()=>n(d)),b(t,v),F(),o()}var M0=M('<div class="tooltip s-1p"><div class="content s-1p"> </div> <div class="tooltip-pointer s-1p"></div></div>'),V0=M("<div><!></div> <!>",1),R0={hash:"s-1p",code:'.tooltip-wrapper.s-1p{display:flex;flex-direction:column;min-width:0}.full-width.s-1p{width:100%}.tooltip.s-1p{bottom:100%;left:0;opacity:0;position:absolute;transition:opacity .2s,visibility .2s;visibility:hidden}.content.s-1p{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.tooltip-pointer.s-1p{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,R0);let[i,o]=Ve(),r=()=>x(Y,"$overlayContainer$",i),a=()=>x(z,"$containerSize",i),l=h(e,"isMobile",3,!1),d=h(e,"content",3,""),s=h(e,"active",15,!1),u=h(e,"translateX",3,0),v=h(e,"translateY",3,0),p=h(e,"isFullWidthWrapper",3,!1),f=h(e,"maxTooltipWidth",3,void 0),$=h(e,"placement",3,"top"),y=h(e,"onVisibilityChange",3,L0),g=5,w=W(void 0),C=W(void 0),I,N=W(0),k=W(0),E=W(0),A=W(0),Q=Lt(),H=ve(),z=H.ui.playerSize,Y=H.ui.overlayContainer$;Ne(()=>{Tt(()=>{y()(s())})});let le=H.getLogger().createComponentLog("Tooltip component"),X=()=>{if(!r()||!n(C)||!n(w))return;O(k,g);let U=r().getBoundingClientRect(),Pe=n(w).getBoundingClientRect(),Ee=Pe.width,Ue=n(C).clientWidth,Ze=a().width,ye=(Ee-Ue)/2,ke=Pe.left+u()-U.left,Be=ke+ye,Nt=Pe.top+v()-U.top,pt=Ue/2-g,Ot=Be<8,st=Be+Ue>Ze-8;Ot&&(Be=8,pt=ke+Pe.width/2-2.5*g),st&&(Be=Ze-8-Ue,pt=Pe.left-U.left+Pe.width/2-Be-g),O(E,Be,!0),O(A,Nt),O(N,pt,!0)},re=()=>{!r()||!n(C)||!n(w)||O(k,-g)},Z=()=>{if(!r()||!n(C)||!n(w))return;O(N,g);let U=r().getBoundingClientRect(),Pe=n(w).getBoundingClientRect(),Ee=Pe.height,Ue=n(C).clientHeight,Ze=(Ee-Ue)/2+Ue,ye=Pe.left+u()-U.left-n(C).clientWidth,ke=2,Be=ye-g;Be<8&&(Be=8);let pt=Pe.top+v()-U.top+Ze,Ot=ke-Ze/2,st=ke-g;O(E,Be,!0),O(A,pt),O(k,Ot),O(N,st)},we=()=>{!r()||!n(C)||!n(w)||O(N,-g)},ue=()=>{switch($()){case"top":X();break;case"bottom":re();break;case"left":Z();break;default:we()}},ne=()=>{try{if(!r()||!n(w))return;ue(),s(!0)}catch(U){le({message:String(U)})}},_e=()=>{s(!1)},xe=()=>{n(C)&&(I||(I=window.setTimeout(ne,Q.controls.hideTimeoutTooltips)),s()&&ne())},J=()=>{_e(),window.clearTimeout(I),I=void 0},Re=(U,Pe,Ee)=>{let Ue="";switch($()){case"top":Ue=`transform: translate(${U}px, ${Pe}px);`;break;case"bottom":Ue=`transform: translate(${U}px, ${Pe}px); top: auto; bottom: 100%;`;break;case"left":Ue=`transform: translate(${U}px, ${Pe}px); left: 0; right: auto;`;break;default:Ue=`transform: translate(${U}px, ${Pe}px);`}return Ue+=` max-width: ${f()===void 0?"auto":`${f()}px`};`,Ue+=` opacity: ${Ee?1:0}; visibility: ${Ee?"visible":"hidden"}`,Ue},pe=(U,Pe)=>{let Ee="";switch($()){case"top":Ee=`transform: translate(${U}px, ${Pe}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":Ee=`transform: translate(${U}px, ${Pe}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":Ee=`transform: translate(${U}px, ${Pe}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:Ee=`transform: translate(${U}px, ${Pe}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return Ee},P=m(()=>Re(n(E),n(A),s())),We=m(()=>pe(n(N),n(k)));At(ue),an(()=>window.clearTimeout(I));var Te=V0(),j=de(Te);let ie;j.__pointermove=xe,j.__pointerdown=J,j.__pointerup=function(...U){var Pe;(Pe=e.disableMouseupTooltipShow?void 0:xe)==null||Pe.apply(this,U)};var Oe=T(j);ii(Oe,()=>{var U;return(U=e.children)!=null?U:mt}),S(j),Ye(j,U=>O(w,U),()=>n(w));var De=L(j,2);{var tt=U=>{om(U,{children:(Pe,Ee)=>{var Ue=M0(),Ze=T(Ue),ye=T(Ze,!0);S(Ze);var ke=L(Ze,2);S(Ue),Ye(Ue,Be=>O(C,Be),()=>n(C)),D(()=>{qe(Ue,n(P)),me(ye,d()),qe(ke,n(We))}),b(Pe,Ue)},$$slots:{default:!0}})};R(De,U=>{d()&&!l()&&U(tt)})}D(U=>ie=se(j,1,"tooltip-wrapper s-1p",null,ie,U),[()=>({"full-width":p()})]),rt("pointerenter",j,xe),rt("pointerleave",j,J),b(t,Te),F(),o()}Xe(["pointermove","pointerdown","pointerup"]);var N_=t=>{t.stopPropagation()},N0=M("<div><!></div>"),O0={hash:"s-1j",code:".btn-container.s-1j{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-1j{min-width:0;width:100%}"};function Vo(t,e){B(e,!0),q(t,O0);let[i,o]=Ve(),r=()=>x(u,"$isGraphOpened$",i),a=()=>x(s,"$isMobile",i),l=ve(),d=yo(),s=l.ui.isMobile,u=d.graphIsOpened$,v=l.ui.t,p=h(e,"className",3,""),f=h(e,"disabled",3,!1),$=h(e,"hasTooltip",3,!0),y=h(e,"ref",15,void 0),g=h(e,"width",15,void 0),w=h(e,"isFullWidthTooltip",3,!0),C=h(e,"tooltipContent",3,""),I=h(e,"tooltipVisible",3,!1),N=h(e,"tooltipPlacement",3,"top"),k=h(e,"disabledTooltipContent",19,()=>v("tooltip_button_disabled")),E=h(e,"isAriaHidden",3,!1),A=h(e,"onTooltipVisibilityChange",3,nm),Q=h(e,"initialTranslateXPx",3,0),H=h(e,"initialTranslateYPx",19,()=>-18),z=h(e,"mouseEnter",3,nm),Y=h(e,"mouseLeave",3,nm),le=m(()=>f()?r()?v("tooltip_disabled_when_graph_on"):k():C()),X=W(!1);Ne(()=>{I()||O(X,!1)});var re=N0();re.__pointerdown=[N_],re.__click=[N_];var Z=T(re);{var we=ne=>{Fa(ne,{get content(){return n(le)},get translateX(){return Q()},get translateY(){return H()},get isFullWidthWrapper(){return w()},get placement(){return N()},get onVisibilityChange(){return A()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(X)},set active(_e){O(X,_e,!0)},children:(_e,xe)=>{var J=Ae(),Re=de(J);ii(Re,()=>{var pe;return(pe=e.children)!=null?pe:mt}),b(_e,J)},$$slots:{default:!0}})},ue=ne=>{var _e=Ae(),xe=de(_e);ii(xe,()=>{var J;return(J=e.children)!=null?J:mt}),b(ne,_e)};R(Z,ne=>{$()&&n(le)&&!a()?ne(we):ne(ue,!1)})}S(re),Ye(re,ne=>y(ne),()=>y()),D(()=>{var ne;se(re,1,`btn-container ${(ne=p())!=null?ne:""}`,"s-1j"),Me(re,"aria-hidden",E()||null)}),rt("mouseenter",re,function(...ne){var _e;(_e=z())==null||_e.apply(this,ne)}),rt("mouseleave",re,function(...ne){var _e;(_e=Y())==null||_e.apply(this,ne)}),wn(re,"clientWidth",g),b(t,re),F(),o()}Xe(["pointerdown","click"]);var D0=Ce('<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 Kd(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,r)=>{var a=D0(),l=de(a),d=L(l);D(()=>{Me(l,"fill",ia),Me(l,"fill-opacity",e.completed?1:.24),Me(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),b(o,a)},$$slots:{default:!0}})}var B0=M("<div><!></div>"),F0={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 rm(t,e){B(e,!0),q(t,F0);let o=ve().ui.t,r=W(0),a=m(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Vo(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=B0();let u;var v=T(s);let p=m(()=>!!e.videoEpisode.completed);Kd(v,{get completed(){return n(p)}}),S(s),D(f=>{u=se(s,1,"interactive-episode-icon s-15",null,u,f),qe(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),wn(s,"clientWidth",f=>O(r,f)),b(l,s)},$$slots:{default:!0}}),F()}var H0=M('<div><div class="video-episode-inner s-14"><div class="video-episode-loaded s-14"></div> <div></div></div></div>'),U0=M('<div class="video-episodes-wrap s-14"></div>'),z0={hash:"s-14",code:".video-episodes-wrap.s-14{height:100%;position:absolute;width:100%}.video-episode.s-14{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-14:first-child{padding-left:0}.video-episode.s-14:last-child{padding-right:0}.video-episode.s-14:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-14,.video-episode-inner.s-14,.video-episode-loaded.s-14{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-14{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-14:first-child .video-episode-inner:where(.s-14),.video-episode.s-14:last-child .video-episode-inner:where(.s-14){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-14{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-14,.video-episode-loaded.s-14{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-14{background-color:var(--slider-filled-bg)}"};function sm(t,e){q(t,z0);let i=h(e,"videoEpisodes",19,()=>[]);var o=U0();gi(o,21,i,r=>r.from,(r,a)=>{var l=H0();let d;var s=T(l),u=T(s),v=L(u,2);let p;S(s),S(l),D((f,$)=>{d=se(l,1,"video-episode s-14",null,d,f),qe(l,`left: ${n(a).from}%; width: ${n(a).width}%`),qe(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),p=se(v,1,"video-episode-filled s-14",null,p,$),qe(v,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),b(r,l)}),S(o),b(t,o)}function W0(t,e,i,o,r,a,l){if(t.preventDefault(),e()&&O(i,e().getBoundingClientRect(),!0),o()||n(r)||!e())return;O(r,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function K0(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 q0(t,e,i,o,r){if(t.preventDefault(),e()||!n(i))return;O(i,!1);let a=o(t.clientX,t.clientY);r()(a,t)}function Q0(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function G0(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),O(r,!1),a()(l)}var Y0=M("<div></div>"),j0=M('<div class="bars s-h"><div class="loaded s-h"></div> <div></div></div>'),X0=M('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),Z0={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 Ha(t,e){B(e,!0),q(t,Z0);let i=h(e,"ref",15,void 0),o=h(e,"className",3,""),r=h(e,"testId",3,void 0),a=h(e,"isHidden",3,!1),l=h(e,"isVertical",3,!1),d=h(e,"isActiveLive",3,!1),s=h(e,"isMobile",3,!1),u=h(e,"squareBorders",3,!1),v=h(e,"videoEpisodes",19,()=>[]),p=h(e,"withWheelHandler",3,!1),f=h(e,"isInteractive",3,!1),$=h(e,"disabled",3,!1),y=h(e,"hideHandel",3,!1),g=h(e,"onPointerDown",3,qn),w=h(e,"onHandleMove",3,qn),C=h(e,"onPointerUp",3,qn),I=h(e,"onPointerEnter",3,qn),N=h(e,"onPointerMove",3,qn),k=h(e,"onPointerLeave",3,qn),E=h(e,"onMouseEnter",3,qn),A=h(e,"onMouseLeave",3,qn),Q=h(e,"onWheelUp",3,qn),H=h(e,"onWheelDown",3,qn),z=h(e,"onWheelLeft",3,qn),Y=h(e,"onWheelRight",3,qn),le=h(e,"onDisabledClick",3,qn),X=h(e,"loadedProgress",3,0),re=h(e,"filledProgress",3,0),Z=h(e,"handleProgress",3,0),we=h(e,"ariaLabel",3,""),ue=h(e,"ariaValueMin",3,void 0),ne=h(e,"ariaValueMax",3,void 0),_e=h(e,"ariaValueNow",3,void 0),xe=h(e,"ariaValueText",3,""),J=h(e,"onContextMenu",3,qn),Re=h(e,"handleAlwaysVisible",3,!1),pe=Lt(),P=W(void 0),We=W(!1),Te=m(()=>{var Le;return(Le=ne())!=null?Le:0}),j=m(()=>{var Le;return O_(v())&&((Le=v()[v().length-1])==null?void 0:Le.time)<n(Te)}),ie=m(()=>O_(v())&&v().length&&n(j)&&n(Te)?Ze(X()*100,re()*100):[]);function Oe(Le){if(Le.preventDefault(),i()&&O(P,i().getBoundingClientRect(),!0),$())return;let bt=Ee(Le.clientX,Le.clientY),Et=Ue(Le.clientX);I()(bt,Et,n(P).width)}function De(Le){Le.preventDefault(),!$()&&k()()}function tt(){E()()}function U(){A()()}function Pe(Le){$()||p()&&(Le.preventDefault(),Le.deltaY<0?Q()():Le.deltaY>0?H()():Le.deltaX>0?Y()():z()())}function Ee(Le,bt){return l()?Math.max(0,Math.min(1,(n(P).height-(bt-n(P).top))/n(P).height)):Math.min(Math.max(Le-n(P).x,0),n(P).width)/n(P).width}function Ue(Le){return Math.min(Math.max(Le-n(P).x,0),n(P).width)}function Ze(Le,bt){let Et=pe.features.episodesClustering&&!f()?pe.episodeMinWidthPc:0,ut=[],ce=v()[0].time/n(Te)*100,ze=0,Qe=0;for(let Bt=1;Bt<v().length;Bt++)ze=v()[Bt].time/n(Te)*100,ze-ce>Et&&(ut.push({from:ce,width:Math.max(0,ze-ce),loadedWidth:Math.max(0,Math.min(ze,Le)-ce),filledWidth:Math.max(0,Math.min(ze,bt)-ce),interactive:v()[Bt-1].interactive,completed:v()[Bt-1].completed}),ce=v()[Bt].time/n(Te)*100,Qe++);let at={from:ce,width:Math.max(0,100-ce),loadedWidth:Math.max(0,Math.min(Le,100)-ce),filledWidth:Math.max(0,Math.min(bt,100)-ce),interactive:v()[Qe].interactive,completed:v()[Qe].completed};100-ce<Et?(Qe-=1,ut[Qe].width+=100-ce,ut[Qe].loadedWidth+=Math.max(0,Math.min(Le,100)-ce),ut[Qe].filledWidth+=Math.max(0,Math.min(bt,100)-ce)):ut[Qe]=at;let Dt=v()[0].time;if(Dt!==0){let Bt=Dt/n(Te)*100;ut.unshift({from:0,width:Bt,loadedWidth:Math.min(Bt,Le),filledWidth:Math.min(Bt,bt)})}return ut}function ye(Le){return Math.max(0,Math.min(100,Le*100))}let ke=m(()=>ye(X())),Be=m(()=>ye(re()));var Nt=X0(),pt=de(Nt);{var Ot=Le=>{var bt=Y0();let Et;gi(bt,21,()=>n(ie),ut=>ut.from,(ut,ce)=>{var ze=Ae(),Qe=de(ze);{var at=Dt=>{rm(Dt,{get videoEpisode(){return n(ce)},get disabled(){return $()}})};R(Qe,Dt=>{n(ce).interactive&&Dt(at)})}b(ut,ze)}),S(bt),D(ut=>Et=se(bt,1,"interactive-icons s-h",null,Et,ut),[()=>({mobile:s(),hidden:s()&&!n(We)})]),b(Le,bt)};R(pt,Le=>{f()&&Le(Ot)})}var st=L(pt,2);let wt;st.__pointerdown=[W0,i,P,$,We,Ee,g],st.__pointermove=[K0,$,Ee,Ue,N,P,We,w],st.__pointerup=[q0,$,We,Ee,C],st.__click=[Q0,$,le,Ee],st.__contextmenu=[G0,Ee,$,le,We,J];var ei=T(st);{var Mt=Le=>{sm(Le,{get videoEpisodes(){return n(ie)},get disabled(){return $()},get isMobile(){return s()}})},$e=Le=>{var bt=j0(),Et=T(bt),ut=L(Et,2);let ce;S(bt),D(ze=>{Me(Et,"data-value",n(ke)),qe(Et,`transform: translateX(${n(ke)}%);`),ce=se(ut,1,"filled s-h",null,ce,ze),Me(ut,"data-value",n(Be)),qe(ut,`transform: translateX(${n(Be)}%);`)},[()=>({"active-live":d()})]),b(Le,bt)};R(ei,Le=>{n(ie).length?Le(Mt):Le($e,!1)})}var be=L(ei,2);let ee;var it=T(be);let fe;S(be),S(st),Ye(st,Le=>i(Le),()=>i()),D((Le,bt,Et,ut)=>{var ce,ze;wt=se(st,1,`slider ${(ce=o())!=null?ce:""}`,"s-h",wt,Le),Me(st,"aria-label",we()),Me(st,"aria-valuemin",ue()),Me(st,"aria-valuemax",ne()),Me(st,"aria-valuenow",_e()),Me(st,"aria-valuetext",xe()),Me(st,"data-testid",(ze=r())!=null?ze:null),ee=se(be,1,"handleWrap s-h",null,ee,bt),qe(be,Et),fe=se(it,1,"handle s-h",null,fe,ut)},[()=>({disabled:$(),"slider-dragging":n(We),hidden:a(),"handle-always-visible":Re(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${ye(Z())}%);`,()=>({"active-live":d()})]),rt("pointerenter",st,Oe),rt("pointerleave",st,De),rt("mouseenter",st,tt),rt("mouseleave",st,U),rt("wheel",st,Pe),b(t,Nt),F()}Xe(["pointerdown","pointermove","pointerup","click","contextmenu"]);var to=(t,e)=>Id[t]>=Id[e];var Ls=(t,e)=>Id[t]<=Id[e],D_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var ex=M("<div><!></div>"),tx=M("<div><!> <!></div>"),ix={hash:"s-29",code:".volumeBar-container.s-29{align-items:center;display:flex}.vertical.s-29 .btn,.vertical.s-29 .tooltip-wrapper,.volumeBar-container.vertical.s-29{width:40px}.volumeBar.s-29{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-29{padding:0 8px 0 0;width:0}"};function am(t,e){var Ue,Ze;B(e,!0),q(t,ix);let[i,o]=Ve(),r=()=>x(N,"$isAudioAvailable$",i),a=()=>x(f,"$muted$",i),l=()=>x(p,"$volume$",i),d=()=>x(w,"$currentGridType$",i),s=()=>x(Oe,"$controlsVisible",i),u=ve(),v=Lt(),p=u.state.volume$,f=u.state.muted$,{setVolume:$,startVolumeChanging:y,stopVolumeChanging:g}=u.actions.internal,w=u.ui.currentGridType$,C=(Ue=u.callbacks)==null?void 0:Ue.onAudioDoesNotExistHint,I=(Ze=u.callbacks)==null?void 0:Ze.onAudioDisabledHint,N=u.state.isAudioAvailable$,k=u.state.isAudioDisabled,E=u.ui.t,A=W(!1),Q,H=m(()=>e.isAds||r()),z=m(()=>!n(H)||a()||l()===0),Y=m(()=>Ls(d(),"l")),le=m(()=>n(Y)?"":n(z)?!r()||k?E("tooltip_sound_unavailable"):E("tooltip_volume"):E("tooltip_volume_muted")),X=m(()=>n(z)?E("tooltip_volume"):E("tooltip_volume_muted")),re=m(()=>n(z)?0:l()),Z=!1,we=m(()=>e.isAds?!1:k?!I:r()?!1:!C);function ue(ye){y(),$(ye)}function ne(){Ru(u,l(),v.controls.volumeStepWheel)}function _e(){Nu(u,l(),v.controls.volumeStepWheel)}function xe(ye){$(ye)}function J(ye){$(ye),g()}function Re(){Z=!0}function pe(){Z=!1,Te()}function P(){clearTimeout(Q),O(A,!0)}function We(){Te()}function Te(){Q=window.setTimeout(()=>{Z||O(A,!1)},v.controls.volumeBarTimeout)}function j(ye){ye.preventDefault(),ye.deltaY<0?ne():ye.deltaY>0&&_e()}let ie=W(!1),Oe=u.ui.controlsVisible;Ne(()=>{s()||O(ie,!1)});var De=tx();let tt;var U=T(De);Fa(U,{get content(){return n(le)},translateY:-18,get active(){return n(ie)},set active(ye){O(ie,ye,!0)},children:(ye,ke)=>{let Be=m(()=>n(Y)?"btn-volume-vertical":"btn-volume-horizontal");Wt(ye,{className:"btn-full-opacity",get disabled(){return n(we)},get testId(){return n(Be)},get ariaLabel(){return n(X)},get click(){return e.click},get ariaKeyShortCut(){return ls.KeyM},role:"button",children:(Nt,pt)=>{da(Nt,{get size(){return"24"},get volume(){return l()},get muted(){return n(z)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var Pe=L(U,2);{var Ee=ye=>{var ke=ex();let Be;var Nt=T(ke);let pt=m(()=>n(Y)?"volumeBar-slider-vertical":""),Ot=m(()=>n(Y)&&!n(A)),st=m(()=>n(Y)?Re:Bu),wt=m(()=>n(Y)?pe:Bu),ei=m(()=>Math.round(n(re)*100)),Mt=m(()=>`${Math.round(n(re)*100)}%`),$e=m(()=>n(Y)?"volume-slider-vertical":"volume-slider");Ha(Nt,{get className(){return n(pt)},get isHidden(){return n(Ot)},get isVertical(){return n(Y)},withWheelHandler:!0,onWheelUp:ne,onWheelDown:_e,onPointerDown:ue,onHandleMove:xe,onPointerUp:J,get onPointerEnter(){return n(st)},get onPointerLeave(){return n(wt)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(ei)},get ariaValueText(){return n(Mt)},get filledProgress(){return n(re)},get handleProgress(){return n(re)},get testId(){return n($e)}}),S(ke),D(be=>Be=se(ke,1,"volumeBar s-29",null,Be,be),[()=>({"volumeBar-vertical":n(Y)})]),b(ye,ke)};R(Pe,ye=>{n(H)&&ye(Ee)})}S(De),D(ye=>tt=se(De,1,"volumeBar-container s-29",null,tt,ye),[()=>({vertical:n(Y)})]),rt("mouseenter",De,function(...ye){var ke;(ke=n(Y)?P:Bu)==null||ke.apply(this,ye)}),rt("mouseleave",De,function(...ye){var ke;(ke=n(Y)?We:Bu)==null||ke.apply(this,ye)}),rt("wheel",De,j),b(t,De),F(),o()}import{noop as rx}from"@vkontakte/videoplayer-shared/es2018";var ox=Ce('<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>'),nx=Ce('<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=h(e,"isFullscreen",8,!1),o=_n(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");je(t,{get testId(){return n(o)},children:(r,a)=>{var l=Ae(),d=de(l);{var s=v=>{var p=ox();b(v,p)},u=v=>{var p=nx();b(v,p)};R(d,v=>{i()?v(s):v(u,!1)})}b(r,l)},$$slots:{default:!0}})}function qd(t,e){B(e,!0);let i=h(e,"isFullscreen",3,!1),o=h(e,"click",3,rx),r=ve(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=m(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));Wt(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let v=sa(u);a.set(v),o()()},get ariaKeyShortCut(){return ls.KeyF},role:"button",children:(u,v)=>{lm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),F()}var sx=Ce('<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=Sn(e,["$$slots","$$events","$$legacy","children"]);var o=sx();eo(o,()=>({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);ii(r,()=>{var a;return(a=e.children)!=null?a:mt}),ci(),S(o),b(t,o)}var ax=Ce('<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=Sn(e,["$$slots","$$events","$$legacy","children"]);var o=ax();eo(o,()=>({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);ii(r,()=>{var a;return(a=e.children)!=null?a:mt}),ci(6),S(o),b(t,o)}var lx={hash:"s-28",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,lx);let i=h(e,"short",3,!1),o=h(e,"isCyrillic",3,!0),r=h(e,"logo",19,()=>"vk_video"),a="vk-video-logo-icon--short",l=24,d=m(()=>!o()&&!i()?91:i()?l:95),s=m(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=m(()=>`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()}}),F()}function Qd(t,e){B(e,!0);let[i,o]=Ve(),r=()=>x($,"$isMobile",i),a=()=>x(f,"$currentGridType$",i),l=()=>x(g,"$isCyrillicRelatedInterface$",i),d=h(e,"ref",15,void 0),s=h(e,"logoClickable",3,!1),u=h(e,"targetUrl",3,""),v=Lt(),p=ve(),f=p.ui.currentGridType$,$=p.ui.isMobile,y=p.ui.t,g=p.isCyrillicRelatedInterface$,w=m(()=>v.logoType!=="vk"),C=m(()=>n(w)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),I=m(()=>(r()&&Ls(a(),"m")||Ls(a(),"l"))&&n(w)),N=()=>{var A,Q;e.click(),(A=p.callbacks)!=null&&A.onLogoClicked?(Q=p.callbacks)==null||Q.onLogoClicked():u()&&window.open(u(),"_blank")},k=m(()=>!s()),E=m(()=>n(w)?"btn-vk-video-logo":"btn-vk-logo");Wt(t,{className:"btn-full-opacity",get disabled(){return n(k)},click:N,get testId(){return n(E)},get ariaLabel(){return n(C)},get ref(){return d()},set ref(A){d(A)},children:(A,Q)=>{var H=Ae(),z=de(H);{var Y=X=>{um(X,{get logo(){return v.logoType},get short(){return n(I)},get isCyrillic(){return l()}})},le=X=>{dm(X,{})};R(z,X=>{n(w)?X(Y):X(le,!1)})}b(A,H)},$$slots:{default:!0}}),F(),o()}import{ChromecastState as px}from"@vkontakte/videoplayer-core/es2018";import{ChromecastState as F_}from"@vkontakte/videoplayer-core/es2018";var dx=Ce('<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-19"></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-19"></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-19"></path>',1),cx=Ce('<path d="M1 18v3h3c0-1.66-1.34-3-3-3z"></path><path d="M1 14v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7z"></path><path d="M1 10v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11z"></path><path d="M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" class="s-19"></path><path d="M5.667 7.44H18.5v9.167h-5.161a11.947 11.947 0 0 0-7.673-7.672V7.44Z"></path>',1),ux={hash:"s-19",code:".animated.s-19{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-19{animation-name:s-19-wave1}.wave2.animated.s-19{animation-name:s-19-wave2}.wave3.animated.s-19{animation-name:s-19-wave3}@keyframes s-19-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-19-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-19-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function Gd(t,e){B(e,!0),q(t,ux);let i=h(e,"isMobile",3,!1),o=m(()=>e.iconState===F_.CONNECTED),r=m(()=>e.iconState===F_.CONNECTING),a=m(()=>n(o)?"#2688EB":ia),l=m(()=>e.size?ln(e.size):void 0);var d=Ae(),s=de(d);{var u=p=>{je(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(f,$)=>{var y=dx();ci(2),b(f,y)},$$slots:{default:!0}})},v=p=>{je(p,{get style(){return n(l)},testId:"chromecast-icon",children:(f,$)=>{var y=cx(),g=de(y);let w;var C=L(g);let I;var N=L(C);let k;var E=L(N,2);let A;D((Q,H,z,Y)=>{w=se(g,0,"wave1 s-19",null,w,Q),I=se(C,0,"wave2 s-19",null,I,H),k=se(N,0,"wave3 s-19",null,k,z),A=se(E,0,"s-19",null,A,Y)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:!n(o)})]),b(f,y)},$$slots:{default:!0}})};R(s,p=>{i()?p(u):p(v,!1)})}b(t,d),F()}import{noop as fx}from"@vkontakte/videoplayer-shared/es2018";function Yd(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"click",3,fx),l=ve().ui.t,d=m(()=>e.state===px.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));Wt(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)=>{Gd(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),F()}import{noop as vx}from"@vkontakte/videoplayer-shared/es2018";var mx=Ce('<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){je(t,{testId:"episodes-icon",children:(e,i)=>{var o=mx();ci(2),b(e,o)},$$slots:{default:!0}})}var Fu=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var gx=M('<span class="text mobile s-23"> </span> <div class="chevron-episodes s-23" data-testid="btn-episodes_icon"><!></div>',1),hx=M('<span class="text s-23"> </span>'),_x=M('<span class="text count s-23"> </span>'),bx=M('<span class="icon s-23"><!></span> <!>',1),$x={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 jd(t,e){var Z,we,ue;B(e,!0),q(t,$x);let[i,o]=Ve(),r=()=>x(y,"$currentGridType$",i),a=()=>x(g,"$openedByKeyboard$",i),l=()=>x(w,"$panelOpened$",i),d=()=>x(C,"$isMobile",i),s=h(e,"position",3,0),u=h(e,"duration",3,0),v=h(e,"timeCodes",19,()=>[]),p=ve(),f=(we=(Z=p.callbacks)==null?void 0:Z.onEpisodeChanged)!=null?we:vx,$=!!((ue=p.callbacks)!=null&&ue.onEpisodeClicked),y=p.ui.currentGridType$,g=p.ui.episodes.openedByKeyboard$,w=p.ui.episodes.panelOpened$,C=p.ui.isMobile,I=p.ui.t,N=W(void 0),k=ne=>{var xe,J,Re;if(!!((xe=p.callbacks)!=null&&xe.onEpisodeClicked)){let pe=sa(ne);g.set(pe),w.set(!0),(Re=(J=p.callbacks)==null?void 0:J.onEpisodeClicked)==null||Re.call(J,pe)}},E=W(null),A=m(()=>s()/u());Ne(()=>{var _e;let ne=Fu(n(A),u(),v());ne?((_e=n(E))==null?void 0:_e.time)!==ne.time&&(f(ne),O(E,ne,!0)):O(E,null)});let Q=m(()=>{var ne;return((ne=n(E))==null?void 0:ne.text)||""}),H=m(()=>to(r(),"xl")?"FULL":to(r(),"m")?"COUNT":"SHORT"),z=m(()=>`${I("tooltip_episodes")}: ${n(Q)}`),Y=async(ne,_e,xe)=>{await ho(),(ne==null?void 0:ne.getAttribute("aria-expanded"))==="false"&&_e&&!xe&&Tt(()=>{g.set(!1),ne.focus()})};Ne(()=>{Y(n(N),a(),l())});var le=Ae(),X=de(le);{var re=ne=>{let _e=m(()=>d()?"px-0":""),xe=m(()=>!$);Wt(ne,{get className(){var J;return`w-max btn-full-opacity btn-jc-l ${(J=n(_e))!=null?J:""}`},testId:"btn-episodes",click:k,get disabled(){return n(xe)},get ariaExpanded(){return l()},get ariaLabel(){return n(z)},get ref(){return n(N)},set ref(J){O(N,J,!0)},children:(J,Re)=>{var pe=Ae(),P=de(pe);{var We=j=>{var ie=gx(),Oe=de(ie),De=T(Oe,!0);S(Oe);var tt=L(Oe,2),U=T(tt);Mr(U,{direction:"right"}),S(tt),D(()=>me(De,n(Q))),b(j,ie)},Te=j=>{var ie=bx(),Oe=de(ie),De=T(Oe);pm(De,{}),S(Oe);var tt=L(Oe,2);{var U=Ee=>{var Ue=hx(),Ze=T(Ue,!0);S(Ue),D(()=>me(Ze,n(Q))),b(Ee,Ue)},Pe=(Ee,Ue)=>{{var Ze=ye=>{var ke=_x(),Be=T(ke,!0);S(ke),D(()=>me(Be,v().length)),b(ye,ke)};R(Ee,ye=>{n(H)==="COUNT"&&ye(Ze)},Ue)}};R(tt,Ee=>{n(H)==="FULL"?Ee(U):Ee(Pe,!1)})}b(j,ie)};R(P,j=>{d()?j(We):j(Te,!1)})}b(J,pe)},$$slots:{default:!0}})};R(X,ne=>{n(E)&&ne(re)})}b(t,le),F(),o()}import{debounceFn as ob}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as kx,PlaybackState as Bl,Player as Px,PredefinedQualityLimits as ps,VideoFormat as Zd,clientChecker as q_}from"@vkontakte/videoplayer-core/es2018";import{assertNonNullable as vr,getHighestQuality as Ax,InterfaceLanguage as Lx,isInvariantQuality as Mx,isNonNullable as Vx,loadVKLangPack as Rx,Logger as Nx,map as Q_,merge as Ox,Observable as Qu,Subject as Jd,Subscription as _m,TracerFactory as Dx,ValueSubject as Bx,VideoQuality as Fx,devNull as Hx,now as Ux,filter as zx,once as Wx}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as Vs}from"@vkontakte/videoplayer-statistics/es2018";import{detectEmbed as yx,devNull as ni,isNonNullable as xx,now as ri}from"@vkontakte/videoplayer-shared/es2018";import{addScript as wx,Subject as dn,clearVideoElement as Sx}from"@vkontakte/videoplayer-shared/es2018";var Tx="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Hu=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 dn,loadStarted$:new dn,loadEnded$:new dn,loadError$:new dn,ready$:new dn,slotRequested$:new dn,started$:new dn,timeRemained$:new dn,paused$:new dn,resumed$:new dn,ended$:new dn,empty$:new dn,skipped$:new dn,clicked$:new dn,closed$:new dn,error$:new dn};this.loadAdman=e=>(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[ri()]}),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?(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[ri()]}),i(),this.events.loadEnded$.next()):(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[ri()]}),o())};wx(Tx,e,this.loadTimeout).then(()=>{ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[ri()]}),window.AdmanHTML?(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[ri()]}),i(),this.events.loadEnded$.next()):(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[ri()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[ri()]}),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?(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[ri()]}),i(),this.events.loadEnded$.next()):(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[ri()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[ri()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[ri()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[ri()]}),!d&&(window.AdmanHTML?(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[ri()]}),i(),this.events.loadEnded$.next()):(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[ri()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[ri()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[ri(),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?ge(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;ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),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;ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),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(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[ri()]}),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;ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),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;ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),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")=>{ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[ri()]}),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"),ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[ri()]}),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")}async initAdman(e){var N,k;if(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[ri(),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:v,externalApi:p}=e;this.externalApi=p;let f,$=this.playerState&&ge(this.playerState.vsid);$&&(this.isVsidOriginal?f=$:f=parseInt($,36));let{isEmbed:y,immediateOrigin:g}=yx(),w=(N=y?g:window.location.href)!=null?N:window.location.href,C={...s,dl:encodeURIComponent(w),autoplay:r?1:0,player_width:i,player_height:o,...f?{request_id:f}:{},duration:v,...u};C=Object.fromEntries(Object.entries(C).filter(([E,A])=>xx(A)));let I={slot:d,wrapper:a,videoEl:l,videoQuality:o,params:C,browser:{mobile:!1}};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),(k=this.externalApi)!=null&&k.videoGetAds){let A=await this.safeExternalCall(this.externalApi.videoGetAds,C);A&&(delete I.slot,delete I.params,Object.assign(I,{json:A}))}E.init(I),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(I)}`})}catch(E){ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[ri()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){var o,r,a;if(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[ri()]}),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(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),this.adsState){this.log({message:"toggle play"});let i=ge(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(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[ri()]}),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(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),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(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),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(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),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(ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[ri()]}),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,v,p,f;ni.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[ri()]}),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),(v=this.adman)==null||v.onCompleted(void 0),(p=this.adman)==null||p.onError(void 0),(f=this.adman)==null||f.destroy(),this.videoElement&&Sx(this.videoElement),this.isDestroyed=!0}async safeExternalCall(e,...i){var o;try{return await e(...i)}catch(r){return this.onAdError((o=r==null?void 0:r.message)!=null?o:"External call failed"),null}}};var H_=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 Uu,{startTime:v,endTime:p}=u.parse(s);l.startTime=v,l.endTime=p}else if(s.trim()!==""){let u=new mm,{texts:v}=u.parse(s);l.texts=[...l.texts,...v]}(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",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((v,p)=>{let f=l.indexOf(p,d);return v===-1||v>f?f:v},-1);if(u===-1){s.push(l.substring(d));break}s.push(l.substring(d,u)),d=u+1}return s}}),a=new Uu;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}},U_=fm;import{isNonNullable as vm}from"@vkontakte/videoplayer-shared/es2018";var Ua,ki,gm=0,hm=!1,z_="",W_=(t,e=0,i=0)=>t<e&&t<i,zu=(t,e=0,i=0)=>t>=e&&t<=i,Cx=(t,e=0,i=0)=>t>e&&t>i,K_=(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:v})=>zu(t,u,v));let a=t>=gm,l=t<gm;if(gm=t,l&&(hm=!1),vm(Ua)&&zu(t,Ua.startTime,Ua.endTime)&&z_===e.value)return Ua;if(!vm(ki)&&(r!=null&&r.length)&&!hm){ki=r.find(({startTime:u,endTime:v})=>zu(t,u,v)||a&&W_(t,u,v)),Ua=void 0,!vm(ki)&&r[r.length-1].endTime<t&&(hm=!0);return}else{if(zu(t,ki==null?void 0:ki.startTime,ki==null?void 0:ki.endTime))return Ua=ki,ki=void 0,z_=e.value,Ua;(a&&Cx(t,ki==null?void 0:ki.startTime,ki==null?void 0:ki.endTime)||l&&W_(t,ki==null?void 0:ki.startTime,ki==null?void 0:ki.endTime))&&(ki=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"},Ix={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"},Xd=t=>{var e,i;return(i=(e=Wu[t])!=null?e:Wu[Ix[t]])!=null?i:void 0};import{Subscription as Ex}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-statistics/es2018";var Ku=class{constructor(e,i,o,r=new Ex){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 qu=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(qu||{});var us=t=>t!=null?t:0,Ms=(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(us(i==null?void 0:i.top)-us(o==null?void 0:o.top)),left:Math.round(us(i==null?void 0:i.left)-us(o==null?void 0:o.left)),bottom:Math.round(us(i==null?void 0:i.bottom)-us(o==null?void 0:o.top)),right:Math.round(us(i==null?void 0:i.right)-us(o==null?void 0:o.left))}},Ol=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:us(e==null?void 0:e.width),height:us(e==null?void 0:e.height)}};var Cn="off";var Dl=t=>!!(Math.round(Math.abs(t)/90)%2);var G_=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:v,previewThumbsData:p,uiConfig:f,coreConfig:$,player:y,disabledControls:g,isInteractive:w,interactiveRanges$:C,isInteractiveTime$:I,replayInteractive:N,stopPlayer:k,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:A,additionalButtons:Q,additionalSettingsMenuItems:H,additionalContextMenuItems:z,playPrevVideo:Y,playNextVideo:le,onVideoChanged:X,looped:re=!1,statistics:Z,saveRate:we,internalsExposure:ue,playerView:ne,playerId:_e})=>{var Dv,Bv,Fv;let xe={...$,configName:[...(Dv=$.configName)!=null?Dv:[],"ui"],isAudioDisabled:l,live:{...(Bv=$.live)!=null?Bv:{},isLiveCatchUpMode:!!r}},J=f,Re=Dx.createRootTracer(J.features.tracer),pe=Re.createComponentTracer("Store"),P=y||new Px(xe,Re,{playerId:_e});ue==null||ue.expose({corePlayer:P});let We=new Nx,Te=new Hu(We,{loadTimeout:J.ads.loadTimeout,initTimeout:J.ads.initTimeout,runtimeTimeout:J.ads.runtimeTimeout,useAdmanFromNPM:J.ads.useAdmanFromNPM,volumeMultiplier:J.ads.volumeMultiplier,isVsidOriginal:J.ads.isVsidOriginal}),j=Ma.getInstance(),ie=u==null?void 0:u.pictureInPictureApi,Oe=u==null?void 0:u.annotationsApi,De=u==null?void 0:u.slotsApi,tt=u==null?void 0:u.focusManager,U=We.createComponentLog("Store"),Pe,Ee,Ue={},Ze=new vu,ye=new _m,ke="",Be=ae(!1),Nt=Z&&Z.oneStat?oi(Z.oneStat.vsid$):Lr(void 0),pt=ae(oa()),Ot=ae(!1),st=()=>g_(document,q_.device.isIOS),wt=(Fv=ie==null?void 0:ie.info.isActive$)!=null?Fv:new Bx(!1),ei=ae(0),Mt=ae(!1),$e=ae(!1),be=ae([]),ee=Ox(P.events.fatalError$,P.events.managedError$).subscribe(c=>be.update(_=>[..._,c])),it=Lr(!1,c=>{let _=P.events.fatalError$.subscribe(()=>c(!0));return()=>_.unsubscribe()}),fe=async c=>{var oe;let _=Object.values(Lx).includes(c);if(J.downloadVKLanguages&&(_&&J.updateBuiltinLanguages||!Pf(c))){let Se;try{Se=await Rx(c,Ch,Ih)}catch(et){(oe=Z==null?void 0:Z.oneStat)==null||oe.logError({errorType:"VKLangPack",fatal:!1}),j==null||j.report(et,{errorType:"VKLangPack",fatal:!1})}Se&&(kf({language:c,pack:Se,fallback:J.defaultLanguage}),Le.set(c),bt.update(et=>et+1))}Pf(c)&&Le.set(c)},Le=ae(t),bt=ae(0),Et=ae(e);fe(t);let ut=(c,_)=>{let V=ge(Le);return Af(V,c,_,J.defaultLanguage)},ce=ae("thumb");ce.subscribe(c=>{c==="ads"&&P.info.playbackState$.getValue()&&at()});let ze=(()=>{let c=ui([it,ce],([_,V])=>_?"crashed":V);return{...c,is:_=>ge(c)===_}})(),Qe=ae(),at=()=>{Qe.set({muted:P.info.muted$.getValue()})},Dt=(()=>{let c=ae(new Set(g));return{...c,add:_=>{c.update(V=>new Set([...V].concat(_)))},remove:_=>{c.update(V=>{let oe=[...V];return new Set(Array.isArray(_)?oe.filter(Se=>!_.includes(Se)):oe.filter(Se=>Se!==_))})},includes:_=>{let V=ge(c);return Array.isArray(_)?_.every(oe=>V.has(oe)):V.has(_)}}})(),Bt=ae({width:0,height:0}),ti=null,vi=P.info.isBuffering$,Wi=Lr(vi.getValue(),c=>{let _=vi.subscribe(V=>{V&&ti===null?ti=window.setTimeout(()=>{c(vi.getValue()),ti=null},J.loaderDelay):c(V)});return()=>{_.unsubscribe(),ti&&clearTimeout(ti)}});pe.log("create store"),U({message:"create store"});let Vt=c=>{let _=c.container,V=()=>{Zt=new MutationObserver(Se=>{let{removedNodes:et}=Se[0];et.length&&_.append(P.experimental.element$.getValue())}),Zt.observe(_,{childList:!0})},oe=P.experimental.element$.getValue();if(oe)_.append(oe),V();else{let Se=P.experimental.element$.pipe(zx(et=>!!et),Wx()).subscribe(et=>{_.append(et),V()});ye.add(Se)}},di=c=>{U({message:`init video, config: ${JSON.stringify(c)}`}),w?Vt(c):(Hx.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[Ux()]}),P.initVideo(c)),pe.log("init video",{isInteractive:w}),c.subtitles&&P.setExternalTextTracks(c.subtitles),Pe=c,ke=c.subtitlesForcedLanguage||""},pi=new Jd,vt=c=>pi.next(c),Gt=new Jd,hi=new Jd,Ki=new Jd,Zt=null,Ct={actionRewind$:Gt,actionSeek$:hi,inPiP$:wt,inFullscreen$:new Qu(c=>pt.subscribe(_=>c.next(_))),actionSetSubtitle$:Ki,nextMovie$:pi},Ke=new Jd,_i={actionSeek$:hi,actionSubtitlesSwitched$:Ke,playerSize$:new Qu(c=>Bt.subscribe(_=>c.next(_))),inPiP$:wt,inFullscreen$:new Qu(c=>pt.subscribe(_=>c.next(_))),isLoaderVisible$:new Qu(c=>Wi.subscribe(_=>c.next(_)))};if(Z){let{oneStat:c,thinOneStat:_,mediascopePixel:V,statSubscription:oe}=Z;c&&(w||oe.add(c.attachTo(P)),oe.add(c.attachToUi(Ct)),oe.add(c.attachToAds(Te.events)),c.authorize(a).catch(Se=>{U({message:`onestat auth error ${String(Se)}`})}),V&&V.attachTo(P)),_&&(oe.add(_.attachTo(P,Te.events)),oe.add(_.attachToUi(_i)),oe.add(_.attachToAds(Te.events)),_.updateContext({isMobile:ge(Be)}),_.authorize(a))}if(j){let c=new _m,_=(V,oe)=>c.add(V.subscribe(oe));if(_(P.events.managedError$,V=>{j.logIError(V)}),_(P.events.fatalError$,V=>{j.logIError(V,!0)}),Z){let{oneStat:V}=Z;V&&_(V.experimental.error$,oe=>{j.logIError(oe)})}j.sentrySubscription.add(c)}let _o=()=>{if(q_.device.isIOS&&Ee)try{h_(Ee)}catch(c){U({message:`exitIosSafariFullscreen failed: ${c}`})}};ye.add(P.experimental.element$.subscribe(c=>{c&&(Ee=c,c.classList.add("player-media"),Ra(ie)&&ie.updateVideoElement(),w&&c.setAttribute("pip","false"),ne==="preview"&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(P.events.ended$.subscribe(()=>{var c;_o(),(c=s==null?void 0:s.onEnded)==null||c.call(s)})).add(P.events.looped$.subscribe(()=>{var c;(c=s==null?void 0:s.onLooped)==null||c.call(s)})).add(P.events.started$.subscribe(async()=>{var _,V;Ra(ie)&&await(ie==null?void 0:ie.revealPictureInPicture());let c=P.info.muted$.getValue();(_=s==null?void 0:s.onStarted)==null||_.call(s),(V=Ue.onStarted)==null||V.call(Ue,c)})).add(P.events.willSeek$.subscribe(({from:c,to:_})=>{var V;(V=s==null?void 0:s.onSeek)==null||V.call(s,c,_)})).add(P.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=s==null?void 0:s.onAutoplaySoundProhibited)==null||c.call(s)})).add(P.info.position$.subscribe(c=>{var V;let _=P.info.duration$.getValue();isFinite(_)&&_>0&&((V=s==null?void 0:s.onTimeupdate)==null||V.call(s,_,c),Te.setPosition(c,_))})).add(P.events.fatalError$.subscribe(c=>{var _;(_=s==null?void 0:s.onCrashed)==null||_.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(P.events.fetcherRecoverableError$.subscribe(c=>{var _;(_=s==null?void 0:s.onRecoverableError)==null||_.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(P.events.loadedMetadata$.subscribe(()=>{Mt.set(!0)})).add(P.info.is3DVideo$.subscribe(c=>{$e.set(c)})).add(P.info.isEnded$.subscribe(c=>{w&&(c?(I!=null&&I.getValue()&&Dt.add(Cd),Dt.add("PLAY_BUTTON")):Dt.remove("PLAY_BUTTON"))})).add(P.info.liveTime$.subscribe(c=>{var _;(_=s==null?void 0:s.onLiveTime)==null||_.call(s,c)})).add(P.info.isStalled$.subscribe(c=>{var _;(_=s==null?void 0:s.onStalledChanged)==null||_.call(s,c)})).add(P.info.isLiveEnded$.subscribe(c=>{var _;return c&&((_=s==null?void 0:s.onLiveEnded)==null?void 0:_.call(s))})).add(Te.events.loadStarted$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:_.call(c)})).add(Te.events.loadEnded$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:_.call(c)})).add(Te.events.loadError$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadError)==null?void 0:_.call(c)})).add(Te.events.init$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onInit)==null?void 0:_.call(c)})).add(Te.events.ready$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onReady)==null?void 0:_.call(c)})).add(Te.events.started$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onStarted)==null?void 0:V.call(_,c)})).add(Te.events.timeRemained$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onTimeRemained)==null?void 0:V.call(_,c)})).add(Te.events.ended$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onCompleted)==null?void 0:V.call(_,c)})).add(Te.events.empty$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onEmpty)==null?void 0:_.call(c)})).add(Te.events.clicked$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onClicked)==null?void 0:V.call(_,c)})).add(Te.events.closed$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onClosed)==null?void 0:V.call(_,c)})).add(Te.events.error$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onError)==null?void 0:V.call(_,c)})).add(Te.events.paused$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onPaused)==null?void 0:_.call(c)})).add(Te.events.resumed$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onResumed)==null?void 0:_.call(c)}));let xo=new _m,un=()=>{var et,It,Ut;let{debugLog:c}=J,_,V="#9df7b7",oe="#efd169";if(c&&c!==!0){let{colors:Qt}=c;_=c.tag,V=(et=Qt==null?void 0:Qt[0])!=null?et:V,oe=(Ut=(It=Qt==null?void 0:Qt[1])!=null?It:Qt==null?void 0:Qt[0])!=null?Ut:oe}let Se=_?`: ${_}`:"";xo.add(P.events.log$.subscribe(Qt=>{console.debug(`%c sdk${Se} `,`background:${V};`,`sdk component: ${Qt.component}`,Qt.message)})).add(We.log$.subscribe(Qt=>{console.debug(`%c ui${Se} `,`background:${oe};`,`ui component: ${Qt.component}.`,Qt.message)}))},St=()=>{xo.unsubscribe()},Ft=(c,_)=>{pe.log("start camera manual rotation",{mx:c,my:_}),P.startCameraManualRotation(c,_)},K=(c=!1)=>{pe.log("stop camera manual rotation",{immediate:c}),P.stopCameraManualRotation(c)},kt=(c,_,V)=>{pe.log("move camera focus px",{xpx:c,ypx:_,dt:V}),P.moveCameraFocusPX(c,_,V)},si=()=>{P.holdCamera()},lt=()=>{P.releaseCamera()},yt=Lr(P.info.position$.getValue(),c=>{let _,V,oe=()=>{let Se=P.info.playbackState$.getValue(),et=P.info.isLive$.getValue(),It=P.info.duration$.getValue(),Ut=P.info.position$.getValue();if(Se&&[Bl.PLAYING,Bl.PAUSED].includes(Se)){let Qt=et?Ut-It:P.getExactTime();Qt!==V&&c(Qt),V=Qt}_=requestAnimationFrame(oe)};return oe(),()=>cancelAnimationFrame(_)}),qt=oi(P.info.playbackState$),ot=oi(P.info.isBuffering$),Ri=ui([qt,ot],([c,_])=>_?"buffering":c),Ni=oi(P.info.currentBuffer$),Zo=oi(P.info.isEnded$),wo=oi(P.info.isLive$),Oi=J.features.playbackRate?oi(P.info.canChangePlaybackSpeed$):Lr(!1),qi=oi(P.info.liveBufferTime$),Rr=oi(P.info.volume$),bo=oi(P.info.muted$),oo=gu(P.info.predefinedQualityLimitType$.pipe(Q_(c=>c===ps.TRAFFIC_SAVING)),P.info.predefinedQualityLimitType$.getValue()===ps.TRAFFIC_SAVING),Ci=gu(P.info.predefinedQualityLimitType$.pipe(Q_(c=>c===ps.HIGH_QUALITY)),P.info.predefinedQualityLimitType$.getValue()===ps.HIGH_QUALITY),Jo=oi(P.info.autoQualityLimitingAvailable$),en=oi(P.info.availableQualities$),In=oi(P.info.availableQualitiesFps$),Yn=oi(P.info.chromecastState$),Nr=oi(P.info.chromecastDeviceName$),Jr=oi(P.info.currentFormat$),ms=oi(P.info.throughputEstimation$),es=oi(P.info.videoBitrate$),jn=oi(P.info.intrinsicVideoSize$),gr=oi(P.info.duration$),pn=oi(P.info.isAudioAvailable$),En=()=>{ti&&clearTimeout(ti),ti=null},Ro=ui([gr,wo],([c,_])=>_?-c:c),kn=ui([qt],([c])=>c===Bl.PLAYING),Xn=oi(P.info.atLiveEdge$),hr=oi(P.info.atLiveDurationEdge$),_r=oi(P.info.position$),Or=ui([_r,gr],([c,_])=>isFinite(c)&&isFinite(_)&&!!_),no=ui([Yn],([c])=>c===kx.CONNECTED),Dr=oi(P.info.availableVideoStreams$),Pn=J.features.audioLanguages?oi(P.info.availableAudioStreams$):Lr([]),An=oi(P.info.currentVideoStream$),ro=oi(P.info.currentAudioStream$),Br=c=>{c.language&&Tf(c.language),P.setVideoStream(c)},Ln=(c,_)=>{P.setAudioStream(c),Bo(_)&&(c.language&&Tf(c.language),J.features.userVideoPrefs&&i&&Ef(J.userSalt,String(i),{audioTrackId:c.id}))},ft=c=>{let _;if(c.length===1&&(_=c.at(0)),_!=null||(_=c.find(oe=>"isDefault"in oe&&oe.isDefault)),J.features.userVideoPrefs&&i){let oe=yu(J.userSalt,String(i));if(oe!=null&&oe.audioTrackId){let Se=c.find(et=>et.id===oe.audioTrackId);_=Se!=null?Se:_}}let V=Jh();return V&&(_!=null||(_=c.find(({language:oe})=>V===oe))),_!=null||(_=c.at(0)),_},li=c=>{pe.log("change audio stream",{id:c});let _=P.info.availableAudioStreams$.getValue().find(V=>V.id===c);_&&Ln(_,!0)},br=!1;ye.add(P.info.availableAudioStreams$.subscribe(c=>{if(!br&&c.length){let _=ft(c);_&&(P.setAudioStream(_),br=!0)}})),Pn.subscribe(c=>{var _;(_=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||_.call(s,c.map(({label:V="",id:oe="",language:Se=""})=>({label:V,language:Se,id:oe})))}),ro.subscribe(c=>{var _;return c&&((_=s==null?void 0:s.onAudioStreamChanged)==null?void 0:_.call(s,c.id))});let Zn=!1;ye.add(P.info.availableVideoStreams$.subscribe(c=>{if(!Zn&&c.length){let _=ft(c);_&&(P.setVideoStream(_),Zn=!0)}}));let Jn=ae(void 0),tn=oi(P.info.isAutoQualityEnabled$,c=>c&&Jn.set(void 0)),$r=oi(P.info.currentQuality$,()=>Jn.set(void 0)),on=ui([Jn,$r],([c,_])=>c!=null?c:_),fn=ui(Jr,c=>c!==Zd.MPEG),Mn=ui([en,In,tn,on,fn],([c,_,V,oe,Se])=>{let et=[];Se&&et.push({value:"auto",displayValue:ut("auto_quality_option"),selected:V});let It=c.filter(Ut=>!Mx(Ut));for(let Ut of It){let Qt=_[Ut];et.push({value:Ut,displayValue:`${Ut}${Qt?H_(Qt):""}`,selected:V?!1:Ut===oe})}return et}),Vn=oi(P.info.currentPlaybackRate$),No=ui([Vn,Xn,hr],([c,_,V])=>{let oe=V||w?1:J.controls.playbackRateMin,Se=_?1:J.controls.playbackRateMax,et=J.controls.playbackRateStep,It=[];for(let Ut=oe;Ut<=Se;Ut+=et)It.push({value:Ut,displayValue:Ut===1?ut("playback_rate_1"):ut("playback_rate",{multiplier:Ut.toString(10)}),selected:c===Ut});return It}),So=()=>({displayValue:ut("subtitles_off"),value:Cn,language:""}),er=ae(So()),To=ui([er,bt],([c],_)=>{c.value===Cn?_(So()):_(c)}),Di=J.features.subtitles?oi(P.info.availableTextTracks$):Lr([]),Rn=Hh(),tr=ui([Di,To],([c,_],V)=>{var et;let oe=[],Se=c.find(({id:It})=>It===_.value);if(Se!=null&&Se.url){let[,It]=(et=Rn.find(Se.url))!=null?et:[];if(It){V(It);return}Ze.download(Se.url).then(Ut=>{if(!Ut||Ze.isDestroyed())return;let Qt=new U_,qs=Se.language;if(qs){let Gb=!!Se.isAuto,Yb=Qt.parse(Ut,qs);oe.push({lang:qs,subtitles:Yb,isAuto:Gb,id:Se.id})}Rn.add(Se.url,oe),ge(To).value===_.value&&V(oe)}).catch(Ut=>{var Qt;(Qt=Z==null?void 0:Z.oneStat)==null||Qt.logError({errorType:"Subtitles download",fatal:!1}),j==null||j.report(Ut,{errorType:"Subtitles download",fatal:!1})})}V(oe)}),ir=ui([Vn,kn,To],([c,_,V],oe)=>{let It;if(P.info.isLive$.getValue()&&_&&V.value!==Cn){let Qt=()=>{let qs=1e3/(3*c);It=setTimeout(Qt,qs),oe(Date.now())};return Qt(),()=>clearTimeout(It)}}),or=ui([Di,To],([c,_])=>{if(!c.length)return[];let V=[];for(let{language:oe,isAuto:Se,id:et}of c){let It=oe&&Xd(oe);oe&&It&&V.push({displayValue:Se?ut("subtitles_auto",{language:It}):It,value:et,selected:(_==null?void 0:_.value)===et,isAuto:Se,language:oe})}return V.length?(V.unshift({...So(),selected:(_==null?void 0:_.value)===Cn}),V):[]}),Oo={available:[],prev:[]},yr=()=>{var _,V;let c=P.experimental.getCurrentTime$.getValue();return(V=(_=c==null?void 0:c())!=null?_:Ee==null?void 0:Ee.currentTime)!=null?V:0},$t=ui([yt,To,tr,ir],([c,_,V,oe])=>{var et;let Se=P.info.isLive$.getValue();if(Se&&Oo.prev!==V){let It=V.find(({id:Qt})=>Qt===_.value),Ut=Oo.prev.find(({id:Qt})=>Qt===_.value);if(It){let Qt={...It,subtitles:[...(et=Ut==null?void 0:Ut.subtitles)!=null?et:[],...It.subtitles]};Oo.available=[Qt],Oo.prev=V}}if(_&&_.value!==Cn){let It=Se?yr():c,Ut=Se?Oo.available:V;return K_(It,_,Ut,Se)}}),xt=ui([$t],([c])=>c!=null&&c.texts?c.texts:[]);ye.add(To.subscribe(c=>{var _,V;if(c.value===Cn)(_=s==null?void 0:s.onSubtitleOff)==null||_.call(s);else{let oe=Object.entries(Wu).find(([Se,et])=>et===c.displayValue);(V=s==null?void 0:s.onSubtitleOn)==null||V.call(s,oe?oe[0]:"",c.value)}}));let so=ae(!0),ao=ui([Ni,Ro,_r,qi],([c,_,V,oe])=>{var Ut;let Se=(Ut=c==null?void 0:c.end)!=null?Ut:0;if(!oe)return Se/_;let It=-V+oe-_;return(Se-It)/_}),Do=oi(P.info.availableSources$),Qi=ui([Do],([c])=>Object.keys((c==null?void 0:c[Zd.MPEG])||{}).length>0),Gi=()=>{var V,oe,Se;let c=Object.keys(((oe=(V=P.info.availableSources$)==null?void 0:V.getValue())==null?void 0:oe[Zd.MPEG])||{}),_=Ax(c)||Fx.Q_144P;return(Se=Pe.sources[Zd.MPEG])==null?void 0:Se[_]},lo=()=>{var _;let c=Gi();if(c)pe.log("download video",{url:c}),Dh(c,((_=Pe==null?void 0:Pe.meta)==null?void 0:_.title)||"video");else{let V="There is no URL for download video";pe.log("download video",{message:V}),U({message:V})}},Nn=()=>{U({message:"toggle muted"});let c=P.info.muted$.getValue();P.info.volume$.getValue()===0&&!c?Hr(xr(),!1):mn(!c,!1)},Fr=()=>{var c;if(Kt.ui.settingsMenu.visible$.set(!1),!ge(Kt.ui.settingsSubMenu.visible$)){let _=ge(Kt.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&_){let oe=Ol(_),Se={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:oe,position:Se,name:"settings"})}}pe.log("close settings menu")},Pi=async(c,_=()=>Promise.resolve())=>{var Se;Kt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Kt.ui.settingsMenu.visible$.set(!0),await _();let V=ge(Kt.ui.settingsMenu.ref$),oe=ga();if((Se=s==null?void 0:s.uiInfo)!=null&&Se.onSettingsMenu&&V&&oe){let It=Ol(V),Ut=Ms(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:It,position:Ut,name:"settings"})}pe.log("open settings menu",{wasOpenedByKeyboard:c})},vs=(c,_=!1)=>{var et;Kt.ui.settingsSubMenu.visible$.set(!1);let V=ge(Kt.ui.settingsMenu.ref$),oe=ga(),Se=ge(Kt.ui.settingsMenu.visible$);if((et=s==null?void 0:s.uiInfo)!=null&&et.onSettingsMenu&&V&&oe)if(Se&&!_){let Ut=Ol(V),Qt=Ms(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:Ut,position:Qt,name:"settings"})}else{let Ut=Ol(c),Qt={top:0,left:0,bottom:0,right:0},qs=ge(Kt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:Ut,position:Qt,name:qs})}pe.log("close settings sub menu")},ts=(c,_)=>{var oe;Kt.ui.settingsSubMenu.visible$.set(!0),Kt.ui.settingsSubMenu.ref$.set(_),Kt.ui.settingsSubMenu.name$.set(c);let V=ga();if((oe=s==null?void 0:s.uiInfo)!=null&&oe.onSettingsMenu&&_&&V){let et=Ol(_),It=Ms(_,V);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:et,position:It})}pe.log("open settings sub menu",{name:c})},xr=()=>{var _;let c=Math.max(J.volumeMinRestore,(_=hu())!=null?_:0);return c===0?J.volumeDefault:c},Bo=c=>{let _=J.features.savePreferredStatesOnUserActionOnly;return!_||_&&!c},Hr=(c,_)=>{let V=c===0?xr():c,oe=P.info.muted$.getValue();U({message:`set volume, volume: ${c}, preferredVolume: ${V}`});let Se=!l||ze.is("ads");oe&&c>0&&Se&&(oe=!1,Bo(_)&&wf(!1)),P.setVolume(c,oe),Te.setVolume(c),Bo(_)&&bf(V)},mn=(c,_)=>{let V=P.info.volume$.getValue();U({message:`set muted, currentVolume: ${V}, mute: ${c}`});let oe=ze.is("ads");if(P.setMuted(c,oe),Te.setVolume(c?0:V),Bo(_)&&(!oe||!c)&&wf(c),!c&&V===0){let Se=xr();P.setVolume(Se),Bo(_)&&bf(Se),Te.setVolume(Se)}},vn=ae(!1),Co=c=>{var _,V;pe.log("set looped",{isLooped:c}),vn.set(c),P.setLooped(c),(V=(_=s==null?void 0:s.uiInfo)==null?void 0:_.onLoopedChanged)==null||V.call(_,c)};Co(re);let wr=()=>{var c,_;(_=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||_.call(c)},He=(c,_=!1)=>{var V;U({message:`set autoplayNextEnabled, value: ${c}`}),pe.log("set autoplay next enabled",{autoplayNextEnabled:c}),Kt.ui.autoplayNextEnabled$.set(c),i_(c),_&&((V=s==null?void 0:s.onSetAutoplayNextEnabled)==null||V.call(s,c))},Pt=c=>{U({message:`set timerNextVideoRunning, value: ${c}`}),pe.log("set timer next video running",{timerNextVideoRunning:c}),Kt.ui.timerNextVideoRunning$.set(c)},bi=(c=!0)=>{var V;let _=!0;if(c&&(s!=null&&s.onPrevVideoClick))try{_=(V=s==null?void 0:s.onPrevVideoClick)==null?void 0:V.call(s)}catch(oe){U({message:"onPrevVideoClick callback failed to execute"})}X(!0),_&&Y()},Fo=(c=!0)=>{var V;let _=!0;if(c&&(s!=null&&s.onNextVideoClick))try{_=(V=s==null?void 0:s.onNextVideoClick)==null?void 0:V.call(s)}catch(oe){U({message:"onNextVideoClick callback failed to execute"})}X(!1),_&&le()},co=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},Io=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},uo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},Ho=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},On=()=>{P.prepare()},nn=()=>{vr(Kt);let c=ge(Kt.ui.controls.disabledControls$),_=ge(Kt.playerPhase),V={playerPhase:_,isInteractive:w,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(U({message:"toggle play"}),_==="ads"){V.action="play",pe.log("toggle adman play",V),Te.togglePlay();return}let oe=()=>{var et;U({message:"toggle play, call player.play"}),V.action="play",P.play(),(et=s==null?void 0:s.onPlay)==null||et.call(s)},Se=()=>{var et;U({message:"toggle play, call player.pause"}),V.action="pause",P.pause(),(et=s==null?void 0:s.onPause)==null||et.call(s)};if(P.info.isEnded$.getValue()){if(U({message:"toggle play, video ended, seek to 0"}),Gt.next(),hi.next(Vs.REWIND),w){N==null||N();return}P.seekTime(0),oe()}else P.info.playbackState$.getValue()!==Bl.PLAYING?oe():Se();pe.log("toggle play",V)},Yi=(c,{changeReason:_="default",appliesTo:V="to-video"}={},oe)=>{U({message:`set quality, quality: ${c}`}),pe.log("set quality",{quality:c}),P.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Se}=J.features;_u(),c!=="auto"?(Se?(bu({type:"exact_quality",quality:c,videoId:i},V),P.setPredefinedQualityLimits(ps.UNKNOWN)):$f(i,c),Jn.set(c),P.setQuality(c)):Se&&_==="default"&&(rr("auto_quality",V,oe),ge(oo)&&ji(!1,void 0,oe),ge(Ci)&&Dn(!1,void 0,oe))},ji=(c,_="as-default",V)=>{U({message:`set trafficSavingEnabled, value: ${c}`}),pe.log("set traffic saving enabled",{trafficSavingEnabled:c});let oe=c?ps.TRAFFIC_SAVING:ps.UNKNOWN;J.features.qualityDetailsSubMenuEnabled?(nr(oe,_,V),Ed(!1)):(P.setPredefinedQualityLimits(oe),Bo(V)&&Ed(c))},Dn=(c,_="as-default",V)=>{U({message:`set highQualityEnabled, value: ${c}`}),pe.log("set high quality enabled",{highQualityEnabled:c}),nr(c?ps.HIGH_QUALITY:ps.UNKNOWN,_,V)},nr=(c,_,V)=>{c!==ps.UNKNOWN&&(ge(Jo)&&!ge(tn)&&Yi("auto",{appliesTo:_,changeReason:"limit-changed"},V),rr(c,_,V)),P.setPredefinedQualityLimits(c)},rr=(c,_,V)=>{Bo(V)&&(bu({type:c,videoId:i},_),_==="as-default"&&bu({type:c,videoId:i},"to-video"))},Bn=(c,_=!0)=>{pe.log("set playback rate",{playbackRate:c}),P.setPlaybackRate(c),J.features.saveRate&&we&&!P.info.isLive$.getValue()&&_&&e_(c)},gs=()=>{let c=ge(Oi),_=ge(No),V=_.findIndex(({selected:Se})=>Se);if(V===_.length-1||!c)return _[V];let oe=_[V+1];return Bn(oe.value),oe},hs=()=>{let c=ge(Oi),_=ge(No),V=_.findIndex(({selected:Se})=>Se);if(V===0||!c)return _[V];let oe=_[V-1];return Bn(oe.value),oe},Ge=(c={...So(),selected:!1},_)=>{pe.log("set subtitles",{...c}),c.value!==Cn&&Ki.next(c.isAuto?c.value+"_auto":c.value),Ke.next({enabled:c.value!==Cn,lang:c.language,auto:!!c.isAuto}),er.set(c),Bo(_)&&(If(c.value===Cn?void 0:c.language),J.features.userVideoPrefs&&i&&Ef(J.userSalt,String(i),{subtitleTrackId:c.value===Cn?void 0:c.value}))},Yt=c=>{pe.log("toggle subtitles");let _=ge(To);(_==null?void 0:_.value)===Cn?po(c):Uo(c)},Ii=(c,_)=>{pe.log("change subtitle",{enabled:c}),c?po(!0,_):Uo(!0)},po=(c,_)=>{pe.log("subtitle on");let V=ge(or),oe=ge(Le),Se=ke!=null?ke:oe,et;_&&(et=V.find(It=>It.value===_)),et!=null||(et=V.filter(It=>It.value!==Cn).find(It=>It.language===Se)),Ge(et!=null?et:V[1],c)},Uo=c=>{pe.log("subtitle off"),Ge(void 0,c)};ye.add(P.info.availableTextTracks$.subscribe(c=>{var V;function _(){let oe=[];for(let{language:Se,isAuto:et,id:It}of c){let Ut=Se&&Xd(Se);Se&&Ut&&oe.push({id:It,language:Se,title:et?ut("subtitles_auto",{language:Ut}):Ut})}return oe}(V=s==null?void 0:s.onAvailableSubtitlesChanged)==null||V.call(s,_())}));let Ur=ae(!0),Eo=c=>{Ur.set(c)},zo=(c,_,V=!0)=>{var oe;if(U({message:`seek to time, time: ${c}`}),pe.log("seek to time",{time:c,action:_,forcePrecise:V}),hi.next(_),P.info.isLive$.getValue()){let Se=P.info.duration$.getValue(),et=Math.min(0,Se+c);P.seekTime(et,V)}else{if(I!=null&&I.getValue())return;P.info.isEnded$.getValue()&&(U({message:"seek after ended, call callbacks.onPlay"}),(oe=s==null?void 0:s.onPlay)==null||oe.call(s)),P.seekTime(Rv(c),V)}},_s=c=>{U({message:`seek to episode start time: ${c}`}),pe.log("seek to episode start time",{time:c}),zo(c,Vs.EPISODE,!0)},Ds=(c,_,V=!1)=>{U({message:`seek to percent, percent: ${c}`}),pe.log("seek to percent",{percent:c,action:_});let oe=ge(Ro)*c;zo(oe,_,V)},ua=c=>{U({message:`seek external, time: ${c}`}),pe.log("seek external",{time:c}),hi.next(Vs.UNKNOWN),P.seekTime(P.info.isLive$.getValue()?-c:c)},Bs=c=>{var oe,Se;let _=(oe=c.max)!=null?oe:"none",V=(Se=c.min)!=null?Se:"none";U({message:`set auto quality limitation. Max: ${_}. Min: ${V}`}),pe.log("set auto quality limits",{max:_,min:V}),P.setAutoQualityLimits(c)},gn=c=>{U({message:`seek external to episode start time: ${c}`}),pe.log("seek external to episode start time",{time:c}),zo(c,Vs.EPISODE,!0)},nt=c=>{U({message:`set playback rate to: ${c}`}),pe.log("set playback rate external",{playbackRate:c}),P.setPlaybackRate(c)},Jt=ae(!1),fo=ae(!1),Sr=ui([Ro],([c])=>!!p&&c>=J.suitableDurationForUsingRichSeek&&J.features.useRichSeek&&!w),zr=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),hn=ui([ei],([c])=>{let _=Dl(c);return zr?!_:_});ye.add(ze.subscribe(c=>{c!=="video"&&Jt.set(!1)}));let he=ae(void 0),gt=ae(!1),Ht=c=>{U({message:`start scrubbing, progress: ${c}`}),pe.log("start scrubbing",{progress:c}),gt.set(!0),jt(c)},jt=c=>{he.set(c)},$i,wi,Ei=()=>{he.set(void 0),gt.set(!1)},yi=()=>{clearTimeout(wi),clearTimeout($i),$i=window.setTimeout(()=>{Ei()},500),Ee==null||Ee.removeEventListener("seeked",yi)},Fs=(c,_=!1)=>{U({message:`complete scrubbing, progress: ${c}`}),pe.log("complete scrubbing",{progress:c}),Ds(c,Vs.SLIDER,_),ge(Kt.ui.isMobile)&&ge(Kt.state.currentFormat$)===Zd.HLS?(Ee==null||Ee.addEventListener("seeked",yi),wi=window.setTimeout(()=>{yi()},300)):Ei()},Hs=ui([yt,Ro,he],([c,_,V],oe)=>{oe(Vx(V)?V*_:c)}),Us=ae(!1),Ql=()=>{Us.set(!0)},pa=()=>{Us.set(!1)},Tr=ui([Bt],([{width:c}],_)=>{let V=D_(c);_(V)}),zs=Q.filter(c=>Bh(c)),fa=ui([Tr,Be],([c,_])=>_?zs.filter(V=>!V.hideOnMobile):zs.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(c))})),Cr=ae(Q.filter(c=>Fh(c))),bs=ui([Cr,Tr],([c,_])=>c.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(_))})),$s=ui([bs,fa],([c,_])=>[...J.features.additionalButtonsDesktopControlPanelRight?c.filter(V=>V.type==="desktop-control-panel-right"):[],...J.features.additionalButtons?_.map((V,oe)=>{var Se;return{id:oe,weight:oe,type:"desktop-control-panel-right",testId:V.testId,icon:V.iconUrl,onClick:V.onClick,ariaLabel:(Se=V.ariaLabel)!=null?Se:V.tooltip,tooltipText:V.tooltip}}):[]]),Ir=ae(H),ma=ui([Ir],([c])=>J.features.additionalSettingsMenuItems?c.map(_=>_.type==="SWITCH"?{..._,onClick:_.onChangeEnabled}:_):[]),Gl=(c,_)=>{let V=ge(Cr).map(oe=>oe.id!==c?oe:{...oe,..._});Cr.set(V)},el=c=>{let _=ge(Cr);if(_.some(V=>V.id===c.id)){U({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}_.push(c),Cr.set(_)},Yl=c=>{let _=ge(Cr);if(!_.some(V=>V.id===c)){U({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}_=_.filter(V=>V.id!==c),Cr.set(_)},va=c=>{hi.next(Vs.LIVE),U({message:"live switch to low latency "+c}),pe.log("live switch to low latency "+c),P.setLiveLowLatency(c)},jl=(c,_)=>{let V=ge(Ir).map(oe=>oe.id!==c?oe:{...oe,..._});Ir.set(V)},tl=c=>{let _=ge(Ir);if(_.some(V=>V.id===c.id)){U({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}_.push(c),Ir.set(_)},il=c=>{let _=ge(Ir);if(!_.some(V=>V.id===c)){U({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}_=_.filter(V=>V.id!==c),Ir.set(_)},sr=ae(z),dt=ui([sr],([c])=>J.features.additionalContextMenuItems?c:[]),ct=(c,_)=>{let V=ge(sr).map(oe=>oe.id!==c?oe:{...oe,..._});sr.set(V)},Xi=c=>{let _=ge(sr);if(_.some(V=>V.id===c.id)){U({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}_.push(c),sr.set(_)},ko=c=>{let _=ge(sr);if(!_.some(V=>V.id===c)){U({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}_=_.filter(V=>V.id!==c),sr.set(_)},Zi=ui([Be,it],([c,_],V)=>{V(c&&_)}),fi=()=>{hi.next(Vs.LIVE),U({message:"switch to active live"}),pe.log("switch to active live"),P.seekTime(0),P.info.playbackState$.getValue()!==Bl.PLAYING&&Kt.actions.internal.togglePlay()},Bi=()=>{pe.log("skip adman"),Te.skip()},Ws=(c=!0)=>{var oe;vr(Kt),U({message:`switch from ads to video, callPlay: ${c}`}),pe.log("switch from ads to video",{callPlay:c}),ce.set("video"),c&&P.play(),l&&mn(!0,!0);let _=(oe=ge(Qe))==null?void 0:oe.muted,V=!P.info.muted$.getValue();_!==void 0&&!V&&mn(_,!0),Qe.set(void 0)},Xl=()=>{vr(Kt),U({message:"switch from video to ads"}),pe.log("switch from video to ads"),Kt.actions.internal.pause(),_o(),ce.set("ads")},kc=c=>{vr(Kt);let _=c?"LiveWaitingStart":"thumb";pe.log("set live waiting start",{state:c,playerPhase:_}),ce.set(_)},mp=c=>{vr(Kt);let _=c?"LiveWaitingRecover":"thumb";pe.log("set live waiting recover",{state:c,playerPhase:_}),ce.set(_)},Pc=c=>{vr(Kt);let _=c?"LiveWaitingRecord":"thumb";pe.log("set live waiting record",{state:c,playerPhase:_}),ce.set(_)},vp=()=>(vr(Kt),pe.log("get debug text data"),Nh(P,Pe,Kt,Re.getTraceId())),Ac=()=>(vr(Kt),JSON.stringify(Re.getFinishedSpans())),Lc=()=>(vr(Kt),Oh(P,Pe,Kt)),ga=()=>Ee,gp=()=>{U({message:"toggle chromecast"}),pe.log("toggle chromecast"),P.toggleChromecast()},Ks=c=>{var V;if(vr(Kt),P.info.isEnded$.getValue())return;let _=!c;if(ge(Kt.playerPhase)==="ads"){U({message:`pause ads, internalCall: ${_}`}),pe.log("pause ads",{internalCall:_}),Te.pause();return}U({message:`pause video, internalCall: ${_}`}),pe.log("pause video",{internalCall:_}),_&&((V=s==null?void 0:s.onPause)==null||V.call(s)),P.pause()},ol=c=>{var V;vr(Kt);let _=!c;if(ge(Kt.playerPhase)==="ads"){U({message:`play ads, internalCall: ${_}`}),pe.log("play ads",{internalCall:_}),Te.play();return}U({message:`play video, internalCall: ${_}`}),pe.log("play video",{internalCall:_}),_&&((V=s==null?void 0:s.onPlay)==null||V.call(s)),P.play()},Mc=c=>{vr(Kt);let _=!c;if(ge(Kt.playerPhase)==="ads"){U({message:"player cannot be stopped during ads via external method"});return}U({message:`player will be stopped, internalCall: ${_}`}),k==null||k()},Vc=(c,_)=>{vr(Kt),U({message:`first start, show ads: ${c}, internalCall: ${!_}`}),pe.log("first start",{showAds:c,external:_}),c?ce.set("ads"):(ce.set("video"),_?P.play():Kt.actions.internal.togglePlay())},nl=()=>(U({message:"getting time codes"}),v),Rc=()=>{let c=nl();if(!c||[0,1].includes(c.length))return;let _=P.info.position$.getValue();return c.find(V=>V.time>_)},hp=c=>{let _=c;_||(_=Rc());let V=P.info.position$.getValue();pe.log("seek to next episode",{currentTime:V,..._}),_&&(U({message:"seek to next episode"}),zo(_.time,Vs.EPISODE,!0))},Nc=()=>{let c=nl();if(!c||[0,1].includes(c.length))return;let _=P.info.position$.getValue(),V=c.findIndex(Se=>Se.time>_),oe=V===-1?c.length-2:V-2;if(!(oe<0))return c[oe]},Fe=c=>{let _=c;_||(_=Nc());let V=P.info.position$.getValue();pe.log("seek to prev episode",{currentTime:V,..._}),_&&(U({message:"seek to prev episode"}),zo(_.time,Vs.EPISODE,!0))},mi=()=>(U({message:"getting preview thumbs data"}),pe.log("get preview thumbs data",{...p}),p),Wo=async()=>{let c=ie==null?void 0:ie.isActive(),_="none";ie!=null&&ie.isActive()?(_="exit",await(ie==null?void 0:ie.exit())):(_="request",await(ie==null?void 0:ie.request())),pe.log("toggle picture in picture",{isActive:c,action:_})},Er=(c=-90)=>{pe.log("rotate video",{alphaDiff:c}),ei.update(_=>_+c)},Po=ae([]);C==null||C.subscribe(c=>{let _=[];for(let V=0;V<c.length;V++){let{range:[oe,Se],subjects:et}=c[V];V===0&&oe!==0&&_.push({time:0,text:"",interactive:!1,completed:!0}),_.push({time:oe/1e3,text:"",interactive:!0,completed:J.features.interactiveTimeOpenUri?!et.length||et.every(It=>It.isRemoved):!et.length}),Se!==1/0&&_.push({time:Se/1e3,text:"",interactive:!1,completed:!0})}Po.set(_)});let Fb=ae(!1);I==null||I.subscribe(c=>{c&&ge(gt)&&Ei()});let Rv=c=>{if(!w)return c;let _=ge(Po),V=ge(Ro),Se=ge(_r)/V,et=_.find(It=>It.interactive&&!It.completed&&It.time>Se);return typeof(et==null?void 0:et.time)=="number"?Math.min(c,et.time-.05):c},Hb=()=>{Kt.ui.episodes.panelOpened$.set(!1)},Ub=()=>{pe.log("destroy store"),clearTimeout(wi),clearTimeout($i),ye.unsubscribe(),xo.unsubscribe(),P.destroy(),Te.destroy(),Z==null||Z.destroy(),j==null||j.destroy(),ee.unsubscribe(),Zt==null||Zt.disconnect(),Zt=null,Ze.destroy()},zb=ui([Xn,ze,Oi],([c,_,V])=>f.features.doubleForwardAvailable&&!c&&_==="video"&&V),_p=ae(!1),Nv=2,Oc=null,Ov=c=>{if(!ge(kn)&&c)return;let _=P.info.currentPlaybackRate$.getValue();c?_!==Nv&&(Oc=_,Bn(Nv,!1),_p.set(!0)):(Oc&&Bn(Oc,!1),_p.set(!1),Oc=null)};ze.subscribe(c=>{c!=="video"&&Ov(!1)});let Wb=()=>{Ks(!1),Jt.set(!0)},Kb=()=>{ol(!1),Jt.set(!1)},bp=!1,qb=()=>{fo.set(!0),bp=P.info.playbackState$.getValue()===Bl.PLAYING,Ks(!1)},Qb=()=>{fo.set(!1),!ge(Jt)&&bp&&ol(!1),bp=!1};P.events.playing$.subscribe(()=>{ge(Jt)&&Ks(!1)});let Kt={interfaceLanguage$:Le,isCyrillicRelatedInterface$:Et,initVideo:di,videoId:i,isClip:o,playerPhase:ze,vsid:Nt,state:{positionExact$:yt,positionWithScrubbing$:Hs,duration$:Ro,playbackState$:qt,playbackStateRealistic$:Ri,isPlaying$:kn,isLoaderVisible:Wi,bufferedProgress$:ao,isLive$:wo,canChangePlaybackSpeed$:Oi,isActiveLive$:Xn,isOldestAvailableLive$:hr,isRewindableLive$:Or,isEnded$:Zo,muted$:bo,volume$:Rr,trafficSavingEnabled$:oo,highQualityEnabled$:Ci,autoQualityLimitingAvailable$:Jo,availableVideoStreams$:Dr,availableAudioStreams$:Pn,videoStream$:An,audioStream$:ro,currentQuality$:on,isAutoQualityEnabled$:tn,availableQualities$:Mn,currentPlaybackRate$:Vn,availablePlaybackRates$:No,currentSubtitle$:To,availableTextTracks$:Di,availableSubtitlesList$:or,currentSubtitleCaptions$:xt,isAutoSubtitleCaptionVisible$:so,chromecastState$:Yn,chromecastDeviceName$:Nr,chromecastConnected$:no,currentFormat$:Jr,throughputEstimation$:ms,videoBitrate$:es,videoSize$:jn,errorLog$:be,crashed$:it,isAudioAvailable$:pn,isAudioDisabled:!!l,canDownload:J.features.download&&!!d,availableSources$:Do,hasMpegSources$:Qi,isInteractive:w,showInteractiveGraph:J.features.interactiveGraph,showSeekToInteractive:J.features.seekToInteractive,showPlayPrevChapter:J.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:J.features.interactiveTimeIndicator&&!!ge(Po).length,interactiveEpisodes$:Po,isInteractiveTime$:I?oi(I):ae(!1),isInteractiveExpectation$:Fb,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:A,looped$:vn,loadedMetadata$:Mt,isAutoQualityAvailable$:fn,previewTrackActive:Jt,previewTrackDragInProgress:fo},ui:{t:ut,controlsVisible:ae(!1),touched:ae(!1),controls:{prevButton:ae(void 0),playButton:ae(void 0),replayButton:ae(void 0),nextButton:ae(void 0),playPrevChapterButton:ae(void 0),seekToInteractiveButton:ae(void 0),interactiveGraphButton:ae(void 0),liveButton:ae(void 0),time:ae(void 0),episodes:ae(void 0),volume:ae(void 0),subtitles:ae(void 0),settings:ae(void 0),context:ae(void 0),chromecast:ae(void 0),pip:ae(void 0),fullscreen:ae(void 0),vkLogo:ae(void 0),interactiveTimeIndicator:ae(void 0),timeline:ae(void 0),autoplayNextToggle:ae(void 0),additionalButtons:Q.length?Q.reduce(c=>[...c,ae(void 0)],[]):[],disabledControls$:Dt},modals:{hotKeyMap:{show:ae(!1),data:ae({title:"",closeBtnText:"",groups:[]})}},isFullscreen:pt,isFullscreenOpenedByKeyboard:Ot,rotateAlpha:ei,isAutoplay:ae(!1),debugPanelVisible:ae(!1),episodes:{panelOpened$:ae(!1),openedByKeyboard$:ae(!1)},contextMenu:{visible$:ae(!1),btnRef$:ae(void 0),openedByBtnKeyboard$:ae(!1),openedByHotKey$:ae(!1),lastActiveElem$:ae(void 0),showContextMenuBtn$:ae(!1),position$:ae({top:0,left:0})},playerSize:Bt,isMobile:Be,mobileNotReportControlHidden$:Zi,icon3DVideoVisible:ae(!1),scrubbingInProgress:gt,volumeChangingInProgress:Us,is3DVideo:$e,currentGridType$:Tr,additionalButtonsDeprecated$:fa,additionalDesktopControlPanelRightButtons$:$s,additionalSettingsMenuItems$:ma,additionalContextMenuItems$:dt,interactiveHideMobileControls:ae(!1),overlayContainer$:ae(void 0),startedByKeyboard$:ae(!1),autoplayNextEnabled$:ae(!1),timerNextVideoRunning$:ae(!0),settingsMenu:{visible$:ae(!1),ref$:ae(void 0),openedByBtnKeyboard$:ae(!1)},settingsSubMenu:{visible$:ae(!1),ref$:ae(void 0),name$:ae(void 0)},userActionsDisabled:ae(!1),hiddenControls:{volume:ae(!1),vkLogo:ae(!1),pip:ae(!1),chromecast:ae(!1),settings:ae(!1)},isControlsAvailable:Ur,controlBlocks:{topLeft:ae(void 0),topRight:ae(void 0),middle:ae(void 0),bottom:ae(void 0),bottomLeft:ae(void 0),bottomRight:ae(void 0)},videoTitleInfo:ae(void 0),doubleForwardOn$:_p,doubleForwardAvailable$:zb,previewTrackNotificationVisible:ae(!1),previewTrackActive:Jt,previewTrackDragInProgress:fo,previewTrackAvailable:Sr,isPreviewTrackHorizontallyAligned:hn},ads:{position:ae(0),duration:ae(0),playbackState:ae("inactive"),canSkip:ae(!1),secondsToWatchBeforeSkip:ae(0),postrollPassed:ae(!1)},webApi:{pictureInPictureApi:ie,annotationsApi:Oe,slotsApi:De,focusManager:tt},actions:{internal:{preload:On,firstStart:c=>Vc(c,!1),play:()=>ol(!1),pause:()=>Ks(!1),togglePlay:nn,toggleMuted:Nn,openSettingsMenu:Pi,closeSettingsMenu:Fr,openSettingsSubMenu:ts,closeSettingsSubMenu:vs,setVolume:c=>Hr(c,!1),setMuted:c=>mn(c,!1),startVolumeChanging:Ql,stopVolumeChanging:pa,setVideoStream:Br,setAudioStream:c=>Ln(c,!1),setQuality:(c,_)=>Yi(c,_,!1),setTrafficSavingEnabled:(c,_)=>ji(c,_,!1),setHighQualityEnabled:(c,_)=>Dn(c,_,!1),setPlaybackRate:Bn,incrementPlaybackRate:gs,decrementPlaybackRate:hs,setSubtitle:c=>Ge(c,!1),toggleSubtitle:()=>Yt(!1),togglePictureInPicture:Wo,startScrubbing:Ht,progressScrubbing:jt,completeScrubbing:Fs,toggleChromecast:gp,switchToActiveLive:fi,switchFromAdsToVideo:Ws,switchFromVideoToAds:Xl,skipAd:Bi,setLiveWaitingStart:kc,setLiveWaitingRecover:mp,setLiveWaitingRecord:Pc,getDebugTextData:vp,getTraceTextData:Ac,getDebugPanelData:Lc,getVideoElement:ga,seekTime:(c,_,V)=>zo(c,_,V),clearDelayedBufferingCheckTimeout:En,seekEpisodeStartTime:_s,seekToPercent:Ds,getNextEpisode:Rc,seekToNextEpisode:hp,getPrevEpisode:Nc,seekToPrevEpisode:Fe,startLogging:un,stopLogging:St,startCameraManualRotation:Ft,stopCameraManualRotation:K,moveCameraFocusPX:kt,holdCamera:si,releaseCamera:lt,getVideoEpisodes:nl,getPreviewThumbsData:mi,downloadVideo:lo,addLanguage:kf,setLanguage:fe,nextMovie:vt,videoRotate:Er,correctSeekTimeToInteractive:Rv,replayInteractive:N,setLooped:Co,reportProblem:wr,setAutoplayNextEnabled:He,setTimerNextVideoRunning:Pt,prevVideoClick:bi,nextVideoClick:Fo,nextVideoAnnouncementShow:co,nextVideoAnnouncementClick:Io,nextVideoAnnouncementAuto:uo,nextVideoAnnouncementCancel:Ho,checkFullscreenSupport:st,changeDoubleForwardOn:Ov,closePreviewTrack:Kb,previewTrackOpened:Wb,previewTrackDragStarted:qb,previewTrackDragFinished:Qb},external:{firstStart:c=>Vc(c,!0),play:()=>ol(!0),pause:()=>Ks(!0),stop:()=>Mc(!0),seekTime:c=>ua(c),seekEpisodeStartTime:c=>gn(c),setPlaybackRate:c=>nt(c),setAutoQualityLimits:c=>Bs(c),setMuted:c=>mn(c,!0),toggleSubtitle:()=>Yt(!0),changeSubtitle:Ii,setVolume:c=>Hr(c,!0),returnFocusToEpisodes:Hb,updateAdditionalSettingsItem:jl,addAdditionalSettingsItem:tl,removeAdditionalSettingsItem:il,updateAdditionalContextItem:ct,addAdditionalContextItem:Xi,removeAdditionalContextItem:ko,updateAdditionalButton:Gl,addAdditionalButton:el,removeAdditionalButton:Yl,setLiveLowLatency:va,hideControls:()=>Eo(!1),showControls:()=>Eo(!0),setQuality:c=>Yi(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>ji(c,"to-video",!0),setHighQualityEnabled:c=>Dn(c,"to-video",!0),changeAudioStream:li}},callbacks:s,setUiCallbacks:c=>{Ue={...c}},getAdmanWrapper:()=>Te,getLogger:()=>We,getPlayer:()=>P,destroy:Ub};return Kt};function Qn(t,e,i,o){var v;let r=(v=e[i])==null?void 0:v.getBoundingClientRect(),a=o&&!!r&&!!(r.right-r.left),{top:l,left:d,bottom:s,right:u}=Ms(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 Kx=["disabledControls$","additionalButtons"],qx=["interactiveTimeIndicator"],Hl=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!Kx.includes(r)){let l=o||qx.includes(r);a.set(Qn(t,i,r,l))}}};var Gu=async(t,e,i)=>{await ho(),e&&i&&(i.focus(),t.set(!1))};var Qx=Ce('<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 bm(t){je(t,{children:(e,i)=>{var o=Qx();b(e,o)},$$slots:{default:!0}})}function $m(t,e){B(e,!0);let[i,o]=Ve(),r=()=>x(s,"$contextMenuVisible$",i),a=h(e,"disabled",3,!1),l=h(e,"ariaLabel",3,""),d=ve(),s=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,v=d.ui.contextMenu.showContextMenuBtn$,p=d.ui.contextMenu.position$,f=d.ui.contextMenu.btnRef$,$=W(void 0);Ne(()=>{n($)&&Tt(()=>{f.set(n($))})});let y=I=>{let N=sa(I),k=A_(n($));p.set(k),u.set(N),s.set(!r())},g=()=>{v.set(!0)},w=()=>{v.set(!1)},C=m(()=>r()?"opened":"");Wt(t,{get className(){return n(C)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:g,blur:w,get ariaExpanded(){return r()},get ref(){return n($)},set ref(I){O($,I,!0)},children:(I,N)=>{bm(I,{})},$$slots:{default:!0}}),F(),o()}var Gx=t=>{t.stopPropagation()},Yx=M("<div><!> <div></div> <div></div></div>"),jx={hash:"s-27",code:'.interactive-episode-icon-animated.s-27{height:32px;opacity:1;position:absolute;right:16px;top:16px;transition:.3s;width:32px}.interactive-episode-icon-animated.icon-small.s-27{height:28px;width:28px}.invisible.s-27{opacity:0;visibility:hidden}.fullscreen.s-27:not(.mobile){height:40px;right:23px;top:19px;width:40px}.mobile.s-27{height:28px;right:14px;top:12px;width:28px}.fullscreen.mobile.s-27{height:32px;width:32px}@media screen and (orientation:portrait){.interactive-episode-icon-animated.mobile.fullscreen.s-27{right:16px;top:40px}}@keyframes s-27-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-27{animation:s-27-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-27{animation-play-state:paused}.interactive-episode-icon-animated svg{height:100%;width:100%}.ref-block.s-27{height:100%;position:absolute;top:0;visibility:hidden;width:100%}.hidden.s-27{display:none}'};function ec(t,e){var j;B(e,!0),q(t,jx);let[i,o]=Ve(),r=()=>x(w,"$isMobile",i),a=()=>x(k,"$areControlsVisible",i),l=()=>x(A,"$currentGridType$",i),d=()=>x(I,"$isInteractiveTime$",i),s=()=>x(g,"$interactiveControlsOpacity$",i),u=()=>x(N,"$showInteractiveTimeIndicatorTooltip$",i),v=()=>x(C,"$isFullscreen",i),p=h(e,"ref",15,void 0),f=W(void 0),$=ve(),y=yo(),{interactiveControlsOpacity$:g}=y,w=$.ui.isMobile,C=$.ui.isFullscreen,I=$.state.isInteractiveTime$,N=y.showInteractiveTimeIndicatorTooltip$,k=$.ui.controlsVisible,E=(j=$.callbacks)==null?void 0:j.onInteractiveTimeIndicatorClick,A=$.ui.currentGridType$,Q=m(()=>!r()&&a()),H=m(()=>Ls(l(),"s")),z=m(()=>!d()||!!s()||n(Q)),Y=W(!1);Ne(()=>{O(Y,n(z),!0)});let le=()=>{O(Y,!0)},X=()=>{var ie;re(),(ie=n(f))==null||ie.addEventListener("animationiteration",le,{once:!0})},re=()=>{var ie;O(Y,!1),(ie=n(f))==null||ie.removeEventListener("animationiteration",le)},Z=ie=>{N.set(ie)},we=m(()=>u()&&!n(z));Ne(()=>{u()?X():re()});let ue=()=>{n(z)||(N.set(!0),E==null||E())};an(()=>{N.clearTimeout(),re()});let ne=()=>{N.set(!1)},_e=G("tooltip_interactive_interaction_time_indicator");var xe=Yx();let J;xe.__mousemove=[Gx],xe.__click=ue;var Re=T(xe);Vo(Re,{get tooltipContent(){return _e},get tooltipVisible(){return n(we)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:Z,get ref(){return p()},set ref(ie){p(ie)},children:(ie,Oe)=>{Kd(ie,{completed:!0})},$$slots:{default:!0}});var pe=L(Re,2);let P;Ye(pe,ie=>p(ie),()=>p());var We=L(pe,2);let Te;Ye(We,ie=>O(f,ie),()=>n(f)),S(xe),D((ie,Oe,De)=>{J=se(xe,1,"interactive-episode-icon-animated s-27",null,J,ie),P=se(pe,1,"ref-block s-27",null,P,Oe),Te=se(We,1,"pulse s-27",null,Te,De)},[()=>({mobile:r(),fullscreen:v(),invisible:n(z),"icon-small":n(H)}),()=>({hidden:n(z)}),()=>({paused:n(Y)})]),rt("mouseleave",xe,ne),b(t,xe),F(),o()}Xe(["mousemove","click"]);function Yu(t,e){B(e,!0);let i=h(e,"tooltipEnabled",3,!0),o=h(e,"disabled",3,!1),r=h(e,"className",3,void 0),a=h(e,"ref",15),l=h(e,"tooltipVisible",3,!1);Vo(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=Ae();let v=m(()=>e.buttonComponent);var p=de(u);Mi(p,()=>n(v),(f,$)=>{$(f,ks(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),b(d,u)},$$slots:{default:!0}}),F()}var Rs={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var Zx=Ce('<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 ca(t,e){B(e,!0);let i=h(e,"reversed",3,!1),o=m(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),r=m(()=>`${ln(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(r)},get testId(){return n(a)},get shadow(){return e.shadow},children:(l,d)=>{var s=Zx();b(l,s)},$$slots:{default:!0}}),F()}var Jx=M('<div class="icon-background-mobile s-21"><!></div>'),ew={hash:"s-21",code:".icon-background-mobile.s-21{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 za(t,e){B(e,!0),q(t,ew);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"disabled",3,!1),l=ve().ui.t,d=m(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),s=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}`);Wt(t,{get className(){return n(u)},get testId(){var v;return`btn-${(v=e.type)!=null?v:""}`},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(v){i(v)},children:(v,p)=>{var f=Ae(),$=de(f);{var y=w=>{var C=Jx(),I=T(C);let N=m(()=>e.type==="prev");ca(I,{get size(){return"32"},get reversed(){return n(N)}}),S(C),b(w,C)},g=w=>{let C=m(()=>e.type==="prev");ca(w,{get size(){return"24"},get reversed(){return n(C)}})};R($,w=>{o()?w(y):w(g,!1)})}b(v,f)},$$slots:{default:!0}}),F()}var tw=Ce('<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=m(()=>ln(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,r)=>{var a=tw();b(o,a)},$$slots:{default:!0}}),F()}import{noop as iw}from"@vkontakte/videoplayer-shared/es2018";var ow=M('<div class="icon-background-mobile s-25"></div>'),nw=M("<!> <div><!></div>",1),rw={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 Ul(t,e){B(e,!0),q(t,rw);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"disabled",3,!1),a=h(e,"className",3,""),l=h(e,"click",3,iw),d=G("tooltip_restart"),s=m(()=>`${o()?"btn-m--play":""} ${a()}`);Wt(t,{get className(){return n(s)},testId:"replay-btn",get ariaLabel(){return d},get disabled(){return r()},get click(){return l()},get ariaKeyShortCut(){return ls.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,v)=>{var p=nw(),f=de(p);{var $=I=>{var N=ow();b(I,N)};R(f,I=>{o()&&I($)})}var y=L(f,2);let g;var w=T(y);let C=m(()=>o()?"48":"24");tc(w,{get size(){return n(C)}}),S(y),D(I=>g=se(y,1,"s-25",null,g,I),[()=>({mobile:o()})]),b(u,p)},$$slots:{default:!0}}),F()}var sw=Ce('<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 Ns(t,e){B(e,!0);let i=m(()=>ln(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,r)=>{var a=sw();b(o,a)},$$slots:{default:!0}}),F()}import{noop as aw}from"@vkontakte/videoplayer-shared/es2018";var lw=M('<div class="icon-background-mobile s-24"><!></div>'),dw={hash:"s-24",code:".icon-background-mobile.s-24{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 zl(t,e){B(e,!0),q(t,dw);let[i,o]=Ve(),r=()=>x(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=yo(),l=h(e,"ref",15,void 0),d=h(e,"isMobile",3,!1),s=h(e,"isPlaying",3,!1),u=h(e,"disabled",3,!1),v=h(e,"className",3,""),p=h(e,"click",3,aw),$=ve().ui.t,{toggle:y}=a,g=m(()=>y),w=m(()=>r()!==null),C=m(()=>n(w)?r():s()),I=m(()=>n(C)?$("tooltip_pause"):$("tooltip_play")),N=m(()=>n(C)?Ns:Tn),k=m(()=>`${d()?"btn-m--play":""} ${v()}`),E=m(()=>n(w)?n(g):p());Wt(t,{get className(){return n(k)},testId:"play-btn",get click(){return n(E)},get disabled(){return u()},get ariaLabel(){return n(I)},get ariaKeyShortCut(){return ls.KeyK},get ref(){return l()},set ref(A){l(A)},children:(A,Q)=>{var H=Ae();let z=m(()=>n(N));var Y=de(H);{var le=re=>{var Z=lw(),we=T(Z);Mi(we,()=>n(z),(ue,ne)=>{ne(ue,{get size(){return"48"}})}),S(Z),b(re,Z)},X=re=>{var Z=Ae(),we=de(Z);Mi(we,()=>n(z),(ue,ne)=>{ne(ue,{get size(){return"24"}})}),b(re,Z)};R(Y,re=>{d()?re(le):re(X,!1)})}b(A,H)},$$slots:{default:!0}}),F(),o()}var cw=Ce('<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 ym(t){je(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=cw();b(e,o)},$$slots:{default:!0}})}function ic(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=G("tooltip_interactive_go_back"),l=m(()=>o()?"hidden":"");Wt(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)=>{ym(d,{})},$$slots:{default:!0}}),F()}var uw=M('<span class="gutter s-26"><span><!></span></span>'),pw={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,pw);let[i,o]=Ve(),r=()=>x(s,"$autoplayNextEnabled$",i),a=h(e,"ref",15,void 0),l=ve(),d=l.ui.t,s=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,v=()=>{u(!r(),!0)},p=d("aria_label_autoplay"),f="12",$="#000",y=m(()=>r()?"true":"false");Wt(t,{click:v,get ariaLabel(){return p},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref(g){a(g)},children:(g,w)=>{var C=uw(),I=T(C);let N;var k=T(I);{var E=Q=>{Tn(Q,{get size(){return f},fill:$})},A=Q=>{Ns(Q,{get size(){return f},fill:$})};R(k,Q=>{r()?Q(E):Q(A,!1)})}S(I),S(C),D(Q=>N=se(I,1,"toggler s-26",null,N,Q),[()=>({enabled:r()})]),b(g,C)},$$slots:{default:!0}}),F(),o()}var fw=Ce('<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 xm(t){je(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=fw();ci(),b(e,o)},$$slots:{default:!0}})}function nc(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=G("tooltip_interactive_seek"),l=m(()=>o()?"hidden":"");Wt(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)=>{xm(d,{})},$$slots:{default:!0}}),F()}var mw=Ce('<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>'),vw=Ce('<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 wm(t,e){let i=h(e,"isOpened",3,!1),o=m(()=>i()?"graph-close-icon":"graph-open-icon");je(t,{get testId(){return n(o)},children:(r,a)=>{var l=vw(),d=L(de(l));{var s=u=>{var v=mw();b(u,v)};R(d,u=>{i()&&u(s)})}b(r,l)},$$slots:{default:!0}})}function rc(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=h(e,"graphIsOpened",3,!1),d=ve().ui.t,s=m(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=m(()=>o()?"hidden":"");Wt(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(v){i(v)},children:(v,p)=>{let f=m(()=>!!a());wm(v,{get isOpened(){return n(f)}})},$$slots:{default:!0}}),F()}import{PlaybackState as Y_}from"@vkontakte/videoplayer-core/es2018";function sc(t,e){B(e,!0);let[i,o]=Ve(),r=()=>x(u,"$playbackState$",i),a=h(e,"isMobile",3,!1),l=h(e,"isLiveActive",3,!1),d=h(e,"ariaLabel",3,""),s=ve(),u=s.state.playbackState$,v=s.actions.internal.switchToActiveLive,p=s.actions.internal.togglePlay,f=m(()=>()=>{if(!l()){v();return}r()===Y_.PAUSED&&p()}),$=m(()=>a()?"":"btn--live btn-full-opacity"),y=m(()=>l()?"btn-live":"btn-live-offset"),g=m(()=>l()&&r()===Y_.PLAYING);Wt(t,{get className(){return n($)},get testId(){return n(y)},get disabled(){return n(g)},get ariaLabel(){return d()},get click(){return n(f)},children:(w,C)=>{Md(w,{get isActive(){return l()}})},$$slots:{default:!0}}),F(),o()}import{noop as j_}from"@vkontakte/videoplayer-shared/es2018";var gw=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),hw=M('<img class="icon" aria-hidden="true"/>');function Wa(t,e){"use strict";let i=W(!1),o=()=>{O(i,!0)};var r=Ae(),a=de(r);{var l=s=>{var u=gw();b(s,u)},d=s=>{var u=hw();D(()=>Me(u,"src",e.icon)),rt("error",u,o),Ea(u),b(s,u)};R(a,s=>{n(i)?s(l):s(d,!1)})}b(t,r)}function Sm(t,e){B(e,!0);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,j_),r=h(e,"ref",15),a=m(()=>o()===j_),l=m(()=>n(a)||i()),d=m(()=>n(a)?"btn-full-opacity":"");Vo(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 v=m(()=>{var p;return(p=e.testId)!=null?p:e.id});Wt(s,{get className(){return n(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(l)},get testId(){return n(v)},children:(p,f)=>{Wa(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),F()}var X_=t=>!!t.buttonComponent;var Os={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[r,a]of Object.entries(e))a.set(Qn(t,i,r,o))};import{interpolate as Tm}from"@vkontakte/videoplayer-shared/es2018";var Z_=10,J_=40,Cm=.2,bw=.5,$w=65,yw=114,xw=4,eb=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=m(()=>i?$w:yw),r=W(!1),a=W(0),l=W(0),d=m(()=>n(o)+Z_-J_-xw),s=m(()=>Tm(n(a),[Cm,1],[0,-n(d)])),u=m(()=>Tm(n(a),[Cm,1],[0,J_])),v=m(()=>Tm(n(a),[Cm,1],[0,n(o)+Z_]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(v),onPointerDown:g=>{var w;O(l,((w=e())==null?void 0:w.getBoundingClientRect().bottom)||0,!0),O(r,!0)},onPointerMove:g=>{if(!n(r))return;let w=Math.max(Math.min(g.clientY-n(l),0),-n(d));O(a,Math.abs(w/n(d)),!0)},onPointerUp:()=>{O(r,!1),O(a,n(a)>=bw?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{O(a,0)}}};var ww=t=>t;function fs(t,{delay:e=0,duration:i=400,easing:o=ww}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var Sw=M('<span class="root s-2c"> </span>'),Tw={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 Im(t,e){q(t,Tw);var i=Sw(),o=T(i,!0);S(i),D(()=>me(o,e.time)),b(t,i)}var Cw=M('<div class="tooltip-wrapper s-j"><div><!></div></div>'),Iw={hash:"s-j",code:'.tooltip-wrapper.s-j{display:block;position:relative}.tooltip.s-j{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-j: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-j{opacity:1;visibility:visible}'};function Em(t,e){q(t,Iw);let i=h(e,"active",3,!1),o=h(e,"pointer",3,!1),r=h(e,"translateXPx",3,0),a=h(e,"translateYPx",3,0),l=h(e,"leftOffset",3,0),d=h(e,"rightOffset",3,0),s=W(void 0),u=W(void 0);function v(w){if(!n(u))return 0;let{width:C}=n(u).getBoundingClientRect(),I=C/2;return w<I?I+l():w>e.containerWidth-I?e.containerWidth-I-d():w}let p=m(()=>v(r()));var f=Cw(),$=T(f);let y;var g=T($);ii(g,()=>{var w;return(w=e.children)!=null?w:mt}),S($),Ye($,w=>O(u,w),()=>n(u)),S(f),Ye(f,w=>O(s,w),()=>n(s)),D(w=>{qe(f,`transform: translate(${n(p)}px, ${a()}px);`),y=se($,1,"tooltip s-j",null,y,w),qe($,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,f)}var tb=t=>Math.abs(t)/90%4===1;var Ew=M('<div class="preview s-i"></div>'),kw=M('<div class="time s-i"> </div>'),Pw=M('<div><!> <div class="episode s-i"><!></div> <!></div>'),Aw={hash:"s-i",code:".timeline-preview.s-i{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-i{bottom:72px}.preview.s-i{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)}.episode.s-i{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-i,.time.s-i{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-i{color:var(--white)}"};function km(t,e){B(e,!0),q(t,Aw);let[i,o]=Ve(),r=()=>x(y,"$rotateAlpha",i),a=()=>x(g,"$playerSize",i),l={MOBILE:150,DESKTOP:278},d=h(e,"time",3,""),s=h(e,"isMobile",3,!1),u=h(e,"videoEpisodes",19,()=>[]),v=h(e,"progress",3,0),p=h(e,"duration",3,0),f=h(e,"isInteractive",3,!1),$=ve(),y=$.ui.rotateAlpha,g=$.ui.playerSize,w=W(0),C=W(0),I=W(""),N=W(0),k=W(0),E=W(0),A=W(0),Q=m(()=>Fu(v(),p(),u())),H=m(()=>Dl(r())),z=m(()=>tb(r())),Y=m(re),le=m(()=>(n(z)?1:-1)*(n(w)/2-n(C)/2)),X=m(()=>n(le)*-1);Ne(()=>{(j=>{O(w,j.width,!0),O(C,j.height,!0)})(we())}),Ne(()=>{(j=>{O(I,j.imgSrc,!0),O(N,j.imgWidth,!0),O(k,j.imgHeight,!0),O(E,j.imgOffsetX,!0),O(A,j.imgOffsetY,!0)})(ue(v()))});function re(){var De;let j=s()?l.MOBILE:l.DESKTOP,{isVertical:ie}=Z(),Oe=30;return(De=n(Q))!=null&&De.text&&(Oe+=16),(ie||n(H))&&(Oe+=18,Oe+=50),Math.min(Math.max(a().height-Oe,0),j)}function Z(){let j=e.previewThumbsData.frameWidth,ie=e.previewThumbsData.frameHeight,Oe=ie>j;return{width:j,height:ie,isHorizontal:!Oe,isVertical:Oe}}function we(){let{height:j,isHorizontal:ie,isVertical:Oe,width:De}=Z();return ie&&(j=j/De*n(Y),De=n(Y)),Oe&&(De=De/j*n(Y),j=n(Y)),{width:De,height:j}}function ue(j){let ie;e.previewThumbsData.isUV?ie=Math.floor(p()*j/e.previewThumbsData.frequency):ie=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*j)));let Oe=Math.floor(ie/e.previewThumbsData.countPerImage),De=Math.floor(ie%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),tt=ie%e.previewThumbsData.countPerRow,U=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&Oe===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(U=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&U++);let Pe=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&Oe===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(Pe=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let Ee=n(w)*Pe,Ue=n(C)*U,Ze=-tt*n(w),ye=-De*n(C);return{imgSrc:e.previewThumbsData.links[Oe],imgWidth:Ee,imgHeight:Ue,imgOffsetX:Ze,imgOffsetY:ye}}var ne=Pw();let _e;var xe=T(ne);{var J=j=>{var ie=Ew();D(()=>qe(ie,`width: ${n(w)}px; height: ${n(C)}px; background-image: url(${n(I)}); background-size: ${n(N)}px ${n(k)}px; background-position: ${n(E)}px ${n(A)}px;
|
|
61
|
+
transform: rotate(${r()}deg) ${n(H)?`translate(${n(le)}px, ${n(X)}px)`:""};
|
|
62
|
+
`)),b(j,ie)};R(xe,j=>{n(I)&&j(J)})}var Re=L(xe,2),pe=T(Re);{var P=j=>{var ie=Ae(),Oe=de(ie);{var De=U=>{var Pe=as();D(Ee=>me(Pe,Ee),[()=>G("tooltip_episode_unfinished")]),b(U,Pe)},tt=U=>{var Pe=as();D(()=>me(Pe,n(Q).text||"")),b(U,Pe)};R(Oe,U=>{f()&&n(Q).completed===!1?U(De):U(tt,!1)})}b(j,ie)};R(pe,j=>{n(Q)&&j(P)})}S(Re);var We=L(Re,2);{var Te=j=>{var ie=kw(),Oe=T(ie,!0);S(ie),D(()=>me(Oe,d())),b(j,ie)};R(We,j=>{f()||j(Te)})}S(ne),D(j=>{_e=se(ne,1,"timeline-preview s-i",null,_e,j),qe(ne,`width: ${n(H)?n(C):n(w)}px;`)},[()=>({mobile:s()})]),b(t,ne),F(),o()}var Lw=M('<span class="time s-f"> </span>'),Mw=M("<!> <!>",1),Vw={hash:"s-f",code:".time.s-f{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 Pm(t,e){var fe,Le,bt,Et,ut;B(e,!0),q(t,Vw);let[i,o]=Ve(),r=()=>x(X,"$interactiveEpisodes$",i),a=()=>x(A,"$duration$",i),l=()=>x(E,"$position$",i),d=()=>x(we,"$isInteractiveExpectation$",i),s=()=>x(Z,"$isInteractiveTime$",i),u=()=>x(xe,"$previewTrackActive",i),v=()=>x(Q,"$isLive$",i),p=()=>x(_e,"$disabledControls$",i),f=()=>x(z,"$isMobile",i),$=()=>x(H,"$isActiveLive$",i),y=()=>x(k,"$bufferedProgress$",i),g=h(e,"showTimeline",3,!1),w=h(e,"withEpisodes",3,!0),C=h(e,"ref",15,void 0),I=ve(),N=Lt(),k=I.state.bufferedProgress$,E=I.state.positionWithScrubbing$,A=I.state.duration$,Q=I.state.isLive$,H=I.state.isActiveLive$,z=I.ui.isMobile,Y=N.features.episodes&&w()?I.actions.internal.getVideoEpisodes():void 0,le=I.actions.internal.getPreviewThumbsData(),X=I.state.interactiveEpisodes$,re=I.state.isInteractive,Z=I.state.isInteractiveTime$,we=I.state.isInteractiveExpectation$,ue=I.actions.internal.correctSeekTimeToInteractive,ne=(fe=I.callbacks)==null?void 0:fe.onDisabledTimelineClick,_e=I.ui.controls.disabledControls$,xe=I.ui.previewTrackActive,J=(bt=(Le=I.callbacks)==null?void 0:Le.uiInfo)==null?void 0:bt.onTimelineMouseEnter,Re=(ut=(Et=I.callbacks)==null?void 0:Et.uiInfo)==null?void 0:ut.onTimelineMouseLeave,pe=I.ui.t,P=N.features.interactiveResponsiveUi,We=m(()=>re?r():Y),Te=m(()=>Xo(a())),j=m(()=>Xo(l())),ie=m(()=>l()/a()),Oe=m(()=>d()||s()),De=W(!1),tt=W(""),U=W(0),Pe=W(0),Ee=W(0),Ue=m(()=>({containerWidth:n(Pe),translateXPx:n(U),translateYPx:re&&le?-36:-16,active:n(De)&&g()&&!n(Oe)&&!P&&!u(),pointer:!N.features.timelinePreview||!le||v()})),Ze=pe("aria_timeline"),ye=m(()=>pe("aria_timeline_value",{position:n(j),duration:n(Te)}));function ke(ce){return!ue||!re?ce:ue(ce*a())/a()}function Be(ce,ze){var Qe;(Qe=e.onSliderPointerDown)==null||Qe.call(e,ze),I.actions.internal.startScrubbing(ke(ce))}function Nt(ce){s()||I.actions.internal.progressScrubbing(ke(ce))}function pt(ce){var ze;I.actions.internal.completeScrubbing(ke(ce)),O(De,!1),(ze=e.onSliderPointerUp)==null||ze.call(e)}function Ot(ce,ze,Qe){var at;(at=e.onSliderPointerEnter)==null||at.call(e,ce),ei(ce,ze,Qe),O(De,!0)}function st(ce,ze,Qe,at){var Dt;(Dt=e.onSliderMove)==null||Dt.call(e,at,ce),ei(ce,ze,Qe),O(De,!0)}function wt(){var ce;O(De,!1),(ce=e.onSliderLeave)==null||ce.call(e)}function ei(ce,ze,Qe){O(Ee,ke(ce),!0),O(U,ze,!0),Qe&&O(Pe,Qe,!0),O(tt,Mt(ce),!0)}function Mt(ce){let ze=Xo((v()?1-ce:ce)*a());return v()?`-${ze}`:ze}let $e=m(()=>p().has("TIMELINE"));var be=Mw(),ee=de(be);Em(ee,ks(()=>n(Ue),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(ce,ze)=>{var Qe=Ae(),at=de(Qe);{var Dt=ti=>{km(ti,{get time(){return n(tt)},get isMobile(){return f()},get videoEpisodes(){return n(We)},get previewThumbsData(){return le},get progress(){return n(Ee)},get duration(){return a()},get isInteractive(){return re}})},Bt=ti=>{var vi=Lw(),Wi=T(vi,!0);S(vi),D(()=>me(Wi,n(tt))),b(ti,vi)};R(at,ti=>{N.features.timelinePreview&&le&&!v()?ti(Dt):ti(Bt,!1)})}b(ce,Qe)},$$slots:{default:!0}}));var it=L(ee,2);Ha(it,{className:"timeline-slider",get isActiveLive(){return $()},get isMobile(){return f()},get ariaLabel(){return Ze},ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return l()},get ariaValueText(){return n(ye)},get loadedProgress(){return y()},get filledProgress(){return n(ie)},get handleProgress(){return n(ie)},get videoEpisodes(){return n(We)},onPointerDown:Be,onHandleMove:Nt,onPointerMove:st,onPointerUp:pt,onPointerEnter:Ot,onPointerLeave:wt,get onMouseEnter(){return J},get onMouseLeave(){return Re},get onDisabledClick(){return ne},get isInteractive(){return re},get disabled(){return n($e)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:pt,get ref(){return C()},set ref(ce){C(ce)}}),b(t,be),F(),o()}var Rw={hash:"s-g",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,Rw);let[i,o]=Ve(),r=()=>x(s,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"duration",3,0),d=ve(),s=d.ui.isMobile,u=d.ui.t,v=m(()=>Xo(l())),p=m(()=>Xo(a())),f=m(()=>a()/l()),$=m(()=>u("aria_timeline_value",{position:n(p),duration:n(v)})),y=m(()=>Math.round(n(f)*100));Ha(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n($)},get filledProgress(){return n(f)},hideHandel:!0,get squareBorders(){return r()}}),F(),o()}var Nw=M("<div><!></div>"),Ow=M("<div></div>"),Dw={hash:"s-e",code:".timeline.s-e{align-items:center;bottom:0;box-sizing:border-box;display:flex;min-width:86px;pointer-events:all;position:relative;width:100%}.timeline.mobile.s-e{height:16px;margin-top:6px;padding:6px 12px 7px}.withoutPadding.s-e{padding:0}.timeline-stub.s-e{min-width:20px;width:100%}.timeline-stub.mobile.s-e{height:8px}"};function Ka(t,e){B(e,!0),q(t,Dw);let[i,o]=Ve(),r=()=>x(w,"$isLive$",i),a=()=>x(N,"$isMobile",i),l=()=>x(k,"$disabled",i),d=()=>x(I,"$adPosition",i),s=()=>x(C,"$adDuration",i),u=h(e,"isAds",3,!1),v=h(e,"isHidden",3,!1),p=h(e,"timelineNotAvailable",3,!1),f=h(e,"needPadding",3,!0),$=h(e,"ref",15,void 0),y=ve(),g=Lt(),w=y.state.isLive$,C=y.ads.duration,I=y.ads.position,N=y.ui.isMobile,k=ae(!1),E=m(()=>!p()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var A=Ae(),Q=de(A);{var H=Y=>{var le=Nw();let X;var re=T(le);{var Z=ue=>{ac(ue,{get position(){return d()},get duration(){return s()}})},we=ue=>{Pm(ue,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return n(E)},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(ne){$(ne)}})};R(re,ue=>{u()?ue(Z):ue(we,!1)})}S(le),Es(le,()=>Pl(v()&&g.features.usePerformanceFix,k,g.disableInvisibleComponentsTimeout)),D(ue=>X=se(le,1,"timeline s-e",null,X,ue),[()=>({withoutPadding:!f(),mobile:a(),"out-of-flow":l()})]),b(Y,le)},z=Y=>{var le=Ow();let X;D(re=>X=se(le,1,"timeline-stub s-e",null,X,re),[()=>({mobile:a()})]),b(Y,le)};R(Q,Y=>{n(E)?Y(H):Y(z,!1)})}b(t,A),F(),o()}import{getRangeAroundIndex as Bw}from"@vkontakte/videoplayer-shared/es2018";var Fw=(t,e,i,o,r,a,l)=>{O(e,!0),O(i,t.clientX,!0),O(o,n(r),!0),a(l())},Hw=M("<div></div>"),Uw=M('<div><div class="track s-2b"></div></div>'),zw={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 Lm(t,e){B(e,!0),q(t,zw);let[i,o]=Ve(),r=()=>x(N,"$rotateAlpha",i),a=()=>x(g,"$position$",i),l=()=>x(y,"$duration$",i),d=ve(),{countPerImage:s=0,countPerRow:u=0,countTotal:v=0,links:p=[],frameHeight:f=0,frameWidth:$=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:g}=d.state,{startScrubbing:w,progressScrubbing:C,completeScrubbing:I}=d.actions.internal,N=d.ui.rotateAlpha,k=W(void 0),E=W(!1),A=W(0),Q=W(0),H=W(0),z=W(0),Y=m(()=>f<=$),le=m(()=>Dl(r())),X=m(()=>n(Y)?!n(le):n(le)),re=114,Z=65,we=3,ue=m(()=>n(X)?re:Z),ne=m(()=>n(Y)?re:Z),_e=m(()=>n(Y)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),xe=m(()=>v*n(ue)),J=W(0);Ne(()=>{O(z,Math.ceil(-n(H)/n(ue))-1),O(H,-n(xe)*a()/l())});let Re=()=>{I(pe(),!0)},pe=()=>l()*-n(H)/n(xe)/l(),P=!1,We=ye=>{if(!n(E))return!1;let ke=ye.clientX-n(A);O(H,n(Q)+ke),O(H,Math.max(Math.min(n(H),0),-n(xe)),!0),Math.abs(ke)>1&&(P=!0),C(pe())},Te=ye=>{n(E)&&(O(E,!1),!P&&ye&&O(H,-(ye.offsetX-n(J)/2)),P=!1,Re())},j=()=>{n(E)&&Te()},ie=m(()=>s/u),Oe=(ye,ke)=>{if(ye!==p.length-1)return u;let Be=0,Nt=ke*u;for(let pt=1;pt<=u;pt++)ye*s+Be+Nt<v&&Be++;return Be},De=m(()=>Math.floor(n(z)/s)),tt=m(()=>Bw(3,n(De),p.length-1)),U=(ye,ke,Be)=>{let Nt=s*n(ue);return ye*Nt+ke*n(ue)*u+n(J)/2-we/2+Be*n(ue)},Pe=m(()=>[`--row-numbers: ${n(ie)}`,`--column-numbers: ${u}`,`--frame-width: ${n(ne)}px`,`--frame-height: ${n(_e)}`].join(";"));var Ee=Uw();let Ue;var Ze=T(Ee);Ze.__pointerdown=[Fw,E,A,Q,H,w,pe],Ze.__pointermove=We,Ze.__pointerup=Te,gi(Ze,20,()=>n(tt),ye=>ye,(ye,ke)=>{var Be=Ae(),Nt=de(Be);gi(Nt,16,()=>Array.from({length:n(ie)},(pt,Ot)=>Ot),pt=>pt,(pt,Ot)=>{var st=Ae(),wt=de(st);gi(wt,16,()=>Array.from({length:Oe(ke,Ot)},(ei,Mt)=>Mt),ei=>ei,(ei,Mt)=>{var $e=Hw();D((be,ee)=>{qe($e,be),se($e,1,ee,"s-2b")},[()=>`--row-index: ${Ot}; --column-index: ${Mt}; left: ${U(ke,Ot,Mt)}px; background-image: url(${p[ke]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),b(ei,$e)}),b(pt,st)}),b(ye,Be)}),S(Ze),S(Ee),Ye(Ee,ye=>O(k,ye),()=>n(k)),D(ye=>{Ue=se(Ee,1,"root s-2b",null,Ue,ye),qe(Ee,n(Pe)),qe(Ze,`transform: translateX(${n(H)}px); width: ${n(xe)}px;`)},[()=>({"is-vertical-video":!n(Y),"vertically-rotated":n(le)})]),rt("mouseleave",Ze,j),wn(Ee,"clientWidth",ye=>O(J,ye)),b(t,Ee),F(),o()}Xe(["pointerdown","pointermove","pointerup"]);var Ww=M('<div class="notification s-2d"><span class="description s-2d"> </span></div>'),Kw={hash:"s-2d",code:".notification.s-2d{background:var(--notification-bg);border-radius:var(--notification-radius);padding:9px 14px 10px 12px}.description.s-2d{font-size:14px;line-height:18px}"};function Mm(t,e){B(e,!1),q(t,Kw);let i=340,{ui:{t:o}}=ve();$o();var r=Ww(),a=T(r),l=T(a,!0);S(a),S(r),D(d=>me(l,d),[()=>o("preview_track_close_tooltip")],_n),jr(3,r,()=>fs,()=>({duration:i})),b(t,r),F()}import{getRangeAroundIndex as qw}from"@vkontakte/videoplayer-shared/es2018";var Qw=M('<div class="preview-track-close tooltip s-2a"><!></div>'),Gw=M('<div class="preview-track-control s-2a"><!> <div class="preview-track-close s-2a"><!></div> <!></div>'),Yw=M('<div class="wrapper-preview-track s-2a"><!></div>'),jw=M('<div class="enriched-timeline s-2a"><!> <!> <!></div>'),Xw={hash:"s-2a",code:".enriched-timeline.s-2a{padding:var(--timeline-padding-vertical-top) var(--timeline-padding-horizontal) var(--timeline-padding-vertical-bottom);pointer-events:auto;position:relative}.preview-track-control.s-2a{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-2a{pointer-events:auto;position:absolute;right:calc(var(--timeline-padding-horizontal))}.preview-track-close.tooltip.s-2a{bottom:32px;opacity:0;transition:opacity .2s}.preview-track-close.s-2a:hover+.tooltip:where(.s-2a){opacity:1}.wrapper-preview-track.s-2a{box-sizing:border-box;left:0;overflow:hidden;padding:0 calc(var(--timeline-padding-horizontal));position:absolute;right:0;z-index:-1}"};function Vm(t,e){B(e,!0),q(t,Xw);let[i,o]=Ve(),r=()=>x(g,"$playerSize",i),a=()=>x(y,"$duration$",i),l=()=>x(w,"$previewTrackActive",i),d=()=>x(f,"$position$",i),s=()=>x($,"$isRewindableLive$",i),u=h(e,"timelineRef",15,void 0),v=ve(),p=200,{positionWithScrubbing$:f,isRewindableLive$:$,duration$:y}=v.state,{playerSize:g,previewTrackActive:w}=v.ui,{countPerImage:C=0,links:I=[],frequency:N=0}=v.actions.internal.getPreviewThumbsData()||{},k=m(()=>r().width>100),E=W(!l_()),A=()=>{n(E)&&(a_(),O(E,!1))},Q=ue=>{let ne=Math.floor(a()*ue/N),_e=Math.floor(ne/C),xe=qw(3,_e,I.length-1);for(let J of xe){let Re=new Image;Re.src=I[J]}},H=(ue,ne)=>{Q(ne),!l()&&e.onTimelineMove(ue)};var z=jw(),Y=T(z);{var le=ue=>{var ne=Gw(),_e=T(ne);let xe=m(()=>Xo(d()));Im(_e,{get time(){return n(xe)}});var J=L(_e,2),Re=T(J);As(Re,{onClick:()=>v.actions.internal.closePreviewTrack()}),S(J);var pe=L(J,2);{var P=We=>{var Te=Qw(),j=T(Te);Mm(j,{}),S(Te),b(We,Te)};R(pe,We=>{n(E)&&We(P)})}S(ne),rt("mouseleave",J,A),jr(3,ne,()=>fs,()=>({duration:p})),b(ue,ne)};R(Y,ue=>{l()&&ue(le)})}var X=L(Y,2);let re=m(()=>!n(k));Ka(X,{get isHidden(){return n(re)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return s()},onSliderMove:H,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:Q,get ref(){return u()},set ref(ue){u(ue)}});var Z=L(X,2);{var we=ue=>{var ne=Yw(),_e=T(ne);Lm(_e,{}),S(ne),D(()=>qe(ne,`height: ${e.animatedPreviewTrackHeight}px;`)),b(ue,ne)};R(Z,ue=>{e.previewTrackAvailable&&ue(we)})}S(z),D(()=>qe(z,`transform: translateY(${e.animatedOffsetY}px);`)),b(t,z),F(),o()}var Jw=M('<div><!> <div class="controls s-1c" data-testid="player_controls"><div class="controls-left s-1c"><!> <!> <!></div> <div class="controls-right s-1c"></div></div></div> <!>',1),eS={hash:"s-1c",code:'.wrapper-bottom.s-1c{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-1c:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-1c>:where(.s-1c){pointer-events:auto}.controls.s-1c{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-1c,.controls-right.s-1c{align-content:center;display:flex}.controls-left.s-1c{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-1c >:not(:first-child),.controls-right.s-1c >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-1c{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1c{transition:none}'};function Nm(t,e){var il,sr;B(e,!0),q(t,eS);let[i,o]=Ve(),r=()=>x(xo,"$disabledControls$",i),a=()=>x(ot,"$adPlaybackState",i),l=()=>x(Bt,"$playbackState$",i),d=()=>x(_o,"$currentSubtitle$",i),s=()=>x(Wi,"$isEnded$",i),u=()=>x(Zo,"$currentGridType$",i),v=()=>x(Vt,"$isLive$",i),p=()=>x(Ke,"$chromecastState$",i),f=()=>x(vt,"$isPictureInPictureActive",i),$=()=>x(Gt,"$pictureInPictureType$",i),y=()=>x(_i,"$availableSubtitlesList$",i),g=()=>x(Ft,"$contextMenuOpenedByKeyboard$",i),w=()=>x(St,"$showContextMenuBtn$",i),C=()=>x(pi,"$isRewindableLive$",i),I=()=>x(di,"$isActiveLive$",i),N=()=>x(es,"$graphIsOpened$",i),k=()=>x(un,"$contextMenuVisible$",i),E=()=>x(Ri,"$isFullscreen",i),A=()=>x(Oi,"$autoplayNextEnabled",i),Q=()=>x(n(ao),"$prevButton",i),H=()=>x(n(Do),"$replayButton",i),z=()=>x(n(Qi),"$playButton",i),Y=()=>x(n(Gi),"$nextButton",i),le=()=>x(n(lo),"$playPrevChapterButton",i),X=()=>x(n(Nn),"$seekToInteractiveButton",i),re=()=>x(n(Fr),"$interactiveGraphButton",i),Z=()=>x(n(Pi),"$liveButton",i),we=()=>x(n(vs),"$time",i),ue=()=>x(n(ts),"$episodes",i),ne=()=>x(n(xr),"$vkLogo",i),_e=()=>x(n(Bo),"$volume",i),xe=()=>x(n(Hr),"$subtitles",i),J=()=>x(n(mn),"$settings",i),Re=()=>x(n(vn),"$context",i),pe=()=>x(n(Co),"$fullscreen",i),P=()=>x(n(wr),"$chromecast",i),We=()=>x(wo,"$additionalDesktopControlPanelRightButtons$",i),Te=()=>x(Ni,"$playerSize",i),j=()=>x(Jo,"$isInteractiveTime$",i),ie=()=>x(Jt,"$previewTrackActive",i),Oe=()=>x(hi,"$settingsMenuVisible",i),De=()=>x(uo,"$settingButtonRef$",i),tt=()=>x(K,"$startedByKeyboard$",i),U=()=>x(ti,"$isAudioAvailable$",i),Pe=()=>x(be,"$fakeIsPlaying$",i),Ee=()=>x(ms,"$seekToInteractiveDisabledTooltip$",i),Ue=()=>x(zr,"$isPreviewTrackHorizontallyAligned$",i),Ze=()=>x(Sr,"$previewTrackAvailable",i),ye=()=>x(fo,"$previewTrackDragInProgress",i),ke=()=>x(qt,"$adPosition",i),Be=()=>x(Dt,"$position$",i),Nt=()=>x(yt,"$adDuration",i),pt=()=>x(at,"$duration$",i),Ot=h(e,"playerControlsWrapperRef",15,void 0),st=h(e,"playerControlsRef",15,void 0),wt=h(e,"isAds",3,!1),ei=h(e,"logoTargetUrl",3,""),Mt=h(e,"isOneVideoPlaylist",3,!1),$e=h(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:be}=yo(),ee=ve(),it=yo(),fe=Lt(),Le=ee.actions.internal.toggleMuted,bt=ee.actions.internal.togglePlay,Et=ee.actions.internal.pause,ut=ee.actions.internal.toggleSubtitle,ce=ee.actions.internal.checkFullscreenSupport,ze=(il=ee.callbacks)==null?void 0:il.onAudioDoesNotExistHint,Qe=(sr=ee.callbacks)==null?void 0:sr.onAudioDisabledHint,at=ee.state.duration$,Dt=ee.state.positionWithScrubbing$,Bt=ee.state.playbackState$,ti=ee.state.isAudioAvailable$,vi=ee.state.isAudioDisabled,Wi=ee.state.isEnded$,Vt=ee.state.isLive$,di=ee.state.isActiveLive$,pi=ee.state.isRewindableLive$,{isActive$:vt,type$:Gt}=it.pictureInPicture$,hi=ee.ui.settingsMenu.visible$,Ki=ee.ui.settingsMenu.openedByBtnKeyboard$,Zt=ee.ui.controls,Ct=ee.actions.internal.getVideoEpisodes(),Ke=ee.state.chromecastState$,_i=ee.state.availableSubtitlesList$,_o=ee.state.currentSubtitle$,xo=Zt.disabledControls$,un=ee.ui.contextMenu.visible$,St=ee.ui.contextMenu.showContextMenuBtn$,Ft=ee.ui.contextMenu.openedByBtnKeyboard$,K=ee.ui.startedByKeyboard$,kt=ee.ui.controlBlocks,si=ee.ui.previewTrackNotificationVisible,lt=ee.ui.t,yt=ee.ads.duration,qt=ee.ads.position,ot=ee.ads.playbackState,Ri=ee.ui.isFullscreen,Ni=ee.ui.playerSize,Zo=ee.ui.currentGridType$,wo=ee.ui.additionalDesktopControlPanelRightButtons$,Oi=ee.ui.autoplayNextEnabled$,qi=ee.actions.internal.getVideoElement,Rr=ee.actions.internal.replayInteractive,bo=ee.actions.internal.prevVideoClick,oo=ee.actions.internal.nextVideoClick,Ci=ee.state.isInteractive,Jo=ee.state.isInteractiveTime$,en=ee.state.showInteractiveGraph,In=ee.state.showSeekToInteractive,Yn=ee.state.showPlayPrevChapter,Nr=ee.state.showInteractiveTimeIndicator,Jr=ee.state.playPrevChapterDisabledTooltip,ms=it.seekToInteractiveDisabledTooltip$,es=it.graphIsOpened$,jn=fe.features.interactiveResponsiveUi,gr=m(()=>r().has("EPISODE_BUTTON")),pn=m(()=>r().has("GRAPH_BUTTON")),En=m(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),Ro=m(()=>r().has("PLAY_BUTTON")),kn=m(()=>r().has("REPLAY_BUTTON")),Xn=m(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),hr=()=>ee.actions.internal.toggleChromecast(),_r=m(()=>wt()?a()==="playing":l()===Rm.PLAYING),Or=m(()=>d().value!=="off"),no=m(()=>s()&&!wt()||Ci),Dr=m(()=>jn?n(no)&&to(u(),"m"):n(no)),Pn=m(()=>!s()||Ci||wt()),An=m(()=>to(u(),"m")),ro=m(()=>e.showNextPrevButtons&&to(u(),"m")&&!wt()&&e.nextButtonActive),Br=m(()=>e.showNextPrevButtons&&to(u(),"m")&&!wt()&&e.prevButtonActive),Ln=m(()=>!wt()&&!!v()),ft=m(()=>p()!==ib.NOT_AVAILABLE&&!(f()&&$()===1)&&to(u(),"m")&&!Ci),li=m(()=>e.showAutoplayNext&&!Mt()&&to(u(),"s")),br=m(()=>y().length>0&&to(u(),"m")),Zn=m(()=>g()||w()),Jn=m(()=>to(u(),"s")&&!wt()),tn=m(()=>!e.logoHidden&&!wt()),$r=m(()=>fe.features.fullscreen&&ce()&&(e.logoHidden||to(u(),jn?"xs":"s"))&&!(f()&&$()===1)&&(Ci?$e():!0)),on=m(()=>(!v()||wt())&&!(fe.features.interactiveHideTime&&Ci)),fn=m(()=>en&&to(u(),"m")),Mn=m(()=>jn?In&&to(u(),"s"):In),Vn=m(()=>jn?Yn&&to(u(),"s"):Yn),No=m(()=>!wt()&&!v()&&!!(Ct!=null&&Ct.length)&&n(An)&&!n(gr)),So=m(()=>!C()||!!I()),er=m(()=>N()?lt("tooltip_interactive_graph_on"):lt("tooltip_interactive_graph_off")),To=m(()=>k()?lt("tooltip_context_menu_close"):lt("tooltip_context_menu_open")),Di=(dt,ct)=>dt?ct&&ct===Rm.PAUSED?lt("tooltip_play"):"":lt("tooltip_live"),Rn=m(()=>Di(n(So),l())),tr=m(()=>fe.logoType==="vk_video"?lt("tooltip_vk_video_logo"):lt("tooltip_vk_logo")),ir=m(()=>n(Or)?lt("tooltip_subtitles_on"):lt("tooltip_subtitles_off")),or=m(()=>E()?lt("tooltip_fullscreen_on"):lt("tooltip_fullscreen_off")),Oo=m(()=>p()===ib.CONNECTED?lt("tooltip_chromecast_on"):lt("tooltip_chromecast_off")),yr=m(()=>A()?lt("tooltip_autoplay_on"):lt("tooltip_autoplay_off")),$t=W(0),xt=ai({}),so=ai({}),ao=m(()=>Zt.prevButton),Do=m(()=>Zt.replayButton),Qi=m(()=>Zt.playButton),Gi=m(()=>Zt.nextButton),lo=m(()=>Zt.playPrevChapterButton),Nn=m(()=>Zt.seekToInteractiveButton),Fr=m(()=>Zt.interactiveGraphButton),Pi=m(()=>Zt.liveButton),vs=m(()=>Zt.time),ts=m(()=>Zt.episodes),xr=m(()=>Zt.vkLogo),Bo=m(()=>Zt.volume),Hr=m(()=>Zt.subtitles),mn=m(()=>Zt.settings),vn=m(()=>Zt.context),Co=m(()=>Zt.fullscreen),wr=m(()=>Zt.chromecast),He=m(()=>({prevButton:Q()?Q().right-Q().left:0,replayButton:H()?H().right-H().left:0,playButton:z()?z().right-z().left:0,nextButton:Y()?Y().right-Y().left:0,playPrevChapterButton:le()?le().right-le().left:0,seekToInteractiveButton:X()?X().right-X().left:0,interactiveGraphButton:re()?re().right-re().left:0,liveButton:Z()?Z().right-Z().left:0,time:we()?we().right-we().left:0,episodes:ue()?ue().right-ue().left:0,vkLogo:ne()?ne().right-ne().left:0,volume:_e()?_e().right-_e().left:0,subtitles:xe()?xe().right-xe().left:0,settings:J()?J().right-J().left:0,context:Re()?Re().right-Re().left:0,fullscreen:pe()?pe().right-pe().left:0,chromecast:P()?P().right-P().left:0,additionalButtons:We().length?We().reduce(dt=>[...dt,40],[]):[]})),Pt=W(0);Ne(()=>{(!n(Pt)||n(Pt)<n(He).time)&&Tt(()=>O(Pt,n(He).time,!0))});let bi=W(!1);Ne(()=>{let dt=0;n(No)&&(to(u(),"xl")?dt=n(He).time:dt=60);let ct=n(He).prevButton+n(He).playButton+n(He).nextButton+n(He).seekToInteractiveButton+n(He).interactiveGraphButton+n(He).liveButton+n(Pt)+dt;O(bi,n(on)&&n($t)>=ct,!0)});let Fo=m(()=>n(bi)&&to(u(),"m")),co=ob(Hl,260),Io=ob(ju,260);Ne(()=>{Te(),j(),ie(),co(qi(),Zt,xt,e.showControls),Io(qi(),kt,so,e.showControls)}),Ne(()=>{so.bottom=Ot()});let uo=ae();Ne(()=>{Oe(),De()&&Tt(()=>Ll(De(),Oe(),Ki))});let Ho;Ne(()=>{tt(),Tt(()=>Gu(K,tt(),Ho))});function On(){aa({isAudioDisabled:vi,isAudioAvailable:U(),isAds:wt(),audioIsNotExistHintCallback:ze,audioDisabledHintCallback:Qe})&&Le()}let nn=Ci?Rr:bt,Yi=m(()=>Pe()!==null),ji=m(()=>n(Yi)?Pe():n(_r)),Dn=m(()=>n(ji)?lt("tooltip_pause"):lt("tooltip_play")),nr=lt("tooltip_episodes"),rr=m(()=>{var dt,ct,Xi,ko;return n(Br)?{id:"prevButton",type:"desktop-control-panel-left",weight:Rs.prevButton,buttonComponent:za,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:bo.bind(null,!0)},tooltipEnabled:!((ct=(dt=ee.callbacks)==null?void 0:dt.uiInfo)!=null&&ct.onPrevButtonMouseEnter)&&!((ko=(Xi=ee.callbacks)==null?void 0:Xi.uiInfo)!=null&&ko.onPrevButtonMouseLeave),mouseEnter:()=>{var Zi,fi,Bi;(Bi=(fi=(Zi=ee.callbacks)==null?void 0:Zi.uiInfo)==null?void 0:fi.onPrevButtonMouseEnter)==null||Bi.call(fi,Qn(qi(),xt,"prevButton",e.showControls))},mouseLeave:()=>{var Zi,fi,Bi;(Bi=(fi=(Zi=ee.callbacks)==null?void 0:Zi.uiInfo)==null?void 0:fi.onPrevButtonMouseLeave)==null||Bi.call(fi,Qn(qi(),xt,"prevButton",e.showControls))},tooltipText:lt("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),Bn=m(()=>n(Dr)?{id:"replayButton",type:"desktop-control-panel-left",weight:Rs.replayButton,buttonComponent:Ul,buttonComponentProps:{disabled:n(kn),click:nn},tooltipText:lt("tooltip_restart"),disabled:n(kn)}:void 0),gs=m(()=>n(Pn)?{id:"playButton",type:"desktop-control-panel-left",weight:Rs.playButton,buttonComponent:zl,buttonComponentProps:{disabled:n(Ro),isPlaying:n(_r),click:bt},tooltipText:n(Dn),disabled:n(Ro)}:void 0),hs=m(()=>{var dt,ct,Xi,ko;return n(ro)?{id:"nextButton",type:"desktop-control-panel-left",weight:Rs.nextButton,buttonComponent:za,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:oo.bind(null,!0)},tooltipEnabled:!((ct=(dt=ee.callbacks)==null?void 0:dt.uiInfo)!=null&&ct.onNextButtonMouseEnter)&&!((ko=(Xi=ee.callbacks)==null?void 0:Xi.uiInfo)!=null&&ko.onNextButtonMouseLeave),mouseEnter:()=>{var Zi,fi,Bi;(Bi=(fi=(Zi=ee.callbacks)==null?void 0:Zi.uiInfo)==null?void 0:fi.onNextButtonMouseEnter)==null||Bi.call(fi,Qn(qi(),xt,"nextButton",e.showControls))},mouseLeave:()=>{var Zi,fi,Bi;(Bi=(fi=(Zi=ee.callbacks)==null?void 0:Zi.uiInfo)==null?void 0:fi.onNextButtonMouseLeave)==null||Bi.call(fi,Qn(qi(),xt,"nextButton",e.showControls))},tooltipText:lt("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Ge=m(()=>Ci&&n(Vn)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Rs.playPrevChapterButton,buttonComponent:ic,buttonComponentProps:{disabled:n(Xn),click:e.playPrevChapter},tooltipText:lt("tooltip_interactive_go_back"),disabledTooltipContent:lt(Jr),disabled:n(Xn)}:void 0),Yt=m(()=>Ci&&n(Mn)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Rs.seekToInteractiveButton,buttonComponent:nc,buttonComponentProps:{disabled:n(En),click:e.seekToInteractive},tooltipText:lt("tooltip_interactive_seek"),disabled:n(En),disabledTooltipContent:lt(Ee())}:void 0),Ii=m(()=>Ci&&n(fn)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Rs.interactiveGraphButton,buttonComponent:rc,buttonComponentProps:{disabled:n(pn),click:es.toggle,graphIsOpened:N()},tooltipText:n(er)}:void 0),po=m(()=>n(Ln)?{id:"liveButton",type:"desktop-control-panel-left",weight:Rs.liveButton,buttonComponent:sc,buttonComponentProps:{isLiveActive:n(So),ariaLabel:n(Rn)},tooltipText:n(Rn),disabled:n(So)&&l()===Rm.PLAYING}:void 0),Uo=m(()=>[n(rr),n(Bn),n(gs),n(hs),n(Ge),n(Yt),n(Ii),n(po)].filter(dt=>!!dt).sort(Oa)),Ur=m(()=>n(tn)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Os.vkLogo,buttonComponent:Qd,buttonComponentProps:{targetUrl:ei(),logoClickable:e.logoClickable,click:Et},tooltipText:n(tr),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),Eo=m(()=>n(li)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Os.autoplayNext,buttonComponent:oc,tooltipText:n(yr)}:void 0),zo=m(()=>({id:"volume",type:"desktop-control-panel-right",weight:Os.volume,buttonComponent:am,buttonComponentProps:{click:On,isAds:wt()}})),_s=m(()=>n(br)?{id:"subtitles",type:"desktop-control-panel-right",weight:Os.subtitles,buttonComponent:im,buttonComponentProps:{isSubtitlesEnabled:n(Or),click:ut},tooltipText:n(ir)}:void 0),Ds=m(()=>n(Jn)?{id:"settings",type:"desktop-control-panel-right",weight:Os.settings,buttonComponent:Nl,buttonComponentProps:{ref$:uo},tooltipText:Oe()?void 0:lt("tooltip_settings_off")}:void 0),ua=m(()=>fe.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Os.context,buttonComponent:$m,buttonComponentProps:{ariaLabel:lt("aria_label_context_menu")},className:n(Zn)?"":"out-of-view",tooltipText:n(To)}:void 0),Bs=m(()=>n($r)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Os.fullscreen,buttonComponent:qd,buttonComponentProps:{isFullscreen:E(),click:e.toggleFullscreen},tooltipText:n(or)}:void 0),gn=m(()=>n(ft)?{id:"chromecast",type:"desktop-control-panel-right",weight:Os.chromecast,buttonComponent:Yd,buttonComponentProps:{state:p(),click:hr},tooltipText:n(Oo)}:void 0),nt=m(()=>[n(Ur),n(Eo),n(zo),n(_s),n(Ds),n(ua),n(Bs),n(gn),...We()].filter(dt=>!!dt).sort(Oa)),Jt=ee.ui.previewTrackActive,fo=ee.ui.previewTrackDragInProgress,Sr=ee.ui.previewTrackAvailable,zr=ee.ui.isPreviewTrackHorizontallyAligned,hn=m(()=>eb({onPreviewTrackOpened:ee.actions.internal.previewTrackOpened,getTimelineRef:()=>xt.timeline,isHorizontal:Ue()})),he=m(()=>n(hn).progressBarY),gt=m(()=>n(hn).controlsY),Ht=m(()=>n(hn).onPointerDown),jt=m(()=>n(hn).onPointerMove),$i=m(()=>n(hn).onPointerUp),wi=m(()=>n(hn).calculatedHeight),Ei=m(()=>n(hn).closePreviewTrack);Ne(()=>{ie()?si.set(!1):n(Ei)()});let yi;At(()=>()=>yi&&clearTimeout(yi));let Fs=dt=>{ie()||!Ze()||(n(Ht)(dt),yi=setTimeout(()=>{ee.actions.internal.previewTrackDragStarted()},200))},Hs=()=>{ie()||n($i)(),yi&&clearTimeout(yi),ye()&&ee.actions.internal.previewTrackDragFinished()},Us=dt=>{n(jt)(dt),!ie()&&Ze()&&!ie()&&si.set(!0)},Ql=()=>{si.set(!1)};var pa=Jw(),Tr=de(pa);let zs;var fa=T(Tr);{var Cr=dt=>{let ct=m(()=>n(he)()),Xi=m(()=>n(wi)());Vm(dt,{get animatedOffsetY(){return n(ct)},get animatedPreviewTrackHeight(){return n(Xi)},get canRewindLive(){return e.canRewindLive},get isAds(){return wt()},onTimelineMove:Us,onTimelinePointerDown:Fs,onTimelinePointerUp:Hs,onTimelinePointerLeave:Ql,get previewTrackAvailable(){return Ze()},get timelineRef(){return xt.timeline},set timelineRef(ko){xt.timeline=ko}})};R(fa,dt=>{e.showControls&&dt(Cr)})}var bs=L(fa,2),$s=T(bs),Ir=T($s);gi(Ir,17,()=>n(Uo),dt=>dt.id,(dt,ct)=>{Yu(dt,{get buttonComponent(){return n(ct).buttonComponent},get buttonComponentProps(){return n(ct).buttonComponentProps},get tooltipText(){return n(ct).tooltipText},get disabledTooltipContent(){return n(ct).disabledTooltipContent},get disabled(){return n(ct).disabled},get className(){return n(ct).className},get tooltipEnabled(){return n(ct).tooltipEnabled},get mouseEnter(){return n(ct).mouseEnter},get mouseLeave(){return n(ct).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return xt[n(ct).id]},set ref(Xi){xt[n(ct).id]=Xi}})});var ma=L(Ir,2);{var Gl=dt=>{let ct=m(()=>!e.showControls),Xi=m(()=>wt()?ke():Be()),ko=m(()=>wt()?Nt():pt());Wd(dt,{get isHidden(){return n(ct)},isMobile:!1,get showDuration(){return n(Fo)},get position(){return n(Xi)},get duration(){return n(ko)},get ref(){return xt.time},set ref(Zi){xt.time=Zi}})};R(ma,dt=>{n(on)&&dt(Gl)})}var el=L(ma,2);let Yl=m(()=>!n(No));Vo(el,{className:"w-max",get disabled(){return n(Yl)},get tooltipContent(){return nr},get tooltipVisible(){return e.showControls},get ref(){return xt.episodes},set ref(dt){xt.episodes=dt},children:(dt,ct)=>{var Xi=Ae(),ko=de(Xi);{var Zi=fi=>{jd(fi,{get position(){return Be()},get duration(){return pt()},get timeCodes(){return Ct}})};R(ko,fi=>{n(No)&&fi(Zi)})}b(dt,Xi)},$$slots:{default:!0}}),S($s);var va=L($s,2);gi(va,21,()=>n(nt),dt=>dt.id,(dt,ct)=>{var Xi=Ae(),ko=de(Xi);{var Zi=Bi=>{Yu(Bi,{get buttonComponent(){return n(ct).buttonComponent},get buttonComponentProps(){return n(ct).buttonComponentProps},get tooltipText(){return n(ct).tooltipText},get disabledTooltipContent(){return n(ct).disabledTooltipContent},get disabled(){return n(ct).disabled},get className(){return n(ct).className},get tooltipVisible(){return e.showControls},get ref(){return xt[n(ct).id]},set ref(Ws){xt[n(ct).id]=Ws}})},fi=Bi=>{let Ws=m(()=>!!n(ct).disabled);Sm(Bi,{get id(){return n(ct).id},get testId(){return n(ct).testId},get icon(){return n(ct).icon},get ariaLabel(){return n(ct).ariaLabel},get tooltipText(){return n(ct).tooltipText},get disabledTooltipContent(){return n(ct).disabledTooltipContent},get disabled(){return n(Ws)},get onClick(){return n(ct).onClick},get disableMouseupTooltipShow(){return n(ct).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return xt[n(ct).id]},set ref(Xl){xt[n(ct).id]=Xl}})};R(ko,Bi=>{X_(n(ct))?Bi(Zi):Bi(fi,!1)})}b(dt,Xi)}),S(va),S(bs),Ye(bs,dt=>st(dt),()=>st()),S(Tr),Ye(Tr,dt=>Ot(dt),()=>Ot());var jl=L(Tr,2);{var tl=dt=>{ec(dt,{get ref(){return xt.interactiveTimeIndicator},set ref(ct){xt.interactiveTimeIndicator=ct}})};R(jl,dt=>{Nr&&dt(tl)})}D((dt,ct)=>{zs=se(Tr,1,"wrapper-bottom s-1c",null,zs,dt),qe(bs,ct),bs.inert=ie()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||ye()}),()=>`transform: translateY(${n(gt)()}px);`]),wn($s,"clientWidth",dt=>O($t,dt)),b(t,pa),F(),o()}import{ChromecastState as rb,PlaybackState as sb}from"@vkontakte/videoplayer-core/es2018";import{noop as nb}from"@vkontakte/videoplayer-shared/es2018";var tS=M('<div class="icon icon-error-stub s-20"><div class="inner s-20"></div></div>'),iS=M('<img class="icon s-20" aria-hidden="true"/>'),oS={hash:"s-20",code:".icon.s-20{height:24px!important;width:24px!important}.inner.s-20{background-color:var(--white);height:16px;width:16px}"};function Om(t,e){q(t,oS);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,nb),r=m(()=>o()===nb),a=m(()=>n(r)||i()),l=W(!1),d=()=>{O(l,!0)},s=m(()=>n(r)?"btn-full-opacity":"");Wt(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,v)=>{var p=Ae(),f=de(p);{var $=g=>{var w=tS();b(g,w)},y=g=>{var w=iS();D(()=>Me(w,"src",e.iconUrl)),rt("error",w,d),Ea(w),b(g,w)};R(f,g=>{n(l)?g($):g(y,!1)})}b(u,p)},$$slots:{default:!0}})}var nS=Ce('<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 Dm(t){je(t,{testId:"muted-icon",children:(e,i)=>{var o=nS();b(e,o)},$$slots:{default:!0}})}import{noop as rS}from"@vkontakte/videoplayer-shared/es2018";function Xu(t,e){B(e,!0);let i=h(e,"muted",3,!1),o=h(e,"click",3,rS),r=h(e,"ref",15,void 0),l=ve().ui.t,d=m(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),s=m(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");Wt(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,v)=>{var p=Ae(),f=de(p);{var $=g=>{Dm(g,{})},y=g=>{da(g,{get size(){return"24"}})};R(f,g=>{i()?g($):g(y,!1)})}b(u,p)},$$slots:{default:!0}}),F()}var sS=Ce('<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>'),aS=Ce('<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>'),lS=Ce('<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 Bm(t,e){let i=h(e,"isActive",3,!1),o=m(()=>i()?"pip-icon--active":"pip-icon");je(t,{get testId(){return n(o)},children:(r,a)=>{var l=lS(),d=L(de(l));{var s=v=>{var p=sS();b(v,p)},u=v=>{var p=aS();b(v,p)};R(d,v=>{i()?v(s):v(u,!1)})}b(r,l)},$$slots:{default:!0}})}import{noop as dS}from"@vkontakte/videoplayer-shared/es2018";function Fm(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isPictureInPictureActive",3,!1),r=h(e,"click",3,dS),a=G("menu_pip");Wt(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return r()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{Bm(l,{get isActive(){return o()}})},$$slots:{default:!0}}),F()}import{debounceFn as ab}from"@vkontakte/videoplayer-shared/es2018";var cS=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},uS=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},pS=M("<div><!></div>"),fS=M("<div><!></div>"),mS=M("<div><!></div>"),vS=M("<!> <!> <!>",1),gS=M("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),hS=M('<div class="wrapper-middle s-1b"><!></div>'),_S=M("<div><!></div> <!> <div><!></div>",1),bS=M('<div aria-hidden="true">·</div> <!>',1),$S=M('<!> <!> <div><div><div class="controls mobile s-1b" data-testid="bottom-controls"><div class="controls-group contain s-1b"><!> <!> <!> <!></div> <div class="controls-group s-1b"><!> <!> <!></div></div> <!></div></div> <!>',1),yS={hash:"s-1b",code:".wrapper-bottom.s-1b{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-1b>:where(.s-1b){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-1b{height:9px;padding:0 4px 4px}.wrapper-middle.s-1b{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-1b,.wrapper-top-right.s-1b{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-1b{right:8px;top:4px}.wrapper-top-left.s-1b{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-1b,.wrapper-middle-left-second.s-1b,.wrapper-middle-right.s-1b{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-1b{left:12px}.wrapper-middle-left-second.s-1b{left:64px}.wrapper-middle-right.s-1b{right:12px}.controls.s-1b{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-1b,.controls-group.s-1b{display:flex}.controls-group.contain.s-1b{min-width:0}.controls-group.s-1b >:not(:first-child){margin-left:8px}.hidden.s-1b{opacity:0;visibility:hidden}.controls-hidden.s-1b{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1b{transition:none}.overlay-mobile.s-1b{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-1b,.wrapper-top-right.fullscreen.s-1b{top:16px}.controls-wrapper.fullscreen.s-1b{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-1b{left:44px;top:12px}.wrapper-top-right.fullscreen.s-1b{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-1b{left:44px}.wrapper-middle-left-second.fullscreen.s-1b{left:96px}.wrapper-middle-right.fullscreen.s-1b{right:44px}.controls-wrapper.fullscreen.s-1b{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function Hm(t,e){var Co,wr;B(e,!0),q(t,yS);let[i,o]=Ve(),r=()=>x(Ni,"$seekToInteractiveDisabledTooltip$",i),a=()=>x(Zt,"$disabledControls$",i),l=()=>x(Mt,"$playbackState$",i),d=()=>x(xo,"$adPlaybackState",i),s=()=>x(ee,"$isEnded$",i),u=()=>x(St,"$playerSize",i),v=()=>x(ut,"$scrubbingInProgress",i),p=()=>x(hi,"$chromecastState$",i),f=()=>x(ze,"$isPictureInPictureActive",i),$=()=>x(Qe,"$pictureInPictureType$",i),y=()=>x(ce,"$mobileNotReportControlHidden$",i),g=()=>x(pi,"$chromecastHidden",i),w=()=>x(st,"$playerPhase",i),C=()=>x(Vt,"$pipHidden",i),I=()=>x(Ke,"$currentGridType$",i),N=()=>x(vi,"$vkLogoHidden",i),k=()=>x(ti,"$volumeHidden",i),E=()=>x(it,"$isLive$",i),A=()=>x(at,"$settingsMenuVisible",i),Q=()=>x(Et,"$isRewindableLive$",i),H=()=>x(bt,"$isActiveLive$",i),z=()=>x($e,"$isAudioAvailable$",i),Y=()=>x(Le,"$muted$",i),le=()=>x(fe,"$volume$",i),X=()=>x(lt,"$isInteractiveTime$",i),re=()=>x(Mn,"$settingButtonRef$",i),Z=()=>x(Ct,"$startedByKeyboard$",i),we=()=>x(un,"$isFullscreen",i),ue=()=>x(Ft,"$additionalButtons$",i),ne=()=>x(Wi,"$autoplayNextToggleHidden",i),_e=()=>x(Ki,"$crashed$",i),xe=()=>x(di,"$settingsHidden",i),J=()=>x(Zo,"$graphIsOpened$",i),Re=()=>x(_o,"$adPosition",i),pe=()=>x(_i,"$adDuration",i),P=()=>x(ei,"$position$",i),We=()=>x(wt,"$duration$",i),Te=h(e,"playerControlsWrapperRef",15,void 0),j=h(e,"playerControlsRef",15,void 0),ie=h(e,"isAds",3,!1),Oe=h(e,"logoTargetUrl",3,""),De=h(e,"isOneVideoPlaylist",3,!1),tt=h(e,"customFullscreenSupported",3,!0),U=ve(),Pe=yo(),Ee=Lt(),Ue=U.actions.internal.toggleMuted,Ze=U.actions.internal.togglePlay,ye=U.actions.internal.pause,ke=U.actions.internal.prevVideoClick,Be=U.actions.internal.nextVideoClick,Nt=U.actions.internal.checkFullscreenSupport,pt=(Co=U.callbacks)==null?void 0:Co.onAudioDoesNotExistHint,Ot=(wr=U.callbacks)==null?void 0:wr.onAudioDisabledHint,st=U.playerPhase,wt=U.state.duration$,ei=U.state.positionWithScrubbing$,Mt=U.state.playbackState$,$e=U.state.isAudioAvailable$,be=U.state.isAudioDisabled,ee=U.state.isEnded$,it=U.state.isLive$,fe=U.state.volume$,Le=U.state.muted$,bt=U.state.isActiveLive$,Et=U.state.isRewindableLive$,ut=U.ui.scrubbingInProgress,ce=U.ui.mobileNotReportControlHidden$,{isActive$:ze,type$:Qe}=Pe.pictureInPicture$,at=U.ui.settingsMenu.visible$,Dt=U.ui.settingsMenu.openedByBtnKeyboard$,Bt=U.ui.controls,{volume:ti,vkLogo:vi,autoplayNextToggle:Wi,pip:Vt,settings:di,chromecast:pi}=U.ui.hiddenControls,vt=U.actions.internal.getVideoEpisodes(),Gt=U.webApi.pictureInPictureApi,hi=U.state.chromecastState$,Ki=U.state.crashed$,Zt=Bt.disabledControls$,Ct=U.ui.startedByKeyboard$,Ke=U.ui.currentGridType$,_i=U.ads.duration,_o=U.ads.position,xo=U.ads.playbackState,un=U.ui.isFullscreen,St=U.ui.playerSize,Ft=U.ui.additionalButtonsDeprecated$,K=U.actions.internal.getVideoElement,kt=U.actions.internal.replayInteractive,si=U.state.isInteractive,lt=U.state.isInteractiveTime$,yt=U.state.showInteractiveGraph,qt=U.state.showSeekToInteractive,ot=U.state.showPlayPrevChapter,Ri=U.state.showInteractiveTimeIndicator,Ni=Pe.seekToInteractiveDisabledTooltip$,Zo=Pe.graphIsOpened$,wo=U.ui.controlBlocks,Oi=m(()=>G(U.state.playPrevChapterDisabledTooltip)),qi=m(()=>G(r())),Rr=m(()=>a().has("EPISODE_BUTTON")),bo=m(()=>a().has("GRAPH_BUTTON")),oo=m(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),Ci=m(()=>a().has("PLAY_BUTTON")),Jo=m(()=>a().has("REPLAY_BUTTON")),en=m(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),In=m(()=>l()===sb.PLAYING),Yn=m(()=>d()==="paused"),Nr=m(()=>s()&&!ie()&&!si),Jr=m(()=>!s()||ie()),ms=m(()=>e.showNextPrevButtons&&!ie()&&e.prevButtonActive),es=m(()=>e.showNextPrevButtons&&!ie()&&e.nextButtonActive),jn=m(()=>u().width>300),gr=m(()=>u().width>400),pn=m(v),En=m(()=>p()!==rb.NOT_AVAILABLE&&!(f()&&$()===1)&&!y()&&!si&&!g()),Ro=m(()=>w()==="LiveWaitingStart"),kn=m(()=>!!Gt&&p()!==rb.CONNECTED&&!y()&&($()===1&&n(Ro)||!n(Ro))&&!n(pn)&&!si&&!C()),Xn=W(!1);At(()=>{let He=Gt==null?void 0:Gt.info.isActive$.subscribe(Pt=>O(Xn,Pt,!0));return()=>He==null?void 0:He.unsubscribe()});let hr=m(()=>!n(pn)&&to(I(),"s")),_r=m(()=>!e.logoHidden&&u().width>350&&!N()),Or=m(()=>Ee.features.fullscreen&&Nt()&&!(f()&&$()===1)&&(si?tt():!0)&&!n(pn)&&!n(Xn)),no=m(()=>!k()&&!n(pn)),Dr=m(()=>(!E()||ie())&&u().width>260&&!n(pn)&&!(Ee.features.interactiveHideTime&&si)),Pn=m(()=>A()||e.showControls),An=m(()=>!ie()&&!E()&&!!(vt!=null&&vt.length)&&n(jn)&&!n(Rr)&&!n(pn)),ro=m(()=>!Q()||!!H()),Br=m(()=>yt&&to(I(),"m")),Ln=m(()=>!z()||Y()||le()===0),ft=ai({}),li=ai({}),br=ab(Hl,260),Zn=ab(ju,260);Ne(()=>{u(),X(),br(K(),Bt,ft,e.showControls),Zn(K(),wo,li,e.showControls)});let Jn=()=>U.actions.internal.toggleChromecast();async function tn(){Gt!=null&&Gt.isActive()?await(Gt==null?void 0:Gt.exit()):await(Gt==null?void 0:Gt.request())}function $r(){aa({isAudioDisabled:be,audioDisabledHintCallback:Ot,isAudioAvailable:z(),audioIsNotExistHintCallback:pt,isAds:ie()})&&Ue()}let on=W(""),fn=(He,Pt)=>{if(!He){O(on,G("tooltip_live"),!0);return}Pt&&Pt===sb.PAUSED&&O(on,G("tooltip_play"),!0)};Ne(()=>{fn(n(ro),l())});let Mn=ae();Ne(()=>{re()&&Ll(re(),A(),Dt)}),Ne(()=>{Gu(Ct,Z(),ft.playButton)});var Vn=$S(),No=de(Vn);{var So=He=>{var Pt=gS(),bi=de(Pt);let Fo;var co=L(bi,2);let Io;Ye(co,nt=>li.topLeft=nt,()=>li==null?void 0:li.topLeft);var uo=L(co,2);let Ho;var On=T(uo);gi(On,1,ue,({iconUrl:nt,ariaLabel:Jt,testId:fo,onClick:Sr,tooltip:zr})=>nt,(nt,Jt)=>{let fo=()=>n(Jt).iconUrl,Sr=()=>n(Jt).ariaLabel,zr=()=>n(Jt).testId,hn=()=>n(Jt).onClick,he=()=>n(Jt).tooltip,gt=m(()=>{var Ht;return(Ht=Sr())!=null?Ht:he()});Om(nt,{get iconUrl(){return fo()},get ariaLabel(){return n(gt)},get testId(){return zr()},get onClick(){return hn()}})});var nn=L(On,2);{var Yi=nt=>{oc(nt,{get ref(){return ft.autoplayNextToggle},set ref(Jt){ft.autoplayNextToggle=Jt}})};R(nn,nt=>{e.showAutoplayNext&&!De()&&!ne()&&nt(Yi)})}var ji=L(nn,2);{var Dn=nt=>{Yd(nt,{isMobile:!0,click:Jn,get state(){return p()},get ref(){return ft.chromecast},set ref(Jt){ft.chromecast=Jt}})};R(ji,nt=>{n(En)&&nt(Dn)})}var nr=L(ji,2);{var rr=nt=>{Fm(nt,{click:tn,get isPictureInPictureActive(){return f()},get ref(){return ft.pip},set ref(Jt){ft.pip=Jt}})};R(nr,nt=>{n(kn)&&nt(rr)})}var Bn=L(nr,2);{var gs=nt=>{Nl(nt,{get ref$(){return Mn}})};R(Bn,nt=>{_e()&&!xe()&&nt(gs)})}var hs=L(Bn,2);{var Ge=nt=>{Qd(nt,{get click(){return ye},get targetUrl(){return Oe()},get logoClickable(){return e.logoClickable},get ref(){return ft.vkLogo},set ref(Jt){ft.vkLogo=Jt}})};R(hs,nt=>{n(_r)&&nt(Ge)})}S(uo),Ye(uo,nt=>li.topRight=nt,()=>li==null?void 0:li.topRight);var Yt=L(uo,2);let Ii;var po=T(Yt);{var Uo=nt=>{let Jt=m(()=>ke.bind(null,!0));za(nt,{get click(){return n(Jt)},type:"prev",isMobile:!0,get ref(){return ft.prevButton},set ref(fo){ft.prevButton=fo}})};R(po,nt=>{n(ms)&&nt(Uo)})}var Ur=L(po,2);{var Eo=nt=>{zl(nt,{get disabled(){return n(Ci)},get click(){return Ze},isMobile:!0,get isPlaying(){return n(In)},get ref(){return ft.playButton},set ref(Jt){ft.playButton=Jt}})};R(Ur,nt=>{n(Jr)&&nt(Eo)})}var zo=L(Ur,2);{var _s=nt=>{Ul(nt,{get disabled(){return n(Jo)},get click(){return Ze},isMobile:!0,get ref(){return ft.replayButton},set ref(Jt){ft.replayButton=Jt}})};R(zo,nt=>{n(Nr)&&nt(_s)})}var Ds=L(zo,2);{var ua=nt=>{let Jt=m(()=>Be.bind(null,!0));za(nt,{get click(){return n(Jt)},type:"next",isMobile:!0,get ref(){return ft.nextButton},set ref(fo){ft.nextButton=fo}})};R(Ds,nt=>{n(es)&&nt(ua)})}S(Yt),Ye(Yt,nt=>li.middle=nt,()=>li==null?void 0:li.middle);var Bs=L(Yt,2);{var gn=nt=>{var Jt=vS(),fo=de(Jt);{var Sr=Ht=>{var jt=pS();let $i;jt.__click=[cS,en,e,Oi];var wi=T(jt);let Ei=m(()=>!e.showControls);ic(wi,{get hidden(){return n(Ei)},get disabled(){return n(en)},get click(){return e.playPrevChapter},get ref(){return ft.playPrevChapterButton},set ref(yi){ft.playPrevChapterButton=yi}}),S(jt),D(yi=>$i=se(jt,1,"wrapper-middle-left s-1b",null,$i,yi),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(Ht,jt)};R(fo,Ht=>{ot&&Ht(Sr)})}var zr=L(fo,2);{var hn=Ht=>{var jt=fS();let $i;var wi=T(jt);let Ei=m(()=>!e.showControls&&!J());rc(wi,{get hidden(){return n(Ei)},get disabled(){return n(bo)},get click(){return Zo.toggle},get graphIsOpened(){return J()},get ref(){return ft.interactiveGraphButton},set ref(yi){ft.interactiveGraphButton=yi}}),S(jt),D(yi=>$i=se(jt,1,$d(ot?"wrapper-middle-left-second":"wrapper-middle-left"),"s-1b",$i,yi),[()=>({fullscreen:we(),hidden:!e.showControls&&!J()})]),b(Ht,jt)};R(zr,Ht=>{n(Br)&&Ht(hn)})}var he=L(zr,2);{var gt=Ht=>{var jt=mS();let $i;jt.__click=[uS,oo,e,qi];var wi=T(jt);let Ei=m(()=>!e.showControls);nc(wi,{get hidden(){return n(Ei)},get disabled(){return n(oo)},get click(){return e.seekToInteractive},get ref(){return ft.seekToInteractiveButton},set ref(yi){ft.seekToInteractiveButton=yi}}),S(jt),D(yi=>$i=se(jt,1,"wrapper-middle-right s-1b",null,$i,yi),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(Ht,jt)};R(he,Ht=>{qt&&Ht(gt)})}b(nt,Jt)};R(Bs,nt=>{si&&!v()&&nt(gn)})}D((nt,Jt,fo,Sr)=>{Fo=se(bi,1,"overlay-mobile s-1b",null,Fo,nt),Io=se(co,1,"wrapper-top-left s-1b",null,Io,Jt),Ho=se(uo,1,"wrapper-top-right s-1b",null,Ho,fo),Ii=se(Yt,1,"wrapper-middle s-1b",null,Ii,Sr)},[()=>({hidden:!n(Pn)}),()=>({hidden:!e.showControls,fullscreen:we()}),()=>({hidden:!e.showControls&&!y(),fullscreen:we()}),()=>({hidden:!e.showControls||v()||e.endScreenShown&&e.showNextPrevButtons})]),b(He,Pt)};R(No,He=>{ie()||He(So)})}var er=L(No,2);{var To=He=>{var Pt=_S(),bi=de(Pt);let Fo;var co=T(bi);Xu(co,{get muted(){return Y()},click:$r,get ref(){return ft.volume},set ref(Yi){ft.volume=Yi}}),S(bi);var Io=L(bi,2);{var uo=Yi=>{var ji=hS(),Dn=T(ji);let nr=m(()=>!n(Yn));zl(Dn,{get disabled(){return n(Ci)},get click(){return Ze},isMobile:!0,get isPlaying(){return n(nr)},get ref(){return ft.playButton},set ref(rr){ft.playButton=rr}}),S(ji),b(Yi,ji)};R(Io,Yi=>{n(Yn)&&Yi(uo)})}var Ho=L(Io,2);let On;var nn=T(Ho);ac(nn,{get position(){return Re()},get duration(){return pe()}}),S(Ho),D((Yi,ji)=>{Fo=se(bi,1,"wrapper-top-right s-1b",null,Fo,Yi),On=se(Ho,1,"wrapper-bottom ads-timeline-mobile s-1b",null,On,ji)},[()=>({fullscreen:we()}),()=>({fullscreen:we()})]),b(He,Pt)};R(er,He=>{ie()&&d()!=="inactive"&&He(To)})}var Di=L(er,2);let Rn;var tr=T(Di);let ir;var or=T(tr),Oo=T(or),yr=T(Oo);{var $t=He=>{Vo(He,{get disabled(){return n(Jo)},get ref(){return ft.replayButton},set ref(Pt){ft.replayButton=Pt},children:(Pt,bi)=>{Ul(Pt,{get disabled(){return n(Jo)},get click(){return kt}})},$$slots:{default:!0}})};R(yr,He=>{si&&He($t)})}var xt=L(yr,2);{var so=He=>{Vo(He,{get ref(){return ft.liveButton},set ref(Pt){ft.liveButton=Pt},children:(Pt,bi)=>{sc(Pt,{get isLiveActive(){return n(ro)},isMobile:!0,get ariaLabel(){return n(on)}})},$$slots:{default:!0}})};R(xt,He=>{!ie()&&E()&&He(so)})}var ao=L(xt,2);{var Do=He=>{let Pt=m(()=>ie()?Re():P()),bi=m(()=>ie()?pe():We()),Fo=m(()=>!e.showControls);Wd(He,{get showDuration(){return n(gr)},get position(){return n(Pt)},get duration(){return n(bi)},isMobile:!0,get isHidden(){return n(Fo)},get ref(){return ft.time},set ref(co){ft.time=co}})};R(ao,He=>{n(Dr)&&He(Do)})}var Qi=L(ao,2);let Gi=m(()=>!n(An));Vo(Qi,{className:"w-max",get disabled(){return n(Gi)},get ref(){return ft.episodes},set ref(He){ft.episodes=He},children:(He,Pt)=>{var bi=Ae(),Fo=de(bi);{var co=Io=>{var uo=bS(),Ho=L(de(uo),2);jd(Ho,{get position(){return P()},get duration(){return We()},get timeCodes(){return vt}}),b(Io,uo)};R(Fo,Io=>{n(An)&&Io(co)})}b(He,bi)},$$slots:{default:!0}}),S(Oo),Ye(Oo,He=>li.bottomLeft=He,()=>li==null?void 0:li.bottomLeft);var lo=L(Oo,2),Nn=T(lo);{var Fr=He=>{Vo(He,{get ref(){return ft.volume},set ref(Pt){ft.volume=Pt},children:(Pt,bi)=>{Xu(Pt,{get muted(){return n(Ln)},click:$r})},$$slots:{default:!0}})};R(Nn,He=>{n(no)&&He(Fr)})}var Pi=L(Nn,2);{var vs=He=>{Vo(He,{get ref(){return ft.settings},set ref(Pt){ft.settings=Pt},children:(Pt,bi)=>{Nl(Pt,{get ref$(){return Mn}})},$$slots:{default:!0}})};R(Pi,He=>{n(hr)&&He(vs)})}var ts=L(Pi,2);{var xr=He=>{Vo(He,{get ref(){return ft.fullscreen},set ref(Pt){ft.fullscreen=Pt},children:(Pt,bi)=>{qd(Pt,{get click(){return e.toggleFullscreen},get isFullscreen(){return we()}})},$$slots:{default:!0}})};R(ts,He=>{n(Or)&&He(xr)})}S(lo),Ye(lo,He=>li.bottomRight=He,()=>li==null?void 0:li.bottomRight),S(or),Ye(or,He=>j(He),()=>j());var Bo=L(or,2);let Hr=m(()=>!e.showControls);Ka(Bo,{get isHidden(){return n(Hr)},get isAds(){return ie()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return Q()},get ref(){return ft.timeline},set ref(He){ft.timeline=He}}),S(tr),Ye(tr,He=>li.bottom=He,()=>li==null?void 0:li.bottom),S(Di),Ye(Di,He=>Te(He),()=>Te());var mn=L(Di,2);{var vn=He=>{ec(He,{get ref(){return ft.interactiveTimeIndicator},set ref(Pt){ft.interactiveTimeIndicator=Pt}})};R(mn,He=>{Ri&&He(vn)})}D((He,Pt)=>{Rn=se(Di,1,"wrapper-bottom mobile s-1b",null,Rn,He),ir=se(tr,1,"controls-wrapper s-1b",null,ir,Pt)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:we()})]),b(t,Vn),F(),o()}Xe(["click"]);function lc(t,e){B(e,!0);let[i,o]=Ve(),r=()=>x(C,"$isMobile",i),a=h(e,"bottomNoSmooth",3,!1),l=h(e,"playerControlsWrapperRef",15,void 0),d=h(e,"playerControlsRef",15,void 0),s=h(e,"isAds",3,!1),u=h(e,"logoTargetUrl",3,""),v=h(e,"showAutoplayNext",3,!1),p=h(e,"isOneVideoPlaylist",3,!1),f=h(e,"customFullscreenSupported",3,!0),$=h(e,"endScreenShown",3,!1),y=h(e,"onDisabledPlayPrevChapterClick",3,lb),g=h(e,"onDisabledSeekToInteractiveClick",3,lb),C=ve().ui.isMobile,I=W(!1);At(()=>{let A=setTimeout(()=>O(I,!0),0);return()=>clearTimeout(A)});var N=Ae(),k=de(N);{var E=A=>{var Q=Ae(),H=de(Q);{var z=le=>{Hm(le,{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 v()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return p()},get customFullscreenSupported(){return f()},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 g()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(X){l(X)},get playerControlsRef(){return d()},set playerControlsRef(X){d(X)}})},Y=le=>{Nm(le,{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 v()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return f()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(X){l(X)},get playerControlsRef(){return d()},set playerControlsRef(X){d(X)}})};R(H,le=>{r()?le(z):le(Y,!1)})}b(A,Q)};R(k,A=>{n(I)&&A(E)})}b(t,N),F(),o()}var xS=Ce('<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=m(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=m(()=>`${ln(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:(r,a)=>{var l=xS();b(r,l)},$$slots:{default:!0}}),F()}var wS=Ce('<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 Um(t,e){B(e,!0);let i=h(e,"reversed",3,!1),o=m(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),r=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(r)},get shadow(){return e.shadow},children:(a,l)=>{var d=wS();b(a,d)},$$slots:{default:!0}}),F()}var SS=M('<span class="hot-key-helpers-text s-u"> </span>'),TS=M('<div data-testid="hotkey-helper-icon" class="s-u"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),CS=M("<div><!></div>"),IS={hash:"s-u",code:'.hot-key-helpers-container.s-u{align-items:center;animation:s-u-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-u{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-u{left:calc(75% - 100px)}.hot-key-helpers-text.s-u{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-u{animation:s-u-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-u-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-u-fadeOut{0%{opacity:1}to{opacity:0}}'};function zm(t,e){B(e,!0),q(t,IS);let[i,o]=Ve(),r=()=>x(e.data,"$data",i),a=ve(),{features:l}=Lt(),d=a.ui.t,s=m(()=>!r()),u=m(()=>{var C;return((C=r())==null?void 0:C.type)==="BACKWARD_SEEK"}),v=m(()=>{var C;return((C=r())==null?void 0:C.type)==="FORWARD_SEEK"}),p=m(()=>{var C;return(C=r())==null?void 0:C.type}),f=m(()=>{var C,I;return(C=r())!=null&&C.t?d(r().t.key,{value:r().t.value||""}):(I=r())==null?void 0:I.text});var $=CS();let y;var g=T($);{var w=C=>{var I=TS(),N=de(I),k=T(N);{var E=j=>{let ie=m(()=>n(p)==="BACKWARD_SEEK");Um(j,{get reversed(){return n(ie)},shadow:!0})};R(k,j=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&j(E)})}var A=L(k,2);{var Q=j=>{Ns(j,{get size(){return"48"},shadow:!0})};R(A,j=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&j(Q)})}var H=L(A,2);{var z=j=>{Tn(j,{get size(){return"48"},shadow:!0})};R(H,j=>{n(p)==="PLAY"&&!l.playbackStatusShow&&j(z)})}var Y=L(H,2);{var le=j=>{tc(j,{get size(){return"48"},shadow:!0})};R(Y,j=>{n(p)==="REPLAY"&&!l.playbackStatusShow&&j(le)})}var X=L(Y,2);{var re=j=>{la(j,{get size(){return"48"},type:"off",shadow:!0})};R(X,j=>{n(p)==="SUBTITLES_OFF"&&j(re)})}var Z=L(X,2);{var we=j=>{la(j,{get size(){return"48"},shadow:!0})};R(Z,j=>{n(p)==="SUBTITLES_ON"&&j(we)})}var ue=L(Z,2);{var ne=j=>{let ie=m(()=>n(p)==="RATE_DOWN");dc(j,{get size(){return"48"},get reversed(){return n(ie)},testId:"rate-change-icon",shadow:!0})};R(ue,j=>{["RATE_DOWN","RATE_UP"].includes(n(p))&&j(ne)})}var _e=L(ue,2);{var xe=j=>{let ie=m(()=>n(p)==="EPISODE_PREV");ca(j,{get size(){return"48"},get reversed(){return n(ie)},shadow:!0})};R(_e,j=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(p))&&j(xe)})}var J=L(_e,2);{var Re=j=>{da(j,{get size(){return"48"},volume:0,shadow:!0})};R(J,j=>{n(p)==="MUTE"&&j(Re)})}var pe=L(J,2);{var P=j=>{da(j,{get size(){return"48"},volume:1,shadow:!0})};R(pe,j=>{n(p)==="VOLUME"&&j(P)})}S(N);var We=L(N,2);{var Te=j=>{var ie=SS(),Oe=T(ie,!0);S(ie),D(()=>me(Oe,n(f))),b(j,ie)};R(We,j=>{n(f)&&j(Te)})}D(()=>Me(N,"data-type",n(p))),b(C,I)};R(g,C=>{!n(s)&&n(p)&&C(w)})}S($),D(C=>y=se($,1,"hot-key-helpers-container s-u",null,y,C),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(v)})]),b(t,$),F(),o()}var ES=(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}},kS=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},PS=M('<div tabindex="0" role="button"><div class="button-block s-z" aria-hidden="true"><div class="button-row s-z"><div class="button button-up s-z"><!></div> <div class="button button-right s-z"><!></div></div> <div class="button-row s-z"><div class="button button-left s-z"><!></div> <div class="button button-down s-z"><!></div></div></div></div>'),AS={hash:"s-z",code:".immersive-controls.s-z{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-z{left:20px;top:50px}.button-block.s-z{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-z{display:flex;flex-direction:row;position:relative}.button.s-z{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-z svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-z svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-z svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-z svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-z svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-z:hover svg{opacity:1}"};function cc(t,e){B(e,!0),q(t,AS);let i=h(e,"isShifted",3,!1),o=ve(),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),v=G("aria_label_spherical_control");var p=PS();let f;p.__keydown=[ES,r,a,l,s,d],p.__keyup=[kS,r,u];var $=T(p),y=T($),g=T(y);g.__mousedown=a,g.__mouseup=u;var w=T(g);Mr(w,{direction:"up",useBtnColor:!0}),S(g);var C=L(g,2);C.__mousedown=d,C.__mouseup=u;var I=T(C);Mr(I,{direction:"up",useBtnColor:!0}),S(C),S(y);var N=L(y,2),k=T(N);k.__mousedown=s,k.__mouseup=u;var E=T(k);Mr(E,{direction:"up",useBtnColor:!0}),S(k);var A=L(k,2);A.__mousedown=l,A.__mouseup=u;var Q=T(A);Mr(Q,{direction:"up",useBtnColor:!0}),S(A),S(N),S($),S(p),D(H=>{f=se(p,1,"immersive-controls s-z",null,f,H),Me(p,"aria-label",v)},[()=>({"m-shifted":i()})]),rt("mouseleave",g,u),rt("mouseleave",C,u),rt("mouseleave",k,u),rt("mouseleave",A,u),b(t,p),F()}Xe(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as cb,Subscription as LS,filterChanged as MS,filter as VS}from"@vkontakte/videoplayer-shared/es2018";var db=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var Zu=class{constructor(){this.flickeringTimeout=db(1e3);this.subscriptions=new LS;this.isAuto=!1;this.isLive=!1;this.captions$=new cb([]);this.captionsPrepared$=new cb([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(VS(()=>this.isEnabled()),MS()).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 RS=M('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),NS=M('<span class="caption-line s-a"><span class="caption-segment s-a"></span></span>'),OS=M('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),DS=M('<div><span class="caption s-a"><!></span></div>'),BS=M("<div><!></div>"),FS={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 Qa(t,e){B(e,!0),q(t,FS);let[i,o]=Ve(),r=()=>x(f,"$currentSubtitle$",i),a=()=>x(y,"$isLive$",i),l=()=>x(g,"$isFullscreen",i),d=()=>x(w,"$previewTrackActive",i),s=()=>x($,"$isAutoSubtitleCaptionVisible$",i),u=h(e,"isMobile",3,!1),v=ve(),p=Lt(),f=v.state.currentSubtitle$,$=v.state.isAutoSubtitleCaptionVisible$,y=v.state.isLive$,g=v.ui.isFullscreen,w=v.ui.previewTrackActive,C=m(()=>!!r().isAuto),I=m(()=>!!a()),N=m(()=>e.playerSize.width*.02),k=m(()=>u()&&!l()||n(N)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(N)),E=W(null);Ne(()=>{var X,re,Z;(X=n(E))==null||X.setIsAuto(n(C)),(re=n(E))==null||re.setIsLive(n(I)),(Z=n(E))==null||Z.setCaptions(e.captions)});let A=W(ai([[]]));At(()=>{O(E,new Zu().subscribe(),!0);let X=n(E).captionsPrepared$.subscribe(re=>{O(A,re,!0)});return()=>{var re;(re=n(E))==null||re.destroy(),X.unsubscribe()}}),At(()=>{if(n(C)){let X=window.setTimeout(()=>{$.set(!1)},p.autoSubtitlesTimeout);return()=>{window.clearTimeout(X)}}else $.set(!1)});let Q=m(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var H=BS();let z;var Y=T(H);{var le=X=>{var re=DS();let Z;var we=T(re),ue=T(we);{var ne=xe=>{var J=RS(),Re=T(J),pe=T(Re,!0);S(Re),S(J),D(P=>{var We;qe(Re,`font-size: ${(We=n(k))!=null?We:""}px`),me(pe,P)},[()=>G("subtitles_auto_caption")]),b(xe,J)},_e=(xe,J)=>{{var Re=P=>{var We=Ae(),Te=de(We);gi(Te,17,()=>n(A),_d,(j,ie)=>{var Oe=NS(),De=T(Oe);gi(De,21,()=>n(ie),({value:tt,timeAppeared:U})=>U,(tt,U)=>{let Pe=()=>n(U).value,Ee=()=>n(U).timeAppeared;var Ue=Ae(),Ze=de(Ue);{var ye=ke=>{var Be=as();D(()=>me(Be,Pe())),b(ke,Be)};R(Ze,ke=>{(!Ee()||Ee()<=e.position)&&ke(ye)})}b(tt,Ue)}),S(De),S(Oe),D(()=>{var tt;return qe(De,`font-size: ${(tt=n(k))!=null?tt:""}px`)}),b(j,Oe)}),b(P,We)},pe=P=>{var We=Ae(),Te=de(We);gi(Te,17,()=>e.captions,({value:j})=>j,(j,ie)=>{let Oe=()=>n(ie).value;var De=OS(),tt=T(De),U=T(tt,!0);S(tt),S(De),D(()=>{var Pe;qe(tt,`font-size: ${(Pe=n(k))!=null?Pe:""}px`),me(U,Oe())}),b(j,De)}),b(P,We)};R(xe,P=>{var We;n(C)&&((We=n(A))!=null&&We.length)?P(Re):P(pe,!1)},J)}};R(ue,xe=>{n(C)&&s()?xe(ne):xe(_e,!1)})}S(we),S(re),D(xe=>{var J;Z=se(re,1,"subtitles-caption s-a",null,Z,xe),qe(re,`--subtitles-caption-margin: ${(J=n(Q))!=null?J:""}%`)},[()=>({mobile:u()})]),b(X,re)};R(Y,X=>{var re;(e.captions.length||(re=n(A))!=null&&re.length)&&X(le)})}S(H),D(X=>z=se(H,1,"subtitles-container s-a",null,z,X),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(C)&&!n(I)&&!s()})]),b(t,H),F(),o()}import{ChromecastState as HS}from"@vkontakte/videoplayer-core/es2018";var US=M('<div class="text s-11"> </div>'),zS=M('<div><div class="icon_wrapper s-11"><!></div> <!></div>'),WS={hash:"s-11",code:".wrapper.s-11{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-11{background-size:cover}.icon_wrapper.s-11{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-11{margin-top:20px}"};function uc(t,e){B(e,!0),q(t,WS);let i=h(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Lt();var r=zS();let a;var l=T(r),d=T(l);Gd(d,{get size(){return"48"},get iconState(){return HS.CONNECTED}}),S(l);var s=L(l,2);{var u=v=>{var p=US(),f=T(p);S(p),D(()=>{var $;return me(f,`Видео воспроизводится на ${($=i())!=null?$:""}`)}),b(v,p)};R(s,v=>{i()&&v(u)})}S(r),D(v=>{a=se(r,1,"wrapper s-11",null,a,v),qe(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})]),b(t,r),F()}var KS=Ce('<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 Wm(t){je(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=KS();b(e,o)},$$slots:{default:!0}})}var qS=M('<div class="container s-5"><!></div>'),QS={hash:"s-5",code:".container.s-5{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function Ga(t){q(t,QS);var e=qS(),i=T(e);Wm(i,{}),S(e),b(t,e)}var GS=M('<div class="playButton s-b" tabindex="0" role="button"><div class="playButtonBackground s-b"></div> <!></div>'),YS=M('<div data-testid="unstarted-thumb"><!></div>'),jS={hash:"s-b",code:".container.s-b{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-b{opacity:0;visibility:hidden}.container.bgCover.s-b{background-size:cover}.playButton.s-b{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-b,.playButtonBackground.s-b{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-b{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-b:hover .playButtonBackground:where(.s-b){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-b svg{position:relative}"};function Ya(t,e){B(e,!0),q(t,jS);let i=h(e,"iconVisible",3,!0),o=ve(),r=Lt(),a=o.ui.startedByKeyboard$,l=G("tooltip_play"),d=$=>{var g;let y=$.code;["Enter","Space"].includes(y)&&($.stopPropagation(),$.preventDefault(),a.set(!0),(g=e.startVideo)==null||g.call(e))},s=$=>{var y,g;$.stopPropagation(),(y=e.startVideo)==null||y.call(e),(g=e.onClick)==null||g.call(e,$)};var u=YS();let v;u.__click=s,u.__contextmenu=function(...$){var y;(y=e.onContextMenu)==null||y.apply(this,$)};var p=T(u);{var f=$=>{var y=GS();y.__keydown=d;var g=L(T(y),2);Tn(g,{get size(){return"48"}}),S(y),D(()=>Me(y,"aria-label",l)),b($,y)};R(p,$=>{i()&&$(f)})}return S(u),D($=>{v=se(u,1,"container s-b",null,v,$),qe(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:r.features.previewNoEmptySpace})]),b(t,u),F({handlePressKey:d,handleClick:s})}Xe(["click","contextmenu","keydown"]);var XS=M('<span class="text s-t"> </span>'),ZS=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},JS=M('<a target="_blank" class="link s-t"><!></a>'),e2=M('<div data-testid="video_title"><!></div>'),t2={hash:"s-t",code:".title.s-t{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-t,.title.s-t{color:var(--white)}.link.s-t{pointer-events:auto;text-decoration:none}.link.s-t:hover{text-decoration:underline}.text.s-t{pointer-events:auto}.size-sm.s-t{font-size:14px;font-weight:500;line-height:18px}.hidden.s-t{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function Km(t,e){var y;B(e,!0),q(t,t2);let i=g=>{var w=XS(),C=T(w,!0);S(w),Ye(w,I=>l(I),()=>l()),D(()=>me(C,o())),rt("mouseenter",w,function(...I){var N;(N=e.onMouseEnter)==null||N.apply(this,I)}),rt("mouseleave",w,function(...I){var N;(N=e.onMouseLeave)==null||N.apply(this,I)}),b(g,w)},o=h(e,"title",3,""),r=h(e,"isHidden",3,!1),a=h(e,"size",3,"md"),l=h(e,"ref",15),d=W(void 0);At(()=>{var w;requestAnimationFrame(()=>{var C;(C=e.onVisibilityChanged)==null||C.call(e,!0)});function g(C){var I;C.propertyName==="transform"&&((I=e.onVisibilityChanged)==null||I.call(e,!r()))}return(w=n(d))==null||w.addEventListener("transitionend",g),()=>{var C;return(C=n(d))==null?void 0:C.removeEventListener("transitionend",g)}});let s=(y=e.getVideoDeeplink)==null?void 0:y.call(e);var u=e2();let v;var p=T(u);{var f=g=>{var w=JS();w.__click=[ZS,e];var C=T(w);i(C),S(w),D(()=>Me(w,"href",s||"")),b(g,w)},$=g=>{i(g)};R(p,g=>{s||e.onTitleClicked?g(f):g($,!1)})}S(u),Ye(u,g=>O(d,g),()=>n(d)),D(g=>v=se(u,1,`title size-${a()}`,"s-t",v,g),[()=>({hidden:r()})]),b(t,u),F()}Xe(["click"]);import{throttleFn as l2}from"@vkontakte/videoplayer-shared/es2018";var i2=M('<div class="timer__cell cell s-1a"><span class="cell__value s-1a"> </span> <span class="cell__unit s-1a"> </span></div> <span class="timer__points s-1a"> </span>',1),o2=M('<div class="timer__cell cell s-1a"><span class="cell__value s-1a"> </span> <span class="cell__unit s-1a"> </span></div> <span class="timer__points s-1a"> </span>',1),n2=M('<div class="timer__cell cell s-1a"><span class="cell__value s-1a"> </span> <span class="cell__unit s-1a"> </span></div> <span class="timer__points s-1a"> </span>',1),r2=M('<div class="timer__cell cell s-1a"><span class="cell__value s-1a"> </span> <span class="cell__unit s-1a"> </span></div>'),s2=M("<div><!> <!> <!> <!></div>"),a2={hash:"s-1a",code:".timer__container.s-1a{align-items:flex-start;display:flex;justify-content:center}.cell.s-1a{align-items:center;display:flex;flex-direction:column}.cell__value.s-1a{font-size:48px;font-weight:600;line-height:1.2}.small.s-1a .cell__value:where(.s-1a){font-size:24px}.cell__unit.s-1a{font-size:14px;font-weight:400;line-height:1.2}.small.s-1a .cell__unit:where(.s-1a){font-size:12px}.timer__points.s-1a{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-1a .timer__points:where(.s-1a){font-size:20px}"};function qm(t,e){B(e,!0),q(t,a2);let i=W(""),o=W(""),r=W(""),a=W(""),l,d=32,s=d/2,u=H=>String(H).padStart(2,"0"),v=H=>Math.max(H.length,1),p=H=>`${(e.isSmallSize?s:d)*v(H)}px`,f=H=>{let z=Math.floor(H/86400);z&&(H-=z*86400,O(i,u(z),!0));let Y=Math.floor(H/3600);O(o,u(Y),!0);let le=Math.floor(H/60)%60;O(r,u(le),!0);let X=H%60;O(a,u(X),!0)},$=()=>{let H=Math.floor(Date.now()/1e3),z=e.startTime-H;f(z),z>=1?l=requestAnimationFrame($):e.onTimerOver()};At(()=>{l=requestAnimationFrame($)}),an(()=>{cancelAnimationFrame(l)});var y=s2();let g;var w=T(y);{var C=H=>{var z=i2(),Y=de(z);let le;var X=T(Y),re=T(X,!0);S(X);var Z=L(X,2),we=T(Z,!0);S(Z),S(Y);var ue=L(Y,2),ne=T(ue,!0);S(ue),D((_e,xe,J)=>{le=qe(Y,"",le,{width:_e}),me(re,n(i)),me(we,xe),me(ne,J)},[()=>p(n(i)),()=>G("waiting_live_day_value"),()=>G("waiting_live_colon")]),b(H,z)};R(w,H=>{n(i)&&H(C)})}var I=L(w,2);{var N=H=>{var z=o2(),Y=de(z);let le;var X=T(Y),re=T(X,!0);S(X);var Z=L(X,2),we=T(Z,!0);S(Z),S(Y);var ue=L(Y,2),ne=T(ue,!0);S(ue),D((_e,xe,J)=>{le=qe(Y,"",le,{width:_e}),me(re,n(o)),me(we,xe),me(ne,J)},[()=>p(n(o)),()=>G("waiting_live_hour_value"),()=>G("waiting_live_colon")]),b(H,z)};R(I,H=>{n(o)&&H(N)})}var k=L(I,2);{var E=H=>{var z=n2(),Y=de(z);let le;var X=T(Y),re=T(X,!0);S(X);var Z=L(X,2),we=T(Z,!0);S(Z),S(Y);var ue=L(Y,2),ne=T(ue,!0);S(ue),D((_e,xe,J)=>{le=qe(Y,"",le,{width:_e}),me(re,n(r)),me(we,xe),me(ne,J)},[()=>p(n(r)),()=>G("waiting_live_minute_value"),()=>G("waiting_live_colon")]),b(H,z)};R(k,H=>{n(r)&&H(E)})}var A=L(k,2);{var Q=H=>{var z=r2();let Y;var le=T(z),X=T(le,!0);S(le);var re=L(le,2),Z=T(re,!0);S(re),S(z),D((we,ue)=>{Y=qe(z,"",Y,{width:we}),me(X,n(a)),me(Z,ue)},[()=>p(n(a)),()=>G("waiting_live_second_value")]),b(H,z)};R(A,H=>{n(a)&&H(Q)})}S(y),D(H=>g=se(y,1,"timer__container s-1a",null,g,H),[()=>({small:e.isSmallSize})]),b(t,y),F()}var d2=M('<div class="waiting s-w"><span> </span></div>'),c2=M('<div class="upcoming-timer timer s-w"><span> </span> <!></div>'),u2=M('<div class="waiting-container s-w"><!></div>'),p2={hash:"s-w",code:'.waiting-container.s-w{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.waiting-container.s-w,.waiting-container.s-w:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-w:before{backdrop-filter:blur(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-w{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-w{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-w{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-w{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-w{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-w{font-size:15px}.medium.s-w{font-size:17px}'};function pc(t,e){B(e,!0),q(t,p2);let i=h(e,"startTime",3,0),o=m(()=>i()<Math.floor(Date.now()/1e3)),r=W(void 0),a=W(void 0),l=0,d=W(void 0),s=W(void 0),u=m(()=>{var w,C;return((w=n(d))!=null?w:1/0)<=509||((C=n(s))!=null?C:1/0)<=320}),v=m(()=>{var w,C;return!n(u)&&(((w=n(d))!=null?w:1/0)<=699||((C=n(s))!=null?C:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?l2(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let w={type:n(o)?"expired":"default",size:n(u)?"s":n(v)?"m":"l"},C=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(w,C)})},300):void 0;Ne(()=>{n(s),n(d),n(o),p==null||p()}),an(()=>{if(cancelAnimationFrame(l),p==null||p.cancel(),e.onUpcomingLiveViewStateChanged){let w={type:n(o)?"expired":"default",size:n(u)?"s":n(v)?"m":"l"};e.onUpcomingLiveViewStateChanged(w)}});var f=u2();f.__contextmenu=function(...w){var C;(C=e.onContextMenu)==null||C.apply(this,w)},f.__click=function(...w){var C;(C=e.onClick)==null||C.apply(this,w)};var $=T(f);{var y=w=>{var C=d2(),I=T(C);let N;var k=T(I,!0);S(I),S(C),Ye(C,E=>O(r,E),()=>n(r)),D((E,A)=>{N=se(I,1,"waiting__title s-w",null,N,E),me(k,A)},[()=>({medium:n(v),small:n(u)}),()=>G("waiting_live_upcoming_title")]),b(w,C)},g=w=>{var C=c2(),I=T(C);let N;var k=T(I,!0);S(I);var E=L(I,2);let A=m(()=>n(u)||n(v)),Q=m(()=>i()||0);qm(E,{get isSmallSize(){return n(A)},get startTime(){return n(Q)},onTimerOver:()=>O(o,!0)}),S(C),Ye(C,H=>O(a,H),()=>n(a)),D((H,z)=>{N=se(I,1,"timer__title s-w",null,N,H),me(k,z)},[()=>({medium:n(v),small:n(u)}),()=>G("waiting_live_timer_title")]),b(w,C)};R($,w=>{n(o)?w(y):w(g,!1)})}S(f),D(()=>qe(f,`background-image: url(${e.thumbUrl})`)),wn(f,"clientWidth",w=>O(d,w)),wn(f,"clientHeight",w=>O(s,w)),b(t,f),F()}Xe(["contextmenu","click"]);var f2=M('<div class="waiting-container s-v"><div class="waiting-caption s-v"><!> <p class="waiting-title s-v"> </p></div></div>'),m2={hash:"s-v",code:'.waiting-container.s-v{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-v,.waiting-container.s-v:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-v:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-v{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-v{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function ja(t,e){B(e,!0),q(t,m2);let i=h(e,"thumbUrl",3,""),o={recover:G("waiting_live_recover_title"),record:G("waiting_record_title")},r=m(()=>o[e.kind]||"");var a=f2();a.__contextmenu=function(...v){var p;(p=e.onContextMenu)==null||p.apply(this,v)},a.__click=function(...v){var p;(p=e.onClick)==null||p.apply(this,v)};var l=T(a),d=T(l);Ba(d,{style:"position: static; transform: translate(0, 0)"});var s=L(d,2),u=T(s,!0);S(s),S(l),S(a),D(()=>{qe(a,`background-image: url('${i()}')`),me(u,n(r))}),b(t,a),F()}Xe(["contextmenu","click"]);var v2=Ce('<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 Qm(t){je(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=v2();b(e,o)},$$slots:{default:!0}})}var g2=M('<div class="select-icon s-1x"><!></div>'),h2={hash:"s-1x",code:".select-icon.s-1x{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function fc(t){q(t,h2);var e=g2(),i=T(e);Qm(i,{}),S(e),b(t,e)}var _2=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},b2=(t,e)=>{Ml(t,()=>e.item.selectItem(e.item.value))},$2=M("<p> </p>"),y2=M('<p class="sublabel s-1u"> </p>'),x2=M('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),w2={hash:"s-1u",code:".menu-item-value.s-1u{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1u{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1u,.sublabel.s-1u{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1u{opacity:.5}"};function Gm(t,e){B(e,!0),q(t,w2);let i=h(e,"isMobile",3,!1);var o=x2();let r;o.__click=[_2,e],o.__keydown=[b2,e];var a=T(o);{var l=y=>{fc(y,{})};R(a,y=>{e.item.selected&&y(l)})}var d=L(a,2);let s;var u=T(d);{var v=y=>{var g=Ae(),w=de(g);Mi(w,()=>e.item.valueComponent,(C,I)=>{I(C,ks(()=>{var N;return(N=e.item.valueComponentParams)!=null?N:{}}))}),b(y,g)},p=y=>{var g=$2();let w;var C=T(g,!0);S(g),D(I=>{var N;w=se(g,1,"label s-1u",null,w,I),me(C,(N=e.item.label)!=null?N:e.item.value)},[()=>({mobile:i()})]),b(y,g)};R(u,y=>{e.item.valueComponent?y(v):y(p,!1)})}var f=L(u,2);{var $=y=>{var g=y2(),w=T(g,!0);S(g),D(()=>me(w,e.item.sublabel)),b(y,g)};R(f,y=>{e.item.sublabel&&y($)})}S(d),S(o),D((y,g,w)=>{r=se(o,1,"item",null,r,y),Me(o,"data-value",e.item.value),Me(o,"aria-label",g),Me(o,"data-testid",e.item.dataTestid),s=se(d,1,"menu-item-value s-1u",null,s,w),Me(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var y,g;return(g=(y=e.item.ariaLabel)!=null?y:e.item.label)!=null?g:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),b(t,o),F()}Xe(["click","keydown"]);var S2=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function Ym(t,e){B(e,!0);let i=h(e,"isMobile",3,!1),o=h(e,"refMenuItems",15),r=m(()=>()=>e.openSubMenuList(e.item.children)),a=m(()=>g=>Lu(g,n(r)));var l=S2();let d;l.__click=function(...g){var w;(w=n(r))==null||w.apply(this,g)},l.__keydown=function(...g){var w;(w=n(a))==null||w.apply(this,g)};var s=T(l);{var u=g=>{fc(g,{})};R(s,g=>{e.item.selected&&g(u)})}var v=L(s,2);let p;var f=T(v);{var $=g=>{var w=Ae();let C=m(()=>e.item.valueComponent);var I=de(w);Mi(I,()=>n(C),(N,k)=>{k(N,ks(()=>{var E;return(E=e.item.valueComponentParams)!=null?E:{}}))}),b(g,w)},y=g=>{var w=as();D(()=>me(w,e.item.label)),b(g,w)};R(f,g=>{e.item.valueComponent?g($):g(y,!1)})}S(v),S(l),Ye(l,g=>o(o()[e.item.id]=g,!0),()=>{var g;return(g=o())==null?void 0:g[e.item.id]}),D((g,w)=>{var C;d=se(l,1,"item",null,d,g),Me(l,"aria-label",(C=e.item.ariaLabel)!=null?C:e.item.label),Me(l,"data-testid",e.item.id),p=se(v,1,"menu-item-value",null,p,w)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),b(t,l),F()}Xe(["click","keydown"]);var Zr={"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 C2=(t,e)=>{k_(t,e.returnFromSubMenu,e.closeSettingsMenu)},I2=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},E2=(t,e)=>{Nd(t)&&(Vr(t),e.returnFromSubMenu())},k2=M('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1m"> </p></li> <!></ul></div>'),P2={hash:"s-1m",code:".sub-menu.s-1m{--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-1m .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1m{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1m{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1m .items:where(.s-1m) .item.header:where(.s-1m){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-1m .title:where(.s-1m){margin-left:8px}.sub-menu.s-1m .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1m .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1m .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1m .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1m .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1m .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1m .item .sublabel{font-size:12px;line-height:14px}.item.s-1m:not(.mobile) p:where(.s-1m),.sub-menu.s-1m .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function Xm(t,e){B(e,!0),q(t,P2);let[i,o]=Ve(),r=()=>x(p,"$isFullscreen",i),a=()=>x(f,"$playerSize",i),l=h(e,"isMobile",3,!1),d=h(e,"playerControlsHeight",3,0),s=h(e,"ariaLabelReturnFromSubMenu",19,()=>G("aria_label_submenu_back")),u=h(e,"listRef",15);At(()=>{let X=e.items.findIndex(re=>re.selected);u().children[X+1].focus()});let v=ve(),p=v.ui.isFullscreen,f=v.ui.playerSize,$=W(void 0),y=W(0),g=W(0),w=m(()=>l()&&r()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n(g)-d()}px; overflow: auto;`),C=m(()=>Math.max(e.minWidth,n(y)));var I=k2();let N;var k=T(I);let E;k.__keydown=[C2,e];var A=T(k);let Q;A.__click=[I2,e],A.__keydown=[E2,e];var H=T(A);Mr(H,{direction:"left"});var z=L(H,2),Y=T(z,!0);S(z),S(A),Ye(A,X=>O($,X),()=>n($));var le=L(A,2);gi(le,17,()=>e.items,_d,(X,re)=>{var Z=Ae(),we=de(Z);{var ue=_e=>{Gm(_e,{get item(){return n(re)},get isMobile(){return l()}})},ne=(_e,xe)=>{{var J=Re=>{Ym(Re,{get isMobile(){return l()},get item(){return n(re)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};R(_e,Re=>{n(re).type==="OPEN_SUB_MENU"&&Re(J)},xe)}};R(we,_e=>{n(re).type==="SELECT_VALUE"?_e(ue):_e(ne,!1)})}b(X,Z)}),S(k),Ye(k,X=>u(X),()=>u()),S(I),D((X,re,Z)=>{N=se(I,1,"sub-menu menu s-1m",null,N,X),Me(I,"data-testid",`${e.id}-sub-menu`),qe(I,`min-width: ${n(C)}px`),E=se(k,1,"items s-1m",null,E,re),qe(k,n(w)),Q=se(A,1,"item header back s-1m",null,Q,Z),Me(A,"aria-label",s()),me(Y,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),wn(A,"clientWidth",X=>O(y,X)),wn(A,"clientHeight",X=>O(g,X)),b(t,I),F(),o()}Xe(["keydown","click"]);import{noop as A2}from"@vkontakte/videoplayer-shared/es2018";var L2=(t,e)=>Lu(t,e()),M2=(t,e)=>{t.stopPropagation(),e()()},V2=M('<div class="value s-1o"> </div>'),R2=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),N2={hash:"s-1o",code:".value.s-1o{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function Zm(t,e){B(e,!0),q(t,N2);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,A2),r=h(e,"valueComponent",3,void 0),a=h(e,"ref",15);var l=R2();let d;l.__click=[M2,o],l.__keydown=[L2,o];var s=T(l),u=T(s);{var v=C=>{Wa(C,{get icon(){return e.icon}})},p=C=>{var I=Ae();let N=m(()=>e.icon);var k=de(I);Mi(k,()=>n(N),(E,A)=>{A(E,{})}),b(C,I)};R(u,C=>{typeof e.icon=="string"?C(v):C(p,!1)})}S(s);var f=L(s,2),$=T(f,!0);S(f);var y=L(f,2);{var g=C=>{var I=Ae();let N=m(r);var k=de(I);Mi(k,()=>n(N),(E,A)=>{A(E,{})}),b(C,I)},w=C=>{var I=V2(),N=T(I,!0);S(I),D(()=>me(N,e.value)),b(C,I)};R(y,C=>{r()?C(g):C(w,!1)})}S(l),Ye(l,C=>a(C),()=>a()),D(C=>{d=se(l,1,"item",null,d,C),Me(l,"aria-label",e.ariaLabel),Me(l,"data-testid",e.id),me($,e.label)},[()=>({mobile:i()})]),b(t,l),F()}Xe(["click","keydown"]);import{noop as pb}from"@vkontakte/videoplayer-shared/es2018";var O2=(t,e)=>{Ml(t,()=>e())},D2=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),B2=M('<img class="icon" aria-hidden="true"/>'),F2=M('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1n"> </div></li>'),H2={hash:"s-1n",code:".label.s-1n{overflow:hidden;text-overflow:ellipsis}"};function Jm(t,e){B(e,!0),q(t,H2);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,pb),r=h(e,"closeSettings",3,pb),a=W(!1),l=()=>{O(a,!0)},d=w=>{w==null||w.stopPropagation(),o()(),r()()};var s=F2();let u;s.__click=d,s.__keydown=[O2,d];var v=T(s),p=T(v);{var f=w=>{var C=Ae(),I=de(C);{var N=E=>{var A=D2();b(E,A)},k=E=>{var A=B2();D(()=>Me(A,"src",e.icon)),rt("error",A,l),Ea(A),b(E,A)};R(I,E=>{n(a)?E(N):E(k,!1)})}b(w,C)},$=w=>{var C=Ae();let I=m(()=>e.icon);var N=de(C);Mi(N,()=>n(I),(k,E)=>{E(k,{})}),b(w,C)};R(p,w=>{typeof e.icon=="string"?w(f):w($,!1)})}S(v);var y=L(v,2),g=T(y,!0);S(y),S(s),D(w=>{var C;u=se(s,1,"item",null,u,w),Me(s,"aria-label",(C=e.ariaLabel)!=null?C:e.label),Me(s,"data-testid",e.id),me(g,e.label)},[()=>({mobile:i()})]),b(t,s),F()}Xe(["click","keydown"]);import{noop as W2}from"@vkontakte/videoplayer-shared/es2018";var U2=M('<div class="toggle_wrap s-1r"><div></div> <div class="toggle-label s-1r"></div></div>'),z2={hash:"s-1r",code:'.toggle_wrap.s-1r{cursor:pointer;font-size:12px;line-height:15px;min-height:15px;padding:0;user-select:none}.toggle.s-1r{background-color:var(--toggle-color-separator);border-radius:45px;cursor:pointer;float:right;height:9px;margin-top:3px;width:28px}.toggle.s-1r: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-1r:after{background-color:var(--toggle-color-on);left:13px}.toggle-label.s-1r{overflow:hidden}'};function ev(t,e){q(t,z2);let i=h(e,"enabled",3,!1);var o=U2(),r=T(o);let a;ci(2),S(o),D(l=>a=se(r,1,"toggle s-1r",null,a,l),[()=>({on:i()})]),b(t,o)}var K2=(t,e,i)=>{P_(t,e(),o=>i()(o))},q2=(t,e,i)=>{t.stopPropagation(),e()(!i())},Q2=M('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),G2=M('<li role="menuitem" tabindex="0"><!></li>');function tv(t,e){B(e,!0);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,W2),r=h(e,"enabled",3,!1),a=h(e,"tooltipText",3,void 0),l=h(e,"maxTooltipWidth",3,void 0);var d=G2();let s;d.__click=[q2,o,r],d.__keydown=[K2,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:(v,p)=>{var f=Q2();let $;var y=T(f),g=T(y);{var w=E=>{Wa(E,{get icon(){return e.icon}})},C=E=>{var A=Ae();let Q=m(()=>e.icon);var H=de(A);Mi(H,()=>n(Q),(z,Y)=>{Y(z,{})}),b(E,A)};R(g,E=>{typeof e.icon=="string"?E(w):E(C,!1)})}S(y);var I=L(y,2),N=T(I,!0);S(I);var k=L(I,2);ev(k,{get enabled(){return r()}}),S(f),D(E=>{$=se(f,1,"switch-wrapper",null,$,E),me(N,e.label)},[()=>({mobile:i()})]),b(v,f)},$$slots:{default:!0}}),S(d),D(v=>{var p;s=se(d,1,"item switch-item",null,s,v),Me(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),Me(d,"data-testid",e.id)},[()=>({mobile:i()})]),b(t,d),F()}Xe(["click","keydown"]);import{isValidURL as bT,VideoQuality as wb}from"@vkontakte/videoplayer-shared/es2018";var fb=()=>{let t=W(ai([])),e=m(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{O(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{O(t,[],!0)}}};import{getVideoQualityLabel as Y2}from"@vkontakte/videoplayer-shared/es2018";var j2=M('<div class="quality-icon s-1q"><!></div>'),X2=M('<div class="quality-label s-1q"><span> </span> <!></div>'),Z2={hash:"s-1q",code:".quality-label.s-1q{position:relative}.quality.s-1q{font-size:13px;line-height:18px}.quality.sub.s-1q{opacity:.7}.quality-icon.s-1q{display:flex;padding-left:2px;position:absolute;right:0;top:0;transform:translateX(100%)}.quality-icon.s-1q svg{color:var(--blue-light)}"};function Xa(t,e){B(e,!0),q(t,Z2);let i=h(e,"isSubCase",3,!1),o=m(()=>e.quality?Y2(e.quality):""),r=m(()=>Du(e.quality));var a=X2(),l=T(a);let d;var s=T(l,!0);S(l);var u=L(l,2);{var v=p=>{var f=j2();let $=m(()=>n(r));var y=T(f);Mi(y,()=>n($),(g,w)=>{w(g,{})}),S(f),D(()=>Me(f,"data-testid",`${n(o)}-icon`)),b(p,f)};R(u,p=>{n(r)&&!e.isMobile&&p(v)})}S(a),D(p=>{d=se(l,1,"s-1q",null,d,p),me(s,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),b(t,a),F()}import{VideoQuality as J2}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as mb}from"@vkontakte/videoplayer-core/es2018";var vb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},gb=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=vb({quality:t,availableQualities:e});return i?t===mb.INVARIANT?G("auto_quality_invariant"):G("auto_quality",{actual:o}):o},hb=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===mb.INVARIANT?i:`${i}${vb({quality:t,availableQualities:e})}`:"...";var eT=M('<div class="menu-item-value-wrapper s-1s"><!></div>'),tT={hash:"s-1s",code:".menu-item-value-wrapper.s-1s{line-height:normal}"};function Wl(t,e){B(e,!0),q(t,tT);let[i,o]=Ve(),r=()=>x(s,"$currentQuality$",i),a=()=>x(u,"$availableQualities$",i),l=()=>x(v,"$isMobile$",i),d=ve(),s=d.state.currentQuality$,u=d.state.availableQualities$,v=d.ui.isMobile,p=" · ",f=m(()=>e.prefix+(e.selected&&r()!==J2.INVARIANT?p:"")),$=m(()=>hb({prefix:n(f),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=eT(),g=T(y);let w=m(()=>e.selected?r():void 0);Xa(g,{get quality(){return n(w)},get label(){return n($)},get isMobile(){return l()},isSubCase:!0}),S(y),b(t,y),F(),o()}var iT=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")},oT={br:!0,span:!0},iv=(t,e={})=>{var d,s,u,v,p,f,$;if(!t)return t;let i={...oT,...e},o=Object.keys(i);if(!o.length)return t;let r=iT(o),a=[],l=0;for(let y of t.matchAll(r)){let g=y[0],w=((d=y.groups)==null?void 0:d.keyhtml)||((s=y.groups)==null?void 0:s.keyi18n)||((u=y.groups)==null?void 0:u.keyhtmlself)||((v=y.groups)==null?void 0:v.keyi18nself)||"",{index:C}=y;if(!i[w]){a.push(t.slice(l,C)),l=C+g.length;continue}let I=(p=y.groups)!=null&&p.childrenhtml?iv(y.groups.childrenhtml,i):"",N=(f=y.groups)!=null&&f.childrenhtml?g.replace(new RegExp(($=y.groups)==null?void 0:$.childrenhtml),()=>I||""):g;a.push(t.slice(l,C),N),l=C+g.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function mc(t,e){B(e,!1);let i=h(e,"message",8),o=iv(i());$o();var r=Ae(),a=de(r);{var l=d=>{var s=Ae(),u=de(s);bd(u,()=>o),b(d,s)};R(a,d=>{o&&d(l)})}b(t,r),F()}var nT=M('<p class="quality-applies sublabel s-1t"><!></p>'),rT={hash:"s-1t",code:".quality-applies.s-1t{color:hsla(0,0%,100%,.5);display:flex;justify-content:end;padding:3px 0}.quality-applies span{color:#70c1ff}"};function ov(t,e){B(e,!1),q(t,rT),$o();var i=nT(),o=T(i);let r=_n(()=>G("quality_applience",{action:`<span>${G("quality_applience_action")}</span>`}));mc(o,{get message(){return n(r)}}),S(i),b(t,i),F()}var bb=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",selected:o,valueComponent:Wl,valueComponentParams:{prefix:G("other_quality"),selected:o},children:"quality-other-settings"}},nv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:G("auto_quality_limit"),valueComponent:e?Wl:void 0,valueComponentParams:{prefix:G("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),$b=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:ov,bottomBordered:!0,children:"quality-appliance"}),rv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"quality-high",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:G("high_quality"),valueComponent:t?Wl:void 0,valueComponentParams:{prefix:G("high_quality"),selected:i},sublabel:G("high_quality_description")}),sv=({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:G("traffic_saving_quality"),valueComponent:t?Wl:void 0,valueComponentParams:{prefix:G("traffic_saving_quality"),selected:i},sublabel:G("traffic_saving_quality_description")});var Ju=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),ep=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,r;if(i==="und"?r=void 0:i&&(r=(l=Xd(i))!=null?l:i),o&&i&&r){let d=e.filter(s=>s.label===o&&s.language===i);if(d.length===1)return G("audio_stream_display_language_label",{language:r,label:o});{let s=Ju(t,d);return G("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=Ju(t,d);return G("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=Ju(t,d);return G("audio_stream_display_language_index",{language:r,index:s})}}let a=Ju(t,e);return G("audio_stream_display_unknown",{index:a})};var sT={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:r}=t,a=[];return i&&a.push({handler:nv,selected:e&&!o&&!r||!1}),a.push({handler:sv,selected:o},{handler:rv,selected:r}),{title:G("submenu_quality"),id:"quality-settings",items:[$b(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),bb(t)]}},"quality-other-settings":({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"quality-other-settings",title:G("submenu_quality"),closeSettingsMenu:t,items:i.map(r=>({type:"SELECT_VALUE",value:r.value,valueComponent:Xa,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:G("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:nv,selected:((i=$u())==null?void 0:i.type)==="auto_quality"},{handler:sv,selected:((o=$u())==null?void 0:o.type)==="traffic_saving"},{handler:rv,selected:((r=$u())==null?void 0:r.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-languages":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-languages",title:G("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:ep(r,e)}))}),"playback-rate":({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"playback-rate",title:G("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:G("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i.value,selectItem:()=>e(i),selected:i.selected,label:i.displayValue,dataTestid:i.value===Cn?"sub_off":void 0}))})},yb=({subMenuId:t,context:e})=>t?[sT[t](e)]:[];var aT=Ce('<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 av(t){je(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=aT();b(e,o)},$$slots:{default:!0}})}var lT=Ce('<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 lv(t){je(t,{width:"18",height:"15",children:(e,i)=>{var o=lT();b(e,o)},$$slots:{default:!0}})}var dT=Ce('<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 dv(t){je(t,{testId:"play-speed-icon",children:(e,i)=>{var o=dT();b(e,o)},$$slots:{default:!0}})}var cT=Ce('<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 cv(t){je(t,{testId:"download-icon",children:(e,i)=>{var o=cT();b(e,o)},$$slots:{default:!0}})}var uT=Ce('<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 uv(t){je(t,{testId:"report-icon",children:(e,i)=>{var o=uT();b(e,o)},$$slots:{default:!0}})}var pT=Ce('<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 tp(t){je(t,{children:(e,i)=>{var o=pT();b(e,o)},$$slots:{default:!0}})}var fT=Ce('<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 pv(t){je(t,{testId:"info-icon",children:(e,i)=>{var o=fT();b(e,o)},$$slots:{default:!0}})}var mT=M('<div class="menu-item-value-wrapper s-1w"><!></div>'),vT={hash:"s-1w",code:".menu-item-value-wrapper.s-1w{line-height:normal}"};function fv(t,e){B(e,!0),q(t,vT);let[i,o]=Ve(),r=()=>x(u,"$currentQuality$",i),a=()=>x(v,"$availableQualities$",i),l=()=>x(p,"$isAutoQualityEnabled$",i),d=()=>x(f,"$isMobile$",i),s=ve(),u=s.state.currentQuality$,v=s.state.availableQualities$,p=s.state.isAutoQualityEnabled$,f=s.ui.isMobile,$=m(()=>gb({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=mT(),g=T(y);Xa(g,{get quality(){return r()},get label(){return n($)},get isMobile(){return d()}}),S(y),b(t,y),F(),o()}var hT={"quality-settings":({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?G("auto_quality_option"):e)||"";return{id:"quality-settings",type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_quality",{actual:o}),icon:zd,label:G("menu_quality"),value:e,valueComponent:fv,weight:Zr["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:Zr["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:G("aria_label_submenu_traffic_saving"),icon:av,label:G("menu_traffic_saving"),enabled:t,tooltipText:G("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-languages-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=ep(t,e);return{id:"audio-languages-settings",weight:Zr["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_audio_languages",{actual:i}),icon:lv,label:G("menu_audio_languages"),value:i,children:"audio-languages"}},"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:Zr["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_rate",{actual:i}),icon:dv,label:G("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:Zr["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_subtitle",{actual:t.displayValue}),icon:la,label:G("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:Zr.download,type:"CLICK",onClick:t,label:G("download_video_caption"),ariaLabel:G("aria_label_menu_download"),icon:cv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:Zr.report,type:"CLICK",onClick:t,label:G("menu_report"),ariaLabel:`${G("menu_report")}. ${G("aria_label_new_tab_alert")}`,icon:uv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:Zr["copy-data"],type:"CLICK",onClick:t,label:G("menu_copy_debug"),ariaLabel:G("menu_copy_debug"),icon:tp,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:Zr["save-trace-info"],type:"CLICK",onClick:t,label:G("menu_save_debug"),ariaLabel:G("menu_save_debug"),icon:tp,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:Zr["debug-info"],type:"CLICK",onClick:t,ariaLabel:G("aria_label_menu_debug_overlay"),label:G("menu_debug_overlay"),icon:pv,isHiddenFor:["desktop"]})},xb=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>hT[r](e)),...i.map(r=>({...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(Oa)};var $T=(t,e)=>{Au(t,e)},yT=M('<div><div> </div> <div class="close s-y"></div></div>'),xT=M('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),wT=M("<div><!> <!></div>"),ST={hash:"s-y",code:'.settings-menu-container.mobile.s-y{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-y ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-y .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-y .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-y .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-y .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-y .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-y .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-y{line-height:40px}.settings-menu.desktop.s-y{min-width:300px}.settings-menu-container.s-y .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-y .menu.mobile.hidden{display:none}.settings-menu-container.s-y .menu .item:not(.switch-item),.settings-menu-container.s-y .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-y .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-y .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-y .item:not(.switch-item),.settings-menu.s-y .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-y .item.mobile:not(.switch-item),.settings-menu.s-y .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-y .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-y .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-y .item.header.mobile:where(.s-y){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-y .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-y .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-y .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-y .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-y .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-y{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-y:after,.close.s-y:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-y:before{transform:rotate(45deg)}.close.s-y:after{transform:rotate(-45deg)}'};function vc(t,e){B(e,!0),q(t,ST);let[i,o]=Ve(),r=()=>x(De,"$settingsMenuVisible",i),a=()=>x(tt,"$settingsMenuOpenedByKeyboard",i),l=()=>x(Be,"$debugPanelVisible",i),d=()=>x(Pe,"$isMobile",i),s=()=>x(ke,"$playerSize",i),u=()=>x(Oe,"$hasMpegSources$",i),v=()=>x(Ee,"$mobileNotReportControlHidden$",i),p=()=>x(J,"$autoQualityLimitingAvailable$",i),f=()=>x(j,"$availableSubtitlesList$",i),$=()=>x(Ue,"$isLiveWithPlaybackSpeed",i),y=()=>x(ne,"$availableAudioStreams$",i),g=()=>x(We,"$availablePlaybackRates$",i),w=()=>x(ue,"$currentAudioStream$",i),C=()=>x(P,"$currentPlaybackRate$",i),I=()=>x(Ze,"$trafficSavingEnabled",i),N=()=>x(_e,"$currentQuality$",i),k=()=>x(Re,"$isAutoQualityEnabled$",i),E=()=>x(Te,"$currentSubtitle$",i),A=()=>x(pt,"$additionalSettingsMenuItems$",i),Q=()=>x(pe,"$isAutoQualityAvailable$",i),H=()=>x(xe,"$availableQualities$",i),z=()=>x(ye,"$highQualityEnabled",i),Y=h(e,"ref",15,void 0),le=h(e,"playerControlsHeight",3,0),X=ai({}),re=ai({}),Z=ve(),we=Lt(),ue=Z.state.audioStream$,ne=Z.state.availableAudioStreams$,_e=Z.state.currentQuality$,xe=Z.state.availableQualities$,J=Z.state.autoQualityLimitingAvailable$,Re=Z.state.isAutoQualityEnabled$,pe=Z.state.isAutoQualityAvailable$,P=Z.state.currentPlaybackRate$,We=Z.state.availablePlaybackRates$,Te=Z.state.currentSubtitle$,j=Z.state.availableSubtitlesList$,ie=Z.state.canDownload,Oe=Z.state.hasMpegSources$,De=Z.ui.settingsMenu.visible$,tt=Z.ui.settingsMenu.openedByBtnKeyboard$,U=Z.ui.settingsMenu.ref$,Pe=Z.ui.isMobile,Ee=Z.ui.mobileNotReportControlHidden$,Ue=Z.state.canChangePlaybackSpeed$,Ze=Z.state.trafficSavingEnabled$,ye=Z.state.highQualityEnabled$,ke=Z.ui.playerSize,Be=Z.ui.debugPanelVisible,Nt=Z.state.isInteractiveTime$,pt=Z.ui.additionalSettingsMenuItems$,Ot=Z.ui.t,st=Z.actions.internal.downloadVideo,wt=Z.actions.internal.closeSettingsMenu,ei=Z.actions.internal.openSettingsSubMenu,Mt=Z.actions.internal.closeSettingsSubMenu,$e=W(!1),be=W(void 0),ee=fb();Ne(()=>{!r()&&ee.current&&(Mt(re[ee.current]),ee.popAllSubMenus())}),Ne(()=>{r()||O(be,void 0)}),Ne(()=>{!ee.current&&n(be)&&E_(X,n(be))}),Ne(()=>{Y()&&U.set(Y())});async function it(St){var K;ee.pushSubMenu(St),await ho(),ei(St,re[St]);let Ft=(K=Y())==null?void 0:K.firstElementChild;Ft&&Df(Ft)}function fe(St){var Ft;St==null||St.stopPropagation(),a()||(Ft=e.returnFocus)==null||Ft.call(e),wt(),O($e,!1)}function Le(St,Ft){Z.actions.internal.setQuality(St,{appliesTo:Ft}),fe()}function bt(St){Z.actions.internal.setAudioStream(St),fe()}function Et(St,Ft){Z.actions.internal.setTrafficSavingEnabled(St,Ft),we.features.qualityDetailsSubMenuEnabled&&fe()}function ut(St,Ft){Z.actions.internal.setHighQualityEnabled(St,Ft),fe()}function ce(St){Z.actions.internal.setPlaybackRate(St),fe()}function ze(St){Z.actions.internal.setSubtitle(St),fe()}function Qe(){st()}function at(){bT(e.supportLink)&&window.open(e.supportLink,"_blank"),Z.actions.internal.reportProblem(),Z.actions.internal.pause()}function Dt(){Al(Z.actions.internal.getDebugTextData())}let Bt=()=>{let St=Z.actions.internal.getTraceTextData(),Ft=new Blob([...St],{type:"application/json"}),K=window.URL.createObjectURL(Ft);La(K,"vk_player_trace_info","json")};function ti(){Be.set(!l())}function vi(){O($e,!0)}function Wi(){O($e,!1)}function Vt(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-le()}px; overflow: auto;`}let di=m(()=>ie&&u()&&!v()),pi=m(()=>we.features.trafficSaving&&!v()&&p()&&!we.features.qualityDetailsSubMenuEnabled),vt=m(()=>f().length>0&&!v()),Gt=m(()=>!!$()&&!v()),hi=m(()=>we.features.audioLanguages&&y().length>=2&&!v()),Ki=m(()=>!v());At(()=>Nt.subscribe(St=>{St&&!d()&&!n($e)&&!a()&&fe()}));let Zt=m(()=>{let St=[n(Ki)&&"quality-settings",n(hi)&&"audio-languages-settings",n(Gt)&&"playback-rate-settings",n(vt)&&"subtitles-settings",n(pi)&&"traffic-saving-switch",n(di)&&"download",we.showSupport&&"show-support","copy-data",we.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(Ft=>!!Ft);return xb({items:St,context:{qualityDetailsSubMenuEnabled:we.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:g(),currentAudioStream:w(),availableAudioStreams:y(),currentPlaybackRate:C(),selectPlaybackRate:ce,trafficSavingEnabled:I(),toggleTrafficSaving:Et,currentQuality:N()||wb.INVARIANT,isAutoQualityEnabled:k()||!1,currentSubtitle:E(),isMobile:d(),onDownloadClick:Qe,onCopyDataClick:Dt,onReportProblemClick:at,onSaveTraceDataClick:Bt,toggleShowDebugInfo:ti},additionalSettingsMenuItems:A()})}),Ct=m(()=>yb({subMenuId:ee.current,context:{availablePlaybackRates:g(),selectPlaybackRate:ce,trafficSavingEnabled:I(),toggleTrafficSaving:Et,currentQuality:N()||wb.INVARIANT,isAutoQualityEnabled:k()||!1,isAutoQualityAvailable:Q()||!1,availableQualities:H(),highQualityEnabled:z(),toggleHighQuality:ut,availableAudioStreams:y(),availableSubtitlesList:f(),closeSettingsMenu:wt,currentAudioStream:w(),isMobile:d(),selectAudioLanguage:bt,selectQuality:Le,selectSubtitle:ze}}));var Ke=wT();let _i;var _o=T(Ke);{var xo=St=>{var Ft=xT();let K;Ft.__keydown=[$T,wt];var kt=T(Ft);{var si=qt=>{var ot=yT();let Ri;var Ni=T(ot),Zo=T(Ni,!0);S(Ni);var wo=L(Ni,2);wo.__click=fe,S(ot),D((Oi,qi)=>{Ri=se(ot,1,"item header s-y",null,Ri,Oi),me(Zo,qi)},[()=>({mobile:d()}),()=>Ot("submenu_settings")]),b(qt,ot)};R(kt,qt=>{d()&&qt(si)})}var lt=L(kt,2);let yt;gi(lt,21,()=>n(Zt),qt=>qt.id,(qt,ot)=>{var Ri=Ae(),Ni=de(Ri);{var Zo=Oi=>{Zm(Oi,{get isMobile(){return d()},get id(){return n(ot).id},get icon(){return n(ot).icon},get label(){return n(ot).label},get ariaLabel(){return n(ot).ariaLabel},get value(){return n(ot).value},get valueComponent(){return n(ot).valueComponent},onClick:()=>{it(n(ot).children),O(be,n(ot).id,!0)},get ref(){return X[n(ot).id]},set ref(qi){X[n(ot).id]=qi}})},wo=(Oi,qi)=>{{var Rr=oo=>{let Ci=m(()=>`${n(ot).id}-menu-item`);Jm(oo,{get isMobile(){return d()},get id(){return n(Ci)},get onClick(){return n(ot).onClick},get icon(){return n(ot).icon},get label(){return n(ot).label},get ariaLabel(){return n(ot).ariaLabel},closeSettings:fe})},bo=(oo,Ci)=>{{var Jo=en=>{let In=m(()=>`${n(ot).id}-menu-item`);tv(en,{get isMobile(){return d()},get id(){return n(In)},get onClick(){return n(ot).onClick},get icon(){return n(ot).icon},get label(){return n(ot).label},get ariaLabel(){return n(ot).ariaLabel},get enabled(){return n(ot).enabled},get tooltipText(){return n(ot).tooltipText},get maxTooltipWidth(){return n(ot).maxTooltipWidth}})};R(oo,en=>{n(ot).type==="SWITCH"&&en(Jo)},Ci)}};R(Oi,oo=>{n(ot).type==="CLICK"?oo(Rr):oo(bo,!1)},qi)}};R(Ni,Oi=>{n(ot).type==="OPEN_SUB_MENU"?Oi(Zo):Oi(wo,!1)})}b(qt,Ri)}),S(lt),Ye(lt,qt=>Y(qt),()=>Y()),S(Ft),D((qt,ot,Ri)=>{K=se(Ft,1,"settings-menu menu s-y",null,K,qt),yt=se(lt,1,"items",null,yt,ot),qe(lt,Ri)},[()=>({desktop:!d(),mobile:d(),hidden:!!ee.current}),()=>({mobile:d()}),Vt]),rt("mouseenter",Ft,vi),rt("mouseleave",Ft,Wi),b(St,Ft)};R(_o,St=>{r()&&St(xo)})}var un=L(_o,2);gi(un,17,()=>n(Ct),St=>St.id,(St,Ft)=>{let K=m(()=>{var kt;return(kt=n(Ft).minWidth)!=null?kt:137});Xm(St,{get isMobile(){return d()},get playerControlsHeight(){return le()},get returnFromSubMenu(){return ee.popSubMenu},get id(){return n(Ft).id},get title(){return n(Ft).title},get closeSettingsMenu(){return wt},openSubMenuList:it,get items(){return n(Ft).items},get minWidth(){return n(K)},get refMenuItems(){return X},get listRef(){return re[n(Ft).id]},set listRef(kt){re[n(Ft).id]=kt}})}),S(Ke),D(St=>_i=se(Ke,1,"settings-menu-container s-y",null,_i,St),[()=>({mobile:d(),hidden:!r()})]),b(t,Ke),F(),o()}Xe(["keydown","click"]);var TT=M('<button class="btn s-1f"> </button>'),CT={hash:"s-1f",code:"button.btn.s-1f{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function mv(t,e){q(t,CT);var i=TT();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=T(i,!0);S(i),D(()=>me(o,e.label)),b(t,i)}Xe(["click"]);var IT=M('<div class="container s-r"><div class="notification s-r"><div><p class="description s-r"><!></p> <!></div> <!></div></div>'),ET={hash:"s-r",code:".container.s-r{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.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,ET);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Lt(),{ui:{t:r}}=ve(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=IT(),d=T(l),s=T(d),u=T(s),v=T(u);mc(v,{get message(){return a}}),S(u);var p=L(u,2);{var f=y=>{let g=m(()=>r("slow_video_notification_button"));mv(y,{get label(){return n(g)},get onClick(){return e.onSelectAutoQuality}})};R(p,y=>{o||y(f)})}S(s);var $=L(s,2);As($,{get onClick(){return e.onClose}}),S(d),S(l),jr(3,d,()=>fs,()=>({duration:i})),b(t,l),F()}import{isIntersecting as Sb,Subscription as kT}from"@vkontakte/videoplayer-shared/es2018";var Za="annotation",ip=class{constructor(){this.slots=new Map}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var d;let{overlay:o,id:r,controlsBehaviour:a,hideAllControls:l}=i;e.setAttribute("slot",Za),this.setupSlotStyles(e,o),this.shadowRootContainer.append(e),this.slots.set(r,{rootElement:e,options:i}),a&&this.runHidingControlsWhenIntersected(r,a),l&&((d=this.store)==null||d.ui.isControlsAvailable.set(!1))}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"}}async runHidingControlsWhenIntersected(e,{observedSlotElementId:i,controlsToObserve:o}){var v;let r=this.slots.get(e);if(!r)return;let a=await this.findSlotElement(r.rootElement,i,e),{controls:l,hiddenControls:d}=((v=this.store)==null?void 0:v.ui)||{},s=new MutationObserver(p=>p.forEach(()=>{let f=Ms(a,this.shadowRootContainer);o.forEach($=>{let y=l==null?void 0:l[$],g=y?ge(y):null,w=d==null?void 0:d[$];g&&(w==null||w.set(Sb(g,f)))})}));s.observe(a,{childList:!0,subtree:!0}),r.observer=s;let u=new kT;o.forEach(p=>{l&&u.add(l[p].subscribe(f=>{let $=d==null?void 0:d[p];f&&f.isDisplayed?$==null||$.set(Sb(f,Ms(a,this.shadowRootContainer))):$==null||$.set(!1)}))}),r.subs=u}async findSlotElement(e,i,o){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,v;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)),(v=d==null?void 0:d.controlsToObserve)==null||v.forEach(p=>{var f,$;($=(f=this.store)==null?void 0:f.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 PT=M('<div class="container s-4"><!></div>'),AT={hash:"s-4",code:".container.s-4{align-items:center;animation-fill-mode:forwards;animation-name:s-4-videoPlayerStatusIconPopup;background-color:#00000073;border-radius:100%;display:flex;height:64px;justify-content:center;width:64px;will-change:opacity,scale}@keyframes s-4-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,AT);let i=h(e,"reversed",3,!1);var o=Ae(),r=de(o);Cs(r,()=>e.Icon,a=>{var l=PT(),d=T(l);Mi(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),S(l),D(()=>qe(l,`animation-duration: ${e.duration}ms`)),b(a,l)}),b(t,o),F()}import{PlaybackState as Tb}from"@vkontakte/videoplayer-core/es2018";var LT=M('<div class="container s-s"><!></div>'),MT={hash:"s-s",code:".container.s-s{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function vv(t,e){B(e,!0),q(t,MT);let[i,o]=Ve(),r=()=>x(s,"$playbackState$",i),a=()=>x(v,"$previewTrackActive",i),l=()=>x(p,"$previewTrackDragInProgress",i),d=()=>x(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:v,previewTrackDragInProgress:p}}=ve(),{features:{playbackStatusShow:f},playbackStatusAnimationDuration:$}=Lt(),y=0,g=W(null),w=W(!1);Ne(()=>{r()===Tb.PLAYING?O(g,Tn,!0):r()===Tb.PAUSED?O(g,Ns,!0):O(g,null)}),Ne(()=>{if(!(!f||a()||l()))return y=window.setTimeout(()=>{y=0,O(g,null)},$),()=>{y&&(window.clearTimeout(y),y=0)}}),Ne(()=>{d()&&!n(w)&&(O(w,!0),O(g,null))});var C=Ae(),I=de(C);{var N=k=>{var E=LT(),A=T(E);hc(A,{get duration(){return $},get Icon(){return n(g)}}),S(E),b(k,E)};R(I,k=>{n(g)&&f&&k(N)})}b(t,C),F(),o()}var VT=M('<div><div data-testid="video-container"></div></div>'),RT={hash:"s-c",code:".video-container.s-c,.video-wrapper.s-c{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-c{background:var(--black)}.video-container.s-c,.video-wrapper.s-c{z-index:var(--video-container-z-index)}.video-container.s-c{transition:var(--rotate-transition-duration) ease all}.video-container.fast-rotate.s-c{transition:none}.nocursor.s-c{cursor:none}"};function Ja(t,e){B(e,!0),q(t,RT);let[i,o]=Ve(),r=()=>x(v,"$rotateAlpha",i),a=()=>x(p,"$playerSize",i),l=()=>x(u,"$playerPhase",i),d=()=>x(f,"$isPlaying$",i),s=h(e,"videoContainer",15),{playerPhase:u,ui:{rotateAlpha:v,playerSize:p},state:{isPlaying$:f}}=ve(),{isSmoothVideoRotate:$}=Lt(),y=m(()=>s()&&r()%180?a().height/a().width:1);var g=VT();let w;g.__contextmenu=function(...N){var k;(k=e.onContextMenu)==null||k.apply(this,N)},g.__mousedown=function(...N){var k;(k=e.onMouseDown)==null||k.apply(this,N)},g.__mouseup=function(...N){var k;(k=e.onMouseUp)==null||k.apply(this,N)},g.__click=function(...N){var k;(k=e.onClick)==null||k.apply(this,N)},g.__dblclick=function(...N){var k;(k=e.onDblClick)==null||k.apply(this,N)};var C=T(g);let I;Ye(C,N=>s(N),()=>s()),S(g),D((N,k)=>{w=se(g,1,"video-wrapper s-c",null,w,N),I=se(C,1,"video-container s-c",null,I,k),qe(C,`transform: rotate(${r()}deg) scale(${n(y)})`),Me(C,"data-is-playing",d())},[()=>({hidden:l()!=="video",nocursor:e.hideCursor}),()=>({"fast-rotate":!$})]),b(t,g),F(),o()}Xe(["contextmenu","mousedown","mouseup","click","dblclick"]);var NT=M('<div><span class="text s-10"> </span> <!></div>'),OT={hash:"s-10",code:".root.s-10{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-10,.root.visible.s-10{transform:translateX(-50%)}.root.visible.s-10{opacity:1;visibility:visible}.text.s-10{font-size:13px;font-weight:600;line-height:16px}"};function gv(t,e){B(e,!0),q(t,OT);let{ui:{t:i}}=ve();var o=NT();let r;var a=T(o),l=T(a,!0);S(a);var d=L(a,2);dc(d,{get size(){return"16"},fill:"currentColor"}),S(o),D((s,u)=>{r=se(o,1,"root s-10",null,r,s),me(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),b(t,o),F()}var DT=M('<div class="container s-12" role="button" data-testid="preview-track-overlay"><div class="icon s-12"><!></div></div>'),BT={hash:"s-12",code:".container.s-12{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-12,.icon.s-12{align-items:center;display:flex;justify-content:center}.icon.s-12{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-12:hover .icon:where(.s-12){transform:scale(1.15)}"};function hv(t,e){B(e,!1),q(t,BT);let o=ve().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};$o();var l=DT();l.__click=a;var d=T(l),s=T(d);return Tn(s,{get size(){return"32"}}),S(d),S(l),jr(3,l,()=>fs,()=>({duration:r})),b(t,l),lf(e,"handleClick",a),F({handleClick:a})}Xe(["click"]);var FT=M('<div class="container s-13"><div class="notification s-13"><span class="text s-13"> </span></div></div>'),HT={hash:"s-13",code:".container.s-13{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-13{background-color:var(--black-alpha-40);border-radius:var(--notification-radius);padding:10px 16px}.text.s-13{font-size:14px;font-weight:500;line-height:18px}"};function _v(t,e){B(e,!1),q(t,HT);let{ui:{t:i}}=ve();$o();var o=FT(),r=T(o),a=T(r),l=T(a,!0);S(a),S(r),S(o),D(d=>me(l,d),[()=>i("preview_track_notification_text")],_n),jr(3,r,()=>fs,()=>({duration:340})),b(t,o),F()}var UT=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},zT=M("<div><!></div>"),WT=M('<div class="spherical-video-icon s-8"><!></div>'),KT=M("<div><!></div>"),qT=M('<div class="settings-menu s-8"><!></div>'),QT=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),GT=M("<!> <!> <!>",1),YT=M('<div class="blocked s-8"></div>'),jT=M('<div class="player-wrapper s-8"><!> <div class="overlay-container"></div></div> <!>',1),XT={hash:"s-8",code:".blocked.s-8,.player-wrapper.s-8{height:100%;position:absolute;width:100%}.blocked.s-8{z-index:var(--overlay-container-z-index)}.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-menu.s-8{bottom:57px;left:0;position:absolute;right:18px;transition:opacity .2s;z-index:var(--settings-menu-z-index)}"};function bv(t,e){B(e,!0),q(t,XT);let[i,o]=Ve(),r=()=>x(li,"$notificationsToShow$",i),a=()=>x(di,"$playerPhase",i),l=()=>x(_o,"$isLoaderVisible",i),d=()=>x(vi,"$adPlaybackState",i),s=()=>x(si,"$crashed",i),u=()=>x(Oi,"$isInteractiveTime$",i),v=()=>x(hi,"$settingsMenuVisible",i),p=()=>x(qi,"$isInteractiveExpectation$",i),f=()=>x(Gt,"$controlsVisible",i),$=()=>x(bo,"$touched",i),y=()=>x(Or,"$graphIsOpened$",i),g=()=>x(pi,"$isFullscreen",i),w=()=>x(ms,"$autoplayNextEnabled$",i),C=()=>x(Ft,"$postrollPassed",i),I=()=>x(xo,"$isEnded$",i),N=()=>x(Vn,"$cursorInside",i),k=()=>x(jn,"$isControlsAvailable",i),E=()=>x(pn,"$doubleForwardOn$",i),A=()=>x(hr,"$fakeIsPlaying$",i),Q=()=>x($r,"$bottomNoSmooth",i),H=()=>x(en,"$interactiveTimeIndicator",i),z=()=>x(Ri,"$playerSize",i),Y=()=>x(Ni,"$is3DVideo",i),le=()=>x(En,"$doubleForwardAvailable$",i),X=()=>x(Ke,"$contextMenuVisible$",i),re=()=>x(ti,"$playbackState$",i),Z=()=>x(oo,"$hotKeyMapData",i),we=()=>x(Zt,"$scrubbingInProgress",i),ue=()=>x(Ct,"$volumeChangingInProgress",i),ne=()=>x(un,"$chromecastConnected$",i),_e=()=>x(fn,"$controlsTimeoutActive",i),xe=()=>x(Ki,"$settingsMenuOpenedByKeyboard",i),J=()=>x(Yt,"$contextMenuOpenedByKeyboard$",i),Re=()=>x(Uo,"$contextMenuOpenedByHotKey$",i),pe=()=>x(Ii,"$contextMenuButtonRef$",i),P=()=>x(Ur,"$contextMenuLastActiveElem$",i),We=()=>x(vt,"$isFullscreenOpenedByKeyboard",i),Te=()=>x(Bt,"$language$",i),j=()=>x(zo,"$previewTrackActive$",i),ie=()=>x(Zo,"$icon3DVideoVisible",i),Oe=()=>x(St,"$chromecastDeviceName$",i),De=()=>x(qt,"$currentSubtitle$",i),tt=()=>x(ot,"$currentSubtitleCaptions$",i),U=()=>x(Wi,"$position$",i),Pe=()=>x(Vt,"$duration$",i),Ee=()=>x(K,"$isLive$",i),Ue=()=>x(kt,"$isPlaying$",i),Ze=()=>x(Yn,"$contextMenuPosition$",i),ye=()=>x(Ro,"$previewTrackNotificationVisible$",i),ke=()=>x(Ci,"$showHotKeyMap",i),Be=()=>x(_i,"$debugPanelVisible",i),Nt=()=>x(es,"$userActionsDisabled$",i),pt=h(e,"videoContainer",15),Ot=h(e,"adsSlotId",3,void 0),st=h(e,"adsParams",3,void 0),wt=h(e,"adsAutoplayParam",3,void 0),ei=h(e,"duration",3,void 0),Mt=h(e,"logoTargetUrl",3,""),$e=h(e,"showNextPrevButtons",3,!1),be=h(e,"nextButtonActive",3,!1),ee=h(e,"prevButtonActive",3,!1),it=h(e,"endScreenVideoTitle",3,void 0),fe=h(e,"endScreenVideoThumb",3,void 0),Le=h(e,"isOneVideoPlaylist",3,!1),bt=h(e,"shadowRootContainer",3,void 0),Et=h(e,"outerContainerRef",3,void 0),ut=h(e,"playerStarted",3,!1),ce=h(e,"fullScreenTarget",3,void 0),ze=h(e,"showMiniTimer",3,!1),Qe=h(e,"showEndScreen",3,!0),at=h(e,"keyboardControls",15),Dt=e.store.getLogger().createComponentLog("Root component"),Bt=e.store.interfaceLanguage$,ti=e.store.state.playbackState$,vi=e.store.ads.playbackState,Wi=e.store.state.positionWithScrubbing$,Vt=e.store.state.duration$,di=e.store.playerPhase,pi=e.store.ui.isFullscreen,vt=e.store.ui.isFullscreenOpenedByKeyboard,Gt=e.store.ui.controlsVisible,hi=e.store.ui.settingsMenu.visible$,Ki=e.store.ui.settingsMenu.openedByBtnKeyboard$,Zt=e.store.ui.scrubbingInProgress,Ct=e.store.ui.volumeChangingInProgress,Ke=e.store.ui.contextMenu.visible$,_i=e.store.ui.debugPanelVisible,_o=e.store.state.isLoaderVisible,xo=e.store.state.isEnded$,un=e.store.state.chromecastConnected$,St=e.store.state.chromecastDeviceName$,Ft=e.store.ads.postrollPassed,K=e.store.state.isLive$,kt=e.store.state.isPlaying$,si=e.store.state.crashed$,lt=e.store.webApi.annotationsApi,yt=e.store.webApi.pictureInPictureApi,qt=e.store.state.currentSubtitle$,ot=e.store.state.currentSubtitleCaptions$,Ri=e.store.ui.playerSize,Ni=e.store.ui.is3DVideo,Zo=e.store.ui.icon3DVideoVisible,wo=e.store.state.isInteractive,Oi=e.store.state.isInteractiveTime$,qi=e.store.state.isInteractiveExpectation$,Rr=e.store.state.hasInteractiveBranches,bo=e.store.ui.touched,oo=e.store.ui.modals.hotKeyMap.data,Ci=e.store.ui.modals.hotKeyMap.show,Jo=e.store.ui.overlayContainer$,en=e.store.ui.controls.interactiveTimeIndicator,In=e.store.state.showInteractiveTimeIndicator,Yn=e.store.ui.contextMenu.position$,Nr=e.store.actions.internal.setQuality,Jr=e.store.actions.internal.closeSettingsMenu,ms=e.store.ui.autoplayNextEnabled$,es=e.store.ui.userActionsDisabled,jn=e.store.ui.isControlsAvailable,gr=e.store.ui.videoTitleInfo,pn=e.store.ui.doubleForwardOn$,En=e.store.ui.doubleForwardAvailable$,Ro=e.store.ui.previewTrackNotificationVisible,kn=e.store.actions.internal.getVideoElement,Xn=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:hr,notifications$:_r,graphIsOpened$:Or}=yo(),no=W(void 0),Dr=W(void 0),Pn=W(void 0),An=W(void 0),ro,Br,Ln;oo.set($_());let{closeNotification:ft,notificationsToShow$:li}=_r,br=m(()=>!!r().slow_video),Zn=()=>ft("slow_video"),Jn=m(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),tn=W(void 0),$r=ae(!1),on,fn=ae(!1),Mn=ae(),Vn=ae(!1),No=W(!1),So=W(!1),er=W(!1),To=W(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),Di=m(()=>u()&&!v()&&!(n(No)||n(So))&&!(n(er)&&!p())),Rn=!0,tr=m(()=>e.uiConfig.features.thumbTimer&&ze()&&a()==="video"&&!f()&&!s()&&!wo&&(e.uiConfig.hideThumbTimerAfterTouch&&!$()||!e.uiConfig.hideThumbTimerAfterTouch)),ir=e.uiConfig.titleShowBehaviour,or=m(()=>!["video","thumb"].includes(a())||ir==="never"||y()?!1:ir==="fullscreen"?g():!0),Oo=m(()=>ir==="always"||a()==="thumb"?!1:!f()),yr=W(!1),$t=m(()=>(Qe()||e.showAutoplayNext&&w())&&!!it()&&!!fe()&&(e.showAds&&C()||!e.showAds)&&I()&&!s()&&!n(yr)),xt=m(()=>N()&&!(f()||n($t))&&!u()&&k()&&!E()),so=W(!1),ao=m(()=>A()!==null),{toggle:Do}=hr,Qi=!1,Gi=null;yt==null||yt.setContext(id());let lo=()=>{e.autoplay&&!wo&&e.uiConfig.controls.showOnStartupAtAutoplay&&Pi(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:lo});let Nn=()=>{window.clearTimeout(ro),fn.set(!1)},Fr=()=>{window.clearTimeout(Br),Mn.set(null)},Pi=he=>{Nn(),fn.set(!0),ro=window.setTimeout(()=>fn.set(!1),he);let gt=he-100;on=window.setTimeout(()=>{Q()&&$r.set(!1)},gt>0?gt:he)},vs=(he,gt)=>{Fr(),Mn.set(gt),Br=window.setTimeout(()=>Mn.set(null),he)},ts=Ni.subscribe(he=>{Zo.set(he),he&&(window.clearTimeout(Ln),Ln=window.setTimeout(()=>Zo.set(!1),e.uiConfig.controls.hide360IconTimeout))}),xr=async()=>{var gt,Ht,jt,$i;let he=oa();if(he){let wi=Pd(),Ei=mn();he=wi===Ei||wi===bt()}if(he){Pi(e.uiConfig.controls.hideTimeoutFullscreen);try{await(yt==null?void 0:yt.exit())}catch(wi){Dt({message:String(wi)})}}pi.set(he),e.store.getAdmanWrapper().setFullscreen(he),g()?(Ht=(gt=e.store.callbacks)==null?void 0:gt.onFullscreenEnter)==null||Ht.call(gt):($i=(jt=e.store.callbacks)==null?void 0:jt.onFullscreenExit)==null||$i.call(jt)},Bo=he=>{let{width:gt,height:Ht}=he.target;Ri.set({width:gt,height:Ht})},Hr=()=>{let{width:he,height:gt}=n(no).getBoundingClientRect();Ri.set({width:he,height:gt})};At(()=>{var gt;return ku(xr),e.uiConfig.features.annotationsInside&&(lt==null||lt.init(n(no))),Ra(yt)&&(yt==null||yt.assignPlayerContainer(n(no)),yt==null||yt.setExternalEventHandlers({resize:Bo,leavepictureinpicture:Hr})),e.interactiveContainer&&((gt=pt().parentElement)==null||gt.insertBefore(e.interactiveContainer,pt().nextSibling)),()=>{window.clearTimeout(ro),window.clearTimeout(on),window.clearTimeout(Br),window.clearTimeout(Ln),ts(),yt==null||yt.dispose().catch(Ht=>{Dt({message:String(Ht)})}),Pu(xr)}});let mn=()=>{let he=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!Et()?n(no):Et(),gt=he.getRootNode(),Ht=gt instanceof ShadowRoot?gt.host:gt,jt=ce()instanceof HTMLElement&&ce().contains(Ht);return e.uiConfig.allowChangingFullscreenTarget&&ce()&&jt?ce():he},vn=()=>{Ke.set(!1)},Co=()=>{Jr(),vn()},wr=async()=>{if(!Xn()){Dt({message:"fullscreen disabled"});return}vn(),oa()?(await Eu(document),Dt({message:"exit fullscreen"})):(Dt({message:"request fullscreen"}),await Iu(mn()))},He=he=>{y()||(he.preventDefault(),Ke.set(!0),Yn.set({left:he.clientX,top:he.clientY}))};function Pt(){Vn.set(!0),wo||Pi(e.uiConfig.controls.hideTimeoutCursor)}function bi(he){var $i,wi;let{relatedTarget:gt}=he,jt=!!(gt&&(($i=n(Pn))!=null&&$i.contains(gt)))&&((wi=at())==null?void 0:wi.isFocused());!wo&&!jt&&($r.set(!0),Pi(e.uiConfig.controls.hideTimeoutCursor))}function Fo(){Vn.set(!1),O(So,!1),O(No,!1),Qi=!1,e.store.actions.internal.releaseCamera(),Pi(e.uiConfig.controls.hideTimeout),E()&&ji()}function co(he){return he?he.offsetTop+co(he.offsetParent):0}function Io(he){return he?he.offsetLeft+Io(he.offsetParent):0}function uo(he){if(H()&&In){let gt=he.currentTarget,Ht=co(gt),jt=Io(gt),$i=he.pageX-jt,wi=he.pageY-Ht,{left:Ei,bottom:yi,right:Fs}=H(),Hs=Fs-Ei;return $i>=Ei-Hs&&wi<=yi+Hs}}function Ho(he){if(n(no)){let gt=co(he.currentTarget),Ht=z().height,jt=he.pageY-gt;if(uo(he)){O(So,!1);return}jt<40?O(So,!0):jt>Ht-40?O(No,!0):(O(So,!1),v()||O(No,!1))}}function On(he){Ho(he),!n(Di)&&!E()&&Pi(e.uiConfig.controls.hideTimeoutCursor),Y()&&Qi&&Gi&&e.store.actions.internal.moveCameraFocusPX(Gi.clientX-he.clientX,Gi.clientY-he.clientY,he.timeStamp-Gi.timeStamp),Gi=he}let nn=null,Yi=()=>{nn=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),Nn()},e.uiConfig.doubleForwardActivationTime)},ji=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),nn&&clearTimeout(nn),nn=null},Dn=he=>{he.preventDefault(),he.button===0&&(Qi=!0,e.store.actions.internal.holdCamera(),le()&&Yi()),!Qi&&Pi(e.uiConfig.controls.hideTimeoutCursor)},nr=he=>{he.preventDefault(),he.button===0&&(Gi=he,Qi=!1,e.store.actions.internal.releaseCamera()),!E()&&Pi(e.uiConfig.controls.hideTimeoutCursor)},rr=he=>{he.preventDefault(),Rn&&(Dt({message:"double click on video"}),wr(),Pi(e.uiConfig.controls.hideTimeoutCursor))},Bn=he=>{var gt;if(he.preventDefault(),E()){ji();return}if(nn&&ji(),X()||v()){Co();return}if(!(I()&&!Rr)){if(n(ao))return Do();if((gt=at())==null||gt.focus(),!ut()){e.firstStart(),Pi(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||re()!==Ib.PLAYING)&&e.store.actions.internal.togglePlay(),Pi(e.uiConfig.controls.hideTimeoutCursor)}},gs=he=>{Co(),bo.set(!0),Pi(e.uiConfig.controls.hideTimeout),he&&vs(e.uiConfig.controls.hideHotKeyHelpers,he)},hs=()=>{var he,gt;Co(),(he=e.store.callbacks)!=null&&he.onOpenHotKeyMap?(gt=e.store.callbacks)==null||gt.onOpenHotKeyMap(Z()):Ci.update(Ht=>!Ht)},Ge=()=>{bo.set(!0)},Yt=e.store.ui.contextMenu.openedByBtnKeyboard$,Ii=e.store.ui.contextMenu.btnRef$,po=W(void 0),Uo=e.store.ui.contextMenu.openedByHotKey$,Ur=e.store.ui.contextMenu.lastActiveElem$,Eo=W(!1),zo=e.store.ui.previewTrackActive;Ne(()=>{Jo.set(n(tn))}),Ne(()=>{O(er,n(To)&&re()!==Ib.PLAYING,!0),n(To)||Tt(()=>O(To,!0))}),Ne(()=>{var gt,Ht;let he=(n(er)||I()||v()||we()||ue()||ne()||_e()||n(Eo))&&!n(Di)&&(a()==="video"||a()==="ads")&&!s()&&k();Gt.set(he),!he&&!_e()&&e.uiConfig.returnFocusOnControlsHide&&((gt=n(Pn))!=null&>.contains(Ou()))&&((Ht=at())==null||Ht.focus())}),Ne(()=>{!we()&&n(so)&&!u()&&Pi(e.uiConfig.controls.hideTimeoutCursor),Tt(()=>O(so,we(),!0))}),Ne(()=>{n(An),v(),xe(),Tt(()=>Od(n(An),v(),xe()))}),Ne(()=>{n(po),X(),J(),Re(),Tt(()=>{let he=J()||Re();Od(n(po),X(),he)})}),Ne(()=>{let he=pe();he&&(X(),Tt(()=>Ll(he,X(),Yt)))}),Ne(()=>{let he=P();he&&(X(),Tt(()=>I_(he,X(),Uo)))}),Ne(()=>{var he;!We()&&g()&&(Tt(()=>vt.set(!1)),(he=at())==null||he.focus())}),Ne(()=>{y()&&Co()});let _s=W(void 0),Ds=he=>{gr.set(Qn(kn(),{title:n(_s)},"title",he))},ua=(he,gt)=>{var wi,Ei;let Ht=(Ei=(wi=e.store.callbacks)==null?void 0:wi.uiInfo)==null?void 0:Ei.onUpcomingLiveViewStateChanged;if(!Ht)return;let jt=!!gt,$i={...Qn(n(no),{upcomingLiveScreen:gt},"upcomingLiveScreen",jt),...he};Ht($i)};var Bs=jT();rt("blur",Sa,Co);var gn=de(Bs);gn.__mousemove=On;var nt=T(gn);let Jt=m(()=>a()==="ads"),fo=m(()=>n(ao)?Do:void 0);Ye(Wf(nt,{startDoubleForwardActivationTimer:Yi,stopDoubleForward:ji,toggleFullscreen:wr,hideContextMenu:Co,showHotKeyHelpers:gs,showKeyMap:hs,get isAds(){return n(Jt)},get fakePlayButtonHandler(){return n(fo)},get nextButtonActive(){return be()},get prevButtonActive(){return ee()},children:(he,gt)=>{var Ht=GT(),jt=de(Ht);Ja(jt,{get hideCursor(){return n(xt)},onClick:Bn,onContextMenu:He,onMouseDown:Dn,onMouseUp:nr,onDblClick:rr,get videoContainer(){return pt()},set videoContainer(Ei){pt(Ei)}});var $i=L(jt,2);Pa($i,()=>"slot",!1,(Ei,yi)=>{eo(Ei,()=>({name:Za}))});var wi=L($i,2);Cs(wi,Te,Ei=>{var yi=QT(),Fs=de(yi);let Hs=m(()=>a()!=="thumb"||s()||wo&&e.autoplay);Ya(Fs,{get hidden(){return n(Hs)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:He,onClick:vn});var Us=L(Fs,2);{var Ql=Fe=>{hv(Fe,{})};R(Us,Fe=>{j()&&Fe(Ql)})}var pa=L(Us,2);vv(pa,{});var Tr=L(pa,2);gv(Tr,{get isVisible(){return E()}});var zs=L(Tr,2);{var fa=Fe=>{let mi=m(()=>{var Wo;return(Wo=e.live)==null?void 0:Wo.startTime});pc(Fe,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(mi)},onUpcomingLiveViewStateChanged:ua,onContextMenu:He,onClick:vn})};R(zs,Fe=>{a()==="LiveWaitingStart"&&Fe(fa)})}var Cr=L(zs,2);{var bs=Fe=>{ja(Fe,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:He,onClick:vn})};R(Cr,Fe=>{a()==="LiveWaitingRecover"&&Fe(bs)})}var $s=L(Cr,2);{var Ir=Fe=>{ja(Fe,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:He,onClick:vn})};R($s,Fe=>{a()==="LiveWaitingRecord"&&Fe(Ir)})}var ma=L($s,2);{var Gl=Fe=>{var mi=zT();let Wo;var Er=T(mi);Ld(Er,{get adsSlotId(){return Ot()},get adsParams(){return st()},get adsAutoplayParam(){return wt()},get duration(){return ei()},get adsExternalApi(){return e.adsExternalApi}}),S(mi),D(Po=>Wo=se(mi,1,"ads-container s-8",null,Wo,Po),[()=>({hidden:a()!=="ads"})]),b(Fe,mi)};R(ma,Fe=>{e.showAds&&ut()&&Fe(Gl)})}var el=L(ma,2);{var Yl=Fe=>{let mi=m(()=>!Qe()&&e.showAutoplayNext&&w());Hf(Fe,{get title(){return it()},get thumb(){return fe()},get isHide(){return n(mi)},clickCloseIcon:()=>O(yr,!0)})};R(el,Fe=>{n($t)&&it()&&fe()&&Fe(Yl)})}var va=L(el,2);{var jl=Fe=>{let mi=m(()=>g()?"md":"sm"),Wo=m(()=>{var Er;return(Er=e.store.callbacks)==null?void 0:Er.onTitleClicked});Km(Fe,{get title(){return e.title},get getVideoDeeplink(){return e.getVideoDeeplink},get isHidden(){return n(Oo)},onVisibilityChanged:Ds,onMouseEnter:()=>{O(Eo,!0)},onMouseLeave:()=>{O(Eo,!1)},get size(){return n(mi)},get onTitleClicked(){return n(Wo)},get ref(){return n(_s)},set ref(Er){O(_s,Er,!0)}})};R(va,Fe=>{n(or)&&Fe(jl)})}var tl=L(va,2);{var il=Fe=>{let mi=m(()=>a()==="video"&&f());cc(Fe,{get isShifted(){return n(mi)}})};R(tl,Fe=>{Y()&&Fe(il)})}var sr=L(tl,2);{var dt=Fe=>{var mi=WT(),Wo=T(mi);kd(Wo,{}),S(mi),b(Fe,mi)};R(sr,Fe=>{ie()&&Fe(dt)})}var ct=L(sr,2);{var Xi=Fe=>{uc(Fe,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Oe()}})};R(ct,Fe=>{ne()&&Fe(Xi)})}var ko=L(ct,2);{var Zi=Fe=>{Qa(Fe,{get shifted(){return f()},get captions(){return tt()},get position(){return U()},get playerSize(){return z()}})};R(ko,Fe=>{De().value!=="off"&&Fe(Zi)})}var fi=L(ko,2);{var Bi=Fe=>{var mi=KT();mi.__contextmenu=He,mi.__click=[UT,X,Ke,v,hi,Co];var Wo=T(mi);Ga(Wo,{}),S(mi),b(Fe,mi)};R(fi,Fe=>{s()&&Fe(Bi)})}var Ws=L(fi,2);{var Xl=Fe=>{let mi=m(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),Wo=m(()=>a()==="ads"),Er=m(()=>e.canRewindLive&&Pe()!==0);lc(Fe,{get bottomHidden(){return n(mi)},get bottomNoSmooth(){return Q()},get showControls(){return f()},get isAds(){return n(Wo)},get canRewindLive(){return n(Er)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Mt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return $e()},get nextButtonActive(){return be()},get prevButtonActive(){return ee()},get isOneVideoPlaylist(){return Le()},customFullscreenSupported:Rn,toggleFullscreen:wr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(Dr)},set playerControlsWrapperRef(Po){O(Dr,Po,!0)},get playerControlsRef(){return n(Pn)},set playerControlsRef(Po){O(Pn,Po,!0)}})};R(Ws,Fe=>{ut()&&Fe(Xl)})}var kc=L(Ws,2);{var mp=Fe=>{var mi=qT(),Wo=T(mi);let Er=m(()=>{var Po;return(Po=n(Pn))==null?void 0:Po.clientHeight});vc(Wo,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(Er)},returnFocus:()=>{var Po;return(Po=at())==null?void 0:Po.focus()},get ref(){return n(An)},set ref(Po){O(An,Po,!0)}}),S(mi),b(Fe,mi)};R(kc,Fe=>{!ne()&&a()!=="ads"&&Fe(mp)})}var Pc=L(kc,2);let vp=m(()=>!n(tr));Rd(Pc,{get isLive(){return Ee()},get isHidden(){return n(vp)},get isPlaying(){return Ue()},get position(){return U()},get duration(){return Pe()}});var Ac=L(Pc,2);zm(Ac,{get data(){return Mn}});var Lc=L(Ac,2);Ff(Lc,{get supportLink(){return e.supportLink},returnFocus:()=>{var Fe;return(Fe=at())==null?void 0:Fe.focus()},get visible(){return X()},get playerContainerRef(){return n(no)},get position(){return Ze()},get menuElementRef(){return n(po)},set menuElementRef(Fe){O(po,Fe,!0)}});var ga=L(Lc,2);{var gp=Fe=>{gc(Fe,{onClose:Zn,onSelectAutoQuality:()=>{Nr("auto"),Zn()}})};R(ga,Fe=>{n(br)&&Fe(gp)})}var Ks=L(ga,2);{var ol=Fe=>{_v(Fe,{})};R(Ks,Fe=>{ye()&&Fe(ol)})}var Mc=L(Ks,2);{var Vc=Fe=>{Ba(Fe,{})};R(Mc,Fe=>{n(Jn)&&Fe(Vc)})}var nl=L(Mc,2);{var Rc=Fe=>{Qf(Fe,{})};R(nl,Fe=>{ke()&&Fe(Rc)})}var hp=L(nl,2);{var Nc=Fe=>{Fd(Fe,{})};R(hp,Fe=>{Be()&&Fe(Nc)})}b(Ei,yi)}),b(he,Ht)},$$slots:{default:!0}}),he=>at(he),()=>at());var Sr=L(nt,2);Ye(Sr,he=>O(tn,he),()=>n(tn)),S(gn),Ye(gn,he=>O(no,he),()=>n(no));var zr=L(gn,2);{var hn=he=>{var gt=YT();b(he,gt)};R(zr,he=>{Nt()&&he(hn)})}rt("mouseenter",gn,Pt),rt("mouseleave",gn,Fo),rt("click",gn,Ge,!0),rt("focusin",gn,bi,!0),b(t,Bs),F(),o()}Xe(["mousemove","contextmenu","click"]);import{clientChecker as _c,PlaybackState as aC}from"@vkontakte/videoplayer-core/es2018";import{noop as lC}from"@vkontakte/videoplayer-shared/es2018";var ZT=M('<div></div> <div class="info s-17"><div class="triangles-wrapper s-17"><div></div> <div></div> <div></div></div> <p class="step-caption s-17"> </p></div>',1),JT=M("<div><!></div>"),eC={hash:"s-17",code:".double-click-area.s-17{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-17{left:0}.double-click-area.right.s-17{right:0}.semicircle.s-17{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-17{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-17{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-17{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-17,.triangles-wrapper.s-17{display:flex;justify-content:center}.triangles-wrapper.s-17{margin-bottom:10px;position:relative}.triangle.s-17{animation:s-17-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-17:nth-child(3),.triangle.right.s-17:first-child{animation-delay:0s}.triangle.left.s-17:nth-child(2),.triangle.right.s-17:nth-child(2){animation-delay:.1s}.triangle.left.s-17:first-child,.triangle.right.s-17:nth-child(3){animation-delay:.2s}@keyframes s-17-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-17{border-right:8px solid var(--white)}.triangle.right.s-17{border-left:8px solid var(--white)}.triangle.s-17:not(:last-child){margin-right:5px}.step-caption.s-17{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function op(t,e){B(e,!0),q(t,eC);let i=h(e,"seekStep",3,0),o=W(!1),r=0,a=0,l=W(ai(i())),d=p=>{p.stopPropagation(),a+=1,O(l,i()*(a-1)),a===1?e.handleSingleFirstClick(p):(O(o,!0),e.handleSecondClick()),window.clearTimeout(r),r=window.setTimeout(()=>{a=0,O(o,!1)},300)};an(()=>{window.clearTimeout(r)});var s=JT();s.__click=d;var u=T(s);{var v=p=>{var f=ZT(),$=de(f),y=L($,2),g=T(y),w=T(g),C=L(w,2),I=L(C,2);S(g);var N=L(g,2),k=T(N,!0);S(N),S(y),D(E=>{var A,Q,H,z;se($,1,`semicircle ${(A=e.side)!=null?A:""}`,"s-17"),se(w,1,`triangle ${(Q=e.side)!=null?Q:""}`,"s-17"),se(C,1,`triangle ${(H=e.side)!=null?H:""}`,"s-17"),se(I,1,`triangle ${(z=e.side)!=null?z:""}`,"s-17"),me(k,E)},[()=>G("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),b(p,f)};R(u,p=>{n(o)&&p(v)})}S(s),D(()=>{var p;return se(s,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-17")}),b(t,s),F()}Xe(["click"]);var tC=(t,e,i)=>{e(!1),i()},iC=M('<div class="overlay s-16"></div> <div class="next-video s-16"><div class="top s-16"><div class="caption s-16"> </div> <!></div> <div class="row s-16"><div class="column s-16"><div class="thumb s-16"><div></div> <!></div></div> <div class="column s-16"><div class="title s-16"> </div></div></div></div>',1),oC={hash:"s-16",code:".overlay.s-16{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-16{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-16{display:flex;justify-content:space-between}.caption.s-16{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-16{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-16{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-16{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-16,.thumb-overlay.s-16{height:100%;width:100%}.thumb-overlay.s-16{position:absolute}.thumb-overlay.withOpacity.s-16{background:var(--black);opacity:.3}.title.s-16{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function $v(t,e){B(e,!0),q(t,oC);let[i,o]=Ve(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=ve(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,v=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,f=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),f()},g=()=>{e.clickCloseIcon(),$()};At(()=>{e.isHide||v(),e.isHide&&r()&&(u(!1),f())});var w=Ae(),C=de(w);{var I=N=>{var k=iC(),E=L(de(k),2),A=T(E),Q=T(A),H=T(Q,!0);S(Q);var z=L(Q,2);As(z,{onClick:g}),S(A);var Y=L(A,2);Y.__click=[tC,u,p];var le=T(Y),X=T(le),re=T(X);let Z;var we=L(re,2);{var ue=J=>{Hd(J,{get isRunning(){return a()},onTimerEnded:y})};R(we,J=>{r()&&J(ue)})}S(X),S(le);var ne=L(le,2),_e=T(ne),xe=T(_e,!0);S(_e),S(ne),S(Y),S(E),D((J,Re)=>{me(H,J),qe(X,`background-image: url('${e.thumb}')`),Z=se(re,1,"thumb-overlay s-16",null,Z,Re),me(xe,e.title)},[()=>r()?G("end_screen_next_video"):G("end_screen_recommended_video"),()=>({withOpacity:r()})]),b(N,k)};R(C,N=>{e.isHide||N(I)})}b(t,w),F(),o()}Xe(["click"]);import{clientChecker as nC}from"@vkontakte/videoplayer-core/es2018";var Eb=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;At(()=>{nC.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))}),an(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as rC}from"@vkontakte/videoplayer-core/es2018";var np=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 sC}from"@vkontakte/videoplayer-core/es2018";var kb=({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"),v=()=>sC.device.isIOS&&ge(l)===rC.DASH_LIVE_CMAF,p=()=>{s==null||s(),s=null},f=$=>{if(p(),!v()||!$)return;let y=u();if(!y)return;let g=new np(y),w=ge(d),C=ge(a),I=ge(r);for(let E of w)C.some(Q=>Q.value===E.id)&&g.attach(E,I.value===E.id);let N=d.subscribe(E=>{for(let A of E)g.updateSrc(A)}),k=()=>{let E=g.getCurrentShowingId();o(ge(a).find(A=>A.value===E))};y.textTracks.addEventListener("change",k),s=()=>{N(),g.detachAll(),y.textTracks.removeEventListener("change",k)}};At(()=>i.subscribe(f)),an(p)};var dC=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},cC=M("<!> <!>",1),uC=M("<div><!></div>"),pC=M('<div class="spherical-video-icon s-9"><!></div>'),fC=M("<div><!></div>"),mC=M('<div class="settings-mobile s-9"><!></div>'),vC=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),gC=M('<div class="player-wrapper s-9" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),hC={hash:"s-9",code:".player-wrapper.s-9{height:100%;position:absolute;width:100%}.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-mobile.s-9{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 yv(t,e){var Oo,yr;B(e,!0),q(t,hC);let[i,o]=Ve(),r=()=>x(bt,"$playerPhase",i),a=()=>x(vi,"$isLoaderVisible",i),l=()=>x(it,"$adPlaybackState",i),d=()=>x(Zt,"$crashed",i),s=()=>x(ms,"$notificationsToShow$",i),u=()=>x(ee,"$playbackState$",i),v=()=>x(Mt,"$graphIsOpened$",i),p=()=>x(ze,"$interactiveHideMobileControls",i),f=()=>x(Wi,"$isEnded$",i),$=()=>x(lt,"$isInteractiveExpectation$",i),y=()=>x(ut,"$controlsVisible",i),g=()=>x(ot,"$touched",i),w=()=>x(Ni,"$autoplayNextEnabled$",i),C=()=>x(pi,"$postrollPassed",i),I=()=>x(gr,"$bottomNoSmooth",i),N=()=>x(_i,"$videoSize",i),k=()=>x(St,"$playerSize",i),E=()=>x(Et,"$isFullscreen",i),A=()=>x(fe,"$position$",i),Q=()=>x(Le,"$duration$",i),H=()=>x(Zo,"$loadedMetadata",i),z=()=>x(Qe,"$settingsMenuVisible",i),Y=()=>x(Dt,"$scrubbingInProgress",i),le=()=>x(Bt,"$volumeChangingInProgress",i),X=()=>x(Vt,"$chromecastConnected$",i),re=()=>x(ce,"$isControlsAvailable",i),Z=()=>x(si,"$isInteractiveTime$",i),we=()=>x(hi,"$isActiveLive",i),ue=()=>x(at,"$settingsMenuOpenedByKeyboard",i),ne=()=>x(be,"$language$",i),_e=()=>x(qt,"$disabledControls$",i),xe=()=>x(Ft,"$is3DVideo",i),J=()=>x(K,"$icon3DVideoVisible",i),Re=()=>x(di,"$chromecastDeviceName$",i),pe=()=>x(_o,"$currentSubtitle$",i),P=()=>x(xo,"$currentSubtitleCaptions$",i),We=()=>x(un,"$realDuration$",i),Te=()=>x(vt,"$isLive$",i),j=()=>x(Gt,"$isPlaying$",i),ie=()=>x(ti,"$debugPanelVisible",i),Oe=h(e,"videoContainer",15),De=h(e,"adsSlotId",3,void 0),tt=h(e,"adsParams",3,void 0),U=h(e,"adsAutoplayParam",3,void 0),Pe=h(e,"duration",3,void 0),Ee=h(e,"logoTargetUrl",3,""),Ue=h(e,"showNextPrevButtons",3,!1),Ze=h(e,"nextButtonActive",3,!1),ye=h(e,"prevButtonActive",3,!1),ke=h(e,"endScreenVideoTitle",3,void 0),Be=h(e,"endScreenVideoThumb",3,void 0),Nt=h(e,"isOneVideoPlaylist",3,!1),pt=h(e,"showMiniTimer",3,!1),Ot=h(e,"fullScreenTarget",3,void 0),st=h(e,"playerStarted",3,!1),wt=h(e,"showEndScreen",3,!0),{notifications$:ei,graphIsOpened$:Mt}=yo(),$e=e.store.getLogger().createComponentLog("Root component"),be=e.store.interfaceLanguage$,ee=e.store.state.playbackState$,it=e.store.ads.playbackState,fe=e.store.state.positionWithScrubbing$,Le=e.store.state.duration$,bt=e.store.playerPhase,Et=e.store.ui.isFullscreen,ut=e.store.ui.controlsVisible,ce=e.store.ui.isControlsAvailable,ze=e.store.ui.interactiveHideMobileControls,Qe=e.store.ui.settingsMenu.visible$,at=e.store.ui.settingsMenu.openedByBtnKeyboard$,Dt=e.store.ui.scrubbingInProgress,Bt=e.store.ui.volumeChangingInProgress,ti=e.store.ui.debugPanelVisible,vi=e.store.state.isLoaderVisible,Wi=e.store.state.isEnded$,Vt=e.store.state.chromecastConnected$,di=e.store.state.chromecastDeviceName$,pi=e.store.ads.postrollPassed,vt=e.store.state.isLive$,Gt=e.store.state.isPlaying$,hi=e.store.state.isActiveLive$,Ki=e.store.state.isRewindableLive$,Zt=e.store.state.crashed$,Ct=e.store.webApi.annotationsApi,Ke=e.store.webApi.pictureInPictureApi,_i=e.store.state.videoSize$,_o=e.store.state.currentSubtitle$,xo=e.store.state.currentSubtitleCaptions$,un=e.store.state.duration$,St=e.store.ui.playerSize,Ft=e.store.ui.is3DVideo,K=e.store.ui.icon3DVideoVisible,kt=e.store.state.isInteractive,si=e.store.state.isInteractiveTime$,lt=e.store.state.isInteractiveExpectation$,yt=e.store.state.hasInteractiveBranches,qt=e.store.ui.controls.disabledControls$,ot=e.store.ui.touched,Ri=e.store.ui.overlayContainer$,Ni=e.store.ui.autoplayNextEnabled$,Zo=e.store.state.loadedMetadata$,wo=e.store.actions.internal.closeSettingsMenu,Oi=(Oo=e.store.callbacks)==null?void 0:Oo.onDisabledPlayPrevChapterClick,qi=(yr=e.store.callbacks)==null?void 0:yr.onDisabledSeekToInteractiveClick,Rr=e.store.actions.internal.setQuality,bo=W(void 0),oo=W(void 0),Ci=W(void 0),Jo=W(void 0),en,In,Yn=m(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),Nr=W(void 0),{closeNotification:Jr,notificationsToShow$:ms}=ei,es=m(()=>!!s().slow_video),jn=()=>Jr("slow_video"),gr=ae(!1),pn,En=W(!1),Ro=m(()=>u()!==aC.PLAYING),kn=W(!1),Xn=m(()=>v()||p()||!n(En)&&(f()&&!!yt||n(Ro)&&$())),hr=W(!0),_r=m(()=>e.uiConfig.features.thumbTimer&&pt()&&r()==="video"&&!y()&&!d()&&!kt&&(e.uiConfig.hideThumbTimerAfterTouch&&!g()||!e.uiConfig.hideThumbTimerAfterTouch)),Or=W(!1),no=m(()=>(wt()||e.showAutoplayNext&&w())&&!!ke()&&!!Be()&&(e.showAds&&C()||!e.showAds)&&f()&&!d()&&!n(Or)),Dr=W(!1);Ke==null||Ke.setContext(id());let Pn=$t=>{$t&&!kt&&ro(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:Pn});let An=()=>{clearTimeout(en),O(En,!1),p()&&ze.set(!1)},ro=$t=>{An(),O(En,!0),en=setTimeout(()=>O(En,!1),$t);let xt=$t-100;pn=setTimeout(()=>{I()&&gr.set(!1)},xt>0?xt:$t)},Br=Ft.subscribe($t=>{K.set($t),$t&&(clearTimeout(In),In=setTimeout(()=>K.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Ln=async($t=oa())=>{var xt,so,ao,Do,Qi,Gi;if($t&&!_c.device.isIOS){let lo=Pd(),Nn=tn(),Fr=_c.browser.isSamsungBrowser&&lo===e.shadowRootContainer;$t=lo===Nn||Fr}if($t){ro(e.uiConfig.controls.hideTimeoutFullscreen);try{await(Ke==null?void 0:Ke.exit())}catch(lo){$e({message:String(lo)})}try{let lo=(xt=N())!=null&&xt.width&&((so=N())!=null&&so.height)?N():k();await __(lo)}catch(lo){$e({message:String(lo)})}}Et.set($t),e.store.getAdmanWrapper().setFullscreen($t),E()?(Do=(ao=e.store.callbacks)==null?void 0:ao.onFullscreenEnter)==null||Do.call(ao):(Gi=(Qi=e.store.callbacks)==null?void 0:Qi.onFullscreenExit)==null||Gi.call(Qi)},ft=$t=>{let xt=$t,{width:so,height:ao}=xt.target;St.set({width:so,height:ao})},li=()=>{let{width:$t,height:xt}=n(bo).getBoundingClientRect();St.set({width:$t,height:xt})};At(()=>{var $t;return ku(Ln),e.uiConfig.features.annotationsInside&&(Ct==null||Ct.init(n(bo))),Ra(Ke)&&(Ke==null||Ke.assignPlayerContainer(n(bo)),Ke==null||Ke.setExternalEventHandlers({resize:ft,leavepictureinpicture:li})),O(hr,!_c.device.isIphoneOrOldIpad),e.interactiveContainer&&(($t=Oe().parentElement)==null||$t.insertBefore(e.interactiveContainer,Oe().nextSibling)),()=>{clearTimeout(en),clearTimeout(pn),clearTimeout(In),Br(),Ke==null||Ke.dispose().catch(xt=>{$e({message:String(xt)})}),Pu(Ln)}});let br=W(!0),Zn=W(!0),Jn=$t=>{let xt=A()+($t==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;xt<0?(O(br,!1),xt=0):xt>=Q()&&(O(Zn,!1),xt=Q()),O(kn,!0),e.seekTime(xt)},tn=()=>_c.device.isIOS?n(bo):!e.uiConfig.allowChangingFullscreenTarget||!Ot()?e.outerContainerRef:Ot().contains(e.outerContainerRef)?Ot():e.outerContainerRef,$r=async()=>{try{if(oa())await Eu(document),$e({message:"exit fullscreen"});else{if($e({message:"request fullscreen"}),_c.device.isIOS&&!H())return;await Iu(tn())}}catch($t){$e({message:String($t)})}},on=()=>{wo()},fn=$t=>{if($t.preventDefault(),z()){on();return}if(!st()){e.firstStart(),ro(e.uiConfig.controls.hideTimeoutCursor);return}O(kn,!1),y()?An():ro(e.uiConfig.controls.hideTimeoutMobile)},Mn=()=>{ot.set(!0)},Vn=()=>{kt||(gr.set(!0),ro(e.uiConfig.controls.hideTimeoutCursor))},No=$t=>{Oi&&(Oi($t),ro(e.uiConfig.controls.hideTimeoutMobile))},So=$t=>{qi&&(qi($t),ro(e.uiConfig.controls.hideTimeoutMobile))};Ne(()=>{Ri.set(n(Nr))}),Ne(()=>{ut.set((n(Ro)||z()||Y()||le()||X()||!n(no)&&(f()||n(En)&&!n(kn)))&&!n(Xn)&&r()==="video"&&!d()&&re())}),Ne(()=>{!Y()&&n(Dr)&&!Z()&&ro(e.uiConfig.controls.hideTimeoutMobile),O(Dr,Y(),!0)}),Ne(()=>{O(br,A()>0),O(Zn,!we()&&A()<Q(),!0)}),Ne(()=>{Od(n(Jo),z(),ue(),!0)});let er=G("aria_label_video_player");Eb({fullScreenChangeHandler:Ln,getFullscreenTarget:tn}),kb({store:e.store,getFullscreenTarget:tn});let To=($t,xt)=>{var Qi,Gi;let so=(Gi=(Qi=e.store.callbacks)==null?void 0:Qi.uiInfo)==null?void 0:Gi.onUpcomingLiveViewStateChanged;if(!so)return;let ao=!!xt,Do={...Qn(n(bo),{upcomingLiveScreen:xt},"upcomingLiveScreen",ao),...$t};so(Do)};var Di=gC();rt("blur",Sa,on);var Rn=T(Di);Ja(Rn,{onClick:fn,get videoContainer(){return Oe()},set videoContainer($t){Oe($t)}});var tr=L(Rn,2);Pa(tr,()=>"slot",!1,($t,xt)=>{eo($t,()=>({name:Za}))});var ir=L(tr,2);Cs(ir,ne,$t=>{var xt=vC(),so=de(xt);let ao=m(()=>r()!=="thumb"||d()||kt&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);Ya(so,{get hidden(){return n(ao)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var Do=L(so,2);{var Qi=Ge=>{var Yt=cC(),Ii=de(Yt);{var po=Eo=>{let zo=m(()=>e.uiConfig.controls.seekStepMobile/1e3);op(Eo,{side:"left",get seekStep(){return n(zo)},handleSingleFirstClick:fn,handleSecondClick:()=>Jn("backward")})};R(Ii,Eo=>{n(br)&&Eo(po)})}var Uo=L(Ii,2);{var Ur=Eo=>{let zo=m(()=>e.uiConfig.controls.seekStepMobile/1e3);op(Eo,{side:"right",get seekStep(){return n(zo)},handleSingleFirstClick:fn,handleSecondClick:()=>Jn("forward")})};R(Uo,Eo=>{n(Zn)&&Eo(Ur)})}b(Ge,Yt)};R(Do,Ge=>{e.canRewindLive&&Ki&&!_e().has("TIMELINE")&&Ge(Qi)})}var Gi=L(Do,2);{var lo=Ge=>{let Yt=m(()=>{var Ii;return(Ii=e.live)==null?void 0:Ii.startTime});pc(Ge,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(Yt)},onUpcomingLiveViewStateChanged:To})};R(Gi,Ge=>{r()==="LiveWaitingStart"&&Ge(lo)})}var Nn=L(Gi,2);{var Fr=Ge=>{ja(Ge,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};R(Nn,Ge=>{r()==="LiveWaitingRecover"&&Ge(Fr)})}var Pi=L(Nn,2);{var vs=Ge=>{ja(Ge,{kind:"record",get thumbUrl(){return e.thumbUrl}})};R(Pi,Ge=>{r()==="LiveWaitingRecord"&&Ge(vs)})}var ts=L(Pi,2);{var xr=Ge=>{var Yt=uC();let Ii;var po=T(Yt);Ld(po,{get adsSlotId(){return De()},get adsParams(){return tt()},get adsAutoplayParam(){return U()},get duration(){return Pe()},get adsExternalApi(){return e.adsExternalApi}}),S(Yt),D(Uo=>Ii=se(Yt,1,"ads-container s-9",null,Ii,Uo),[()=>({hidden:r()!=="ads"})]),b(Ge,Yt)};R(ts,Ge=>{e.showAds&&st()&&Ge(xr)})}var Bo=L(ts,2);{var Hr=Ge=>{let Yt=m(()=>!wt()&&e.showAutoplayNext&&w());$v(Ge,{get title(){return ke()},get thumb(){return Be()},get isHide(){return n(Yt)},clickCloseIcon:()=>O(Or,!0)})};R(Bo,Ge=>{n(no)&&ke()&&Be()&&Ge(Hr)})}var mn=L(Bo,2);{var vn=Ge=>{cc(Ge,{})};R(mn,Ge=>{xe()&&Ge(vn)})}var Co=L(mn,2);{var wr=Ge=>{var Yt=pC(),Ii=T(Yt);kd(Ii,{}),S(Yt),b(Ge,Yt)};R(Co,Ge=>{J()&&Ge(wr)})}var He=L(Co,2);{var Pt=Ge=>{uc(Ge,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Re()}})};R(He,Ge=>{X()&&Ge(Pt)})}var bi=L(He,2);{var Fo=Ge=>{Qa(Ge,{get shifted(){return y()},get captions(){return P()},get position(){return A()},get playerSize(){return k()},isMobile:!0})};R(bi,Ge=>{pe().value!=="off"&&Ge(Fo)})}var co=L(bi,2);{var Io=Ge=>{var Yt=fC();Yt.__click=[dC,z,Qe,on];var Ii=T(Yt);Ga(Ii,{}),S(Yt),b(Ge,Yt)};R(co,Ge=>{d()&&Ge(Io)})}var uo=L(co,2);{var Ho=Ge=>{let Yt=m(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),Ii=m(()=>r()==="ads"),po=m(()=>e.canRewindLive&&We()!==0);lc(Ge,{get bottomHidden(){return n(Yt)},get showControls(){return y()},get bottomNoSmooth(){return I()},get isAds(){return n(Ii)},get canRewindLive(){return n(po)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Ee()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Ue()},get nextButtonActive(){return Ze()},get prevButtonActive(){return ye()},get isOneVideoPlaylist(){return Nt()},get customFullscreenSupported(){return n(hr)},get endScreenShown(){return n(no)},toggleFullscreen:$r,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:No,onDisabledSeekToInteractiveClick:So,get playerControlsWrapperRef(){return n(oo)},set playerControlsWrapperRef(Uo){O(oo,Uo,!0)},get playerControlsRef(){return n(Ci)},set playerControlsRef(Uo){O(Ci,Uo,!0)}})};R(uo,Ge=>{st()&&Ge(Ho)})}var On=L(uo,2);{var nn=Ge=>{var Yt=mC(),Ii=T(Yt);vc(Ii,{get supportLink(){return e.supportLink},get returnFocus(){return lC},get ref(){return n(Jo)},set ref(po){O(Jo,po,!0)}}),S(Yt),b(Ge,Yt)};R(On,Ge=>{z()&&Ge(nn)})}var Yi=L(On,2);let ji=m(()=>!n(_r));Rd(Yi,{get isLive(){return Te()},get isHidden(){return n(ji)},get isPlaying(){return j()},get position(){return A()},get duration(){return Q()}});var Dn=L(Yi,2);{var nr=Ge=>{Ba(Ge,{})};R(Dn,Ge=>{n(Yn)&&Ge(nr)})}var rr=L(Dn,2);{var Bn=Ge=>{Fd(Ge,{})};R(rr,Ge=>{ie()&&Ge(Bn)})}var gs=L(rr,2);{var hs=Ge=>{gc(Ge,{onClose:jn,onSelectAutoQuality:()=>{Rr("auto"),jn()}})};R(gs,Ge=>{n(es)&&Ge(hs)})}b($t,xt)});var or=L(ir,2);Ye(or,$t=>O(Nr,$t),()=>n(Nr)),S(Di),Ye(Di,$t=>O(bo,$t),()=>n(bo)),D(()=>Me(Di,"aria-label",er)),rt("click",Di,Mn,!0),rt("focusin",Di,Vn,!0),b(t,Di),F(),o()}Xe(["click"]);function rp(t){let e="";return io(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),io(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),io(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),io(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),io(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),io(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),io(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),io(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),io(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),io(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),io(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),io(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),io(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),io(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),io(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),io(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),io(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),io(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),io(t.font)&&(e+=`--font:${t.font};`),io(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),io(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function io(t){return typeof t=="string"&&!t.includes(";")}import{debounceFn as _C}from"@vkontakte/videoplayer-shared/es2018";var bC=M('<div class="time-container s-7"><!></div>'),$C=M('<div class="player-wrapper s-7" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),yC={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 xv(t,e){B(e,!0),q(t,yC);let[i,o]=Ve(),r=()=>x(Z,"$scrubbingInProgress",i),a=()=>x(X,"$playerSize",i),l=()=>x(A,"$isPlaying$",i),d=()=>x(k,"$duration$",i),s=()=>x(z,"$positionWithScrubbing$",i),u=()=>x(I,"$playerPhase",i),v=()=>x(N,"$crashed$",i),p=()=>x(Q,"$currentSubtitle$",i),f=()=>x(H,"$currentSubtitleCaptions$",i),$=()=>x(E,"$positionExact$",i),y=()=>x(Y,"$isLive$",i),g=()=>x(le,"$isRewindableLive$",i),w=h(e,"outsideDuration",3,0),C=h(e,"videoContainer",15),{playerPhase:I,state:{crashed$:N,duration$:k,positionExact$:E,isPlaying$:A,currentSubtitle$:Q,currentSubtitleCaptions$:H,positionWithScrubbing$:z,isLive$:Y,isRewindableLive$:le},ui:{playerSize:X,controls:re,scrubbingInProgress:Z},actions:{internal:{getVideoElement:we}}}=ve(),ue=8,ne=W(!1),_e=ai({}),xe=W(!1),J=m(()=>!r()&&!n(xe)),Re=()=>{O(ne,!0)},pe=()=>{O(ne,!1)},P=_C(Hl,260);Ne(()=>{a(),P(we(),re,_e,n(ne))});let We=m(()=>l()?Xo(d()-s()):Xo(isFinite(d())?d():w()));var Te=$C(),j=T(Te);Ja(j,{hideCursor:!1,get videoContainer(){return C()},set videoContainer(ke){C(ke)}});var ie=L(j,2);Pa(ie,()=>"slot",!1,(ke,Be)=>{eo(ke,()=>({name:Za}))});var Oe=L(ie,2);let De=m(()=>u()!=="thumb"||v());Ya(Oe,{get hidden(){return n(De)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var tt=L(Oe,2);{var U=ke=>{Qa(ke,{shifted:!1,get captions(){return f()},get position(){return $()},get playerSize(){return a()}})};R(tt,ke=>{p().value!=="off"&&n(J)&&ke(U)})}var Pe=L(tt,2);{var Ee=ke=>{var Be=bC(),Nt=T(Be);Vd(Nt,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(We)}}),S(Be),b(ke,Be)};R(Pe,ke=>{n(J)&&ke(Ee)})}var Ue=L(Pe,2);let Ze;var ye=T(Ue);Ka(ye,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return g()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:ue,tooltipRightOffset:ue,get ref(){return _e.timeline},set ref(ke){_e.timeline=ke}}),S(Ue),S(Te),D(ke=>Ze=se(Ue,1,"timeline s-7",null,Ze,ke),[()=>({visible:n(ne)})]),rt("mouseenter",Te,Re),rt("mouseleave",Te,pe),rt("mouseenter",Ue,()=>O(xe,!0)),rt("mouseleave",Ue,()=>O(xe,!1)),b(t,Te),F(),o()}var CC=M("<div><!></div>"),IC={hash:"s-3",code:'.vk-vp-root.s-3{--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-3{overflow:visible}.vk-vp-root.s-3 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-3 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-3 p{margin:0}.vk-vp-root.s-3 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-3 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-3 :focus,.vk-vp-root.s-3 :focus-visible{outline:none}.vk-vp-root.s-3 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-3 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-3 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-3 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-3 .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-3 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-3 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function Sv(t,e){B(e,!0),q(t,IC);let[i,o]=Ve(),r=()=>x(st,"$isLive$",i),a=()=>x(Ct,"$availableSubtitlesList$",i),l=()=>x(Ke,"$isPreviewTrackHorizontallyAligned$",i),d=h(e,"sources",7),s=h(e,"store",7),u=h(e,"microStoresRoot",7),v=h(e,"videoConfig",7),p=h(e,"uiConfig",7),f=h(e,"title",7),$=h(e,"thumbUrl",7),y=h(e,"interactiveContainer",7),g=h(e,"interactiveController",7),w=h(e,"subtitles",7),C=h(e,"subtitlesForcedLanguage",7),I=h(e,"live",7),N=h(e,"preload",7),k=h(e,"autoplay",7),E=h(e,"volume",7,void 0),A=h(e,"muted",7,void 0),Q=h(e,"fromTime",7),H=h(e,"canRewindLive",7),z=h(e,"showAds",7),Y=h(e,"adsSlotId",7,void 0),le=h(e,"adsParams",7,void 0),X=h(e,"adsAutoplayParam",7,void 0),re=h(e,"duration",7,void 0),Z=h(e,"logoClickable",7),we=h(e,"logoHidden",7),ue=h(e,"isMobile",7),ne=h(e,"showNextPrevButtons",7,!1),_e=h(e,"nextButtonActive",7,!1),xe=h(e,"prevButtonActive",7,!1),J=h(e,"endScreenVideoTitle",7,void 0),Re=h(e,"endScreenVideoThumb",7,void 0),pe=h(e,"isOneVideoPlaylist",7,!1),P=h(e,"supportLink",7),We=h(e,"shadowRootContainer",7),Te=h(e,"outerContainerRef",7),j=h(e,"fullScreenTarget",7,void 0),ie=h(e,"failoverHosts",7,void 0),Oe=h(e,"showMiniTimer",7,!1),De=h(e,"saveRate",7),tt=h(e,"seekToInteractive",7,Pb),U=h(e,"playPrevChapter",7,Pb),Pe=h(e,"volumeMultiplier",7),Ee=h(e,"showAutoplayNext",7),Ue=h(e,"showEndScreen",7,!0),Ze=h(e,"keyboardControls",15,void 0),{subscribers:ye,stores:ke}=u();Th(p());let Be=Lt(),Nt=p().logoLink,pt=s().ui.debugPanelVisible,Ot=s().ui.playerSize,st=s().state.isLive$,ei=s().state.isInteractive&&wv.device.isAndroid,Mt=W(void 0),$e=null,be=W(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{vsid:s().vsid}),Rh(s(),ke),Ne(()=>{var K,kt;s().ui.isMobile.set(ue()),(kt=(K=v().callbacks)==null?void 0:K.onDomReady)==null||kt.call(K)});let ee=(K=!1)=>{O(be,!0),K?s().actions.external.firstStart(z()):s().actions.internal.firstStart(z())},it=()=>{if(Be.features.qualityDetailsSubMenuEnabled){let K=n_(s().videoId);if(K)switch(K.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,K.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,K.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(K.quality);break}}else{r_(s().videoId),Sf()&&s().actions.internal.setTrafficSavingEnabled(!0);let kt=yf(s().videoId);kt&&s().actions.internal.setQuality(kt)}};function fe(K){var qt,ot,Ri;let kt=d()||K;kt&&s().initVideo({container:n(Mt),sources:kt,failoverHosts:ie(),subtitles:w(),subtitlesForcedLanguage:C(),volumeMultiplier:Pe()});let si=wC.get(Sd)==="true";pt.set(si),Q()>0&&s().actions.external.seekTime(Q());let lt=ue()?Be.volumeDefault:(ot=(qt=E())!=null?qt:hu())!=null?ot:Be.volumeDefault,yt=(Ri=A())!=null?Ri:Zh();if(s().actions.external.setVolume(lt),s().actions.external.setMuted(yt),s().getAdmanWrapper().setInitialVolume(yt?0:lt),it(),Be.features.saveRate&&De()){let Ni=t_();Ni&&!r()&&s().actions.internal.setPlaybackRate(Ni)}if(Ee()){let Ni=o_();Ni&&s().actions.internal.setAutoplayNextEnabled(Ni)}s().ui.isAutoplay.set(k()),k()&&ee(),N()&&Be.features.preload&&s().actions.internal.preload()}let Le=K=>{if(window.ResizeObserver){let kt,si;$e=new ResizeObserver(SC(lt=>{let yt=lt[0];if(yt.contentBoxSize){let qt=Array.isArray(yt.contentBoxSize)?yt.contentBoxSize[0]:yt.contentBoxSize;kt=qt.inlineSize,si=qt.blockSize}else yt.contentRect&&(kt=yt.contentRect.width,si=yt.contentRect.height);Ot.set({width:kt,height:si})},300)),$e.observe(K)}Ot.set({width:K.clientWidth,height:K.clientHeight})},bt=()=>{document.hidden&&s().actions.external.stop()};At(()=>{var si,lt,yt,qt;ei&&document.addEventListener("visibilitychange",bt),Be.debugLog&&s().actions.internal.startLogging(),Le(n(Mt));let K=ye.map(ot=>ot.init({store:s(),microStores:ke,config:v(),interactiveController:g(),uiConfig:p()})),kt=()=>{ei&&document.removeEventListener("visibilitychange",bt),$e==null||$e.disconnect(),K.forEach(ot=>ot.unsubscribe()),s().destroy()};return((si=I())==null?void 0:si.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),kt):((lt=I())==null?void 0:lt.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),kt):(((yt=I())==null?void 0:yt.status)==="finished"||((qt=I())==null?void 0:qt.status)==="postlive")&&!(d()&&xC(d()))?(s().actions.internal.setLiveWaitingRecord(!0),kt):(fe(),kt)});function Et(){n(be)?s().actions.external.play():ee(!0)}function ut(){s().actions.external.pause()}function ce(K){s().actions.external.setMuted(K)}function ze(){s().actions.external.toggleSubtitle()}function Qe(K,kt){s().actions.external.changeSubtitle(K,kt)}function at(K){s().actions.external.changeAudioStream(K)}function Dt(){var K;(K=s().webApi.slotsApi)!=null&&K.haveSlots()&&s().actions.external.hideControls()}function Bt(){var K;(K=s().webApi.slotsApi)!=null&&K.haveSlots()&&s().actions.external.showControls()}function ti(K){ue()||K>=0&&K<=1&&s().actions.external.setVolume(K)}function vi(K){s().actions.internal.seekTime(K,TC.UNKNOWN)}function Wi(K){s().actions.external.seekEpisodeStartTime(K)}function Vt(){s().actions.external.returnFocusToEpisodes()}function di(K){s().actions.external.setPlaybackRate(K)}function pi(K){s().actions.external.setAutoQualityLimits(K)}function vt(){s().actions.external.setQuality("auto")}function Gt(K){s().actions.external.setTrafficSavingEnabled(K)}function hi(K){s().actions.external.setHighQualityEnabled(K)}let Ki=rp(Be.view),Zt=v().playerView==="preview",Ct=s().state.availableSubtitlesList$;if(Be.features.initSubtitles){let K=!1;Ne(()=>{var kt;if(!K&&a().length){K=!0;let si;if(Be.features.userVideoPrefs&&s().videoId){let yt=yu(Be.userSalt,String(s().videoId));yt!=null&&yt.subtitleTrackId&&(si=a().find(qt=>qt.value===yt.subtitleTrackId))}let lt=(kt=C())!=null?kt:Cf();lt&&(si=a().find(yt=>yt.language===lt)),s().actions.internal.setSubtitle(si)}})}let Ke=s().ui.isPreviewTrackHorizontallyAligned;var _i=CC();let _o;var xo=T(_i);{var un=K=>{yv(K,{get store(){return s()},get uiConfig(){return Be},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return I()},get autoplay(){return k()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return Y()},get adsParams(){return le()},get adsAutoplayParam(){return X()},get duration(){return re()},get logoClickable(){return Z()},get logoHidden(){return we()},get logoTargetUrl(){return Nt},get nextButtonActive(){return _e()},get prevButtonActive(){return xe()},get endScreenVideoTitle(){return J()},get endScreenVideoThumb(){return Re()},get isOneVideoPlaylist(){return pe()},get supportLink(){return P()},get shadowRootContainer(){return We()},get outerContainerRef(){return Te()},get fullScreenTarget(){return j()},get showMiniTimer(){return Oe()},get playerStarted(){return n(be)},get seekToInteractive(){return tt()},get playPrevChapter(){return U()},firstStart:ee,seekTime:vi,get showEndScreen(){return Ue()},get showAutoplayNext(){return Ee()},get showNextPrevButtons(){return ne()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(Mt)},set videoContainer(kt){O(Mt,kt,!0)}})},St=K=>{var kt=Ae(),si=de(kt);{var lt=qt=>{xv(qt,{get thumbUrl(){return $()},get outsideDuration(){return re()},get canRewindLive(){return H()},get videoContainer(){return n(Mt)},set videoContainer(ot){O(Mt,ot,!0)}})},yt=qt=>{bv(qt,{get store(){return s()},get uiConfig(){return Be},get title(){return f()},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return I()},get autoplay(){return k()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return Y()},get adsParams(){return le()},get adsAutoplayParam(){return X()},get duration(){return re()},get logoClickable(){return Z()},get logoHidden(){return we()},get logoTargetUrl(){return Nt},get nextButtonActive(){return _e()},get prevButtonActive(){return xe()},get endScreenVideoTitle(){return J()},get endScreenVideoThumb(){return Re()},get isOneVideoPlaylist(){return pe()},get supportLink(){return P()},get shadowRootContainer(){return We()},get outerContainerRef(){return Te()},get fullScreenTarget(){return j()},get showMiniTimer(){return Oe()},get playerStarted(){return n(be)},get seekToInteractive(){return tt()},get playPrevChapter(){return U()},firstStart:ee,get showEndScreen(){return Ue()},get showAutoplayNext(){return Ee()},get showNextPrevButtons(){return ne()},get adsExternalApi(){return e.adsExternalApi},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(Mt)},set videoContainer(ot){O(Mt,ot,!0)},get keyboardControls(){return Ze()},set keyboardControls(ot){Ze(ot)}})};R(si,qt=>{Zt?qt(lt):qt(yt,!1)})}b(K,kt)};R(xo,K=>{ue()?K(un):K(St,!1)})}S(_i),D(K=>{_o=se(_i,1,"vk-vp-root s-3",null,_o,K),qe(_i,Ki)},[()=>({"root--miui-browser":wv.device.isMobile&&wv.browser.isMiuiBrowser,"visible-outside":Zt,"preview-track-horizontally-alinged":l()})]),b(t,_i);var Ft=F({initVideo:fe,play:Et,pause:ut,setMuted:ce,toggleSubtitle:ze,changeSubtitle:Qe,changeAudioStream:at,hideControls:Dt,showControls:Bt,setVolume:ti,seekTime:vi,seekEpisodeStartTime:Wi,returnFocusToEpisodes:Vt,setPlaybackRate:di,setAutoQualityLimits:pi,setAutoQuality:vt,toggleTrafficSaving:Gt,toggleHighQuality:hi,get sources(){return d()},set sources(K){d(K)},get store(){return s()},set store(K){s(K)},get microStoresRoot(){return u()},set microStoresRoot(K){u(K)},get videoConfig(){return v()},set videoConfig(K){v(K)},get uiConfig(){return p()},set uiConfig(K){p(K)},get title(){return f()},set title(K){f(K)},get thumbUrl(){return $()},set thumbUrl(K){$(K)},get interactiveContainer(){return y()},set interactiveContainer(K){y(K)},get interactiveController(){return g()},set interactiveController(K){g(K)},get subtitles(){return w()},set subtitles(K){w(K)},get subtitlesForcedLanguage(){return C()},set subtitlesForcedLanguage(K){C(K)},get live(){return I()},set live(K){I(K)},get preload(){return N()},set preload(K){N(K)},get autoplay(){return k()},set autoplay(K){k(K)},get volume(){return E()},set volume(K){E(K)},get muted(){return A()},set muted(K){A(K)},get fromTime(){return Q()},set fromTime(K){Q(K)},get canRewindLive(){return H()},set canRewindLive(K){H(K)},get showAds(){return z()},set showAds(K){z(K)},get adsSlotId(){return Y()},set adsSlotId(K){Y(K)},get adsParams(){return le()},set adsParams(K){le(K)},get adsAutoplayParam(){return X()},set adsAutoplayParam(K){X(K)},get duration(){return re()},set duration(K){re(K)},get logoClickable(){return Z()},set logoClickable(K){Z(K)},get logoHidden(){return we()},set logoHidden(K){we(K)},get isMobile(){return ue()},set isMobile(K){ue(K)},get showNextPrevButtons(){return ne()},set showNextPrevButtons(K){ne(K)},get nextButtonActive(){return _e()},set nextButtonActive(K){_e(K)},get prevButtonActive(){return xe()},set prevButtonActive(K){xe(K)},get endScreenVideoTitle(){return J()},set endScreenVideoTitle(K){J(K)},get endScreenVideoThumb(){return Re()},set endScreenVideoThumb(K){Re(K)},get isOneVideoPlaylist(){return pe()},set isOneVideoPlaylist(K){pe(K)},get supportLink(){return P()},set supportLink(K){P(K)},get shadowRootContainer(){return We()},set shadowRootContainer(K){We(K)},get outerContainerRef(){return Te()},set outerContainerRef(K){Te(K)},get fullScreenTarget(){return j()},set fullScreenTarget(K){j(K)},get failoverHosts(){return ie()},set failoverHosts(K){ie(K)},get showMiniTimer(){return Oe()},set showMiniTimer(K){Oe(K)},get saveRate(){return De()},set saveRate(K){De(K)},get showAutoplayNext(){return Ee()},set showAutoplayNext(K){Ee(K)},get seekToInteractive(){return tt()},set seekToInteractive(K){tt(K)},get playPrevChapter(){return U()},set playPrevChapter(K){U(K)},get volumeMultiplier(){return Pe()},set volumeMultiplier(K){Pe(K)},get showEndScreen(){return Ue()},set showEndScreen(K){Ue(K)},get keyboardControls(){return Ze()},set keyboardControls(K){Ze(K)}});return o(),Ft}var EC=Ce('<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 Tv(t,e){let i=h(e,"isWhite",3,!1),o=m(()=>i()?"#fff":"#909499");je(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(r,a)=>{var l=EC();ci(9),b(r,l)},$$slots:{default:!0}})}var kC=M('<div class="title s-2"> </div>'),PC=M('<div class="playerStub s-2"><!> <!></div>'),AC={hash:"s-2",code:".playerStub.s-2{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-2{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 Cv(t,e){q(t,AC);var i=PC(),o=T(i);{var r=d=>{var s=kC(),u=T(s,!0);S(s),D(()=>me(u,e.title)),b(d,s)};R(o,d=>{e.title&&d(r)})}var a=L(o,2);{var l=d=>{let s=m(()=>!!e.thumbUrl);Tv(d,{get isWhite(){return n(s)}})};R(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}S(i),D(()=>qe(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}var LC=M('<div class="playerError s-1"><!></div>'),MC={hash:"s-1",code:".playerError.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%}"};function Iv(t){q(t,MC);var e=LC(),i=T(e);Ga(i,{}),S(e),b(t,e)}import{now as aI,ValueSubject as lI}from"@vkontakte/videoplayer-shared/es2018";import{cloneDeepWith as dI,InterfaceLanguage as cI,isNonNullable as Mv,Logger as uI,Observable as pI,Subscription as Db,once as fI,InternalsExposure as mI,skip as vI,getPlayerId as gI}from"@vkontakte/videoplayer-shared/es2018";import{clientChecker as Bb,isMobile as hI}from"@vkontakte/videoplayer-core/es2018";import{OneStat as _I,ThinOneStat as bI,MediascopePixel as $I}from"@vkontakte/videoplayer-statistics/es2018";import{Logger as VC,Subscription as RC}from"@vkontakte/videoplayer-shared/es2018";var sp=class{constructor(){this.subscription=new RC,this.logger=new VC,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=ge(e.state.currentPlaybackRate$),r=ge(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 kv,detectEmbed as HC}from"@vkontakte/videoplayer-shared/es2018";var NC=Ce('<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),OC=M('<div><div><!></div> <span class="title s-6"> </span></div>'),DC={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 Ev(t,e){B(e,!0),q(t,DC);let[i,o]=Ve(),r=()=>x(u,"$interfaceLanguage$",i),a=()=>x(v,"$isMobile$",i),l=ve(),d=Lt(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,v=l.ui.isMobile,p=l.ui.t,f=m(()=>r()&&p("pip_dummy_title")),$=rp(d.view);var y=OC();let g;var w=T(y);let C;var I=T(w);je(I,{width:"57",height:"56",testId:"pip-dummy-icon",children:(E,A)=>{var Q=NC();ci(),b(E,Q)},$$slots:{default:!0}}),S(w);var N=L(w,2),k=T(N,!0);S(N),S(y),D((E,A)=>{g=se(y,1,"player-pip-dummy s-6",null,g,E),qe(y,$),C=se(w,1,"dummy-image s-6",null,C,A),me(k,n(f))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),b(t,y),F(),o()}var BC=Object.defineProperty,FC=(t,e,i)=>e in t?BC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Kl=(t,e,i)=>FC(t,typeof e!="symbol"?e+"":e,i),UC=460,zC=280,bc=class{constructor({enabled:e=!0}={enabled:!0}){Kl(this,"playerDomElement"),Kl(this,"playerParentShadowRoot"),Kl(this,"playerDummyElement"),Kl(this,"svelteContext"),Kl(this,"pipWindow"),Kl(this,"info",{isActive$:new kv(!1),isEnabled$:new kv(!1),type:1}),this.info.isEnabled$=new kv(e)}isSupported(){let{isEmbed:e}=HC();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}async request(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=await documentPictureInPicture.requestWindow({width:UC,height:zC,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(`
|
|
63
|
+
`),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=Gr(Ev,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||(ka(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})}async exit(){return new Promise(e=>{var i;this.pipWindow&&((i=documentPictureInPicture.window)==null||i.close()),e()})}async dispose(){await this.exit()}setEnabled(e){this.info.isEnabled$.next(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 Ab(t){return t instanceof bc}var ap=class{static getLatestSupportedVersion(e){let i=new Va(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 Lb="Inner error. Unexpectedly root annotation container null reference exception",Mb="Annotation with such name already exists",Vb="Annotation with such name does not exist";var ql=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as WC,Subscription as KC,throttleFn as qC}from"@vkontakte/videoplayer-shared/es2018";var QC="1",GC=100,lp=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new KC}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=qC(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},GC);this.subscriptions.add(WC(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 ql(Lb);if(this.annotations.has(e))throw new ql(Mb);i.style.zIndex=(o=i.style.zIndex)!=null?o:QC,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 ql(Vb);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 dp,Subscription as YC}from"@vkontakte/videoplayer-shared/es2018";var cn=class{init({store:e,microStores:i,interactiveController:o,config:r}){return dp(e),dp(i),dp(r),r.interactiveData&&dp(o),this.subscription=new YC,this.subscription}};var yc=class extends cn{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$={...ae(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 cn{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$={...ae(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:v}=a.ui,p=ge(v),f=()=>p&&ge(u);return o.add(u.subscribe($=>{if(!p)return;let y=ge(l);ge(s)?this.state$.set($):y!==null&&this.state$.set(!y||$)})),o.add(s.subscribe($=>{this.state$.set(!$||f())})),o.add(l.subscribe($=>{if($===null)return;let y=ge(d);if(f()){this.state$.set(!0);return}y&&this.state$.set(!$)})),o}};var wc=class extends cn{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=ae("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 jC}from"@vkontakte/videoplayer-shared/es2018";var Pv=ae(!1),cp=null,Sc=class extends cn{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$={...Pv,set:(i,o=!1)=>{i!==ge(Pv)&&(this.clearTimeout(),Pv.set(i),!i&&cp&&(cp=!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=>{ge(l)&&p&&this.state$.set(!1)}));let v=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(jC({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:f,interactiveTimeIndicator:$})=>{var y,g;if(!(!p||!($!=null&&$.isDisplayed))){if(!f)return this.state$.set(!1);v.tooltipHelpHintActive&&cp===null&&(cp=!0,v.tooltipHelpHintActive=!1,this.state$.set(!0),(g=(y=r.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||g.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as XC,noop as ZC}from"@vkontakte/videoplayer-shared/es2018";var Tc=class extends cn{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$={...ae(null),toggle:ZC};this.checkIfShouldHide=i=>Ls(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=async()=>{if(this.checkIfShouldHide(ge(l)))return;let s=ge(this.state$),{isEnded$:u,playbackState$:v}=r.state,{disabledControls$:p}=r.ui.controls,f=ge(u),$=ge(v);if(s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1),p.remove(ff),!f&&this.graphMadePause&&r.actions.internal.play()}catch(y){d({message:"Cant hide graph"})}else{this.graphMadePause=$==="playing";try{await(a==null?void 0:a.toggleGraphView(!0)),this.state$.set(!0),p.add(ff),!f&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}},o.add(XC({graphIsOpened:this.state$,currentGridType:l}).subscribe(async({graphIsOpened:s,currentGridType:u})=>{if(this.checkIfShouldHide(u)&&s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1)}catch(p){d({message:"Cant hide graph"})}})),o}};import{ValueSubject as Rb}from"@vkontakte/videoplayer-shared/es2018";var Cc=class extends cn{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:ae(!1),isEnabled$:ae(!1),type$:ae(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 Rb(!1),isEnabled$:new Rb(!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 tI,filterChanged as iI}from"@vkontakte/videoplayer-shared/es2018";import{safeStorage as Av}from"@vkontakte/videoplayer-shared/es2018";var Nb=({maxShowCount:t,timeout:e})=>{let i=[t!==0?JC({maxCount:t}):void 0,e!==0?eI({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},JC=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Av.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}}},eI=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Av.get(e)||"{}")}catch(a){return{}}},o=a=>Av.set(e,JSON.stringify(a)),r=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o({...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 cn{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:ae({}),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=Nb({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe(iI(),tI(v=>v)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(s&&r.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var Ob=()=>[yc,xc,wc,Sc,Tc,Cc,Ic].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:{...e,[o.stateName]:o.state$}}},{subscribers:[],stores:{}});import{devNull as Ec}from"@vkontakte/videoplayer-shared/es2018";var up=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 pp=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 up(()=>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 oI=M('<div class="root s-0"><!></div>'),nI={hash:"s-0",code:".root.s-0{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:1}"};function Lv(t,e){B(e,!0),q(t,nI);let i=null,o=W(null);Ne(()=>(n(o)&&(i=window.setTimeout(()=>{O(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function r(s){e.playbackStatusShow&&O(o,s?"prev":"next",!0)}var a=Ae(),l=de(a);{var d=s=>{var u=Ae(),v=de(u);Cs(v,()=>n(o),p=>{var f=oI(),$=T(f);let y=m(()=>n(o)==="prev");hc($,{get duration(){return e.animationDuration},get Icon(){return ca},get reversed(){return n(y)}}),S(f),b(p,f)}),b(s,u)};R(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return b(t,a),F({startVideoChangedAnimation:r})}var rI=Object.defineProperty,sI=(t,e,i)=>e in t?rI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Xt=(t,e,i)=>sI(t,typeof e!="symbol"?e+"":e,i),yI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:cI.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:hI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},Gn=W(void 0),Vv=ai({animationDuration:0,playbackStatusShow:!1}),fp=class extends HTMLElement{constructor(){super(),Xt(this,"svelteStubComponent"),Xt(this,"svelteRootComponent"),Xt(this,"sveltePersistentLayerComponent"),Xt(this,"svelteErrorComponent"),Xt(this,"store"),Xt(this,"microStoresRoot"),Xt(this,"statistics"),Xt(this,"sentry"),Xt(this,"_shadowRoot"),Xt(this,"playerContainer"),Xt(this,"rootContainer"),Xt(this,"stateContainer"),Xt(this,"shadowRootContainer"),Xt(this,"playerId"),Xt(this,"uiConfig"),Xt(this,"coreConfig"),Xt(this,"statisticsConfig"),Xt(this,"interactiveController"),Xt(this,"interactiveContainer"),Xt(this,"graphMadePause"),Xt(this,"currentPlayingVideoIndex",0),Xt(this,"needToRepeatPlaylist",!1),Xt(this,"videoConfig"),Xt(this,"pictureInPictureApi"),Xt(this,"mediaSessionApi"),Xt(this,"unsubscribePlayerPhaseSubscription"),Xt(this,"logger"),Xt(this,"log"),Xt(this,"subscription"),Xt(this,"interactiveSubscription"),Xt(this,"annotationsApi"),Xt(this,"slotsApi"),Xt(this,"focusManager"),Xt(this,"prevIsid"),Xt(this,"isInited",!1),Xt(this,"postponedInitParams",null),Xt(this,"internalsExposure",null),Xt(this,"shadowDOMCallbacksDisabled",!1),Xt(this,"fatalError$",new lI(null)),Xt(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:v,statVKAppId:p,refreshStatAuthToken:f,autoplay:$,isMobile:y,isTouch:g,refDomain:w,deviceId:C,interactiveData:I}=$c(this.videoConfig,i),N=(o=I==null?void 0:I.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:E,isClip:A=!1}=e;if(this.uiConfig.features.statistics&&E)try{return new _I({movieId:E,albumId:d,place:s,trackCode:v,vkAppId:p,autoplay:(l=$&&!this.interactiveController)!=null?l:!1,mobile:g!=null?g:y,clip:A,refDomain:w,deviceId:C,isPreviewPlayerView:this.videoConfig.playerView==="preview",...N&&(!this.isInited||k)&&{projectId:Number(N)}},{refreshAuthToken:f,userSalt:u,config:this.statisticsConfig,...this.interactiveController&&{useIsid:!0,isid:this.prevIsid}})}catch(H){console.error(H),this.log({message:H.message})}}),Ec.create("ui"),this.logger=new uI,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Db,this.interactiveSubscription=new Db,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Gr(Iv,{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=ai({title:o,thumbUrl:r}),l={target:this.playerContainer,props:a};this.svelteStubComponent=Gr(Cv,l),this.sveltePersistentLayerComponent=Gr(Lv,{target:this.playerContainer,props:Vv}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;Vv.animationDuration=e,Vv.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 bI.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,v,p,f,$;if(!this.videoConfig)return;let{albumId:y,statPlace:g,statAuthToken:w,preload:C,autoplay:I,volume:N,muted:k,fromTime:E,canRewindLive:A,supportLink:Q,showAds:H,adsSlotId:z,adsParams:Y={},adsAutoplayParam:le,interfaceLanguage:X,isCyrillicRelatedInterface:re,logoClickable:Z,logoHidden:we,isMobile:ue,isTouch:ne,isAudioDisabled:_e,isLiveCatchUpMode:xe,fullScreenTarget:J,failoverHosts:Re,canDownload:pe,callbacks:P,interactiveData:We,showThumbTimer:Te,additionalButtons:j=[],additionalSettingsMenuItems:ie=[],additionalContextMenuItems:Oe=[],repeat:De,loop:tt,saveRate:U,volumeMultiplier:Pe,showEndScreen:Ee,showAutoplayNext:Ue,mediascopePixels:Ze}=$c(this.videoConfig,i),{sources:ye,title:ke,thumbUrl:Be,unitedVideoId:Nt,isClip:pt=!1,duration:Ot,adsParams:st={},videoEpisodes:wt,previewThumbsData:ei,subtitles:Mt,subtitlesForcedLanguage:$e,live:be,adsExternalApi:ee}=e;if(!ye&&!be){let di=new Error("empty sources and live");this.fatalError$.next(di),(r=P.onCrashed)==null||r.call(P,di.message);return}let it={...Y,...st},fe=this.getNextVideoInfo(),Le={sources:ye,title:ke,thumbUrl:Be,subtitles:Mt,subtitlesForcedLanguage:$e,unitedVideoId:Nt,isClip:pt,live:be,albumId:y,statPlace:g,autoplay:I,muted:k,volume:N,fromTime:E,canRewindLive:A,showAds:H,adsSlotId:z,adsParams:it,adsAutoplayParam:le,duration:Ot,logoClickable:Z,logoHidden:we,isTouch:ne!=null?ne:ue,repeat:De,loop:tt,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:fe.nextVideoTitle,endScreenVideoThumb:fe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},bt={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(Le)}`});let Et=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),ut=(Et==null?void 0:Et.oneStat)||this.createOneStat(e,i),ce=this.createThinOneStat(e,i),ze;Ze&&(ze=new $I({pixels:Ze})),(ut||ce)&&(this.statistics=new Ku(ut,ce,ze,Et==null?void 0:Et.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Ma(this.uiConfig.sentry,{version:El,env:mu},{movieId:Nt,albumId:y,place:g,autoplay:(l=I&&!this.interactiveController)!=null?l:!1,mobile:ne!=null?ne:ue,clip:pt}),this.interactiveController&&((u=this.prevIsid)!=null||(this.prevIsid=(s=(d=this.statistics)==null?void 0:d.oneStat)==null?void 0:s.isid$.getValue())),this.sentry={...this.sentry,...Ma.getInstance()};let at=!!We,Dt=[],Bt="tooltip_interactive_go_back_disabled_first";if(at&&this.interactiveController){let di=this.interactiveController.state.isInitialChapter$.getValue(),pi=this.interactiveController.getHistoryState();di&&Dt.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Dt.push("SEEK_TO_INTERACTIVE_BUTTON"),pi.hasPrevChapter$.getValue()||(Dt.push("PLAY_PREV_CHAPTER_BUTTON"),di||(pi.isGoBackLimited$.getValue()?Bt="tooltip_interactive_go_back_disabled_limit":Bt="tooltip_interactive_go_back_disabled"))}let ti=()=>{var di;this.isInited=!1,this.prevIsid=void 0;let pi=(o==null?void 0:o.info.isEnded$.getValue())&&((di=this.interactiveController)==null?void 0:di.state.isEndChapter$.getValue());P.onReplayInteractiveVideo&&!pi?P.onReplayInteractiveVideo():this.replayInteractiveVideo()},vi=De&&this.videoConfig.videos.length===1;this.store=G_({player:o,interfaceLanguage:X,isCyrillicRelatedInterface:re,videoId:Nt,isClip:pt,isLiveCatchUpMode:xe,isAudioDisabled:_e,statAuthToken:w,callbacks:P,webApi:bt,videoEpisodes:wt,previewThumbsData:ei,canDownload:pe,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:Dt,isInteractive:at,saveRate:U,interactiveRanges$:(v=this.interactiveController)==null?void 0:v.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:ti,playPrevChapterDisabledTooltip:Bt,hasInteractiveBranches:!!(($=(f=this.interactiveController)==null?void 0:f.getChapterBranches())!=null&&$.length),additionalButtons:this.uiConfig.features.additionalButtons?j:[],additionalSettingsMenuItems:ie!=null?ie:[],additionalContextMenuItems:Oe!=null?Oe:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:di=>{var pi;return(pi=this.sveltePersistentLayerComponent)==null?void 0:pi.startVideoChangedAnimation(di)},looped:this.uiConfig.features.useLoopSetting?tt:vi,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId});let{stores:Wi}=this.microStoresRoot=Ob(),Vt=()=>{var di,pi,vt,Gt,hi,Ki;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onCurrentFormatChanged)==null?void 0:Ke.call(P,Ct)})),this.subscription.add(Wi.interactiveControlsOpacity$.subscribe(Ct=>{var Ke;Ct!==null&&((Ke=this==null?void 0:this.interactiveController)==null||Ke.setDisabledControls(Ct))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onThroughputEstimationChanged)==null?void 0:Ke.call(P,Ct)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onTrafficSavingEnabledChanged)==null?void 0:Ke.call(P,Ct)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onHighQualityEnabledChanged)==null?void 0:Ke.call(P,Ct)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onAutoQualityEnabledChanged)==null?void 0:Ke.call(P,!!Ct)})),this.subscription.add(new pI(Ct=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(Ke=>Ct.next(Ke)))}).pipe(vI(1)).subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onCurrentPlaybackRateChanged)==null?void 0:Ke.call(P,Ct)})),this.subscription.add(this.store.state.volume$.subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onVolumeChange)==null?void 0:Ke.call(P,Ct)})),this.subscription.add(this.store.state.muted$.subscribe(Ct=>{var Ke,_i,_o,xo;if(Ct)(Ke=P==null?void 0:P.onMute)==null||Ke.call(P);else{let un=(_o=((_i=this.store)==null?void 0:_i.state.volume$)&&ge(this.store.state.volume$))!=null?_o:0;(xo=P==null?void 0:P.onUnmute)==null||xo.call(P,un)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onVideoBitrateChanged)==null?void 0:Ke.call(P,Ct)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(Ct=>{var Ke;let _i=(Ke=this.store)==null?void 0:Ke.ui.controls.disabledControls$;_i&&(Ct&&!_i.includes(Td)&&_i.add(Td),Ct||_i.remove(Td))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(async Ct=>{var Ke;if(!Bb.browser.isSamsungBrowser||!Ct||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&await this.replayInteractiveChapter((Ke=this.videoConfig)==null?void 0:Ke.callbacks.onExternalFullscreenExit)})),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onVSIDChanged)==null?void 0:Ke.call(P,Ct)})),this.initMediaSession(),O(Gn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:ye,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:ke,thumbUrl:Be,subtitles:Mt,subtitlesForcedLanguage:$e,live:be,preload:C,autoplay:I,muted:k,volume:N,fromTime:E,canRewindLive:A,supportLink:Q,showAds:H,adsSlotId:z,adsParams:it,adsAutoplayParam:le,duration:Ot,logoClickable:Z,logoHidden:we,isMobile:ne!=null?ne:ue,failoverHosts:Re,fullScreenTarget:J,saveRate:U,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Te,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:fe.nextVideoTitle,endScreenVideoThumb:fe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:Pe,showEndScreen:Ee,showAutoplayNext:Ue,adsExternalApi:ee,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let Zt={target:this.playerContainer,props:n(Gn)};this.svelteRootComponent=Gr(Sv,Zt),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(vt=(pi=(di=this.videoConfig)==null?void 0:di.callbacks)==null?void 0:pi.onInited)==null||vt.call(pi)),(Gt=this.internalsExposure)==null||Gt.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((Ki=(hi=this.videoConfig)==null?void 0:hi.callbacks)!=null&&Ki.onDevNullLog)?Ec.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Ec.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Bb.isInited$.subscribe(di=>{di&&(console.log("UI SDK async start"),Vt())}):Vt()}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.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&&Mv(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)}async initInteractives(){var e,i,o,r,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=await import("@vkontakte/videoplayer-interactive/es2018");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let s=(i=this.store)==null?void 0:i.interfaceLanguage$,u=s?ge(s):this.videoConfig.interfaceLanguage,{projectInfo:v,initChapterId:p,historyApi:f,videoLoader:$}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:v,initChapterId:p,historyApi:f,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$:g}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(g.subscribe(C=>{if(!this.isInited)return;let I=this.store;C?I.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):I.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(y.subscribe(C=>{this.store&&this.store.state.isInteractiveExpectation$.set(C)}));let w=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(C=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]={...C.config,title:(v==null?void 0:v.title)||C.config.title};let I=w?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(C.player,I),w&&(w=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:C,actionType:I})=>{var N,k,E,A,Q,H;if(!this.store||!this.microStoresRoot)return;let z=y.getValue();if(C==="action-choice"&&I==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Cd)),C==="action-choice-canceled"){let Y=ge(this.store.state.isPlaying$)||z;if(((E=(N=this.videoConfig)==null?void 0:N.isTouch)!=null?E:(k=this.videoConfig)!=null&&k.isMobile)&&Y){this.store.ui.interactiveHideMobileControls.set(!0);return}(H=(A=this.videoConfig)==null?void 0:(Q=A.callbacks).onDisabledInteractiveClick)==null||H.call(Q)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:C,removeAllOpenURI:I})=>{this.store&&C==="container-fake-removed"&&I&&this.store.ui.controls.disabledControls$.remove(Cd)})),await this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(r=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&r.onInteractiveHistoryChanged){let C=this.interactiveController.getHistoryState();this.subscription.add(C.history$.subscribe(I=>{var N,k,E;I.length&&((E=(k=(N=this.videoConfig)==null?void 0:N.callbacks)==null?void 0:k.onInteractiveHistoryChanged)==null||E.call(k,I))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(C=>{var I,N,k;(k=(I=this.videoConfig)==null?void 0:(N=I.callbacks).onInteractiveChapterChanged)==null||k.call(N,C.chapter,C.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var C,I,N,k;(C=this.microStoresRoot)==null||C.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(k=(I=this.videoConfig)==null?void 0:(N=I.callbacks).onInteractiveTimeIndicatorClick)==null||k.call(N)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(C=>{this.log({message:C.toString()})}))}catch(d){this.log({message:d.message})}}initPlayer(e,i={}){var o,r,a,l,d,s,u,v,p,f,$,y,g,w,C,I,N,k,E,A,Q,H,z,Y,le;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let X=new Error("empty videos");this.fatalError$.next(X),(r=(o=e.callbacks)==null?void 0:o.onCrashed)==null||r.call(o,X.message);return}else this.fatalError$.next(null);if(this.videoConfig=$c(yI,dI(e,X=>X instanceof HTMLElement?X:void 0)),this.playerId=gI(e.playerId),this.uiConfig=Sh((a=i.ui)!=null?a:{}),this.updatePersistentLayerProps(),this.coreConfig=(l=i.core)!=null?l:{configName:[]},this.statisticsConfig=(d=i.statistics)!=null?d:{},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.sentry={config:(s=this.uiConfig.sentry)!=null?s:{}},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: "+((v=this.videoConfig)==null?void 0:v.showAds)],numbers:[aI()]}),Mv(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(f=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?f:!0),Mv(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(y=($=this.uiConfig.features.pip)!=null?$:this.videoConfig.isPictureInPictureEnabled)!=null?y:!0,this.uiConfig.features.dpip=(w=(g=this.uiConfig.features.dpip)!=null?g:this.videoConfig.isPictureInPictureEnabled)!=null?w:!0),this.uiConfig.ads.paramsOverride={preview:(C=this.uiConfig.ads.preview)!=null?C:this.videoConfig.adsPreviewParam,...this.uiConfig.ads.paramsOverride},this.videoConfig.isTouch=(N=(I=this.uiConfig.isMobile)!=null?I:this.videoConfig.isTouch)!=null?N:this.videoConfig.isMobile,(k=this.videoConfig).autoplay&&(k.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(E=this.uiConfig.ads.enable)!=null?E:this.videoConfig.showAds,this.videoConfig.adsSlotId=(A=this.uiConfig.ads.slot)!=null?A:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((Q=this.uiConfig.showLogo)!=null?Q:!this.videoConfig.logoHidden),(H=this.videoConfig).canRewindLive&&(H.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(z=this.videoConfig.supportLink)!=null?z: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&&((Y=this.videoConfig.videos)!=null&&Y[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let X={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=ap.getLatestSupportedVersion(X):this.pictureInPictureApi=new Va(X)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new sp:void 0,this.slotsApi=this.uiConfig.features.slots?new ip:void 0,this.annotationsApi=this.uiConfig.features.annotations?new lp(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new pp(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]),Ab(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(le=this.slotsApi)==null||le.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(Gn)&&(n(Gn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Gn).nextButtonActive=this.isNextButtonActive(),n(Gn).prevButtonActive=this.isPrevButtonActive(),n(Gn).endScreenVideoTitle=o.nextVideoTitle,n(Gn).endScreenVideoThumb=o.nextVideoThumb,n(Gn).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}={...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(Gn)&&(n(Gn).needToRepeatPlaylist=this.needToRepeatPlaylist,n(Gn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Gn).nextButtonActive=this.isNextButtonActive(),n(Gn).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)}async setLanguage(e){var i;await((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()}async replayInteractiveChapter(e){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let r=ge(this.store.state.positionExact$),l=ge(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe(fI()).subscribe(()=>{l&&r>=l.time?this.seekTime(l.time):this.seekTime(r),e==null||e()});let d=this.interactiveController.getCurrentChapter();await 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&&ka(e)}};import{InterfaceLanguage as hoe,VKNumericLanguage as _oe,loadVKLangPack as boe}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as yoe,VideoFormat as xoe}from"@vkontakte/videoplayer-core/es2018";var doe=()=>{window.customElements.define("vk-video-player",fp)};export{qu as ControlButtonType,ds as GridTypes,hoe as InterfaceLanguage,Dd as MenuItemType,cs as PlayerPhase,El as VERSION,_oe as VKNumericLanguage,xoe as VideoFormat,yoe as VideoQuality,boe as loadVKLangPack,doe as registerPlayerWebComponent};
|