@vkontakte/videoplayer 1.1.82-dev.fbdd1f70.0 → 1.1.82
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 +38 -38
- package/es2015.esm.js +38 -38
- package/es2018.cjs +38 -38
- package/es2018.esm.js +38 -38
- package/es2024.cjs +38 -38
- package/es2024.esm.js +38 -38
- package/esnext.cjs +38 -38
- package/esnext.esm.js +38 -38
- package/evergreen.esm.js +38 -38
- package/package.json +5 -5
- package/types/config.d.ts +4 -0
- package/types/store/index.d.ts +3 -3
- package/types/types/index.d.ts +4 -2
package/es2018.esm.js
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer v1.1.82
|
|
3
|
-
* Tue,
|
|
2
|
+
* @vkontakte/videoplayer v1.1.82
|
|
3
|
+
* Tue, 10 Feb 2026 14:16:20 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-1-82/doc/
|
|
5
5
|
*/
|
|
6
|
-
var
|
|
6
|
+
var r$=Object.defineProperty;var Kv=t=>{throw TypeError(t)};var s$=(t,e,i)=>e in t?r$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var rr=(t,e,i)=>s$(t,typeof e!="symbol"?e+"":e,i),wp=(t,e,i)=>e.has(t)||Kv("Cannot "+i);var Vi=(t,e,i)=>(wp(t,e,"read from private field"),i?i.call(t):e.get(t)),Gs=(t,e,i)=>e.has(t)?Kv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),rl=(t,e,i,o)=>(wp(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),qv=(t,e,i)=>(wp(t,e,"access private method"),i);var Ys="[",js="[!",_a="]",as={};var eo=Symbol(),Hn=Symbol("filename"),Qv=Symbol("hmr"),Gv="http://www.w3.org/1999/xhtml",Dc="http://www.w3.org/2000/svg";var Sp="@attach";var Oc=!0;var jv,Xv,Yv=(Xv=(jv=globalThis.process)==null?void 0:jv.env)==null?void 0:Xv.NODE_ENV,Ve=Yv&&!Yv.toLowerCase().startsWith("prod");var sr=Array.isArray,Zv=Array.prototype.indexOf,Yl=Array.from,Cp=Object.keys,ao=Object.defineProperty,Wo=Object.getOwnPropertyDescriptor,Bc=Object.getOwnPropertyDescriptors,Tp=Object.prototype,Jv=Array.prototype,ba=Object.getPrototypeOf,Ip=Object.isExtensible;function Xs(t){return typeof t=="function"}var gt=()=>{};function eg(t){return t()}function Zs(t){for(var e=0;e<t.length;e++)t[e]()}var Ko=Symbol("$state"),sl=Symbol("legacy props"),tg=Symbol(""),Hc=Symbol("proxy path"),Fc=1,al=3,ar=8;function Uc(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 ig(t,e){return t!==e}function dl(t){return!ll(t,this.v)}function og(){if(Ve){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 ng(t){if(Ve){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 rg(){if(Ve){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 sg(t){if(Ve){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 ag(){if(Ve){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 lg(){if(Ve){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 dg(){if(Ve){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 cg(t){if(Ve){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 ug(t){if(Ve){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 pg(t){if(Ve){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 fg(){if(Ve){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 mg(){if(Ve){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 vg(){if(Ve){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 ls=!1,ds=!1;function gg(){ls=!0}var jl=null;function Cs(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;ao(e,"stack",{value:r.join(`
|
|
25
|
+
`)}),ao(e,"name",{value:`${t}Error`})}return e}function Kr(t,e){return t.label=e,zc(t.v,e),t}function zc(t,e){var i;return(i=t==null?void 0:t[Hc])==null||i.call(t,e),t}function cl(t){if(Ve){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 Ht=null;function
|
|
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 Ht=null;function Xl(t){Ht=t}var lr=null;function Zl(t){lr=t}function ul(t){return kp("getContext").get(t)}function pl(t,e){return kp("setContext").set(t,e),e}function Jl(){return kp("getAllContexts")}function B(t,e=!1,i){var o=Ht={p:Ht,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};ls&&!e&&(Ht.l={s:null,u:null,r1:[],r2:Er(!1)}),Io(()=>{o.d=!0}),Ve&&(Ht.function=i,lr=i)}function H(t){var l,d;let e=Ht;if(e!==null){t!==void 0&&(e.x=t);let s=e.e;if(s!==null){var i=_t,o=Vt;e.e=null;try{for(var r=0;r<s.length;r++){var a=s[r];lo(a.effect),zi(a.reaction),Eo(a.fn)}}finally{lo(i),zi(o)}}Ht=e.p,Ve&&(lr=(d=(l=e.p)==null?void 0:l.function)!=null?d:null),e.m=!0}return t||{}}function cs(){return!ls||Ht!==null&&Ht.l===null}function kp(t){var e;return Ht===null&&cl(t),(e=Ht.c)!=null?e:Ht.c=new Map(l$(Ht)||void 0)}function l$(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var d$=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function ri(t){if(typeof t!="object"||t===null||Ko in t)return t;let e=ba(t);if(e!==Tp&&e!==Jv)return t;var i=new Map,o=sr(t),r=K(0),a=Ve&&ds?Cs("CreatedAt"):null,l=Vt,d=m=>{var p=Vt;zi(l);var v=m();return zi(p),v};o&&i.set("length",K(t.length,a));var s="";function u(m){s=m,Kr(r,`${s} version`);for(let[p,v]of i)Kr(v,$a(s,p))}return new Proxy(t,{defineProperty(m,p,v){(!("value"in v)||v.configurable===!1||v.enumerable===!1||v.writable===!1)&&fg();var _=i.get(p);return _===void 0?_=d(()=>{var y=K(v.value,a);return i.set(p,y),Ve&&typeof p=="string"&&Kr(y,$a(s,p)),y}):N(_,v.value,!0),!0},deleteProperty(m,p){var v=i.get(p);if(v===void 0){if(p in m){let $=d(()=>K(eo,a));i.set(p,$),Ap(r),Ve&&Kr($,$a(s,p))}}else{if(o&&typeof p=="string"){var _=i.get("length"),y=Number(p);Number.isInteger(y)&&y<_.v&&N(_,y)}N(v,eo),Ap(r)}return!0},get(m,p,v){var x;if(p===Ko)return t;if(Ve&&p===Hc)return u;var _=i.get(p),y=p in m;if(_===void 0&&(!y||(x=Wo(m,p))!=null&&x.writable)&&(_=d(()=>{var I=ri(y?m[p]:eo),T=K(I,a);return Ve&&Kr(T,$a(s,p)),T}),i.set(p,_)),_!==void 0){var $=n(_);return $===eo?void 0:$}return Reflect.get(m,p,v)},getOwnPropertyDescriptor(m,p){var v=Reflect.getOwnPropertyDescriptor(m,p);if(v&&"value"in v){var _=i.get(p);_&&(v.value=n(_))}else if(v===void 0){var y=i.get(p),$=y==null?void 0:y.v;if(y!==void 0&&$!==eo)return{enumerable:!0,configurable:!0,value:$,writable:!0}}return v},has(m,p){var $;if(p===Ko)return!0;var v=i.get(p),_=v!==void 0&&v.v!==eo||Reflect.has(m,p);if(v!==void 0||_t!==null&&(!_||($=Wo(m,p))!=null&&$.writable)){v===void 0&&(v=d(()=>{var x=_?ri(m[p]):eo,I=K(x,a);return Ve&&Kr(I,$a(s,p)),I}),i.set(p,v));var y=n(v);if(y===eo)return!1}return _},set(m,p,v,_){var E;var y=i.get(p),$=p in m;if(o&&p==="length")for(var x=v;x<y.v;x+=1){var I=i.get(x+"");I!==void 0?N(I,eo):x in m&&(I=d(()=>K(eo,a)),i.set(x+"",I),Ve&&Kr(I,$a(s,x)))}if(y===void 0)(!$||(E=Wo(m,p))!=null&&E.writable)&&(y=d(()=>K(void 0,a)),N(y,ri(v)),i.set(p,y),Ve&&Kr(y,$a(s,p)));else{$=y.v!==eo;var T=d(()=>ri(v));N(y,T)}var R=Reflect.getOwnPropertyDescriptor(m,p);if(R!=null&&R.set&&R.set.call(_,v),!$){if(o&&typeof p=="string"){var A=i.get("length"),P=Number(p);Number.isInteger(P)&&P>=A.v&&N(A,P+1)}Ap(r)}return!0},ownKeys(m){n(r);var p=Reflect.ownKeys(m).filter(y=>{var $=i.get(y);return $===void 0||$.v!==eo});for(var[v,_]of i)_.v!==eo&&!(v in m)&&p.push(v);return p},setPrototypeOf(){mg()}})}function $a(t,e){var i;return typeof e=="symbol"?`${t}[Symbol(${(i=e.description)!=null?i:""})]`:d$.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function Ap(t,e=1){N(t,t.v+e)}function fl(t){try{if(t!==null&&typeof t=="object"&&Ko in t)return t[Ko]}catch(e){}return t}function Lp(t,e){return Object.is(fl(t),fl(e))}function qr(t){var e=2050,i=Vt!==null&&(Vt.f&2)!==0?Vt:null;_t===null||i!==null&&(i.f&256)!==0?e|=256:_t.f|=1048576;let o={ctx:Ht,deps:null,effects:null,equals:Uc,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:i!=null?i:_t};return Ve&&ds&&(o.created=Cs("CreatedAt")),o}function f(t){let e=qr(t);return qc(e),e}function cr(t){let e=qr(t);return e.equals=dl,e}function Wc(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)Wi(e[i])}}var Mp=[];function c$(t){for(var e=t.parent;e!==null;){if((e.f&2)===0)return e;e=e.parent}return null}function Np(t){var e,i=_t;if(lo(c$(t)),Ve){let o=ya;Vp(new Set);try{Mp.includes(t)&&og(),Mp.push(t),Wc(t),e=Kc(t)}finally{lo(i),Vp(o),Mp.pop()}}else try{Wc(t),e=Kc(t)}finally{lo(i)}return e}function Dp(t){var e=Np(t);if(t.equals(e)||(t.v=e,t.wv=ed()),!Ts){var i=(Is||(t.f&256)!==0)&&t.deps!==null?4096:1024;$n(t,i)}}var ya=new Set,ml=new Map;function Vp(t){ya=t}function Er(t,e){var i={f:0,v:t,reactions:null,equals:Uc,rv:0,wv:0};return Ve&&ds&&(i.created=e!=null?e:Cs("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function K(t,e){let i=Er(t,e);return qc(i),i}function us(t,e=!1,i=!0){var r,a;let o=Er(t);return e||(o.equals=dl),ls&&i&&Ht!==null&&Ht.l!==null&&((a=(r=Ht.l).s)!=null?a:r.s=[]).push(o),o}function N(t,e,i=!1){var r;Vt!==null&&(!pr||(Vt.f&262144)!==0)&&cs()&&(Vt.f&262162)!==0&&!((r=Qo)!=null&&r[1].includes(t)&&Qo[0]===Vt)&&vg();let o=i?ri(e):e;return Ve&&zc(o,t.label),vl(t,o)}function vl(t,e){if(!t.equals(e)){var i=t.v;if(Ts?ml.set(t,e):ml.set(t,i),t.v=e,Ve&&ds&&(t.updated=Cs("UpdatedAt"),_t!==null&&(t.set_during_effect=!0)),(t.f&2)!==0&&((t.f&2048)!==0&&Np(t),$n(t,(t.f&256)===0?1024:4096)),t.wv=ed(),_g(t,2048),cs()&&_t!==null&&(_t.f&1024)!==0&&(_t.f&96)===0&&(ur===null?bg([t]):ur.push(t)),Ve&&ya.size>0){let o=Array.from(ya);for(let r of o)(r.f&1024)!==0&&$n(r,4096),wa(r)&&gl(r);ya.clear()}}return e}function _g(t,e){var i=t.reactions;if(i!==null)for(var o=cs(),r=i.length,a=0;a<r;a++){var l=i[a],d=l.f;if((d&2048)===0&&!(!o&&l===_t)){if(Ve&&(d&262144)!==0){ya.add(l);continue}$n(l,e),(d&1280)!==0&&((d&2)!==0?_g(l,4096):id(l))}}}var hl="font-weight: bold",_l="font-weight: normal";function $g(t,e,i){Ve?console.warn(`%c[svelte] hydration_attribute_changed
|
|
28
28
|
%cThe \`${t}\` attribute on \`${e}\` changed its value between server and client renders. The client value, \`${i}\`, will be ignored in favour of the server value
|
|
29
|
-
https://svelte.dev/e/hydration_attribute_changed`,
|
|
29
|
+
https://svelte.dev/e/hydration_attribute_changed`,hl,_l):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function yg(t){Ve?console.warn(`%c[svelte] hydration_html_changed
|
|
30
30
|
%c${t?`The value of an \`{@html ...}\` block ${t} changed between server and client renders. The client value will be ignored in favour of the server value`:"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
|
|
31
|
-
https://svelte.dev/e/hydration_html_changed`,
|
|
31
|
+
https://svelte.dev/e/hydration_html_changed`,hl,_l):console.warn("https://svelte.dev/e/hydration_html_changed")}function Js(t){Ve?console.warn(`%c[svelte] hydration_mismatch
|
|
32
32
|
%c${t?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${t}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
|
|
33
|
-
https://svelte.dev/e/hydration_mismatch`,
|
|
33
|
+
https://svelte.dev/e/hydration_mismatch`,hl,_l):console.warn("https://svelte.dev/e/hydration_mismatch")}function xg(){Ve?console.warn(`%c[svelte] lifecycle_double_unmount
|
|
34
34
|
%cTried to unmount a component that was not mounted
|
|
35
|
-
https://svelte.dev/e/lifecycle_double_unmount`,
|
|
35
|
+
https://svelte.dev/e/lifecycle_double_unmount`,hl,_l):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function wg(){Ve?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 Qc(t){Ve?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`,
|
|
37
|
+
https://svelte.dev/e/state_proxy_equality_mismatch`,hl,_l):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var it=!1;function co(t){it=t}var bt;function yi(t){if(t===null)throw Js(),as;return bt=t}function Ki(){return yi(Go(bt))}function S(t){if(it){if(Go(bt)!==null)throw Js(),as;bt=t}}function Jt(t=1){if(it){for(var e=t,i=bt;e--;)i=Go(i);bt=i}}function Sa(){for(var t=0,e=bt;;){if(e.nodeType===ar){var i=e.data;if(i===_a){if(t===0)return e;t-=1}else(i===Ys||i===js)&&(t+=1)}var o=Go(e);e.remove(),e=o}}function Gc(t){if(!t||t.nodeType!==ar)throw Js(),as;return t.data}function Sg(){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){Qc("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){Qc("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){Qc("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{t.indexOf=i,t.lastIndexOf=o,t.includes=r}}var Ca,Cg,od,Tg,Ig;function Yc(){if(Ca===void 0){Ca=window,Cg=document,od=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;Tg=Wo(e,"firstChild").get,Ig=Wo(e,"nextSibling").get,Ip(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Ip(i)&&(i.__t=void 0),Ve&&(t.__svelte_meta=null,Sg())}}function yn(t=""){return document.createTextNode(t)}function wi(t){return Tg.call(t)}function Go(t){return Ig.call(t)}function C(t,e){if(!it)return wi(t);var i=wi(bt);if(i===null)i=bt.appendChild(yn());else if(e&&i.nodeType!==al){var o=yn();return i==null||i.before(o),yi(o),o}return yi(i),i}function le(t,e){var r,a;if(!it){var i=wi(t);return i.nodeType===8&&i.data===""?Go(i):i}if(e&&((r=bt)==null?void 0:r.nodeType)!==al){var o=yn();return(a=bt)==null||a.before(o),yi(o),o}return bt}function k(t,e=1,i=!1){let o=it?bt:t;for(var r;e--;)r=o,o=Go(o);if(!it)return o;if(i&&(o==null?void 0:o.nodeType)!==al){var a=yn();return o===null?r==null||r.after(a):o.before(a),yi(a),a}return yi(o),o}function nd(t){t.textContent=""}function Hp(t){_t===null&&Vt===null&&sg(t),Vt!==null&&(Vt.f&256)!==0&&_t===null&&rg(),Ts&&ng(t)}function u$(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=_t;if(Ve)for(;r!==null&&(r.f&262144)!==0;)r=r.parent;var a={ctx:Ht,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(Ve&&(a.component_function=lr),i)try{gl(a),a.f|=32768}catch(u){throw Wi(a),u}else e!==null&&id(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&&u$(a,r),Vt!==null&&(Vt.f&2)!==0)){var d=Vt;((s=d.effects)!=null?s:d.effects=[]).push(a)}return a}function Io(t){let e=Ta(8,null,!1);return $n(e,1024),e.teardown=t,e}function He(t){var r;Hp("$effect");var e=_t!==null&&(_t.f&32)!==0&&Ht!==null&&!Ht.m;if(Ve&&ao(t,"name",{value:"$effect"}),e){var i=Ht;((r=i.e)!=null?r:i.e=[]).push({fn:t,effect:_t,reaction:Vt})}else{var o=Eo(t);return o}}function ad(t){return Hp("$effect.pre"),Ve&&ao(t,"name",{value:"$effect.pre"}),Yo(t)}function Zc(t){let e=Ta(64,t,!0);return()=>{Wi(e)}}function Pg(t){let e=Ta(64,t,!0);return(i={})=>new Promise(o=>{i.outro?Wn(e,()=>{Wi(e),o(void 0)}):(Wi(e),o(void 0))})}function Eo(t){return Ta(4,t,!1)}function Yo(t){return Ta(8,t,!0)}function O(t,e=[],i=qr){if(Ve)return Yo(()=>{var r=_t,a=()=>t(...l.map(n));ao(r.fn,"name",{value:"{expression}"}),ao(a,"name",{value:"{expression}"});let l=e.map(i);qi(a)});let o=e.map(i);return qi(()=>t(...o.map(n)))}function qi(t,e=0){return Ta(24|e,t,!0)}function Ri(t,e=!0){return Ta(40,t,!0,e)}function Fp(t){var e=t.teardown;if(e!==null){let i=Ts,o=Vt;Op(!0),zi(null);try{e.call(null)}finally{Op(i),zi(o)}}}function Up(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:Wi(i,e),i=o}}function kg(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&32)===0&&Wi(e),e=i}}function Wi(t,e=!0){var i=!1;(e||(t.f&524288)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(zp(t.nodes_start,t.nodes_end),i=!0),Up(t,e&&!i),ld(t,0),$n(t,16384);var o=t.transitions;if(o!==null)for(let a of o)a.stop();Fp(t);var r=t.parent;r!==null&&r.first!==null&&Wp(t),Ve&&(t.component_function=null),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function zp(t,e){for(;t!==null;){var i=t===e?null:Go(t);t.remove(),t=i}}function Wp(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=[];Jc(t,i,!0),Kp(i,()=>{Wi(t),e&&e()})}function Kp(t,e){var i=t.length;if(i>0){var o=()=>--i||e();for(var r of t)r.out(o)}else e()}function Jc(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;Jc(o,e,a?i:!1),o=r}}}function Ps(t){Ag(t,!0)}function Ag(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;Ag(i,r?e:!1),i=o}if(t.transitions!==null)for(let a of t.transitions)(a.is_global||e)&&a.in()}}var dd=[],qp=[];function Lg(){var t=dd;dd=[],Zs(t)}function p$(){var t=qp;qp=[],Zs(t)}function xn(t){dd.length===0&&queueMicrotask(Lg),dd.push(t)}function Mg(){dd.length>0&&Lg(),qp.length>0&&p$()}function Rg(t){var e=_t;if(Ve&&t instanceof Error&&f$(t,e),(e.f&32768)===0){if((e.f&128)===0)throw t;e.fn(t)}else cd(t,e)}function cd(t,e){for(;e!==null;){if((e.f&128)!==0)try{e.fn(t);return}catch(i){}e=e.parent}throw t}var Vg=new WeakSet;function f$(t,e){var l,d;if(Vg.has(t))return;Vg.add(t);let i=Wo(t,"message");if(!(i&&!i.configurable)){for(var o=od?" ":" ",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[Hn].split("/").pop()}`,a=a.p;ao(t,"message",{value:t.message+`
|
|
40
40
|
${r}
|
|
41
|
-
`}),t.stack&&
|
|
41
|
+
`}),t.stack&&ao(t,"stack",{value:t.stack.split(`
|
|
42
42
|
`).filter(s=>!s.includes("svelte/src/internal")).join(`
|
|
43
|
-
`)})}}var Pa=!1,yl=null,ka=!1,Is=!1;function Hp(t){Is=t}var md=[],vd=[],Nt=null,cr=!1;function Wi(t){Nt=t}var gt=null;function ao(t){gt=t}var Ko=null;function Gc(t){Nt!==null&&Nt.f&2097152&&(Ko===null?Ko=[Nt,[t]]:Ko[1].push(t))}var En=null,ur=0,dr=null;function $g(t){dr=t}var Bg=1,ou=0,Es=!1,nu=null;function od(){return++Bg}function Ca(t){var p,v;var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){var i=t.deps,o=(e&256)!==0;if(i!==null){var r,a,l=(e&512)!==0,d=o&>!==null&&!Es,s=i.length;if(l||d){var u=t,m=u.parent;for(r=0;r<s;r++)a=i[r],(l||!((p=a==null?void 0:a.reactions)!=null&&p.includes(u)))&&((v=a.reactions)!=null?v:a.reactions=[]).push(u);l&&(u.f^=512),d&&m!==null&&(m.f&256)===0&&(u.f^=256)}for(r=0;r<s;r++)if(a=i[r],Ca(a)&&Bp(a),a.wv>t.wv)return!0}(!o||gt!==null&&!Es)&&Cn(t,1024)}return!1}function Hg(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];Ko!=null&&Ko[1].includes(t)&&Ko[0]===Nt||((a.f&2)!==0?Hg(a,e,!1):e===a&&(i?Cn(a,2048):(a.f&1024)!==0&&Cn(a,4096),rd(a)))}}function Qc(t){var _,y;var e=En,i=ur,o=dr,r=Nt,a=Es,l=Ko,d=Ht,s=cr,u=t.f;En=null,ur=0,dr=null,Es=(u&256)!==0&&(cr||!ka||Nt===null),Nt=(u&96)===0?t:null,Ko=null,ed(t.ctx),cr=!1,ou++,t.f|=2097152;try{var m=(0,t.fn)(),p=t.deps;if(En!==null){var v;if(ud(t,ur),p!==null&&ur>0)for(p.length=ur+En.length,v=0;v<En.length;v++)p[ur+v]=En[v];else t.deps=p=En;if(!Es||(u&2)!==0&&t.reactions!==null)for(v=ur;v<p.length;v++)((y=(_=p[v]).reactions)!=null?y:_.reactions=[]).push(t)}else p!==null&&ur<p.length&&(ud(t,ur),p.length=ur);if(cs()&&dr!==null&&!cr&&p!==null&&(t.f&6146)===0)for(v=0;v<dr.length;v++)Hg(dr[v],t);return r!==null&&r!==t&&(ou++,dr!==null&&(o===null?o=dr:o.push(...dr))),m}catch($){Ng($)}finally{En=e,ur=i,dr=o,Nt=r,Es=a,Ko=l,ed(d),cr=s,t.f^=2097152}}function f$(t,e){let i=e.reactions;if(i!==null){var o=Jv.call(i,t);if(o!==-1){var r=i.length-1;r===0?i=e.reactions=null:(i[o]=i[r],i.pop())}}i===null&&(e.f&2)!==0&&(En===null||!En.includes(e))&&(Cn(e,4096),(e.f&768)===0&&(e.f^=512),qc(e),ud(e,0))}function ud(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)f$(t,i[o])}function _l(t){var e=t.f;if((e&16384)===0){Cn(t,1024);var i=gt,o=ka;if(gt=t,ka=!0,ke){var r=ar;td(t.component_function)}try{(e&16)!==0?Ag(t):Wp(t),zp(t);var a=Qc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Bg,ke&&ds&&(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);ke&&vd.push(t)}finally{ka=o,gt=i,ke&&td(r)}}}function Dg(){console.error("Last ten effects were: ",vd.slice(-10).map(t=>t.fn)),vd=[]}function m$(){try{lg()}catch(t){if(ke&&so(t,"stack",{value:""}),yl!==null)if(ke)try{fd(t,yl)}catch(e){throw Dg(),e}else fd(t,yl);else throw ke&&Dg(),t}}function jp(){var t=ka;try{var e=0;for(ka=!0;md.length>0;){e++>1e3&&m$();var i=md,o=i.length;md=[];for(var r=0;r<o;r++){var a=g$(i[r]);v$(a)}gl.clear()}}finally{Pa=!1,ka=t,yl=null,ke&&(vd=[])}}function v$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&Ca(o)&&(_l(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?qp(o):o.fn=null))}}function rd(t){Pa||(Pa=!0,queueMicrotask(jp));for(var e=yl=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 g$(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:Ca(i)&&_l(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 xl(t){var e;for(t&&(Pa=!0,jp(),Pa=!0,e=t());;){if(Vg(),md.length===0)return Pa=!1,yl=null,ke&&(vd=[]),e;Pa=!0,jp()}}async function co(){await Promise.resolve(),xl()}function n(t){var e=t.f,i=(e&2)!==0;if(nu!==null&&nu.add(t),Nt!==null&&!cr){if(!(Ko!=null&&Ko[1].includes(t))||Ko[0]!==Nt){var o=Nt.deps;t.rv<ou&&(t.rv=ou,En===null&&o!==null&&o[ur]===t?ur++:En===null?En=[t]:(!Es||!En.includes(t))&&En.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,Ca(r)&&Bp(r)),ke&&ds&&!cr&&Jl!==null&&Nt!==null&&Jl.reaction===Nt)if(t.trace)t.trace();else{var l=Ts("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 Is&&gl.has(t)?gl.get(t):t.v}function Tt(t){var e=cr;try{return cr=!0,t()}finally{cr=e}}var h$=-7169;function Cn(t,e){t.f=t.f&h$|e}function su(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(zo in t)ru(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&zo in i&&ru(i)}}}function ru(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let o in t)try{ru(t[o],e)}catch(r){}let i=ya(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 Xp(t,e){if(e){let i=document.body;t.autofocus=!0,In(()=>{document.activeElement===i&&t.focus()})}}function gd(t){var e=Nt,i=gt;Wi(null),ao(null);try{return t()}finally{Wi(e),ao(i)}}var Zp=new Set,au=new Set;function Aa(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 Jp(t,e,i,o={}){function r(a){if(o.capture||wl.call(e,a),!a.cancelBubble)return gd(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?In(()=>{e.addEventListener(t,r,o)}):e.addEventListener(t,r,o),r}function lt(t,e,i,o,r){var a={capture:o,passive:r},l=Jp(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Eo(()=>{e.removeEventListener(t,l,a)})}function Qe(t){for(var e=0;e<t.length;e++)Zp.add(t[e]);for(var i of au)i(t)}function wl(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){so(t,"currentTarget",{configurable:!0,get(){return a||i}});var m=Nt,p=gt;Wi(null),ao(null);try{for(var v,_=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var $=a["__"+o];if($!=null&&(!a.disabled||t.target===a))if(rr($)){var[x,...I]=$;x.apply(a,[t,...I])}else $.call(a,t)}catch(R){v?_.push(R):v=R}if(t.cancelBubble||y===e||y===null)break;a=y}if(v){for(let R of _)queueMicrotask(()=>{throw R});throw v}}finally{t.__root=e,delete t.currentTarget,Wi(m),ao(p)}}}var b$;function Fg(){b$=void 0}function Sl(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function ko(t,e){var i=gt;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function L(t,e){var i=(e&1)!==0,o=(e&2)!==0,r,a=!t.startsWith("<!>");return()=>{if(Je)return ko(ht,null),ht;r===void 0&&(r=Sl(a?t:"<!>"+t),i||(r=xi(r)));var l=o||sd?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=xi(l),s=l.lastChild;ko(d,s)}else ko(l,l);return l}}function x$(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(Je)return ko(ht,null),ht;if(!l){var d=Sl(a),s=xi(d);if(r)for(l=document.createDocumentFragment();xi(s);)l.appendChild(xi(s));else l=xi(s)}var u=l.cloneNode(!0);if(r){var m=xi(u),p=u.lastChild;ko(m,p)}else ko(u,u);return u}}function Ie(t,e){return x$(t,e,"svg")}function ps(t=""){if(!Je){var e=Tn(t+"");return ko(e,e),e}var i=ht;return i.nodeType!==dl&&(i.before(i=Tn()),$i(i)),ko(i,i),i}function Le(){if(Je)return ko(ht,null),ht;var t=document.createDocumentFragment(),e=document.createComment(""),i=Tn();return t.append(e,i),ko(e,i),t}function b(t,e){if(Je){gt.nodes_end=ht,qi();return}t!==null&&t.before(e)}var w$=/\r/g;function zg(t){t=t.replace(w$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function Wg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var S$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Kg(t){return S$.includes(t)}var C$=["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 T$={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function qg(t){var e;return t=t.toLowerCase(),(e=T$[t])!=null?e:t}var S3=[...C$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var I$=["touchstart","touchmove"];function Qg(t){return I$.includes(t)}var E$=["$state","$state.raw","$derived","$derived.by"],C3=[...E$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var P$=["textarea","script","style","title"];function Gg(t){return P$.includes(t)}function lu(t){return t==null?void 0:t.replace(/\//g,"/")}var hd=!0;function du(t){hd=t}function ve(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 Zr(t,e){return Yg(t,e)}function tf(t,e){var l;Xc(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=Je,r=ht;try{for(var a=xi(i);a&&(a.nodeType!==sr||a.data!==Ys);)a=qo(a);if(!a)throw as;lo(!0),$i(a),qi();let d=Yg(t,{...e,anchor:a});if(ht===null||ht.nodeType!==sr||ht.data!==$a)throw Js(),as;return lo(!1),d}catch(d){if(d===as)return e.recover===!1&&dg(),Xc(),ad(i),lo(!1),Zr(t,e);throw d}finally{lo(o),$i(r),Fg()}}var Cl=new Map;function Yg(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){Xc();var d=new Set,s=p=>{for(var v=0;v<p.length;v++){var _=p[v];if(!d.has(_)){d.add(_);var y=Qg(_);e.addEventListener(_,wl,{passive:y});var $=Cl.get(_);$===void 0?(document.addEventListener(_,wl,{passive:y}),Cl.set(_,1)):Cl.set(_,$+1)}}};s(Zl(Zp)),au.add(s);var u=void 0,m=kg(()=>{var p=i!=null?i:e.appendChild(Tn());return Li(()=>{if(a){B({});var v=Ht;v.c=a}r&&(o.$$events=r),Je&&ko(p,null),hd=l,u=t(p,o)||{},hd=!0,Je&&(gt.nodes_end=ht),a&&H()}),()=>{var y;for(var v of d){e.removeEventListener(v,wl);var _=Cl.get(v);--_===0?(document.removeEventListener(v,wl),Cl.delete(v)):Cl.set(v,_)}au.delete(s),p!==i&&((y=p.parentNode)==null||y.removeChild(p))}});return ef.set(u,m),u}var ef=new WeakMap;function La(t,e){let i=ef.get(t);return i?(ef.delete(t),i(e)):(ke&&wg(),Promise.resolve())}function ei(t,e,...i){var o=t,r=mt,a;Qi(()=>{r!==(r=e())&&(a&&(Ki(a),a=null),ke&&r==null&&cg(),a=Li(()=>r(o,...i)))},65536),Je&&(o=ht)}if(ke){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;fg(e)},set:o=>{i=o}})}};M$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var M$;function Mt(t){Ht===null&&pl("onMount"),ls&&Ht.l!==null?L$(Ht).m.push(t):De(()=>{let e=Tt(t);if(typeof e=="function")return e})}function sn(t){Ht===null&&pl("onDestroy"),Mt(()=>()=>Tt(t))}function L$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var jg=new Map;function Xg(t,e){var i=jg.get(t);i||(i=new Set,jg.set(t,i)),i.add(e)}function V(t,e,[i,o]=[0,0]){Je&&i===0&&qi();var r=t,a=null,l=null,d=Zi,s=i>0?65536:0,u=!1;let m=(v,_=!0)=>{u=!0,p(_,v)},p=(v,_)=>{if(d===(d=v))return;let y=!1;if(Je&&o!==-1){if(i===0){let x=jc(r);x===Ys?o=0:x===js?o=1/0:(o=parseInt(x.substring(1)),o!==o&&(o=d?1/0:-1))}let $=o>i;!!d===$&&(r=Ta(),$i(r),lo(!1),y=!0,o=-1)}d?(a?ks(a):_&&(a=Li(()=>_(r))),l&&Qn(l,()=>{l=null})):(l?ks(l):_&&(l=Li(()=>_(r,[i+1,o]))),a&&Qn(a,()=>{a=null})),y&&lo(!0)};Qi(()=>{u=!1,e(m),u||p(null,null)},s),Je&&(r=ht)}function As(t,e,i){Je&&qi();var o=t,r=Zi,a,l=cs()?og:cl;Qi(()=>{l(r,r=e())&&(a&&Qn(a),a=Li(()=>i(o)))}),Je&&(o=ht)}var ta=null;function rf(t){ta=t}function _d(t,e){return e}function N$(t,e,i,o){for(var r=[],a=e.length,l=0;l<a;l++)tu(e[l].e,r,!0);var d=a>0&&r.length===0&&i!==null;if(d){var s=i.parentNode;ad(s),s.append(i),o.clear(),ea(t,e[0].prev,e[a-1].next)}Qp(r,()=>{for(var u=0;u<a;u++){var m=e[u];d||(o.delete(m.k),ea(t,m.prev,m.next)),Ki(m.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?$i(xi(u)):u.appendChild(Tn())}Je&&qi();var m=null,p=!1,v=Sn(()=>{var _=i();return rr(_)?_:_==null?[]:Zl(_)});Qi(()=>{var _=n(v),y=_.length;if(p&&y===0)return;p=y===0;let $=!1;if(Je){var x=jc(l)===js;x!==(y===0)&&(l=Ta(),$i(l),lo(!1),$=!0)}if(Je){for(var I=null,T,R=0;R<y;R++){if(ht.nodeType===sr&&ht.data===$a){l=ht,$=!0,lo(!1);break}var A=_[R],P=o(A,R);T=eh(ht,d,I,null,A,P,R,r,e,i),d.items.set(P,T),I=T}y>0&&$i(Ta())}Je||D$(_,d,l,r,e,o,i),a!==null&&(y===0?m?ks(m):m=Li(()=>a(l)):m!==null&&Qn(m,()=>{m=null})),$&&lo(!0),n(v)}),Je&&(l=ht)}function D$(t,e,i,o,r,a,l){var J,we,me,ee;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,m=e.items,p=e.first,v=p,_,y=null,$,x=[],I=[],T,R,A,P;if(d)for(P=0;P<u;P+=1)T=t[P],R=a(T,P),A=m.get(R),A!==void 0&&((J=A.a)==null||J.measure(),($!=null?$:$=new Set).add(A));for(P=0;P<u;P+=1){if(T=t[P],R=a(T,P),A=m.get(R),A===void 0){var E=v?v.e.nodes_start:i;y=eh(E,e,y,y===null?e.first:y.next,T,R,P,o,r,l),m.set(R,y),x=[],I=[],v=y.next;continue}if(s&&O$(A,T,P,r),(A.e.f&8192)!==0&&(ks(A.e),d&&((we=A.a)==null||we.unfix(),($!=null?$:$=new Set).delete(A))),A!==v){if(_!==void 0&&_.has(A)){if(x.length<I.length){var z=I[0],F;y=z.prev;var U=x[0],X=x[x.length-1];for(F=0;F<x.length;F+=1)Zg(x[F],z,i);for(F=0;F<I.length;F+=1)_.delete(I[F]);ea(e,U.prev,X.next),ea(e,y,U),ea(e,X,z),v=z,y=X,P-=1,x=[],I=[]}else _.delete(A),Zg(A,v,i),ea(e,A.prev,A.next),ea(e,A,y===null?e.first:y.next),ea(e,y,A),y=A;continue}for(x=[],I=[];v!==null&&v.k!==R;)(v.e.f&8192)===0&&(_!=null?_:_=new Set).add(v),I.push(v),v=v.next;if(v===null)continue;A=v}x.push(A),y=A,v=A.next}if(v!==null||_!==void 0){for(var ae=_===void 0?[]:Zl(_);v!==null;)(v.e.f&8192)===0&&ae.push(v),v=v.next;var Z=ae.length;if(Z>0){var re=(r&4)!==0&&u===0?i:null;if(d){for(P=0;P<Z;P+=1)(me=ae[P].a)==null||me.measure();for(P=0;P<Z;P+=1)(ee=ae[P].a)==null||ee.fix()}N$(e,ae,re,m)}}d&&In(()=>{var _e;if($!==void 0)for(A of $)(_e=A.a)==null||_e.apply()}),gt.first=e.first&&e.first.e,gt.last=y&&y.e}function O$(t,e,i,o){(o&1)!==0&&hl(t.v,e),(o&2)!==0?hl(t.i,i):t.i=i}function eh(t,e,i,o,r,a,l,d,s,u){var m=ta,p=(s&1)!==0,v=(s&16)===0,_=p?v?us(r,!1,!1):Pr(r):r,y=(s&2)===0?l:Pr(l);ke&&p&&(_.trace=()=>{var x=typeof y=="number"?l:y.v;u()[x]});var $={i:y,v:_,k:a,a:null,e:null,prev:i,next:o};ta=$;try{return $.e=Li(()=>d(t,_,y,u),Je),$.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{ta=m}}function Zg(t,e,i){for(var o=t.next?t.next.e.nodes_start:i,r=e?e.e.nodes_start:i,a=t.e.nodes_start;a!==o;){var l=qo(a);r.before(a),a=l}}function ea(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 B$(t,e,i){var a,l;if(!e||e===zg(String(i!=null?i:"")))return;let o,r=(a=t.__svelte_meta)==null?void 0:a.loc;r?o=`near ${r.file}:${r.line}:${r.column}`:(l=ar)!=null&&l[zn]&&(o=`in ${ar[zn]}`),xg(lu(o))}function bd(t,e,i=!1,o=!1,r=!1){var a=t,l="";O(()=>{var _;var d=gt;if(l===(l=(_=e())!=null?_:"")){Je&&qi();return}if(d.nodes_start!==null&&(Kp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(Je){for(var s=ht.data,u=qi(),m=u;u!==null&&(u.nodeType!==sr||u.data!=="");)m=u,u=qo(u);if(u===null)throw Js(),as;ke&&!r&&B$(u.parentNode,s,l),ko(ht,m),a=$i(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var v=Sl(p);if((i||o)&&(v=xi(v)),ko(xi(v),v.lastChild),i||o)for(;xi(v);)a.before(xi(v));else a.before(v)}})}function Mi(t,e,i){Je&&qi();var o=t,r,a;Qi(()=>{r!==(r=e())&&(a&&(Qn(a),a=null),r&&(a=Li(()=>i(o,r))))},65536),Je&&(o=ht)}function Ma(t,e,i,o,r,a){var y;let l=Je;Je&&qi();var d=ke&&a&&((y=Ht)==null?void 0:y.function[zn]),s,u,m=null;Je&&ht.nodeType===zc&&(m=ht,qi());var p=Je?ht:t,v,_=ta;Qi(()=>{let $=e()||null;var x=r?r():i||$==="svg"?Bc:null;if($!==s){var I=ta;rf(_),v&&($===null?Qn(v,()=>{v=null,u=null}):$===u?ks(v):(Ki(v),du(!1))),$&&$!==u&&(v=Li(()=>{if(m=Je?m:x?document.createElementNS(x,$):document.createElement($),ke&&a&&(m.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),ko(m,m),o){Je&&Gg($)&&m.append(document.createComment(""));var T=Je?xi(m):m.appendChild(Tn());Je&&(T===null?lo(!1):$i(T)),o(m,T)}gt.nodes_end=m,p.before(m)})),s=$,s&&(u=s),du(!0),rf(I)}},65536),l&&(lo(!0),$i(p))}var af;function th(t){return af=t.target,new sf(t)}var Ls,kr,sf=class{constructor(e){Gs(this,Ls);Gs(this,kr);var a,l;var i=new Map,o=(d,s)=>{var u=us(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===ll?!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 N((m=i.get(s))!=null?m:o(s,u),u),Reflect.set(d,s,u)}});al(this,kr,(e.hydrate?tf:Zr)(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)&&xl(),al(this,Ls,r.$$events);for(let d of Object.keys(Ai(this,kr)))d==="$set"||d==="$destroy"||d==="$on"||so(this,d,{get(){return Ai(this,kr)[d]},set(s){Ai(this,kr)[d]=s},enumerable:!0});Ai(this,kr).$set=d=>{Object.assign(r,d)},Ai(this,kr).$destroy=()=>{La(Ai(this,kr))}}$set(e){Ai(this,kr).$set(e)}$on(e,i){Ai(this,Ls)[e]=Ai(this,Ls)[e]||[];let o=(...r)=>i.call(this,...r);return Ai(this,Ls)[e].push(o),()=>{Ai(this,Ls)[e]=Ai(this,Ls)[e].filter(r=>r!==o)}}$destroy(){Ai(this,kr).$destroy()}};Ls=new WeakMap,kr=new WeakMap;function Q(t,e){In(()=>{var r,a,l;var i=t.getRootNode(),o=i.host?i:(l=(r=i.head)!=null?r:i.ownerDocument.head)!=null?l:(a=af)==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),ke&&Xg(e.hash,d)}})}function Ms(t,e){var i=void 0,o;Qi(()=>{i!==(i=e())&&(o&&(Ki(o),o=null),i&&(o=Li(()=>{Po(()=>i(t))})))})}function ih(t){var e,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(i=ih(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function oh(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=ih(t))&&(o&&(o+=" "),o+=e);return o}function $d(t){return typeof t=="object"?oh(t):t!=null?t:""}var nh=[...`
|
|
44
|
-
\r\f \v\uFEFF`];function sh(t,e,i){var o=t==null?"":""+t;if(e&&(o=o?o+" "+e:e),i){for(var r in i)if(i[r])o=o?o+" "+r:r;else if(o.length)for(var a=r.length,l=0;(l=o.indexOf(r,l))>=0;){var d=l+a;(l===0||nh.includes(o[l-1]))&&(d===o.length||nh.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function rh(t,e=!1){var i=e?" !important;":";",o="";for(var r in t){var a=t[r];a!=null&&a!==""&&(o+=" "+r+": "+a+i)}return o}function lf(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function ah(t,e){if(e){var i="",o,r;if(Array.isArray(e)?(o=e[0],r=e[1]):o=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,l=0,d=!1,s=[];o&&s.push(...Object.keys(o).map(lf)),r&&s.push(...Object.keys(r).map(lf));var u=0,m=-1;let $=t.length;for(var p=0;p<$;p++){var v=t[p];if(d?v==="/"&&t[p-1]==="*"&&(d=!1):a?a===v&&(a=!1):v==="/"&&t[p+1]==="*"?d=!0:v==='"'||v==="'"?a=v:v==="("?l++:v===")"&&l--,!d&&a===!1&&l===0){if(v===":"&&m===-1)m=p;else if(v===";"||p===$-1){if(m!==-1){var _=lf(t.substring(u,m).trim());if(!s.includes(_)){v!==";"&&p++;var y=t.substring(u,p).trim();i+=" "+y+";"}}u=p+1,m=-1}}}}return o&&(i+=rh(o)),r&&(i+=rh(r,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function oe(t,e,i,o,r,a){var l=t.__className;if(Je||l!==i||l===void 0){var d=sh(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 df(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 We(t,e,i,o){var r=t.__style;if(Je||r!==e){var a=ah(e,o);(!Je||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(df(t,i==null?void 0:i[0],o[0]),df(t,i==null?void 0:i[1],o[1],"important")):df(t,i,o));return o}function yd(t,e,i){if(t.multiple){if(e==null)return;if(!rr(e))return Sg();for(var o of t.options)o.selected=e.includes(lh(o));return}for(o of t.options){var r=lh(o);if(Vp(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function cf(t){var e=new MutationObserver(()=>{yd(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Eo(()=>{e.disconnect()})}function lh(t){return"__value"in t?t.__value:t.value}var Tl=Symbol("class"),Il=Symbol("style"),uh=Symbol("is custom element"),ph=Symbol("is html");function fh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Ve(t,e,i,o){var r=vh(t);if(Je&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||Q$(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[ig]=i),i==null?t.removeAttribute(e):typeof i!="string"&&gh(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function mh(t,e,i,o,r=!1){var A;var a=vh(t),l=a[uh],d=!a[ph];let s=Je&&l;s&&lo(!1);var u=e||{},m=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=$d(i.class):(o||i[Tl])&&(i.class=null),i[Il]&&((A=i.style)!=null||(i.style=null));var v=gh(t);for(let P in i){let E=i[P];if(m&&P==="value"&&E==null){t.value=t.__value="",u[P]=E;continue}if(P==="class"){var _=t.namespaceURI==="http://www.w3.org/1999/xhtml";oe(t,_,E,o,e==null?void 0:e[Tl],i[Tl]),u[P]=E,u[Tl]=i[Tl];continue}if(P==="style"){We(t,E,e==null?void 0:e[Il],i[Il]),u[P]=E,u[Il]=i[Il];continue}var y=u[P];if(!(E===y&&!(E===void 0&&t.hasAttribute(P)))){u[P]=E;var $=P[0]+P[1];if($!=="$$")if($==="on"){let z={},F="$$"+P,U=P.slice(2);var x=Kg(U);if(Wg(U)&&(U=U.slice(0,-7),z.capture=!0),!x&&y){if(E!=null)continue;t.removeEventListener(U,u[F],z),u[F]=null}if(E!=null)if(x)t[`__${U}`]=E,Qe([U]);else{let X=function(ae){u[P].call(this,ae)};var R=X;u[F]=Jp(U,t,X,z)}else x&&(t[`__${U}`]=void 0)}else if(P==="style")Ve(t,P,E);else if(P==="autofocus")Xp(t,!!E);else if(!l&&(P==="__value"||P==="value"&&E!=null))t.value=t.__value=E;else if(P==="selected"&&m)fh(t,E);else{var I=P;d||(I=qg(I));var T=I==="defaultValue"||I==="defaultChecked";if(E==null&&!l&&!T)if(a[P]=null,I==="value"||I==="checked"){let z=t,F=e===void 0;if(I==="value"){let U=z.defaultValue;z.removeAttribute(I),z.defaultValue=U,z.value=z.__value=F?U:null}else{let U=z.defaultChecked;z.removeAttribute(I),z.defaultChecked=U,z.checked=F?U:!1}}else t.removeAttribute(P);else T||v.includes(I)&&(l||typeof E!="string")?t[I]=E:typeof E!="function"&&Ve(t,I,E,r)}}}return s&&lo(!0),u}function Ji(t,e,i=[],o,r=!1,a=Yr){let l=i.map(a);var d=void 0,s={},u=t.nodeName==="SELECT",m=!1;if(Qi(()=>{var v=e(...l.map(n)),_=mh(t,d,v,o,r);m&&u&&"value"in v&&yd(t,v.value,!1);for(let $ of Object.getOwnPropertySymbols(s))v[$]||Ki(s[$]);for(let $ of Object.getOwnPropertySymbols(v)){var y=v[$];$.description===Tp&&(!d||y!==d[$])&&(s[$]&&Ki(s[$]),s[$]=Li(()=>Ms(t,()=>y))),_[$]=y}d=_}),u){var p=t;Po(()=>{yd(p,d.value),cf(p)})}m=!0}function vh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[uh]:t.nodeName.includes("-"),[ph]:t.namespaceURI===Yv}}var dh=new Map;function gh(t){var e=dh.get(t.nodeName);if(e)return e;dh.set(t.nodeName,e=[]);for(var i,o=t,r=Element.prototype;r!==o;){i=Fc(o);for(var a in i)i[a].set&&e.push(a);o=ya(o)}return e}function Q$(t,e,i){var o;ke&&(e==="srcset"&&G$(t,i)||uf((o=t.getAttribute(e))!=null?o:"",i)||yg(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function uf(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function ch(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function G$(t,e){var i=ch(t.srcset),o=ch(e);return o.length===i.length&&o.every(([r,a],l)=>a===i[l][1]&&(uf(i[l][0],r)||uf(r,i[l][0])))}var Y$=Hc?()=>performance.now():()=>Date.now(),Jr={tick:t=>(Hc?requestAnimationFrame:mt)(t),now:()=>Y$(),tasks:new Set};function hh(){let t=Jr.now();Jr.tasks.forEach(e=>{e.c(t)||(Jr.tasks.delete(e),e.f())}),Jr.tasks.size!==0&&Jr.tick(hh)}function _h(t){let e;return Jr.tasks.size===0&&Jr.tick(hh),{promise:new Promise(i=>{Jr.tasks.add(e={c:t,f:i})}),abort(){Jr.tasks.delete(e)}}}function cu(t,e){gd(()=>{t.dispatchEvent(new CustomEvent(e))})}function J$(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;let e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(i=>i[0].toUpperCase()+i.slice(1)).join("")}function bh(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=J$(r.trim());e[l]=a.trim()}return e}var e1=t=>t;function es(t,e,i,o){var R;var r=(t&1)!==0,a=(t&2)!==0,l=r&&a,d=(t&4)!==0,s=l?"both":r?"in":"out",u,m=e.inert,p=e.style.overflow,v,_;function y(){var E;var A=Nt,P=gt;Wi(null),ao(null);try{return u!=null?u:u=i()(e,(E=o==null?void 0:o())!=null?E:{},{direction:s})}finally{Wi(A),ao(P)}}var $={is_global:d,in(){var A;if(e.inert=m,!r){_==null||_.abort(),(A=_==null?void 0:_.reset)==null||A.call(_);return}a||v==null||v.abort(),cu(e,"introstart"),v=pf(e,y(),_,1,()=>{cu(e,"introend"),v==null||v.abort(),v=u=void 0,e.style.overflow=p})},out(A){if(!a){A==null||A(),u=void 0;return}e.inert=!0,cu(e,"outrostart"),_=pf(e,y(),v,0,()=>{cu(e,"outroend"),A==null||A()})},stop:()=>{v==null||v.abort(),_==null||_.abort()}},x=gt;if(((R=x.transitions)!=null?R:x.transitions=[]).push($),r&&hd){var I=d;if(!I){for(var T=x.parent;T&&(T.f&65536)!==0;)for(;(T=T.parent)&&(T.f&16)===0;);I=!T||(T.f&32768)!==0}I&&Po(()=>{Tt(()=>$.in())})}}function pf(t,e,i,o,r){var a=o===1;if(Xs(e)){var l,d=!1;return In(()=>{if(!d){var x=e({direction:a?"in":"out"});l=pf(t,x,i,o,r)}}),{abort:()=>{d=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return r(),{abort:mt,deactivate:mt,reset:mt,t:()=>o};let{delay:s=0,css:u,tick:m,easing:p=e1}=e;var v=[];if(a&&i===void 0&&(m&&m(0,1),u)){var _=bh(u(0,1));v.push(_,_)}var y=()=>1-o,$=t.animate(v,{duration:s,fill:"forwards"});return $.onfinish=()=>{var U;$.cancel();var x=(U=i==null?void 0:i.t())!=null?U:1-o;i==null||i.abort();var I=o-x,T=e.duration*Math.abs(I),R=[];if(T>0){var A=!1;if(u)for(var P=Math.ceil(T/16.666666666666668),E=0;E<=P;E+=1){var z=x+I*p(E/P),F=bh(u(z,1-z));R.push(F),A||(A=F.overflow==="hidden")}A&&(t.style.overflow="hidden"),y=()=>{var X=$.currentTime;return x+I*p(X/T)},m&&_h(()=>{if($.playState!=="running")return!1;var X=y();return m(X,1-X),!0})}$=t.animate(R,{duration:T,fill:"forwards"}),$.onfinish=()=>{y=()=>o,m==null||m(o,1-o),r()}},{abort:()=>{$&&($.cancel(),$.effect=null,$.onfinish=mt)},deactivate:()=>{r=mt},reset:()=>{o===0&&(m==null||m(1,0))},t:()=>y()}}function ff(t,e,i){var o=Uo(t,e);o&&o.set&&(t[e]=i,Eo(()=>{t[e]=null}))}var ia,El,xd,pu,$h,fu=class fu{constructor(e){Gs(this,pu);Gs(this,ia,new WeakMap);Gs(this,El);Gs(this,xd);al(this,xd,e)}observe(e,i){var o=Ai(this,ia).get(e)||new Set;return o.add(i),Ai(this,ia).set(e,o),Qv(this,pu,$h).call(this).observe(e,Ai(this,xd)),()=>{var r=Ai(this,ia).get(e);r.delete(i),r.size===0&&(Ai(this,ia).delete(e),Ai(this,El).unobserve(e))}}};ia=new WeakMap,El=new WeakMap,xd=new WeakMap,pu=new WeakSet,$h=function(){var e;return(e=Ai(this,El))!=null?e:al(this,El,new ResizeObserver(i=>{for(var o of i){fu.entries.set(o.target,o);for(var r of Ai(this,ia).get(o.target)||[])r(o)}}))},nr(fu,"entries",new WeakMap);var mf=fu;var t1=new mf({box:"border-box"});function Pn(t,e,i){var o=t1.observe(t,()=>i(t[e]));Po(()=>(Tt(()=>i(t[e])),o))}function yh(t,e){return t===e||(t==null?void 0:t[zo])===e}function Ye(t={},e,i,o){return Po(()=>{var r,a;return Qo(()=>{r=a,a=(o==null?void 0:o())||[],Tt(()=>{t!==i(...a)&&(e(t,...a),r&&yh(i(...r),t)&&e(null,...r))})}),()=>{In(()=>{a&&yh(i(...a),t)&&e(null,...a)})}}),t}function fo(t=!1){let e=Ht,i=e.l.u;if(!i)return;let o=()=>su(e.s);if(t){let r=0,a={},l=Yr(()=>{let d=!1,s=e.s;for(let u in s)s[u]!==a[u]&&(a[u]=s[u],d=!0);return d&&r++,r});o=()=>n(l)}i.b.length&&cd(()=>{xh(e,o),Zs(i.b)}),De(()=>{let r=Tt(()=>i.m.map(tg));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&De(()=>{xh(e,o),Zs(i.a)})}function xh(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function wd(t,e,i){if(t==null)return e(void 0),i&&i(void 0),mt;let o=Tt(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Pl=[];function Ar(t,e){return{subscribe:de(t,e).subscribe}}function de(t,e=mt){let i=null,o=new Set;function r(d){if(cl(t,d)&&(t=d,i)){let s=!Pl.length;for(let u of o)u[1](),Pl.push(u,t);if(s){for(let u=0;u<Pl.length;u+=2)Pl[u][0](Pl[u+1]);Pl.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 fi(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 Ar(i,(l,d)=>{let s=!1,u=[],m=0,p=mt,v=()=>{if(m)return;p();let y=e(o?u[0]:u,l,d);a?l(y):p=typeof y=="function"?y:mt},_=r.map((y,$)=>wd(y,x=>{u[$]=x,m&=~(1<<$),s&&v()},()=>{m|=1<<$}));return s=!0,v(),function(){Zs(_),p(),s=!1}})}function ye(t){let e;return wd(t,i=>e=i)(),e}var mu=!1,vf=Symbol();function w(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:us(void 0),unsubscribe:mt};if(o.store!==t&&!(vf 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:N(o.source,l)}),r=!1}return t&&vf in i?ye(t):n(o.source)}function Ne(){let t={};function e(){Eo(()=>{for(var i in t)t[i].unsubscribe();so(t,vf,{enumerable:!1,value:!0})})}return[t,e]}function gf(t){var e=mu;try{return mu=!1,[t(),mu]}finally{mu=e}}var l1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return ke&&pg(`${t.name}.${String(e)}`),!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function kn(t,e,i){return new Proxy(ke?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},l1)}var d1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(Xs(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];Xs(r)&&(r=r());let a=Uo(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(Xs(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let r=Uo(o,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===zo||e===ll)return!1;for(let i of t.props)if(Xs(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(Xs(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 ts(...t){return new Proxy({props:t},d1)}function wh(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function h(t,e,i,o){var z,F;var r=(i&1)!==0,a=!ls||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,s=!1,u;l?[u,s]=gf(()=>t[e]):u=t[e];var m=zo in t||ll in t,p=l&&((F=(z=Uo(t,e))==null?void 0:z.set)!=null?F:m&&e in t&&(U=>t[e]=U))||void 0,v=o,_=!0,y=!1,$=()=>(y=!0,_&&(_=!1,d?v=Tt(o):v=o),v);u===void 0&&o!==void 0&&(p&&a&&ug(e),u=$(),p&&p(u));var x;if(a)x=()=>{var U=t[e];return U===void 0?$():(_=!0,y=!1,U)};else{var I=(r?Yr:Sn)(()=>t[e]);I.f|=131072,x=()=>{var U=n(I);return U!==void 0&&(v=void 0),U===void 0?v:U}}if((i&4)===0&&a)return x;if(p){var T=t.$$legacy;return function(U,X){return arguments.length>0?((!a||!X||T||s)&&p(X?x():U),U):x()}}var R=!1,A=!1,P=us(u),E=Yr(()=>{var U=x(),X=n(P);return R?(R=!1,A=!0,X):(A=!1,P.v=U)});return l&&n(E),r||(E.equals=ul),function(U,X){if(nu!==null&&(R=A,x(),n(P)),arguments.length>0){let ae=X?n(E):a&&l?li(U):U;if(!E.equals(ae)){if(R=!0,N(P,ae),y&&v!==void 0&&(v=ae),wh(E))return U;Tt(()=>n(E))}return U}return wh(E)?E.v:n(E)}}var c1;typeof HTMLElement=="function"&&(c1=class extends HTMLElement{constructor(e,i,o){super();nr(this,"$$ctor");nr(this,"$$s");nr(this,"$$c");nr(this,"$$cn",!1);nr(this,"$$d",{});nr(this,"$$r",!1);nr(this,"$$p_d",{});nr(this,"$$l",{});nr(this,"$$l_u",new Map);nr(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=u1(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]=hf(l,a.value,this.$$p_d,"toProp"))}for(let a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=th({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:o,$$host:this}}),this.$$me=eu(()=>{Qo(()=>{var a;this.$$r=!0;for(let l of Ip(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=hf(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]=hf(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 Ip(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function hf(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 u1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var Sh="5";var Ch,Th,Ih;typeof window!="undefined"&&((Ih=(Th=(Ch=window.__svelte)!=null?Ch:window.__svelte={}).v)!=null?Ih:Th.v=new Set).add(Sh);import{areValidLiveRecordSources as NT,clientChecker as Pv}from"@vkontakte/videoplayer-core/es2018";import"@vkontakte/videoplayer-core/es2018";import{noop as Bb,safeStorage as DT,throttleFn as OT}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as BT}from"@vkontakte/videoplayer-statistics/es2018";import{InterfaceLanguage as p1,fillWithDefault as f1,VideoQuality as Eh}from"@vkontakte/videoplayer-shared/es2018";var m1={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:p1.RU,downloadVKLanguages:!0,updateBuiltinLanguages:!0,isSmoothVideoRotate:!0,showSupport:!0,supportLink:"https://vk.com/support?act=new&from=v",showLogo:void 0,logoLink:"https://vk.com/video",logoType:"vk_video",volumeDefault:1,volumeMinRestore:.05,loaderDelay:500,minSubtitlesFontSize:13,autoSubtitlesTimeout:2e3,allowChangingFullscreenTarget:!0,trafficSavingLimit:Eh.Q_480P,highQualityLimit:Eh.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,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",disabledSlotIds:[],disabledAdditionalButtonIds:[]},Ph=t=>f1(t,m1),kh=t=>ml("ui-config",t),Vt=()=>fl("ui-config");var Sd="vk_player_debug_panel_opened";var Ah="videoplayer",Lh="videoplayer";var fs={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Mh=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Vh=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Rh=new Set(["ShiftRight","ShiftLeft"]);var Nh=["TIMELINE"],Cd=[...Nh,"GRAPH_BUTTON"],_f=[...Nh,"PLAY_BUTTON"],Td=[...Cd,"PLAY_BUTTON"];var ms=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(ms||{}),Id={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Dh,VERSION as v1}from"@vkontakte/videoplayer-shared/es2018";import{VERSION as g1}from"@vkontakte/videoplayer-core/es2018";import{VERSION as h1}from"@vkontakte/videoplayer-statistics/es2018";var vu="prod",kl="1.1.82-dev.fbdd1f70.0";var Ra=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Oh=Symbol("storeContext"),Bh=Symbol("microStoresContext"),Hh=(t,e)=>{ml(Oh,t),ml(Bh,e),vu==="dev"&&(window.app={store:t,microStores:e})},be=()=>{let t=fl(Oh);return Dh(t,"Store context is empty!"),t},mo=()=>{let t=fl(Bh);return Dh(t,"MicroStores context is empty!"),t},ti=(t,e)=>hu(t,t.getValue(),e),hu=(t,e,i)=>Ar(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),Fh=(t,e,i,o,r=["meta config not provided"])=>{var F,U,X,ae,Z,re,J,we,me;let a=t.info,{width:l,height:d}=ye(i.ui.playerSize),s=(U=(F=a.throughputEstimation$.getValue())==null?void 0:F.toFixed(0))!=null?U:0,u=(ae=(X=a.rttEstimation$.getValue())==null?void 0:X.toFixed(0))!=null?ae:0,m=a.isAutoQualityEnabled$.getValue()?"auto":"manual",p=`${kl} (core: ${g1}, stat: ${h1}, shared: ${v1})`,v=ye(i.state.errorLog$),_=v.length?`
|
|
45
|
-
`+v.map((
|
|
46
|
-
`,
|
|
47
|
-
`,
|
|
48
|
-
`;return Ce+
|
|
49
|
-
`):void 0,y=i.state.isAudioDisabled?"disabled":
|
|
50
|
-
`)},Uh=(t,e,i)=>{var F,U,X,ae;let o=t.info,{width:r,height:a}=ye(i.ui.playerSize),l={version:kl,viewport:`${r}x${a}`,volume:Math.round(ye(i.state.volume$)*100)};l.id=i.videoId,o.currentFormat$.getValue()&&(l.provider=o.currentFormat$.getValue()),o.hostname$.getValue()&&(l.cdn=o.hostname$.getValue());let u=o.intrinsicVideoSize$.getValue();u&&(l.videoSize=`${u.width}x${u.height}`);let m=o.currentBuffer$.getValue(),p=o.currentNativeBuffer$.getValue(),v=o.isLive$.getValue(),_=o.liveBufferTime$.getValue();m&&p&&(v&&_?(l.buffer=m.end-_,l.nativeBuffer=p.end-_):(l.buffer=Math.max(m.end-ye(i.state.positionExact$),0),l.nativeBuffer=Math.max(p.end-ye(i.state.positionExact$),0))),l.position=ye(i.state.positionExact$);let y=o.throughputEstimation$.getValue();y&&(l.speed=y);let $=o.videoBitrate$.getValue();$&&(l.bitrate=$);let x=o.liveLatency$.getValue();x&&(l.liveLatency=x);let I=o.currentVideoSegmentLength$.getValue();I&&(l.currentVideoSegmentLength=I);let T=o.currentAudioSegmentLength$.getValue();T&&(l.currentAudioSegmentLength=T);let R=ye(i.vsid);typeof R=="string"&&(l.vsid=R);let A=(F=t.info.currentVideoStream$.getValue())==null?void 0:F.codec;A&&(l.videoCodec=A);let P=(U=t.info.currentAudioStream$.getValue())==null?void 0:U.codec;P&&(l.audioCodec=P),((X=t.info.currentVideoStream$.getValue())==null?void 0:X.hdr)&&(l.hdr=!0);let z=(ae=t.info.currentAudioStream$.getValue())==null?void 0:ae.language;return z&&(l.audioLanguage=z),l},zh=(t,e)=>Ra(t,e,"mp4"),Wh=t=>!t.type,Kh=t=>!!t.type,qh=()=>{let e=[],i=0;return{add:(o,r)=>{e[i]=[o,r],i=(i+1)%10},find:o=>e.find(([r])=>r===o)}},gu=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}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 xf,safeStorage as wi}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-core/es2018";var _1="vk_player_",Qh="vk_player_prefer_traffic_saving_enabled",Gh="vk_player_preferred_volume",Yh="vk_player_prefer_volume_mute",wf="vk_player_preferred_quality",bf="vk_player_preferred_default_quality_settings",$f="vk_player_preferred_quality_settings_by_video",jh="vk_player_preferred_stream_language",Xh="vk_player_preferred_rate",Zh="vk_player_preferred_autoplay_next",yf="vk_player_preferred_subtitles_language",Jh="vk_player_user_video_prefs",e_=`${_1}preview_track_close_tooltip`,t_=t=>t>1?1:t<0?0:t,Sf=t=>wi.set(Gh,t_(t).toString(10)),_u=()=>{let t=wi.get(Gh);return xf(t)?void 0:t_(parseFloat(t))},Cf=(t,e)=>wi.set(wf,JSON.stringify({videoId:t,value:e})),bu=()=>wi.remove(wf),Tf=t=>{let e=wi.get(wf);if(xf(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){bu();return}return o},i_=(t,e)=>{e?wi.set(t,"true"):wi.remove(t)},If=t=>wi.get(t)==="true",Ef=t=>i_(Yh,t),o_=()=>If(Yh),Ed=t=>i_(Qh,t),Pf=()=>If(Qh),n_=()=>wi.get(jh),kf=t=>wi.set(jh,t),Af=()=>wi.get(yf),Lf=t=>{t?wi.set(yf,t):wi.remove(yf)},r_=t=>wi.set(Xh,JSON.stringify({rate:t})),s_=()=>{let t=wi.get(Xh);if(xf(t))return;let{rate:e}=JSON.parse(t);return e},a_=t=>{wi.set(Zh,String(t))},l_=()=>If(Zh),b1=()=>{let t=m=>{wi.set(bf,JSON.stringify(m))},e=()=>{try{let m=wi.get(bf);return m?JSON.parse(m):null}catch(m){return null}},i=()=>{try{let m=wi.get($f);return m?JSON.parse(m):null}catch(m){return null}},o=m=>{wi.set($f,JSON.stringify(m))},r=m=>{u(m);let p=m?i():null;if(p&&(p==null?void 0:p.videoId)===m)return{...p,appliesTo:"to-video"};p&&a();let v=e();return v?{...v,appliesTo:"as-default"}:(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{wi.remove($f)},l=()=>{wi.remove(bf)},d=(m,p="as-default")=>{m.type==="exact_quality"||p==="to-video"?o(m):t(m)},s=m=>{let p=r(m);if(p){switch(p.type){case"traffic_saving":Ed(!0);break;case"exact_quality":Cf(m,p.quality)}a(),l()}},u=m=>{let p=Tf(m);if(p){o({type:"exact_quality",videoId:m,quality:p});return}Pf()&&t({type:"traffic_saving",videoId:m}),Ed(!1),bu()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:Af,savePreferredSubtitlesLanguage:Lf}},{getPreferredQualitySettings:d_,migrateSettingsToLegacyWay:c_,savePreferredQualitySettings:$u,savePreferredDefaultQualitySettings:YV,removePreferredQualitySettingsByVideo:jV,getPreferredDefaultQualitySettings:yu}=b1(),$1=3,y1=3,u_=()=>{let t=wi.get(Jh);if(t)try{return JSON.parse(t)}catch(e){return null}return null},xu=(t,e)=>{var r,a;let i=u_();return(a=(r=i==null?void 0:i[t])==null?void 0:r[e])!=null?a:null},Mf=(t,e,i)=>{var l,d,s;let o=(l=u_())!=null?l:{},r=(s=(d=o[t])==null?void 0:d[e])!=null?s:{};Object.assign(r,i,{updatedTs:Date.now()}),t in o||(o[t]={}),o[t][e]=r;let a=x1(o);wi.set(Jh,JSON.stringify(a))};function x1(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(y1),e.reduce((o,[r])=>(o[r]=w1(t[r]),o),{})}function w1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice($1),Object.fromEntries(e)}function p_(){wi.set(e_,JSON.stringify(!0))}function f_(){let t=wi.get(e_);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Nb}from"@vkontakte/videoplayer-core/es2018";hg();var oa="var(--btn-color, #fff)";var S1=Ie('<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),C1=Ie('<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=h(e,"width",19,()=>"24"),o=h(e,"height",19,()=>"24"),r=h(e,"fill",3,oa),a=(m=e.viewBox)!=null?m:`0 0 ${i()} ${o()}`;var l=C1(),d=C(l);{var s=p=>{var v=S1(),_=ue(v),y=C(_);ei(y,()=>e.children),S(_),di(),b(p,v)},u=p=>{var v=Le(),_=ue(v);ei(_,()=>e.children),b(p,v)};V(d,p=>{e.shadow?p(s):p(u,!1)})}S(l),O(()=>{Ve(l,"aria-label",e.ariaLabel),Ve(l,"aria-hidden",!e.ariaLabel),Ve(l,"width",i()),Ve(l,"height",o()),Ve(l,"viewBox",a),Ve(l,"fill",r()),We(l,e.style),Ve(l,"data-testid",e.testId)}),b(t,l),H()}import{isNullable as g_,InterfaceLanguage as h_}from"@vkontakte/videoplayer-shared/es2018";var T1={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:`Видео грузится слишком медленно,
|
|
43
|
+
`)})}}var Ia=!1,bl=null,Ea=!1,Ts=!1;function Op(t){Ts=t}var ud=[],pd=[],Vt=null,pr=!1;function zi(t){Vt=t}var _t=null;function lo(t){_t=t}var Qo=null;function qc(t){Vt!==null&&Vt.f&2097152&&(Qo===null?Qo=[Vt,[t]]:Qo[1].push(t))}var wn=null,fr=0,ur=null;function bg(t){ur=t}var Og=1,tu=0,Is=!1,iu=null;function ed(){return++Og}function wa(t){var p,v;var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){var i=t.deps,o=(e&256)!==0;if(i!==null){var r,a,l=(e&512)!==0,d=o&&_t!==null&&!Is,s=i.length;if(l||d){var u=t,m=u.parent;for(r=0;r<s;r++)a=i[r],(l||!((p=a==null?void 0:a.reactions)!=null&&p.includes(u)))&&((v=a.reactions)!=null?v:a.reactions=[]).push(u);l&&(u.f^=512),d&&m!==null&&(m.f&256)===0&&(u.f^=256)}for(r=0;r<s;r++)if(a=i[r],wa(a)&&Dp(a),a.wv>t.wv)return!0}(!o||_t!==null&&!Is)&&$n(t,1024)}return!1}function Bg(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]===Vt||((a.f&2)!==0?Bg(a,e,!1):e===a&&(i?$n(a,2048):(a.f&1024)!==0&&$n(a,4096),id(a)))}}function Kc(t){var _,y;var e=wn,i=fr,o=ur,r=Vt,a=Is,l=Qo,d=Ht,s=pr,u=t.f;wn=null,fr=0,ur=null,Is=(u&256)!==0&&(pr||!Ea||Vt===null),Vt=(u&96)===0?t:null,Qo=null,Xl(t.ctx),pr=!1,tu++,t.f|=2097152;try{var m=(0,t.fn)(),p=t.deps;if(wn!==null){var v;if(ld(t,fr),p!==null&&fr>0)for(p.length=fr+wn.length,v=0;v<wn.length;v++)p[fr+v]=wn[v];else t.deps=p=wn;if(!Is||(u&2)!==0&&t.reactions!==null)for(v=fr;v<p.length;v++)((y=(_=p[v]).reactions)!=null?y:_.reactions=[]).push(t)}else p!==null&&fr<p.length&&(ld(t,fr),p.length=fr);if(cs()&&ur!==null&&!pr&&p!==null&&(t.f&6146)===0)for(v=0;v<ur.length;v++)Bg(ur[v],t);return r!==null&&r!==t&&(tu++,ur!==null&&(o===null?o=ur:o.push(...ur))),m}catch($){Rg($)}finally{wn=e,fr=i,ur=o,Vt=r,Is=a,Qo=l,Xl(d),pr=s,t.f^=2097152}}function m$(t,e){let i=e.reactions;if(i!==null){var o=Zv.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&&(wn===null||!wn.includes(e))&&($n(e,4096),(e.f&768)===0&&(e.f^=512),Wc(e),ld(e,0))}function ld(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)m$(t,i[o])}function gl(t){var e=t.f;if((e&16384)===0){$n(t,1024);var i=_t,o=Ea;if(_t=t,Ea=!0,Ve){var r=lr;Zl(t.component_function)}try{(e&16)!==0?kg(t):Up(t),Fp(t);var a=Kc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Og,Ve&&ds&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=ed(),l.set_during_effect=!1);Ve&&pd.push(t)}finally{Ea=o,_t=i,Ve&&Zl(r)}}}function Ng(){console.error("Last ten effects were: ",pd.slice(-10).map(t=>t.fn)),pd=[]}function v$(){try{ag()}catch(t){if(Ve&&ao(t,"stack",{value:""}),bl!==null)if(Ve)try{cd(t,bl)}catch(e){throw Ng(),e}else cd(t,bl);else throw Ve&&Ng(),t}}function Gp(){var t=Ea;try{var e=0;for(Ea=!0;ud.length>0;){e++>1e3&&v$();var i=ud,o=i.length;ud=[];for(var r=0;r<o;r++){var a=h$(i[r]);g$(a)}ml.clear()}}finally{Ia=!1,Ea=t,bl=null,Ve&&(pd=[])}}function g$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&wa(o)&&(gl(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?Wp(o):o.fn=null))}}function id(t){Ia||(Ia=!0,queueMicrotask(Gp));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}}ud.push(e)}function h$(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:wa(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&&(Ia=!0,Gp(),Ia=!0,e=t());;){if(Mg(),ud.length===0)return Ia=!1,bl=null,Ve&&(pd=[]),e;Ia=!0,Gp()}}async function uo(){await Promise.resolve(),$l()}function n(t){var e=t.f,i=(e&2)!==0;if(iu!==null&&iu.add(t),Vt!==null&&!pr){if(!(Qo!=null&&Qo[1].includes(t))||Qo[0]!==Vt){var o=Vt.deps;t.rv<tu&&(t.rv=tu,wn===null&&o!==null&&o[fr]===t?fr++:wn===null?wn=[t]:(!Is||!wn.includes(t))&&wn.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,wa(r)&&Dp(r)),Ve&&ds&&!pr&&jl!==null&&Vt!==null&&jl.reaction===Vt)if(t.trace)t.trace();else{var l=Cs("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 Ts&&ml.has(t)?ml.get(t):t.v}function St(t){var e=pr;try{return pr=!0,t()}finally{pr=e}}var _$=-7169;function $n(t,e){t.f=t.f&_$|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=ba(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 Yp(t,e){if(e){let i=document.body;t.autofocus=!0,xn(()=>{document.activeElement===i&&t.focus()})}}function fd(t){var e=Vt,i=_t;zi(null),lo(null);try{return t()}finally{zi(e),lo(i)}}var jp=new Set,ru=new Set;function Pa(t){if(!it)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 Xp(t,e,i,o={}){function r(a){if(o.capture||yl.call(e,a),!a.cancelBubble)return fd(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?xn(()=>{e.addEventListener(t,r,o)}):e.addEventListener(t,r,o),r}function pt(t,e,i,o,r){var a={capture:o,passive:r},l=Xp(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Io(()=>{e.removeEventListener(t,l,a)})}function Ze(t){for(var e=0;e<t.length;e++)jp.add(t[e]);for(var i of ru)i(t)}function yl(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){ao(t,"currentTarget",{configurable:!0,get(){return a||i}});var m=Vt,p=_t;zi(null),lo(null);try{for(var v,_=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var $=a["__"+o];if($!=null&&(!a.disabled||t.target===a))if(sr($)){var[x,...I]=$;x.apply(a,[t,...I])}else $.call(a,t)}catch(R){v?_.push(R):v=R}if(t.cancelBubble||y===e||y===null)break;a=y}if(v){for(let R of _)queueMicrotask(()=>{throw R});throw v}}finally{t.__root=e,delete t.currentTarget,zi(m),lo(p)}}}var $$;function Hg(){$$=void 0}function xl(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Po(t,e){var i=_t;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function L(t,e){var i=(e&1)!==0,o=(e&2)!==0,r,a=!t.startsWith("<!>");return()=>{if(it)return Po(bt,null),bt;r===void 0&&(r=xl(a?t:"<!>"+t),i||(r=wi(r)));var l=o||od?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=wi(l),s=l.lastChild;Po(d,s)}else Po(l,l);return l}}function w$(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(it)return Po(bt,null),bt;if(!l){var d=xl(a),s=wi(d);if(r)for(l=document.createDocumentFragment();wi(s);)l.appendChild(wi(s));else l=wi(s)}var u=l.cloneNode(!0);if(r){var m=wi(u),p=u.lastChild;Po(m,p)}else Po(u,u);return u}}function Ee(t,e){return w$(t,e,"svg")}function ps(t=""){if(!it){var e=yn(t+"");return Po(e,e),e}var i=bt;return i.nodeType!==al&&(i.before(i=yn()),yi(i)),Po(i,i),i}function Re(){if(it)return Po(bt,null),bt;var t=document.createDocumentFragment(),e=document.createComment(""),i=yn();return t.append(e,i),Po(e,i),t}function b(t,e){if(it){_t.nodes_end=bt,Ki();return}t!==null&&t.before(e)}var S$=/\r/g;function Ug(t){t=t.replace(S$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function zg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var C$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Wg(t){return C$.includes(t)}var T$=["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 I$={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 Kg(t){var e;return t=t.toLowerCase(),(e=I$[t])!=null?e:t}var Tk=[...T$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var E$=["touchstart","touchmove"];function qg(t){return E$.includes(t)}var P$=["$state","$state.raw","$derived","$derived.by"],Ik=[...P$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var k$=["textarea","script","style","title"];function Qg(t){return k$.includes(t)}function su(t){return t==null?void 0:t.replace(/\//g,"/")}var md=!0;function au(t){md=t}function ge(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 Yr(t,e){return Gg(t,e)}function Jp(t,e){var l;Yc(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=it,r=bt;try{for(var a=wi(i);a&&(a.nodeType!==ar||a.data!==Ys);)a=Go(a);if(!a)throw as;co(!0),yi(a),Ki();let d=Gg(t,{...e,anchor:a});if(bt===null||bt.nodeType!==ar||bt.data!==_a)throw Js(),as;return co(!1),d}catch(d){if(d===as)return e.recover===!1&&lg(),Yc(),nd(i),co(!1),Yr(t,e);throw d}finally{co(o),yi(r),Hg()}}var wl=new Map;function Gg(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){Yc();var d=new Set,s=p=>{for(var v=0;v<p.length;v++){var _=p[v];if(!d.has(_)){d.add(_);var y=qg(_);e.addEventListener(_,yl,{passive:y});var $=wl.get(_);$===void 0?(document.addEventListener(_,yl,{passive:y}),wl.set(_,1)):wl.set(_,$+1)}}};s(Yl(jp)),ru.add(s);var u=void 0,m=Pg(()=>{var p=i!=null?i:e.appendChild(yn());return Ri(()=>{if(a){B({});var v=Ht;v.c=a}r&&(o.$$events=r),it&&Po(p,null),md=l,u=t(p,o)||{},md=!0,it&&(_t.nodes_end=bt),a&&H()}),()=>{var y;for(var v of d){e.removeEventListener(v,yl);var _=wl.get(v);--_===0?(document.removeEventListener(v,yl),wl.delete(v)):wl.set(v,_)}ru.delete(s),p!==i&&((y=p.parentNode)==null||y.removeChild(p))}});return Zp.set(u,m),u}var Zp=new WeakMap;function ka(t,e){let i=Zp.get(t);return i?(Zp.delete(t),i(e)):(Ve&&xg(),Promise.resolve())}function ei(t,e,...i){var o=t,r=gt,a;qi(()=>{r!==(r=e())&&(a&&(Wi(a),a=null),Ve&&r==null&&dg(),a=Ri(()=>r(o,...i)))},65536),it&&(o=bt)}if(Ve){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;pg(e)},set:o=>{i=o}})}};V$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var V$;function Lt(t){Ht===null&&cl("onMount"),ls&&Ht.l!==null?M$(Ht).m.push(t):He(()=>{let e=St(t);if(typeof e=="function")return e})}function ln(t){Ht===null&&cl("onDestroy"),Lt(()=>()=>St(t))}function M$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var Yg=new Map;function jg(t,e){var i=Yg.get(t);i||(i=new Set,Yg.set(t,i)),i.add(e)}function V(t,e,[i,o]=[0,0]){it&&i===0&&Ki();var r=t,a=null,l=null,d=eo,s=i>0?65536:0,u=!1;let m=(v,_=!0)=>{u=!0,p(_,v)},p=(v,_)=>{if(d===(d=v))return;let y=!1;if(it&&o!==-1){if(i===0){let x=Gc(r);x===Ys?o=0:x===js?o=1/0:(o=parseInt(x.substring(1)),o!==o&&(o=d?1/0:-1))}let $=o>i;!!d===$&&(r=Sa(),yi(r),co(!1),y=!0,o=-1)}d?(a?Ps(a):_&&(a=Ri(()=>_(r))),l&&Wn(l,()=>{l=null})):(l?Ps(l):_&&(l=Ri(()=>_(r,[i+1,o]))),a&&Wn(a,()=>{a=null})),y&&co(!0)};qi(()=>{u=!1,e(m),u||p(null,null)},s),it&&(r=bt)}function ks(t,e,i){it&&Ki();var o=t,r=eo,a,l=cs()?ig:ll;qi(()=>{l(r,r=e())&&(a&&Wn(a),a=Ri(()=>i(o)))}),it&&(o=bt)}var ta=null;function of(t){ta=t}function vd(t,e){return e}function D$(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;nd(s),s.append(i),o.clear(),ea(t,e[0].prev,e[a-1].next)}Kp(r,()=>{for(var u=0;u<a;u++){var m=e[u];d||(o.delete(m.k),ea(t,m.prev,m.next)),Wi(m.e,!d)}})}function hi(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=it?yi(wi(u)):u.appendChild(yn())}it&&Ki();var m=null,p=!1,v=cr(()=>{var _=i();return sr(_)?_:_==null?[]:Yl(_)});qi(()=>{var _=n(v),y=_.length;if(p&&y===0)return;p=y===0;let $=!1;if(it){var x=Gc(l)===js;x!==(y===0)&&(l=Sa(),yi(l),co(!1),$=!0)}if(it){for(var I=null,T,R=0;R<y;R++){if(bt.nodeType===ar&&bt.data===_a){l=bt,$=!0,co(!1);break}var A=_[R],P=o(A,R);T=Jg(bt,d,I,null,A,P,R,r,e,i),d.items.set(P,T),I=T}y>0&&yi(Sa())}it||O$(_,d,l,r,e,o,i),a!==null&&(y===0?m?Ps(m):m=Ri(()=>a(l)):m!==null&&Wn(m,()=>{m=null})),$&&co(!0),n(v)}),it&&(l=bt)}function O$(t,e,i,o,r,a,l){var Z,Te,fe,te;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,m=e.items,p=e.first,v=p,_,y=null,$,x=[],I=[],T,R,A,P;if(d)for(P=0;P<u;P+=1)T=t[P],R=a(T,P),A=m.get(R),A!==void 0&&((Z=A.a)==null||Z.measure(),($!=null?$:$=new Set).add(A));for(P=0;P<u;P+=1){if(T=t[P],R=a(T,P),A=m.get(R),A===void 0){var E=v?v.e.nodes_start:i;y=Jg(E,e,y,y===null?e.first:y.next,T,R,P,o,r,l),m.set(R,y),x=[],I=[],v=y.next;continue}if(s&&B$(A,T,P,r),(A.e.f&8192)!==0&&(Ps(A.e),d&&((Te=A.a)==null||Te.unfix(),($!=null?$:$=new Set).delete(A))),A!==v){if(_!==void 0&&_.has(A)){if(x.length<I.length){var W=I[0],F;y=W.prev;var U=x[0],X=x[x.length-1];for(F=0;F<x.length;F+=1)Xg(x[F],W,i);for(F=0;F<I.length;F+=1)_.delete(I[F]);ea(e,U.prev,X.next),ea(e,y,U),ea(e,X,W),v=W,y=X,P-=1,x=[],I=[]}else _.delete(A),Xg(A,v,i),ea(e,A.prev,A.next),ea(e,A,y===null?e.first:y.next),ea(e,y,A),y=A;continue}for(x=[],I=[];v!==null&&v.k!==R;)(v.e.f&8192)===0&&(_!=null?_:_=new Set).add(v),I.push(v),v=v.next;if(v===null)continue;A=v}x.push(A),y=A,v=A.next}if(v!==null||_!==void 0){for(var se=_===void 0?[]:Yl(_);v!==null;)(v.e.f&8192)===0&&se.push(v),v=v.next;var j=se.length;if(j>0){var ne=(r&4)!==0&&u===0?i:null;if(d){for(P=0;P<j;P+=1)(fe=se[P].a)==null||fe.measure();for(P=0;P<j;P+=1)(te=se[P].a)==null||te.fix()}D$(e,se,ne,m)}}d&&xn(()=>{var _e;if($!==void 0)for(A of $)(_e=A.a)==null||_e.apply()}),_t.first=e.first&&e.first.e,_t.last=y&&y.e}function B$(t,e,i,o){(o&1)!==0&&vl(t.v,e),(o&2)!==0?vl(t.i,i):t.i=i}function Jg(t,e,i,o,r,a,l,d,s,u){var m=ta,p=(s&1)!==0,v=(s&16)===0,_=p?v?us(r,!1,!1):Er(r):r,y=(s&2)===0?l:Er(l);Ve&&p&&(_.trace=()=>{var x=typeof y=="number"?l:y.v;u()[x]});var $={i:y,v:_,k:a,a:null,e:null,prev:i,next:o};ta=$;try{return $.e=Ri(()=>d(t,_,y,u),it),$.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{ta=m}}function Xg(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 ea(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 H$(t,e,i){var a,l;if(!e||e===Ug(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=lr)!=null&&l[Hn]&&(o=`in ${lr[Hn]}`),yg(su(o))}function gd(t,e,i=!1,o=!1,r=!1){var a=t,l="";O(()=>{var _;var d=_t;if(l===(l=(_=e())!=null?_:"")){it&&Ki();return}if(d.nodes_start!==null&&(zp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(it){for(var s=bt.data,u=Ki(),m=u;u!==null&&(u.nodeType!==ar||u.data!=="");)m=u,u=Go(u);if(u===null)throw Js(),as;Ve&&!r&&H$(u.parentNode,s,l),Po(bt,m),a=yi(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var v=xl(p);if((i||o)&&(v=wi(v)),Po(wi(v),v.lastChild),i||o)for(;wi(v);)a.before(wi(v));else a.before(v)}})}function Ni(t,e,i){it&&Ki();var o=t,r,a;qi(()=>{r!==(r=e())&&(a&&(Wn(a),a=null),r&&(a=Ri(()=>i(o,r))))},65536),it&&(o=bt)}function Aa(t,e,i,o,r,a){var y;let l=it;it&&Ki();var d=Ve&&a&&((y=Ht)==null?void 0:y.function[Hn]),s,u,m=null;it&&bt.nodeType===Fc&&(m=bt,Ki());var p=it?bt:t,v,_=ta;qi(()=>{let $=e()||null;var x=r?r():i||$==="svg"?Dc:null;if($!==s){var I=ta;of(_),v&&($===null?Wn(v,()=>{v=null,u=null}):$===u?Ps(v):(Wi(v),au(!1))),$&&$!==u&&(v=Ri(()=>{if(m=it?m:x?document.createElementNS(x,$):document.createElement($),Ve&&a&&(m.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),Po(m,m),o){it&&Qg($)&&m.append(document.createComment(""));var T=it?wi(m):m.appendChild(yn());it&&(T===null?co(!1):yi(T)),o(m,T)}_t.nodes_end=m,p.before(m)})),s=$,s&&(u=s),au(!0),of(I)}},65536),l&&(co(!0),yi(p))}var rf;function eh(t){return rf=t.target,new nf(t)}var As,Pr,nf=class{constructor(e){Gs(this,As);Gs(this,Pr);var a,l;var i=new Map,o=(d,s)=>{var u=us(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 m;return N((m=i.get(s))!=null?m:o(s,u),u),Reflect.set(d,s,u)}});rl(this,Pr,(e.hydrate?Jp:Yr)(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,As,r.$$events);for(let d of Object.keys(Vi(this,Pr)))d==="$set"||d==="$destroy"||d==="$on"||ao(this,d,{get(){return Vi(this,Pr)[d]},set(s){Vi(this,Pr)[d]=s},enumerable:!0});Vi(this,Pr).$set=d=>{Object.assign(r,d)},Vi(this,Pr).$destroy=()=>{ka(Vi(this,Pr))}}$set(e){Vi(this,Pr).$set(e)}$on(e,i){Vi(this,As)[e]=Vi(this,As)[e]||[];let o=(...r)=>i.call(this,...r);return Vi(this,As)[e].push(o),()=>{Vi(this,As)[e]=Vi(this,As)[e].filter(r=>r!==o)}}$destroy(){Vi(this,Pr).$destroy()}};As=new WeakMap,Pr=new WeakMap;function Q(t,e){xn(()=>{var r,a,l;var i=t.getRootNode(),o=i.host?i:(l=(r=i.head)!=null?r:i.ownerDocument.head)!=null?l:(a=rf)==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),Ve&&jg(e.hash,d)}})}function Ls(t,e){var i=void 0,o;qi(()=>{i!==(i=e())&&(o&&(Wi(o),o=null),i&&(o=Ri(()=>{Eo(()=>i(t))})))})}function th(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=th(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function ih(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=th(t))&&(o&&(o+=" "),o+=e);return o}function hd(t){return typeof t=="object"?ih(t):t!=null?t:""}var oh=[...`
|
|
44
|
+
\r\f \v\uFEFF`];function rh(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||oh.includes(o[l-1]))&&(d===o.length||oh.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function nh(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 sf(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function sh(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(sf)),r&&s.push(...Object.keys(r).map(sf));var u=0,m=-1;let $=t.length;for(var p=0;p<$;p++){var v=t[p];if(d?v==="/"&&t[p-1]==="*"&&(d=!1):a?a===v&&(a=!1):v==="/"&&t[p+1]==="*"?d=!0:v==='"'||v==="'"?a=v:v==="("?l++:v===")"&&l--,!d&&a===!1&&l===0){if(v===":"&&m===-1)m=p;else if(v===";"||p===$-1){if(m!==-1){var _=sf(t.substring(u,m).trim());if(!s.includes(_)){v!==";"&&p++;var y=t.substring(u,p).trim();i+=" "+y+";"}}u=p+1,m=-1}}}}return o&&(i+=nh(o)),r&&(i+=nh(r,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function oe(t,e,i,o,r,a){var l=t.__className;if(it||l!==i||l===void 0){var d=rh(i,o,a);(!it||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 af(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(it||r!==e){var a=sh(e,o);(!it||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(af(t,i==null?void 0:i[0],o[0]),af(t,i==null?void 0:i[1],o[1],"important")):af(t,i,o));return o}function _d(t,e,i){if(t.multiple){if(e==null)return;if(!sr(e))return wg();for(var o of t.options)o.selected=e.includes(ah(o));return}for(o of t.options){var r=ah(o);if(Lp(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function lf(t){var e=new MutationObserver(()=>{_d(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Io(()=>{e.disconnect()})}function ah(t){return"__value"in t?t.__value:t.value}var Sl=Symbol("class"),Cl=Symbol("style"),ch=Symbol("is custom element"),uh=Symbol("is html");function ph(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Ne(t,e,i,o){var r=mh(t);if(it&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||G$(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[tg]=i),i==null?t.removeAttribute(e):typeof i!="string"&&vh(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function fh(t,e,i,o,r=!1){var A;var a=mh(t),l=a[ch],d=!a[uh];let s=it&&l;s&&co(!1);var u=e||{},m=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=hd(i.class):(o||i[Sl])&&(i.class=null),i[Cl]&&((A=i.style)!=null||(i.style=null));var v=vh(t);for(let P in i){let E=i[P];if(m&&P==="value"&&E==null){t.value=t.__value="",u[P]=E;continue}if(P==="class"){var _=t.namespaceURI==="http://www.w3.org/1999/xhtml";oe(t,_,E,o,e==null?void 0:e[Sl],i[Sl]),u[P]=E,u[Sl]=i[Sl];continue}if(P==="style"){qe(t,E,e==null?void 0:e[Cl],i[Cl]),u[P]=E,u[Cl]=i[Cl];continue}var y=u[P];if(!(E===y&&!(E===void 0&&t.hasAttribute(P)))){u[P]=E;var $=P[0]+P[1];if($!=="$$")if($==="on"){let W={},F="$$"+P,U=P.slice(2);var x=Wg(U);if(zg(U)&&(U=U.slice(0,-7),W.capture=!0),!x&&y){if(E!=null)continue;t.removeEventListener(U,u[F],W),u[F]=null}if(E!=null)if(x)t[`__${U}`]=E,Ze([U]);else{let X=function(se){u[P].call(this,se)};var R=X;u[F]=Xp(U,t,X,W)}else x&&(t[`__${U}`]=void 0)}else if(P==="style")Ne(t,P,E);else if(P==="autofocus")Yp(t,!!E);else if(!l&&(P==="__value"||P==="value"&&E!=null))t.value=t.__value=E;else if(P==="selected"&&m)ph(t,E);else{var I=P;d||(I=Kg(I));var T=I==="defaultValue"||I==="defaultChecked";if(E==null&&!l&&!T)if(a[P]=null,I==="value"||I==="checked"){let W=t,F=e===void 0;if(I==="value"){let U=W.defaultValue;W.removeAttribute(I),W.defaultValue=U,W.value=W.__value=F?U:null}else{let U=W.defaultChecked;W.removeAttribute(I),W.defaultChecked=U,W.checked=F?U:!1}}else t.removeAttribute(P);else T||v.includes(I)&&(l||typeof E!="string")?t[I]=E:typeof E!="function"&&Ne(t,I,E,r)}}}return s&&co(!0),u}function to(t,e,i=[],o,r=!1,a=qr){let l=i.map(a);var d=void 0,s={},u=t.nodeName==="SELECT",m=!1;if(qi(()=>{var v=e(...l.map(n)),_=fh(t,d,v,o,r);m&&u&&"value"in v&&_d(t,v.value,!1);for(let $ of Object.getOwnPropertySymbols(s))v[$]||Wi(s[$]);for(let $ of Object.getOwnPropertySymbols(v)){var y=v[$];$.description===Sp&&(!d||y!==d[$])&&(s[$]&&Wi(s[$]),s[$]=Ri(()=>Ls(t,()=>y))),_[$]=y}d=_}),u){var p=t;Eo(()=>{_d(p,d.value),lf(p)})}m=!0}function mh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[ch]:t.nodeName.includes("-"),[uh]:t.namespaceURI===Gv}}var lh=new Map;function vh(t){var e=lh.get(t.nodeName);if(e)return e;lh.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=ba(o)}return e}function G$(t,e,i){var o;Ve&&(e==="srcset"&&Y$(t,i)||df((o=t.getAttribute(e))!=null?o:"",i)||$g(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function df(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function dh(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function Y$(t,e){var i=dh(t.srcset),o=dh(e);return o.length===i.length&&o.every(([r,a],l)=>a===i[l][1]&&(df(i[l][0],r)||df(r,i[l][0])))}var j$=Oc?()=>performance.now():()=>Date.now(),jr={tick:t=>(Oc?requestAnimationFrame:gt)(t),now:()=>j$(),tasks:new Set};function gh(){let t=jr.now();jr.tasks.forEach(e=>{e.c(t)||(jr.tasks.delete(e),e.f())}),jr.tasks.size!==0&&jr.tick(gh)}function hh(t){let e;return jr.tasks.size===0&&jr.tick(gh),{promise:new Promise(i=>{jr.tasks.add(e={c:t,f:i})}),abort(){jr.tasks.delete(e)}}}function lu(t,e){fd(()=>{t.dispatchEvent(new CustomEvent(e))})}function e1(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 _h(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=e1(r.trim());e[l]=a.trim()}return e}var t1=t=>t;function Ms(t,e,i,o){var R;var r=(t&1)!==0,a=(t&2)!==0,l=r&&a,d=(t&4)!==0,s=l?"both":r?"in":"out",u,m=e.inert,p=e.style.overflow,v,_;function y(){var E;var A=Vt,P=_t;zi(null),lo(null);try{return u!=null?u:u=i()(e,(E=o==null?void 0:o())!=null?E:{},{direction:s})}finally{zi(A),lo(P)}}var $={is_global:d,in(){var A;if(e.inert=m,!r){_==null||_.abort(),(A=_==null?void 0:_.reset)==null||A.call(_);return}a||v==null||v.abort(),lu(e,"introstart"),v=cf(e,y(),_,1,()=>{lu(e,"introend"),v==null||v.abort(),v=u=void 0,e.style.overflow=p})},out(A){if(!a){A==null||A(),u=void 0;return}e.inert=!0,lu(e,"outrostart"),_=cf(e,y(),v,0,()=>{lu(e,"outroend"),A==null||A()})},stop:()=>{v==null||v.abort(),_==null||_.abort()}},x=_t;if(((R=x.transitions)!=null?R:x.transitions=[]).push($),r&&md){var I=d;if(!I){for(var T=x.parent;T&&(T.f&65536)!==0;)for(;(T=T.parent)&&(T.f&16)===0;);I=!T||(T.f&32768)!==0}I&&Eo(()=>{St(()=>$.in())})}}function cf(t,e,i,o,r){var a=o===1;if(Xs(e)){var l,d=!1;return xn(()=>{if(!d){var x=e({direction:a?"in":"out"});l=cf(t,x,i,o,r)}}),{abort:()=>{d=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return r(),{abort:gt,deactivate:gt,reset:gt,t:()=>o};let{delay:s=0,css:u,tick:m,easing:p=t1}=e;var v=[];if(a&&i===void 0&&(m&&m(0,1),u)){var _=_h(u(0,1));v.push(_,_)}var y=()=>1-o,$=t.animate(v,{duration:s,fill:"forwards"});return $.onfinish=()=>{var U;$.cancel();var x=(U=i==null?void 0:i.t())!=null?U:1-o;i==null||i.abort();var I=o-x,T=e.duration*Math.abs(I),R=[];if(T>0){var A=!1;if(u)for(var P=Math.ceil(T/16.666666666666668),E=0;E<=P;E+=1){var W=x+I*p(E/P),F=_h(u(W,1-W));R.push(F),A||(A=F.overflow==="hidden")}A&&(t.style.overflow="hidden"),y=()=>{var X=$.currentTime;return x+I*p(X/T)},m&&hh(()=>{if($.playState!=="running")return!1;var X=y();return m(X,1-X),!0})}$=t.animate(R,{duration:T,fill:"forwards"}),$.onfinish=()=>{y=()=>o,m==null||m(o,1-o),r()}},{abort:()=>{$&&($.cancel(),$.effect=null,$.onfinish=gt)},deactivate:()=>{r=gt},reset:()=>{o===0&&(m==null||m(1,0))},t:()=>y()}}function uf(t,e,i){var o=Wo(t,e);o&&o.set&&(t[e]=i,Io(()=>{t[e]=null}))}var ia,Tl,bd,cu,bh,uu=class uu{constructor(e){Gs(this,cu);Gs(this,ia,new WeakMap);Gs(this,Tl);Gs(this,bd);rl(this,bd,e)}observe(e,i){var o=Vi(this,ia).get(e)||new Set;return o.add(i),Vi(this,ia).set(e,o),qv(this,cu,bh).call(this).observe(e,Vi(this,bd)),()=>{var r=Vi(this,ia).get(e);r.delete(i),r.size===0&&(Vi(this,ia).delete(e),Vi(this,Tl).unobserve(e))}}};ia=new WeakMap,Tl=new WeakMap,bd=new WeakMap,cu=new WeakSet,bh=function(){var e;return(e=Vi(this,Tl))!=null?e:rl(this,Tl,new ResizeObserver(i=>{for(var o of i){uu.entries.set(o.target,o);for(var r of Vi(this,ia).get(o.target)||[])r(o)}}))},rr(uu,"entries",new WeakMap);var pf=uu;var i1=new pf({box:"border-box"});function Sn(t,e,i){var o=i1.observe(t,()=>i(t[e]));Eo(()=>(St(()=>i(t[e])),o))}function $h(t,e){return t===e||(t==null?void 0:t[Ko])===e}function et(t={},e,i,o){return Eo(()=>{var r,a;return Yo(()=>{r=a,a=(o==null?void 0:o())||[],St(()=>{t!==i(...a)&&(e(t,...a),r&&$h(i(...r),t)&&e(null,...r))})}),()=>{xn(()=>{a&&$h(i(...a),t)&&e(null,...a)})}}),t}function jo(t=!1){let e=Ht,i=e.l.u;if(!i)return;let o=()=>nu(e.s);if(t){let r=0,a={},l=qr(()=>{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&&ad(()=>{yh(e,o),Zs(i.b)}),He(()=>{let r=St(()=>i.m.map(eg));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&He(()=>{yh(e,o),Zs(i.a)})}function yh(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function $d(t,e,i){if(t==null)return e(void 0),i&&i(void 0),gt;let o=St(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Il=[];function kr(t,e){return{subscribe:ae(t,e).subscribe}}function ae(t,e=gt){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=gt){let u=[d,s];return o.add(u),o.size===1&&(i=e(r,a)||gt),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 kr(i,(l,d)=>{let s=!1,u=[],m=0,p=gt,v=()=>{if(m)return;p();let y=e(o?u[0]:u,l,d);a?l(y):p=typeof y=="function"?y:gt},_=r.map((y,$)=>$d(y,x=>{u[$]=x,m&=~(1<<$),s&&v()},()=>{m|=1<<$}));return s=!0,v(),function(){Zs(_),p(),s=!1}})}function be(t){let e;return $d(t,i=>e=i)(),e}var pu=!1,ff=Symbol();function w(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:us(void 0),unsubscribe:gt};if(o.store!==t&&!(ff in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=gt;else{var r=!0;o.unsubscribe=$d(t,l=>{r?o.source.v=l:N(o.source,l)}),r=!1}return t&&ff in i?be(t):n(o.source)}function Be(){let t={};function e(){Io(()=>{for(var i in t)t[i].unsubscribe();ao(t,ff,{enumerable:!1,value:!0})})}return[t,e]}function mf(t){var e=pu;try{return pu=!1,[t(),pu]}finally{pu=e}}var d1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Ve&&ug(`${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 Cn(t,e,i){return new Proxy(Ve?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},d1)}var c1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(Xs(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];Xs(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(Xs(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===sl)return!1;for(let i of t.props)if(Xs(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(Xs(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 Xr(...t){return new Proxy({props:t},c1)}function xh(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function h(t,e,i,o){var W,F;var r=(i&1)!==0,a=!ls||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,s=!1,u;l?[u,s]=mf(()=>t[e]):u=t[e];var m=Ko in t||sl in t,p=l&&((F=(W=Wo(t,e))==null?void 0:W.set)!=null?F:m&&e in t&&(U=>t[e]=U))||void 0,v=o,_=!0,y=!1,$=()=>(y=!0,_&&(_=!1,d?v=St(o):v=o),v);u===void 0&&o!==void 0&&(p&&a&&cg(e),u=$(),p&&p(u));var x;if(a)x=()=>{var U=t[e];return U===void 0?$():(_=!0,y=!1,U)};else{var I=(r?qr:cr)(()=>t[e]);I.f|=131072,x=()=>{var U=n(I);return U!==void 0&&(v=void 0),U===void 0?v:U}}if((i&4)===0&&a)return x;if(p){var T=t.$$legacy;return function(U,X){return arguments.length>0?((!a||!X||T||s)&&p(X?x():U),U):x()}}var R=!1,A=!1,P=us(u),E=qr(()=>{var U=x(),X=n(P);return R?(R=!1,A=!0,X):(A=!1,P.v=U)});return l&&n(E),r||(E.equals=dl),function(U,X){if(iu!==null&&(R=A,x(),n(P)),arguments.length>0){let se=X?n(E):a&&l?ri(U):U;if(!E.equals(se)){if(R=!0,N(P,se),y&&v!==void 0&&(v=se),xh(E))return U;St(()=>n(E))}return U}return xh(E)?E.v:n(E)}}var u1;typeof HTMLElement=="function"&&(u1=class extends HTMLElement{constructor(e,i,o){super();rr(this,"$$ctor");rr(this,"$$s");rr(this,"$$c");rr(this,"$$cn",!1);rr(this,"$$d",{});rr(this,"$$r",!1);rr(this,"$$p_d",{});rr(this,"$$l",{});rr(this,"$$l_u",new Map);rr(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=p1(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]=vf(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=eh({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 Cp(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=vf(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]=vf(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 Cp(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function vf(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 p1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var wh="5";var Sh,Ch,Th;typeof window!="undefined"&&((Th=(Ch=(Sh=window.__svelte)!=null?Sh:window.__svelte={}).v)!=null?Th:Ch.v=new Set).add(wh);import{areValidLiveRecordSources as OT,clientChecker as Iv}from"@vkontakte/videoplayer-core/es2018";import"@vkontakte/videoplayer-core/es2018";import{noop as Bb,safeStorage as BT,throttleFn as HT}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as FT}from"@vkontakte/videoplayer-statistics/es2018";import{InterfaceLanguage as f1,fillWithDefault as m1,VideoQuality as Ih}from"@vkontakte/videoplayer-shared/es2018";var v1={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:f1.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:Ih.Q_480P,highQualityLimit:Ih.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!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},disablePiPResizeHandling:!1,interactive:{historyMaxLength:100,noInteractionEventTimeout:3e4},view:{timelineSliderColor:null,timelineSliderHandleColor:null,timelineSliderFilledColor:null,timelineSliderLoadedColor:null,volumeSliderColor:null,volumeSliderHandleColor:null,volumeSliderFilledColor:null,controlsTimeColor:null,timelineSliderFilledActiveLiveColor:null,timelineSliderHandleActiveLiveColor:null,buttonColor:null,buttonToggleOnColor:null,focusedColor:null,font:null,focusedOutlineWidth:null,focusedOutlineRadius:null,controlsDesktopPaddingHorizontal:null,timelinePaddingHorizontal:null,settingsBackgroundColor:null,controlsGradientHeight:null,controlsGradient:null},userSalt:"0",doubleForwardActivationTime:600,playbackStatusAnimationDuration:1e3,playbackStatusNextVideoAnimationDuration:1e3,suitableDurationForUsingRichSeek:180,titleShowBehaviour:"fullscreen",disabledSlotIds:[],disabledAdditionalButtonIds:[]},Eh=t=>m1(t,v1),Ph=t=>pl("ui-config",t),Mt=()=>ul("ui-config");var yd="vk_player_debug_panel_opened";var kh="videoplayer",Ah="videoplayer";var fs={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Lh=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Mh=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Vh=new Set(["ShiftRight","ShiftLeft"]);var Rh=["TIMELINE"],xd=[...Rh,"GRAPH_BUTTON"],gf=[...Rh,"PLAY_BUTTON"],wd=[...xd,"PLAY_BUTTON"];var ms=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(ms||{}),Sd={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Nh,VERSION as g1}from"@vkontakte/videoplayer-shared/es2018";import{VERSION as h1}from"@vkontakte/videoplayer-core/es2018";import{VERSION as _1}from"@vkontakte/videoplayer-statistics/es2018";var fu="prod",El="1.1.82";var Ma=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Dh=Symbol("storeContext"),Oh=Symbol("microStoresContext"),Bh=(t,e)=>{pl(Dh,t),pl(Oh,e),fu==="dev"&&(window.app={store:t,microStores:e})},$e=()=>{let t=ul(Dh);return Nh(t,"Store context is empty!"),t},vo=()=>{let t=ul(Oh);return Nh(t,"MicroStores context is empty!"),t},ti=(t,e)=>vu(t,t.getValue(),e),vu=(t,e,i)=>kr(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),Hh=(t,e,i,o,r=["meta config not provided"])=>{var F,U,X,se,j,ne,Z,Te,fe;let a=t.info,{width:l,height:d}=be(i.ui.playerSize),s=(U=(F=a.throughputEstimation$.getValue())==null?void 0:F.toFixed(0))!=null?U:0,u=(se=(X=a.rttEstimation$.getValue())==null?void 0:X.toFixed(0))!=null?se:0,m=a.isAutoQualityEnabled$.getValue()?"auto":"manual",p=`${El} (core: ${h1}, stat: ${_1}, shared: ${g1})`,v=be(i.state.errorLog$),_=v.length?`
|
|
45
|
+
`+v.map((te,_e)=>{var Qe;let Ce=`${_e}) Type: ${te.id}
|
|
46
|
+
`,me=`Message: ${te.message} (${te.thrown})
|
|
47
|
+
`,ce=`Trace: ${(Qe=te.thrown)==null?void 0:Qe.stack}
|
|
48
|
+
`;return Ce+me+ce}).join(`
|
|
49
|
+
`):void 0,y=i.state.isAudioDisabled?"disabled":be(i.state.isAudioAvailable$)?void 0:"unavailable",$=t.info.currentVideoStream$.getValue(),x=t.info.currentAudioStream$.getValue(),I=[];$&&I.push(`Video: ${(j=$==null?void 0:$.codec)!=null?j:""}`+($!=null&&$.hdr?" (HDR)":"")),x&&I.push(`Audio: ${(ne=x==null?void 0:x.codec)!=null?ne:""}`+(x!=null&&x.language?` (${x.language})`:""));let T=a.currentQuality$.getValue(),R="";if(T){let te=a.availableQualitiesFps$.getValue()[T];R=te?`${te}fps`:""}let A=a.httpConnectionType$.getValue(),P=(Te=(Z=a.currentBuffer$.getValue())==null?void 0:Z.end)!=null?Te:0,E=Math.max(P-be(i.state.positionExact$),0),W={Version:p,Browser:navigator.userAgent,Config:r.join(", "),"United video id":String(i.videoId),TraceId:o,VSID:be(i.vsid),"Content host":a.hostname$.getValue(),"Connection type":A?A+(a.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${s}Kbps @ ${u}ms RTT`,Format:a.currentFormat$.getValue(),"Available Formats":e!=null&&e.sources?Object.keys(e.sources).join(", "):"",Streams:I.join(", "),Quality:`${m} ${T!=null?T:""} ${R}`,"Available qualities":a.availableQualities$.getValue().join(", "),Audio:y,Position:`${be(i.state.positionExact$)}s`,Buffer:`${E}s`,State:`${be(i.playerPhase)} ${(fe=a.playbackState$.getValue())!=null?fe:""}`,"Player size":`${l}x${d}`,URL:window.location.href,Errors:_};return Object.entries(W).filter(([te,_e])=>_e!==void 0).map(([te,_e])=>`${te}: ${_e}`).join(`
|
|
50
|
+
`)},Fh=(t,e,i)=>{var F,U,X,se;let o=t.info,{width:r,height:a}=be(i.ui.playerSize),l={version:El,viewport:`${r}x${a}`,volume:Math.round(be(i.state.volume$)*100)};l.id=i.videoId,o.currentFormat$.getValue()&&(l.provider=o.currentFormat$.getValue()),o.hostname$.getValue()&&(l.cdn=o.hostname$.getValue());let u=o.intrinsicVideoSize$.getValue();u&&(l.videoSize=`${u.width}x${u.height}`);let m=o.currentBuffer$.getValue(),p=o.currentNativeBuffer$.getValue(),v=o.isLive$.getValue(),_=o.liveBufferTime$.getValue();m&&p&&(v&&_?(l.buffer=m.end-_,l.nativeBuffer=p.end-_):(l.buffer=Math.max(m.end-be(i.state.positionExact$),0),l.nativeBuffer=Math.max(p.end-be(i.state.positionExact$),0))),l.position=be(i.state.positionExact$);let y=o.throughputEstimation$.getValue();y&&(l.speed=y);let $=o.videoBitrate$.getValue();$&&(l.bitrate=$);let x=o.liveLatency$.getValue();x&&(l.liveLatency=x);let I=o.currentVideoSegmentLength$.getValue();I&&(l.currentVideoSegmentLength=I);let T=o.currentAudioSegmentLength$.getValue();T&&(l.currentAudioSegmentLength=T);let R=be(i.vsid);typeof R=="string"&&(l.vsid=R);let A=(F=t.info.currentVideoStream$.getValue())==null?void 0:F.codec;A&&(l.videoCodec=A);let P=(U=t.info.currentAudioStream$.getValue())==null?void 0:U.codec;P&&(l.audioCodec=P),((X=t.info.currentVideoStream$.getValue())==null?void 0:X.hdr)&&(l.hdr=!0);let W=(se=t.info.currentAudioStream$.getValue())==null?void 0:se.language;return W&&(l.audioLanguage=W),l},Uh=(t,e)=>Ma(t,e,"mp4"),zh=t=>!t.type,Wh=t=>!!t.type,Kh=()=>{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 $f,safeStorage as Si}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-core/es2018";var b1="vk_player_",qh="vk_player_prefer_traffic_saving_enabled",Qh="vk_player_preferred_volume",Gh="vk_player_prefer_volume_mute",yf="vk_player_preferred_quality",hf="vk_player_preferred_default_quality_settings",_f="vk_player_preferred_quality_settings_by_video",Yh="vk_player_preferred_stream_language",jh="vk_player_preferred_rate",Xh="vk_player_preferred_autoplay_next",bf="vk_player_preferred_subtitles_language",Zh="vk_player_user_video_prefs",Jh=`${b1}preview_track_close_tooltip`,e_=t=>t>1?1:t<0?0:t,xf=t=>Si.set(Qh,e_(t).toString(10)),gu=()=>{let t=Si.get(Qh);return $f(t)?void 0:e_(parseFloat(t))},wf=(t,e)=>Si.set(yf,JSON.stringify({videoId:t,value:e})),hu=()=>Si.remove(yf),Sf=t=>{let e=Si.get(yf);if($f(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){hu();return}return o},t_=(t,e)=>{e?Si.set(t,"true"):Si.remove(t)},Cf=t=>Si.get(t)==="true",Tf=t=>t_(Gh,t),i_=()=>Cf(Gh),Cd=t=>t_(qh,t),If=()=>Cf(qh),o_=()=>Si.get(Yh),Ef=t=>Si.set(Yh,t),Pf=()=>Si.get(bf),kf=t=>{t?Si.set(bf,t):Si.remove(bf)},n_=t=>Si.set(jh,JSON.stringify({rate:t})),r_=()=>{let t=Si.get(jh);if($f(t))return;let{rate:e}=JSON.parse(t);return e},s_=t=>{Si.set(Xh,String(t))},a_=()=>Cf(Xh),$1=()=>{let t=m=>{Si.set(hf,JSON.stringify(m))},e=()=>{try{let m=Si.get(hf);return m?JSON.parse(m):null}catch(m){return null}},i=()=>{try{let m=Si.get(_f);return m?JSON.parse(m):null}catch(m){return null}},o=m=>{Si.set(_f,JSON.stringify(m))},r=m=>{u(m);let p=m?i():null;if(p&&(p==null?void 0:p.videoId)===m)return{...p,appliesTo:"to-video"};p&&a();let v=e();return v?{...v,appliesTo:"as-default"}:(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{Si.remove(_f)},l=()=>{Si.remove(hf)},d=(m,p="as-default")=>{m.type==="exact_quality"||p==="to-video"?o(m):t(m)},s=m=>{let p=r(m);if(p){switch(p.type){case"traffic_saving":Cd(!0);break;case"exact_quality":wf(m,p.quality)}a(),l()}},u=m=>{let p=Sf(m);if(p){o({type:"exact_quality",videoId:m,quality:p});return}If()&&t({type:"traffic_saving",videoId:m}),Cd(!1),hu()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:Pf,savePreferredSubtitlesLanguage:kf}},{getPreferredQualitySettings:l_,migrateSettingsToLegacyWay:d_,savePreferredQualitySettings:_u,savePreferredDefaultQualitySettings:XV,removePreferredQualitySettingsByVideo:ZV,getPreferredDefaultQualitySettings:bu}=$1(),y1=3,x1=3,c_=()=>{let t=Si.get(Zh);if(t)try{return JSON.parse(t)}catch(e){return null}return null},$u=(t,e)=>{var r,a;let i=c_();return(a=(r=i==null?void 0:i[t])==null?void 0:r[e])!=null?a:null},Af=(t,e,i)=>{var l,d,s;let o=(l=c_())!=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=w1(o);Si.set(Zh,JSON.stringify(a))};function w1(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(x1),e.reduce((o,[r])=>(o[r]=S1(t[r]),o),{})}function S1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(y1),Object.fromEntries(e)}function u_(){Si.set(Jh,JSON.stringify(!0))}function p_(){let t=Si.get(Jh);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Nb}from"@vkontakte/videoplayer-core/es2018";gg();var oa="var(--btn-color, #fff)";var C1=Ee('<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),T1=Ee('<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=h(e,"width",19,()=>"24"),o=h(e,"height",19,()=>"24"),r=h(e,"fill",3,oa),a=(m=e.viewBox)!=null?m:`0 0 ${i()} ${o()}`;var l=T1(),d=C(l);{var s=p=>{var v=C1(),_=le(v),y=C(_);ei(y,()=>e.children),S(_),Jt(),b(p,v)},u=p=>{var v=Re(),_=le(v);ei(_,()=>e.children),b(p,v)};V(d,p=>{e.shadow?p(s):p(u,!1)})}S(l),O(()=>{Ne(l,"aria-label",e.ariaLabel),Ne(l,"aria-hidden",!e.ariaLabel),Ne(l,"width",i()),Ne(l,"height",o()),Ne(l,"viewBox",a),Ne(l,"fill",r()),qe(l,e.style),Ne(l,"data-testid",e.testId)}),b(t,l),H()}import{isNullable as v_,InterfaceLanguage as g_}from"@vkontakte/videoplayer-shared/es2018";var I1={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:"Выйти из режима точной перемотки"},f_=I1;var E1={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 R1(t){try{let e=V1(t);if(e)return e}catch(e){}return{value:b_(t),type:t&&t.name,stacktrace:{frames:[]}}}function N1(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var Su=class{constructor(e){if(e&&e.dsn){let i=M1.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:[R1(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(L1,this.authHeader||""),i.send(JSON.stringify(e))}getRequestBlank(){return{platform:"javascript",event_id:N1(),sdk:{name:"micro-sentry.javascript.core",version:"0.0.0"},timestamp:Date.now()/1e3,environment:this.environment}}};function $_(t,e){return Object.prototype.toString.call(e)==="[object RegExp]"?e.test(t):typeof e=="string"?t.indexOf(e)!==-1:!1}function D1(){return window}var Cu=class t extends Su{constructor(e,i=D1()){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=>$_(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=>$_(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 O1}from"@vkontakte/videoplayer-shared/es2018";var Iu=null,Na=class{constructor(e,i,o={}){!Iu&&e.dsn&&(this.sentryClient=new Cu({dsn:e.dsn,environment:i.env}),this.version=i.version,this.sentrySubscription=new O1,this.options=e,this.context=o,Iu=this)}destroy(){var e,i;(e=this.sentryClient)==null||e.destroy(),(i=this.sentrySubscription)==null||i.unsubscribe(),Iu=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:p}=l,{errorType:v,category:_}=i;if(Tu(_)&&p.includes(_)||Tu(v)&&m.includes(v))return;if(Math.random()<=d||Tu(_)&&u.includes(_)||Tu(v)&&s.includes(v)){Object.keys(i).length&&r.setTags({version:this.version,...i}),(Object.keys(a).length||Object.keys(o).length)&&r.setExtras({...a,...o});try{v&&r.captureMessage(v,i.fatal?Al.fatal:Al.error),r.report(e)}catch($){console.error($)}}}static getInstance(){return Iu}};var vs=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(vs||{});var Eu=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()},Pu=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),y_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,x_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},kd=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},na=()=>!!kd(),ku=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},Au=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},w_=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 S_}from"@vkontakte/videoplayer-core/es2018";var C_=()=>({title:j("hotkey_map_modal_title"),closeBtnText:j("hotkey_map_modal_close_btn_text"),groups:[{title:j("hotkey_map_group_title_common"),items:[{description:j("hotkey_map_item_mute_description"),value:j("hotkey_map_item_mute_value")},{description:j("hotkey_map_item_volume_up_description"),value:j("hotkey_map_item_volume_up_value")},{description:j("hotkey_map_item_volume_down_description"),value:j("hotkey_map_item_volume_down_value")},{description:j("hotkey_map_item_pip_description"),value:j("hotkey_map_item_pip_value")},{description:j("hotkey_map_item_full_screen_description"),value:j("hotkey_map_item_full_screen_value")},{description:j("hotkey_map_item_show_context_menu_description"),value:j("hotkey_map_item_show_context_menu_value")},{description:j("hotkey_map_item_show_hotkey_map_description"),value:j("hotkey_map_item_show_hotkey_map_value")}]},{title:j("hotkey_map_group_title_playback"),items:[{description:j("hotkey_map_item_play_toggle_description"),value:j("hotkey_map_item_play_toggle_value")},{description:j("hotkey_map_item_seek_backward_description"),value:j("hotkey_map_item_seek_backward_value")},{description:j("hotkey_map_item_seek_forward_description"),value:j("hotkey_map_item_seek_forward_value")},{description:j("hotkey_map_item_fast_seek_backward_description"),value:j("hotkey_map_item_fast_seek_backward_value")},{description:j("hotkey_map_item_fast_seek_forward_description"),value:j("hotkey_map_item_fast_seek_forward_value")},{description:j("hotkey_map_item_rate_down_description"),value:j("hotkey_map_item_rate_down_value")},{description:j("hotkey_map_item_rate_up_description"),value:j("hotkey_map_item_rate_up_value")},{description:j("hotkey_map_item_prev_frame_description"),value:j("hotkey_map_item_prev_frame_value")},{description:j("hotkey_map_item_next_frame_description"),value:j("hotkey_map_item_next_frame_value")},{description:j("hotkey_map_item_jump_seek_description"),value:j("hotkey_map_item_jump_seek_value")},{description:j("hotkey_map_item_next_video_description"),value:j("hotkey_map_item_next_video_value")},{description:j("hotkey_map_item_prev_video_description"),value:j("hotkey_map_item_prev_video_value")}]},{title:j("hotkey_map_group_title_subtitles"),items:[{description:j("hotkey_map_item_subtitles_toggle_description"),value:j("hotkey_map_item_subtitles_toggle_value")}]},{title:j("hotkey_map_group_title_episodes"),items:[{description:j("hotkey_map_item_prev_episode_description"),value:S_.device.isApple?j("hotkey_map_item_prev_episode_mac_value"):j("hotkey_map_item_prev_episode_pc_value")},{description:j("hotkey_map_item_next_episode_description"),value:S_.device.isApple?j("hotkey_map_item_next_episode_mac_value"):j("hotkey_map_item_next_episode_pc_value")}]}]});import{devNull as T_,now as I_}from"@vkontakte/videoplayer-shared/es2018";function Df(t,e){B(e,!1);let i=be();Mt(()=>{i.getAdmanWrapper().startPostroll()}),fo(),H()}import{noop as F1}from"@vkontakte/videoplayer-shared/es2018";var B1=Ie('<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>'),H1=Ie('<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 Lr(t,e){B(e,!0);let i=h(e,"direction",3,"left"),o=h(e,"useBtnColor",3,!1),r=f(()=>["up","down"].includes(i())),a=f(()=>["right","down"].includes(i())),l=f(()=>`chevron-icon--${i()}`),d=f(()=>(()=>{let m="";return n(a)&&(m+="transform: rotate(180deg);"),m.length?m:void 0})()),s=f(()=>o()?oa:"currentColor"),u=f(()=>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,p)=>{var v=Le(),_=ue(v);{var y=x=>{var I=B1();b(x,I)},$=x=>{var I=H1();b(x,I)};V(_,x=>{n(r)?x(y):x($,!1)})}b(m,v)},$$slots:{default:!0}}),H()}var U1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},z1=L('<div class="skip s-1h"> <!></div>'),W1=L("<div><!></div>"),K1={hash:"s-1h",code:".container.s-1h{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-1h{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-1h{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-1h{color:var(--white);cursor:pointer}.skippable.s-1h:hover{color:hsla(0,0%,100%,.75)}"};function Of(t,e){B(e,!0),Q(t,K1);let[i,o]=Ne(),r=()=>w(u,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"secondsToWatchBeforeSkip",3,0),d=h(e,"skipAd",3,F1),u=be().ui.isMobile,m=f(()=>a()>0&&a()>=l());var p=W1();let v;p.__click=[U1,m,d];var _=C(p);{var y=x=>{var I=z1(),T=C(I),R=k(T);Lr(R,{direction:"right"}),S(I),O(A=>ve(T,`${A!=null?A:""} `),[()=>j("skip_ads_now")]),b(x,I)},$=x=>{var I=ps();O(T=>ve(I,T),[()=>j("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),b(x,I)};V(_,x=>{n(m)?x(y):x($,!1)})}S(p),O(x=>v=oe(p,1,"container s-1h",null,v,x),[()=>({"container-mobile":r(),skippable:n(m)})]),b(t,p),H(),o()}Qe(["click"]);var q1=L('<button class="go-to-site s-1g"> </button>'),Q1={hash:"s-1g",code:"button.go-to-site.s-1g{background:#fff;border:none;border-radius:6px;bottom:14px;color:#000;font-size:15px;left:16px;padding:6px 10px;pointer-events:none;position:absolute}"};function Bf(t,e){B(e,!1),Q(t,Q1),fo();var i=q1(),o=C(i,!0);S(i),O(r=>ve(o,r),[()=>j("visit_advertiser")],Sn),b(t,i),H()}var G1=L('<div class="top-gradient-mobile s-o"></div>'),Y1=L('<div class="container s-o"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),j1={hash:"s-o",code:".container.s-o{height:100%;width:100%}.top-gradient-mobile.s-o{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 Ad(t,e){B(e,!0),Q(t,j1);let[i,o]=Ne(),r=()=>w(U,"$canSkipAd",i),a=()=>w(F,"$adPlaybackState",i),l=()=>w(R,"$isMobile",i),d=()=>w(X,"$adPosition",i),s=()=>w(ae,"$secondsToWatchBeforeSkipAd",i),u=()=>w(T,"$isVideoEnded",i),m=h(e,"adsSlotId",3,void 0),p=h(e,"adsParams",3,void 0),v=h(e,"adsAutoplayParam",3,void 0),_=h(e,"duration",3,0),y=h(e,"adsExternalApi",3,void 0),$=h(e,"adsJson",3,void 0),x=be(),I=Vt(),T=x.state.isEnded$,R=x.ui.isMobile,A=I.ads.isMobileGoToSiteButton,P=q(void 0),E=q(void 0),z=!1,F=x.ads.playbackState,U=x.ads.canSkip,X=x.ads.position,ae=x.ads.secondsToWatchBeforeSkip,Z=f(()=>r()&&a()!=="inactive"),re=f(()=>l()&&a()!=="inactive"&&A);Mt(()=>{let D=x.getAdmanWrapper();if(T_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[I_(),m()]}),!m()){D.onAdmanLoadingError();return}let qe=()=>{var Ae;let{width:Be,height:et}=ye(x.ui.playerSize),ne=ye(x.ui.isFullscreen),ce=(Ae=v())!=null?Ae:ye(x.ui.isAutoplay),Re=I.ads.paramsOverride;return{width:Be,height:et,isFullscreen:ne,isAutoplay:ce,adsContainer:n(P),adsVideoElement:n(E),slotId:m(),params:p(),paramsOverride:Re,duration:_(),externalApi:y(),json:$()}},K=async Be=>{Be&&await co();let et=qe();await D.initAdman(et),z=!0},se=new AbortController,xe=()=>{se.abort()};return window.AdmanHTML?K(!0).catch(()=>{D.onAdmanLoadingError()}):D.loadAdman(se.signal).then(()=>K(!1)).catch(()=>{D.onAdmanLoadingError()}),()=>{T_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[I_(),m()]}),!z&&xe()}});var J=Y1(),we=C(J);{var me=D=>{var qe=G1();b(D,qe)};V(we,D=>{l()&&D(me)})}var ee=k(we,2);Ye(ee,D=>N(E,D),()=>n(E));var _e=k(ee,2);{var Ce=D=>{Of(D,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return x.actions.internal.skipAd}})};V(_e,D=>{n(Z)&&D(Ce)})}var ge=k(_e,2);{var pe=D=>{Df(D,{})};V(ge,D=>{u()&&D(pe)})}var Ke=k(ge,2);{var G=D=>{Bf(D,{})};V(Ke,D=>{n(re)&&D(G)})}S(J),Ye(J,D=>N(P,D),()=>n(P)),b(t,J),H(),o()}var Go=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 X1=Ie('<path fill="#fff"></path>'),Z1=Ie("<path></path><!>",1);function Ld(t,e){let i=h(e,"isActive",3,!1),o=f(()=>i()?"live-active-icon":"live-icon"),r=f(()=>i()?"var(--timeline-slider-filled-active-live-bg, #FF3347)":void 0),a="M8 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2H9V6a1 1 0 0 0-1-1m7 1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0zm15-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-2h3a1 1 0 1 0 0-2h-3V7h3a1 1 0 1 0 0-2zm-8.32 9.31-2.55-7.82a1 1 0 0 1-.12-.37L19 6.1a1 1 0 1 1 2-.2l2 6.4 2-6.4a1 1 0 0 1 2 .2v.02a1 1 0 0 1-.13.37l-2.55 7.82a1 1 0 0 1-.95.69h-.74a1 1 0 0 1-.95-.69";je(t,{width:"42",height:"20",get testId(){return n(o)},get fill(){return n(r)},children:(l,d)=>{var s=Z1(),u=ue(s),m=k(u);{var p=v=>{var _=X1();Ve(_,"d",a),b(v,_)};V(m,v=>{i()&&v(p)})}O(()=>Ve(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 J1=L('<div class="equalizer s-b"><div class="col s-b"></div> <div class="col s-b"></div> <div class="col s-b"></div></div>'),ey=L('<div class="live-icon s-b"><!></div>'),ty=L('<span class="text s-b"> </span>'),iy=L("<div><!> <!></div>"),oy={hash:"s-b",code:".wrapper.s-b{background-color:var(--black-alpha-40);border-radius:4px;padding:2px 6px;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);white-space:nowrap}.wrapper.live.s-b{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-b{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-b .equalizer:where(.s-b){margin-top:-2px}.equalizer.s-b .col:where(.s-b){animation:1.5s linear infinite alternate;animation-play-state:paused;background:var(--btn-color,--white);bottom:0;height:10px;margin-right:2px;position:absolute;transform-origin:50% 100%;width:2px}.playing.s-b .equalizer:where(.s-b) .col:where(.s-b){animation-play-state:running}.equalizer.s-b .col:where(.s-b):first-child{animation-name:s-b-thumb-timer-equalizer-col1;left:0}.equalizer.s-b .col:where(.s-b):nth-child(2){animation-name:s-b-thumb-timer-equalizer-col2;left:3px}.equalizer.s-b .col:where(.s-b):nth-child(3){animation-name:s-b-thumb-timer-equalizer-col3;left:6px}.live-icon.s-b{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-b-thumb-timer-equalizer-col1{0%{transform:scaleY(.1)}25%{transform:scaleY(.8)}50%{transform:scaleY(.4)}75%{transform:scaleY(.6)}to{transform:scaleY(.1)}}@keyframes s-b-thumb-timer-equalizer-col2{0%{transform:scaleY(1)}25%{transform:scaleY(.3)}50%{transform:scaleY(.9)}75%{transform:scaleY(.6)}to{transform:scaleY(1)}}@keyframes s-b-thumb-timer-equalizer-col3{0%{transform:scaleY(.6)}25%{transform:scaleY(.9)}50%{transform:scaleY(.1)}75%{transform:scaleY(.9)}to{transform:scaleY(.6)}}.text.s-b{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function Md(t,e){Q(t,oy);let i=h(e,"withEqualizer",3,!1),o=h(e,"isLive",3,!1),r=h(e,"isPlaying",3,!1);var a=iy();let l;var d=C(a);{var s=v=>{var _=J1();b(v,_)};V(d,v=>{i()&&v(s)})}var u=k(d,2);{var m=v=>{var _=ey(),y=C(_);Ld(y,{isActive:!0}),S(_),b(v,_)},p=v=>{var _=ty(),y=C(_,!0);S(_),O(()=>ve(y,e.time)),b(v,_)};V(u,v=>{o()?v(m):v(p,!1)})}S(a),O(v=>l=oe(a,1,"wrapper s-b",null,l,v),[()=>({live:o(),playing:r()})]),b(t,a)}var Ll=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var ny=L('<div role="timer" data-testid="thumb-timer"><!></div>'),ry={hash:"s-n",code:".thumb-timer.s-n{bottom:0;margin:8px;position:absolute;right:0;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);z-index:var(--thumb-timer-z-index)}"};function Vd(t,e){B(e,!0),Q(t,ry);let[i,o]=Ne(),r=()=>w(m,"$disabled",i),a=h(e,"isHidden",3,!1),l=h(e,"isLive",3,!1),d=h(e,"isPlaying",3,!1),s=Vt(),u=f(()=>Go(e.duration-e.position)),m=de(!1);var p=ny();let v;var _=C(p);Md(_,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(p),Ms(p,()=>Ll(a()&&s.features.usePerformanceFix,m,s.disableInvisibleComponentsTimeout)),O(y=>v=oe(p,1,"thumb-timer s-n",null,v,y),[()=>({"out-of-flow":r(),hidden:a()})]),b(t,p),H(),o()}var Ml=t=>{if(!navigator.clipboard){E_(t);return}navigator.clipboard.writeText(t).catch(()=>E_(t))};function E_(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 gy,clientChecker as hy}from"@vkontakte/videoplayer-core/es2018";import{clientChecker as P_}from"@vkontakte/videoplayer-core/es2018";var Hf="focus-hidden";var Mr=t=>{t.stopPropagation(),t.preventDefault()},Ff=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Hf)},ay=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},ly=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},dy=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},cy=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},k_=t=>t.code==="Escape",uy=t=>t.code==="ArrowLeft",Rd=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},A_=t=>{dy(t)?(Mr(t),ly(t.target)):cy(t)&&(Mr(t),ay(t.target))},aa=t=>!P_.device.isAndroid&&(t==null?void 0:t.detail)===0||P_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Vl=async(t,e,i)=>{await co(),t&&!t.classList.contains("opened")&&!e&&ye(i)&&(await co(),i.set(!1),t.focus())},L_=async(t,e,i)=>{await co(),t&&!e&&ye(i)&&(i.set(!1),t.focus())},Nd=async(t,e,i,o=!1)=>{if(await co(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Hf,!i),a==null||a.focus()}},M_=async(t,e)=>{setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)},Lu=(t,e)=>{A_(t),Ff(t.target),k_(t)&&(Mr(t),e())},Mu=async(t,e)=>{Rd(t,["ArrowRight"])&&(Mr(t),e())},V_=async(t,e,i)=>{if(A_(t),uy(t)){Mr(t),e();return}k_(t)&&(Mr(t),i())},Rl=(t,e)=>{Rd(t)&&(Mr(t),e())},R_=(t,e,i)=>{if(Rd(t))Mr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Mr(t);return}o==="ArrowRight"&&!e&&(i(!0),Mr(t))}},N_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},D_=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 Vu,isValidURL as _y}from"@vkontakte/videoplayer-shared/es2018";var is={"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 O_}from"@vkontakte/videoplayer-shared/es2018";var fy=(t,e)=>{Rl(t,()=>e())},my=L('<li class="item s-1m" role="menuitem" tabindex="0"> </li>'),vy={hash:"s-1m",code:".item.s-1m{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-1m:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function Uf(t,e){B(e,!0),Q(t,vy);let i=h(e,"onClick",3,O_),o=h(e,"closeContextMenu",3,O_),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=my();a.__click=r,a.__keydown=[fy,r];var l=C(a,!0);S(a),O(()=>{var d;Ve(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Ve(a,"data-testid",e.id),ve(l,e.label)}),b(t,a),H()}Qe(["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 by=(t,e)=>{Lu(t,e)},$y=t=>{t.preventDefault()},yy=L('<ul role="menu" data-testid="context-menu" class="s-y"></ul>'),xy={hash:"s-y",code:"ul.s-y{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 zf(t,e){B(e,!0),Q(t,xy);let[i,o]=Ne(),r=()=>w(we,"$playerPhase",i),a=()=>w(ae,"$isLive$",i),l=()=>w(me,"$isPiPEnabled$",i),d=()=>w(X,"$chromecastState$",i),s=()=>w(ee,"$pictureInPictureApiIsActive$",i),u=()=>w(J,"$isLooped$",i),m=()=>w(Z,"$positionExact$",i),p=()=>w(z,"$additionalContextMenuItems$",i),v=h(e,"visible",3,!1),_=h(e,"position",19,()=>({top:0,left:0})),y=h(e,"playerContainerRef",3,void 0),$=h(e,"menuElementRef",15,void 0),x=q(0),I=q(0),T=be(),{pictureInPicture$:R}=mo(),A=Vt(),P=T.ui.contextMenu.visible$,E=T.ui.debugPanelVisible,z=T.ui.additionalContextMenuItems$,F=T.ui.t,U=T.actions.internal.togglePictureInPicture,X=T.state.chromecastState$,ae=T.state.isLive$,Z=T.state.positionExact$,re=T.state.isInteractive,J=T.state.looped$,we=T.playerPhase,{isEnabled$:me,isActive$:ee}=R,_e=f(()=>r()==="video"),Ce=f(()=>!!a()&&n(_e)),ge=f(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),pe=f(()=>{var fe;return A.features.copyVideoLink&&((fe=T.callbacks)==null?void 0:fe.onCopyVideoLink)}),Ke=f(()=>n(pe)&&!n(ge)&&!re&&!n(Ce)),G=f(()=>{var fe;return!!((fe=T.callbacks)!=null&&fe.onCopyEmbedCodeClicked)}),D=f(()=>l()&&d()!==gy.CONNECTED&&!re&&n(_e)&&!hy.browser.isFirefox),qe=f(()=>!re&&!n(ge)&&!n(Ce)),K=f(()=>A.features.videoRotate&&!re&&!n(ge)),se=f(()=>A.showSupport&&!s()),xe=f(()=>A.features.saveTraceInfoToFile),Be=()=>{var fe;P.set(!1),(fe=e.returnFocus)==null||fe.call(e)},et=(fe,Oe)=>{if(!$()||!y())return;let ze=$().getBoundingClientRect(),yt=y().getBoundingClientRect();N(x,fe-yt.left),N(I,Oe-yt.top),n(x)+ze.width>yt.width&&N(x,yt.width-ze.width),n(I)+ze.height>yt.height&&N(I,yt.height-ze.height),N(x,Math.max(n(x),0),!0),N(I,Math.max(n(I),0),!0)};De(()=>{(async()=>{if($()&&y()){await co();let{top:Oe,left:ze,bottom:yt,right:qt}=_(),St=ze!=null?ze:0,ni=Oe!=null?Oe:0,ci=$().getBoundingClientRect();Vu(ze)&&!Vu(qt)&&(St=qt-ci.width),Vu(Oe)&&!Vu(yt)&&(ni=yt-ci.height),St=Math.max(St,0),ni=Math.max(ni,0),et(St,ni)}})()});let ne=()=>{T.actions.internal.videoRotate()},ce=()=>{_y(e.supportLink)&&window.open(e.supportLink,"_blank"),T.actions.internal.reportProblem(),T.actions.internal.pause()},Re=()=>{let fe=T.actions.internal.getDebugTextData();if(A.features.saveDebugInfoToFile){let Oe=new Blob([...fe],{type:"plain/text"}),ze=window.URL.createObjectURL(Oe);Ra(ze,"vk_player_debug_info","txt")}else Ml(T.actions.internal.getDebugTextData())},Ae=()=>{let fe=T.actions.internal.getTraceTextData(),Oe=new Blob([...fe],{type:"application/json"}),ze=window.URL.createObjectURL(Oe);Ra(ze,"vk_player_trace_info","json")},Ze=()=>{E.set(!0)},Ee=async()=>{var fe;try{U()}finally{(fe=e.returnFocus)==null||fe.call(e)}},Te=()=>{T.actions.internal.setLooped(!u())},He=()=>{var fe,Oe;if(n(G)){let ze=(Oe=(fe=T.callbacks)==null?void 0:fe.onCopyEmbedCodeClicked)==null?void 0:Oe.call(fe);ze&&Ml(ze)}},It=(fe=!1)=>{var Oe,ze;if((Oe=T.callbacks)!=null&&Oe.onCopyVideoLink){let yt=(ze=T.callbacks)==null?void 0:ze.onCopyVideoLink(fe,m());yt&&Ml(yt)}},wt=f(()=>A.features.saveDebugInfoToFile?F("menu_save_debug"):F("menu_copy_debug")),At=f(()=>n(pe)?{id:"copy-link",weight:is["copy-link"],label:F("menu_copy_video_link"),onClick:()=>It()}:void 0),dt=f(()=>n(Ke)?{id:"copy-link-timestamp",weight:is["copy-link-timestamp"],label:F("menu_copy_video_link_with_timestamp"),onClick:()=>It(!0)}:void 0),Et=f(()=>n(G)?{id:"copy-embed-code",weight:is["copy-embed-code"],label:F("menu_copy_embed_code"),onClick:He}:void 0),jt=f(()=>n(D)?{id:"pip",weight:is.pip,label:s()?F("menu_pip_close"):F("menu_pip"),onClick:Ee}:void 0),Pt=f(()=>n(qe)?{id:"video-loop",weight:is["video-loop"],label:u()?F("menu_video_loop_off"):F("menu_video_loop_on"),ariaLabel:F("aria_label_menu_loop"),onClick:Te}:void 0),Dt=f(()=>n(K)?{id:"rotate",weight:is.rotate,label:F("menu_video_rotate"),ariaLabel:F("aria_label_menu_rotate"),onClick:ne}:void 0),Ut=f(()=>n(se)?{id:"report",weight:is.report,label:F("menu_report"),ariaLabel:`${F("menu_report")}. ${F("aria_label_new_tab_alert")}`,onClick:ce}:void 0),Y=f(()=>({id:"save-debug",weight:is["save-debug"],label:n(wt),onClick:Re})),Pe=f(()=>n(xe)?{id:"save-trace",weight:is["save-trace"],label:F("menu_save_debug"),onClick:Ae}:void 0),le=f(()=>({id:"debug-info",weight:is["debug-info"],label:F("menu_debug_overlay"),ariaLabel:F("aria_label_menu_debug_overlay"),onClick:Ze})),$e=f(()=>[n(At),n(dt),n(Et),n(jt),n(Pt),n(Dt),n(Ut),n(Y),n(Pe),n(le),...p()].filter(fe=>!!fe).sort(Oa));var Me=Le(),st=ue(Me);{var $t=fe=>{var Oe=yy();Oe.__contextmenu=[$y],Oe.__keydown=[by,Be],gi(Oe,21,()=>n($e),ze=>ze.id,(ze,yt)=>{Uf(ze,{get id(){return n(yt).id},get label(){return n(yt).label},get ariaLabel(){return n(yt).ariaLabel},get onClick(){return n(yt).onClick},closeContextMenu:Be})}),S(Oe),Ye(Oe,ze=>$(ze),()=>$()),O(()=>{var ze,yt;return We(Oe,`top: ${(ze=n(I))!=null?ze:""}px; left: ${(yt=n(x))!=null?yt:""}px;`)}),b(fe,Oe)};V(st,fe=>{v()&&fe($t)})}b(t,Me),H(),o()}Qe(["contextmenu","keydown"]);var Ru=class{constructor(e){this.value=e,this.next=null}};var Nl=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Ru(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 wy=L('<div class="container s-1f"><canvas class="s-1f"></canvas></div>'),Sy={hash:"s-1f",code:".container.s-1f{display:inline-block;height:16px;width:120px}canvas.s-1f{margin-top:2px;transform:scaleY(-1)}"};function Od(t,e){B(e,!0),Q(t,Sy);let i=h(e,"values",19,()=>[]),o=q(void 0),r=q(null),a=16,l=120,d=60,s=l/d;Mt(()=>{n(o).width=l,n(o).height=a,N(r,n(o).getContext("2d"),!0)});function u(v,_,y,$,x){x===0&&(x=1),v.fillStyle="#fff",v.fillRect(_,y,$,x)}De(()=>{let v="";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 x=y*s,I=_>0?a*(i()[$]/_):0;u(n(r),x,0,s,I),v=I+" "+v,y--}}});var m=wy(),p=C(m);Ye(p,v=>N(o,v),()=>n(o)),S(m),b(t,m),H()}import{safeStorage as B_}from"@vkontakte/videoplayer-shared/es2018";var Cy=(t,e)=>{t.stopPropagation(),B_.remove(Sd),e.set(!1)},Ty=L('<div class="s-h"><div class="s-h">Video id</div> <span> </span></div>'),Iy=L('<div class="s-h"><div class="s-h">VSID</div> <span> </span></div>'),Ey=L('<div class="s-h"><div class="s-h">Provider</div> <span> </span></div>'),Py=L('<div class="s-h"><div class="s-h">Streams</div> <span> </span></div>'),ky=L('<div class="s-h"><div class="s-h">Viewport</div> <span> </span></div>'),Ay=L('<div class="s-h"><div class="s-h">Video size</div> <span> </span></div>'),Ly=L('<div class="s-h"><div class="s-h">CDN host</div> <span> </span></div>'),My=L('<div class="s-h"><div class="s-h">Volume</div> <span> </span></div>'),Vy=L('<div class="s-h"><div class="s-h">Position</div> <span> </span></div>'),Ry=L('<div class="s-h"><div class="s-h">Buffer</div> <span> </span></div>'),Ny=L('<div class="s-h"><div class="s-h">Nbuffer</div> <span> </span></div>'),Dy=L('<div class="s-h"><div class="s-h">Live latency</div> <span> </span></div>'),Oy=L('<div class="s-h"><div class="s-h">Segment</div> <span> </span></div>'),By=L('<div class="s-h"><div class="s-h">Network</div> <!> <span> </span></div>'),Hy=L('<div class="s-h"><div class="s-h">V bitrate</div> <!> <span> </span></div>'),Fy=L('<div role="region"><button class="close s-h" title="закрыть">[x]</button> <div class="content s-h"><div class="s-h"><div class="s-h">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-h"><div class="s-h">Dropped</div> <span> </span></div> <!> <!> <div class="s-h"><div class="s-h">FPS</div> <!> <span> </span></div></div></div>'),Uy={hash:"s-h",code:".container.s-h{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-h{left:16px;top:16px}button.close.s-h{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-h{padding:5px}.content.s-h>div:where(.s-h)>div:where(.s-h){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Bd(t,e){B(e,!0),Q(t,Uy);let[i,o]=Ne(),r=()=>w(d,"$isMobile",i),a=be(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=q(li(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),m=q(0),p=q(0),v=q(0),_=new Nl(60),y=new Nl(60),$=new Nl(60),x=q(li([])),I=q(li([])),T=q(li([])),R=j("aria_label_debug_panel");Mt(()=>{B_.set(Sd,"true"),a.actions.internal.startLogging(),u&&(N(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),N(m,u.getVideoPlaybackQuality().totalVideoFrames,!0));let Y=window.setInterval(()=>{N(s,a.actions.internal.getDebugPanelData(),!0)},500),Pe;return u&&(Pe=window.setInterval(()=>{if(u){N(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let le=u.getVideoPlaybackQuality().totalVideoFrames;N(v,le-n(m)),N(m,le,!0),_.push(n(v)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&$.push(n(s).bitrate),N(x,_.getValuesFromBottom(),!0),N(I,y.getValuesFromBottom(),!0),N(T,$.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(Y),Pe&&clearInterval(Pe)}});var A=Fy();let P;var E=C(A);E.__click=[Cy,l];var z=k(E,2),F=C(z),U=k(C(F),2),X=C(U,!0);S(U),S(F);var ae=k(F,2);{var Z=Y=>{var Pe=Ty(),le=k(C(Pe),2),$e=C(le,!0);S(le),S(Pe),O(()=>ve($e,n(s).id)),b(Y,Pe)};V(ae,Y=>{n(s).id&&Y(Z)})}var re=k(ae,2);{var J=Y=>{var Pe=Iy(),le=k(C(Pe),2),$e=C(le,!0);S(le),S(Pe),O(()=>ve($e,n(s).vsid)),b(Y,Pe)};V(re,Y=>{n(s).vsid&&Y(J)})}var we=k(re,2);{var me=Y=>{var Pe=Ey(),le=k(C(Pe),2),$e=C(le,!0);S(le),S(Pe),O(()=>ve($e,n(s).provider)),b(Y,Pe)};V(we,Y=>{n(s).provider&&Y(me)})}var ee=k(we,2);{var _e=Y=>{var Pe=Py(),le=k(C(Pe),2),$e=C(le);S(le),S(Pe),O(()=>{var Me,st;return ve($e,`Video: ${(Me=n(s).videoCodec||"")!=null?Me:""} ${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"},m_=E1;var Vs=new Map;Vs.set(g_.EN,m_);Vs.set(g_.RU,f_);var h_=new Map,Lf=({language:t,pack:e,fallback:i})=>{if(Vs.has(t)){let o=Vs.get(t);Vs.set(t,{...o,...e})}else Vs.set(t,e);h_.set(t,i)},Mf=t=>Vs.has(t),Vf=(t,e,i,o)=>{var l;let r=Vs.get(t),a=r==null?void 0:r[e];if(v_(a)){let d=(l=h_.get(t))!=null?l:o,s=d?Vs.get(d):void 0;a=s==null?void 0:s[e]}return v_(a)?e+Object.values(i!=null?i:{}).join(" "):i?a.replaceAll(/{(\w+?)}/g,(d,s)=>{var u;return(u=i[s])!=null?u:""}):a},Y=(t,e)=>{let{interfaceLanguage$:i}=$e(),o=be(i),r=Mt();return Vf(o,t,e,r.defaultLanguage)};var P1=Ee('<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 Td(t,e){B(e,!1);let i=Y("video360");jo(),je(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,r)=>{var a=P1();b(o,a)},$$slots:{default:!0}}),H()}import"@vkontakte/videoplayer-core/es2018";var Pl;(function(t){t.fatal="fatal",t.error="error",t.warning="warning",t.log="log",t.info="info",t.debug="debug",t.critical="critical"})(Pl||(Pl={}));var k1=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,A1=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,L1=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,yu="?",M1="X-Sentry-Auth",V1=/^(?:(\w+):)\/\/(?:([\w-]+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function R1(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=k1.exec(i[a]))r={filename:o[2]&&o[2].indexOf("address at ")===0?o[2].substr(11):o[2],function:o[1]||yu,lineno:o[3]?+o[3]:null,colno:o[4]?+o[4]:null};else if(o=L1.exec(i[a]))r={filename:o[2],function:o[1]||yu,lineno:+o[3],colno:o[4]?+o[4]:null};else if(o=A1.exec(i[a]))a===0&&!o[5]&&t.columnNumber!==void 0&&(e[0].column=t.columnNumber+1),r={filename:o[3],function:o[1]||yu,lineno:o[4]?+o[4]:null,colno:o[5]?+o[5]:null};else continue;!r.function&&r.lineno&&(r.function=yu),e.push(r)}return e.length?{value:__(t),type:t.name,stacktrace:{frames:e.reverse()}}:null}function __(t){return(t&&t.message||"No error message").split(`
|
|
56
|
+
`).filter(i=>!!i)[0]}function N1(t){try{let e=R1(t);if(e)return e}catch(e){}return{value:__(t),type:t&&t.name,stacktrace:{frames:[]}}}function D1(){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=V1.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:[N1(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(M1,this.authHeader||""),i.send(JSON.stringify(e))}getRequestBlank(){return{platform:"javascript",event_id:D1(),sdk:{name:"micro-sentry.javascript.core",version:"0.0.0"},timestamp:Date.now()/1e3,environment:this.environment}}};function b_(t,e){return Object.prototype.toString.call(e)==="[object RegExp]"?e.test(t):typeof e=="string"?t.indexOf(e)!==-1:!1}function O1(){return window}var wu=class t extends xu{constructor(e,i=O1()){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=>b_(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=>b_(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 B1}from"@vkontakte/videoplayer-shared/es2018";var Cu=null,Va=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 B1,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:p}=l,{errorType:v,category:_}=i;if(Su(_)&&p.includes(_)||Su(v)&&m.includes(v))return;if(Math.random()<=d||Su(_)&&u.includes(_)||Su(v)&&s.includes(v)){Object.keys(i).length&&r.setTags({version:this.version,...i}),(Object.keys(a).length||Object.keys(o).length)&&r.setExtras({...a,...o});try{v&&r.captureMessage(v,i.fatal?Pl.fatal:Pl.error),r.report(e)}catch($){console.error($)}}}static getInstance(){return Cu}};var vs=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(vs||{});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(),$_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,y_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Id=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},na=()=>!!Id(),Eu=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)},x_=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 w_}from"@vkontakte/videoplayer-core/es2018";var S_=()=>({title:Y("hotkey_map_modal_title"),closeBtnText:Y("hotkey_map_modal_close_btn_text"),groups:[{title:Y("hotkey_map_group_title_common"),items:[{description:Y("hotkey_map_item_mute_description"),value:Y("hotkey_map_item_mute_value")},{description:Y("hotkey_map_item_volume_up_description"),value:Y("hotkey_map_item_volume_up_value")},{description:Y("hotkey_map_item_volume_down_description"),value:Y("hotkey_map_item_volume_down_value")},{description:Y("hotkey_map_item_pip_description"),value:Y("hotkey_map_item_pip_value")},{description:Y("hotkey_map_item_full_screen_description"),value:Y("hotkey_map_item_full_screen_value")},{description:Y("hotkey_map_item_show_context_menu_description"),value:Y("hotkey_map_item_show_context_menu_value")},{description:Y("hotkey_map_item_show_hotkey_map_description"),value:Y("hotkey_map_item_show_hotkey_map_value")}]},{title:Y("hotkey_map_group_title_playback"),items:[{description:Y("hotkey_map_item_play_toggle_description"),value:Y("hotkey_map_item_play_toggle_value")},{description:Y("hotkey_map_item_seek_backward_description"),value:Y("hotkey_map_item_seek_backward_value")},{description:Y("hotkey_map_item_seek_forward_description"),value:Y("hotkey_map_item_seek_forward_value")},{description:Y("hotkey_map_item_fast_seek_backward_description"),value:Y("hotkey_map_item_fast_seek_backward_value")},{description:Y("hotkey_map_item_fast_seek_forward_description"),value:Y("hotkey_map_item_fast_seek_forward_value")},{description:Y("hotkey_map_item_rate_down_description"),value:Y("hotkey_map_item_rate_down_value")},{description:Y("hotkey_map_item_rate_up_description"),value:Y("hotkey_map_item_rate_up_value")},{description:Y("hotkey_map_item_prev_frame_description"),value:Y("hotkey_map_item_prev_frame_value")},{description:Y("hotkey_map_item_next_frame_description"),value:Y("hotkey_map_item_next_frame_value")},{description:Y("hotkey_map_item_jump_seek_description"),value:Y("hotkey_map_item_jump_seek_value")},{description:Y("hotkey_map_item_next_video_description"),value:Y("hotkey_map_item_next_video_value")},{description:Y("hotkey_map_item_prev_video_description"),value:Y("hotkey_map_item_prev_video_value")}]},{title:Y("hotkey_map_group_title_subtitles"),items:[{description:Y("hotkey_map_item_subtitles_toggle_description"),value:Y("hotkey_map_item_subtitles_toggle_value")}]},{title:Y("hotkey_map_group_title_episodes"),items:[{description:Y("hotkey_map_item_prev_episode_description"),value:w_.device.isApple?Y("hotkey_map_item_prev_episode_mac_value"):Y("hotkey_map_item_prev_episode_pc_value")},{description:Y("hotkey_map_item_next_episode_description"),value:w_.device.isApple?Y("hotkey_map_item_next_episode_mac_value"):Y("hotkey_map_item_next_episode_pc_value")}]}]});import{devNull as C_,now as T_}from"@vkontakte/videoplayer-shared/es2018";function Rf(t,e){B(e,!1);let i=$e();Lt(()=>{i.getAdmanWrapper().startPostroll()}),jo(),H()}import{noop as U1}from"@vkontakte/videoplayer-shared/es2018";var H1=Ee('<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>'),F1=Ee('<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 Ar(t,e){B(e,!0);let i=h(e,"direction",3,"left"),o=h(e,"useBtnColor",3,!1),r=f(()=>["up","down"].includes(i())),a=f(()=>["right","down"].includes(i())),l=f(()=>`chevron-icon--${i()}`),d=f(()=>(()=>{let m="";return n(a)&&(m+="transform: rotate(180deg);"),m.length?m:void 0})()),s=f(()=>o()?oa:"currentColor"),u=f(()=>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,p)=>{var v=Re(),_=le(v);{var y=x=>{var I=H1();b(x,I)},$=x=>{var I=F1();b(x,I)};V(_,x=>{n(r)?x(y):x($,!1)})}b(m,v)},$$slots:{default:!0}}),H()}var z1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},W1=L('<div class="skip s-1g"> <!></div>'),K1=L("<div><!></div>"),q1={hash:"s-1g",code:".container.s-1g{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-1g{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-1g{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-1g{color:var(--white);cursor:pointer}.skippable.s-1g:hover{color:hsla(0,0%,100%,.75)}"};function Nf(t,e){B(e,!0),Q(t,q1);let[i,o]=Be(),r=()=>w(u,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"secondsToWatchBeforeSkip",3,0),d=h(e,"skipAd",3,U1),u=$e().ui.isMobile,m=f(()=>a()>0&&a()>=l());var p=K1();let v;p.__click=[z1,m,d];var _=C(p);{var y=x=>{var I=W1(),T=C(I),R=k(T);Ar(R,{direction:"right"}),S(I),O(A=>ge(T,`${A!=null?A:""} `),[()=>Y("skip_ads_now")]),b(x,I)},$=x=>{var I=ps();O(T=>ge(I,T),[()=>Y("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),b(x,I)};V(_,x=>{n(m)?x(y):x($,!1)})}S(p),O(x=>v=oe(p,1,"container s-1g",null,v,x),[()=>({"container-mobile":r(),skippable:n(m)})]),b(t,p),H(),o()}Ze(["click"]);var Q1=L('<button class="go-to-site s-1h"> </button>'),G1={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 Df(t,e){B(e,!1),Q(t,G1),jo();var i=Q1(),o=C(i,!0);S(i),O(r=>ge(o,r),[()=>Y("visit_advertiser")],cr),b(t,i),H()}var Y1=L('<div class="top-gradient-mobile s-o"></div>'),j1=L('<div class="container s-o"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),X1={hash:"s-o",code:".container.s-o{height:100%;width:100%}.top-gradient-mobile.s-o{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 Ed(t,e){B(e,!0),Q(t,X1);let[i,o]=Be(),r=()=>w(U,"$canSkipAd",i),a=()=>w(F,"$adPlaybackState",i),l=()=>w(R,"$isMobile",i),d=()=>w(X,"$adPosition",i),s=()=>w(se,"$secondsToWatchBeforeSkipAd",i),u=()=>w(T,"$isVideoEnded",i),m=h(e,"adsSlotId",3,void 0),p=h(e,"adsParams",3,void 0),v=h(e,"adsAutoplayParam",3,void 0),_=h(e,"duration",3,0),y=h(e,"adsExternalApi",3,void 0),$=h(e,"adsJson",3,void 0),x=$e(),I=Mt(),T=x.state.isEnded$,R=x.ui.isMobile,A=I.ads.isMobileGoToSiteButton,P=K(void 0),E=K(void 0),W=!1,F=x.ads.playbackState,U=x.ads.canSkip,X=x.ads.position,se=x.ads.secondsToWatchBeforeSkip,j=f(()=>r()&&a()!=="inactive"),ne=f(()=>l()&&a()!=="inactive"&&A);Lt(()=>{let D=x.getAdmanWrapper();if(C_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[T_(),m()]}),!m()){D.onAdmanLoadingError();return}let Ye=()=>{var xe;let{width:Ae,height:Ue}=be(x.ui.playerSize),ee=be(x.ui.isFullscreen),de=(xe=v())!=null?xe:be(x.ui.isAutoplay),ke=I.ads.paramsOverride;return{width:Ae,height:Ue,isFullscreen:ee,isAutoplay:de,adsContainer:n(P),adsVideoElement:n(E),slotId:m(),params:p(),paramsOverride:ke,duration:_(),externalApi:y(),json:$()}},re=async Ae=>{Ae&&await uo();let Ue=Ye();await D.initAdman(Ue),W=!0},pe=new AbortController,ue=()=>{pe.abort()};return window.AdmanHTML?re(!0).catch(()=>{D.onAdmanLoadingError()}):D.loadAdman(pe.signal).then(()=>re(!1)).catch(()=>{D.onAdmanLoadingError()}),()=>{C_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[T_(),m()]}),!W&&ue()}});var Z=j1(),Te=C(Z);{var fe=D=>{var Ye=Y1();b(D,Ye)};V(Te,D=>{l()&&D(fe)})}var te=k(Te,2);et(te,D=>N(E,D),()=>n(E));var _e=k(te,2);{var Ce=D=>{Nf(D,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return x.actions.internal.skipAd}})};V(_e,D=>{n(j)&&D(Ce)})}var me=k(_e,2);{var ce=D=>{Rf(D,{})};V(me,D=>{u()&&D(ce)})}var Qe=k(me,2);{var G=D=>{Df(D,{})};V(Qe,D=>{n(ne)&&D(G)})}S(Z),et(Z,D=>N(P,D),()=>n(P)),b(t,Z),H(),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 Z1=Ee('<path fill="#fff"></path>'),J1=Ee("<path></path><!>",1);function Pd(t,e){let i=h(e,"isActive",3,!1),o=f(()=>i()?"live-active-icon":"live-icon"),r=f(()=>i()?"var(--timeline-slider-filled-active-live-bg, #FF3347)":void 0),a="M8 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2H9V6a1 1 0 0 0-1-1m7 1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0zm15-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-2h3a1 1 0 1 0 0-2h-3V7h3a1 1 0 1 0 0-2zm-8.32 9.31-2.55-7.82a1 1 0 0 1-.12-.37L19 6.1a1 1 0 1 1 2-.2l2 6.4 2-6.4a1 1 0 0 1 2 .2v.02a1 1 0 0 1-.13.37l-2.55 7.82a1 1 0 0 1-.95.69h-.74a1 1 0 0 1-.95-.69";je(t,{width:"42",height:"20",get testId(){return n(o)},get fill(){return n(r)},children:(l,d)=>{var s=J1(),u=le(s),m=k(u);{var p=v=>{var _=Z1();Ne(_,"d",a),b(v,_)};V(m,v=>{i()&&v(p)})}O(()=>Ne(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 ey=L('<div class="equalizer s-b"><div class="col s-b"></div> <div class="col s-b"></div> <div class="col s-b"></div></div>'),ty=L('<div class="live-icon s-b"><!></div>'),iy=L('<span class="text s-b"> </span>'),oy=L("<div><!> <!></div>"),ny={hash:"s-b",code:".wrapper.s-b{background-color:var(--black-alpha-40);border-radius:4px;padding:2px 6px;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);white-space:nowrap}.wrapper.live.s-b{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-b{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-b .equalizer:where(.s-b){margin-top:-2px}.equalizer.s-b .col:where(.s-b){animation:1.5s linear infinite alternate;animation-play-state:paused;background:var(--btn-color,--white);bottom:0;height:10px;margin-right:2px;position:absolute;transform-origin:50% 100%;width:2px}.playing.s-b .equalizer:where(.s-b) .col:where(.s-b){animation-play-state:running}.equalizer.s-b .col:where(.s-b):first-child{animation-name:s-b-thumb-timer-equalizer-col1;left:0}.equalizer.s-b .col:where(.s-b):nth-child(2){animation-name:s-b-thumb-timer-equalizer-col2;left:3px}.equalizer.s-b .col:where(.s-b):nth-child(3){animation-name:s-b-thumb-timer-equalizer-col3;left:6px}.live-icon.s-b{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-b-thumb-timer-equalizer-col1{0%{transform:scaleY(.1)}25%{transform:scaleY(.8)}50%{transform:scaleY(.4)}75%{transform:scaleY(.6)}to{transform:scaleY(.1)}}@keyframes s-b-thumb-timer-equalizer-col2{0%{transform:scaleY(1)}25%{transform:scaleY(.3)}50%{transform:scaleY(.9)}75%{transform:scaleY(.6)}to{transform:scaleY(1)}}@keyframes s-b-thumb-timer-equalizer-col3{0%{transform:scaleY(.6)}25%{transform:scaleY(.9)}50%{transform:scaleY(.1)}75%{transform:scaleY(.9)}to{transform:scaleY(.6)}}.text.s-b{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function kd(t,e){Q(t,ny);let i=h(e,"withEqualizer",3,!1),o=h(e,"isLive",3,!1),r=h(e,"isPlaying",3,!1);var a=oy();let l;var d=C(a);{var s=v=>{var _=ey();b(v,_)};V(d,v=>{i()&&v(s)})}var u=k(d,2);{var m=v=>{var _=ty(),y=C(_);Pd(y,{isActive:!0}),S(_),b(v,_)},p=v=>{var _=iy(),y=C(_,!0);S(_),O(()=>ge(y,e.time)),b(v,_)};V(u,v=>{o()?v(m):v(p,!1)})}S(a),O(v=>l=oe(a,1,"wrapper s-b",null,l,v),[()=>({live:o(),playing:r()})]),b(t,a)}var kl=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var ry=L('<div role="timer" data-testid="thumb-timer"><!></div>'),sy={hash:"s-n",code:".thumb-timer.s-n{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 Ad(t,e){B(e,!0),Q(t,sy);let[i,o]=Be(),r=()=>w(m,"$disabled",i),a=h(e,"isHidden",3,!1),l=h(e,"isLive",3,!1),d=h(e,"isPlaying",3,!1),s=Mt(),u=f(()=>Xo(e.duration-e.position)),m=ae(!1);var p=ry();let v;var _=C(p);kd(_,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(p),Ls(p,()=>kl(a()&&s.features.usePerformanceFix,m,s.disableInvisibleComponentsTimeout)),O(y=>v=oe(p,1,"thumb-timer s-n",null,v,y),[()=>({"out-of-flow":r(),hidden:a()})]),b(t,p),H(),o()}var Al=t=>{if(!navigator.clipboard){I_(t);return}navigator.clipboard.writeText(t).catch(()=>I_(t))};function I_(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 hy,clientChecker as _y}from"@vkontakte/videoplayer-core/es2018";import{clientChecker as E_}from"@vkontakte/videoplayer-core/es2018";var Of="focus-hidden";var Lr=t=>{t.stopPropagation(),t.preventDefault()},Bf=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Of)},ly=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},dy=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},cy=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},uy=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},P_=t=>t.code==="Escape",py=t=>t.code==="ArrowLeft",Ld=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},k_=t=>{cy(t)?(Lr(t),dy(t.target)):uy(t)&&(Lr(t),ly(t.target))},aa=t=>!E_.device.isAndroid&&(t==null?void 0:t.detail)===0||E_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Ll=async(t,e,i)=>{await uo(),t&&!t.classList.contains("opened")&&!e&&be(i)&&(await uo(),i.set(!1),t.focus())},A_=async(t,e,i)=>{await uo(),t&&!e&&be(i)&&(i.set(!1),t.focus())},Md=async(t,e,i,o=!1)=>{if(await uo(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Of,!i),a==null||a.focus()}},L_=async(t,e)=>{setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)},ku=(t,e)=>{k_(t),Bf(t.target),P_(t)&&(Lr(t),e())},Au=async(t,e)=>{Ld(t,["ArrowRight"])&&(Lr(t),e())},M_=async(t,e,i)=>{if(k_(t),py(t)){Lr(t),e();return}P_(t)&&(Lr(t),i())},Ml=(t,e)=>{Ld(t)&&(Lr(t),e())},V_=(t,e,i)=>{if(Ld(t))Lr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Lr(t);return}o==="ArrowRight"&&!e&&(i(!0),Lr(t))}},R_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},N_=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 by}from"@vkontakte/videoplayer-shared/es2018";var Zr={"copy-link":100,"copy-link-timestamp":200,"copy-embed-code":300,pip:400,"video-loop":500,rotate:600,report:700,"save-debug":800,"save-trace":900,"debug-info":1e3};import{noop as D_}from"@vkontakte/videoplayer-shared/es2018";var my=(t,e)=>{Ml(t,()=>e())},vy=L('<li class="item s-1j" role="menuitem" tabindex="0"> </li>'),gy={hash:"s-1j",code:".item.s-1j{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-1j:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function Hf(t,e){B(e,!0),Q(t,gy);let i=h(e,"onClick",3,D_),o=h(e,"closeContextMenu",3,D_),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=vy();a.__click=r,a.__keydown=[my,r];var l=C(a,!0);S(a),O(()=>{var d;Ne(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Ne(a,"data-testid",e.id),ge(l,e.label)}),b(t,a),H()}Ze(["click","keydown"]);var Na=(t,e)=>t.weight-e.weight;var Vd=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Vd||{});var $y=(t,e)=>{ku(t,e)},yy=t=>{t.preventDefault()},xy=L('<ul role="menu" data-testid="context-menu" class="s-t"></ul>'),wy={hash:"s-t",code:"ul.s-t{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,wy);let[i,o]=Be(),r=()=>w(Te,"$playerPhase",i),a=()=>w(se,"$isLive$",i),l=()=>w(fe,"$isPiPEnabled$",i),d=()=>w(X,"$chromecastState$",i),s=()=>w(te,"$pictureInPictureApiIsActive$",i),u=()=>w(Z,"$isLooped$",i),m=()=>w(j,"$positionExact$",i),p=()=>w(W,"$additionalContextMenuItems$",i),v=h(e,"visible",3,!1),_=h(e,"position",19,()=>({top:0,left:0})),y=h(e,"playerContainerRef",3,void 0),$=h(e,"menuElementRef",15,void 0),x=K(0),I=K(0),T=$e(),{pictureInPicture$:R}=vo(),A=Mt(),P=T.ui.contextMenu.visible$,E=T.ui.debugPanelVisible,W=T.ui.additionalContextMenuItems$,F=T.ui.t,U=T.actions.internal.togglePictureInPicture,X=T.state.chromecastState$,se=T.state.isLive$,j=T.state.positionExact$,ne=T.state.isInteractive,Z=T.state.looped$,Te=T.playerPhase,{isEnabled$:fe,isActive$:te}=R,_e=f(()=>r()==="video"),Ce=f(()=>!!a()&&n(_e)),me=f(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),ce=f(()=>{var ve;return A.features.copyVideoLink&&((ve=T.callbacks)==null?void 0:ve.onCopyVideoLink)}),Qe=f(()=>n(ce)&&!n(me)&&!ne&&!n(Ce)),G=f(()=>{var ve;return!!((ve=T.callbacks)!=null&&ve.onCopyEmbedCodeClicked)}),D=f(()=>l()&&d()!==hy.CONNECTED&&!ne&&n(_e)&&!_y.browser.isFirefox),Ye=f(()=>!ne&&!n(me)&&!n(Ce)),re=f(()=>A.features.videoRotate&&!ne&&!n(me)),pe=f(()=>A.showSupport&&!s()),ue=f(()=>A.features.saveTraceInfoToFile),Ae=()=>{var ve;P.set(!1),(ve=e.returnFocus)==null||ve.call(e)},Ue=(ve,Oe)=>{if(!$()||!y())return;let Ke=$().getBoundingClientRect(),at=y().getBoundingClientRect();N(x,ve-at.left),N(I,Oe-at.top),n(x)+Ke.width>at.width&&N(x,at.width-Ke.width),n(I)+Ke.height>at.height&&N(I,at.height-Ke.height),N(x,Math.max(n(x),0),!0),N(I,Math.max(n(I),0),!0)};He(()=>{(async()=>{if($()&&y()){await uo();let{top:Oe,left:Ke,bottom:at,right:qt}=_(),Pt=Ke!=null?Ke:0,si=Oe!=null?Oe:0,li=$().getBoundingClientRect();Lu(Ke)&&!Lu(qt)&&(Pt=qt-li.width),Lu(Oe)&&!Lu(at)&&(si=at-li.height),Pt=Math.max(Pt,0),si=Math.max(si,0),Ue(Pt,si)}})()});let ee=()=>{T.actions.internal.videoRotate()},de=()=>{by(e.supportLink)&&window.open(e.supportLink,"_blank"),T.actions.internal.reportProblem(),T.actions.internal.pause()},ke=()=>{let ve=T.actions.internal.getDebugTextData();if(A.features.saveDebugInfoToFile){let Oe=new Blob([...ve],{type:"plain/text"}),Ke=window.URL.createObjectURL(Oe);Ma(Ke,"vk_player_debug_info","txt")}else Al(T.actions.internal.getDebugTextData())},xe=()=>{let ve=T.actions.internal.getTraceTextData(),Oe=new Blob([...ve],{type:"application/json"}),Ke=window.URL.createObjectURL(Oe);Ma(Ke,"vk_player_trace_info","json")},Xe=()=>{E.set(!0)},Pe=async()=>{var ve;try{U()}finally{(ve=e.returnFocus)==null||ve.call(e)}},we=()=>{T.actions.internal.setLooped(!u())},De=()=>{var ve,Oe;if(n(G)){let Ke=(Oe=(ve=T.callbacks)==null?void 0:ve.onCopyEmbedCodeClicked)==null?void 0:Oe.call(ve);Ke&&Al(Ke)}},Ct=(ve=!1)=>{var Oe,Ke;if((Oe=T.callbacks)!=null&&Oe.onCopyVideoLink){let at=(Ke=T.callbacks)==null?void 0:Ke.onCopyVideoLink(ve,m());at&&Al(at)}},Tt=f(()=>A.features.saveDebugInfoToFile?F("menu_save_debug"):F("menu_copy_debug")),Et=f(()=>n(ce)?{id:"copy-link",weight:Zr["copy-link"],label:F("menu_copy_video_link"),onClick:()=>Ct()}:void 0),dt=f(()=>n(Qe)?{id:"copy-link-timestamp",weight:Zr["copy-link-timestamp"],label:F("menu_copy_video_link_with_timestamp"),onClick:()=>Ct(!0)}:void 0),wt=f(()=>n(G)?{id:"copy-embed-code",weight:Zr["copy-embed-code"],label:F("menu_copy_embed_code"),onClick:De}:void 0),Yt=f(()=>n(D)?{id:"pip",weight:Zr.pip,label:s()?F("menu_pip_close"):F("menu_pip"),onClick:Pe}:void 0),Dt=f(()=>n(Ye)?{id:"video-loop",weight:Zr["video-loop"],label:u()?F("menu_video_loop_off"):F("menu_video_loop_on"),ariaLabel:F("aria_label_menu_loop"),onClick:we}:void 0),Rt=f(()=>n(re)?{id:"rotate",weight:Zr.rotate,label:F("menu_video_rotate"),ariaLabel:F("aria_label_menu_rotate"),onClick:ee}:void 0),Ut=f(()=>n(pe)?{id:"report",weight:Zr.report,label:F("menu_report"),ariaLabel:`${F("menu_report")}. ${F("aria_label_new_tab_alert")}`,onClick:de}:void 0),q=f(()=>({id:"save-debug",weight:Zr["save-debug"],label:n(Tt),onClick:ke})),Le=f(()=>n(ue)?{id:"save-trace",weight:Zr["save-trace"],label:F("menu_save_debug"),onClick:xe}:void 0),Me=f(()=>({id:"debug-info",weight:Zr["debug-info"],label:F("menu_debug_overlay"),ariaLabel:F("aria_label_menu_debug_overlay"),onClick:Xe})),ye=f(()=>[n(Et),n(dt),n(wt),n(Yt),n(Dt),n(Rt),n(Ut),n(q),n(Le),n(Me),...p()].filter(ve=>!!ve).sort(Na));var Fe=Re(),Se=le(Fe);{var xt=ve=>{var Oe=xy();Oe.__contextmenu=[yy],Oe.__keydown=[$y,Ae],hi(Oe,21,()=>n(ye),Ke=>Ke.id,(Ke,at)=>{Hf(Ke,{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:Ae})}),S(Oe),et(Oe,Ke=>$(Ke),()=>$()),O(()=>{var Ke,at;return qe(Oe,`top: ${(Ke=n(I))!=null?Ke:""}px; left: ${(at=n(x))!=null?at:""}px;`)}),b(ve,Oe)};V(Se,ve=>{v()&&ve(xt)})}b(t,Fe),H(),o()}Ze(["contextmenu","keydown"]);var Mu=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 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 Sy=L('<div class="container s-1f"><canvas class="s-1f"></canvas></div>'),Cy={hash:"s-1f",code:".container.s-1f{display:inline-block;height:16px;width:120px}canvas.s-1f{margin-top:2px;transform:scaleY(-1)}"};function Rd(t,e){B(e,!0),Q(t,Cy);let i=h(e,"values",19,()=>[]),o=K(void 0),r=K(null),a=16,l=120,d=60,s=l/d;Lt(()=>{n(o).width=l,n(o).height=a,N(r,n(o).getContext("2d"),!0)});function u(v,_,y,$,x){x===0&&(x=1),v.fillStyle="#fff",v.fillRect(_,y,$,x)}He(()=>{let v="";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 x=y*s,I=_>0?a*(i()[$]/_):0;u(n(r),x,0,s,I),v=I+" "+v,y--}}});var m=Sy(),p=C(m);et(p,v=>N(o,v),()=>n(o)),S(m),b(t,m),H()}import{safeStorage as O_}from"@vkontakte/videoplayer-shared/es2018";var Ty=(t,e)=>{t.stopPropagation(),O_.remove(yd),e.set(!1)},Iy=L('<div class="s-q"><div class="s-q">Video id</div> <span> </span></div>'),Ey=L('<div class="s-q"><div class="s-q">VSID</div> <span> </span></div>'),Py=L('<div class="s-q"><div class="s-q">Provider</div> <span> </span></div>'),ky=L('<div class="s-q"><div class="s-q">Streams</div> <span> </span></div>'),Ay=L('<div class="s-q"><div class="s-q">Viewport</div> <span> </span></div>'),Ly=L('<div class="s-q"><div class="s-q">Video size</div> <span> </span></div>'),My=L('<div class="s-q"><div class="s-q">CDN host</div> <span> </span></div>'),Vy=L('<div class="s-q"><div class="s-q">Volume</div> <span> </span></div>'),Ry=L('<div class="s-q"><div class="s-q">Position</div> <span> </span></div>'),Ny=L('<div class="s-q"><div class="s-q">Buffer</div> <span> </span></div>'),Dy=L('<div class="s-q"><div class="s-q">Nbuffer</div> <span> </span></div>'),Oy=L('<div class="s-q"><div class="s-q">Live latency</div> <span> </span></div>'),By=L('<div class="s-q"><div class="s-q">Segment</div> <span> </span></div>'),Hy=L('<div class="s-q"><div class="s-q">Network</div> <!> <span> </span></div>'),Fy=L('<div class="s-q"><div class="s-q">V bitrate</div> <!> <span> </span></div>'),Uy=L('<div role="region"><button class="close s-q" title="закрыть">[x]</button> <div class="content s-q"><div class="s-q"><div class="s-q">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-q"><div class="s-q">Dropped</div> <span> </span></div> <!> <!> <div class="s-q"><div class="s-q">FPS</div> <!> <span> </span></div></div></div>'),zy={hash:"s-q",code:".container.s-q{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-q{left:16px;top:16px}button.close.s-q{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-q{padding:5px}.content.s-q>div:where(.s-q)>div:where(.s-q){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Nd(t,e){B(e,!0),Q(t,zy);let[i,o]=Be(),r=()=>w(d,"$isMobile",i),a=$e(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=K(ri(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),m=K(0),p=K(0),v=K(0),_=new Vl(60),y=new Vl(60),$=new Vl(60),x=K(ri([])),I=K(ri([])),T=K(ri([])),R=Y("aria_label_debug_panel");Lt(()=>{O_.set(yd,"true"),a.actions.internal.startLogging(),u&&(N(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),N(m,u.getVideoPlaybackQuality().totalVideoFrames,!0));let q=window.setInterval(()=>{N(s,a.actions.internal.getDebugPanelData(),!0)},500),Le;return u&&(Le=window.setInterval(()=>{if(u){N(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let Me=u.getVideoPlaybackQuality().totalVideoFrames;N(v,Me-n(m)),N(m,Me,!0),_.push(n(v)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&$.push(n(s).bitrate),N(x,_.getValuesFromBottom(),!0),N(I,y.getValuesFromBottom(),!0),N(T,$.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(q),Le&&clearInterval(Le)}});var A=Uy();let P;var E=C(A);E.__click=[Ty,l];var W=k(E,2),F=C(W),U=k(C(F),2),X=C(U,!0);S(U),S(F);var se=k(F,2);{var j=q=>{var Le=Iy(),Me=k(C(Le),2),ye=C(Me,!0);S(Me),S(Le),O(()=>ge(ye,n(s).id)),b(q,Le)};V(se,q=>{n(s).id&&q(j)})}var ne=k(se,2);{var Z=q=>{var Le=Ey(),Me=k(C(Le),2),ye=C(Me,!0);S(Me),S(Le),O(()=>ge(ye,n(s).vsid)),b(q,Le)};V(ne,q=>{n(s).vsid&&q(Z)})}var Te=k(ne,2);{var fe=q=>{var Le=Py(),Me=k(C(Le),2),ye=C(Me,!0);S(Me),S(Le),O(()=>ge(ye,n(s).provider)),b(q,Le)};V(Te,q=>{n(s).provider&&q(fe)})}var te=k(Te,2);{var _e=q=>{var Le=ky(),Me=k(C(Le),2),ye=C(Me);S(Me),S(Le),O(()=>{var Fe,Se;return ge(ye,`Video: ${(Fe=n(s).videoCodec||"")!=null?Fe:""} ${n(s).hdr?"(HDR)":""}
|
|
57
57
|
&
|
|
58
|
-
Audio: ${(st=n(s).audioCodec||"")!=null?st:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),b(Y,Pe)};V(ee,Y=>{(n(s).videoCodec||n(s).audioCodec)&&Y(_e)})}var Ce=k(ee,2);{var ge=Y=>{var Pe=ky(),le=k(C(Pe),2),$e=C(le,!0);S(le),S(Pe),O(()=>ve($e,n(s).viewport)),b(Y,Pe)};V(Ce,Y=>{n(s).viewport&&Y(ge)})}var pe=k(Ce,2);{var Ke=Y=>{var Pe=Ay(),le=k(C(Pe),2),$e=C(le,!0);S(le),S(Pe),O(()=>ve($e,n(s).videoSize)),b(Y,Pe)};V(pe,Y=>{n(s).videoSize&&Y(Ke)})}var G=k(pe,2);{var D=Y=>{var Pe=Ly(),le=k(C(Pe),2),$e=C(le,!0);S(le),S(Pe),O(()=>ve($e,n(s).cdn)),b(Y,Pe)};V(G,Y=>{n(s).cdn&&Y(D)})}var qe=k(G,2);{var K=Y=>{var Pe=My(),le=k(C(Pe),2),$e=C(le);S(le),S(Pe),O(()=>{var Me;return ve($e,`${(Me=n(s).volume)!=null?Me:""} %`)}),b(Y,Pe)};V(qe,Y=>{n(s).volume&&Y(K)})}var se=k(qe,2);{var xe=Y=>{var Pe=Vy(),le=k(C(Pe),2),$e=C(le);S(le),S(Pe),O(Me=>ve($e,`${Me!=null?Me:""} s`),[()=>n(s).position.toFixed(2)]),b(Y,Pe)};V(se,Y=>{n(s).position&&Y(xe)})}var Be=k(se,2);{var et=Y=>{var Pe=Ry(),le=k(C(Pe),2),$e=C(le);S(le),S(Pe),O(Me=>ve($e,`${Me!=null?Me:""} s`),[()=>n(s).buffer.toFixed(2)]),b(Y,Pe)};V(Be,Y=>{n(s).buffer&&Y(et)})}var ne=k(Be,2);{var ce=Y=>{var Pe=Ny(),le=k(C(Pe),2),$e=C(le);S(le),S(Pe),O(Me=>ve($e,`${Me!=null?Me:""} s`),[()=>n(s).nativeBuffer.toFixed(2)]),b(Y,Pe)};V(ne,Y=>{n(s).nativeBuffer&&Y(ce)})}var Re=k(ne,2);{var Ae=Y=>{var Pe=Dy(),le=k(C(Pe),2),$e=C(le);S(le),S(Pe),O(Me=>ve($e,`${Me!=null?Me:""} s`),[()=>n(s).liveLatency.toFixed(2)]),b(Y,Pe)};V(Re,Y=>{n(s).liveLatency&&Y(Ae)})}var Ze=k(Re,2);{var Ee=Y=>{var Pe=Oy(),le=k(C(Pe),2),$e=C(le,!0);S(le),S(Pe),O(Me=>ve($e,Me),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Me})=>Me).map(({value:Me,title:st})=>`${st} ${((Me!=null?Me:0)/1e3).toFixed(2)} s`).join(" & ")]),b(Y,Pe)};V(Ze,Y=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&Y(Ee)})}var Te=k(Ze,2),He=k(C(Te),2),It=C(He);S(He),S(Te);var wt=k(Te,2);{var At=Y=>{var Pe=By(),le=k(C(Pe),2);Od(le,{get values(){return n(I)}});var $e=k(le,2),Me=C($e);S($e),S(Pe),O(st=>ve(Me,`${st!=null?st:""} Kbps`),[()=>n(s).speed.toFixed(2)]),b(Y,Pe)};V(wt,Y=>{n(s).speed&&Y(At)})}var dt=k(wt,2);{var Et=Y=>{var Pe=Hy(),le=k(C(Pe),2);Od(le,{get values(){return n(T)}});var $e=k(le,2),Me=C($e);S($e),S(Pe),O(st=>ve(Me,`${st!=null?st:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),b(Y,Pe)};V(dt,Y=>{n(s).bitrate&&Y(Et)})}var jt=k(dt,2),Pt=k(C(jt),2);Od(Pt,{get values(){return n(x)}});var Dt=k(Pt,2),Ut=C(Dt,!0);S(Dt),S(jt),S(z),S(A),O(Y=>{var Pe,le;P=oe(A,1,"container s-h",null,P,Y),Ve(A,"aria-label",R),ve(X,n(s).version),ve(It,`${(Pe=n(p))!=null?Pe:""} / ${(le=n(m))!=null?le:""} frames`),ve(Ut,n(v))},[()=>({"container-mobile":r()})]),b(t,A),H(),o()}Qe(["click"]);import{noop as zy}from"@vkontakte/videoplayer-shared/es2018";var Wy=(t,e)=>{t.stopPropagation(),e()()},Ky=L('<div class="close s-16"></div>'),qy={hash:"s-16",code:'.close.s-16{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-16:hover{opacity:1}.close.s-16:after,.close.s-16:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-16:before{transform:rotate(45deg)}.close.s-16:after{transform:rotate(-45deg)}'};function Rs(t,e){B(e,!0),Q(t,qy);let i=h(e,"onClick",3,zy);var o=Ky();o.__click=[Wy,i],b(t,o),H()}Qe(["click"]);import{noop as Gy}from"@vkontakte/videoplayer-shared/es2018";var an=t=>`width:${t}px;height:${t}px;`;var Qy=Ie('<path d="m14.4 8.76 24.02 13.85a1.6 1.6 0 0 1 0 2.78L14.4 39.24a1.6 1.6 0 0 1-2.4-1.39v-27.7a1.6 1.6 0 0 1 2.4-1.39"></path>');function An(t,e){B(e,!0);let i=f(()=>an(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=Qy();b(o,a)},$$slots:{default:!0}}),H()}var Yy=L('<div class="timer s-17"><canvas class="timer-canvas s-17" width="100" height="100"></canvas> <!></div>'),jy={hash:"s-17",code:".timer.s-17{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-17:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-17{height:50px;position:absolute;width:50px}"};function Hd(t,e){B(e,!0),Q(t,jy);let i=h(e,"isRunning",3,!0),o=h(e,"onTimerEnded",3,Gy),r=5e3,a=q(void 0),l,d,s=0,u;De(()=>{i()&&Tt(()=>{d=Date.now(),s=requestAnimationFrame(p)})});let m=()=>{s&&(cancelAnimationFrame(s),s=0)},p=()=>{m(),i()&&(u=(Date.now()-d)/r,u<1?(l==null||l.clearRect(0,0,100,100),l==null||l.beginPath(),l==null||l.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*u),l==null||l.stroke(),s=requestAnimationFrame(p)):o()())};Mt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),sn(()=>{m()});var v=Yy(),_=C(v);Ye(_,$=>N(a,$),()=>n(a));var y=k(_,2);An(y,{get size(){return"24"}}),S(v),b(t,v),H()}var Xy=(t,e,i)=>{e(!1),i()},Zy=L('<div class="overlay s-w"></div> <div class="next-video s-w"><div class="top s-w"><div class="caption s-w"> </div> <!></div> <div class="row s-w"><div class="column s-w"><div class="thumb s-w"><div></div> <!></div></div> <div class="column s-w"><div class="title s-w"> </div></div></div></div>',1),Jy={hash:"s-w",code:".overlay.s-w{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-w{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-w{display:flex;justify-content:space-between}.caption.s-w{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-w{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-w{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-w{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-w,.thumb-overlay.s-w{height:100%;width:100%}.thumb-overlay.s-w{position:absolute}.thumb-overlay.withOpacity.s-w{background:var(--black);opacity:.3}.title.s-w{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Wf(t,e){B(e,!0),Q(t,Jy);let[i,o]=Ne(),r=()=>w(d,"$autoplayNextEnabled$",i),a=()=>w(s,"$timerNextVideoRunning$",i),l=be(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,m=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,_=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),v())},$=()=>{e.clickCloseIcon(),_()};Mt(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),v())});var x=Le(),I=ue(x);{var T=R=>{var A=Zy(),P=k(ue(A),2),E=C(P),z=C(E),F=C(z,!0);S(z);var U=k(z,2);Rs(U,{onClick:$}),S(E);var X=k(E,2);X.__click=[Xy,u,p];var ae=C(X),Z=C(ae),re=C(Z);let J;var we=k(re,2);{var me=ge=>{let pe=f(()=>a()&&r());Hd(ge,{get isRunning(){return n(pe)},onTimerEnded:y})};V(we,ge=>{r()&&ge(me)})}S(Z),S(ae);var ee=k(ae,2),_e=C(ee),Ce=C(_e,!0);S(_e),S(ee),S(X),S(P),O((ge,pe)=>{ve(F,ge),We(Z,`background-image: url('${e.thumb}')`),J=oe(re,1,"thumb-overlay s-w",null,J,pe),ve(Ce,e.title)},[()=>j("end_screen_next_video"),()=>({withOpacity:r()})]),b(R,A)};V(I,R=>{e.isHide||R(T)})}b(t,x),H(),o()}Qe(["click"]);import{PlaybackState as Ba}from"@vkontakte/videoplayer-core/es2018";import{checkNever as t0}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as Gn}from"@vkontakte/videoplayer-statistics/es2018";var Kf=(t,e)=>Math.min(+(t+e).toFixed(2),1),qf=(t,e)=>Math.max(+(t-e).toFixed(2),0),Nu=(t,e,i)=>{let o=Kf(e,i);e<1&&t.actions.internal.setVolume(o)},Du=(t,e,i)=>{let o=qf(e,i);e>0&&t.actions.internal.setVolume(o)};var la=({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 i0=(t,e)=>{e(t)},o0=L('<div class="keyboard-controls s-14" tabindex="-1" role="region"><!></div>'),n0={hash:"s-14",code:".keyboard-controls.s-14{bottom:0;left:0;position:absolute;right:0;top:0}"};function Qf(t,e){var Y,Pe;B(e,!0),Q(t,n0);let[i,o]=Ne(),r=()=>w(we,"$disabledControls$",i),a=()=>w(et,"$isInteractiveTime$",i),l=()=>w(ne,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>w(U,"$playbackState$",i),s=()=>w(D,"$isEnded$",i),u=()=>w(Ke,"$doubleForwardAvailable$",i),m=()=>w(pe,"$doubleForwardOn$",i),p=()=>w(qe,"$overlayContainer$",i),v=()=>w(ae,"$adPlaybackState",i),_=()=>w(Z,"$positionExact$",i),y=()=>w(re,"$duration$",i),$=()=>w(xe,"$isAudioAvailable$",i),x=()=>w(J,"$volume$",i),I=()=>w(X,"$canChangePlaybackSpeed$",i),T=()=>w(me,"$muted$",i),R=()=>w(ee,"$currentSubtitle$",i),A=h(e,"nextButtonActive",3,!1),P=h(e,"prevButtonActive",3,!1),E=be(),z=Vt(),F=E.getLogger().createComponentLog("KeyboardControls component"),U=E.state.playbackState$,X=E.state.canChangePlaybackSpeed$,ae=E.ads.playbackState,Z=E.state.positionExact$,re=E.state.duration$,J=E.state.volume$,we=E.ui.controls.disabledControls$,me=E.state.muted$,ee=E.state.currentSubtitle$,_e=E.ui.contextMenu.openedByHotKey$,Ce=E.ui.contextMenu.lastActiveElem$,ge=E.ui.contextMenu.visible$,pe=E.ui.doubleForwardOn$,Ke=E.ui.doubleForwardAvailable$,G=E.ui.contextMenu.position$,D=E.state.isEnded$,qe=E.ui.overlayContainer$,K=(Y=E.callbacks)==null?void 0:Y.onAudioDoesNotExistHint,se=(Pe=E.callbacks)==null?void 0:Pe.onAudioDisabledHint,xe=E.state.isAudioAvailable$,Be=E.state.isAudioDisabled,et=E.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:ne}=mo(),ce=0,Re=!0,Ae=q(void 0),Ze=le=>(le!==Re&&(Re=le,ce=0),ce+=1,(z.controls.seekStepKeyboard+z.controls.seekStepKeyboard*ce)/1e3),Ee=!0,Te=({type:le,repeat:$e,disableDoubleForward:Me})=>{let st=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&ne.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{E.actions.internal.togglePlay();let fe="PLAY";d()===Ba.PAUSED?fe="PAUSE":s()&&(fe="REPLAY"),e.showHotKeyHelpers({type:fe})}},$t=le==="down";if(!u()||Me){$t&&st(),Ee=!0;return}if($t)Ee=!1;else if(Ee)return;if($t){!$e&&e.startDoubleForwardActivationTimer();return}m()||st(),e.stopDoubleForward(),Ee=!0},He=le=>{let $e=D_(p());G.set($e),Ce.set(le.target),_e.set(!0),ge.set(!0)},It=(le,$e=!1)=>{var uo,pi;let Me=le.target,st=(uo=Me==null?void 0:Me.getAttribute("role"))==null?void 0:uo.includes("menuitem"),$t=Me.classList.contains("btn"),fe=le.code;if($t&&fe==="Space")return!1;let Oe=Vh.has(fe);if(st&&Oe)return!1;let ze=!Mh.has(fe);if(le.ctrlKey&&ze||le.altKey&&ze||le.metaKey)return!1;let yt=st&&fe==="Escape";Rh.has(fe)||yt||e.hideContextMenu();let qt=d()===Ba.PLAYING||d()===Ba.PAUSED,St=e.isAds&&(v()==="paused"||v()==="playing"),ni=!St&&!r().has("TIMELINE"),ci=le.shiftKey&&["Digit1","Numpad1"].includes(fe);if(!ci&&!(qt||St))return!1;F({message:`key down, code: ${fe}, isExternal = ${$e}`});let Vi=!1,Rt=()=>{Vi=!0,$e||le.preventDefault()};if(ci)return He(le),Rt(),!0;switch(fe){case"KeyJ":case"ArrowLeft":{if(!ni)break;if(le.ctrlKey||le.altKey){let tt=E.actions.internal.getPrevEpisode();E.actions.internal.seekToPrevEpisode(tt),tt&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:tt.text}),Rt()}else{let tt=le.shiftKey?Ze(!1):z.controls.seekStepKeyboard/1e3,Gt=Math.max(_()-tt,0);_()>0&&(E.actions.internal.seekTime(Gt,Gn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:tt.toString()}),Rt())}break}case"KeyL":case"ArrowRight":{if(!ni)break;if(le.ctrlKey||le.altKey){let tt=E.actions.internal.getNextEpisode();E.actions.internal.seekToNextEpisode(tt),tt&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:tt.text}),Rt()}else{let tt=le.shiftKey?Ze(!0):z.controls.seekStepKeyboard/1e3,Gt=Math.min(_()+tt,y());Math.round(_())<Math.round(y())&&(E.actions.internal.seekTime(Gt,Gn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:tt.toString()}),Rt())}break}case"ArrowUp":{if(la({isAudioDisabled:Be,audioDisabledHintCallback:se,isAudioAvailable:$(),audioIsNotExistHintCallback:K,isAds:e.isAds})){let tt=x(),Gt=z.controls.volumeStepKeyboard,Ri=tt<=1;if(Nu(E,tt,Gt),Ri){let hi=Math.round(Kf(tt,Gt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:hi}})}}Rt();break}case"ArrowDown":{if(la({isAudioDisabled:Be,audioDisabledHintCallback:se,isAudioAvailable:$(),audioIsNotExistHintCallback:K,isAds:e.isAds})){let tt=x(),Gt=z.controls.volumeStepKeyboard,Ri=tt>=0;if(Du(E,tt,Gt),Ri){let hi=Math.round(qf(tt,Gt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:hi}})}}Rt();break}case"Comma":{if(le.shiftKey){if(!m()&&I()){let tt=E.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:tt==null?void 0:tt.displayValue}),Rt()}}else{if(St||d()!==Ba.PAUSED)break;let tt=Math.max(_()-z.controls.seekStepFrame/1e3,0);_()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),E.actions.internal.clearDelayedBufferingCheckTimeout(),E.actions.internal.seekTime(tt,Gn.DOUBLE_TAP),Rt())}break}case"Period":{if(le.shiftKey){if(!m()&&I()){let tt=E.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:tt==null?void 0:tt.displayValue}),Rt()}}else{if(St||d()!==Ba.PAUSED)break;let tt=Math.min(_()+z.controls.seekStepFrame/1e3,y());_()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),E.actions.internal.clearDelayedBufferingCheckTimeout(),E.actions.internal.seekTime(tt,Gn.DOUBLE_TAP),Rt())}break}case"KeyK":case"Space":Te({type:"down",repeat:le.repeat,disableDoubleForward:"KeyK"===fe}),Rt();break;case"KeyM":{la({isAudioDisabled:Be,audioDisabledHintCallback:se,isAudioAvailable:$(),audioIsNotExistHintCallback:K,isAds:e.isAds})&&(e.showHotKeyHelpers({type:T()?"VOLUME":"MUTE"}),E.actions.internal.toggleMuted()),Rt();break}case"KeyF":e.toggleFullscreen(),Rt();break;case"KeyC":E.actions.internal.toggleSubtitle(),R().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(pi=R())==null?void 0:pi.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),Rt();break;case"KeyI":E.actions.internal.togglePictureInPicture(),Rt();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.1,Gn.DOUBLE_TAP),Rt();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.2,Gn.DOUBLE_TAP),Rt();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.3,Gn.DOUBLE_TAP),Rt();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.4,Gn.DOUBLE_TAP),Rt();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.5,Gn.DOUBLE_TAP),Rt();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.6,Gn.DOUBLE_TAP),Rt();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.7,Gn.DOUBLE_TAP),Rt();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.8,Gn.DOUBLE_TAP),Rt();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.9,Gn.DOUBLE_TAP),Rt();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(0,Gn.DOUBLE_TAP),Rt();break;case"Slash":{le.shiftKey&&z.features.hotKeyMapModal&&(e.showKeyMap(),Rt());break}case"KeyN":le.shiftKey&&A()&&(E.actions.internal.nextVideoClick(),Rt());break;case"KeyP":le.shiftKey&&P()&&(E.actions.internal.prevVideoClick(),Rt());break;case"ShiftLeft":case"ShiftRight":Rt();break;case"Tab":case"Escape":case"Enter":break;default:t0(fe);break}return Vi},wt=le=>{let $e=le.code;if(le.ctrlKey||le.altKey||le.metaKey)return;let Me=d()===Ba.PLAYING||d()===Ba.PAUSED,st=e.isAds&&(v()==="paused"||v()==="playing");if(Me||st)switch($e){case"ShiftLeft":case"ShiftRight":ce=0;break;case"Space":Te({type:"up"});break}},At=j("aria_label_video_player"),dt=()=>{var le;return(le=n(Ae))==null?void 0:le.focus()},Et=()=>n(Ae)===Ou(),jt=le=>le.type==="keydown"?It(le,!0):(le.type==="keyup"&&wt(le),!1);var Pt=o0();Pt.__keyup=wt,Pt.__keydown=[i0,It];var Dt=C(Pt);ei(Dt,()=>{var le;return(le=e.children)!=null?le:mt}),S(Pt),Ye(Pt,le=>N(Ae,le),()=>n(Ae)),O(()=>Ve(Pt,"aria-label",At)),b(t,Pt);var Ut=H({focus:dt,isFocused:Et,handleExternalKeyboardEvent:jt});return o(),Ut}Qe(["keyup","keydown"]);var r0=L('<div class="container s-k"><div class="dot s-k"></div> <div class="dot s-k"></div> <div class="dot s-k"></div></div>'),s0={hash:"s-k",code:".container.s-k{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-k:first-child{animation-delay:0s}.dot.s-k:nth-child(2){animation-delay:.18s}.dot.s-k:nth-child(3){animation-delay:.36s}@keyframes s-k-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-k{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-k-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-k+.dot:where(.s-k){margin-left:4px}"};function Ha(t,e){Q(t,s0);let i=h(e,"style",3,"");var o=r0();O(()=>We(o,i())),b(t,o)}var a0=Ie('<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 Gf(t,e){je(t,{get fill(){return e.fill},children:(i,o)=>{var r=a0();b(i,r)},$$slots:{default:!0}})}import{noop as Dl}from"@vkontakte/videoplayer-shared/es2018";var l0=t=>{t.stopPropagation()},d0=L("<button><!></button>"),c0={hash:"s-1o",code:"button.btn.s-1o{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-1o{width:100%}button.btn--live.s-1o{padding:10px 4px}button.btn-jc-l.s-1o{justify-content:left}button.btn-m.s-1o{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-1o,button.btn-m--play.s-1o{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1o{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1o,button.btn-m--prev.s-1o{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1o{right:calc(100% + 35px)}button.btn-m--next.s-1o{left:calc(100% + 35px)}button.btn.s-1o:disabled{cursor:default;pointer-events:none}button.btn.s-1o:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1o:not(:disabled):hover{opacity:.8}button.pr-0.s-1o{padding-right:0}button.pl-0.s-1o{padding-left:0}"};function Ft(t,e){B(e,!0),Q(t,c0);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),m=h(e,"ariaExpanded",3,void 0),p=h(e,"tabIndex",3,0),v=h(e,"click",3,Dl),_=h(e,"focus",3,Dl),y=h(e,"blur",3,Dl),$=f(()=>v()===Dl?null:A=>{A.stopPropagation(),v()(A)}),x=f(()=>_()===Dl?null:A=>{A.preventDefault(),_()()}),I=f(()=>y()===Dl?null:A=>{A.preventDefault(),y()()});var T=d0();T.__pointerdown=[l0],T.__click=function(...A){var P;(P=n($))==null||P.apply(this,A)};var R=C(T);ei(R,()=>{var A;return(A=e.children)!=null?A:mt}),S(T),Ye(T,A=>s(A),()=>s()),O(()=>{var A,P,E,z,F,U,X,ae;oe(T,1,`btn ${(A=i())!=null?A:""}`,"s-1o"),We(T,o()||null),T.disabled=(P=r())!=null?P:null,Ve(T,"aria-hidden",(E=l())!=null?E:null),Ve(T,"aria-label",(z=d())!=null?z:null),Ve(T,"aria-keyshortcuts",(F=u())!=null?F:null),Ve(T,"aria-expanded",(U=m())!=null?U:null),Ve(T,"data-testid",(X=a())!=null?X:null),Ve(T,"tabindex",p()),Ve(T,"role",e.role),Ve(T,"aria-checked",(ae=e.areaChecked)!=null?ae:null)}),lt("focus",T,function(...A){var P;(P=n(x))==null||P.apply(this,A)}),lt("blur",T,function(...A){var P;(P=n(I))==null||P.apply(this,A)}),b(t,T),H()}Qe(["pointerdown","click"]);var u0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},p0=L('<div class="modal-header s-1i"><h3 class="modal-title s-1i"> </h3> <!></div>'),f0=L('<div class="modal-overlay s-1i"><div class="modal-container s-1i" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-1i" tabindex="0" role="scrollbar"><div class="modal-main s-1i"><!></div></div></div></div>'),m0={hash:"s-1i",code:'.modal-overlay.s-1i{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-1i{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-1i{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-1i{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-1i{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-1i::-webkit-scrollbar{width:8px}.modal-scroll.s-1i::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-1i::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-1i::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-1i{margin:-8px -4px 0 0}'};function Yf(t,e){B(e,!0),Q(t,m0);let i=h(e,"showHeader",3,!0),o=h(e,"showCloseCross",3,!0),r=q(void 0),a=q(void 0),{webApi:{focusManager:l}}=be(),d=j("hotkey_map_modal_close_btn_text");Mt(()=>{var $;return($=n(r))==null||$.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var s=f0();s.__keydown=[u0,e];var u=C(s),m=C(u);{var p=$=>{var x=p0(),I=C(x),T=C(I,!0);S(I);var R=k(I,2);{var A=P=>{Ft(P,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(E,z)=>{Gf(E,{fill:"currentColor"})},$$slots:{default:!0}})};V(R,P=>{o()&&P(A)})}S(x),O(()=>ve(T,e.title)),b($,x)};V(m,$=>{i()&&$(p)})}var v=k(m,2),_=C(v),y=C(_);ei(y,()=>{var $;return($=e.children)!=null?$:mt}),S(_),S(v),Ye(v,$=>N(r,$),()=>n(r)),S(u),Ye(u,$=>N(a,$),()=>n(a)),S(s),b(t,s),H()}Qe(["keydown"]);var v0=new Set(["BR"]),H_=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;v0.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var g0=L('<li class="hot-key-map-item s-11"><span class="hot-key-map-item-description s-11"><!></span> <span class="hot-key-map-item-value s-11"> </span></li>'),h0=L('<div class="hot-key-map-group s-11"><h5 class="hot-key-map-group-title s-11"> </h5> <ul class="hot-key-map-group-items s-11"></ul></div>'),_0=L('<div class="hot-key-map s-11"></div>'),b0={hash:"s-11",code:'.hot-key-map.s-11{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-11{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-11:last-child{border-bottom:none}.hot-key-map-group-title.s-11{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-11,.hot-key-map-item.s-11{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-11{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-11{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-11{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-11{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-11,.hot-key-map-item-value.s-11{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function jf(t,e){B(e,!1),Q(t,b0);let[i,o]=Ne(),r=()=>w(l,"$data",i),a=be(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};fo(),Yf(t,{get title(){return r().title},onClose:s,children:(u,m)=>{var p=_0();gi(p,5,()=>r().groups,({title:v,items:_})=>v,(v,_)=>{let y=()=>n(_).title,$=()=>n(_).items;var x=h0(),I=C(x),T=C(I,!0);S(I);var R=k(I,2);gi(R,5,$,({description:A,value:P})=>P,(A,P)=>{let E=()=>n(P).description,z=()=>n(P).value;var F=g0(),U=C(F),X=C(U);bd(X,()=>H_(E())),S(U);var ae=k(U,2),Z=C(ae,!0);S(ae),S(F),O(()=>ve(Z,z())),b(A,F)}),S(R),S(x),O(()=>ve(T,y())),b(v,x)}),S(p),b(u,p)},$$slots:{default:!0}}),H(),o()}import{noop as hb}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as ub,PlaybackState as Fm}from"@vkontakte/videoplayer-core/es2018";import{getVideoQualityLabel as P0}from"@vkontakte/videoplayer-shared/es2018";var $0=L('<div class="pillow s-1y"><!></div>'),y0={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 Xf(t,e){Q(t,y0);var i=$0(),o=C(i);ei(o,()=>{var r;return(r=e.children)!=null?r:mt}),S(i),O(()=>Ve(i,"data-testid",e.testId)),b(t,i)}import{VideoQuality as Fd}from"@vkontakte/videoplayer-shared/es2018";var x0=Ie('<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 Zf(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=x0();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);ei(r,()=>{var a;return(a=e.children)!=null?a:mt}),di(),S(o),b(t,o)}var w0=Ie('<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=kn(e,["$$slots","$$events","$$legacy","children"]);var o=w0();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);ei(r,()=>{var a;return(a=e.children)!=null?a:mt}),di(),S(o),b(t,o)}var S0=Ie('<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 em(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=S0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:mt}),di(),S(o),b(t,o)}var C0=Ie('<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 tm(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=C0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:mt}),di(),S(o),b(t,o)}var T0=Ie('<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 im(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=T0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:mt}),di(),S(o),b(t,o)}var Bu=t=>{switch(t){case Fd.Q_720P:return em;case Fd.Q_1080P:return tm;case Fd.Q_1440P:return im;case Fd.Q_2160P:return Zf;case Fd.Q_4320P:return Jf}};var I0=Ie('<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 om(t,e){je(t,{get testId(){return e.testId},children:(i,o)=>{var r=I0();b(i,r)},$$slots:{default:!0}})}var E0=Ie('<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 nm(t,e){je(t,{get testId(){return e.testId},children:(i,o)=>{var r=E0();b(i,r)},$$slots:{default:!0}})}var k0=L('<div aria-hidden="true"><!> <!></div>'),A0={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 Ud(t,e){B(e,!0),Q(t,A0);let i=h(e,"isMobile",3,!1),o=h(e,"currentQuality",3,void 0),r=f(()=>o()?P0(o()):""),a=f(()=>Bu(o())),l=f(()=>n(r).length>2);var d=Le(),s=ue(d);{var u=p=>{om(p,{testId:"settings-mobile-icon"})},m=p=>{var v=k0();let _;var y=C(v);{var $=T=>{let R=f(()=>`${n(r)}-pill-icon`);Xf(T,{get testId(){return n(R)},children:(A,P)=>{var E=Le(),z=ue(E);Mi(z,()=>n(a),(F,U)=>{U(F,{})}),b(A,E)},$$slots:{default:!0}})};V(y,T=>{n(a)&&T($)})}var x=k(y,2);let I=f(()=>n(a)?"settings-icon--labeled":"settings-icon");nm(x,{get testId(){return n(I)}}),S(v),O(T=>_=oe(v,1,"icon s-1v",null,_,T),[()=>({triple:n(l)})]),b(p,v)};V(s,p=>{i()?p(u):p(m,!1)})}b(t,d),H()}var L0=L('<span class="settings-icon-wrapper s-23"><!></span>'),M0={hash:"s-23",code:".settings-icon-wrapper.s-23{position:relative;width:24px}"};function Ol(t,e){B(e,!0),Q(t,M0);let[i,o]=Ne(),r=()=>w(u,"$settingsMenuVisible",i),a=()=>w(v,"$isMobile",i),l=()=>w(s,"$currentQuality",i),d=be(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,m=d.actions.internal.openSettingsMenu,p=d.actions.internal.closeSettingsMenu,v=d.ui.isMobile,_=d.ui.t,y=q(void 0);De(()=>{n(y)&&Tt(()=>{e.ref$.set(n(y))})});let $=_("aria_label_settings");async function x(T){let R=aa(T);r()?p():m(R,co)}let I=f(()=>r()?"opened":"");Ft(t,{get className(){return n(I)},testId:"settings-btn",click:x,get ariaLabel(){return $},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(T){N(y,T,!0)},children:(T,R)=>{var A=L0(),P=C(A);Ud(P,{get isMobile(){return a()},get currentQuality(){return l()}}),S(A),b(T,A)},$$slots:{default:!0}}),H(),o()}var V0=Ie('<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),R0=Ie("<path></path>");function da(t,e){B(e,!0);let i=f(()=>`subtitles-icon${e.type==="off"?"-off":e.type==="outline"?"-outline":""}`),o=f(()=>an(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=Le(),d=ue(l);{var s=m=>{var p=V0();di(),b(m,p)},u=m=>{var p=R0();O(()=>Ve(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
|
|
58
|
+
Audio: ${(Se=n(s).audioCodec||"")!=null?Se:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),b(q,Le)};V(te,q=>{(n(s).videoCodec||n(s).audioCodec)&&q(_e)})}var Ce=k(te,2);{var me=q=>{var Le=Ay(),Me=k(C(Le),2),ye=C(Me,!0);S(Me),S(Le),O(()=>ge(ye,n(s).viewport)),b(q,Le)};V(Ce,q=>{n(s).viewport&&q(me)})}var ce=k(Ce,2);{var Qe=q=>{var Le=Ly(),Me=k(C(Le),2),ye=C(Me,!0);S(Me),S(Le),O(()=>ge(ye,n(s).videoSize)),b(q,Le)};V(ce,q=>{n(s).videoSize&&q(Qe)})}var G=k(ce,2);{var D=q=>{var Le=My(),Me=k(C(Le),2),ye=C(Me,!0);S(Me),S(Le),O(()=>ge(ye,n(s).cdn)),b(q,Le)};V(G,q=>{n(s).cdn&&q(D)})}var Ye=k(G,2);{var re=q=>{var Le=Vy(),Me=k(C(Le),2),ye=C(Me);S(Me),S(Le),O(()=>{var Fe;return ge(ye,`${(Fe=n(s).volume)!=null?Fe:""} %`)}),b(q,Le)};V(Ye,q=>{n(s).volume&&q(re)})}var pe=k(Ye,2);{var ue=q=>{var Le=Ry(),Me=k(C(Le),2),ye=C(Me);S(Me),S(Le),O(Fe=>ge(ye,`${Fe!=null?Fe:""} s`),[()=>n(s).position.toFixed(2)]),b(q,Le)};V(pe,q=>{n(s).position&&q(ue)})}var Ae=k(pe,2);{var Ue=q=>{var Le=Ny(),Me=k(C(Le),2),ye=C(Me);S(Me),S(Le),O(Fe=>ge(ye,`${Fe!=null?Fe:""} s`),[()=>n(s).buffer.toFixed(2)]),b(q,Le)};V(Ae,q=>{n(s).buffer&&q(Ue)})}var ee=k(Ae,2);{var de=q=>{var Le=Dy(),Me=k(C(Le),2),ye=C(Me);S(Me),S(Le),O(Fe=>ge(ye,`${Fe!=null?Fe:""} s`),[()=>n(s).nativeBuffer.toFixed(2)]),b(q,Le)};V(ee,q=>{n(s).nativeBuffer&&q(de)})}var ke=k(ee,2);{var xe=q=>{var Le=Oy(),Me=k(C(Le),2),ye=C(Me);S(Me),S(Le),O(Fe=>ge(ye,`${Fe!=null?Fe:""} s`),[()=>n(s).liveLatency.toFixed(2)]),b(q,Le)};V(ke,q=>{n(s).liveLatency&&q(xe)})}var Xe=k(ke,2);{var Pe=q=>{var Le=By(),Me=k(C(Le),2),ye=C(Me,!0);S(Me),S(Le),O(Fe=>ge(ye,Fe),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Fe})=>Fe).map(({value:Fe,title:Se})=>`${Se} ${((Fe!=null?Fe:0)/1e3).toFixed(2)} s`).join(" & ")]),b(q,Le)};V(Xe,q=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&q(Pe)})}var we=k(Xe,2),De=k(C(we),2),Ct=C(De);S(De),S(we);var Tt=k(we,2);{var Et=q=>{var Le=Hy(),Me=k(C(Le),2);Rd(Me,{get values(){return n(I)}});var ye=k(Me,2),Fe=C(ye);S(ye),S(Le),O(Se=>ge(Fe,`${Se!=null?Se:""} Kbps`),[()=>n(s).speed.toFixed(2)]),b(q,Le)};V(Tt,q=>{n(s).speed&&q(Et)})}var dt=k(Tt,2);{var wt=q=>{var Le=Fy(),Me=k(C(Le),2);Rd(Me,{get values(){return n(T)}});var ye=k(Me,2),Fe=C(ye);S(ye),S(Le),O(Se=>ge(Fe,`${Se!=null?Se:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),b(q,Le)};V(dt,q=>{n(s).bitrate&&q(wt)})}var Yt=k(dt,2),Dt=k(C(Yt),2);Rd(Dt,{get values(){return n(x)}});var Rt=k(Dt,2),Ut=C(Rt,!0);S(Rt),S(Yt),S(W),S(A),O(q=>{var Le,Me;P=oe(A,1,"container s-q",null,P,q),Ne(A,"aria-label",R),ge(X,n(s).version),ge(Ct,`${(Le=n(p))!=null?Le:""} / ${(Me=n(m))!=null?Me:""} frames`),ge(Ut,n(v))},[()=>({"container-mobile":r()})]),b(t,A),H(),o()}Ze(["click"]);import{noop as Wy}from"@vkontakte/videoplayer-shared/es2018";var Ky=(t,e)=>{t.stopPropagation(),e()()},qy=L('<div class="close s-17"></div>'),Qy={hash:"s-17",code:'.close.s-17{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-17:hover{opacity:1}.close.s-17:after,.close.s-17:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-17:before{transform:rotate(45deg)}.close.s-17:after{transform:rotate(-45deg)}'};function Rs(t,e){B(e,!0),Q(t,Qy);let i=h(e,"onClick",3,Wy);var o=qy();o.__click=[Ky,i],b(t,o),H()}Ze(["click"]);import{noop as Yy}from"@vkontakte/videoplayer-shared/es2018";var dn=t=>`width:${t}px;height:${t}px;`;var Gy=Ee('<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=f(()=>dn(e.size));je(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"play-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=Gy();b(o,a)},$$slots:{default:!0}}),H()}var jy=L('<div class="timer s-16"><canvas class="timer-canvas s-16" width="100" height="100"></canvas> <!></div>'),Xy={hash:"s-16",code:".timer.s-16{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-16:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-16{height:50px;position:absolute;width:50px}"};function Dd(t,e){B(e,!0),Q(t,Xy);let i=h(e,"isRunning",3,!0),o=h(e,"onTimerEnded",3,Yy),r=5e3,a=K(void 0),l,d,s=0,u;He(()=>{i()&&St(()=>{d=Date.now(),s=requestAnimationFrame(p)})});let m=()=>{s&&(cancelAnimationFrame(s),s=0)},p=()=>{m(),i()&&(u=(Date.now()-d)/r,u<1?(l==null||l.clearRect(0,0,100,100),l==null||l.beginPath(),l==null||l.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*u),l==null||l.stroke(),s=requestAnimationFrame(p)):o()())};Lt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),ln(()=>{m()});var v=jy(),_=C(v);et(_,$=>N(a,$),()=>n(a));var y=k(_,2);Tn(y,{get size(){return"24"}}),S(v),b(t,v),H()}var Zy=(t,e,i)=>{e(!1),i()},Jy=L('<div class="overlay s-u"></div> <div class="next-video s-u"><div class="top s-u"><div class="caption s-u"> </div> <!></div> <div class="row s-u"><div class="column s-u"><div class="thumb s-u"><div></div> <!></div></div> <div class="column s-u"><div class="title s-u"> </div></div></div></div>',1),e0={hash:"s-u",code:".overlay.s-u{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-u{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-u{display:flex;justify-content:space-between}.caption.s-u{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-u{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-u{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-u{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-u,.thumb-overlay.s-u{height:100%;width:100%}.thumb-overlay.s-u{position:absolute}.thumb-overlay.withOpacity.s-u{background:var(--black);opacity:.3}.title.s-u{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Uf(t,e){B(e,!0),Q(t,e0);let[i,o]=Be(),r=()=>w(d,"$autoplayNextEnabled$",i),a=()=>w(s,"$timerNextVideoRunning$",i),l=$e(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,m=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,_=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),v())},$=()=>{e.clickCloseIcon(),_()};Lt(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),v())});var x=Re(),I=le(x);{var T=R=>{var A=Jy(),P=k(le(A),2),E=C(P),W=C(E),F=C(W,!0);S(W);var U=k(W,2);Rs(U,{onClick:$}),S(E);var X=k(E,2);X.__click=[Zy,u,p];var se=C(X),j=C(se),ne=C(j);let Z;var Te=k(ne,2);{var fe=me=>{let ce=f(()=>a()&&r());Dd(me,{get isRunning(){return n(ce)},onTimerEnded:y})};V(Te,me=>{r()&&me(fe)})}S(j),S(se);var te=k(se,2),_e=C(te),Ce=C(_e,!0);S(_e),S(te),S(X),S(P),O((me,ce)=>{ge(F,me),qe(j,`background-image: url('${e.thumb}')`),Z=oe(ne,1,"thumb-overlay s-u",null,Z,ce),ge(Ce,e.title)},[()=>Y("end_screen_next_video"),()=>({withOpacity:r()})]),b(R,A)};V(I,R=>{e.isHide||R(T)})}b(t,x),H(),o()}Ze(["click"]);import{PlaybackState as Da}from"@vkontakte/videoplayer-core/es2018";import{checkNever as i0}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as Kn}from"@vkontakte/videoplayer-statistics/es2018";var zf=(t,e)=>Math.min(+(t+e).toFixed(2),1),Wf=(t,e)=>Math.max(+(t-e).toFixed(2),0),Vu=(t,e,i)=>{let o=zf(e,i);e<1&&t.actions.internal.setVolume(o)},Ru=(t,e,i)=>{let o=Wf(e,i);e>0&&t.actions.internal.setVolume(o)};var la=({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 o0=(t,e)=>{e(t)},n0=L('<div class="keyboard-controls s-x" tabindex="-1" role="region"><!></div>'),r0={hash:"s-x",code:".keyboard-controls.s-x{bottom:0;left:0;position:absolute;right:0;top:0}"};function Kf(t,e){var ye,Fe;B(e,!0),Q(t,r0);let[i,o]=Be(),r=()=>w(Te,"$disabledControls$",i),a=()=>w(Ue,"$isInteractiveTime$",i),l=()=>w(ee,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>w(U,"$playbackState$",i),s=()=>w(D,"$isEnded$",i),u=()=>w(Qe,"$doubleForwardAvailable$",i),m=()=>w(ce,"$doubleForwardOn$",i),p=()=>w(Ye,"$overlayContainer$",i),v=()=>w(se,"$adPlaybackState",i),_=()=>w(j,"$positionExact$",i),y=()=>w(ne,"$duration$",i),$=()=>w(ue,"$isAudioAvailable$",i),x=()=>w(Z,"$volume$",i),I=()=>w(X,"$canChangePlaybackSpeed$",i),T=()=>w(fe,"$muted$",i),R=()=>w(te,"$currentSubtitle$",i),A=h(e,"nextButtonActive",3,!1),P=h(e,"prevButtonActive",3,!1),E=$e(),W=Mt(),F=E.getLogger().createComponentLog("KeyboardControls component"),U=E.state.playbackState$,X=E.state.canChangePlaybackSpeed$,se=E.ads.playbackState,j=E.state.positionExact$,ne=E.state.duration$,Z=E.state.volume$,Te=E.ui.controls.disabledControls$,fe=E.state.muted$,te=E.state.currentSubtitle$,_e=E.ui.contextMenu.openedByHotKey$,Ce=E.ui.contextMenu.lastActiveElem$,me=E.ui.contextMenu.visible$,ce=E.ui.doubleForwardOn$,Qe=E.ui.doubleForwardAvailable$,G=E.ui.contextMenu.position$,D=E.state.isEnded$,Ye=E.ui.overlayContainer$,re=(ye=E.callbacks)==null?void 0:ye.onAudioDoesNotExistHint,pe=(Fe=E.callbacks)==null?void 0:Fe.onAudioDisabledHint,ue=E.state.isAudioAvailable$,Ae=E.state.isAudioDisabled,Ue=E.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:ee}=vo(),de=0,ke=!0,xe=K(void 0),Xe=Se=>(Se!==ke&&(ke=Se,de=0),de+=1,(W.controls.seekStepKeyboard+W.controls.seekStepKeyboard*de)/1e3),Pe=!0,we=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&ee.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{E.actions.internal.togglePlay();let Se="PLAY";d()===Da.PAUSED?Se="PAUSE":s()&&(Se="REPLAY"),e.showHotKeyHelpers({type:Se})}},De=Se=>{if(!u()||!Se&&m()){we(),e.stopDoubleForward(),Pe=!0;return}Pe=!1,!Se&&e.startDoubleForwardActivationTimer()},Ct=()=>{Pe||(m()||we(),e.stopDoubleForward(),Pe=!0)},Tt=Se=>{Se!=="Space"&&e.stopDoubleForward()},Et=Se=>{let xt=N_(p());G.set(xt),Ce.set(Se.target),_e.set(!0),me.set(!0)},dt=(Se,xt=!1)=>{var ci,Gi;let ve=Se.target,Oe=(ci=ve==null?void 0:ve.getAttribute("role"))==null?void 0:ci.includes("menuitem"),Ke=ve.classList.contains("btn"),at=Se.code;if(Ke&&at==="Space")return!1;let qt=Mh.has(at);if(Oe&&qt)return!1;let Pt=!Lh.has(at);if(Se.ctrlKey&&Pt||Se.altKey&&Pt||Se.metaKey)return!1;let si=Oe&&at==="Escape";Vh.has(at)||si||e.hideContextMenu();let li=d()===Da.PLAYING||d()===Da.PAUSED,Ii=e.isAds&&(v()==="paused"||v()==="playing"),po=!Ii&&!r().has("TIMELINE"),fo=Se.shiftKey&&["Digit1","Numpad1"].includes(at);if(!fo&&!(li||Ii))return!1;F({message:`key down, code: ${at}, isExternal = ${xt}`});let di=!1,rt=()=>{di=!0,xt||Se.preventDefault()};if(Tt(at),fo)return Et(Se),rt(),!0;switch(at){case"KeyJ":case"ArrowLeft":{if(!po)break;if(Se.ctrlKey||Se.altKey){let ct=E.actions.internal.getPrevEpisode();E.actions.internal.seekToPrevEpisode(ct),ct&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:ct.text}),rt()}else{let ct=Se.shiftKey?Xe(!1):W.controls.seekStepKeyboard/1e3,Nt=Math.max(_()-ct,0);_()>0&&(E.actions.internal.seekTime(Nt,Kn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:ct.toString()}),rt())}break}case"KeyL":case"ArrowRight":{if(!po)break;if(Se.ctrlKey||Se.altKey){let ct=E.actions.internal.getNextEpisode();E.actions.internal.seekToNextEpisode(ct),ct&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:ct.text}),rt()}else{let ct=Se.shiftKey?Xe(!0):W.controls.seekStepKeyboard/1e3,Nt=Math.min(_()+ct,y());Math.round(_())<Math.round(y())&&(E.actions.internal.seekTime(Nt,Kn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:ct.toString()}),rt())}break}case"ArrowUp":{if(la({isAudioDisabled:Ae,audioDisabledHintCallback:pe,isAudioAvailable:$(),audioIsNotExistHintCallback:re,isAds:e.isAds})){let ct=x(),Nt=W.controls.volumeStepKeyboard,fi=ct<=1;if(Vu(E,ct,Nt),fi){let ot=Math.round(zf(ct,Nt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:ot}})}}rt();break}case"ArrowDown":{if(la({isAudioDisabled:Ae,audioDisabledHintCallback:pe,isAudioAvailable:$(),audioIsNotExistHintCallback:re,isAds:e.isAds})){let ct=x(),Nt=W.controls.volumeStepKeyboard,fi=ct>=0;if(Ru(E,ct,Nt),fi){let ot=Math.round(Wf(ct,Nt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:ot}})}}rt();break}case"Comma":{if(Se.shiftKey){if(!m()&&I()){let ct=E.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:ct==null?void 0:ct.displayValue}),rt()}}else{if(Ii||d()!==Da.PAUSED)break;let ct=Math.max(_()-W.controls.seekStepFrame/1e3,0);_()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),E.actions.internal.clearDelayedBufferingCheckTimeout(),E.actions.internal.seekTime(ct,Kn.DOUBLE_TAP),rt())}break}case"Period":{if(Se.shiftKey){if(!m()&&I()){let ct=E.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:ct==null?void 0:ct.displayValue}),rt()}}else{if(Ii||d()!==Da.PAUSED)break;let ct=Math.min(_()+W.controls.seekStepFrame/1e3,y());_()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),E.actions.internal.clearDelayedBufferingCheckTimeout(),E.actions.internal.seekTime(ct,Kn.DOUBLE_TAP),rt())}break}case"KeyK":we(),rt();break;case"Space":De(Se.repeat),rt();break;case"KeyM":{la({isAudioDisabled:Ae,audioDisabledHintCallback:pe,isAudioAvailable:$(),audioIsNotExistHintCallback:re,isAds:e.isAds})&&(e.showHotKeyHelpers({type:T()?"VOLUME":"MUTE"}),E.actions.internal.toggleMuted()),rt();break}case"KeyF":e.toggleFullscreen(),rt();break;case"KeyC":E.actions.internal.toggleSubtitle(),R().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(Gi=R())==null?void 0:Gi.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),rt();break;case"KeyI":E.actions.internal.togglePictureInPicture(),rt();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.1,Kn.DOUBLE_TAP),rt();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.2,Kn.DOUBLE_TAP),rt();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.3,Kn.DOUBLE_TAP),rt();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.4,Kn.DOUBLE_TAP),rt();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.5,Kn.DOUBLE_TAP),rt();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.6,Kn.DOUBLE_TAP),rt();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.7,Kn.DOUBLE_TAP),rt();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.8,Kn.DOUBLE_TAP),rt();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.9,Kn.DOUBLE_TAP),rt();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(0,Kn.DOUBLE_TAP),rt();break;case"Slash":{Se.shiftKey&&W.features.hotKeyMapModal&&(e.showKeyMap(),rt());break}case"KeyN":Se.shiftKey&&A()&&(E.actions.internal.nextVideoClick(),rt());break;case"KeyP":Se.shiftKey&&P()&&(E.actions.internal.prevVideoClick(),rt());break;case"ShiftLeft":case"ShiftRight":rt();break;case"Tab":case"Escape":case"Enter":break;default:i0(at);break}return di},wt=Se=>{let xt=Se.code;if(Se.ctrlKey||Se.altKey||Se.metaKey)return;let ve=d()===Da.PLAYING||d()===Da.PAUSED,Oe=e.isAds&&(v()==="paused"||v()==="playing");if(ve||Oe)switch(xt){case"ShiftLeft":case"ShiftRight":de=0;break;case"Space":Ct();break}},Yt=Y("aria_label_video_player"),Dt=()=>{var Se;return(Se=n(xe))==null?void 0:Se.focus()},Rt=()=>n(xe)===Nu(),Ut=Se=>Se.type==="keydown"?dt(Se,!0):(Se.type==="keyup"&&wt(Se),!1);var q=n0();q.__keyup=wt,q.__keydown=[o0,dt];var Le=C(q);ei(Le,()=>{var Se;return(Se=e.children)!=null?Se:gt}),S(q),et(q,Se=>N(xe,Se),()=>n(xe)),O(()=>Ne(q,"aria-label",Yt)),b(t,q);var Me=H({focus:Dt,isFocused:Rt,handleExternalKeyboardEvent:Ut});return o(),Me}Ze(["keyup","keydown"]);var s0=L('<div class="container s-k"><div class="dot s-k"></div> <div class="dot s-k"></div> <div class="dot s-k"></div></div>'),a0={hash:"s-k",code:".container.s-k{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-k:first-child{animation-delay:0s}.dot.s-k:nth-child(2){animation-delay:.18s}.dot.s-k:nth-child(3){animation-delay:.36s}@keyframes s-k-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-k{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-k-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-k+.dot:where(.s-k){margin-left:4px}"};function Oa(t,e){Q(t,a0);let i=h(e,"style",3,"");var o=s0();O(()=>qe(o,i())),b(t,o)}var l0=Ee('<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 qf(t,e){je(t,{get fill(){return e.fill},children:(i,o)=>{var r=l0();b(i,r)},$$slots:{default:!0}})}import{noop as Rl}from"@vkontakte/videoplayer-shared/es2018";var d0=t=>{t.stopPropagation()},c0=L("<button><!></button>"),u0={hash:"s-1n",code:"button.btn.s-1n{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-1n{width:100%}button.btn--live.s-1n{padding:10px 4px}button.btn-jc-l.s-1n{justify-content:left}button.btn-m.s-1n{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-1n,button.btn-m--play.s-1n{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1n{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1n,button.btn-m--prev.s-1n{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1n{right:calc(100% + 35px)}button.btn-m--next.s-1n{left:calc(100% + 35px)}button.btn.s-1n:disabled{cursor:default;pointer-events:none}button.btn.s-1n:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1n:not(:disabled):hover{opacity:.8}button.pr-0.s-1n{padding-right:0}button.pl-0.s-1n{padding-left:0}"};function Ft(t,e){B(e,!0),Q(t,u0);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),m=h(e,"ariaExpanded",3,void 0),p=h(e,"tabIndex",3,0),v=h(e,"click",3,Rl),_=h(e,"focus",3,Rl),y=h(e,"blur",3,Rl),$=f(()=>v()===Rl?null:A=>{A.stopPropagation(),v()(A)}),x=f(()=>_()===Rl?null:A=>{A.preventDefault(),_()()}),I=f(()=>y()===Rl?null:A=>{A.preventDefault(),y()()});var T=c0();T.__pointerdown=[d0],T.__click=function(...A){var P;(P=n($))==null||P.apply(this,A)};var R=C(T);ei(R,()=>{var A;return(A=e.children)!=null?A:gt}),S(T),et(T,A=>s(A),()=>s()),O(()=>{var A,P,E,W,F,U,X,se;oe(T,1,`btn ${(A=i())!=null?A:""}`,"s-1n"),qe(T,o()||null),T.disabled=(P=r())!=null?P:null,Ne(T,"aria-hidden",(E=l())!=null?E:null),Ne(T,"aria-label",(W=d())!=null?W:null),Ne(T,"aria-keyshortcuts",(F=u())!=null?F:null),Ne(T,"aria-expanded",(U=m())!=null?U:null),Ne(T,"data-testid",(X=a())!=null?X:null),Ne(T,"tabindex",p()),Ne(T,"role",e.role),Ne(T,"aria-checked",(se=e.areaChecked)!=null?se:null)}),pt("focus",T,function(...A){var P;(P=n(x))==null||P.apply(this,A)}),pt("blur",T,function(...A){var P;(P=n(I))==null||P.apply(this,A)}),b(t,T),H()}Ze(["pointerdown","click"]);var p0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},f0=L('<div class="modal-header s-18"><h3 class="modal-title s-18"> </h3> <!></div>'),m0=L('<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>'),v0={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,v0);let i=h(e,"showHeader",3,!0),o=h(e,"showCloseCross",3,!0),r=K(void 0),a=K(void 0),{webApi:{focusManager:l}}=$e(),d=Y("hotkey_map_modal_close_btn_text");Lt(()=>{var $;return($=n(r))==null||$.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var s=m0();s.__keydown=[p0,e];var u=C(s),m=C(u);{var p=$=>{var x=f0(),I=C(x),T=C(I,!0);S(I);var R=k(I,2);{var A=P=>{Ft(P,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(E,W)=>{qf(E,{fill:"currentColor"})},$$slots:{default:!0}})};V(R,P=>{o()&&P(A)})}S(x),O(()=>ge(T,e.title)),b($,x)};V(m,$=>{i()&&$(p)})}var v=k(m,2),_=C(v),y=C(_);ei(y,()=>{var $;return($=e.children)!=null?$:gt}),S(_),S(v),et(v,$=>N(r,$),()=>n(r)),S(u),et(u,$=>N(a,$),()=>n(a)),S(s),b(t,s),H()}Ze(["keydown"]);var g0=new Set(["BR"]),B_=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;g0.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var h0=L('<li class="hot-key-map-item s-11"><span class="hot-key-map-item-description s-11"><!></span> <span class="hot-key-map-item-value s-11"> </span></li>'),_0=L('<div class="hot-key-map-group s-11"><h5 class="hot-key-map-group-title s-11"> </h5> <ul class="hot-key-map-group-items s-11"></ul></div>'),b0=L('<div class="hot-key-map s-11"></div>'),$0={hash:"s-11",code:'.hot-key-map.s-11{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-11{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-11:last-child{border-bottom:none}.hot-key-map-group-title.s-11{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-11,.hot-key-map-item.s-11{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-11{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-11{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-11{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-11{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-11,.hot-key-map-item-value.s-11{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function Gf(t,e){B(e,!1),Q(t,$0);let[i,o]=Be(),r=()=>w(l,"$data",i),a=$e(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};jo(),Qf(t,{get title(){return r().title},onClose:s,children:(u,m)=>{var p=b0();hi(p,5,()=>r().groups,({title:v,items:_})=>v,(v,_)=>{let y=()=>n(_).title,$=()=>n(_).items;var x=_0(),I=C(x),T=C(I,!0);S(I);var R=k(I,2);hi(R,5,$,({description:A,value:P})=>P,(A,P)=>{let E=()=>n(P).description,W=()=>n(P).value;var F=h0(),U=C(F),X=C(U);gd(X,()=>B_(E())),S(U);var se=k(U,2),j=C(se,!0);S(se),S(F),O(()=>ge(j,W())),b(A,F)}),S(R),S(x),O(()=>ge(T,y())),b(v,x)}),S(p),b(u,p)},$$slots:{default:!0}}),H(),o()}import{noop as hb}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as ub,PlaybackState as Hm}from"@vkontakte/videoplayer-core/es2018";import{getVideoQualityLabel as k0}from"@vkontakte/videoplayer-shared/es2018";var y0=L('<div class="pillow s-1x"><!></div>'),x0={hash:"s-1x",code:".pillow.s-1x{background-color:#679ff8;color:var(--white);font-size:6px;font-weight:600;-webkit-font-smoothing:antialiased;border-radius:12px;padding:2px 4px}"};function Yf(t,e){Q(t,x0);var i=y0(),o=C(i);ei(o,()=>{var r;return(r=e.children)!=null?r:gt}),S(i),O(()=>Ne(i,"data-testid",e.testId)),b(t,i)}import{VideoQuality as Od}from"@vkontakte/videoplayer-shared/es2018";var w0=Ee('<svg><!><path d="M5.52 5c.32 0 .51-.2.51-.54V3.5l.5-.51 1.46 1.74c.16.2.3.28.51.28a.5.5 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.3 2.3 8.8.87c.16-.14.2-.25.2-.4A.47.47 0 0 0 8.52 0c-.18 0-.3.07-.45.22l-2 2.03h-.04V.54C6.03.2 5.84 0 5.52 0S5 .2 5 .54v3.92c0 .34.2.54.52.54M2.55 1.05 1.05 3.1h1.5zM3.5 3.1V.83C3.5.03 2.41-.3 1.94.35L.14 2.82A.75.75 0 0 0 .75 4h1.8v.55c0 .25.25.45.5.45a.45.45 0 0 0 .45-.45V4h.05a.45.45 0 0 0 0-.9z"></path></svg>');function jf(t,e){let i=Cn(e,["$$slots","$$events","$$legacy","children"]);var o=w0();to(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:gt}),Jt(),S(o),b(t,o)}var S0=Ee('<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 Xf(t,e){let i=Cn(e,["$$slots","$$events","$$legacy","children"]);var o=S0();to(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:gt}),Jt(),S(o),b(t,o)}var C0=Ee('<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 Zf(t,e){let i=Cn(e,["$$slots","$$events","$$legacy","children"]);var o=C0();to(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:gt}),Jt(),S(o),b(t,o)}var T0=Ee('<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=Cn(e,["$$slots","$$events","$$legacy","children"]);var o=T0();to(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:gt}),Jt(),S(o),b(t,o)}var I0=Ee('<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 em(t,e){let i=Cn(e,["$$slots","$$events","$$legacy","children"]);var o=I0();to(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:gt}),Jt(),S(o),b(t,o)}var Du=t=>{switch(t){case Od.Q_720P:return Zf;case Od.Q_1080P:return Jf;case Od.Q_1440P:return em;case Od.Q_2160P:return jf;case Od.Q_4320P:return Xf}};var E0=Ee('<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 tm(t,e){je(t,{get testId(){return e.testId},children:(i,o)=>{var r=E0();b(i,r)},$$slots:{default:!0}})}var P0=Ee('<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 im(t,e){je(t,{get testId(){return e.testId},children:(i,o)=>{var r=P0();b(i,r)},$$slots:{default:!0}})}var A0=L('<div aria-hidden="true"><!> <!></div>'),L0={hash:"s-1u",code:".icon.s-1u{display:flex;height:24px;position:relative;width:24px}.icon.s-1u .pillow{position:absolute;right:-9px;top:1px}.icon.triple.s-1u .pillow{right:-13px}.icon.s-1u svg[data-testid=settings-icon--labeled] ._full{opacity:0;visibility:hidden}"};function Bd(t,e){B(e,!0),Q(t,L0);let i=h(e,"isMobile",3,!1),o=h(e,"currentQuality",3,void 0),r=f(()=>o()?k0(o()):""),a=f(()=>Du(o())),l=f(()=>n(r).length>2);var d=Re(),s=le(d);{var u=p=>{tm(p,{testId:"settings-mobile-icon"})},m=p=>{var v=A0();let _;var y=C(v);{var $=T=>{let R=f(()=>`${n(r)}-pill-icon`);Yf(T,{get testId(){return n(R)},children:(A,P)=>{var E=Re(),W=le(E);Ni(W,()=>n(a),(F,U)=>{U(F,{})}),b(A,E)},$$slots:{default:!0}})};V(y,T=>{n(a)&&T($)})}var x=k(y,2);let I=f(()=>n(a)?"settings-icon--labeled":"settings-icon");im(x,{get testId(){return n(I)}}),S(v),O(T=>_=oe(v,1,"icon s-1u",null,_,T),[()=>({triple:n(l)})]),b(p,v)};V(s,p=>{i()?p(u):p(m,!1)})}b(t,d),H()}var M0=L('<span class="settings-icon-wrapper s-1y"><!></span>'),V0={hash:"s-1y",code:".settings-icon-wrapper.s-1y{position:relative;width:24px}"};function Nl(t,e){B(e,!0),Q(t,V0);let[i,o]=Be(),r=()=>w(u,"$settingsMenuVisible",i),a=()=>w(v,"$isMobile",i),l=()=>w(s,"$currentQuality",i),d=$e(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,m=d.actions.internal.openSettingsMenu,p=d.actions.internal.closeSettingsMenu,v=d.ui.isMobile,_=d.ui.t,y=K(void 0);He(()=>{n(y)&&St(()=>{e.ref$.set(n(y))})});let $=_("aria_label_settings");async function x(T){let R=aa(T);r()?p():m(R,uo)}let I=f(()=>r()?"opened":"");Ft(t,{get className(){return n(I)},testId:"settings-btn",click:x,get ariaLabel(){return $},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(T){N(y,T,!0)},children:(T,R)=>{var A=M0(),P=C(A);Bd(P,{get isMobile(){return a()},get currentQuality(){return l()}}),S(A),b(T,A)},$$slots:{default:!0}}),H(),o()}var R0=Ee('<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),N0=Ee("<path></path>");function da(t,e){B(e,!0);let i=f(()=>`subtitles-icon${e.type==="off"?"-off":e.type==="outline"?"-outline":""}`),o=f(()=>dn(e.size));je(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(i)},get shadow(){return e.shadow},children:(r,a)=>{var l=Re(),d=le(l);{var s=m=>{var p=R0();Jt(),b(m,p)},u=m=>{var p=N0();O(()=>Ne(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,p)};V(d,m=>{e.type==="off"?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}}),H()}function rm(t,e){B(e,!0);let i=h(e,"isSubtitlesEnabled",3,!1),r=be().ui.t,a=f(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));Ft(t,{testId:"subtitles-btn",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return fs.KeyC},role:"button",children:(l,d)=>{let s=f(()=>i()?void 0:"outline");da(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),H()}var N0=L('<span class="duration s-20" data-testid="video_duration"> </span>'),D0=L('<div data-testid="time"><span class="current s-20" data-testid="current_time"> </span> <!></div>'),O0={hash:"s-20",code:'.time.s-20{align-items:center;color:var(--controls-time);display:flex;font-variant-numeric:tabular-nums;font-weight:500;padding:12px 6px}.time.mobile.s-20{padding:0 0 0 8px}.current.s-20{position:relative}.duration.s-20{opacity:.7}.duration.s-20:before{content:" / ";white-space:pre}'};function zd(t,e){B(e,!0),Q(t,O0);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=Vt(),d=de(!1),s=f(()=>Go(e.duration)),u=f(()=>Go(e.position));var m=D0();let p;var v=C(m),_=C(v,!0);S(v);var y=k(v,2);{var $=x=>{var I=N0(),T=C(I,!0);S(I),O(()=>ve(T,n(s))),b(x,I)};V(y,x=>{r()&&x($)})}S(m),Ms(m,()=>Ll(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),Ye(m,x=>a(x),()=>a()),O(x=>{p=oe(m,1,"time s-20",null,p,x),ve(_,n(u))},[()=>({mobile:i()})]),b(t,m),H()}import{noop as Hu}from"@vkontakte/videoplayer-shared/es2018";var B0=Ie('<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),H0=Ie("<path></path>"),F0=Ie('<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 ca(t,e){B(e,!0);let i=h(e,"volume",3,1),o=h(e,"muted",3,!1),r=(u,m)=>m?"off":u>.5?"max":u>.2?"mid":u>0?"min":"off",a=f(()=>r(i(),o())),l=f(()=>an(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 p=F0(),v=k(ue(p));{var _=$=>{var x=B0();di(),b($,x)},y=$=>{var x=H0();O(()=>Ve(x,"d",`${d}${n(a)==="max"?s:""}`)),b($,x)};V(v,$=>{n(a)==="off"?$(_):$(y,!1)})}b(u,p)},$$slots:{default:!0}}),H()}import{isNonNullable as U_,noop as Yn}from"@vkontakte/videoplayer-shared/es2018";import{noop as am}from"@vkontakte/videoplayer-shared/es2018";import{noop as z0}from"@vkontakte/videoplayer-shared/es2018";var U0=L('<div class="overlay"><!></div>');function sm(t,e){B(e,!0);let[i,o]=Ne(),r=()=>w(l,"$overlayContainer$",i),l=be().ui.overlayContainer$,d=q(void 0),s=v=>{!v||!n(d)||!v.contains(n(d))||v.removeChild(n(d))},u=v=>{!v||!n(d)||v.contains(n(d))||v.appendChild(n(d))};De(()=>{u(r())}),Mt(()=>(u(r()),()=>s(r())));var m=U0(),p=C(m);ei(p,()=>{var v;return(v=e.children)!=null?v:mt}),S(m),Ye(m,v=>N(d,v),()=>n(d)),b(t,m),H(),o()}var W0=L('<div class="tooltip s-1r"><div class="content s-1r"> </div> <div class="tooltip-pointer s-1r"></div></div>'),K0=L("<div><!></div> <!>",1),q0={hash:"s-1r",code:'.tooltip-wrapper.s-1r{display:flex;flex-direction:column;min-width:0}.full-width.s-1r{width:100%}.tooltip.s-1r{bottom:100%;left:0;opacity:0;position:absolute;transition:opacity .2s,visibility .2s;visibility:hidden}.content.s-1r{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.tooltip-pointer.s-1r{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,q0);let[i,o]=Ne(),r=()=>w(X,"$overlayContainer$",i),a=()=>w(U,"$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),m=h(e,"translateY",3,0),p=h(e,"isFullWidthWrapper",3,!1),v=h(e,"maxTooltipWidth",3,void 0),_=h(e,"placement",3,"top"),y=h(e,"onVisibilityChange",3,z0),$=5,x=q(void 0),I=q(void 0),T,R=q(0),A=q(0),P=q(0),E=q(0),z=Vt(),F=be(),U=F.ui.playerSize,X=F.ui.overlayContainer$;De(()=>{Tt(()=>{y()(s())})});let ae=F.getLogger().createComponentLog("Tooltip component"),Z=()=>{if(!r()||!n(I)||!n(x))return;N(A,$);let ne=r().getBoundingClientRect(),ce=n(x).getBoundingClientRect(),Re=ce.width,Ae=n(I).clientWidth,Ze=a().width,Ee=(Re-Ae)/2,Te=ce.left+u()-ne.left,He=Te+Ee,It=ce.top+m()-ne.top,wt=Ae/2-$,At=He<8,dt=He+Ae>Ze-8;At&&(He=8,wt=Te+ce.width/2-2.5*$),dt&&(He=Ze-8-Ae,wt=ce.left-ne.left+ce.width/2-He-$),N(P,He,!0),N(E,It),N(R,wt,!0)},re=()=>{!r()||!n(I)||!n(x)||N(A,-$)},J=()=>{if(!r()||!n(I)||!n(x))return;N(R,$);let ne=r().getBoundingClientRect(),ce=n(x).getBoundingClientRect(),Re=ce.height,Ae=n(I).clientHeight,Ze=(Re-Ae)/2+Ae,Ee=ce.left+u()-ne.left-n(I).clientWidth,Te=2,He=Ee-$;He<8&&(He=8);let wt=ce.top+m()-ne.top+Ze,At=Te-Ze/2,dt=Te-$;N(P,He,!0),N(E,wt),N(A,At),N(R,dt)},we=()=>{!r()||!n(I)||!n(x)||N(R,-$)},me=()=>{switch(_()){case"top":Z();break;case"bottom":re();break;case"left":J();break;default:we()}},ee=()=>{try{if(!r()||!n(x))return;me(),s(!0)}catch(ne){ae({message:String(ne)})}},_e=()=>{s(!1)},Ce=()=>{n(I)&&(T||(T=window.setTimeout(ee,z.controls.hideTimeoutTooltips)),s()&&ee())},ge=()=>{_e(),window.clearTimeout(T),T=void 0},pe=(ne,ce,Re)=>{let Ae="";switch(_()){case"top":Ae=`transform: translate(${ne}px, ${ce}px);`;break;case"bottom":Ae=`transform: translate(${ne}px, ${ce}px); top: auto; bottom: 100%;`;break;case"left":Ae=`transform: translate(${ne}px, ${ce}px); left: 0; right: auto;`;break;default:Ae=`transform: translate(${ne}px, ${ce}px);`}return Ae+=` max-width: ${v()===void 0?"auto":`${v()}px`};`,Ae+=` opacity: ${Re?1:0}; visibility: ${Re?"visible":"hidden"}`,Ae},Ke=(ne,ce)=>{let Re="";switch(_()){case"top":Re=`transform: translate(${ne}px, ${ce}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":Re=`transform: translate(${ne}px, ${ce}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":Re=`transform: translate(${ne}px, ${ce}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:Re=`transform: translate(${ne}px, ${ce}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return Re},G=f(()=>pe(n(P),n(E),s())),D=f(()=>Ke(n(R),n(A)));Mt(me),sn(()=>window.clearTimeout(T));var qe=K0(),K=ue(qe);let se;K.__pointermove=Ce,K.__pointerdown=ge,K.__pointerup=function(...ne){var ce;(ce=e.disableMouseupTooltipShow?void 0:Ce)==null||ce.apply(this,ne)};var xe=C(K);ei(xe,()=>{var ne;return(ne=e.children)!=null?ne:mt}),S(K),Ye(K,ne=>N(x,ne),()=>n(x));var Be=k(K,2);{var et=ne=>{sm(ne,{children:(ce,Re)=>{var Ae=W0(),Ze=C(Ae),Ee=C(Ze,!0);S(Ze);var Te=k(Ze,2);S(Ae),Ye(Ae,He=>N(I,He),()=>n(I)),O(()=>{We(Ae,n(G)),ve(Ee,d()),We(Te,n(D))}),b(ce,Ae)},$$slots:{default:!0}})};V(Be,ne=>{d()&&!l()&&ne(et)})}O(ne=>se=oe(K,1,"tooltip-wrapper s-1r",null,se,ne),[()=>({"full-width":p()})]),lt("pointerenter",K,Ce),lt("pointerleave",K,ge),b(t,qe),H(),o()}Qe(["pointermove","pointerdown","pointerup"]);var F_=t=>{t.stopPropagation()},Q0=L("<div><!></div>"),G0={hash:"s-1n",code:".btn-container.s-1n{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-1n{min-width:0;width:100%}"};function Ao(t,e){B(e,!0),Q(t,G0);let[i,o]=Ne(),r=()=>w(u,"$isGraphOpened$",i),a=()=>w(s,"$isMobile",i),l=be(),d=mo(),s=l.ui.isMobile,u=d.graphIsOpened$,m=l.ui.t,p=h(e,"className",3,""),v=h(e,"disabled",3,!1),_=h(e,"hasTooltip",3,!0),y=h(e,"ref",15,void 0),$=h(e,"width",15,void 0),x=h(e,"isFullWidthTooltip",3,!0),I=h(e,"tooltipContent",3,""),T=h(e,"tooltipVisible",3,!1),R=h(e,"tooltipPlacement",3,"top"),A=h(e,"disabledTooltipContent",19,()=>m("tooltip_button_disabled")),P=h(e,"isAriaHidden",3,!1),E=h(e,"onTooltipVisibilityChange",3,am),z=h(e,"initialTranslateXPx",3,0),F=h(e,"initialTranslateYPx",19,()=>-18),U=h(e,"mouseEnter",3,am),X=h(e,"mouseLeave",3,am),ae=f(()=>v()?r()?m("tooltip_disabled_when_graph_on"):A():I()),Z=q(!1);De(()=>{T()||N(Z,!1)});var re=Q0();re.__pointerdown=[F_],re.__click=[F_];var J=C(re);{var we=ee=>{Fa(ee,{get content(){return n(ae)},get translateX(){return z()},get translateY(){return F()},get isFullWidthWrapper(){return x()},get placement(){return R()},get onVisibilityChange(){return E()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(Z)},set active(_e){N(Z,_e,!0)},children:(_e,Ce)=>{var ge=Le(),pe=ue(ge);ei(pe,()=>{var Ke;return(Ke=e.children)!=null?Ke:mt}),b(_e,ge)},$$slots:{default:!0}})},me=ee=>{var _e=Le(),Ce=ue(_e);ei(Ce,()=>{var ge;return(ge=e.children)!=null?ge:mt}),b(ee,_e)};V(J,ee=>{_()&&n(ae)&&!a()?ee(we):ee(me,!1)})}S(re),Ye(re,ee=>y(ee),()=>y()),O(()=>{var ee;oe(re,1,`btn-container ${(ee=p())!=null?ee:""}`,"s-1n"),Ve(re,"aria-hidden",P()||null)}),lt("mouseenter",re,function(...ee){var _e;(_e=U())==null||_e.apply(this,ee)}),lt("mouseleave",re,function(...ee){var _e;(_e=X())==null||_e.apply(this,ee)}),Pn(re,"clientWidth",$),b(t,re),H(),o()}Qe(["pointerdown","click"]);var Y0=Ie('<rect width="20" height="20" rx="10"></rect><path d="m12.53 8.69.06.19-.22-.64a.83.83 0 0 0-1.6.47l.13.48-.23-.85a.82.82 0 0 0-1.6.24l-.73-2.93a.85.85 0 0 0-1.65.4L8 11.34l-1.12-1.16a.8.8 0 0 0-1.21 1.03l2.23 2.94s1.23 1.83 4.3 1.23c2.43-.48 3.25-2.67 2.58-4.88l-.55-2.3a.88.88 0 1 0-1.7.49"></path>',1);function Wd(t,e){let i=f(()=>(e.completed,"interactive-episode-completed-icon"));je(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,r)=>{var a=Y0(),l=ue(a),d=k(l);O(()=>{Ve(l,"fill",oa),Ve(l,"fill-opacity",e.completed?1:.24),Ve(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),b(o,a)},$$slots:{default:!0}})}var j0=L("<div><!></div>"),X0={hash:"s-1e",code:".interactive-episode-icon.s-1e{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-1e{opacity:.4;pointer-events:none}"};function lm(t,e){B(e,!0),Q(t,X0);let o=be().ui.t,r=q(0),a=f(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Ao(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=j0();let u;var m=C(s);let p=f(()=>!!e.videoEpisode.completed);Wd(m,{get completed(){return n(p)}}),S(s),O(v=>{u=oe(s,1,"interactive-episode-icon s-1e",null,u,v),We(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),Pn(s,"clientWidth",v=>N(r,v)),b(l,s)},$$slots:{default:!0}}),H()}var Z0=L('<div><div class="video-episode-inner s-1d"><div class="video-episode-loaded s-1d"></div> <div></div></div></div>'),J0=L('<div class="video-episodes-wrap s-1d"></div>'),ex={hash:"s-1d",code:".video-episodes-wrap.s-1d{height:100%;position:absolute;width:100%}.video-episode.s-1d{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-1d:first-child{padding-left:0}.video-episode.s-1d:last-child{padding-right:0}.video-episode.s-1d:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-1d,.video-episode-inner.s-1d,.video-episode-loaded.s-1d{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-1d{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-1d:first-child .video-episode-inner:where(.s-1d),.video-episode.s-1d:last-child .video-episode-inner:where(.s-1d){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-1d{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-1d,.video-episode-loaded.s-1d{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-1d{background-color:var(--slider-filled-bg)}"};function dm(t,e){Q(t,ex);let i=h(e,"videoEpisodes",19,()=>[]);var o=J0();gi(o,21,i,r=>r.from,(r,a)=>{var l=Z0();let d;var s=C(l),u=C(s),m=k(u,2);let p;S(s),S(l),O((v,_)=>{d=oe(l,1,"video-episode s-1d",null,d,v),We(l,`left: ${n(a).from}%; width: ${n(a).width}%`),We(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),p=oe(m,1,"video-episode-filled s-1d",null,p,_),We(m,`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 tx(t,e,i,o,r,a,l){if(t.preventDefault(),e()&&N(i,e().getBoundingClientRect(),!0),o()||n(r)||!e())return;N(r,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function ix(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 ox(t,e,i,o,r){if(t.preventDefault(),e()||!n(i))return;N(i,!1);let a=o(t.clientX,t.clientY);r()(a,t)}function nx(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function rx(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),N(r,!1),a()(l)}var sx=L("<div></div>"),ax=L('<div class="bars s-t"><div class="loaded s-t"></div> <div></div></div>'),lx=L('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),dx={hash:"s-t",code:'.interactive-icons.s-t{position:absolute;top:-28px;width:calc(100% - 20px)}.interactive-icons.mobile.s-t{top:-10px}.slider.s-t{border-radius:var(--slider-radius);cursor:pointer;height:var(--slider-height);position:relative;touch-action:none;transition:opacity .2s;width:100%;will-change:opacity,transform;-webkit-tap-highlight-color:transparent}.no-handle.s-t{cursor:default}.slider.s-t:before{content:"";height:calc(var(--controls-height)/2);left:0;position:absolute;right:0;top:calc((var(--controls-height)/2 - var(--slider-height))*-1/2)}.bars.s-t{background:var(--slider-bg);overflow:hidden}.bars.s-t,.loaded.s-t{border-radius:var(--slider-radius);height:100%;position:absolute;width:100%}.loaded.s-t{background:var(--slider-loaded-bg);left:-100%;transition:transform .2s;will-change:transform}.filled.s-t{background-color:var(--slider-filled-bg);border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.slider.square.s-t,.slider.square.s-t .filled:where(.s-t),.slider.square.s-t .loaded:where(.s-t),.slider.square.s-t>.bars:where(.s-t){border-radius:unset}.filled.active-live.s-t{background-color:var(--timeline-slider-filled-active-live-bg)}.filled.ads.s-t{background-color:var(--slider-filled-ads)}.handleWrap.s-t{left:-100%;position:absolute;width:100%}.handle.s-t{background-color:var(--slider-handle-bg);border-radius:50%;height:var(--slider-handle-size);opacity:0;position:absolute;right:calc(var(--slider-handle-size)*-1/2);top:calc((var(--slider-height) - var(--slider-handle-size))/2);transform:scale(0);transition:opacity .2s,transform .2s;visibility:hidden;width:var(--slider-handle-size);will-change:opacity,transform}.handle.active-live.s-t{background-color:var(--timeline-slider-handle-active-live-bg)}.handle-always-visible.s-t .handle:where(.s-t),.slider-dragging.s-t .handle:where(.s-t),.slider.s-t:hover .handle:where(.s-t){opacity:1;transform:scale(1);visibility:visible}.slider-dragging.s-t .handle:where(.s-t){transform:scale(1.3)}.slider-vertical.s-t{left:-8px;position:absolute;top:-18px;transform:rotate(-90deg);transform-origin:0 0}.slider.disabled.s-t{cursor:default;opacity:.4}'};function Ua(t,e){B(e,!0),Q(t,dx);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),m=h(e,"videoEpisodes",19,()=>[]),p=h(e,"withWheelHandler",3,!1),v=h(e,"isInteractive",3,!1),_=h(e,"disabled",3,!1),y=h(e,"hideHandel",3,!1),$=h(e,"onPointerDown",3,Yn),x=h(e,"onHandleMove",3,Yn),I=h(e,"onPointerUp",3,Yn),T=h(e,"onPointerEnter",3,Yn),R=h(e,"onPointerMove",3,Yn),A=h(e,"onPointerLeave",3,Yn),P=h(e,"onMouseEnter",3,Yn),E=h(e,"onMouseLeave",3,Yn),z=h(e,"onWheelUp",3,Yn),F=h(e,"onWheelDown",3,Yn),U=h(e,"onWheelLeft",3,Yn),X=h(e,"onWheelRight",3,Yn),ae=h(e,"onDisabledClick",3,Yn),Z=h(e,"loadedProgress",3,0),re=h(e,"filledProgress",3,0),J=h(e,"handleProgress",3,0),we=h(e,"ariaLabel",3,""),me=h(e,"ariaValueMin",3,void 0),ee=h(e,"ariaValueMax",3,void 0),_e=h(e,"ariaValueNow",3,void 0),Ce=h(e,"ariaValueText",3,""),ge=h(e,"onContextMenu",3,Yn),pe=h(e,"handleAlwaysVisible",3,!1),Ke=Vt(),G=q(void 0),D=q(!1),qe=f(()=>{var $e;return($e=ee())!=null?$e:0}),K=f(()=>{var $e;return U_(m())&&(($e=m()[m().length-1])==null?void 0:$e.time)<n(qe)}),se=f(()=>U_(m())&&m().length&&n(K)&&n(qe)?Ze(Z()*100,re()*100):[]);function xe($e){if($e.preventDefault(),i()&&N(G,i().getBoundingClientRect(),!0),_())return;let Me=Re($e.clientX,$e.clientY),st=Ae($e.clientX);T()(Me,st,n(G).width)}function Be($e){$e.preventDefault(),!_()&&A()()}function et(){P()()}function ne(){E()()}function ce($e){_()||p()&&($e.preventDefault(),$e.deltaY<0?z()():$e.deltaY>0?F()():$e.deltaX>0?X()():U()())}function Re($e,Me){return l()?Math.max(0,Math.min(1,(n(G).height-(Me-n(G).top))/n(G).height)):Math.min(Math.max($e-n(G).x,0),n(G).width)/n(G).width}function Ae($e){return Math.min(Math.max($e-n(G).x,0),n(G).width)}function Ze($e,Me){let st=Ke.features.episodesClustering&&!v()?Ke.episodeMinWidthPc:0,$t=[],fe=m()[0].time/n(qe)*100,Oe=0,ze=0;for(let St=1;St<m().length;St++)Oe=m()[St].time/n(qe)*100,Oe-fe>st&&($t.push({from:fe,width:Math.max(0,Oe-fe),loadedWidth:Math.max(0,Math.min(Oe,$e)-fe),filledWidth:Math.max(0,Math.min(Oe,Me)-fe),interactive:m()[St-1].interactive,completed:m()[St-1].completed}),fe=m()[St].time/n(qe)*100,ze++);let yt={from:fe,width:Math.max(0,100-fe),loadedWidth:Math.max(0,Math.min($e,100)-fe),filledWidth:Math.max(0,Math.min(Me,100)-fe),interactive:m()[ze].interactive,completed:m()[ze].completed};100-fe<st?(ze-=1,$t[ze].width+=100-fe,$t[ze].loadedWidth+=Math.max(0,Math.min($e,100)-fe),$t[ze].filledWidth+=Math.max(0,Math.min(Me,100)-fe)):$t[ze]=yt;let qt=m()[0].time;if(qt!==0){let St=qt/n(qe)*100;$t.unshift({from:0,width:St,loadedWidth:Math.min(St,$e),filledWidth:Math.min(St,Me)})}return $t}function Ee($e){return Math.max(0,Math.min(100,$e*100))}let Te=f(()=>Ee(Z())),He=f(()=>Ee(re()));var It=lx(),wt=ue(It);{var At=$e=>{var Me=sx();let st;gi(Me,21,()=>n(se),$t=>$t.from,($t,fe)=>{var Oe=Le(),ze=ue(Oe);{var yt=qt=>{lm(qt,{get videoEpisode(){return n(fe)},get disabled(){return _()}})};V(ze,qt=>{n(fe).interactive&&qt(yt)})}b($t,Oe)}),S(Me),O($t=>st=oe(Me,1,"interactive-icons s-t",null,st,$t),[()=>({mobile:s(),hidden:s()&&!n(D)})]),b($e,Me)};V(wt,$e=>{v()&&$e(At)})}var dt=k(wt,2);let Et;dt.__pointerdown=[tx,i,G,_,D,Re,$],dt.__pointermove=[ix,_,Re,Ae,R,G,D,x],dt.__pointerup=[ox,_,D,Re,I],dt.__click=[nx,_,ae,Re],dt.__contextmenu=[rx,Re,_,ae,D,ge];var jt=C(dt);{var Pt=$e=>{dm($e,{get videoEpisodes(){return n(se)},get disabled(){return _()},get isMobile(){return s()}})},Dt=$e=>{var Me=ax(),st=C(Me),$t=k(st,2);let fe;S(Me),O(Oe=>{Ve(st,"data-value",n(Te)),We(st,`transform: translateX(${n(Te)}%);`),fe=oe($t,1,"filled s-t",null,fe,Oe),Ve($t,"data-value",n(He)),We($t,`transform: translateX(${n(He)}%);`)},[()=>({"active-live":d()})]),b($e,Me)};V(jt,$e=>{n(se).length?$e(Pt):$e(Dt,!1)})}var Ut=k(jt,2);let Y;var Pe=C(Ut);let le;S(Ut),S(dt),Ye(dt,$e=>i($e),()=>i()),O(($e,Me,st,$t)=>{var fe,Oe;Et=oe(dt,1,`slider ${(fe=o())!=null?fe:""}`,"s-t",Et,$e),Ve(dt,"aria-label",we()),Ve(dt,"aria-valuemin",me()),Ve(dt,"aria-valuemax",ee()),Ve(dt,"aria-valuenow",_e()),Ve(dt,"aria-valuetext",Ce()),Ve(dt,"data-testid",(Oe=r())!=null?Oe:null),Y=oe(Ut,1,"handleWrap s-t",null,Y,Me),We(Ut,st),le=oe(Pe,1,"handle s-t",null,le,$t)},[()=>({disabled:_(),"slider-dragging":n(D),hidden:a(),"handle-always-visible":pe(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${Ee(J())}%);`,()=>({"active-live":d()})]),lt("pointerenter",dt,xe),lt("pointerleave",dt,Be),lt("mouseenter",dt,et),lt("mouseleave",dt,ne),lt("wheel",dt,ce),b(t,It),H()}Qe(["pointerdown","pointermove","pointerup","click","contextmenu"]);var eo=(t,e)=>Id[t]>=Id[e];var Ns=(t,e)=>Id[t]<=Id[e],z_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var ux=L("<div><!></div>"),px=L("<div><!> <!></div>"),fx={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 cm(t,e){var Ae,Ze;B(e,!0),Q(t,fx);let[i,o]=Ne(),r=()=>w(R,"$isAudioAvailable$",i),a=()=>w(v,"$muted$",i),l=()=>w(p,"$volume$",i),d=()=>w(x,"$currentGridType$",i),s=()=>w(xe,"$controlsVisible",i),u=be(),m=Vt(),p=u.state.volume$,v=u.state.muted$,{setVolume:_,startVolumeChanging:y,stopVolumeChanging:$}=u.actions.internal,x=u.ui.currentGridType$,I=(Ae=u.callbacks)==null?void 0:Ae.onAudioDoesNotExistHint,T=(Ze=u.callbacks)==null?void 0:Ze.onAudioDisabledHint,R=u.state.isAudioAvailable$,A=u.state.isAudioDisabled,P=u.ui.t,E=q(!1),z,F=f(()=>e.isAds||r()),U=f(()=>!n(F)||a()||l()===0),X=f(()=>Ns(d(),"l")),ae=f(()=>n(X)?"":n(U)?!r()||A?P("tooltip_sound_unavailable"):P("tooltip_volume"):P("tooltip_volume_muted")),Z=f(()=>n(U)?P("tooltip_volume"):P("tooltip_volume_muted")),re=f(()=>n(U)?0:l()),J=!1,we=f(()=>e.isAds?!1:A?!T:r()?!1:!I);function me(Ee){y(),_(Ee)}function ee(){Nu(u,l(),m.controls.volumeStepWheel)}function _e(){Du(u,l(),m.controls.volumeStepWheel)}function Ce(Ee){_(Ee)}function ge(Ee){_(Ee),$()}function pe(){J=!0}function Ke(){J=!1,qe()}function G(){clearTimeout(z),N(E,!0)}function D(){qe()}function qe(){z=window.setTimeout(()=>{J||N(E,!1)},m.controls.volumeBarTimeout)}function K(Ee){Ee.preventDefault(),Ee.deltaY<0?ee():Ee.deltaY>0&&_e()}let se=q(!1),xe=u.ui.controlsVisible;De(()=>{s()||N(se,!1)});var Be=px();let et;var ne=C(Be);Fa(ne,{get content(){return n(ae)},translateY:-18,get active(){return n(se)},set active(Ee){N(se,Ee,!0)},children:(Ee,Te)=>{let He=f(()=>n(X)?"btn-volume-vertical":"btn-volume-horizontal");Ft(Ee,{className:"btn-full-opacity",get disabled(){return n(we)},get testId(){return n(He)},get ariaLabel(){return n(Z)},get click(){return e.click},get ariaKeyShortCut(){return fs.KeyM},role:"button",children:(It,wt)=>{ca(It,{get size(){return"24"},get volume(){return l()},get muted(){return n(U)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var ce=k(ne,2);{var Re=Ee=>{var Te=ux();let He;var It=C(Te);let wt=f(()=>n(X)?"volumeBar-slider-vertical":""),At=f(()=>n(X)&&!n(E)),dt=f(()=>n(X)?pe:Hu),Et=f(()=>n(X)?Ke:Hu),jt=f(()=>Math.round(n(re)*100)),Pt=f(()=>`${Math.round(n(re)*100)}%`),Dt=f(()=>n(X)?"volume-slider-vertical":"volume-slider");Ua(It,{get className(){return n(wt)},get isHidden(){return n(At)},get isVertical(){return n(X)},withWheelHandler:!0,onWheelUp:ee,onWheelDown:_e,onPointerDown:me,onHandleMove:Ce,onPointerUp:ge,get onPointerEnter(){return n(dt)},get onPointerLeave(){return n(Et)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(jt)},get ariaValueText(){return n(Pt)},get filledProgress(){return n(re)},get handleProgress(){return n(re)},get testId(){return n(Dt)}}),S(Te),O(Ut=>He=oe(Te,1,"volumeBar s-28",null,He,Ut),[()=>({"volumeBar-vertical":n(X)})]),b(Ee,Te)};V(ce,Ee=>{n(F)&&Ee(Re)})}S(Be),O(Ee=>et=oe(Be,1,"volumeBar-container s-28",null,et,Ee),[()=>({vertical:n(X)})]),lt("mouseenter",Be,function(...Ee){var Te;(Te=n(X)?G:Hu)==null||Te.apply(this,Ee)}),lt("mouseleave",Be,function(...Ee){var Te;(Te=n(X)?D:Hu)==null||Te.apply(this,Ee)}),lt("wheel",Be,K),b(t,Be),H(),o()}import{noop as gx}from"@vkontakte/videoplayer-shared/es2018";var mx=Ie('<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>'),vx=Ie('<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 um(t,e){let i=h(e,"isFullscreen",8,!1),o=Sn(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");je(t,{get testId(){return n(o)},children:(r,a)=>{var l=Le(),d=ue(l);{var s=m=>{var p=mx();b(m,p)},u=m=>{var p=vx();b(m,p)};V(d,m=>{i()?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}})}function Kd(t,e){B(e,!0);let i=h(e,"isFullscreen",3,!1),o=h(e,"click",3,gx),r=be(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=f(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));Ft(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let m=aa(u);a.set(m),o()()},get ariaKeyShortCut(){return fs.KeyF},role:"button",children:(u,m)=>{um(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),H()}var hx=Ie('<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 pm(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=hx();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);ei(r,()=>{var a;return(a=e.children)!=null?a:mt}),di(),S(o),b(t,o)}var _x=Ie('<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 fm(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=_x();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);ei(r,()=>{var a;return(a=e.children)!=null?a:mt}),di(6),S(o),b(t,o)}var bx={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 mm(t,e){B(e,!0),Q(t,bx);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=f(()=>!o()&&!i()?91:i()?l:95),s=f(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=f(()=>`0 0 ${n(d)} 24`);fm(t,{get width(){return n(d)},height:"24",get viewBox(){return n(u)},get"data-testid"(){return n(s)},get"data-logo"(){return r()}}),H()}function qd(t,e){B(e,!0);let[i,o]=Ne(),r=()=>w(_,"$isMobile",i),a=()=>w(v,"$currentGridType$",i),l=()=>w($,"$isCyrillicRelatedInterface$",i),d=h(e,"ref",15,void 0),s=h(e,"logoClickable",3,!1),u=h(e,"targetUrl",3,""),m=Vt(),p=be(),v=p.ui.currentGridType$,_=p.ui.isMobile,y=p.ui.t,$=p.isCyrillicRelatedInterface$,x=f(()=>m.logoType!=="vk"),I=f(()=>n(x)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),T=f(()=>(r()&&Ns(a(),"m")||Ns(a(),"l"))&&n(x)),R=()=>{var E,z;e.click(),(E=p.callbacks)!=null&&E.onLogoClicked?(z=p.callbacks)==null||z.onLogoClicked():u()&&window.open(u(),"_blank")},A=f(()=>!s()),P=f(()=>n(x)?"btn-vk-video-logo":"btn-vk-logo");Ft(t,{className:"btn-full-opacity",get disabled(){return n(A)},click:R,get testId(){return n(P)},get ariaLabel(){return n(I)},get ref(){return d()},set ref(E){d(E)},children:(E,z)=>{var F=Le(),U=ue(F);{var X=Z=>{mm(Z,{get logo(){return m.logoType},get short(){return n(T)},get isCyrillic(){return l()}})},ae=Z=>{pm(Z,{})};V(U,Z=>{n(x)?Z(X):Z(ae,!1)})}b(E,F)},$$slots:{default:!0}}),H(),o()}import{ChromecastState as wx}from"@vkontakte/videoplayer-core/es2018";import{ChromecastState as K_}from"@vkontakte/videoplayer-core/es2018";var $x=Ie('<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-18"></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-18"></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-18"></path>',1),yx=Ie('<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),xx={hash:"s-18",code:".animated.s-18{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-18{animation-name:s-18-wave1}.wave2.animated.s-18{animation-name:s-18-wave2}.wave3.animated.s-18{animation-name:s-18-wave3}@keyframes s-18-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-18-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-18-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function Qd(t,e){B(e,!0),Q(t,xx);let i=h(e,"isMobile",3,!1),o=f(()=>e.iconState===K_.CONNECTED),r=f(()=>e.iconState===K_.CONNECTING),a=f(()=>n(o)?"#2688EB":oa),l=f(()=>e.size?an(e.size):void 0);var d=Le(),s=ue(d);{var u=p=>{je(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(v,_)=>{var y=$x();di(2),b(v,y)},$$slots:{default:!0}})},m=p=>{je(p,{get style(){return n(l)},testId:"chromecast-icon",children:(v,_)=>{var y=yx(),$=ue(y);let x;var I=k($);let T;var R=k(I);let A;var P=k(R);let E;var z=k(P);let F;O((U,X,ae,Z,re)=>{x=oe($,0,"wave2 s-18",null,x,U),T=oe(I,0,"wave3 s-18",null,T,X),A=oe(R,0,"wave1 s-18",null,A,ae),E=oe(P,0,"s-18",null,E,Z),F=oe(z,0,"s-18",null,F,re)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:n(o)}),()=>({hidden:!n(o)})]),b(v,y)},$$slots:{default:!0}})};V(s,p=>{i()?p(u):p(m,!1)})}b(t,d),H()}import{noop as Sx}from"@vkontakte/videoplayer-shared/es2018";function Gd(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"click",3,Sx),l=be().ui.t,d=f(()=>e.state===wx.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));Ft(t,{get ariaLabel(){return n(d)},get click(){return r()},testId:"btn-chromecast",get ref(){return i()},set ref(s){i(s)},children:(s,u)=>{Qd(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),H()}import{noop as Tx}from"@vkontakte/videoplayer-shared/es2018";var Cx=Ie('<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 vm(t){je(t,{testId:"episodes-icon",children:(e,i)=>{var o=Cx();di(2),b(e,o)},$$slots:{default:!0}})}var Fu=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var Ix=L('<span class="text mobile s-26"> </span> <div class="chevron-episodes s-26" data-testid="btn-episodes_icon"><!></div>',1),Ex=L('<span class="text s-26"> </span>'),Px=L('<span class="text count s-26"> </span>'),kx=L('<span class="icon s-26"><!></span> <!>',1),Ax={hash:"s-26",code:".icon.s-26{flex-shrink:0}.text.s-26{overflow:hidden;padding:0 8px;text-overflow:ellipsis;white-space:nowrap}.text.count.s-26{overflow:visible}.text.mobile.s-26{padding:0 3px 0 4px}.chevron-episodes.s-26{margin-bottom:-6px;opacity:.7;transform:scale(.8)}"};function Yd(t,e){var J,we,me;B(e,!0),Q(t,Ax);let[i,o]=Ne(),r=()=>w(y,"$currentGridType$",i),a=()=>w($,"$openedByKeyboard$",i),l=()=>w(x,"$panelOpened$",i),d=()=>w(I,"$isMobile",i),s=h(e,"position",3,0),u=h(e,"duration",3,0),m=h(e,"timeCodes",19,()=>[]),p=be(),v=(we=(J=p.callbacks)==null?void 0:J.onEpisodeChanged)!=null?we:Tx,_=!!((me=p.callbacks)!=null&&me.onEpisodeClicked),y=p.ui.currentGridType$,$=p.ui.episodes.openedByKeyboard$,x=p.ui.episodes.panelOpened$,I=p.ui.isMobile,T=p.ui.t,R=q(void 0),A=ee=>{var Ce,ge,pe;if(!!((Ce=p.callbacks)!=null&&Ce.onEpisodeClicked)){let Ke=aa(ee);$.set(Ke),x.set(!0),(pe=(ge=p.callbacks)==null?void 0:ge.onEpisodeClicked)==null||pe.call(ge,Ke)}},P=q(null),E=f(()=>s()/u());De(()=>{var _e;let ee=Fu(n(E),u(),m());ee?((_e=n(P))==null?void 0:_e.time)!==ee.time&&(v(ee),N(P,ee,!0)):N(P,null)});let z=f(()=>{var ee;return((ee=n(P))==null?void 0:ee.text)||""}),F=f(()=>eo(r(),"xl")?"FULL":eo(r(),"m")?"COUNT":"SHORT"),U=f(()=>`${T("tooltip_episodes")}: ${n(z)}`),X=async(ee,_e,Ce)=>{await co(),(ee==null?void 0:ee.getAttribute("aria-expanded"))==="false"&&_e&&!Ce&&Tt(()=>{$.set(!1),ee.focus()})};De(()=>{X(n(R),a(),l())});var ae=Le(),Z=ue(ae);{var re=ee=>{let _e=f(()=>d()?"px-0":""),Ce=f(()=>!_);Ft(ee,{get className(){var ge;return`w-max btn-full-opacity btn-jc-l ${(ge=n(_e))!=null?ge:""}`},testId:"btn-episodes",click:A,get disabled(){return n(Ce)},get ariaExpanded(){return l()},get ariaLabel(){return n(U)},get ref(){return n(R)},set ref(ge){N(R,ge,!0)},children:(ge,pe)=>{var Ke=Le(),G=ue(Ke);{var D=K=>{var se=Ix(),xe=ue(se),Be=C(xe,!0);S(xe);var et=k(xe,2),ne=C(et);Lr(ne,{direction:"right"}),S(et),O(()=>ve(Be,n(z))),b(K,se)},qe=K=>{var se=kx(),xe=ue(se),Be=C(xe);vm(Be,{}),S(xe);var et=k(xe,2);{var ne=Re=>{var Ae=Ex(),Ze=C(Ae,!0);S(Ae),O(()=>ve(Ze,n(z))),b(Re,Ae)},ce=(Re,Ae)=>{{var Ze=Ee=>{var Te=Px(),He=C(Te,!0);S(Te),O(()=>ve(He,m().length)),b(Ee,Te)};V(Re,Ee=>{n(F)==="COUNT"&&Ee(Ze)},Ae)}};V(et,Re=>{n(F)==="FULL"?Re(ne):Re(ce,!1)})}b(K,se)};V(G,K=>{d()?K(D):K(qe,!1)})}b(ge,Ke)},$$slots:{default:!0}})};V(Z,ee=>{n(P)&&ee(re)})}b(t,ae),H(),o()}import{debounceFn as pb}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as Fx,PlaybackState as Fl,Player as Ux,PredefinedQualityLimits as hs,VideoFormat as Zd,clientChecker as tb}from"@vkontakte/videoplayer-core/es2018";import{assertNonNullable as pr,getHighestQuality as zx,InterfaceLanguage as Wx,isInvariantQuality as Kx,isNonNullable as qx,loadVKLangPack as Qx,Logger as Gx,map as ib,merge as Yx,Observable as ju,Subject as Ul,Subscription as Sm,TracerFactory as jx,ValueSubject as Xx,VideoQuality as Zx,devNull as Jx,now as e2,filter as t2,once as i2}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as Bs}from"@vkontakte/videoplayer-statistics/es2018";import{detectEmbed as Lx,devNull as ii,now as oi,withoutNullable as q_}from"@vkontakte/videoplayer-shared/es2018";import{addScript as Mx,Subject as ln,clearVideoElement as Vx}from"@vkontakte/videoplayer-shared/es2018";var Rx="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Uu=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 ln,loadStarted$:new ln,loadEnded$:new ln,loadError$:new ln,ready$:new ln,slotRequested$:new ln,started$:new ln,timeRemained$:new ln,paused$:new ln,resumed$:new ln,ended$:new ln,empty$:new ln,skipped$:new ln,clicked$:new ln,closed$:new ln,error$:new ln};this.loadAdman=e=>(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[oi()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));this.loadAdmanMailRu=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[oi()]}),o())};Mx(Rx,e,this.loadTimeout).then(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[oi()]}),window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[oi()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[oi()]}),o(),clearTimeout(r)})});this.loadAdmanNPM=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[oi()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[oi()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[oi()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[oi()]}),!d&&(window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[oi()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[oi()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[oi(),i.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(i)}`}),this.events.started$.next(e),i.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:"ad muted start"})),this.adsState.duration.set(i.duration),this.adsState.playbackState.set("playing"),this.adsState.canSkip.set(i.allowClose),this.adsState.secondsToWatchBeforeSkip.set(i.allowCloseDelay),this.startWatchDog(),(o=this.externalApi)!=null&&o.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,e,String(i.bannerID))):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=e=>{var o;((o=this.adsState)!=null&&o.playbackState?ye(this.adsState.playbackState):void 0)!=="inactive"&&(this.adsState?(this.adsState.position.set(e.currentTime),this.events.timeRemained$.next(e),this.startWatchDog()):this.onAdError("TimeRemained callback failed: Adman state is not initialized"))};this.onAdPaused=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.stopWatchDog(),this.adsState?(this.log({message:"ad paused"}),this.adsState.playbackState.set("paused")):this.onAdError("Paused callback failed: Adman state is not initialized")};this.onAdPlayed=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.startWatchDog(),this.adsState?(this.log({message:"ad played"}),this.adsState.playbackState.set("playing")):this.onAdError("Player callback failed: Adman is not initialized")};this.onAdMidrollPoint=()=>{if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[oi()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch(e){this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};this.onAdSkipped=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad completed"}),this.currentAdSection?(this.events.ended$.next(this.currentAdSection),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0)):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{var e,i;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad clicked"}),(i=this.videoElement)==null||i.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(e="ad error")=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[oi()]}),this.log({message:e}),this.events.error$.next(e),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()};this.log=e.createComponentLog("AdmanWrapper"),ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[oi()]}),this.loadTimeout=i.loadTimeout,this.initTimeout=i.initTimeout,this.runtimeTimeout=i.runtimeTimeout,this.useAdmanFromNPM=i.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(i.volumeMultiplier,1)),this.isVsidOriginal=i.isVsidOriginal}init(e,i,o){this.actions=e,this.adsState=i,this.playerState=o}onAdmanLoadingError(){this.onAdError("adman loading error")}async initAdman(e){var A,P;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[oi(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:o,isAutoplay:r,adsContainer:a,adsVideoElement:l,slotId:d,params:s={},paramsOverride:u={},duration:m,externalApi:p,json:v}=e;this.externalApi=p;let _,y=this.playerState&&ye(this.playerState.vsid);y&&(this.isVsidOriginal?_=y:_=parseInt(y,36));let{isEmbed:$,immediateOrigin:x}=Lx(),I=(A=$?x:window.location.href)!=null?A:window.location.href,T=q_({...s,dl:encodeURIComponent(I),autoplay:r?1:0,player_width:i,player_height:o,..._?{request_id:_}:{},duration:m,...u}),R=q_({slot:v?void 0:d,wrapper:a,videoEl:l,videoQuality:o,params:v?void 0:T,browser:{mobile:!1},json:v});try{let E=new window.AdmanHTML;if(E.onReady(this.onAdsReady),E.onStarted(this.onAdStarted),E.onPlayed(this.onAdPlayed),E.onPaused(this.onAdPaused),E.adMidrollPoint(this.onAdMidrollPoint),E.onClosed(this.onAdClosed),E.onSkipped(this.onAdSkipped),E.onClicked(this.onAdClicked),E.onTimeRemained(this.onAdTimeRemained),E.onCompleted(this.onAdCompleted),E.onError(this.onAdError),E.setDebug(!1),!v&&((P=this.externalApi)!=null&&P.videoGetAds)){let z=await this.safeExternalCall(this.externalApi.videoGetAds,T);z&&(delete R.slot,delete R.params,Object.assign(R,{json:z}))}E.init(R),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(R)}`})}catch(E){ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[oi()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){var o,r,a;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[oi()]}),this.currentAdSection===null&&!e){this.log({message:"switch to video, no currentAdSection. can't switch"});return}let i=this.currentAdSection==="postroll";if(this.actions){if(this.adsState&&this.playerState)this.adsState.playbackState.set("inactive"),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${i}`});else{let l="Switch to video: Adman state was not updated correctly";this.log({message:l}),this.events.error$.next(l)}(a=(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(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adsState){this.log({message:"toggle play"});let i=ye(this.adsState.playbackState);i==="playing"?this.pause():i==="paused"&&this.play()}else this.onAdError("Can not toggle play: Adman state is not initialized")}setInitialVolume(e){this.log({message:`set initial volume ${e}`}),this.initialVolume=e}setVolume(e){let i=e*this.volumeMultiplier;if(this.log({message:`set volume ${i}`}),this.adman)try{this.adman.setVolume(i)}catch(o){this.onAdError("could not set ad volume")}this.videoElement&&(this.videoElement.volume=i)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch(i){this.onAdError("could not set ad fullscreen")}}startPreroll(){if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[oi()]}),this.adman){if(!this.isDestroyed){this.log({message:"start preroll"}),this.setVolume(this.initialVolume),this.currentAdSection="preroll",this.startWatchDog();try{this.adman.start("preroll")}catch(e){this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch(i){this.onAdError("could not start postroll")}}else this.onAdError("Can not start postroll: Adman is not initialized")}startWatchDog(){this.watchDogTimeout&&this.stopWatchDog(),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch(i){this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch(i){this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(i){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){var o;(o=this.adman)==null||o.setPosition(Math.floor(e),Math.floor(i))}destroy(){var e,i,o,r,a,l,d,s,u,m,p,v;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[oi()]}),this.log({message:"destroy"}),this.stopWatchDog(),(e=this.adman)==null||e.onReady(void 0),(i=this.adman)==null||i.onStarted(void 0),(o=this.adman)==null||o.onPlayed(void 0),(r=this.adman)==null||r.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(l=this.adman)==null||l.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(s=this.adman)==null||s.onClicked(void 0),(u=this.adman)==null||u.onTimeRemained(void 0),(m=this.adman)==null||m.onCompleted(void 0),(p=this.adman)==null||p.onError(void 0),(v=this.adman)==null||v.destroy(),this.videoElement&&Vx(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 Q_=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 gm=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 zu,{startTime:m,endTime:p}=u.parse(s);l.startTime=m,l.endTime=p}else if(s.trim()!==""){let u=new hm,{texts:m}=u.parse(s);l.texts=[...l.texts,...m]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},zu=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}},hm=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},r=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](l){let d=0,s=[];for(;d<l.length;){let u=["<",">"].reduce((m,p)=>{let v=l.indexOf(p,d);return m===-1||m>v?v:m},-1);if(u===-1){s.push(l.substring(d));break}s.push(l.substring(d,u)),d=u+1}return s}}),a=new zu;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}},G_=gm;import{isNonNullable as _m}from"@vkontakte/videoplayer-shared/es2018";var za,Ei,bm=0,$m=!1,Y_="",j_=(t,e=0,i=0)=>t<e&&t<i,Wu=(t,e=0,i=0)=>t>=e&&t<=i,Nx=(t,e=0,i=0)=>t>e&&t>i,X_=(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})=>Wu(t,u,m));let a=t>=bm,l=t<bm;if(bm=t,l&&($m=!1),_m(za)&&Wu(t,za.startTime,za.endTime)&&Y_===e.value)return za;if(!_m(Ei)&&(r!=null&&r.length)&&!$m){Ei=r.find(({startTime:u,endTime:m})=>Wu(t,u,m)||a&&j_(t,u,m)),za=void 0,!_m(Ei)&&r[r.length-1].endTime<t&&($m=!0);return}else{if(Wu(t,Ei==null?void 0:Ei.startTime,Ei==null?void 0:Ei.endTime))return za=Ei,Ei=void 0,Y_=e.value,za;(a&&Nx(t,Ei==null?void 0:Ei.startTime,Ei==null?void 0:Ei.endTime)||l&&j_(t,Ei==null?void 0:Ei.startTime,Ei==null?void 0:Ei.endTime))&&(Ei=void 0)}};var Ku={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"},Dx={abk:"as",ara:"ar",aze:"az",bak:"ba",bel:"be",ben:"bn",bos:"bs",bul:"bg",ces:"cs",chv:"cv",dan:"da",deu:"de",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",fas:"fa",fin:"fi",fra:"fr",heb:"he",hin:"hi",hrv:"hr",hun:"hu",hye:"hy",ind:"id",ita:"it",jpn:"ja",kan:"kn",kat:"ka",kaz:"kk",kir:"ky",kor:"ko",lav:"lv",lit:"lt",mon:"mn",mya:"my",nep:"ne",nld:"nl",nor:"no",oss:"os",pan:"pa",pol:"pl",por:"pt",ron:"ro",rus:"ru",sin:"si",slk:"sk",slv:"sl",spa:"es",srp:"sr",swa:"sw",swe:"sv",tat:"tt",tgk:"tg",tgl:"tl",tha:"th",tuk:"tk",tur:"tr",ukr:"uk",urd:"ur",uzb:"uz",vie:"vi"},jd=t=>{var e,i;return(i=(e=Ku[t])!=null?e:Ku[Dx[t]])!=null?i:void 0};import{clientChecker as J_}from"@vkontakte/videoplayer-core/es2018";import{debounceFn as Bx,getWindow as ym,ValueSubject as xm}from"@vkontakte/videoplayer-shared/es2018";import{getWindow as Ox}from"@vkontakte/videoplayer-shared/es2018";var qu=()=>{var t;return(t=Ox().document)==null?void 0:t.pictureInPictureEnabled},Qu=t=>!!t.pictureInPictureWindow,Z_=t=>!!t.target&&"height"in t.target&&"width"in t.target;var Ds=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:Bx(this.onResize.bind(this),300)};this.info={isActive$:new xm(!1),isEnabled$:new xm(!1),type:0};this.info.isEnabled$=new xm(e)}isSupported(){return qu()}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(){let{document:e}=ym();!this.isSupported()||!this.isActive()||!this.videoElement||!e.pictureInPictureElement||(await e.exitPictureInPicture(),J_.browser.isYandex&&!this.videoElement.isConnected&&this.onLeavePictureInPicture())}assignPlayerContainer(e){this.isSupported()&&(this.playerContainer=e)}updateVideoElement(){this.isSupported()&&this.exit().finally(()=>{var i;this.removeEventHandlers();let e=this.videoElement;this.videoElement=(i=this.playerContainer)==null?void 0:i.querySelector("video"),this.waitForSafariLeavePictureInPicture(e,this.videoElement),this.addEventHandlers()})}addEventHandlers(){var e,i;(e=this.videoElement)==null||e.addEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.addEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}setExternalEventHandlers(e){this.externalEventHandlers={...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 o,r;let i=Qu(e)?e.pictureInPictureWindow:void 0;this.info.isActive$.next(!0),this.isRequested=!0,this.eventHandlers.resize(e),i==null||i.addEventListener("resize",this.eventHandlers.resize),(r=(o=this.externalEventHandlers).enterpictureinpicture)==null||r.call(o)}onLeavePictureInPicture(e){var i,o;if(e){let r=Qu(e)?e.pictureInPictureWindow:void 0;r==null||r.removeEventListener("resize",this.eventHandlers.resize)}this.info.isActive$.next(!1),this.isRequested=!1,this.eventHandlers.resize.cancel(),(o=(i=this.externalEventHandlers).leavepictureinpicture)==null||o.call(i)}onResize(e){var o,r;let i=Z_(e)?e.target:Qu(e)?e.pictureInPictureWindow:void 0;i&&((r=(o=this.externalEventHandlers).resize)==null||r.call(o,{width:i.width,height:i.height}))}setEnabled(e){this.info.isEnabled$.next(e)}waitForSafariLeavePictureInPicture(e,i){if(J_.browser.isSafari&&e&&e!==i){let r=this.eventHandlers.leavepictureinpicture,a=0,l=()=>{ym().clearTimeout(a),e.removeEventListener("leavepictureinpicture",d)},d=s=>(r(s),l());e.addEventListener("leavepictureinpicture",d),a=ym().setTimeout(l,1e3)}}};function eb(t){return t instanceof Ds}import{Subscription as Hx}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-statistics/es2018";var Gu=class{constructor(e,i,o,r=new Hx){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 Yu=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(Yu||{});var gs=t=>t!=null?t:0,Os=(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(gs(i==null?void 0:i.top)-gs(o==null?void 0:o.top)),left:Math.round(gs(i==null?void 0:i.left)-gs(o==null?void 0:o.left)),bottom:Math.round(gs(i==null?void 0:i.bottom)-gs(o==null?void 0:o.top)),right:Math.round(gs(i==null?void 0:i.right)-gs(o==null?void 0:o.left))}},Bl=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:gs(e==null?void 0:e.width),height:gs(e==null?void 0:e.height)}};var Ln="off";var Hl=t=>!!(Math.round(Math.abs(t)/90)%2);var ob=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:m,previewThumbsData:p,uiConfig:v,coreConfig:_,player:y,disabledControls:$,isInteractive:x,interactiveRanges$:I,isInteractiveTime$:T,replayInteractive:R,stopPlayer:A,hasInteractiveBranches:P,playPrevChapterDisabledTooltip:E,additionalButtons:z,additionalSettingsMenuItems:F,additionalContextMenuItems:U,playPrevVideo:X,playNextVideo:ae,onVideoChanged:Z,looped:re=!1,statistics:J,saveRate:we,internalsExposure:me,playerView:ee,playerId:_e,metaConfig:Ce})=>{var Wv,Kv;let ge={..._,isAudioDisabled:l,live:{...(Wv=_.live)!=null?Wv:{},isLiveCatchUpMode:!!r}},pe=v,Ke=jx.createRootTracer(pe.features.tracer),G=Ke.createComponentTracer("Store"),D=y||new Ux(ge,Ke,{playerId:_e,onDevNullLog:s==null?void 0:s.onDevNullLog});me==null||me.expose({corePlayer:D});let qe=new Gx,K=new Uu(qe,{loadTimeout:pe.ads.loadTimeout,initTimeout:pe.ads.initTimeout,runtimeTimeout:pe.ads.runtimeTimeout,useAdmanFromNPM:pe.ads.useAdmanFromNPM,volumeMultiplier:pe.ads.volumeMultiplier,isVsidOriginal:pe.ads.isVsidOriginal}),se=Na.getInstance(),xe=u==null?void 0:u.pictureInPictureApi,Be=u==null?void 0:u.annotationsApi,et=u==null?void 0:u.slotsApi,ne=u==null?void 0:u.focusManager,ce=qe.createComponentLog("Store"),Re,Ae,Ze={},Ee=new gu,Te=new Sm,He="",It=de(!1),wt=J&&J.oneStat?ti(J.oneStat.vsid$):Ar(void 0),At=de(na()),dt=de(!1),Et=()=>y_(document,tb.device.isIOS),jt=(Kv=xe==null?void 0:xe.info.isActive$)!=null?Kv:new Xx(!1),Pt=de(0),Dt=de(!1),Ut=de(!1),Y=de([]),Pe=Yx(D.events.fatalError$,D.events.managedError$).subscribe(c=>Y.update(g=>[...g,c])),le=Ar(!1,c=>{let g=D.events.fatalError$.subscribe(()=>c(!0));return()=>g.unsubscribe()}),$e=async c=>{var ie;let g=Object.values(Wx).includes(c);if(pe.downloadVKLanguages&&(g&&pe.updateBuiltinLanguages||!Rf(c))){let Se;try{Se=await Qx(c,Ah,Lh)}catch(Ge){(ie=J==null?void 0:J.oneStat)==null||ie.logError({errorType:"VKLangPack",fatal:!1}),se==null||se.report(Ge,{errorType:"VKLangPack",fatal:!1})}Se&&(Vf({language:c,pack:Se,fallback:pe.defaultLanguage}),Me.set(c),st.update(Ge=>Ge+1))}Rf(c)&&Me.set(c)},Me=de(t),st=de(0),$t=de(e);$e(t);let fe=(c,g)=>{let M=ye(Me);return Nf(M,c,g,pe.defaultLanguage)},Oe=de("thumb");Oe.subscribe(c=>{c==="ads"&&D.info.playbackState$.getValue()&&qt()});let ze=(()=>{let c=fi([le,Oe],([g,M])=>g?"crashed":M);return{...c,is:g=>ye(c)===g}})(),yt=de(),qt=()=>{yt.set({muted:D.info.muted$.getValue()})},St=(()=>{let c=de(new Set($));return{...c,add:g=>{c.update(M=>new Set([...M].concat(g)))},remove:g=>{c.update(M=>{let ie=[...M];return new Set(Array.isArray(g)?ie.filter(Se=>!g.includes(Se)):ie.filter(Se=>Se!==g))})},includes:g=>{let M=ye(c);return Array.isArray(g)?g.every(ie=>M.has(ie)):M.has(g)}}})(),ni=de({width:0,height:0}),ci=null,Vi=D.info.isBuffering$,Rt=Ar(Vi.getValue(),c=>{let g=Vi.subscribe(M=>{M&&ci===null?ci=window.setTimeout(()=>{c(Vi.getValue()),ci=null},pe.loaderDelay):c(M)});return()=>{g.unsubscribe(),ci&&clearTimeout(ci)}});G.log("create store"),ce({message:"create store"});let uo=c=>{let g=c.container,M=()=>{yi=new MutationObserver(Se=>{let{removedNodes:Ge}=Se[0];Ge.length&&g.append(D.experimental.element$.getValue())}),yi.observe(g,{childList:!0})},ie=D.experimental.element$.getValue();if(ie)g.append(ie),M();else{let Se=D.experimental.element$.pipe(t2(Ge=>!!Ge),i2()).subscribe(Ge=>{g.append(Ge),M()});Te.add(Se)}},pi=c=>{ce({message:`init video, config: ${JSON.stringify(c)}`}),x?uo(c):(Jx.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[e2()]}),D.initVideo(c)),G.log("init video",{isInteractive:x}),c.subtitles&&D.setExternalTextTracks(c.subtitles),Re=c,He=c.subtitlesForcedLanguage||""},tt=new Ul,Gt=c=>tt.next(c),Ri=new Ul,hi=new Ul,Zt=new Ul,yi=null,rt={actionRewind$:Ri,actionSeek$:hi,inPiP$:jt,inFullscreen$:new ju(c=>At.subscribe(g=>c.next(g))),actionSetSubtitle$:Zt,nextMovie$:tt},it=new Ul,Si=new Ul,Yo={actionSeek$:hi,actionSubtitlesSwitched$:it,actionQuality$:Si,playerSize$:new ju(c=>ni.subscribe(g=>c.next(g))),inPiP$:jt,inFullscreen$:new ju(c=>At.subscribe(g=>c.next(g))),isLoaderVisible$:new ju(c=>Rt.subscribe(g=>c.next(g)))};if(J){let{oneStat:c,thinOneStat:g,mediascopePixel:M,statSubscription:ie}=J;c&&(x||ie.add(c.attachTo(D)),ie.add(c.attachToUi(rt)),ie.add(c.attachToAds(K.events)),c.authorize(a).catch(Se=>{ce({message:`onestat auth error ${String(Se)}`})}),M&&M.attachTo(D)),g&&(ie.add(g.attachTo(D,K.events)),ie.add(g.attachToUi(Yo)),ie.add(g.attachToAds(K.events)),g.updateContext({isMobile:ye(It)}),g.authorize(a))}if(se){let c=new Sm,g=(M,ie)=>c.add(M.subscribe(ie));if(g(D.events.managedError$,M=>{se.logIError(M)}),g(D.events.fatalError$,M=>{se.logIError(M,!0)}),J){let{oneStat:M}=J;M&&g(M.experimental.error$,ie=>{se.logIError(ie)})}se.sentrySubscription.add(c)}let Lo=()=>{if(tb.device.isIOS&&Ae)try{x_(Ae)}catch(c){ce({message:`exitIosSafariFullscreen failed: ${c}`})}};Te.add(D.experimental.element$.subscribe(c=>{c&&(Ae=c,c.classList.add("player-media"),xe==null||xe.updateVideoElement(),x&&c.setAttribute("pip","false"),(ee==="preview"||!pe.features.pip&&!pe.features.dpip)&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(D.events.ended$.subscribe(()=>{var c;Lo(),(c=s==null?void 0:s.onEnded)==null||c.call(s)})).add(D.events.looped$.subscribe(()=>{var c;(c=s==null?void 0:s.onLooped)==null||c.call(s)})).add(D.events.started$.subscribe(async()=>{var g,M;eb(xe)&&await(xe==null?void 0:xe.revealPictureInPicture());let c=D.info.muted$.getValue();(g=s==null?void 0:s.onStarted)==null||g.call(s),(M=Ze.onStarted)==null||M.call(Ze,c)})).add(D.events.willSeek$.subscribe(({from:c,to:g})=>{var M;(M=s==null?void 0:s.onSeek)==null||M.call(s,c,g)})).add(D.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=s==null?void 0:s.onAutoplaySoundProhibited)==null||c.call(s)})).add(D.info.position$.subscribe(c=>{var M;let g=D.info.duration$.getValue();isFinite(g)&&g>0&&((M=s==null?void 0:s.onTimeupdate)==null||M.call(s,g,c),K.setPosition(c,g))})).add(D.events.fatalError$.subscribe(c=>{var g;(g=s==null?void 0:s.onCrashed)==null||g.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(D.events.fetcherRecoverableError$.subscribe(c=>{var g;(g=s==null?void 0:s.onRecoverableError)==null||g.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(D.events.loadedMetadata$.subscribe(()=>{Dt.set(!0)})).add(D.info.is3DVideo$.subscribe(c=>{Ut.set(c)})).add(D.info.isEnded$.subscribe(c=>{x&&(c?(T!=null&&T.getValue()&&St.add(Td),St.add("PLAY_BUTTON")):St.remove("PLAY_BUTTON"))})).add(D.info.liveTime$.subscribe(c=>{var g;(g=s==null?void 0:s.onLiveTime)==null||g.call(s,c)})).add(D.info.isStalled$.subscribe(c=>{var g;(g=s==null?void 0:s.onStalledChanged)==null||g.call(s,c)})).add(D.info.isLiveEnded$.subscribe(c=>{var g;return c&&((g=s==null?void 0:s.onLiveEnded)==null?void 0:g.call(s))})).add(K.events.loadStarted$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:g.call(c)})).add(K.events.loadEnded$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:g.call(c)})).add(K.events.loadError$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadError)==null?void 0:g.call(c)})).add(K.events.init$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onInit)==null?void 0:g.call(c)})).add(K.events.ready$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onReady)==null?void 0:g.call(c)})).add(K.events.started$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onStarted)==null?void 0:M.call(g,c)})).add(K.events.timeRemained$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onTimeRemained)==null?void 0:M.call(g,c)})).add(K.events.ended$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onCompleted)==null?void 0:M.call(g,c)})).add(K.events.empty$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onEmpty)==null?void 0:g.call(c)})).add(K.events.clicked$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onClicked)==null?void 0:M.call(g,c)})).add(K.events.closed$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onClosed)==null?void 0:M.call(g,c)})).add(K.events.error$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onError)==null?void 0:M.call(g,c)})).add(K.events.paused$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onPaused)==null?void 0:g.call(c)})).add(K.events.resumed$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onResumed)==null?void 0:g.call(c)}));let vt=new Sm,Ot=()=>{var Ge,kt,Bt;let{debugLog:c}=pe,g,M="#9df7b7",ie="#efd169";if(c&&c!==!0){let{colors:Wt}=c;g=c.tag,M=(Ge=Wt==null?void 0:Wt[0])!=null?Ge:M,ie=(Bt=(kt=Wt==null?void 0:Wt[1])!=null?kt:Wt==null?void 0:Wt[0])!=null?Bt:ie}let Se=g?`: ${g}`:"";vt.add(D.events.log$.subscribe(Wt=>{console.debug(`%c sdk${Se} `,`background:${M};`,`sdk component: ${Wt.component}`,Wt.message)})).add(qe.log$.subscribe(Wt=>{console.debug(`%c ui${Se} `,`background:${ie};`,`ui component: ${Wt.component}.`,Wt.message)}))},W=()=>{vt.unsubscribe()},Lt=(c,g)=>{G.log("start camera manual rotation",{mx:c,my:g}),D.startCameraManualRotation(c,g)},ri=(c=!1)=>{G.log("stop camera manual rotation",{immediate:c}),D.stopCameraManualRotation(c)},ft=(c,g,M)=>{G.log("move camera focus px",{xpx:c,ypx:g,dt:M}),D.moveCameraFocusPX(c,g,M)},Xt=()=>{D.holdCamera()},_t=()=>{D.releaseCamera()},nt=Ar(D.info.position$.getValue(),c=>{let g,M,ie=()=>{let Se=D.info.playbackState$.getValue(),Ge=D.info.isLive$.getValue(),kt=D.info.duration$.getValue(),Bt=D.info.position$.getValue();if(Se&&[Fl.PLAYING,Fl.PAUSED].includes(Se)){let Wt=Ge?Bt-kt:D.getExactTime();Wt!==M&&c(Wt),M=Wt}g=requestAnimationFrame(ie)};return ie(),()=>cancelAnimationFrame(g)}),Ni=ti(D.info.playbackState$),Pi=ti(D.info.isBuffering$),cn=fi([Ni,Pi],([c,g])=>g?"buffering":c),un=ti(D.info.currentBuffer$),ki=ti(D.info.isEnded$),Di=ti(D.info.isLive$),Mn=pe.features.playbackRate?ti(D.info.canChangePlaybackSpeed$):Ar(!1),po=ti(D.info.liveBufferTime$),io=ti(D.info.volume$),Ti=ti(D.info.muted$),Mo=hu(D.info.predefinedQualityLimitType$.pipe(ib(c=>c===hs.TRAFFIC_SAVING)),D.info.predefinedQualityLimitType$.getValue()===hs.TRAFFIC_SAVING),Vo=hu(D.info.predefinedQualityLimitType$.pipe(ib(c=>c===hs.HIGH_QUALITY)),D.info.predefinedQualityLimitType$.getValue()===hs.HIGH_QUALITY),pn=ti(D.info.autoQualityLimitingAvailable$),Vr=ti(D.info.availableQualities$),Rr=ti(D.info.availableQualitiesFps$),Nr=ti(D.info.chromecastState$),bs=ti(D.info.chromecastDeviceName$),Dr=ti(D.info.currentFormat$),Zn=ti(D.info.throughputEstimation$),Or=ti(D.info.videoBitrate$),fn=ti(D.info.intrinsicVideoSize$),mn=ti(D.info.duration$),fr=ti(D.info.isAudioAvailable$),mr=()=>{ci&&clearTimeout(ci),ci=null},jo=fi([mn,Di],([c,g])=>g?-c:c),vr=fi([Ni],([c])=>c===Fl.PLAYING),gr=ti(D.info.atLiveEdge$),Jn=ti(D.info.atLiveDurationEdge$),Vn=ti(D.info.position$),ns=fi([Vn,mn],([c,g])=>isFinite(c)&&isFinite(g)&&!!g),vo=fi([Nr],([c])=>c===Fx.CONNECTED),hr=ti(D.info.availableVideoStreams$),Oi=pe.features.audioLanguages?ti(D.info.availableAudioStreams$):Ar([]),_r=ti(D.info.currentVideoStream$),Rn=ti(D.info.currentAudioStream$),pt=c=>{c.language&&kf(c.language),D.setVideoStream(c)},Jt=(c,g)=>{D.setAudioStream(c),No(g)&&(c.language&&kf(c.language),pe.features.userVideoPrefs&&i&&Mf(pe.userSalt,String(i),{audioTrackId:c.id}))},br=c=>{let g;if(c.length===1&&(g=c.at(0)),g!=null||(g=c.find(ie=>"isDefault"in ie&&ie.isDefault)),pe.features.userVideoPrefs&&i){let ie=xu(pe.userSalt,String(i));if(ie!=null&&ie.audioTrackId){let Se=c.find(Ge=>Ge.id===ie.audioTrackId);g=Se!=null?Se:g}}let M=n_();return M&&(g!=null||(g=c.find(({language:ie})=>M===ie))),g!=null||(g=c.at(0)),g},Br=c=>{G.log("change audio stream",{id:c});let g=D.info.availableAudioStreams$.getValue().find(M=>M.id===c);g&&Jt(g,!0)},Hr=!1;Te.add(D.info.availableAudioStreams$.subscribe(c=>{if(!Hr&&c.length){let g=br(c);g&&(D.setAudioStream(g),Hr=!0)}})),Oi.subscribe(c=>{var g;(g=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||g.call(s,c.map(({label:M="",id:ie="",language:Se=""})=>({label:M,language:Se,id:ie})))}),Rn.subscribe(c=>{var g;return c&&((g=s==null?void 0:s.onAudioStreamChanged)==null?void 0:g.call(s,c.id))});let Nn=!1;Te.add(D.info.availableVideoStreams$.subscribe(c=>{if(!Nn&&c.length){let g=br(c);g&&(D.setVideoStream(g),Nn=!0)}}));let er=de(void 0),go=ti(D.info.isAutoQualityEnabled$,c=>c&&er.set(void 0)),Dn=ti(D.info.currentQuality$,()=>er.set(void 0)),tr=fi([er,Dn],([c,g])=>c!=null?c:g),On=fi(Dr,c=>c!==Zd.MPEG),vn=fi([Vr,Rr,go,tr,On],([c,g,M,ie,Se])=>{let Ge=[];Se&&Ge.push({value:"auto",displayValue:fe("auto_quality_option"),selected:M});let kt=c.filter(Bt=>!Kx(Bt));for(let Bt of kt){let Wt=g[Bt];Ge.push({value:Bt,displayValue:`${Bt}${Wt?Q_(Wt):""}`,selected:M?!1:Bt===ie})}return Ge}),gn=ti(D.info.currentPlaybackRate$),hn=fi([gn,gr,Jn],([c,g,M])=>{let ie=M||x?1:pe.controls.playbackRateMin,Se=g?1:pe.controls.playbackRateMax,Ge=pe.controls.playbackRateStep,kt=[];for(let Bt=ie;Bt<=Se;Bt+=Ge)kt.push({value:Bt,displayValue:Bt===1?fe("playback_rate_1"):fe("playback_rate",{multiplier:Bt.toString(10)}),selected:c===Bt});return kt}),Xo=()=>({displayValue:fe("subtitles_off"),value:Ln,language:""}),Bi=de(Xo()),Yi=fi([Bi,st],([c],g)=>{c.value===Ln?g(Xo()):g(c)}),Zo=pe.features.subtitles?ti(D.info.availableTextTracks$):Ar([]),ir=qh(),$r=fi([Zo,Yi],([c,g],M)=>{var Ge;let ie=[],Se=c.find(({id:kt})=>kt===g.value);if(Se!=null&&Se.url){let[,kt]=(Ge=ir.find(Se.url))!=null?Ge:[];if(kt){M(kt);return}Ee.download(Se.url).then(Bt=>{if(!Bt||Ee.isDestroyed())return;let Wt=new G_,Qs=Se.language;if(Qs){let i$=!!Se.isAuto,o$=Wt.parse(Bt,Qs);ie.push({lang:Qs,subtitles:o$,isAuto:i$,id:Se.id})}ir.add(Se.url,ie),ye(Yi).value===g.value&&M(ie)}).catch(Bt=>{var Wt;(Wt=J==null?void 0:J.oneStat)==null||Wt.logError({errorType:"Subtitles download",fatal:!1}),se==null||se.report(Bt,{errorType:"Subtitles download",fatal:!1})})}M(ie)}),_n=fi([gn,vr,Yi],([c,g,M],ie)=>{let kt;if(D.info.isLive$.getValue()&&g&&M.value!==Ln){let Wt=()=>{let Qs=1e3/(3*c);kt=setTimeout(Wt,Qs),ie(Date.now())};return Wt(),()=>clearTimeout(kt)}}),yr=fi([Zo,Yi],([c,g])=>{if(!c.length)return[];let M=[];for(let{language:ie,isAuto:Se,id:Ge}of c){let kt=ie&&jd(ie);ie&&kt&&M.push({displayValue:Se?fe("subtitles_auto",{language:kt}):kt,value:Ge,selected:(g==null?void 0:g.value)===Ge,isAuto:Se,language:ie})}return M.length?(M.unshift({...Xo(),selected:(g==null?void 0:g.value)===Ln}),M):[]}),ct={available:[],prev:[]},xt=()=>{var g,M;let c=D.experimental.getCurrentTime$.getValue();return(M=(g=c==null?void 0:c())!=null?g:Ae==null?void 0:Ae.currentTime)!=null?M:0},ho=fi([nt,Yi,$r,_n],([c,g,M,ie])=>{var Ge;let Se=D.info.isLive$.getValue();if(Se&&ct.prev!==M){let kt=M.find(({id:Wt})=>Wt===g.value),Bt=ct.prev.find(({id:Wt})=>Wt===g.value);if(kt){let Wt={...kt,subtitles:[...(Ge=Bt==null?void 0:Bt.subtitles)!=null?Ge:[],...kt.subtitles]};ct.available=[Wt],ct.prev=M}}if(g&&g.value!==Ln){let kt=Se?xt():c,Bt=Se?ct.available:M;return X_(kt,g,Bt,Se)}}),Ro=fi([ho],([c])=>c!=null&&c.texts?c.texts:[]);Te.add(Yi.subscribe(c=>{var g,M;if(c.value===Ln)(g=s==null?void 0:s.onSubtitleOff)==null||g.call(s);else{let ie=Object.entries(Ku).find(([Se,Ge])=>Ge===c.displayValue);(M=s==null?void 0:s.onSubtitleOn)==null||M.call(s,ie?ie[0]:"",c.value)}}));let Jo=de(!0),_o=fi([un,jo,Vn,po],([c,g,M,ie])=>{var Bt;let Se=(Bt=c==null?void 0:c.end)!=null?Bt:0;if(!ie)return Se/g;let kt=-M+ie-g;return(Se-kt)/g}),bo=ti(D.info.availableSources$),Ii=fi([bo],([c])=>Object.keys((c==null?void 0:c[Zd.MPEG])||{}).length>0),$o=()=>{var M,ie,Se;let c=Object.keys(((ie=(M=D.info.availableSources$)==null?void 0:M.getValue())==null?void 0:ie[Zd.MPEG])||{}),g=zx(c)||Zx.Q_144P;return(Se=Re.sources[Zd.MPEG])==null?void 0:Se[g]},Fr=()=>{var g;let c=$o();if(c)G.log("download video",{url:c}),zh(c,((g=Re==null?void 0:Re.meta)==null?void 0:g.title)||"video");else{let M="There is no URL for download video";G.log("download video",{message:M}),ce({message:M})}},xr=()=>{ce({message:"toggle muted"});let c=D.info.muted$.getValue();D.info.volume$.getValue()===0&&!c?Ur(wr(),!1):en(!c,!1)},$s=()=>{var c;if(zt.ui.settingsMenu.visible$.set(!1),!ye(zt.ui.settingsSubMenu.visible$)){let g=ye(zt.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&g){let ie=Bl(g),Se={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:ie,position:Se,name:"settings"})}}G.log("close settings menu")},Hi=async(c,g=()=>Promise.resolve())=>{var Se;zt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),zt.ui.settingsMenu.visible$.set(!0),await g();let M=ye(zt.ui.settingsMenu.ref$),ie=ba();if((Se=s==null?void 0:s.uiInfo)!=null&&Se.onSettingsMenu&&M&&ie){let kt=Bl(M),Bt=Os(M,ie);s.uiInfo.onSettingsMenu({visible:!0,size:kt,position:Bt,name:"settings"})}G.log("open settings menu",{wasOpenedByKeyboard:c})},ys=(c,g=!1)=>{var Ge;zt.ui.settingsSubMenu.visible$.set(!1);let M=ye(zt.ui.settingsMenu.ref$),ie=ba(),Se=ye(zt.ui.settingsMenu.visible$);if((Ge=s==null?void 0:s.uiInfo)!=null&&Ge.onSettingsMenu&&M&&ie)if(Se&&!g){let Bt=Bl(M),Wt=Os(M,ie);s.uiInfo.onSettingsMenu({visible:!0,size:Bt,position:Wt,name:"settings"})}else{let Bt=Bl(c),Wt={top:0,left:0,bottom:0,right:0},Qs=ye(zt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:Bt,position:Wt,name:Qs})}G.log("close settings sub menu")},rs=(c,g)=>{var ie;zt.ui.settingsSubMenu.visible$.set(!0),zt.ui.settingsSubMenu.ref$.set(g),zt.ui.settingsSubMenu.name$.set(c);let M=ba();if((ie=s==null?void 0:s.uiInfo)!=null&&ie.onSettingsMenu&&g&&M){let Ge=Bl(g),kt=Os(g,M);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:Ge,position:kt})}G.log("open settings sub menu",{name:c})},wr=()=>{var g;let c=Math.max(pe.volumeMinRestore,(g=_u())!=null?g:0);return c===0?pe.volumeDefault:c},No=c=>{let g=pe.features.savePreferredStatesOnUserActionOnly;return!g||g&&!c},Ur=(c,g)=>{let M=c===0?wr():c,ie=D.info.muted$.getValue();ce({message:`set volume, volume: ${c}, preferredVolume: ${M}`});let Se=!l||ze.is("ads");ie&&c>0&&Se&&(ie=!1,No(g)&&Ef(!1)),D.setVolume(c,ie),K.setVolume(c),No(g)&&Sf(M)},en=(c,g)=>{let M=D.info.volume$.getValue();ce({message:`set muted, currentVolume: ${M}, mute: ${c}`});let ie=ze.is("ads");if(D.setMuted(c,ie),K.setVolume(c?0:M),No(g)&&(!ie||!c)&&Ef(c),!c&&M===0){let Se=wr();D.setVolume(Se),No(g)&&Sf(Se),K.setVolume(Se)}},tn=de(!1),Fe=c=>{var g,M;G.log("set looped",{isLooped:c}),tn.set(c),D.setLooped(c),(M=(g=s==null?void 0:s.uiInfo)==null?void 0:g.onLoopedChanged)==null||M.call(g,c)};Fe(re);let Ct=()=>{var c,g;(g=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||g.call(c)},ui=(c,g=!1)=>{var M;ce({message:`set autoplayNextEnabled, value: ${c}`}),G.log("set autoplay next enabled",{autoplayNextEnabled:c}),zt.ui.autoplayNextEnabled$.set(c),a_(c),g&&((M=s==null?void 0:s.onSetAutoplayNextEnabled)==null||M.call(s,c))},Do=c=>{ce({message:`set timerNextVideoRunning, value: ${c}`}),G.log("set timer next video running",{timerNextVideoRunning:c}),zt.ui.timerNextVideoRunning$.set(c)},yo=(c=!0)=>{var M;let g=!0;if(c&&(s!=null&&s.onPrevVideoClick))try{g=(M=s==null?void 0:s.onPrevVideoClick)==null?void 0:M.call(s)}catch(ie){ce({message:"onPrevVideoClick callback failed to execute"})}Z(!0),g&&X()},Oo=(c=!0)=>{var M;let g=!0;if(c&&(s!=null&&s.onNextVideoClick))try{g=(M=s==null?void 0:s.onNextVideoClick)==null?void 0:M.call(s)}catch(ie){ce({message:"onNextVideoClick callback failed to execute"})}Z(!1),g&&ae()},Fi=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},xo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},Bn=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},Sr=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},wo=()=>{D.prepare()},oo=()=>{pr(zt);let c=ye(zt.ui.controls.disabledControls$),g=ye(zt.playerPhase),M={playerPhase:g,isInteractive:x,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(ce({message:"toggle play"}),g==="ads"){M.action="play",G.log("toggle adman play",M),K.togglePlay();return}let ie=()=>{var Ge;ce({message:"toggle play, call player.play"}),M.action="play",D.play(),(Ge=s==null?void 0:s.onPlay)==null||Ge.call(s)},Se=()=>{var Ge;ce({message:"toggle play, call player.pause"}),M.action="pause",D.pause(),(Ge=s==null?void 0:s.onPause)==null||Ge.call(s)};if(D.info.isEnded$.getValue()){if(ce({message:"toggle play, video ended, seek to 0"}),Ri.next(),hi.next(Bs.REWIND),x){R==null||R();return}D.seekTime(0),ie()}else D.info.playbackState$.getValue()!==Fl.PLAYING?ie():Se();G.log("toggle play",M)},bn=(c,{changeReason:g="default",appliesTo:M="to-video",byUser:ie=!1}={},Se)=>{ce({message:`set quality, quality: ${c}`}),G.log("set quality",{quality:c}),ie&&Si.next(c),D.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Ge}=pe.features;bu(),c!=="auto"?(Ge?($u({type:"exact_quality",quality:c,videoId:i},M),D.setPredefinedQualityLimits(hs.UNKNOWN)):Cf(i,c),er.set(c),D.setQuality(c)):Ge&&g==="default"&&(Wr("auto_quality",M,Se),ye(Mo)&&Bo(!1,void 0,Se),ye(Vo)&&Hn(!1,void 0,Se))},Bo=(c,g="as-default",M)=>{ce({message:`set trafficSavingEnabled, value: ${c}`}),G.log("set traffic saving enabled",{trafficSavingEnabled:c});let ie=c?hs.TRAFFIC_SAVING:hs.UNKNOWN;pe.features.qualityDetailsSubMenuEnabled?(zr(ie,g,M),Ed(!1)):(D.setPredefinedQualityLimits(ie),No(M)&&Ed(c))},Hn=(c,g="as-default",M)=>{ce({message:`set highQualityEnabled, value: ${c}`}),G.log("set high quality enabled",{highQualityEnabled:c}),zr(c?hs.HIGH_QUALITY:hs.UNKNOWN,g,M)},zr=(c,g,M)=>{c!==hs.UNKNOWN&&(ye(pn)&&!ye(go)&&bn("auto",{appliesTo:g,changeReason:"limit-changed"},M),Wr(c,g,M)),D.setPredefinedQualityLimits(c)},Wr=(c,g,M)=>{No(M)&&($u({type:c,videoId:i},g),g==="as-default"&&$u({type:c,videoId:i},"to-video"))},Fn=(c,g=!0)=>{G.log("set playback rate",{playbackRate:c}),D.setPlaybackRate(c),pe.features.saveRate&&we&&!D.info.isLive$.getValue()&&g&&r_(c)},Xe=()=>{let c=ye(Mn),g=ye(hn),M=g.findIndex(({selected:Se})=>Se);if(M===g.length-1||!c)return g[M];let ie=g[M+1];return Fn(ie.value),ie},Yt=()=>{let c=ye(Mn),g=ye(hn),M=g.findIndex(({selected:Se})=>Se);if(M===0||!c)return g[M];let ie=g[M-1];return Fn(ie.value),ie},_i=(c={...Xo(),selected:!1},g)=>{G.log("set subtitles",{...c}),c.value!==Ln&&Zt.next(c.isAuto?c.value+"_auto":c.value),it.next({enabled:c.value!==Ln,lang:c.language,auto:!!c.isAuto}),Bi.set(c),No(g)&&(Lf(c.value===Ln?void 0:c.language),pe.features.userVideoPrefs&&i&&Mf(pe.userSalt,String(i),{subtitleTrackId:c.value===Ln?void 0:c.value}))},So=c=>{G.log("toggle subtitles");let g=ye(Yi);(g==null?void 0:g.value)===Ln?Un(c):Ho(c)},$n=(c,g)=>{G.log("change subtitle",{enabled:c}),c?Un(!0,g):Ho(!0)},Un=(c,g)=>{G.log("subtitle on");let M=ye(yr),ie=ye(Me),Se=He!=null?He:ie,Ge;g&&(Ge=M.find(kt=>kt.value===g)),Ge!=null||(Ge=M.filter(kt=>kt.value!==Ln).find(kt=>kt.language===Se)),_i(Ge!=null?Ge:M[1],c)},Ho=c=>{G.log("subtitle off"),_i(void 0,c)};Te.add(D.info.availableTextTracks$.subscribe(c=>{var M;function g(){let ie=[];for(let{language:Se,isAuto:Ge,id:kt}of c){let Bt=Se&&jd(Se);Se&&Bt&&ie.push({id:kt,language:Se,title:Ge?fe("subtitles_auto",{language:Bt}):Bt})}return ie}(M=s==null?void 0:s.onAvailableSubtitlesChanged)==null||M.call(s,g())}));let or=de(!0),ss=c=>{or.set(c)},Cr=(c,g,M=!0)=>{var ie;if(ce({message:`seek to time, time: ${c}`}),G.log("seek to time",{time:c,action:g,forcePrecise:M}),hi.next(g),D.info.isLive$.getValue()){let Se=D.info.duration$.getValue(),Ge=Math.min(0,Se+c);D.seekTime(Ge,M)}else{if(T!=null&&T.getValue())return;D.info.isEnded$.getValue()&&(ce({message:"seek after ended, call callbacks.onPlay"}),(ie=s==null?void 0:s.onPlay)==null||ie.call(s)),D.seekTime(on(c),M)}},xs=c=>{ce({message:`seek to episode start time: ${c}`}),G.log("seek to episode start time",{time:c}),Cr(c,Bs.EPISODE,!0)},zs=(c,g,M=!1)=>{ce({message:`seek to percent, percent: ${c}`}),G.log("seek to percent",{percent:c,action:g});let ie=ye(jo)*c;Cr(ie,g,M)},fa=c=>{ce({message:`seek external, time: ${c}`}),G.log("seek external",{time:c}),hi.next(Bs.UNKNOWN),D.seekTime(D.info.isLive$.getValue()?-c:c)},at=c=>{var ie,Se;let g=(ie=c.max)!=null?ie:"none",M=(Se=c.min)!=null?Se:"none";ce({message:`set auto quality limitation. Max: ${g}. Min: ${M}`}),G.log("set auto quality limits",{max:g,min:M}),D.setAutoQualityLimits(c)},si=c=>{ce({message:`seek external to episode start time: ${c}`}),G.log("seek external to episode start time",{time:c}),Cr(c,Bs.EPISODE,!0)},Co=c=>{ce({message:`set playback rate to: ${c}`}),G.log("set playback rate external",{playbackRate:c}),D.setPlaybackRate(c)},bi=de(!1),yn=de(!1),xn=fi([jo],([c])=>!!p&&c>=pe.suitableDurationForUsingRichSeek&&pe.features.useRichSeek&&!x),ws=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),Ss=fi([Pt],([c])=>{let g=Hl(c);return ws?!g:g});Te.add(ze.subscribe(c=>{c!=="video"&&bi.set(!1)})),bi.subscribe(c=>{var g;(g=s==null?void 0:s.onRichSeekActiveChanged)==null||g.call(s,c)});let Ui=de(void 0),Ci=de(!1),he=c=>{ce({message:`start scrubbing, progress: ${c}`}),G.log("start scrubbing",{progress:c}),Ci.set(!0),bt(c)},bt=c=>{Ui.set(c)},ai,Qt,To=()=>{Ui.set(void 0),Ci.set(!1)},no=()=>{clearTimeout(Qt),clearTimeout(ai),ai=window.setTimeout(()=>{To()},500),Ae==null||Ae.removeEventListener("seeked",no)},Fo=(c,g=!1)=>{ce({message:`complete scrubbing, progress: ${c}`}),G.log("complete scrubbing",{progress:c}),zs(c,Bs.SLIDER,g),ye(zt.ui.isMobile)&&ye(zt.state.currentFormat$)===Zd.HLS?(Ae==null||Ae.addEventListener("seeked",no),Qt=window.setTimeout(()=>{no()},300)):To()},Cs=fi([nt,jo,Ui],([c,g,M],ie)=>{ie(qx(M)?M*g:c)}),Kr=de(!1),Tr=()=>{Kr.set(!0)},ma=()=>{Kr.set(!1)},Ws=fi([ni],([{width:c}],g)=>{let M=z_(c);g(M)}),va=z.filter(c=>Wh(c)),qr=fi([Ws,It],([c,g])=>g?va.filter(M=>!M.hideOnMobile):va.filter(M=>{var ie;return!((ie=M.hideOnDesktopGridTypes)!=null&&ie.includes(c))})),wn=de(z.filter(c=>Kh(c))),tl=fi([wn,Ws],([c,g])=>c.filter(M=>{var ie;return!((ie=M.hideOnDesktopGridTypes)!=null&&ie.includes(g))})),ga=fi([tl,qr],([c,g])=>[...pe.features.additionalButtonsDesktopControlPanelRight?c.filter(M=>M.type==="desktop-control-panel-right"):[],...pe.features.additionalButtons?g.map((M,ie)=>{var Se;return{id:ie,weight:ie,type:"desktop-control-panel-right",testId:M.testId,icon:M.iconUrl,onClick:M.onClick,ariaLabel:(Se=M.ariaLabel)!=null?Se:M.tooltip,tooltipText:M.tooltip}}):[]].filter(M=>!v.disabledAdditionalButtonIds.includes(M.id))),Qr=de(F),il=fi([Qr],([c])=>pe.features.additionalSettingsMenuItems?c.map(g=>g.type==="SWITCH"?{...g,onClick:g.onChangeEnabled}:g):[]),Yl=(c,g)=>{let M=ye(wn).map(ie=>ie.id!==c?ie:{...ie,...g});wn.set(M)},ha=c=>{let g=ye(wn);if(g.some(M=>M.id===c.id)){ce({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}g.push(c),wn.set(g)},jl=c=>{let g=ye(wn);if(!g.some(M=>M.id===c)){ce({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}g=g.filter(M=>M.id!==c),wn.set(g)},ol=c=>{hi.next(Bs.LIVE),ce({message:"live switch to low latency "+c}),G.log("live switch to low latency "+c),D.setLiveLowLatency(c)},nl=(c,g)=>{let M=ye(Qr).map(ie=>ie.id!==c?ie:{...ie,...g});Qr.set(M)},_a=c=>{let g=ye(Qr);if(g.some(M=>M.id===c.id)){ce({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}g.push(c),Qr.set(g)},ut=c=>{let g=ye(Qr);if(!g.some(M=>M.id===c)){ce({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}g=g.filter(M=>M.id!==c),Qr.set(g)},ot=de(U),ji=fi([ot],([c])=>pe.features.additionalContextMenuItems?c:[]),Io=(c,g)=>{let M=ye(ot).map(ie=>ie.id!==c?ie:{...ie,...g});ot.set(M)},Xi=c=>{let g=ye(ot);if(g.some(M=>M.id===c.id)){ce({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}g.push(c),ot.set(g)},mi=c=>{let g=ye(ot);if(!g.some(M=>M.id===c)){ce({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}g=g.filter(M=>M.id!==c),ot.set(g)},zi=fi([It,le],([c,g],M)=>{M(c&&g)}),Ks=()=>{hi.next(Bs.LIVE),ce({message:"switch to active live"}),G.log("switch to active live"),D.seekTime(0),D.info.playbackState$.getValue()!==Fl.PLAYING&&zt.actions.internal.togglePlay()},Xl=()=>{G.log("skip adman"),K.skip()},Ec=(c=!0)=>{var ie;pr(zt),ce({message:`switch from ads to video, callPlay: ${c}`}),G.log("switch from ads to video",{callPlay:c}),Oe.set("video"),c&&D.play(),l&&en(!0,!0);let g=(ie=ye(yt))==null?void 0:ie.muted,M=!D.info.muted$.getValue();g!==void 0&&!M&&en(g,!0),yt.set(void 0)},hp=()=>{pr(zt),ce({message:"switch from video to ads"}),G.log("switch from video to ads"),zt.actions.internal.pause(),Lo(),Oe.set("ads")},Pc=c=>{pr(zt);let g=c?"LiveWaitingStart":"thumb";G.log("set live waiting start",{state:c,playerPhase:g}),Oe.set(g)},_p=c=>{pr(zt);let g=c?"LiveWaitingRecover":"thumb";G.log("set live waiting recover",{state:c,playerPhase:g}),Oe.set(g)},kc=c=>{pr(zt);let g=c?"LiveWaitingRecord":"thumb";G.log("set live waiting record",{state:c,playerPhase:g}),Oe.set(g)},bp=()=>(pr(zt),G.log("get debug text data"),Fh(D,Re,zt,Ke.getTraceId(),Ce)),Ac=()=>(pr(zt),JSON.stringify(Ke.getFinishedSpans())),$p=()=>(pr(zt),Uh(D,Re,zt)),ba=()=>Ae,Lc=()=>{ce({message:"toggle chromecast"}),G.log("toggle chromecast"),D.toggleChromecast()},qs=c=>{var M;if(pr(zt),D.info.isEnded$.getValue())return;let g=!c;if(ye(zt.playerPhase)==="ads"){ce({message:`pause ads, internalCall: ${g}`}),G.log("pause ads",{internalCall:g}),K.pause();return}ce({message:`pause video, internalCall: ${g}`}),G.log("pause video",{internalCall:g}),g&&((M=s==null?void 0:s.onPause)==null||M.call(s)),D.pause()},rl=c=>{var M;pr(zt);let g=!c;if(ye(zt.playerPhase)==="ads"){ce({message:`play ads, internalCall: ${g}`}),G.log("play ads",{internalCall:g}),K.play();return}ce({message:`play video, internalCall: ${g}`}),G.log("play video",{internalCall:g}),g&&((M=s==null?void 0:s.onPlay)==null||M.call(s)),D.play()},Mc=c=>{pr(zt);let g=!c;if(ye(zt.playerPhase)==="ads"){ce({message:"player cannot be stopped during ads via external method"});return}ce({message:`player will be stopped, internalCall: ${g}`}),A==null||A()},Vc=(c,g)=>{pr(zt),ce({message:`first start, show ads: ${c}, internalCall: ${!g}`}),G.log("first start",{showAds:c,external:g}),c?Oe.set("ads"):(Oe.set("video"),g?D.play():zt.actions.internal.togglePlay())},sl=()=>(ce({message:"getting time codes"}),m),Rc=()=>{let c=sl();if(!c||[0,1].includes(c.length))return;let g=D.info.position$.getValue();return c.find(M=>M.time>g)},Nc=c=>{let g=c;g||(g=Rc());let M=D.info.position$.getValue();G.log("seek to next episode",{currentTime:M,...g}),g&&(ce({message:"seek to next episode"}),Cr(g.time,Bs.EPISODE,!0))},Dc=()=>{let c=sl();if(!c||[0,1].includes(c.length))return;let g=D.info.position$.getValue(),M=c.findIndex(Se=>Se.time>g),ie=M===-1?c.length-2:M-2;if(!(ie<0))return c[ie]},yp=c=>{let g=c;g||(g=Dc());let M=D.info.position$.getValue();G.log("seek to prev episode",{currentTime:M,...g}),g&&(ce({message:"seek to prev episode"}),Cr(g.time,Bs.EPISODE,!0))},xp=()=>(ce({message:"getting preview thumbs data"}),G.log("get preview thumbs data",{...p}),p),Ue=async()=>{let c=xe==null?void 0:xe.isActive(),g="none";xe!=null&&xe.isActive()?(g="exit",await(xe==null?void 0:xe.exit())):(g="request",await(xe==null?void 0:xe.request())),G.log("toggle picture in picture",{isActive:c,action:g})},vi=(c=-90)=>{G.log("rotate video",{alphaDiff:c}),Pt.update(g=>g+c)},ro=de([]);I==null||I.subscribe(c=>{let g=[];for(let M=0;M<c.length;M++){let{range:[ie,Se],subjects:Ge}=c[M];M===0&&ie!==0&&g.push({time:0,text:"",interactive:!1,completed:!0}),g.push({time:ie/1e3,text:"",interactive:!0,completed:pe.features.interactiveTimeOpenUri?!Ge.length||Ge.every(kt=>kt.isRemoved):!Ge.length}),Se!==1/0&&g.push({time:Se/1e3,text:"",interactive:!1,completed:!0})}ro.set(g)});let Ir=de(!1);T==null||T.subscribe(c=>{c&&ye(Ci)&&To()});let on=c=>{if(!x)return c;let g=ye(ro),M=ye(jo),Se=ye(Vn)/M,Ge=g.find(kt=>kt.interactive&&!kt.completed&&kt.time>Se);return typeof(Ge==null?void 0:Ge.time)=="number"?Math.min(c,Ge.time-.05):c},Yb=()=>{zt.ui.episodes.panelOpened$.set(!1)},jb=()=>{G.log("destroy store"),clearTimeout(Qt),clearTimeout(ai),Te.unsubscribe(),vt.unsubscribe(),D.destroy(),K.destroy(),J==null||J.destroy(),se==null||se.destroy(),Pe.unsubscribe(),yi==null||yi.disconnect(),yi=null,Ee.destroy()},Xb=fi([gr,ze,Mn],([c,g,M])=>v.features.doubleForwardAvailable&&!c&&g==="video"&&M),wp=de(!1),Uv=2,Oc=null,zv=c=>{if(!ye(vr)&&c)return;let g=D.info.currentPlaybackRate$.getValue();c?g!==Uv&&(Oc=g,Fn(Uv,!1),wp.set(!0)):(Oc&&Fn(Oc,!1),wp.set(!1),Oc=null)};ze.subscribe(c=>{c!=="video"&&zv(!1)});let Zb=()=>{qs(!1),bi.set(!0)},Jb=()=>{rl(!1),bi.set(!1)},Sp=!1,e$=()=>{yn.set(!0),Sp=D.info.playbackState$.getValue()===Fl.PLAYING,qs(!1)},t$=()=>{yn.set(!1),!ye(bi)&&Sp&&rl(!1),Sp=!1};D.events.playing$.subscribe(()=>{ye(bi)&&qs(!1)});let zt={interfaceLanguage$:Me,isCyrillicRelatedInterface$:$t,initVideo:pi,videoId:i,isClip:o,playerPhase:ze,vsid:wt,state:{positionExact$:nt,positionWithScrubbing$:Cs,duration$:jo,playbackState$:Ni,playbackStateRealistic$:cn,isPlaying$:vr,isLoaderVisible:Rt,bufferedProgress$:_o,isLive$:Di,canChangePlaybackSpeed$:Mn,isActiveLive$:gr,isOldestAvailableLive$:Jn,isRewindableLive$:ns,isEnded$:ki,muted$:Ti,volume$:io,trafficSavingEnabled$:Mo,highQualityEnabled$:Vo,autoQualityLimitingAvailable$:pn,availableVideoStreams$:hr,availableAudioStreams$:Oi,videoStream$:_r,audioStream$:Rn,currentQuality$:tr,isAutoQualityEnabled$:go,availableQualities$:vn,currentPlaybackRate$:gn,availablePlaybackRates$:hn,currentSubtitle$:Yi,availableTextTracks$:Zo,availableSubtitlesList$:yr,currentSubtitleCaptions$:Ro,isAutoSubtitleCaptionVisible$:Jo,chromecastState$:Nr,chromecastDeviceName$:bs,chromecastConnected$:vo,currentFormat$:Dr,throughputEstimation$:Zn,videoBitrate$:Or,videoSize$:fn,errorLog$:Y,crashed$:le,isAudioAvailable$:fr,isAudioDisabled:!!l,canDownload:pe.features.download&&!!d,availableSources$:bo,hasMpegSources$:Ii,isInteractive:x,showInteractiveGraph:pe.features.interactiveGraph,showSeekToInteractive:pe.features.seekToInteractive,showPlayPrevChapter:pe.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:pe.features.interactiveTimeIndicator&&!!ye(ro).length,interactiveEpisodes$:ro,isInteractiveTime$:T?ti(T):de(!1),isInteractiveExpectation$:Ir,hasInteractiveBranches:P,playPrevChapterDisabledTooltip:E,looped$:tn,loadedMetadata$:Dt,isAutoQualityAvailable$:On,previewTrackActive:bi,previewTrackDragInProgress:yn},ui:{t:fe,controlsVisible:de(!1),touched:de(!1),controls:{prevButton:de(void 0),playButton:de(void 0),replayButton:de(void 0),nextButton:de(void 0),playPrevChapterButton:de(void 0),seekToInteractiveButton:de(void 0),interactiveGraphButton:de(void 0),liveButton:de(void 0),time:de(void 0),episodes:de(void 0),volume:de(void 0),subtitles:de(void 0),settings:de(void 0),context:de(void 0),chromecast:de(void 0),pip:de(void 0),fullscreen:de(void 0),vkLogo:de(void 0),interactiveTimeIndicator:de(void 0),timeline:de(void 0),autoplayNextToggle:de(void 0),additionalButtons:z.length?z.reduce(c=>[...c,de(void 0)],[]):[],disabledControls$:St},modals:{hotKeyMap:{show:de(!1),data:de({title:"",closeBtnText:"",groups:[]})}},isFullscreen:At,isFullscreenOpenedByKeyboard:dt,rotateAlpha:Pt,isAutoplay:de(!1),debugPanelVisible:de(!1),episodes:{panelOpened$:de(!1),openedByKeyboard$:de(!1)},contextMenu:{visible$:de(!1),btnRef$:de(void 0),openedByBtnKeyboard$:de(!1),openedByHotKey$:de(!1),lastActiveElem$:de(void 0),showContextMenuBtn$:de(!1),position$:de({top:0,left:0})},playerSize:ni,isMobile:It,mobileNotReportControlHidden$:zi,icon3DVideoVisible:de(!1),scrubbingInProgress:Ci,volumeChangingInProgress:Kr,is3DVideo:Ut,currentGridType$:Ws,additionalButtonsDeprecated$:qr,additionalDesktopControlPanelRightButtons$:ga,additionalSettingsMenuItems$:il,additionalContextMenuItems$:ji,interactiveHideMobileControls:de(!1),overlayContainer$:de(void 0),startedByKeyboard$:de(!1),autoplayNextEnabled$:de(!1),timerNextVideoRunning$:de(!0),settingsMenu:{visible$:de(!1),ref$:de(void 0),openedByBtnKeyboard$:de(!1)},settingsSubMenu:{visible$:de(!1),ref$:de(void 0),name$:de(void 0)},userActionsDisabled:de(!1),hiddenControls:{volume:de(!1),vkLogo:de(!1),pip:de(!1),chromecast:de(!1),settings:de(!1)},isControlsAvailable:or,controlBlocks:{topLeft:de(void 0),topRight:de(void 0),middle:de(void 0),bottom:de(void 0),bottomLeft:de(void 0),bottomRight:de(void 0)},videoTitleInfo:de(void 0),doubleForwardOn$:wp,doubleForwardAvailable$:Xb,previewTrackNotificationVisible:de(!1),previewTrackActive:bi,previewTrackDragInProgress:yn,previewTrackAvailable:xn,isPreviewTrackHorizontallyAligned:Ss},ads:{position:de(0),duration:de(0),playbackState:de("inactive"),canSkip:de(!1),secondsToWatchBeforeSkip:de(0),postrollPassed:de(!1)},webApi:{pictureInPictureApi:xe,annotationsApi:Be,slotsApi:et,focusManager:ne},actions:{internal:{preload:wo,firstStart:c=>Vc(c,!1),play:()=>rl(!1),pause:()=>qs(!1),togglePlay:oo,toggleMuted:xr,openSettingsMenu:Hi,closeSettingsMenu:$s,openSettingsSubMenu:rs,closeSettingsSubMenu:ys,setVolume:c=>Ur(c,!1),setMuted:c=>en(c,!1),startVolumeChanging:Tr,stopVolumeChanging:ma,setVideoStream:pt,setAudioStream:c=>Jt(c,!1),setQuality:(c,g)=>bn(c,g,!1),setTrafficSavingEnabled:(c,g)=>Bo(c,g,!1),setHighQualityEnabled:(c,g)=>Hn(c,g,!1),setPlaybackRate:Fn,incrementPlaybackRate:Xe,decrementPlaybackRate:Yt,setSubtitle:c=>_i(c,!1),toggleSubtitle:()=>So(!1),togglePictureInPicture:Ue,startScrubbing:he,progressScrubbing:bt,completeScrubbing:Fo,toggleChromecast:Lc,switchToActiveLive:Ks,switchFromAdsToVideo:Ec,switchFromVideoToAds:hp,skipAd:Xl,setLiveWaitingStart:Pc,setLiveWaitingRecover:_p,setLiveWaitingRecord:kc,getDebugTextData:bp,getTraceTextData:Ac,getDebugPanelData:$p,getVideoElement:ba,seekTime:(c,g,M)=>Cr(c,g,M),clearDelayedBufferingCheckTimeout:mr,seekEpisodeStartTime:xs,seekToPercent:zs,getNextEpisode:Rc,seekToNextEpisode:Nc,getPrevEpisode:Dc,seekToPrevEpisode:yp,startLogging:Ot,stopLogging:W,startCameraManualRotation:Lt,stopCameraManualRotation:ri,moveCameraFocusPX:ft,holdCamera:Xt,releaseCamera:_t,getVideoEpisodes:sl,getPreviewThumbsData:xp,downloadVideo:Fr,addLanguage:Vf,setLanguage:$e,nextMovie:Gt,videoRotate:vi,correctSeekTimeToInteractive:on,replayInteractive:R,setLooped:Fe,reportProblem:Ct,setAutoplayNextEnabled:ui,setTimerNextVideoRunning:Do,prevVideoClick:yo,nextVideoClick:Oo,nextVideoAnnouncementShow:Fi,nextVideoAnnouncementClick:xo,nextVideoAnnouncementAuto:Bn,nextVideoAnnouncementCancel:Sr,checkFullscreenSupport:Et,changeDoubleForwardOn:zv,closePreviewTrack:Jb,previewTrackOpened:Zb,previewTrackDragStarted:e$,previewTrackDragFinished:t$},external:{firstStart:c=>Vc(c,!0),play:()=>rl(!0),pause:()=>qs(!0),stop:()=>Mc(!0),seekTime:c=>fa(c),seekEpisodeStartTime:c=>si(c),setPlaybackRate:c=>Co(c),setAutoQualityLimits:c=>at(c),setMuted:c=>en(c,!0),toggleSubtitle:()=>So(!0),changeSubtitle:$n,setVolume:c=>Ur(c,!0),returnFocusToEpisodes:Yb,updateAdditionalSettingsItem:nl,addAdditionalSettingsItem:_a,removeAdditionalSettingsItem:ut,updateAdditionalContextItem:Io,addAdditionalContextItem:Xi,removeAdditionalContextItem:mi,updateAdditionalButton:Yl,addAdditionalButton:ha,removeAdditionalButton:jl,setLiveLowLatency:ol,hideControls:()=>ss(!1),showControls:()=>ss(!0),setQuality:c=>bn(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>Bo(c,"to-video",!0),setHighQualityEnabled:c=>Hn(c,"to-video",!0),changeAudioStream:Br}},callbacks:s,setUiCallbacks:c=>{Ze={...c}},getAdmanWrapper:()=>K,getLogger:()=>qe,getPlayer:()=>D,destroy:jb};return zt};function jn(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}=Os(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 o2=["disabledControls$","additionalButtons"],n2=["interactiveTimeIndicator"],Wl=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!o2.includes(r)){let l=o||n2.includes(r);a.set(jn(t,i,r,l))}}};var Xu=async(t,e,i)=>{await co(),e&&i&&(i.focus(),t.set(!1))};var r2=Ie('<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 Cm(t){je(t,{children:(e,i)=>{var o=r2();b(e,o)},$$slots:{default:!0}})}function Tm(t,e){B(e,!0);let[i,o]=Ne(),r=()=>w(s,"$contextMenuVisible$",i),a=h(e,"disabled",3,!1),l=h(e,"ariaLabel",3,""),d=be(),s=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,m=d.ui.contextMenu.showContextMenuBtn$,p=d.ui.contextMenu.position$,v=d.ui.contextMenu.btnRef$,_=q(void 0);De(()=>{n(_)&&Tt(()=>{v.set(n(_))})});let y=T=>{let R=aa(T),A=N_(n(_));p.set(A),u.set(R),s.set(!r())},$=()=>{m.set(!0)},x=()=>{m.set(!1)},I=f(()=>r()?"opened":"");Ft(t,{get className(){return n(I)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:$,blur:x,get ariaExpanded(){return r()},get ref(){return n(_)},set ref(T){N(_,T,!0)},children:(T,R)=>{Cm(T,{})},$$slots:{default:!0}}),H(),o()}var s2=t=>{t.stopPropagation()},a2=L("<div><!> <div></div> <div></div></div>"),l2={hash:"s-22",code:'.interactive-episode-icon-animated.s-22{height:32px;opacity:1;position:absolute;right:16px;top:16px;transition:.3s;width:32px}.interactive-episode-icon-animated.icon-small.s-22{height:28px;width:28px}.invisible.s-22{opacity:0;visibility:hidden}.fullscreen.s-22:not(.mobile){height:40px;right:23px;top:19px;width:40px}.mobile.s-22{height:28px;right:14px;top:12px;width:28px}.fullscreen.mobile.s-22{height:32px;width:32px}@media screen and (orientation:portrait){.interactive-episode-icon-animated.mobile.fullscreen.s-22{right:16px;top:40px}}@keyframes s-22-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-22{animation:s-22-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-22{animation-play-state:paused}.interactive-episode-icon-animated svg{height:100%;width:100%}.ref-block.s-22{height:100%;position:absolute;top:0;visibility:hidden;width:100%}.hidden.s-22{display:none}'};function Jd(t,e){var K;B(e,!0),Q(t,l2);let[i,o]=Ne(),r=()=>w(x,"$isMobile",i),a=()=>w(A,"$areControlsVisible",i),l=()=>w(E,"$currentGridType$",i),d=()=>w(T,"$isInteractiveTime$",i),s=()=>w($,"$interactiveControlsOpacity$",i),u=()=>w(R,"$showInteractiveTimeIndicatorTooltip$",i),m=()=>w(I,"$isFullscreen",i),p=h(e,"ref",15,void 0),v=q(void 0),_=be(),y=mo(),{interactiveControlsOpacity$:$}=y,x=_.ui.isMobile,I=_.ui.isFullscreen,T=_.state.isInteractiveTime$,R=y.showInteractiveTimeIndicatorTooltip$,A=_.ui.controlsVisible,P=(K=_.callbacks)==null?void 0:K.onInteractiveTimeIndicatorClick,E=_.ui.currentGridType$,z=f(()=>!r()&&a()),F=f(()=>Ns(l(),"s")),U=f(()=>!d()||!!s()||n(z)),X=q(!1);De(()=>{N(X,n(U),!0)});let ae=()=>{N(X,!0)},Z=()=>{var se;re(),(se=n(v))==null||se.addEventListener("animationiteration",ae,{once:!0})},re=()=>{var se;N(X,!1),(se=n(v))==null||se.removeEventListener("animationiteration",ae)},J=se=>{R.set(se)},we=f(()=>u()&&!n(U));De(()=>{u()?Z():re()});let me=()=>{n(U)||(R.set(!0),P==null||P())};sn(()=>{R.clearTimeout(),re()});let ee=()=>{R.set(!1)},_e=j("tooltip_interactive_interaction_time_indicator");var Ce=a2();let ge;Ce.__mousemove=[s2],Ce.__click=me;var pe=C(Ce);Ao(pe,{get tooltipContent(){return _e},get tooltipVisible(){return n(we)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:J,get ref(){return p()},set ref(se){p(se)},children:(se,xe)=>{Wd(se,{completed:!0})},$$slots:{default:!0}});var Ke=k(pe,2);let G;Ye(Ke,se=>p(se),()=>p());var D=k(Ke,2);let qe;Ye(D,se=>N(v,se),()=>n(v)),S(Ce),O((se,xe,Be)=>{ge=oe(Ce,1,"interactive-episode-icon-animated s-22",null,ge,se),G=oe(Ke,1,"ref-block s-22",null,G,xe),qe=oe(D,1,"pulse s-22",null,qe,Be)},[()=>({mobile:r(),fullscreen:m(),invisible:n(U),"icon-small":n(F)}),()=>({hidden:n(U)}),()=>({paused:n(X)})]),lt("mouseleave",Ce,ee),b(t,Ce),H(),o()}Qe(["mousemove","click"]);function Zu(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);Ao(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=Le();let m=f(()=>e.buttonComponent);var p=ue(u);Mi(p,()=>n(m),(v,_)=>{_(v,ts(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),b(d,u)},$$slots:{default:!0}}),H()}var Hs={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var c2=Ie('<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 ua(t,e){B(e,!0);let i=h(e,"reversed",3,!1),o=f(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),r=f(()=>`${an(e.size)}${n(o)}`),a=f(()=>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=c2();b(l,s)},$$slots:{default:!0}}),H()}var u2=L('<div class="icon-background-mobile s-1z"><!></div>'),p2={hash:"s-1z",code:".icon-background-mobile.s-1z{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:100%;justify-content:space-around;left:0;position:absolute;top:0;width:100%}"};function Wa(t,e){B(e,!0),Q(t,p2);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"disabled",3,!1),l=be().ui.t,d=f(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),s=f(()=>e.type==="prev"?l("hotkey_map_item_prev_video_value"):l("hotkey_map_item_next_video_value")),u=f(()=>`btn-${o()?"m":"d"}--${e.type}`);Ft(t,{get className(){return n(u)},get testId(){var m;return`btn-${(m=e.type)!=null?m:""}`},get disabled(){return r()},get ariaLabel(){return n(d)},get click(){return e.click},get ariaKeyShortCut(){return n(s)},get ref(){return i()},set ref(m){i(m)},children:(m,p)=>{var v=Le(),_=ue(v);{var y=x=>{var I=u2(),T=C(I);let R=f(()=>e.type==="prev");ua(T,{get size(){return"32"},get reversed(){return n(R)}}),S(I),b(x,I)},$=x=>{let I=f(()=>e.type==="prev");ua(x,{get size(){return"24"},get reversed(){return n(I)}})};V(_,x=>{o()?x(y):x($,!1)})}b(m,v)},$$slots:{default:!0}}),H()}var f2=Ie('<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 ec(t,e){B(e,!0);let i=f(()=>an(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=f2();b(o,a)},$$slots:{default:!0}}),H()}import{noop as m2}from"@vkontakte/videoplayer-shared/es2018";var v2=L('<div class="icon-background-mobile s-25"></div>'),g2=L("<!> <div><!></div>",1),h2={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 Kl(t,e){B(e,!0),Q(t,h2);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,m2),d=j("tooltip_restart"),s=f(()=>`${o()?"btn-m--play":""} ${a()}`);Ft(t,{get className(){return n(s)},testId:"replay-btn",get ariaLabel(){return d},get disabled(){return r()},get click(){return l()},get ariaKeyShortCut(){return fs.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,m)=>{var p=g2(),v=ue(p);{var _=T=>{var R=v2();b(T,R)};V(v,T=>{o()&&T(_)})}var y=k(v,2);let $;var x=C(y);let I=f(()=>o()?"48":"24");ec(x,{get size(){return n(I)}}),S(y),O(T=>$=oe(y,1,"s-25",null,$,T),[()=>({mobile:o()})]),b(u,p)},$$slots:{default:!0}}),H()}var _2=Ie('<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 Fs(t,e){B(e,!0);let i=f(()=>an(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=_2();b(o,a)},$$slots:{default:!0}}),H()}import{noop as b2}from"@vkontakte/videoplayer-shared/es2018";var $2=L('<div class="icon-background-mobile s-27"><!></div>'),y2={hash:"s-27",code:".icon-background-mobile.s-27{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 ql(t,e){B(e,!0),Q(t,y2);let[i,o]=Ne(),r=()=>w(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=mo(),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),m=h(e,"className",3,""),p=h(e,"click",3,b2),_=be().ui.t,{toggle:y}=a,$=f(()=>y),x=f(()=>r()!==null),I=f(()=>n(x)?r():s()),T=f(()=>n(I)?_("tooltip_pause"):_("tooltip_play")),R=f(()=>n(I)?Fs:An),A=f(()=>`${d()?"btn-m--play":""} ${m()}`),P=f(()=>n(x)?n($):p());Ft(t,{get className(){return n(A)},testId:"play-btn",get click(){return n(P)},get disabled(){return u()},get ariaLabel(){return n(T)},get ariaKeyShortCut(){return fs.KeyK},get ref(){return l()},set ref(E){l(E)},children:(E,z)=>{var F=Le();let U=f(()=>n(R));var X=ue(F);{var ae=re=>{var J=$2(),we=C(J);Mi(we,()=>n(U),(me,ee)=>{ee(me,{get size(){return"48"}})}),S(J),b(re,J)},Z=re=>{var J=Le(),we=ue(J);Mi(we,()=>n(U),(me,ee)=>{ee(me,{get size(){return"24"}})}),b(re,J)};V(X,re=>{d()?re(ae):re(Z,!1)})}b(E,F)},$$slots:{default:!0}}),H(),o()}var x2=Ie('<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 Im(t){je(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=x2();b(e,o)},$$slots:{default:!0}})}function tc(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=j("tooltip_interactive_go_back"),l=f(()=>o()?"hidden":"");Ft(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)=>{Im(d,{})},$$slots:{default:!0}}),H()}var w2=L('<span class="gutter s-21"><span><!></span></span>'),S2={hash:"s-21",code:".gutter.s-21{--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-21{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-21{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function ic(t,e){B(e,!0),Q(t,S2);let[i,o]=Ne(),r=()=>w(s,"$autoplayNextEnabled$",i),a=h(e,"ref",15,void 0),l=be(),d=l.ui.t,s=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,m=()=>{u(!r(),!0)},p=d("aria_label_autoplay"),v="12",_="#000",y=f(()=>r()?"true":"false");Ft(t,{click:m,get ariaLabel(){return p},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref($){a($)},children:($,x)=>{var I=w2(),T=C(I);let R;var A=C(T);{var P=z=>{An(z,{get size(){return v},fill:_})},E=z=>{Fs(z,{get size(){return v},fill:_})};V(A,z=>{r()?z(P):z(E,!1)})}S(T),S(I),O(z=>R=oe(T,1,"toggler s-21",null,R,z),[()=>({enabled:r()})]),b($,I)},$$slots:{default:!0}}),H(),o()}var C2=Ie('<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 Em(t){je(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=C2();di(),b(e,o)},$$slots:{default:!0}})}function oc(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=j("tooltip_interactive_seek"),l=f(()=>o()?"hidden":"");Ft(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)=>{Em(d,{})},$$slots:{default:!0}}),H()}var T2=Ie('<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>'),I2=Ie('<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 Pm(t,e){let i=h(e,"isOpened",3,!1),o=f(()=>i()?"graph-close-icon":"graph-open-icon");je(t,{get testId(){return n(o)},children:(r,a)=>{var l=I2(),d=k(ue(l));{var s=u=>{var m=T2();b(u,m)};V(d,u=>{i()&&u(s)})}b(r,l)},$$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=h(e,"graphIsOpened",3,!1),d=be().ui.t,s=f(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=f(()=>o()?"hidden":"");Ft(t,{get className(){return n(u)},testId:"btn-graph",get disabled(){return r()},get ariaLabel(){return n(s)},get click(){return e.click},get ref(){return i()},set ref(m){i(m)},children:(m,p)=>{let v=f(()=>!!a());Pm(m,{get isOpened(){return n(v)}})},$$slots:{default:!0}}),H()}import{PlaybackState as nb}from"@vkontakte/videoplayer-core/es2018";function rc(t,e){B(e,!0);let[i,o]=Ne(),r=()=>w(u,"$playbackState$",i),a=h(e,"isMobile",3,!1),l=h(e,"isLiveActive",3,!1),d=h(e,"ariaLabel",3,""),s=be(),u=s.state.playbackState$,m=s.actions.internal.switchToActiveLive,p=s.actions.internal.togglePlay,v=f(()=>()=>{if(!l()){m();return}r()===nb.PAUSED&&p()}),_=f(()=>a()?"":"btn--live btn-full-opacity"),y=f(()=>l()?"btn-live":"btn-live-offset"),$=f(()=>l()&&r()===nb.PLAYING);Ft(t,{get className(){return n(_)},get testId(){return n(y)},get disabled(){return n($)},get ariaLabel(){return d()},get click(){return n(v)},children:(x,I)=>{Ld(x,{get isActive(){return l()}})},$$slots:{default:!0}}),H(),o()}import{noop as rb}from"@vkontakte/videoplayer-shared/es2018";var E2=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),P2=L('<img class="icon" aria-hidden="true"/>');function Ka(t,e){"use strict";let i=q(!1),o=()=>{N(i,!0)};var r=Le(),a=ue(r);{var l=s=>{var u=E2();b(s,u)},d=s=>{var u=P2();O(()=>Ve(u,"src",e.icon)),lt("error",u,o),Aa(u),b(s,u)};V(a,s=>{n(i)?s(l):s(d,!1)})}b(t,r)}function km(t,e){B(e,!0);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,rb),r=h(e,"ref",15),a=f(()=>o()===rb),l=f(()=>n(a)||i()),d=f(()=>n(a)?"btn-full-opacity":"");Ao(t,{get disabled(){return n(l)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get tooltipVisible(){return e.tooltipVisible},get ref(){return r()},set ref(s){r(s)},children:(s,u)=>{let m=f(()=>{var p;return(p=e.testId)!=null?p:e.id});Ft(s,{get className(){return n(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(l)},get testId(){return n(m)},children:(p,v)=>{Ka(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),H()}var sb=t=>!!t.buttonComponent;var Us={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(jn(t,i,r,o))};import{interpolate as Am}from"@vkontakte/videoplayer-shared/es2018";var ab=10,lb=40,Lm=.2,A2=.5,L2=65,M2=114,V2=4,db=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=f(()=>i?L2:M2),r=q(!1),a=q(0),l=q(0),d=f(()=>n(o)+ab-lb-V2),s=f(()=>Am(n(a),[Lm,1],[0,-n(d)])),u=f(()=>Am(n(a),[Lm,1],[0,lb])),m=f(()=>Am(n(a),[Lm,1],[0,n(o)+ab]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(m),onPointerDown:$=>{var x;N(l,((x=e())==null?void 0:x.getBoundingClientRect().bottom)||0,!0),N(r,!0)},onPointerMove:$=>{if(!n(r))return;let x=Math.max(Math.min($.clientY-n(l),0),-n(d));N(a,Math.abs(x/n(d)),!0)},onPointerUp:()=>{N(r,!1),N(a,n(a)>=A2?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{N(a,0)}}};var R2=t=>t;function _s(t,{delay:e=0,duration:i=400,easing:o=R2}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var N2=L('<span class="root s-2c"> </span>'),D2={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 Mm(t,e){Q(t,D2);var i=N2(),o=C(i,!0);S(i),O(()=>ve(o,e.time)),b(t,i)}var O2=L('<div class="tooltip-wrapper s-u"><div><!></div></div>'),B2={hash:"s-u",code:'.tooltip-wrapper.s-u{display:block;position:relative}.tooltip.s-u{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-u: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-u{opacity:1;visibility:visible}'};function Vm(t,e){Q(t,B2);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=q(void 0),u=q(void 0);function m(x){if(!n(u))return 0;let{width:I}=n(u).getBoundingClientRect(),T=I/2;return x<T?T+l():x>e.containerWidth-T?e.containerWidth-T-d():x}let p=f(()=>m(r()));var v=O2(),_=C(v);let y;var $=C(_);ei($,()=>{var x;return(x=e.children)!=null?x:mt}),S(_),Ye(_,x=>N(u,x),()=>n(u)),S(v),Ye(v,x=>N(s,x),()=>n(s)),O(x=>{We(v,`transform: translate(${n(p)}px, ${a()}px);`),y=oe(_,1,"tooltip s-u",null,y,x),We(_,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,v)}var cb=t=>Math.abs(t)/90%4===1;var H2=L('<div class="preview s-v"></div>'),F2=L('<div class="time s-v"> </div>'),U2=L('<div><!> <div class="episode s-v"><!></div> <!></div>'),z2={hash:"s-v",code:".timeline-preview.s-v{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-v{bottom:72px}.preview.s-v{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-v{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-v,.time.s-v{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-v{color:var(--white)}"};function Rm(t,e){B(e,!0),Q(t,z2);let[i,o]=Ne(),r=()=>w(y,"$rotateAlpha",i),a=()=>w($,"$playerSize",i),l={MOBILE:150,DESKTOP:278},d=h(e,"time",3,""),s=h(e,"isMobile",3,!1),u=h(e,"videoEpisodes",19,()=>[]),m=h(e,"progress",3,0),p=h(e,"duration",3,0),v=h(e,"isInteractive",3,!1),_=be(),y=_.ui.rotateAlpha,$=_.ui.playerSize,x=q(0),I=q(0),T=q(""),R=q(0),A=q(0),P=q(0),E=q(0),z=f(()=>Fu(m(),p(),u())),F=f(()=>Hl(r())),U=f(()=>cb(r())),X=f(re),ae=f(()=>(n(U)?1:-1)*(n(x)/2-n(I)/2)),Z=f(()=>n(ae)*-1);De(()=>{(K=>{N(x,K.width,!0),N(I,K.height,!0)})(we())}),De(()=>{(K=>{N(T,K.imgSrc,!0),N(R,K.imgWidth,!0),N(A,K.imgHeight,!0),N(P,K.imgOffsetX,!0),N(E,K.imgOffsetY,!0)})(me(m()))});function re(){var Be;let K=s()?l.MOBILE:l.DESKTOP,{isVertical:se}=J(),xe=30;return(Be=n(z))!=null&&Be.text&&(xe+=16),(se||n(F))&&(xe+=18,xe+=50),Math.min(Math.max(a().height-xe,0),K)}function J(){let K=e.previewThumbsData.frameWidth,se=e.previewThumbsData.frameHeight,xe=se>K;return{width:K,height:se,isHorizontal:!xe,isVertical:xe}}function we(){let{height:K,isHorizontal:se,isVertical:xe,width:Be}=J();return se&&(K=K/Be*n(X),Be=n(X)),xe&&(Be=Be/K*n(X),K=n(X)),{width:Be,height:K}}function me(K){let se;e.previewThumbsData.isUV?se=Math.floor(p()*K/e.previewThumbsData.frequency):se=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*K)));let xe=Math.floor(se/e.previewThumbsData.countPerImage),Be=Math.floor(se%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),et=se%e.previewThumbsData.countPerRow,ne=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&xe===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(ne=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&ne++);let ce=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&xe===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(ce=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let Re=n(x)*ce,Ae=n(I)*ne,Ze=-et*n(x),Ee=-Be*n(I);return{imgSrc:e.previewThumbsData.links[xe],imgWidth:Re,imgHeight:Ae,imgOffsetX:Ze,imgOffsetY:Ee}}var ee=U2();let _e;var Ce=C(ee);{var ge=K=>{var se=H2();O(()=>We(se,`width: ${n(x)}px; height: ${n(I)}px; background-image: url(${n(T)}); background-size: ${n(R)}px ${n(A)}px; background-position: ${n(P)}px ${n(E)}px;
|
|
61
|
-
transform: rotate(${r()}deg) ${n(
|
|
62
|
-
`)),b(K,se)};V(Ce,K=>{n(T)&&K(ge)})}var pe=k(Ce,2),Ke=C(pe);{var G=K=>{var se=Le(),xe=ue(se);{var Be=ne=>{var ce=ps();O(Re=>ve(ce,Re),[()=>j("tooltip_episode_unfinished")]),b(ne,ce)},et=ne=>{var ce=ps();O(()=>ve(ce,n(z).text||"")),b(ne,ce)};V(xe,ne=>{v()&&n(z).completed===!1?ne(Be):ne(et,!1)})}b(K,se)};V(Ke,K=>{n(z)&&K(G)})}S(pe);var D=k(pe,2);{var qe=K=>{var se=F2(),xe=C(se,!0);S(se),O(()=>ve(xe,d())),b(K,se)};V(D,K=>{v()||K(qe)})}S(ee),O(K=>{_e=oe(ee,1,"timeline-preview s-v",null,_e,K),We(ee,`width: ${n(F)?n(I):n(x)}px;`)},[()=>({mobile:s()})]),b(t,ee),H(),o()}var W2=L('<span class="time s-f"> </span>'),K2=L("<!> <!>",1),q2={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 Nm(t,e){var le,$e,Me,st,$t;B(e,!0),Q(t,q2);let[i,o]=Ne(),r=()=>w(Z,"$interactiveEpisodes$",i),a=()=>w(E,"$duration$",i),l=()=>w(P,"$position$",i),d=()=>w(we,"$isInteractiveExpectation$",i),s=()=>w(J,"$isInteractiveTime$",i),u=()=>w(Ce,"$previewTrackActive",i),m=()=>w(z,"$isLive$",i),p=()=>w(_e,"$disabledControls$",i),v=()=>w(U,"$isMobile",i),_=()=>w(F,"$isActiveLive$",i),y=()=>w(A,"$bufferedProgress$",i),$=h(e,"showTimeline",3,!1),x=h(e,"withEpisodes",3,!0),I=h(e,"ref",15,void 0),T=be(),R=Vt(),A=T.state.bufferedProgress$,P=T.state.positionWithScrubbing$,E=T.state.duration$,z=T.state.isLive$,F=T.state.isActiveLive$,U=T.ui.isMobile,X=R.features.episodes&&x()?T.actions.internal.getVideoEpisodes():void 0,ae=T.actions.internal.getPreviewThumbsData(),Z=T.state.interactiveEpisodes$,re=T.state.isInteractive,J=T.state.isInteractiveTime$,we=T.state.isInteractiveExpectation$,me=T.actions.internal.correctSeekTimeToInteractive,ee=(le=T.callbacks)==null?void 0:le.onDisabledTimelineClick,_e=T.ui.controls.disabledControls$,Ce=T.ui.previewTrackActive,ge=(Me=($e=T.callbacks)==null?void 0:$e.uiInfo)==null?void 0:Me.onTimelineMouseEnter,pe=($t=(st=T.callbacks)==null?void 0:st.uiInfo)==null?void 0:$t.onTimelineMouseLeave,Ke=T.ui.t,G=R.features.interactiveResponsiveUi,D=f(()=>re?r():X),qe=f(()=>Go(a())),K=f(()=>Go(l())),se=f(()=>l()/a()),xe=f(()=>d()||s()),Be=q(!1),et=q(""),ne=q(0),ce=q(0),Re=q(0),Ae=f(()=>({containerWidth:n(ce),translateXPx:n(ne),translateYPx:re&&ae?-36:-16,active:n(Be)&&$()&&!n(xe)&&!G&&!u(),pointer:!R.features.timelinePreview||!ae||m()})),Ze=Ke("aria_timeline"),Ee=f(()=>Ke("aria_timeline_value",{position:n(K),duration:n(qe)}));function Te(fe){return!me||!re?fe:me(fe*a())/a()}function He(fe,Oe){var ze;(ze=e.onSliderPointerDown)==null||ze.call(e,Oe),T.actions.internal.startScrubbing(Te(fe))}function It(fe){s()||T.actions.internal.progressScrubbing(Te(fe))}function wt(fe){var Oe;T.actions.internal.completeScrubbing(Te(fe)),N(Be,!1),(Oe=e.onSliderPointerUp)==null||Oe.call(e)}function At(fe,Oe,ze){var yt;(yt=e.onSliderPointerEnter)==null||yt.call(e,fe),jt(fe,Oe,ze),N(Be,!0)}function dt(fe,Oe,ze,yt){var qt;(qt=e.onSliderMove)==null||qt.call(e,yt,fe),jt(fe,Oe,ze),N(Be,!0)}function Et(){var fe;N(Be,!1),(fe=e.onSliderLeave)==null||fe.call(e)}function jt(fe,Oe,ze){N(Re,Te(fe),!0),N(ne,Oe,!0),ze&&N(ce,ze,!0),N(et,Pt(fe),!0)}function Pt(fe){let Oe=Go((m()?1-fe:fe)*a());return m()?`-${Oe}`:Oe}let Dt=f(()=>p().has("TIMELINE"));var Ut=K2(),Y=ue(Ut);Vm(Y,ts(()=>n(Ae),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(fe,Oe)=>{var ze=Le(),yt=ue(ze);{var qt=ni=>{Rm(ni,{get time(){return n(et)},get isMobile(){return v()},get videoEpisodes(){return n(D)},get previewThumbsData(){return ae},get progress(){return n(Re)},get duration(){return a()},get isInteractive(){return re}})},St=ni=>{var ci=W2(),Vi=C(ci,!0);S(ci),O(()=>ve(Vi,n(et))),b(ni,ci)};V(yt,ni=>{R.features.timelinePreview&&ae&&!m()?ni(qt):ni(St,!1)})}b(fe,ze)},$$slots:{default:!0}}));var Pe=k(Y,2);Ua(Pe,{className:"timeline-slider",get isActiveLive(){return _()},get isMobile(){return v()},get ariaLabel(){return Ze},ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return l()},get ariaValueText(){return n(Ee)},get loadedProgress(){return y()},get filledProgress(){return n(se)},get handleProgress(){return n(se)},get videoEpisodes(){return n(D)},onPointerDown:He,onHandleMove:It,onPointerMove:dt,onPointerUp:wt,onPointerEnter:At,onPointerLeave:Et,get onMouseEnter(){return ge},get onMouseLeave(){return pe},get onDisabledClick(){return ee},get isInteractive(){return re},get disabled(){return n(Dt)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:wt,get ref(){return I()},set ref(fe){I(fe)}}),b(t,Ut),H(),o()}var Q2={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 sc(t,e){B(e,!0),Q(t,Q2);let[i,o]=Ne(),r=()=>w(s,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"duration",3,0),d=be(),s=d.ui.isMobile,u=d.ui.t,m=f(()=>Go(l())),p=f(()=>Go(a())),v=f(()=>a()/l()),_=f(()=>u("aria_timeline_value",{position:n(p),duration:n(m)})),y=f(()=>Math.round(n(v)*100));Ua(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n(_)},get filledProgress(){return n(v)},hideHandel:!0,get squareBorders(){return r()}}),H(),o()}var G2=L("<div><!></div>"),Y2=L("<div></div>"),j2={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 qa(t,e){B(e,!0),Q(t,j2);let[i,o]=Ne(),r=()=>w(x,"$isLive$",i),a=()=>w(R,"$isMobile",i),l=()=>w(A,"$disabled",i),d=()=>w(T,"$adPosition",i),s=()=>w(I,"$adDuration",i),u=h(e,"isAds",3,!1),m=h(e,"isHidden",3,!1),p=h(e,"timelineNotAvailable",3,!1),v=h(e,"needPadding",3,!0),_=h(e,"ref",15,void 0),y=be(),$=Vt(),x=y.state.isLive$,I=y.ads.duration,T=y.ads.position,R=y.ui.isMobile,A=de(!1),P=f(()=>!p()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var E=Le(),z=ue(E);{var F=X=>{var ae=G2();let Z;var re=C(ae);{var J=me=>{sc(me,{get position(){return d()},get duration(){return s()}})},we=me=>{Nm(me,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return n(P)},get withEpisodes(){return e.withEpisodes},get onSliderMove(){return e.onSliderMove},get onSliderPointerDown(){return e.onSliderPointerDown},get onSliderPointerUp(){return e.onSliderPointerUp},get onSliderLeave(){return e.onSliderLeave},get onSliderPointerEnter(){return e.onSliderPointerEnter},get ref(){return _()},set ref(ee){_(ee)}})};V(re,me=>{u()?me(J):me(we,!1)})}S(ae),Ms(ae,()=>Ll(m()&&$.features.usePerformanceFix,A,$.disableInvisibleComponentsTimeout)),O(me=>Z=oe(ae,1,"timeline s-e",null,Z,me),[()=>({withoutPadding:!v(),mobile:a(),"out-of-flow":l()})]),b(X,ae)},U=X=>{var ae=Y2();let Z;O(re=>Z=oe(ae,1,"timeline-stub s-e",null,Z,re),[()=>({mobile:a()})]),b(X,ae)};V(z,X=>{n(P)?X(F):X(U,!1)})}b(t,E),H(),o()}import{getRangeAroundIndex as X2}from"@vkontakte/videoplayer-shared/es2018";var Z2=(t,e,i,o,r,a,l)=>{N(e,!0),N(i,t.clientX,!0),N(o,n(r),!0),a(l())},J2=L("<div></div>"),ew=L('<div><div class="track s-2b"></div></div>'),tw={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 Om(t,e){B(e,!0),Q(t,tw);let[i,o]=Ne(),r=()=>w(R,"$rotateAlpha",i),a=()=>w($,"$position$",i),l=()=>w(y,"$duration$",i),d=be(),{countPerImage:s=0,countPerRow:u=0,countTotal:m=0,links:p=[],frameHeight:v=0,frameWidth:_=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:$}=d.state,{startScrubbing:x,progressScrubbing:I,completeScrubbing:T}=d.actions.internal,R=d.ui.rotateAlpha,A=q(void 0),P=q(!1),E=q(0),z=q(0),F=q(0),U=q(0),X=f(()=>v<=_),ae=f(()=>Hl(r())),Z=f(()=>n(X)?!n(ae):n(ae)),re=114,J=65,we=3,me=f(()=>n(Z)?re:J),ee=f(()=>n(X)?re:J),_e=f(()=>n(X)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),Ce=f(()=>m*n(me)),ge=q(0);De(()=>{N(U,Math.ceil(-n(F)/n(me))-1),N(F,-n(Ce)*a()/l())});let pe=()=>{T(Ke(),!0)},Ke=()=>l()*-n(F)/n(Ce)/l(),G=!1,D=Ee=>{if(!n(P))return!1;let Te=Ee.clientX-n(E);N(F,n(z)+Te),N(F,Math.max(Math.min(n(F),0),-n(Ce)),!0),Math.abs(Te)>1&&(G=!0),I(Ke())},qe=Ee=>{n(P)&&(N(P,!1),!G&&Ee&&N(F,-(Ee.offsetX-n(ge)/2)),G=!1,pe())},K=()=>{n(P)&&qe()},se=f(()=>s/u),xe=(Ee,Te)=>{if(Ee!==p.length-1)return u;let He=0,It=Te*u;for(let wt=1;wt<=u;wt++)Ee*s+He+It<m&&He++;return He},Be=f(()=>Math.floor(n(U)/s)),et=f(()=>X2(3,n(Be),p.length-1)),ne=(Ee,Te,He)=>{let It=s*n(me);return Ee*It+Te*n(me)*u+n(ge)/2-we/2+He*n(me)},ce=f(()=>[`--row-numbers: ${n(se)}`,`--column-numbers: ${u}`,`--frame-width: ${n(ee)}px`,`--frame-height: ${n(_e)}`].join(";"));var Re=ew();let Ae;var Ze=C(Re);Ze.__pointerdown=[Z2,P,E,z,F,x,Ke],Ze.__pointermove=D,Ze.__pointerup=qe,gi(Ze,20,()=>n(et),Ee=>Ee,(Ee,Te)=>{var He=Le(),It=ue(He);gi(It,16,()=>Array.from({length:n(se)},(wt,At)=>At),wt=>wt,(wt,At)=>{var dt=Le(),Et=ue(dt);gi(Et,16,()=>Array.from({length:xe(Te,At)},(jt,Pt)=>Pt),jt=>jt,(jt,Pt)=>{var Dt=J2();O((Ut,Y)=>{We(Dt,Ut),oe(Dt,1,Y,"s-2b")},[()=>`--row-index: ${At}; --column-index: ${Pt}; left: ${ne(Te,At,Pt)}px; background-image: url(${p[Te]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),b(jt,Dt)}),b(wt,dt)}),b(Ee,He)}),S(Ze),S(Re),Ye(Re,Ee=>N(A,Ee),()=>n(A)),O(Ee=>{Ae=oe(Re,1,"root s-2b",null,Ae,Ee),We(Re,n(ce)),We(Ze,`transform: translateX(${n(F)}px); width: ${n(Ce)}px;`)},[()=>({"is-vertical-video":!n(X),"vertically-rotated":n(ae)})]),lt("mouseleave",Ze,K),Pn(Re,"clientWidth",Ee=>N(ge,Ee)),b(t,Re),H(),o()}Qe(["pointerdown","pointermove","pointerup"]);var iw=L('<div class="notification s-2d"><span class="description s-2d"> </span></div>'),ow={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 Bm(t,e){B(e,!1),Q(t,ow);let i=340,{ui:{t:o}}=be();fo();var r=iw(),a=C(r),l=C(a,!0);S(a),S(r),O(d=>ve(l,d),[()=>o("preview_track_close_tooltip")],Sn),es(3,r,()=>_s,()=>({duration:i})),b(t,r),H()}import{getRangeAroundIndex as nw}from"@vkontakte/videoplayer-shared/es2018";var rw=L('<div class="preview-track-close tooltip s-29"><!></div>'),sw=L('<div class="preview-track-control s-29"><!> <div class="preview-track-close s-29"><!></div> <!></div>'),aw=L('<div class="wrapper-preview-track s-29"><!></div>'),lw=L('<div class="enriched-timeline s-29"><!> <!> <!></div>'),dw={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 Hm(t,e){B(e,!0),Q(t,dw);let[i,o]=Ne(),r=()=>w($,"$playerSize",i),a=()=>w(y,"$duration$",i),l=()=>w(x,"$previewTrackActive",i),d=()=>w(v,"$position$",i),s=()=>w(_,"$isRewindableLive$",i),u=h(e,"timelineRef",15,void 0),m=be(),p=200,{positionWithScrubbing$:v,isRewindableLive$:_,duration$:y}=m.state,{playerSize:$,previewTrackActive:x}=m.ui,{countPerImage:I=0,links:T=[],frequency:R=0}=m.actions.internal.getPreviewThumbsData()||{},A=f(()=>r().width>100),P=q(!f_()),E=()=>{n(P)&&(p_(),N(P,!1))},z=me=>{let ee=Math.floor(a()*me/R),_e=Math.floor(ee/I),Ce=nw(3,_e,T.length-1);for(let ge of Ce){let pe=new Image;pe.src=T[ge]}},F=(me,ee)=>{z(ee),!l()&&e.onTimelineMove(me)};var U=lw(),X=C(U);{var ae=me=>{var ee=sw(),_e=C(ee);let Ce=f(()=>Go(d()));Mm(_e,{get time(){return n(Ce)}});var ge=k(_e,2),pe=C(ge);Rs(pe,{onClick:()=>m.actions.internal.closePreviewTrack()}),S(ge);var Ke=k(ge,2);{var G=D=>{var qe=rw(),K=C(qe);Bm(K,{}),S(qe),b(D,qe)};V(Ke,D=>{n(P)&&D(G)})}S(ee),lt("mouseleave",ge,E),es(3,ee,()=>_s,()=>({duration:p})),b(me,ee)};V(X,me=>{l()&&me(ae)})}var Z=k(X,2);let re=f(()=>!n(A));qa(Z,{get isHidden(){return n(re)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return s()},onSliderMove:F,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:z,get ref(){return u()},set ref(me){u(me)}});var J=k(Z,2);{var we=me=>{var ee=aw(),_e=C(ee);Om(_e,{}),S(ee),O(()=>We(ee,`height: ${e.animatedPreviewTrackHeight}px;`)),b(me,ee)};V(J,me=>{e.previewTrackAvailable&&me(we)})}S(U),O(()=>We(U,`transform: translateY(${e.animatedOffsetY}px);`)),b(t,U),H(),o()}var uw=L('<div><!> <div class="controls s-1b" data-testid="player_controls"><div class="controls-left s-1b"><!> <!> <!></div> <div class="controls-right s-1b"></div></div></div> <!>',1),pw={hash:"s-1b",code:'.wrapper-bottom.s-1b{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-1b:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-1b>:where(.s-1b){pointer-events:auto}.controls.s-1b{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-1b,.controls-right.s-1b{align-content:center;display:flex}.controls-left.s-1b{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-1b >:not(:first-child),.controls-right.s-1b >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-1b{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1b{transition:none}'};function Um(t,e){var nl,_a;B(e,!0),Q(t,pw);let[i,o]=Ne(),r=()=>w(Yo,"$disabledControls$",i),a=()=>w(nt,"$adPlaybackState",i),l=()=>w(St,"$playbackState$",i),d=()=>w(Si,"$currentSubtitle$",i),s=()=>w(Vi,"$isEnded$",i),u=()=>w(cn,"$currentGridType$",i),m=()=>w(Rt,"$isLive$",i),p=()=>w(rt,"$chromecastState$",i),v=()=>w(tt,"$isPictureInPictureActive",i),_=()=>w(Gt,"$pictureInPictureType$",i),y=()=>w(it,"$availableSubtitlesList$",i),$=()=>w(Ot,"$contextMenuOpenedByKeyboard$",i),x=()=>w(vt,"$showContextMenuBtn$",i),I=()=>w(pi,"$isRewindableLive$",i),T=()=>w(uo,"$isActiveLive$",i),R=()=>w(Dr,"$graphIsOpened$",i),A=()=>w(Lo,"$contextMenuVisible$",i),P=()=>w(Ni,"$isFullscreen",i),E=()=>w(ki,"$autoplayNextEnabled",i),z=()=>w(n(Ro),"$prevButton",i),F=()=>w(n(Jo),"$replayButton",i),U=()=>w(n(_o),"$playButton",i),X=()=>w(n(bo),"$nextButton",i),ae=()=>w(n(Ii),"$playPrevChapterButton",i),Z=()=>w(n($o),"$seekToInteractiveButton",i),re=()=>w(n(Fr),"$interactiveGraphButton",i),J=()=>w(n(xr),"$liveButton",i),we=()=>w(n($s),"$time",i),me=()=>w(n(Hi),"$episodes",i),ee=()=>w(n(ys),"$vkLogo",i),_e=()=>w(n(rs),"$volume",i),Ce=()=>w(n(wr),"$subtitles",i),ge=()=>w(n(No),"$settings",i),pe=()=>w(n(Ur),"$context",i),Ke=()=>w(n(en),"$fullscreen",i),G=()=>w(n(tn),"$chromecast",i),D=()=>w(un,"$additionalDesktopControlPanelRightButtons$",i),qe=()=>w(Pi,"$playerSize",i),K=()=>w(Mo,"$isInteractiveTime$",i),se=()=>w(si,"$previewTrackActive",i),xe=()=>w(Ri,"$settingsMenuVisible",i),Be=()=>w(Fi,"$settingButtonRef$",i),et=()=>w(W,"$startedByKeyboard$",i),ne=()=>w(ni,"$isAudioAvailable$",i),ce=()=>w(Ut,"$fakeIsPlaying$",i),Re=()=>w(bs,"$seekToInteractiveDisabledTooltip$",i),Ae=()=>w(yn,"$isPreviewTrackHorizontallyAligned$",i),Ze=()=>w(bi,"$previewTrackAvailable",i),Ee=()=>w(Co,"$previewTrackDragInProgress",i),Te=()=>w(_t,"$adPosition",i),He=()=>w(qt,"$position$",i),It=()=>w(Xt,"$adDuration",i),wt=()=>w(yt,"$duration$",i),At=h(e,"playerControlsWrapperRef",15,void 0),dt=h(e,"playerControlsRef",15,void 0),Et=h(e,"isAds",3,!1),jt=h(e,"logoTargetUrl",3,""),Pt=h(e,"isOneVideoPlaylist",3,!1),Dt=h(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:Ut}=mo(),Y=be(),Pe=mo(),le=Vt(),$e=Y.actions.internal.toggleMuted,Me=Y.actions.internal.togglePlay,st=Y.actions.internal.pause,$t=Y.actions.internal.toggleSubtitle,fe=Y.actions.internal.checkFullscreenSupport,Oe=(nl=Y.callbacks)==null?void 0:nl.onAudioDoesNotExistHint,ze=(_a=Y.callbacks)==null?void 0:_a.onAudioDisabledHint,yt=Y.state.duration$,qt=Y.state.positionWithScrubbing$,St=Y.state.playbackState$,ni=Y.state.isAudioAvailable$,ci=Y.state.isAudioDisabled,Vi=Y.state.isEnded$,Rt=Y.state.isLive$,uo=Y.state.isActiveLive$,pi=Y.state.isRewindableLive$,{isActive$:tt,type$:Gt}=Pe.pictureInPicture$,Ri=Y.ui.settingsMenu.visible$,hi=Y.ui.settingsMenu.openedByBtnKeyboard$,Zt=Y.ui.controls,yi=Y.actions.internal.getVideoEpisodes(),rt=Y.state.chromecastState$,it=Y.state.availableSubtitlesList$,Si=Y.state.currentSubtitle$,Yo=Zt.disabledControls$,Lo=Y.ui.contextMenu.visible$,vt=Y.ui.contextMenu.showContextMenuBtn$,Ot=Y.ui.contextMenu.openedByBtnKeyboard$,W=Y.ui.startedByKeyboard$,Lt=Y.ui.controlBlocks,ri=Y.ui.previewTrackNotificationVisible,ft=Y.ui.t,Xt=Y.ads.duration,_t=Y.ads.position,nt=Y.ads.playbackState,Ni=Y.ui.isFullscreen,Pi=Y.ui.playerSize,cn=Y.ui.currentGridType$,un=Y.ui.additionalDesktopControlPanelRightButtons$,ki=Y.ui.autoplayNextEnabled$,Di=Y.actions.internal.getVideoElement,Mn=Y.actions.internal.replayInteractive,po=Y.actions.internal.prevVideoClick,io=Y.actions.internal.nextVideoClick,Ti=Y.state.isInteractive,Mo=Y.state.isInteractiveTime$,Vo=Y.state.showInteractiveGraph,pn=Y.state.showSeekToInteractive,Vr=Y.state.showPlayPrevChapter,Rr=Y.state.showInteractiveTimeIndicator,Nr=Y.state.playPrevChapterDisabledTooltip,bs=Pe.seekToInteractiveDisabledTooltip$,Dr=Pe.graphIsOpened$,Zn=le.features.interactiveResponsiveUi,Or=f(()=>r().has("EPISODE_BUTTON")),fn=f(()=>r().has("GRAPH_BUTTON")),mn=f(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),fr=f(()=>r().has("PLAY_BUTTON")),mr=f(()=>r().has("REPLAY_BUTTON")),jo=f(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),vr=()=>Y.actions.internal.toggleChromecast(),gr=f(()=>Et()?a()==="playing":l()===Fm.PLAYING),Jn=f(()=>d().value!=="off"),Vn=f(()=>s()&&!Et()||Ti),ns=f(()=>Zn?n(Vn)&&eo(u(),"m"):n(Vn)),vo=f(()=>!s()||Ti||Et()),hr=f(()=>eo(u(),"m")),Oi=f(()=>e.showNextPrevButtons&&eo(u(),"m")&&!Et()&&e.nextButtonActive),_r=f(()=>e.showNextPrevButtons&&eo(u(),"m")&&!Et()&&e.prevButtonActive),Rn=f(()=>!Et()&&!!m()),pt=f(()=>p()!==ub.NOT_AVAILABLE&&!(v()&&_()===1)&&eo(u(),"m")&&!Ti),Jt=f(()=>e.showAutoplayNext&&!Pt()&&eo(u(),"s")),br=f(()=>y().length>0&&eo(u(),"m")),Br=f(()=>$()||x()),Hr=f(()=>eo(u(),"s")&&!Et()),Nn=f(()=>!e.logoHidden&&!Et()),er=f(()=>le.features.fullscreen&&fe()&&(e.logoHidden||eo(u(),Zn?"xs":"s"))&&!(v()&&_()===1)&&(Ti?Dt():!0)),go=f(()=>(!m()||Et())&&!(le.features.interactiveHideTime&&Ti)),Dn=f(()=>Vo&&eo(u(),"m")),tr=f(()=>Zn?pn&&eo(u(),"s"):pn),On=f(()=>Zn?Vr&&eo(u(),"s"):Vr),vn=f(()=>!Et()&&!m()&&!!(yi!=null&&yi.length)&&n(hr)&&!n(Or)),gn=f(()=>!I()||!!T()),hn=f(()=>R()?ft("tooltip_interactive_graph_on"):ft("tooltip_interactive_graph_off")),Xo=f(()=>A()?ft("tooltip_context_menu_close"):ft("tooltip_context_menu_open")),Bi=(ut,ot)=>ut?ot&&ot===Fm.PAUSED?ft("tooltip_play"):"":ft("tooltip_live"),Yi=f(()=>Bi(n(gn),l())),Zo=f(()=>le.logoType==="vk_video"?ft("tooltip_vk_video_logo"):ft("tooltip_vk_logo")),ir=f(()=>n(Jn)?ft("tooltip_subtitles_on"):ft("tooltip_subtitles_off")),$r=f(()=>P()?ft("tooltip_fullscreen_on"):ft("tooltip_fullscreen_off")),_n=f(()=>p()===ub.CONNECTED?ft("tooltip_chromecast_on"):ft("tooltip_chromecast_off")),yr=f(()=>E()?ft("tooltip_autoplay_on"):ft("tooltip_autoplay_off")),ct=q(0),xt=li({}),ho=li({}),Ro=f(()=>Zt.prevButton),Jo=f(()=>Zt.replayButton),_o=f(()=>Zt.playButton),bo=f(()=>Zt.nextButton),Ii=f(()=>Zt.playPrevChapterButton),$o=f(()=>Zt.seekToInteractiveButton),Fr=f(()=>Zt.interactiveGraphButton),xr=f(()=>Zt.liveButton),$s=f(()=>Zt.time),Hi=f(()=>Zt.episodes),ys=f(()=>Zt.vkLogo),rs=f(()=>Zt.volume),wr=f(()=>Zt.subtitles),No=f(()=>Zt.settings),Ur=f(()=>Zt.context),en=f(()=>Zt.fullscreen),tn=f(()=>Zt.chromecast),Fe=f(()=>({prevButton:z()?z().right-z().left:0,replayButton:F()?F().right-F().left:0,playButton:U()?U().right-U().left:0,nextButton:X()?X().right-X().left:0,playPrevChapterButton:ae()?ae().right-ae().left:0,seekToInteractiveButton:Z()?Z().right-Z().left:0,interactiveGraphButton:re()?re().right-re().left:0,liveButton:J()?J().right-J().left:0,time:we()?we().right-we().left:0,episodes:me()?me().right-me().left:0,vkLogo:ee()?ee().right-ee().left:0,volume:_e()?_e().right-_e().left:0,subtitles:Ce()?Ce().right-Ce().left:0,settings:ge()?ge().right-ge().left:0,context:pe()?pe().right-pe().left:0,fullscreen:Ke()?Ke().right-Ke().left:0,chromecast:G()?G().right-G().left:0,additionalButtons:D().length?D().reduce(ut=>[...ut,40],[]):[]})),Ct=q(0);De(()=>{(!n(Ct)||n(Ct)<n(Fe).time)&&Tt(()=>N(Ct,n(Fe).time,!0))});let ui=q(!1);De(()=>{let ut=0;n(vn)&&(eo(u(),"xl")?ut=n(Fe).time:ut=60);let ot=n(Fe).prevButton+n(Fe).playButton+n(Fe).nextButton+n(Fe).seekToInteractiveButton+n(Fe).interactiveGraphButton+n(Fe).liveButton+n(Ct)+ut;N(ui,n(go)&&n(ct)>=ot,!0)});let Do=f(()=>n(ui)&&eo(u(),"m")),yo=pb(Wl,260),Oo=pb(Ju,260);De(()=>{qe(),K(),se(),yo(Di(),Zt,xt,e.showControls),Oo(Di(),Lt,ho,e.showControls)}),De(()=>{ho.bottom=At()});let Fi=de();De(()=>{xe(),Be()&&Tt(()=>Vl(Be(),xe(),hi))});let xo;De(()=>{et(),Tt(()=>Xu(W,et(),xo))});function Bn(){la({isAudioDisabled:ci,isAudioAvailable:ne(),isAds:Et(),audioIsNotExistHintCallback:Oe,audioDisabledHintCallback:ze})&&$e()}let Sr=Ti?Mn:Me,wo=f(()=>ce()!==null),oo=f(()=>n(wo)?ce():n(gr)),bn=f(()=>n(oo)?ft("tooltip_pause"):ft("tooltip_play")),Bo=ft("tooltip_episodes"),Hn=f(()=>{var ut,ot,ji,Io;return n(_r)?{id:"prevButton",type:"desktop-control-panel-left",weight:Hs.prevButton,buttonComponent:Wa,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:po.bind(null,!0)},tooltipEnabled:!((ot=(ut=Y.callbacks)==null?void 0:ut.uiInfo)!=null&&ot.onPrevButtonMouseEnter)&&!((Io=(ji=Y.callbacks)==null?void 0:ji.uiInfo)!=null&&Io.onPrevButtonMouseLeave),mouseEnter:()=>{var Xi,mi,zi;(zi=(mi=(Xi=Y.callbacks)==null?void 0:Xi.uiInfo)==null?void 0:mi.onPrevButtonMouseEnter)==null||zi.call(mi,jn(Di(),xt,"prevButton",e.showControls))},mouseLeave:()=>{var Xi,mi,zi;(zi=(mi=(Xi=Y.callbacks)==null?void 0:Xi.uiInfo)==null?void 0:mi.onPrevButtonMouseLeave)==null||zi.call(mi,jn(Di(),xt,"prevButton",e.showControls))},tooltipText:ft("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),zr=f(()=>n(ns)?{id:"replayButton",type:"desktop-control-panel-left",weight:Hs.replayButton,buttonComponent:Kl,buttonComponentProps:{disabled:n(mr),click:Sr},tooltipText:ft("tooltip_restart"),disabled:n(mr)}:void 0),Wr=f(()=>n(vo)?{id:"playButton",type:"desktop-control-panel-left",weight:Hs.playButton,buttonComponent:ql,buttonComponentProps:{disabled:n(fr),isPlaying:n(gr),click:Me},tooltipText:n(bn),disabled:n(fr)}:void 0),Fn=f(()=>{var ut,ot,ji,Io;return n(Oi)?{id:"nextButton",type:"desktop-control-panel-left",weight:Hs.nextButton,buttonComponent:Wa,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:io.bind(null,!0)},tooltipEnabled:!((ot=(ut=Y.callbacks)==null?void 0:ut.uiInfo)!=null&&ot.onNextButtonMouseEnter)&&!((Io=(ji=Y.callbacks)==null?void 0:ji.uiInfo)!=null&&Io.onNextButtonMouseLeave),mouseEnter:()=>{var Xi,mi,zi;(zi=(mi=(Xi=Y.callbacks)==null?void 0:Xi.uiInfo)==null?void 0:mi.onNextButtonMouseEnter)==null||zi.call(mi,jn(Di(),xt,"nextButton",e.showControls))},mouseLeave:()=>{var Xi,mi,zi;(zi=(mi=(Xi=Y.callbacks)==null?void 0:Xi.uiInfo)==null?void 0:mi.onNextButtonMouseLeave)==null||zi.call(mi,jn(Di(),xt,"nextButton",e.showControls))},tooltipText:ft("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Xe=f(()=>Ti&&n(On)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Hs.playPrevChapterButton,buttonComponent:tc,buttonComponentProps:{disabled:n(jo),click:e.playPrevChapter},tooltipText:ft("tooltip_interactive_go_back"),disabledTooltipContent:ft(Nr),disabled:n(jo)}:void 0),Yt=f(()=>Ti&&n(tr)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Hs.seekToInteractiveButton,buttonComponent:oc,buttonComponentProps:{disabled:n(mn),click:e.seekToInteractive},tooltipText:ft("tooltip_interactive_seek"),disabled:n(mn),disabledTooltipContent:ft(Re())}:void 0),_i=f(()=>Ti&&n(Dn)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Hs.interactiveGraphButton,buttonComponent:nc,buttonComponentProps:{disabled:n(fn),click:Dr.toggle,graphIsOpened:R()},tooltipText:n(hn)}:void 0),So=f(()=>n(Rn)?{id:"liveButton",type:"desktop-control-panel-left",weight:Hs.liveButton,buttonComponent:rc,buttonComponentProps:{isLiveActive:n(gn),ariaLabel:n(Yi)},tooltipText:n(Yi),disabled:n(gn)&&l()===Fm.PLAYING}:void 0),$n=f(()=>[n(Hn),n(zr),n(Wr),n(Fn),n(Xe),n(Yt),n(_i),n(So)].filter(ut=>!!ut).sort(Oa)),Un=f(()=>n(Nn)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Us.vkLogo,buttonComponent:qd,buttonComponentProps:{targetUrl:jt(),logoClickable:e.logoClickable,click:st},tooltipText:n(Zo),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),Ho=f(()=>n(Jt)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Us.autoplayNext,buttonComponent:ic,tooltipText:n(yr)}:void 0),or=f(()=>({id:"volume",type:"desktop-control-panel-right",weight:Us.volume,buttonComponent:cm,buttonComponentProps:{click:Bn,isAds:Et()}})),ss=f(()=>n(br)?{id:"subtitles",type:"desktop-control-panel-right",weight:Us.subtitles,buttonComponent:rm,buttonComponentProps:{isSubtitlesEnabled:n(Jn),click:$t},tooltipText:n(ir)}:void 0),Cr=f(()=>n(Hr)?{id:"settings",type:"desktop-control-panel-right",weight:Us.settings,buttonComponent:Ol,buttonComponentProps:{ref$:Fi},tooltipText:xe()?void 0:ft("tooltip_settings_off")}:void 0),xs=f(()=>le.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Us.context,buttonComponent:Tm,buttonComponentProps:{ariaLabel:ft("aria_label_context_menu")},className:n(Br)?"":"out-of-view",tooltipText:n(Xo)}:void 0),zs=f(()=>n(er)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Us.fullscreen,buttonComponent:Kd,buttonComponentProps:{isFullscreen:P(),click:e.toggleFullscreen},tooltipText:n($r)}:void 0),fa=f(()=>n(pt)?{id:"chromecast",type:"desktop-control-panel-right",weight:Us.chromecast,buttonComponent:Gd,buttonComponentProps:{state:p(),click:vr},tooltipText:n(_n)}:void 0),at=f(()=>[n(Un),n(Ho),n(or),n(ss),n(Cr),n(xs),n(zs),n(fa),...D()].filter(ut=>!!ut).sort(Oa)),si=Y.ui.previewTrackActive,Co=Y.ui.previewTrackDragInProgress,bi=Y.ui.previewTrackAvailable,yn=Y.ui.isPreviewTrackHorizontallyAligned,xn=f(()=>db({onPreviewTrackOpened:Y.actions.internal.previewTrackOpened,getTimelineRef:()=>xt.timeline,isHorizontal:Ae()})),ws=f(()=>n(xn).progressBarY),Ss=f(()=>n(xn).controlsY),Ui=f(()=>n(xn).onPointerDown),Ci=f(()=>n(xn).onPointerMove),he=f(()=>n(xn).onPointerUp),bt=f(()=>n(xn).calculatedHeight),ai=f(()=>n(xn).closePreviewTrack);De(()=>{se()?ri.set(!1):n(ai)()});let Qt;Mt(()=>()=>Qt&&clearTimeout(Qt));let To=ut=>{se()||!Ze()||(n(Ui)(ut),Qt=setTimeout(()=>{Y.actions.internal.previewTrackDragStarted()},200))},no=()=>{se()||n(he)(),Qt&&clearTimeout(Qt),Ee()&&Y.actions.internal.previewTrackDragFinished()},Fo=ut=>{n(Ci)(ut),!se()&&Ze()&&!se()&&ri.set(!0)},Cs=()=>{ri.set(!1)};var Kr=uw(),Tr=ue(Kr);let ma;var Ws=C(Tr);{var va=ut=>{let ot=f(()=>n(ws)()),ji=f(()=>n(bt)());Hm(ut,{get animatedOffsetY(){return n(ot)},get animatedPreviewTrackHeight(){return n(ji)},get canRewindLive(){return e.canRewindLive},get isAds(){return Et()},onTimelineMove:Fo,onTimelinePointerDown:To,onTimelinePointerUp:no,onTimelinePointerLeave:Cs,get previewTrackAvailable(){return Ze()},get timelineRef(){return xt.timeline},set timelineRef(Io){xt.timeline=Io}})};V(Ws,ut=>{e.showControls&&ut(va)})}var qr=k(Ws,2),wn=C(qr),tl=C(wn);gi(tl,17,()=>n($n),ut=>ut.id,(ut,ot)=>{Zu(ut,{get buttonComponent(){return n(ot).buttonComponent},get buttonComponentProps(){return n(ot).buttonComponentProps},get tooltipText(){return n(ot).tooltipText},get disabledTooltipContent(){return n(ot).disabledTooltipContent},get disabled(){return n(ot).disabled},get className(){return n(ot).className},get tooltipEnabled(){return n(ot).tooltipEnabled},get mouseEnter(){return n(ot).mouseEnter},get mouseLeave(){return n(ot).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return xt[n(ot).id]},set ref(ji){xt[n(ot).id]=ji}})});var ga=k(tl,2);{var Qr=ut=>{let ot=f(()=>!e.showControls),ji=f(()=>Et()?Te():He()),Io=f(()=>Et()?It():wt());zd(ut,{get isHidden(){return n(ot)},isMobile:!1,get showDuration(){return n(Do)},get position(){return n(ji)},get duration(){return n(Io)},get ref(){return xt.time},set ref(Xi){xt.time=Xi}})};V(ga,ut=>{n(go)&&ut(Qr)})}var il=k(ga,2);let Yl=f(()=>!n(vn));Ao(il,{className:"w-max",get disabled(){return n(Yl)},get tooltipContent(){return Bo},get tooltipVisible(){return e.showControls},get ref(){return xt.episodes},set ref(ut){xt.episodes=ut},children:(ut,ot)=>{var ji=Le(),Io=ue(ji);{var Xi=mi=>{Yd(mi,{get position(){return He()},get duration(){return wt()},get timeCodes(){return yi}})};V(Io,mi=>{n(vn)&&mi(Xi)})}b(ut,ji)},$$slots:{default:!0}}),S(wn);var ha=k(wn,2);gi(ha,21,()=>n(at),ut=>ut.id,(ut,ot)=>{var ji=Le(),Io=ue(ji);{var Xi=zi=>{Zu(zi,{get buttonComponent(){return n(ot).buttonComponent},get buttonComponentProps(){return n(ot).buttonComponentProps},get tooltipText(){return n(ot).tooltipText},get disabledTooltipContent(){return n(ot).disabledTooltipContent},get disabled(){return n(ot).disabled},get className(){return n(ot).className},get tooltipVisible(){return e.showControls},get ref(){return xt[n(ot).id]},set ref(Ks){xt[n(ot).id]=Ks}})},mi=zi=>{let Ks=f(()=>!!n(ot).disabled);km(zi,{get id(){return n(ot).id},get testId(){return n(ot).testId},get icon(){return n(ot).icon},get ariaLabel(){return n(ot).ariaLabel},get tooltipText(){return n(ot).tooltipText},get disabledTooltipContent(){return n(ot).disabledTooltipContent},get disabled(){return n(Ks)},get onClick(){return n(ot).onClick},get disableMouseupTooltipShow(){return n(ot).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return xt[n(ot).id]},set ref(Xl){xt[n(ot).id]=Xl}})};V(Io,zi=>{sb(n(ot))?zi(Xi):zi(mi,!1)})}b(ut,ji)}),S(ha),S(qr),Ye(qr,ut=>dt(ut),()=>dt()),S(Tr),Ye(Tr,ut=>At(ut),()=>At());var jl=k(Tr,2);{var ol=ut=>{Jd(ut,{get ref(){return xt.interactiveTimeIndicator},set ref(ot){xt.interactiveTimeIndicator=ot}})};V(jl,ut=>{Rr&&ut(ol)})}O((ut,ot)=>{ma=oe(Tr,1,"wrapper-bottom s-1b",null,ma,ut),We(qr,ot),qr.inert=se()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||Ee()}),()=>`transform: translateY(${n(Ss)()}px);`]),Pn(wn,"clientWidth",ut=>N(ct,ut)),b(t,Kr),H(),o()}import{ChromecastState as mb,PlaybackState as vb}from"@vkontakte/videoplayer-core/es2018";import{noop as fb}from"@vkontakte/videoplayer-shared/es2018";var fw=L('<div class="icon icon-error-stub s-24"><div class="inner s-24"></div></div>'),mw=L('<img class="icon s-24" aria-hidden="true"/>'),vw={hash:"s-24",code:".icon.s-24{height:24px!important;width:24px!important}.inner.s-24{background-color:var(--white);height:16px;width:16px}"};function zm(t,e){Q(t,vw);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,fb),r=f(()=>o()===fb),a=f(()=>n(r)||i()),l=q(!1),d=()=>{N(l,!0)},s=f(()=>n(r)?"btn-full-opacity":"");Ft(t,{get className(){return n(s)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(a)},get testId(){return e.testId},children:(u,m)=>{var p=Le(),v=ue(p);{var _=$=>{var x=fw();b($,x)},y=$=>{var x=mw();O(()=>Ve(x,"src",e.iconUrl)),lt("error",x,d),Aa(x),b($,x)};V(v,$=>{n(l)?$(_):$(y,!1)})}b(u,p)},$$slots:{default:!0}})}var gw=Ie('<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 Wm(t){je(t,{testId:"muted-icon",children:(e,i)=>{var o=gw();b(e,o)},$$slots:{default:!0}})}import{noop as hw}from"@vkontakte/videoplayer-shared/es2018";function ep(t,e){B(e,!0);let i=h(e,"muted",3,!1),o=h(e,"click",3,hw),r=h(e,"ref",15,void 0),l=be().ui.t,d=f(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),s=f(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");Ft(t,{get testId(){return n(s)},get click(){return o()},get ariaLabel(){return n(d)},role:"button",get ref(){return r()},set ref(u){r(u)},children:(u,m)=>{var p=Le(),v=ue(p);{var _=$=>{Wm($,{})},y=$=>{ca($,{get size(){return"24"}})};V(v,$=>{i()?$(_):$(y,!1)})}b(u,p)},$$slots:{default:!0}}),H()}var _w=Ie('<path d="M11.64 12.37 9.07 9.8h1.03a.9.9 0 1 0 0-1.8H6.9a.9.9 0 0 0-.9.9v3.2a.9.9 0 0 0 1.8 0v-1.02l2.53 2.52.13.14a.9.9 0 0 0 1.28-1.28z"></path>'),bw=Ie('<path d="m6.36 9.63 2.57 2.57H7.9a.9.9 0 1 0 0 1.8h3.2a.9.9 0 0 0 .9-.9V9.9a.9.9 0 0 0-1.8 0v1.02L7.67 8.4l-.13-.14a.9.9 0 0 0-1.28 1.28z"></path>'),$w=Ie('<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 Km(t,e){let i=h(e,"isActive",3,!1),o=f(()=>i()?"pip-icon--active":"pip-icon");je(t,{get testId(){return n(o)},children:(r,a)=>{var l=$w(),d=k(ue(l));{var s=m=>{var p=_w();b(m,p)},u=m=>{var p=bw();b(m,p)};V(d,m=>{i()?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}})}import{noop as yw}from"@vkontakte/videoplayer-shared/es2018";function qm(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isPictureInPictureActive",3,!1),r=h(e,"click",3,yw),a=j("menu_pip");Ft(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return r()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{Km(l,{get isActive(){return o()}})},$$slots:{default:!0}}),H()}import{debounceFn as gb}from"@vkontakte/videoplayer-shared/es2018";var xw=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},ww=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},Sw=L("<div><!></div>"),Cw=L("<div><!></div>"),Tw=L("<div><!></div>"),Iw=L("<!> <!> <!>",1),Ew=L("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),Pw=L('<div class="wrapper-middle s-19"><!></div>'),kw=L("<div><!></div> <!> <div><!></div>",1),Aw=L('<div aria-hidden="true">·</div> <!>',1),Lw=L('<!> <!> <div><div><div class="controls mobile s-19" data-testid="bottom-controls"><div class="controls-group contain s-19"><!> <!> <!> <!></div> <div class="controls-group s-19"><!> <!> <!></div></div> <!></div></div> <!>',1),Mw={hash:"s-19",code:".wrapper-bottom.s-19{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-19>:where(.s-19){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-19{height:9px;padding:0 4px 4px}.wrapper-middle.s-19{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-19,.wrapper-top-right.s-19{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-19{right:8px;top:4px}.wrapper-top-left.s-19{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-19,.wrapper-middle-left-second.s-19,.wrapper-middle-right.s-19{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-19{left:12px}.wrapper-middle-left-second.s-19{left:64px}.wrapper-middle-right.s-19{right:12px}.controls.s-19{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-19,.controls-group.s-19{display:flex}.controls-group.contain.s-19{min-width:0}.controls-group.s-19 >:not(:first-child){margin-left:8px}.hidden.s-19{opacity:0;visibility:hidden}.controls-hidden.s-19{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-19{transition:none}.overlay-mobile.s-19{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-19,.wrapper-top-right.fullscreen.s-19{top:16px}.controls-wrapper.fullscreen.s-19{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-19{left:44px;top:12px}.wrapper-top-right.fullscreen.s-19{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-19{left:44px}.wrapper-middle-left-second.fullscreen.s-19{left:96px}.wrapper-middle-right.fullscreen.s-19{right:44px}.controls-wrapper.fullscreen.s-19{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function Qm(t,e){var en,tn;B(e,!0),Q(t,Mw);let[i,o]=Ne(),r=()=>w(Pi,"$seekToInteractiveDisabledTooltip$",i),a=()=>w(Zt,"$disabledControls$",i),l=()=>w(Pt,"$playbackState$",i),d=()=>w(Yo,"$adPlaybackState",i),s=()=>w(Y,"$isEnded$",i),u=()=>w(vt,"$playerSize",i),m=()=>w($t,"$scrubbingInProgress",i),p=()=>w(Ri,"$chromecastState$",i),v=()=>w(Oe,"$isPictureInPictureActive",i),_=()=>w(ze,"$pictureInPictureType$",i),y=()=>w(fe,"$mobileNotReportControlHidden$",i),$=()=>w(pi,"$chromecastHidden",i),x=()=>w(dt,"$playerPhase",i),I=()=>w(Rt,"$pipHidden",i),T=()=>w(rt,"$currentGridType$",i),R=()=>w(ci,"$vkLogoHidden",i),A=()=>w(ni,"$volumeHidden",i),P=()=>w(Pe,"$isLive$",i),E=()=>w(yt,"$settingsMenuVisible",i),z=()=>w(st,"$isRewindableLive$",i),F=()=>w(Me,"$isActiveLive$",i),U=()=>w(Dt,"$isAudioAvailable$",i),X=()=>w($e,"$muted$",i),ae=()=>w(le,"$volume$",i),Z=()=>w(ft,"$isInteractiveTime$",i),re=()=>w(tr,"$settingButtonRef$",i),J=()=>w(yi,"$startedByKeyboard$",i),we=()=>w(Lo,"$isFullscreen",i),me=()=>w(Ot,"$additionalButtons$",i),ee=()=>w(Vi,"$autoplayNextToggleHidden",i),_e=()=>w(hi,"$crashed$",i),Ce=()=>w(uo,"$settingsHidden",i),ge=()=>w(cn,"$graphIsOpened$",i),pe=()=>w(Si,"$adPosition",i),Ke=()=>w(it,"$adDuration",i),G=()=>w(jt,"$position$",i),D=()=>w(Et,"$duration$",i),qe=h(e,"playerControlsWrapperRef",15,void 0),K=h(e,"playerControlsRef",15,void 0),se=h(e,"isAds",3,!1),xe=h(e,"logoTargetUrl",3,""),Be=h(e,"isOneVideoPlaylist",3,!1),et=h(e,"customFullscreenSupported",3,!0),ne=be(),ce=mo(),Re=Vt(),Ae=ne.actions.internal.toggleMuted,Ze=ne.actions.internal.togglePlay,Ee=ne.actions.internal.pause,Te=ne.actions.internal.prevVideoClick,He=ne.actions.internal.nextVideoClick,It=ne.actions.internal.checkFullscreenSupport,wt=(en=ne.callbacks)==null?void 0:en.onAudioDoesNotExistHint,At=(tn=ne.callbacks)==null?void 0:tn.onAudioDisabledHint,dt=ne.playerPhase,Et=ne.state.duration$,jt=ne.state.positionWithScrubbing$,Pt=ne.state.playbackState$,Dt=ne.state.isAudioAvailable$,Ut=ne.state.isAudioDisabled,Y=ne.state.isEnded$,Pe=ne.state.isLive$,le=ne.state.volume$,$e=ne.state.muted$,Me=ne.state.isActiveLive$,st=ne.state.isRewindableLive$,$t=ne.ui.scrubbingInProgress,fe=ne.ui.mobileNotReportControlHidden$,{isActive$:Oe,type$:ze}=ce.pictureInPicture$,yt=ne.ui.settingsMenu.visible$,qt=ne.ui.settingsMenu.openedByBtnKeyboard$,St=ne.ui.controls,{volume:ni,vkLogo:ci,autoplayNextToggle:Vi,pip:Rt,settings:uo,chromecast:pi}=ne.ui.hiddenControls,tt=ne.actions.internal.getVideoEpisodes(),Gt=ne.webApi.pictureInPictureApi,Ri=ne.state.chromecastState$,hi=ne.state.crashed$,Zt=St.disabledControls$,yi=ne.ui.startedByKeyboard$,rt=ne.ui.currentGridType$,it=ne.ads.duration,Si=ne.ads.position,Yo=ne.ads.playbackState,Lo=ne.ui.isFullscreen,vt=ne.ui.playerSize,Ot=ne.ui.additionalButtonsDeprecated$,W=ne.actions.internal.getVideoElement,Lt=ne.actions.internal.replayInteractive,ri=ne.state.isInteractive,ft=ne.state.isInteractiveTime$,Xt=ne.state.showInteractiveGraph,_t=ne.state.showSeekToInteractive,nt=ne.state.showPlayPrevChapter,Ni=ne.state.showInteractiveTimeIndicator,Pi=ce.seekToInteractiveDisabledTooltip$,cn=ce.graphIsOpened$,un=ne.ui.controlBlocks,ki=f(()=>j(ne.state.playPrevChapterDisabledTooltip)),Di=f(()=>j(r())),Mn=f(()=>a().has("EPISODE_BUTTON")),po=f(()=>a().has("GRAPH_BUTTON")),io=f(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),Ti=f(()=>a().has("PLAY_BUTTON")),Mo=f(()=>a().has("REPLAY_BUTTON")),Vo=f(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),pn=f(()=>l()===vb.PLAYING),Vr=f(()=>d()==="paused"),Rr=f(()=>s()&&!se()&&!ri),Nr=f(()=>!s()||se()),bs=f(()=>e.showNextPrevButtons&&!se()&&e.prevButtonActive),Dr=f(()=>e.showNextPrevButtons&&!se()&&e.nextButtonActive),Zn=f(()=>u().width>300),Or=f(()=>u().width>400),fn=f(m),mn=f(()=>p()!==mb.NOT_AVAILABLE&&!(v()&&_()===1)&&!y()&&!ri&&!$()),fr=f(()=>x()==="LiveWaitingStart"),mr=f(()=>!!Gt&&p()!==mb.CONNECTED&&!y()&&(_()===1&&n(fr)||!n(fr))&&!n(fn)&&!ri&&!I()),jo=q(!1);Mt(()=>{let Fe=Gt==null?void 0:Gt.info.isActive$.subscribe(Ct=>N(jo,Ct,!0));return()=>Fe==null?void 0:Fe.unsubscribe()});let vr=f(()=>!n(fn)&&eo(T(),"s")),gr=f(()=>!e.logoHidden&&u().width>350&&!R()),Jn=f(()=>Re.features.fullscreen&&It()&&!(v()&&_()===1)&&(ri?et():!0)&&!n(fn)&&!n(jo)),Vn=f(()=>!A()&&!n(fn)),ns=f(()=>(!P()||se())&&u().width>260&&!n(fn)&&!(Re.features.interactiveHideTime&&ri)),vo=f(()=>E()||e.showControls),hr=f(()=>!se()&&!P()&&!!(tt!=null&&tt.length)&&n(Zn)&&!n(Mn)&&!n(fn)),Oi=f(()=>!z()||!!F()),_r=f(()=>Xt&&eo(T(),"m")),Rn=f(()=>!U()||X()||ae()===0),pt=li({}),Jt=li({}),br=gb(Wl,260),Br=gb(Ju,260);De(()=>{u(),Z(),br(W(),St,pt,e.showControls),Br(W(),un,Jt,e.showControls)});let Hr=()=>ne.actions.internal.toggleChromecast();async function Nn(){Gt!=null&&Gt.isActive()?await(Gt==null?void 0:Gt.exit()):await(Gt==null?void 0:Gt.request())}function er(){la({isAudioDisabled:Ut,audioDisabledHintCallback:At,isAudioAvailable:U(),audioIsNotExistHintCallback:wt,isAds:se()})&&Ae()}let go=q(""),Dn=(Fe,Ct)=>{if(!Fe){N(go,j("tooltip_live"),!0);return}Ct&&Ct===vb.PAUSED&&N(go,j("tooltip_play"),!0)};De(()=>{Dn(n(Oi),l())});let tr=de();De(()=>{re()&&Vl(re(),E(),qt)}),De(()=>{Xu(yi,J(),pt.playButton)});var On=Lw(),vn=ue(On);{var gn=Fe=>{var Ct=Ew(),ui=ue(Ct);let Do;var yo=k(ui,2);let Oo;Ye(yo,at=>Jt.topLeft=at,()=>Jt==null?void 0:Jt.topLeft);var Fi=k(yo,2);let xo;var Bn=C(Fi);gi(Bn,1,me,({iconUrl:at,ariaLabel:si,testId:Co,onClick:bi,tooltip:yn})=>at,(at,si)=>{let Co=()=>n(si).iconUrl,bi=()=>n(si).ariaLabel,yn=()=>n(si).testId,xn=()=>n(si).onClick,ws=()=>n(si).tooltip,Ss=f(()=>{var Ui;return(Ui=bi())!=null?Ui:ws()});zm(at,{get iconUrl(){return Co()},get ariaLabel(){return n(Ss)},get testId(){return yn()},get onClick(){return xn()}})});var Sr=k(Bn,2);{var wo=at=>{ic(at,{get ref(){return pt.autoplayNextToggle},set ref(si){pt.autoplayNextToggle=si}})};V(Sr,at=>{e.showAutoplayNext&&!Be()&&!ee()&&at(wo)})}var oo=k(Sr,2);{var bn=at=>{Gd(at,{isMobile:!0,click:Hr,get state(){return p()},get ref(){return pt.chromecast},set ref(si){pt.chromecast=si}})};V(oo,at=>{n(mn)&&at(bn)})}var Bo=k(oo,2);{var Hn=at=>{qm(at,{click:Nn,get isPictureInPictureActive(){return v()},get ref(){return pt.pip},set ref(si){pt.pip=si}})};V(Bo,at=>{n(mr)&&at(Hn)})}var zr=k(Bo,2);{var Wr=at=>{Ol(at,{get ref$(){return tr}})};V(zr,at=>{_e()&&!Ce()&&at(Wr)})}var Fn=k(zr,2);{var Xe=at=>{qd(at,{get click(){return Ee},get targetUrl(){return xe()},get logoClickable(){return e.logoClickable},get ref(){return pt.vkLogo},set ref(si){pt.vkLogo=si}})};V(Fn,at=>{n(gr)&&at(Xe)})}S(Fi),Ye(Fi,at=>Jt.topRight=at,()=>Jt==null?void 0:Jt.topRight);var Yt=k(Fi,2);let _i;var So=C(Yt);{var $n=at=>{let si=f(()=>Te.bind(null,!0));Wa(at,{get click(){return n(si)},type:"prev",isMobile:!0,get ref(){return pt.prevButton},set ref(Co){pt.prevButton=Co}})};V(So,at=>{n(bs)&&at($n)})}var Un=k(So,2);{var Ho=at=>{ql(at,{get disabled(){return n(Ti)},get click(){return Ze},isMobile:!0,get isPlaying(){return n(pn)},get ref(){return pt.playButton},set ref(si){pt.playButton=si}})};V(Un,at=>{n(Nr)&&at(Ho)})}var or=k(Un,2);{var ss=at=>{Kl(at,{get disabled(){return n(Mo)},get click(){return Ze},isMobile:!0,get ref(){return pt.replayButton},set ref(si){pt.replayButton=si}})};V(or,at=>{n(Rr)&&at(ss)})}var Cr=k(or,2);{var xs=at=>{let si=f(()=>He.bind(null,!0));Wa(at,{get click(){return n(si)},type:"next",isMobile:!0,get ref(){return pt.nextButton},set ref(Co){pt.nextButton=Co}})};V(Cr,at=>{n(Dr)&&at(xs)})}S(Yt),Ye(Yt,at=>Jt.middle=at,()=>Jt==null?void 0:Jt.middle);var zs=k(Yt,2);{var fa=at=>{var si=Iw(),Co=ue(si);{var bi=Ui=>{var Ci=Sw();let he;Ci.__click=[xw,Vo,e,ki];var bt=C(Ci);let ai=f(()=>!e.showControls);tc(bt,{get hidden(){return n(ai)},get disabled(){return n(Vo)},get click(){return e.playPrevChapter},get ref(){return pt.playPrevChapterButton},set ref(Qt){pt.playPrevChapterButton=Qt}}),S(Ci),O(Qt=>he=oe(Ci,1,"wrapper-middle-left s-19",null,he,Qt),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(Ui,Ci)};V(Co,Ui=>{nt&&Ui(bi)})}var yn=k(Co,2);{var xn=Ui=>{var Ci=Cw();let he;var bt=C(Ci);let ai=f(()=>!e.showControls&&!ge());nc(bt,{get hidden(){return n(ai)},get disabled(){return n(po)},get click(){return cn.toggle},get graphIsOpened(){return ge()},get ref(){return pt.interactiveGraphButton},set ref(Qt){pt.interactiveGraphButton=Qt}}),S(Ci),O(Qt=>he=oe(Ci,1,$d(nt?"wrapper-middle-left-second":"wrapper-middle-left"),"s-19",he,Qt),[()=>({fullscreen:we(),hidden:!e.showControls&&!ge()})]),b(Ui,Ci)};V(yn,Ui=>{n(_r)&&Ui(xn)})}var ws=k(yn,2);{var Ss=Ui=>{var Ci=Tw();let he;Ci.__click=[ww,io,e,Di];var bt=C(Ci);let ai=f(()=>!e.showControls);oc(bt,{get hidden(){return n(ai)},get disabled(){return n(io)},get click(){return e.seekToInteractive},get ref(){return pt.seekToInteractiveButton},set ref(Qt){pt.seekToInteractiveButton=Qt}}),S(Ci),O(Qt=>he=oe(Ci,1,"wrapper-middle-right s-19",null,he,Qt),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(Ui,Ci)};V(ws,Ui=>{_t&&Ui(Ss)})}b(at,si)};V(zs,at=>{ri&&!m()&&at(fa)})}O((at,si,Co,bi)=>{Do=oe(ui,1,"overlay-mobile s-19",null,Do,at),Oo=oe(yo,1,"wrapper-top-left s-19",null,Oo,si),xo=oe(Fi,1,"wrapper-top-right s-19",null,xo,Co),_i=oe(Yt,1,"wrapper-middle s-19",null,_i,bi)},[()=>({hidden:!n(vo)}),()=>({hidden:!e.showControls,fullscreen:we()}),()=>({hidden:!e.showControls&&!y(),fullscreen:we()}),()=>({hidden:!e.showControls||m()||e.endScreenShown&&e.showNextPrevButtons})]),b(Fe,Ct)};V(vn,Fe=>{se()||Fe(gn)})}var hn=k(vn,2);{var Xo=Fe=>{var Ct=kw(),ui=ue(Ct);let Do;var yo=C(ui);ep(yo,{get muted(){return X()},click:er,get ref(){return pt.volume},set ref(wo){pt.volume=wo}}),S(ui);var Oo=k(ui,2);{var Fi=wo=>{var oo=Pw(),bn=C(oo);let Bo=f(()=>!n(Vr));ql(bn,{get disabled(){return n(Ti)},get click(){return Ze},isMobile:!0,get isPlaying(){return n(Bo)},get ref(){return pt.playButton},set ref(Hn){pt.playButton=Hn}}),S(oo),b(wo,oo)};V(Oo,wo=>{n(Vr)&&wo(Fi)})}var xo=k(Oo,2);let Bn;var Sr=C(xo);sc(Sr,{get position(){return pe()},get duration(){return Ke()}}),S(xo),O((wo,oo)=>{Do=oe(ui,1,"wrapper-top-right s-19",null,Do,wo),Bn=oe(xo,1,"wrapper-bottom ads-timeline-mobile s-19",null,Bn,oo)},[()=>({fullscreen:we()}),()=>({fullscreen:we()})]),b(Fe,Ct)};V(hn,Fe=>{se()&&d()!=="inactive"&&Fe(Xo)})}var Bi=k(hn,2);let Yi;var Zo=C(Bi);let ir;var $r=C(Zo),_n=C($r),yr=C(_n);{var ct=Fe=>{Ao(Fe,{get disabled(){return n(Mo)},get ref(){return pt.replayButton},set ref(Ct){pt.replayButton=Ct},children:(Ct,ui)=>{Kl(Ct,{get disabled(){return n(Mo)},get click(){return Lt}})},$$slots:{default:!0}})};V(yr,Fe=>{ri&&Fe(ct)})}var xt=k(yr,2);{var ho=Fe=>{Ao(Fe,{get ref(){return pt.liveButton},set ref(Ct){pt.liveButton=Ct},children:(Ct,ui)=>{rc(Ct,{get isLiveActive(){return n(Oi)},isMobile:!0,get ariaLabel(){return n(go)}})},$$slots:{default:!0}})};V(xt,Fe=>{!se()&&P()&&Fe(ho)})}var Ro=k(xt,2);{var Jo=Fe=>{let Ct=f(()=>se()?pe():G()),ui=f(()=>se()?Ke():D()),Do=f(()=>!e.showControls);zd(Fe,{get showDuration(){return n(Or)},get position(){return n(Ct)},get duration(){return n(ui)},isMobile:!0,get isHidden(){return n(Do)},get ref(){return pt.time},set ref(yo){pt.time=yo}})};V(Ro,Fe=>{n(ns)&&Fe(Jo)})}var _o=k(Ro,2);let bo=f(()=>!n(hr));Ao(_o,{className:"w-max",get disabled(){return n(bo)},get ref(){return pt.episodes},set ref(Fe){pt.episodes=Fe},children:(Fe,Ct)=>{var ui=Le(),Do=ue(ui);{var yo=Oo=>{var Fi=Aw(),xo=k(ue(Fi),2);Yd(xo,{get position(){return G()},get duration(){return D()},get timeCodes(){return tt}}),b(Oo,Fi)};V(Do,Oo=>{n(hr)&&Oo(yo)})}b(Fe,ui)},$$slots:{default:!0}}),S(_n),Ye(_n,Fe=>Jt.bottomLeft=Fe,()=>Jt==null?void 0:Jt.bottomLeft);var Ii=k(_n,2),$o=C(Ii);{var Fr=Fe=>{Ao(Fe,{get ref(){return pt.volume},set ref(Ct){pt.volume=Ct},children:(Ct,ui)=>{ep(Ct,{get muted(){return n(Rn)},click:er})},$$slots:{default:!0}})};V($o,Fe=>{n(Vn)&&Fe(Fr)})}var xr=k($o,2);{var $s=Fe=>{Ao(Fe,{get ref(){return pt.settings},set ref(Ct){pt.settings=Ct},children:(Ct,ui)=>{Ol(Ct,{get ref$(){return tr}})},$$slots:{default:!0}})};V(xr,Fe=>{n(vr)&&Fe($s)})}var Hi=k(xr,2);{var ys=Fe=>{Ao(Fe,{get ref(){return pt.fullscreen},set ref(Ct){pt.fullscreen=Ct},children:(Ct,ui)=>{Kd(Ct,{get click(){return e.toggleFullscreen},get isFullscreen(){return we()}})},$$slots:{default:!0}})};V(Hi,Fe=>{n(Jn)&&Fe(ys)})}S(Ii),Ye(Ii,Fe=>Jt.bottomRight=Fe,()=>Jt==null?void 0:Jt.bottomRight),S($r),Ye($r,Fe=>K(Fe),()=>K());var rs=k($r,2);let wr=f(()=>!e.showControls);qa(rs,{get isHidden(){return n(wr)},get isAds(){return se()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return z()},get ref(){return pt.timeline},set ref(Fe){pt.timeline=Fe}}),S(Zo),Ye(Zo,Fe=>Jt.bottom=Fe,()=>Jt==null?void 0:Jt.bottom),S(Bi),Ye(Bi,Fe=>qe(Fe),()=>qe());var No=k(Bi,2);{var Ur=Fe=>{Jd(Fe,{get ref(){return pt.interactiveTimeIndicator},set ref(Ct){pt.interactiveTimeIndicator=Ct}})};V(No,Fe=>{Ni&&Fe(Ur)})}O((Fe,Ct)=>{Yi=oe(Bi,1,"wrapper-bottom mobile s-19",null,Yi,Fe),ir=oe(Zo,1,"controls-wrapper s-19",null,ir,Ct)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:we()})]),b(t,On),H(),o()}Qe(["click"]);function ac(t,e){B(e,!0);let[i,o]=Ne(),r=()=>w(I,"$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,""),m=h(e,"showAutoplayNext",3,!1),p=h(e,"isOneVideoPlaylist",3,!1),v=h(e,"customFullscreenSupported",3,!0),_=h(e,"endScreenShown",3,!1),y=h(e,"onDisabledPlayPrevChapterClick",3,hb),$=h(e,"onDisabledSeekToInteractiveClick",3,hb),I=be().ui.isMobile,T=q(!1);Mt(()=>{let E=setTimeout(()=>N(T,!0),0);return()=>clearTimeout(E)});var R=Le(),A=ue(R);{var P=E=>{var z=Le(),F=ue(z);{var U=ae=>{Qm(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 p()},get customFullscreenSupported(){return v()},get endScreenShown(){return _()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return y()},get onDisabledSeekToInteractiveClick(){return $()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(Z){l(Z)},get playerControlsRef(){return d()},set playerControlsRef(Z){d(Z)}})},X=ae=>{Um(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 p()},get showAutoplayNext(){return m()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return v()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(Z){l(Z)},get playerControlsRef(){return d()},set playerControlsRef(Z){d(Z)}})};V(F,ae=>{r()?ae(U):ae(X,!1)})}b(E,z)};V(A,E=>{n(T)&&E(P)})}b(t,R),H(),o()}var Vw=Ie('<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 lc(t,e){B(e,!0);let i=f(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=f(()=>`${an(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=Vw();b(r,l)},$$slots:{default:!0}}),H()}var Rw=Ie('<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 Gm(t,e){B(e,!0);let i=h(e,"reversed",3,!1),o=f(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),r=f(()=>`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=Rw();b(a,d)},$$slots:{default:!0}}),H()}var Nw=L('<span class="hot-key-helpers-text s-13"> </span>'),Dw=L('<div data-testid="hotkey-helper-icon" class="s-13"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),Ow=L("<div><!></div>"),Bw={hash:"s-13",code:'.hot-key-helpers-container.s-13{align-items:center;animation:s-13-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-13{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-13{left:calc(75% - 100px)}.hot-key-helpers-text.s-13{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-13{animation:s-13-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-13-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-13-fadeOut{0%{opacity:1}to{opacity:0}}'};function Ym(t,e){B(e,!0),Q(t,Bw);let[i,o]=Ne(),r=()=>w(e.data,"$data",i),a=be(),{features:l}=Vt(),d=a.ui.t,s=f(()=>!r()),u=f(()=>{var I;return((I=r())==null?void 0:I.type)==="BACKWARD_SEEK"}),m=f(()=>{var I;return((I=r())==null?void 0:I.type)==="FORWARD_SEEK"}),p=f(()=>{var I;return(I=r())==null?void 0:I.type}),v=f(()=>{var I,T;return(I=r())!=null&&I.t?d(r().t.key,{value:r().t.value||""}):(T=r())==null?void 0:T.text});var _=Ow();let y;var $=C(_);{var x=I=>{var T=Dw(),R=ue(T),A=C(R);{var P=K=>{let se=f(()=>n(p)==="BACKWARD_SEEK");Gm(K,{get reversed(){return n(se)},shadow:!0})};V(A,K=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&K(P)})}var E=k(A,2);{var z=K=>{Fs(K,{get size(){return"48"},shadow:!0})};V(E,K=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&K(z)})}var F=k(E,2);{var U=K=>{An(K,{get size(){return"48"},shadow:!0})};V(F,K=>{n(p)==="PLAY"&&!l.playbackStatusShow&&K(U)})}var X=k(F,2);{var ae=K=>{ec(K,{get size(){return"48"},shadow:!0})};V(X,K=>{n(p)==="REPLAY"&&!l.playbackStatusShow&&K(ae)})}var Z=k(X,2);{var re=K=>{da(K,{get size(){return"48"},type:"off",shadow:!0})};V(Z,K=>{n(p)==="SUBTITLES_OFF"&&K(re)})}var J=k(Z,2);{var we=K=>{da(K,{get size(){return"48"},shadow:!0})};V(J,K=>{n(p)==="SUBTITLES_ON"&&K(we)})}var me=k(J,2);{var ee=K=>{let se=f(()=>n(p)==="RATE_DOWN");lc(K,{get size(){return"48"},get reversed(){return n(se)},testId:"rate-change-icon",shadow:!0})};V(me,K=>{["RATE_DOWN","RATE_UP"].includes(n(p))&&K(ee)})}var _e=k(me,2);{var Ce=K=>{let se=f(()=>n(p)==="EPISODE_PREV");ua(K,{get size(){return"48"},get reversed(){return n(se)},shadow:!0})};V(_e,K=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(p))&&K(Ce)})}var ge=k(_e,2);{var pe=K=>{ca(K,{get size(){return"48"},volume:0,shadow:!0})};V(ge,K=>{n(p)==="MUTE"&&K(pe)})}var Ke=k(ge,2);{var G=K=>{ca(K,{get size(){return"48"},volume:1,shadow:!0})};V(Ke,K=>{n(p)==="VOLUME"&&K(G)})}S(R);var D=k(R,2);{var qe=K=>{var se=Nw(),xe=C(se,!0);S(se),O(()=>ve(xe,n(v))),b(K,se)};V(D,K=>{n(v)&&K(qe)})}O(()=>Ve(R,"data-type",n(p))),b(I,T)};V($,I=>{!n(s)&&n(p)&&I(x)})}S(_),O(I=>y=oe(_,1,"hot-key-helpers-container s-13",null,y,I),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(m)})]),b(t,_),H(),o()}var Hw=(t,e,i,o,r,a)=>{if(e.has(t.code))switch(t.preventDefault(),t.stopPropagation(),t.code){case"ArrowUp":i();break;case"ArrowDown":o();break;case"ArrowLeft":r();break;case"ArrowRight":a();break}},Fw=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},Uw=L('<div tabindex="0" role="button"><div class="button-block s-m" aria-hidden="true"><div class="button-row s-m"><div class="button button-up s-m"><!></div> <div class="button button-right s-m"><!></div></div> <div class="button-row s-m"><div class="button button-left s-m"><!></div> <div class="button button-down s-m"><!></div></div></div></div>'),zw={hash:"s-m",code:".immersive-controls.s-m{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-m{left:20px;top:50px}.button-block.s-m{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-m{display:flex;flex-direction:row;position:relative}.button.s-m{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-m svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-m svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-m svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-m svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-m svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-m:hover svg{opacity:1}"};function dc(t,e){B(e,!0),Q(t,zw);let i=h(e,"isShifted",3,!1),o=be(),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=j("aria_label_spherical_control");var p=Uw();let v;p.__keydown=[Hw,r,a,l,s,d],p.__keyup=[Fw,r,u];var _=C(p),y=C(_),$=C(y);$.__mousedown=a,$.__mouseup=u;var x=C($);Lr(x,{direction:"up",useBtnColor:!0}),S($);var I=k($,2);I.__mousedown=d,I.__mouseup=u;var T=C(I);Lr(T,{direction:"up",useBtnColor:!0}),S(I),S(y);var R=k(y,2),A=C(R);A.__mousedown=s,A.__mouseup=u;var P=C(A);Lr(P,{direction:"up",useBtnColor:!0}),S(A);var E=k(A,2);E.__mousedown=l,E.__mouseup=u;var z=C(E);Lr(z,{direction:"up",useBtnColor:!0}),S(E),S(R),S(_),S(p),O(F=>{v=oe(p,1,"immersive-controls s-m",null,v,F),Ve(p,"aria-label",m)},[()=>({"m-shifted":i()})]),lt("mouseleave",$,u),lt("mouseleave",I,u),lt("mouseleave",A,u),lt("mouseleave",E,u),b(t,p),H()}Qe(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as bb,Subscription as Ww,filterChanged as Kw,filter as qw}from"@vkontakte/videoplayer-shared/es2018";var _b=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var tp=class{constructor(){this.flickeringTimeout=_b(1e3);this.subscriptions=new Ww;this.isAuto=!1;this.isLive=!1;this.captions$=new bb([]);this.captionsPrepared$=new bb([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(qw(()=>this.isEnabled()),Kw()).subscribe(e=>{this.processCaptions(e)})),this}setIsAuto(e){this.isAuto=e}setIsLive(e){this.isLive=e}setCaptions(e){this.captions$.next(e)}destroy(){this.subscriptions.unsubscribe(),this.flickeringTimeout.clear()}isEnabled(){return this.isAuto&&!this.isLive}processCaptions(e){if(!e.length){this.flickeringTimeout.add(()=>{this.captionsPrepared$.next([])});return}this.flickeringTimeout.clear();let i=[],o=e.length>1&&e[0].type!=="timestamp"&&e[1].type!=="timestamp";o&&i.push([{value:String(e[0].value),timeAppeared:null}]),i.push(e.reduce((r,{type:a,value:l},d)=>(o&&!d||(a==="timestamp"?r.push({timeAppeared:Number(l),value:""}):r.length===0?r.push({value:String(l)}):r[r.length-1].value=String(l)),r),[])),this.captionsPrepared$.next(i)}};var Qw=L('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),Gw=L('<span class="caption-line s-a"><span class="caption-segment s-a"></span></span>'),Yw=L('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),jw=L('<div><span class="caption s-a"><!></span></div>'),Xw=L("<div><!></div>"),Zw={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 Ga(t,e){B(e,!0),Q(t,Zw);let[i,o]=Ne(),r=()=>w(v,"$currentSubtitle$",i),a=()=>w(y,"$isLive$",i),l=()=>w($,"$isFullscreen",i),d=()=>w(x,"$previewTrackActive",i),s=()=>w(_,"$isAutoSubtitleCaptionVisible$",i),u=h(e,"isMobile",3,!1),m=be(),p=Vt(),v=m.state.currentSubtitle$,_=m.state.isAutoSubtitleCaptionVisible$,y=m.state.isLive$,$=m.ui.isFullscreen,x=m.ui.previewTrackActive,I=f(()=>!!r().isAuto),T=f(()=>!!a()),R=f(()=>e.playerSize.width*.02),A=f(()=>u()&&!l()||n(R)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(R)),P=q(null);De(()=>{var Z,re,J;(Z=n(P))==null||Z.setIsAuto(n(I)),(re=n(P))==null||re.setIsLive(n(T)),(J=n(P))==null||J.setCaptions(e.captions)});let E=q(li([[]]));Mt(()=>{N(P,new tp().subscribe(),!0);let Z=n(P).captionsPrepared$.subscribe(re=>{N(E,re,!0)});return()=>{var re;(re=n(P))==null||re.destroy(),Z.unsubscribe()}}),Mt(()=>{if(n(I)){let Z=window.setTimeout(()=>{_.set(!1)},p.autoSubtitlesTimeout);return()=>{window.clearTimeout(Z)}}else _.set(!1)});let z=f(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var F=Xw();let U;var X=C(F);{var ae=Z=>{var re=jw();let J;var we=C(re),me=C(we);{var ee=Ce=>{var ge=Qw(),pe=C(ge),Ke=C(pe,!0);S(pe),S(ge),O(G=>{var D;We(pe,`font-size: ${(D=n(A))!=null?D:""}px`),ve(Ke,G)},[()=>j("subtitles_auto_caption")]),b(Ce,ge)},_e=(Ce,ge)=>{{var pe=G=>{var D=Le(),qe=ue(D);gi(qe,17,()=>n(E),_d,(K,se)=>{var xe=Gw(),Be=C(xe);gi(Be,21,()=>n(se),({value:et,timeAppeared:ne})=>ne,(et,ne)=>{let ce=()=>n(ne).value,Re=()=>n(ne).timeAppeared;var Ae=Le(),Ze=ue(Ae);{var Ee=Te=>{var He=ps();O(()=>ve(He,ce())),b(Te,He)};V(Ze,Te=>{(!Re()||Re()<=e.position)&&Te(Ee)})}b(et,Ae)}),S(Be),S(xe),O(()=>{var et;return We(Be,`font-size: ${(et=n(A))!=null?et:""}px`)}),b(K,xe)}),b(G,D)},Ke=G=>{var D=Le(),qe=ue(D);gi(qe,17,()=>e.captions,({value:K})=>K,(K,se)=>{let xe=()=>n(se).value;var Be=Yw(),et=C(Be),ne=C(et,!0);S(et),S(Be),O(()=>{var ce;We(et,`font-size: ${(ce=n(A))!=null?ce:""}px`),ve(ne,xe())}),b(K,Be)}),b(G,D)};V(Ce,G=>{var D;n(I)&&((D=n(E))!=null&&D.length)?G(pe):G(Ke,!1)},ge)}};V(me,Ce=>{n(I)&&s()?Ce(ee):Ce(_e,!1)})}S(we),S(re),O(Ce=>{var ge;J=oe(re,1,"subtitles-caption s-a",null,J,Ce),We(re,`--subtitles-caption-margin: ${(ge=n(z))!=null?ge:""}%`)},[()=>({mobile:u()})]),b(Z,re)};V(X,Z=>{var re;(e.captions.length||(re=n(E))!=null&&re.length)&&Z(ae)})}S(F),O(Z=>U=oe(F,1,"subtitles-container s-a",null,U,Z),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(I)&&!n(T)&&!s()})]),b(t,F),H(),o()}import{ChromecastState as Jw}from"@vkontakte/videoplayer-core/es2018";var eS=L('<div class="text s-l"> </div>'),tS=L('<div><div class="icon_wrapper s-l"><!></div> <!></div>'),iS={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 cc(t,e){B(e,!0),Q(t,iS);let i=h(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Vt();var r=tS();let a;r.__contextmenu=function(...m){var p;(p=e.onContextMenu)==null||p.apply(this,m)},r.__click=function(...m){var p;(p=e.onClick)==null||p.apply(this,m)},r.__dblclick=function(...m){var p;(p=e.onDblClick)==null||p.apply(this,m)};var l=C(r),d=C(l);Qd(d,{get size(){return"48"},get iconState(){return Jw.CONNECTED}}),S(l);var s=k(l,2);{var u=m=>{var p=eS(),v=C(p);S(p),O(()=>{var _;return ve(v,`Видео воспроизводится на ${(_=i())!=null?_:""}`)}),b(m,p)};V(s,m=>{i()&&m(u)})}S(r),O(m=>{a=oe(r,1,"wrapper s-l",null,a,m),We(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),H()}Qe(["contextmenu","click","dblclick"]);var oS=Ie('<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 jm(t){je(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=oS();b(e,o)},$$slots:{default:!0}})}var nS=L('<div class="container s-4"><!></div>'),rS={hash:"s-4",code:".container.s-4{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function Ya(t){Q(t,rS);var e=nS(),i=C(e);jm(i,{}),S(e),b(t,e)}var sS=L('<div class="playButton s-d" tabindex="0" role="button"><div class="playButtonBackground s-d"></div> <!></div>'),aS=L('<div data-testid="unstarted-thumb"><!></div>'),lS={hash:"s-d",code:".container.s-d{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-d{opacity:0;visibility:hidden}.container.bgCover.s-d{background-size:cover}.playButton.s-d{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-d,.playButtonBackground.s-d{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-d{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-d:hover .playButtonBackground:where(.s-d){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-d svg{position:relative}"};function ja(t,e){B(e,!0),Q(t,lS);let i=h(e,"iconVisible",3,!0),o=be(),r=Vt(),a=o.ui.startedByKeyboard$,l=j("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=aS();let m;u.__click=s,u.__contextmenu=function(..._){var y;(y=e.onContextMenu)==null||y.apply(this,_)};var p=C(u);{var v=_=>{var y=sS();y.__keydown=d;var $=k(C(y),2);An($,{get size(){return"48"}}),S(y),O(()=>Ve(y,"aria-label",l)),b(_,y)};V(p,_=>{i()&&_(v)})}return S(u),O(_=>{m=oe(u,1,"container s-d",null,m,_),We(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:r.features.previewNoEmptySpace})]),b(t,u),H({handlePressKey:d,handleClick:s})}Qe(["click","contextmenu","keydown"]);var dS=L('<span class="text s-x"> </span>'),cS=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},uS=L('<a target="_blank" class="link s-x"><!></a>'),pS=(t,e)=>e.onTitleClicked(),fS=L("<button><!></button>"),mS=L('<div data-testid="video_title"><!></div>'),vS={hash:"s-x",code:".title.s-x{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-x,.title.s-x{color:var(--white)}.link.s-x{pointer-events:auto;text-decoration:none}.link.s-x:hover{text-decoration:underline}.text.s-x{pointer-events:auto}.size-sm.s-x{font-size:14px;font-weight:500;line-height:18px}.hidden.s-x{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function Xm(t,e){B(e,!0),Q(t,vS);let i=_=>{var y=dS(),$=C(y,!0);S(y),Ye(y,x=>l(x),()=>l()),O(()=>ve($,o())),lt("mouseenter",y,function(...x){var I;(I=e.onMouseEnter)==null||I.apply(this,x)}),lt("mouseleave",y,function(...x){var I;(I=e.onMouseLeave)==null||I.apply(this,x)}),b(_,y)},o=h(e,"title",3,""),r=h(e,"isHidden",3,!1),a=h(e,"size",3,"md"),l=h(e,"ref",15),d=q(void 0);Mt(()=>{var y;requestAnimationFrame(()=>{var $;($=e.onVisibilityChanged)==null||$.call(e,!0)});function _($){var x;$.propertyName==="transform"&&((x=e.onVisibilityChanged)==null||x.call(e,!r()))}return(y=n(d))==null||y.addEventListener("transitionend",_),()=>{var $;return($=n(d))==null?void 0:$.removeEventListener("transitionend",_)}});var s=mS();let u;var m=C(s);{var p=_=>{var y=uS();y.__click=[cS,e];var $=C(y);i($),S(y),O(()=>Ve(y,"href",e.titleLinkHref)),b(_,y)},v=(_,y)=>{{var $=I=>{var T=fS();T.__click=[pS,e];var R=C(T);i(R),S(T),b(I,T)},x=I=>{i(I)};V(_,I=>{e.onTitleClicked?I($):I(x,!1)},y)}};V(m,_=>{e.titleLinkHref?_(p):_(v,!1)})}S(s),Ye(s,_=>N(d,_),()=>n(d)),O(_=>u=oe(s,1,`title size-${a()}`,"s-x",u,_),[()=>({hidden:r()})]),b(t,s),H()}Qe(["click"]);import{throttleFn as xS}from"@vkontakte/videoplayer-shared/es2018";var gS=L('<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),hS=L('<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),_S=L('<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),bS=L('<div class="timer__cell cell s-1a"><span class="cell__value s-1a"> </span> <span class="cell__unit s-1a"> </span></div>'),$S=L("<div><!> <!> <!> <!></div>"),yS={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 Zm(t,e){B(e,!0),Q(t,yS);let i=q(""),o=q(""),r=q(""),a=q(""),l,d=32,s=d/2,u=F=>String(F).padStart(2,"0"),m=F=>Math.max(F.length,1),p=F=>`${(e.isSmallSize?s:d)*m(F)}px`,v=F=>{let U=Math.floor(F/86400);U&&(F-=U*86400,N(i,u(U),!0));let X=Math.floor(F/3600);N(o,u(X),!0);let ae=Math.floor(F/60)%60;N(r,u(ae),!0);let Z=F%60;N(a,u(Z),!0)},_=()=>{let F=Math.floor(Date.now()/1e3),U=e.startTime-F;v(U),U>=1?l=requestAnimationFrame(_):e.onTimerOver()};Mt(()=>{l=requestAnimationFrame(_)}),sn(()=>{cancelAnimationFrame(l)});var y=$S();let $;var x=C(y);{var I=F=>{var U=gS(),X=ue(U);let ae;var Z=C(X),re=C(Z,!0);S(Z);var J=k(Z,2),we=C(J,!0);S(J),S(X);var me=k(X,2),ee=C(me,!0);S(me),O((_e,Ce,ge)=>{ae=We(X,"",ae,{width:_e}),ve(re,n(i)),ve(we,Ce),ve(ee,ge)},[()=>p(n(i)),()=>j("waiting_live_day_value"),()=>j("waiting_live_colon")]),b(F,U)};V(x,F=>{n(i)&&F(I)})}var T=k(x,2);{var R=F=>{var U=hS(),X=ue(U);let ae;var Z=C(X),re=C(Z,!0);S(Z);var J=k(Z,2),we=C(J,!0);S(J),S(X);var me=k(X,2),ee=C(me,!0);S(me),O((_e,Ce,ge)=>{ae=We(X,"",ae,{width:_e}),ve(re,n(o)),ve(we,Ce),ve(ee,ge)},[()=>p(n(o)),()=>j("waiting_live_hour_value"),()=>j("waiting_live_colon")]),b(F,U)};V(T,F=>{n(o)&&F(R)})}var A=k(T,2);{var P=F=>{var U=_S(),X=ue(U);let ae;var Z=C(X),re=C(Z,!0);S(Z);var J=k(Z,2),we=C(J,!0);S(J),S(X);var me=k(X,2),ee=C(me,!0);S(me),O((_e,Ce,ge)=>{ae=We(X,"",ae,{width:_e}),ve(re,n(r)),ve(we,Ce),ve(ee,ge)},[()=>p(n(r)),()=>j("waiting_live_minute_value"),()=>j("waiting_live_colon")]),b(F,U)};V(A,F=>{n(r)&&F(P)})}var E=k(A,2);{var z=F=>{var U=bS();let X;var ae=C(U),Z=C(ae,!0);S(ae);var re=k(ae,2),J=C(re,!0);S(re),S(U),O((we,me)=>{X=We(U,"",X,{width:we}),ve(Z,n(a)),ve(J,me)},[()=>p(n(a)),()=>j("waiting_live_second_value")]),b(F,U)};V(E,F=>{n(a)&&F(z)})}S(y),O(F=>$=oe(y,1,"timer__container s-1a",null,$,F),[()=>({small:e.isSmallSize})]),b(t,y),H()}var wS=L('<div class="waiting s-s"><span> </span></div>'),SS=L('<div class="upcoming-timer timer s-s"><span> </span> <!></div>'),CS=L('<div class="waiting-container s-s"><!></div>'),TS={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 uc(t,e){B(e,!0),Q(t,TS);let i=h(e,"startTime",3,0),o=f(()=>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=f(()=>{var x,I;return((x=n(d))!=null?x:1/0)<=509||((I=n(s))!=null?I:1/0)<=320}),m=f(()=>{var x,I;return!n(u)&&(((x=n(d))!=null?x:1/0)<=699||((I=n(s))!=null?I:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?xS(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let x={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"},I=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(x,I)})},300):void 0;De(()=>{n(s),n(d),n(o),p==null||p()}),sn(()=>{if(cancelAnimationFrame(l),p==null||p.cancel(),e.onUpcomingLiveViewStateChanged){let x={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"};e.onUpcomingLiveViewStateChanged(x)}});var v=CS();v.__contextmenu=function(...x){var I;(I=e.onContextMenu)==null||I.apply(this,x)},v.__click=function(...x){var I;(I=e.onClick)==null||I.apply(this,x)};var _=C(v);{var y=x=>{var I=wS(),T=C(I);let R;var A=C(T,!0);S(T),S(I),Ye(I,P=>N(r,P),()=>n(r)),O((P,E)=>{R=oe(T,1,"waiting__title s-s",null,R,P),ve(A,E)},[()=>({medium:n(m),small:n(u)}),()=>j("waiting_live_upcoming_title")]),b(x,I)},$=x=>{var I=SS(),T=C(I);let R;var A=C(T,!0);S(T);var P=k(T,2);let E=f(()=>n(u)||n(m)),z=f(()=>i()||0);Zm(P,{get isSmallSize(){return n(E)},get startTime(){return n(z)},onTimerOver:()=>N(o,!0)}),S(I),Ye(I,F=>N(a,F),()=>n(a)),O((F,U)=>{R=oe(T,1,"timer__title s-s",null,R,F),ve(A,U)},[()=>({medium:n(m),small:n(u)}),()=>j("waiting_live_timer_title")]),b(x,I)};V(_,x=>{n(o)?x(y):x($,!1)})}S(v),O(()=>We(v,`background-image: url(${e.thumbUrl})`)),Pn(v,"clientWidth",x=>N(d,x)),Pn(v,"clientHeight",x=>N(s,x)),b(t,v),H()}Qe(["contextmenu","click"]);var IS=L('<div class="waiting-container s-p"><div class="waiting-caption s-p"><!> <p class="waiting-title s-p"> </p></div></div>'),ES={hash:"s-p",code:'.waiting-container.s-p{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-p,.waiting-container.s-p:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-p:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-p{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-p{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function Xa(t,e){B(e,!0),Q(t,ES);let i=h(e,"thumbUrl",3,""),o={recover:j("waiting_live_recover_title"),record:j("waiting_record_title")},r=f(()=>o[e.kind]||"");var a=IS();a.__contextmenu=function(...m){var p;(p=e.onContextMenu)==null||p.apply(this,m)},a.__click=function(...m){var p;(p=e.onClick)==null||p.apply(this,m)};var l=C(a),d=C(l);Ha(d,{style:"position: static; transform: translate(0, 0)"});var s=k(d,2),u=C(s,!0);S(s),S(l),S(a),O(()=>{We(a,`background-image: url('${i()}')`),ve(u,n(r))}),b(t,a),H()}Qe(["contextmenu","click"]);var PS=Ie('<path d="M6 10.2 3.5 7.7a.99.99 0 0 0-1.4 1.4l3.2 3.2a1 1 0 0 0 1.4 0l7.6-7.6a.99.99 0 0 0-1.4-1.4z"></path>');function Jm(t){je(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=PS();b(e,o)},$$slots:{default:!0}})}var kS=L('<div class="select-icon s-1x"><!></div>'),AS={hash:"s-1x",code:".select-icon.s-1x{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function pc(t){Q(t,AS);var e=kS(),i=C(e);Jm(i,{}),S(e),b(t,e)}var LS=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},MS=(t,e)=>{Rl(t,()=>e.item.selectItem(e.item.value))},VS=L("<p> </p>"),RS=L('<p class="sublabel s-1u"> </p>'),NS=L('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),DS={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 ev(t,e){B(e,!0),Q(t,DS);let i=h(e,"isMobile",3,!1);var o=NS();let r;o.__click=[LS,e],o.__keydown=[MS,e];var a=C(o);{var l=y=>{pc(y,{})};V(a,y=>{e.item.selected&&y(l)})}var d=k(a,2);let s;var u=C(d);{var m=y=>{var $=Le(),x=ue($);Mi(x,()=>e.item.valueComponent,(I,T)=>{T(I,ts(()=>{var R;return(R=e.item.valueComponentParams)!=null?R:{}}))}),b(y,$)},p=y=>{var $=VS();let x;var I=C($,!0);S($),O(T=>{var R;x=oe($,1,"label s-1u",null,x,T),ve(I,(R=e.item.label)!=null?R:e.item.value)},[()=>({mobile:i()})]),b(y,$)};V(u,y=>{e.item.valueComponent?y(m):y(p,!1)})}var v=k(u,2);{var _=y=>{var $=RS(),x=C($,!0);S($),O(()=>ve(x,e.item.sublabel)),b(y,$)};V(v,y=>{e.item.sublabel&&y(_)})}S(d),S(o),O((y,$,x)=>{var I;r=oe(o,1,"item",null,r,y),Ve(o,"data-value",(I=e.item.dataValue)!=null?I:e.item.value),Ve(o,"aria-label",$),Ve(o,"data-testid",e.item.dataTestid),s=oe(d,1,"menu-item-value s-1u",null,s,x),Ve(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),H()}Qe(["click","keydown"]);var OS=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function tv(t,e){B(e,!0);let i=h(e,"isMobile",3,!1),o=h(e,"refMenuItems",15),r=f(()=>()=>e.openSubMenuList(e.item.children)),a=f(()=>$=>Mu($,n(r)));var l=OS();let d;l.__click=function(...$){var x;(x=n(r))==null||x.apply(this,$)},l.__keydown=function(...$){var x;(x=n(a))==null||x.apply(this,$)};var s=C(l);{var u=$=>{pc($,{})};V(s,$=>{e.item.selected&&$(u)})}var m=k(s,2);let p;var v=C(m);{var _=$=>{var x=Le();let I=f(()=>e.item.valueComponent);var T=ue(x);Mi(T,()=>n(I),(R,A)=>{A(R,ts(()=>{var P;return(P=e.item.valueComponentParams)!=null?P:{}}))}),b($,x)},y=$=>{var x=ps();O(()=>ve(x,e.item.label)),b($,x)};V(v,$=>{e.item.valueComponent?$(_):$(y,!1)})}S(m),S(l),Ye(l,$=>o(o()[e.item.id]=$,!0),()=>{var $;return($=o())==null?void 0:$[e.item.id]}),O(($,x)=>{var I;d=oe(l,1,"item",null,d,$),Ve(l,"aria-label",(I=e.item.ariaLabel)!=null?I:e.item.label),Ve(l,"data-testid",e.item.id),p=oe(m,1,"menu-item-value",null,p,x)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),b(t,l),H()}Qe(["click","keydown"]);var os={"quality-settings":100,"audio-language-settings":200,"playback-rate-settings":300,"subtitles-settings":400,"traffic-saving-settings":500,download:600,report:700,"copy-data":800,"save-trace-info":900,"debug-info":1e3};var HS=(t,e)=>{V_(t,e.returnFromSubMenu,e.closeSettingsMenu)},FS=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},US=(t,e)=>{Rd(t)&&(Mr(t),e.returnFromSubMenu())},zS=L('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1j"> </p></li> <!></ul></div>'),WS={hash:"s-1j",code:".sub-menu.s-1j{--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-1j .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1j{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1j{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1j .items:where(.s-1j) .item.header:where(.s-1j){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-1j .title:where(.s-1j){margin-left:8px}.sub-menu.s-1j .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1j .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1j .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1j .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1j .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1j .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1j .item .sublabel{font-size:12px;line-height:14px}.item.s-1j:not(.mobile) p:where(.s-1j),.sub-menu.s-1j .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function ov(t,e){B(e,!0),Q(t,WS);let[i,o]=Ne(),r=()=>w(p,"$isFullscreen",i),a=()=>w(v,"$playerSize",i),l=h(e,"isMobile",3,!1),d=h(e,"playerControlsHeight",3,0),s=h(e,"ariaLabelReturnFromSubMenu",19,()=>j("aria_label_submenu_back")),u=h(e,"listRef",15);Mt(()=>{let Z=e.items.findIndex(re=>re.selected);u().children[Z+1].focus()});let m=be(),p=m.ui.isFullscreen,v=m.ui.playerSize,_=q(void 0),y=q(0),$=q(0),x=f(()=>l()&&r()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n($)-d()}px; overflow: auto;`),I=f(()=>Math.max(e.minWidth,n(y)));var T=zS();let R;var A=C(T);let P;A.__keydown=[HS,e];var E=C(A);let z;E.__click=[FS,e],E.__keydown=[US,e];var F=C(E);Lr(F,{direction:"left"});var U=k(F,2),X=C(U,!0);S(U),S(E),Ye(E,Z=>N(_,Z),()=>n(_));var ae=k(E,2);gi(ae,17,()=>e.items,_d,(Z,re)=>{var J=Le(),we=ue(J);{var me=_e=>{ev(_e,{get item(){return n(re)},get isMobile(){return l()}})},ee=(_e,Ce)=>{{var ge=pe=>{tv(pe,{get isMobile(){return l()},get item(){return n(re)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};V(_e,pe=>{n(re).type==="OPEN_SUB_MENU"&&pe(ge)},Ce)}};V(we,_e=>{n(re).type==="SELECT_VALUE"?_e(me):_e(ee,!1)})}b(Z,J)}),S(A),Ye(A,Z=>u(Z),()=>u()),S(T),O((Z,re,J)=>{R=oe(T,1,"sub-menu menu s-1j",null,R,Z),Ve(T,"data-testid",`${e.id}-sub-menu`),We(T,`min-width: ${n(I)}px`),P=oe(A,1,"items s-1j",null,P,re),We(A,n(x)),z=oe(E,1,"item header back s-1j",null,z,J),Ve(E,"aria-label",s()),ve(X,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),Pn(E,"clientWidth",Z=>N(y,Z)),Pn(E,"clientHeight",Z=>N($,Z)),b(t,T),H(),o()}Qe(["keydown","click"]);import{noop as KS}from"@vkontakte/videoplayer-shared/es2018";var qS=(t,e)=>Mu(t,e()),QS=(t,e)=>{t.stopPropagation(),e()()},GS=L('<div class="value s-1l"> </div>'),YS=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),jS={hash:"s-1l",code:".value.s-1l{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function nv(t,e){B(e,!0),Q(t,jS);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,KS),r=h(e,"valueComponent",3,void 0),a=h(e,"iconProps",19,()=>({})),l=h(e,"ref",15);var d=YS();let s;d.__click=[QS,o],d.__keydown=[qS,o];var u=C(d),m=C(u);{var p=T=>{Ka(T,{get icon(){return e.icon}})},v=T=>{var R=Le();let A=f(()=>e.icon);var P=ue(R);Mi(P,()=>n(A),(E,z)=>{z(E,ts(a))}),b(T,R)};V(m,T=>{typeof e.icon=="string"?T(p):T(v,!1)})}S(u);var _=k(u,2),y=C(_,!0);S(_);var $=k(_,2);{var x=T=>{var R=Le();let A=f(r);var P=ue(R);Mi(P,()=>n(A),(E,z)=>{z(E,{})}),b(T,R)},I=T=>{var R=GS(),A=C(R,!0);S(R),O(()=>ve(A,e.value)),b(T,R)};V($,T=>{r()?T(x):T(I,!1)})}S(d),Ye(d,T=>l(T),()=>l()),O(T=>{s=oe(d,1,"item",null,s,T),Ve(d,"aria-label",e.ariaLabel),Ve(d,"data-testid",e.id),ve(y,e.label)},[()=>({mobile:i()})]),b(t,d),H()}Qe(["click","keydown"]);import{noop as yb}from"@vkontakte/videoplayer-shared/es2018";var XS=(t,e)=>{Rl(t,()=>e())},ZS=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),JS=L('<img class="icon" aria-hidden="true"/>'),eC=L('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1k"> </div></li>'),tC={hash:"s-1k",code:".label.s-1k{overflow:hidden;text-overflow:ellipsis}"};function rv(t,e){B(e,!0),Q(t,tC);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,yb),r=h(e,"closeSettings",3,yb),a=q(!1),l=()=>{N(a,!0)},d=x=>{x==null||x.stopPropagation(),o()(),r()()};var s=eC();let u;s.__click=d,s.__keydown=[XS,d];var m=C(s),p=C(m);{var v=x=>{var I=Le(),T=ue(I);{var R=P=>{var E=ZS();b(P,E)},A=P=>{var E=JS();O(()=>Ve(E,"src",e.icon)),lt("error",E,l),Aa(E),b(P,E)};V(T,P=>{n(a)?P(R):P(A,!1)})}b(x,I)},_=x=>{var I=Le();let T=f(()=>e.icon);var R=ue(I);Mi(R,()=>n(T),(A,P)=>{P(A,{})}),b(x,I)};V(p,x=>{typeof e.icon=="string"?x(v):x(_,!1)})}S(m);var y=k(m,2),$=C(y,!0);S(y),S(s),O(x=>{var I;u=oe(s,1,"item",null,u,x),Ve(s,"aria-label",(I=e.ariaLabel)!=null?I:e.label),Ve(s,"data-testid",e.id),ve($,e.label)},[()=>({mobile:i()})]),b(t,s),H()}Qe(["click","keydown"]);import{noop as nC}from"@vkontakte/videoplayer-shared/es2018";var iC=L('<div class="toggle_wrap s-1q"><div></div> <div class="toggle-label s-1q"></div></div>'),oC={hash:"s-1q",code:'.toggle_wrap.s-1q{cursor:pointer;font-size:12px;line-height:15px;min-height:15px;padding:0;user-select:none}.toggle.s-1q{background-color:var(--toggle-color-separator);border-radius:45px;cursor:pointer;float:right;height:9px;margin-top:3px;width:28px}.toggle.s-1q: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-1q:after{background-color:var(--toggle-color-on);left:13px}.toggle-label.s-1q{overflow:hidden}'};function sv(t,e){Q(t,oC);let i=h(e,"enabled",3,!1);var o=iC(),r=C(o);let a;di(2),S(o),O(l=>a=oe(r,1,"toggle s-1q",null,a,l),[()=>({on:i()})]),b(t,o)}var rC=(t,e,i)=>{R_(t,e(),o=>i()(o))},sC=(t,e,i)=>{t.stopPropagation(),e()(!i())},aC=L('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),lC=L('<li role="menuitem" tabindex="0"><!></li>');function av(t,e){B(e,!0);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,nC),r=h(e,"enabled",3,!1),a=h(e,"tooltipText",3,void 0),l=h(e,"maxTooltipWidth",3,void 0);var d=lC();let s;d.__click=[sC,o,r],d.__keydown=[rC,r,o];var u=C(d);Fa(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(m,p)=>{var v=aC();let _;var y=C(v),$=C(y);{var x=P=>{Ka(P,{get icon(){return e.icon}})},I=P=>{var E=Le();let z=f(()=>e.icon);var F=ue(E);Mi(F,()=>n(z),(U,X)=>{X(U,{})}),b(P,E)};V($,P=>{typeof e.icon=="string"?P(x):P(I,!1)})}S(y);var T=k(y,2),R=C(T,!0);S(T);var A=k(T,2);sv(A,{get enabled(){return r()}}),S(v),O(P=>{_=oe(v,1,"switch-wrapper",null,_,P),ve(R,e.label)},[()=>({mobile:i()})]),b(m,v)},$$slots:{default:!0}}),S(d),O(m=>{var p;s=oe(d,1,"item switch-item",null,s,m),Ve(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),Ve(d,"data-testid",e.id)},[()=>({mobile:i()})]),b(t,d),H()}Qe(["click","keydown"]);import{isValidURL as MC,VideoQuality as Lb}from"@vkontakte/videoplayer-shared/es2018";var xb=()=>{let t=q(li([])),e=f(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{N(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{N(t,[],!0)}}};import{getVideoQualityLabel as dC}from"@vkontakte/videoplayer-shared/es2018";var cC=L('<div class="quality-icon s-1p"><!></div>'),uC=L('<div class="quality-label s-1p"><span> </span> <!></div>'),pC={hash:"s-1p",code:".quality-label.s-1p{position:relative}.quality.s-1p{font-size:13px;line-height:18px}.quality.sub.s-1p{opacity:.7}.quality-icon.s-1p{display:flex;padding-left:2px;position:absolute;right:0;top:0;transform:translateX(100%)}.quality-icon.s-1p svg{color:var(--blue-light)}"};function Za(t,e){B(e,!0),Q(t,pC);let i=h(e,"isSubCase",3,!1),o=f(()=>e.quality?dC(e.quality):""),r=f(()=>Bu(e.quality));var a=uC(),l=C(a);let d;var s=C(l,!0);S(l);var u=k(l,2);{var m=p=>{var v=cC();let _=f(()=>n(r));var y=C(v);Mi(y,()=>n(_),($,x)=>{x($,{})}),S(v),O(()=>Ve(v,"data-testid",`${n(o)}-icon`)),b(p,v)};V(u,p=>{n(r)&&!e.isMobile&&p(m)})}S(a),O(p=>{d=oe(l,1,"s-1p",null,d,p),ve(s,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),b(t,a),H()}import{VideoQuality as fC}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as wb}from"@vkontakte/videoplayer-core/es2018";var Sb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},Cb=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=Sb({quality:t,availableQualities:e});return i?t===wb.INVARIANT?j("auto_quality_invariant"):j("auto_quality",{actual:o}):o},Tb=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===wb.INVARIANT?i:`${i}${Sb({quality:t,availableQualities:e})}`:"...";var mC=L('<div class="menu-item-value-wrapper s-1t"><!></div>'),vC={hash:"s-1t",code:".menu-item-value-wrapper.s-1t{line-height:normal}"};function Ql(t,e){B(e,!0),Q(t,vC);let[i,o]=Ne(),r=()=>w(s,"$currentQuality$",i),a=()=>w(u,"$availableQualities$",i),l=()=>w(m,"$isMobile$",i),d=be(),s=d.state.currentQuality$,u=d.state.availableQualities$,m=d.ui.isMobile,p=" · ",v=f(()=>e.prefix+(e.selected&&r()!==fC.INVARIANT?p:"")),_=f(()=>Tb({prefix:n(v),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=mC(),$=C(y);let x=f(()=>e.selected?r():void 0);Za($,{get quality(){return n(x)},get label(){return n(_)},get isMobile(){return l()},isSubCase:!0}),S(y),b(t,y),H(),o()}var gC=t=>{let e=t.join("|"),i="<(?<keyhtml>.*?)(?<propshtml> .*?)?>(?<childrenhtml>.*?)</\\k<keyhtml>>",o=`{(?<keyi18n>${e})}(?<childreni18n>.*?){/\\k<keyi18n>}`,r="<(?<keyhtmlself>.*?)(?<propshtmlself> .*?)?/?>",a=`{(?<keyi18nself>${e})}`;return new RegExp(`${i}|${o}|${r}|${a}`,"g")},hC={br:!0,span:!0},lv=(t,e={})=>{var d,s,u,m,p,v,_;if(!t)return t;let i={...hC,...e},o=Object.keys(i);if(!o.length)return t;let r=gC(o),a=[],l=0;for(let y of t.matchAll(r)){let $=y[0],x=((d=y.groups)==null?void 0:d.keyhtml)||((s=y.groups)==null?void 0:s.keyi18n)||((u=y.groups)==null?void 0:u.keyhtmlself)||((m=y.groups)==null?void 0:m.keyi18nself)||"",{index:I}=y;if(!i[x]){a.push(t.slice(l,I)),l=I+$.length;continue}let T=(p=y.groups)!=null&&p.childrenhtml?lv(y.groups.childrenhtml,i):"",R=(v=y.groups)!=null&&v.childrenhtml?$.replace(new RegExp((_=y.groups)==null?void 0:_.childrenhtml),()=>T||""):$;a.push(t.slice(l,I),R),l=I+$.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function fc(t,e){B(e,!1);let i=h(e,"message",8),o=lv(i());fo();var r=Le(),a=ue(r);{var l=d=>{var s=Le(),u=ue(s);bd(u,()=>o),b(d,s)};V(a,d=>{o&&d(l)})}b(t,r),H()}var _C=L('<p class="quality-applies sublabel s-1s"><!></p>'),bC={hash:"s-1s",code:".quality-applies.s-1s{color:hsla(0,0%,100%,.5);display:flex;justify-content:end;padding:3px 0}.quality-applies span{color:#70c1ff}"};function dv(t,e){B(e,!1),Q(t,bC),fo();var i=_C(),o=C(i);let r=Sn(()=>j("quality_applience",{action:`<span>${j("quality_applience_action")}</span>`}));fc(o,{get message(){return n(r)}}),S(i),b(t,i),H()}var Eb=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",label:j("other_quality"),selected:o,valueComponent:Ql,valueComponentParams:{prefix:j("other_quality"),selected:o},children:"quality-other-settings"}},cv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:j("auto_quality_limit"),valueComponent:e?Ql:void 0,valueComponentParams:{prefix:j("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),Pb=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:dv,bottomBordered:!0,children:"quality-appliance"}),uv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"quality-high",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:j("high_quality"),valueComponent:t?Ql:void 0,valueComponentParams:{prefix:j("high_quality"),selected:i},sublabel:j("high_quality_description")}),pv=({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:j("traffic_saving_quality"),valueComponent:t?Ql:void 0,valueComponentParams:{prefix:j("traffic_saving_quality"),selected:i},sublabel:j("traffic_saving_quality_description")});var ip=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),op=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,r;if(i==="und"?r=void 0:i&&(r=(l=jd(i))!=null?l:i),o&&i&&r){let d=e.filter(s=>s.label===o&&s.language===i);if(d.length===1)return j("audio_stream_display_language_label",{language:r,label:o});{let s=ip(t,d);return j("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=ip(t,d);return j("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=ip(t,d);return j("audio_stream_display_language_index",{language:r,index:s})}}let a=ip(t,e);return j("audio_stream_display_unknown",{index:a})};var $C={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:r}=t,a=[];return i&&a.push({handler:cv,selected:e&&!o&&!r||!1}),a.push({handler:pv,selected:o},{handler:uv,selected:r}),{title:j("submenu_quality"),id:"quality-settings",items:[Pb(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),Eb(t)]}},"quality-other-settings":({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"quality-other-settings",title:j("submenu_quality"),closeSettingsMenu:t,items:i.map(r=>({type:"SELECT_VALUE",value:r.value,valueComponent:Za,valueComponentParams:{quality:r.value,label:r.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:r.selected,label:r.displayValue}))}),"quality-appliance":t=>{var i,o,r;let{closeSettingsMenu:e}=t;return{id:"quality-appliance",title:j("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:cv,selected:((i=yu())==null?void 0:i.type)==="auto_quality"},{handler:pv,selected:((o=yu())==null?void 0:o.type)==="traffic_saving"},{handler:uv,selected:((r=yu())==null?void 0:r.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-tracks":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-tracks",title:j("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:op(r,e)}))}),"playback-rate":({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"playback-rate",title:j("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:j("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i.value,selectItem:()=>e(i),selected:i.selected,label:i.displayValue,dataTestid:i.value===Ln?"sub_off":void 0}))})},kb=({subMenuId:t,context:e})=>t?[$C[t](e)]:[];var yC=Ie('<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 fv(t){je(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=yC();b(e,o)},$$slots:{default:!0}})}var xC=Ie('<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 mv(t){je(t,{width:"18",height:"15",children:(e,i)=>{var o=xC();b(e,o)},$$slots:{default:!0}})}var wC=Ie('<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 vv(t){je(t,{testId:"play-speed-icon",children:(e,i)=>{var o=wC();b(e,o)},$$slots:{default:!0}})}var SC=Ie('<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 gv(t){je(t,{testId:"download-icon",children:(e,i)=>{var o=SC();b(e,o)},$$slots:{default:!0}})}var CC=Ie('<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 hv(t){je(t,{testId:"report-icon",children:(e,i)=>{var o=CC();b(e,o)},$$slots:{default:!0}})}var TC=Ie('<path d="M4 12.3V12c0-1.47 0-2.55.08-3.4.07-.9.21-1.48.45-1.95a4.85 4.85 0 0 1 2.12-2.12 5.1 5.1 0 0 1 1.95-.45C9.5 4 10.68 4 12.3 4h4.51c-.03-.16-.09-.33-.17-.49a2.4 2.4 0 0 0-1.05-1.05c-.3-.16-.63-.21-.93-.24-.29-.02-.64-.02-1.03-.02h-1.37c-1.58 0-2.81 0-3.81.08a6.84 6.84 0 0 0-2.62.64 6.65 6.65 0 0 0-2.9 2.91c-.4.76-.57 1.6-.65 2.62-.08 1-.08 2.23-.08 3.81v1.37c0 .4 0 .74.02 1.03.03.3.08.62.24.93A2.4 2.4 0 0 0 4 16.8V12.3ZM10.08 6h-.03c-.53 0-.97 0-1.33.03-.39.03-.76.1-1.12.28a2.9 2.9 0 0 0-1.3 1.3c-.17.35-.24.72-.27 1.1C6 9.09 6 9.53 6 10.06v7.9c0 .53 0 .97.03 1.33.03.39.1.76.28 1.12a2.9 2.9 0 0 0 1.3 1.3c.35.17.72.24 1.1.27.37.03.81.03 1.33.03h6.91c.53 0 .97 0 1.33-.03.39-.03.76-.1 1.12-.28a2.9 2.9 0 0 0 1.3-1.3c.17-.35.24-.72.27-1.1.03-.37.03-.81.03-1.34v-7.9c0-.53 0-.97-.03-1.33-.03-.39-.1-.76-.28-1.12a2.9 2.9 0 0 0-1.3-1.3 2.96 2.96 0 0 0-1.1-.27C17.91 6 17.47 6 16.94 6h-6.87ZM8.41 7.92c.06-.04.18-.07.45-.1.28-.02.65-.02 1.22-.02h6.84c.57 0 .94 0 1.22.02.27.03.39.06.45.1.21.1.39.28.5.49.03.06.06.18.09.45.02.28.02.65.02 1.22v7.84c0 .57 0 .94-.02 1.22-.03.27-.06.39-.1.45-.1.21-.28.39-.49.5-.06.03-.18.06-.45.09-.28.02-.65.02-1.22.02h-6.84c-.57 0-.94 0-1.22-.02a1.23 1.23 0 0 1-.45-.1 1.1 1.1 0 0 1-.5-.49 1.23 1.23 0 0 1-.09-.45c-.02-.28-.02-.65-.02-1.22v-7.84c0-.57 0-.94.02-1.22.03-.27.06-.39.1-.45.1-.21.28-.39.49-.5Z"></path>');function np(t){je(t,{children:(e,i)=>{var o=TC();b(e,o)},$$slots:{default:!0}})}var IC=Ie('<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 _v(t){je(t,{testId:"info-icon",children:(e,i)=>{var o=IC();b(e,o)},$$slots:{default:!0}})}var EC=L('<div class="menu-item-value-wrapper s-1w"><!></div>'),PC={hash:"s-1w",code:".menu-item-value-wrapper.s-1w{line-height:normal}"};function bv(t,e){B(e,!0),Q(t,PC);let[i,o]=Ne(),r=()=>w(u,"$currentQuality$",i),a=()=>w(m,"$availableQualities$",i),l=()=>w(p,"$isAutoQualityEnabled$",i),d=()=>w(v,"$isMobile$",i),s=be(),u=s.state.currentQuality$,m=s.state.availableQualities$,p=s.state.isAutoQualityEnabled$,v=s.ui.isMobile,_=f(()=>Cb({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=EC(),$=C(y);Za($,{get quality(){return r()},get label(){return n(_)},get isMobile(){return d()}}),S(y),b(t,y),H(),o()}var AC={"quality-settings":({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?j("auto_quality_option"):e)||"";return{id:"quality-settings",type:"OPEN_SUB_MENU",ariaLabel:j("aria_label_menu_quality",{actual:o}),icon:Ud,label:j("menu_quality"),value:e,valueComponent:bv,weight:os["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:os["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:j("aria_label_submenu_traffic_saving"),icon:fv,label:j("menu_traffic_saving"),enabled:t,tooltipText:j("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-tracks-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=op(t,e);return{id:"audio-tracks-settings",weight:os["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:j("aria_label_menu_audio_languages",{actual:i}),icon:mv,label:j("menu_audio_languages"),value:i,children:"audio-tracks"}},"playback-rate-settings":({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(r=>r.value===e))==null?void 0:o.displayValue)||"";return{id:"playback-rate-settings",weight:os["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:j("aria_label_menu_rate",{actual:i}),icon:vv,label:j("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:os["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:j("aria_label_menu_subtitle",{actual:t.displayValue}),icon:da,iconProps:{type:"outline"},label:j("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:os.download,type:"CLICK",onClick:t,label:j("download_video_caption"),ariaLabel:j("aria_label_menu_download"),icon:gv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:os.report,type:"CLICK",onClick:t,label:j("menu_report"),ariaLabel:`${j("menu_report")}. ${j("aria_label_new_tab_alert")}`,icon:hv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:os["copy-data"],type:"CLICK",onClick:t,label:j("menu_copy_debug"),ariaLabel:j("menu_copy_debug"),icon:np,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:os["save-trace-info"],type:"CLICK",onClick:t,label:j("menu_save_debug"),ariaLabel:j("menu_save_debug"),icon:np,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:os["debug-info"],type:"CLICK",onClick:t,ariaLabel:j("aria_label_menu_debug_overlay"),label:j("menu_debug_overlay"),icon:_v,isHiddenFor:["desktop"]})},Ab=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>AC[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 VC=(t,e)=>{Lu(t,e)},RC=L('<div><div> </div> <div class="close s-q" data-testid="close-settings-menu"></div></div>'),NC=L('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),DC=L("<div><!> <!></div>"),OC={hash:"s-q",code:'.settings-menu-container.mobile.s-q{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-q ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-q .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-q .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-q .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-q .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-q .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-q .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-q{line-height:40px}.settings-menu.desktop.s-q{min-width:300px}.settings-menu-container.s-q .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-q .menu.mobile.hidden{display:none}.settings-menu-container.s-q .menu .item:not(.switch-item),.settings-menu-container.s-q .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-q .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-q .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-q .item:not(.switch-item),.settings-menu.s-q .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-q .item.mobile:not(.switch-item),.settings-menu.s-q .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-q .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-q .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-q .item.header.mobile:where(.s-q){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-q .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-q .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-q .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-q .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-q .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-q{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-q:after,.close.s-q:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-q:before{transform:rotate(45deg)}.close.s-q:after{transform:rotate(-45deg)}'};function mc(t,e){B(e,!0),Q(t,OC);let[i,o]=Ne(),r=()=>w(Be,"$settingsMenuVisible",i),a=()=>w(et,"$settingsMenuOpenedByKeyboard",i),l=()=>w(He,"$debugPanelVisible",i),d=()=>w(ce,"$isMobile",i),s=()=>w(Te,"$playerSize",i),u=()=>w(xe,"$hasMpegSources$",i),m=()=>w(Re,"$mobileNotReportControlHidden$",i),p=()=>w(ge,"$autoQualityLimitingAvailable$",i),v=()=>w(K,"$availableSubtitlesList$",i),_=()=>w(Ae,"$isLiveWithPlaybackSpeed",i),y=()=>w(ee,"$availableAudioStreams$",i),$=()=>w(D,"$availablePlaybackRates$",i),x=()=>w(me,"$currentAudioStream$",i),I=()=>w(G,"$currentPlaybackRate$",i),T=()=>w(Ze,"$trafficSavingEnabled",i),R=()=>w(_e,"$currentQuality$",i),A=()=>w(pe,"$isAutoQualityEnabled$",i),P=()=>w(qe,"$currentSubtitle$",i),E=()=>w(wt,"$additionalSettingsMenuItems$",i),z=()=>w(Ke,"$isAutoQualityAvailable$",i),F=()=>w(Ce,"$availableQualities$",i),U=()=>w(Ee,"$highQualityEnabled",i),X=h(e,"ref",15,void 0),ae=h(e,"playerControlsHeight",3,0),Z=li({}),re=li({}),J=be(),we=Vt(),me=J.state.audioStream$,ee=J.state.availableAudioStreams$,_e=J.state.currentQuality$,Ce=J.state.availableQualities$,ge=J.state.autoQualityLimitingAvailable$,pe=J.state.isAutoQualityEnabled$,Ke=J.state.isAutoQualityAvailable$,G=J.state.currentPlaybackRate$,D=J.state.availablePlaybackRates$,qe=J.state.currentSubtitle$,K=J.state.availableSubtitlesList$,se=J.state.canDownload,xe=J.state.hasMpegSources$,Be=J.ui.settingsMenu.visible$,et=J.ui.settingsMenu.openedByBtnKeyboard$,ne=J.ui.settingsMenu.ref$,ce=J.ui.isMobile,Re=J.ui.mobileNotReportControlHidden$,Ae=J.state.canChangePlaybackSpeed$,Ze=J.state.trafficSavingEnabled$,Ee=J.state.highQualityEnabled$,Te=J.ui.playerSize,He=J.ui.debugPanelVisible,It=J.state.isInteractiveTime$,wt=J.ui.additionalSettingsMenuItems$,At=J.ui.t,dt=J.actions.internal.downloadVideo,Et=J.actions.internal.closeSettingsMenu,jt=J.actions.internal.openSettingsSubMenu,Pt=J.actions.internal.closeSettingsSubMenu,Dt=q(!1),Ut=q(void 0),Y=xb();De(()=>{!r()&&Y.current&&(Pt(re[Y.current]),Y.popAllSubMenus())}),De(()=>{r()||N(Ut,void 0)}),De(()=>{!Y.current&&n(Ut)&&M_(Z,n(Ut))}),De(()=>{X()&&ne.set(X())});async function Pe(vt){var W;Y.pushSubMenu(vt),await co(),jt(vt,re[vt]);let Ot=(W=X())==null?void 0:W.firstElementChild;Ot&&Ff(Ot)}function le(vt){var Ot;vt==null||vt.stopPropagation(),a()||(Ot=e.returnFocus)==null||Ot.call(e),Et(),N(Dt,!1)}function $e(vt,Ot){J.actions.internal.setQuality(vt,{appliesTo:Ot,byUser:!0}),le()}function Me(vt){J.actions.internal.setAudioStream(vt),le()}function st(vt,Ot){J.actions.internal.setTrafficSavingEnabled(vt,Ot),we.features.qualityDetailsSubMenuEnabled&&le()}function $t(vt,Ot){J.actions.internal.setHighQualityEnabled(vt,Ot),le()}function fe(vt){J.actions.internal.setPlaybackRate(vt),le()}function Oe(vt){J.actions.internal.setSubtitle(vt),le()}function ze(){dt()}function yt(){MC(e.supportLink)&&window.open(e.supportLink,"_blank"),J.actions.internal.reportProblem(),J.actions.internal.pause()}function qt(){Ml(J.actions.internal.getDebugTextData())}let St=()=>{let vt=J.actions.internal.getTraceTextData(),Ot=new Blob([...vt],{type:"application/json"}),W=window.URL.createObjectURL(Ot);Ra(W,"vk_player_trace_info","json")};function ni(){He.set(!l())}function ci(){N(Dt,!0)}function Vi(){N(Dt,!1)}function Rt(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-ae()}px; overflow: auto;`}let uo=f(()=>se&&u()&&!m()),pi=f(()=>we.features.trafficSaving&&!m()&&p()&&!we.features.qualityDetailsSubMenuEnabled),tt=f(()=>v().length>0&&!m()),Gt=f(()=>!!_()&&!m()),Ri=f(()=>we.features.audioLanguages&&y().length>=2&&!m()),hi=f(()=>!m());Mt(()=>It.subscribe(vt=>{vt&&!d()&&!n(Dt)&&!a()&&le()}));let Zt=f(()=>{let vt=[n(hi)&&"quality-settings",n(Ri)&&"audio-tracks-settings",n(Gt)&&"playback-rate-settings",n(tt)&&"subtitles-settings",n(pi)&&"traffic-saving-switch",n(uo)&&"download",we.showSupport&&"show-support","copy-data",we.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(Ot=>!!Ot);return Ab({items:vt,context:{qualityDetailsSubMenuEnabled:we.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:$(),currentAudioStream:x(),availableAudioStreams:y(),currentPlaybackRate:I(),selectPlaybackRate:fe,trafficSavingEnabled:T(),toggleTrafficSaving:st,currentQuality:R()||Lb.INVARIANT,isAutoQualityEnabled:A()||!1,currentSubtitle:P(),isMobile:d(),onDownloadClick:ze,onCopyDataClick:qt,onReportProblemClick:yt,onSaveTraceDataClick:St,toggleShowDebugInfo:ni},additionalSettingsMenuItems:E()})}),yi=f(()=>kb({subMenuId:Y.current,context:{availablePlaybackRates:$(),selectPlaybackRate:fe,trafficSavingEnabled:T(),toggleTrafficSaving:st,currentQuality:R()||Lb.INVARIANT,isAutoQualityEnabled:A()||!1,isAutoQualityAvailable:z()||!1,availableQualities:F(),highQualityEnabled:U(),toggleHighQuality:$t,availableAudioStreams:y(),availableSubtitlesList:v(),closeSettingsMenu:Et,currentAudioStream:x(),isMobile:d(),selectAudioLanguage:Me,selectQuality:$e,selectSubtitle:Oe}}));var rt=DC();let it;var Si=C(rt);{var Yo=vt=>{var Ot=NC();let W;Ot.__keydown=[VC,Et];var Lt=C(Ot);{var ri=_t=>{var nt=RC();let Ni;var Pi=C(nt),cn=C(Pi,!0);S(Pi);var un=k(Pi,2);un.__click=le,S(nt),O((ki,Di)=>{Ni=oe(nt,1,"item header s-q",null,Ni,ki),ve(cn,Di)},[()=>({mobile:d()}),()=>At("submenu_settings")]),b(_t,nt)};V(Lt,_t=>{d()&&_t(ri)})}var ft=k(Lt,2);let Xt;gi(ft,21,()=>n(Zt),_t=>_t.id,(_t,nt)=>{var Ni=Le(),Pi=ue(Ni);{var cn=ki=>{nv(ki,{get isMobile(){return d()},get id(){return n(nt).id},get icon(){return n(nt).icon},get iconProps(){return n(nt).iconProps},get label(){return n(nt).label},get ariaLabel(){return n(nt).ariaLabel},get value(){return n(nt).value},get valueComponent(){return n(nt).valueComponent},onClick:()=>{Pe(n(nt).children),N(Ut,n(nt).id,!0)},get ref(){return Z[n(nt).id]},set ref(Di){Z[n(nt).id]=Di}})},un=(ki,Di)=>{{var Mn=io=>{let Ti=f(()=>`${n(nt).id}-menu-item`);rv(io,{get isMobile(){return d()},get id(){return n(Ti)},get onClick(){return n(nt).onClick},get icon(){return n(nt).icon},get label(){return n(nt).label},get ariaLabel(){return n(nt).ariaLabel},closeSettings:le})},po=(io,Ti)=>{{var Mo=Vo=>{let pn=f(()=>`${n(nt).id}-menu-item`);av(Vo,{get isMobile(){return d()},get id(){return n(pn)},get onClick(){return n(nt).onClick},get icon(){return n(nt).icon},get label(){return n(nt).label},get ariaLabel(){return n(nt).ariaLabel},get enabled(){return n(nt).enabled},get tooltipText(){return n(nt).tooltipText},get maxTooltipWidth(){return n(nt).maxTooltipWidth}})};V(io,Vo=>{n(nt).type==="SWITCH"&&Vo(Mo)},Ti)}};V(ki,io=>{n(nt).type==="CLICK"?io(Mn):io(po,!1)},Di)}};V(Pi,ki=>{n(nt).type==="OPEN_SUB_MENU"?ki(cn):ki(un,!1)})}b(_t,Ni)}),S(ft),Ye(ft,_t=>X(_t),()=>X()),S(Ot),O((_t,nt,Ni)=>{W=oe(Ot,1,"settings-menu menu s-q",null,W,_t),Xt=oe(ft,1,"items",null,Xt,nt),We(ft,Ni)},[()=>({desktop:!d(),mobile:d(),hidden:!!Y.current}),()=>({mobile:d()}),Rt]),lt("mouseenter",Ot,ci),lt("mouseleave",Ot,Vi),b(vt,Ot)};V(Si,vt=>{r()&&vt(Yo)})}var Lo=k(Si,2);gi(Lo,17,()=>n(yi),vt=>vt.id,(vt,Ot)=>{let W=f(()=>{var Lt;return(Lt=n(Ot).minWidth)!=null?Lt:137});ov(vt,{get isMobile(){return d()},get playerControlsHeight(){return ae()},get returnFromSubMenu(){return Y.popSubMenu},get id(){return n(Ot).id},get title(){return n(Ot).title},get closeSettingsMenu(){return Et},openSubMenuList:Pe,get items(){return n(Ot).items},get minWidth(){return n(W)},get refMenuItems(){return Z},get listRef(){return re[n(Ot).id]},set listRef(Lt){re[n(Ot).id]=Lt}})}),S(rt),O(vt=>it=oe(rt,1,"settings-menu-container s-q",null,it,vt),[()=>({mobile:d(),hidden:!r()})]),b(t,rt),H(),o()}Qe(["keydown","click"]);var BC=L('<button class="btn s-1c"> </button>'),HC={hash:"s-1c",code:"button.btn.s-1c{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function $v(t,e){Q(t,HC);var i=BC();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=C(i,!0);S(i),O(()=>ve(o,e.label)),b(t,i)}Qe(["click"]);var FC=L('<div class="container s-r"><div class="notification s-r"><div><p class="description s-r"><!></p> <!></div> <!></div></div>'),UC={hash:"s-r",code:".container.s-r{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px;z-index:var(--controls-container-z-index)}.notification.s-r{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-r{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function vc(t,e){B(e,!0),Q(t,UC);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Vt(),{ui:{t:r}}=be(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=FC(),d=C(l),s=C(d),u=C(s),m=C(u);fc(m,{get message(){return a}}),S(u);var p=k(u,2);{var v=y=>{let $=f(()=>r("slow_video_notification_button"));$v(y,{get label(){return n($)},get onClick(){return e.onSelectAutoQuality}})};V(p,y=>{o||y(v)})}S(s);var _=k(s,2);Rs(_,{get onClick(){return e.onClose}}),S(d),S(l),es(3,d,()=>_s,()=>({duration:i})),b(t,l),H()}import{isIntersecting as Mb,Subscription as zC}from"@vkontakte/videoplayer-shared/es2018";var Ja="annotation",rp=class{constructor(e){this.slots=new Map;this.disabledIds=new Set(e)}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var s;let{overlay:o,id:r,controlsBehaviour:a,hideAllControls:l}=i;if(this.disabledIds.has(r))return{success:!1,message:"current slotId is disabled via config"};let d=typeof e=="function"?e():e;return d.setAttribute("slot",Ja),this.setupSlotStyles(d,o),this.shadowRootContainer.append(d),this.slots.set(r,{rootElement:d,options:i}),a&&this.runHidingControlsWhenIntersected(r,a),l&&((s=this.store)==null||s.ui.isControlsAvailable.set(!1)),{success:!0}}setupSlotStyles(e,i){switch(e.style.position="absolute",i){case"over_video":e.style.zIndex="calc(var(--video-container-z-index) + 1)";break;case"over_controls":e.style.zIndex="calc(var(--controls-container-z-index) + 1)";break;default:e.style.zIndex="0"}}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(p=>p.forEach(()=>{let v=Os(a,this.shadowRootContainer);o.forEach(_=>{let y=l==null?void 0:l[_],$=y?ye(y):null,x=d==null?void 0:d[_];$&&(x==null||x.set(Mb($,v)))})}));s.observe(a,{childList:!0,subtree:!0}),r.observer=s;let u=new zC;o.forEach(p=>{l&&u.add(l[p].subscribe(v=>{let _=d==null?void 0:d[p];v&&v.isDisplayed?_==null||_.set(Mb(v,Os(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(p=>p==null?void 0:p.disconnect()),l==null||l.unsubscribe(),this.slots.delete(e),s&&((u=this.store)==null||u.ui.isControlsAvailable.set(!0)),(m=d==null?void 0:d.controlsToObserve)==null||m.forEach(p=>{var v,_;(_=(v=this.store)==null?void 0:v.ui.hiddenControls[p])==null||_.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var WC=L('<div class="container s-5"><!></div>'),KC={hash:"s-5",code:".container.s-5{align-items:center;animation-fill-mode:forwards;animation-name:s-5-videoPlayerStatusIconPopup;background-color:#00000073;border-radius:100%;display:flex;height:64px;justify-content:center;width:64px;will-change:opacity,scale}@keyframes s-5-videoPlayerStatusIconPopup{0%{opacity:0;scale:.6}10%{animation-timing-function:ease-in;opacity:1;scale:1}75%{opacity:1;scale:1}90%{animation-timing-function:ease-out;opacity:0;scale:.4}to{opacity:0;scale:0}}"};function gc(t,e){B(e,!0),Q(t,KC);let i=h(e,"reversed",3,!1);var o=Le(),r=ue(o);As(r,()=>e.Icon,a=>{var l=WC(),d=C(l);Mi(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),S(l),O(()=>We(l,`animation-duration: ${e.duration}ms`)),b(a,l)}),b(t,o),H()}import{PlaybackState as Vb}from"@vkontakte/videoplayer-core/es2018";var qC=L('<div class="container s-12"><!></div>'),QC={hash:"s-12",code:".container.s-12{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function yv(t,e){B(e,!0),Q(t,QC);let[i,o]=Ne(),r=()=>w(s,"$playbackState$",i),a=()=>w(m,"$previewTrackActive",i),l=()=>w(p,"$previewTrackDragInProgress",i),d=()=>w(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:m,previewTrackDragInProgress:p}}=be(),{features:{playbackStatusShow:v},playbackStatusAnimationDuration:_}=Vt(),y=0,$=q(null),x=q(!1);De(()=>{r()===Vb.PLAYING?N($,An,!0):r()===Vb.PAUSED?N($,Fs,!0):N($,null)}),De(()=>{if(!(!v||a()||l()))return y=window.setTimeout(()=>{y=0,N($,null)},_),()=>{y&&(window.clearTimeout(y),y=0)}}),De(()=>{d()&&!n(x)&&(N(x,!0),N($,null))});var I=Le(),T=ue(I);{var R=A=>{var P=qC(),E=C(P);gc(E,{get duration(){return _},get Icon(){return n($)}}),S(P),b(A,P)};V(T,A=>{n($)&&v&&A(R)})}b(t,I),H(),o()}var GC=L('<div><div data-testid="video-container"></div></div>'),YC={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 el(t,e){B(e,!0),Q(t,YC);let[i,o]=Ne(),r=()=>w(p,"$rotateAlpha",i),a=()=>w(v,"$playerSize",i),l=()=>w(m,"$playerPhase",i),d=()=>w(y,"$chromecastConnected$",i),s=()=>w(_,"$isPlaying$",i),u=h(e,"videoContainer",15),{playerPhase:m,ui:{rotateAlpha:p,playerSize:v},state:{isPlaying$:_,chromecastConnected$:y}}=be(),{isSmoothVideoRotate:$}=Vt(),x=f(()=>u()&&r()%180?a().height/a().width:1);var I=GC();let T;I.__contextmenu=function(...P){var E;(E=e.onContextMenu)==null||E.apply(this,P)},I.__mousedown=function(...P){var E;(E=e.onMouseDown)==null||E.apply(this,P)},I.__mouseup=function(...P){var E;(E=e.onMouseUp)==null||E.apply(this,P)},I.__click=function(...P){var E;(E=e.onClick)==null||E.apply(this,P)},I.__dblclick=function(...P){var E;(E=e.onDblClick)==null||E.apply(this,P)};var R=C(I);let A;Ye(R,P=>u(P),()=>u()),S(I),O((P,E)=>{T=oe(I,1,"video-wrapper s-c",null,T,P),A=oe(R,1,"video-container s-c",null,A,E),We(R,`transform: rotate(${r()}deg) scale(${n(x)})`),Ve(R,"data-is-playing",s())},[()=>({hidden:l()!=="video"||d(),nocursor:e.hideCursor}),()=>({"fast-rotate":!$})]),b(t,I),H(),o()}Qe(["contextmenu","mousedown","mouseup","click","dblclick"]);var jC=L('<div><span class="text s-10"> </span> <!></div>'),XC={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 xv(t,e){B(e,!0),Q(t,XC);let{ui:{t:i}}=be();var o=jC();let r;var a=C(o),l=C(a,!0);S(a);var d=k(a,2);lc(d,{get size(){return"16"},fill:"currentColor"}),S(o),O((s,u)=>{r=oe(o,1,"root s-10",null,r,s),ve(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),b(t,o),H()}var ZC=L('<div class="container s-15" role="button" data-testid="preview-track-overlay"><div class="icon s-15"><!></div></div>'),JC={hash:"s-15",code:".container.s-15{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-15,.icon.s-15{align-items:center;display:flex;justify-content:center}.icon.s-15{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-15:hover .icon:where(.s-15){transform:scale(1.15)}"};function wv(t,e){B(e,!1),Q(t,JC);let o=be().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};fo();var l=ZC();l.__click=a;var d=C(l),s=C(d);return An(s,{get size(){return"32"}}),S(d),S(l),es(3,l,()=>_s,()=>({duration:r})),b(t,l),ff(e,"handleClick",a),H({handleClick:a})}Qe(["click"]);var eT=L('<div class="container s-z"><div class="notification s-z"><span class="text s-z"> </span></div></div>'),tT={hash:"s-z",code:".container.s-z{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-z{background-color:var(--black-alpha-40);border-radius:var(--notification-radius);padding:10px 16px}.text.s-z{font-size:14px;font-weight:500;line-height:18px}"};function Sv(t,e){B(e,!1),Q(t,tT);let{ui:{t:i}}=be();fo();var o=eT(),r=C(o),a=C(r),l=C(a,!0);S(a),S(r),S(o),O(d=>ve(l,d),[()=>i("preview_track_notification_text")],Sn),es(3,r,()=>_s,()=>({duration:340})),b(t,o),H()}var iT=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},oT=L("<div><!></div>"),nT=L('<div class="spherical-video-icon s-8"><!></div>'),rT=L("<div><!></div>"),sT=L('<div class="settings-menu s-8"><!></div>'),aT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),lT=L("<!> <!> <!>",1),dT=L('<div class="blocked s-8"></div>'),cT=L('<div class="player-wrapper s-8"><!> <div class="overlay-container"></div></div> <!>',1),uT={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 Cv(t,e){B(e,!0),Q(t,uT);let[i,o]=Ne(),r=()=>w(Br,"$notificationsToShow$",i),a=()=>w(pi,"$playerPhase",i),l=()=>w(Yo,"$isLoaderVisible",i),d=()=>w(Vi,"$adPlaybackState",i),s=()=>w(ft,"$crashed",i),u=()=>w(Di,"$isInteractiveTime$",i),m=()=>w(hi,"$settingsMenuVisible",i),p=()=>w(Mn,"$isInteractiveExpectation$",i),v=()=>w(Ri,"$controlsVisible",i),_=()=>w(io,"$touched",i),y=()=>w(ns,"$graphIsOpened$",i),$=()=>w(tt,"$isFullscreen",i),x=()=>w(Zn,"$autoplayNextEnabled$",i),I=()=>w(W,"$postrollPassed",i),T=()=>w(Lo,"$isEnded$",i),R=()=>w(gn,"$cursorInside",i),A=()=>w(fn,"$isControlsAvailable",i),P=()=>w(fr,"$doubleForwardOn$",i),E=()=>w(Jn,"$fakeIsPlaying$",i),z=()=>w(Dn,"$bottomNoSmooth",i),F=()=>w(Vr,"$interactiveTimeIndicator",i),U=()=>w(Pi,"$playerSize",i),X=()=>w(cn,"$is3DVideo",i),ae=()=>w(mr,"$doubleForwardAvailable$",i),Z=()=>w(it,"$contextMenuVisible$",i),re=()=>w(ci,"$playbackState$",i),J=()=>w(Ti,"$hotKeyMapData",i),we=()=>w(yi,"$scrubbingInProgress",i),me=()=>w(rt,"$volumeChangingInProgress",i),ee=()=>w(vt,"$chromecastConnected$",i),_e=()=>w(On,"$controlsTimeoutActive",i),Ce=()=>w(Zt,"$settingsMenuOpenedByKeyboard",i),ge=()=>w(So,"$contextMenuOpenedByKeyboard$",i),pe=()=>w(Ho,"$contextMenuOpenedByHotKey$",i),Ke=()=>w($n,"$contextMenuButtonRef$",i),G=()=>w(or,"$contextMenuLastActiveElem$",i),D=()=>w(Gt,"$isFullscreenOpenedByKeyboard",i),qe=()=>w(Vo,"$positionExact$",i),K=()=>w(ni,"$language$",i),se=()=>w(Cr,"$previewTrackActive$",i),xe=()=>w(un,"$icon3DVideoVisible",i),Be=()=>w(Ot,"$chromecastDeviceName$",i),et=()=>w(nt,"$currentSubtitle$",i),ne=()=>w(Ni,"$currentSubtitleCaptions$",i),ce=()=>w(Rt,"$position$",i),Re=()=>w(uo,"$duration$",i),Ae=()=>w(Lt,"$isLive$",i),Ze=()=>w(ri,"$isPlaying$",i),Ee=()=>w(Nr,"$contextMenuPosition$",i),Te=()=>w(jo,"$previewTrackNotificationVisible$",i),He=()=>w(Mo,"$showHotKeyMap",i),It=()=>w(Si,"$debugPanelVisible",i),wt=()=>w(Or,"$userActionsDisabled$",i),At=h(e,"videoContainer",15),dt=h(e,"adsSlotId",3,void 0),Et=h(e,"adsParams",3,void 0),jt=h(e,"adsAutoplayParam",3,void 0),Pt=h(e,"duration",3,void 0),Dt=h(e,"logoTargetUrl",3,""),Ut=h(e,"showNextPrevButtons",3,!1),Y=h(e,"nextButtonActive",3,!1),Pe=h(e,"prevButtonActive",3,!1),le=h(e,"endScreenVideoTitle",3,void 0),$e=h(e,"endScreenVideoThumb",3,void 0),Me=h(e,"isOneVideoPlaylist",3,!1),st=h(e,"shadowRootContainer",3,void 0),$t=h(e,"outerContainerRef",3,void 0),fe=h(e,"playerStarted",3,!1),Oe=h(e,"fullScreenTarget",3,void 0),ze=h(e,"showMiniTimer",3,!1),yt=h(e,"showEndScreen",3,!0),qt=h(e,"keyboardControls",15),St=e.store.getLogger().createComponentLog("Root component"),ni=e.store.interfaceLanguage$,ci=e.store.state.playbackState$,Vi=e.store.ads.playbackState,Rt=e.store.state.positionWithScrubbing$,uo=e.store.state.duration$,pi=e.store.playerPhase,tt=e.store.ui.isFullscreen,Gt=e.store.ui.isFullscreenOpenedByKeyboard,Ri=e.store.ui.controlsVisible,hi=e.store.ui.settingsMenu.visible$,Zt=e.store.ui.settingsMenu.openedByBtnKeyboard$,yi=e.store.ui.scrubbingInProgress,rt=e.store.ui.volumeChangingInProgress,it=e.store.ui.contextMenu.visible$,Si=e.store.ui.debugPanelVisible,Yo=e.store.state.isLoaderVisible,Lo=e.store.state.isEnded$,vt=e.store.state.chromecastConnected$,Ot=e.store.state.chromecastDeviceName$,W=e.store.ads.postrollPassed,Lt=e.store.state.isLive$,ri=e.store.state.isPlaying$,ft=e.store.state.crashed$,Xt=e.store.webApi.annotationsApi,_t=e.store.webApi.pictureInPictureApi,nt=e.store.state.currentSubtitle$,Ni=e.store.state.currentSubtitleCaptions$,Pi=e.store.ui.playerSize,cn=e.store.ui.is3DVideo,un=e.store.ui.icon3DVideoVisible,ki=e.store.state.isInteractive,Di=e.store.state.isInteractiveTime$,Mn=e.store.state.isInteractiveExpectation$,po=e.store.state.hasInteractiveBranches,io=e.store.ui.touched,Ti=e.store.ui.modals.hotKeyMap.data,Mo=e.store.ui.modals.hotKeyMap.show,Vo=e.store.state.positionExact$,pn=e.store.ui.overlayContainer$,Vr=e.store.ui.controls.interactiveTimeIndicator,Rr=e.store.state.showInteractiveTimeIndicator,Nr=e.store.ui.contextMenu.position$,bs=e.store.actions.internal.setQuality,Dr=e.store.actions.internal.closeSettingsMenu,Zn=e.store.ui.autoplayNextEnabled$,Or=e.store.ui.userActionsDisabled,fn=e.store.ui.isControlsAvailable,mn=e.store.ui.videoTitleInfo,fr=e.store.ui.doubleForwardOn$,mr=e.store.ui.doubleForwardAvailable$,jo=e.store.ui.previewTrackNotificationVisible,vr=e.store.actions.internal.getVideoElement,gr=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:Jn,notifications$:Vn,graphIsOpened$:ns}=mo(),vo=q(void 0),hr=q(void 0),Oi=q(void 0),_r=q(void 0),Rn,pt,Jt;Ti.set(C_());let{closeNotification:br,notificationsToShow$:Br}=Vn,Hr=f(()=>!!r().slow_video),Nn=()=>br("slow_video"),er=f(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),go=q(void 0),Dn=de(!1),tr,On=de(!1),vn=de(),gn=de(!1),hn=q(!1),Xo=q(!1),Bi=q(!1),Yi=q(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),Zo=f(()=>u()&&!m()&&!(n(hn)||n(Xo))&&!(n(Bi)&&!p())),ir=!0,$r=f(()=>e.uiConfig.features.thumbTimer&&ze()&&a()==="video"&&!v()&&!s()&&!ki&&(e.uiConfig.hideThumbTimerAfterTouch&&!_()||!e.uiConfig.hideThumbTimerAfterTouch)),_n=e.uiConfig.titleShowBehaviour,yr=f(()=>!["video","thumb"].includes(a())||_n==="never"||y()?!1:_n==="fullscreen"?$():!0),ct=f(()=>_n==="always"||a()==="thumb"?!1:!v()),xt=q(!1),ho=f(()=>(yt()||e.showAutoplayNext&&x())&&!!le()&&!!$e()&&(e.showAds&&I()||!e.showAds)&&T()&&!s()&&!n(xt)&&!po),Ro=f(()=>R()&&!(v()||n(ho))&&!u()&&A()&&!P()),Jo=q(!1),_o=f(()=>E()!==null),{toggle:bo}=Jn,Ii=!1,$o=null;_t==null||_t.setContext(id());let Fr=()=>{e.autoplay&&!ki&&e.uiConfig.controls.showOnStartupAtAutoplay&&Hi(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:Fr});let xr=()=>{window.clearTimeout(Rn),On.set(!1)},$s=()=>{window.clearTimeout(pt),vn.set(null)},Hi=he=>{xr(),On.set(!0),Rn=window.setTimeout(()=>On.set(!1),he);let bt=he-100;tr=window.setTimeout(()=>{z()&&Dn.set(!1)},bt>0?bt:he)},ys=(he,bt)=>{$s(),vn.set(bt),pt=window.setTimeout(()=>vn.set(null),he)},rs=cn.subscribe(he=>{un.set(he),he&&(window.clearTimeout(Jt),Jt=window.setTimeout(()=>un.set(!1),e.uiConfig.controls.hide360IconTimeout))}),wr=async()=>{var bt,ai,Qt,To;let he=na();if(he){let no=kd(),Fo=en();he=no===Fo||no===st()}if(he){Hi(e.uiConfig.controls.hideTimeoutFullscreen);try{await(_t==null?void 0:_t.exit())}catch(no){St({message:String(no)})}}tt.set(he),e.store.getAdmanWrapper().setFullscreen(he),$()?(ai=(bt=e.store.callbacks)==null?void 0:bt.onFullscreenEnter)==null||ai.call(bt):(To=(Qt=e.store.callbacks)==null?void 0:Qt.onFullscreenExit)==null||To.call(Qt)},No=he=>{Pi.set(he)},Ur=()=>{if(n(vo)){let{width:he,height:bt}=n(vo).getBoundingClientRect();Pi.set({width:he,height:bt})}};Mt(()=>{var bt;return ku(wr),e.uiConfig.features.annotationsInside&&(Xt==null||Xt.init(n(vo))),_t==null||_t.assignPlayerContainer(n(vo)),_t==null||_t.setExternalEventHandlers({resize:No,leavepictureinpicture:Ur}),e.interactiveContainer&&((bt=At().parentElement)==null||bt.insertBefore(e.interactiveContainer,At().nextSibling)),()=>{window.clearTimeout(Rn),window.clearTimeout(tr),window.clearTimeout(pt),window.clearTimeout(Jt),rs(),_t==null||_t.dispose().catch(ai=>{St({message:String(ai)})}),Au(wr)}});let en=()=>{let he=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!$t()?n(vo):$t(),bt=he.getRootNode(),ai=bt instanceof ShadowRoot?bt.host:bt,Qt=Oe()instanceof HTMLElement&&Oe().contains(ai);return e.uiConfig.allowChangingFullscreenTarget&&Oe()&&Qt?Oe():he},tn=()=>{it.set(!1)},Fe=()=>{Dr(),tn()},Ct=async()=>{if(!gr()){St({message:"fullscreen disabled"});return}tn(),na()?(await Pu(document),St({message:"exit fullscreen"})):(St({message:"request fullscreen"}),await Eu(en()))},ui=he=>{y()||(he.preventDefault(),it.set(!0),Nr.set({left:he.clientX,top:he.clientY}))};function Do(){gn.set(!0),ki||Hi(e.uiConfig.controls.hideTimeoutCursor)}function yo(he){var To,no;let{relatedTarget:bt}=he,Qt=!!(bt&&((To=n(Oi))!=null&&To.contains(bt)))&&((no=qt())==null?void 0:no.isFocused());!ki&&!Qt&&(Dn.set(!0),Hi(e.uiConfig.controls.hideTimeoutCursor))}function Oo(){gn.set(!1),N(Xo,!1),N(hn,!1),Ii=!1,e.store.actions.internal.releaseCamera(),Hi(e.uiConfig.controls.hideTimeout),P()&&Bo()}function Fi(he){return he?he.offsetTop+Fi(he.offsetParent):0}function xo(he){return he?he.offsetLeft+xo(he.offsetParent):0}function Bn(he){if(F()&&Rr){let bt=he.currentTarget,ai=Fi(bt),Qt=xo(bt),To=he.pageX-Qt,no=he.pageY-ai,{left:Fo,bottom:Cs,right:Kr}=F(),Tr=Kr-Fo;return To>=Fo-Tr&&no<=Cs+Tr}}function Sr(he){if(n(vo)){let bt=Fi(he.currentTarget),ai=U().height,Qt=he.pageY-bt;if(Bn(he)){N(Xo,!1);return}Qt<40?N(Xo,!0):Qt>ai-40?N(hn,!0):(N(Xo,!1),m()||N(hn,!1))}}function wo(he){Sr(he),!n(Zo)&&!P()&&Hi(e.uiConfig.controls.hideTimeoutCursor),X()&&Ii&&$o&&e.store.actions.internal.moveCameraFocusPX($o.clientX-he.clientX,$o.clientY-he.clientY,he.timeStamp-$o.timeStamp),$o=he}let oo=null,bn=()=>{oo=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),xr()},e.uiConfig.doubleForwardActivationTime)},Bo=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),oo&&clearTimeout(oo),oo=null},Hn=he=>{he.preventDefault(),he.button===0&&(Ii=!0,e.store.actions.internal.holdCamera(),ae()&&bn()),!Ii&&Hi(e.uiConfig.controls.hideTimeoutCursor)},zr=he=>{he.preventDefault(),he.button===0&&($o=he,Ii=!1,e.store.actions.internal.releaseCamera()),!P()&&Hi(e.uiConfig.controls.hideTimeoutCursor)},Wr=he=>{he.preventDefault(),ir&&(St({message:"double click on video"}),Ct(),Hi(e.uiConfig.controls.hideTimeoutCursor))},Fn=he=>{var bt;if(he.preventDefault(),P()){Bo();return}if(oo&&Bo(),Z()||m()){Fe();return}if(!(T()&&!po)){if(n(_o))return bo();if((bt=qt())==null||bt.focus(),!fe()){e.firstStart(),Hi(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||re()!==Nb.PLAYING)&&e.store.actions.internal.togglePlay(),Hi(e.uiConfig.controls.hideTimeoutCursor)}},Xe=he=>{Fe(),io.set(!0),Hi(e.uiConfig.controls.hideTimeout),he&&ys(e.uiConfig.controls.hideHotKeyHelpers,he)},Yt=()=>{var he,bt;Fe(),(he=e.store.callbacks)!=null&&he.onOpenHotKeyMap?(bt=e.store.callbacks)==null||bt.onOpenHotKeyMap(J()):Mo.update(ai=>!ai)},_i=()=>{io.set(!0)},So=e.store.ui.contextMenu.openedByBtnKeyboard$,$n=e.store.ui.contextMenu.btnRef$,Un=q(void 0),Ho=e.store.ui.contextMenu.openedByHotKey$,or=e.store.ui.contextMenu.lastActiveElem$,ss=q(!1),Cr=e.store.ui.previewTrackActive;De(()=>{pn.set(n(go))}),De(()=>{N(Bi,n(Yi)&&re()!==Nb.PLAYING,!0),n(Yi)||Tt(()=>N(Yi,!0))}),De(()=>{var bt,ai;let he=(n(Bi)||T()||m()||we()||me()||ee()||_e()||n(ss))&&!n(Zo)&&(a()==="video"||a()==="ads")&&!s()&&A();Ri.set(he),!he&&!_e()&&((bt=n(Oi))!=null&&bt.contains(Ou()))&&((ai=qt())==null||ai.focus())}),De(()=>{!we()&&n(Jo)&&!u()&&Hi(e.uiConfig.controls.hideTimeoutCursor),Tt(()=>N(Jo,we(),!0))}),De(()=>{n(_r),m(),Ce(),Tt(()=>Nd(n(_r),m(),Ce()))}),De(()=>{n(Un),Z(),ge(),pe(),Tt(()=>{let he=ge()||pe();Nd(n(Un),Z(),he)})}),De(()=>{let he=Ke();he&&(Z(),Tt(()=>Vl(he,Z(),So)))}),De(()=>{let he=G();he&&(Z(),Tt(()=>L_(he,Z(),Ho)))}),De(()=>{var he;!D()&&$()&&(Tt(()=>Gt.set(!1)),(he=qt())==null||he.focus())}),De(()=>{y()&&Fe()});let xs=q(void 0),zs=he=>{mn.set(jn(vr(),{title:n(xs)},"title",he))},fa=(he,bt)=>{var no,Fo;let ai=(Fo=(no=e.store.callbacks)==null?void 0:no.uiInfo)==null?void 0:Fo.onUpcomingLiveViewStateChanged;if(!ai)return;let Qt=!!bt,To={...jn(n(vo),{upcomingLiveScreen:bt},"upcomingLiveScreen",Qt),...he};ai(To)},at="",si=f(()=>{var he;return n(ct)?at:(he=e.getVideoDeeplink)==null?void 0:he.call(e,qe())});De(()=>{at=n(si)});var Co=cT();lt("blur",Ia,Fe);var bi=ue(Co);bi.__mousemove=wo;var yn=C(bi);let xn=f(()=>a()==="ads"),ws=f(()=>n(_o)?bo:void 0);Ye(Qf(yn,{startDoubleForwardActivationTimer:bn,stopDoubleForward:Bo,toggleFullscreen:Ct,hideContextMenu:Fe,showHotKeyHelpers:Xe,showKeyMap:Yt,get isAds(){return n(xn)},get fakePlayButtonHandler(){return n(ws)},get nextButtonActive(){return Y()},get prevButtonActive(){return Pe()},children:(he,bt)=>{var ai=lT(),Qt=ue(ai);el(Qt,{get hideCursor(){return n(Ro)},onClick:Fn,onContextMenu:ui,onMouseDown:Hn,onMouseUp:zr,onDblClick:Wr,get videoContainer(){return At()},set videoContainer(Fo){At(Fo)}});var To=k(Qt,2);Ma(To,()=>"slot",!1,(Fo,Cs)=>{Ji(Fo,()=>({name:Ja}))});var no=k(To,2);As(no,K,Fo=>{var Cs=aT(),Kr=ue(Cs);let Tr=f(()=>a()!=="thumb"||s()||ki&&e.autoplay);ja(Kr,{get hidden(){return n(Tr)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:ui,onClick:tn});var ma=k(Kr,2);{var Ws=Ue=>{wv(Ue,{})};V(ma,Ue=>{se()&&Ue(Ws)})}var va=k(ma,2);yv(va,{});var qr=k(va,2);xv(qr,{get isVisible(){return P()}});var wn=k(qr,2);{var tl=Ue=>{let vi=f(()=>{var ro;return(ro=e.live)==null?void 0:ro.startTime});uc(Ue,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(vi)},onUpcomingLiveViewStateChanged:fa,onContextMenu:ui,onClick:tn})};V(wn,Ue=>{a()==="LiveWaitingStart"&&Ue(tl)})}var ga=k(wn,2);{var Qr=Ue=>{Xa(Ue,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:ui,onClick:tn})};V(ga,Ue=>{a()==="LiveWaitingRecover"&&Ue(Qr)})}var il=k(ga,2);{var Yl=Ue=>{Xa(Ue,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:ui,onClick:tn})};V(il,Ue=>{a()==="LiveWaitingRecord"&&Ue(Yl)})}var ha=k(il,2);{var jl=Ue=>{var vi=oT();let ro;var Ir=C(vi);Ad(Ir,{get adsSlotId(){return dt()},get adsParams(){return Et()},get adsAutoplayParam(){return jt()},get duration(){return Pt()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson}}),S(vi),O(on=>ro=oe(vi,1,"ads-container s-8",null,ro,on),[()=>({hidden:a()!=="ads"})]),b(Ue,vi)};V(ha,Ue=>{e.showAds&&fe()&&Ue(jl)})}var ol=k(ha,2);{var nl=Ue=>{let vi=f(()=>!yt()&&e.showAutoplayNext&&x());Wf(Ue,{get title(){return le()},get thumb(){return $e()},get isHide(){return n(vi)},clickCloseIcon:()=>N(xt,!0)})};V(ol,Ue=>{n(ho)&&le()&&$e()&&Ue(nl)})}var _a=k(ol,2);{var ut=Ue=>{let vi=f(()=>$()?"md":"sm"),ro=f(()=>{var Ir;return(Ir=e.store.callbacks)==null?void 0:Ir.onTitleClicked});Xm(Ue,{get title(){return e.title},get isHidden(){return n(ct)},onVisibilityChanged:zs,get titleLinkHref(){return n(si)},onMouseEnter:()=>{N(ss,!0)},onMouseLeave:()=>{N(ss,!1)},get size(){return n(vi)},get onTitleClicked(){return n(ro)},get ref(){return n(xs)},set ref(Ir){N(xs,Ir,!0)}})};V(_a,Ue=>{n(yr)&&Ue(ut)})}var ot=k(_a,2);{var ji=Ue=>{let vi=f(()=>a()==="video"&&v());dc(Ue,{get isShifted(){return n(vi)}})};V(ot,Ue=>{X()&&Ue(ji)})}var Io=k(ot,2);{var Xi=Ue=>{var vi=nT(),ro=C(vi);Pd(ro,{}),S(vi),b(Ue,vi)};V(Io,Ue=>{xe()&&Ue(Xi)})}var mi=k(Io,2);{var zi=Ue=>{cc(Ue,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Be()},onClick:Fn,onContextMenu:ui,onDblClick:Wr})};V(mi,Ue=>{ee()&&Ue(zi)})}var Ks=k(mi,2);{var Xl=Ue=>{Ga(Ue,{get shifted(){return v()},get captions(){return ne()},get position(){return ce()},get playerSize(){return U()}})};V(Ks,Ue=>{et().value!=="off"&&Ue(Xl)})}var Ec=k(Ks,2);{var hp=Ue=>{var vi=rT();vi.__contextmenu=ui,vi.__click=[iT,Z,it,m,hi,Fe];var ro=C(vi);Ya(ro,{}),S(vi),b(Ue,vi)};V(Ec,Ue=>{s()&&Ue(hp)})}var Pc=k(Ec,2);{var _p=Ue=>{let vi=f(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),ro=f(()=>a()==="ads"),Ir=f(()=>e.canRewindLive&&Re()!==0);ac(Ue,{get bottomHidden(){return n(vi)},get bottomNoSmooth(){return z()},get showControls(){return v()},get isAds(){return n(ro)},get canRewindLive(){return n(Ir)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Dt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Ut()},get nextButtonActive(){return Y()},get prevButtonActive(){return Pe()},get isOneVideoPlaylist(){return Me()},customFullscreenSupported:ir,toggleFullscreen:Ct,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(hr)},set playerControlsWrapperRef(on){N(hr,on,!0)},get playerControlsRef(){return n(Oi)},set playerControlsRef(on){N(Oi,on,!0)}})};V(Pc,Ue=>{fe()&&Ue(_p)})}var kc=k(Pc,2);{var bp=Ue=>{var vi=sT(),ro=C(vi);let Ir=f(()=>{var on;return(on=n(Oi))==null?void 0:on.clientHeight});mc(ro,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(Ir)},returnFocus:()=>{var on;return(on=qt())==null?void 0:on.focus()},get ref(){return n(_r)},set ref(on){N(_r,on,!0)}}),S(vi),b(Ue,vi)};V(kc,Ue=>{!ee()&&a()!=="ads"&&Ue(bp)})}var Ac=k(kc,2);let $p=f(()=>!n($r));Vd(Ac,{get isLive(){return Ae()},get isHidden(){return n($p)},get isPlaying(){return Ze()},get position(){return ce()},get duration(){return Re()}});var ba=k(Ac,2);Ym(ba,{get data(){return vn}});var Lc=k(ba,2);zf(Lc,{get supportLink(){return e.supportLink},returnFocus:()=>{var Ue;return(Ue=qt())==null?void 0:Ue.focus()},get visible(){return Z()},get playerContainerRef(){return n(vo)},get position(){return Ee()},get menuElementRef(){return n(Un)},set menuElementRef(Ue){N(Un,Ue,!0)}});var qs=k(Lc,2);{var rl=Ue=>{vc(Ue,{onClose:Nn,onSelectAutoQuality:()=>{bs("auto"),Nn()}})};V(qs,Ue=>{n(Hr)&&Ue(rl)})}var Mc=k(qs,2);{var Vc=Ue=>{Sv(Ue,{})};V(Mc,Ue=>{Te()&&Ue(Vc)})}var sl=k(Mc,2);{var Rc=Ue=>{Ha(Ue,{})};V(sl,Ue=>{n(er)&&Ue(Rc)})}var Nc=k(sl,2);{var Dc=Ue=>{jf(Ue,{})};V(Nc,Ue=>{He()&&Ue(Dc)})}var yp=k(Nc,2);{var xp=Ue=>{Bd(Ue,{})};V(yp,Ue=>{It()&&Ue(xp)})}b(Fo,Cs)}),b(he,ai)},$$slots:{default:!0}}),he=>qt(he),()=>qt());var Ss=k(yn,2);Ye(Ss,he=>N(go,he),()=>n(go)),S(bi),Ye(bi,he=>N(vo,he),()=>n(vo));var Ui=k(bi,2);{var Ci=he=>{var bt=dT();b(he,bt)};V(Ui,he=>{wt()&&he(Ci)})}lt("mouseenter",bi,Do),lt("mouseleave",bi,Oo),lt("click",bi,_i,!0),lt("focusin",bi,yo,!0),b(t,Co),H(),o()}Qe(["mousemove","contextmenu","click"]);import{clientChecker as hc,PlaybackState as yT}from"@vkontakte/videoplayer-core/es2018";import{noop as xT}from"@vkontakte/videoplayer-shared/es2018";var pT=L('<div></div> <div class="info s-j"><div class="triangles-wrapper s-j"><div></div> <div></div> <div></div></div> <p class="step-caption s-j"> </p></div>',1),fT=L("<div><!></div>"),mT={hash:"s-j",code:".double-click-area.s-j{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-j{left:0}.double-click-area.right.s-j{right:0}.semicircle.s-j{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-j{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-j{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-j{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-j,.triangles-wrapper.s-j{display:flex;justify-content:center}.triangles-wrapper.s-j{margin-bottom:10px;position:relative}.triangle.s-j{animation:s-j-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-j:nth-child(3),.triangle.right.s-j:first-child{animation-delay:0s}.triangle.left.s-j:nth-child(2),.triangle.right.s-j:nth-child(2){animation-delay:.1s}.triangle.left.s-j:first-child,.triangle.right.s-j:nth-child(3){animation-delay:.2s}@keyframes s-j-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-j{border-right:8px solid var(--white)}.triangle.right.s-j{border-left:8px solid var(--white)}.triangle.s-j:not(:last-child){margin-right:5px}.step-caption.s-j{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function sp(t,e){B(e,!0),Q(t,mT);let i=h(e,"seekStep",3,0),o=q(!1),r=0,a=0,l=q(li(i())),d=p=>{p.stopPropagation(),a+=1,N(l,i()*(a-1)),a===1?e.handleSingleFirstClick(p):(N(o,!0),e.handleSecondClick()),window.clearTimeout(r),r=window.setTimeout(()=>{a=0,N(o,!1)},300)};sn(()=>{window.clearTimeout(r)});var s=fT();s.__click=d;var u=C(s);{var m=p=>{var v=pT(),_=ue(v),y=k(_,2),$=C(y),x=C($),I=k(x,2),T=k(I,2);S($);var R=k($,2),A=C(R,!0);S(R),S(y),O(P=>{var E,z,F,U;oe(_,1,`semicircle ${(E=e.side)!=null?E:""}`,"s-j"),oe(x,1,`triangle ${(z=e.side)!=null?z:""}`,"s-j"),oe(I,1,`triangle ${(F=e.side)!=null?F:""}`,"s-j"),oe(T,1,`triangle ${(U=e.side)!=null?U:""}`,"s-j"),ve(A,P)},[()=>j("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),b(p,v)};V(u,p=>{n(o)&&p(m)})}S(s),O(()=>{var p;return oe(s,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-j")}),b(t,s),H()}Qe(["click"]);var vT=(t,e,i)=>{e(!1),i()},gT=L('<div class="overlay s-i"></div> <div class="next-video s-i"><div class="top s-i"><div class="caption s-i"> </div> <!></div> <div class="row s-i"><div class="column s-i"><div class="thumb s-i"><div></div> <!></div></div> <div class="column s-i"><div class="title s-i"> </div></div></div></div>',1),hT={hash:"s-i",code:".overlay.s-i{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-i{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-i{display:flex;justify-content:space-between}.caption.s-i{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-i{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-i{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-i{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-i,.thumb-overlay.s-i{height:100%;width:100%}.thumb-overlay.s-i{position:absolute}.thumb-overlay.withOpacity.s-i{background:var(--black);opacity:.3}.title.s-i{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Tv(t,e){B(e,!0),Q(t,hT);let[i,o]=Ne(),r=()=>w(d,"$autoplayNextEnabled$",i),a=()=>w(s,"$timerNextVideoRunning$",i),l=be(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,m=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,_=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),v()},$=()=>{e.clickCloseIcon(),_()};Mt(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),v())});var x=Le(),I=ue(x);{var T=R=>{var A=gT(),P=k(ue(A),2),E=C(P),z=C(E),F=C(z,!0);S(z);var U=k(z,2);Rs(U,{onClick:$}),S(E);var X=k(E,2);X.__click=[vT,u,p];var ae=C(X),Z=C(ae),re=C(Z);let J;var we=k(re,2);{var me=ge=>{Hd(ge,{get isRunning(){return a()},onTimerEnded:y})};V(we,ge=>{r()&&ge(me)})}S(Z),S(ae);var ee=k(ae,2),_e=C(ee),Ce=C(_e,!0);S(_e),S(ee),S(X),S(P),O((ge,pe)=>{ve(F,ge),We(Z,`background-image: url('${e.thumb}')`),J=oe(re,1,"thumb-overlay s-i",null,J,pe),ve(Ce,e.title)},[()=>r()?j("end_screen_next_video"):j("end_screen_recommended_video"),()=>({withOpacity:r()})]),b(R,A)};V(I,R=>{e.isHide||R(T)})}b(t,x),H(),o()}Qe(["click"]);import{clientChecker as _T}from"@vkontakte/videoplayer-core/es2018";var Db=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Mt(()=>{_T.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))}),sn(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as bT}from"@vkontakte/videoplayer-core/es2018";var ap=class{constructor(e){this.video=e}getTracksArray(){return Array.from(this.video.getElementsByTagName("track"))}attach(e,i=!1){let o=document.createElement("track");o.setAttribute("src",e.url),o.setAttribute("id",e.id),e.label&&o.setAttribute("label",e.label),e.language&&o.setAttribute("srclang",e.language),i&&(o.track.mode="showing"),this.video.appendChild(o)}detachAll(){for(let e of this.getTracksArray())this.video.removeChild(e)}updateSrc(e){let i=this.getTracksArray().find(o=>o.id===e.id);i&&(i.src=e.url)}getCurrentShowingId(){var e,i;return(i=(e=this.getTracksArray().find(o=>o.track.mode==="showing"))==null?void 0:e.id)!=null?i:null}};import{clientChecker as $T}from"@vkontakte/videoplayer-core/es2018";var Ob=({store:t,getFullscreenTarget:e})=>{let{isFullscreen:i}=t.ui,{setSubtitle:o}=t.actions.internal,{currentSubtitle$:r,availableSubtitlesList$:a,currentFormat$:l,availableTextTracks$:d}=t.state,s=null,u=()=>e().querySelector("video"),m=()=>$T.device.isIOS&&ye(l)===bT.DASH_LIVE_CMAF,p=()=>{s==null||s(),s=null},v=_=>{if(p(),!m()||!_)return;let y=u();if(!y)return;let $=new ap(y),x=ye(d),I=ye(a),T=ye(r);for(let P of x)I.some(z=>z.value===P.id)&&$.attach(P,T.value===P.id);let R=d.subscribe(P=>{for(let E of P)$.updateSrc(E)}),A=()=>{let P=$.getCurrentShowingId();o(ye(a).find(E=>E.value===P))};y.textTracks.addEventListener("change",A),s=()=>{R(),$.detachAll(),y.textTracks.removeEventListener("change",A)}};Mt(()=>i.subscribe(v)),sn(p)};var wT=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},ST=L("<!> <!>",1),CT=L("<div><!></div>"),TT=L('<div class="spherical-video-icon s-7"><!></div>'),IT=L("<div><!></div>"),ET=L('<div class="settings-mobile s-7"><!></div>'),PT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),kT=L('<div class="player-wrapper s-7" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),AT={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 Iv(t,e){var _n,yr;B(e,!0),Q(t,AT);let[i,o]=Ne(),r=()=>w(Me,"$playerPhase",i),a=()=>w(ci,"$isLoaderVisible",i),l=()=>w(Pe,"$adPlaybackState",i),d=()=>w(Zt,"$crashed",i),s=()=>w(bs,"$notificationsToShow$",i),u=()=>w(Y,"$playbackState$",i),m=()=>w(Pt,"$graphIsOpened$",i),p=()=>w(Oe,"$interactiveHideMobileControls",i),v=()=>w(Vi,"$isEnded$",i),_=()=>w(ft,"$isInteractiveExpectation$",i),y=()=>w($t,"$controlsVisible",i),$=()=>w(nt,"$touched",i),x=()=>w(Pi,"$autoplayNextEnabled$",i),I=()=>w(pi,"$postrollPassed",i),T=()=>w(Or,"$bottomNoSmooth",i),R=()=>w(it,"$videoSize",i),A=()=>w(vt,"$playerSize",i),P=()=>w(st,"$isFullscreen",i),E=()=>w(le,"$position$",i),z=()=>w($e,"$duration$",i),F=()=>w(cn,"$loadedMetadata",i),U=()=>w(ze,"$settingsMenuVisible",i),X=()=>w(qt,"$scrubbingInProgress",i),ae=()=>w(St,"$volumeChangingInProgress",i),Z=()=>w(Rt,"$chromecastConnected$",i),re=()=>w(fe,"$isControlsAvailable",i),J=()=>w(ri,"$isInteractiveTime$",i),we=()=>w(Ri,"$isActiveLive",i),me=()=>w(yt,"$settingsMenuOpenedByKeyboard",i),ee=()=>w(Ut,"$language$",i),_e=()=>w(_t,"$disabledControls$",i),Ce=()=>w(Ot,"$is3DVideo",i),ge=()=>w(W,"$icon3DVideoVisible",i),pe=()=>w(uo,"$chromecastDeviceName$",i),Ke=()=>w(Si,"$currentSubtitle$",i),G=()=>w(Yo,"$currentSubtitleCaptions$",i),D=()=>w(Lo,"$realDuration$",i),qe=()=>w(tt,"$isLive$",i),K=()=>w(Gt,"$isPlaying$",i),se=()=>w(ni,"$debugPanelVisible",i),xe=h(e,"videoContainer",15),Be=h(e,"adsSlotId",3,void 0),et=h(e,"adsParams",3,void 0),ne=h(e,"adsAutoplayParam",3,void 0),ce=h(e,"duration",3,void 0),Re=h(e,"logoTargetUrl",3,""),Ae=h(e,"showNextPrevButtons",3,!1),Ze=h(e,"nextButtonActive",3,!1),Ee=h(e,"prevButtonActive",3,!1),Te=h(e,"endScreenVideoTitle",3,void 0),He=h(e,"endScreenVideoThumb",3,void 0),It=h(e,"isOneVideoPlaylist",3,!1),wt=h(e,"showMiniTimer",3,!1),At=h(e,"fullScreenTarget",3,void 0),dt=h(e,"playerStarted",3,!1),Et=h(e,"showEndScreen",3,!0),{notifications$:jt,graphIsOpened$:Pt}=mo(),Dt=e.store.getLogger().createComponentLog("Root component"),Ut=e.store.interfaceLanguage$,Y=e.store.state.playbackState$,Pe=e.store.ads.playbackState,le=e.store.state.positionWithScrubbing$,$e=e.store.state.duration$,Me=e.store.playerPhase,st=e.store.ui.isFullscreen,$t=e.store.ui.controlsVisible,fe=e.store.ui.isControlsAvailable,Oe=e.store.ui.interactiveHideMobileControls,ze=e.store.ui.settingsMenu.visible$,yt=e.store.ui.settingsMenu.openedByBtnKeyboard$,qt=e.store.ui.scrubbingInProgress,St=e.store.ui.volumeChangingInProgress,ni=e.store.ui.debugPanelVisible,ci=e.store.state.isLoaderVisible,Vi=e.store.state.isEnded$,Rt=e.store.state.chromecastConnected$,uo=e.store.state.chromecastDeviceName$,pi=e.store.ads.postrollPassed,tt=e.store.state.isLive$,Gt=e.store.state.isPlaying$,Ri=e.store.state.isActiveLive$,hi=e.store.state.isRewindableLive$,Zt=e.store.state.crashed$,yi=e.store.webApi.annotationsApi,rt=e.store.webApi.pictureInPictureApi,it=e.store.state.videoSize$,Si=e.store.state.currentSubtitle$,Yo=e.store.state.currentSubtitleCaptions$,Lo=e.store.state.duration$,vt=e.store.ui.playerSize,Ot=e.store.ui.is3DVideo,W=e.store.ui.icon3DVideoVisible,Lt=e.store.state.isInteractive,ri=e.store.state.isInteractiveTime$,ft=e.store.state.isInteractiveExpectation$,Xt=e.store.state.hasInteractiveBranches,_t=e.store.ui.controls.disabledControls$,nt=e.store.ui.touched,Ni=e.store.ui.overlayContainer$,Pi=e.store.ui.autoplayNextEnabled$,cn=e.store.state.loadedMetadata$,un=e.store.actions.internal.closeSettingsMenu,ki=(_n=e.store.callbacks)==null?void 0:_n.onDisabledPlayPrevChapterClick,Di=(yr=e.store.callbacks)==null?void 0:yr.onDisabledSeekToInteractiveClick,Mn=e.store.actions.internal.setQuality,po=q(void 0),io=q(void 0),Ti=q(void 0),Mo=q(void 0),Vo,pn,Vr=f(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),Rr=q(void 0),{closeNotification:Nr,notificationsToShow$:bs}=jt,Dr=f(()=>!!s().slow_video),Zn=()=>Nr("slow_video"),Or=de(!1),fn,mn=q(!1),fr=f(()=>u()!==yT.PLAYING),mr=q(!1),jo=f(()=>m()||p()||!n(mn)&&(v()&&!!Xt||n(fr)&&_())),vr=q(!0),gr=f(()=>e.uiConfig.features.thumbTimer&&wt()&&r()==="video"&&!y()&&!d()&&!Lt&&(e.uiConfig.hideThumbTimerAfterTouch&&!$()||!e.uiConfig.hideThumbTimerAfterTouch)),Jn=q(!1),Vn=f(()=>(Et()||e.showAutoplayNext&&x())&&!!Te()&&!!He()&&(e.showAds&&I()||!e.showAds)&&v()&&!d()&&!n(Jn)),ns=q(!1);rt==null||rt.setContext(id());let vo=ct=>{ct&&!Lt&&Oi(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:vo});let hr=()=>{clearTimeout(Vo),N(mn,!1),p()&&Oe.set(!1)},Oi=ct=>{hr(),N(mn,!0),Vo=setTimeout(()=>N(mn,!1),ct);let xt=ct-100;fn=setTimeout(()=>{T()&&Or.set(!1)},xt>0?xt:ct)},_r=Ot.subscribe(ct=>{W.set(ct),ct&&(clearTimeout(pn),pn=setTimeout(()=>W.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Rn=async(ct=na())=>{var xt,ho,Ro,Jo,_o,bo;if(ct&&!hc.device.isIOS){let Ii=kd(),$o=Nn(),Fr=hc.browser.isSamsungBrowser&&Ii===e.shadowRootContainer;ct=Ii===$o||Fr}if(ct){Oi(e.uiConfig.controls.hideTimeoutFullscreen);try{await(rt==null?void 0:rt.exit())}catch(Ii){Dt({message:String(Ii)})}try{let Ii=(xt=R())!=null&&xt.width&&((ho=R())!=null&&ho.height)?R():A();await w_(Ii)}catch(Ii){Dt({message:String(Ii)})}}st.set(ct),e.store.getAdmanWrapper().setFullscreen(ct),P()?(Jo=(Ro=e.store.callbacks)==null?void 0:Ro.onFullscreenEnter)==null||Jo.call(Ro):(bo=(_o=e.store.callbacks)==null?void 0:_o.onFullscreenExit)==null||bo.call(_o)},pt=ct=>{vt.set(ct)},Jt=()=>{if(n(po)){let{width:ct,height:xt}=n(po).getBoundingClientRect();vt.set({width:ct,height:xt})}};Mt(()=>{var ct;return ku(Rn),e.uiConfig.features.annotationsInside&&(yi==null||yi.init(n(po))),rt==null||rt.assignPlayerContainer(n(po)),rt==null||rt.setExternalEventHandlers({resize:pt,leavepictureinpicture:Jt}),N(vr,!hc.device.isIphoneOrOldIpad),e.interactiveContainer&&((ct=xe().parentElement)==null||ct.insertBefore(e.interactiveContainer,xe().nextSibling)),()=>{clearTimeout(Vo),clearTimeout(fn),clearTimeout(pn),_r(),rt==null||rt.dispose().catch(xt=>{Dt({message:String(xt)})}),Au(Rn)}});let br=q(!0),Br=q(!0),Hr=ct=>{let xt=E()+(ct==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;xt<0?(N(br,!1),xt=0):xt>=z()&&(N(Br,!1),xt=z()),N(mr,!0),e.seekTime(xt)},Nn=()=>hc.device.isIOS?n(po):!e.uiConfig.allowChangingFullscreenTarget||!At()?e.outerContainerRef:At().contains(e.outerContainerRef)?At():e.outerContainerRef,er=async()=>{try{if(na())await Pu(document),Dt({message:"exit fullscreen"});else{if(Dt({message:"request fullscreen"}),hc.device.isIOS&&!F())return;await Eu(Nn())}}catch(ct){Dt({message:String(ct)})}},go=()=>{un()},Dn=ct=>{if(ct.preventDefault(),U()){go();return}if(!dt()){e.firstStart(),Oi(e.uiConfig.controls.hideTimeoutCursor);return}N(mr,!1),y()?hr():Oi(e.uiConfig.controls.hideTimeoutMobile)},tr=()=>{nt.set(!0)},On=()=>{Lt||(Or.set(!0),Oi(e.uiConfig.controls.hideTimeoutCursor))},vn=ct=>{ki&&(ki(ct),Oi(e.uiConfig.controls.hideTimeoutMobile))},gn=ct=>{Di&&(Di(ct),Oi(e.uiConfig.controls.hideTimeoutMobile))};De(()=>{Ni.set(n(Rr))}),De(()=>{$t.set((n(fr)||U()||X()||ae()||Z()||!n(Vn)&&(v()||n(mn)&&!n(mr)))&&!n(jo)&&r()==="video"&&!d()&&re())}),De(()=>{!X()&&n(ns)&&!J()&&Oi(e.uiConfig.controls.hideTimeoutMobile),N(ns,X(),!0)}),De(()=>{N(br,E()>0),N(Br,!we()&&E()<z(),!0)}),De(()=>{Nd(n(Mo),U(),me(),!0)});let hn=j("aria_label_video_player");Db({fullScreenChangeHandler:Rn,getFullscreenTarget:Nn}),Ob({store:e.store,getFullscreenTarget:Nn});let Xo=(ct,xt)=>{var _o,bo;let ho=(bo=(_o=e.store.callbacks)==null?void 0:_o.uiInfo)==null?void 0:bo.onUpcomingLiveViewStateChanged;if(!ho)return;let Ro=!!xt,Jo={...jn(n(po),{upcomingLiveScreen:xt},"upcomingLiveScreen",Ro),...ct};ho(Jo)};var Bi=kT();lt("blur",Ia,go);var Yi=C(Bi);el(Yi,{onClick:Dn,get videoContainer(){return xe()},set videoContainer(ct){xe(ct)}});var Zo=k(Yi,2);Ma(Zo,()=>"slot",!1,(ct,xt)=>{Ji(ct,()=>({name:Ja}))});var ir=k(Zo,2);As(ir,ee,ct=>{var xt=PT(),ho=ue(xt);let Ro=f(()=>r()!=="thumb"||d()||Lt&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);ja(ho,{get hidden(){return n(Ro)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var Jo=k(ho,2);{var _o=Xe=>{var Yt=ST(),_i=ue(Yt);{var So=Ho=>{let or=f(()=>e.uiConfig.controls.seekStepMobile/1e3);sp(Ho,{side:"left",get seekStep(){return n(or)},handleSingleFirstClick:Dn,handleSecondClick:()=>Hr("backward")})};V(_i,Ho=>{n(br)&&Ho(So)})}var $n=k(_i,2);{var Un=Ho=>{let or=f(()=>e.uiConfig.controls.seekStepMobile/1e3);sp(Ho,{side:"right",get seekStep(){return n(or)},handleSingleFirstClick:Dn,handleSecondClick:()=>Hr("forward")})};V($n,Ho=>{n(Br)&&Ho(Un)})}b(Xe,Yt)};V(Jo,Xe=>{e.canRewindLive&&hi&&!_e().has("TIMELINE")&&Xe(_o)})}var bo=k(Jo,2);{var Ii=Xe=>{let Yt=f(()=>{var _i;return(_i=e.live)==null?void 0:_i.startTime});uc(Xe,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(Yt)},onUpcomingLiveViewStateChanged:Xo})};V(bo,Xe=>{r()==="LiveWaitingStart"&&Xe(Ii)})}var $o=k(bo,2);{var Fr=Xe=>{Xa(Xe,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};V($o,Xe=>{r()==="LiveWaitingRecover"&&Xe(Fr)})}var xr=k($o,2);{var $s=Xe=>{Xa(Xe,{kind:"record",get thumbUrl(){return e.thumbUrl}})};V(xr,Xe=>{r()==="LiveWaitingRecord"&&Xe($s)})}var Hi=k(xr,2);{var ys=Xe=>{var Yt=CT();let _i;var So=C(Yt);Ad(So,{get adsSlotId(){return Be()},get adsParams(){return et()},get adsAutoplayParam(){return ne()},get duration(){return ce()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson}}),S(Yt),O($n=>_i=oe(Yt,1,"ads-container s-7",null,_i,$n),[()=>({hidden:r()!=="ads"})]),b(Xe,Yt)};V(Hi,Xe=>{e.showAds&&dt()&&Xe(ys)})}var rs=k(Hi,2);{var wr=Xe=>{let Yt=f(()=>!Et()&&e.showAutoplayNext&&x());Tv(Xe,{get title(){return Te()},get thumb(){return He()},get isHide(){return n(Yt)},clickCloseIcon:()=>N(Jn,!0)})};V(rs,Xe=>{n(Vn)&&Te()&&He()&&Xe(wr)})}var No=k(rs,2);{var Ur=Xe=>{dc(Xe,{})};V(No,Xe=>{Ce()&&Xe(Ur)})}var en=k(No,2);{var tn=Xe=>{var Yt=TT(),_i=C(Yt);Pd(_i,{}),S(Yt),b(Xe,Yt)};V(en,Xe=>{ge()&&Xe(tn)})}var Fe=k(en,2);{var Ct=Xe=>{cc(Xe,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return pe()},onClick:Dn})};V(Fe,Xe=>{Z()&&Xe(Ct)})}var ui=k(Fe,2);{var Do=Xe=>{Ga(Xe,{get shifted(){return y()},get captions(){return G()},get position(){return E()},get playerSize(){return A()},isMobile:!0})};V(ui,Xe=>{Ke().value!=="off"&&Xe(Do)})}var yo=k(ui,2);{var Oo=Xe=>{var Yt=IT();Yt.__click=[wT,U,ze,go];var _i=C(Yt);Ya(_i,{}),S(Yt),b(Xe,Yt)};V(yo,Xe=>{d()&&Xe(Oo)})}var Fi=k(yo,2);{var xo=Xe=>{let Yt=f(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),_i=f(()=>r()==="ads"),So=f(()=>e.canRewindLive&&D()!==0);ac(Xe,{get bottomHidden(){return n(Yt)},get showControls(){return y()},get bottomNoSmooth(){return T()},get isAds(){return n(_i)},get canRewindLive(){return n(So)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Re()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Ae()},get nextButtonActive(){return Ze()},get prevButtonActive(){return Ee()},get isOneVideoPlaylist(){return It()},get customFullscreenSupported(){return n(vr)},get endScreenShown(){return n(Vn)},toggleFullscreen:er,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:vn,onDisabledSeekToInteractiveClick:gn,get playerControlsWrapperRef(){return n(io)},set playerControlsWrapperRef($n){N(io,$n,!0)},get playerControlsRef(){return n(Ti)},set playerControlsRef($n){N(Ti,$n,!0)}})};V(Fi,Xe=>{dt()&&Xe(xo)})}var Bn=k(Fi,2);{var Sr=Xe=>{var Yt=ET(),_i=C(Yt);mc(_i,{get supportLink(){return e.supportLink},get returnFocus(){return xT},get ref(){return n(Mo)},set ref(So){N(Mo,So,!0)}}),S(Yt),b(Xe,Yt)};V(Bn,Xe=>{U()&&Xe(Sr)})}var wo=k(Bn,2);let oo=f(()=>!n(gr));Vd(wo,{get isLive(){return qe()},get isHidden(){return n(oo)},get isPlaying(){return K()},get position(){return E()},get duration(){return z()}});var bn=k(wo,2);{var Bo=Xe=>{Ha(Xe,{})};V(bn,Xe=>{n(Vr)&&Xe(Bo)})}var Hn=k(bn,2);{var zr=Xe=>{Bd(Xe,{})};V(Hn,Xe=>{se()&&Xe(zr)})}var Wr=k(Hn,2);{var Fn=Xe=>{vc(Xe,{onClose:Zn,onSelectAutoQuality:()=>{Mn("auto"),Zn()}})};V(Wr,Xe=>{n(Dr)&&Xe(Fn)})}b(ct,xt)});var $r=k(ir,2);Ye($r,ct=>N(Rr,ct),()=>n(Rr)),S(Bi),Ye(Bi,ct=>N(po,ct),()=>n(po)),O(()=>Ve(Bi,"aria-label",hn)),lt("click",Bi,tr,!0),lt("focusin",Bi,On,!0),b(t,Bi),H(),o()}Qe(["click"]);function lp(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 LT}from"@vkontakte/videoplayer-shared/es2018";var MT=L('<div class="time-container s-6"><!></div>'),VT=L('<div class="player-wrapper s-6" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),RT={hash:"s-6",code:".player-wrapper.s-6{height:100%;position:absolute;width:100%}.player-wrapper.s-6 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.timeline.s-6{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-6{opacity:1}.time-container.s-6{bottom:8px;position:absolute;right:8px;z-index:var(--thumb-timer-z-index)}"};function Ev(t,e){B(e,!0),Q(t,RT);let[i,o]=Ne(),r=()=>w(J,"$scrubbingInProgress",i),a=()=>w(Z,"$playerSize",i),l=()=>w(E,"$isPlaying$",i),d=()=>w(A,"$duration$",i),s=()=>w(U,"$positionWithScrubbing$",i),u=()=>w(T,"$playerPhase",i),m=()=>w(R,"$crashed$",i),p=()=>w(z,"$currentSubtitle$",i),v=()=>w(F,"$currentSubtitleCaptions$",i),_=()=>w(P,"$positionExact$",i),y=()=>w(X,"$isLive$",i),$=()=>w(ae,"$isRewindableLive$",i),x=h(e,"outsideDuration",3,0),I=h(e,"videoContainer",15),{playerPhase:T,state:{crashed$:R,duration$:A,positionExact$:P,isPlaying$:E,currentSubtitle$:z,currentSubtitleCaptions$:F,positionWithScrubbing$:U,isLive$:X,isRewindableLive$:ae},ui:{playerSize:Z,controls:re,scrubbingInProgress:J},actions:{internal:{getVideoElement:we}}}=be(),me=8,ee=q(!1),_e=li({}),Ce=q(!1),ge=f(()=>!r()&&!n(Ce)),pe=()=>{N(ee,!0)},Ke=()=>{N(ee,!1)},G=LT(Wl,260);De(()=>{a(),G(we(),re,_e,n(ee))});let D=f(()=>l()?Go(d()-s()):Go(isFinite(d())?d():x()));var qe=VT(),K=C(qe);el(K,{hideCursor:!1,get videoContainer(){return I()},set videoContainer(Te){I(Te)}});var se=k(K,2);Ma(se,()=>"slot",!1,(Te,He)=>{Ji(Te,()=>({name:Ja}))});var xe=k(se,2);let Be=f(()=>u()!=="thumb"||m());ja(xe,{get hidden(){return n(Be)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var et=k(xe,2);{var ne=Te=>{Ga(Te,{shifted:!1,get captions(){return v()},get position(){return _()},get playerSize(){return a()}})};V(et,Te=>{p().value!=="off"&&n(ge)&&Te(ne)})}var ce=k(et,2);{var Re=Te=>{var He=MT(),It=C(He);Md(It,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(D)}}),S(He),b(Te,He)};V(ce,Te=>{n(ge)&&Te(Re)})}var Ae=k(ce,2);let Ze;var Ee=C(Ae);qa(Ee,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return $()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:me,tooltipRightOffset:me,get ref(){return _e.timeline},set ref(Te){_e.timeline=Te}}),S(Ae),S(qe),O(Te=>Ze=oe(Ae,1,"timeline s-6",null,Ze,Te),[()=>({visible:n(ee)})]),lt("mouseenter",qe,pe),lt("mouseleave",qe,Ke),lt("mouseenter",Ae,()=>N(Ce,!0)),lt("mouseleave",Ae,()=>N(Ce,!1)),b(t,qe),H(),o()}var HT=L("<div><!></div>"),FT={hash:"s-0",code:'.vk-vp-root.s-0{--white:#fff;--black:#000;--red:#ff3347;--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px;--interactive-episode-complete:#5c9ce6;--slider-bg:hsla(0,0%,100%,.4);--slider-filled-bg:var(--white);--slider-handle-bg:var(--white);--slider-loaded-bg:hsla(0,0%,100%,.4);--slider-height:3px;--slider-video-episode-gap:1.5px;--slider-radius:0px;--slider-handle-size:12px;--slider-filled-ads:#67a5eb;--slider-disabled-color:hsla(0,0%,97%,.31);--slider-volume-height:5px;--slider-volume-radius:calc(var(--slider-volume-height)/2);--slider-volume-handle-size:13px;--timeline-slider-filled-active-live-bg:var(--red);--timeline-slider-handle-active-live-bg:var(--red);--timeline-slider-bg:var(--slider-bg);--timeline-slider-filled-bg:var(--slider-filled-bg);--timeline-slider-handle-bg:var(--slider-handle-bg);--timeline-slider-loaded-bg:var(--slider-loaded-bg);--volume-slider-bg:var(--slider-bg);--volume-slider-filled-bg:var(--slider-filled-bg);--volume-slider-handle-bg:var(--slider-handle-bg);--controls-time:var(--white);--controls-gradient:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.005) 6.67%,rgba(0,0,0,.02) 13.33%,rgba(1,1,1,.04) 20%,rgba(1,1,1,.07) 26.67%,rgba(2,2,2,.11) 33.33%,rgba(3,3,3,.16) 40%,rgba(4,4,4,.22) 46.67%,rgba(6,6,6,.28) 53.33%,rgba(7,7,7,.33) 60%,rgba(8,8,8,.38) 66.67%,rgba(9,9,9,.42) 73.33%,rgba(9,9,9,.46) 80%,hsla(0,0%,4%,.48) 86.67%,hsla(0,0%,4%,.5));--timeline-preview-shadow:rgba(0,0,0,.08);--timeline-preview-bg:#222;--timeline-padding-horizontal:10px;--timeline-padding-vertical-top:3px;--timeline-padding-vertical-bottom:4px;--timeline-height:calc(var(--timeline-padding-vertical-bottom) + var(--timeline-padding-vertical-top) + var(--slider-height));--preview-track-frame-height-vertical:114px;--preview-track-frame-height-horizontal:65px;--preview-track-controls-top:16px;--preview-track-time-line-height:16px;--preview-track-bottom-offset:10px;--preview-track-height:calc(var(--preview-track-frame-height-vertical) + var(--preview-track-bottom-offset));--preview-track-controls-top-offset:calc(var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height));--settings-bg:rgba(0,0,0,.72);--settings-item-bg-hover:hsla(0,0%,100%,.08);--settings-radius:8px;--mobile-settings-bg:#2c2d2e;--divider-border:1px solid var(--white-alpha-24);--toggle-color-separator:#363738;--toggle-color-off:#656565;--toggle-color-on:#71aaeb;--toggle-color-autoplay-on:var(--white);--notification-bg:#2c2d2e;--notification-radius:8px;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--controls-container-z-index:1;--ads-container-z-index:1;--end-screen-mobile-z-index:1;--notification-z-index:1;--thumb-timer-z-index:2;--debug-panel-z-index:2;--modal-z-index:2;--settings-menu-z-index:2;--context-menu-z-index:3;--hot-key-helpers-container-z-index:3;--overlay-container-z-index:4;--rotate-transition-duration:0.25s;--btn-color:var(--white);--double-forward-bg:rgba(0,0,0,.6);background:var(--black);color:var(--white);font-family:var(--vk-vp-custom-font,var(--font));font-size:12px;height:100%;line-height:normal;outline:0;overflow:hidden;position:relative;user-select:none;width:100%}.vk-vp-root.visible-outside.s-0{overflow:visible}.vk-vp-root.s-0 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-0 button{background:transparent;border:none;color:inherit;font:inherit;line-height:normal;margin:0;overflow:visible;padding:0;width:auto;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}.vk-vp-root.s-0 p{margin:0}.vk-vp-root.s-0 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-0 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-0 :focus,.vk-vp-root.s-0 :focus-visible{outline:none}.vk-vp-root.s-0 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-0 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-0 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-0 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-0 .overlay-container{height:100%;left:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:var(--overlay-container-z-index)}.vk-vp-root.s-0 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-0 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function kv(t,e){B(e,!0),Q(t,FT);let[i,o]=Ne(),r=()=>w(dt,"$isLive$",i),a=()=>w(yi,"$availableSubtitlesList$",i),l=()=>w(rt,"$isPreviewTrackHorizontallyAligned$",i),d=h(e,"sources",7),s=h(e,"store",7),u=h(e,"microStoresRoot",7),m=h(e,"videoConfig",7),p=h(e,"uiConfig",7),v=h(e,"title",7),_=h(e,"thumbUrl",7),y=h(e,"interactiveContainer",7),$=h(e,"interactiveController",7),x=h(e,"subtitles",7),I=h(e,"subtitlesForcedLanguage",7),T=h(e,"live",7),R=h(e,"preload",7),A=h(e,"autoplay",7),P=h(e,"volume",7,void 0),E=h(e,"muted",7,void 0),z=h(e,"fromTime",7),F=h(e,"canRewindLive",7),U=h(e,"showAds",7),X=h(e,"adsSlotId",7,void 0),ae=h(e,"adsParams",7,void 0),Z=h(e,"adsAutoplayParam",7,void 0),re=h(e,"duration",7,void 0),J=h(e,"logoClickable",7),we=h(e,"logoHidden",7),me=h(e,"isMobile",7),ee=h(e,"showNextPrevButtons",7,!1),_e=h(e,"nextButtonActive",7,!1),Ce=h(e,"prevButtonActive",7,!1),ge=h(e,"endScreenVideoTitle",7,void 0),pe=h(e,"endScreenVideoThumb",7,void 0),Ke=h(e,"isOneVideoPlaylist",7,!1),G=h(e,"supportLink",7),D=h(e,"shadowRootContainer",7),qe=h(e,"outerContainerRef",7),K=h(e,"fullScreenTarget",7,void 0),se=h(e,"failoverHosts",7,void 0),xe=h(e,"showMiniTimer",7,!1),Be=h(e,"saveRate",7),et=h(e,"seekToInteractive",7,Bb),ne=h(e,"playPrevChapter",7,Bb),ce=h(e,"volumeMultiplier",7),Re=h(e,"showAutoplayNext",7),Ae=h(e,"showEndScreen",7,!0),Ze=h(e,"keyboardControls",15,void 0),{subscribers:Ee,stores:Te}=u();kh(p());let He=Vt(),It=p().logoLink,wt=s().ui.debugPanelVisible,At=s().ui.playerSize,dt=s().state.isLive$,jt=s().state.isInteractive&&Pv.device.isAndroid,Pt=q(void 0),Dt=null,Ut=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}),Hh(s(),Te),De(()=>{var W,Lt;s().ui.isMobile.set(me()),(Lt=(W=m().callbacks)==null?void 0:W.onDomReady)==null||Lt.call(W)});let Y=(W=!1)=>{N(Ut,!0),W?s().actions.external.firstStart(U()):s().actions.internal.firstStart(U())},Pe=()=>{if(He.features.qualityDetailsSubMenuEnabled){let W=d_(s().videoId);if(W)switch(W.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,W.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,W.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(W.quality);break}}else{c_(s().videoId),Pf()&&s().actions.internal.setTrafficSavingEnabled(!0);let Lt=Tf(s().videoId);Lt&&s().actions.internal.setQuality(Lt)}};function le(W){var _t,nt,Ni;let Lt=d()||W;Lt&&s().initVideo({container:n(Pt),sources:Lt,failoverHosts:se(),subtitles:x(),subtitlesForcedLanguage:I(),volumeMultiplier:ce()});let ri=DT.get(Sd)==="true";wt.set(ri),z()>0&&s().actions.external.seekTime(z());let ft=me()?He.volumeDefault:(nt=(_t=P())!=null?_t:_u())!=null?nt:He.volumeDefault,Xt=(Ni=E())!=null?Ni:o_();if(s().actions.external.setVolume(ft),s().actions.external.setMuted(Xt),s().getAdmanWrapper().setInitialVolume(Xt?0:ft),Pe(),He.features.saveRate&&Be()){let Pi=s_();Pi&&!r()&&s().actions.internal.setPlaybackRate(Pi)}if(Re()){let Pi=l_();Pi&&s().actions.internal.setAutoplayNextEnabled(Pi)}s().ui.isAutoplay.set(A()),A()&&Y(),R()&&He.features.preload&&s().actions.internal.preload()}let $e=W=>{if(window.ResizeObserver){let Lt,ri;Dt=new ResizeObserver(OT(ft=>{let Xt=ft[0];if(Xt.contentBoxSize){let _t=Array.isArray(Xt.contentBoxSize)?Xt.contentBoxSize[0]:Xt.contentBoxSize;Lt=_t.inlineSize,ri=_t.blockSize}else Xt.contentRect&&(Lt=Xt.contentRect.width,ri=Xt.contentRect.height);At.set({width:Lt,height:ri})},300)),Dt.observe(W)}W.clientWidth&&W.clientHeight&&At.set({width:W.clientWidth,height:W.clientHeight})},Me=()=>{document.hidden&&s().actions.external.stop()};Mt(()=>{var ri,ft,Xt,_t;jt&&document.addEventListener("visibilitychange",Me),He.debugLog&&s().actions.internal.startLogging(),$e(n(Pt));let W=Ee.map(nt=>nt.init({store:s(),microStores:Te,config:m(),interactiveController:$(),uiConfig:p()})),Lt=()=>{jt&&document.removeEventListener("visibilitychange",Me),Dt==null||Dt.disconnect(),W.forEach(nt=>nt.unsubscribe()),s().destroy()};return((ri=T())==null?void 0:ri.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),Lt):((ft=T())==null?void 0:ft.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),Lt):(((Xt=T())==null?void 0:Xt.status)==="finished"||((_t=T())==null?void 0:_t.status)==="postlive")&&!(d()&&NT(d()))?(s().actions.internal.setLiveWaitingRecord(!0),Lt):(le(),Lt)});function st(){n(Ut)?s().actions.external.play():Y(!0)}function $t(){s().actions.external.pause()}function fe(W){s().actions.external.setMuted(W)}function Oe(){s().actions.external.toggleSubtitle()}function ze(W,Lt){s().actions.external.changeSubtitle(W,Lt)}function yt(W){s().actions.external.changeAudioStream(W)}function qt(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.hideControls()}function St(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.showControls()}function ni(W){me()||W>=0&&W<=1&&s().actions.external.setVolume(W)}function ci(W){s().actions.internal.seekTime(W,BT.UNKNOWN)}function Vi(W){s().actions.external.seekEpisodeStartTime(W)}function Rt(){s().actions.external.returnFocusToEpisodes()}function uo(W){s().actions.external.setPlaybackRate(W)}function pi(W){s().actions.external.setAutoQualityLimits(W)}function tt(){s().actions.external.setQuality("auto")}function Gt(W){s().actions.external.setTrafficSavingEnabled(W)}function Ri(W){s().actions.external.setHighQualityEnabled(W)}let hi=lp(He.view),Zt=m().playerView==="preview",yi=s().state.availableSubtitlesList$;if(He.features.initSubtitles){let W=!1;De(()=>{var Lt;if(!W&&a().length){W=!0;let ri;if(He.features.userVideoPrefs&&s().videoId){let Xt=xu(He.userSalt,String(s().videoId));Xt!=null&&Xt.subtitleTrackId&&(ri=a().find(_t=>_t.value===Xt.subtitleTrackId))}let ft=(Lt=I())!=null?Lt:Af();ft&&(ri=a().find(Xt=>Xt.language===ft)),s().actions.internal.setSubtitle(ri)}})}let rt=s().ui.isPreviewTrackHorizontallyAligned;var it=HT();let Si;var Yo=C(it);{var Lo=W=>{Iv(W,{get store(){return s()},get uiConfig(){return He},get thumbUrl(){return _()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return A()},get canRewindLive(){return F()},get showAds(){return U()},get adsSlotId(){return X()},get adsParams(){return ae()},get adsAutoplayParam(){return Z()},get duration(){return re()},get logoClickable(){return J()},get logoHidden(){return we()},get logoTargetUrl(){return It},get nextButtonActive(){return _e()},get prevButtonActive(){return Ce()},get endScreenVideoTitle(){return ge()},get endScreenVideoThumb(){return pe()},get isOneVideoPlaylist(){return Ke()},get supportLink(){return G()},get shadowRootContainer(){return D()},get outerContainerRef(){return qe()},get fullScreenTarget(){return K()},get showMiniTimer(){return xe()},get playerStarted(){return n(Ut)},get seekToInteractive(){return et()},get playPrevChapter(){return ne()},firstStart:Y,seekTime:ci,get showEndScreen(){return Ae()},get showAutoplayNext(){return Re()},get showNextPrevButtons(){return ee()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson},get videoContainer(){return n(Pt)},set videoContainer(Lt){N(Pt,Lt,!0)}})},vt=W=>{var Lt=Le(),ri=ue(Lt);{var ft=_t=>{Ev(_t,{get thumbUrl(){return _()},get outsideDuration(){return re()},get canRewindLive(){return F()},get videoContainer(){return n(Pt)},set videoContainer(nt){N(Pt,nt,!0)}})},Xt=_t=>{Cv(_t,{get store(){return s()},get uiConfig(){return He},get title(){return v()},get thumbUrl(){return _()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return A()},get canRewindLive(){return F()},get showAds(){return U()},get adsSlotId(){return X()},get adsParams(){return ae()},get adsAutoplayParam(){return Z()},get duration(){return re()},get logoClickable(){return J()},get logoHidden(){return we()},get logoTargetUrl(){return It},get nextButtonActive(){return _e()},get prevButtonActive(){return Ce()},get endScreenVideoTitle(){return ge()},get endScreenVideoThumb(){return pe()},get isOneVideoPlaylist(){return Ke()},get supportLink(){return G()},get shadowRootContainer(){return D()},get outerContainerRef(){return qe()},get fullScreenTarget(){return K()},get showMiniTimer(){return xe()},get playerStarted(){return n(Ut)},get seekToInteractive(){return et()},get playPrevChapter(){return ne()},firstStart:Y,get showEndScreen(){return Ae()},get showAutoplayNext(){return Re()},get showNextPrevButtons(){return ee()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(Pt)},set videoContainer(nt){N(Pt,nt,!0)},get keyboardControls(){return Ze()},set keyboardControls(nt){Ze(nt)}})};V(ri,_t=>{Zt?_t(ft):_t(Xt,!1)})}b(W,Lt)};V(Yo,W=>{me()?W(Lo):W(vt,!1)})}S(it),O(W=>{Si=oe(it,1,"vk-vp-root s-0",null,Si,W),We(it,hi)},[()=>({"root--miui-browser":Pv.device.isMobile&&Pv.browser.isMiuiBrowser,"visible-outside":Zt,"preview-track-horizontally-alinged":l()})]),b(t,it);var Ot=H({initVideo:le,play:st,pause:$t,setMuted:fe,toggleSubtitle:Oe,changeSubtitle:ze,changeAudioStream:yt,hideControls:qt,showControls:St,setVolume:ni,seekTime:ci,seekEpisodeStartTime:Vi,returnFocusToEpisodes:Rt,setPlaybackRate:uo,setAutoQualityLimits:pi,setAutoQuality:tt,toggleTrafficSaving:Gt,toggleHighQuality:Ri,get sources(){return d()},set sources(W){d(W)},get store(){return s()},set store(W){s(W)},get microStoresRoot(){return u()},set microStoresRoot(W){u(W)},get videoConfig(){return m()},set videoConfig(W){m(W)},get uiConfig(){return p()},set uiConfig(W){p(W)},get title(){return v()},set title(W){v(W)},get thumbUrl(){return _()},set thumbUrl(W){_(W)},get interactiveContainer(){return y()},set interactiveContainer(W){y(W)},get interactiveController(){return $()},set interactiveController(W){$(W)},get subtitles(){return x()},set subtitles(W){x(W)},get subtitlesForcedLanguage(){return I()},set subtitlesForcedLanguage(W){I(W)},get live(){return T()},set live(W){T(W)},get preload(){return R()},set preload(W){R(W)},get autoplay(){return A()},set autoplay(W){A(W)},get volume(){return P()},set volume(W){P(W)},get muted(){return E()},set muted(W){E(W)},get fromTime(){return z()},set fromTime(W){z(W)},get canRewindLive(){return F()},set canRewindLive(W){F(W)},get showAds(){return U()},set showAds(W){U(W)},get adsSlotId(){return X()},set adsSlotId(W){X(W)},get adsParams(){return ae()},set adsParams(W){ae(W)},get adsAutoplayParam(){return Z()},set adsAutoplayParam(W){Z(W)},get duration(){return re()},set duration(W){re(W)},get logoClickable(){return J()},set logoClickable(W){J(W)},get logoHidden(){return we()},set logoHidden(W){we(W)},get isMobile(){return me()},set isMobile(W){me(W)},get showNextPrevButtons(){return ee()},set showNextPrevButtons(W){ee(W)},get nextButtonActive(){return _e()},set nextButtonActive(W){_e(W)},get prevButtonActive(){return Ce()},set prevButtonActive(W){Ce(W)},get endScreenVideoTitle(){return ge()},set endScreenVideoTitle(W){ge(W)},get endScreenVideoThumb(){return pe()},set endScreenVideoThumb(W){pe(W)},get isOneVideoPlaylist(){return Ke()},set isOneVideoPlaylist(W){Ke(W)},get supportLink(){return G()},set supportLink(W){G(W)},get shadowRootContainer(){return D()},set shadowRootContainer(W){D(W)},get outerContainerRef(){return qe()},set outerContainerRef(W){qe(W)},get fullScreenTarget(){return K()},set fullScreenTarget(W){K(W)},get failoverHosts(){return se()},set failoverHosts(W){se(W)},get showMiniTimer(){return xe()},set showMiniTimer(W){xe(W)},get saveRate(){return Be()},set saveRate(W){Be(W)},get showAutoplayNext(){return Re()},set showAutoplayNext(W){Re(W)},get seekToInteractive(){return et()},set seekToInteractive(W){et(W)},get playPrevChapter(){return ne()},set playPrevChapter(W){ne(W)},get volumeMultiplier(){return ce()},set volumeMultiplier(W){ce(W)},get showEndScreen(){return Ae()},set showEndScreen(W){Ae(W)},get keyboardControls(){return Ze()},set keyboardControls(W){Ze(W)}});return o(),Ot}var UT=Ie('<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 Av(t,e){let i=h(e,"isWhite",3,!1),o=f(()=>i()?"#fff":"#909499");je(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(r,a)=>{var l=UT();di(9),b(r,l)},$$slots:{default:!0}})}var zT=L('<div class="title s-2"> </div>'),WT=L('<div class="playerStub s-2"><!> <!></div>'),KT={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 Lv(t,e){Q(t,KT);var i=WT(),o=C(i);{var r=d=>{var s=zT(),u=C(s,!0);S(s),O(()=>ve(u,e.title)),b(d,s)};V(o,d=>{e.title&&d(r)})}var a=k(o,2);{var l=d=>{let s=f(()=>!!e.thumbUrl);Av(d,{get isWhite(){return n(s)}})};V(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}S(i),O(()=>We(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}var qT=L('<div class="playerError s-1"><!></div>'),QT={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 Mv(t){Q(t,QT);var e=qT(),i=C(e);Ya(i,{}),S(e),b(t,e)}import{now as xI,ValueSubject as wI}from"@vkontakte/videoplayer-shared/es2018";import{cloneDeepWith as SI,InterfaceLanguage as CI,isNonNullable as Hv,Logger as TI,Observable as II,Subscription as Qb,once as EI,InternalsExposure as PI,skip as kI,getPlayerId as AI}from"@vkontakte/videoplayer-shared/es2018";import{clientChecker as Gb,isMobile as LI}from"@vkontakte/videoplayer-core/es2018";import{OneStat as MI,ThinOneStat as VI,MediascopePixel as RI}from"@vkontakte/videoplayer-statistics/es2018";import{Logger as GT,Subscription as YT}from"@vkontakte/videoplayer-shared/es2018";var dp=class{constructor(){this.subscription=new YT,this.logger=new GT,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=ye(e.state.currentPlaybackRate$),r=ye(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 Rv,detectEmbed as tI}from"@vkontakte/videoplayer-shared/es2018";var jT=Ie('<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),XT=L('<div><div><!></div> <span class="title s-9"> </span></div>'),ZT={hash:"s-9",code:".player-pip-dummy.s-9{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-9{position:relative}.dummy-image.s-9 svg{transform:scale(1.07143)}.dummy-image.desktop.s-9{transform:scale(1.07143) rotate(-90deg) rotateY(180deg)}.title.s-9{color:#fff;font-size:16px;padding:18px 20px 10px;text-align:center}"};function Vv(t,e){B(e,!0),Q(t,ZT);let[i,o]=Ne(),r=()=>w(u,"$interfaceLanguage$",i),a=()=>w(m,"$isMobile$",i),l=be(),d=Vt(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,m=l.ui.isMobile,p=l.ui.t,v=f(()=>r()&&p("pip_dummy_title")),_=lp(d.view);var y=XT();let $;var x=C(y);let I;var T=C(x);je(T,{width:"57",height:"56",testId:"pip-dummy-icon",children:(P,E)=>{var z=jT();di(),b(P,z)},$$slots:{default:!0}}),S(x);var R=k(x,2),A=C(R,!0);S(R),S(y),O((P,E)=>{$=oe(y,1,"player-pip-dummy s-9",null,$,P),We(y,_),I=oe(x,1,"dummy-image s-9",null,I,E),ve(A,n(v))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),b(t,y),H(),o()}var JT=Object.defineProperty,eI=(t,e,i)=>e in t?JT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,pa=(t,e,i)=>eI(t,typeof e!="symbol"?e+"":e,i),iI=460,oI=280,_c=class{constructor({enabled:e=!0}={enabled:!0}){pa(this,"playerDomElement"),pa(this,"playerParentShadowRoot"),pa(this,"playerDummyElement"),pa(this,"svelteContext"),pa(this,"pipWindow"),pa(this,"info",{isActive$:new Rv(!1),isEnabled$:new Rv(!1),type:1}),pa(this,"pipActive",!1),pa(this,"pipApi"),this.info.isEnabled$=new Rv(e),qu()&&(this.pipApi=new Ds({enabled:e}),this.pipApi.info.isActive$.subscribe(i=>{(i&&!this.info.isActive$.getValue()||!i&&this.pipActive)&&this.info.isActive$.next(i),this.pipActive=i}))}isSupported(){let{isEmbed:e}=tI();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:iI,height:oI,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=Zr(Vv,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||(La(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})}async exit(){return new Promise(e=>{var i,o,r;this.pipWindow?(i=documentPictureInPicture.window)==null||i.close():(o=this.pipApi)!=null&&o.isActive()&&((r=this.pipApi)==null||r.exit()),e()})}async dispose(){await this.exit()}setEnabled(e){var i;this.info.isEnabled$.next(e),(i=this.pipApi)==null||i.setEnabled(e)}assignPlayerContainer(e){var i;(i=this.pipApi)==null||i.assignPlayerContainer(e)}updateVideoElement(){var e;(e=this.pipApi)==null||e.updateVideoElement()}setExternalEventHandlers(e){var i;(i=this.pipApi)==null||i.setExternalEventHandlers(e)}createStretchedContainer(){let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e}};function Hb(t){return t instanceof _c}var cp=class{static getLatestSupportedVersion(e){let i=new Ds(e),o=new _c(e);if(o.isSupported())return o;if(i.isSupported())return i}};function bc(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 Fb="Inner error. Unexpectedly root annotation container null reference exception",Ub="Annotation with such name already exists",zb="Annotation with such name does not exist";var Gl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as nI,Subscription as rI,throttleFn as sI}from"@vkontakte/videoplayer-shared/es2018";var aI="1",lI=100,up=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new rI}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=sI(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},lI);this.subscriptions.add(nI(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 Gl(Fb);if(this.annotations.has(e))throw new Gl(Ub);i.style.zIndex=(o=i.style.zIndex)!=null?o:aI,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 Gl(zb);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 pp,Subscription as dI}from"@vkontakte/videoplayer-shared/es2018";var dn=class{init({store:e,microStores:i,interactiveController:o,config:r}){return pp(e),pp(i),pp(r),r.interactiveData&&pp(o),this.subscription=new dI,this.subscription}};var $c=class extends dn{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$={...de(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 yc=class extends dn{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$={...de(null),toggle:()=>this.state$.update(i=>!i)}}init(i){let o=super.init(i),{microStores:r,store:a}=i,{fakeIsPlaying$:l}=r,{isInteractiveExpectation$:d,isPlaying$:s}=a.state,{controlsVisible:u,isMobile:m}=a.ui,p=ye(m),v=()=>p&&ye(u);return o.add(u.subscribe(_=>{if(!p)return;let y=ye(l);ye(s)?this.state$.set(_):y!==null&&this.state$.set(!y||_)})),o.add(s.subscribe(_=>{this.state$.set(!_||v())})),o.add(l.subscribe(_=>{if(_===null)return;let y=ye(d);if(v()){this.state$.set(!0);return}y&&this.state$.set(!_)})),o}};var xc=class extends dn{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=de("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 cI}from"@vkontakte/videoplayer-shared/es2018";var Nv=de(!1),fp=null,wc=class extends dn{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$={...Nv,set:(i,o=!1)=>{i!==ye(Nv)&&(this.clearTimeout(),Nv.set(i),!i&&fp&&(fp=!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=>{ye(l)&&p&&this.state$.set(!1)}));let m=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(cI({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:v,interactiveTimeIndicator:_})=>{var y,$;if(!(!p||!(_!=null&&_.isDisplayed))){if(!v)return this.state$.set(!1);m.tooltipHelpHintActive&&fp===null&&(fp=!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 uI,noop as pI}from"@vkontakte/videoplayer-shared/es2018";var Sc=class extends dn{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$={...de(null),toggle:pI};this.checkIfShouldHide=i=>Ns(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(ye(l)))return;let s=ye(this.state$),{isEnded$:u,playbackState$:m}=r.state,{disabledControls$:p}=r.ui.controls,v=ye(u),_=ye(m);if(s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1),p.remove(_f),!v&&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(_f),!v&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}},o.add(uI({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 Wb}from"@vkontakte/videoplayer-shared/es2018";var Cc=class extends dn{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:de(!1),isEnabled$:de(!1),type$:de(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 Wb(!1),isEnabled$:new Wb(!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 vI,filterChanged as gI}from"@vkontakte/videoplayer-shared/es2018";import{safeStorage as Dv}from"@vkontakte/videoplayer-shared/es2018";var Kb=({maxShowCount:t,timeout:e})=>{let i=[t!==0?fI({maxCount:t}):void 0,e!==0?mI({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},fI=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Dv.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}}},mI=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Dv.get(e)||"{}")}catch(a){return{}}},o=a=>Dv.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 Tc=class extends dn{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:de({}),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=Kb({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe(gI(),vI(m=>m)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(s&&r.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var qb=()=>[$c,yc,xc,wc,Sc,Cc,Tc].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 Ic}from"@vkontakte/videoplayer-shared/es2018";var mp=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 vp=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 mp(()=>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 hI=L('<div class="root s-3"><!></div>'),_I={hash:"s-3",code:".root.s-3{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:1}"};function Ov(t,e){B(e,!0),Q(t,_I);let i=null,o=q(null);De(()=>(n(o)&&(i=window.setTimeout(()=>{N(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function r(s){e.playbackStatusShow&&N(o,s?"prev":"next",!0)}var a=Le(),l=ue(a);{var d=s=>{var u=Le(),m=ue(u);As(m,()=>n(o),p=>{var v=hI(),_=C(v);let y=f(()=>n(o)==="prev");gc(_,{get duration(){return e.animationDuration},get Icon(){return ua},get reversed(){return n(y)}}),S(v),b(p,v)}),b(s,u)};V(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return b(t,a),H({startVideoChangedAnimation:r})}import{getWindow as bI}from"@vkontakte/videoplayer-shared/es2018";var Bv=bI().HTMLElement||class{constructor(){this.isConnected=!1}};var $I=Object.defineProperty,yI=(t,e,i)=>e in t?$I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Kt=(t,e,i)=>yI(t,typeof e!="symbol"?e+"":e,i),NI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:CI.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:LI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},Xn=q(void 0),Fv=li({animationDuration:0,playbackStatusShow:!1}),gp=class extends Bv{constructor(){super(),Kt(this,"svelteStubComponent"),Kt(this,"svelteRootComponent"),Kt(this,"sveltePersistentLayerComponent"),Kt(this,"svelteErrorComponent"),Kt(this,"store"),Kt(this,"microStoresRoot"),Kt(this,"statistics"),Kt(this,"sentry"),Kt(this,"_shadowRoot"),Kt(this,"playerContainer"),Kt(this,"rootContainer"),Kt(this,"stateContainer"),Kt(this,"shadowRootContainer"),Kt(this,"playerId"),Kt(this,"uiConfig"),Kt(this,"coreConfig"),Kt(this,"statisticsConfig"),Kt(this,"metaConfig"),Kt(this,"interactiveController"),Kt(this,"interactiveContainer"),Kt(this,"graphMadePause"),Kt(this,"currentPlayingVideoIndex",0),Kt(this,"needToRepeatPlaylist",!1),Kt(this,"videoConfig"),Kt(this,"pictureInPictureApi"),Kt(this,"mediaSessionApi"),Kt(this,"unsubscribePlayerPhaseSubscription"),Kt(this,"logger"),Kt(this,"log"),Kt(this,"subscription"),Kt(this,"interactiveSubscription"),Kt(this,"annotationsApi"),Kt(this,"slotsApi"),Kt(this,"focusManager"),Kt(this,"prevIsid"),Kt(this,"isInited",!1),Kt(this,"postponedInitParams",null),Kt(this,"internalsExposure",null),Kt(this,"shadowDOMCallbacksDisabled",!1),Kt(this,"fatalError$",new wI(null)),Kt(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:m,statVKAppId:p,refreshStatAuthToken:v,autoplay:_,isMobile:y,isTouch:$,refDomain:x,deviceId:I,interactiveData:T}=bc(this.videoConfig,i),R=(o=T==null?void 0:T.projectInfo)==null?void 0:o.pid,A=(a=(r=this.interactiveController)==null?void 0:r.state.isReplay$.getValue())!=null?a:!1;A&&(this.prevIsid=void 0);let{unitedVideoId:P,isClip:E=!1}=e;if(this.uiConfig.features.statistics&&P)try{return new MI({movieId:P,albumId:d,place:s,trackCode:m,vkAppId:p,autoplay:(l=_&&!this.interactiveController)!=null?l:!1,mobile:$!=null?$:y,clip:E,refDomain:x,deviceId:I,isPreviewPlayerView:this.videoConfig.playerView==="preview",...R&&(!this.isInited||A)&&{projectId:Number(R)}},{refreshAuthToken:v,userSalt:u,config:this.statisticsConfig,...this.interactiveController&&{useIsid:!0,isid:this.prevIsid}})}catch(F){console.error(F),this.log({message:F.message})}}),Ic.create("ui"),this.logger=new TI,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Qb,this.interactiveSubscription=new Qb,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Zr(Mv,{target:this.playerContainer}))})}connectedCallback(){var e,i;if(this.rootContainer)return;this.initPlayerRootContainers();let o=(e=this.getAttribute("stub-title"))!=null?e:void 0,r=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=li({title:o,thumbUrl:r}),l={target:this.playerContainer,props:a};this.svelteStubComponent=Zr(Lv,l),this.sveltePersistentLayerComponent=Zr(Ov,{target:this.playerContainer,props:Fv}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;Fv.animationDuration=e,Fv.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(),Ic.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}=bc(this.videoConfig,i),{unitedVideoId:l}=e;if(this.uiConfig.features.thinStatistics&&l)return new VI.ThinOneStat({deviceId:o,movieId:l,preload:r,isPreviewPlayerView:this.videoConfig.playerView==="preview"},{config:this.statisticsConfig,refreshAuthToken:a})}createPlayer(e,i={},o){var r,a,l,d,s,u,m,p,v,_;if(!this.videoConfig)return;let{albumId:y,statPlace:$,statAuthToken:x,preload:I,autoplay:T,volume:R,muted:A,fromTime:P,canRewindLive:E,supportLink:z,showAds:F,adsSlotId:U,adsParams:X={},adsAutoplayParam:ae,interfaceLanguage:Z,isCyrillicRelatedInterface:re,logoClickable:J,logoHidden:we,isMobile:me,isTouch:ee,isAudioDisabled:_e,isLiveCatchUpMode:Ce,fullScreenTarget:ge,failoverHosts:pe,canDownload:Ke,callbacks:G,interactiveData:D,showThumbTimer:qe,additionalButtons:K=[],additionalSettingsMenuItems:se=[],additionalContextMenuItems:xe=[],repeat:Be,loop:et,saveRate:ne,volumeMultiplier:ce,showEndScreen:Re,showAutoplayNext:Ae,mediascopePixels:Ze}=bc(this.videoConfig,i),{sources:Ee,title:Te,thumbUrl:He,unitedVideoId:It,isClip:wt=!1,duration:At,adsParams:dt={},videoEpisodes:Et,previewThumbsData:jt,subtitles:Pt,subtitlesForcedLanguage:Dt,live:Ut,adsExternalApi:Y,adsJson:Pe}=e;if(!Ee&&!Ut){let pi=new Error("empty sources and live");this.fatalError$.next(pi),(r=G.onCrashed)==null||r.call(G,pi.message);return}let le={...X,...dt},$e=this.getNextVideoInfo(),Me={sources:Ee,title:Te,thumbUrl:He,subtitles:Pt,subtitlesForcedLanguage:Dt,unitedVideoId:It,isClip:wt,live:Ut,albumId:y,statPlace:$,autoplay:T,muted:A,volume:R,fromTime:P,canRewindLive:E,showAds:F,adsSlotId:U,adsParams:le,adsAutoplayParam:ae,duration:At,logoClickable:J,logoHidden:we,isTouch:ee!=null?ee:me,repeat:Be,loop:et,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:$e.nextVideoTitle,endScreenVideoThumb:$e.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},st={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(Me)}`});let $t=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),fe=($t==null?void 0:$t.oneStat)||this.createOneStat(e,i),Oe=this.createThinOneStat(e,i),ze;Ze&&(ze=new RI({pixels:Ze})),(fe||Oe)&&(this.statistics=new Gu(fe,Oe,ze,$t==null?void 0:$t.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Na(this.uiConfig.sentry,{version:kl,env:vu},{movieId:It,albumId:y,place:$,autoplay:(l=T&&!this.interactiveController)!=null?l:!1,mobile:ee!=null?ee:me,clip:wt}),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,...Na.getInstance()};let qt=!!D,St=[],ni="tooltip_interactive_go_back_disabled_first";if(qt&&this.interactiveController){let pi=this.interactiveController.state.isInitialChapter$.getValue(),tt=this.interactiveController.getHistoryState();pi&&St.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||St.push("SEEK_TO_INTERACTIVE_BUTTON"),tt.hasPrevChapter$.getValue()||(St.push("PLAY_PREV_CHAPTER_BUTTON"),pi||(tt.isGoBackLimited$.getValue()?ni="tooltip_interactive_go_back_disabled_limit":ni="tooltip_interactive_go_back_disabled"))}let ci=()=>{var pi;this.isInited=!1,this.prevIsid=void 0;let tt=(o==null?void 0:o.info.isEnded$.getValue())&&((pi=this.interactiveController)==null?void 0:pi.state.isEndChapter$.getValue());G.onReplayInteractiveVideo&&!tt?G.onReplayInteractiveVideo():this.replayInteractiveVideo()},Vi=Be&&this.videoConfig.videos.length===1;this.store=ob({player:o,interfaceLanguage:Z,isCyrillicRelatedInterface:re,videoId:It,isClip:wt,isLiveCatchUpMode:Ce,isAudioDisabled:_e,statAuthToken:x,callbacks:G,webApi:st,videoEpisodes:Et,previewThumbsData:jt,canDownload:Ke,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,disabledControls:St,isInteractive:qt,saveRate:ne,interactiveRanges$:(m=this.interactiveController)==null?void 0:m.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:ci,playPrevChapterDisabledTooltip:ni,hasInteractiveBranches:!!((_=(v=this.interactiveController)==null?void 0:v.getChapterBranches())!=null&&_.length),additionalButtons:this.uiConfig.features.additionalButtons?K:[],additionalSettingsMenuItems:se!=null?se:[],additionalContextMenuItems:xe!=null?xe:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:pi=>{var tt;return(tt=this.sveltePersistentLayerComponent)==null?void 0:tt.startVideoChangedAnimation(pi)},looped:this.uiConfig.features.useLoopSetting?et:Vi,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId});let{stores:Rt}=this.microStoresRoot=qb(),uo=()=>{var pi,tt,Gt,Ri,hi,Zt;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(rt=>{var it;return(it=G==null?void 0:G.onCurrentFormatChanged)==null?void 0:it.call(G,rt)})),this.subscription.add(Rt.interactiveControlsOpacity$.subscribe(rt=>{var it;rt!==null&&((it=this==null?void 0:this.interactiveController)==null||it.setDisabledControls(rt))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(rt=>{var it;return(it=G==null?void 0:G.onThroughputEstimationChanged)==null?void 0:it.call(G,rt)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(rt=>{var it;return(it=G==null?void 0:G.onTrafficSavingEnabledChanged)==null?void 0:it.call(G,rt)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(rt=>{var it;return(it=G==null?void 0:G.onHighQualityEnabledChanged)==null?void 0:it.call(G,rt)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(rt=>{var it;return(it=G==null?void 0:G.onAutoQualityEnabledChanged)==null?void 0:it.call(G,!!rt)})),this.subscription.add(new II(rt=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(it=>rt.next(it)))}).pipe(kI(1)).subscribe(rt=>{var it;return(it=G==null?void 0:G.onCurrentPlaybackRateChanged)==null?void 0:it.call(G,rt)})),this.subscription.add(this.store.state.volume$.subscribe(rt=>{var it;return(it=G==null?void 0:G.onVolumeChange)==null?void 0:it.call(G,rt)})),this.subscription.add(this.store.state.muted$.subscribe(rt=>{var it,Si,Yo,Lo;if(rt)(it=G==null?void 0:G.onMute)==null||it.call(G);else{let vt=(Yo=((Si=this.store)==null?void 0:Si.state.volume$)&&ye(this.store.state.volume$))!=null?Yo:0;(Lo=G==null?void 0:G.onUnmute)==null||Lo.call(G,vt)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(rt=>{var it;return(it=G==null?void 0:G.onVideoBitrateChanged)==null?void 0:it.call(G,rt)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(rt=>{var it;let Si=(it=this.store)==null?void 0:it.ui.controls.disabledControls$;Si&&(rt&&!Si.includes(Cd)&&Si.add(Cd),rt||Si.remove(Cd))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(async rt=>{var it;if(!Gb.browser.isSamsungBrowser||!rt||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&await this.replayInteractiveChapter((it=this.videoConfig)==null?void 0:it.callbacks.onExternalFullscreenExit)})),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(rt=>{var it;return(it=G==null?void 0:G.onVSIDChanged)==null?void 0:it.call(G,rt)})),this.initMediaSession(),N(Xn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:Ee,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Te,thumbUrl:He,subtitles:Pt,subtitlesForcedLanguage:Dt,live:Ut,preload:I,autoplay:T,muted:A,volume:R,fromTime:P,canRewindLive:E,supportLink:z,showAds:F,adsSlotId:U,adsParams:le,adsAutoplayParam:ae,duration:At,logoClickable:J,logoHidden:we,isMobile:ee!=null?ee:me,failoverHosts:pe,fullScreenTarget:ge,saveRate:ne,shadowRootContainer:this.shadowRootContainer,showMiniTimer:qe,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:$e.nextVideoTitle,endScreenVideoThumb:$e.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:ce,showEndScreen:Re,showAutoplayNext:Ae,adsExternalApi:Y,adsJson:Pe,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let yi={target:this.playerContainer,props:n(Xn)};this.svelteRootComponent=Zr(kv,yi),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(Gt=(tt=(pi=this.videoConfig)==null?void 0:pi.callbacks)==null?void 0:tt.onInited)==null||Gt.call(tt)),(Ri=this.internalsExposure)==null||Ri.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((Zt=(hi=this.videoConfig)==null?void 0:hi.callbacks)!=null&&Zt.onDevNullLog)?Ic.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Ic.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Gb.isInited$.subscribe(pi=>{pi&&(console.log("UI SDK async start"),uo())}):uo()}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&&Hv(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?ye(s):this.videoConfig.interfaceLanguage,{projectInfo:m,initChapterId:p,historyApi:v,videoLoader:_}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:m,initChapterId:p,historyApi:v,vkVideoLoader:_,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,isTouch:this.videoConfig.isTouch,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation,controlsTapPlace:this.uiConfig.features.interactiveControlsTapPlace,controlsFillAnimation:this.uiConfig.features.interactiveControlsFillAnimation,controlsHideAnimation:this.uiConfig.features.interactiveControlsHideAnimation},endChapterHistoryFix:this.uiConfig.features.interactiveHistoryEndChapterFix});let{isInteractiveExpectation$:y,isSeekable$:$}=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 x=!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=x?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(I.player,T),x&&(x=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:I,actionType:T})=>{var R,A,P,E,z,F;if(!this.store||!this.microStoresRoot)return;let U=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 X=ye(this.store.state.isPlaying$)||U;if(((P=(R=this.videoConfig)==null?void 0:R.isTouch)!=null?P:(A=this.videoConfig)!=null&&A.isMobile)&&X){this.store.ui.interactiveHideMobileControls.set(!0);return}(F=(E=this.videoConfig)==null?void 0:(z=E.callbacks).onDisabledInteractiveClick)==null||F.call(z)}})),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 R,A,P;T.length&&((P=(A=(R=this.videoConfig)==null?void 0:R.callbacks)==null?void 0:A.onInteractiveHistoryChanged)==null||P.call(A,T))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(I=>{var T,R,A;(A=(T=this.videoConfig)==null?void 0:(R=T.callbacks).onInteractiveChapterChanged)==null||A.call(R,I.chapter,I.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var I,T,R,A;(I=this.microStoresRoot)==null||I.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(A=(T=this.videoConfig)==null?void 0:(R=T.callbacks).onInteractiveTimeIndicatorClick)==null||A.call(R)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(I=>{this.log({message:I.toString()})}))}catch(d){this.log({message:d.message})}}initPlayer(e,i={}){var o,r,a,l,d,s,u,m,p,v,_,y,$,x,I,T,R,A,P,E,z,F,U,X,ae;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let Z=new Error("empty videos");this.fatalError$.next(Z),(r=(o=e.callbacks)==null?void 0:o.onCrashed)==null||r.call(o,Z.message);return}else this.fatalError$.next(null);if(this.videoConfig=bc(NI,SI(e,Z=>Z instanceof Bv?Z:void 0)),this.playerId=AI(e.playerId),this.uiConfig=Ph((a=i.ui)!=null?a:{}),this.updatePersistentLayerProps(),this.coreConfig=(l=i.core)!=null?l:{},this.statisticsConfig=(d=i.statistics)!=null?d:{},this.metaConfig=i.meta,this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer&&(this.rootContainer.style.minHeight="unset"),this.style.display="block",this.style.width="100%",this.style.height="100%"),this.videoConfig.playerView==="preview"&&(this.playerContainer.style.contain="none"),this.sentry={config:(s=this.uiConfig.sentry)!=null?s:{}},this.uiConfig.features.exposeInternalsToGlobal&&((u=this.internalsExposure)!=null||(this.internalsExposure=new PI("ui",this.playerId))),Ic.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:[xI()]}),Hv(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(v=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?v:!0),Hv(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(y=(_=this.uiConfig.features.pip)!=null?_:this.videoConfig.isPictureInPictureEnabled)!=null?y:!0,this.uiConfig.features.dpip=(x=($=this.uiConfig.features.dpip)!=null?$:this.videoConfig.isPictureInPictureEnabled)!=null?x:!0),this.uiConfig.ads.paramsOverride={preview:(I=this.uiConfig.ads.preview)!=null?I:this.videoConfig.adsPreviewParam,...this.uiConfig.ads.paramsOverride},this.videoConfig.isTouch=(R=(T=this.uiConfig.isMobile)!=null?T:this.videoConfig.isTouch)!=null?R:this.videoConfig.isMobile,(A=this.videoConfig).autoplay&&(A.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(P=this.uiConfig.ads.enable)!=null?P:this.videoConfig.showAds,this.videoConfig.adsSlotId=(E=this.uiConfig.ads.slot)!=null?E:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((z=this.uiConfig.showLogo)!=null?z:!this.videoConfig.logoHidden),(F=this.videoConfig).canRewindLive&&(F.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(U=this.videoConfig.supportLink)!=null?U:this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=this.uiConfig.features.autoplayNext&&this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=this.uiConfig.features.nextPrevButtons&&this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((X=this.videoConfig.videos)!=null&&X[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let Z={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=cp.getLatestSupportedVersion(Z):this.pictureInPictureApi=new Ds(Z)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new dp:void 0,this.slotsApi=this.uiConfig.features.slots?new rp(this.uiConfig.disabledSlotIds):void 0,this.annotationsApi=this.uiConfig.features.annotations?new up(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new vp(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]),Hb(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(Xn)&&(n(Xn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Xn).nextButtonActive=this.isNextButtonActive(),n(Xn).prevButtonActive=this.isPrevButtonActive(),n(Xn).endScreenVideoTitle=o.nextVideoTitle,n(Xn).endScreenVideoThumb=o.nextVideoThumb,n(Xn).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(Xn)&&(n(Xn).needToRepeatPlaylist=this.needToRepeatPlaylist,n(Xn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Xn).nextButtonActive=this.isNextButtonActive(),n(Xn).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=ye(this.store.state.positionExact$),l=ye(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe(EI()).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&&La(e)}};import{InterfaceLanguage as Foe,VKNumericLanguage as Uoe,loadVKLangPack as zoe}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as Koe,VideoFormat as qoe}from"@vkontakte/videoplayer-core/es2018";var Moe=()=>{window.customElements.define("vk-video-player",gp)};export{Yu as ControlButtonType,ms as GridTypes,Foe as InterfaceLanguage,Dd as MenuItemType,vs as PlayerPhase,kl as VERSION,Uoe as VKNumericLanguage,qoe as VideoFormat,Koe as VideoQuality,zoe as loadVKLangPack,Moe 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(m,p)};V(d,m=>{e.type==="off"?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}}),H()}function om(t,e){B(e,!0);let i=h(e,"isSubtitlesEnabled",3,!1),r=$e().ui.t,a=f(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));Ft(t,{testId:"subtitles-btn",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return fs.KeyC},role:"button",children:(l,d)=>{let s=f(()=>i()?void 0:"outline");da(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),H()}var D0=L('<span class="duration s-20" data-testid="video_duration"> </span>'),O0=L('<div data-testid="time"><span class="current s-20" data-testid="current_time"> </span> <!></div>'),B0={hash:"s-20",code:'.time.s-20{align-items:center;color:var(--controls-time);display:flex;font-variant-numeric:tabular-nums;font-weight:500;padding:12px 6px}.time.mobile.s-20{padding:0 0 0 8px}.current.s-20{position:relative}.duration.s-20{opacity:.7}.duration.s-20:before{content:" / ";white-space:pre}'};function Hd(t,e){B(e,!0),Q(t,B0);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=Mt(),d=ae(!1),s=f(()=>Xo(e.duration)),u=f(()=>Xo(e.position));var m=O0();let p;var v=C(m),_=C(v,!0);S(v);var y=k(v,2);{var $=x=>{var I=D0(),T=C(I,!0);S(I),O(()=>ge(T,n(s))),b(x,I)};V(y,x=>{r()&&x($)})}S(m),Ls(m,()=>kl(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),et(m,x=>a(x),()=>a()),O(x=>{p=oe(m,1,"time s-20",null,p,x),ge(_,n(u))},[()=>({mobile:i()})]),b(t,m),H()}import{noop as Ou}from"@vkontakte/videoplayer-shared/es2018";var H0=Ee('<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),F0=Ee("<path></path>"),U0=Ee('<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 ca(t,e){B(e,!0);let i=h(e,"volume",3,1),o=h(e,"muted",3,!1),r=(u,m)=>m?"off":u>.5?"max":u>.2?"mid":u>0?"min":"off",a=f(()=>r(i(),o())),l=f(()=>dn(e.size)),d="M16.8748 8.85259C17.2324 8.50731 17.8021 8.51726 18.1474 8.87481C18.5465 9.28803 18.8614 9.77691 19.0757 10.3128C19.2901 10.8486 19.4 11.4218 19.4 12C19.4 12.5782 19.2901 13.1514 19.0757 13.6872C18.8614 14.2231 18.5465 14.712 18.1474 15.1252C17.8021 15.4827 17.2324 15.4927 16.8748 15.1474C16.5173 14.8021 16.5073 14.2324 16.8526 13.8748C17.0876 13.6314 17.2757 13.3408 17.4045 13.0187C17.5333 12.6966 17.6 12.3504 17.6 12C17.6 11.6496 17.5333 11.3034 17.4045 10.9813C17.2757 10.6592 17.0876 10.3686 16.8526 10.1252C16.5073 9.76764 16.5173 9.19788 16.8748 8.85259Z",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 p=U0(),v=k(le(p));{var _=$=>{var x=H0();Jt(),b($,x)},y=$=>{var x=F0();O(()=>Ne(x,"d",`${d}${n(a)==="max"?s:""}`)),b($,x)};V(v,$=>{n(a)==="off"?$(_):$(y,!1)})}b(u,p)},$$slots:{default:!0}}),H()}import{isNonNullable as F_,noop as qn}from"@vkontakte/videoplayer-shared/es2018";import{noop as rm}from"@vkontakte/videoplayer-shared/es2018";import{noop as W0}from"@vkontakte/videoplayer-shared/es2018";var z0=L('<div class="overlay"><!></div>');function nm(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(l,"$overlayContainer$",i),l=$e().ui.overlayContainer$,d=K(void 0),s=v=>{!v||!n(d)||!v.contains(n(d))||v.removeChild(n(d))},u=v=>{!v||!n(d)||v.contains(n(d))||v.appendChild(n(d))};He(()=>{u(r())}),Lt(()=>(u(r()),()=>s(r())));var m=z0(),p=C(m);ei(p,()=>{var v;return(v=e.children)!=null?v:gt}),S(m),et(m,v=>N(d,v),()=>n(d)),b(t,m),H(),o()}var K0=L('<div class="tooltip s-1o"><div class="content s-1o"> </div> <div class="tooltip-pointer s-1o"></div></div>'),q0=L("<div><!></div> <!>",1),Q0={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 Ba(t,e){B(e,!0),Q(t,Q0);let[i,o]=Be(),r=()=>w(X,"$overlayContainer$",i),a=()=>w(U,"$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),m=h(e,"translateY",3,0),p=h(e,"isFullWidthWrapper",3,!1),v=h(e,"maxTooltipWidth",3,void 0),_=h(e,"placement",3,"top"),y=h(e,"onVisibilityChange",3,W0),$=5,x=K(void 0),I=K(void 0),T,R=K(0),A=K(0),P=K(0),E=K(0),W=Mt(),F=$e(),U=F.ui.playerSize,X=F.ui.overlayContainer$;He(()=>{St(()=>{y()(s())})});let se=F.getLogger().createComponentLog("Tooltip component"),j=()=>{if(!r()||!n(I)||!n(x))return;N(A,$);let ee=r().getBoundingClientRect(),de=n(x).getBoundingClientRect(),ke=de.width,xe=n(I).clientWidth,Xe=a().width,Pe=(ke-xe)/2,we=de.left+u()-ee.left,De=we+Pe,Ct=de.top+m()-ee.top,Tt=xe/2-$,Et=De<8,dt=De+xe>Xe-8;Et&&(De=8,Tt=we+de.width/2-2.5*$),dt&&(De=Xe-8-xe,Tt=de.left-ee.left+de.width/2-De-$),N(P,De,!0),N(E,Ct),N(R,Tt,!0)},ne=()=>{!r()||!n(I)||!n(x)||N(A,-$)},Z=()=>{if(!r()||!n(I)||!n(x))return;N(R,$);let ee=r().getBoundingClientRect(),de=n(x).getBoundingClientRect(),ke=de.height,xe=n(I).clientHeight,Xe=(ke-xe)/2+xe,Pe=de.left+u()-ee.left-n(I).clientWidth,we=2,De=Pe-$;De<8&&(De=8);let Tt=de.top+m()-ee.top+Xe,Et=we-Xe/2,dt=we-$;N(P,De,!0),N(E,Tt),N(A,Et),N(R,dt)},Te=()=>{!r()||!n(I)||!n(x)||N(R,-$)},fe=()=>{switch(_()){case"top":j();break;case"bottom":ne();break;case"left":Z();break;default:Te()}},te=()=>{try{if(!r()||!n(x))return;fe(),s(!0)}catch(ee){se({message:String(ee)})}},_e=()=>{s(!1)},Ce=()=>{n(I)&&(T||(T=window.setTimeout(te,W.controls.hideTimeoutTooltips)),s()&&te())},me=()=>{_e(),window.clearTimeout(T),T=void 0},ce=(ee,de,ke)=>{let xe="";switch(_()){case"top":xe=`transform: translate(${ee}px, ${de}px);`;break;case"bottom":xe=`transform: translate(${ee}px, ${de}px); top: auto; bottom: 100%;`;break;case"left":xe=`transform: translate(${ee}px, ${de}px); left: 0; right: auto;`;break;default:xe=`transform: translate(${ee}px, ${de}px);`}return xe+=` max-width: ${v()===void 0?"auto":`${v()}px`};`,xe+=` opacity: ${ke?1:0}; visibility: ${ke?"visible":"hidden"}`,xe},Qe=(ee,de)=>{let ke="";switch(_()){case"top":ke=`transform: translate(${ee}px, ${de}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":ke=`transform: translate(${ee}px, ${de}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":ke=`transform: translate(${ee}px, ${de}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:ke=`transform: translate(${ee}px, ${de}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return ke},G=f(()=>ce(n(P),n(E),s())),D=f(()=>Qe(n(R),n(A)));Lt(fe),ln(()=>window.clearTimeout(T));var Ye=q0(),re=le(Ye);let pe;re.__pointermove=Ce,re.__pointerdown=me,re.__pointerup=function(...ee){var de;(de=e.disableMouseupTooltipShow?void 0:Ce)==null||de.apply(this,ee)};var ue=C(re);ei(ue,()=>{var ee;return(ee=e.children)!=null?ee:gt}),S(re),et(re,ee=>N(x,ee),()=>n(x));var Ae=k(re,2);{var Ue=ee=>{nm(ee,{children:(de,ke)=>{var xe=K0(),Xe=C(xe),Pe=C(Xe,!0);S(Xe);var we=k(Xe,2);S(xe),et(xe,De=>N(I,De),()=>n(I)),O(()=>{qe(xe,n(G)),ge(Pe,d()),qe(we,n(D))}),b(de,xe)},$$slots:{default:!0}})};V(Ae,ee=>{d()&&!l()&&ee(Ue)})}O(ee=>pe=oe(re,1,"tooltip-wrapper s-1o",null,pe,ee),[()=>({"full-width":p()})]),pt("pointerenter",re,Ce),pt("pointerleave",re,me),b(t,Ye),H(),o()}Ze(["pointermove","pointerdown","pointerup"]);var H_=t=>{t.stopPropagation()},G0=L("<div><!></div>"),Y0={hash:"s-1i",code:".btn-container.s-1i{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-1i{min-width:0;width:100%}"};function ko(t,e){B(e,!0),Q(t,Y0);let[i,o]=Be(),r=()=>w(u,"$isGraphOpened$",i),a=()=>w(s,"$isMobile",i),l=$e(),d=vo(),s=l.ui.isMobile,u=d.graphIsOpened$,m=l.ui.t,p=h(e,"className",3,""),v=h(e,"disabled",3,!1),_=h(e,"hasTooltip",3,!0),y=h(e,"ref",15,void 0),$=h(e,"width",15,void 0),x=h(e,"isFullWidthTooltip",3,!0),I=h(e,"tooltipContent",3,""),T=h(e,"tooltipVisible",3,!1),R=h(e,"tooltipPlacement",3,"top"),A=h(e,"disabledTooltipContent",19,()=>m("tooltip_button_disabled")),P=h(e,"isAriaHidden",3,!1),E=h(e,"onTooltipVisibilityChange",3,rm),W=h(e,"initialTranslateXPx",3,0),F=h(e,"initialTranslateYPx",19,()=>-18),U=h(e,"mouseEnter",3,rm),X=h(e,"mouseLeave",3,rm),se=f(()=>v()?r()?m("tooltip_disabled_when_graph_on"):A():I()),j=K(!1);He(()=>{T()||N(j,!1)});var ne=G0();ne.__pointerdown=[H_],ne.__click=[H_];var Z=C(ne);{var Te=te=>{Ba(te,{get content(){return n(se)},get translateX(){return W()},get translateY(){return F()},get isFullWidthWrapper(){return x()},get placement(){return R()},get onVisibilityChange(){return E()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(j)},set active(_e){N(j,_e,!0)},children:(_e,Ce)=>{var me=Re(),ce=le(me);ei(ce,()=>{var Qe;return(Qe=e.children)!=null?Qe:gt}),b(_e,me)},$$slots:{default:!0}})},fe=te=>{var _e=Re(),Ce=le(_e);ei(Ce,()=>{var me;return(me=e.children)!=null?me:gt}),b(te,_e)};V(Z,te=>{_()&&n(se)&&!a()?te(Te):te(fe,!1)})}S(ne),et(ne,te=>y(te),()=>y()),O(()=>{var te;oe(ne,1,`btn-container ${(te=p())!=null?te:""}`,"s-1i"),Ne(ne,"aria-hidden",P()||null)}),pt("mouseenter",ne,function(...te){var _e;(_e=U())==null||_e.apply(this,te)}),pt("mouseleave",ne,function(...te){var _e;(_e=X())==null||_e.apply(this,te)}),Sn(ne,"clientWidth",$),b(t,ne),H(),o()}Ze(["pointerdown","click"]);var j0=Ee('<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 Fd(t,e){let i=f(()=>(e.completed,"interactive-episode-completed-icon"));je(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,r)=>{var a=j0(),l=le(a),d=k(l);O(()=>{Ne(l,"fill",oa),Ne(l,"fill-opacity",e.completed?1:.24),Ne(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),b(o,a)},$$slots:{default:!0}})}var X0=L("<div><!></div>"),Z0={hash:"s-1b",code:".interactive-episode-icon.s-1b{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-1b{opacity:.4;pointer-events:none}"};function sm(t,e){B(e,!0),Q(t,Z0);let o=$e().ui.t,r=K(0),a=f(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));ko(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=X0();let u;var m=C(s);let p=f(()=>!!e.videoEpisode.completed);Fd(m,{get completed(){return n(p)}}),S(s),O(v=>{u=oe(s,1,"interactive-episode-icon s-1b",null,u,v),qe(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),Sn(s,"clientWidth",v=>N(r,v)),b(l,s)},$$slots:{default:!0}}),H()}var J0=L('<div><div class="video-episode-inner s-1a"><div class="video-episode-loaded s-1a"></div> <div></div></div></div>'),ex=L('<div class="video-episodes-wrap s-1a"></div>'),tx={hash:"s-1a",code:".video-episodes-wrap.s-1a{height:100%;position:absolute;width:100%}.video-episode.s-1a{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-1a:first-child{padding-left:0}.video-episode.s-1a:last-child{padding-right:0}.video-episode.s-1a:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-1a,.video-episode-inner.s-1a,.video-episode-loaded.s-1a{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-1a{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-1a:first-child .video-episode-inner:where(.s-1a),.video-episode.s-1a:last-child .video-episode-inner:where(.s-1a){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-1a{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-1a,.video-episode-loaded.s-1a{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-1a{background-color:var(--slider-filled-bg)}"};function am(t,e){Q(t,tx);let i=h(e,"videoEpisodes",19,()=>[]);var o=ex();hi(o,21,i,r=>r.from,(r,a)=>{var l=J0();let d;var s=C(l),u=C(s),m=k(u,2);let p;S(s),S(l),O((v,_)=>{d=oe(l,1,"video-episode s-1a",null,d,v),qe(l,`left: ${n(a).from}%; width: ${n(a).width}%`),qe(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),p=oe(m,1,"video-episode-filled s-1a",null,p,_),qe(m,`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 ix(t,e,i,o,r,a,l){if(t.preventDefault(),e()&&N(i,e().getBoundingClientRect(),!0),o()||n(r)||!e())return;N(r,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function ox(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 nx(t,e,i,o,r){if(t.preventDefault(),e()||!n(i))return;N(i,!1);let a=o(t.clientX,t.clientY);r()(a,t)}function rx(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function sx(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),N(r,!1),a()(l)}var ax=L("<div></div>"),lx=L('<div class="bars s-12"><div class="loaded s-12"></div> <div></div></div>'),dx=L('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),cx={hash:"s-12",code:'.interactive-icons.s-12{position:absolute;top:-28px;width:calc(100% - 20px)}.interactive-icons.mobile.s-12{top:-10px}.slider.s-12{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-12{cursor:default}.slider.s-12: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-12{background:var(--slider-bg);overflow:hidden}.bars.s-12,.loaded.s-12{border-radius:var(--slider-radius);height:100%;position:absolute;width:100%}.loaded.s-12{background:var(--slider-loaded-bg);left:-100%;transition:transform .2s;will-change:transform}.filled.s-12{background-color:var(--slider-filled-bg);border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.slider.square.s-12,.slider.square.s-12 .filled:where(.s-12),.slider.square.s-12 .loaded:where(.s-12),.slider.square.s-12>.bars:where(.s-12){border-radius:unset}.filled.active-live.s-12{background-color:var(--timeline-slider-filled-active-live-bg)}.filled.ads.s-12{background-color:var(--slider-filled-ads)}.handleWrap.s-12{left:-100%;position:absolute;width:100%}.handle.s-12{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-12{background-color:var(--timeline-slider-handle-active-live-bg)}.handle-always-visible.s-12 .handle:where(.s-12),.slider-dragging.s-12 .handle:where(.s-12),.slider.s-12:hover .handle:where(.s-12){opacity:1;transform:scale(1);visibility:visible}.slider-dragging.s-12 .handle:where(.s-12){transform:scale(1.3)}.slider-vertical.s-12{left:-8px;position:absolute;top:-18px;transform:rotate(-90deg);transform-origin:0 0}.slider.disabled.s-12{cursor:default;opacity:.4}'};function Ha(t,e){B(e,!0),Q(t,cx);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),m=h(e,"videoEpisodes",19,()=>[]),p=h(e,"withWheelHandler",3,!1),v=h(e,"isInteractive",3,!1),_=h(e,"disabled",3,!1),y=h(e,"hideHandel",3,!1),$=h(e,"onPointerDown",3,qn),x=h(e,"onHandleMove",3,qn),I=h(e,"onPointerUp",3,qn),T=h(e,"onPointerEnter",3,qn),R=h(e,"onPointerMove",3,qn),A=h(e,"onPointerLeave",3,qn),P=h(e,"onMouseEnter",3,qn),E=h(e,"onMouseLeave",3,qn),W=h(e,"onWheelUp",3,qn),F=h(e,"onWheelDown",3,qn),U=h(e,"onWheelLeft",3,qn),X=h(e,"onWheelRight",3,qn),se=h(e,"onDisabledClick",3,qn),j=h(e,"loadedProgress",3,0),ne=h(e,"filledProgress",3,0),Z=h(e,"handleProgress",3,0),Te=h(e,"ariaLabel",3,""),fe=h(e,"ariaValueMin",3,void 0),te=h(e,"ariaValueMax",3,void 0),_e=h(e,"ariaValueNow",3,void 0),Ce=h(e,"ariaValueText",3,""),me=h(e,"onContextMenu",3,qn),ce=h(e,"handleAlwaysVisible",3,!1),Qe=Mt(),G=K(void 0),D=K(!1),Ye=f(()=>{var ye;return(ye=te())!=null?ye:0}),re=f(()=>{var ye;return F_(m())&&((ye=m()[m().length-1])==null?void 0:ye.time)<n(Ye)}),pe=f(()=>F_(m())&&m().length&&n(re)&&n(Ye)?Xe(j()*100,ne()*100):[]);function ue(ye){if(ye.preventDefault(),i()&&N(G,i().getBoundingClientRect(),!0),_())return;let Fe=ke(ye.clientX,ye.clientY),Se=xe(ye.clientX);T()(Fe,Se,n(G).width)}function Ae(ye){ye.preventDefault(),!_()&&A()()}function Ue(){P()()}function ee(){E()()}function de(ye){_()||p()&&(ye.preventDefault(),ye.deltaY<0?W()():ye.deltaY>0?F()():ye.deltaX>0?X()():U()())}function ke(ye,Fe){return l()?Math.max(0,Math.min(1,(n(G).height-(Fe-n(G).top))/n(G).height)):Math.min(Math.max(ye-n(G).x,0),n(G).width)/n(G).width}function xe(ye){return Math.min(Math.max(ye-n(G).x,0),n(G).width)}function Xe(ye,Fe){let Se=Qe.features.episodesClustering&&!v()?Qe.episodeMinWidthPc:0,xt=[],ve=m()[0].time/n(Ye)*100,Oe=0,Ke=0;for(let Pt=1;Pt<m().length;Pt++)Oe=m()[Pt].time/n(Ye)*100,Oe-ve>Se&&(xt.push({from:ve,width:Math.max(0,Oe-ve),loadedWidth:Math.max(0,Math.min(Oe,ye)-ve),filledWidth:Math.max(0,Math.min(Oe,Fe)-ve),interactive:m()[Pt-1].interactive,completed:m()[Pt-1].completed}),ve=m()[Pt].time/n(Ye)*100,Ke++);let at={from:ve,width:Math.max(0,100-ve),loadedWidth:Math.max(0,Math.min(ye,100)-ve),filledWidth:Math.max(0,Math.min(Fe,100)-ve),interactive:m()[Ke].interactive,completed:m()[Ke].completed};100-ve<Se?(Ke-=1,xt[Ke].width+=100-ve,xt[Ke].loadedWidth+=Math.max(0,Math.min(ye,100)-ve),xt[Ke].filledWidth+=Math.max(0,Math.min(Fe,100)-ve)):xt[Ke]=at;let qt=m()[0].time;if(qt!==0){let Pt=qt/n(Ye)*100;xt.unshift({from:0,width:Pt,loadedWidth:Math.min(Pt,ye),filledWidth:Math.min(Pt,Fe)})}return xt}function Pe(ye){return Math.max(0,Math.min(100,ye*100))}let we=f(()=>Pe(j())),De=f(()=>Pe(ne()));var Ct=dx(),Tt=le(Ct);{var Et=ye=>{var Fe=ax();let Se;hi(Fe,21,()=>n(pe),xt=>xt.from,(xt,ve)=>{var Oe=Re(),Ke=le(Oe);{var at=qt=>{sm(qt,{get videoEpisode(){return n(ve)},get disabled(){return _()}})};V(Ke,qt=>{n(ve).interactive&&qt(at)})}b(xt,Oe)}),S(Fe),O(xt=>Se=oe(Fe,1,"interactive-icons s-12",null,Se,xt),[()=>({mobile:s(),hidden:s()&&!n(D)})]),b(ye,Fe)};V(Tt,ye=>{v()&&ye(Et)})}var dt=k(Tt,2);let wt;dt.__pointerdown=[ix,i,G,_,D,ke,$],dt.__pointermove=[ox,_,ke,xe,R,G,D,x],dt.__pointerup=[nx,_,D,ke,I],dt.__click=[rx,_,se,ke],dt.__contextmenu=[sx,ke,_,se,D,me];var Yt=C(dt);{var Dt=ye=>{am(ye,{get videoEpisodes(){return n(pe)},get disabled(){return _()},get isMobile(){return s()}})},Rt=ye=>{var Fe=lx(),Se=C(Fe),xt=k(Se,2);let ve;S(Fe),O(Oe=>{Ne(Se,"data-value",n(we)),qe(Se,`transform: translateX(${n(we)}%);`),ve=oe(xt,1,"filled s-12",null,ve,Oe),Ne(xt,"data-value",n(De)),qe(xt,`transform: translateX(${n(De)}%);`)},[()=>({"active-live":d()})]),b(ye,Fe)};V(Yt,ye=>{n(pe).length?ye(Dt):ye(Rt,!1)})}var Ut=k(Yt,2);let q;var Le=C(Ut);let Me;S(Ut),S(dt),et(dt,ye=>i(ye),()=>i()),O((ye,Fe,Se,xt)=>{var ve,Oe;wt=oe(dt,1,`slider ${(ve=o())!=null?ve:""}`,"s-12",wt,ye),Ne(dt,"aria-label",Te()),Ne(dt,"aria-valuemin",fe()),Ne(dt,"aria-valuemax",te()),Ne(dt,"aria-valuenow",_e()),Ne(dt,"aria-valuetext",Ce()),Ne(dt,"data-testid",(Oe=r())!=null?Oe:null),q=oe(Ut,1,"handleWrap s-12",null,q,Fe),qe(Ut,Se),Me=oe(Le,1,"handle s-12",null,Me,xt)},[()=>({disabled:_(),"slider-dragging":n(D),hidden:a(),"handle-always-visible":ce(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${Pe(Z())}%);`,()=>({"active-live":d()})]),pt("pointerenter",dt,ue),pt("pointerleave",dt,Ae),pt("mouseenter",dt,Ue),pt("mouseleave",dt,ee),pt("wheel",dt,de),b(t,Ct),H()}Ze(["pointerdown","pointermove","pointerup","click","contextmenu"]);var io=(t,e)=>Sd[t]>=Sd[e];var Ns=(t,e)=>Sd[t]<=Sd[e],U_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var px=L("<div><!></div>"),fx=L("<div><!> <!></div>"),mx={hash:"s-27",code:".volumeBar-container.s-27{align-items:center;display:flex}.vertical.s-27 .btn,.vertical.s-27 .tooltip-wrapper,.volumeBar-container.vertical.s-27{width:40px}.volumeBar.s-27{align-items:center;display:flex;margin:0 8px;position:relative;width:70px;--slider-height:var(--slider-volume-height);--slider-radius:var(--slider-volume-radius);--slider-handle-size:var(--slider-volume-handle-size);--slider-bg:var(--volume-slider-bg);--slider-filled-bg:var(--volume-slider-filled-bg);--slider-handle-bg:var(--volume-slider-handle-bg)}.volumeBar-slider-vertical{width:50px!important}.volumeBar-vertical.s-27{padding:0 8px 0 0;width:0}"};function lm(t,e){var xe,Xe;B(e,!0),Q(t,mx);let[i,o]=Be(),r=()=>w(R,"$isAudioAvailable$",i),a=()=>w(v,"$muted$",i),l=()=>w(p,"$volume$",i),d=()=>w(x,"$currentGridType$",i),s=()=>w(ue,"$controlsVisible",i),u=$e(),m=Mt(),p=u.state.volume$,v=u.state.muted$,{setVolume:_,startVolumeChanging:y,stopVolumeChanging:$}=u.actions.internal,x=u.ui.currentGridType$,I=(xe=u.callbacks)==null?void 0:xe.onAudioDoesNotExistHint,T=(Xe=u.callbacks)==null?void 0:Xe.onAudioDisabledHint,R=u.state.isAudioAvailable$,A=u.state.isAudioDisabled,P=u.ui.t,E=K(!1),W,F=f(()=>e.isAds||r()),U=f(()=>!n(F)||a()||l()===0),X=f(()=>Ns(d(),"l")),se=f(()=>n(X)?"":n(U)?!r()||A?P("tooltip_sound_unavailable"):P("tooltip_volume"):P("tooltip_volume_muted")),j=f(()=>n(U)?P("tooltip_volume"):P("tooltip_volume_muted")),ne=f(()=>n(U)?0:l()),Z=!1,Te=f(()=>e.isAds?!1:A?!T:r()?!1:!I);function fe(Pe){y(),_(Pe)}function te(){Vu(u,l(),m.controls.volumeStepWheel)}function _e(){Ru(u,l(),m.controls.volumeStepWheel)}function Ce(Pe){_(Pe)}function me(Pe){_(Pe),$()}function ce(){Z=!0}function Qe(){Z=!1,Ye()}function G(){clearTimeout(W),N(E,!0)}function D(){Ye()}function Ye(){W=window.setTimeout(()=>{Z||N(E,!1)},m.controls.volumeBarTimeout)}function re(Pe){Pe.preventDefault(),Pe.deltaY<0?te():Pe.deltaY>0&&_e()}let pe=K(!1),ue=u.ui.controlsVisible;He(()=>{s()||N(pe,!1)});var Ae=fx();let Ue;var ee=C(Ae);Ba(ee,{get content(){return n(se)},translateY:-18,get active(){return n(pe)},set active(Pe){N(pe,Pe,!0)},children:(Pe,we)=>{let De=f(()=>n(X)?"btn-volume-vertical":"btn-volume-horizontal");Ft(Pe,{className:"btn-full-opacity",get disabled(){return n(Te)},get testId(){return n(De)},get ariaLabel(){return n(j)},get click(){return e.click},get ariaKeyShortCut(){return fs.KeyM},role:"button",children:(Ct,Tt)=>{ca(Ct,{get size(){return"24"},get volume(){return l()},get muted(){return n(U)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var de=k(ee,2);{var ke=Pe=>{var we=px();let De;var Ct=C(we);let Tt=f(()=>n(X)?"volumeBar-slider-vertical":""),Et=f(()=>n(X)&&!n(E)),dt=f(()=>n(X)?ce:Ou),wt=f(()=>n(X)?Qe:Ou),Yt=f(()=>Math.round(n(ne)*100)),Dt=f(()=>`${Math.round(n(ne)*100)}%`),Rt=f(()=>n(X)?"volume-slider-vertical":"volume-slider");Ha(Ct,{get className(){return n(Tt)},get isHidden(){return n(Et)},get isVertical(){return n(X)},withWheelHandler:!0,onWheelUp:te,onWheelDown:_e,onPointerDown:fe,onHandleMove:Ce,onPointerUp:me,get onPointerEnter(){return n(dt)},get onPointerLeave(){return n(wt)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(Yt)},get ariaValueText(){return n(Dt)},get filledProgress(){return n(ne)},get handleProgress(){return n(ne)},get testId(){return n(Rt)}}),S(we),O(Ut=>De=oe(we,1,"volumeBar s-27",null,De,Ut),[()=>({"volumeBar-vertical":n(X)})]),b(Pe,we)};V(de,Pe=>{n(F)&&Pe(ke)})}S(Ae),O(Pe=>Ue=oe(Ae,1,"volumeBar-container s-27",null,Ue,Pe),[()=>({vertical:n(X)})]),pt("mouseenter",Ae,function(...Pe){var we;(we=n(X)?G:Ou)==null||we.apply(this,Pe)}),pt("mouseleave",Ae,function(...Pe){var we;(we=n(X)?D:Ou)==null||we.apply(this,Pe)}),pt("wheel",Ae,re),b(t,Ae),H(),o()}import{noop as hx}from"@vkontakte/videoplayer-shared/es2018";var vx=Ee('<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>'),gx=Ee('<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 dm(t,e){let i=h(e,"isFullscreen",8,!1),o=cr(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");je(t,{get testId(){return n(o)},children:(r,a)=>{var l=Re(),d=le(l);{var s=m=>{var p=vx();b(m,p)},u=m=>{var p=gx();b(m,p)};V(d,m=>{i()?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}})}function Ud(t,e){B(e,!0);let i=h(e,"isFullscreen",3,!1),o=h(e,"click",3,hx),r=$e(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=f(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));Ft(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let m=aa(u);a.set(m),o()()},get ariaKeyShortCut(){return fs.KeyF},role:"button",children:(u,m)=>{dm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),H()}var _x=Ee('<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 cm(t,e){let i=Cn(e,["$$slots","$$events","$$legacy","children"]);var o=_x();to(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);ei(r,()=>{var a;return(a=e.children)!=null?a:gt}),Jt(),S(o),b(t,o)}var bx=Ee('<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 um(t,e){let i=Cn(e,["$$slots","$$events","$$legacy","children"]);var o=bx();to(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);ei(r,()=>{var a;return(a=e.children)!=null?a:gt}),Jt(6),S(o),b(t,o)}var $x={hash:"s-29",code:"svg [data-logo],svg[data-testid=vk-video-logo-icon--en] ._ru,svg[data-testid=vk-video-logo-icon--short] ._en,svg[data-testid=vk-video-logo-icon--short] ._ru,svg[data-testid=vk-video-logo-icon] ._en{opacity:0;visibility:hidden}svg[data-logo=app_store] [data-logo=app_store],svg[data-logo=play_market] [data-logo=play_market],svg[data-logo=vk_video] [data-logo=vk_video]{opacity:1;visibility:visible}"};function pm(t,e){B(e,!0),Q(t,$x);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=f(()=>!o()&&!i()?91:i()?l:95),s=f(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=f(()=>`0 0 ${n(d)} 24`);um(t,{get width(){return n(d)},height:"24",get viewBox(){return n(u)},get"data-testid"(){return n(s)},get"data-logo"(){return r()}}),H()}function zd(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(_,"$isMobile",i),a=()=>w(v,"$currentGridType$",i),l=()=>w($,"$isCyrillicRelatedInterface$",i),d=h(e,"ref",15,void 0),s=h(e,"logoClickable",3,!1),u=h(e,"targetUrl",3,""),m=Mt(),p=$e(),v=p.ui.currentGridType$,_=p.ui.isMobile,y=p.ui.t,$=p.isCyrillicRelatedInterface$,x=f(()=>m.logoType!=="vk"),I=f(()=>n(x)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),T=f(()=>(r()&&Ns(a(),"m")||Ns(a(),"l"))&&n(x)),R=()=>{var E,W;e.click(),(E=p.callbacks)!=null&&E.onLogoClicked?(W=p.callbacks)==null||W.onLogoClicked():u()&&window.open(u(),"_blank")},A=f(()=>!s()),P=f(()=>n(x)?"btn-vk-video-logo":"btn-vk-logo");Ft(t,{className:"btn-full-opacity",get disabled(){return n(A)},click:R,get testId(){return n(P)},get ariaLabel(){return n(I)},get ref(){return d()},set ref(E){d(E)},children:(E,W)=>{var F=Re(),U=le(F);{var X=j=>{pm(j,{get logo(){return m.logoType},get short(){return n(T)},get isCyrillic(){return l()}})},se=j=>{cm(j,{})};V(U,j=>{n(x)?j(X):j(se,!1)})}b(E,F)},$$slots:{default:!0}}),H(),o()}import{ChromecastState as Sx}from"@vkontakte/videoplayer-core/es2018";import{ChromecastState as W_}from"@vkontakte/videoplayer-core/es2018";var yx=Ee('<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-15"></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-15"></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-15"></path>',1),xx=Ee('<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),wx={hash:"s-15",code:".animated.s-15{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-15{animation-name:s-15-wave1}.wave2.animated.s-15{animation-name:s-15-wave2}.wave3.animated.s-15{animation-name:s-15-wave3}@keyframes s-15-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-15-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-15-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function Wd(t,e){B(e,!0),Q(t,wx);let i=h(e,"isMobile",3,!1),o=f(()=>e.iconState===W_.CONNECTED),r=f(()=>e.iconState===W_.CONNECTING),a=f(()=>n(o)?"#2688EB":oa),l=f(()=>e.size?dn(e.size):void 0);var d=Re(),s=le(d);{var u=p=>{je(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(v,_)=>{var y=yx();Jt(2),b(v,y)},$$slots:{default:!0}})},m=p=>{je(p,{get style(){return n(l)},testId:"chromecast-icon",children:(v,_)=>{var y=xx(),$=le(y);let x;var I=k($);let T;var R=k(I);let A;var P=k(R);let E;var W=k(P);let F;O((U,X,se,j,ne)=>{x=oe($,0,"wave2 s-15",null,x,U),T=oe(I,0,"wave3 s-15",null,T,X),A=oe(R,0,"wave1 s-15",null,A,se),E=oe(P,0,"s-15",null,E,j),F=oe(W,0,"s-15",null,F,ne)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:n(o)}),()=>({hidden:!n(o)})]),b(v,y)},$$slots:{default:!0}})};V(s,p=>{i()?p(u):p(m,!1)})}b(t,d),H()}import{noop as Cx}from"@vkontakte/videoplayer-shared/es2018";function Kd(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"click",3,Cx),l=$e().ui.t,d=f(()=>e.state===Sx.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));Ft(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)=>{Wd(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),H()}import{noop as Ix}from"@vkontakte/videoplayer-shared/es2018";var Tx=Ee('<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 fm(t){je(t,{testId:"episodes-icon",children:(e,i)=>{var o=Tx();Jt(2),b(e,o)},$$slots:{default:!0}})}var Bu=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var Ex=L('<span class="text mobile s-22"> </span> <div class="chevron-episodes s-22" data-testid="btn-episodes_icon"><!></div>',1),Px=L('<span class="text s-22"> </span>'),kx=L('<span class="text count s-22"> </span>'),Ax=L('<span class="icon s-22"><!></span> <!>',1),Lx={hash:"s-22",code:".icon.s-22{flex-shrink:0}.text.s-22{overflow:hidden;padding:0 8px;text-overflow:ellipsis;white-space:nowrap}.text.count.s-22{overflow:visible}.text.mobile.s-22{padding:0 3px 0 4px}.chevron-episodes.s-22{margin-bottom:-6px;opacity:.7;transform:scale(.8)}"};function qd(t,e){var Z,Te,fe;B(e,!0),Q(t,Lx);let[i,o]=Be(),r=()=>w(y,"$currentGridType$",i),a=()=>w($,"$openedByKeyboard$",i),l=()=>w(x,"$panelOpened$",i),d=()=>w(I,"$isMobile",i),s=h(e,"position",3,0),u=h(e,"duration",3,0),m=h(e,"timeCodes",19,()=>[]),p=$e(),v=(Te=(Z=p.callbacks)==null?void 0:Z.onEpisodeChanged)!=null?Te:Ix,_=!!((fe=p.callbacks)!=null&&fe.onEpisodeClicked),y=p.ui.currentGridType$,$=p.ui.episodes.openedByKeyboard$,x=p.ui.episodes.panelOpened$,I=p.ui.isMobile,T=p.ui.t,R=K(void 0),A=te=>{var Ce,me,ce;if(!!((Ce=p.callbacks)!=null&&Ce.onEpisodeClicked)){let Qe=aa(te);$.set(Qe),x.set(!0),(ce=(me=p.callbacks)==null?void 0:me.onEpisodeClicked)==null||ce.call(me,Qe)}},P=K(null),E=f(()=>s()/u());He(()=>{var _e;let te=Bu(n(E),u(),m());te?((_e=n(P))==null?void 0:_e.time)!==te.time&&(v(te),N(P,te,!0)):N(P,null)});let W=f(()=>{var te;return((te=n(P))==null?void 0:te.text)||""}),F=f(()=>io(r(),"xl")?"FULL":io(r(),"m")?"COUNT":"SHORT"),U=f(()=>`${T("tooltip_episodes")}: ${n(W)}`),X=async(te,_e,Ce)=>{await uo(),(te==null?void 0:te.getAttribute("aria-expanded"))==="false"&&_e&&!Ce&&St(()=>{$.set(!1),te.focus()})};He(()=>{X(n(R),a(),l())});var se=Re(),j=le(se);{var ne=te=>{let _e=f(()=>d()?"px-0":""),Ce=f(()=>!_);Ft(te,{get className(){var me;return`w-max btn-full-opacity btn-jc-l ${(me=n(_e))!=null?me:""}`},testId:"btn-episodes",click:A,get disabled(){return n(Ce)},get ariaExpanded(){return l()},get ariaLabel(){return n(U)},get ref(){return n(R)},set ref(me){N(R,me,!0)},children:(me,ce)=>{var Qe=Re(),G=le(Qe);{var D=re=>{var pe=Ex(),ue=le(pe),Ae=C(ue,!0);S(ue);var Ue=k(ue,2),ee=C(Ue);Ar(ee,{direction:"right"}),S(Ue),O(()=>ge(Ae,n(W))),b(re,pe)},Ye=re=>{var pe=Ax(),ue=le(pe),Ae=C(ue);fm(Ae,{}),S(ue);var Ue=k(ue,2);{var ee=ke=>{var xe=Px(),Xe=C(xe,!0);S(xe),O(()=>ge(Xe,n(W))),b(ke,xe)},de=(ke,xe)=>{{var Xe=Pe=>{var we=kx(),De=C(we,!0);S(we),O(()=>ge(De,m().length)),b(Pe,we)};V(ke,Pe=>{n(F)==="COUNT"&&Pe(Xe)},xe)}};V(Ue,ke=>{n(F)==="FULL"?ke(ee):ke(de,!1)})}b(re,pe)};V(G,re=>{d()?re(D):re(Ye,!1)})}b(me,Qe)},$$slots:{default:!0}})};V(j,te=>{n(P)&&te(ne)})}b(t,se),H(),o()}import{debounceFn as pb}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as Ux,PlaybackState as Bl,Player as zx,PredefinedQualityLimits as hs,VideoFormat as Yd,clientChecker as eb}from"@vkontakte/videoplayer-core/es2018";import{assertNonNullable as mr,getHighestQuality as Wx,InterfaceLanguage as Kx,isInvariantQuality as qx,isNonNullable as Qx,loadVKLangPack as Gx,Logger as Yx,map as tb,merge as jx,Observable as Gu,Subject as jd,Subscription as xm,TracerFactory as Xx,ValueSubject as ib,VideoQuality as Zx,devNull as Jx,now as e2,filter as t2,once as i2}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as Bs,ThinOneStat as o2}from"@vkontakte/videoplayer-statistics/es2018";import{detectEmbed as Mx,devNull as ii,now as oi,withoutNullable as K_}from"@vkontakte/videoplayer-shared/es2018";import{addScript as Vx,Subject as cn,clearVideoElement as Rx}from"@vkontakte/videoplayer-shared/es2018";var Nx="//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 cn,loadStarted$:new cn,loadEnded$:new cn,loadError$:new cn,ready$:new cn,slotRequested$:new cn,started$:new cn,timeRemained$:new cn,paused$:new cn,resumed$:new cn,ended$:new cn,empty$:new cn,skipped$:new cn,clicked$:new cn,closed$:new cn,error$:new cn};this.loadAdman=e=>(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[oi()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));this.loadAdmanMailRu=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[oi()]}),o())};Vx(Nx,e,this.loadTimeout).then(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[oi()]}),window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[oi()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[oi()]}),o(),clearTimeout(r)})});this.loadAdmanNPM=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[oi()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[oi()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[oi()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[oi()]}),!d&&(window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[oi()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[oi()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[oi(),i.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(i)}`}),this.events.started$.next(e),i.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:"ad muted start"})),this.adsState.duration.set(i.duration),this.adsState.playbackState.set("playing"),this.adsState.canSkip.set(i.allowClose),this.adsState.secondsToWatchBeforeSkip.set(i.allowCloseDelay),this.startWatchDog(),(o=this.externalApi)!=null&&o.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,e,String(i.bannerID))):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=e=>{var o;((o=this.adsState)!=null&&o.playbackState?be(this.adsState.playbackState):void 0)!=="inactive"&&(this.adsState?(this.adsState.position.set(e.currentTime),this.events.timeRemained$.next(e),this.startWatchDog()):this.onAdError("TimeRemained callback failed: Adman state is not initialized"))};this.onAdPaused=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.stopWatchDog(),this.adsState?(this.log({message:"ad paused"}),this.adsState.playbackState.set("paused")):this.onAdError("Paused callback failed: Adman state is not initialized")};this.onAdPlayed=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.startWatchDog(),this.adsState?(this.log({message:"ad played"}),this.adsState.playbackState.set("playing")):this.onAdError("Player callback failed: Adman is not initialized")};this.onAdMidrollPoint=()=>{if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[oi()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch(e){this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};this.onAdSkipped=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad completed"}),this.currentAdSection?(this.events.ended$.next(this.currentAdSection),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0)):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{var e,i;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad clicked"}),(i=this.videoElement)==null||i.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(e="ad error")=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[oi()]}),this.log({message:e}),this.events.error$.next(e),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()};this.log=e.createComponentLog("AdmanWrapper"),ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[oi()]}),this.loadTimeout=i.loadTimeout,this.initTimeout=i.initTimeout,this.runtimeTimeout=i.runtimeTimeout,this.useAdmanFromNPM=i.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(i.volumeMultiplier,1)),this.isVsidOriginal=i.isVsidOriginal}init(e,i,o){this.actions=e,this.adsState=i,this.playerState=o}onAdmanLoadingError(){this.onAdError("adman loading error")}async initAdman(e){var A,P;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[oi(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:o,isAutoplay:r,adsContainer:a,adsVideoElement:l,slotId:d,params:s={},paramsOverride:u={},duration:m,externalApi:p,json:v}=e;this.externalApi=p;let _,y=this.playerState&&be(this.playerState.vsid);y&&(this.isVsidOriginal?_=y:_=parseInt(y,36));let{isEmbed:$,immediateOrigin:x}=Mx(),I=(A=$?x:window.location.href)!=null?A:window.location.href,T=K_({...s,dl:encodeURIComponent(I),autoplay:r?1:0,player_width:i,player_height:o,..._?{request_id:_}:{},duration:m,...u}),R=K_({slot:v?void 0:d,wrapper:a,videoEl:l,videoQuality:o,params:v?void 0:T,browser:{mobile:!1},json:v});try{let E=new window.AdmanHTML;if(E.onReady(this.onAdsReady),E.onStarted(this.onAdStarted),E.onPlayed(this.onAdPlayed),E.onPaused(this.onAdPaused),E.adMidrollPoint(this.onAdMidrollPoint),E.onClosed(this.onAdClosed),E.onSkipped(this.onAdSkipped),E.onClicked(this.onAdClicked),E.onTimeRemained(this.onAdTimeRemained),E.onCompleted(this.onAdCompleted),E.onError(this.onAdError),E.setDebug(!1),!v&&((P=this.externalApi)!=null&&P.videoGetAds)){let W=await this.safeExternalCall(this.externalApi.videoGetAds,T);W&&(delete R.slot,delete R.params,Object.assign(R,{json:W}))}E.init(R),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(R)}`})}catch(E){ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[oi()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){var o,r,a;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[oi()]}),this.currentAdSection===null&&!e){this.log({message:"switch to video, no currentAdSection. can't switch"});return}let i=this.currentAdSection==="postroll";if(this.actions){if(this.adsState&&this.playerState)this.adsState.playbackState.set("inactive"),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${i}`});else{let l="Switch to video: Adman state was not updated correctly";this.log({message:l}),this.events.error$.next(l)}(a=(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(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adsState){this.log({message:"toggle play"});let i=be(this.adsState.playbackState);i==="playing"?this.pause():i==="paused"&&this.play()}else this.onAdError("Can not toggle play: Adman state is not initialized")}setInitialVolume(e){this.log({message:`set initial volume ${e}`}),this.initialVolume=e}setVolume(e){let i=e*this.volumeMultiplier;if(this.log({message:`set volume ${i}`}),this.adman)try{this.adman.setVolume(i)}catch(o){this.onAdError("could not set ad volume")}this.videoElement&&(this.videoElement.volume=i)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch(i){this.onAdError("could not set ad fullscreen")}}startPreroll(){if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[oi()]}),this.adman){if(!this.isDestroyed){this.log({message:"start preroll"}),this.setVolume(this.initialVolume),this.currentAdSection="preroll",this.startWatchDog();try{this.adman.start("preroll")}catch(e){this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch(i){this.onAdError("could not start postroll")}}else this.onAdError("Can not start postroll: Adman is not initialized")}startWatchDog(){this.watchDogTimeout&&this.stopWatchDog(),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch(i){this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch(i){this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(i){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){var o;(o=this.adman)==null||o.setPosition(Math.floor(e),Math.floor(i))}destroy(){var e,i,o,r,a,l,d,s,u,m,p,v;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[oi()]}),this.log({message:"destroy"}),this.stopWatchDog(),(e=this.adman)==null||e.onReady(void 0),(i=this.adman)==null||i.onStarted(void 0),(o=this.adman)==null||o.onPlayed(void 0),(r=this.adman)==null||r.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(l=this.adman)==null||l.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(s=this.adman)==null||s.onClicked(void 0),(u=this.adman)==null||u.onTimeRemained(void 0),(m=this.adman)==null||m.onCompleted(void 0),(p=this.adman)==null||p.onError(void 0),(v=this.adman)==null||v.destroy(),this.videoElement&&Rx(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 q_=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 mm=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 Fu,{startTime:m,endTime:p}=u.parse(s);l.startTime=m,l.endTime=p}else if(s.trim()!==""){let u=new vm,{texts:m}=u.parse(s);l.texts=[...l.texts,...m]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},Fu=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}},vm=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},r=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](l){let d=0,s=[];for(;d<l.length;){let u=["<",">"].reduce((m,p)=>{let v=l.indexOf(p,d);return m===-1||m>v?v:m},-1);if(u===-1){s.push(l.substring(d));break}s.push(l.substring(d,u)),d=u+1}return s}}),a=new Fu;for(let l of r)a.isTime(l)?i.texts.push({type:"timestamp",value:a.parseTime(l)}):i.texts.push({type:"text",value:l});return i}},Q_=mm;import{isNonNullable as gm}from"@vkontakte/videoplayer-shared/es2018";var Fa,Ai,hm=0,_m=!1,G_="",Y_=(t,e=0,i=0)=>t<e&&t<i,Uu=(t,e=0,i=0)=>t>=e&&t<=i,Dx=(t,e=0,i=0)=>t>e&&t>i,j_=(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>=hm,l=t<hm;if(hm=t,l&&(_m=!1),gm(Fa)&&Uu(t,Fa.startTime,Fa.endTime)&&G_===e.value)return Fa;if(!gm(Ai)&&(r!=null&&r.length)&&!_m){Ai=r.find(({startTime:u,endTime:m})=>Uu(t,u,m)||a&&Y_(t,u,m)),Fa=void 0,!gm(Ai)&&r[r.length-1].endTime<t&&(_m=!0);return}else{if(Uu(t,Ai==null?void 0:Ai.startTime,Ai==null?void 0:Ai.endTime))return Fa=Ai,Ai=void 0,G_=e.value,Fa;(a&&Dx(t,Ai==null?void 0:Ai.startTime,Ai==null?void 0:Ai.endTime)||l&&Y_(t,Ai==null?void 0:Ai.startTime,Ai==null?void 0:Ai.endTime))&&(Ai=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"},Ox={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"},Qd=t=>{var e,i;return(i=(e=zu[t])!=null?e:zu[Ox[t]])!=null?i:void 0};import{clientChecker as Z_}from"@vkontakte/videoplayer-core/es2018";import{debounceFn as Hx,getWindow as bm,ValueSubject as $m}from"@vkontakte/videoplayer-shared/es2018";import{getWindow as Bx}from"@vkontakte/videoplayer-shared/es2018";var Wu=()=>{var t;return(t=Bx().document)==null?void 0:t.pictureInPictureEnabled},Ku=t=>!!t.pictureInPictureWindow,X_=t=>!!t.target&&"height"in t.target&&"width"in t.target;var Ds=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:Hx(this.onResize.bind(this),300)};this.info={isActive$:new $m(!1),isEnabled$:new $m(!1),type:0};this.info.isEnabled$=new $m(e)}isSupported(){return Wu()}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(){let{document:e}=bm();!this.isSupported()||!this.isActive()||!this.videoElement||!e.pictureInPictureElement||(await e.exitPictureInPicture(),Z_.browser.isYandex&&!this.videoElement.isConnected&&this.onLeavePictureInPicture())}assignPlayerContainer(e){this.isSupported()&&(this.playerContainer=e)}updateVideoElement(){this.isSupported()&&this.exit().finally(()=>{var i;this.removeEventHandlers();let e=this.videoElement;this.videoElement=(i=this.playerContainer)==null?void 0:i.querySelector("video"),this.waitForSafariLeavePictureInPicture(e,this.videoElement),this.addEventHandlers()})}addEventHandlers(){var e,i;(e=this.videoElement)==null||e.addEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.addEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}setExternalEventHandlers(e){this.externalEventHandlers={...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 o,r;let i=Ku(e)?e.pictureInPictureWindow:void 0;this.info.isActive$.next(!0),this.isRequested=!0,i==null||i.addEventListener("resize",this.eventHandlers.resize),(r=(o=this.externalEventHandlers).enterpictureinpicture)==null||r.call(o)}onLeavePictureInPicture(e){var i,o;if(e){let r=Ku(e)?e.pictureInPictureWindow:void 0;r==null||r.removeEventListener("resize",this.eventHandlers.resize)}this.info.isActive$.next(!1),this.isRequested=!1,this.eventHandlers.resize.cancel(),(o=(i=this.externalEventHandlers).leavepictureinpicture)==null||o.call(i)}onResize(e){var o,r;let i=X_(e)?e.target:Ku(e)?e.pictureInPictureWindow:void 0;i&&((r=(o=this.externalEventHandlers).resize)==null||r.call(o,{width:i.width,height:i.height}))}setEnabled(e){this.info.isEnabled$.next(e)}waitForSafariLeavePictureInPicture(e,i){if(Z_.browser.isSafari&&e&&e!==i){let r=this.eventHandlers.leavepictureinpicture,a=0,l=()=>{bm().clearTimeout(a),e.removeEventListener("leavepictureinpicture",d)},d=s=>(r(s),l());e.addEventListener("leavepictureinpicture",d),a=bm().setTimeout(l,1e3)}}};function J_(t){return t instanceof Ds}import{Subscription as Fx}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-statistics/es2018";var qu=class{constructor(e,i,o,r=new Fx){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 gs=t=>t!=null?t:0,Os=(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(gs(i==null?void 0:i.top)-gs(o==null?void 0:o.top)),left:Math.round(gs(i==null?void 0:i.left)-gs(o==null?void 0:o.left)),bottom:Math.round(gs(i==null?void 0:i.bottom)-gs(o==null?void 0:o.top)),right:Math.round(gs(i==null?void 0:i.right)-gs(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:gs(e==null?void 0:e.width),height:gs(e==null?void 0:e.height)}};var In="off";var Ol=t=>!!(Math.round(Math.abs(t)/90)%2);var ob=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:m,previewThumbsData:p,uiConfig:v,coreConfig:_,player:y,disabledControls:$,isInteractive:x,interactiveRanges$:I,isInteractiveTime$:T,replayInteractive:R,stopPlayer:A,hasInteractiveBranches:P,playPrevChapterDisabledTooltip:E,additionalButtons:W,additionalSettingsMenuItems:F,additionalContextMenuItems:U,playPrevVideo:X,playNextVideo:se,onVideoChanged:j,looped:ne=!1,statistics:Z,saveRate:Te,internalsExposure:fe,playerView:te,playerId:_e,metaConfig:Ce})=>{var zv,Wv;let me={..._,isAudioDisabled:l,live:{...(zv=_.live)!=null?zv:{},isLiveCatchUpMode:!!r}},ce=v,Qe=Xx.createRootTracer(ce.features.tracer),G=Qe.createComponentTracer("Store"),D=y||new zx(me,Qe,{playerId:_e,onDevNullLog:s==null?void 0:s.onDevNullLog});fe==null||fe.expose({corePlayer:D});let Ye=new Yx,re=new Hu(Ye,{loadTimeout:ce.ads.loadTimeout,initTimeout:ce.ads.initTimeout,runtimeTimeout:ce.ads.runtimeTimeout,useAdmanFromNPM:ce.ads.useAdmanFromNPM,volumeMultiplier:ce.ads.volumeMultiplier,isVsidOriginal:ce.ads.isVsidOriginal}),pe=Va.getInstance(),ue=u==null?void 0:u.pictureInPictureApi,Ae=u==null?void 0:u.annotationsApi,Ue=u==null?void 0:u.slotsApi,ee=u==null?void 0:u.focusManager,de=Ye.createComponentLog("Store"),ke,xe,Xe={},Pe=new mu,we=new xm,De="",Ct=ae(!1),Tt=Z&&Z.oneStat?ti(Z.oneStat.vsid$):kr(void 0),Et=ae(na()),dt=ae(!1),wt=()=>$_(document,eb.device.isIOS),Yt=(Wv=ue==null?void 0:ue.info.isActive$)!=null?Wv:new ib(!1),Dt=ae(0),Rt=ae(!1),Ut=ae(!1),q=ae([]),Le=jx(D.events.fatalError$,D.events.managedError$).subscribe(c=>q.update(g=>[...g,c])),Me=kr(!1,c=>{let g=D.events.fatalError$.subscribe(()=>c(!0));return()=>g.unsubscribe()}),ye=async c=>{var ie;let g=Object.values(Kx).includes(c);if(ce.downloadVKLanguages&&(g&&ce.updateBuiltinLanguages||!Mf(c))){let Ie;try{Ie=await Gx(c,kh,Ah)}catch(Je){(ie=Z==null?void 0:Z.oneStat)==null||ie.logError({errorType:"VKLangPack",fatal:!1}),pe==null||pe.report(Je,{errorType:"VKLangPack",fatal:!1})}Ie&&(Lf({language:c,pack:Ie,fallback:ce.defaultLanguage}),Fe.set(c),Se.update(Je=>Je+1))}Mf(c)&&Fe.set(c)},Fe=ae(t),Se=ae(0),xt=ae(e);ye(t);let ve=(c,g)=>{let M=be(Fe);return Vf(M,c,g,ce.defaultLanguage)},Oe=ae("thumb");Oe.subscribe(c=>{c==="ads"&&D.info.playbackState$.getValue()&&qt()});let Ke=(()=>{let c=pi([Me,Oe],([g,M])=>g?"crashed":M);return{...c,is:g=>be(c)===g}})(),at=ae(),qt=()=>{at.set({muted:D.info.muted$.getValue()})},Pt=(()=>{let c=ae(new Set($));return{...c,add:g=>{c.update(M=>new Set([...M].concat(g)))},remove:g=>{c.update(M=>{let ie=[...M];return new Set(Array.isArray(g)?ie.filter(Ie=>!g.includes(Ie)):ie.filter(Ie=>Ie!==g))})},includes:g=>{let M=be(c);return Array.isArray(g)?g.every(ie=>M.has(ie)):M.has(g)}}})(),si=ae({width:0,height:0}),li=null,Ii=D.info.isBuffering$,po=kr(Ii.getValue(),c=>{let g=Ii.subscribe(M=>{M&&li===null?li=window.setTimeout(()=>{c(Ii.getValue()),li=null},ce.loaderDelay):c(M)});return()=>{g.unsubscribe(),li&&clearTimeout(li)}});G.log("create store"),de({message:"create store"});let fo=c=>{let g=c.container,M=()=>{fi=new MutationObserver(Ie=>{let{removedNodes:Je}=Ie[0];Je.length&&g.append(D.experimental.element$.getValue())}),fi.observe(g,{childList:!0})},ie=D.experimental.element$.getValue();if(ie)g.append(ie),M();else{let Ie=D.experimental.element$.pipe(t2(Je=>!!Je),i2()).subscribe(Je=>{g.append(Je),M()});we.add(Ie)}},di=c=>{de({message:`init video, config: ${JSON.stringify(c)}`}),x?fo(c):(Jx.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[e2()]}),D.initVideo(c)),G.log("init video",{isInteractive:x}),c.subtitles&&D.setExternalTextTracks(c.subtitles),ke=c,De=c.subtitlesForcedLanguage||""},rt=new jd,ci=c=>rt.next(c),Gi=new jd,ct=new ib(Bs.UNKNOWN),Nt=new jd,fi=null,ot={actionRewind$:Gi,actionSeek$:ct,inPiP$:Yt,inFullscreen$:new Gu(c=>Et.subscribe(g=>c.next(g))),actionSetSubtitle$:Nt,nextMovie$:rt},nt=new jd,Ci=new jd,Zo={actionSeek$:ct,actionSubtitlesSwitched$:nt,actionQuality$:Ci,playerSize$:new Gu(c=>si.subscribe(g=>c.next(g))),inPiP$:Yt,inFullscreen$:new Gu(c=>Et.subscribe(g=>c.next(g))),isLoaderVisible$:new Gu(c=>po.subscribe(g=>c.next(g)))};if(Z){let{oneStat:c,thinOneStat:g,mediascopePixel:M,statSubscription:ie}=Z;c&&(x||ie.add(c.attachTo(D)),ie.add(c.attachToUi(ot)),ie.add(c.attachToAds(re.events)),c.authorize(a).catch(Ie=>{de({message:`onestat auth error ${String(Ie)}`})}),M&&M.attachTo(D)),g&&(ie.add(g.attachTo(D,re.events)),ie.add(g.attachToUi(Zo)),ie.add(g.attachToAds(re.events)),g.updateContext({isMobile:be(Ct)}),g.authorize(a))}if(pe){let c=new xm,g=(M,ie)=>c.add(M.subscribe(ie));if(g(D.events.managedError$,M=>{pe.logIError(M)}),g(D.events.fatalError$,M=>{pe.logIError(M,!0)}),Z){let{oneStat:M}=Z;M&&g(M.experimental.error$,ie=>{pe.logIError(ie)})}pe.sentrySubscription.add(c)}let Ao=()=>{if(eb.device.isIOS&&xe)try{y_(xe)}catch(c){de({message:`exitIosSafariFullscreen failed: ${c}`})}};we.add(D.experimental.element$.subscribe(c=>{c&&(xe=c,c.classList.add("player-media"),ue==null||ue.updateVideoElement(),x&&c.setAttribute("pip","false"),(te==="preview"||!ce.features.pip&&!ce.features.dpip)&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(D.events.ended$.subscribe(()=>{var c;Ao(),(c=s==null?void 0:s.onEnded)==null||c.call(s)})).add(D.events.looped$.subscribe(()=>{var c;(c=s==null?void 0:s.onLooped)==null||c.call(s)})).add(D.events.started$.subscribe(async()=>{var g,M;J_(ue)&&await(ue==null?void 0:ue.revealPictureInPicture());let c=D.info.muted$.getValue();(g=s==null?void 0:s.onStarted)==null||g.call(s),(M=Xe.onStarted)==null||M.call(Xe,c)})).add(D.events.willSeek$.subscribe(({from:c,to:g})=>{var M;(M=s==null?void 0:s.onSeek)==null||M.call(s,c,g,ct.getValue())})).add(D.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=s==null?void 0:s.onAutoplaySoundProhibited)==null||c.call(s)})).add(D.info.position$.subscribe(c=>{var M;let g=D.info.duration$.getValue();isFinite(g)&&g>0&&((M=s==null?void 0:s.onTimeupdate)==null||M.call(s,g,c),re.setPosition(c,g))})).add(D.events.fatalError$.subscribe(c=>{var g;(g=s==null?void 0:s.onCrashed)==null||g.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(D.events.fetcherRecoverableError$.subscribe(c=>{var g;(g=s==null?void 0:s.onRecoverableError)==null||g.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(D.events.loadedMetadata$.subscribe(()=>{Rt.set(!0)})).add(D.info.is3DVideo$.subscribe(c=>{Ut.set(c)})).add(D.info.isEnded$.subscribe(c=>{x&&(c?(T!=null&&T.getValue()&&Pt.add(wd),Pt.add("PLAY_BUTTON")):Pt.remove("PLAY_BUTTON"))})).add(D.info.liveTime$.subscribe(c=>{var g;(g=s==null?void 0:s.onLiveTime)==null||g.call(s,c)})).add(D.info.isStalled$.subscribe(c=>{var g;(g=s==null?void 0:s.onStalledChanged)==null||g.call(s,c)})).add(D.info.isLiveEnded$.subscribe(c=>{var g;return c&&((g=s==null?void 0:s.onLiveEnded)==null?void 0:g.call(s))})).add(re.events.loadStarted$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:g.call(c)})).add(re.events.loadEnded$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:g.call(c)})).add(re.events.loadError$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadError)==null?void 0:g.call(c)})).add(re.events.init$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onInit)==null?void 0:g.call(c)})).add(re.events.ready$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onReady)==null?void 0:g.call(c)})).add(re.events.started$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onStarted)==null?void 0:M.call(g,c)})).add(re.events.timeRemained$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onTimeRemained)==null?void 0:M.call(g,c)})).add(re.events.ended$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onCompleted)==null?void 0:M.call(g,c)})).add(re.events.empty$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onEmpty)==null?void 0:g.call(c)})).add(re.events.clicked$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onClicked)==null?void 0:M.call(g,c)})).add(re.events.closed$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onClosed)==null?void 0:M.call(g,c)})).add(re.events.error$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onError)==null?void 0:M.call(g,c)})).add(re.events.paused$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onPaused)==null?void 0:g.call(c)})).add(re.events.resumed$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onResumed)==null?void 0:g.call(c)}));let ht=new xm,Ot=()=>{var Je,It,Bt;let{debugLog:c}=ce,g,M="#9df7b7",ie="#efd169";if(c&&c!==!0){let{colors:Wt}=c;g=c.tag,M=(Je=Wt==null?void 0:Wt[0])!=null?Je:M,ie=(Bt=(It=Wt==null?void 0:Wt[1])!=null?It:Wt==null?void 0:Wt[0])!=null?Bt:ie}let Ie=g?`: ${g}`:"";ht.add(D.events.log$.subscribe(Wt=>{console.debug(`%c sdk${Ie} `,`background:${M};`,`sdk component: ${Wt.component}`,Wt.message)})).add(Ye.log$.subscribe(Wt=>{console.debug(`%c ui${Ie} `,`background:${ie};`,`ui component: ${Wt.component}.`,Wt.message)}))},z=()=>{ht.unsubscribe()},kt=(c,g)=>{G.log("start camera manual rotation",{mx:c,my:g}),D.startCameraManualRotation(c,g)},lt=(c=!1)=>{G.log("stop camera manual rotation",{immediate:c}),D.stopCameraManualRotation(c)},gi=(c,g,M)=>{G.log("move camera focus px",{xpx:c,ypx:g,dt:M}),D.moveCameraFocusPX(c,g,M)},jt=()=>{D.holdCamera()},$t=()=>{D.releaseCamera()},st=kr(D.info.position$.getValue(),c=>{let g,M,ie=()=>{let Ie=D.info.playbackState$.getValue(),Je=D.info.isLive$.getValue(),It=D.info.duration$.getValue(),Bt=D.info.position$.getValue();if(Ie&&[Bl.PLAYING,Bl.PAUSED].includes(Ie)){let Wt=Je?Bt-It:D.getExactTime();Wt!==M&&c(Wt),M=Wt}g=requestAnimationFrame(ie)};return ie(),()=>cancelAnimationFrame(g)}),Di=ti(D.info.playbackState$),Li=ti(D.info.isBuffering$),En=pi([Di,Li],([c,g])=>g?"buffering":c),Pn=ti(D.info.currentBuffer$),xi=ti(D.info.isEnded$),Yi=ti(D.info.isLive$),kn=ce.features.playbackRate?ti(D.info.canChangePlaybackSpeed$):kr(!1),go=ti(D.info.liveBufferTime$),_i=ti(D.info.volume$),Lo=ti(D.info.muted$),Mo=vu(D.info.predefinedQualityLimitType$.pipe(tb(c=>c===hs.TRAFFIC_SAVING)),D.info.predefinedQualityLimitType$.getValue()===hs.TRAFFIC_SAVING),mo=vu(D.info.predefinedQualityLimitType$.pipe(tb(c=>c===hs.HIGH_QUALITY)),D.info.predefinedQualityLimitType$.getValue()===hs.HIGH_QUALITY),pn=ti(D.info.autoQualityLimitingAvailable$),es=ti(D.info.availableQualities$),Mr=ti(D.info.availableQualitiesFps$),ts=ti(D.info.chromecastState$),Vr=ti(D.info.chromecastDeviceName$),Yn=ti(D.info.currentFormat$),is=ti(D.info.throughputEstimation$),Rr=ti(D.info.videoBitrate$),Jo=ti(D.info.intrinsicVideoSize$),fn=ti(D.info.duration$),vr=ti(D.info.isAudioAvailable$),gr=()=>{li&&clearTimeout(li),li=null},mn=pi([fn,Yi],([c,g])=>g?-c:c),jn=pi([Di],([c])=>c===Bl.PLAYING),hr=ti(D.info.atLiveEdge$),Xn=ti(D.info.atLiveDurationEdge$),Zn=ti(D.info.position$),os=pi([Zn,fn],([c,g])=>isFinite(c)&&isFinite(g)&&!!g),ho=pi([ts],([c])=>c===Ux.CONNECTED),_r=ti(D.info.availableVideoStreams$),Oi=ce.features.audioLanguages?ti(D.info.availableAudioStreams$):kr([]),br=ti(D.info.currentVideoStream$),An=ti(D.info.currentAudioStream$),vt=c=>{c.language&&Ef(c.language),D.setVideoStream(c)},Xt=(c,g)=>{D.setAudioStream(c),Do(g)&&(c.language&&Ef(c.language),ce.features.userVideoPrefs&&i&&Af(ce.userSalt,String(i),{audioTrackId:c.id}))},$r=c=>{let g;if(c.length===1&&(g=c.at(0)),g!=null||(g=c.find(ie=>"isDefault"in ie&&ie.isDefault)),ce.features.userVideoPrefs&&i){let ie=$u(ce.userSalt,String(i));if(ie!=null&&ie.audioTrackId){let Ie=c.find(Je=>Je.id===ie.audioTrackId);g=Ie!=null?Ie:g}}let M=o_();return M&&(g!=null||(g=c.find(({language:ie})=>M===ie))),g!=null||(g=c.at(0)),g},Nr=c=>{G.log("change audio stream",{id:c});let g=D.info.availableAudioStreams$.getValue().find(M=>M.id===c);g&&Xt(g,!0)},Dr=!1;we.add(D.info.availableAudioStreams$.subscribe(c=>{if(!Dr&&c.length){let g=$r(c);g&&(D.setAudioStream(g),Dr=!0)}})),Oi.subscribe(c=>{var g;(g=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||g.call(s,c.map(({label:M="",id:ie="",language:Ie=""})=>({label:M,language:Ie,id:ie})))}),An.subscribe(c=>{var g;return c&&((g=s==null?void 0:s.onAudioStreamChanged)==null?void 0:g.call(s,c.id))});let Ln=!1;we.add(D.info.availableVideoStreams$.subscribe(c=>{if(!Ln&&c.length){let g=$r(c);g&&(D.setVideoStream(g),Ln=!0)}}));let Mn=ae(void 0),Vo=ti(D.info.isAutoQualityEnabled$,c=>c&&Mn.set(void 0)),Vn=ti(D.info.currentQuality$,()=>Mn.set(void 0)),Jn=pi([Mn,Vn],([c,g])=>c!=null?c:g),en=pi(Yn,c=>c!==Yd.MPEG),vn=pi([es,Mr,Vo,Jn,en],([c,g,M,ie,Ie])=>{let Je=[];Ie&&Je.push({value:"auto",displayValue:ve("auto_quality_option"),selected:M});let It=c.filter(Bt=>!qx(Bt));for(let Bt of It){let Wt=g[Bt];Je.push({value:Bt,displayValue:`${Bt}${Wt?q_(Wt):""}`,selected:M?!1:Bt===ie})}return Je}),er=ti(D.info.currentPlaybackRate$),gn=pi([er,hr,Xn],([c,g,M])=>{let ie=M||x?1:ce.controls.playbackRateMin,Ie=g?1:ce.controls.playbackRateMax,Je=ce.controls.playbackRateStep,It=[];for(let Bt=ie;Bt<=Ie;Bt+=Je)It.push({value:Bt,displayValue:Bt===1?ve("playback_rate_1"):ve("playback_rate",{multiplier:Bt.toString(10)}),selected:c===Bt});return It}),tn=()=>({displayValue:ve("subtitles_off"),value:In,language:""}),Mi=ae(tn()),no=pi([Mi,Se],([c],g)=>{c.value===In?g(tn()):g(c)}),on=ce.features.subtitles?ti(D.info.availableTextTracks$):kr([]),tr=Kh(),yr=pi([on,no],([c,g],M)=>{var Je;let ie=[],Ie=c.find(({id:It})=>It===g.value);if(Ie!=null&&Ie.url){let[,It]=(Je=tr.find(Ie.url))!=null?Je:[];if(It){M(It);return}Pe.download(Ie.url).then(Bt=>{if(!Bt||Pe.isDestroyed())return;let Wt=new Q_,Qs=Ie.language;if(Qs){let o$=!!Ie.isAuto,n$=Wt.parse(Bt,Qs);ie.push({lang:Qs,subtitles:n$,isAuto:o$,id:Ie.id})}tr.add(Ie.url,ie),be(no).value===g.value&&M(ie)}).catch(Bt=>{var Wt;(Wt=Z==null?void 0:Z.oneStat)==null||Wt.logError({errorType:"Subtitles download",fatal:!1}),pe==null||pe.report(Bt,{errorType:"Subtitles download",fatal:!1})})}M(ie)}),hn=pi([er,jn,no],([c,g,M],ie)=>{let It;if(D.info.isLive$.getValue()&&g&&M.value!==In){let Wt=()=>{let Qs=1e3/(3*c);It=setTimeout(Wt,Qs),ie(Date.now())};return Wt(),()=>clearTimeout(It)}}),ir=pi([on,no],([c,g])=>{if(!c.length)return[];let M=[];for(let{language:ie,isAuto:Ie,id:Je}of c){let It=ie&&Qd(ie);ie&&It&&M.push({displayValue:Ie?ve("subtitles_auto",{language:It}):It,value:Je,selected:(g==null?void 0:g.value)===Je,isAuto:Ie,language:ie})}return M.length?(M.unshift({...tn(),selected:(g==null?void 0:g.value)===In}),M):[]}),Ge={available:[],prev:[]},ai=()=>{var g,M;let c=D.experimental.getCurrentTime$.getValue();return(M=(g=c==null?void 0:c())!=null?g:xe==null?void 0:xe.currentTime)!=null?M:0},Ro=pi([st,no,yr,hn],([c,g,M,ie])=>{var Je;let Ie=D.info.isLive$.getValue();if(Ie&&Ge.prev!==M){let It=M.find(({id:Wt})=>Wt===g.value),Bt=Ge.prev.find(({id:Wt})=>Wt===g.value);if(It){let Wt={...It,subtitles:[...(Je=Bt==null?void 0:Bt.subtitles)!=null?Je:[],...It.subtitles]};Ge.available=[Wt],Ge.prev=M}}if(g&&g.value!==In){let It=Ie?ai():c,Bt=Ie?Ge.available:M;return j_(It,g,Bt,Ie)}}),No=pi([Ro],([c])=>c!=null&&c.texts?c.texts:[]);we.add(no.subscribe(c=>{var g,M;if(c.value===In)(g=s==null?void 0:s.onSubtitleOff)==null||g.call(s);else{let ie=Object.entries(zu).find(([Ie,Je])=>Je===c.displayValue);(M=s==null?void 0:s.onSubtitleOn)==null||M.call(s,ie?ie[0]:"",c.value)}}));let nn=ae(!0),_o=pi([Pn,mn,Zn,go],([c,g,M,ie])=>{var Bt;let Ie=(Bt=c==null?void 0:c.end)!=null?Bt:0;if(!ie)return Ie/g;let It=-M+ie-g;return(Ie-It)/g}),bo=ti(D.info.availableSources$),Ei=pi([bo],([c])=>Object.keys((c==null?void 0:c[Yd.MPEG])||{}).length>0),$o=()=>{var M,ie,Ie;let c=Object.keys(((ie=(M=D.info.availableSources$)==null?void 0:M.getValue())==null?void 0:ie[Yd.MPEG])||{}),g=Wx(c)||Zx.Q_144P;return(Ie=ke.sources[Yd.MPEG])==null?void 0:Ie[g]},Or=()=>{var g;let c=$o();if(c)G.log("download video",{url:c}),Uh(c,((g=ke==null?void 0:ke.meta)==null?void 0:g.title)||"video");else{let M="There is no URL for download video";G.log("download video",{message:M}),de({message:M})}},xr=()=>{de({message:"toggle muted"});let c=D.info.muted$.getValue();D.info.volume$.getValue()===0&&!c?Br(wr(),!1):rn(!c,!1)},_s=()=>{var c;if(zt.ui.settingsMenu.visible$.set(!1),!be(zt.ui.settingsSubMenu.visible$)){let g=be(zt.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&g){let ie=Dl(g),Ie={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:ie,position:Ie,name:"settings"})}}G.log("close settings menu")},Bi=async(c,g=()=>Promise.resolve())=>{var Ie;zt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),zt.ui.settingsMenu.visible$.set(!0),await g();let M=be(zt.ui.settingsMenu.ref$),ie=ha();if((Ie=s==null?void 0:s.uiInfo)!=null&&Ie.onSettingsMenu&&M&&ie){let It=Dl(M),Bt=Os(M,ie);s.uiInfo.onSettingsMenu({visible:!0,size:It,position:Bt,name:"settings"})}G.log("open settings menu",{wasOpenedByKeyboard:c})},bs=(c,g=!1)=>{var Je;zt.ui.settingsSubMenu.visible$.set(!1);let M=be(zt.ui.settingsMenu.ref$),ie=ha(),Ie=be(zt.ui.settingsMenu.visible$);if((Je=s==null?void 0:s.uiInfo)!=null&&Je.onSettingsMenu&&M&&ie)if(Ie&&!g){let Bt=Dl(M),Wt=Os(M,ie);s.uiInfo.onSettingsMenu({visible:!0,size:Bt,position:Wt,name:"settings"})}else{let Bt=Dl(c),Wt={top:0,left:0,bottom:0,right:0},Qs=be(zt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:Bt,position:Wt,name:Qs})}G.log("close settings sub menu")},ns=(c,g)=>{var ie;zt.ui.settingsSubMenu.visible$.set(!0),zt.ui.settingsSubMenu.ref$.set(g),zt.ui.settingsSubMenu.name$.set(c);let M=ha();if((ie=s==null?void 0:s.uiInfo)!=null&&ie.onSettingsMenu&&g&&M){let Je=Dl(g),It=Os(g,M);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:Je,position:It})}G.log("open settings sub menu",{name:c})},wr=()=>{var g;let c=Math.max(ce.volumeMinRestore,(g=gu())!=null?g:0);return c===0?ce.volumeDefault:c},Do=c=>{let g=ce.features.savePreferredStatesOnUserActionOnly;return!g||g&&!c},Br=(c,g)=>{let M=c===0?wr():c,ie=D.info.muted$.getValue();de({message:`set volume, volume: ${c}, preferredVolume: ${M}`});let Ie=!l||Ke.is("ads");ie&&c>0&&Ie&&(ie=!1,Do(g)&&Tf(!1)),D.setVolume(c,ie),re.setVolume(c),Do(g)&&xf(M)},rn=(c,g)=>{let M=D.info.volume$.getValue();de({message:`set muted, currentVolume: ${M}, mute: ${c}`});let ie=Ke.is("ads");if(D.setMuted(c,ie),re.setVolume(c?0:M),Do(g)&&(!ie||!c)&&Tf(c),!c&&M===0){let Ie=wr();D.setVolume(Ie),Do(g)&&xf(Ie),re.setVolume(Ie)}},Pi=ae(!1),ze=c=>{var g,M;G.log("set looped",{isLooped:c}),Pi.set(c),D.setLooped(c),(M=(g=s==null?void 0:s.uiInfo)==null?void 0:g.onLoopedChanged)==null||M.call(g,c)};ze(ne);let At=()=>{var c,g;(g=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||g.call(c)},ui=(c,g=!1)=>{var M;de({message:`set autoplayNextEnabled, value: ${c}`}),G.log("set autoplay next enabled",{autoplayNextEnabled:c}),zt.ui.autoplayNextEnabled$.set(c),s_(c),g&&((M=s==null?void 0:s.onSetAutoplayNextEnabled)==null||M.call(s,c))},Oo=c=>{de({message:`set timerNextVideoRunning, value: ${c}`}),G.log("set timer next video running",{timerNextVideoRunning:c}),zt.ui.timerNextVideoRunning$.set(c)},yo=(c=!0)=>{var M;let g=!0;if(c&&(s!=null&&s.onPrevVideoClick))try{g=(M=s==null?void 0:s.onPrevVideoClick)==null?void 0:M.call(s)}catch(ie){de({message:"onPrevVideoClick callback failed to execute"})}j(!0),g&&X()},xo=(c=!0)=>{var M;let g=!0;if(c&&(s!=null&&s.onNextVideoClick))try{g=(M=s==null?void 0:s.onNextVideoClick)==null?void 0:M.call(s)}catch(ie){de({message:"onNextVideoClick callback failed to execute"})}j(!1),g&&se()},Hi=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},Bo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},Rn=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},Sr=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},wo=()=>{D.prepare()},ro=()=>{mr(zt);let c=be(zt.ui.controls.disabledControls$),g=be(zt.playerPhase),M={playerPhase:g,isInteractive:x,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(de({message:"toggle play"}),g==="ads"){M.action="play",G.log("toggle adman play",M),re.togglePlay();return}let ie=()=>{var Je;de({message:"toggle play, call player.play"}),M.action="play",D.play(),(Je=s==null?void 0:s.onPlay)==null||Je.call(s)},Ie=()=>{var Je;de({message:"toggle play, call player.pause"}),M.action="pause",D.pause(),(Je=s==null?void 0:s.onPause)==null||Je.call(s)};if(D.info.isEnded$.getValue()){if(de({message:"toggle play, video ended, seek to 0"}),Gi.next(),ct.next(Bs.REWIND),x){R==null||R();return}D.seekTime(0),ie()}else D.info.playbackState$.getValue()!==Bl.PLAYING?ie():Ie();G.log("toggle play",M)},_n=(c,{changeReason:g="default",appliesTo:M="to-video",byUser:ie=!1}={},Ie)=>{de({message:`set quality, quality: ${c}`}),G.log("set quality",{quality:c}),ie&&Ci.next(c),D.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Je}=ce.features;hu(),c!=="auto"?(Je?(_u({type:"exact_quality",quality:c,videoId:i},M),D.setPredefinedQualityLimits(hs.UNKNOWN)):wf(i,c),Mn.set(c),D.setQuality(c)):Je&&g==="default"&&(Fr("auto_quality",M,Ie),be(Mo)&&Ho(!1,void 0,Ie),be(mo)&&Nn(!1,void 0,Ie))},Ho=(c,g="as-default",M)=>{de({message:`set trafficSavingEnabled, value: ${c}`}),G.log("set traffic saving enabled",{trafficSavingEnabled:c});let ie=c?hs.TRAFFIC_SAVING:hs.UNKNOWN;ce.features.qualityDetailsSubMenuEnabled?(Hr(ie,g,M),Cd(!1)):(D.setPredefinedQualityLimits(ie),Do(M)&&Cd(c))},Nn=(c,g="as-default",M)=>{de({message:`set highQualityEnabled, value: ${c}`}),G.log("set high quality enabled",{highQualityEnabled:c}),Hr(c?hs.HIGH_QUALITY:hs.UNKNOWN,g,M)},Hr=(c,g,M)=>{c!==hs.UNKNOWN&&(be(pn)&&!be(Vo)&&_n("auto",{appliesTo:g,changeReason:"limit-changed"},M),Fr(c,g,M)),D.setPredefinedQualityLimits(c)},Fr=(c,g,M)=>{Do(M)&&(_u({type:c,videoId:i},g),g==="as-default"&&_u({type:c,videoId:i},"to-video"))},Dn=(c,g=!0)=>{G.log("set playback rate",{playbackRate:c}),D.setPlaybackRate(c),ce.features.saveRate&&Te&&!D.info.isLive$.getValue()&&g&&n_(c)},tt=()=>{let c=be(kn),g=be(gn),M=g.findIndex(({selected:Ie})=>Ie);if(M===g.length-1||!c)return g[M];let ie=g[M+1];return Dn(ie.value),ie},Qt=()=>{let c=be(kn),g=be(gn),M=g.findIndex(({selected:Ie})=>Ie);if(M===0||!c)return g[M];let ie=g[M-1];return Dn(ie.value),ie},bi=(c={...tn(),selected:!1},g)=>{G.log("set subtitles",{...c}),c.value!==In&&Nt.next(c.isAuto?c.value+"_auto":c.value),nt.next({enabled:c.value!==In,lang:c.language,auto:!!c.isAuto}),Mi.set(c),Do(g)&&(kf(c.value===In?void 0:c.language),ce.features.userVideoPrefs&&i&&Af(ce.userSalt,String(i),{subtitleTrackId:c.value===In?void 0:c.value}))},So=c=>{G.log("toggle subtitles");let g=be(no);(g==null?void 0:g.value)===In?On(c):Fo(c)},bn=(c,g)=>{G.log("change subtitle",{enabled:c}),c?On(!0,g):Fo(!0)},On=(c,g)=>{G.log("subtitle on");let M=be(ir),ie=be(Fe),Ie=De!=null?De:ie,Je;g&&(Je=M.find(It=>It.value===g)),Je!=null||(Je=M.filter(It=>It.value!==In).find(It=>It.language===Ie)),bi(Je!=null?Je:M[1],c)},Fo=c=>{G.log("subtitle off"),bi(void 0,c)};we.add(D.info.availableTextTracks$.subscribe(c=>{var M;function g(){let ie=[];for(let{language:Ie,isAuto:Je,id:It}of c){let Bt=Ie&&Qd(Ie);Ie&&Bt&&ie.push({id:It,language:Ie,title:Je?ve("subtitles_auto",{language:Bt}):Bt})}return ie}(M=s==null?void 0:s.onAvailableSubtitlesChanged)==null||M.call(s,g())}));let or=ae(!0),rs=c=>{or.set(c)},Cr=(c,g,M=!0)=>{var ie;if(de({message:`seek to time, time: ${c}`}),G.log("seek to time",{time:c,action:g,forcePrecise:M}),ct.next(g),D.info.isLive$.getValue()){let Ie=D.info.duration$.getValue(),Je=Math.min(0,Ie+c);D.seekTime(Je,M)}else{if(T!=null&&T.getValue())return;D.info.isEnded$.getValue()&&(de({message:"seek after ended, call callbacks.onPlay"}),(ie=s==null?void 0:s.onPlay)==null||ie.call(s)),D.seekTime(Hv(c),M)}},$s=c=>{de({message:`seek to episode start time: ${c}`}),G.log("seek to episode start time",{time:c}),Cr(c,Bs.EPISODE,!0)},zs=(c,g,M=!1)=>{de({message:`seek to percent, percent: ${c}`}),G.log("seek to percent",{percent:c,action:g});let ie=be(mn)*c;Cr(ie,g,M)},ma=c=>{de({message:`seek external, time: ${c}`}),G.log("seek external",{time:c}),ct.next(Bs.UNKNOWN),D.seekTime(D.info.isLive$.getValue()?-c:c)},ut=c=>{var ie,Ie;let g=(ie=c.max)!=null?ie:"none",M=(Ie=c.min)!=null?Ie:"none";de({message:`set auto quality limitation. Max: ${g}. Min: ${M}`}),G.log("set auto quality limits",{max:g,min:M}),D.setAutoQualityLimits(c)},ni=c=>{de({message:`seek external to episode start time: ${c}`}),G.log("seek external to episode start time",{time:c}),Cr(c,Bs.EPISODE,!0)},Co=c=>{de({message:`set playback rate to: ${c}`}),G.log("set playback rate external",{playbackRate:c}),D.setPlaybackRate(c)},$i=ae(!1),ji=ae(!1),ys=pi([mn],([c])=>!!p&&c>=ce.suitableDurationForUsingRichSeek&&ce.features.useRichSeek&&!x&&te!=="preview"),xs=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),ws=pi([Dt],([c])=>{let g=Ol(c);return xs?!g:g});we.add(Ke.subscribe(c=>{c!=="video"&&$i.set(!1)})),$i.subscribe(c=>{var g;(g=s==null?void 0:s.onRichSeekActiveChanged)==null||g.call(s,c)});let Fi=ae(void 0),Ti=ae(!1),he=c=>{de({message:`start scrubbing, progress: ${c}`}),G.log("start scrubbing",{progress:c}),Ti.set(!0),yt(c)},yt=c=>{Fi.set(c)},Gt,Zt,Uo=()=>{Fi.set(void 0),Ti.set(!1)},so=()=>{clearTimeout(Zt),clearTimeout(Gt),Gt=window.setTimeout(()=>{Uo()},500),xe==null||xe.removeEventListener("seeked",so)},Xi=(c,g=!1,M=o2.ActionSeekType.SLIDER)=>{de({message:`complete scrubbing, progress: ${c}`}),G.log("complete scrubbing",{progress:c}),zs(c,M,g),be(zt.ui.isMobile)&&be(zt.state.currentFormat$)===Yd.HLS?(xe==null||xe.addEventListener("seeked",so),Zt=window.setTimeout(()=>{so()},300)):Uo()},Bn=pi([st,mn,Fi],([c,g,M],ie)=>{ie(Qx(M)?M*g:c)}),Ur=ae(!1),Ss=()=>{Ur.set(!0)},Ja=()=>{Ur.set(!1)},zr=pi([si],([{width:c}],g)=>{let M=U_(c);g(M)}),ss=W.filter(c=>zh(c)),Ws=pi([zr,Ct],([c,g])=>g?ss.filter(M=>!M.hideOnMobile):ss.filter(M=>{var ie;return!((ie=M.hideOnDesktopGridTypes)!=null&&ie.includes(c))})),nr=ae(W.filter(c=>Wh(c))),ql=pi([nr,zr],([c,g])=>c.filter(M=>{var ie;return!((ie=M.hideOnDesktopGridTypes)!=null&&ie.includes(g))})),el=pi([ql,Ws],([c,g])=>[...ce.features.additionalButtonsDesktopControlPanelRight?c.filter(M=>M.type==="desktop-control-panel-right"):[],...ce.features.additionalButtons?g.map((M,ie)=>{var Ie;return{id:ie,weight:ie,type:"desktop-control-panel-right",testId:M.testId,icon:M.iconUrl,onClick:M.onClick,ariaLabel:(Ie=M.ariaLabel)!=null?Ie:M.tooltip,tooltipText:M.tooltip}}):[]].filter(M=>!v.disabledAdditionalButtonIds.includes(M.id))),Wr=ae(F),va=pi([Wr],([c])=>ce.features.additionalSettingsMenuItems?c.map(g=>g.type==="SWITCH"?{...g,onClick:g.onChangeEnabled}:g):[]),Ql=(c,g)=>{let M=be(nr).map(ie=>ie.id!==c?ie:{...ie,...g});nr.set(M)},tl=c=>{let g=be(nr);if(g.some(M=>M.id===c.id)){de({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}g.push(c),nr.set(g)},il=c=>{let g=be(nr);if(!g.some(M=>M.id===c)){de({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}g=g.filter(M=>M.id!==c),nr.set(g)},ga=c=>{ct.next(Bs.LIVE),de({message:"live switch to low latency "+c}),G.log("live switch to low latency "+c),D.setLiveLowLatency(c)},ft=(c,g)=>{let M=be(Wr).map(ie=>ie.id!==c?ie:{...ie,...g});Wr.set(M)},mt=c=>{let g=be(Wr);if(g.some(M=>M.id===c.id)){de({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}g.push(c),Wr.set(g)},Zi=c=>{let g=be(Wr);if(!g.some(M=>M.id===c)){de({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}g=g.filter(M=>M.id!==c),Wr.set(g)},ki=ae(U),Ji=pi([ki],([c])=>ce.features.additionalContextMenuItems?c:[]),mi=(c,g)=>{let M=be(ki).map(ie=>ie.id!==c?ie:{...ie,...g});ki.set(M)},Ui=c=>{let g=be(ki);if(g.some(M=>M.id===c.id)){de({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}g.push(c),ki.set(g)},Ks=c=>{let g=be(ki);if(!g.some(M=>M.id===c)){de({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}g=g.filter(M=>M.id!==c),ki.set(g)},Gl=pi([Ct,Me],([c,g],M)=>{M(c&&g)}),Tc=()=>{ct.next(Bs.LIVE),de({message:"switch to active live"}),G.log("switch to active live"),D.seekTime(0),D.info.playbackState$.getValue()!==Bl.PLAYING&&zt.actions.internal.togglePlay()},vp=()=>{G.log("skip adman"),re.skip()},Ic=(c=!0)=>{var ie;mr(zt),de({message:`switch from ads to video, callPlay: ${c}`}),G.log("switch from ads to video",{callPlay:c}),Oe.set("video"),c&&D.play(),l&&rn(!0,!0);let g=(ie=be(at))==null?void 0:ie.muted,M=!D.info.muted$.getValue();g!==void 0&&!M&&rn(g,!0),at.set(void 0)},gp=()=>{mr(zt),de({message:"switch from video to ads"}),G.log("switch from video to ads"),zt.actions.internal.pause(),Ao(),Oe.set("ads")},Ec=c=>{mr(zt);let g=c?"LiveWaitingStart":"thumb";G.log("set live waiting start",{state:c,playerPhase:g}),Oe.set(g)},hp=c=>{mr(zt);let g=c?"LiveWaitingRecover":"thumb";G.log("set live waiting recover",{state:c,playerPhase:g}),Oe.set(g)},Pc=c=>{mr(zt);let g=c?"LiveWaitingRecord":"thumb";G.log("set live waiting record",{state:c,playerPhase:g}),Oe.set(g)},_p=()=>(mr(zt),G.log("get debug text data"),Hh(D,ke,zt,Qe.getTraceId(),Ce)),kc=()=>(mr(zt),JSON.stringify(Qe.getFinishedSpans())),bp=()=>(mr(zt),Fh(D,ke,zt)),ha=()=>xe,Ac=()=>{de({message:"toggle chromecast"}),G.log("toggle chromecast"),D.toggleChromecast()},qs=c=>{var M;if(mr(zt),D.info.isEnded$.getValue())return;let g=!c;if(be(zt.playerPhase)==="ads"){de({message:`pause ads, internalCall: ${g}`}),G.log("pause ads",{internalCall:g}),re.pause();return}de({message:`pause video, internalCall: ${g}`}),G.log("pause video",{internalCall:g}),g&&((M=s==null?void 0:s.onPause)==null||M.call(s)),D.pause()},ol=c=>{var M;mr(zt);let g=!c;if(be(zt.playerPhase)==="ads"){de({message:`play ads, internalCall: ${g}`}),G.log("play ads",{internalCall:g}),re.play();return}de({message:`play video, internalCall: ${g}`}),G.log("play video",{internalCall:g}),g&&((M=s==null?void 0:s.onPlay)==null||M.call(s)),D.play()},Lc=c=>{mr(zt);let g=!c;if(be(zt.playerPhase)==="ads"){de({message:"player cannot be stopped during ads via external method"});return}de({message:`player will be stopped, internalCall: ${g}`}),A==null||A()},Mc=(c,g)=>{mr(zt),de({message:`first start, show ads: ${c}, internalCall: ${!g}`}),G.log("first start",{showAds:c,external:g}),c?Oe.set("ads"):(Oe.set("video"),g?D.play():zt.actions.internal.togglePlay())},nl=()=>(de({message:"getting time codes"}),m),Vc=()=>{let c=nl();if(!c||[0,1].includes(c.length))return;let g=D.info.position$.getValue();return c.find(M=>M.time>g)},$p=c=>{let g=c;g||(g=Vc());let M=D.info.position$.getValue();G.log("seek to next episode",{currentTime:M,...g}),g&&(de({message:"seek to next episode"}),Cr(g.time,Bs.EPISODE,!0))},Rc=()=>{let c=nl();if(!c||[0,1].includes(c.length))return;let g=D.info.position$.getValue(),M=c.findIndex(Ie=>Ie.time>g),ie=M===-1?c.length-2:M-2;if(!(ie<0))return c[ie]},We=c=>{let g=c;g||(g=Rc());let M=D.info.position$.getValue();G.log("seek to prev episode",{currentTime:M,...g}),g&&(de({message:"seek to prev episode"}),Cr(g.time,Bs.EPISODE,!0))},vi=()=>(de({message:"getting preview thumbs data"}),G.log("get preview thumbs data",{...p}),p),zo=async()=>{let c=ue==null?void 0:ue.isActive(),g="none";ue!=null&&ue.isActive()?(g="exit",await(ue==null?void 0:ue.exit())):(g="request",await(ue==null?void 0:ue.request())),G.log("toggle picture in picture",{isActive:c,action:g})},Tr=(c=-90)=>{G.log("rotate video",{alphaDiff:c}),Dt.update(g=>g+c)},To=ae([]);I==null||I.subscribe(c=>{let g=[];for(let M=0;M<c.length;M++){let{range:[ie,Ie],subjects:Je}=c[M];M===0&&ie!==0&&g.push({time:0,text:"",interactive:!1,completed:!0}),g.push({time:ie/1e3,text:"",interactive:!0,completed:ce.features.interactiveTimeOpenUri?!Je.length||Je.every(It=>It.isRemoved):!Je.length}),Ie!==1/0&&g.push({time:Ie/1e3,text:"",interactive:!1,completed:!0})}To.set(g)});let Yb=ae(!1);T==null||T.subscribe(c=>{c&&be(Ti)&&Uo()});let Hv=c=>{if(!x)return c;let g=be(To),M=be(mn),Ie=be(Zn)/M,Je=g.find(It=>It.interactive&&!It.completed&&It.time>Ie);return typeof(Je==null?void 0:Je.time)=="number"?Math.min(c,Je.time-.05):c},jb=()=>{zt.ui.episodes.panelOpened$.set(!1)},Xb=()=>{G.log("destroy store"),clearTimeout(Zt),clearTimeout(Gt),we.unsubscribe(),ht.unsubscribe(),D.destroy(),re.destroy(),Z==null||Z.destroy(),pe==null||pe.destroy(),Le.unsubscribe(),fi==null||fi.disconnect(),fi=null,Pe.destroy()},Zb=pi([hr,Ke,kn],([c,g,M])=>v.features.doubleForwardAvailable&&!c&&g==="video"&&M),yp=ae(!1),Fv=2,Nc=null,Uv=c=>{if(!be(jn)&&c)return;let g=D.info.currentPlaybackRate$.getValue();c?g!==Fv&&(Nc=g,Dn(Fv,!1),yp.set(!0)):(Nc&&Dn(Nc,!1),yp.set(!1),Nc=null)};Ke.subscribe(c=>{c!=="video"&&Uv(!1)});let Jb=()=>{qs(!1),$i.set(!0)},e$=()=>{ol(!1),$i.set(!1)},xp=!1,t$=()=>{ji.set(!0),xp=D.info.playbackState$.getValue()===Bl.PLAYING,qs(!1)},i$=()=>{ji.set(!1),!be($i)&&xp&&ol(!1),xp=!1};D.events.playing$.subscribe(()=>{be($i)&&qs(!1)});let zt={interfaceLanguage$:Fe,isCyrillicRelatedInterface$:xt,initVideo:di,videoId:i,isClip:o,playerPhase:Ke,vsid:Tt,state:{positionExact$:st,positionWithScrubbing$:Bn,duration$:mn,playbackState$:Di,playbackStateRealistic$:En,isPlaying$:jn,isLoaderVisible:po,bufferedProgress$:_o,isLive$:Yi,canChangePlaybackSpeed$:kn,isActiveLive$:hr,isOldestAvailableLive$:Xn,isRewindableLive$:os,isEnded$:xi,muted$:Lo,volume$:_i,trafficSavingEnabled$:Mo,highQualityEnabled$:mo,autoQualityLimitingAvailable$:pn,availableVideoStreams$:_r,availableAudioStreams$:Oi,videoStream$:br,audioStream$:An,currentQuality$:Jn,isAutoQualityEnabled$:Vo,availableQualities$:vn,currentPlaybackRate$:er,availablePlaybackRates$:gn,currentSubtitle$:no,availableTextTracks$:on,availableSubtitlesList$:ir,currentSubtitleCaptions$:No,isAutoSubtitleCaptionVisible$:nn,chromecastState$:ts,chromecastDeviceName$:Vr,chromecastConnected$:ho,currentFormat$:Yn,throughputEstimation$:is,videoBitrate$:Rr,videoSize$:Jo,errorLog$:q,crashed$:Me,isAudioAvailable$:vr,isAudioDisabled:!!l,canDownload:ce.features.download&&!!d,availableSources$:bo,hasMpegSources$:Ei,isInteractive:x,showInteractiveGraph:ce.features.interactiveGraph,showSeekToInteractive:ce.features.seekToInteractive,showPlayPrevChapter:ce.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:ce.features.interactiveTimeIndicator&&!!be(To).length,interactiveEpisodes$:To,isInteractiveTime$:T?ti(T):ae(!1),isInteractiveExpectation$:Yb,hasInteractiveBranches:P,playPrevChapterDisabledTooltip:E,looped$:Pi,loadedMetadata$:Rt,isAutoQualityAvailable$:en,previewTrackActive:$i,previewTrackDragInProgress:ji},ui:{t:ve,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),"theater-mode-button":ae(void 0),fullscreen:ae(void 0),vkLogo:ae(void 0),interactiveTimeIndicator:ae(void 0),timeline:ae(void 0),autoplayNextToggle:ae(void 0),additionalButtons:W.length?W.reduce(c=>[...c,ae(void 0)],[]):[],disabledControls$:Pt},modals:{hotKeyMap:{show:ae(!1),data:ae({title:"",closeBtnText:"",groups:[]})}},isFullscreen:Et,isFullscreenOpenedByKeyboard:dt,rotateAlpha:Dt,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:si,isMobile:Ct,mobileNotReportControlHidden$:Gl,icon3DVideoVisible:ae(!1),scrubbingInProgress:Ti,volumeChangingInProgress:Ur,is3DVideo:Ut,currentGridType$:zr,additionalButtonsDeprecated$:Ws,additionalDesktopControlPanelRightButtons$:el,additionalSettingsMenuItems$:va,additionalContextMenuItems$:Ji,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:or,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$:yp,doubleForwardAvailable$:Zb,previewTrackActive:$i,previewTrackDragInProgress:ji,previewTrackAvailable:ys,isPreviewTrackHorizontallyAligned:ws},ads:{position:ae(0),duration:ae(0),playbackState:ae("inactive"),canSkip:ae(!1),secondsToWatchBeforeSkip:ae(0),postrollPassed:ae(!1)},webApi:{pictureInPictureApi:ue,annotationsApi:Ae,slotsApi:Ue,focusManager:ee},actions:{internal:{preload:wo,firstStart:c=>Mc(c,!1),play:()=>ol(!1),pause:()=>qs(!1),togglePlay:ro,toggleMuted:xr,openSettingsMenu:Bi,closeSettingsMenu:_s,openSettingsSubMenu:ns,closeSettingsSubMenu:bs,setVolume:c=>Br(c,!1),setMuted:c=>rn(c,!1),startVolumeChanging:Ss,stopVolumeChanging:Ja,setVideoStream:vt,setAudioStream:c=>Xt(c,!1),setQuality:(c,g)=>_n(c,g,!1),setTrafficSavingEnabled:(c,g)=>Ho(c,g,!1),setHighQualityEnabled:(c,g)=>Nn(c,g,!1),setPlaybackRate:Dn,incrementPlaybackRate:tt,decrementPlaybackRate:Qt,setSubtitle:c=>bi(c,!1),toggleSubtitle:()=>So(!1),togglePictureInPicture:zo,startScrubbing:he,progressScrubbing:yt,completeScrubbing:Xi,toggleChromecast:Ac,switchToActiveLive:Tc,switchFromAdsToVideo:Ic,switchFromVideoToAds:gp,skipAd:vp,setLiveWaitingStart:Ec,setLiveWaitingRecover:hp,setLiveWaitingRecord:Pc,getDebugTextData:_p,getTraceTextData:kc,getDebugPanelData:bp,getVideoElement:ha,seekTime:(c,g,M)=>Cr(c,g,M),clearDelayedBufferingCheckTimeout:gr,seekEpisodeStartTime:$s,seekToPercent:zs,getNextEpisode:Vc,seekToNextEpisode:$p,getPrevEpisode:Rc,seekToPrevEpisode:We,startLogging:Ot,stopLogging:z,startCameraManualRotation:kt,stopCameraManualRotation:lt,moveCameraFocusPX:gi,holdCamera:jt,releaseCamera:$t,getVideoEpisodes:nl,getPreviewThumbsData:vi,downloadVideo:Or,addLanguage:Lf,setLanguage:ye,nextMovie:ci,videoRotate:Tr,correctSeekTimeToInteractive:Hv,replayInteractive:R,setLooped:ze,reportProblem:At,setAutoplayNextEnabled:ui,setTimerNextVideoRunning:Oo,prevVideoClick:yo,nextVideoClick:xo,nextVideoAnnouncementShow:Hi,nextVideoAnnouncementClick:Bo,nextVideoAnnouncementAuto:Rn,nextVideoAnnouncementCancel:Sr,checkFullscreenSupport:wt,changeDoubleForwardOn:Uv,closePreviewTrack:e$,previewTrackOpened:Jb,previewTrackDragStarted:t$,previewTrackDragFinished:i$},external:{firstStart:c=>Mc(c,!0),play:()=>ol(!0),pause:()=>qs(!0),stop:()=>Lc(!0),seekTime:c=>ma(c),seekEpisodeStartTime:c=>ni(c),setPlaybackRate:c=>Co(c),setAutoQualityLimits:c=>ut(c),setMuted:c=>rn(c,!0),toggleSubtitle:()=>So(!0),changeSubtitle:bn,setVolume:c=>Br(c,!0),returnFocusToEpisodes:jb,updateAdditionalSettingsItem:ft,addAdditionalSettingsItem:mt,removeAdditionalSettingsItem:Zi,updateAdditionalContextItem:mi,addAdditionalContextItem:Ui,removeAdditionalContextItem:Ks,updateAdditionalButton:Ql,addAdditionalButton:tl,removeAdditionalButton:il,setLiveLowLatency:ga,hideControls:()=>rs(!1),showControls:()=>rs(!0),setQuality:c=>_n(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>Ho(c,"to-video",!0),setHighQualityEnabled:c=>Nn(c,"to-video",!0),changeAudioStream:Nr}},callbacks:s,setUiCallbacks:c=>{Xe={...c}},getAdmanWrapper:()=>re,getLogger:()=>Ye,getPlayer:()=>D,destroy:Xb};return zt};function Qn(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}=Os(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 n2=["disabledControls$","additionalButtons"],r2=["interactiveTimeIndicator"],Fl=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!n2.includes(r)){let l=o||r2.includes(r);a.set(Qn(t,i,r,l))}}};var Yu=async(t,e,i)=>{await uo(),e&&i&&(i.focus(),t.set(!1))};var s2=Ee('<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 wm(t){je(t,{children:(e,i)=>{var o=s2();b(e,o)},$$slots:{default:!0}})}function Sm(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(s,"$contextMenuVisible$",i),a=h(e,"disabled",3,!1),l=h(e,"ariaLabel",3,""),d=$e(),s=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,m=d.ui.contextMenu.showContextMenuBtn$,p=d.ui.contextMenu.position$,v=d.ui.contextMenu.btnRef$,_=K(void 0);He(()=>{n(_)&&St(()=>{v.set(n(_))})});let y=T=>{let R=aa(T),A=R_(n(_));p.set(A),u.set(R),s.set(!r())},$=()=>{m.set(!0)},x=()=>{m.set(!1)},I=f(()=>r()?"opened":"");Ft(t,{get className(){return n(I)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:$,blur:x,get ariaExpanded(){return r()},get ref(){return n(_)},set ref(T){N(_,T,!0)},children:(T,R)=>{wm(T,{})},$$slots:{default:!0}}),H(),o()}var a2=t=>{t.stopPropagation()},l2=L("<div><!> <div></div> <div></div></div>"),d2={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 Xd(t,e){var re;B(e,!0),Q(t,d2);let[i,o]=Be(),r=()=>w(x,"$isMobile",i),a=()=>w(A,"$areControlsVisible",i),l=()=>w(E,"$currentGridType$",i),d=()=>w(T,"$isInteractiveTime$",i),s=()=>w($,"$interactiveControlsOpacity$",i),u=()=>w(R,"$showInteractiveTimeIndicatorTooltip$",i),m=()=>w(I,"$isFullscreen",i),p=h(e,"ref",15,void 0),v=K(void 0),_=$e(),y=vo(),{interactiveControlsOpacity$:$}=y,x=_.ui.isMobile,I=_.ui.isFullscreen,T=_.state.isInteractiveTime$,R=y.showInteractiveTimeIndicatorTooltip$,A=_.ui.controlsVisible,P=(re=_.callbacks)==null?void 0:re.onInteractiveTimeIndicatorClick,E=_.ui.currentGridType$,W=f(()=>!r()&&a()),F=f(()=>Ns(l(),"s")),U=f(()=>!d()||!!s()||n(W)),X=K(!1);He(()=>{N(X,n(U),!0)});let se=()=>{N(X,!0)},j=()=>{var pe;ne(),(pe=n(v))==null||pe.addEventListener("animationiteration",se,{once:!0})},ne=()=>{var pe;N(X,!1),(pe=n(v))==null||pe.removeEventListener("animationiteration",se)},Z=pe=>{R.set(pe)},Te=f(()=>u()&&!n(U));He(()=>{u()?j():ne()});let fe=()=>{n(U)||(R.set(!0),P==null||P())};ln(()=>{R.clearTimeout(),ne()});let te=()=>{R.set(!1)},_e=Y("tooltip_interactive_interaction_time_indicator");var Ce=l2();let me;Ce.__mousemove=[a2],Ce.__click=fe;var ce=C(Ce);ko(ce,{get tooltipContent(){return _e},get tooltipVisible(){return n(Te)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:Z,get ref(){return p()},set ref(pe){p(pe)},children:(pe,ue)=>{Fd(pe,{completed:!0})},$$slots:{default:!0}});var Qe=k(ce,2);let G;et(Qe,pe=>p(pe),()=>p());var D=k(Qe,2);let Ye;et(D,pe=>N(v,pe),()=>n(v)),S(Ce),O((pe,ue,Ae)=>{me=oe(Ce,1,"interactive-episode-icon-animated s-26",null,me,pe),G=oe(Qe,1,"ref-block s-26",null,G,ue),Ye=oe(D,1,"pulse s-26",null,Ye,Ae)},[()=>({mobile:r(),fullscreen:m(),invisible:n(U),"icon-small":n(F)}),()=>({hidden:n(U)}),()=>({paused:n(X)})]),pt("mouseleave",Ce,te),b(t,Ce),H(),o()}Ze(["mousemove","click"]);function ju(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);ko(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=Re();let m=f(()=>e.buttonComponent);var p=le(u);Ni(p,()=>n(m),(v,_)=>{_(v,Xr(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),b(d,u)},$$slots:{default:!0}}),H()}var Hs={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var u2=Ee('<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 ua(t,e){B(e,!0);let i=h(e,"reversed",3,!1),o=f(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),r=f(()=>`${dn(e.size)}${n(o)}`),a=f(()=>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=u2();b(l,s)},$$slots:{default:!0}}),H()}var p2=L('<div class="icon-background-mobile s-25"><!></div>'),f2={hash:"s-25",code:".icon-background-mobile.s-25{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:100%;justify-content:space-around;left:0;position:absolute;top:0;width:100%}"};function Ua(t,e){B(e,!0),Q(t,f2);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"disabled",3,!1),l=$e().ui.t,d=f(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),s=f(()=>e.type==="prev"?l("hotkey_map_item_prev_video_value"):l("hotkey_map_item_next_video_value")),u=f(()=>`btn-${o()?"m":"d"}--${e.type}`);Ft(t,{get className(){return n(u)},get testId(){var m;return`btn-${(m=e.type)!=null?m:""}`},get disabled(){return r()},get ariaLabel(){return n(d)},get click(){return e.click},get ariaKeyShortCut(){return n(s)},get ref(){return i()},set ref(m){i(m)},children:(m,p)=>{var v=Re(),_=le(v);{var y=x=>{var I=p2(),T=C(I);let R=f(()=>e.type==="prev");ua(T,{get size(){return"32"},get reversed(){return n(R)}}),S(I),b(x,I)},$=x=>{let I=f(()=>e.type==="prev");ua(x,{get size(){return"24"},get reversed(){return n(I)}})};V(_,x=>{o()?x(y):x($,!1)})}b(m,v)},$$slots:{default:!0}}),H()}var m2=Ee('<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 Zd(t,e){B(e,!0);let i=f(()=>dn(e.size));je(t,{get width(){return"48"},get height(){return"48"},get style(){return n(i)},testId:"replay-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=m2();b(o,a)},$$slots:{default:!0}}),H()}import{noop as v2}from"@vkontakte/videoplayer-shared/es2018";var g2=L('<div class="icon-background-mobile s-23"></div>'),h2=L("<!> <div><!></div>",1),_2={hash:"s-23",code:".mobile.s-23{align-items:center;display:flex;justify-content:center;position:relative}.icon-background-mobile.s-23{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,_2);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,v2),d=Y("tooltip_restart"),s=f(()=>`${o()?"btn-m--play":""} ${a()}`);Ft(t,{get className(){return n(s)},testId:"replay-btn",get ariaLabel(){return d},get disabled(){return r()},get click(){return l()},get ariaKeyShortCut(){return fs.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,m)=>{var p=h2(),v=le(p);{var _=T=>{var R=g2();b(T,R)};V(v,T=>{o()&&T(_)})}var y=k(v,2);let $;var x=C(y);let I=f(()=>o()?"48":"24");Zd(x,{get size(){return n(I)}}),S(y),O(T=>$=oe(y,1,"s-23",null,$,T),[()=>({mobile:o()})]),b(u,p)},$$slots:{default:!0}}),H()}var b2=Ee('<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 Fs(t,e){B(e,!0);let i=f(()=>dn(e.size));je(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"pause-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=b2();b(o,a)},$$slots:{default:!0}}),H()}import{noop as $2}from"@vkontakte/videoplayer-shared/es2018";var y2=L('<div class="icon-background-mobile s-21"><!></div>'),x2={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: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,x2);let[i,o]=Be(),r=()=>w(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=vo(),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),m=h(e,"className",3,""),p=h(e,"click",3,$2),_=$e().ui.t,{toggle:y}=a,$=f(()=>y),x=f(()=>r()!==null),I=f(()=>n(x)?r():s()),T=f(()=>n(I)?_("tooltip_pause"):_("tooltip_play")),R=f(()=>n(I)?Fs:Tn),A=f(()=>`${d()?"btn-m--play":""} ${m()}`),P=f(()=>n(x)?n($):p());Ft(t,{get className(){return n(A)},testId:"play-btn",get click(){return n(P)},get disabled(){return u()},get ariaLabel(){return n(T)},get ariaKeyShortCut(){return fs.KeyK},get ref(){return l()},set ref(E){l(E)},children:(E,W)=>{var F=Re();let U=f(()=>n(R));var X=le(F);{var se=ne=>{var Z=y2(),Te=C(Z);Ni(Te,()=>n(U),(fe,te)=>{te(fe,{get size(){return"48"}})}),S(Z),b(ne,Z)},j=ne=>{var Z=Re(),Te=le(Z);Ni(Te,()=>n(U),(fe,te)=>{te(fe,{get size(){return"24"}})}),b(ne,Z)};V(X,ne=>{d()?ne(se):ne(j,!1)})}b(E,F)},$$slots:{default:!0}}),H(),o()}var w2=Ee('<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 Cm(t){je(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=w2();b(e,o)},$$slots:{default:!0}})}function Jd(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=Y("tooltip_interactive_go_back"),l=f(()=>o()?"hidden":"");Ft(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)=>{Cm(d,{})},$$slots:{default:!0}}),H()}var S2=L('<span class="gutter s-24"><span><!></span></span>'),C2={hash:"s-24",code:".gutter.s-24{--gutterWidth:32px;--gutterHeight:12px;--togglerWidth:18px;--togglerHeight:18px;--togglerGap:calc(var(--togglerWidth)/6);background-color:hsla(0,0%,100%,.3);border-radius:50px;height:var(--gutterHeight);position:relative;width:var(--gutterWidth)}.toggler.s-24{align-items:center;background-color:#626364;border-radius:50%;display:flex;height:var(--togglerHeight);justify-content:center;left:0;position:absolute;top:calc((var(--togglerHeight) - var(--gutterHeight))/2*-1);transform:translateX(calc(var(--togglerGap)*-1));transition-duration:.2s;transition-property:background-color,transform;transition-timing-function:ease;width:var(--togglerWidth)}.toggler.enabled.s-24{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function ec(t,e){B(e,!0),Q(t,C2);let[i,o]=Be(),r=()=>w(s,"$autoplayNextEnabled$",i),a=h(e,"ref",15,void 0),l=$e(),d=l.ui.t,s=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,m=()=>{u(!r(),!0)},p=d("aria_label_autoplay"),v="12",_="#000",y=f(()=>r()?"true":"false");Ft(t,{click:m,get ariaLabel(){return p},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref($){a($)},children:($,x)=>{var I=S2(),T=C(I);let R;var A=C(T);{var P=W=>{Tn(W,{get size(){return v},fill:_})},E=W=>{Fs(W,{get size(){return v},fill:_})};V(A,W=>{r()?W(P):W(E,!1)})}S(T),S(I),O(W=>R=oe(T,1,"toggler s-24",null,R,W),[()=>({enabled:r()})]),b($,I)},$$slots:{default:!0}}),H(),o()}var T2=Ee('<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 Tm(t){je(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=T2();Jt(),b(e,o)},$$slots:{default:!0}})}function tc(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=Y("tooltip_interactive_seek"),l=f(()=>o()?"hidden":"");Ft(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)=>{Tm(d,{})},$$slots:{default:!0}}),H()}var I2=Ee('<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>'),E2=Ee('<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 Im(t,e){let i=h(e,"isOpened",3,!1),o=f(()=>i()?"graph-close-icon":"graph-open-icon");je(t,{get testId(){return n(o)},children:(r,a)=>{var l=E2(),d=k(le(l));{var s=u=>{var m=I2();b(u,m)};V(d,u=>{i()&&u(s)})}b(r,l)},$$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=h(e,"graphIsOpened",3,!1),d=$e().ui.t,s=f(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=f(()=>o()?"hidden":"");Ft(t,{get className(){return n(u)},testId:"btn-graph",get disabled(){return r()},get ariaLabel(){return n(s)},get click(){return e.click},get ref(){return i()},set ref(m){i(m)},children:(m,p)=>{let v=f(()=>!!a());Im(m,{get isOpened(){return n(v)}})},$$slots:{default:!0}}),H()}import{PlaybackState as nb}from"@vkontakte/videoplayer-core/es2018";function oc(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(u,"$playbackState$",i),a=h(e,"isMobile",3,!1),l=h(e,"isLiveActive",3,!1),d=h(e,"ariaLabel",3,""),s=$e(),u=s.state.playbackState$,m=s.actions.internal.switchToActiveLive,p=s.actions.internal.togglePlay,v=f(()=>()=>{if(!l()){m();return}r()===nb.PAUSED&&p()}),_=f(()=>a()?"":"btn--live btn-full-opacity"),y=f(()=>l()?"btn-live":"btn-live-offset"),$=f(()=>l()&&r()===nb.PLAYING);Ft(t,{get className(){return n(_)},get testId(){return n(y)},get disabled(){return n($)},get ariaLabel(){return d()},get click(){return n(v)},children:(x,I)=>{Pd(x,{get isActive(){return l()}})},$$slots:{default:!0}}),H(),o()}import{noop as rb}from"@vkontakte/videoplayer-shared/es2018";var P2=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),k2=L('<img class="icon" aria-hidden="true"/>');function za(t,e){"use strict";let i=K(!1),o=()=>{N(i,!0)};var r=Re(),a=le(r);{var l=s=>{var u=P2();b(s,u)},d=s=>{var u=k2();O(()=>Ne(u,"src",e.icon)),pt("error",u,o),Pa(u),b(s,u)};V(a,s=>{n(i)?s(l):s(d,!1)})}b(t,r)}function Em(t,e){B(e,!0);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,rb),r=h(e,"ref",15),a=f(()=>o()===rb),l=f(()=>n(a)||i()),d=f(()=>n(a)?"btn-full-opacity":"");ko(t,{get disabled(){return n(l)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get tooltipVisible(){return e.tooltipVisible},get ref(){return r()},set ref(s){r(s)},children:(s,u)=>{let m=f(()=>{var p;return(p=e.testId)!=null?p:e.id});Ft(s,{get className(){return n(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(l)},get testId(){return n(m)},children:(p,v)=>{za(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),H()}var sb=t=>!!t.buttonComponent;var Us={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var Xu=(t,e,i,o)=>{if(t)for(let[r,a]of Object.entries(e))a.set(Qn(t,i,r,o))};import{interpolate as Pm}from"@vkontakte/videoplayer-shared/es2018";var ab=10,lb=40,km=.2,L2=.5,M2=65,V2=114,R2=4,db=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=f(()=>i?M2:V2),r=K(!1),a=K(0),l=K(0),d=f(()=>n(o)+ab-lb-R2),s=f(()=>Pm(n(a),[km,1],[0,-n(d)])),u=f(()=>Pm(n(a),[km,1],[0,lb])),m=f(()=>Pm(n(a),[km,1],[0,n(o)+ab]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(m),onPointerDown:$=>{var x;N(l,((x=e())==null?void 0:x.getBoundingClientRect().bottom)||0,!0),N(r,!0)},onPointerMove:$=>{if(!n(r))return;let x=Math.max(Math.min($.clientY-n(l),0),-n(d));N(a,Math.abs(x/n(d)),!0)},onPointerUp:()=>{N(r,!1),N(a,n(a)>=L2?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{N(a,0)}}};var N2=t=>t;function pa(t,{delay:e=0,duration:i=400,easing:o=N2}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var D2=L('<span class="root s-2c"> </span>'),O2={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 Am(t,e){Q(t,O2);var i=D2(),o=C(i,!0);S(i),O(()=>ge(o,e.time)),b(t,i)}var B2=L('<div class="tooltip-wrapper s-13"><div><!></div></div>'),H2={hash:"s-13",code:'.tooltip-wrapper.s-13{display:block;position:relative}.tooltip.s-13{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-13: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-13{opacity:1;visibility:visible}'};function Lm(t,e){Q(t,H2);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=K(void 0),u=K(void 0);function m(x){if(!n(u))return 0;let{width:I}=n(u).getBoundingClientRect(),T=I/2;return x<T?T+l():x>e.containerWidth-T?e.containerWidth-T-d():x}let p=f(()=>m(r()));var v=B2(),_=C(v);let y;var $=C(_);ei($,()=>{var x;return(x=e.children)!=null?x:gt}),S(_),et(_,x=>N(u,x),()=>n(u)),S(v),et(v,x=>N(s,x),()=>n(s)),O(x=>{qe(v,`transform: translate(${n(p)}px, ${a()}px);`),y=oe(_,1,"tooltip s-13",null,y,x),qe(_,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,v)}var cb=t=>Math.abs(t)/90%4===1;var F2=Ee('<path xmlns="http://www.w3.org/2000/svg" d="M15.782 10.152a.75.75 0 0 1-1.06 0L9.999 5.438l-4.72 4.716a.75.75 0 0 1-1.061-1.061l5.251-5.246a.75.75 0 0 1 1.06 0l5.253 5.246a.75.75 0 0 1 0 1.06Z"></path><path xmlns="http://www.w3.org/2000/svg" d="M15.782 16.152a.75.75 0 0 1-1.06 0l-4.723-4.715-4.72 4.716a.75.75 0 0 1-1.061-1.061l5.251-5.246a.75.75 0 0 1 1.06 0l5.253 5.245a.75.75 0 0 1 0 1.061Z"></path>',1);function Mm(t){je(t,{height:"20",width:"20",shadow:!0,children:(e,i)=>{var o=F2();Jt(),b(e,o)},$$slots:{default:!0}})}var U2=L('<div class="rich-seek-hint s-14"><span class="icon_wrapper s-14"><!></span> <span class="rich-seek-hint-text s-14"> </span></div>'),z2=L('<div class="preview s-14"><!></div>'),W2=L('<div class="time s-14"> </div>'),K2=L('<div><!> <div class="episode s-14"><!></div> <!></div>'),q2={hash:"s-14",code:".timeline-preview.s-14{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-14{bottom:72px}.preview.s-14{background-color:var(--timeline-preview-bg);border:1px solid var(--white);border-radius:8px;box-shadow:0 0 2px var(--timeline-preview-shadow),0 8px 24px var(--timeline-preview-shadow);display:flex;justify-content:center}.episode.s-14{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-14,.time.s-14{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-14{color:var(--white)}.rich-seek-hint.s-14{position:absolute;text-align:center;top:-12px;transform:translateY(-100%)}.icon_wrapper.s-14{display:inline-block;height:20px;margin-right:6px;vertical-align:top;width:20px}.rich-seek-hint-text.s-14{font-size:14px;line-height:18px;text-shadow:0 2px 4px rgba(0,0,0,.3),0 7px 16px rgba(0,0,0,.25);vertical-align:top}"};function Vm(t,e){B(e,!0),Q(t,q2);let[i,o]=Be(),r=()=>w($,"$rotateAlpha",i),a=()=>w(x,"$playerSize",i),l=()=>w(I,"$previewTrackAvailable",i),d={MOBILE:150,DESKTOP:278},s=h(e,"time",3,""),u=h(e,"isMobile",3,!1),m=h(e,"videoEpisodes",19,()=>[]),p=h(e,"progress",3,0),v=h(e,"duration",3,0),_=h(e,"isInteractive",3,!1),y=$e(),$=y.ui.rotateAlpha,x=y.ui.playerSize,I=y.ui.previewTrackAvailable,T=K(0),R=K(0),A=K(""),P=K(0),E=K(0),W=K(0),F=K(0),U=f(()=>Bu(p(),v(),m())),X=f(()=>Ol(r())),se=f(()=>cb(r())),j=f(Te),ne=f(()=>(n(se)?1:-1)*(n(T)/2-n(R)/2)),Z=f(()=>n(ne)*-1);He(()=>{(ue=>{N(T,ue.width,!0),N(R,ue.height,!0)})(te())}),He(()=>{(ue=>{N(A,ue.imgSrc,!0),N(P,ue.imgWidth,!0),N(E,ue.imgHeight,!0),N(W,ue.imgOffsetX,!0),N(F,ue.imgOffsetY,!0)})(_e(p()))});function Te(){var ee;let ue=u()?d.MOBILE:d.DESKTOP,{isVertical:Ae}=fe(),Ue=30;return(ee=n(U))!=null&&ee.text&&(Ue+=16),(Ae||n(X))&&(Ue+=18,Ue+=50),Math.min(Math.max(a().height-Ue,0),ue)}function fe(){let ue=e.previewThumbsData.frameWidth,Ae=e.previewThumbsData.frameHeight,Ue=Ae>ue;return{width:ue,height:Ae,isHorizontal:!Ue,isVertical:Ue}}function te(){let{height:ue,isHorizontal:Ae,isVertical:Ue,width:ee}=fe();return Ae&&(ue=ue/ee*n(j),ee=n(j)),Ue&&(ee=ee/ue*n(j),ue=n(j)),{width:ee,height:ue}}function _e(ue){let Ae;e.previewThumbsData.isUV?Ae=Math.floor(v()*ue/e.previewThumbsData.frequency):Ae=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*ue)));let Ue=Math.floor(Ae/e.previewThumbsData.countPerImage),ee=Math.floor(Ae%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),de=Ae%e.previewThumbsData.countPerRow,ke=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&Ue===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(ke=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&ke++);let xe=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&Ue===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(xe=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let Xe=n(T)*xe,Pe=n(R)*ke,we=-de*n(T),De=-ee*n(R);return{imgSrc:e.previewThumbsData.links[Ue],imgWidth:Xe,imgHeight:Pe,imgOffsetX:we,imgOffsetY:De}}var Ce=K2();let me;var ce=C(Ce);{var Qe=ue=>{var Ae=z2(),Ue=C(Ae);{var ee=de=>{var ke=U2(),xe=C(ke),Xe=C(xe);Mm(Xe,{}),S(xe);var Pe=k(xe,2),we=C(Pe,!0);S(Pe),S(ke),O(De=>ge(we,De),[()=>Y("preview_track_notification_text")]),b(de,ke)};V(Ue,de=>{l()&&de(ee)})}S(Ae),O(()=>qe(Ae,`width: ${n(T)}px; height: ${n(R)}px; background-image: url(${n(A)}); background-size: ${n(P)}px ${n(E)}px; background-position: ${n(W)}px ${n(F)}px;
|
|
61
|
+
transform: rotate(${r()}deg) ${n(X)?`translate(${n(ne)}px, ${n(Z)}px)`:""};
|
|
62
|
+
`)),b(ue,Ae)};V(ce,ue=>{n(A)&&ue(Qe)})}var G=k(ce,2),D=C(G);{var Ye=ue=>{var Ae=Re(),Ue=le(Ae);{var ee=ke=>{var xe=ps();O(Xe=>ge(xe,Xe),[()=>Y("tooltip_episode_unfinished")]),b(ke,xe)},de=ke=>{var xe=ps();O(()=>ge(xe,n(U).text||"")),b(ke,xe)};V(Ue,ke=>{_()&&n(U).completed===!1?ke(ee):ke(de,!1)})}b(ue,Ae)};V(D,ue=>{n(U)&&ue(Ye)})}S(G);var re=k(G,2);{var pe=ue=>{var Ae=W2(),Ue=C(Ae,!0);S(Ae),O(()=>ge(Ue,s())),b(ue,Ae)};V(re,ue=>{_()||ue(pe)})}S(Ce),O(ue=>{me=oe(Ce,1,"timeline-preview s-14",null,me,ue),qe(Ce,`width: ${n(X)?n(R):n(T)}px;`)},[()=>({mobile:u()})]),b(t,Ce),H(),o()}var Q2=L('<span class="time s-f"> </span>'),G2=L("<!> <!>",1),Y2={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 Rm(t,e){var Me,ye,Fe,Se,xt;B(e,!0),Q(t,Y2);let[i,o]=Be(),r=()=>w(j,"$interactiveEpisodes$",i),a=()=>w(E,"$duration$",i),l=()=>w(P,"$position$",i),d=()=>w(Te,"$isInteractiveExpectation$",i),s=()=>w(Z,"$isInteractiveTime$",i),u=()=>w(Ce,"$previewTrackActive",i),m=()=>w(W,"$isLive$",i),p=()=>w(_e,"$disabledControls$",i),v=()=>w(U,"$isMobile",i),_=()=>w(F,"$isActiveLive$",i),y=()=>w(A,"$bufferedProgress$",i),$=h(e,"showTimeline",3,!1),x=h(e,"withEpisodes",3,!0),I=h(e,"ref",15,void 0),T=$e(),R=Mt(),A=T.state.bufferedProgress$,P=T.state.positionWithScrubbing$,E=T.state.duration$,W=T.state.isLive$,F=T.state.isActiveLive$,U=T.ui.isMobile,X=R.features.episodes&&x()?T.actions.internal.getVideoEpisodes():void 0,se=T.actions.internal.getPreviewThumbsData(),j=T.state.interactiveEpisodes$,ne=T.state.isInteractive,Z=T.state.isInteractiveTime$,Te=T.state.isInteractiveExpectation$,fe=T.actions.internal.correctSeekTimeToInteractive,te=(Me=T.callbacks)==null?void 0:Me.onDisabledTimelineClick,_e=T.ui.controls.disabledControls$,Ce=T.ui.previewTrackActive,me=(Fe=(ye=T.callbacks)==null?void 0:ye.uiInfo)==null?void 0:Fe.onTimelineMouseEnter,ce=(xt=(Se=T.callbacks)==null?void 0:Se.uiInfo)==null?void 0:xt.onTimelineMouseLeave,Qe=T.ui.t,G=R.features.interactiveResponsiveUi,D=f(()=>ne?r():X),Ye=f(()=>Xo(a())),re=f(()=>Xo(l())),pe=f(()=>l()/a()),ue=f(()=>d()||s()),Ae=K(!1),Ue=K(""),ee=K(0),de=K(0),ke=K(0),xe=f(()=>({containerWidth:n(de),translateXPx:n(ee),translateYPx:ne&&se?-36:-16,active:n(Ae)&&$()&&!n(ue)&&!G&&!u(),pointer:!R.features.timelinePreview||!se||m()})),Xe=Qe("aria_timeline"),Pe=f(()=>Qe("aria_timeline_value",{position:n(re),duration:n(Ye)}));function we(ve){return!fe||!ne?ve:fe(ve*a())/a()}function De(ve,Oe){var Ke;(Ke=e.onSliderPointerDown)==null||Ke.call(e,Oe),T.actions.internal.startScrubbing(we(ve))}function Ct(ve){s()||T.actions.internal.progressScrubbing(we(ve))}function Tt(ve){var Oe;T.actions.internal.completeScrubbing(we(ve)),N(Ae,!1),(Oe=e.onSliderPointerUp)==null||Oe.call(e)}function Et(ve,Oe,Ke){var at;(at=e.onSliderPointerEnter)==null||at.call(e,ve),Yt(ve,Oe,Ke),N(Ae,!0)}function dt(ve,Oe,Ke,at){var qt;(qt=e.onSliderMove)==null||qt.call(e,at,ve),Yt(ve,Oe,Ke),N(Ae,!0)}function wt(){var ve;N(Ae,!1),(ve=e.onSliderLeave)==null||ve.call(e)}function Yt(ve,Oe,Ke){N(ke,we(ve),!0),N(ee,Oe,!0),Ke&&N(de,Ke,!0),N(Ue,Dt(ve),!0)}function Dt(ve){let Oe=Xo((m()?1-ve:ve)*a());return m()?`-${Oe}`:Oe}let Rt=f(()=>p().has("TIMELINE"));var Ut=G2(),q=le(Ut);Lm(q,Xr(()=>n(xe),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(ve,Oe)=>{var Ke=Re(),at=le(Ke);{var qt=si=>{Vm(si,{get time(){return n(Ue)},get isMobile(){return v()},get videoEpisodes(){return n(D)},get previewThumbsData(){return se},get progress(){return n(ke)},get duration(){return a()},get isInteractive(){return ne}})},Pt=si=>{var li=Q2(),Ii=C(li,!0);S(li),O(()=>ge(Ii,n(Ue))),b(si,li)};V(at,si=>{R.features.timelinePreview&&se&&!m()?si(qt):si(Pt,!1)})}b(ve,Ke)},$$slots:{default:!0}}));var Le=k(q,2);Ha(Le,{className:"timeline-slider",get isActiveLive(){return _()},get isMobile(){return v()},get ariaLabel(){return Xe},ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return l()},get ariaValueText(){return n(Pe)},get loadedProgress(){return y()},get filledProgress(){return n(pe)},get handleProgress(){return n(pe)},get videoEpisodes(){return n(D)},onPointerDown:De,onHandleMove:Ct,onPointerMove:dt,onPointerUp:Tt,onPointerEnter:Et,onPointerLeave:wt,get onMouseEnter(){return me},get onMouseLeave(){return ce},get onDisabledClick(){return te},get isInteractive(){return ne},get disabled(){return n(Rt)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:Tt,get ref(){return I()},set ref(ve){I(ve)}}),b(t,Ut),H(),o()}var j2={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 nc(t,e){B(e,!0),Q(t,j2);let[i,o]=Be(),r=()=>w(s,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"duration",3,0),d=$e(),s=d.ui.isMobile,u=d.ui.t,m=f(()=>Xo(l())),p=f(()=>Xo(a())),v=f(()=>a()/l()),_=f(()=>u("aria_timeline_value",{position:n(p),duration:n(m)})),y=f(()=>Math.round(n(v)*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(v)},hideHandel:!0,get squareBorders(){return r()}}),H(),o()}var X2=L("<div><!></div>"),Z2=L("<div></div>"),J2={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 Wa(t,e){B(e,!0),Q(t,J2);let[i,o]=Be(),r=()=>w(x,"$isLive$",i),a=()=>w(R,"$isMobile",i),l=()=>w(A,"$disabled",i),d=()=>w(T,"$adPosition",i),s=()=>w(I,"$adDuration",i),u=h(e,"isAds",3,!1),m=h(e,"isHidden",3,!1),p=h(e,"timelineNotAvailable",3,!1),v=h(e,"needPadding",3,!0),_=h(e,"ref",15,void 0),y=$e(),$=Mt(),x=y.state.isLive$,I=y.ads.duration,T=y.ads.position,R=y.ui.isMobile,A=ae(!1),P=f(()=>!p()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var E=Re(),W=le(E);{var F=X=>{var se=X2();let j;var ne=C(se);{var Z=fe=>{nc(fe,{get position(){return d()},get duration(){return s()}})},Te=fe=>{Rm(fe,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return n(P)},get withEpisodes(){return e.withEpisodes},get onSliderMove(){return e.onSliderMove},get onSliderPointerDown(){return e.onSliderPointerDown},get onSliderPointerUp(){return e.onSliderPointerUp},get onSliderLeave(){return e.onSliderLeave},get onSliderPointerEnter(){return e.onSliderPointerEnter},get ref(){return _()},set ref(te){_(te)}})};V(ne,fe=>{u()?fe(Z):fe(Te,!1)})}S(se),Ls(se,()=>kl(m()&&$.features.usePerformanceFix,A,$.disableInvisibleComponentsTimeout)),O(fe=>j=oe(se,1,"timeline s-e",null,j,fe),[()=>({withoutPadding:!v(),mobile:a(),"out-of-flow":l()})]),b(X,se)},U=X=>{var se=Z2();let j;O(ne=>j=oe(se,1,"timeline-stub s-e",null,j,ne),[()=>({mobile:a()})]),b(X,se)};V(W,X=>{n(P)?X(F):X(U,!1)})}b(t,E),H(),o()}import{getRangeAroundIndex as ew}from"@vkontakte/videoplayer-shared/es2018";import{ThinOneStat as tw}from"@vkontakte/videoplayer-statistics/es2018";var iw=(t,e,i,o,r,a,l)=>{N(e,!0),N(i,t.clientX,!0),N(o,n(r),!0),a(l())},ow=L("<div></div>"),nw=L('<div><div class="track s-2a"></div></div>'),rw={hash:"s-2a",code:'.root.s-2a{display:flex;height:var(--preview-track-frame-height-horizontal);overflow:hidden;position:relative;width:100%}.root.is-vertical-video.s-2a,.root.vertically-rotated.s-2a{height:var(--preview-track-frame-height-vertical)}.root.s-2a: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-2a{bottom:0;display:flex;left:0;padding:0 50%;top:0}.frame.s-2a,.track.s-2a{position:absolute}.frame.s-2a{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-2a .frame:where(.s-2a){transform-origin:0 0}.rotate-1.s-2a{transform:rotate(-90deg) translateX(-100%)}.rotate-2.s-2a{transform:rotate(-180deg)}.rotate-3.s-2a{transform:rotate(-270deg) translateY(-100%)}'};function Dm(t,e){B(e,!0),Q(t,rw);let[i,o]=Be(),r=()=>w(R,"$rotateAlpha",i),a=()=>w($,"$position$",i),l=()=>w(y,"$duration$",i),d=$e(),{countPerImage:s=0,countPerRow:u=0,countTotal:m=0,links:p=[],frameHeight:v=0,frameWidth:_=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:$}=d.state,{startScrubbing:x,progressScrubbing:I,completeScrubbing:T}=d.actions.internal,R=d.ui.rotateAlpha,A=K(void 0),P=K(!1),E=K(0),W=K(0),F=K(0),U=K(0),X=f(()=>v<=_),se=f(()=>Ol(r())),j=f(()=>n(X)?!n(se):n(se)),ne=114,Z=65,Te=3,fe=f(()=>n(j)?ne:Z),te=f(()=>n(X)?ne:Z),_e=f(()=>n(X)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),Ce=f(()=>m*n(fe)),me=K(0);He(()=>{N(U,Math.ceil(-n(F)/n(fe))-1),N(F,-n(Ce)*a()/l())});let ce=()=>{T(Qe(),!0,tw.ActionSeekType.RICH)},Qe=()=>l()*-n(F)/n(Ce)/l(),G=!1,D=Pe=>{if(!n(P))return!1;let we=Pe.clientX-n(E);N(F,n(W)+we),N(F,Math.max(Math.min(n(F),0),-n(Ce)),!0),Math.abs(we)>1&&(G=!0),I(Qe())},Ye=Pe=>{n(P)&&(N(P,!1),!G&&Pe&&N(F,-(Pe.offsetX-n(me)/2)),G=!1,ce())},re=()=>{n(P)&&Ye()},pe=f(()=>s/u),ue=(Pe,we)=>{if(Pe!==p.length-1)return u;let De=0,Ct=we*u;for(let Tt=1;Tt<=u;Tt++)Pe*s+De+Ct<m&&De++;return De},Ae=f(()=>Math.floor(n(U)/s)),Ue=f(()=>ew(3,n(Ae),p.length-1)),ee=(Pe,we,De)=>{let Ct=s*n(fe);return Pe*Ct+we*n(fe)*u+n(me)/2-Te/2+De*n(fe)},de=f(()=>[`--row-numbers: ${n(pe)}`,`--column-numbers: ${u}`,`--frame-width: ${n(te)}px`,`--frame-height: ${n(_e)}`].join(";"));var ke=nw();let xe;var Xe=C(ke);Xe.__pointerdown=[iw,P,E,W,F,x,Qe],Xe.__pointermove=D,Xe.__pointerup=Ye,hi(Xe,20,()=>n(Ue),Pe=>Pe,(Pe,we)=>{var De=Re(),Ct=le(De);hi(Ct,16,()=>Array.from({length:n(pe)},(Tt,Et)=>Et),Tt=>Tt,(Tt,Et)=>{var dt=Re(),wt=le(dt);hi(wt,16,()=>Array.from({length:ue(we,Et)},(Yt,Dt)=>Dt),Yt=>Yt,(Yt,Dt)=>{var Rt=ow();O((Ut,q)=>{qe(Rt,Ut),oe(Rt,1,q,"s-2a")},[()=>`--row-index: ${Et}; --column-index: ${Dt}; left: ${ee(we,Et,Dt)}px; background-image: url(${p[we]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),b(Yt,Rt)}),b(Tt,dt)}),b(Pe,De)}),S(Xe),S(ke),et(ke,Pe=>N(A,Pe),()=>n(A)),O(Pe=>{xe=oe(ke,1,"root s-2a",null,xe,Pe),qe(ke,n(de)),qe(Xe,`transform: translateX(${n(F)}px); width: ${n(Ce)}px;`)},[()=>({"is-vertical-video":!n(X),"vertically-rotated":n(se)})]),pt("mouseleave",Xe,re),Sn(ke,"clientWidth",Pe=>N(me,Pe)),b(t,ke),H(),o()}Ze(["pointerdown","pointermove","pointerup"]);var sw=L('<div class="notification s-2b"><span class="description s-2b"> </span></div>'),aw={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 Om(t,e){B(e,!1),Q(t,aw);let i=340,{ui:{t:o}}=$e();jo();var r=sw(),a=C(r),l=C(a,!0);S(a),S(r),O(d=>ge(l,d),[()=>o("preview_track_close_tooltip")],cr),Ms(3,r,()=>pa,()=>({duration:i})),b(t,r),H()}import{getRangeAroundIndex as lw}from"@vkontakte/videoplayer-shared/es2018";var dw=L('<div class="preview-track-close tooltip s-28"><!></div>'),cw=L('<div class="preview-track-control s-28"><!> <div class="preview-track-close s-28"><!></div> <!></div>'),uw=L('<div class="wrapper-preview-track s-28"><!></div>'),pw=L('<div class="enriched-timeline s-28"><!> <!> <!></div>'),fw={hash:"s-28",code:".enriched-timeline.s-28{padding:var(--timeline-padding-vertical-top) var(--timeline-padding-horizontal) var(--timeline-padding-vertical-bottom);pointer-events:auto;position:relative}.preview-track-control.s-28{align-items:center;display:flex;justify-content:center;left:0;padding:0 calc(var(--timeline-padding-horizontal));pointer-events:none;position:absolute;right:0;top:calc((var(--timeline-height) + var(--preview-track-controls-top))*-1)}.preview-track-close.s-28{pointer-events:auto;position:absolute;right:calc(var(--timeline-padding-horizontal))}.preview-track-close.tooltip.s-28{bottom:32px;opacity:0;transition:opacity .2s}.preview-track-close.s-28:hover+.tooltip:where(.s-28){opacity:1}.wrapper-preview-track.s-28{box-sizing:border-box;left:0;overflow:hidden;padding:0 calc(var(--timeline-padding-horizontal));position:absolute;right:0;z-index:-1}"};function Bm(t,e){B(e,!0),Q(t,fw);let[i,o]=Be(),r=()=>w($,"$playerSize",i),a=()=>w(y,"$duration$",i),l=()=>w(x,"$previewTrackActive",i),d=()=>w(v,"$position$",i),s=()=>w(_,"$isRewindableLive$",i),u=h(e,"timelineRef",15,void 0),m=$e(),p=200,{positionWithScrubbing$:v,isRewindableLive$:_,duration$:y}=m.state,{playerSize:$,previewTrackActive:x}=m.ui,{countPerImage:I=0,links:T=[],frequency:R=0}=m.actions.internal.getPreviewThumbsData()||{},A=f(()=>r().width>100),P=K(!p_()),E=()=>{n(P)&&(u_(),N(P,!1))},W=fe=>{let te=Math.floor(a()*fe/R),_e=Math.floor(te/I),Ce=lw(3,_e,T.length-1);for(let me of Ce){let ce=new Image;ce.src=T[me]}},F=(fe,te)=>{W(te),!l()&&e.onTimelineMove(fe)};var U=pw(),X=C(U);{var se=fe=>{var te=cw(),_e=C(te);let Ce=f(()=>Xo(d()));Am(_e,{get time(){return n(Ce)}});var me=k(_e,2),ce=C(me);Rs(ce,{onClick:()=>m.actions.internal.closePreviewTrack()}),S(me);var Qe=k(me,2);{var G=D=>{var Ye=dw(),re=C(Ye);Om(re,{}),S(Ye),b(D,Ye)};V(Qe,D=>{n(P)&&D(G)})}S(te),pt("mouseleave",me,E),Ms(3,te,()=>pa,()=>({duration:p})),b(fe,te)};V(X,fe=>{l()&&fe(se)})}var j=k(X,2);let ne=f(()=>!n(A));Wa(j,{get isHidden(){return n(ne)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return s()},onSliderMove:F,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:W,get ref(){return u()},set ref(fe){u(fe)}});var Z=k(j,2);{var Te=fe=>{var te=uw(),_e=C(te);Dm(_e,{}),S(te),O(()=>qe(te,`height: ${e.animatedPreviewTrackHeight}px;`)),b(fe,te)};V(Z,fe=>{e.previewTrackAvailable&&fe(Te)})}S(U),O(()=>qe(U,`transform: translateY(${e.animatedOffsetY}px);`)),b(t,U),H(),o()}var vw=L('<div><!> <div class="controls s-1e" data-testid="player_controls"><div class="controls-left s-1e"><!> <!> <!></div> <div class="controls-right s-1e"></div></div></div> <!>',1),gw={hash:"s-1e",code:'.wrapper-bottom.s-1e{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-1e:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-1e>:where(.s-1e){pointer-events:auto}.controls.s-1e{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-1e,.controls-right.s-1e{align-content:center;display:flex}.controls-left.s-1e{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-1e >:not(:first-child),.controls-right.s-1e >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-1e{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1e{transition:none}'};function Fm(t,e){var il,ga;B(e,!0),Q(t,gw);let[i,o]=Be(),r=()=>w(Zo,"$disabledControls$",i),a=()=>w($t,"$adPlaybackState",i),l=()=>w(Pt,"$playbackState$",i),d=()=>w(Ci,"$currentSubtitle$",i),s=()=>w(Ii,"$isEnded$",i),u=()=>w(Li,"$currentGridType$",i),m=()=>w(po,"$isLive$",i),p=()=>w(ot,"$chromecastState$",i),v=()=>w(rt,"$isPictureInPictureActive",i),_=()=>w(ci,"$pictureInPictureType$",i),y=()=>w(nt,"$availableSubtitlesList$",i),$=()=>w(Ot,"$contextMenuOpenedByKeyboard$",i),x=()=>w(ht,"$showContextMenuBtn$",i),I=()=>w(di,"$isRewindableLive$",i),T=()=>w(fo,"$isActiveLive$",i),R=()=>w(Vr,"$graphIsOpened$",i),A=()=>w(Ao,"$contextMenuVisible$",i),P=()=>w(st,"$isFullscreen",i),E=()=>w(Pn,"$autoplayNextEnabled",i),W=()=>w(n(Ro),"$prevButton",i),F=()=>w(n(No),"$replayButton",i),U=()=>w(n(nn),"$playButton",i),X=()=>w(n(_o),"$nextButton",i),se=()=>w(n(bo),"$playPrevChapterButton",i),j=()=>w(n(Ei),"$seekToInteractiveButton",i),ne=()=>w(n($o),"$interactiveGraphButton",i),Z=()=>w(n(Or),"$liveButton",i),Te=()=>w(n(xr),"$time",i),fe=()=>w(n(_s),"$episodes",i),te=()=>w(n(Bi),"$vkLogo",i),_e=()=>w(n(bs),"$volume",i),Ce=()=>w(n(ns),"$subtitles",i),me=()=>w(n(wr),"$settings",i),ce=()=>w(n(Do),"$context",i),Qe=()=>w(n(Br),"$fullscreen",i),G=()=>w(n(rn),"$chromecast",i),D=()=>w(En,"$additionalDesktopControlPanelRightButtons$",i),Ye=()=>w(Di,"$playerSize",i),re=()=>w(Lo,"$isInteractiveTime$",i),pe=()=>w(ut,"$previewTrackActive",i),ue=()=>w(Gi,"$settingsMenuVisible",i),Ae=()=>w(xo,"$settingButtonRef$",i),Ue=()=>w(z,"$startedByKeyboard$",i),ee=()=>w(si,"$isAudioAvailable$",i),de=()=>w(Ut,"$fakeIsPlaying$",i),ke=()=>w(ts,"$seekToInteractiveDisabledTooltip$",i),xe=()=>w($i,"$isPreviewTrackHorizontallyAligned$",i),Xe=()=>w(Co,"$previewTrackAvailable",i),Pe=()=>w(ni,"$previewTrackDragInProgress",i),we=()=>w(jt,"$adPosition",i),De=()=>w(qt,"$position$",i),Ct=()=>w(gi,"$adDuration",i),Tt=()=>w(at,"$duration$",i),Et=h(e,"playerControlsWrapperRef",15,void 0),dt=h(e,"playerControlsRef",15,void 0),wt=h(e,"isAds",3,!1),Yt=h(e,"logoTargetUrl",3,""),Dt=h(e,"isOneVideoPlaylist",3,!1),Rt=h(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:Ut}=vo(),q=$e(),Le=vo(),Me=Mt(),ye=q.actions.internal.toggleMuted,Fe=q.actions.internal.togglePlay,Se=q.actions.internal.pause,xt=q.actions.internal.toggleSubtitle,ve=q.actions.internal.checkFullscreenSupport,Oe=(il=q.callbacks)==null?void 0:il.onAudioDoesNotExistHint,Ke=(ga=q.callbacks)==null?void 0:ga.onAudioDisabledHint,at=q.state.duration$,qt=q.state.positionWithScrubbing$,Pt=q.state.playbackState$,si=q.state.isAudioAvailable$,li=q.state.isAudioDisabled,Ii=q.state.isEnded$,po=q.state.isLive$,fo=q.state.isActiveLive$,di=q.state.isRewindableLive$,{isActive$:rt,type$:ci}=Le.pictureInPicture$,Gi=q.ui.settingsMenu.visible$,ct=q.ui.settingsMenu.openedByBtnKeyboard$,Nt=q.ui.controls,fi=q.actions.internal.getVideoEpisodes(),ot=q.state.chromecastState$,nt=q.state.availableSubtitlesList$,Ci=q.state.currentSubtitle$,Zo=Nt.disabledControls$,Ao=q.ui.contextMenu.visible$,ht=q.ui.contextMenu.showContextMenuBtn$,Ot=q.ui.contextMenu.openedByBtnKeyboard$,z=q.ui.startedByKeyboard$,kt=q.ui.controlBlocks,lt=q.ui.t,gi=q.ads.duration,jt=q.ads.position,$t=q.ads.playbackState,st=q.ui.isFullscreen,Di=q.ui.playerSize,Li=q.ui.currentGridType$,En=q.ui.additionalDesktopControlPanelRightButtons$,Pn=q.ui.autoplayNextEnabled$,xi=q.actions.internal.getVideoElement,Yi=q.actions.internal.replayInteractive,kn=q.actions.internal.prevVideoClick,go=q.actions.internal.nextVideoClick,_i=q.state.isInteractive,Lo=q.state.isInteractiveTime$,Mo=q.state.showInteractiveGraph,mo=q.state.showSeekToInteractive,pn=q.state.showPlayPrevChapter,es=q.state.showInteractiveTimeIndicator,Mr=q.state.playPrevChapterDisabledTooltip,ts=Le.seekToInteractiveDisabledTooltip$,Vr=Le.graphIsOpened$,Yn=Me.features.interactiveResponsiveUi,is=f(()=>r().has("EPISODE_BUTTON")),Rr=f(()=>r().has("GRAPH_BUTTON")),Jo=f(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),fn=f(()=>r().has("PLAY_BUTTON")),vr=f(()=>r().has("REPLAY_BUTTON")),gr=f(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),mn=()=>q.actions.internal.toggleChromecast(),jn=f(()=>wt()?a()==="playing":l()===Hm.PLAYING),hr=f(()=>d().value!=="off"),Xn=f(()=>s()&&!wt()||_i),Zn=f(()=>Yn?n(Xn)&&io(u(),"m"):n(Xn)),os=f(()=>!s()||_i||wt()),ho=f(()=>io(u(),"m")),_r=f(()=>e.showNextPrevButtons&&io(u(),"m")&&!wt()&&e.nextButtonActive),Oi=f(()=>e.showNextPrevButtons&&io(u(),"m")&&!wt()&&e.prevButtonActive),br=f(()=>!wt()&&!!m()),An=f(()=>p()!==ub.NOT_AVAILABLE&&!(v()&&_()===1)&&io(u(),"m")&&!_i),vt=f(()=>e.showAutoplayNext&&!Dt()&&io(u(),"s")),Xt=f(()=>y().length>0&&io(u(),"m")),$r=f(()=>$()||x()),Nr=f(()=>io(u(),"s")&&!wt()),Dr=f(()=>!e.logoHidden&&!wt()),Ln=f(()=>Me.features.fullscreen&&ve()&&(e.logoHidden||io(u(),Yn?"xs":"s"))&&!(v()&&_()===1)&&(_i?Rt():!0)),Mn=f(()=>(!m()||wt())&&!(Me.features.interactiveHideTime&&_i)),Vo=f(()=>Mo&&io(u(),"m")),Vn=f(()=>Yn?mo&&io(u(),"s"):mo),Jn=f(()=>Yn?pn&&io(u(),"s"):pn),en=f(()=>!wt()&&!m()&&!!(fi!=null&&fi.length)&&n(ho)&&!n(is)),vn=f(()=>!I()||!!T()),er=f(()=>R()?lt("tooltip_interactive_graph_on"):lt("tooltip_interactive_graph_off")),gn=f(()=>A()?lt("tooltip_context_menu_close"):lt("tooltip_context_menu_open")),tn=(ft,mt)=>ft?mt&&mt===Hm.PAUSED?lt("tooltip_play"):"":lt("tooltip_live"),Mi=f(()=>tn(n(vn),l())),no=f(()=>Me.logoType==="vk_video"?lt("tooltip_vk_video_logo"):lt("tooltip_vk_logo")),on=f(()=>n(hr)?lt("tooltip_subtitles_on"):lt("tooltip_subtitles_off")),tr=f(()=>P()?lt("tooltip_fullscreen_on"):lt("tooltip_fullscreen_off")),yr=f(()=>p()===ub.CONNECTED?lt("tooltip_chromecast_on"):lt("tooltip_chromecast_off")),hn=f(()=>E()?lt("tooltip_autoplay_on"):lt("tooltip_autoplay_off")),ir=K(0),Ge=ri({}),ai=ri({}),Ro=f(()=>Nt.prevButton),No=f(()=>Nt.replayButton),nn=f(()=>Nt.playButton),_o=f(()=>Nt.nextButton),bo=f(()=>Nt.playPrevChapterButton),Ei=f(()=>Nt.seekToInteractiveButton),$o=f(()=>Nt.interactiveGraphButton),Or=f(()=>Nt.liveButton),xr=f(()=>Nt.time),_s=f(()=>Nt.episodes),Bi=f(()=>Nt.vkLogo),bs=f(()=>Nt.volume),ns=f(()=>Nt.subtitles),wr=f(()=>Nt.settings),Do=f(()=>Nt.context),Br=f(()=>Nt.fullscreen),rn=f(()=>Nt.chromecast),Pi=f(()=>({prevButton:W()?W().right-W().left:0,replayButton:F()?F().right-F().left:0,playButton:U()?U().right-U().left:0,nextButton:X()?X().right-X().left:0,playPrevChapterButton:se()?se().right-se().left:0,seekToInteractiveButton:j()?j().right-j().left:0,interactiveGraphButton:ne()?ne().right-ne().left:0,liveButton:Z()?Z().right-Z().left:0,time:Te()?Te().right-Te().left:0,episodes:fe()?fe().right-fe().left:0,vkLogo:te()?te().right-te().left:0,volume:_e()?_e().right-_e().left:0,subtitles:Ce()?Ce().right-Ce().left:0,settings:me()?me().right-me().left:0,context:ce()?ce().right-ce().left:0,fullscreen:Qe()?Qe().right-Qe().left:0,chromecast:G()?G().right-G().left:0,additionalButtons:D().length?D().reduce(ft=>[...ft,40],[]):[]})),ze=K(0);He(()=>{(!n(ze)||n(ze)<n(Pi).time)&&St(()=>N(ze,n(Pi).time,!0))});let At=K(!1);He(()=>{let ft=0;n(en)&&(io(u(),"xl")?ft=n(Pi).time:ft=60);let mt=n(Pi).prevButton+n(Pi).playButton+n(Pi).nextButton+n(Pi).seekToInteractiveButton+n(Pi).interactiveGraphButton+n(Pi).liveButton+n(ze)+ft;N(At,n(Mn)&&n(ir)>=mt,!0)});let ui=f(()=>n(At)&&io(u(),"m")),Oo=pb(Fl,260),yo=pb(Xu,260);He(()=>{Ye(),re(),pe(),Oo(xi(),Nt,Ge,e.showControls),yo(xi(),kt,ai,e.showControls)}),He(()=>{ai.bottom=Et()});let xo=ae();He(()=>{ue(),Ae()&&St(()=>Ll(Ae(),ue(),ct))});let Hi;He(()=>{Ue(),St(()=>Yu(z,Ue(),Hi))});function Bo(){la({isAudioDisabled:li,isAudioAvailable:ee(),isAds:wt(),audioIsNotExistHintCallback:Oe,audioDisabledHintCallback:Ke})&&ye()}let Rn=_i?Yi:Fe,Sr=f(()=>de()!==null),wo=f(()=>n(Sr)?de():n(jn)),ro=f(()=>n(wo)?lt("tooltip_pause"):lt("tooltip_play")),_n=lt("tooltip_episodes"),Ho=f(()=>{var ft,mt,Zi,ki;return n(Oi)?{id:"prevButton",type:"desktop-control-panel-left",weight:Hs.prevButton,buttonComponent:Ua,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:kn.bind(null,!0)},tooltipEnabled:!((mt=(ft=q.callbacks)==null?void 0:ft.uiInfo)!=null&&mt.onPrevButtonMouseEnter)&&!((ki=(Zi=q.callbacks)==null?void 0:Zi.uiInfo)!=null&&ki.onPrevButtonMouseLeave),mouseEnter:()=>{var Ji,mi,Ui;(Ui=(mi=(Ji=q.callbacks)==null?void 0:Ji.uiInfo)==null?void 0:mi.onPrevButtonMouseEnter)==null||Ui.call(mi,Qn(xi(),Ge,"prevButton",e.showControls))},mouseLeave:()=>{var Ji,mi,Ui;(Ui=(mi=(Ji=q.callbacks)==null?void 0:Ji.uiInfo)==null?void 0:mi.onPrevButtonMouseLeave)==null||Ui.call(mi,Qn(xi(),Ge,"prevButton",e.showControls))},tooltipText:lt("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),Nn=f(()=>n(Zn)?{id:"replayButton",type:"desktop-control-panel-left",weight:Hs.replayButton,buttonComponent:Ul,buttonComponentProps:{disabled:n(vr),click:Rn},tooltipText:lt("tooltip_restart"),disabled:n(vr)}:void 0),Hr=f(()=>n(os)?{id:"playButton",type:"desktop-control-panel-left",weight:Hs.playButton,buttonComponent:zl,buttonComponentProps:{disabled:n(fn),isPlaying:n(jn),click:Fe},tooltipText:n(ro),disabled:n(fn)}:void 0),Fr=f(()=>{var ft,mt,Zi,ki;return n(_r)?{id:"nextButton",type:"desktop-control-panel-left",weight:Hs.nextButton,buttonComponent:Ua,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:go.bind(null,!0)},tooltipEnabled:!((mt=(ft=q.callbacks)==null?void 0:ft.uiInfo)!=null&&mt.onNextButtonMouseEnter)&&!((ki=(Zi=q.callbacks)==null?void 0:Zi.uiInfo)!=null&&ki.onNextButtonMouseLeave),mouseEnter:()=>{var Ji,mi,Ui;(Ui=(mi=(Ji=q.callbacks)==null?void 0:Ji.uiInfo)==null?void 0:mi.onNextButtonMouseEnter)==null||Ui.call(mi,Qn(xi(),Ge,"nextButton",e.showControls))},mouseLeave:()=>{var Ji,mi,Ui;(Ui=(mi=(Ji=q.callbacks)==null?void 0:Ji.uiInfo)==null?void 0:mi.onNextButtonMouseLeave)==null||Ui.call(mi,Qn(xi(),Ge,"nextButton",e.showControls))},tooltipText:lt("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Dn=f(()=>_i&&n(Jn)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Hs.playPrevChapterButton,buttonComponent:Jd,buttonComponentProps:{disabled:n(gr),click:e.playPrevChapter},tooltipText:lt("tooltip_interactive_go_back"),disabledTooltipContent:lt(Mr),disabled:n(gr)}:void 0),tt=f(()=>_i&&n(Vn)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Hs.seekToInteractiveButton,buttonComponent:tc,buttonComponentProps:{disabled:n(Jo),click:e.seekToInteractive},tooltipText:lt("tooltip_interactive_seek"),disabled:n(Jo),disabledTooltipContent:lt(ke())}:void 0),Qt=f(()=>_i&&n(Vo)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Hs.interactiveGraphButton,buttonComponent:ic,buttonComponentProps:{disabled:n(Rr),click:Vr.toggle,graphIsOpened:R()},tooltipText:n(er)}:void 0),bi=f(()=>n(br)?{id:"liveButton",type:"desktop-control-panel-left",weight:Hs.liveButton,buttonComponent:oc,buttonComponentProps:{isLiveActive:n(vn),ariaLabel:n(Mi)},tooltipText:n(Mi),disabled:n(vn)&&l()===Hm.PLAYING}:void 0),So=f(()=>[n(Ho),n(Nn),n(Hr),n(Fr),n(Dn),n(tt),n(Qt),n(bi)].filter(ft=>!!ft).sort(Na)),bn=f(()=>n(Dr)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Us.vkLogo,buttonComponent:zd,buttonComponentProps:{targetUrl:Yt(),logoClickable:e.logoClickable,click:Se},tooltipText:n(no),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),On=f(()=>n(vt)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Us.autoplayNext,buttonComponent:ec,tooltipText:n(hn)}:void 0),Fo=f(()=>({id:"volume",type:"desktop-control-panel-right",weight:Us.volume,buttonComponent:lm,buttonComponentProps:{click:Bo,isAds:wt()}})),or=f(()=>n(Xt)?{id:"subtitles",type:"desktop-control-panel-right",weight:Us.subtitles,buttonComponent:om,buttonComponentProps:{isSubtitlesEnabled:n(hr),click:xt},tooltipText:n(on)}:void 0),rs=f(()=>n(Nr)?{id:"settings",type:"desktop-control-panel-right",weight:Us.settings,buttonComponent:Nl,buttonComponentProps:{ref$:xo},tooltipText:ue()?void 0:lt("tooltip_settings_off")}:void 0),Cr=f(()=>Me.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Us.context,buttonComponent:Sm,buttonComponentProps:{ariaLabel:lt("aria_label_context_menu")},className:n($r)?"":"out-of-view",tooltipText:n(gn)}:void 0),$s=f(()=>n(Ln)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Us.fullscreen,buttonComponent:Ud,buttonComponentProps:{isFullscreen:P(),click:e.toggleFullscreen},tooltipText:n(tr)}:void 0),zs=f(()=>n(An)?{id:"chromecast",type:"desktop-control-panel-right",weight:Us.chromecast,buttonComponent:Kd,buttonComponentProps:{state:p(),click:mn},tooltipText:n(yr)}:void 0),ma=f(()=>[n(bn),n(On),n(Fo),n(or),n(rs),n(Cr),n($s),n(zs),...D()].filter(ft=>!!ft).sort(Na)),ut=q.ui.previewTrackActive,ni=q.ui.previewTrackDragInProgress,Co=q.ui.previewTrackAvailable,$i=q.ui.isPreviewTrackHorizontallyAligned,ji=f(()=>db({onPreviewTrackOpened:q.actions.internal.previewTrackOpened,getTimelineRef:()=>Ge.timeline,isHorizontal:xe()})),ys=f(()=>n(ji).progressBarY),xs=f(()=>n(ji).controlsY),ws=f(()=>n(ji).onPointerDown),Fi=f(()=>n(ji).onPointerMove),Ti=f(()=>n(ji).onPointerUp),he=f(()=>n(ji).calculatedHeight),yt=f(()=>n(ji).closePreviewTrack);He(()=>{pe()||n(yt)()});let Gt;Lt(()=>()=>Gt&&clearTimeout(Gt));let Zt=ft=>{pe()||!Xe()||(n(ws)(ft),Gt=setTimeout(()=>{q.actions.internal.previewTrackDragStarted()},200))},Uo=()=>{pe()||n(Ti)(),Gt&&clearTimeout(Gt),Pe()&&q.actions.internal.previewTrackDragFinished()},so=ft=>{n(Fi)(ft)};var Xi=vw(),Bn=le(Xi);let Ur;var Ss=C(Bn);{var Ja=ft=>{let mt=f(()=>n(ys)()),Zi=f(()=>n(he)());Bm(ft,{get animatedOffsetY(){return n(mt)},get animatedPreviewTrackHeight(){return n(Zi)},get canRewindLive(){return e.canRewindLive},get isAds(){return wt()},onTimelineMove:so,onTimelinePointerDown:Zt,onTimelinePointerUp:Uo,get previewTrackAvailable(){return Xe()},get timelineRef(){return Ge.timeline},set timelineRef(ki){Ge.timeline=ki}})};V(Ss,ft=>{e.showControls&&ft(Ja)})}var zr=k(Ss,2),ss=C(zr),Ws=C(ss);hi(Ws,17,()=>n(So),ft=>ft.id,(ft,mt)=>{ju(ft,{get buttonComponent(){return n(mt).buttonComponent},get buttonComponentProps(){return n(mt).buttonComponentProps},get tooltipText(){return n(mt).tooltipText},get disabledTooltipContent(){return n(mt).disabledTooltipContent},get disabled(){return n(mt).disabled},get className(){return n(mt).className},get tooltipEnabled(){return n(mt).tooltipEnabled},get mouseEnter(){return n(mt).mouseEnter},get mouseLeave(){return n(mt).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return Ge[n(mt).id]},set ref(Zi){Ge[n(mt).id]=Zi}})});var nr=k(Ws,2);{var ql=ft=>{let mt=f(()=>!e.showControls),Zi=f(()=>wt()?we():De()),ki=f(()=>wt()?Ct():Tt());Hd(ft,{get isHidden(){return n(mt)},isMobile:!1,get showDuration(){return n(ui)},get position(){return n(Zi)},get duration(){return n(ki)},get ref(){return Ge.time},set ref(Ji){Ge.time=Ji}})};V(nr,ft=>{n(Mn)&&ft(ql)})}var el=k(nr,2);let Wr=f(()=>!n(en));ko(el,{className:"w-max",get disabled(){return n(Wr)},get tooltipContent(){return _n},get tooltipVisible(){return e.showControls},get ref(){return Ge.episodes},set ref(ft){Ge.episodes=ft},children:(ft,mt)=>{var Zi=Re(),ki=le(Zi);{var Ji=mi=>{qd(mi,{get position(){return De()},get duration(){return Tt()},get timeCodes(){return fi}})};V(ki,mi=>{n(en)&&mi(Ji)})}b(ft,Zi)},$$slots:{default:!0}}),S(ss);var va=k(ss,2);hi(va,21,()=>n(ma),ft=>ft.id,(ft,mt)=>{var Zi=Re(),ki=le(Zi);{var Ji=Ui=>{ju(Ui,{get buttonComponent(){return n(mt).buttonComponent},get buttonComponentProps(){return n(mt).buttonComponentProps},get tooltipText(){return n(mt).tooltipText},get disabledTooltipContent(){return n(mt).disabledTooltipContent},get disabled(){return n(mt).disabled},get className(){return n(mt).className},get tooltipVisible(){return e.showControls},get ref(){return Ge[n(mt).id]},set ref(Ks){Ge[n(mt).id]=Ks}})},mi=Ui=>{let Ks=f(()=>!!n(mt).disabled);Em(Ui,{get id(){return n(mt).id},get testId(){return n(mt).testId},get icon(){return n(mt).icon},get ariaLabel(){return n(mt).ariaLabel},get tooltipText(){return n(mt).tooltipText},get disabledTooltipContent(){return n(mt).disabledTooltipContent},get disabled(){return n(Ks)},get onClick(){return n(mt).onClick},get disableMouseupTooltipShow(){return n(mt).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return Ge[n(mt).id]},set ref(Gl){Ge[n(mt).id]=Gl}})};V(ki,Ui=>{sb(n(mt))?Ui(Ji):Ui(mi,!1)})}b(ft,Zi)}),S(va),S(zr),et(zr,ft=>dt(ft),()=>dt()),S(Bn),et(Bn,ft=>Et(ft),()=>Et());var Ql=k(Bn,2);{var tl=ft=>{Xd(ft,{get ref(){return Ge.interactiveTimeIndicator},set ref(mt){Ge.interactiveTimeIndicator=mt}})};V(Ql,ft=>{es&&ft(tl)})}O((ft,mt)=>{Ur=oe(Bn,1,"wrapper-bottom s-1e",null,Ur,ft),qe(Bn,`transform: ${e.showControls?"translateY(0)":"translateY(100%)"}`),qe(zr,mt),zr.inert=pe()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||Pe()}),()=>`transform: translateY(${n(xs)()}px);`]),Sn(ss,"clientWidth",ft=>N(ir,ft)),b(t,Xi),H(),o()}import{ChromecastState as mb,PlaybackState as vb}from"@vkontakte/videoplayer-core/es2018";import{noop as fb}from"@vkontakte/videoplayer-shared/es2018";var hw=L('<div class="icon icon-error-stub s-1z"><div class="inner s-1z"></div></div>'),_w=L('<img class="icon s-1z" aria-hidden="true"/>'),bw={hash:"s-1z",code:".icon.s-1z{height:24px!important;width:24px!important}.inner.s-1z{background-color:var(--white);height:16px;width:16px}"};function Um(t,e){Q(t,bw);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,fb),r=f(()=>o()===fb),a=f(()=>n(r)||i()),l=K(!1),d=()=>{N(l,!0)},s=f(()=>n(r)?"btn-full-opacity":"");Ft(t,{get className(){return n(s)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(a)},get testId(){return e.testId},children:(u,m)=>{var p=Re(),v=le(p);{var _=$=>{var x=hw();b($,x)},y=$=>{var x=_w();O(()=>Ne(x,"src",e.iconUrl)),pt("error",x,d),Pa(x),b($,x)};V(v,$=>{n(l)?$(_):$(y,!1)})}b(u,p)},$$slots:{default:!0}})}var $w=Ee('<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 zm(t){je(t,{testId:"muted-icon",children:(e,i)=>{var o=$w();b(e,o)},$$slots:{default:!0}})}import{noop as yw}from"@vkontakte/videoplayer-shared/es2018";function Zu(t,e){B(e,!0);let i=h(e,"muted",3,!1),o=h(e,"click",3,yw),r=h(e,"ref",15,void 0),l=$e().ui.t,d=f(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),s=f(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");Ft(t,{get testId(){return n(s)},get click(){return o()},get ariaLabel(){return n(d)},role:"button",get ref(){return r()},set ref(u){r(u)},children:(u,m)=>{var p=Re(),v=le(p);{var _=$=>{zm($,{})},y=$=>{ca($,{get size(){return"24"}})};V(v,$=>{i()?$(_):$(y,!1)})}b(u,p)},$$slots:{default:!0}}),H()}var xw=Ee('<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>'),ww=Ee('<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>'),Sw=Ee('<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 Wm(t,e){let i=h(e,"isActive",3,!1),o=f(()=>i()?"pip-icon--active":"pip-icon");je(t,{get testId(){return n(o)},children:(r,a)=>{var l=Sw(),d=k(le(l));{var s=m=>{var p=xw();b(m,p)},u=m=>{var p=ww();b(m,p)};V(d,m=>{i()?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}})}import{noop as Cw}from"@vkontakte/videoplayer-shared/es2018";function Km(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isPictureInPictureActive",3,!1),r=h(e,"click",3,Cw),a=Y("menu_pip");Ft(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return r()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{Wm(l,{get isActive(){return o()}})},$$slots:{default:!0}}),H()}import{debounceFn as gb}from"@vkontakte/videoplayer-shared/es2018";var Tw=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},Iw=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},Ew=L("<div><!></div>"),Pw=L("<div><!></div>"),kw=L("<div><!></div>"),Aw=L("<!> <!> <!>",1),Lw=L("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),Mw=L('<div class="wrapper-middle s-1d"><!></div>'),Vw=L("<div><!></div> <!> <div><!></div>",1),Rw=L('<div aria-hidden="true">·</div> <!>',1),Nw=L('<!> <!> <div><div><div class="controls mobile s-1d" data-testid="bottom-controls"><div class="controls-group contain s-1d"><!> <!> <!> <!></div> <div class="controls-group s-1d"><!> <!> <!></div></div> <!></div></div> <!>',1),Dw={hash:"s-1d",code:".wrapper-bottom.s-1d{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-1d>:where(.s-1d){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-1d{height:9px;padding:0 4px 4px}.wrapper-middle.s-1d{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-1d,.wrapper-top-right.s-1d{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-1d{right:8px;top:4px}.wrapper-top-left.s-1d{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-1d,.wrapper-middle-left-second.s-1d,.wrapper-middle-right.s-1d{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-1d{left:12px}.wrapper-middle-left-second.s-1d{left:64px}.wrapper-middle-right.s-1d{right:12px}.controls.s-1d{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-1d,.controls-group.s-1d{display:flex}.controls-group.contain.s-1d{min-width:0}.controls-group.s-1d >:not(:first-child){margin-left:8px}.hidden.s-1d{opacity:0;visibility:hidden}.controls-hidden.s-1d{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1d{transition:none}.overlay-mobile.s-1d{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-1d,.wrapper-top-right.fullscreen.s-1d{top:16px}.controls-wrapper.fullscreen.s-1d{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-1d{left:44px;top:12px}.wrapper-top-right.fullscreen.s-1d{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-1d{left:44px}.wrapper-middle-left-second.fullscreen.s-1d{left:96px}.wrapper-middle-right.fullscreen.s-1d{right:44px}.controls-wrapper.fullscreen.s-1d{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function qm(t,e){var rn,Pi;B(e,!0),Q(t,Dw);let[i,o]=Be(),r=()=>w(Li,"$seekToInteractiveDisabledTooltip$",i),a=()=>w(Nt,"$disabledControls$",i),l=()=>w(Dt,"$playbackState$",i),d=()=>w(Zo,"$adPlaybackState",i),s=()=>w(q,"$isEnded$",i),u=()=>w(ht,"$playerSize",i),m=()=>w(xt,"$scrubbingInProgress",i),p=()=>w(Gi,"$chromecastState$",i),v=()=>w(Oe,"$isPictureInPictureActive",i),_=()=>w(Ke,"$pictureInPictureType$",i),y=()=>w(ve,"$mobileNotReportControlHidden$",i),$=()=>w(di,"$chromecastHidden",i),x=()=>w(dt,"$playerPhase",i),I=()=>w(po,"$pipHidden",i),T=()=>w(ot,"$currentGridType$",i),R=()=>w(li,"$vkLogoHidden",i),A=()=>w(si,"$volumeHidden",i),P=()=>w(Le,"$isLive$",i),E=()=>w(at,"$settingsMenuVisible",i),W=()=>w(Se,"$isRewindableLive$",i),F=()=>w(Fe,"$isActiveLive$",i),U=()=>w(Rt,"$isAudioAvailable$",i),X=()=>w(ye,"$muted$",i),se=()=>w(Me,"$volume$",i),j=()=>w(gi,"$isInteractiveTime$",i),ne=()=>w(Jn,"$settingButtonRef$",i),Z=()=>w(fi,"$startedByKeyboard$",i),Te=()=>w(Ao,"$isFullscreen",i),fe=()=>w(Ot,"$additionalButtons$",i),te=()=>w(Ii,"$autoplayNextToggleHidden",i),_e=()=>w(ct,"$crashed$",i),Ce=()=>w(fo,"$settingsHidden",i),me=()=>w(En,"$graphIsOpened$",i),ce=()=>w(Ci,"$adPosition",i),Qe=()=>w(nt,"$adDuration",i),G=()=>w(Yt,"$position$",i),D=()=>w(wt,"$duration$",i),Ye=h(e,"playerControlsWrapperRef",15,void 0),re=h(e,"playerControlsRef",15,void 0),pe=h(e,"isAds",3,!1),ue=h(e,"logoTargetUrl",3,""),Ae=h(e,"isOneVideoPlaylist",3,!1),Ue=h(e,"customFullscreenSupported",3,!0),ee=$e(),de=vo(),ke=Mt(),xe=ee.actions.internal.toggleMuted,Xe=ee.actions.internal.togglePlay,Pe=ee.actions.internal.pause,we=ee.actions.internal.prevVideoClick,De=ee.actions.internal.nextVideoClick,Ct=ee.actions.internal.checkFullscreenSupport,Tt=(rn=ee.callbacks)==null?void 0:rn.onAudioDoesNotExistHint,Et=(Pi=ee.callbacks)==null?void 0:Pi.onAudioDisabledHint,dt=ee.playerPhase,wt=ee.state.duration$,Yt=ee.state.positionWithScrubbing$,Dt=ee.state.playbackState$,Rt=ee.state.isAudioAvailable$,Ut=ee.state.isAudioDisabled,q=ee.state.isEnded$,Le=ee.state.isLive$,Me=ee.state.volume$,ye=ee.state.muted$,Fe=ee.state.isActiveLive$,Se=ee.state.isRewindableLive$,xt=ee.ui.scrubbingInProgress,ve=ee.ui.mobileNotReportControlHidden$,{isActive$:Oe,type$:Ke}=de.pictureInPicture$,at=ee.ui.settingsMenu.visible$,qt=ee.ui.settingsMenu.openedByBtnKeyboard$,Pt=ee.ui.controls,{volume:si,vkLogo:li,autoplayNextToggle:Ii,pip:po,settings:fo,chromecast:di}=ee.ui.hiddenControls,rt=ee.actions.internal.getVideoEpisodes(),ci=ee.webApi.pictureInPictureApi,Gi=ee.state.chromecastState$,ct=ee.state.crashed$,Nt=Pt.disabledControls$,fi=ee.ui.startedByKeyboard$,ot=ee.ui.currentGridType$,nt=ee.ads.duration,Ci=ee.ads.position,Zo=ee.ads.playbackState,Ao=ee.ui.isFullscreen,ht=ee.ui.playerSize,Ot=ee.ui.additionalButtonsDeprecated$,z=ee.actions.internal.getVideoElement,kt=ee.actions.internal.replayInteractive,lt=ee.state.isInteractive,gi=ee.state.isInteractiveTime$,jt=ee.state.showInteractiveGraph,$t=ee.state.showSeekToInteractive,st=ee.state.showPlayPrevChapter,Di=ee.state.showInteractiveTimeIndicator,Li=de.seekToInteractiveDisabledTooltip$,En=de.graphIsOpened$,Pn=ee.ui.controlBlocks,xi=f(()=>Y(ee.state.playPrevChapterDisabledTooltip)),Yi=f(()=>Y(r())),kn=f(()=>a().has("EPISODE_BUTTON")),go=f(()=>a().has("GRAPH_BUTTON")),_i=f(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),Lo=f(()=>a().has("PLAY_BUTTON")),Mo=f(()=>a().has("REPLAY_BUTTON")),mo=f(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),pn=f(()=>l()===vb.PLAYING),es=f(()=>d()==="paused"),Mr=f(()=>s()&&!pe()&&!lt),ts=f(()=>!s()||pe()),Vr=f(()=>e.showNextPrevButtons&&!pe()&&e.prevButtonActive),Yn=f(()=>e.showNextPrevButtons&&!pe()&&e.nextButtonActive),is=f(()=>u().width>300),Rr=f(()=>u().width>400),Jo=f(m),fn=f(()=>p()!==mb.NOT_AVAILABLE&&!(v()&&_()===1)&&!y()&&!lt&&!$()),vr=f(()=>x()==="LiveWaitingStart"),gr=f(()=>!!ci&&p()!==mb.CONNECTED&&!y()&&(_()===1&&n(vr)||!n(vr))&&!n(Jo)&&!lt&&!I()),mn=K(!1);Lt(()=>{let ze=ci==null?void 0:ci.info.isActive$.subscribe(At=>N(mn,At,!0));return()=>ze==null?void 0:ze.unsubscribe()});let jn=f(()=>!n(Jo)&&io(T(),"s")),hr=f(()=>!e.logoHidden&&u().width>350&&!R()),Xn=f(()=>ke.features.fullscreen&&Ct()&&!(v()&&_()===1)&&(lt?Ue():!0)&&!n(Jo)&&!n(mn)),Zn=f(()=>!A()&&!n(Jo)),os=f(()=>(!P()||pe())&&u().width>260&&!n(Jo)&&!(ke.features.interactiveHideTime&<)),ho=f(()=>E()||e.showControls),_r=f(()=>!pe()&&!P()&&!!(rt!=null&&rt.length)&&n(is)&&!n(kn)&&!n(Jo)),Oi=f(()=>!W()||!!F()),br=f(()=>jt&&io(T(),"m")),An=f(()=>!U()||X()||se()===0),vt=ri({}),Xt=ri({}),$r=gb(Fl,260),Nr=gb(Xu,260);He(()=>{u(),j(),$r(z(),Pt,vt,e.showControls),Nr(z(),Pn,Xt,e.showControls)});let Dr=()=>ee.actions.internal.toggleChromecast();async function Ln(){ci!=null&&ci.isActive()?await(ci==null?void 0:ci.exit()):await(ci==null?void 0:ci.request())}function Mn(){la({isAudioDisabled:Ut,audioDisabledHintCallback:Et,isAudioAvailable:U(),audioIsNotExistHintCallback:Tt,isAds:pe()})&&xe()}let Vo=K(""),Vn=(ze,At)=>{if(!ze){N(Vo,Y("tooltip_live"),!0);return}At&&At===vb.PAUSED&&N(Vo,Y("tooltip_play"),!0)};He(()=>{Vn(n(Oi),l())});let Jn=ae();He(()=>{ne()&&Ll(ne(),E(),qt)}),He(()=>{Yu(fi,Z(),vt.playButton)});var en=Nw(),vn=le(en);{var er=ze=>{var At=Lw(),ui=le(At);let Oo;var yo=k(ui,2);let xo;et(yo,ut=>Xt.topLeft=ut,()=>Xt==null?void 0:Xt.topLeft);var Hi=k(yo,2);let Bo;var Rn=C(Hi);hi(Rn,1,fe,({iconUrl:ut,ariaLabel:ni,testId:Co,onClick:$i,tooltip:ji})=>ut,(ut,ni)=>{let Co=()=>n(ni).iconUrl,$i=()=>n(ni).ariaLabel,ji=()=>n(ni).testId,ys=()=>n(ni).onClick,xs=()=>n(ni).tooltip,ws=f(()=>{var Fi;return(Fi=$i())!=null?Fi:xs()});Um(ut,{get iconUrl(){return Co()},get ariaLabel(){return n(ws)},get testId(){return ji()},get onClick(){return ys()}})});var Sr=k(Rn,2);{var wo=ut=>{ec(ut,{get ref(){return vt.autoplayNextToggle},set ref(ni){vt.autoplayNextToggle=ni}})};V(Sr,ut=>{e.showAutoplayNext&&!Ae()&&!te()&&ut(wo)})}var ro=k(Sr,2);{var _n=ut=>{Kd(ut,{isMobile:!0,click:Dr,get state(){return p()},get ref(){return vt.chromecast},set ref(ni){vt.chromecast=ni}})};V(ro,ut=>{n(fn)&&ut(_n)})}var Ho=k(ro,2);{var Nn=ut=>{Km(ut,{click:Ln,get isPictureInPictureActive(){return v()},get ref(){return vt.pip},set ref(ni){vt.pip=ni}})};V(Ho,ut=>{n(gr)&&ut(Nn)})}var Hr=k(Ho,2);{var Fr=ut=>{Nl(ut,{get ref$(){return Jn}})};V(Hr,ut=>{_e()&&!Ce()&&ut(Fr)})}var Dn=k(Hr,2);{var tt=ut=>{zd(ut,{get click(){return Pe},get targetUrl(){return ue()},get logoClickable(){return e.logoClickable},get ref(){return vt.vkLogo},set ref(ni){vt.vkLogo=ni}})};V(Dn,ut=>{n(hr)&&ut(tt)})}S(Hi),et(Hi,ut=>Xt.topRight=ut,()=>Xt==null?void 0:Xt.topRight);var Qt=k(Hi,2);let bi;var So=C(Qt);{var bn=ut=>{let ni=f(()=>we.bind(null,!0));Ua(ut,{get click(){return n(ni)},type:"prev",isMobile:!0,get ref(){return vt.prevButton},set ref(Co){vt.prevButton=Co}})};V(So,ut=>{n(Vr)&&ut(bn)})}var On=k(So,2);{var Fo=ut=>{zl(ut,{get disabled(){return n(Lo)},get click(){return Xe},isMobile:!0,get isPlaying(){return n(pn)},get ref(){return vt.playButton},set ref(ni){vt.playButton=ni}})};V(On,ut=>{n(ts)&&ut(Fo)})}var or=k(On,2);{var rs=ut=>{Ul(ut,{get disabled(){return n(Mo)},get click(){return Xe},isMobile:!0,get ref(){return vt.replayButton},set ref(ni){vt.replayButton=ni}})};V(or,ut=>{n(Mr)&&ut(rs)})}var Cr=k(or,2);{var $s=ut=>{let ni=f(()=>De.bind(null,!0));Ua(ut,{get click(){return n(ni)},type:"next",isMobile:!0,get ref(){return vt.nextButton},set ref(Co){vt.nextButton=Co}})};V(Cr,ut=>{n(Yn)&&ut($s)})}S(Qt),et(Qt,ut=>Xt.middle=ut,()=>Xt==null?void 0:Xt.middle);var zs=k(Qt,2);{var ma=ut=>{var ni=Aw(),Co=le(ni);{var $i=Fi=>{var Ti=Ew();let he;Ti.__click=[Tw,mo,e,xi];var yt=C(Ti);let Gt=f(()=>!e.showControls);Jd(yt,{get hidden(){return n(Gt)},get disabled(){return n(mo)},get click(){return e.playPrevChapter},get ref(){return vt.playPrevChapterButton},set ref(Zt){vt.playPrevChapterButton=Zt}}),S(Ti),O(Zt=>he=oe(Ti,1,"wrapper-middle-left s-1d",null,he,Zt),[()=>({fullscreen:Te(),hidden:!e.showControls})]),b(Fi,Ti)};V(Co,Fi=>{st&&Fi($i)})}var ji=k(Co,2);{var ys=Fi=>{var Ti=Pw();let he;var yt=C(Ti);let Gt=f(()=>!e.showControls&&!me());ic(yt,{get hidden(){return n(Gt)},get disabled(){return n(go)},get click(){return En.toggle},get graphIsOpened(){return me()},get ref(){return vt.interactiveGraphButton},set ref(Zt){vt.interactiveGraphButton=Zt}}),S(Ti),O(Zt=>he=oe(Ti,1,hd(st?"wrapper-middle-left-second":"wrapper-middle-left"),"s-1d",he,Zt),[()=>({fullscreen:Te(),hidden:!e.showControls&&!me()})]),b(Fi,Ti)};V(ji,Fi=>{n(br)&&Fi(ys)})}var xs=k(ji,2);{var ws=Fi=>{var Ti=kw();let he;Ti.__click=[Iw,_i,e,Yi];var yt=C(Ti);let Gt=f(()=>!e.showControls);tc(yt,{get hidden(){return n(Gt)},get disabled(){return n(_i)},get click(){return e.seekToInteractive},get ref(){return vt.seekToInteractiveButton},set ref(Zt){vt.seekToInteractiveButton=Zt}}),S(Ti),O(Zt=>he=oe(Ti,1,"wrapper-middle-right s-1d",null,he,Zt),[()=>({fullscreen:Te(),hidden:!e.showControls})]),b(Fi,Ti)};V(xs,Fi=>{$t&&Fi(ws)})}b(ut,ni)};V(zs,ut=>{lt&&!m()&&ut(ma)})}O((ut,ni,Co,$i)=>{Oo=oe(ui,1,"overlay-mobile s-1d",null,Oo,ut),xo=oe(yo,1,"wrapper-top-left s-1d",null,xo,ni),Bo=oe(Hi,1,"wrapper-top-right s-1d",null,Bo,Co),bi=oe(Qt,1,"wrapper-middle s-1d",null,bi,$i)},[()=>({hidden:!n(ho)}),()=>({hidden:!e.showControls,fullscreen:Te()}),()=>({hidden:!e.showControls&&!y(),fullscreen:Te()}),()=>({hidden:!e.showControls||m()||e.endScreenShown&&e.showNextPrevButtons})]),b(ze,At)};V(vn,ze=>{pe()||ze(er)})}var gn=k(vn,2);{var tn=ze=>{var At=Vw(),ui=le(At);let Oo;var yo=C(ui);Zu(yo,{get muted(){return X()},click:Mn,get ref(){return vt.volume},set ref(wo){vt.volume=wo}}),S(ui);var xo=k(ui,2);{var Hi=wo=>{var ro=Mw(),_n=C(ro);let Ho=f(()=>!n(es));zl(_n,{get disabled(){return n(Lo)},get click(){return Xe},isMobile:!0,get isPlaying(){return n(Ho)},get ref(){return vt.playButton},set ref(Nn){vt.playButton=Nn}}),S(ro),b(wo,ro)};V(xo,wo=>{n(es)&&wo(Hi)})}var Bo=k(xo,2);let Rn;var Sr=C(Bo);nc(Sr,{get position(){return ce()},get duration(){return Qe()}}),S(Bo),O((wo,ro)=>{Oo=oe(ui,1,"wrapper-top-right s-1d",null,Oo,wo),Rn=oe(Bo,1,"wrapper-bottom ads-timeline-mobile s-1d",null,Rn,ro)},[()=>({fullscreen:Te()}),()=>({fullscreen:Te()})]),b(ze,At)};V(gn,ze=>{pe()&&d()!=="inactive"&&ze(tn)})}var Mi=k(gn,2);let no;var on=C(Mi);let tr;var yr=C(on),hn=C(yr),ir=C(hn);{var Ge=ze=>{ko(ze,{get disabled(){return n(Mo)},get ref(){return vt.replayButton},set ref(At){vt.replayButton=At},children:(At,ui)=>{Ul(At,{get disabled(){return n(Mo)},get click(){return kt}})},$$slots:{default:!0}})};V(ir,ze=>{lt&&ze(Ge)})}var ai=k(ir,2);{var Ro=ze=>{ko(ze,{get ref(){return vt.liveButton},set ref(At){vt.liveButton=At},children:(At,ui)=>{oc(At,{get isLiveActive(){return n(Oi)},isMobile:!0,get ariaLabel(){return n(Vo)}})},$$slots:{default:!0}})};V(ai,ze=>{!pe()&&P()&&ze(Ro)})}var No=k(ai,2);{var nn=ze=>{let At=f(()=>pe()?ce():G()),ui=f(()=>pe()?Qe():D()),Oo=f(()=>!e.showControls);Hd(ze,{get showDuration(){return n(Rr)},get position(){return n(At)},get duration(){return n(ui)},isMobile:!0,get isHidden(){return n(Oo)},get ref(){return vt.time},set ref(yo){vt.time=yo}})};V(No,ze=>{n(os)&&ze(nn)})}var _o=k(No,2);let bo=f(()=>!n(_r));ko(_o,{className:"w-max",get disabled(){return n(bo)},get ref(){return vt.episodes},set ref(ze){vt.episodes=ze},children:(ze,At)=>{var ui=Re(),Oo=le(ui);{var yo=xo=>{var Hi=Rw(),Bo=k(le(Hi),2);qd(Bo,{get position(){return G()},get duration(){return D()},get timeCodes(){return rt}}),b(xo,Hi)};V(Oo,xo=>{n(_r)&&xo(yo)})}b(ze,ui)},$$slots:{default:!0}}),S(hn),et(hn,ze=>Xt.bottomLeft=ze,()=>Xt==null?void 0:Xt.bottomLeft);var Ei=k(hn,2),$o=C(Ei);{var Or=ze=>{ko(ze,{get ref(){return vt.volume},set ref(At){vt.volume=At},children:(At,ui)=>{Zu(At,{get muted(){return n(An)},click:Mn})},$$slots:{default:!0}})};V($o,ze=>{n(Zn)&&ze(Or)})}var xr=k($o,2);{var _s=ze=>{ko(ze,{get ref(){return vt.settings},set ref(At){vt.settings=At},children:(At,ui)=>{Nl(At,{get ref$(){return Jn}})},$$slots:{default:!0}})};V(xr,ze=>{n(jn)&&ze(_s)})}var Bi=k(xr,2);{var bs=ze=>{ko(ze,{get ref(){return vt.fullscreen},set ref(At){vt.fullscreen=At},children:(At,ui)=>{Ud(At,{get click(){return e.toggleFullscreen},get isFullscreen(){return Te()}})},$$slots:{default:!0}})};V(Bi,ze=>{n(Xn)&&ze(bs)})}S(Ei),et(Ei,ze=>Xt.bottomRight=ze,()=>Xt==null?void 0:Xt.bottomRight),S(yr),et(yr,ze=>re(ze),()=>re());var ns=k(yr,2);let wr=f(()=>!e.showControls);Wa(ns,{get isHidden(){return n(wr)},get isAds(){return pe()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return W()},get ref(){return vt.timeline},set ref(ze){vt.timeline=ze}}),S(on),et(on,ze=>Xt.bottom=ze,()=>Xt==null?void 0:Xt.bottom),S(Mi),et(Mi,ze=>Ye(ze),()=>Ye());var Do=k(Mi,2);{var Br=ze=>{Xd(ze,{get ref(){return vt.interactiveTimeIndicator},set ref(At){vt.interactiveTimeIndicator=At}})};V(Do,ze=>{Di&&ze(Br)})}O((ze,At)=>{no=oe(Mi,1,"wrapper-bottom mobile s-1d",null,no,ze),tr=oe(on,1,"controls-wrapper s-1d",null,tr,At)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:Te()})]),b(t,en),H(),o()}Ze(["click"]);function rc(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(I,"$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,""),m=h(e,"showAutoplayNext",3,!1),p=h(e,"isOneVideoPlaylist",3,!1),v=h(e,"customFullscreenSupported",3,!0),_=h(e,"endScreenShown",3,!1),y=h(e,"onDisabledPlayPrevChapterClick",3,hb),$=h(e,"onDisabledSeekToInteractiveClick",3,hb),I=$e().ui.isMobile,T=K(!1);Lt(()=>{let E=setTimeout(()=>N(T,!0),0);return()=>clearTimeout(E)});var R=Re(),A=le(R);{var P=E=>{var W=Re(),F=le(W);{var U=se=>{qm(se,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get showAutoplayNext(){return m()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return p()},get customFullscreenSupported(){return v()},get endScreenShown(){return _()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return y()},get onDisabledSeekToInteractiveClick(){return $()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(j){l(j)},get playerControlsRef(){return d()},set playerControlsRef(j){d(j)}})},X=se=>{Fm(se,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get isOneVideoPlaylist(){return p()},get showAutoplayNext(){return m()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return v()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(j){l(j)},get playerControlsRef(){return d()},set playerControlsRef(j){d(j)}})};V(F,se=>{r()?se(U):se(X,!1)})}b(E,W)};V(A,E=>{n(T)&&E(P)})}b(t,R),H(),o()}var Ow=Ee('<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 sc(t,e){B(e,!0);let i=f(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=f(()=>`${dn(e.size)}${n(i)}`);je(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(o)},get testId(){return e.testId},get shadow(){return e.shadow},children:(r,a)=>{var l=Ow();b(r,l)},$$slots:{default:!0}}),H()}var Bw=Ee('<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 Qm(t,e){B(e,!0);let i=h(e,"reversed",3,!1),o=f(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),r=f(()=>`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=Bw();b(a,d)},$$slots:{default:!0}}),H()}var Hw=L('<span class="hot-key-helpers-text s-w"> </span>'),Fw=L('<div data-testid="hotkey-helper-icon" class="s-w"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),Uw=L("<div><!></div>"),zw={hash:"s-w",code:'.hot-key-helpers-container.s-w{align-items:center;animation:s-w-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-w{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-w{left:calc(75% - 100px)}.hot-key-helpers-text.s-w{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-w{animation:s-w-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-w-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-w-fadeOut{0%{opacity:1}to{opacity:0}}'};function Gm(t,e){B(e,!0),Q(t,zw);let[i,o]=Be(),r=()=>w(e.data,"$data",i),a=$e(),{features:l}=Mt(),d=a.ui.t,s=f(()=>!r()),u=f(()=>{var I;return((I=r())==null?void 0:I.type)==="BACKWARD_SEEK"}),m=f(()=>{var I;return((I=r())==null?void 0:I.type)==="FORWARD_SEEK"}),p=f(()=>{var I;return(I=r())==null?void 0:I.type}),v=f(()=>{var I,T;return(I=r())!=null&&I.t?d(r().t.key,{value:r().t.value||""}):(T=r())==null?void 0:T.text});var _=Uw();let y;var $=C(_);{var x=I=>{var T=Fw(),R=le(T),A=C(R);{var P=re=>{let pe=f(()=>n(p)==="BACKWARD_SEEK");Qm(re,{get reversed(){return n(pe)},shadow:!0})};V(A,re=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&re(P)})}var E=k(A,2);{var W=re=>{Fs(re,{get size(){return"48"},shadow:!0})};V(E,re=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&re(W)})}var F=k(E,2);{var U=re=>{Tn(re,{get size(){return"48"},shadow:!0})};V(F,re=>{n(p)==="PLAY"&&!l.playbackStatusShow&&re(U)})}var X=k(F,2);{var se=re=>{Zd(re,{get size(){return"48"},shadow:!0})};V(X,re=>{n(p)==="REPLAY"&&!l.playbackStatusShow&&re(se)})}var j=k(X,2);{var ne=re=>{da(re,{get size(){return"48"},type:"off",shadow:!0})};V(j,re=>{n(p)==="SUBTITLES_OFF"&&re(ne)})}var Z=k(j,2);{var Te=re=>{da(re,{get size(){return"48"},shadow:!0})};V(Z,re=>{n(p)==="SUBTITLES_ON"&&re(Te)})}var fe=k(Z,2);{var te=re=>{let pe=f(()=>n(p)==="RATE_DOWN");sc(re,{get size(){return"48"},get reversed(){return n(pe)},testId:"rate-change-icon",shadow:!0})};V(fe,re=>{["RATE_DOWN","RATE_UP"].includes(n(p))&&re(te)})}var _e=k(fe,2);{var Ce=re=>{let pe=f(()=>n(p)==="EPISODE_PREV");ua(re,{get size(){return"48"},get reversed(){return n(pe)},shadow:!0})};V(_e,re=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(p))&&re(Ce)})}var me=k(_e,2);{var ce=re=>{ca(re,{get size(){return"48"},volume:0,shadow:!0})};V(me,re=>{n(p)==="MUTE"&&re(ce)})}var Qe=k(me,2);{var G=re=>{ca(re,{get size(){return"48"},volume:1,shadow:!0})};V(Qe,re=>{n(p)==="VOLUME"&&re(G)})}S(R);var D=k(R,2);{var Ye=re=>{var pe=Hw(),ue=C(pe,!0);S(pe),O(()=>ge(ue,n(v))),b(re,pe)};V(D,re=>{n(v)&&re(Ye)})}O(()=>Ne(R,"data-type",n(p))),b(I,T)};V($,I=>{!n(s)&&n(p)&&I(x)})}S(_),O(I=>y=oe(_,1,"hot-key-helpers-container s-w",null,y,I),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(m)})]),b(t,_),H(),o()}var Ww=(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}},Kw=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},qw=L('<div tabindex="0" role="button"><div class="button-block s-l" aria-hidden="true"><div class="button-row s-l"><div class="button button-up s-l"><!></div> <div class="button button-right s-l"><!></div></div> <div class="button-row s-l"><div class="button button-left s-l"><!></div> <div class="button button-down s-l"><!></div></div></div></div>'),Qw={hash:"s-l",code:".immersive-controls.s-l{background-color:rgba(0,0,0,.56);border-radius:8px;display:flex;flex-direction:row;height:56px;left:10px;position:absolute;top:10px;transition-duration:var(--controls-transition-duration);transition-property:top,left;transition-timing-function:var(--controls-transition-fn);width:56px}.immersive-controls.m-shifted.s-l{left:20px;top:50px}.button-block.s-l{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-l{display:flex;flex-direction:row;position:relative}.button.s-l{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-l svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-l svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-l svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-l svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-l svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-l:hover svg{opacity:1}"};function ac(t,e){B(e,!0),Q(t,Qw);let i=h(e,"isShifted",3,!1),o=$e(),r=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},l=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},s=()=>{o.actions.internal.startCameraManualRotation(-1,0)},u=()=>(o.actions.internal.stopCameraManualRotation(),null),m=Y("aria_label_spherical_control");var p=qw();let v;p.__keydown=[Ww,r,a,l,s,d],p.__keyup=[Kw,r,u];var _=C(p),y=C(_),$=C(y);$.__mousedown=a,$.__mouseup=u;var x=C($);Ar(x,{direction:"up",useBtnColor:!0}),S($);var I=k($,2);I.__mousedown=d,I.__mouseup=u;var T=C(I);Ar(T,{direction:"up",useBtnColor:!0}),S(I),S(y);var R=k(y,2),A=C(R);A.__mousedown=s,A.__mouseup=u;var P=C(A);Ar(P,{direction:"up",useBtnColor:!0}),S(A);var E=k(A,2);E.__mousedown=l,E.__mouseup=u;var W=C(E);Ar(W,{direction:"up",useBtnColor:!0}),S(E),S(R),S(_),S(p),O(F=>{v=oe(p,1,"immersive-controls s-l",null,v,F),Ne(p,"aria-label",m)},[()=>({"m-shifted":i()})]),pt("mouseleave",$,u),pt("mouseleave",I,u),pt("mouseleave",A,u),pt("mouseleave",E,u),b(t,p),H()}Ze(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as bb,Subscription as Gw,filterChanged as Yw,filter as jw}from"@vkontakte/videoplayer-shared/es2018";var _b=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var Ju=class{constructor(){this.flickeringTimeout=_b(1e3);this.subscriptions=new Gw;this.isAuto=!1;this.isLive=!1;this.captions$=new bb([]);this.captionsPrepared$=new bb([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(jw(()=>this.isEnabled()),Yw()).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 Xw=L('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),Zw=L('<span class="caption-line s-a"><span class="caption-segment s-a"></span></span>'),Jw=L('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),eS=L('<div><span class="caption s-a"><!></span></div>'),tS=L("<div><!></div>"),iS={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,iS);let[i,o]=Be(),r=()=>w(v,"$currentSubtitle$",i),a=()=>w(y,"$isLive$",i),l=()=>w($,"$isFullscreen",i),d=()=>w(x,"$previewTrackActive",i),s=()=>w(_,"$isAutoSubtitleCaptionVisible$",i),u=h(e,"isMobile",3,!1),m=$e(),p=Mt(),v=m.state.currentSubtitle$,_=m.state.isAutoSubtitleCaptionVisible$,y=m.state.isLive$,$=m.ui.isFullscreen,x=m.ui.previewTrackActive,I=f(()=>!!r().isAuto),T=f(()=>!!a()),R=f(()=>e.playerSize.width*.02),A=f(()=>u()&&!l()||n(R)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(R)),P=K(null);He(()=>{var j,ne,Z;(j=n(P))==null||j.setIsAuto(n(I)),(ne=n(P))==null||ne.setIsLive(n(T)),(Z=n(P))==null||Z.setCaptions(e.captions)});let E=K(ri([[]]));Lt(()=>{N(P,new Ju().subscribe(),!0);let j=n(P).captionsPrepared$.subscribe(ne=>{N(E,ne,!0)});return()=>{var ne;(ne=n(P))==null||ne.destroy(),j.unsubscribe()}}),Lt(()=>{if(n(I)){let j=window.setTimeout(()=>{_.set(!1)},p.autoSubtitlesTimeout);return()=>{window.clearTimeout(j)}}else _.set(!1)});let W=f(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var F=tS();let U;var X=C(F);{var se=j=>{var ne=eS();let Z;var Te=C(ne),fe=C(Te);{var te=Ce=>{var me=Xw(),ce=C(me),Qe=C(ce,!0);S(ce),S(me),O(G=>{var D;qe(ce,`font-size: ${(D=n(A))!=null?D:""}px`),ge(Qe,G)},[()=>Y("subtitles_auto_caption")]),b(Ce,me)},_e=(Ce,me)=>{{var ce=G=>{var D=Re(),Ye=le(D);hi(Ye,17,()=>n(E),vd,(re,pe)=>{var ue=Zw(),Ae=C(ue);hi(Ae,21,()=>n(pe),({value:Ue,timeAppeared:ee})=>ee,(Ue,ee)=>{let de=()=>n(ee).value,ke=()=>n(ee).timeAppeared;var xe=Re(),Xe=le(xe);{var Pe=we=>{var De=ps();O(()=>ge(De,de())),b(we,De)};V(Xe,we=>{(!ke()||ke()<=e.position)&&we(Pe)})}b(Ue,xe)}),S(Ae),S(ue),O(()=>{var Ue;return qe(Ae,`font-size: ${(Ue=n(A))!=null?Ue:""}px`)}),b(re,ue)}),b(G,D)},Qe=G=>{var D=Re(),Ye=le(D);hi(Ye,17,()=>e.captions,({value:re})=>re,(re,pe)=>{let ue=()=>n(pe).value;var Ae=Jw(),Ue=C(Ae),ee=C(Ue,!0);S(Ue),S(Ae),O(()=>{var de;qe(Ue,`font-size: ${(de=n(A))!=null?de:""}px`),ge(ee,ue())}),b(re,Ae)}),b(G,D)};V(Ce,G=>{var D;n(I)&&((D=n(E))!=null&&D.length)?G(ce):G(Qe,!1)},me)}};V(fe,Ce=>{n(I)&&s()?Ce(te):Ce(_e,!1)})}S(Te),S(ne),O(Ce=>{var me;Z=oe(ne,1,"subtitles-caption s-a",null,Z,Ce),qe(ne,`--subtitles-caption-margin: ${(me=n(W))!=null?me:""}%`)},[()=>({mobile:u()})]),b(j,ne)};V(X,j=>{var ne;(e.captions.length||(ne=n(E))!=null&&ne.length)&&j(se)})}S(F),O(j=>U=oe(F,1,"subtitles-container s-a",null,U,j),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(I)&&!n(T)&&!s()})]),b(t,F),H(),o()}import{ChromecastState as oS}from"@vkontakte/videoplayer-core/es2018";var nS=L('<div class="text s-i"> </div>'),rS=L('<div><div class="icon_wrapper s-i"><!></div> <!></div>'),sS={hash:"s-i",code:".wrapper.s-i{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-i{background-size:cover}.icon_wrapper.s-i{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-i{margin-top:20px}"};function lc(t,e){B(e,!0),Q(t,sS);let i=h(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Mt();var r=rS();let a;r.__contextmenu=function(...m){var p;(p=e.onContextMenu)==null||p.apply(this,m)},r.__click=function(...m){var p;(p=e.onClick)==null||p.apply(this,m)},r.__dblclick=function(...m){var p;(p=e.onDblClick)==null||p.apply(this,m)};var l=C(r),d=C(l);Wd(d,{get size(){return"48"},get iconState(){return oS.CONNECTED}}),S(l);var s=k(l,2);{var u=m=>{var p=nS(),v=C(p);S(p),O(()=>{var _;return ge(v,`Видео воспроизводится на ${(_=i())!=null?_:""}`)}),b(m,p)};V(s,m=>{i()&&m(u)})}S(r),O(m=>{a=oe(r,1,"wrapper s-i",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),H()}Ze(["contextmenu","click","dblclick"]);var aS=Ee('<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 Ym(t){je(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=aS();b(e,o)},$$slots:{default:!0}})}var lS=L('<div class="container s-4"><!></div>'),dS={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 Qa(t){Q(t,dS);var e=lS(),i=C(e);Ym(i,{}),S(e),b(t,e)}var cS=L('<div class="playButton s-d" tabindex="0" role="button"><div class="playButtonBackground s-d"></div> <!></div>'),uS=L('<div data-testid="unstarted-thumb"><!></div>'),pS={hash:"s-d",code:".container.s-d{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-d{opacity:0;visibility:hidden}.container.bgCover.s-d{background-size:cover}.playButton.s-d{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-d,.playButtonBackground.s-d{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-d{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-d:hover .playButtonBackground:where(.s-d){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-d svg{position:relative}"};function Ga(t,e){B(e,!0),Q(t,pS);let i=h(e,"iconVisible",3,!0),o=$e(),r=Mt(),a=o.ui.startedByKeyboard$,l=Y("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=uS();let m;u.__click=s,u.__contextmenu=function(..._){var y;(y=e.onContextMenu)==null||y.apply(this,_)};var p=C(u);{var v=_=>{var y=cS();y.__keydown=d;var $=k(C(y),2);Tn($,{get size(){return"48"}}),S(y),O(()=>Ne(y,"aria-label",l)),b(_,y)};V(p,_=>{i()&&_(v)})}return S(u),O(_=>{m=oe(u,1,"container s-d",null,m,_),qe(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:r.features.previewNoEmptySpace})]),b(t,u),H({handlePressKey:d,handleClick:s})}Ze(["click","contextmenu","keydown"]);var fS=L('<span class="text s-v"> </span>'),mS=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},vS=L('<a target="_blank" class="link s-v"><!></a>'),gS=(t,e)=>e.onTitleClicked(),hS=L("<button><!></button>"),_S=L('<div data-testid="video_title"><!></div>'),bS={hash:"s-v",code:".title.s-v{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-v,.title.s-v{color:var(--white)}.link.s-v{pointer-events:auto;text-decoration:none}.link.s-v:hover{text-decoration:underline}.text.s-v{pointer-events:auto}.size-sm.s-v{font-size:14px;font-weight:500;line-height:18px}.hidden.s-v{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function jm(t,e){B(e,!0),Q(t,bS);let i=_=>{var y=fS(),$=C(y,!0);S(y),et(y,x=>l(x),()=>l()),O(()=>ge($,o())),pt("mouseenter",y,function(...x){var I;(I=e.onMouseEnter)==null||I.apply(this,x)}),pt("mouseleave",y,function(...x){var I;(I=e.onMouseLeave)==null||I.apply(this,x)}),b(_,y)},o=h(e,"title",3,""),r=h(e,"isHidden",3,!1),a=h(e,"size",3,"md"),l=h(e,"ref",15),d=K(void 0);Lt(()=>{var y;requestAnimationFrame(()=>{var $;($=e.onVisibilityChanged)==null||$.call(e,!0)});function _($){var x;$.propertyName==="transform"&&((x=e.onVisibilityChanged)==null||x.call(e,!r()))}return(y=n(d))==null||y.addEventListener("transitionend",_),()=>{var $;return($=n(d))==null?void 0:$.removeEventListener("transitionend",_)}});var s=_S();let u;var m=C(s);{var p=_=>{var y=vS();y.__click=[mS,e];var $=C(y);i($),S(y),O(()=>Ne(y,"href",e.titleLinkHref)),b(_,y)},v=(_,y)=>{{var $=I=>{var T=hS();T.__click=[gS,e];var R=C(T);i(R),S(T),b(I,T)},x=I=>{i(I)};V(_,I=>{e.onTitleClicked?I($):I(x,!1)},y)}};V(m,_=>{e.titleLinkHref?_(p):_(v,!1)})}S(s),et(s,_=>N(d,_),()=>n(d)),O(_=>u=oe(s,1,`title size-${a()}`,"s-v",u,_),[()=>({hidden:r()})]),b(t,s),H()}Ze(["click"]);import{throttleFn as TS}from"@vkontakte/videoplayer-shared/es2018";var $S=L('<div class="timer__cell cell s-19"><span class="cell__value s-19"> </span> <span class="cell__unit s-19"> </span></div> <span class="timer__points s-19"> </span>',1),yS=L('<div class="timer__cell cell s-19"><span class="cell__value s-19"> </span> <span class="cell__unit s-19"> </span></div> <span class="timer__points s-19"> </span>',1),xS=L('<div class="timer__cell cell s-19"><span class="cell__value s-19"> </span> <span class="cell__unit s-19"> </span></div> <span class="timer__points s-19"> </span>',1),wS=L('<div class="timer__cell cell s-19"><span class="cell__value s-19"> </span> <span class="cell__unit s-19"> </span></div>'),SS=L("<div><!> <!> <!> <!></div>"),CS={hash:"s-19",code:".timer__container.s-19{align-items:flex-start;display:flex;justify-content:center}.cell.s-19{align-items:center;display:flex;flex-direction:column}.cell__value.s-19{font-size:48px;font-weight:600;line-height:1.2}.small.s-19 .cell__value:where(.s-19){font-size:24px}.cell__unit.s-19{font-size:14px;font-weight:400;line-height:1.2}.small.s-19 .cell__unit:where(.s-19){font-size:12px}.timer__points.s-19{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-19 .timer__points:where(.s-19){font-size:20px}"};function Xm(t,e){B(e,!0),Q(t,CS);let i=K(""),o=K(""),r=K(""),a=K(""),l,d=32,s=d/2,u=F=>String(F).padStart(2,"0"),m=F=>Math.max(F.length,1),p=F=>`${(e.isSmallSize?s:d)*m(F)}px`,v=F=>{let U=Math.floor(F/86400);U&&(F-=U*86400,N(i,u(U),!0));let X=Math.floor(F/3600);N(o,u(X),!0);let se=Math.floor(F/60)%60;N(r,u(se),!0);let j=F%60;N(a,u(j),!0)},_=()=>{let F=Math.floor(Date.now()/1e3),U=e.startTime-F;v(U),U>=1?l=requestAnimationFrame(_):e.onTimerOver()};Lt(()=>{l=requestAnimationFrame(_)}),ln(()=>{cancelAnimationFrame(l)});var y=SS();let $;var x=C(y);{var I=F=>{var U=$S(),X=le(U);let se;var j=C(X),ne=C(j,!0);S(j);var Z=k(j,2),Te=C(Z,!0);S(Z),S(X);var fe=k(X,2),te=C(fe,!0);S(fe),O((_e,Ce,me)=>{se=qe(X,"",se,{width:_e}),ge(ne,n(i)),ge(Te,Ce),ge(te,me)},[()=>p(n(i)),()=>Y("waiting_live_day_value"),()=>Y("waiting_live_colon")]),b(F,U)};V(x,F=>{n(i)&&F(I)})}var T=k(x,2);{var R=F=>{var U=yS(),X=le(U);let se;var j=C(X),ne=C(j,!0);S(j);var Z=k(j,2),Te=C(Z,!0);S(Z),S(X);var fe=k(X,2),te=C(fe,!0);S(fe),O((_e,Ce,me)=>{se=qe(X,"",se,{width:_e}),ge(ne,n(o)),ge(Te,Ce),ge(te,me)},[()=>p(n(o)),()=>Y("waiting_live_hour_value"),()=>Y("waiting_live_colon")]),b(F,U)};V(T,F=>{n(o)&&F(R)})}var A=k(T,2);{var P=F=>{var U=xS(),X=le(U);let se;var j=C(X),ne=C(j,!0);S(j);var Z=k(j,2),Te=C(Z,!0);S(Z),S(X);var fe=k(X,2),te=C(fe,!0);S(fe),O((_e,Ce,me)=>{se=qe(X,"",se,{width:_e}),ge(ne,n(r)),ge(Te,Ce),ge(te,me)},[()=>p(n(r)),()=>Y("waiting_live_minute_value"),()=>Y("waiting_live_colon")]),b(F,U)};V(A,F=>{n(r)&&F(P)})}var E=k(A,2);{var W=F=>{var U=wS();let X;var se=C(U),j=C(se,!0);S(se);var ne=k(se,2),Z=C(ne,!0);S(ne),S(U),O((Te,fe)=>{X=qe(U,"",X,{width:Te}),ge(j,n(a)),ge(Z,fe)},[()=>p(n(a)),()=>Y("waiting_live_second_value")]),b(F,U)};V(E,F=>{n(a)&&F(W)})}S(y),O(F=>$=oe(y,1,"timer__container s-19",null,$,F),[()=>({small:e.isSmallSize})]),b(t,y),H()}var IS=L('<div class="waiting s-m"><span> </span></div>'),ES=L('<div class="upcoming-timer timer s-m"><span> </span> <!></div>'),PS=L('<div class="waiting-container s-m"><!></div>'),kS={hash:"s-m",code:'.waiting-container.s-m{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.waiting-container.s-m,.waiting-container.s-m:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-m:before{backdrop-filter:blur(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-m{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-m{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-m{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-m{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-m{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-m{font-size:15px}.medium.s-m{font-size:17px}'};function dc(t,e){B(e,!0),Q(t,kS);let i=h(e,"startTime",3,0),o=f(()=>i()<Math.floor(Date.now()/1e3)),r=K(void 0),a=K(void 0),l=0,d=K(void 0),s=K(void 0),u=f(()=>{var x,I;return((x=n(d))!=null?x:1/0)<=509||((I=n(s))!=null?I:1/0)<=320}),m=f(()=>{var x,I;return!n(u)&&(((x=n(d))!=null?x:1/0)<=699||((I=n(s))!=null?I:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?TS(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let x={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"},I=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(x,I)})},300):void 0;He(()=>{n(s),n(d),n(o),p==null||p()}),ln(()=>{if(cancelAnimationFrame(l),p==null||p.cancel(),e.onUpcomingLiveViewStateChanged){let x={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"};e.onUpcomingLiveViewStateChanged(x)}});var v=PS();v.__contextmenu=function(...x){var I;(I=e.onContextMenu)==null||I.apply(this,x)},v.__click=function(...x){var I;(I=e.onClick)==null||I.apply(this,x)};var _=C(v);{var y=x=>{var I=IS(),T=C(I);let R;var A=C(T,!0);S(T),S(I),et(I,P=>N(r,P),()=>n(r)),O((P,E)=>{R=oe(T,1,"waiting__title s-m",null,R,P),ge(A,E)},[()=>({medium:n(m),small:n(u)}),()=>Y("waiting_live_upcoming_title")]),b(x,I)},$=x=>{var I=ES(),T=C(I);let R;var A=C(T,!0);S(T);var P=k(T,2);let E=f(()=>n(u)||n(m)),W=f(()=>i()||0);Xm(P,{get isSmallSize(){return n(E)},get startTime(){return n(W)},onTimerOver:()=>N(o,!0)}),S(I),et(I,F=>N(a,F),()=>n(a)),O((F,U)=>{R=oe(T,1,"timer__title s-m",null,R,F),ge(A,U)},[()=>({medium:n(m),small:n(u)}),()=>Y("waiting_live_timer_title")]),b(x,I)};V(_,x=>{n(o)?x(y):x($,!1)})}S(v),O(()=>qe(v,`background-image: url(${e.thumbUrl})`)),Sn(v,"clientWidth",x=>N(d,x)),Sn(v,"clientHeight",x=>N(s,x)),b(t,v),H()}Ze(["contextmenu","click"]);var AS=L('<div class="waiting-container s-s"><div class="waiting-caption s-s"><!> <p class="waiting-title s-s"> </p></div></div>'),LS={hash:"s-s",code:'.waiting-container.s-s{align-items:center;background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;justify-content:center}.waiting-container.s-s,.waiting-container.s-s:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-s:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-s{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-s{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function Ya(t,e){B(e,!0),Q(t,LS);let i=h(e,"thumbUrl",3,""),o={recover:Y("waiting_live_recover_title"),record:Y("waiting_record_title")},r=f(()=>o[e.kind]||"");var a=AS();a.__contextmenu=function(...m){var p;(p=e.onContextMenu)==null||p.apply(this,m)},a.__click=function(...m){var p;(p=e.onClick)==null||p.apply(this,m)};var l=C(a),d=C(l);Oa(d,{style:"position: static; transform: translate(0, 0)"});var s=k(d,2),u=C(s,!0);S(s),S(l),S(a),O(()=>{qe(a,`background-image: url('${i()}')`),ge(u,n(r))}),b(t,a),H()}Ze(["contextmenu","click"]);var MS=Ee('<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 Zm(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=L('<div class="select-icon s-1w"><!></div>'),RS={hash:"s-1w",code:".select-icon.s-1w{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function cc(t){Q(t,RS);var e=VS(),i=C(e);Zm(i,{}),S(e),b(t,e)}var NS=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},DS=(t,e)=>{Ml(t,()=>e.item.selectItem(e.item.value))},OS=L("<p> </p>"),BS=L('<p class="sublabel s-1r"> </p>'),HS=L('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),FS={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 Jm(t,e){B(e,!0),Q(t,FS);let i=h(e,"isMobile",3,!1);var o=HS();let r;o.__click=[NS,e],o.__keydown=[DS,e];var a=C(o);{var l=y=>{cc(y,{})};V(a,y=>{e.item.selected&&y(l)})}var d=k(a,2);let s;var u=C(d);{var m=y=>{var $=Re(),x=le($);Ni(x,()=>e.item.valueComponent,(I,T)=>{T(I,Xr(()=>{var R;return(R=e.item.valueComponentParams)!=null?R:{}}))}),b(y,$)},p=y=>{var $=OS();let x;var I=C($,!0);S($),O(T=>{var R;x=oe($,1,"label s-1r",null,x,T),ge(I,(R=e.item.label)!=null?R:e.item.value)},[()=>({mobile:i()})]),b(y,$)};V(u,y=>{e.item.valueComponent?y(m):y(p,!1)})}var v=k(u,2);{var _=y=>{var $=BS(),x=C($,!0);S($),O(()=>ge(x,e.item.sublabel)),b(y,$)};V(v,y=>{e.item.sublabel&&y(_)})}S(d),S(o),O((y,$,x)=>{var I;r=oe(o,1,"item",null,r,y),Ne(o,"data-value",(I=e.item.dataValue)!=null?I:e.item.value),Ne(o,"aria-label",$),Ne(o,"data-testid",e.item.dataTestid),s=oe(d,1,"menu-item-value s-1r",null,s,x),Ne(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),H()}Ze(["click","keydown"]);var US=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function ev(t,e){B(e,!0);let i=h(e,"isMobile",3,!1),o=h(e,"refMenuItems",15),r=f(()=>()=>e.openSubMenuList(e.item.children)),a=f(()=>$=>Au($,n(r)));var l=US();let d;l.__click=function(...$){var x;(x=n(r))==null||x.apply(this,$)},l.__keydown=function(...$){var x;(x=n(a))==null||x.apply(this,$)};var s=C(l);{var u=$=>{cc($,{})};V(s,$=>{e.item.selected&&$(u)})}var m=k(s,2);let p;var v=C(m);{var _=$=>{var x=Re();let I=f(()=>e.item.valueComponent);var T=le(x);Ni(T,()=>n(I),(R,A)=>{A(R,Xr(()=>{var P;return(P=e.item.valueComponentParams)!=null?P:{}}))}),b($,x)},y=$=>{var x=ps();O(()=>ge(x,e.item.label)),b($,x)};V(v,$=>{e.item.valueComponent?$(_):$(y,!1)})}S(m),S(l),et(l,$=>o(o()[e.item.id]=$,!0),()=>{var $;return($=o())==null?void 0:$[e.item.id]}),O(($,x)=>{var I;d=oe(l,1,"item",null,d,$),Ne(l,"aria-label",(I=e.item.ariaLabel)!=null?I:e.item.label),Ne(l,"data-testid",e.item.id),p=oe(m,1,"menu-item-value",null,p,x)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),b(t,l),H()}Ze(["click","keydown"]);var Jr={"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 WS=(t,e)=>{M_(t,e.returnFromSubMenu,e.closeSettingsMenu)},KS=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},qS=(t,e)=>{Ld(t)&&(Lr(t),e.returnFromSubMenu())},QS=L('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1k"> </p></li> <!></ul></div>'),GS={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 iv(t,e){B(e,!0),Q(t,GS);let[i,o]=Be(),r=()=>w(p,"$isFullscreen",i),a=()=>w(v,"$playerSize",i),l=h(e,"isMobile",3,!1),d=h(e,"playerControlsHeight",3,0),s=h(e,"ariaLabelReturnFromSubMenu",19,()=>Y("aria_label_submenu_back")),u=h(e,"listRef",15);Lt(()=>{let j=e.items.findIndex(ne=>ne.selected);u().children[j+1].focus()});let m=$e(),p=m.ui.isFullscreen,v=m.ui.playerSize,_=K(void 0),y=K(0),$=K(0),x=f(()=>l()&&r()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n($)-d()}px; overflow: auto;`),I=f(()=>Math.max(e.minWidth,n(y)));var T=QS();let R;var A=C(T);let P;A.__keydown=[WS,e];var E=C(A);let W;E.__click=[KS,e],E.__keydown=[qS,e];var F=C(E);Ar(F,{direction:"left"});var U=k(F,2),X=C(U,!0);S(U),S(E),et(E,j=>N(_,j),()=>n(_));var se=k(E,2);hi(se,17,()=>e.items,vd,(j,ne)=>{var Z=Re(),Te=le(Z);{var fe=_e=>{Jm(_e,{get item(){return n(ne)},get isMobile(){return l()}})},te=(_e,Ce)=>{{var me=ce=>{ev(ce,{get isMobile(){return l()},get item(){return n(ne)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};V(_e,ce=>{n(ne).type==="OPEN_SUB_MENU"&&ce(me)},Ce)}};V(Te,_e=>{n(ne).type==="SELECT_VALUE"?_e(fe):_e(te,!1)})}b(j,Z)}),S(A),et(A,j=>u(j),()=>u()),S(T),O((j,ne,Z)=>{R=oe(T,1,"sub-menu menu s-1k",null,R,j),Ne(T,"data-testid",`${e.id}-sub-menu`),qe(T,`min-width: ${n(I)}px`),P=oe(A,1,"items s-1k",null,P,ne),qe(A,n(x)),W=oe(E,1,"item header back s-1k",null,W,Z),Ne(E,"aria-label",s()),ge(X,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),Sn(E,"clientWidth",j=>N(y,j)),Sn(E,"clientHeight",j=>N($,j)),b(t,T),H(),o()}Ze(["keydown","click"]);import{noop as YS}from"@vkontakte/videoplayer-shared/es2018";var jS=(t,e)=>Au(t,e()),XS=(t,e)=>{t.stopPropagation(),e()()},ZS=L('<div class="value s-1m"> </div>'),JS=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),eC={hash:"s-1m",code:".value.s-1m{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function ov(t,e){B(e,!0),Q(t,eC);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,YS),r=h(e,"valueComponent",3,void 0),a=h(e,"iconProps",19,()=>({})),l=h(e,"ref",15);var d=JS();let s;d.__click=[XS,o],d.__keydown=[jS,o];var u=C(d),m=C(u);{var p=T=>{za(T,{get icon(){return e.icon}})},v=T=>{var R=Re();let A=f(()=>e.icon);var P=le(R);Ni(P,()=>n(A),(E,W)=>{W(E,Xr(a))}),b(T,R)};V(m,T=>{typeof e.icon=="string"?T(p):T(v,!1)})}S(u);var _=k(u,2),y=C(_,!0);S(_);var $=k(_,2);{var x=T=>{var R=Re();let A=f(r);var P=le(R);Ni(P,()=>n(A),(E,W)=>{W(E,{})}),b(T,R)},I=T=>{var R=ZS(),A=C(R,!0);S(R),O(()=>ge(A,e.value)),b(T,R)};V($,T=>{r()?T(x):T(I,!1)})}S(d),et(d,T=>l(T),()=>l()),O(T=>{s=oe(d,1,"item",null,s,T),Ne(d,"aria-label",e.ariaLabel),Ne(d,"data-testid",e.id),ge(y,e.label)},[()=>({mobile:i()})]),b(t,d),H()}Ze(["click","keydown"]);import{noop as yb}from"@vkontakte/videoplayer-shared/es2018";var tC=(t,e)=>{Ml(t,()=>e())},iC=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),oC=L('<img class="icon" aria-hidden="true"/>'),nC=L('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1l"> </div></li>'),rC={hash:"s-1l",code:".label.s-1l{overflow:hidden;text-overflow:ellipsis}"};function nv(t,e){B(e,!0),Q(t,rC);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,yb),r=h(e,"closeSettings",3,yb),a=K(!1),l=()=>{N(a,!0)},d=x=>{x==null||x.stopPropagation(),o()(),r()()};var s=nC();let u;s.__click=d,s.__keydown=[tC,d];var m=C(s),p=C(m);{var v=x=>{var I=Re(),T=le(I);{var R=P=>{var E=iC();b(P,E)},A=P=>{var E=oC();O(()=>Ne(E,"src",e.icon)),pt("error",E,l),Pa(E),b(P,E)};V(T,P=>{n(a)?P(R):P(A,!1)})}b(x,I)},_=x=>{var I=Re();let T=f(()=>e.icon);var R=le(I);Ni(R,()=>n(T),(A,P)=>{P(A,{})}),b(x,I)};V(p,x=>{typeof e.icon=="string"?x(v):x(_,!1)})}S(m);var y=k(m,2),$=C(y,!0);S(y),S(s),O(x=>{var I;u=oe(s,1,"item",null,u,x),Ne(s,"aria-label",(I=e.ariaLabel)!=null?I:e.label),Ne(s,"data-testid",e.id),ge($,e.label)},[()=>({mobile:i()})]),b(t,s),H()}Ze(["click","keydown"]);import{noop as lC}from"@vkontakte/videoplayer-shared/es2018";var sC=L('<div class="toggle_wrap s-1q"><div></div> <div class="toggle-label s-1q"></div></div>'),aC={hash:"s-1q",code:'.toggle_wrap.s-1q{cursor:pointer;font-size:12px;line-height:15px;min-height:15px;padding:0;user-select:none}.toggle.s-1q{background-color:var(--toggle-color-separator);border-radius:45px;cursor:pointer;float:right;height:9px;margin-top:3px;width:28px}.toggle.s-1q: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-1q:after{background-color:var(--toggle-color-on);left:13px}.toggle-label.s-1q{overflow:hidden}'};function rv(t,e){Q(t,aC);let i=h(e,"enabled",3,!1);var o=sC(),r=C(o);let a;Jt(2),S(o),O(l=>a=oe(r,1,"toggle s-1q",null,a,l),[()=>({on:i()})]),b(t,o)}var dC=(t,e,i)=>{V_(t,e(),o=>i()(o))},cC=(t,e,i)=>{t.stopPropagation(),e()(!i())},uC=L('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),pC=L('<li role="menuitem" tabindex="0"><!></li>');function sv(t,e){B(e,!0);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,lC),r=h(e,"enabled",3,!1),a=h(e,"tooltipText",3,void 0),l=h(e,"maxTooltipWidth",3,void 0);var d=pC();let s;d.__click=[cC,o,r],d.__keydown=[dC,r,o];var u=C(d);Ba(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(m,p)=>{var v=uC();let _;var y=C(v),$=C(y);{var x=P=>{za(P,{get icon(){return e.icon}})},I=P=>{var E=Re();let W=f(()=>e.icon);var F=le(E);Ni(F,()=>n(W),(U,X)=>{X(U,{})}),b(P,E)};V($,P=>{typeof e.icon=="string"?P(x):P(I,!1)})}S(y);var T=k(y,2),R=C(T,!0);S(T);var A=k(T,2);rv(A,{get enabled(){return r()}}),S(v),O(P=>{_=oe(v,1,"switch-wrapper",null,_,P),ge(R,e.label)},[()=>({mobile:i()})]),b(m,v)},$$slots:{default:!0}}),S(d),O(m=>{var p;s=oe(d,1,"item switch-item",null,s,m),Ne(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),Ne(d,"data-testid",e.id)},[()=>({mobile:i()})]),b(t,d),H()}Ze(["click","keydown"]);import{isValidURL as DC,VideoQuality as Lb}from"@vkontakte/videoplayer-shared/es2018";var xb=()=>{let t=K(ri([])),e=f(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{N(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{N(t,[],!0)}}};import{getVideoQualityLabel as fC}from"@vkontakte/videoplayer-shared/es2018";var mC=L('<div class="quality-icon s-1p"><!></div>'),vC=L('<div class="quality-label s-1p"><span> </span> <!></div>'),gC={hash:"s-1p",code:".quality-label.s-1p{position:relative}.quality.s-1p{font-size:13px;line-height:18px}.quality.sub.s-1p{opacity:.7}.quality-icon.s-1p{display:flex;padding-left:2px;position:absolute;right:0;top:0;transform:translateX(100%)}.quality-icon.s-1p svg{color:var(--blue-light)}"};function ja(t,e){B(e,!0),Q(t,gC);let i=h(e,"isSubCase",3,!1),o=f(()=>e.quality?fC(e.quality):""),r=f(()=>Du(e.quality));var a=vC(),l=C(a);let d;var s=C(l,!0);S(l);var u=k(l,2);{var m=p=>{var v=mC();let _=f(()=>n(r));var y=C(v);Ni(y,()=>n(_),($,x)=>{x($,{})}),S(v),O(()=>Ne(v,"data-testid",`${n(o)}-icon`)),b(p,v)};V(u,p=>{n(r)&&!e.isMobile&&p(m)})}S(a),O(p=>{d=oe(l,1,"s-1p",null,d,p),ge(s,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),b(t,a),H()}import{VideoQuality as hC}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as wb}from"@vkontakte/videoplayer-core/es2018";var Sb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},Cb=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=Sb({quality:t,availableQualities:e});return i?t===wb.INVARIANT?Y("auto_quality_invariant"):Y("auto_quality",{actual:o}):o},Tb=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===wb.INVARIANT?i:`${i}${Sb({quality:t,availableQualities:e})}`:"...";var _C=L('<div class="menu-item-value-wrapper s-1t"><!></div>'),bC={hash:"s-1t",code:".menu-item-value-wrapper.s-1t{line-height:normal}"};function Wl(t,e){B(e,!0),Q(t,bC);let[i,o]=Be(),r=()=>w(s,"$currentQuality$",i),a=()=>w(u,"$availableQualities$",i),l=()=>w(m,"$isMobile$",i),d=$e(),s=d.state.currentQuality$,u=d.state.availableQualities$,m=d.ui.isMobile,p=" · ",v=f(()=>e.prefix+(e.selected&&r()!==hC.INVARIANT?p:"")),_=f(()=>Tb({prefix:n(v),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=_C(),$=C(y);let x=f(()=>e.selected?r():void 0);ja($,{get quality(){return n(x)},get label(){return n(_)},get isMobile(){return l()},isSubCase:!0}),S(y),b(t,y),H(),o()}var $C=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")},yC={br:!0,span:!0},av=(t,e={})=>{var d,s,u,m,p,v,_;if(!t)return t;let i={...yC,...e},o=Object.keys(i);if(!o.length)return t;let r=$C(o),a=[],l=0;for(let y of t.matchAll(r)){let $=y[0],x=((d=y.groups)==null?void 0:d.keyhtml)||((s=y.groups)==null?void 0:s.keyi18n)||((u=y.groups)==null?void 0:u.keyhtmlself)||((m=y.groups)==null?void 0:m.keyi18nself)||"",{index:I}=y;if(!i[x]){a.push(t.slice(l,I)),l=I+$.length;continue}let T=(p=y.groups)!=null&&p.childrenhtml?av(y.groups.childrenhtml,i):"",R=(v=y.groups)!=null&&v.childrenhtml?$.replace(new RegExp((_=y.groups)==null?void 0:_.childrenhtml),()=>T||""):$;a.push(t.slice(l,I),R),l=I+$.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function uc(t,e){B(e,!1);let i=h(e,"message",8),o=av(i());jo();var r=Re(),a=le(r);{var l=d=>{var s=Re(),u=le(s);gd(u,()=>o),b(d,s)};V(a,d=>{o&&d(l)})}b(t,r),H()}var xC=L('<p class="quality-applies sublabel s-1s"><!></p>'),wC={hash:"s-1s",code:".quality-applies.s-1s{color:hsla(0,0%,100%,.5);display:flex;justify-content:end;padding:3px 0}.quality-applies span{color:#70c1ff}"};function lv(t,e){B(e,!1),Q(t,wC),jo();var i=xC(),o=C(i);let r=cr(()=>Y("quality_applience",{action:`<span>${Y("quality_applience_action")}</span>`}));uc(o,{get message(){return n(r)}}),S(i),b(t,i),H()}var Eb=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",label:Y("other_quality"),selected:o,valueComponent:Wl,valueComponentParams:{prefix:Y("other_quality"),selected:o},children:"quality-other-settings"}},dv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:Y("auto_quality_limit"),valueComponent:e?Wl:void 0,valueComponentParams:{prefix:Y("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),Pb=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:lv,bottomBordered:!0,children:"quality-appliance"}),cv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"quality-high",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:Y("high_quality"),valueComponent:t?Wl:void 0,valueComponentParams:{prefix:Y("high_quality"),selected:i},sublabel:Y("high_quality_description")}),uv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleTrafficSaving:o})=>({id:"quality-traffic-saving",type:"SELECT_VALUE",value:"save_traffic",selectItem:()=>o(!0,e),selected:i,label:Y("traffic_saving_quality"),valueComponent:t?Wl:void 0,valueComponentParams:{prefix:Y("traffic_saving_quality"),selected:i},sublabel:Y("traffic_saving_quality_description")});var ep=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),tp=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,r;if(i==="und"?r=void 0:i&&(r=(l=Qd(i))!=null?l:i),o&&i&&r){let d=e.filter(s=>s.label===o&&s.language===i);if(d.length===1)return Y("audio_stream_display_language_label",{language:r,label:o});{let s=ep(t,d);return Y("audio_stream_display_language_label_index",{language:r,label:o,index:s})}}if(o){let d=e.filter(s=>s.label===o);if(d.length===1)return o;{let s=ep(t,d);return Y("audio_stream_display_label_index",{label:o,index:s})}}if(i&&r){let d=e.filter(s=>s.language===i);if(d.length===1)return r;{let s=ep(t,d);return Y("audio_stream_display_language_index",{language:r,index:s})}}let a=ep(t,e);return Y("audio_stream_display_unknown",{index:a})};var SC={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:r}=t,a=[];return i&&a.push({handler:dv,selected:e&&!o&&!r||!1}),a.push({handler:uv,selected:o},{handler:cv,selected:r}),{title:Y("submenu_quality"),id:"quality-settings",items:[Pb(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),Eb(t)]}},"quality-other-settings":({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"quality-other-settings",title:Y("submenu_quality"),closeSettingsMenu:t,items:i.map(r=>({type:"SELECT_VALUE",value:r.value,valueComponent:ja,valueComponentParams:{quality:r.value,label:r.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:r.selected,label:r.displayValue}))}),"quality-appliance":t=>{var i,o,r;let{closeSettingsMenu:e}=t;return{id:"quality-appliance",title:Y("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:dv,selected:((i=bu())==null?void 0:i.type)==="auto_quality"},{handler:uv,selected:((o=bu())==null?void 0:o.type)==="traffic_saving"},{handler:cv,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-tracks":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-tracks",title:Y("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(r=>({type:"SELECT_VALUE",value:r,dataValue:r.id,selectItem:o,selected:r.id===(i==null?void 0:i.id),label:tp(r,e)}))}),"playback-rate":({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"playback-rate",title:Y("submenu_playback_rate"),closeSettingsMenu:t,items:e.map(o=>({type:"SELECT_VALUE",value:o.value,selectItem:i,selected:o.selected,label:o.displayValue}))}),subtitles:({availableSubtitlesList:t,selectSubtitle:e})=>({id:"subtitles",minWidth:164,title:Y("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i.value,selectItem:()=>e(i),selected:i.selected,label:i.displayValue,dataTestid:i.value===In?"sub_off":void 0}))})},kb=({subMenuId:t,context:e})=>t?[SC[t](e)]:[];var CC=Ee('<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 pv(t){je(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=CC();b(e,o)},$$slots:{default:!0}})}var TC=Ee('<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 fv(t){je(t,{width:"18",height:"15",children:(e,i)=>{var o=TC();b(e,o)},$$slots:{default:!0}})}var IC=Ee('<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 mv(t){je(t,{testId:"play-speed-icon",children:(e,i)=>{var o=IC();b(e,o)},$$slots:{default:!0}})}var EC=Ee('<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 vv(t){je(t,{testId:"download-icon",children:(e,i)=>{var o=EC();b(e,o)},$$slots:{default:!0}})}var PC=Ee('<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 gv(t){je(t,{testId:"report-icon",children:(e,i)=>{var o=PC();b(e,o)},$$slots:{default:!0}})}var kC=Ee('<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 ip(t){je(t,{children:(e,i)=>{var o=kC();b(e,o)},$$slots:{default:!0}})}var AC=Ee('<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 hv(t){je(t,{testId:"info-icon",children:(e,i)=>{var o=AC();b(e,o)},$$slots:{default:!0}})}var LC=L('<div class="menu-item-value-wrapper s-1v"><!></div>'),MC={hash:"s-1v",code:".menu-item-value-wrapper.s-1v{line-height:normal}"};function _v(t,e){B(e,!0),Q(t,MC);let[i,o]=Be(),r=()=>w(u,"$currentQuality$",i),a=()=>w(m,"$availableQualities$",i),l=()=>w(p,"$isAutoQualityEnabled$",i),d=()=>w(v,"$isMobile$",i),s=$e(),u=s.state.currentQuality$,m=s.state.availableQualities$,p=s.state.isAutoQualityEnabled$,v=s.ui.isMobile,_=f(()=>Cb({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=LC(),$=C(y);ja($,{get quality(){return r()},get label(){return n(_)},get isMobile(){return d()}}),S(y),b(t,y),H(),o()}var RC={"quality-settings":({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?Y("auto_quality_option"):e)||"";return{id:"quality-settings",type:"OPEN_SUB_MENU",ariaLabel:Y("aria_label_menu_quality",{actual:o}),icon:Bd,label:Y("menu_quality"),value:e,valueComponent:_v,weight:Jr["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:Jr["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:Y("aria_label_submenu_traffic_saving"),icon:pv,label:Y("menu_traffic_saving"),enabled:t,tooltipText:Y("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-tracks-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=tp(t,e);return{id:"audio-tracks-settings",weight:Jr["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:Y("aria_label_menu_audio_languages",{actual:i}),icon:fv,label:Y("menu_audio_languages"),value:i,children:"audio-tracks"}},"playback-rate-settings":({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(r=>r.value===e))==null?void 0:o.displayValue)||"";return{id:"playback-rate-settings",weight:Jr["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:Y("aria_label_menu_rate",{actual:i}),icon:mv,label:Y("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:Jr["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:Y("aria_label_menu_subtitle",{actual:t.displayValue}),icon:da,iconProps:{type:"outline"},label:Y("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:Jr.download,type:"CLICK",onClick:t,label:Y("download_video_caption"),ariaLabel:Y("aria_label_menu_download"),icon:vv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:Jr.report,type:"CLICK",onClick:t,label:Y("menu_report"),ariaLabel:`${Y("menu_report")}. ${Y("aria_label_new_tab_alert")}`,icon:gv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:Jr["copy-data"],type:"CLICK",onClick:t,label:Y("menu_copy_debug"),ariaLabel:Y("menu_copy_debug"),icon:ip,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:Jr["save-trace-info"],type:"CLICK",onClick:t,label:Y("menu_save_debug"),ariaLabel:Y("menu_save_debug"),icon:ip,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:Jr["debug-info"],type:"CLICK",onClick:t,ariaLabel:Y("aria_label_menu_debug_overlay"),label:Y("menu_debug_overlay"),icon:hv,isHiddenFor:["desktop"]})},Ab=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>RC[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(Na)};var OC=(t,e)=>{ku(t,e)},BC=L('<div><div> </div> <div class="close s-p" data-testid="close-settings-menu"></div></div>'),HC=L('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),FC=L("<div><!> <!></div>"),UC={hash:"s-p",code:'.settings-menu-container.mobile.s-p{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-p ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-p .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-p .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-p .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-p .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-p .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-p .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-p{line-height:40px}.settings-menu.desktop.s-p{min-width:300px}.settings-menu-container.s-p .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-p .menu.mobile.hidden{display:none}.settings-menu-container.s-p .menu .item:not(.switch-item),.settings-menu-container.s-p .menu .switch-wrapper{align-items:center;color:var(--white);cursor:pointer;display:flex;justify-content:flex-end;position:relative;white-space:nowrap}.settings-menu-container.s-p .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-p .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-p .item:not(.switch-item),.settings-menu.s-p .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-p .item.mobile:not(.switch-item),.settings-menu.s-p .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-p .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-p .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-p .item.header.mobile:where(.s-p){border-bottom:var(--divider-border);color:var(--white);column-gap:12px;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:4px}.settings-menu-container.s-p .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-p .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-p .items::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.settings-menu-container.s-p .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-p .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-p{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-p:after,.close.s-p:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-p:before{transform:rotate(45deg)}.close.s-p:after{transform:rotate(-45deg)}'};function pc(t,e){B(e,!0),Q(t,UC);let[i,o]=Be(),r=()=>w(Ae,"$settingsMenuVisible",i),a=()=>w(Ue,"$settingsMenuOpenedByKeyboard",i),l=()=>w(De,"$debugPanelVisible",i),d=()=>w(de,"$isMobile",i),s=()=>w(we,"$playerSize",i),u=()=>w(ue,"$hasMpegSources$",i),m=()=>w(ke,"$mobileNotReportControlHidden$",i),p=()=>w(me,"$autoQualityLimitingAvailable$",i),v=()=>w(re,"$availableSubtitlesList$",i),_=()=>w(xe,"$isLiveWithPlaybackSpeed",i),y=()=>w(te,"$availableAudioStreams$",i),$=()=>w(D,"$availablePlaybackRates$",i),x=()=>w(fe,"$currentAudioStream$",i),I=()=>w(G,"$currentPlaybackRate$",i),T=()=>w(Xe,"$trafficSavingEnabled",i),R=()=>w(_e,"$currentQuality$",i),A=()=>w(ce,"$isAutoQualityEnabled$",i),P=()=>w(Ye,"$currentSubtitle$",i),E=()=>w(Tt,"$additionalSettingsMenuItems$",i),W=()=>w(Qe,"$isAutoQualityAvailable$",i),F=()=>w(Ce,"$availableQualities$",i),U=()=>w(Pe,"$highQualityEnabled",i),X=h(e,"ref",15,void 0),se=h(e,"playerControlsHeight",3,0),j=ri({}),ne=ri({}),Z=$e(),Te=Mt(),fe=Z.state.audioStream$,te=Z.state.availableAudioStreams$,_e=Z.state.currentQuality$,Ce=Z.state.availableQualities$,me=Z.state.autoQualityLimitingAvailable$,ce=Z.state.isAutoQualityEnabled$,Qe=Z.state.isAutoQualityAvailable$,G=Z.state.currentPlaybackRate$,D=Z.state.availablePlaybackRates$,Ye=Z.state.currentSubtitle$,re=Z.state.availableSubtitlesList$,pe=Z.state.canDownload,ue=Z.state.hasMpegSources$,Ae=Z.ui.settingsMenu.visible$,Ue=Z.ui.settingsMenu.openedByBtnKeyboard$,ee=Z.ui.settingsMenu.ref$,de=Z.ui.isMobile,ke=Z.ui.mobileNotReportControlHidden$,xe=Z.state.canChangePlaybackSpeed$,Xe=Z.state.trafficSavingEnabled$,Pe=Z.state.highQualityEnabled$,we=Z.ui.playerSize,De=Z.ui.debugPanelVisible,Ct=Z.state.isInteractiveTime$,Tt=Z.ui.additionalSettingsMenuItems$,Et=Z.ui.t,dt=Z.actions.internal.downloadVideo,wt=Z.actions.internal.closeSettingsMenu,Yt=Z.actions.internal.openSettingsSubMenu,Dt=Z.actions.internal.closeSettingsSubMenu,Rt=K(!1),Ut=K(void 0),q=xb();He(()=>{!r()&&q.current&&(Dt(ne[q.current]),q.popAllSubMenus())}),He(()=>{r()||N(Ut,void 0)}),He(()=>{!q.current&&n(Ut)&&L_(j,n(Ut))}),He(()=>{X()&&ee.set(X())});async function Le(ht){var z;q.pushSubMenu(ht),await uo(),Yt(ht,ne[ht]);let Ot=(z=X())==null?void 0:z.firstElementChild;Ot&&Bf(Ot)}function Me(ht){var Ot;ht==null||ht.stopPropagation(),a()||(Ot=e.returnFocus)==null||Ot.call(e),wt(),N(Rt,!1)}function ye(ht,Ot){Z.actions.internal.setQuality(ht,{appliesTo:Ot,byUser:!0}),Me()}function Fe(ht){Z.actions.internal.setAudioStream(ht),Me()}function Se(ht,Ot){Z.actions.internal.setTrafficSavingEnabled(ht,Ot),Te.features.qualityDetailsSubMenuEnabled&&Me()}function xt(ht,Ot){Z.actions.internal.setHighQualityEnabled(ht,Ot),Me()}function ve(ht){Z.actions.internal.setPlaybackRate(ht),Me()}function Oe(ht){Z.actions.internal.setSubtitle(ht),Me()}function Ke(){dt()}function at(){DC(e.supportLink)&&window.open(e.supportLink,"_blank"),Z.actions.internal.reportProblem(),Z.actions.internal.pause()}function qt(){Al(Z.actions.internal.getDebugTextData())}let Pt=()=>{let ht=Z.actions.internal.getTraceTextData(),Ot=new Blob([...ht],{type:"application/json"}),z=window.URL.createObjectURL(Ot);Ma(z,"vk_player_trace_info","json")};function si(){De.set(!l())}function li(){N(Rt,!0)}function Ii(){N(Rt,!1)}function po(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-se()}px; overflow: auto;`}let fo=f(()=>pe&&u()&&!m()),di=f(()=>Te.features.trafficSaving&&!m()&&p()&&!Te.features.qualityDetailsSubMenuEnabled),rt=f(()=>v().length>0&&!m()),ci=f(()=>!!_()&&!m()),Gi=f(()=>Te.features.audioLanguages&&y().length>=2&&!m()),ct=f(()=>!m());Lt(()=>Ct.subscribe(ht=>{ht&&!d()&&!n(Rt)&&!a()&&Me()}));let Nt=f(()=>{let ht=[n(ct)&&"quality-settings",n(Gi)&&"audio-tracks-settings",n(ci)&&"playback-rate-settings",n(rt)&&"subtitles-settings",n(di)&&"traffic-saving-switch",n(fo)&&"download",Te.showSupport&&"show-support","copy-data",Te.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(Ot=>!!Ot);return Ab({items:ht,context:{qualityDetailsSubMenuEnabled:Te.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:$(),currentAudioStream:x(),availableAudioStreams:y(),currentPlaybackRate:I(),selectPlaybackRate:ve,trafficSavingEnabled:T(),toggleTrafficSaving:Se,currentQuality:R()||Lb.INVARIANT,isAutoQualityEnabled:A()||!1,currentSubtitle:P(),isMobile:d(),onDownloadClick:Ke,onCopyDataClick:qt,onReportProblemClick:at,onSaveTraceDataClick:Pt,toggleShowDebugInfo:si},additionalSettingsMenuItems:E()})}),fi=f(()=>kb({subMenuId:q.current,context:{availablePlaybackRates:$(),selectPlaybackRate:ve,trafficSavingEnabled:T(),toggleTrafficSaving:Se,currentQuality:R()||Lb.INVARIANT,isAutoQualityEnabled:A()||!1,isAutoQualityAvailable:W()||!1,availableQualities:F(),highQualityEnabled:U(),toggleHighQuality:xt,availableAudioStreams:y(),availableSubtitlesList:v(),closeSettingsMenu:wt,currentAudioStream:x(),isMobile:d(),selectAudioLanguage:Fe,selectQuality:ye,selectSubtitle:Oe}}));var ot=FC();let nt;var Ci=C(ot);{var Zo=ht=>{var Ot=HC();let z;Ot.__keydown=[OC,wt];var kt=C(Ot);{var lt=$t=>{var st=BC();let Di;var Li=C(st),En=C(Li,!0);S(Li);var Pn=k(Li,2);Pn.__click=Me,S(st),O((xi,Yi)=>{Di=oe(st,1,"item header s-p",null,Di,xi),ge(En,Yi)},[()=>({mobile:d()}),()=>Et("submenu_settings")]),b($t,st)};V(kt,$t=>{d()&&$t(lt)})}var gi=k(kt,2);let jt;hi(gi,21,()=>n(Nt),$t=>$t.id,($t,st)=>{var Di=Re(),Li=le(Di);{var En=xi=>{ov(xi,{get isMobile(){return d()},get id(){return n(st).id},get icon(){return n(st).icon},get iconProps(){return n(st).iconProps},get label(){return n(st).label},get ariaLabel(){return n(st).ariaLabel},get value(){return n(st).value},get valueComponent(){return n(st).valueComponent},onClick:()=>{Le(n(st).children),N(Ut,n(st).id,!0)},get ref(){return j[n(st).id]},set ref(Yi){j[n(st).id]=Yi}})},Pn=(xi,Yi)=>{{var kn=_i=>{let Lo=f(()=>`${n(st).id}-menu-item`);nv(_i,{get isMobile(){return d()},get id(){return n(Lo)},get onClick(){return n(st).onClick},get icon(){return n(st).icon},get label(){return n(st).label},get ariaLabel(){return n(st).ariaLabel},closeSettings:Me})},go=(_i,Lo)=>{{var Mo=mo=>{let pn=f(()=>`${n(st).id}-menu-item`);sv(mo,{get isMobile(){return d()},get id(){return n(pn)},get onClick(){return n(st).onClick},get icon(){return n(st).icon},get label(){return n(st).label},get ariaLabel(){return n(st).ariaLabel},get enabled(){return n(st).enabled},get tooltipText(){return n(st).tooltipText},get maxTooltipWidth(){return n(st).maxTooltipWidth}})};V(_i,mo=>{n(st).type==="SWITCH"&&mo(Mo)},Lo)}};V(xi,_i=>{n(st).type==="CLICK"?_i(kn):_i(go,!1)},Yi)}};V(Li,xi=>{n(st).type==="OPEN_SUB_MENU"?xi(En):xi(Pn,!1)})}b($t,Di)}),S(gi),et(gi,$t=>X($t),()=>X()),S(Ot),O(($t,st,Di)=>{z=oe(Ot,1,"settings-menu menu s-p",null,z,$t),jt=oe(gi,1,"items",null,jt,st),qe(gi,Di)},[()=>({desktop:!d(),mobile:d(),hidden:!!q.current}),()=>({mobile:d()}),po]),pt("mouseenter",Ot,li),pt("mouseleave",Ot,Ii),b(ht,Ot)};V(Ci,ht=>{r()&&ht(Zo)})}var Ao=k(Ci,2);hi(Ao,17,()=>n(fi),ht=>ht.id,(ht,Ot)=>{let z=f(()=>{var kt;return(kt=n(Ot).minWidth)!=null?kt:137});iv(ht,{get isMobile(){return d()},get playerControlsHeight(){return se()},get returnFromSubMenu(){return q.popSubMenu},get id(){return n(Ot).id},get title(){return n(Ot).title},get closeSettingsMenu(){return wt},openSubMenuList:Le,get items(){return n(Ot).items},get minWidth(){return n(z)},get refMenuItems(){return j},get listRef(){return ne[n(Ot).id]},set listRef(kt){ne[n(Ot).id]=kt}})}),S(ot),O(ht=>nt=oe(ot,1,"settings-menu-container s-p",null,nt,ht),[()=>({mobile:d(),hidden:!r()})]),b(t,ot),H(),o()}Ze(["keydown","click"]);var zC=L('<button class="btn s-1c"> </button>'),WC={hash:"s-1c",code:"button.btn.s-1c{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function bv(t,e){Q(t,WC);var i=zC();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=C(i,!0);S(i),O(()=>ge(o,e.label)),b(t,i)}Ze(["click"]);var KC=L('<div class="container s-r"><div class="notification s-r"><div><p class="description s-r"><!></p> <!></div> <!></div></div>'),qC={hash:"s-r",code:".container.s-r{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px;z-index:var(--controls-container-z-index)}.notification.s-r{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-r{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function fc(t,e){B(e,!0),Q(t,qC);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Mt(),{ui:{t:r}}=$e(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=KC(),d=C(l),s=C(d),u=C(s),m=C(u);uc(m,{get message(){return a}}),S(u);var p=k(u,2);{var v=y=>{let $=f(()=>r("slow_video_notification_button"));bv(y,{get label(){return n($)},get onClick(){return e.onSelectAutoQuality}})};V(p,y=>{o||y(v)})}S(s);var _=k(s,2);Rs(_,{get onClick(){return e.onClose}}),S(d),S(l),Ms(3,d,()=>pa,()=>({duration:i})),b(t,l),H()}import{isIntersecting as Mb,Subscription as QC}from"@vkontakte/videoplayer-shared/es2018";var Xa="annotation",op=class{constructor(e){this.slots=new Map;this.disabledIds=new Set(e)}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var s;let{overlay:o,id:r,controlsBehaviour:a,hideAllControls:l}=i;if(this.disabledIds.has(r))return{success:!1,message:"current slotId is disabled via config"};let d=typeof e=="function"?e():e;return d.setAttribute("slot",Xa),this.setupSlotStyles(d,o),this.shadowRootContainer.append(d),this.slots.set(r,{rootElement:d,options:i}),a&&this.runHidingControlsWhenIntersected(r,a),l&&((s=this.store)==null||s.ui.isControlsAvailable.set(!1)),{success:!0}}setupSlotStyles(e,i){switch(e.style.position="absolute",i){case"over_video":e.style.zIndex="calc(var(--video-container-z-index) + 1)";break;case"over_controls":e.style.zIndex="calc(var(--controls-container-z-index) + 1)";break;default:e.style.zIndex="0"}}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(p=>p.forEach(()=>{let v=Os(a,this.shadowRootContainer);o.forEach(_=>{let y=l==null?void 0:l[_],$=y?be(y):null,x=d==null?void 0:d[_];$&&(x==null||x.set(Mb($,v)))})}));s.observe(a,{childList:!0,subtree:!0}),r.observer=s;let u=new QC;o.forEach(p=>{l&&u.add(l[p].subscribe(v=>{let _=d==null?void 0:d[p];v&&v.isDisplayed?_==null||_.set(Mb(v,Os(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(p=>p==null?void 0:p.disconnect()),l==null||l.unsubscribe(),this.slots.delete(e),s&&((u=this.store)==null||u.ui.isControlsAvailable.set(!0)),(m=d==null?void 0:d.controlsToObserve)==null||m.forEach(p=>{var v,_;(_=(v=this.store)==null?void 0:v.ui.hiddenControls[p])==null||_.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var GC=L('<div class="container s-5"><!></div>'),YC={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 mc(t,e){B(e,!0),Q(t,YC);let i=h(e,"reversed",3,!1);var o=Re(),r=le(o);ks(r,()=>e.Icon,a=>{var l=GC(),d=C(l);Ni(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),S(l),O(()=>qe(l,`animation-duration: ${e.duration}ms`)),b(a,l)}),b(t,o),H()}import{PlaybackState as Vb}from"@vkontakte/videoplayer-core/es2018";var jC=L('<div class="container s-z"><!></div>'),XC={hash:"s-z",code:".container.s-z{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function $v(t,e){B(e,!0),Q(t,XC);let[i,o]=Be(),r=()=>w(s,"$playbackState$",i),a=()=>w(m,"$previewTrackActive",i),l=()=>w(p,"$previewTrackDragInProgress",i),d=()=>w(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:m,previewTrackDragInProgress:p}}=$e(),{features:{playbackStatusShow:v},playbackStatusAnimationDuration:_}=Mt(),y=0,$=K(null),x=K(!1);He(()=>{r()===Vb.PLAYING?N($,Tn,!0):r()===Vb.PAUSED?N($,Fs,!0):N($,null)}),He(()=>{if(!(!v||a()||l()))return y=window.setTimeout(()=>{y=0,N($,null)},_),()=>{y&&(window.clearTimeout(y),y=0)}}),He(()=>{d()&&!n(x)&&(N(x,!0),N($,null))});var I=Re(),T=le(I);{var R=A=>{var P=jC(),E=C(P);mc(E,{get duration(){return _},get Icon(){return n($)}}),S(P),b(A,P)};V(T,A=>{n($)&&v&&A(R)})}b(t,I),H(),o()}var ZC=L('<div><div data-testid="video-container"></div></div>'),JC={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 Za(t,e){B(e,!0),Q(t,JC);let[i,o]=Be(),r=()=>w(p,"$rotateAlpha",i),a=()=>w(v,"$playerSize",i),l=()=>w(m,"$playerPhase",i),d=()=>w(y,"$chromecastConnected$",i),s=()=>w(_,"$isPlaying$",i),u=h(e,"videoContainer",15),{playerPhase:m,ui:{rotateAlpha:p,playerSize:v},state:{isPlaying$:_,chromecastConnected$:y}}=$e(),{isSmoothVideoRotate:$}=Mt(),x=f(()=>u()&&r()%180?a().height/a().width:1);var I=ZC();let T;I.__contextmenu=function(...P){var E;(E=e.onContextMenu)==null||E.apply(this,P)},I.__mousedown=function(...P){var E;(E=e.onMouseDown)==null||E.apply(this,P)},I.__mouseup=function(...P){var E;(E=e.onMouseUp)==null||E.apply(this,P)},I.__click=function(...P){var E;(E=e.onClick)==null||E.apply(this,P)},I.__dblclick=function(...P){var E;(E=e.onDblClick)==null||E.apply(this,P)};var R=C(I);let A;et(R,P=>u(P),()=>u()),S(I),O((P,E)=>{T=oe(I,1,"video-wrapper s-c",null,T,P),A=oe(R,1,"video-container s-c",null,A,E),qe(R,`transform: rotate(${r()}deg) scale(${n(x)})`),Ne(R,"data-is-playing",s())},[()=>({hidden:l()!=="video"||d(),nocursor:e.hideCursor}),()=>({"fast-rotate":!$})]),b(t,I),H(),o()}Ze(["contextmenu","mousedown","mouseup","click","dblclick"]);var eT=L('<div><span class="text s-10"> </span> <!></div>'),tT={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 yv(t,e){B(e,!0),Q(t,tT);let{ui:{t:i}}=$e();var o=eT();let r;var a=C(o),l=C(a,!0);S(a);var d=k(a,2);sc(d,{get size(){return"16"},fill:"currentColor"}),S(o),O((s,u)=>{r=oe(o,1,"root s-10",null,r,s),ge(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),b(t,o),H()}var iT=L('<div class="container s-y" role="button" data-testid="preview-track-overlay"><div class="icon s-y"><!></div></div>'),oT={hash:"s-y",code:".container.s-y{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-y,.icon.s-y{align-items:center;display:flex;justify-content:center}.icon.s-y{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-y:hover .icon:where(.s-y){transform:scale(1.15)}"};function xv(t,e){B(e,!1),Q(t,oT);let o=$e().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};jo();var l=iT();l.__click=a;var d=C(l),s=C(d);return Tn(s,{get size(){return"32"}}),S(d),S(l),Ms(3,l,()=>pa,()=>({duration:r})),b(t,l),uf(e,"handleClick",a),H({handleClick:a})}Ze(["click"]);var nT=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},rT=L("<div><!></div>"),sT=L('<div class="spherical-video-icon s-8"><!></div>'),aT=L("<div><!></div>"),lT=L('<div class="settings-menu s-8"><!></div>'),dT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),cT=L("<!> <!> <!>",1),uT=L('<div class="blocked s-8"></div>'),pT=L('<div class="player-wrapper s-8"><!> <div class="overlay-container"></div></div> <!>',1),fT={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 wv(t,e){B(e,!0),Q(t,fT);let[i,o]=Be(),r=()=>w(Nr,"$notificationsToShow$",i),a=()=>w(di,"$playerPhase",i),l=()=>w(Zo,"$isLoaderVisible",i),d=()=>w(Ii,"$adPlaybackState",i),s=()=>w(gi,"$crashed",i),u=()=>w(kn,"$isInteractiveTime$",i),m=()=>w(ct,"$settingsMenuVisible",i),p=()=>w(go,"$isInteractiveExpectation$",i),v=()=>w(Gi,"$controlsVisible",i),_=()=>w(Lo,"$touched",i),y=()=>w(os,"$graphIsOpened$",i),$=()=>w(rt,"$isFullscreen",i),x=()=>w(Rr,"$autoplayNextEnabled$",i),I=()=>w(z,"$postrollPassed",i),T=()=>w(Ao,"$isEnded$",i),R=()=>w(er,"$cursorInside",i),A=()=>w(fn,"$isControlsAvailable",i),P=()=>w(gr,"$doubleForwardOn$",i),E=()=>w(Xn,"$fakeIsPlaying$",i),W=()=>w(Vn,"$bottomNoSmooth",i),F=()=>w(Mr,"$interactiveTimeIndicator",i),U=()=>w(Li,"$playerSize",i),X=()=>w(Pn,"$is3DVideo",i),se=()=>w(mn,"$doubleForwardAvailable$",i),j=()=>w(nt,"$contextMenuVisible$",i),ne=()=>w(li,"$playbackState$",i),Z=()=>w(Mo,"$hotKeyMapData",i),Te=()=>w(fi,"$scrubbingInProgress",i),fe=()=>w(ot,"$volumeChangingInProgress",i),te=()=>w(ht,"$chromecastConnected$",i),_e=()=>w(en,"$controlsTimeoutActive",i),Ce=()=>w(En,"$adsPlaybackState",i),me=()=>w(Nt,"$settingsMenuOpenedByKeyboard",i),ce=()=>w(So,"$contextMenuOpenedByKeyboard$",i),Qe=()=>w(Fo,"$contextMenuOpenedByHotKey$",i),G=()=>w(bn,"$contextMenuButtonRef$",i),D=()=>w(or,"$contextMenuLastActiveElem$",i),Ye=()=>w(ci,"$isFullscreenOpenedByKeyboard",i),re=()=>w(pn,"$positionExact$",i),pe=()=>w(si,"$language$",i),ue=()=>w(Cr,"$previewTrackActive$",i),Ae=()=>w(xi,"$icon3DVideoVisible",i),Ue=()=>w(Ot,"$chromecastDeviceName$",i),ee=()=>w(st,"$currentSubtitle$",i),de=()=>w(Di,"$currentSubtitleCaptions$",i),ke=()=>w(po,"$position$",i),xe=()=>w(fo,"$duration$",i),Xe=()=>w(kt,"$isLive$",i),Pe=()=>w(lt,"$isPlaying$",i),we=()=>w(Vr,"$contextMenuPosition$",i),De=()=>w(mo,"$showHotKeyMap",i),Ct=()=>w(Ci,"$debugPanelVisible",i),Tt=()=>w(Jo,"$userActionsDisabled$",i),Et=h(e,"videoContainer",15),dt=h(e,"adsSlotId",3,void 0),wt=h(e,"adsParams",3,void 0),Yt=h(e,"adsAutoplayParam",3,void 0),Dt=h(e,"duration",3,void 0),Rt=h(e,"logoTargetUrl",3,""),Ut=h(e,"showNextPrevButtons",3,!1),q=h(e,"nextButtonActive",3,!1),Le=h(e,"prevButtonActive",3,!1),Me=h(e,"endScreenVideoTitle",3,void 0),ye=h(e,"endScreenVideoThumb",3,void 0),Fe=h(e,"isOneVideoPlaylist",3,!1),Se=h(e,"shadowRootContainer",3,void 0),xt=h(e,"outerContainerRef",3,void 0),ve=h(e,"playerStarted",3,!1),Oe=h(e,"fullScreenTarget",3,void 0),Ke=h(e,"showMiniTimer",3,!1),at=h(e,"showEndScreen",3,!0),qt=h(e,"keyboardControls",15),Pt=e.store.getLogger().createComponentLog("Root component"),si=e.store.interfaceLanguage$,li=e.store.state.playbackState$,Ii=e.store.ads.playbackState,po=e.store.state.positionWithScrubbing$,fo=e.store.state.duration$,di=e.store.playerPhase,rt=e.store.ui.isFullscreen,ci=e.store.ui.isFullscreenOpenedByKeyboard,Gi=e.store.ui.controlsVisible,ct=e.store.ui.settingsMenu.visible$,Nt=e.store.ui.settingsMenu.openedByBtnKeyboard$,fi=e.store.ui.scrubbingInProgress,ot=e.store.ui.volumeChangingInProgress,nt=e.store.ui.contextMenu.visible$,Ci=e.store.ui.debugPanelVisible,Zo=e.store.state.isLoaderVisible,Ao=e.store.state.isEnded$,ht=e.store.state.chromecastConnected$,Ot=e.store.state.chromecastDeviceName$,z=e.store.ads.postrollPassed,kt=e.store.state.isLive$,lt=e.store.state.isPlaying$,gi=e.store.state.crashed$,jt=e.store.webApi.annotationsApi,$t=e.store.webApi.pictureInPictureApi,st=e.store.state.currentSubtitle$,Di=e.store.state.currentSubtitleCaptions$,Li=e.store.ui.playerSize,En=e.store.ads.playbackState,Pn=e.store.ui.is3DVideo,xi=e.store.ui.icon3DVideoVisible,Yi=e.store.state.isInteractive,kn=e.store.state.isInteractiveTime$,go=e.store.state.isInteractiveExpectation$,_i=e.store.state.hasInteractiveBranches,Lo=e.store.ui.touched,Mo=e.store.ui.modals.hotKeyMap.data,mo=e.store.ui.modals.hotKeyMap.show,pn=e.store.state.positionExact$,es=e.store.ui.overlayContainer$,Mr=e.store.ui.controls.interactiveTimeIndicator,ts=e.store.state.showInteractiveTimeIndicator,Vr=e.store.ui.contextMenu.position$,Yn=e.store.actions.internal.setQuality,is=e.store.actions.internal.closeSettingsMenu,Rr=e.store.ui.autoplayNextEnabled$,Jo=e.store.ui.userActionsDisabled,fn=e.store.ui.isControlsAvailable,vr=e.store.ui.videoTitleInfo,gr=e.store.ui.doubleForwardOn$,mn=e.store.ui.doubleForwardAvailable$,jn=e.store.actions.internal.getVideoElement,hr=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:Xn,notifications$:Zn,graphIsOpened$:os}=vo(),ho=K(void 0),_r=K(void 0),Oi=K(void 0),br=K(void 0),An,vt,Xt;Mo.set(S_());let{closeNotification:$r,notificationsToShow$:Nr}=Zn,Dr=f(()=>!!r().slow_video),Ln=()=>$r("slow_video"),Mn=f(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),Vo=K(void 0),Vn=ae(!1),Jn,en=ae(!1),vn=ae(),er=ae(!1),gn=K(!1),tn=K(!1),Mi=K(!1),no=K(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),on=f(()=>u()&&!m()&&!(n(gn)||n(tn))&&!(n(Mi)&&!p())),tr=!0,yr=f(()=>e.uiConfig.features.thumbTimer&&Ke()&&a()==="video"&&!v()&&!s()&&!Yi&&(e.uiConfig.hideThumbTimerAfterTouch&&!_()||!e.uiConfig.hideThumbTimerAfterTouch)),hn=e.uiConfig.titleShowBehaviour,ir=f(()=>!["video","thumb"].includes(a())||hn==="never"||y()?!1:hn==="fullscreen"?$():!0),Ge=f(()=>hn==="always"||a()==="thumb"?!1:!v()),ai=K(!1),Ro=f(()=>(at()||e.showAutoplayNext&&x())&&!!Me()&&!!ye()&&(e.showAds&&I()||!e.showAds)&&T()&&!s()&&!n(ai)&&!_i),No=f(()=>R()&&!(v()||n(Ro))&&!u()&&A()&&!P()),nn=K(!1),_o=f(()=>E()!==null),{toggle:bo}=Xn,Ei=!1,$o=null;$t==null||$t.setContext(Jl());let Or=()=>{e.autoplay&&!Yi&&e.uiConfig.controls.showOnStartupAtAutoplay&&Bi(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:Or});let xr=()=>{window.clearTimeout(An),en.set(!1)},_s=()=>{window.clearTimeout(vt),vn.set(null)},Bi=he=>{xr(),en.set(!0),An=window.setTimeout(()=>en.set(!1),he);let yt=he-100;Jn=window.setTimeout(()=>{W()&&Vn.set(!1)},yt>0?yt:he)},bs=(he,yt)=>{_s(),vn.set(yt),vt=window.setTimeout(()=>vn.set(null),he)},ns=Pn.subscribe(he=>{xi.set(he),he&&(window.clearTimeout(Xt),Xt=window.setTimeout(()=>xi.set(!1),e.uiConfig.controls.hide360IconTimeout))}),wr=async()=>{var yt,Gt,Zt,Uo;let he=na();if(he){let so=Id(),Xi=rn();he=so===Xi||so===Se()}if(he){Bi(e.uiConfig.controls.hideTimeoutFullscreen);try{await($t==null?void 0:$t.exit())}catch(so){Pt({message:String(so)})}}rt.set(he),e.store.getAdmanWrapper().setFullscreen(he),$()?(Gt=(yt=e.store.callbacks)==null?void 0:yt.onFullscreenEnter)==null||Gt.call(yt):(Uo=(Zt=e.store.callbacks)==null?void 0:Zt.onFullscreenExit)==null||Uo.call(Zt)},Do=he=>{Li.set(he)},Br=()=>{if(n(ho)){let{width:he,height:yt}=n(ho).getBoundingClientRect();Li.set({width:he,height:yt})}};Lt(()=>{var yt;return Eu(wr),e.uiConfig.features.annotationsInside&&(jt==null||jt.init(n(ho))),$t==null||$t.assignPlayerContainer(n(ho)),e.uiConfig.disablePiPResizeHandling||$t==null||$t.setExternalEventHandlers({resize:Do,leavepictureinpicture:Br}),e.interactiveContainer&&((yt=Et().parentElement)==null||yt.insertBefore(e.interactiveContainer,Et().nextSibling)),()=>{window.clearTimeout(An),window.clearTimeout(Jn),window.clearTimeout(vt),window.clearTimeout(Xt),ns(),$t==null||$t.dispose().catch(Gt=>{Pt({message:String(Gt)})}),Pu(wr)}});let rn=()=>{let he=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!xt()?n(ho):xt(),yt=he.getRootNode(),Gt=yt instanceof ShadowRoot?yt.host:yt,Zt=Oe()instanceof HTMLElement&&Oe().contains(Gt);return e.uiConfig.allowChangingFullscreenTarget&&Oe()&&Zt?Oe():he},Pi=()=>{nt.set(!1)},ze=()=>{is(),Pi()},At=async()=>{if(!hr()){Pt({message:"fullscreen disabled"});return}Pi(),na()?(await Iu(document),Pt({message:"exit fullscreen"})):(Pt({message:"request fullscreen"}),await Tu(rn()))},ui=he=>{y()||(he.preventDefault(),nt.set(!0),Vr.set({left:he.clientX,top:he.clientY}))};function Oo(){er.set(!0),Yi||Bi(e.uiConfig.controls.hideTimeoutCursor)}function yo(he){var so,Xi;let{relatedTarget:yt}=he,Zt=!!(yt&&((so=n(Oi))!=null&&so.contains(yt)))&&((Xi=qt())==null?void 0:Xi.isFocused()),Uo=e.uiConfig.controls.showOnStartupAtAutoplay||!!yt;!Yi&&!Zt&&Uo&&(Vn.set(!0),Bi(e.uiConfig.controls.hideTimeoutCursor))}function xo(){er.set(!1),N(tn,!1),N(gn,!1),Ei=!1,e.store.actions.internal.releaseCamera(),Bi(e.uiConfig.controls.hideTimeout),P()&&Ho()}function Hi(he){return he?he.offsetTop+Hi(he.offsetParent):0}function Bo(he){return he?he.offsetLeft+Bo(he.offsetParent):0}function Rn(he){if(F()&&ts){let yt=he.currentTarget,Gt=Hi(yt),Zt=Bo(yt),Uo=he.pageX-Zt,so=he.pageY-Gt,{left:Xi,bottom:Bn,right:Ur}=F(),Ss=Ur-Xi;return Uo>=Xi-Ss&&so<=Bn+Ss}}function Sr(he){if(n(ho)){let yt=Hi(he.currentTarget),Gt=U().height,Zt=he.pageY-yt;if(Rn(he)){N(tn,!1);return}Zt<40?N(tn,!0):Zt>Gt-40?N(gn,!0):(N(tn,!1),m()||N(gn,!1))}}function wo(he){Sr(he),!n(on)&&!P()&&Bi(e.uiConfig.controls.hideTimeoutCursor),X()&&Ei&&$o&&e.store.actions.internal.moveCameraFocusPX($o.clientX-he.clientX,$o.clientY-he.clientY,he.timeStamp-$o.timeStamp),$o=he}let ro=null,_n=()=>{ro=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),xr()},e.uiConfig.doubleForwardActivationTime)},Ho=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),ro&&clearTimeout(ro),ro=null},Nn=he=>{he.preventDefault(),he.button===0&&(Ei=!0,e.store.actions.internal.holdCamera(),se()&&_n()),!Ei&&Bi(e.uiConfig.controls.hideTimeoutCursor)},Hr=he=>{he.preventDefault(),he.button===0&&($o=he,Ei=!1,e.store.actions.internal.releaseCamera()),!P()&&Bi(e.uiConfig.controls.hideTimeoutCursor)},Fr=he=>{he.preventDefault(),tr&&(Pt({message:"double click on video"}),At(),Bi(e.uiConfig.controls.hideTimeoutCursor))},Dn=he=>{var yt;if(he.preventDefault(),P()){Ho();return}if(ro&&Ho(),j()||m()){ze();return}if(!(T()&&!_i)){if(n(_o))return bo();if((yt=qt())==null||yt.focus(),!ve()){e.firstStart(),Bi(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||ne()!==Nb.PLAYING)&&e.store.actions.internal.togglePlay(),Bi(e.uiConfig.controls.hideTimeoutCursor)}},tt=he=>{ze(),Lo.set(!0),Bi(e.uiConfig.controls.hideTimeout),he&&bs(e.uiConfig.controls.hideHotKeyHelpers,he)},Qt=()=>{var he,yt;ze(),(he=e.store.callbacks)!=null&&he.onOpenHotKeyMap?(yt=e.store.callbacks)==null||yt.onOpenHotKeyMap(Z()):mo.update(Gt=>!Gt)},bi=()=>{Lo.set(!0)},So=e.store.ui.contextMenu.openedByBtnKeyboard$,bn=e.store.ui.contextMenu.btnRef$,On=K(void 0),Fo=e.store.ui.contextMenu.openedByHotKey$,or=e.store.ui.contextMenu.lastActiveElem$,rs=K(!1),Cr=e.store.ui.previewTrackActive;He(()=>{es.set(n(Vo))}),He(()=>{N(Mi,n(no)&&ne()!==Nb.PLAYING,!0),n(no)||St(()=>N(no,!0))}),He(()=>{var yt,Gt;let he=(n(Mi)||T()||m()||Te()||fe()||te()||_e()||n(rs))&&!n(on)&&(a()==="video"||a()==="ads"&&(e.uiConfig.controls.showOnStartupAtAutoplay||Ce()!=="inactive"))&&!s()&&A();Gi.set(he),!he&&!_e()&&((yt=n(Oi))!=null&&yt.contains(Nu()))&&((Gt=qt())==null||Gt.focus())}),He(()=>{!Te()&&n(nn)&&!u()&&Bi(e.uiConfig.controls.hideTimeoutCursor),St(()=>N(nn,Te(),!0))}),He(()=>{n(br),m(),me(),St(()=>Md(n(br),m(),me()))}),He(()=>{n(On),j(),ce(),Qe(),St(()=>{let he=ce()||Qe();Md(n(On),j(),he)})}),He(()=>{let he=G();he&&(j(),St(()=>Ll(he,j(),So)))}),He(()=>{let he=D();he&&(j(),St(()=>A_(he,j(),Fo)))}),He(()=>{var he;!Ye()&&$()&&(St(()=>ci.set(!1)),(he=qt())==null||he.focus())}),He(()=>{y()&&ze()});let $s=K(void 0),zs=he=>{vr.set(Qn(jn(),{title:n($s)},"title",he))},ma=(he,yt)=>{var so,Xi;let Gt=(Xi=(so=e.store.callbacks)==null?void 0:so.uiInfo)==null?void 0:Xi.onUpcomingLiveViewStateChanged;if(!Gt)return;let Zt=!!yt,Uo={...Qn(n(ho),{upcomingLiveScreen:yt},"upcomingLiveScreen",Zt),...he};Gt(Uo)},ut="",ni=f(()=>{var he;return n(Ge)?ut:(he=e.getVideoDeeplink)==null?void 0:he.call(e,re())});He(()=>{ut=n(ni)});var Co=pT();pt("blur",Ca,ze);var $i=le(Co);$i.__mousemove=wo;var ji=C($i);let ys=f(()=>a()==="ads"),xs=f(()=>n(_o)?bo:void 0);et(Kf(ji,{startDoubleForwardActivationTimer:_n,stopDoubleForward:Ho,toggleFullscreen:At,hideContextMenu:ze,showHotKeyHelpers:tt,showKeyMap:Qt,get isAds(){return n(ys)},get fakePlayButtonHandler(){return n(xs)},get nextButtonActive(){return q()},get prevButtonActive(){return Le()},children:(he,yt)=>{var Gt=cT(),Zt=le(Gt);Za(Zt,{get hideCursor(){return n(No)},onClick:Dn,onContextMenu:ui,onMouseDown:Nn,onMouseUp:Hr,onDblClick:Fr,get videoContainer(){return Et()},set videoContainer(Xi){Et(Xi)}});var Uo=k(Zt,2);Aa(Uo,()=>"slot",!1,(Xi,Bn)=>{to(Xi,()=>({name:Xa}))});var so=k(Uo,2);ks(so,pe,Xi=>{var Bn=dT(),Ur=le(Bn);let Ss=f(()=>a()!=="thumb"||s()||Yi&&e.autoplay);Ga(Ur,{get hidden(){return n(Ss)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:ui,onClick:Pi});var Ja=k(Ur,2);{var zr=We=>{xv(We,{})};V(Ja,We=>{ue()&&We(zr)})}var ss=k(Ja,2);$v(ss,{});var Ws=k(ss,2);yv(Ws,{get isVisible(){return P()}});var nr=k(Ws,2);{var ql=We=>{let vi=f(()=>{var zo;return(zo=e.live)==null?void 0:zo.startTime});dc(We,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(vi)},onUpcomingLiveViewStateChanged:ma,onContextMenu:ui,onClick:Pi})};V(nr,We=>{a()==="LiveWaitingStart"&&We(ql)})}var el=k(nr,2);{var Wr=We=>{Ya(We,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:ui,onClick:Pi})};V(el,We=>{a()==="LiveWaitingRecover"&&We(Wr)})}var va=k(el,2);{var Ql=We=>{Ya(We,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:ui,onClick:Pi})};V(va,We=>{a()==="LiveWaitingRecord"&&We(Ql)})}var tl=k(va,2);{var il=We=>{var vi=rT();let zo;var Tr=C(vi);Ed(Tr,{get adsSlotId(){return dt()},get adsParams(){return wt()},get adsAutoplayParam(){return Yt()},get duration(){return Dt()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson}}),S(vi),O(To=>zo=oe(vi,1,"ads-container s-8",null,zo,To),[()=>({hidden:a()!=="ads"})]),b(We,vi)};V(tl,We=>{e.showAds&&ve()&&We(il)})}var ga=k(tl,2);{var ft=We=>{let vi=f(()=>!at()&&e.showAutoplayNext&&x());Uf(We,{get title(){return Me()},get thumb(){return ye()},get isHide(){return n(vi)},clickCloseIcon:()=>N(ai,!0)})};V(ga,We=>{n(Ro)&&Me()&&ye()&&We(ft)})}var mt=k(ga,2);{var Zi=We=>{let vi=f(()=>$()?"md":"sm"),zo=f(()=>{var Tr;return(Tr=e.store.callbacks)==null?void 0:Tr.onTitleClicked});jm(We,{get title(){return e.title},get isHidden(){return n(Ge)},onVisibilityChanged:zs,get titleLinkHref(){return n(ni)},onMouseEnter:()=>{N(rs,!0)},onMouseLeave:()=>{N(rs,!1)},get size(){return n(vi)},get onTitleClicked(){return n(zo)},get ref(){return n($s)},set ref(Tr){N($s,Tr,!0)}})};V(mt,We=>{n(ir)&&We(Zi)})}var ki=k(mt,2);{var Ji=We=>{let vi=f(()=>a()==="video"&&v());ac(We,{get isShifted(){return n(vi)}})};V(ki,We=>{X()&&We(Ji)})}var mi=k(ki,2);{var Ui=We=>{var vi=sT(),zo=C(vi);Td(zo,{}),S(vi),b(We,vi)};V(mi,We=>{Ae()&&We(Ui)})}var Ks=k(mi,2);{var Gl=We=>{lc(We,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Ue()},onClick:Dn,onContextMenu:ui,onDblClick:Fr})};V(Ks,We=>{te()&&We(Gl)})}var Tc=k(Ks,2);{var vp=We=>{qa(We,{get shifted(){return v()},get captions(){return de()},get position(){return ke()},get playerSize(){return U()}})};V(Tc,We=>{ee().value!=="off"&&a()==="video"&&We(vp)})}var Ic=k(Tc,2);{var gp=We=>{var vi=aT();vi.__contextmenu=ui,vi.__click=[nT,j,nt,m,ct,ze];var zo=C(vi);Qa(zo,{}),S(vi),b(We,vi)};V(Ic,We=>{s()&&We(gp)})}var Ec=k(Ic,2);{var hp=We=>{let vi=f(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),zo=f(()=>a()==="ads"),Tr=f(()=>e.canRewindLive&&xe()!==0);rc(We,{get bottomHidden(){return n(vi)},get bottomNoSmooth(){return W()},get showControls(){return v()},get isAds(){return n(zo)},get canRewindLive(){return n(Tr)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Rt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Ut()},get nextButtonActive(){return q()},get prevButtonActive(){return Le()},get isOneVideoPlaylist(){return Fe()},customFullscreenSupported:tr,toggleFullscreen:At,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(_r)},set playerControlsWrapperRef(To){N(_r,To,!0)},get playerControlsRef(){return n(Oi)},set playerControlsRef(To){N(Oi,To,!0)}})};V(Ec,We=>{ve()&&We(hp)})}var Pc=k(Ec,2);{var _p=We=>{var vi=lT(),zo=C(vi);let Tr=f(()=>{var To;return(To=n(Oi))==null?void 0:To.clientHeight});pc(zo,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(Tr)},returnFocus:()=>{var To;return(To=qt())==null?void 0:To.focus()},get ref(){return n(br)},set ref(To){N(br,To,!0)}}),S(vi),b(We,vi)};V(Pc,We=>{!te()&&a()!=="ads"&&We(_p)})}var kc=k(Pc,2);let bp=f(()=>!n(yr));Ad(kc,{get isLive(){return Xe()},get isHidden(){return n(bp)},get isPlaying(){return Pe()},get position(){return ke()},get duration(){return xe()}});var ha=k(kc,2);Gm(ha,{get data(){return vn}});var Ac=k(ha,2);Ff(Ac,{get supportLink(){return e.supportLink},returnFocus:()=>{var We;return(We=qt())==null?void 0:We.focus()},get visible(){return j()},get playerContainerRef(){return n(ho)},get position(){return we()},get menuElementRef(){return n(On)},set menuElementRef(We){N(On,We,!0)}});var qs=k(Ac,2);{var ol=We=>{fc(We,{onClose:Ln,onSelectAutoQuality:()=>{Yn("auto"),Ln()}})};V(qs,We=>{n(Dr)&&We(ol)})}var Lc=k(qs,2);{var Mc=We=>{Oa(We,{})};V(Lc,We=>{n(Mn)&&We(Mc)})}var nl=k(Lc,2);{var Vc=We=>{Gf(We,{})};V(nl,We=>{De()&&We(Vc)})}var $p=k(nl,2);{var Rc=We=>{Nd(We,{})};V($p,We=>{Ct()&&We(Rc)})}b(Xi,Bn)}),b(he,Gt)},$$slots:{default:!0}}),he=>qt(he),()=>qt());var ws=k(ji,2);et(ws,he=>N(Vo,he),()=>n(Vo)),S($i),et($i,he=>N(ho,he),()=>n(ho));var Fi=k($i,2);{var Ti=he=>{var yt=uT();b(he,yt)};V(Fi,he=>{Tt()&&he(Ti)})}pt("mouseenter",$i,Oo),pt("mouseleave",$i,xo),pt("click",$i,bi,!0),pt("focusin",$i,yo,!0),b(t,Co),H(),o()}Ze(["mousemove","contextmenu","click"]);import{clientChecker as vc,PlaybackState as wT}from"@vkontakte/videoplayer-core/es2018";import{noop as ST}from"@vkontakte/videoplayer-shared/es2018";var mT=L('<div></div> <div class="info s-h"><div class="triangles-wrapper s-h"><div></div> <div></div> <div></div></div> <p class="step-caption s-h"> </p></div>',1),vT=L("<div><!></div>"),gT={hash:"s-h",code:".double-click-area.s-h{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-h{left:0}.double-click-area.right.s-h{right:0}.semicircle.s-h{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-h{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-h{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-h{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-h,.triangles-wrapper.s-h{display:flex;justify-content:center}.triangles-wrapper.s-h{margin-bottom:10px;position:relative}.triangle.s-h{animation:s-h-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-h:nth-child(3),.triangle.right.s-h:first-child{animation-delay:0s}.triangle.left.s-h:nth-child(2),.triangle.right.s-h:nth-child(2){animation-delay:.1s}.triangle.left.s-h:first-child,.triangle.right.s-h:nth-child(3){animation-delay:.2s}@keyframes s-h-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-h{border-right:8px solid var(--white)}.triangle.right.s-h{border-left:8px solid var(--white)}.triangle.s-h:not(:last-child){margin-right:5px}.step-caption.s-h{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function np(t,e){B(e,!0),Q(t,gT);let i=h(e,"seekStep",3,0),o=K(!1),r=0,a=0,l=K(ri(i())),d=p=>{p.stopPropagation(),a+=1,N(l,i()*(a-1)),a===1?e.handleSingleFirstClick(p):(N(o,!0),e.handleSecondClick()),window.clearTimeout(r),r=window.setTimeout(()=>{a=0,N(o,!1)},300)};ln(()=>{window.clearTimeout(r)});var s=vT();s.__click=d;var u=C(s);{var m=p=>{var v=mT(),_=le(v),y=k(_,2),$=C(y),x=C($),I=k(x,2),T=k(I,2);S($);var R=k($,2),A=C(R,!0);S(R),S(y),O(P=>{var E,W,F,U;oe(_,1,`semicircle ${(E=e.side)!=null?E:""}`,"s-h"),oe(x,1,`triangle ${(W=e.side)!=null?W:""}`,"s-h"),oe(I,1,`triangle ${(F=e.side)!=null?F:""}`,"s-h"),oe(T,1,`triangle ${(U=e.side)!=null?U:""}`,"s-h"),ge(A,P)},[()=>Y("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),b(p,v)};V(u,p=>{n(o)&&p(m)})}S(s),O(()=>{var p;return oe(s,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-h")}),b(t,s),H()}Ze(["click"]);var hT=(t,e,i)=>{e(!1),i()},_T=L('<div class="overlay s-j"></div> <div class="next-video s-j"><div class="top s-j"><div class="caption s-j"> </div> <!></div> <div class="row s-j"><div class="column s-j"><div class="thumb s-j"><div></div> <!></div></div> <div class="column s-j"><div class="title s-j"> </div></div></div></div>',1),bT={hash:"s-j",code:".overlay.s-j{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-j{display:flex;flex-direction:column;left:50%;margin:0 auto;max-width:362px;min-width:320px;padding-bottom:12px;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:var(--end-screen-mobile-z-index)}.top.s-j{display:flex;justify-content:space-between}.caption.s-j{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-j{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-j{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-j{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-j,.thumb-overlay.s-j{height:100%;width:100%}.thumb-overlay.s-j{position:absolute}.thumb-overlay.withOpacity.s-j{background:var(--black);opacity:.3}.title.s-j{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Sv(t,e){B(e,!0),Q(t,bT);let[i,o]=Be(),r=()=>w(d,"$autoplayNextEnabled$",i),a=()=>w(s,"$timerNextVideoRunning$",i),l=$e(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,m=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,_=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),v()},$=()=>{e.clickCloseIcon(),_()};Lt(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),v())});var x=Re(),I=le(x);{var T=R=>{var A=_T(),P=k(le(A),2),E=C(P),W=C(E),F=C(W,!0);S(W);var U=k(W,2);Rs(U,{onClick:$}),S(E);var X=k(E,2);X.__click=[hT,u,p];var se=C(X),j=C(se),ne=C(j);let Z;var Te=k(ne,2);{var fe=me=>{Dd(me,{get isRunning(){return a()},onTimerEnded:y})};V(Te,me=>{r()&&me(fe)})}S(j),S(se);var te=k(se,2),_e=C(te),Ce=C(_e,!0);S(_e),S(te),S(X),S(P),O((me,ce)=>{ge(F,me),qe(j,`background-image: url('${e.thumb}')`),Z=oe(ne,1,"thumb-overlay s-j",null,Z,ce),ge(Ce,e.title)},[()=>r()?Y("end_screen_next_video"):Y("end_screen_recommended_video"),()=>({withOpacity:r()})]),b(R,A)};V(I,R=>{e.isHide||R(T)})}b(t,x),H(),o()}Ze(["click"]);import{clientChecker as $T}from"@vkontakte/videoplayer-core/es2018";var Db=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Lt(()=>{$T.device.isIOS&&(o=setTimeout(()=>{let a=t().querySelector("video");if(!a)return;let l=()=>e(!0),d=()=>e(!1);a.addEventListener("webkitbeginfullscreen",l),a.addEventListener("webkitendfullscreen",d),i=()=>{a.removeEventListener("webkitbeginfullscreen",l),a.removeEventListener("webkitendfullscreen",d)}},0))}),ln(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as yT}from"@vkontakte/videoplayer-core/es2018";var rp=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 xT}from"@vkontakte/videoplayer-core/es2018";var Ob=({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=()=>xT.device.isIOS&&be(l)===yT.DASH_LIVE_CMAF,p=()=>{s==null||s(),s=null},v=_=>{if(p(),!m()||!_)return;let y=u();if(!y)return;let $=new rp(y),x=be(d),I=be(a),T=be(r);for(let P of x)I.some(W=>W.value===P.id)&&$.attach(P,T.value===P.id);let R=d.subscribe(P=>{for(let E of P)$.updateSrc(E)}),A=()=>{let P=$.getCurrentShowingId();o(be(a).find(E=>E.value===P))};y.textTracks.addEventListener("change",A),s=()=>{R(),$.detachAll(),y.textTracks.removeEventListener("change",A)}};Lt(()=>i.subscribe(v)),ln(p)};var CT=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},TT=L("<!> <!>",1),IT=L("<div><!></div>"),ET=L('<div class="spherical-video-icon s-9"><!></div>'),PT=L("<div><!></div>"),kT=L('<div class="settings-mobile s-9"><!></div>'),AT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),LT=L('<div class="player-wrapper s-9" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),MT={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 Cv(t,e){var hn,ir;B(e,!0),Q(t,MT);let[i,o]=Be(),r=()=>w(Fe,"$playerPhase",i),a=()=>w(li,"$isLoaderVisible",i),l=()=>w(Le,"$adPlaybackState",i),d=()=>w(Nt,"$crashed",i),s=()=>w(Vr,"$notificationsToShow$",i),u=()=>w(q,"$playbackState$",i),m=()=>w(Dt,"$graphIsOpened$",i),p=()=>w(Oe,"$interactiveHideMobileControls",i),v=()=>w(Ii,"$isEnded$",i),_=()=>w(gi,"$isInteractiveExpectation$",i),y=()=>w(xt,"$controlsVisible",i),$=()=>w(st,"$touched",i),x=()=>w(Li,"$autoplayNextEnabled$",i),I=()=>w(di,"$postrollPassed",i),T=()=>w(Rr,"$bottomNoSmooth",i),R=()=>w(nt,"$videoSize",i),A=()=>w(ht,"$playerSize",i),P=()=>w(Se,"$isFullscreen",i),E=()=>w(Me,"$position$",i),W=()=>w(ye,"$duration$",i),F=()=>w(En,"$loadedMetadata",i),U=()=>w(Ke,"$settingsMenuVisible",i),X=()=>w(qt,"$scrubbingInProgress",i),se=()=>w(Pt,"$volumeChangingInProgress",i),j=()=>w(po,"$chromecastConnected$",i),ne=()=>w(ve,"$isControlsAvailable",i),Z=()=>w(lt,"$isInteractiveTime$",i),Te=()=>w(Gi,"$isActiveLive",i),fe=()=>w(at,"$settingsMenuOpenedByKeyboard",i),te=()=>w(Ut,"$language$",i),_e=()=>w($t,"$disabledControls$",i),Ce=()=>w(Ot,"$is3DVideo",i),me=()=>w(z,"$icon3DVideoVisible",i),ce=()=>w(fo,"$chromecastDeviceName$",i),Qe=()=>w(Ci,"$currentSubtitle$",i),G=()=>w(Zo,"$currentSubtitleCaptions$",i),D=()=>w(Ao,"$realDuration$",i),Ye=()=>w(rt,"$isLive$",i),re=()=>w(ci,"$isPlaying$",i),pe=()=>w(si,"$debugPanelVisible",i),ue=h(e,"videoContainer",15),Ae=h(e,"adsSlotId",3,void 0),Ue=h(e,"adsParams",3,void 0),ee=h(e,"adsAutoplayParam",3,void 0),de=h(e,"duration",3,void 0),ke=h(e,"logoTargetUrl",3,""),xe=h(e,"showNextPrevButtons",3,!1),Xe=h(e,"nextButtonActive",3,!1),Pe=h(e,"prevButtonActive",3,!1),we=h(e,"endScreenVideoTitle",3,void 0),De=h(e,"endScreenVideoThumb",3,void 0),Ct=h(e,"isOneVideoPlaylist",3,!1),Tt=h(e,"showMiniTimer",3,!1),Et=h(e,"fullScreenTarget",3,void 0),dt=h(e,"playerStarted",3,!1),wt=h(e,"showEndScreen",3,!0),{notifications$:Yt,graphIsOpened$:Dt}=vo(),Rt=e.store.getLogger().createComponentLog("Root component"),Ut=e.store.interfaceLanguage$,q=e.store.state.playbackState$,Le=e.store.ads.playbackState,Me=e.store.state.positionWithScrubbing$,ye=e.store.state.duration$,Fe=e.store.playerPhase,Se=e.store.ui.isFullscreen,xt=e.store.ui.controlsVisible,ve=e.store.ui.isControlsAvailable,Oe=e.store.ui.interactiveHideMobileControls,Ke=e.store.ui.settingsMenu.visible$,at=e.store.ui.settingsMenu.openedByBtnKeyboard$,qt=e.store.ui.scrubbingInProgress,Pt=e.store.ui.volumeChangingInProgress,si=e.store.ui.debugPanelVisible,li=e.store.state.isLoaderVisible,Ii=e.store.state.isEnded$,po=e.store.state.chromecastConnected$,fo=e.store.state.chromecastDeviceName$,di=e.store.ads.postrollPassed,rt=e.store.state.isLive$,ci=e.store.state.isPlaying$,Gi=e.store.state.isActiveLive$,ct=e.store.state.isRewindableLive$,Nt=e.store.state.crashed$,fi=e.store.webApi.annotationsApi,ot=e.store.webApi.pictureInPictureApi,nt=e.store.state.videoSize$,Ci=e.store.state.currentSubtitle$,Zo=e.store.state.currentSubtitleCaptions$,Ao=e.store.state.duration$,ht=e.store.ui.playerSize,Ot=e.store.ui.is3DVideo,z=e.store.ui.icon3DVideoVisible,kt=e.store.state.isInteractive,lt=e.store.state.isInteractiveTime$,gi=e.store.state.isInteractiveExpectation$,jt=e.store.state.hasInteractiveBranches,$t=e.store.ui.controls.disabledControls$,st=e.store.ui.touched,Di=e.store.ui.overlayContainer$,Li=e.store.ui.autoplayNextEnabled$,En=e.store.state.loadedMetadata$,Pn=e.store.actions.internal.closeSettingsMenu,xi=(hn=e.store.callbacks)==null?void 0:hn.onDisabledPlayPrevChapterClick,Yi=(ir=e.store.callbacks)==null?void 0:ir.onDisabledSeekToInteractiveClick,kn=e.store.actions.internal.setQuality,go=K(void 0),_i=K(void 0),Lo=K(void 0),Mo=K(void 0),mo,pn,es=f(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),Mr=K(void 0),{closeNotification:ts,notificationsToShow$:Vr}=Yt,Yn=f(()=>!!s().slow_video),is=()=>ts("slow_video"),Rr=ae(!1),Jo,fn=K(!1),vr=f(()=>u()!==wT.PLAYING),gr=K(!1),mn=f(()=>m()||p()||!n(fn)&&(v()&&!!jt||n(vr)&&_())),jn=K(!0),hr=f(()=>e.uiConfig.features.thumbTimer&&Tt()&&r()==="video"&&!y()&&!d()&&!kt&&(e.uiConfig.hideThumbTimerAfterTouch&&!$()||!e.uiConfig.hideThumbTimerAfterTouch)),Xn=K(!1),Zn=f(()=>(wt()||e.showAutoplayNext&&x())&&!!we()&&!!De()&&(e.showAds&&I()||!e.showAds)&&v()&&!d()&&!n(Xn)),os=K(!1);ot==null||ot.setContext(Jl());let ho=Ge=>{Ge&&!kt&&Oi(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:ho});let _r=()=>{clearTimeout(mo),N(fn,!1),p()&&Oe.set(!1)},Oi=Ge=>{_r(),N(fn,!0),mo=setTimeout(()=>N(fn,!1),Ge);let ai=Ge-100;Jo=setTimeout(()=>{T()&&Rr.set(!1)},ai>0?ai:Ge)},br=Ot.subscribe(Ge=>{z.set(Ge),Ge&&(clearTimeout(pn),pn=setTimeout(()=>z.set(!1),e.uiConfig.controls.hide360IconTimeout))}),An=async(Ge=na())=>{var ai,Ro,No,nn,_o,bo;if(Ge&&!vc.device.isIOS){let Ei=Id(),$o=Ln(),Or=vc.browser.isSamsungBrowser&&Ei===e.shadowRootContainer;Ge=Ei===$o||Or}if(Ge){Oi(e.uiConfig.controls.hideTimeoutFullscreen);try{await(ot==null?void 0:ot.exit())}catch(Ei){Rt({message:String(Ei)})}try{let Ei=(ai=R())!=null&&ai.width&&((Ro=R())!=null&&Ro.height)?R():A();await x_(Ei)}catch(Ei){Rt({message:String(Ei)})}}Se.set(Ge),e.store.getAdmanWrapper().setFullscreen(Ge),P()?(nn=(No=e.store.callbacks)==null?void 0:No.onFullscreenEnter)==null||nn.call(No):(bo=(_o=e.store.callbacks)==null?void 0:_o.onFullscreenExit)==null||bo.call(_o)},vt=Ge=>{ht.set(Ge)},Xt=()=>{if(n(go)){let{width:Ge,height:ai}=n(go).getBoundingClientRect();ht.set({width:Ge,height:ai})}};Lt(()=>{var Ge;return Eu(An),e.uiConfig.features.annotationsInside&&(fi==null||fi.init(n(go))),ot==null||ot.assignPlayerContainer(n(go)),e.uiConfig.disablePiPResizeHandling||ot==null||ot.setExternalEventHandlers({resize:vt,leavepictureinpicture:Xt}),N(jn,!vc.device.isIphoneOrOldIpad),e.interactiveContainer&&((Ge=ue().parentElement)==null||Ge.insertBefore(e.interactiveContainer,ue().nextSibling)),()=>{clearTimeout(mo),clearTimeout(Jo),clearTimeout(pn),br(),ot==null||ot.dispose().catch(ai=>{Rt({message:String(ai)})}),Pu(An)}});let $r=K(!0),Nr=K(!0),Dr=Ge=>{let ai=E()+(Ge==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;ai<0?(N($r,!1),ai=0):ai>=W()&&(N(Nr,!1),ai=W()),N(gr,!0),e.seekTime(ai)},Ln=()=>vc.device.isIOS?n(go):!e.uiConfig.allowChangingFullscreenTarget||!Et()?e.outerContainerRef:Et().contains(e.outerContainerRef)?Et():e.outerContainerRef,Mn=async()=>{try{if(na())await Iu(document),Rt({message:"exit fullscreen"});else{if(Rt({message:"request fullscreen"}),vc.device.isIOS&&!F())return;await Tu(Ln())}}catch(Ge){Rt({message:String(Ge)})}},Vo=()=>{Pn()},Vn=Ge=>{if(Ge.preventDefault(),U()){Vo();return}if(!dt()){e.firstStart(),Oi(e.uiConfig.controls.hideTimeoutCursor);return}N(gr,!1),y()?_r():Oi(e.uiConfig.controls.hideTimeoutMobile)},Jn=()=>{st.set(!0)},en=()=>{kt||(Rr.set(!0),Oi(e.uiConfig.controls.hideTimeoutCursor))},vn=Ge=>{xi&&(xi(Ge),Oi(e.uiConfig.controls.hideTimeoutMobile))},er=Ge=>{Yi&&(Yi(Ge),Oi(e.uiConfig.controls.hideTimeoutMobile))};He(()=>{Di.set(n(Mr))}),He(()=>{xt.set((n(vr)||U()||X()||se()||j()||!n(Zn)&&(v()||n(fn)&&!n(gr)))&&!n(mn)&&r()==="video"&&!d()&&ne())}),He(()=>{!X()&&n(os)&&!Z()&&Oi(e.uiConfig.controls.hideTimeoutMobile),N(os,X(),!0)}),He(()=>{N($r,E()>0),N(Nr,!Te()&&E()<W(),!0)}),He(()=>{Md(n(Mo),U(),fe(),!0)});let gn=Y("aria_label_video_player");Db({fullScreenChangeHandler:An,getFullscreenTarget:Ln}),Ob({store:e.store,getFullscreenTarget:Ln});let tn=(Ge,ai)=>{var _o,bo;let Ro=(bo=(_o=e.store.callbacks)==null?void 0:_o.uiInfo)==null?void 0:bo.onUpcomingLiveViewStateChanged;if(!Ro)return;let No=!!ai,nn={...Qn(n(go),{upcomingLiveScreen:ai},"upcomingLiveScreen",No),...Ge};Ro(nn)};var Mi=LT();pt("blur",Ca,Vo);var no=C(Mi);Za(no,{onClick:Vn,get videoContainer(){return ue()},set videoContainer(Ge){ue(Ge)}});var on=k(no,2);Aa(on,()=>"slot",!1,(Ge,ai)=>{to(Ge,()=>({name:Xa}))});var tr=k(on,2);ks(tr,te,Ge=>{var ai=AT(),Ro=le(ai);let No=f(()=>r()!=="thumb"||d()||kt&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);Ga(Ro,{get hidden(){return n(No)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var nn=k(Ro,2);{var _o=tt=>{var Qt=TT(),bi=le(Qt);{var So=Fo=>{let or=f(()=>e.uiConfig.controls.seekStepMobile/1e3);np(Fo,{side:"left",get seekStep(){return n(or)},handleSingleFirstClick:Vn,handleSecondClick:()=>Dr("backward")})};V(bi,Fo=>{n($r)&&Fo(So)})}var bn=k(bi,2);{var On=Fo=>{let or=f(()=>e.uiConfig.controls.seekStepMobile/1e3);np(Fo,{side:"right",get seekStep(){return n(or)},handleSingleFirstClick:Vn,handleSecondClick:()=>Dr("forward")})};V(bn,Fo=>{n(Nr)&&Fo(On)})}b(tt,Qt)};V(nn,tt=>{e.canRewindLive&&ct&&!_e().has("TIMELINE")&&tt(_o)})}var bo=k(nn,2);{var Ei=tt=>{let Qt=f(()=>{var bi;return(bi=e.live)==null?void 0:bi.startTime});dc(tt,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(Qt)},onUpcomingLiveViewStateChanged:tn})};V(bo,tt=>{r()==="LiveWaitingStart"&&tt(Ei)})}var $o=k(bo,2);{var Or=tt=>{Ya(tt,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};V($o,tt=>{r()==="LiveWaitingRecover"&&tt(Or)})}var xr=k($o,2);{var _s=tt=>{Ya(tt,{kind:"record",get thumbUrl(){return e.thumbUrl}})};V(xr,tt=>{r()==="LiveWaitingRecord"&&tt(_s)})}var Bi=k(xr,2);{var bs=tt=>{var Qt=IT();let bi;var So=C(Qt);Ed(So,{get adsSlotId(){return Ae()},get adsParams(){return Ue()},get adsAutoplayParam(){return ee()},get duration(){return de()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson}}),S(Qt),O(bn=>bi=oe(Qt,1,"ads-container s-9",null,bi,bn),[()=>({hidden:r()!=="ads"})]),b(tt,Qt)};V(Bi,tt=>{e.showAds&&dt()&&tt(bs)})}var ns=k(Bi,2);{var wr=tt=>{let Qt=f(()=>!wt()&&e.showAutoplayNext&&x());Sv(tt,{get title(){return we()},get thumb(){return De()},get isHide(){return n(Qt)},clickCloseIcon:()=>N(Xn,!0)})};V(ns,tt=>{n(Zn)&&we()&&De()&&tt(wr)})}var Do=k(ns,2);{var Br=tt=>{ac(tt,{})};V(Do,tt=>{Ce()&&tt(Br)})}var rn=k(Do,2);{var Pi=tt=>{var Qt=ET(),bi=C(Qt);Td(bi,{}),S(Qt),b(tt,Qt)};V(rn,tt=>{me()&&tt(Pi)})}var ze=k(rn,2);{var At=tt=>{lc(tt,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return ce()},onClick:Vn})};V(ze,tt=>{j()&&tt(At)})}var ui=k(ze,2);{var Oo=tt=>{qa(tt,{get shifted(){return y()},get captions(){return G()},get position(){return E()},get playerSize(){return A()},isMobile:!0})};V(ui,tt=>{Qe().value!=="off"&&tt(Oo)})}var yo=k(ui,2);{var xo=tt=>{var Qt=PT();Qt.__click=[CT,U,Ke,Vo];var bi=C(Qt);Qa(bi,{}),S(Qt),b(tt,Qt)};V(yo,tt=>{d()&&tt(xo)})}var Hi=k(yo,2);{var Bo=tt=>{let Qt=f(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),bi=f(()=>r()==="ads"),So=f(()=>e.canRewindLive&&D()!==0);rc(tt,{get bottomHidden(){return n(Qt)},get showControls(){return y()},get bottomNoSmooth(){return T()},get isAds(){return n(bi)},get canRewindLive(){return n(So)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return ke()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return xe()},get nextButtonActive(){return Xe()},get prevButtonActive(){return Pe()},get isOneVideoPlaylist(){return Ct()},get customFullscreenSupported(){return n(jn)},get endScreenShown(){return n(Zn)},toggleFullscreen:Mn,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:vn,onDisabledSeekToInteractiveClick:er,get playerControlsWrapperRef(){return n(_i)},set playerControlsWrapperRef(bn){N(_i,bn,!0)},get playerControlsRef(){return n(Lo)},set playerControlsRef(bn){N(Lo,bn,!0)}})};V(Hi,tt=>{dt()&&tt(Bo)})}var Rn=k(Hi,2);{var Sr=tt=>{var Qt=kT(),bi=C(Qt);pc(bi,{get supportLink(){return e.supportLink},get returnFocus(){return ST},get ref(){return n(Mo)},set ref(So){N(Mo,So,!0)}}),S(Qt),b(tt,Qt)};V(Rn,tt=>{U()&&tt(Sr)})}var wo=k(Rn,2);let ro=f(()=>!n(hr));Ad(wo,{get isLive(){return Ye()},get isHidden(){return n(ro)},get isPlaying(){return re()},get position(){return E()},get duration(){return W()}});var _n=k(wo,2);{var Ho=tt=>{Oa(tt,{})};V(_n,tt=>{n(es)&&tt(Ho)})}var Nn=k(_n,2);{var Hr=tt=>{Nd(tt,{})};V(Nn,tt=>{pe()&&tt(Hr)})}var Fr=k(Nn,2);{var Dn=tt=>{fc(tt,{onClose:is,onSelectAutoQuality:()=>{kn("auto"),is()}})};V(Fr,tt=>{n(Yn)&&tt(Dn)})}b(Ge,ai)});var yr=k(tr,2);et(yr,Ge=>N(Mr,Ge),()=>n(Mr)),S(Mi),et(Mi,Ge=>N(go,Ge),()=>n(go)),O(()=>Ne(Mi,"aria-label",gn)),pt("click",Mi,Jn,!0),pt("focusin",Mi,en,!0),b(t,Mi),H(),o()}Ze(["click"]);function sp(t){let e="";return oo(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),oo(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),oo(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),oo(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),oo(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),oo(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),oo(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),oo(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),oo(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),oo(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),oo(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),oo(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),oo(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),oo(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),oo(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),oo(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),oo(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),oo(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),oo(t.font)&&(e+=`--font:${t.font};`),oo(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),oo(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function oo(t){return typeof t=="string"&&!t.includes(";")}import{debounceFn as VT}from"@vkontakte/videoplayer-shared/es2018";var RT=L('<div class="time-container s-7"><!></div>'),NT=L('<div class="player-wrapper s-7" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),DT={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 Tv(t,e){B(e,!0),Q(t,DT);let[i,o]=Be(),r=()=>w(Z,"$scrubbingInProgress",i),a=()=>w(j,"$playerSize",i),l=()=>w(E,"$isPlaying$",i),d=()=>w(A,"$duration$",i),s=()=>w(U,"$positionWithScrubbing$",i),u=()=>w(T,"$playerPhase",i),m=()=>w(R,"$crashed$",i),p=()=>w(W,"$currentSubtitle$",i),v=()=>w(F,"$currentSubtitleCaptions$",i),_=()=>w(P,"$positionExact$",i),y=()=>w(X,"$isLive$",i),$=()=>w(se,"$isRewindableLive$",i),x=h(e,"outsideDuration",3,0),I=h(e,"videoContainer",15),{playerPhase:T,state:{crashed$:R,duration$:A,positionExact$:P,isPlaying$:E,currentSubtitle$:W,currentSubtitleCaptions$:F,positionWithScrubbing$:U,isLive$:X,isRewindableLive$:se},ui:{playerSize:j,controls:ne,scrubbingInProgress:Z},actions:{internal:{getVideoElement:Te}}}=$e(),fe=8,te=K(!1),_e=ri({}),Ce=K(!1),me=f(()=>!r()&&!n(Ce)),ce=()=>{N(te,!0)},Qe=()=>{N(te,!1)},G=VT(Fl,260);He(()=>{a(),G(Te(),ne,_e,n(te))});let D=f(()=>l()?Xo(d()-s()):Xo(isFinite(d())?d():x()));var Ye=NT(),re=C(Ye);Za(re,{hideCursor:!1,get videoContainer(){return I()},set videoContainer(we){I(we)}});var pe=k(re,2);Aa(pe,()=>"slot",!1,(we,De)=>{to(we,()=>({name:Xa}))});var ue=k(pe,2);let Ae=f(()=>u()!=="thumb"||m());Ga(ue,{get hidden(){return n(Ae)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var Ue=k(ue,2);{var ee=we=>{qa(we,{shifted:!1,get captions(){return v()},get position(){return _()},get playerSize(){return a()}})};V(Ue,we=>{p().value!=="off"&&n(me)&&we(ee)})}var de=k(Ue,2);{var ke=we=>{var De=RT(),Ct=C(De);kd(Ct,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(D)}}),S(De),b(we,De)};V(de,we=>{n(me)&&we(ke)})}var xe=k(de,2);let Xe;var Pe=C(xe);Wa(Pe,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return $()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:fe,tooltipRightOffset:fe,get ref(){return _e.timeline},set ref(we){_e.timeline=we}}),S(xe),S(Ye),O(we=>Xe=oe(xe,1,"timeline s-7",null,Xe,we),[()=>({visible:n(te)})]),pt("mouseenter",Ye,ce),pt("mouseleave",Ye,Qe),pt("mouseenter",xe,()=>N(Ce,!0)),pt("mouseleave",xe,()=>N(Ce,!1)),b(t,Ye),H(),o()}var UT=L("<div><!></div>"),zT={hash:"s-0",code:'.vk-vp-root.s-0{--white:#fff;--black:#000;--red:#ff3347;--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px;--interactive-episode-complete:#5c9ce6;--slider-bg:hsla(0,0%,100%,.4);--slider-filled-bg:var(--white);--slider-handle-bg:var(--white);--slider-loaded-bg:hsla(0,0%,100%,.4);--slider-height:3px;--slider-video-episode-gap:1.5px;--slider-radius:0px;--slider-handle-size:12px;--slider-filled-ads:#67a5eb;--slider-disabled-color:hsla(0,0%,97%,.31);--slider-volume-height:5px;--slider-volume-radius:calc(var(--slider-volume-height)/2);--slider-volume-handle-size:13px;--timeline-slider-filled-active-live-bg:var(--red);--timeline-slider-handle-active-live-bg:var(--red);--timeline-slider-bg:var(--slider-bg);--timeline-slider-filled-bg:var(--slider-filled-bg);--timeline-slider-handle-bg:var(--slider-handle-bg);--timeline-slider-loaded-bg:var(--slider-loaded-bg);--volume-slider-bg:var(--slider-bg);--volume-slider-filled-bg:var(--slider-filled-bg);--volume-slider-handle-bg:var(--slider-handle-bg);--controls-time:var(--white);--controls-gradient:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.005) 6.67%,rgba(0,0,0,.02) 13.33%,rgba(1,1,1,.04) 20%,rgba(1,1,1,.07) 26.67%,rgba(2,2,2,.11) 33.33%,rgba(3,3,3,.16) 40%,rgba(4,4,4,.22) 46.67%,rgba(6,6,6,.28) 53.33%,rgba(7,7,7,.33) 60%,rgba(8,8,8,.38) 66.67%,rgba(9,9,9,.42) 73.33%,rgba(9,9,9,.46) 80%,hsla(0,0%,4%,.48) 86.67%,hsla(0,0%,4%,.5));--timeline-preview-shadow:rgba(0,0,0,.08);--timeline-preview-bg:#222;--timeline-padding-horizontal:10px;--timeline-padding-vertical-top:3px;--timeline-padding-vertical-bottom:4px;--timeline-height:calc(var(--timeline-padding-vertical-bottom) + var(--timeline-padding-vertical-top) + var(--slider-height));--preview-track-frame-height-vertical:114px;--preview-track-frame-height-horizontal:65px;--preview-track-controls-top:16px;--preview-track-time-line-height:16px;--preview-track-bottom-offset:10px;--preview-track-height:calc(var(--preview-track-frame-height-vertical) + var(--preview-track-bottom-offset));--preview-track-controls-top-offset:calc(var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height));--settings-bg:rgba(0,0,0,.72);--settings-item-bg-hover:hsla(0,0%,100%,.08);--settings-radius:8px;--mobile-settings-bg:#2c2d2e;--divider-border:1px solid var(--white-alpha-24);--toggle-color-separator:#363738;--toggle-color-off:#656565;--toggle-color-on:#71aaeb;--toggle-color-autoplay-on:var(--white);--notification-bg:#2c2d2e;--notification-radius:8px;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--controls-container-z-index:1;--ads-container-z-index:1;--end-screen-mobile-z-index:1;--notification-z-index:1;--thumb-timer-z-index:2;--debug-panel-z-index:2;--modal-z-index:2;--settings-menu-z-index:2;--context-menu-z-index:3;--hot-key-helpers-container-z-index:3;--overlay-container-z-index:4;--rotate-transition-duration:0.25s;--btn-color:var(--white);--double-forward-bg:rgba(0,0,0,.6);background:var(--black);color:var(--white);font-family:var(--vk-vp-custom-font,var(--font));font-size:12px;height:100%;line-height:normal;outline:0;overflow:hidden;position:relative;user-select:none;width:100%}.vk-vp-root.visible-outside.s-0{overflow:visible}.vk-vp-root.s-0 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-0 button{background:transparent;border:none;color:inherit;font:inherit;line-height:normal;margin:0;overflow:visible;padding:0;width:auto;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}.vk-vp-root.s-0 p{margin:0}.vk-vp-root.s-0 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-0 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-0 :focus,.vk-vp-root.s-0 :focus-visible{outline:none}.vk-vp-root.s-0 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-0 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-0 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-0 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-0 .overlay-container{height:100%;left:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:var(--overlay-container-z-index)}.vk-vp-root.s-0 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-0 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function Ev(t,e){B(e,!0),Q(t,zT);let[i,o]=Be(),r=()=>w(dt,"$isLive$",i),a=()=>w(fi,"$availableSubtitlesList$",i),l=()=>w(ot,"$isPreviewTrackHorizontallyAligned$",i),d=h(e,"sources",7),s=h(e,"store",7),u=h(e,"microStoresRoot",7),m=h(e,"videoConfig",7),p=h(e,"uiConfig",7),v=h(e,"title",7),_=h(e,"thumbUrl",7),y=h(e,"interactiveContainer",7),$=h(e,"interactiveController",7),x=h(e,"subtitles",7),I=h(e,"subtitlesForcedLanguage",7),T=h(e,"live",7),R=h(e,"preload",7),A=h(e,"autoplay",7),P=h(e,"volume",7,void 0),E=h(e,"muted",7,void 0),W=h(e,"fromTime",7),F=h(e,"canRewindLive",7),U=h(e,"showAds",7),X=h(e,"adsSlotId",7,void 0),se=h(e,"adsParams",7,void 0),j=h(e,"adsAutoplayParam",7,void 0),ne=h(e,"duration",7,void 0),Z=h(e,"logoClickable",7),Te=h(e,"logoHidden",7),fe=h(e,"isMobile",7),te=h(e,"showNextPrevButtons",7,!1),_e=h(e,"nextButtonActive",7,!1),Ce=h(e,"prevButtonActive",7,!1),me=h(e,"endScreenVideoTitle",7,void 0),ce=h(e,"endScreenVideoThumb",7,void 0),Qe=h(e,"isOneVideoPlaylist",7,!1),G=h(e,"supportLink",7),D=h(e,"shadowRootContainer",7),Ye=h(e,"outerContainerRef",7),re=h(e,"fullScreenTarget",7,void 0),pe=h(e,"failoverHosts",7,void 0),ue=h(e,"showMiniTimer",7,!1),Ae=h(e,"saveRate",7),Ue=h(e,"seekToInteractive",7,Bb),ee=h(e,"playPrevChapter",7,Bb),de=h(e,"volumeMultiplier",7),ke=h(e,"showAutoplayNext",7),xe=h(e,"showEndScreen",7,!0),Xe=h(e,"keyboardControls",15,void 0),{subscribers:Pe,stores:we}=u();Ph(p());let De=Mt(),Ct=p().logoLink,Tt=s().ui.debugPanelVisible,Et=s().ui.playerSize,dt=s().state.isLive$,Yt=s().state.isInteractive&&Iv.device.isAndroid,Dt=K(void 0),Rt=null,Ut=K(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{vsid:s().vsid}),Bh(s(),we),He(()=>{var z,kt;s().ui.isMobile.set(fe()),(kt=(z=m().callbacks)==null?void 0:z.onDomReady)==null||kt.call(z)});let q=(z=!1)=>{N(Ut,!0),z?s().actions.external.firstStart(U()):s().actions.internal.firstStart(U())},Le=()=>{if(De.features.qualityDetailsSubMenuEnabled){let z=l_(s().videoId);if(z)switch(z.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,z.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,z.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(z.quality);break}}else{d_(s().videoId),If()&&s().actions.internal.setTrafficSavingEnabled(!0);let kt=Sf(s().videoId);kt&&s().actions.internal.setQuality(kt)}};function Me(z){var $t,st,Di;let kt=d()||z;kt&&s().initVideo({container:n(Dt),sources:kt,failoverHosts:pe(),subtitles:x(),subtitlesForcedLanguage:I(),volumeMultiplier:de()});let lt=BT.get(yd)==="true";Tt.set(lt),W()>0&&s().actions.external.seekTime(W());let gi=fe()?De.volumeDefault:(st=($t=P())!=null?$t:gu())!=null?st:De.volumeDefault,jt=(Di=E())!=null?Di:i_();if(s().actions.external.setVolume(gi),s().actions.external.setMuted(jt),s().getAdmanWrapper().setInitialVolume(jt?0:gi),Le(),De.features.saveRate&&Ae()){let Li=r_();Li&&!r()&&s().actions.internal.setPlaybackRate(Li)}if(ke()){let Li=a_();Li&&s().actions.internal.setAutoplayNextEnabled(Li)}s().ui.isAutoplay.set(A()),A()&&q(),R()&&De.features.preload&&s().actions.internal.preload()}let ye=z=>{if(window.ResizeObserver){let kt,lt;Rt=new ResizeObserver(HT(gi=>{let jt=gi[0];if(jt.contentBoxSize){let $t=Array.isArray(jt.contentBoxSize)?jt.contentBoxSize[0]:jt.contentBoxSize;kt=$t.inlineSize,lt=$t.blockSize}else jt.contentRect&&(kt=jt.contentRect.width,lt=jt.contentRect.height);Et.set({width:kt,height:lt})},300)),Rt.observe(z)}z.clientWidth&&z.clientHeight&&Et.set({width:z.clientWidth,height:z.clientHeight})},Fe=()=>{document.hidden&&s().actions.external.stop()};Lt(()=>{var lt,gi,jt,$t;Yt&&document.addEventListener("visibilitychange",Fe),De.debugLog&&s().actions.internal.startLogging(),ye(n(Dt));let z=Pe.map(st=>st.init({store:s(),microStores:we,config:m(),interactiveController:$(),uiConfig:p()})),kt=()=>{Yt&&document.removeEventListener("visibilitychange",Fe),Rt==null||Rt.disconnect(),z.forEach(st=>st.unsubscribe()),s().destroy()};return((lt=T())==null?void 0:lt.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),kt):((gi=T())==null?void 0:gi.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),kt):(((jt=T())==null?void 0:jt.status)==="finished"||(($t=T())==null?void 0:$t.status)==="postlive")&&!(d()&&OT(d()))?(s().actions.internal.setLiveWaitingRecord(!0),kt):(Me(),kt)});function Se(){n(Ut)?s().actions.external.play():q(!0)}function xt(){s().actions.external.pause()}function ve(z){s().actions.external.setMuted(z)}function Oe(){s().actions.external.toggleSubtitle()}function Ke(z,kt){s().actions.external.changeSubtitle(z,kt)}function at(z){s().actions.external.changeAudioStream(z)}function qt(){var z;(z=s().webApi.slotsApi)!=null&&z.haveSlots()&&s().actions.external.hideControls()}function Pt(){var z;(z=s().webApi.slotsApi)!=null&&z.haveSlots()&&s().actions.external.showControls()}function si(z){fe()||z>=0&&z<=1&&s().actions.external.setVolume(z)}function li(z){s().actions.internal.seekTime(z,FT.UNKNOWN)}function Ii(z){s().actions.external.seekEpisodeStartTime(z)}function po(){s().actions.external.returnFocusToEpisodes()}function fo(z){s().actions.external.setPlaybackRate(z)}function di(z){s().actions.external.setAutoQualityLimits(z)}function rt(){s().actions.external.setQuality("auto")}function ci(z){s().actions.external.setTrafficSavingEnabled(z)}function Gi(z){s().actions.external.setHighQualityEnabled(z)}let ct=sp(De.view),Nt=m().playerView==="preview",fi=s().state.availableSubtitlesList$;if(De.features.initSubtitles){let z=!1;He(()=>{var kt;if(!z&&a().length){z=!0;let lt;if(De.features.userVideoPrefs&&s().videoId){let jt=$u(De.userSalt,String(s().videoId));jt!=null&&jt.subtitleTrackId&&(lt=a().find($t=>$t.value===jt.subtitleTrackId))}let gi=(kt=I())!=null?kt:Pf();gi&&(lt=a().find(jt=>jt.language===gi)),s().actions.internal.setSubtitle(lt)}})}let ot=s().ui.isPreviewTrackHorizontallyAligned;var nt=UT();let Ci;var Zo=C(nt);{var Ao=z=>{Cv(z,{get store(){return s()},get uiConfig(){return De},get thumbUrl(){return _()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return A()},get canRewindLive(){return F()},get showAds(){return U()},get adsSlotId(){return X()},get adsParams(){return se()},get adsAutoplayParam(){return j()},get duration(){return ne()},get logoClickable(){return Z()},get logoHidden(){return Te()},get logoTargetUrl(){return Ct},get nextButtonActive(){return _e()},get prevButtonActive(){return Ce()},get endScreenVideoTitle(){return me()},get endScreenVideoThumb(){return ce()},get isOneVideoPlaylist(){return Qe()},get supportLink(){return G()},get shadowRootContainer(){return D()},get outerContainerRef(){return Ye()},get fullScreenTarget(){return re()},get showMiniTimer(){return ue()},get playerStarted(){return n(Ut)},get seekToInteractive(){return Ue()},get playPrevChapter(){return ee()},firstStart:q,seekTime:li,get showEndScreen(){return xe()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return te()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson},get videoContainer(){return n(Dt)},set videoContainer(kt){N(Dt,kt,!0)}})},ht=z=>{var kt=Re(),lt=le(kt);{var gi=$t=>{Tv($t,{get thumbUrl(){return _()},get outsideDuration(){return ne()},get canRewindLive(){return F()},get videoContainer(){return n(Dt)},set videoContainer(st){N(Dt,st,!0)}})},jt=$t=>{wv($t,{get store(){return s()},get uiConfig(){return De},get title(){return v()},get thumbUrl(){return _()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return A()},get canRewindLive(){return F()},get showAds(){return U()},get adsSlotId(){return X()},get adsParams(){return se()},get adsAutoplayParam(){return j()},get duration(){return ne()},get logoClickable(){return Z()},get logoHidden(){return Te()},get logoTargetUrl(){return Ct},get nextButtonActive(){return _e()},get prevButtonActive(){return Ce()},get endScreenVideoTitle(){return me()},get endScreenVideoThumb(){return ce()},get isOneVideoPlaylist(){return Qe()},get supportLink(){return G()},get shadowRootContainer(){return D()},get outerContainerRef(){return Ye()},get fullScreenTarget(){return re()},get showMiniTimer(){return ue()},get playerStarted(){return n(Ut)},get seekToInteractive(){return Ue()},get playPrevChapter(){return ee()},firstStart:q,get showEndScreen(){return xe()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return te()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(Dt)},set videoContainer(st){N(Dt,st,!0)},get keyboardControls(){return Xe()},set keyboardControls(st){Xe(st)}})};V(lt,$t=>{Nt?$t(gi):$t(jt,!1)})}b(z,kt)};V(Zo,z=>{fe()?z(Ao):z(ht,!1)})}S(nt),O(z=>{Ci=oe(nt,1,"vk-vp-root s-0",null,Ci,z),qe(nt,ct)},[()=>({"root--miui-browser":Iv.device.isMobile&&Iv.browser.isMiuiBrowser,"visible-outside":Nt,"preview-track-horizontally-alinged":l()})]),b(t,nt);var Ot=H({initVideo:Me,play:Se,pause:xt,setMuted:ve,toggleSubtitle:Oe,changeSubtitle:Ke,changeAudioStream:at,hideControls:qt,showControls:Pt,setVolume:si,seekTime:li,seekEpisodeStartTime:Ii,returnFocusToEpisodes:po,setPlaybackRate:fo,setAutoQualityLimits:di,setAutoQuality:rt,toggleTrafficSaving:ci,toggleHighQuality:Gi,get sources(){return d()},set sources(z){d(z)},get store(){return s()},set store(z){s(z)},get microStoresRoot(){return u()},set microStoresRoot(z){u(z)},get videoConfig(){return m()},set videoConfig(z){m(z)},get uiConfig(){return p()},set uiConfig(z){p(z)},get title(){return v()},set title(z){v(z)},get thumbUrl(){return _()},set thumbUrl(z){_(z)},get interactiveContainer(){return y()},set interactiveContainer(z){y(z)},get interactiveController(){return $()},set interactiveController(z){$(z)},get subtitles(){return x()},set subtitles(z){x(z)},get subtitlesForcedLanguage(){return I()},set subtitlesForcedLanguage(z){I(z)},get live(){return T()},set live(z){T(z)},get preload(){return R()},set preload(z){R(z)},get autoplay(){return A()},set autoplay(z){A(z)},get volume(){return P()},set volume(z){P(z)},get muted(){return E()},set muted(z){E(z)},get fromTime(){return W()},set fromTime(z){W(z)},get canRewindLive(){return F()},set canRewindLive(z){F(z)},get showAds(){return U()},set showAds(z){U(z)},get adsSlotId(){return X()},set adsSlotId(z){X(z)},get adsParams(){return se()},set adsParams(z){se(z)},get adsAutoplayParam(){return j()},set adsAutoplayParam(z){j(z)},get duration(){return ne()},set duration(z){ne(z)},get logoClickable(){return Z()},set logoClickable(z){Z(z)},get logoHidden(){return Te()},set logoHidden(z){Te(z)},get isMobile(){return fe()},set isMobile(z){fe(z)},get showNextPrevButtons(){return te()},set showNextPrevButtons(z){te(z)},get nextButtonActive(){return _e()},set nextButtonActive(z){_e(z)},get prevButtonActive(){return Ce()},set prevButtonActive(z){Ce(z)},get endScreenVideoTitle(){return me()},set endScreenVideoTitle(z){me(z)},get endScreenVideoThumb(){return ce()},set endScreenVideoThumb(z){ce(z)},get isOneVideoPlaylist(){return Qe()},set isOneVideoPlaylist(z){Qe(z)},get supportLink(){return G()},set supportLink(z){G(z)},get shadowRootContainer(){return D()},set shadowRootContainer(z){D(z)},get outerContainerRef(){return Ye()},set outerContainerRef(z){Ye(z)},get fullScreenTarget(){return re()},set fullScreenTarget(z){re(z)},get failoverHosts(){return pe()},set failoverHosts(z){pe(z)},get showMiniTimer(){return ue()},set showMiniTimer(z){ue(z)},get saveRate(){return Ae()},set saveRate(z){Ae(z)},get showAutoplayNext(){return ke()},set showAutoplayNext(z){ke(z)},get seekToInteractive(){return Ue()},set seekToInteractive(z){Ue(z)},get playPrevChapter(){return ee()},set playPrevChapter(z){ee(z)},get volumeMultiplier(){return de()},set volumeMultiplier(z){de(z)},get showEndScreen(){return xe()},set showEndScreen(z){xe(z)},get keyboardControls(){return Xe()},set keyboardControls(z){Xe(z)}});return o(),Ot}var WT=Ee('<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 Pv(t,e){let i=h(e,"isWhite",3,!1),o=f(()=>i()?"#fff":"#909499");je(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(r,a)=>{var l=WT();Jt(9),b(r,l)},$$slots:{default:!0}})}var KT=L('<div class="title s-1"> </div>'),qT=L('<div class="playerStub s-1"><!> <!></div>'),QT={hash:"s-1",code:".playerStub.s-1{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}.title.s-1{box-sizing:border-box;color:#fff;font-size:15px;left:0;overflow:hidden;padding:18px 20px 10px;position:absolute;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}"};function kv(t,e){Q(t,QT);var i=qT(),o=C(i);{var r=d=>{var s=KT(),u=C(s,!0);S(s),O(()=>ge(u,e.title)),b(d,s)};V(o,d=>{e.title&&d(r)})}var a=k(o,2);{var l=d=>{let s=f(()=>!!e.thumbUrl);Pv(d,{get isWhite(){return n(s)}})};V(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}S(i),O(()=>qe(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}var GT=L('<div class="playerError s-2"><!></div>'),YT={hash:"s-2",code:".playerError.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%}"};function Av(t){Q(t,YT);var e=GT(),i=C(e);Qa(i,{}),S(e),b(t,e)}import{now as SI,ValueSubject as CI}from"@vkontakte/videoplayer-shared/es2018";import{cloneDeepWith as TI,InterfaceLanguage as II,isNonNullable as Ov,Logger as EI,Observable as PI,Subscription as Qb,once as kI,InternalsExposure as AI,skip as LI,getPlayerId as MI}from"@vkontakte/videoplayer-shared/es2018";import{clientChecker as Gb,isMobile as VI}from"@vkontakte/videoplayer-core/es2018";import{OneStat as RI,ThinOneStat as NI,MediascopePixel as DI}from"@vkontakte/videoplayer-statistics/es2018";import{Logger as jT,Subscription as XT}from"@vkontakte/videoplayer-shared/es2018";var ap=class{constructor(){this.subscription=new XT,this.logger=new jT,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=be(e.state.currentPlaybackRate$),r=be(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 Mv,detectEmbed as oI}from"@vkontakte/videoplayer-shared/es2018";var ZT=Ee('<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),JT=L('<div><div><!></div> <span class="title s-6"> </span></div>'),eI={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 Lv(t,e){B(e,!0),Q(t,eI);let[i,o]=Be(),r=()=>w(u,"$interfaceLanguage$",i),a=()=>w(m,"$isMobile$",i),l=$e(),d=Mt(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,m=l.ui.isMobile,p=l.ui.t,v=f(()=>r()&&p("pip_dummy_title")),_=sp(d.view);var y=JT();let $;var x=C(y);let I;var T=C(x);je(T,{width:"57",height:"56",testId:"pip-dummy-icon",children:(P,E)=>{var W=ZT();Jt(),b(P,W)},$$slots:{default:!0}}),S(x);var R=k(x,2),A=C(R,!0);S(R),S(y),O((P,E)=>{$=oe(y,1,"player-pip-dummy s-6",null,$,P),qe(y,_),I=oe(x,1,"dummy-image s-6",null,I,E),ge(A,n(v))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),b(t,y),H(),o()}var tI=Object.defineProperty,iI=(t,e,i)=>e in t?tI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,fa=(t,e,i)=>iI(t,typeof e!="symbol"?e+"":e,i),nI=460,rI=280,gc=class{constructor({enabled:e=!0}={enabled:!0}){fa(this,"playerDomElement"),fa(this,"playerParentShadowRoot"),fa(this,"playerDummyElement"),fa(this,"svelteContext"),fa(this,"pipWindow"),fa(this,"info",{isActive$:new Mv(!1),isEnabled$:new Mv(!1),type:1}),fa(this,"pipActive",!1),fa(this,"pipApi"),this.info.isEnabled$=new Mv(e),Wu()&&(this.pipApi=new Ds({enabled:e}),this.pipApi.info.isActive$.subscribe(i=>{(i&&!this.info.isActive$.getValue()||!i&&this.pipActive)&&this.info.isActive$.next(i),this.pipActive=i}))}isSupported(){let{isEmbed:e}=oI();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:nI,height:rI,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=Yr(Lv,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,o,r;this.pipWindow?(i=documentPictureInPicture.window)==null||i.close():(o=this.pipApi)!=null&&o.isActive()&&((r=this.pipApi)==null||r.exit()),e()})}async dispose(){await this.exit()}setEnabled(e){var i;this.info.isEnabled$.next(e),(i=this.pipApi)==null||i.setEnabled(e)}assignPlayerContainer(e){var i;(i=this.pipApi)==null||i.assignPlayerContainer(e)}updateVideoElement(){var e;(e=this.pipApi)==null||e.updateVideoElement()}setExternalEventHandlers(e){var i;(i=this.pipApi)==null||i.setExternalEventHandlers(e)}createStretchedContainer(){let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e}};function Hb(t){return t instanceof gc}var lp=class{static getLatestSupportedVersion(e){let i=new Ds(e),o=new gc(e);if(o.isSupported())return o;if(i.isSupported())return i}};function hc(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 Fb="Inner error. Unexpectedly root annotation container null reference exception",Ub="Annotation with such name already exists",zb="Annotation with such name does not exist";var Kl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as sI,Subscription as aI,throttleFn as lI}from"@vkontakte/videoplayer-shared/es2018";var dI="1",cI=100,dp=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new aI}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=lI(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},cI);this.subscriptions.add(sI(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 Kl(Fb);if(this.annotations.has(e))throw new Kl(Ub);i.style.zIndex=(o=i.style.zIndex)!=null?o:dI,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 Kl(zb);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 cp,Subscription as uI}from"@vkontakte/videoplayer-shared/es2018";var un=class{init({store:e,microStores:i,interactiveController:o,config:r}){return cp(e),cp(i),cp(r),r.interactiveData&&cp(o),this.subscription=new uI,this.subscription}};var _c=class extends un{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 bc=class extends un{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:m}=a.ui,p=be(m),v=()=>p&&be(u);return o.add(u.subscribe(_=>{if(!p)return;let y=be(l);be(s)?this.state$.set(_):y!==null&&this.state$.set(!y||_)})),o.add(s.subscribe(_=>{this.state$.set(!_||v())})),o.add(l.subscribe(_=>{if(_===null)return;let y=be(d);if(v()){this.state$.set(!0);return}y&&this.state$.set(!_)})),o}};var $c=class extends un{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 pI}from"@vkontakte/videoplayer-shared/es2018";var Vv=ae(!1),up=null,yc=class extends un{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$={...Vv,set:(i,o=!1)=>{i!==be(Vv)&&(this.clearTimeout(),Vv.set(i),!i&&up&&(up=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()}}init(i){let o=super.init(i),{store:r,config:a}=i,{isInteractiveTime$:l,isPlaying$:d}=r.state,s=r.ui.controlsVisible,{interactiveTimeIndicator:u}=r.ui.controls;o.add(s.subscribe(p=>{be(l)&&p&&this.state$.set(!1)}));let m=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(pI({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:v,interactiveTimeIndicator:_})=>{var y,$;if(!(!p||!(_!=null&&_.isDisplayed))){if(!v)return this.state$.set(!1);m.tooltipHelpHintActive&&up===null&&(up=!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 fI,noop as mI}from"@vkontakte/videoplayer-shared/es2018";var xc=class extends un{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$={...ae(null),toggle:mI};this.checkIfShouldHide=i=>Ns(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(be(l)))return;let s=be(this.state$),{isEnded$:u,playbackState$:m}=r.state,{disabledControls$:p}=r.ui.controls,v=be(u),_=be(m);if(s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1),p.remove(gf),!v&&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(gf),!v&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}},o.add(fI({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 Wb}from"@vkontakte/videoplayer-shared/es2018";var wc=class extends un{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 Wb(!1),isEnabled$:new Wb(!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 hI,filterChanged as _I}from"@vkontakte/videoplayer-shared/es2018";import{safeStorage as Rv}from"@vkontakte/videoplayer-shared/es2018";var Kb=({maxShowCount:t,timeout:e})=>{let i=[t!==0?vI({maxCount:t}):void 0,e!==0?gI({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},vI=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Rv.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}}},gI=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Rv.get(e)||"{}")}catch(a){return{}}},o=a=>Rv.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 Sc=class extends un{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=Kb({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe(_I(),hI(m=>m)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(s&&r.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var qb=()=>[_c,bc,$c,yc,xc,wc,Sc].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 Cc}from"@vkontakte/videoplayer-shared/es2018";var pp=class{constructor(e){this.getActiveElement=e;this.focusableElements=[];this.isActive=!1;this.handleTabKey=e=>{if(this.updateFocusableElements(),!this.focusableElements.length)return;let i=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1],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 fp=class{constructor(e){this.shadowRoot=e;this.lastFocusedNode=null;this.init=()=>{this.shadowRoot.addEventListener("focusin",this.handleFocusChange)};this.handleFocusChange=()=>{this.lastFocusedNode=this.shadowRoot.activeElement};this.restoreFocus=()=>{var e;(e=this.lastFocusedNode)==null||e.focus()};this.focusLock=new pp(()=>this.lastFocusedNode),this.init()}destroy(){this.shadowRoot.removeEventListener("focusin",this.handleFocusChange),this.focusLock.destroy()}getLastFocusedNode(){return this.lastFocusedNode}activateLock(){this.focusLock.activate()}deactivateLock(){this.focusLock.deactivate()}setContainerForFocusLock(e){this.focusLock.setContainer(e)}};var bI=L('<div class="root s-3"><!></div>'),$I={hash:"s-3",code:".root.s-3{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:1}"};function Nv(t,e){B(e,!0),Q(t,$I);let i=null,o=K(null);He(()=>(n(o)&&(i=window.setTimeout(()=>{N(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function r(s){e.playbackStatusShow&&N(o,s?"prev":"next",!0)}var a=Re(),l=le(a);{var d=s=>{var u=Re(),m=le(u);ks(m,()=>n(o),p=>{var v=bI(),_=C(v);let y=f(()=>n(o)==="prev");mc(_,{get duration(){return e.animationDuration},get Icon(){return ua},get reversed(){return n(y)}}),S(v),b(p,v)}),b(s,u)};V(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return b(t,a),H({startVideoChangedAnimation:r})}import{getWindow as yI}from"@vkontakte/videoplayer-shared/es2018";var Dv=yI().HTMLElement||class{constructor(){this.isConnected=!1}};var xI=Object.defineProperty,wI=(t,e,i)=>e in t?xI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Kt=(t,e,i)=>wI(t,typeof e!="symbol"?e+"":e,i),OI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:II.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:VI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},Gn=K(void 0),Bv=ri({animationDuration:0,playbackStatusShow:!1}),mp=class extends Dv{constructor(){super(),Kt(this,"svelteStubComponent"),Kt(this,"svelteRootComponent"),Kt(this,"sveltePersistentLayerComponent"),Kt(this,"svelteErrorComponent"),Kt(this,"store"),Kt(this,"microStoresRoot"),Kt(this,"statistics"),Kt(this,"sentry"),Kt(this,"_shadowRoot"),Kt(this,"playerContainer"),Kt(this,"rootContainer"),Kt(this,"stateContainer"),Kt(this,"shadowRootContainer"),Kt(this,"playerId"),Kt(this,"uiConfig"),Kt(this,"coreConfig"),Kt(this,"statisticsConfig"),Kt(this,"metaConfig"),Kt(this,"interactiveController"),Kt(this,"interactiveContainer"),Kt(this,"graphMadePause"),Kt(this,"currentPlayingVideoIndex",0),Kt(this,"needToRepeatPlaylist",!1),Kt(this,"videoConfig"),Kt(this,"pictureInPictureApi"),Kt(this,"mediaSessionApi"),Kt(this,"unsubscribePlayerPhaseSubscription"),Kt(this,"logger"),Kt(this,"log"),Kt(this,"subscription"),Kt(this,"interactiveSubscription"),Kt(this,"annotationsApi"),Kt(this,"slotsApi"),Kt(this,"focusManager"),Kt(this,"prevIsid"),Kt(this,"isInited",!1),Kt(this,"postponedInitParams",null),Kt(this,"internalsExposure",null),Kt(this,"shadowDOMCallbacksDisabled",!1),Kt(this,"fatalError$",new CI(null)),Kt(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:m,statVKAppId:p,refreshStatAuthToken:v,autoplay:_,isMobile:y,isTouch:$,refDomain:x,deviceId:I,interactiveData:T}=hc(this.videoConfig,i),R=(o=T==null?void 0:T.projectInfo)==null?void 0:o.pid,A=(a=(r=this.interactiveController)==null?void 0:r.state.isReplay$.getValue())!=null?a:!1;A&&(this.prevIsid=void 0);let{unitedVideoId:P,isClip:E=!1}=e;if(this.uiConfig.features.statistics&&P)try{return new RI({movieId:P,albumId:d,place:s,trackCode:m,vkAppId:p,autoplay:(l=_&&!this.interactiveController)!=null?l:!1,mobile:$!=null?$:y,clip:E,refDomain:x,deviceId:I,isPreviewPlayerView:this.videoConfig.playerView==="preview",...R&&(!this.isInited||A)&&{projectId:Number(R)}},{refreshAuthToken:v,userSalt:u,config:this.statisticsConfig,...this.interactiveController&&{useIsid:!0,isid:this.prevIsid}})}catch(F){console.error(F),this.log({message:F.message})}}),Cc.create("ui"),this.logger=new EI,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Qb,this.interactiveSubscription=new Qb,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Yr(Av,{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=ri({title:o,thumbUrl:r}),l={target:this.playerContainer,props:a};this.svelteStubComponent=Yr(kv,l),this.sveltePersistentLayerComponent=Yr(Nv,{target:this.playerContainer,props:Bv}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;Bv.animationDuration=e,Bv.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(),Cc.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}=hc(this.videoConfig,i),{unitedVideoId:l}=e;if(this.uiConfig.features.thinStatistics&&l)return new NI.ThinOneStat({deviceId:o,movieId:l,preload:r,isPreviewPlayerView:this.videoConfig.playerView==="preview"},{config:this.statisticsConfig,refreshAuthToken:a})}createPlayer(e,i={},o){var r,a,l,d,s,u,m,p,v,_;if(!this.videoConfig)return;let{albumId:y,statPlace:$,statAuthToken:x,preload:I,autoplay:T,volume:R,muted:A,fromTime:P,canRewindLive:E,supportLink:W,showAds:F,adsSlotId:U,adsParams:X={},adsAutoplayParam:se,interfaceLanguage:j,isCyrillicRelatedInterface:ne,logoClickable:Z,logoHidden:Te,isMobile:fe,isTouch:te,isAudioDisabled:_e,isLiveCatchUpMode:Ce,fullScreenTarget:me,failoverHosts:ce,canDownload:Qe,callbacks:G,interactiveData:D,showThumbTimer:Ye,additionalButtons:re=[],additionalSettingsMenuItems:pe=[],additionalContextMenuItems:ue=[],repeat:Ae,loop:Ue,saveRate:ee,volumeMultiplier:de,showEndScreen:ke,showAutoplayNext:xe,mediascopePixels:Xe}=hc(this.videoConfig,i),{sources:Pe,title:we,thumbUrl:De,unitedVideoId:Ct,isClip:Tt=!1,duration:Et,adsParams:dt={},videoEpisodes:wt,previewThumbsData:Yt,subtitles:Dt,subtitlesForcedLanguage:Rt,live:Ut,adsExternalApi:q,adsJson:Le}=e;if(!Pe&&!Ut){let di=new Error("empty sources and live");this.fatalError$.next(di),(r=G.onCrashed)==null||r.call(G,di.message);return}let Me={...X,...dt},ye=this.getNextVideoInfo(),Fe={sources:Pe,title:we,thumbUrl:De,subtitles:Dt,subtitlesForcedLanguage:Rt,unitedVideoId:Ct,isClip:Tt,live:Ut,albumId:y,statPlace:$,autoplay:T,muted:A,volume:R,fromTime:P,canRewindLive:E,showAds:F,adsSlotId:U,adsParams:Me,adsAutoplayParam:se,duration:Et,logoClickable:Z,logoHidden:Te,isTouch:te!=null?te:fe,repeat:Ae,loop:Ue,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:ye.nextVideoTitle,endScreenVideoThumb:ye.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},Se={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(Fe)}`});let xt=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),ve=(xt==null?void 0:xt.oneStat)||this.createOneStat(e,i),Oe=this.createThinOneStat(e,i),Ke;Xe&&(Ke=new DI({pixels:Xe})),(ve||Oe)&&(this.statistics=new qu(ve,Oe,Ke,xt==null?void 0:xt.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Va(this.uiConfig.sentry,{version:El,env:fu},{movieId:Ct,albumId:y,place:$,autoplay:(l=T&&!this.interactiveController)!=null?l:!1,mobile:te!=null?te:fe,clip:Tt}),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,...Va.getInstance()};let qt=!!D,Pt=[],si="tooltip_interactive_go_back_disabled_first";if(qt&&this.interactiveController){let di=this.interactiveController.state.isInitialChapter$.getValue(),rt=this.interactiveController.getHistoryState();di&&Pt.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Pt.push("SEEK_TO_INTERACTIVE_BUTTON"),rt.hasPrevChapter$.getValue()||(Pt.push("PLAY_PREV_CHAPTER_BUTTON"),di||(rt.isGoBackLimited$.getValue()?si="tooltip_interactive_go_back_disabled_limit":si="tooltip_interactive_go_back_disabled"))}let li=()=>{var di;this.isInited=!1,this.prevIsid=void 0;let rt=(o==null?void 0:o.info.isEnded$.getValue())&&((di=this.interactiveController)==null?void 0:di.state.isEndChapter$.getValue());G.onReplayInteractiveVideo&&!rt?G.onReplayInteractiveVideo():this.replayInteractiveVideo()},Ii=Ae&&this.videoConfig.videos.length===1;this.store=ob({player:o,interfaceLanguage:j,isCyrillicRelatedInterface:ne,videoId:Ct,isClip:Tt,isLiveCatchUpMode:Ce,isAudioDisabled:_e,statAuthToken:x,callbacks:G,webApi:Se,videoEpisodes:wt,previewThumbsData:Yt,canDownload:Qe,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,disabledControls:Pt,isInteractive:qt,saveRate:ee,interactiveRanges$:(m=this.interactiveController)==null?void 0:m.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:li,playPrevChapterDisabledTooltip:si,hasInteractiveBranches:!!((_=(v=this.interactiveController)==null?void 0:v.getChapterBranches())!=null&&_.length),additionalButtons:this.uiConfig.features.additionalButtons?re:[],additionalSettingsMenuItems:pe!=null?pe:[],additionalContextMenuItems:ue!=null?ue:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:di=>{var rt;return(rt=this.sveltePersistentLayerComponent)==null?void 0:rt.startVideoChangedAnimation(di)},looped:this.uiConfig.features.useLoopSetting?Ue:Ii,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId});let{stores:po}=this.microStoresRoot=qb(),fo=()=>{var di,rt,ci,Gi,ct,Nt;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(ot=>{var nt;return(nt=G==null?void 0:G.onCurrentFormatChanged)==null?void 0:nt.call(G,ot)})),this.subscription.add(po.interactiveControlsOpacity$.subscribe(ot=>{var nt;ot!==null&&((nt=this==null?void 0:this.interactiveController)==null||nt.setDisabledControls(ot))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(ot=>{var nt;return(nt=G==null?void 0:G.onThroughputEstimationChanged)==null?void 0:nt.call(G,ot)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(ot=>{var nt;return(nt=G==null?void 0:G.onTrafficSavingEnabledChanged)==null?void 0:nt.call(G,ot)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(ot=>{var nt;return(nt=G==null?void 0:G.onHighQualityEnabledChanged)==null?void 0:nt.call(G,ot)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(ot=>{var nt;return(nt=G==null?void 0:G.onAutoQualityEnabledChanged)==null?void 0:nt.call(G,!!ot)})),this.subscription.add(new PI(ot=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(nt=>ot.next(nt)))}).pipe(LI(1)).subscribe(ot=>{var nt;return(nt=G==null?void 0:G.onCurrentPlaybackRateChanged)==null?void 0:nt.call(G,ot)})),this.subscription.add(this.store.state.volume$.subscribe(ot=>{var nt;return(nt=G==null?void 0:G.onVolumeChange)==null?void 0:nt.call(G,ot)})),this.subscription.add(this.store.state.muted$.subscribe(ot=>{var nt,Ci,Zo,Ao;if(ot)(nt=G==null?void 0:G.onMute)==null||nt.call(G);else{let ht=(Zo=((Ci=this.store)==null?void 0:Ci.state.volume$)&&be(this.store.state.volume$))!=null?Zo:0;(Ao=G==null?void 0:G.onUnmute)==null||Ao.call(G,ht)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(ot=>{var nt;return(nt=G==null?void 0:G.onVideoBitrateChanged)==null?void 0:nt.call(G,ot)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(ot=>{var nt;let Ci=(nt=this.store)==null?void 0:nt.ui.controls.disabledControls$;Ci&&(ot&&!Ci.includes(xd)&&Ci.add(xd),ot||Ci.remove(xd))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(async ot=>{var nt;if(!Gb.browser.isSamsungBrowser||!ot||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&await this.replayInteractiveChapter((nt=this.videoConfig)==null?void 0:nt.callbacks.onExternalFullscreenExit)})),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(ot=>{var nt;return(nt=G==null?void 0:G.onVSIDChanged)==null?void 0:nt.call(G,ot)})),this.initMediaSession(),N(Gn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:Pe,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:we,thumbUrl:De,subtitles:Dt,subtitlesForcedLanguage:Rt,live:Ut,preload:I,autoplay:T,muted:A,volume:R,fromTime:P,canRewindLive:E,supportLink:W,showAds:F,adsSlotId:U,adsParams:Me,adsAutoplayParam:se,duration:Et,logoClickable:Z,logoHidden:Te,isMobile:te!=null?te:fe,failoverHosts:ce,fullScreenTarget:me,saveRate:ee,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Ye,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:ye.nextVideoTitle,endScreenVideoThumb:ye.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:de,showEndScreen:ke,showAutoplayNext:xe,adsExternalApi:q,adsJson:Le,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let fi={target:this.playerContainer,props:n(Gn)};this.svelteRootComponent=Yr(Ev,fi),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(ci=(rt=(di=this.videoConfig)==null?void 0:di.callbacks)==null?void 0:rt.onInited)==null||ci.call(rt)),(Gi=this.internalsExposure)==null||Gi.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((Nt=(ct=this.videoConfig)==null?void 0:ct.callbacks)!=null&&Nt.onDevNullLog)?Cc.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Cc.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Gb.isInited$.subscribe(di=>{di&&(console.log("UI SDK async start"),fo())}):fo()}addPlayerInfoSubscriptions(){var e,i;let o=this.store,r=(e=this.microStoresRoot)==null?void 0:e.stores;if(!o||!r)return;let a=(i=this.videoConfig)==null?void 0:i.callbacks;a&&this.subscription.add(o.playerPhase.subscribe(d=>{var s;return(s=a.onPlayerPhaseChanged)==null?void 0:s.call(a,d)})).add(o.state.playbackState$.subscribe(d=>{var s;return d&&((s=a.onPlaybackStateChanged)==null?void 0:s.call(a,d))})).add(o.state.playbackStateRealistic$.subscribe(d=>{d?this.stateContainer.setAttribute("data-playback-state",d):this.stateContainer.removeAttribute("data-playback-state")})).add(o.state.isLive$.subscribe(d=>{var s;return(s=a.onIsLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isActiveLive$.subscribe(d=>{var s;return(s=a.onIsActiveLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isAudioAvailable$.subscribe(d=>{var s;return(s=a.onIsAudioAvailableChanged)==null?void 0:s.call(a,d)})).add(o.state.currentQuality$.subscribe(d=>{var s;return(s=a.onCurrentQualityChanged)==null?void 0:s.call(a,d)})).add(o.state.availableQualities$.subscribe(d=>{var s;return(s=a.onAvailableQualitiesChanged)==null?void 0:s.call(a,d.map(({value:u})=>u).filter(u=>u!=="auto"))})).add(o.state.availableAudioStreams$.subscribe(d=>{d.length>1&&a.onAudioLanguagesAvailable&&a.onAudioLanguagesAvailable()})).add(r.pictureInPicture$.isActive$.subscribe(d=>{var s,u;return d?(s=a.onPiPEnter)==null?void 0:s.call(a):(u=a.onPiPExit)==null?void 0:u.call(a)}));let l=a==null?void 0:a.uiInfo;l&&this.subscription.add(o.ui.controlsVisible.subscribe(d=>{var s;return(s=l.onControlsVisibleChanged)==null?void 0:s.call(l,d)})).add(o.ui.isMobile.subscribe(d=>{var s;return(s=l.onIsMobileChanged)==null?void 0:s.call(l,d)})).add(o.ui.playerSize.subscribe(d=>{var s;return(s=l.onPlayerSizeChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.prevButton.subscribe(d=>{var s;return(s=l.onPrevButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playButton.subscribe(d=>{var s;return(s=l.onPlayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.replayButton.subscribe(d=>{var s;return(s=l.onReplayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.nextButton.subscribe(d=>{var s;return(s=l.onNextButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playPrevChapterButton.subscribe(d=>{var s;return(s=l.onPlayPrevChapterChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.seekToInteractiveButton.subscribe(d=>{var s;return(s=l.onSeekToInteractiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveGraphButton.subscribe(d=>{var s;return(s=l.onGraphButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.liveButton.subscribe(d=>{var s;return(s=l.onLiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.time.subscribe(d=>{var s;return(s=l.onTimeUpdateChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.episodes.subscribe(d=>{var s;return(s=l.onEpisodesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.subtitles.subscribe(d=>{var s;return(s=l.onSubtitlesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topLeft.subscribe(d=>{var s;return(s=l.onTopLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topRight.subscribe(d=>{var s;return(s=l.onTopRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomLeft.subscribe(d=>{var s;return(s=l.onBottomLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomRight.subscribe(d=>{var s;return(s=l.onBottomRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.middle.subscribe(d=>{var s;return(s=l.onMiddleControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottom.subscribe(d=>{var s;return(s=l.onBottomControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.videoTitleInfo.subscribe(d=>{var s;return(s=l.onTitleChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.settings.subscribe(d=>{var s;return(s=l.onSettingsChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.fullscreen.subscribe(d=>{var s;return(s=l.onFullscreenChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.chromecast.subscribe(d=>{var s;return(s=l.onChromecastChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.pip.subscribe(d=>{var s;return(s=l.onPipChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls["theater-mode-button"].subscribe(d=>{var s;return(s=l.onTheaterModeChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.vkLogo.subscribe(d=>{var s;return(s=l.onVkLogoChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveTimeIndicator.subscribe(d=>{var s;return(s=l.onInteractiveTimeIndicatorChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.timeline.subscribe(d=>{var s;return(s=l.onTimelineChanged)==null?void 0:s.call(l,d)}))}playNextVideo(){this.videoConfig&&(this.currentPlayingVideoIndex++,this.currentPlayingVideoIndex>=this.videoConfig.videos.length&&(this.currentPlayingVideoIndex=0),this.log({message:`play next video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}playPrevVideo(){this.videoConfig&&(this.currentPlayingVideoIndex--,this.currentPlayingVideoIndex<0&&(this.currentPlayingVideoIndex=this.videoConfig.videos.length-1),this.log({message:`play prev video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}createPlayerWithCurrentVideo(e,i=!0){var o;if(!this.videoConfig)return;let r=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!r){this.log({message:"no next video"});return}this.isInited&&Ov(r.unitedVideoId)&&((o=this.store)==null||o.actions.internal.nextMovie(r.unitedVideoId)),this.unmountComponent(this.svelteRootComponent),this.createPlayer(r,{autoplay:i,fromTime:0},e)}playPrevChapter(){var e;(e=this.interactiveController)==null||e.playPrevChapter()}seekToInteractive(){var e;let i=(e=this.interactiveController)==null?void 0:e.getNextInteractiveStartTime();typeof i=="number"&&this.seekTime(i/1e3)}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?be(s):this.videoConfig.interfaceLanguage,{projectInfo:m,initChapterId:p,historyApi:v,videoLoader:_}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:m,initChapterId:p,historyApi:v,vkVideoLoader:_,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,isTouch:this.videoConfig.isTouch,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation,controlsTapPlace:this.uiConfig.features.interactiveControlsTapPlace,controlsFillAnimation:this.uiConfig.features.interactiveControlsFillAnimation,controlsHideAnimation:this.uiConfig.features.interactiveControlsHideAnimation},endChapterHistoryFix:this.uiConfig.features.interactiveHistoryEndChapterFix});let{isInteractiveExpectation$:y,isSeekable$:$}=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 x=!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=x?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(I.player,T),x&&(x=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:I,actionType:T})=>{var R,A,P,E,W,F;if(!this.store||!this.microStoresRoot)return;let U=y.getValue();if(I==="action-choice"&&T==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(wd)),I==="action-choice-canceled"){let X=be(this.store.state.isPlaying$)||U;if(((P=(R=this.videoConfig)==null?void 0:R.isTouch)!=null?P:(A=this.videoConfig)!=null&&A.isMobile)&&X){this.store.ui.interactiveHideMobileControls.set(!0);return}(F=(E=this.videoConfig)==null?void 0:(W=E.callbacks).onDisabledInteractiveClick)==null||F.call(W)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:I,removeAllOpenURI:T})=>{this.store&&I==="container-fake-removed"&&T&&this.store.ui.controls.disabledControls$.remove(wd)})),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 R,A,P;T.length&&((P=(A=(R=this.videoConfig)==null?void 0:R.callbacks)==null?void 0:A.onInteractiveHistoryChanged)==null||P.call(A,T))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(I=>{var T,R,A;(A=(T=this.videoConfig)==null?void 0:(R=T.callbacks).onInteractiveChapterChanged)==null||A.call(R,I.chapter,I.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var I,T,R,A;(I=this.microStoresRoot)==null||I.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(A=(T=this.videoConfig)==null?void 0:(R=T.callbacks).onInteractiveTimeIndicatorClick)==null||A.call(R)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(I=>{this.log({message:I.toString()})}))}catch(d){this.log({message:d.message})}}initPlayer(e,i={}){var o,r,a,l,d,s,u,m,p,v,_,y,$,x,I,T,R,A,P,E,W,F,U,X,se;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=hc(OI,TI(e,j=>j instanceof Dv?j:void 0)),this.playerId=MI(e.playerId),this.uiConfig=Eh((a=i.ui)!=null?a:{}),this.updatePersistentLayerProps(),this.coreConfig=(l=i.core)!=null?l:{},this.statisticsConfig=(d=i.statistics)!=null?d:{},this.metaConfig=i.meta,this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer&&(this.rootContainer.style.minHeight="unset"),this.style.display="block",this.style.width="100%",this.style.height="100%"),this.videoConfig.playerView==="preview"&&(this.playerContainer.style.contain="none"),this.sentry={config:(s=this.uiConfig.sentry)!=null?s:{}},this.uiConfig.features.exposeInternalsToGlobal&&((u=this.internalsExposure)!=null||(this.internalsExposure=new AI("ui",this.playerId))),Cc.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()]}),Ov(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(v=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?v:!0),Ov(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(y=(_=this.uiConfig.features.pip)!=null?_:this.videoConfig.isPictureInPictureEnabled)!=null?y:!0,this.uiConfig.features.dpip=(x=($=this.uiConfig.features.dpip)!=null?$:this.videoConfig.isPictureInPictureEnabled)!=null?x:!0),this.uiConfig.ads.paramsOverride={preview:(I=this.uiConfig.ads.preview)!=null?I:this.videoConfig.adsPreviewParam,...this.uiConfig.ads.paramsOverride},this.videoConfig.isTouch=(R=(T=this.uiConfig.isMobile)!=null?T:this.videoConfig.isTouch)!=null?R:this.videoConfig.isMobile,(A=this.videoConfig).autoplay&&(A.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(P=this.uiConfig.ads.enable)!=null?P:this.videoConfig.showAds,this.videoConfig.adsSlotId=(E=this.uiConfig.ads.slot)!=null?E:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((W=this.uiConfig.showLogo)!=null?W:!this.videoConfig.logoHidden),(F=this.videoConfig).canRewindLive&&(F.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(U=this.videoConfig.supportLink)!=null?U:this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=this.uiConfig.features.autoplayNext&&this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=this.uiConfig.features.nextPrevButtons&&this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((X=this.videoConfig.videos)!=null&&X[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=lp.getLatestSupportedVersion(j):this.pictureInPictureApi=new Ds(j)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new ap:void 0,this.slotsApi=this.uiConfig.features.slots?new op(this.uiConfig.disabledSlotIds):void 0,this.annotationsApi=this.uiConfig.features.annotations?new dp(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new fp(this._shadowRoot):void 0,this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.isInited=!1,this.prevIsid=void 0,this.interactiveController&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveSubscription.unsubscribe()),this.videoConfig.interactiveData?this.initInteractives():this.createPlayer(this.videoConfig.videos[this.currentPlayingVideoIndex]),Hb(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(se=this.slotsApi)==null||se.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=be(this.store.state.positionExact$),l=be(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe(kI()).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 Uoe,VKNumericLanguage as zoe,loadVKLangPack as Woe}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as qoe,VideoFormat as Qoe}from"@vkontakte/videoplayer-core/es2018";var Voe=()=>{window.customElements.define("vk-video-player",mp)};export{Qu as ControlButtonType,ms as GridTypes,Uoe as InterfaceLanguage,Vd as MenuItemType,vs as PlayerPhase,El as VERSION,zoe as VKNumericLanguage,Qoe as VideoFormat,qoe as VideoQuality,Woe as loadVKLangPack,Voe as registerPlayerWebComponent};
|