@vkontakte/videoplayer 1.1.85-dev.01c6bd35.0 → 1.1.85-dev.031b4c0a.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015.cjs +36 -36
- package/es2015.esm.js +36 -36
- package/es2018.cjs +35 -35
- package/es2018.esm.js +35 -35
- package/es2024.cjs +35 -35
- package/es2024.esm.js +35 -35
- package/esnext.cjs +35 -35
- package/esnext.esm.js +35 -35
- package/evergreen.esm.js +35 -35
- package/package.json +5 -5
- package/types/VKVideoPlayer/index.svelte.d.ts +1 -0
- package/types/config.d.ts +1 -0
- package/types/store/index.d.ts +2 -2
- package/types/types/index.d.ts +1 -2
package/es2015.esm.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer v1.1.85-dev.
|
|
3
|
-
* Wed,
|
|
2
|
+
* @vkontakte/videoplayer v1.1.85-dev.031b4c0a.0
|
|
3
|
+
* Wed, 04 Mar 2026 07:29:04 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-1-85/doc/
|
|
5
5
|
*/
|
|
6
|
-
var m$=Object.defineProperty,v$=Object.defineProperties;var g$=Object.getOwnPropertyDescriptors;var Xv=Object.getOwnPropertySymbols;var h$=Object.prototype.hasOwnProperty,_$=Object.prototype.propertyIsEnumerable;var Zv=t=>{throw TypeError(t)};var Cp=(t,e,i)=>e in t?m$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,
|
|
6
|
+
var m$=Object.defineProperty,v$=Object.defineProperties;var g$=Object.getOwnPropertyDescriptors;var Xv=Object.getOwnPropertySymbols;var h$=Object.prototype.hasOwnProperty,_$=Object.prototype.propertyIsEnumerable;var Zv=t=>{throw TypeError(t)};var Cp=(t,e,i)=>e in t?m$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ge=(t,e)=>{for(var i in e||(e={}))h$.call(e,i)&&Cp(t,i,e[i]);if(Xv)for(var i of Xv(e))_$.call(e,i)&&Cp(t,i,e[i]);return t},Jt=(t,e)=>v$(t,g$(e));var lr=(t,e,i)=>Cp(t,typeof e!="symbol"?e+"":e,i),Tp=(t,e,i)=>e.has(t)||Zv("Cannot "+i);var Fi=(t,e,i)=>(Tp(t,e,"read from private field"),i?i.call(t):e.get(t)),Xs=(t,e,i)=>e.has(t)?Zv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),fl=(t,e,i,o)=>(Tp(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),Jv=(t,e,i)=>(Tp(t,e,"access private method"),i);var $t=(t,e,i)=>new Promise((o,s)=>{var a=r=>{try{d(i.next(r))}catch(u){s(u)}},l=r=>{try{d(i.throw(r))}catch(u){s(u)}},d=r=>r.done?o(r.value):Promise.resolve(r.value).then(a,l);d((i=i.apply(t,e)).next())});var Zs="[",Js="[!",Sa="]",us={};var ao=Symbol(),zn=Symbol("filename"),eg=Symbol("hmr"),tg="http://www.w3.org/1999/xhtml",zc="http://www.w3.org/2000/svg";var Ip="@attach";var Wc=!0;var og,ng,ig=(ng=(og=globalThis.process)==null?void 0:og.env)==null?void 0:ng.NODE_ENV,Ve=ig&&!ig.toLowerCase().startsWith("prod");var dr=Array.isArray,rg=Array.prototype.indexOf,rd=Array.from,Ep=Object.keys,vo=Object.defineProperty,Go=Object.getOwnPropertyDescriptor,Kc=Object.getOwnPropertyDescriptors,Pp=Object.prototype,sg=Array.prototype,Ca=Object.getPrototypeOf,kp=Object.isExtensible;function ea(t){return typeof t=="function"}var yt=()=>{};function ag(t){return t()}function ta(t){for(var e=0;e<t.length;e++)t[e]()}var Yo=Symbol("$state"),ml=Symbol("legacy props"),lg=Symbol(""),qc=Symbol("proxy path"),Qc=1,vl=3,cr=8;function Gc(t){return t===this.v}function gl(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function dg(t,e){return t!==e}function hl(t){return!gl(t,this.v)}function cg(){if(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 ug(t){if(
|
|
8
|
+
https://svelte.dev/e/derived_references_self`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/derived_references_self")}function ug(t){if(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 pg(){if(
|
|
10
|
+
https://svelte.dev/e/effect_in_teardown`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function pg(){if(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 fg(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 mg(){if(
|
|
12
|
+
https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function mg(){if(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 vg(){if(
|
|
14
|
+
https://svelte.dev/e/effect_update_depth_exceeded`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function vg(){if(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 gg(){if(
|
|
16
|
+
https://svelte.dev/e/hydration_failed`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/hydration_failed")}function gg(){if(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 hg(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 _g(t){if(
|
|
18
|
+
https://svelte.dev/e/props_invalid_value`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_invalid_value")}function _g(t){if(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 bg(t){if(
|
|
20
|
+
https://svelte.dev/e/props_rest_readonly`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_rest_readonly")}function bg(t){if(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 $g(){if(
|
|
22
|
+
https://svelte.dev/e/rune_outside_svelte`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function $g(){if(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 yg(){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 xg(){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 ps=!1,fs=!1;function wg(){ps=!0}var sd=null;function Ps(t){let e=Error(),i=e.stack;if(i){let o=i.split(`
|
|
23
23
|
`),s=[`
|
|
24
|
-
`];for(let a=0;a<o.length;a++){let l=o[a];if(l!=="Error"){if(l.includes("validate_each_keys"))return null;l.includes("svelte/src/internal")||s.push(l)}}if(s.length===1)return null;
|
|
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")||s.push(l)}}if(s.length===1)return null;vo(e,"stack",{value:s.join(`
|
|
25
|
+
`)}),vo(e,"name",{value:`${t}Error`})}return e}function Kr(t,e){return t.label=e,Yc(t.v,e),t}function Yc(t,e){var i;return(i=t==null?void 0:t[qc])==null||i.call(t,e),t}function _l(t){if(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 Bt=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 Bt=null;function ad(t){Bt=t}var ur=null;function ld(t){ur=t}function bl(t){return Mp("getContext").get(t)}function $l(t,e){return Mp("setContext").set(t,e),e}function dd(){return Mp("getAllContexts")}function H(t,e=!1,i){var o=Bt={p:Bt,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};ps&&!e&&(Bt.l={s:null,u:null,r1:[],r2:kr(!1)}),Mo(()=>{o.d=!0}),Ve&&(Bt.function=i,ur=i)}function F(t){var l,d;let e=Bt;if(e!==null){t!==void 0&&(e.x=t);let r=e.e;if(r!==null){var i=xt,o=Vt;e.e=null;try{for(var s=0;s<r.length;s++){var a=r[s];go(a.effect),Yi(a.reaction),Vo(a.fn)}}finally{go(i),Yi(o)}}Bt=e.p,Ve&&(ur=(d=(l=e.p)==null?void 0:l.function)!=null?d:null),e.m=!0}return t||{}}function ms(){return!ps||Bt!==null&&Bt.l===null}function Mp(t){var e;return Bt===null&&_l(t),(e=Bt.c)!=null?e:Bt.c=new Map($$(Bt)||void 0)}function $$(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var y$=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function si(t){if(typeof t!="object"||t===null||Yo in t)return t;let e=Ca(t);if(e!==Pp&&e!==sg)return t;var i=new Map,o=dr(t),s=K(0),a=Ve&&fs?Ps("CreatedAt"):null,l=Vt,d=m=>{var p=Vt;Yi(l);var v=m();return Yi(p),v};o&&i.set("length",K(t.length,a));var r="";function u(m){r=m,Kr(s,`${r} version`);for(let[p,v]of i)Kr(v,Ta(r,p))}return new Proxy(t,{defineProperty(m,p,v){(!("value"in v)||v.configurable===!1||v.enumerable===!1||v.writable===!1)&&$g();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,Ta(r,p)),y}):O($,v.value,!0),!0},deleteProperty(m,p){var v=i.get(p);if(v===void 0){if(p in m){let h=d(()=>K(ao,a));i.set(p,h),Vp(s),Ve&&Kr(h,Ta(r,p))}}else{if(o&&typeof p=="string"){var $=i.get("length"),y=Number(p);Number.isInteger(y)&&y<$.v&&O($,y)}O(v,ao),Vp(s)}return!0},get(m,p,v){var x;if(p===Yo)return t;if(Ve&&p===qc)return u;var $=i.get(p),y=p in m;if($===void 0&&(!y||(x=Go(m,p))!=null&&x.writable)&&($=d(()=>{var I=si(y?m[p]:ao),T=K(I,a);return Ve&&Kr(T,Ta(r,p)),T}),i.set(p,$)),$!==void 0){var h=n($);return h===ao?void 0:h}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),h=y==null?void 0:y.v;if(y!==void 0&&h!==ao)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return v},has(m,p){var h;if(p===Yo)return!0;var v=i.get(p),$=v!==void 0&&v.v!==ao||Reflect.has(m,p);if(v!==void 0||xt!==null&&(!$||(h=Go(m,p))!=null&&h.writable)){v===void 0&&(v=d(()=>{var x=$?si(m[p]):ao,I=K(x,a);return Ve&&Kr(I,Ta(r,p)),I}),i.set(p,v));var y=n(v);if(y===ao)return!1}return $},set(m,p,v,$){var V;var y=i.get(p),h=p in m;if(o&&p==="length")for(var x=v;x<y.v;x+=1){var I=i.get(x+"");I!==void 0?O(I,ao):x in m&&(I=d(()=>K(ao,a)),i.set(x+"",I),Ve&&Kr(I,Ta(r,x)))}if(y===void 0)(!h||(V=Go(m,p))!=null&&V.writable)&&(y=d(()=>K(void 0,a)),O(y,si(v)),i.set(p,y),Ve&&Kr(y,Ta(r,p)));else{h=y.v!==ao;var T=d(()=>si(v));O(y,T)}var D=Reflect.getOwnPropertyDescriptor(m,p);if(D!=null&&D.set&&D.set.call($,v),!h){if(o&&typeof p=="string"){var k=i.get("length"),E=Number(p);Number.isInteger(E)&&E>=k.v&&O(k,E+1)}Vp(s)}return!0},ownKeys(m){n(s);var p=Reflect.ownKeys(m).filter(y=>{var h=i.get(y);return h===void 0||h.v!==ao});for(var[v,$]of i)$.v!==ao&&!(v in m)&&p.push(v);return p},setPrototypeOf(){yg()}})}function Ta(t,e){var i;return typeof e=="symbol"?`${t}[Symbol(${(i=e.description)!=null?i:""})]`:y$.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function Vp(t,e=1){O(t,t.v+e)}function yl(t){try{if(t!==null&&typeof t=="object"&&Yo in t)return t[Yo]}catch(e){}return t}function Rp(t,e){return Object.is(yl(t),yl(e))}function qr(t){var e=2050,i=Vt!==null&&(Vt.f&2)!==0?Vt:null;xt===null||i!==null&&(i.f&256)!==0?e|=256:xt.f|=1048576;let o={ctx:Bt,deps:null,effects:null,equals:Gc,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:i!=null?i:xt};return Ve&&fs&&(o.created=Ps("CreatedAt")),o}function f(t){let e=qr(t);return Zc(e),e}function fr(t){let e=qr(t);return e.equals=hl,e}function jc(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)ji(e[i])}}var Dp=[];function x$(t){for(var e=t.parent;e!==null;){if((e.f&2)===0)return e;e=e.parent}return null}function Bp(t){var e,i=xt;if(go(x$(t)),Ve){let o=Ia;Op(new Set);try{Dp.includes(t)&&cg(),Dp.push(t),jc(t),e=Xc(t)}finally{go(i),Op(o),Dp.pop()}}else try{jc(t),e=Xc(t)}finally{go(i)}return e}function Hp(t){var e=Bp(t);if(t.equals(e)||(t.v=e,t.wv=cd()),!ks){var i=(As||(t.f&256)!==0)&&t.deps!==null?4096:1024;Tn(t,i)}}var Ia=new Set,xl=new Map;function Op(t){Ia=t}function kr(t,e){var i={f:0,v:t,reactions:null,equals:Gc,rv:0,wv:0};return Ve&&fs&&(i.created=e!=null?e:Ps("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function K(t,e){let i=kr(t,e);return Zc(i),i}function vs(t,e=!1,i=!0){var s,a;let o=kr(t);return e||(o.equals=hl),ps&&i&&Bt!==null&&Bt.l!==null&&((a=(s=Bt.l).s)!=null?a:s.s=[]).push(o),o}function O(t,e,i=!1){var s;Vt!==null&&(!vr||(Vt.f&262144)!==0)&&ms()&&(Vt.f&262162)!==0&&!((s=Xo)!=null&&s[1].includes(t)&&Xo[0]===Vt)&&xg();let o=i?si(e):e;return Ve&&Yc(o,t.label),wl(t,o)}function wl(t,e){if(!t.equals(e)){var i=t.v;if(ks?xl.set(t,e):xl.set(t,i),t.v=e,Ve&&fs&&(t.updated=Ps("UpdatedAt"),xt!==null&&(t.set_during_effect=!0)),(t.f&2)!==0&&((t.f&2048)!==0&&Bp(t),Tn(t,(t.f&256)===0?1024:4096)),t.wv=cd(),Cg(t,2048),ms()&&xt!==null&&(xt.f&1024)!==0&&(xt.f&96)===0&&(mr===null?Tg([t]):mr.push(t)),Ve&&Ia.size>0){let o=Array.from(Ia);for(let s of o)(s.f&1024)!==0&&Tn(s,4096),Pa(s)&&Sl(s);Ia.clear()}}return e}function Cg(t,e){var i=t.reactions;if(i!==null)for(var o=ms(),s=i.length,a=0;a<s;a++){var l=i[a],d=l.f;if((d&2048)===0&&!(!o&&l===xt)){if(Ve&&(d&262144)!==0){Ia.add(l);continue}Tn(l,e),(d&1280)!==0&&((d&2)!==0?Cg(l,4096):pd(l))}}}var Cl="font-weight: bold",Tl="font-weight: normal";function Ig(t,e,i){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`,Cl,Tl):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Eg(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`,Cl,Tl):console.warn("https://svelte.dev/e/hydration_html_changed")}function ia(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`,Cl,Tl):console.warn("https://svelte.dev/e/hydration_mismatch")}function Pg(){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`,Cl,Tl):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function kg(){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",Cl,Tl):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Jc(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`,Cl,Tl):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var rt=!1;function ho(t){rt=t}var wt;function Ti(t){if(t===null)throw ia(),us;return wt=t}function Xi(){return Ti(Zo(wt))}function S(t){if(rt){if(Zo(wt)!==null)throw ia(),us;wt=t}}function Xt(t=1){if(rt){for(var e=t,i=wt;e--;)i=Zo(i);wt=i}}function ka(){for(var t=0,e=wt;;){if(e.nodeType===cr){var i=e.data;if(i===Sa){if(t===0)return e;t-=1}else(i===Zs||i===Js)&&(t+=1)}var o=Zo(e);e.remove(),e=o}}function eu(t){if(!t||t.nodeType!==cr)throw ia(),us;return t.data}function Ag(){let t=Array.prototype,e=Array.__svelte_cleanup;e&&e();let{indexOf:i,lastIndexOf:o,includes:s}=t;t.indexOf=function(a,l){let d=i.call(this,a,l);if(d===-1){for(let r=l!=null?l:0;r<this.length;r+=1)if(yl(this[r])===a){Jc("array.indexOf(...)");break}}return d},t.lastIndexOf=function(a,l){let d=o.call(this,a,l!=null?l:this.length-1);if(d===-1){for(let r=0;r<=(l!=null?l:this.length-1);r+=1)if(yl(this[r])===a){Jc("array.lastIndexOf(...)");break}}return d},t.includes=function(a,l){let d=s.call(this,a,l);if(!d){for(let r=0;r<this.length;r+=1)if(yl(this[r])===a){Jc("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{t.indexOf=i,t.lastIndexOf=o,t.includes=s}}var Aa,Lg,fd,Mg,Vg;function tu(){if(Aa===void 0){Aa=window,Lg=document,fd=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;Mg=Go(e,"firstChild").get,Vg=Go(e,"nextSibling").get,kp(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),kp(i)&&(i.__t=void 0),Ve&&(t.__svelte_meta=null,Ag())}}function In(t=""){return document.createTextNode(t)}function Ii(t){return Mg.call(t)}function Zo(t){return Vg.call(t)}function C(t,e){if(!rt)return Ii(t);var i=Ii(wt);if(i===null)i=wt.appendChild(In());else if(e&&i.nodeType!==vl){var o=In();return i==null||i.before(o),Ti(o),o}return Ti(i),i}function se(t,e){var s,a;if(!rt){var i=Ii(t);return i.nodeType===8&&i.data===""?Zo(i):i}if(e&&((s=wt)==null?void 0:s.nodeType)!==vl){var o=In();return(a=wt)==null||a.before(o),Ti(o),o}return wt}function P(t,e=1,i=!1){let o=rt?wt:t;for(var s;e--;)s=o,o=Zo(o);if(!rt)return o;if(i&&(o==null?void 0:o.nodeType)!==vl){var a=In();return o===null?s==null||s.after(a):o.before(a),Ti(a),a}return Ti(o),o}function md(t){t.textContent=""}function zp(t){xt===null&&Vt===null&&fg(t),Vt!==null&&(Vt.f&256)!==0&&xt===null&&pg(),ks&&ug(t)}function w$(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function La(t,e,i,o=!0){var r;var s=xt;if(Ve)for(;s!==null&&(s.f&262144)!==0;)s=s.parent;var a={ctx:Bt,deps:null,nodes_start:null,nodes_end:null,f:t|2048,first:null,fn:e,last:null,next:null,parent:s,prev:null,teardown:null,transitions:null,wv:0};if(Ve&&(a.component_function=ur),i)try{Sl(a),a.f|=32768}catch(u){throw ji(a),u}else e!==null&&pd(a);var l=i&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&1048704)===0;if(!l&&o&&(s!==null&&w$(a,s),Vt!==null&&(Vt.f&2)!==0)){var d=Vt;((r=d.effects)!=null?r:d.effects=[]).push(a)}return a}function Mo(t){let e=La(8,null,!1);return Tn(e,1024),e.teardown=t,e}function Fe(t){var s;zp("$effect");var e=xt!==null&&(xt.f&32)!==0&&Bt!==null&&!Bt.m;if(Ve&&vo(t,"name",{value:"$effect"}),e){var i=Bt;((s=i.e)!=null?s:i.e=[]).push({fn:t,effect:xt,reaction:Vt})}else{var o=Vo(t);return o}}function hd(t){return zp("$effect.pre"),Ve&&vo(t,"name",{value:"$effect.pre"}),Jo(t)}function nu(t){let e=La(64,t,!0);return()=>{ji(e)}}function Dg(t){let e=La(64,t,!0);return(i={})=>new Promise(o=>{i.outro?Qn(e,()=>{ji(e),o(void 0)}):(ji(e),o(void 0))})}function Vo(t){return La(4,t,!1)}function Jo(t){return La(8,t,!0)}function N(t,e=[],i=qr){if(Ve)return Jo(()=>{var s=xt,a=()=>t(...l.map(n));vo(s.fn,"name",{value:"{expression}"}),vo(a,"name",{value:"{expression}"});let l=e.map(i);Zi(a)});let o=e.map(i);return Zi(()=>t(...o.map(n)))}function Zi(t,e=0){return La(24|e,t,!0)}function Ui(t,e=!0){return La(40,t,!0,e)}function Wp(t){var e=t.teardown;if(e!==null){let i=ks,o=Vt;Fp(!0),Yi(null);try{e.call(null)}finally{Fp(i),Yi(o)}}}function Kp(t,e=!1){var i=t.first;for(t.first=t.last=null;i!==null;){var o=i.next;(i.f&64)!==0?i.parent=null:ji(i,e),i=o}}function Og(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&32)===0&&ji(e),e=i}}function ji(t,e=!0){var i=!1;(e||(t.f&524288)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(qp(t.nodes_start,t.nodes_end),i=!0),Kp(t,e&&!i),_d(t,0),Tn(t,16384);var o=t.transitions;if(o!==null)for(let a of o)a.stop();Wp(t);var s=t.parent;s!==null&&s.first!==null&&Qp(t),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 qp(t,e){for(;t!==null;){var i=t===e?null:Zo(t);t.remove(),t=i}}function Qp(t){var e=t.parent,i=t.prev,o=t.next;i!==null&&(i.next=o),o!==null&&(o.prev=i),e!==null&&(e.first===t&&(e.first=o),e.last===t&&(e.last=i))}function Qn(t,e){var i=[];ru(t,i,!0),Gp(i,()=>{ji(t),e&&e()})}function Gp(t,e){var i=t.length;if(i>0){var o=()=>--i||e();for(var s of t)s.out(o)}else e()}function ru(t,e,i){if((t.f&8192)===0){if(t.f^=8192,t.transitions!==null)for(let l of t.transitions)(l.is_global||i)&&e.push(l);for(var o=t.first;o!==null;){var s=o.next,a=(o.f&65536)!==0||(o.f&32)!==0;ru(o,e,a?i:!1),o=s}}}function Ms(t){Ng(t,!0)}function Ng(t,e){if((t.f&8192)!==0){t.f^=8192;for(var i=t.first;i!==null;){var o=i.next,s=(i.f&65536)!==0||(i.f&32)!==0;Ng(i,s?e:!1),i=o}if(t.transitions!==null)for(let a of t.transitions)(a.is_global||e)&&a.in()}}var bd=[],Yp=[];function Bg(){var t=bd;bd=[],ta(t)}function S$(){var t=Yp;Yp=[],ta(t)}function En(t){bd.length===0&&queueMicrotask(Bg),bd.push(t)}function Hg(){bd.length>0&&Bg(),Yp.length>0&&S$()}function Ug(t){var e=xt;if(Ve&&t instanceof Error&&C$(t,e),(e.f&32768)===0){if((e.f&128)===0)throw t;e.fn(t)}else $d(t,e)}function $d(t,e){for(;e!==null;){if((e.f&128)!==0)try{e.fn(t);return}catch(i){}e=e.parent}throw t}var Fg=new WeakSet;function C$(t,e){var l,d;if(Fg.has(t))return;Fg.add(t);let i=Go(t,"message");if(!(i&&!i.configurable)){for(var o=fd?" ":" ",s=`
|
|
38
38
|
${o}in ${((l=e.fn)==null?void 0:l.name)||"<unknown>"}`,a=e.ctx;a!==null;)s+=`
|
|
39
|
-
${o}in ${(d=a.function)==null?void 0:d[
|
|
39
|
+
${o}in ${(d=a.function)==null?void 0:d[zn].split("/").pop()}`,a=a.p;vo(t,"message",{value:t.message+`
|
|
40
40
|
${s}
|
|
41
|
-
`}),t.stack&&
|
|
41
|
+
`}),t.stack&&vo(t,"stack",{value:t.stack.split(`
|
|
42
42
|
`).filter(r=>!r.includes("svelte/src/internal")).join(`
|
|
43
|
-
`)})}}var Va=!1,Sl=null,Ra=!1,Ls=!1;function Hp(t){Ls=t}var $d=[],yd=[],Vt=null,br=!1;function Qi(t){Vt=t}var yt=null;function po(t){yt=t}var Qo=null;function Zc(t){Vt!==null&&Vt.f&2097152&&(Qo===null?Qo=[Vt,[t]]:Qo[1].push(t))}var Ln=null,$r=0,_r=null;function Tg(t){_r=t}var Kg=1,au=0,Ms=!1,lu=null;function dd(){return++Kg}function ka(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 s,a,l=(e&512)!==0,d=o&&yt!==null&&!Ms,r=i.length;if(l||d){var u=t,f=u.parent;for(s=0;s<r;s++)a=i[s],(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&&f!==null&&(f.f&256)===0&&(u.f^=256)}for(s=0;s<r;s++)if(a=i[s],ka(a)&&Fp(a),a.wv>t.wv)return!0}(!o||yt!==null&&!Ms)&&Pn(t,1024)}return!1}function Qg(t,e,i=!0){var o=t.reactions;if(o!==null)for(var s=0;s<o.length;s++){var a=o[s];Qo!=null&&Qo[1].includes(t)&&Qo[0]===Vt||((a.f&2)!==0?Qg(a,e,!1):e===a&&(i?Pn(a,2048):(a.f&1024)!==0&&Pn(a,4096),ud(a)))}}function Xc(t){var b,y;var e=Ln,i=$r,o=_r,s=Vt,a=Ms,l=Qo,d=Bt,r=br,u=t.f;Ln=null,$r=0,_r=null,Ms=(u&256)!==0&&(br||!Ra||Vt===null),Vt=(u&96)===0?t:null,Qo=null,sd(t.ctx),br=!1,au++,t.f|=2097152;try{var f=(0,t.fn)(),p=t.deps;if(Ln!==null){var v;if(hd(t,$r),p!==null&&$r>0)for(p.length=$r+Ln.length,v=0;v<Ln.length;v++)p[$r+v]=Ln[v];else t.deps=p=Ln;if(!Ms||(u&2)!==0&&t.reactions!==null)for(v=$r;v<p.length;v++)((y=(b=p[v]).reactions)!=null?y:b.reactions=[]).push(t)}else p!==null&&$r<p.length&&(hd(t,$r),p.length=$r);if(_s()&&_r!==null&&!br&&p!==null&&(t.f&6146)===0)for(v=0;v<_r.length;v++)Qg(_r[v],t);return s!==null&&s!==t&&(au++,_r!==null&&(o===null?o=_r:o.push(..._r))),f}catch(_){Ug(_)}finally{Ln=e,$r=i,_r=o,Vt=s,Ms=a,Qo=l,sd(d),br=r,t.f^=2097152}}function T$(t,e){let i=e.reactions;if(i!==null){var o=rg.call(i,t);if(o!==-1){var s=i.length-1;s===0?i=e.reactions=null:(i[o]=i[s],i.pop())}}i===null&&(e.f&2)!==0&&(Ln===null||!Ln.includes(e))&&(Pn(e,4096),(e.f&768)===0&&(e.f^=512),jc(e),hd(e,0))}function hd(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)T$(t,i[o])}function yl(t){var e=t.f;if((e&16384)===0){Pn(t,1024);var i=yt,o=Ra;if(yt=t,Ra=!0,Me){var s=vr;ad(t.component_function)}try{(e&16)!==0?Og(t):Kp(t),Wp(t);var a=Xc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Kg,Me&&hs&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=dd(),l.set_during_effect=!1);Me&&yd.push(t)}finally{Ra=o,yt=i,Me&&ad(s)}}}function zg(){console.error("Last ten effects were: ",yd.slice(-10).map(t=>t.fn)),yd=[]}function I$(){try{mg()}catch(t){if(Me&&uo(t,"stack",{value:""}),Sl!==null)if(Me)try{bd(t,Sl)}catch(e){throw zg(),e}else bd(t,Sl);else throw Me&&zg(),t}}function Xp(){var t=Ra;try{var e=0;for(Ra=!0;$d.length>0;){e++>1e3&&I$();var i=$d,o=i.length;$d=[];for(var s=0;s<o;s++){var a=P$(i[s]);E$(a)}bl.clear()}}finally{Va=!1,Ra=t,Sl=null,Me&&(yd=[])}}function E$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&ka(o)&&(yl(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?qp(o):o.fn=null))}}function ud(t){Va||(Va=!0,queueMicrotask(Xp));for(var e=Sl=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}$d.push(e)}function P$(t){for(var e=[],i=t;i!==null;){var o=i.f,s=(o&96)!==0,a=s&&(o&1024)!==0;if(!a&&(o&8192)===0){(o&4)!==0?e.push(i):s?i.f^=1024:ka(i)&&yl(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 Cl(t){var e;for(t&&(Va=!0,Xp(),Va=!0,e=t());;){if(Fg(),$d.length===0)return Va=!1,Sl=null,Me&&(yd=[]),e;Va=!0,Xp()}}function mo(){return bt(this,null,function*(){yield Promise.resolve(),Cl()})}function n(t){var e=t.f,i=(e&2)!==0;if(lu!==null&&lu.add(t),Vt!==null&&!br){if(!(Qo!=null&&Qo[1].includes(t))||Qo[0]!==Vt){var o=Vt.deps;t.rv<au&&(t.rv=au,Ln===null&&o!==null&&o[$r]===t?$r++:Ln===null?Ln=[t]:(!Ms||!Ln.includes(t))&&Ln.push(t))}}else if(i&&t.deps===null&&t.effects===null){var s=t,a=s.parent;a!==null&&(a.f&256)===0&&(s.f^=256)}if(i&&(s=t,ka(s)&&Fp(s)),Me&&hs&&!br&&rd!==null&&Vt!==null&&rd.reaction===Vt)if(t.trace)t.trace();else{var l=As("TracedAt");if(l){var d=rd.entries.get(t);d===void 0&&(d={traces:[]},rd.entries.set(t,d));var r=d.traces[d.traces.length-1];l.stack!==(r==null?void 0:r.stack)&&d.traces.push(l)}}return Ls&&bl.has(t)?bl.get(t):t.v}function Et(t){var e=br;try{return br=!0,t()}finally{br=e}}var k$=-7169;function Pn(t,e){t.f=t.f&k$|e}function cu(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Wo in t)du(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&Wo in i&&du(i)}}}function du(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let o in t)try{du(t[o],e)}catch(s){}let i=Ta(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){let o=Kc(i);for(let s in o){let a=o[s].get;if(a)try{a.call(t)}catch(l){}}}}}function Zp(t,e){if(e){let i=document.body;t.autofocus=!0,An(()=>{document.activeElement===i&&t.focus()})}}function xd(t){var e=Vt,i=yt;Qi(null),po(null);try{return t()}finally{Qi(e),po(i)}}var Jp=new Set,uu=new Set;function Da(t){if(!nt)return;t.removeAttribute("onload"),t.removeAttribute("onerror");let e=t.__e;e!==void 0&&(t.__e=void 0,queueMicrotask(()=>{t.isConnected&&t.dispatchEvent(e)}))}function ef(t,e,i,o={}){function s(a){if(o.capture||Tl.call(e,a),!a.cancelBubble)return xd(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?An(()=>{e.addEventListener(t,s,o)}):e.addEventListener(t,s,o),s}function ft(t,e,i,o,s){var a={capture:o,passive:s},l=ef(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&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 uu)i(t)}function Tl(t){var T;var e=this,i=e.ownerDocument,o=t.type,s=((T=t.composedPath)==null?void 0:T.call(t))||[],a=s[0]||t.target,l=0,d=t.__root;if(d){var r=s.indexOf(d);if(r!==-1&&(e===document||e===window)){t.__root=e;return}var u=s.indexOf(e);if(u===-1)return;r<=u&&(l=r)}if(a=s[l]||t.target,a!==e){uo(t,"currentTarget",{configurable:!0,get(){return a||i}});var f=Vt,p=yt;Qi(null),po(null);try{for(var v,b=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var _=a["__"+o];if(_!=null&&(!a.disabled||t.target===a))if(fr(_)){var[w,...I]=_;w.apply(a,[t,...I])}else _.call(a,t)}catch(R){v?b.push(R):v=R}if(t.cancelBubble||y===e||y===null)break;a=y}if(v){for(let R of b)queueMicrotask(()=>{throw R});throw v}}finally{t.__root=e,delete t.currentTarget,Qi(f),po(p)}}}var L$;function qg(){L$=void 0}function Il(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Po(t,e){var i=yt;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function L(t,e){var i=(e&1)!==0,o=(e&2)!==0,s,a=!t.startsWith("<!>");return()=>{if(nt)return Po(xt,null),xt;s===void 0&&(s=Il(a?t:"<!>"+t),i||(s=Pi(s)));var l=o||pd?document.importNode(s,!0):s.cloneNode(!0);if(i){var d=Pi(l),r=l.lastChild;Po(d,r)}else Po(l,l);return l}}function R$(t,e,i="svg"){var o=!t.startsWith("<!>"),s=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(nt)return Po(xt,null),xt;if(!l){var d=Il(a),r=Pi(d);if(s)for(l=document.createDocumentFragment();Pi(r);)l.appendChild(Pi(r));else l=Pi(r)}var u=l.cloneNode(!0);if(s){var f=Pi(u),p=u.lastChild;Po(f,p)}else Po(u,u);return u}}function ke(t,e){return R$(t,e,"svg")}function $s(t=""){if(!nt){var e=kn(t+"");return Po(e,e),e}var i=xt;return i.nodeType!==pl&&(i.before(i=kn()),Si(i)),Po(i,i),i}function Ve(){if(nt)return Po(xt,null),xt;var t=document.createDocumentFragment(),e=document.createComment(""),i=kn();return t.append(e,i),Po(e,i),t}function $(t,e){if(nt){yt.nodes_end=xt,Gi();return}t!==null&&t.before(e)}var D$=/\r/g;function Yg(t){t=t.replace(D$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function jg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var O$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Xg(t){return O$.includes(t)}var N$=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var B$={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Zg(t){var e;return t=t.toLowerCase(),(e=B$[t])!=null?e:t}var H3=[...N$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var F$=["touchstart","touchmove"];function Jg(t){return F$.includes(t)}var H$=["$state","$state.raw","$derived","$derived.by"],U3=[...H$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var U$=["textarea","script","style","title"];function eh(t){return U$.includes(t)}function pu(t){return t==null?void 0:t.replace(/\//g,"/")}var wd=!0;function fu(t){wd=t}function he(t,e){var o;var i=e==null?"":typeof e=="object"?e+"":e;i!==((o=t.__t)!=null?o:t.__t=t.nodeValue)&&(t.__t=i,t.nodeValue=i+"")}function es(t,e){return th(t,e)}function of(t,e){var l;tu(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=nt,s=xt;try{for(var a=Pi(i);a&&(a.nodeType!==mr||a.data!==ta);)a=qo(a);if(!a)throw vs;fo(!0),Si(a),Gi();let d=th(t,Jt(Ye({},e),{anchor:a}));if(xt===null||xt.nodeType!==mr||xt.data!==Ca)throw ra(),vs;return fo(!1),d}catch(d){if(d===vs)return e.recover===!1&&vg(),tu(),fd(i),fo(!1),es(t,e);throw d}finally{fo(o),Si(s),qg()}}var El=new Map;function th(t,{target:e,anchor:i,props:o={},events:s,context:a,intro:l=!0}){tu();var d=new Set,r=p=>{for(var v=0;v<p.length;v++){var b=p[v];if(!d.has(b)){d.add(b);var y=Jg(b);e.addEventListener(b,Tl,{passive:y});var _=El.get(b);_===void 0?(document.addEventListener(b,Tl,{passive:y}),El.set(b,1)):El.set(b,_+1)}}};r(nd(Jp)),uu.add(r);var u=void 0,f=Dg(()=>{var p=i!=null?i:e.appendChild(kn());return Fi(()=>{if(a){B({});var v=Bt;v.c=a}s&&(o.$$events=s),nt&&Po(p,null),wd=l,u=t(p,o)||{},wd=!0,nt&&(yt.nodes_end=xt),a&&F()}),()=>{var y;for(var v of d){e.removeEventListener(v,Tl);var b=El.get(v);--b===0?(document.removeEventListener(v,Tl),El.delete(v)):El.set(v,b)}uu.delete(r),p!==i&&((y=p.parentNode)==null||y.removeChild(p))}});return tf.set(u,f),u}var tf=new WeakMap;function Oa(t,e){let i=tf.get(t);return i?(tf.delete(t),i(e)):(Me&&Pg(),Promise.resolve())}function ei(t,e,...i){var o=t,s=$t,a;Yi(()=>{s!==(s=e())&&(a&&(qi(a),a=null),Me&&s==null&&gg(),a=Fi(()=>s(o,...i)))},65536),nt&&(o=xt)}if(Me){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;bg(e)},set:o=>{i=o}})}};Q$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var Q$;function At(t){Bt===null&&vl("onMount"),gs&&Bt.l!==null?K$(Bt).m.push(t):Fe(()=>{let e=Et(t);if(typeof e=="function")return e})}function ln(t){Bt===null&&vl("onDestroy"),At(()=>()=>Et(t))}function K$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var ih=new Map;function oh(t,e){var i=ih.get(t);i||(i=new Set,ih.set(t,i)),i.add(e)}function M(t,e,[i,o]=[0,0]){nt&&i===0&&Gi();var s=t,a=null,l=null,d=io,r=i>0?65536:0,u=!1;let f=(v,b=!0)=>{u=!0,p(b,v)},p=(v,b)=>{if(d===(d=v))return;let y=!1;if(nt&&o!==-1){if(i===0){let w=eu(s);w===ta?o=0:w===ia?o=1/0:(o=parseInt(w.substring(1)),o!==o&&(o=d?1/0:-1))}let _=o>i;!!d===_&&(s=Aa(),Si(s),fo(!1),y=!0,o=-1)}d?(a?Rs(a):b&&(a=Fi(()=>b(s))),l&&jn(l,()=>{l=null})):(l?Rs(l):b&&(l=Fi(()=>b(s,[i+1,o]))),a&&jn(a,()=>{a=null})),y&&fo(!0)};Yi(()=>{u=!1,e(f),u||p(null,null)},r),nt&&(s=xt)}function Ds(t,e,i){nt&&Gi();var o=t,s=io,a,l=_s()?dg:fl;Yi(()=>{l(s,s=e())&&(a&&jn(a),a=Fi(()=>i(o)))}),nt&&(o=xt)}var aa=null;function sf(t){aa=t}function Sd(t,e){return e}function Y$(t,e,i,o){for(var s=[],a=e.length,l=0;l<a;l++)ru(e[l].e,s,!0);var d=a>0&&s.length===0&&i!==null;if(d){var r=i.parentNode;fd(r),r.append(i),o.clear(),sa(t,e[0].prev,e[a-1].next)}Gp(s,()=>{for(var u=0;u<a;u++){var f=e[u];d||(o.delete(f.k),sa(t,f.prev,f.next)),qi(f.e,!d)}})}function yi(t,e,i,o,s,a=null){var l=t,d={flags:e,items:new Map,first:null},r=(e&4)!==0;if(r){var u=t;l=nt?Si(Pi(u)):u.appendChild(kn())}nt&&Gi();var f=null,p=!1,v=hr(()=>{var b=i();return fr(b)?b:b==null?[]:nd(b)});Yi(()=>{var b=n(v),y=b.length;if(p&&y===0)return;p=y===0;let _=!1;if(nt){var w=eu(l)===ia;w!==(y===0)&&(l=Aa(),Si(l),fo(!1),_=!0)}if(nt){for(var I=null,T,R=0;R<y;R++){if(xt.nodeType===mr&&xt.data===Ca){l=xt,_=!0,fo(!1);break}var A=b[R],P=o(A,R);T=sh(xt,d,I,null,A,P,R,s,e,i),d.items.set(P,T),I=T}y>0&&Si(Aa())}nt||j$(b,d,l,s,e,o,i),a!==null&&(y===0?f?Rs(f):f=Fi(()=>a(l)):f!==null&&jn(f,()=>{f=null})),_&&fo(!0),n(v)}),nt&&(l=xt)}function j$(t,e,i,o,s,a,l){var de,ae,pe,ee;var d=(s&8)!==0,r=(s&3)!==0,u=t.length,f=e.items,p=e.first,v=p,b,y=null,_,w=[],I=[],T,R,A,P;if(d)for(P=0;P<u;P+=1)T=t[P],R=a(T,P),A=f.get(R),A!==void 0&&((de=A.a)==null||de.measure(),(_!=null?_:_=new Set).add(A));for(P=0;P<u;P+=1){if(T=t[P],R=a(T,P),A=f.get(R),A===void 0){var E=v?v.e.nodes_start:i;y=sh(E,e,y,y===null?e.first:y.next,T,R,P,o,s,l),f.set(R,y),w=[],I=[],v=y.next;continue}if(r&&X$(A,T,P,s),(A.e.f&8192)!==0&&(Rs(A.e),d&&((ae=A.a)==null||ae.unfix(),(_!=null?_:_=new Set).delete(A))),A!==v){if(b!==void 0&&b.has(A)){if(w.length<I.length){var z=I[0],U;y=z.prev;var W=w[0],Y=w[w.length-1];for(U=0;U<w.length;U+=1)nh(w[U],z,i);for(U=0;U<I.length;U+=1)b.delete(I[U]);sa(e,W.prev,Y.next),sa(e,y,W),sa(e,Y,z),v=z,y=Y,P-=1,w=[],I=[]}else b.delete(A),nh(A,v,i),sa(e,A.prev,A.next),sa(e,A,y===null?e.first:y.next),sa(e,y,A),y=A;continue}for(w=[],I=[];v!==null&&v.k!==R;)(v.e.f&8192)===0&&(b!=null?b:b=new Set).add(v),I.push(v),v=v.next;if(v===null)continue;A=v}w.push(A),y=A,v=A.next}if(v!==null||b!==void 0){for(var te=b===void 0?[]:nd(b);v!==null;)(v.e.f&8192)===0&&te.push(v),v=v.next;var J=te.length;if(J>0){var oe=(s&4)!==0&&u===0?i:null;if(d){for(P=0;P<J;P+=1)(pe=te[P].a)==null||pe.measure();for(P=0;P<J;P+=1)(ee=te[P].a)==null||ee.fix()}Y$(e,te,oe,f)}}d&&An(()=>{var $e;if(_!==void 0)for(A of _)($e=A.a)==null||$e.apply()}),yt.first=e.first&&e.first.e,yt.last=y&&y.e}function X$(t,e,i,o){(o&1)!==0&&$l(t.v,e),(o&2)!==0?$l(t.i,i):t.i=i}function sh(t,e,i,o,s,a,l,d,r,u){var f=aa,p=(r&1)!==0,v=(r&16)===0,b=p?v?bs(s,!1,!1):Vr(s):s,y=(r&2)===0?l:Vr(l);Me&&p&&(b.trace=()=>{var w=typeof y=="number"?l:y.v;u()[w]});var _={i:y,v:b,k:a,a:null,e:null,prev:i,next:o};aa=_;try{return _.e=Fi(()=>d(t,b,y,u),nt),_.e.prev=i&&i.e,_.e.next=o&&o.e,i===null?e.first=_:(i.next=_,i.e.next=_.e),o!==null&&(o.prev=_,o.e.prev=_.e),_}finally{aa=f}}function nh(t,e,i){for(var o=t.next?t.next.e.nodes_start:i,s=e?e.e.nodes_start:i,a=t.e.nodes_start;a!==o;){var l=qo(a);s.before(a),a=l}}function sa(t,e,i){e===null?t.first=i:(e.next=i,e.e.next=i&&i.e),i!==null&&(i.prev=e,i.e.prev=e&&e.e)}function Z$(t,e,i){var a,l;if(!e||e===Yg(String(i!=null?i:"")))return;let o,s=(a=t.__svelte_meta)==null?void 0:a.loc;s?o=`near ${s.file}:${s.line}:${s.column}`:(l=vr)!=null&&l[Qn]&&(o=`in ${vr[Qn]}`),Eg(pu(o))}function Cd(t,e,i=!1,o=!1,s=!1){var a=t,l="";O(()=>{var b;var d=yt;if(l===(l=(b=e())!=null?b:"")){nt&&Gi();return}if(d.nodes_start!==null&&(Qp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(nt){for(var r=xt.data,u=Gi(),f=u;u!==null&&(u.nodeType!==mr||u.data!=="");)f=u,u=qo(u);if(u===null)throw ra(),vs;Me&&!s&&Z$(u.parentNode,r,l),Po(xt,f),a=Si(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var v=Il(p);if((i||o)&&(v=Pi(v)),Po(Pi(v),v.lastChild),i||o)for(;Pi(v);)a.before(Pi(v));else a.before(v)}})}function Hi(t,e,i){nt&&Gi();var o=t,s,a;Yi(()=>{s!==(s=e())&&(a&&(jn(a),a=null),s&&(a=Fi(()=>i(o,s))))},65536),nt&&(o=xt)}function Na(t,e,i,o,s,a){var y;let l=nt;nt&&Gi();var d=Me&&a&&((y=Bt)==null?void 0:y.function[Qn]),r,u,f=null;nt&&xt.nodeType===qc&&(f=xt,Gi());var p=nt?xt:t,v,b=aa;Yi(()=>{let _=e()||null;var w=s?s():i||_==="svg"?zc:null;if(_!==r){var I=aa;sf(b),v&&(_===null?jn(v,()=>{v=null,u=null}):_===u?Rs(v):(qi(v),fu(!1))),_&&_!==u&&(v=Fi(()=>{if(f=nt?f:w?document.createElementNS(w,_):document.createElement(_),Me&&a&&(f.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),Po(f,f),o){nt&&eh(_)&&f.append(document.createComment(""));var T=nt?Pi(f):f.appendChild(kn());nt&&(T===null?fo(!1):Si(T)),o(f,T)}yt.nodes_end=f,p.before(f)})),r=_,r&&(u=r),fu(!0),sf(I)}},65536),l&&(fo(!0),Si(p))}var lf;function ah(t){return lf=t.target,new af(t)}var Os,Rr,af=class{constructor(e){ea(this,Os);ea(this,Rr);var a,l;var i=new Map,o=(d,r)=>{var u=bs(r,!1,!1);return i.set(d,u),u};let s=new Proxy(Jt(Ye({},e.props||{}),{$$events:{}}),{get(d,r){var u;return n((u=i.get(r))!=null?u:o(r,Reflect.get(d,r)))},has(d,r){var u;return r===ul?!0:(n((u=i.get(r))!=null?u:o(r,Reflect.get(d,r))),Reflect.has(d,r))},set(d,r,u){var f;return D((f=i.get(r))!=null?f:o(r,u),u),Reflect.set(d,r,u)}});cl(this,Rr,(e.hydrate?of:es)(e.component,{target:e.target,anchor:e.anchor,props:s,context:e.context,intro:(a=e.intro)!=null?a:!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&Cl(),cl(this,Os,s.$$events);for(let d of Object.keys(Bi(this,Rr)))d==="$set"||d==="$destroy"||d==="$on"||uo(this,d,{get(){return Bi(this,Rr)[d]},set(r){Bi(this,Rr)[d]=r},enumerable:!0});Bi(this,Rr).$set=d=>{Object.assign(s,d)},Bi(this,Rr).$destroy=()=>{Oa(Bi(this,Rr))}}$set(e){Bi(this,Rr).$set(e)}$on(e,i){Bi(this,Os)[e]=Bi(this,Os)[e]||[];let o=(...s)=>i.call(this,...s);return Bi(this,Os)[e].push(o),()=>{Bi(this,Os)[e]=Bi(this,Os)[e].filter(s=>s!==o)}}$destroy(){Bi(this,Rr).$destroy()}};Os=new WeakMap,Rr=new WeakMap;function Q(t,e){An(()=>{var s,a,l;var i=t.getRootNode(),o=i.host?i:(l=(s=i.head)!=null?s:i.ownerDocument.head)!=null?l:(a=lf)==null?void 0:a.parentNode;if(!(o!=null&&o.querySelector("#"+e.hash))){let d=document.createElement("style");d.id=e.hash,d.textContent=e.code,o.appendChild(d),Me&&oh(e.hash,d)}})}function Ns(t,e){var i=void 0,o;Yi(()=>{i!==(i=e())&&(o&&(qi(o),o=null),i&&(o=Fi(()=>{Eo(()=>i(t))})))})}function lh(t){var e,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(i=lh(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function dh(){for(var t,e,i=0,o="",s=arguments.length;i<s;i++)(t=arguments[i])&&(e=lh(t))&&(o&&(o+=" "),o+=e);return o}function Td(t){return typeof t=="object"?dh(t):t!=null?t:""}var ch=[...`
|
|
44
|
-
\r\f \v\uFEFF`];function ph(t,e,i){var o=t==null?"":""+t;if(e&&(o=o?o+" "+e:e),i){for(var s in i)if(i[s])o=o?o+" "+s:s;else if(o.length)for(var a=s.length,l=0;(l=o.indexOf(s,l))>=0;){var d=l+a;(l===0||ch.includes(o[l-1]))&&(d===o.length||ch.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function uh(t,e=!1){var i=e?" !important;":";",o="";for(var s in t){var a=t[s];a!=null&&a!==""&&(o+=" "+s+": "+a+i)}return o}function df(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function fh(t,e){if(e){var i="",o,s;if(Array.isArray(e)?(o=e[0],s=e[1]):o=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,l=0,d=!1,r=[];o&&r.push(...Object.keys(o).map(df)),s&&r.push(...Object.keys(s).map(df));var u=0,f=-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===":"&&f===-1)f=p;else if(v===";"||p===_-1){if(f!==-1){var b=df(t.substring(u,f).trim());if(!r.includes(b)){v!==";"&&p++;var y=t.substring(u,p).trim();i+=" "+y+";"}}u=p+1,f=-1}}}}return o&&(i+=uh(o)),s&&(i+=uh(s,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function ie(t,e,i,o,s,a){var l=t.__className;if(nt||l!==i||l===void 0){var d=ph(i,o,a);(!nt||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&s!==a)for(var r in a){var u=!!a[r];(s==null||u!==!!s[r])&&t.classList.toggle(r,u)}return a}function cf(t,e={},i,o){for(var s in i){var a=i[s];e[s]!==a&&(i[s]==null?t.style.removeProperty(s):t.style.setProperty(s,a,o))}}function Ke(t,e,i,o){var s=t.__style;if(nt||s!==e){var a=fh(e,o);(!nt||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(cf(t,i==null?void 0:i[0],o[0]),cf(t,i==null?void 0:i[1],o[1],"important")):cf(t,i,o));return o}function Id(t,e,i){if(t.multiple){if(e==null)return;if(!fr(e))return kg();for(var o of t.options)o.selected=e.includes(mh(o));return}for(o of t.options){var s=mh(o);if(Rp(s,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function uf(t){var e=new MutationObserver(()=>{Id(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Io(()=>{e.disconnect()})}function mh(t){return"__value"in t?t.__value:t.value}var Pl=Symbol("class"),kl=Symbol("style"),hh=Symbol("is custom element"),_h=Symbol("is html");function bh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function De(t,e,i,o){var s=yh(t);if(nt&&(s[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||s1(t,e,i!=null?i:"");return}s[e]!==(s[e]=i)&&(e==="loading"&&(t[lg]=i),i==null?t.removeAttribute(e):typeof i!="string"&&xh(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function $h(t,e,i,o,s=!1){var A;var a=yh(t),l=a[hh],d=!a[_h];let r=nt&&l;r&&fo(!1);var u=e||{},f=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=Td(i.class):(o||i[Pl])&&(i.class=null),i[kl]&&((A=i.style)!=null||(i.style=null));var v=xh(t);for(let P in i){let E=i[P];if(f&&P==="value"&&E==null){t.value=t.__value="",u[P]=E;continue}if(P==="class"){var b=t.namespaceURI==="http://www.w3.org/1999/xhtml";ie(t,b,E,o,e==null?void 0:e[Pl],i[Pl]),u[P]=E,u[Pl]=i[Pl];continue}if(P==="style"){Ke(t,E,e==null?void 0:e[kl],i[kl]),u[P]=E,u[kl]=i[kl];continue}var y=u[P];if(!(E===y&&!(E===void 0&&t.hasAttribute(P)))){u[P]=E;var _=P[0]+P[1];if(_!=="$$")if(_==="on"){let z={},U="$$"+P,W=P.slice(2);var w=Xg(W);if(jg(W)&&(W=W.slice(0,-7),z.capture=!0),!w&&y){if(E!=null)continue;t.removeEventListener(W,u[U],z),u[U]=null}if(E!=null)if(w)t[`__${W}`]=E,Ze([W]);else{let Y=function(te){u[P].call(this,te)};var R=Y;u[U]=ef(W,t,Y,z)}else w&&(t[`__${W}`]=void 0)}else if(P==="style")De(t,P,E);else if(P==="autofocus")Zp(t,!!E);else if(!l&&(P==="__value"||P==="value"&&E!=null))t.value=t.__value=E;else if(P==="selected"&&f)bh(t,E);else{var I=P;d||(I=Zg(I));var T=I==="defaultValue"||I==="defaultChecked";if(E==null&&!l&&!T)if(a[P]=null,I==="value"||I==="checked"){let z=t,U=e===void 0;if(I==="value"){let W=z.defaultValue;z.removeAttribute(I),z.defaultValue=W,z.value=z.__value=U?W:null}else{let W=z.defaultChecked;z.removeAttribute(I),z.defaultChecked=W,z.checked=U?W:!1}}else t.removeAttribute(P);else T||v.includes(I)&&(l||typeof E!="string")?t[I]=E:typeof E!="function"&&De(t,I,E,s)}}}return r&&fo(!0),u}function oo(t,e,i=[],o,s=!1,a=Xr){let l=i.map(a);var d=void 0,r={},u=t.nodeName==="SELECT",f=!1;if(Yi(()=>{var v=e(...l.map(n)),b=$h(t,d,v,o,s);f&&u&&"value"in v&&Id(t,v.value,!1);for(let _ of Object.getOwnPropertySymbols(r))v[_]||qi(r[_]);for(let _ of Object.getOwnPropertySymbols(v)){var y=v[_];_.description===Ip&&(!d||y!==d[_])&&(r[_]&&qi(r[_]),r[_]=Fi(()=>Ns(t,()=>y))),b[_]=y}d=b}),u){var p=t;Eo(()=>{Id(p,d.value),uf(p)})}f=!0}function yh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[hh]:t.nodeName.includes("-"),[_h]:t.namespaceURI===tg}}var vh=new Map;function xh(t){var e=vh.get(t.nodeName);if(e)return e;vh.set(t.nodeName,e=[]);for(var i,o=t,s=Element.prototype;s!==o;){i=Kc(o);for(var a in i)i[a].set&&e.push(a);o=Ta(o)}return e}function s1(t,e,i){var o;Me&&(e==="srcset"&&a1(t,i)||pf((o=t.getAttribute(e))!=null?o:"",i)||Ig(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function pf(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function gh(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function a1(t,e){var i=gh(t.srcset),o=gh(e);return o.length===i.length&&o.every(([s,a],l)=>a===i[l][1]&&(pf(i[l][0],s)||pf(s,i[l][0])))}var l1=Wc?()=>performance.now():()=>Date.now(),ts={tick:t=>(Wc?requestAnimationFrame:$t)(t),now:()=>l1(),tasks:new Set};function wh(){let t=ts.now();ts.tasks.forEach(e=>{e.c(t)||(ts.tasks.delete(e),e.f())}),ts.tasks.size!==0&&ts.tick(wh)}function Sh(t){let e;return ts.tasks.size===0&&ts.tick(wh),{promise:new Promise(i=>{ts.tasks.add(e={c:t,f:i})}),abort(){ts.tasks.delete(e)}}}function mu(t,e){xd(()=>{t.dispatchEvent(new CustomEvent(e))})}function p1(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;let e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(i=>i[0].toUpperCase()+i.slice(1)).join("")}function Ch(t){let e={},i=t.split(";");for(let o of i){let[s,a]=o.split(":");if(!s||a===void 0)break;let l=p1(s.trim());e[l]=a.trim()}return e}var f1=t=>t;function Bs(t,e,i,o){var R;var s=(t&1)!==0,a=(t&2)!==0,l=s&&a,d=(t&4)!==0,r=l?"both":s?"in":"out",u,f=e.inert,p=e.style.overflow,v,b;function y(){var E;var A=Vt,P=yt;Qi(null),po(null);try{return u!=null?u:u=i()(e,(E=o==null?void 0:o())!=null?E:{},{direction:r})}finally{Qi(A),po(P)}}var _={is_global:d,in(){var A;if(e.inert=f,!s){b==null||b.abort(),(A=b==null?void 0:b.reset)==null||A.call(b);return}a||v==null||v.abort(),mu(e,"introstart"),v=ff(e,y(),b,1,()=>{mu(e,"introend"),v==null||v.abort(),v=u=void 0,e.style.overflow=p})},out(A){if(!a){A==null||A(),u=void 0;return}e.inert=!0,mu(e,"outrostart"),b=ff(e,y(),v,0,()=>{mu(e,"outroend"),A==null||A()})},stop:()=>{v==null||v.abort(),b==null||b.abort()}},w=yt;if(((R=w.transitions)!=null?R:w.transitions=[]).push(_),s&&wd){var I=d;if(!I){for(var T=w.parent;T&&(T.f&65536)!==0;)for(;(T=T.parent)&&(T.f&16)===0;);I=!T||(T.f&32768)!==0}I&&Eo(()=>{Et(()=>_.in())})}}function ff(t,e,i,o,s){var a=o===1;if(oa(e)){var l,d=!1;return An(()=>{if(!d){var w=e({direction:a?"in":"out"});l=ff(t,w,i,o,s)}}),{abort:()=>{d=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return s(),{abort:$t,deactivate:$t,reset:$t,t:()=>o};let{delay:r=0,css:u,tick:f,easing:p=f1}=e;var v=[];if(a&&i===void 0&&(f&&f(0,1),u)){var b=Ch(u(0,1));v.push(b,b)}var y=()=>1-o,_=t.animate(v,{duration:r,fill:"forwards"});return _.onfinish=()=>{var W;_.cancel();var w=(W=i==null?void 0:i.t())!=null?W:1-o;i==null||i.abort();var I=o-w,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=w+I*p(E/P),U=Ch(u(z,1-z));R.push(U),A||(A=U.overflow==="hidden")}A&&(t.style.overflow="hidden"),y=()=>{var Y=_.currentTime;return w+I*p(Y/T)},f&&Sh(()=>{if(_.playState!=="running")return!1;var Y=y();return f(Y,1-Y),!0})}_=t.animate(R,{duration:T,fill:"forwards"}),_.onfinish=()=>{y=()=>o,f==null||f(o,1-o),s()}},{abort:()=>{_&&(_.cancel(),_.effect=null,_.onfinish=$t)},deactivate:()=>{s=$t},reset:()=>{o===0&&(f==null||f(1,0))},t:()=>y()}}function mf(t,e,i){var o=zo(t,e);o&&o.set&&(t[e]=i,Io(()=>{t[e]=null}))}var la,Al,Ed,gu,Th,hu=class hu{constructor(e){ea(this,gu);ea(this,la,new WeakMap);ea(this,Al);ea(this,Ed);cl(this,Ed,e)}observe(e,i){var o=Bi(this,la).get(e)||new Set;return o.add(i),Bi(this,la).set(e,o),Jv(this,gu,Th).call(this).observe(e,Bi(this,Ed)),()=>{var s=Bi(this,la).get(e);s.delete(i),s.size===0&&(Bi(this,la).delete(e),Bi(this,Al).unobserve(e))}}};la=new WeakMap,Al=new WeakMap,Ed=new WeakMap,gu=new WeakSet,Th=function(){var e;return(e=Bi(this,Al))!=null?e:cl(this,Al,new ResizeObserver(i=>{for(var o of i){hu.entries.set(o.target,o);for(var s of Bi(this,la).get(o.target)||[])s(o)}}))},pr(hu,"entries",new WeakMap);var vf=hu;var m1=new vf({box:"border-box"});function Mn(t,e,i){var o=m1.observe(t,()=>i(t[e]));Eo(()=>(Et(()=>i(t[e])),o))}function Ih(t,e){return t===e||(t==null?void 0:t[Wo])===e}function it(t={},e,i,o){return Eo(()=>{var s,a;return Go(()=>{s=a,a=(o==null?void 0:o())||[],Et(()=>{t!==i(...a)&&(e(t,...a),s&&Ih(i(...s),t)&&e(null,...s))})}),()=>{An(()=>{a&&Ih(i(...a),t)&&e(null,...a)})}}),t}function Yo(t=!1){let e=Bt,i=e.l.u;if(!i)return;let o=()=>cu(e.s);if(t){let s=0,a={},l=Xr(()=>{let d=!1,r=e.s;for(let u in r)r[u]!==a[u]&&(a[u]=r[u],d=!0);return d&&s++,s});o=()=>n(l)}i.b.length&&gd(()=>{Eh(e,o),na(i.b)}),Fe(()=>{let s=Et(()=>i.m.map(ag));return()=>{for(let a of s)typeof a=="function"&&a()}}),i.a.length&&Fe(()=>{Eh(e,o),na(i.a)})}function Eh(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function Pd(t,e,i){if(t==null)return e(void 0),i&&i(void 0),$t;let o=Et(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Ll=[];function Dr(t,e){return{subscribe:se(t,e).subscribe}}function se(t,e=$t){let i=null,o=new Set;function s(d){if(fl(t,d)&&(t=d,i)){let r=!Ll.length;for(let u of o)u[1](),Ll.push(u,t);if(r){for(let u=0;u<Ll.length;u+=2)Ll[u][0](Ll[u+1]);Ll.length=0}}}function a(d){s(d(t))}function l(d,r=$t){let u=[d,r];return o.add(u),o.size===1&&(i=e(s,a)||$t),d(t),()=>{o.delete(u),o.size===0&&i&&(i(),i=null)}}return{set:s,update:a,subscribe:l}}function ci(t,e,i){let o=!Array.isArray(t),s=o?[t]:t;if(!s.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let a=e.length<2;return Dr(i,(l,d)=>{let r=!1,u=[],f=0,p=$t,v=()=>{if(f)return;p();let y=e(o?u[0]:u,l,d);a?l(y):p=typeof y=="function"?y:$t},b=s.map((y,_)=>Pd(y,w=>{u[_]=w,f&=~(1<<_),r&&v()},()=>{f|=1<<_}));return r=!0,v(),function(){na(b),p(),r=!1}})}function _e(t){let e;return Pd(t,i=>e=i)(),e}var _u=!1,gf=Symbol();function x(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:bs(void 0),unsubscribe:$t};if(o.store!==t&&!(gf in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=$t;else{var s=!0;o.unsubscribe=Pd(t,l=>{s?o.source.v=l:D(o.source,l)}),s=!1}return t&&gf in i?_e(t):n(o.source)}function Be(){let t={};function e(){Io(()=>{for(var i in t)t[i].unsubscribe();uo(t,gf,{enumerable:!1,value:!0})})}return[t,e]}function hf(t){var e=_u;try{return _u=!1,[t(),_u]}finally{_u=e}}var y1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Me&&_g(`${t.name}.${String(e)}`),!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Vn(t,e,i){return new Proxy(Me?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},y1)}var x1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(oa(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o)return o[e]}},set(t,e,i){let o=t.props.length;for(;o--;){let s=t.props[o];oa(s)&&(s=s());let a=zo(s,e);if(a&&a.set)return a.set(i),!0}return!1},getOwnPropertyDescriptor(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(oa(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let s=zo(o,e);return s&&!s.configurable&&(s.configurable=!0),s}}},has(t,e){if(e===Wo||e===ul)return!1;for(let i of t.props)if(oa(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(oa(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 is(...t){return new Proxy({props:t},x1)}function Ph(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function g(t,e,i,o){var z,U;var s=(i&1)!==0,a=!gs||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,r=!1,u;l?[u,r]=hf(()=>t[e]):u=t[e];var f=Wo in t||ul in t,p=l&&((U=(z=zo(t,e))==null?void 0:z.set)!=null?U:f&&e in t&&(W=>t[e]=W))||void 0,v=o,b=!0,y=!1,_=()=>(y=!0,b&&(b=!1,d?v=Et(o):v=o),v);u===void 0&&o!==void 0&&(p&&a&&hg(e),u=_(),p&&p(u));var w;if(a)w=()=>{var W=t[e];return W===void 0?_():(b=!0,y=!1,W)};else{var I=(s?Xr:hr)(()=>t[e]);I.f|=131072,w=()=>{var W=n(I);return W!==void 0&&(v=void 0),W===void 0?v:W}}if((i&4)===0&&a)return w;if(p){var T=t.$$legacy;return function(W,Y){return arguments.length>0?((!a||!Y||T||r)&&p(Y?w():W),W):w()}}var R=!1,A=!1,P=bs(u),E=Xr(()=>{var W=w(),Y=n(P);return R?(R=!1,A=!0,Y):(A=!1,P.v=W)});return l&&n(E),s||(E.equals=ml),function(W,Y){if(lu!==null&&(R=A,w(),n(P)),arguments.length>0){let te=Y?n(E):a&&l?ri(W):W;if(!E.equals(te)){if(R=!0,D(P,te),y&&v!==void 0&&(v=te),Ph(E))return W;Et(()=>n(E))}return W}return Ph(E)?E.v:n(E)}}var w1;typeof HTMLElement=="function"&&(w1=class extends HTMLElement{constructor(e,i,o){super();pr(this,"$$ctor");pr(this,"$$s");pr(this,"$$c");pr(this,"$$cn",!1);pr(this,"$$d",{});pr(this,"$$r",!1);pr(this,"$$p_d",{});pr(this,"$$l",{});pr(this,"$$l_u",new Map);pr(this,"$$me");this.$$ctor=e,this.$$s=i,o&&this.attachShadow({mode:"open"})}addEventListener(e,i,o){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){let s=this.$$c.$on(e,i);this.$$l_u.set(i,s)}super.addEventListener(e,i,o)}removeEventListener(e,i,o){if(super.removeEventListener(e,i,o),this.$$c){let s=this.$$l_u.get(i);s&&(s(),this.$$l_u.delete(i))}}connectedCallback(){return bt(this,null,function*(){if(this.$$cn=!0,!this.$$c){let i=function(a){return l=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),$(l,d)}};var e=i;if(yield Promise.resolve(),!this.$$cn||this.$$c)return;let o={},s=S1(this);for(let a of this.$$s)a in s&&(a==="default"&&!this.$$d.children?(this.$$d.children=i(a),o.default=!0):o[a]=i(a));for(let a of this.attributes){let l=this.$$g_p(a.name);l in this.$$d||(this.$$d[l]=_f(l,a.value,this.$$p_d,"toProp"))}for(let a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=ah({component:this.$$ctor,target:this.shadowRoot||this,props:Jt(Ye({},this.$$d),{$$slots:o,$$host:this})}),this.$$me=nu(()=>{Go(()=>{var a;this.$$r=!0;for(let l of Ep(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=_f(l,this.$$d[l],this.$$p_d,"toAttribute");d==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,d)}this.$$r=!1})});for(let a in this.$$l)for(let l of this.$$l[a]){let d=this.$$c.$on(a,l);this.$$l_u.set(l,d)}this.$$l={}}})}attributeChangedCallback(e,i,o){var s;this.$$r||(e=this.$$g_p(e),this.$$d[e]=_f(e,o,this.$$p_d,"toProp"),(s=this.$$c)==null||s.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Ep(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function _f(t,e,i,o){var a;let s=(a=i[t])==null?void 0:a.type;if(e=s==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!i[t])return e;if(o==="toAttribute")switch(s){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e==null?null:e;default:return e}else switch(s){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function S1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var kh="5";var Ah,Lh,Mh;typeof window!="undefined"&&((Mh=(Lh=(Ah=window.__svelte)!=null?Ah:window.__svelte={}).v)!=null?Mh:Lh.v=new Set).add(kh);import{areValidLiveRecordSources as eI,clientChecker as Rv}from"@vkontakte/videoplayer-core/es2015";import"@vkontakte/videoplayer-core/es2015";import{noop as Gb,safeStorage as tI,throttleFn as iI}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as oI}from"@vkontakte/videoplayer-statistics/es2015";import{InterfaceLanguage as C1,fillWithDefault as T1,VideoQuality as Vh}from"@vkontakte/videoplayer-shared/es2015";var I1={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:C1.RU,downloadVKLanguages:!0,updateBuiltinLanguages:!0,isSmoothVideoRotate:!0,showSupport:!0,supportLink:"https://vk.com/support?act=new&from=v",showLogo:void 0,logoLink:"https://vk.com/video",logoType:"vk_video",volumeDefault:1,volumeMinRestore:.05,loaderDelay:500,minSubtitlesFontSize:13,autoSubtitlesTimeout:2e3,allowChangingFullscreenTarget:!0,trafficSavingLimit:Vh.Q_480P,highQualityLimit:Vh.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,features:{autoplay:!0,statistics:!0,thinStatistics:!1,preload:!0,subtitles:!0,episodes:!0,fullscreen:!0,timelinePreview:!0,mediaSession:!0,annotations:!0,slots:!0,annotationsInside:!1,pip:!0,dpip:{minimalView:!1,initialSize:{width:400,height:225}},download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,episodesClustering:!0,copyVideoLink:!0,videoRotate:!0,tracer:!1,apptracer:{enabled:!1,sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},interactiveGraph:!1,interactiveResponsiveUi:!1,seekToInteractive:!0,interactiveLastFrame:!1,interactiveTextPermanent:!0,interactiveHideTime:!0,interactivePlayPrevChapter:!0,interactiveTimeIndicator:!0,interactiveTimeOpenUri:!1,interactiveAreaControlShadow:!1,interactiveControlsExpectTimeBlinkAnimation:!1,interactiveControlsTapPlace:!1,interactiveControlsFillAnimation:!1,interactiveControlsHideAnimation:!1,interactiveHistoryEndChapterFix:!0,thumbTimer:!0,hotKeyMapModal:!0,hotKeyHelpers:!0,saveDebugInfoToFile:!1,saveTraceInfoToFile:!1,additionalButtons:!0,additionalButtonsDesktopControlPanelRight:!0,additionalSettingsMenuItems:!0,additionalContextMenuItems:!0,contextMenuButton:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,autoplayNext:!0,nextPrevButtons:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,qualityDetailsSubMenuEnabled:!1,showSlowVideoNotification:!1,forceAutoQualityWhenSevereStallHappens:!1,timeoutShowSlowVideoNotification:0,maxCountShowSlowVideoNotification:1,forcePlayerDisplayBlock:!1,playbackStatusShow:!1,playbackStatusNextVideoShow:!1,initSubtitles:!0,useCallbackForMediaSessionNextPrevClick:!1,usePerformanceFix:!1,userVideoPrefs:!1,savePreferredStatesOnUserActionOnly:!1,useLoopSetting:!1,doubleForwardAvailable:!1,useRichSeek:!1,disableThumbUnstartedOnAutoplay:!1},controls:{showOnStartupAtAutoplay:!0,hideTimeout:500,hideTimeoutMobile:3e3,hideTimeoutInitial:200,hideTimeoutFullscreen:3e3,hideTimeoutCursor:3e3,hideTimeoutTooltips:1e3,collapseMobileUnmute:6e3,hide360IconTimeout:3e3,hideHotKeyHelpers:2e3,playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25,volumeStepKeyboard:.05,volumeStepWheel:.05,volumeBarTimeout:300,seekStepKeyboard:1e4,seekStepMobile:15e3,seekStepFrame:400},ads:{enable:void 0,initTimeout:2e3,loadTimeout:2e3,runtimeTimeout:5e3,slot:void 0,preview:void 0,paramsOverride:void 0,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},disablePiPResizeHandling:!1,interactive:{historyMaxLength:100,noInteractionEventTimeout:3e4},view:{timelineSliderColor:null,timelineSliderHandleColor:null,timelineSliderFilledColor:null,timelineSliderLoadedColor:null,volumeSliderColor:null,volumeSliderHandleColor:null,volumeSliderFilledColor:null,controlsTimeColor:null,timelineSliderFilledActiveLiveColor:null,timelineSliderHandleActiveLiveColor:null,buttonColor:null,buttonToggleOnColor:null,focusedColor:null,font:null,focusedOutlineWidth:null,focusedOutlineRadius:null,controlsDesktopPaddingHorizontal:null,timelinePaddingHorizontal:null,settingsBackgroundColor:null,controlsGradientHeight:null,controlsGradient:null},userSalt:"0",doubleForwardActivationTime:600,playbackStatusAnimationDuration:1e3,playbackStatusNextVideoAnimationDuration:1e3,suitableDurationForUsingRichSeek:180,titleShowBehaviour:"fullscreen",disabledSlotIds:[],disabledAdditionalButtonIds:[]},Rh=t=>T1(t,I1),Dh=t=>hl("ui-config",t),Lt=()=>gl("ui-config");var kd="vk_player_debug_panel_opened";var Oh="videoplayer",Nh="videoplayer";var ys={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Bh=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Fh=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Hh=new Set(["ShiftRight","ShiftLeft"]);var Uh=["TIMELINE"],Ad=[...Uh,"GRAPH_BUTTON"],bf=[...Uh,"PLAY_BUTTON"],Ld=[...Ad,"PLAY_BUTTON"];var xs=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(xs||{}),Md={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as zh,VERSION as E1}from"@vkontakte/videoplayer-shared/es2015";import{VERSION as P1}from"@vkontakte/videoplayer-core/es2015";import{VERSION as k1}from"@vkontakte/videoplayer-statistics/es2015";var bu="prod",Ml="1.1.85-dev.01c6bd35.0";var Fa=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Wh=Symbol("storeContext"),Kh=Symbol("microStoresContext"),Qh=(t,e)=>{hl(Wh,t),hl(Kh,e),bu==="dev"&&(window.app={store:t,microStores:e})},xe=()=>{let t=gl(Wh);return zh(t,"Store context is empty!"),t},_o=()=>{let t=gl(Kh);return zh(t,"MicroStores context is empty!"),t},ti=(t,e)=>yu(t,t.getValue(),e),yu=(t,e,i)=>Dr(e,o=>{let s=t.subscribe(a=>{o(a),i==null||i(a)});return()=>s.unsubscribe()}),qh=(t,e,i,o,s=["meta config not provided"])=>{var U,W,Y,te,J,oe,de,ae,pe;let a=t.info,{width:l,height:d}=_e(i.ui.playerSize),r=(W=(U=a.throughputEstimation$.getValue())==null?void 0:U.toFixed(0))!=null?W:0,u=(te=(Y=a.rttEstimation$.getValue())==null?void 0:Y.toFixed(0))!=null?te:0,f=a.isAutoQualityEnabled$.getValue()?"auto":"manual",p=`${Ml} (core: ${P1}, stat: ${k1}, shared: ${E1})`,v=_e(i.state.errorLog$),b=v.length?`
|
|
45
|
-
`+v.map((
|
|
46
|
-
`,
|
|
47
|
-
`,
|
|
48
|
-
`;return Ee+
|
|
49
|
-
`):void 0,y=i.state.isAudioDisabled?"disabled":
|
|
50
|
-
`)},Gh=(t,e,i)=>{var U,W,Y,te;let o=t.info,{width:s,height:a}=_e(i.ui.playerSize),l={version:Ml,viewport:`${s}x${a}`,volume:Math.round(_e(i.state.volume$)*100)};l.id=i.videoId,o.currentFormat$.getValue()&&(l.provider=o.currentFormat$.getValue()),o.hostname$.getValue()&&(l.cdn=o.hostname$.getValue());let u=o.intrinsicVideoSize$.getValue();u&&(l.videoSize=`${u.width}x${u.height}`);let f=o.currentBuffer$.getValue(),p=o.currentNativeBuffer$.getValue(),v=o.isLive$.getValue(),b=o.liveBufferTime$.getValue();f&&p&&(v&&b?(l.buffer=f.end-b,l.nativeBuffer=p.end-b):(l.buffer=Math.max(f.end-_e(i.state.positionExact$),0),l.nativeBuffer=Math.max(p.end-_e(i.state.positionExact$),0))),l.position=_e(i.state.positionExact$);let y=o.throughputEstimation$.getValue();y&&(l.speed=y);let _=o.videoBitrate$.getValue();_&&(l.bitrate=_);let w=o.liveLatency$.getValue();w&&(l.liveLatency=w);let I=o.currentVideoSegmentLength$.getValue();I&&(l.currentVideoSegmentLength=I);let T=o.currentAudioSegmentLength$.getValue();T&&(l.currentAudioSegmentLength=T);let R=_e(i.vsid);typeof R=="string"&&(l.vsid=R);let A=(U=t.info.currentVideoStream$.getValue())==null?void 0:U.codec;A&&(l.videoCodec=A);let P=(W=t.info.currentAudioStream$.getValue())==null?void 0:W.codec;P&&(l.audioCodec=P),((Y=t.info.currentVideoStream$.getValue())==null?void 0:Y.hdr)&&(l.hdr=!0);let z=(te=t.info.currentAudioStream$.getValue())==null?void 0:te.language;return z&&(l.audioLanguage=z),l},Yh=(t,e)=>Fa(t,e,"mp4"),jh=t=>!t.type,Xh=t=>!!t.type,Zh=()=>{let e=[],i=0;return{add:(o,s)=>{e[i]=[o,s],i=(i+1)%10},find:o=>e.find(([s])=>s===o)}},$u=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}download(e){return bt(this,null,function*(){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=yield fetch(e,{signal:this.destroyController.signal});if(i.ok)return yield i.text();throw i}finally{this.pendingDownloads.delete(e)}})}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}};import{isNullable as wf,safeStorage as ki}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-core/es2015";var A1="vk_player_",Jh="vk_player_prefer_traffic_saving_enabled",e_="vk_player_preferred_volume",t_="vk_player_prefer_volume_mute",Sf="vk_player_preferred_quality",$f="vk_player_preferred_default_quality_settings",yf="vk_player_preferred_quality_settings_by_video",i_="vk_player_preferred_stream_language",o_="vk_player_preferred_rate",n_="vk_player_preferred_autoplay_next",xf="vk_player_preferred_subtitles_language",r_="vk_player_user_video_prefs",s_=`${A1}preview_track_close_tooltip`,a_=t=>t>1?1:t<0?0:t,Cf=t=>ki.set(e_,a_(t).toString(10)),xu=()=>{let t=ki.get(e_);return wf(t)?void 0:a_(parseFloat(t))},Tf=(t,e)=>ki.set(Sf,JSON.stringify({videoId:t,value:e})),wu=()=>ki.remove(Sf),If=t=>{let e=ki.get(Sf);if(wf(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){wu();return}return o},l_=(t,e)=>{e?ki.set(t,"true"):ki.remove(t)},Ef=t=>ki.get(t)==="true",Pf=t=>l_(t_,t),d_=()=>Ef(t_),Vd=t=>l_(Jh,t),kf=()=>Ef(Jh),c_=()=>ki.get(i_),Af=t=>ki.set(i_,t),Lf=()=>ki.get(xf),Mf=t=>{t?ki.set(xf,t):ki.remove(xf)},u_=t=>ki.set(o_,JSON.stringify({rate:t})),p_=()=>{let t=ki.get(o_);if(wf(t))return;let{rate:e}=JSON.parse(t);return e},f_=t=>{ki.set(n_,String(t))},m_=()=>Ef(n_),L1=()=>{let t=f=>{ki.set($f,JSON.stringify(f))},e=()=>{try{let f=ki.get($f);return f?JSON.parse(f):null}catch(f){return null}},i=()=>{try{let f=ki.get(yf);return f?JSON.parse(f):null}catch(f){return null}},o=f=>{ki.set(yf,JSON.stringify(f))},s=f=>{u(f);let p=f?i():null;if(p&&(p==null?void 0:p.videoId)===f)return Jt(Ye({},p),{appliesTo:"to-video"});p&&a();let v=e();return v?Jt(Ye({},v),{appliesTo:"as-default"}):(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{ki.remove(yf)},l=()=>{ki.remove($f)},d=(f,p="as-default")=>{f.type==="exact_quality"||p==="to-video"?o(f):t(f)},r=f=>{let p=s(f);if(p){switch(p.type){case"traffic_saving":Vd(!0);break;case"exact_quality":Tf(f,p.quality)}a(),l()}},u=f=>{let p=If(f);if(p){o({type:"exact_quality",videoId:f,quality:p});return}kf()&&t({type:"traffic_saving",videoId:f}),Vd(!1),wu()};return{getPreferredQualitySettings:s,migrateSettingsToLegacyWay:r,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:Lf,savePreferredSubtitlesLanguage:Mf}},{getPreferredQualitySettings:v_,migrateSettingsToLegacyWay:g_,savePreferredQualitySettings:Su,savePreferredDefaultQualitySettings:fR,removePreferredQualitySettingsByVideo:mR,getPreferredDefaultQualitySettings:Cu}=L1(),M1=3,V1=3,h_=()=>{let t=ki.get(r_);if(t)try{return JSON.parse(t)}catch(e){return null}return null},Tu=(t,e)=>{var s,a;let i=h_();return(a=(s=i==null?void 0:i[t])==null?void 0:s[e])!=null?a:null},Vf=(t,e,i)=>{var l,d,r;let o=(l=h_())!=null?l:{},s=(r=(d=o[t])==null?void 0:d[e])!=null?r:{};Object.assign(s,i,{updatedTs:Date.now()}),t in o||(o[t]={}),o[t][e]=s;let a=R1(o);ki.set(r_,JSON.stringify(a))};function R1(t){let e=Object.entries(t).reduce((o,[s,a])=>{let l=0;return Object.values(a).forEach(d=>{l<d.updatedTs&&(l=d.updatedTs)}),o.push([s,l]),o},[]);return e.sort(([,o],[,s])=>o>s?-1:1),e.splice(V1),e.reduce((o,[s])=>(o[s]=D1(t[s]),o),{})}function D1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(M1),Object.fromEntries(e)}function __(){ki.set(s_,JSON.stringify(!0))}function b_(){let t=ki.get(s_);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Kb}from"@vkontakte/videoplayer-core/es2015";wg();var da="var(--btn-color, #fff)";var O1=ke('<g filter="url(#strokeAndShadow)"><!></g><defs><filter x="-12" width="72" y="-12" height="72" id="strokeAndShadow"><feMorphology operator="dilate" radius=".4" result="outer"></feMorphology><feFlood flood-color="rgba(0,0,0,0.1)" result="outerColor"></feFlood><feComposite operator="in" in="outerColor" in2="outer" result="outerOutline"></feComposite><feDropShadow in="SourceGraphic" dx="0" dy="0" stdDeviation="3" flood-color="rgba(0,0,0,0.4)" result="outerShadow"></feDropShadow><feMerge><feMergeNode in="outerShadow"></feMergeNode><feMergeNode in="outerOutline"></feMergeNode><feMergeNode in="SourceGraphic"></feMergeNode></feMerge></filter></defs>',1),N1=ke('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function je(t,e){var f;B(e,!0);let i=g(e,"width",19,()=>"24"),o=g(e,"height",19,()=>"24"),s=g(e,"fill",3,da),a=(f=e.viewBox)!=null?f:`0 0 ${i()} ${o()}`;var l=N1(),d=C(l);{var r=p=>{var v=O1(),b=le(v),y=C(b);ei(y,()=>e.children),S(b),Xt(),$(p,v)},u=p=>{var v=Ve(),b=le(v);ei(b,()=>e.children),$(p,v)};M(d,p=>{e.shadow?p(r):p(u,!1)})}S(l),O(()=>{De(l,"aria-label",e.ariaLabel),De(l,"aria-hidden",!e.ariaLabel),De(l,"width",i()),De(l,"height",o()),De(l,"viewBox",a),De(l,"fill",s()),Ke(l,e.style),De(l,"data-testid",e.testId)}),$(t,l),F()}import{isNullable as x_,InterfaceLanguage as w_}from"@vkontakte/videoplayer-shared/es2015";var B1={auto_quality_invariant:"Авто",auto_quality:"Авто ({actual})",auto_quality_option:"Авто",other_quality:"Другое",high_quality:"Высокое качество",high_quality_description:"Будет использовано больше трафика",auto_quality_limit:"Автоматически",traffic_saving_quality:"Экономия трафика",traffic_saving_quality_description:"Видео грузятся быстрее, но качество ниже",default_quality_for_any_video:"Качество для всех видео",quality_applience:"Качество по умолчанию можно {action}",quality_applience_action:"изменить",menu_quality:"Качество",menu_traffic_saving:"Экономия данных",menu_playback_rate:"Скорость",menu_report:"Сообщить о проблеме",menu_pip:"Картинка в картинке",menu_pip_close:"Развернуть видео",menu_copy_video_link:"Скопировать ссылку на видео",menu_copy_video_link_with_timestamp:"Скопировать ссылку на кадр",menu_video_rotate:"Повернуть",menu_video_loop_on:"Включить повторение",menu_video_loop_off:"Отключить повторение",menu_chromecast:"Chromecast трансляция",menu_copy_debug:"Копировать данные для диагностики",menu_save_debug:"Сохранить данные для диагностики",menu_debug_overlay:"Техническая информация",menu_copy_embed_code:"Копировать код для встраивания",menu_audio_languages:"Звуковая дорожка",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Дорожка {index}",pip_dummy_title:"Видео воспроизводится в режиме картинка в картинке",submenu_quality:"Качество",submenu_playback_rate:"Скорость",submenu_settings:"Настройки",submenu_traffic_saving:"Экономия данных",submenu_audio_languages:"Звуковая дорожка",playing_ads:"Реклама {timeleft}",skip_ads_now:"Пропустить рекламу",skip_ads_after:"Пропустить {time}с",visit_advertiser:"Перейти на сайт",aria_timeline:"Ползунок временной шкалы",aria_timeline_value:"{position} (общая длительность {duration}",doubletap_seek_step:"{seconds} секунд",playback_rate_1:"Обычная",playback_rate:"{multiplier}x",video360:"панорамное видео",subtitles_caption:"Субтитры",subtitles_auto:"{language} (Автоматические)",subtitles_off:"Выкл.",subtitles_auto_caption:"Автоматические субтитры",subtitles_turn_on:"Включить субтитры",subtitles_turn_off:"Выключить субтитры",traffic_saving_off:"Откл.",traffic_saving_on:"Вкл.",traffic_saving_helper_text:"При включении качество видео будет снижено для экономии трафика",tooltip_button_disabled:"Кнопка недоступна",tooltip_previous:"Предыдущее видео",tooltip_restart:"Начать заново",tooltip_play:"Смотреть",tooltip_pause:"Пауза",tooltip_next:"Следующее видео",tooltip_interactive_go_back:"Вернуться к предыдущей главе",tooltip_interactive_go_back_disabled:"История прохождения недоступна",tooltip_interactive_go_back_disabled_first:"Вы смотрите первую главу",tooltip_interactive_go_back_disabled_limit:"Лимит возвратов исчерпан",tooltip_chapter_without_interactive:"В этой главе нет интерактива",tooltip_interactive_of_chapter_completed:"Интерактивы этой главы уже пройдены",tooltip_interactive_seek:"Перейти к интерактиву",tooltip_interactive_graph_off:"Показать карту сюжета",tooltip_interactive_graph_on:"Скрыть карту сюжета",tooltip_live:"Перемотать на актуальный лайв",tooltip_episodes:"Эпизоды",tooltip_volume:"Включить звук",tooltip_volume_muted:"Выключить звук",tooltip_sound_unavailable:"Звук недоступен",tooltip_subtitles_off:"Включить субтитры",tooltip_subtitles_on:"Выключить субтитры",tooltip_settings_off:"Открыть настройки",tooltip_settings_on:"Закрыть настройки",tooltip_fullscreen_off:"На весь экран",tooltip_fullscreen_on:"Выйти из полноэкранного режима",tooltip_chromecast_off:"Включить Chromecast",tooltip_chromecast_on:"Выключить Chromecast",tooltip_episode_finished:"Вы уже сделали свой выбор",tooltip_episode_unfinished:"Не пройдено",tooltip_disabled_when_interactive:"Интерактив уже идёт",tooltip_disabled_when_graph_on:"Кнопка недоступна во время просмотра карты",tooltip_interactive_interaction_time_indicator:"Нажмите на элемент интерактива",tooltip_vk_logo:"Открыть в VK Видео",tooltip_vk_video_logo:"Перейти в VK Видео",tooltip_autoplay_off:"Включить автовоспроизведение",tooltip_autoplay_on:"Отключить автовоспроизведение",tooltip_context_menu_open:"Открыть контекстное меню",tooltip_context_menu_close:"Закрыть контекстное меню",download_video_caption:"Скачать видео",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Быстрые клавиши",hotkey_map_modal_close_btn_text:"Закрыть",hotkey_map_group_title_common:"Общие",hotkey_map_group_title_playback:"Воспроизведение",hotkey_map_group_title_subtitles:"Субтитры",hotkey_map_group_title_episodes:"Эпизоды",hotkey_map_item_mute_description:"Включить или отключить звук",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Увеличить громкость",hotkey_map_item_volume_up_value:"Стрелка вверх",hotkey_map_item_volume_down_description:"Уменьшить громкость",hotkey_map_item_volume_down_value:"Стрелка вниз",hotkey_map_item_pip_description:"Свернуть или развернуть мини-проигрыватель",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Включить или выключить полноэкранный режим",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Скрыть или показать контекстное меню",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Скрыть или показать список горячих клавиш",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Приостановить или продолжить воспроизведение",hotkey_map_item_play_toggle_value:"Пробел (или k)",hotkey_map_item_seek_backward_description:"Перемотать ролик на 10 секунд назад",hotkey_map_item_seek_backward_value:"Стрелка влево (или j)",hotkey_map_item_seek_forward_description:"Перемотать ролик на 10 секунд вперёд",hotkey_map_item_seek_forward_value:"Стрелка вправо (или l)",hotkey_map_item_fast_seek_backward_description:"Ускоренная перемотка назад",hotkey_map_item_fast_seek_backward_value:"Shift + Стрелка влево",hotkey_map_item_fast_seek_forward_description:"Ускоренная перемотка вперёд",hotkey_map_item_fast_seek_forward_value:"Shift + Стрелка вправо",hotkey_map_item_rate_down_description:"Уменьшить скорость воспроизведения",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Увеличить скорость воспроизведения",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Перейти к предыдущему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Перейти к следующему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Перейти к определённому моменту видео <br />(например, при нажатии на цифру «7» ролик будет перемотан до временной отметки, которая соответствует 70% от длительности видео)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Включить или отключить субтитры",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Перейти к предыдущему эпизоду",hotkey_map_item_prev_episode_pc_value:"Ctrl + Стрелка влево",hotkey_map_item_prev_episode_mac_value:"Option + Стрелка влево",hotkey_map_item_next_episode_description:"Перейти к следующему эпизоду",hotkey_map_item_next_episode_pc_value:"Ctrl + Стрелка вправо",hotkey_map_item_next_episode_mac_value:"Option + Стрелка вправо",hotkey_map_item_next_video_description:"Перейти к следующему видео",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Перейти к предыдущему видео",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"дн",waiting_live_hour_value:"ч",waiting_live_minute_value:"мин",waiting_live_second_value:"сек",waiting_live_colon:":",waiting_live_upcoming_title:"Трансляция еще не началась",waiting_live_timer_title:"До начала трансляции осталось",waiting_live_recover_title:"Трансляция приостановлена - она продолжится, когда автор вернётся",waiting_record_title:"Трансляция завершена - запись появится позже",aria_label_video_player:"Видео плеер",aria_label_spherical_control:"Контроллер для сферического видео. Используйте клавиши со стрелками для панорамирования видео.",aria_label_debug_panel:"Область с технической информацией, сделайте скриншот для техподдержки",aria_label_new_tab_alert:"Откроется в новой вкладке.",aria_label_menu_quality:"Качество: {actual}",aria_label_menu_audio_languages:"Язык аудио: {actual}",aria_label_menu_rate:"Скорость: {actual}",aria_label_menu_subtitle:"Субтитры: {actual}",aria_label_menu_download:"Скачать видео",aria_label_menu_debug_overlay:"Отображение технической информации",aria_label_menu_rotate:"Повернуть видео на 90 градусов",aria_label_menu_loop:"Переключение режима повторения",aria_label_submenu_back:"Вернуться в меню настроек",aria_label_submenu_traffic_saving:"Режим экономии данных",aria_label_settings:"Настройки",aria_label_context_menu:"Контекстное меню",aria_label_autoplay:"Автовоспроизведение",end_screen_next_video:"Следующее видео",end_screen_recommended_video:"Рекомендуемое видео",slow_video_notification_button:"Выбрать качество «Авто»",slow_video_notification_force_description:`Видео грузится слишком медленно,
|
|
43
|
+
`)})}}var Ma=!1,Il=null,Va=!1,ks=!1;function Fp(t){ks=t}var yd=[],xd=[],Vt=null,vr=!1;function Yi(t){Vt=t}var xt=null;function go(t){xt=t}var Xo=null;function Zc(t){Vt!==null&&Vt.f&2097152&&(Xo===null?Xo=[Vt,[t]]:Xo[1].push(t))}var Pn=null,gr=0,mr=null;function Tg(t){mr=t}var Kg=1,au=0,As=!1,lu=null;function cd(){return++Kg}function Pa(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 s,a,l=(e&512)!==0,d=o&&xt!==null&&!As,r=i.length;if(l||d){var u=t,m=u.parent;for(s=0;s<r;s++)a=i[s],(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(s=0;s<r;s++)if(a=i[s],Pa(a)&&Hp(a),a.wv>t.wv)return!0}(!o||xt!==null&&!As)&&Tn(t,1024)}return!1}function qg(t,e,i=!0){var o=t.reactions;if(o!==null)for(var s=0;s<o.length;s++){var a=o[s];Xo!=null&&Xo[1].includes(t)&&Xo[0]===Vt||((a.f&2)!==0?qg(a,e,!1):e===a&&(i?Tn(a,2048):(a.f&1024)!==0&&Tn(a,4096),pd(a)))}}function Xc(t){var $,y;var e=Pn,i=gr,o=mr,s=Vt,a=As,l=Xo,d=Bt,r=vr,u=t.f;Pn=null,gr=0,mr=null,As=(u&256)!==0&&(vr||!Va||Vt===null),Vt=(u&96)===0?t:null,Xo=null,ad(t.ctx),vr=!1,au++,t.f|=2097152;try{var m=(0,t.fn)(),p=t.deps;if(Pn!==null){var v;if(_d(t,gr),p!==null&&gr>0)for(p.length=gr+Pn.length,v=0;v<Pn.length;v++)p[gr+v]=Pn[v];else t.deps=p=Pn;if(!As||(u&2)!==0&&t.reactions!==null)for(v=gr;v<p.length;v++)((y=($=p[v]).reactions)!=null?y:$.reactions=[]).push(t)}else p!==null&&gr<p.length&&(_d(t,gr),p.length=gr);if(ms()&&mr!==null&&!vr&&p!==null&&(t.f&6146)===0)for(v=0;v<mr.length;v++)qg(mr[v],t);return s!==null&&s!==t&&(au++,mr!==null&&(o===null?o=mr:o.push(...mr))),m}catch(h){Ug(h)}finally{Pn=e,gr=i,mr=o,Vt=s,As=a,Xo=l,ad(d),vr=r,t.f^=2097152}}function T$(t,e){let i=e.reactions;if(i!==null){var o=rg.call(i,t);if(o!==-1){var s=i.length-1;s===0?i=e.reactions=null:(i[o]=i[s],i.pop())}}i===null&&(e.f&2)!==0&&(Pn===null||!Pn.includes(e))&&(Tn(e,4096),(e.f&768)===0&&(e.f^=512),jc(e),_d(e,0))}function _d(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)T$(t,i[o])}function Sl(t){var e=t.f;if((e&16384)===0){Tn(t,1024);var i=xt,o=Va;if(xt=t,Va=!0,Ve){var s=ur;ld(t.component_function)}try{(e&16)!==0?Og(t):Kp(t),Wp(t);var a=Xc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Kg,Ve&&fs&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=cd(),l.set_during_effect=!1);Ve&&xd.push(t)}finally{Va=o,xt=i,Ve&&ld(s)}}}function zg(){console.error("Last ten effects were: ",xd.slice(-10).map(t=>t.fn)),xd=[]}function I$(){try{mg()}catch(t){if(Ve&&vo(t,"stack",{value:""}),Il!==null)if(Ve)try{$d(t,Il)}catch(e){throw zg(),e}else $d(t,Il);else throw Ve&&zg(),t}}function Xp(){var t=Va;try{var e=0;for(Va=!0;yd.length>0;){e++>1e3&&I$();var i=yd,o=i.length;yd=[];for(var s=0;s<o;s++){var a=P$(i[s]);E$(a)}xl.clear()}}finally{Ma=!1,Va=t,Il=null,Ve&&(xd=[])}}function E$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&Pa(o)&&(Sl(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?Qp(o):o.fn=null))}}function pd(t){Ma||(Ma=!0,queueMicrotask(Xp));for(var e=Il=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}yd.push(e)}function P$(t){for(var e=[],i=t;i!==null;){var o=i.f,s=(o&96)!==0,a=s&&(o&1024)!==0;if(!a&&(o&8192)===0){(o&4)!==0?e.push(i):s?i.f^=1024:Pa(i)&&Sl(i);var l=i.first;if(l!==null){i=l;continue}}var d=i.parent;for(i=i.next;i===null&&d!==null;)i=d.next,d=d.parent}return e}function El(t){var e;for(t&&(Ma=!0,Xp(),Ma=!0,e=t());;){if(Hg(),yd.length===0)return Ma=!1,Il=null,Ve&&(xd=[]),e;Ma=!0,Xp()}}function _o(){return $t(this,null,function*(){yield Promise.resolve(),El()})}function n(t){var e=t.f,i=(e&2)!==0;if(lu!==null&&lu.add(t),Vt!==null&&!vr){if(!(Xo!=null&&Xo[1].includes(t))||Xo[0]!==Vt){var o=Vt.deps;t.rv<au&&(t.rv=au,Pn===null&&o!==null&&o[gr]===t?gr++:Pn===null?Pn=[t]:(!As||!Pn.includes(t))&&Pn.push(t))}}else if(i&&t.deps===null&&t.effects===null){var s=t,a=s.parent;a!==null&&(a.f&256)===0&&(s.f^=256)}if(i&&(s=t,Pa(s)&&Hp(s)),Ve&&fs&&!vr&&sd!==null&&Vt!==null&&sd.reaction===Vt)if(t.trace)t.trace();else{var l=Ps("TracedAt");if(l){var d=sd.entries.get(t);d===void 0&&(d={traces:[]},sd.entries.set(t,d));var r=d.traces[d.traces.length-1];l.stack!==(r==null?void 0:r.stack)&&d.traces.push(l)}}return ks&&xl.has(t)?xl.get(t):t.v}function Pt(t){var e=vr;try{return vr=!0,t()}finally{vr=e}}var k$=-7169;function Tn(t,e){t.f=t.f&k$|e}function cu(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Yo in t)du(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&Yo in i&&du(i)}}}function du(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let o in t)try{du(t[o],e)}catch(s){}let i=Ca(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){let o=Kc(i);for(let s in o){let a=o[s].get;if(a)try{a.call(t)}catch(l){}}}}}function Zp(t,e){if(e){let i=document.body;t.autofocus=!0,En(()=>{document.activeElement===i&&t.focus()})}}function wd(t){var e=Vt,i=xt;Yi(null),go(null);try{return t()}finally{Yi(e),go(i)}}var Jp=new Set,uu=new Set;function Ra(t){if(!rt)return;t.removeAttribute("onload"),t.removeAttribute("onerror");let e=t.__e;e!==void 0&&(t.__e=void 0,queueMicrotask(()=>{t.isConnected&&t.dispatchEvent(e)}))}function ef(t,e,i,o={}){function s(a){if(o.capture||Pl.call(e,a),!a.cancelBubble)return wd(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?En(()=>{e.addEventListener(t,s,o)}):e.addEventListener(t,s,o),s}function ht(t,e,i,o,s){var a={capture:o,passive:s},l=ef(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Mo(()=>{e.removeEventListener(t,l,a)})}function et(t){for(var e=0;e<t.length;e++)Jp.add(t[e]);for(var i of uu)i(t)}function Pl(t){var T;var e=this,i=e.ownerDocument,o=t.type,s=((T=t.composedPath)==null?void 0:T.call(t))||[],a=s[0]||t.target,l=0,d=t.__root;if(d){var r=s.indexOf(d);if(r!==-1&&(e===document||e===window)){t.__root=e;return}var u=s.indexOf(e);if(u===-1)return;r<=u&&(l=r)}if(a=s[l]||t.target,a!==e){vo(t,"currentTarget",{configurable:!0,get(){return a||i}});var m=Vt,p=xt;Yi(null),go(null);try{for(var v,$=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var h=a["__"+o];if(h!=null&&(!a.disabled||t.target===a))if(dr(h)){var[x,...I]=h;x.apply(a,[t,...I])}else h.call(a,t)}catch(D){v?$.push(D):v=D}if(t.cancelBubble||y===e||y===null)break;a=y}if(v){for(let D of $)queueMicrotask(()=>{throw D});throw v}}finally{t.__root=e,delete t.currentTarget,Yi(m),go(p)}}}var L$;function Qg(){L$=void 0}function kl(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Ro(t,e){var i=xt;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function A(t,e){var i=(e&1)!==0,o=(e&2)!==0,s,a=!t.startsWith("<!>");return()=>{if(rt)return Ro(wt,null),wt;s===void 0&&(s=kl(a?t:"<!>"+t),i||(s=Ii(s)));var l=o||fd?document.importNode(s,!0):s.cloneNode(!0);if(i){var d=Ii(l),r=l.lastChild;Ro(d,r)}else Ro(l,l);return l}}function R$(t,e,i="svg"){var o=!t.startsWith("<!>"),s=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(rt)return Ro(wt,null),wt;if(!l){var d=kl(a),r=Ii(d);if(s)for(l=document.createDocumentFragment();Ii(r);)l.appendChild(Ii(r));else l=Ii(r)}var u=l.cloneNode(!0);if(s){var m=Ii(u),p=u.lastChild;Ro(m,p)}else Ro(u,u);return u}}function ke(t,e){return R$(t,e,"svg")}function gs(t=""){if(!rt){var e=In(t+"");return Ro(e,e),e}var i=wt;return i.nodeType!==vl&&(i.before(i=In()),Ti(i)),Ro(i,i),i}function Re(){if(rt)return Ro(wt,null),wt;var t=document.createDocumentFragment(),e=document.createComment(""),i=In();return t.append(e,i),Ro(e,i),t}function b(t,e){if(rt){xt.nodes_end=wt,Xi();return}t!==null&&t.before(e)}var D$=/\r/g;function Yg(t){t=t.replace(D$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function jg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var O$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Xg(t){return O$.includes(t)}var N$=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var B$={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Zg(t){var e;return t=t.toLowerCase(),(e=B$[t])!=null?e:t}var FP=[...N$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var H$=["touchstart","touchmove"];function Jg(t){return H$.includes(t)}var F$=["$state","$state.raw","$derived","$derived.by"],UP=[...F$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var U$=["textarea","script","style","title"];function eh(t){return U$.includes(t)}function pu(t){return t==null?void 0:t.replace(/\//g,"/")}var Sd=!0;function fu(t){Sd=t}function 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 th(t,e)}function of(t,e){var l;tu(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=rt,s=wt;try{for(var a=Ii(i);a&&(a.nodeType!==cr||a.data!==Zs);)a=Zo(a);if(!a)throw us;ho(!0),Ti(a),Xi();let d=th(t,Jt(Ge({},e),{anchor:a}));if(wt===null||wt.nodeType!==cr||wt.data!==Sa)throw ia(),us;return ho(!1),d}catch(d){if(d===us)return e.recover===!1&&vg(),tu(),md(i),ho(!1),Yr(t,e);throw d}finally{ho(o),Ti(s),Qg()}}var Al=new Map;function th(t,{target:e,anchor:i,props:o={},events:s,context:a,intro:l=!0}){tu();var d=new Set,r=p=>{for(var v=0;v<p.length;v++){var $=p[v];if(!d.has($)){d.add($);var y=Jg($);e.addEventListener($,Pl,{passive:y});var h=Al.get($);h===void 0?(document.addEventListener($,Pl,{passive:y}),Al.set($,1)):Al.set($,h+1)}}};r(rd(Jp)),uu.add(r);var u=void 0,m=Dg(()=>{var p=i!=null?i:e.appendChild(In());return Ui(()=>{if(a){H({});var v=Bt;v.c=a}s&&(o.$$events=s),rt&&Ro(p,null),Sd=l,u=t(p,o)||{},Sd=!0,rt&&(xt.nodes_end=wt),a&&F()}),()=>{var y;for(var v of d){e.removeEventListener(v,Pl);var $=Al.get(v);--$===0?(document.removeEventListener(v,Pl),Al.delete(v)):Al.set(v,$)}uu.delete(r),p!==i&&((y=p.parentNode)==null||y.removeChild(p))}});return tf.set(u,m),u}var tf=new WeakMap;function Da(t,e){let i=tf.get(t);return i?(tf.delete(t),i(e)):(Ve&&Pg(),Promise.resolve())}function ei(t,e,...i){var o=t,s=yt,a;Zi(()=>{s!==(s=e())&&(a&&(ji(a),a=null),Ve&&s==null&&gg(),a=Ui(()=>s(o,...i)))},65536),rt&&(o=wt)}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;bg(e)},set:o=>{i=o}})}};q$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var q$;function Lt(t){Bt===null&&_l("onMount"),ps&&Bt.l!==null?K$(Bt).m.push(t):Fe(()=>{let e=Pt(t);if(typeof e=="function")return e})}function ln(t){Bt===null&&_l("onDestroy"),Lt(()=>()=>Pt(t))}function K$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var ih=new Map;function oh(t,e){var i=ih.get(t);i||(i=new Set,ih.set(t,i)),i.add(e)}function M(t,e,[i,o]=[0,0]){rt&&i===0&&Xi();var s=t,a=null,l=null,d=ao,r=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(rt&&o!==-1){if(i===0){let x=eu(s);x===Zs?o=0:x===Js?o=1/0:(o=parseInt(x.substring(1)),o!==o&&(o=d?1/0:-1))}let h=o>i;!!d===h&&(s=ka(),Ti(s),ho(!1),y=!0,o=-1)}d?(a?Ms(a):$&&(a=Ui(()=>$(s))),l&&Qn(l,()=>{l=null})):(l?Ms(l):$&&(l=Ui(()=>$(s,[i+1,o]))),a&&Qn(a,()=>{a=null})),y&&ho(!0)};Zi(()=>{u=!1,e(m),u||p(null,null)},r),rt&&(s=wt)}function Vs(t,e,i){rt&&Xi();var o=t,s=ao,a,l=ms()?dg:gl;Zi(()=>{l(s,s=e())&&(a&&Qn(a),a=Ui(()=>i(o)))}),rt&&(o=wt)}var na=null;function sf(t){na=t}function Cd(t,e){return e}function Y$(t,e,i,o){for(var s=[],a=e.length,l=0;l<a;l++)ru(e[l].e,s,!0);var d=a>0&&s.length===0&&i!==null;if(d){var r=i.parentNode;md(r),r.append(i),o.clear(),oa(t,e[0].prev,e[a-1].next)}Gp(s,()=>{for(var u=0;u<a;u++){var m=e[u];d||(o.delete(m.k),oa(t,m.prev,m.next)),ji(m.e,!d)}})}function wi(t,e,i,o,s,a=null){var l=t,d={flags:e,items:new Map,first:null},r=(e&4)!==0;if(r){var u=t;l=rt?Ti(Ii(u)):u.appendChild(In())}rt&&Xi();var m=null,p=!1,v=fr(()=>{var $=i();return dr($)?$:$==null?[]:rd($)});Zi(()=>{var $=n(v),y=$.length;if(p&&y===0)return;p=y===0;let h=!1;if(rt){var x=eu(l)===Js;x!==(y===0)&&(l=ka(),Ti(l),ho(!1),h=!0)}if(rt){for(var I=null,T,D=0;D<y;D++){if(wt.nodeType===cr&&wt.data===Sa){l=wt,h=!0,ho(!1);break}var k=$[D],E=o(k,D);T=sh(wt,d,I,null,k,E,D,s,e,i),d.items.set(E,T),I=T}y>0&&Ti(ka())}rt||j$($,d,l,s,e,o,i),a!==null&&(y===0?m?Ms(m):m=Ui(()=>a(l)):m!==null&&Qn(m,()=>{m=null})),h&&ho(!0),n(v)}),rt&&(l=wt)}function j$(t,e,i,o,s,a,l){var ae,le,ce,X;var d=(s&8)!==0,r=(s&3)!==0,u=t.length,m=e.items,p=e.first,v=p,$,y=null,h,x=[],I=[],T,D,k,E;if(d)for(E=0;E<u;E+=1)T=t[E],D=a(T,E),k=m.get(D),k!==void 0&&((ae=k.a)==null||ae.measure(),(h!=null?h:h=new Set).add(k));for(E=0;E<u;E+=1){if(T=t[E],D=a(T,E),k=m.get(D),k===void 0){var V=v?v.e.nodes_start:i;y=sh(V,e,y,y===null?e.first:y.next,T,D,E,o,s,l),m.set(D,y),x=[],I=[],v=y.next;continue}if(r&&X$(k,T,E,s),(k.e.f&8192)!==0&&(Ms(k.e),d&&((le=k.a)==null||le.unfix(),(h!=null?h:h=new Set).delete(k))),k!==v){if($!==void 0&&$.has(k)){if(x.length<I.length){var q=I[0],L;y=q.prev;var z=x[0],j=x[x.length-1];for(L=0;L<x.length;L+=1)nh(x[L],q,i);for(L=0;L<I.length;L+=1)$.delete(I[L]);oa(e,z.prev,j.next),oa(e,y,z),oa(e,j,q),v=q,y=j,E-=1,x=[],I=[]}else $.delete(k),nh(k,v,i),oa(e,k.prev,k.next),oa(e,k,y===null?e.first:y.next),oa(e,y,k),y=k;continue}for(x=[],I=[];v!==null&&v.k!==D;)(v.e.f&8192)===0&&($!=null?$:$=new Set).add(v),I.push(v),v=v.next;if(v===null)continue;k=v}x.push(k),y=k,v=k.next}if(v!==null||$!==void 0){for(var te=$===void 0?[]:rd($);v!==null;)(v.e.f&8192)===0&&te.push(v),v=v.next;var ee=te.length;if(ee>0){var oe=(s&4)!==0&&u===0?i:null;if(d){for(E=0;E<ee;E+=1)(ce=te[E].a)==null||ce.measure();for(E=0;E<ee;E+=1)(X=te[E].a)==null||X.fix()}Y$(e,te,oe,m)}}d&&En(()=>{var _e;if(h!==void 0)for(k of h)(_e=k.a)==null||_e.apply()}),xt.first=e.first&&e.first.e,xt.last=y&&y.e}function X$(t,e,i,o){(o&1)!==0&&wl(t.v,e),(o&2)!==0?wl(t.i,i):t.i=i}function sh(t,e,i,o,s,a,l,d,r,u){var m=na,p=(r&1)!==0,v=(r&16)===0,$=p?v?vs(s,!1,!1):kr(s):s,y=(r&2)===0?l:kr(l);Ve&&p&&($.trace=()=>{var x=typeof y=="number"?l:y.v;u()[x]});var h={i:y,v:$,k:a,a:null,e:null,prev:i,next:o};na=h;try{return h.e=Ui(()=>d(t,$,y,u),rt),h.e.prev=i&&i.e,h.e.next=o&&o.e,i===null?e.first=h:(i.next=h,i.e.next=h.e),o!==null&&(o.prev=h,o.e.prev=h.e),h}finally{na=m}}function nh(t,e,i){for(var o=t.next?t.next.e.nodes_start:i,s=e?e.e.nodes_start:i,a=t.e.nodes_start;a!==o;){var l=Zo(a);s.before(a),a=l}}function oa(t,e,i){e===null?t.first=i:(e.next=i,e.e.next=i&&i.e),i!==null&&(i.prev=e,i.e.prev=e&&e.e)}function Z$(t,e,i){var a,l;if(!e||e===Yg(String(i!=null?i:"")))return;let o,s=(a=t.__svelte_meta)==null?void 0:a.loc;s?o=`near ${s.file}:${s.line}:${s.column}`:(l=ur)!=null&&l[zn]&&(o=`in ${ur[zn]}`),Eg(pu(o))}function Td(t,e,i=!1,o=!1,s=!1){var a=t,l="";N(()=>{var $;var d=xt;if(l===(l=($=e())!=null?$:"")){rt&&Xi();return}if(d.nodes_start!==null&&(qp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(rt){for(var r=wt.data,u=Xi(),m=u;u!==null&&(u.nodeType!==cr||u.data!=="");)m=u,u=Zo(u);if(u===null)throw ia(),us;Ve&&!s&&Z$(u.parentNode,r,l),Ro(wt,m),a=Ti(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var v=kl(p);if((i||o)&&(v=Ii(v)),Ro(Ii(v),v.lastChild),i||o)for(;Ii(v);)a.before(Ii(v));else a.before(v)}})}function zi(t,e,i){rt&&Xi();var o=t,s,a;Zi(()=>{s!==(s=e())&&(a&&(Qn(a),a=null),s&&(a=Ui(()=>i(o,s))))},65536),rt&&(o=wt)}function Oa(t,e,i,o,s,a){var y;let l=rt;rt&&Xi();var d=Ve&&a&&((y=Bt)==null?void 0:y.function[zn]),r,u,m=null;rt&&wt.nodeType===Qc&&(m=wt,Xi());var p=rt?wt:t,v,$=na;Zi(()=>{let h=e()||null;var x=s?s():i||h==="svg"?zc:null;if(h!==r){var I=na;sf($),v&&(h===null?Qn(v,()=>{v=null,u=null}):h===u?Ms(v):(ji(v),fu(!1))),h&&h!==u&&(v=Ui(()=>{if(m=rt?m:x?document.createElementNS(x,h):document.createElement(h),Ve&&a&&(m.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),Ro(m,m),o){rt&&eh(h)&&m.append(document.createComment(""));var T=rt?Ii(m):m.appendChild(In());rt&&(T===null?ho(!1):Ti(T)),o(m,T)}xt.nodes_end=m,p.before(m)})),r=h,r&&(u=r),fu(!0),sf(I)}},65536),l&&(ho(!0),Ti(p))}var lf;function ah(t){return lf=t.target,new af(t)}var Rs,Ar,af=class{constructor(e){Xs(this,Rs);Xs(this,Ar);var a,l;var i=new Map,o=(d,r)=>{var u=vs(r,!1,!1);return i.set(d,u),u};let s=new Proxy(Jt(Ge({},e.props||{}),{$$events:{}}),{get(d,r){var u;return n((u=i.get(r))!=null?u:o(r,Reflect.get(d,r)))},has(d,r){var u;return r===ml?!0:(n((u=i.get(r))!=null?u:o(r,Reflect.get(d,r))),Reflect.has(d,r))},set(d,r,u){var m;return O((m=i.get(r))!=null?m:o(r,u),u),Reflect.set(d,r,u)}});fl(this,Ar,(e.hydrate?of:Yr)(e.component,{target:e.target,anchor:e.anchor,props:s,context:e.context,intro:(a=e.intro)!=null?a:!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&El(),fl(this,Rs,s.$$events);for(let d of Object.keys(Fi(this,Ar)))d==="$set"||d==="$destroy"||d==="$on"||vo(this,d,{get(){return Fi(this,Ar)[d]},set(r){Fi(this,Ar)[d]=r},enumerable:!0});Fi(this,Ar).$set=d=>{Object.assign(s,d)},Fi(this,Ar).$destroy=()=>{Da(Fi(this,Ar))}}$set(e){Fi(this,Ar).$set(e)}$on(e,i){Fi(this,Rs)[e]=Fi(this,Rs)[e]||[];let o=(...s)=>i.call(this,...s);return Fi(this,Rs)[e].push(o),()=>{Fi(this,Rs)[e]=Fi(this,Rs)[e].filter(s=>s!==o)}}$destroy(){Fi(this,Ar).$destroy()}};Rs=new WeakMap,Ar=new WeakMap;function Q(t,e){En(()=>{var s,a,l;var i=t.getRootNode(),o=i.host?i:(l=(s=i.head)!=null?s:i.ownerDocument.head)!=null?l:(a=lf)==null?void 0:a.parentNode;if(!(o!=null&&o.querySelector("#"+e.hash))){let d=document.createElement("style");d.id=e.hash,d.textContent=e.code,o.appendChild(d),Ve&&oh(e.hash,d)}})}function Ds(t,e){var i=void 0,o;Zi(()=>{i!==(i=e())&&(o&&(ji(o),o=null),i&&(o=Ui(()=>{Vo(()=>i(t))})))})}function lh(t){var e,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(i=lh(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function dh(){for(var t,e,i=0,o="",s=arguments.length;i<s;i++)(t=arguments[i])&&(e=lh(t))&&(o&&(o+=" "),o+=e);return o}function Id(t){return typeof t=="object"?dh(t):t!=null?t:""}var ch=[...`
|
|
44
|
+
\r\f \v\uFEFF`];function ph(t,e,i){var o=t==null?"":""+t;if(e&&(o=o?o+" "+e:e),i){for(var s in i)if(i[s])o=o?o+" "+s:s;else if(o.length)for(var a=s.length,l=0;(l=o.indexOf(s,l))>=0;){var d=l+a;(l===0||ch.includes(o[l-1]))&&(d===o.length||ch.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function uh(t,e=!1){var i=e?" !important;":";",o="";for(var s in t){var a=t[s];a!=null&&a!==""&&(o+=" "+s+": "+a+i)}return o}function df(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function fh(t,e){if(e){var i="",o,s;if(Array.isArray(e)?(o=e[0],s=e[1]):o=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,l=0,d=!1,r=[];o&&r.push(...Object.keys(o).map(df)),s&&r.push(...Object.keys(s).map(df));var u=0,m=-1;let h=t.length;for(var p=0;p<h;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===h-1){if(m!==-1){var $=df(t.substring(u,m).trim());if(!r.includes($)){v!==";"&&p++;var y=t.substring(u,p).trim();i+=" "+y+";"}}u=p+1,m=-1}}}}return o&&(i+=uh(o)),s&&(i+=uh(s,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function ie(t,e,i,o,s,a){var l=t.__className;if(rt||l!==i||l===void 0){var d=ph(i,o,a);(!rt||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&s!==a)for(var r in a){var u=!!a[r];(s==null||u!==!!s[r])&&t.classList.toggle(r,u)}return a}function cf(t,e={},i,o){for(var s in i){var a=i[s];e[s]!==a&&(i[s]==null?t.style.removeProperty(s):t.style.setProperty(s,a,o))}}function Ke(t,e,i,o){var s=t.__style;if(rt||s!==e){var a=fh(e,o);(!rt||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(cf(t,i==null?void 0:i[0],o[0]),cf(t,i==null?void 0:i[1],o[1],"important")):cf(t,i,o));return o}function Ed(t,e,i){if(t.multiple){if(e==null)return;if(!dr(e))return kg();for(var o of t.options)o.selected=e.includes(mh(o));return}for(o of t.options){var s=mh(o);if(Rp(s,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function uf(t){var e=new MutationObserver(()=>{Ed(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Mo(()=>{e.disconnect()})}function mh(t){return"__value"in t?t.__value:t.value}var Ll=Symbol("class"),Ml=Symbol("style"),hh=Symbol("is custom element"),_h=Symbol("is html");function bh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function De(t,e,i,o){var s=yh(t);if(rt&&(s[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||s1(t,e,i!=null?i:"");return}s[e]!==(s[e]=i)&&(e==="loading"&&(t[lg]=i),i==null?t.removeAttribute(e):typeof i!="string"&&xh(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function $h(t,e,i,o,s=!1){var k;var a=yh(t),l=a[hh],d=!a[_h];let r=rt&&l;r&&ho(!1);var u=e||{},m=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=Id(i.class):(o||i[Ll])&&(i.class=null),i[Ml]&&((k=i.style)!=null||(i.style=null));var v=xh(t);for(let E in i){let V=i[E];if(m&&E==="value"&&V==null){t.value=t.__value="",u[E]=V;continue}if(E==="class"){var $=t.namespaceURI==="http://www.w3.org/1999/xhtml";ie(t,$,V,o,e==null?void 0:e[Ll],i[Ll]),u[E]=V,u[Ll]=i[Ll];continue}if(E==="style"){Ke(t,V,e==null?void 0:e[Ml],i[Ml]),u[E]=V,u[Ml]=i[Ml];continue}var y=u[E];if(!(V===y&&!(V===void 0&&t.hasAttribute(E)))){u[E]=V;var h=E[0]+E[1];if(h!=="$$")if(h==="on"){let q={},L="$$"+E,z=E.slice(2);var x=Xg(z);if(jg(z)&&(z=z.slice(0,-7),q.capture=!0),!x&&y){if(V!=null)continue;t.removeEventListener(z,u[L],q),u[L]=null}if(V!=null)if(x)t[`__${z}`]=V,et([z]);else{let j=function(te){u[E].call(this,te)};var D=j;u[L]=ef(z,t,j,q)}else x&&(t[`__${z}`]=void 0)}else if(E==="style")De(t,E,V);else if(E==="autofocus")Zp(t,!!V);else if(!l&&(E==="__value"||E==="value"&&V!=null))t.value=t.__value=V;else if(E==="selected"&&m)bh(t,V);else{var I=E;d||(I=Zg(I));var T=I==="defaultValue"||I==="defaultChecked";if(V==null&&!l&&!T)if(a[E]=null,I==="value"||I==="checked"){let q=t,L=e===void 0;if(I==="value"){let z=q.defaultValue;q.removeAttribute(I),q.defaultValue=z,q.value=q.__value=L?z:null}else{let z=q.defaultChecked;q.removeAttribute(I),q.defaultChecked=z,q.checked=L?z:!1}}else t.removeAttribute(E);else T||v.includes(I)&&(l||typeof V!="string")?t[I]=V:typeof V!="function"&&De(t,I,V,s)}}}return r&&ho(!0),u}function lo(t,e,i=[],o,s=!1,a=qr){let l=i.map(a);var d=void 0,r={},u=t.nodeName==="SELECT",m=!1;if(Zi(()=>{var v=e(...l.map(n)),$=$h(t,d,v,o,s);m&&u&&"value"in v&&Ed(t,v.value,!1);for(let h of Object.getOwnPropertySymbols(r))v[h]||ji(r[h]);for(let h of Object.getOwnPropertySymbols(v)){var y=v[h];h.description===Ip&&(!d||y!==d[h])&&(r[h]&&ji(r[h]),r[h]=Ui(()=>Ds(t,()=>y))),$[h]=y}d=$}),u){var p=t;Vo(()=>{Ed(p,d.value),uf(p)})}m=!0}function yh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[hh]:t.nodeName.includes("-"),[_h]:t.namespaceURI===tg}}var vh=new Map;function xh(t){var e=vh.get(t.nodeName);if(e)return e;vh.set(t.nodeName,e=[]);for(var i,o=t,s=Element.prototype;s!==o;){i=Kc(o);for(var a in i)i[a].set&&e.push(a);o=Ca(o)}return e}function s1(t,e,i){var o;Ve&&(e==="srcset"&&a1(t,i)||pf((o=t.getAttribute(e))!=null?o:"",i)||Ig(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function pf(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function gh(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function a1(t,e){var i=gh(t.srcset),o=gh(e);return o.length===i.length&&o.every(([s,a],l)=>a===i[l][1]&&(pf(i[l][0],s)||pf(s,i[l][0])))}var l1=Wc?()=>performance.now():()=>Date.now(),jr={tick:t=>(Wc?requestAnimationFrame:yt)(t),now:()=>l1(),tasks:new Set};function wh(){let t=jr.now();jr.tasks.forEach(e=>{e.c(t)||(jr.tasks.delete(e),e.f())}),jr.tasks.size!==0&&jr.tick(wh)}function Sh(t){let e;return jr.tasks.size===0&&jr.tick(wh),{promise:new Promise(i=>{jr.tasks.add(e={c:t,f:i})}),abort(){jr.tasks.delete(e)}}}function mu(t,e){wd(()=>{t.dispatchEvent(new CustomEvent(e))})}function p1(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;let e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(i=>i[0].toUpperCase()+i.slice(1)).join("")}function Ch(t){let e={},i=t.split(";");for(let o of i){let[s,a]=o.split(":");if(!s||a===void 0)break;let l=p1(s.trim());e[l]=a.trim()}return e}var f1=t=>t;function Os(t,e,i,o){var D;var s=(t&1)!==0,a=(t&2)!==0,l=s&&a,d=(t&4)!==0,r=l?"both":s?"in":"out",u,m=e.inert,p=e.style.overflow,v,$;function y(){var V;var k=Vt,E=xt;Yi(null),go(null);try{return u!=null?u:u=i()(e,(V=o==null?void 0:o())!=null?V:{},{direction:r})}finally{Yi(k),go(E)}}var h={is_global:d,in(){var k;if(e.inert=m,!s){$==null||$.abort(),(k=$==null?void 0:$.reset)==null||k.call($);return}a||v==null||v.abort(),mu(e,"introstart"),v=ff(e,y(),$,1,()=>{mu(e,"introend"),v==null||v.abort(),v=u=void 0,e.style.overflow=p})},out(k){if(!a){k==null||k(),u=void 0;return}e.inert=!0,mu(e,"outrostart"),$=ff(e,y(),v,0,()=>{mu(e,"outroend"),k==null||k()})},stop:()=>{v==null||v.abort(),$==null||$.abort()}},x=xt;if(((D=x.transitions)!=null?D:x.transitions=[]).push(h),s&&Sd){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&&Vo(()=>{Pt(()=>h.in())})}}function ff(t,e,i,o,s){var a=o===1;if(ea(e)){var l,d=!1;return En(()=>{if(!d){var x=e({direction:a?"in":"out"});l=ff(t,x,i,o,s)}}),{abort:()=>{d=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return s(),{abort:yt,deactivate:yt,reset:yt,t:()=>o};let{delay:r=0,css:u,tick:m,easing:p=f1}=e;var v=[];if(a&&i===void 0&&(m&&m(0,1),u)){var $=Ch(u(0,1));v.push($,$)}var y=()=>1-o,h=t.animate(v,{duration:r,fill:"forwards"});return h.onfinish=()=>{var z;h.cancel();var x=(z=i==null?void 0:i.t())!=null?z:1-o;i==null||i.abort();var I=o-x,T=e.duration*Math.abs(I),D=[];if(T>0){var k=!1;if(u)for(var E=Math.ceil(T/16.666666666666668),V=0;V<=E;V+=1){var q=x+I*p(V/E),L=Ch(u(q,1-q));D.push(L),k||(k=L.overflow==="hidden")}k&&(t.style.overflow="hidden"),y=()=>{var j=h.currentTime;return x+I*p(j/T)},m&&Sh(()=>{if(h.playState!=="running")return!1;var j=y();return m(j,1-j),!0})}h=t.animate(D,{duration:T,fill:"forwards"}),h.onfinish=()=>{y=()=>o,m==null||m(o,1-o),s()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=yt)},deactivate:()=>{s=yt},reset:()=>{o===0&&(m==null||m(1,0))},t:()=>y()}}function mf(t,e,i){var o=Go(t,e);o&&o.set&&(t[e]=i,Mo(()=>{t[e]=null}))}var ra,Vl,Pd,gu,Th,hu=class hu{constructor(e){Xs(this,gu);Xs(this,ra,new WeakMap);Xs(this,Vl);Xs(this,Pd);fl(this,Pd,e)}observe(e,i){var o=Fi(this,ra).get(e)||new Set;return o.add(i),Fi(this,ra).set(e,o),Jv(this,gu,Th).call(this).observe(e,Fi(this,Pd)),()=>{var s=Fi(this,ra).get(e);s.delete(i),s.size===0&&(Fi(this,ra).delete(e),Fi(this,Vl).unobserve(e))}}};ra=new WeakMap,Vl=new WeakMap,Pd=new WeakMap,gu=new WeakSet,Th=function(){var e;return(e=Fi(this,Vl))!=null?e:fl(this,Vl,new ResizeObserver(i=>{for(var o of i){hu.entries.set(o.target,o);for(var s of Fi(this,ra).get(o.target)||[])s(o)}}))},lr(hu,"entries",new WeakMap);var vf=hu;var m1=new vf({box:"border-box"});function kn(t,e,i){var o=m1.observe(t,()=>i(t[e]));Vo(()=>(Pt(()=>i(t[e])),o))}function Ih(t,e){return t===e||(t==null?void 0:t[Yo])===e}function tt(t={},e,i,o){return Vo(()=>{var s,a;return Jo(()=>{s=a,a=(o==null?void 0:o())||[],Pt(()=>{t!==i(...a)&&(e(t,...a),s&&Ih(i(...s),t)&&e(null,...s))})}),()=>{En(()=>{a&&Ih(i(...a),t)&&e(null,...a)})}}),t}function en(t=!1){let e=Bt,i=e.l.u;if(!i)return;let o=()=>cu(e.s);if(t){let s=0,a={},l=qr(()=>{let d=!1,r=e.s;for(let u in r)r[u]!==a[u]&&(a[u]=r[u],d=!0);return d&&s++,s});o=()=>n(l)}i.b.length&&hd(()=>{Eh(e,o),ta(i.b)}),Fe(()=>{let s=Pt(()=>i.m.map(ag));return()=>{for(let a of s)typeof a=="function"&&a()}}),i.a.length&&Fe(()=>{Eh(e,o),ta(i.a)})}function Eh(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function kd(t,e,i){if(t==null)return e(void 0),i&&i(void 0),yt;let o=Pt(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Rl=[];function Lr(t,e){return{subscribe:re(t,e).subscribe}}function re(t,e=yt){let i=null,o=new Set;function s(d){if(gl(t,d)&&(t=d,i)){let r=!Rl.length;for(let u of o)u[1](),Rl.push(u,t);if(r){for(let u=0;u<Rl.length;u+=2)Rl[u][0](Rl[u+1]);Rl.length=0}}}function a(d){s(d(t))}function l(d,r=yt){let u=[d,r];return o.add(u),o.size===1&&(i=e(s,a)||yt),d(t),()=>{o.delete(u),o.size===0&&i&&(i(),i=null)}}return{set:s,update:a,subscribe:l}}function mi(t,e,i){let o=!Array.isArray(t),s=o?[t]:t;if(!s.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let a=e.length<2;return Lr(i,(l,d)=>{let r=!1,u=[],m=0,p=yt,v=()=>{if(m)return;p();let y=e(o?u[0]:u,l,d);a?l(y):p=typeof y=="function"?y:yt},$=s.map((y,h)=>kd(y,x=>{u[h]=x,m&=~(1<<h),r&&v()},()=>{m|=1<<h}));return r=!0,v(),function(){ta($),p(),r=!1}})}function he(t){let e;return kd(t,i=>e=i)(),e}var _u=!1,gf=Symbol();function w(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:vs(void 0),unsubscribe:yt};if(o.store!==t&&!(gf in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=yt;else{var s=!0;o.unsubscribe=kd(t,l=>{s?o.source.v=l:O(o.source,l)}),s=!1}return t&&gf in i?he(t):n(o.source)}function Be(){let t={};function e(){Mo(()=>{for(var i in t)t[i].unsubscribe();vo(t,gf,{enumerable:!1,value:!0})})}return[t,e]}function hf(t){var e=_u;try{return _u=!1,[t(),_u]}finally{_u=e}}var y1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Ve&&_g(`${t.name}.${String(e)}`),!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function An(t,e,i){return new Proxy(Ve?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},y1)}var x1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(ea(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o)return o[e]}},set(t,e,i){let o=t.props.length;for(;o--;){let s=t.props[o];ea(s)&&(s=s());let a=Go(s,e);if(a&&a.set)return a.set(i),!0}return!1},getOwnPropertyDescriptor(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(ea(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let s=Go(o,e);return s&&!s.configurable&&(s.configurable=!0),s}}},has(t,e){if(e===Yo||e===ml)return!1;for(let i of t.props)if(ea(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(ea(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},x1)}function Ph(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function g(t,e,i,o){var q,L;var s=(i&1)!==0,a=!ps||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,r=!1,u;l?[u,r]=hf(()=>t[e]):u=t[e];var m=Yo in t||ml in t,p=l&&((L=(q=Go(t,e))==null?void 0:q.set)!=null?L:m&&e in t&&(z=>t[e]=z))||void 0,v=o,$=!0,y=!1,h=()=>(y=!0,$&&($=!1,d?v=Pt(o):v=o),v);u===void 0&&o!==void 0&&(p&&a&&hg(e),u=h(),p&&p(u));var x;if(a)x=()=>{var z=t[e];return z===void 0?h():($=!0,y=!1,z)};else{var I=(s?qr:fr)(()=>t[e]);I.f|=131072,x=()=>{var z=n(I);return z!==void 0&&(v=void 0),z===void 0?v:z}}if((i&4)===0&&a)return x;if(p){var T=t.$$legacy;return function(z,j){return arguments.length>0?((!a||!j||T||r)&&p(j?x():z),z):x()}}var D=!1,k=!1,E=vs(u),V=qr(()=>{var z=x(),j=n(E);return D?(D=!1,k=!0,j):(k=!1,E.v=z)});return l&&n(V),s||(V.equals=hl),function(z,j){if(lu!==null&&(D=k,x(),n(E)),arguments.length>0){let te=j?n(V):a&&l?si(z):z;if(!V.equals(te)){if(D=!0,O(E,te),y&&v!==void 0&&(v=te),Ph(V))return z;Pt(()=>n(V))}return z}return Ph(V)?V.v:n(V)}}var w1;typeof HTMLElement=="function"&&(w1=class extends HTMLElement{constructor(e,i,o){super();lr(this,"$$ctor");lr(this,"$$s");lr(this,"$$c");lr(this,"$$cn",!1);lr(this,"$$d",{});lr(this,"$$r",!1);lr(this,"$$p_d",{});lr(this,"$$l",{});lr(this,"$$l_u",new Map);lr(this,"$$me");this.$$ctor=e,this.$$s=i,o&&this.attachShadow({mode:"open"})}addEventListener(e,i,o){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){let s=this.$$c.$on(e,i);this.$$l_u.set(i,s)}super.addEventListener(e,i,o)}removeEventListener(e,i,o){if(super.removeEventListener(e,i,o),this.$$c){let s=this.$$l_u.get(i);s&&(s(),this.$$l_u.delete(i))}}connectedCallback(){return $t(this,null,function*(){if(this.$$cn=!0,!this.$$c){let i=function(a){return l=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),b(l,d)}};var e=i;if(yield Promise.resolve(),!this.$$cn||this.$$c)return;let o={},s=S1(this);for(let a of this.$$s)a in s&&(a==="default"&&!this.$$d.children?(this.$$d.children=i(a),o.default=!0):o[a]=i(a));for(let a of this.attributes){let l=this.$$g_p(a.name);l in this.$$d||(this.$$d[l]=_f(l,a.value,this.$$p_d,"toProp"))}for(let a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=ah({component:this.$$ctor,target:this.shadowRoot||this,props:Jt(Ge({},this.$$d),{$$slots:o,$$host:this})}),this.$$me=nu(()=>{Jo(()=>{var a;this.$$r=!0;for(let l of Ep(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=_f(l,this.$$d[l],this.$$p_d,"toAttribute");d==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,d)}this.$$r=!1})});for(let a in this.$$l)for(let l of this.$$l[a]){let d=this.$$c.$on(a,l);this.$$l_u.set(l,d)}this.$$l={}}})}attributeChangedCallback(e,i,o){var s;this.$$r||(e=this.$$g_p(e),this.$$d[e]=_f(e,o,this.$$p_d,"toProp"),(s=this.$$c)==null||s.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Ep(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function _f(t,e,i,o){var a;let s=(a=i[t])==null?void 0:a.type;if(e=s==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!i[t])return e;if(o==="toAttribute")switch(s){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e==null?null:e;default:return e}else switch(s){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function S1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var kh="5";var Ah,Lh,Mh;typeof window!="undefined"&&((Mh=(Lh=(Ah=window.__svelte)!=null?Ah:window.__svelte={}).v)!=null?Mh:Lh.v=new Set).add(kh);import{areValidLiveRecordSources as eI,clientChecker as Rv}from"@vkontakte/videoplayer-core/es2015";import"@vkontakte/videoplayer-core/es2015";import{noop as Gb,safeStorage as tI,throttleFn as iI}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as oI}from"@vkontakte/videoplayer-statistics/es2015";import{InterfaceLanguage as C1,fillWithDefault as T1,VideoQuality as Vh}from"@vkontakte/videoplayer-shared/es2015";var I1={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:C1.RU,downloadVKLanguages:!0,updateBuiltinLanguages:!0,isSmoothVideoRotate:!0,showSupport:!0,supportLink:"https://vk.com/support?act=new&from=v",showLogo:void 0,logoLink:"https://vk.com/video",logoType:"vk_video",volumeDefault:1,volumeMinRestore:.05,loaderDelay:500,minSubtitlesFontSize:13,autoSubtitlesTimeout:2e3,allowChangingFullscreenTarget:!0,trafficSavingLimit:Vh.Q_480P,highQualityLimit:Vh.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,features:{autoplay:!0,statistics:!0,thinStatistics:!1,preload:!0,subtitles:!0,episodes:!0,fullscreen:!0,timelinePreview:!0,mediaSession:!0,annotations:!0,slots:!0,annotationsInside:!1,pip:!0,dpip:{minimalView:!1,initialSize:{width:400,height:225}},download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,episodesClustering:!0,copyVideoLink:!0,videoRotate:!0,tracer:!1,apptracer:{enabled:!1,sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},interactiveGraph:!1,interactiveResponsiveUi:!1,seekToInteractive:!0,interactiveLastFrame:!1,interactiveTextPermanent:!0,interactiveHideTime:!0,interactivePlayPrevChapter:!0,interactiveTimeIndicator:!0,interactiveTimeOpenUri:!1,interactiveAreaControlShadow:!1,interactiveControlsExpectTimeBlinkAnimation:!1,interactiveControlsTapPlace:!1,interactiveControlsFillAnimation:!1,interactiveControlsHideAnimation:!1,interactiveHistoryEndChapterFix:!0,thumbTimer:!0,hotKeyMapModal:!0,hotKeyHelpers:!0,saveDebugInfoToFile:!1,saveTraceInfoToFile:!1,additionalButtons:!0,additionalButtonsDesktopControlPanelRight:!0,additionalSettingsMenuItems:!0,additionalContextMenuItems:!0,contextMenuButton:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,autoplayNext:!0,nextPrevButtons:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,qualityDetailsSubMenuEnabled:!1,showSlowVideoNotification:!1,forceAutoQualityWhenSevereStallHappens:!1,timeoutShowSlowVideoNotification:0,maxCountShowSlowVideoNotification:1,forcePlayerDisplayBlock:!1,playbackStatusShow:!1,playbackStatusNextVideoShow:!1,initSubtitles:!0,useCallbackForMediaSessionNextPrevClick:!1,usePerformanceFix:!1,userVideoPrefs:!1,savePreferredStatesOnUserActionOnly:!1,useLoopSetting:!1,doubleForwardAvailable:!1,useRichSeek:!1,disableThumbUnstartedOnAutoplay:!1},controls:{showOnStartupAtAutoplay:!0,hideTimeout:500,hideTimeoutMobile:3e3,hideTimeoutInitial:200,hideTimeoutFullscreen:3e3,hideTimeoutCursor:3e3,hideTimeoutTooltips:1e3,collapseMobileUnmute:6e3,hide360IconTimeout:3e3,hideHotKeyHelpers:2e3,playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25,volumeStepKeyboard:.05,volumeStepWheel:.05,volumeBarTimeout:300,seekStepKeyboard:1e4,seekStepMobile:15e3,seekStepFrame:400},ads:{enable:void 0,initTimeout:2e3,loadTimeout:2e3,runtimeTimeout:5e3,slot:void 0,preview:void 0,paramsOverride:void 0,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},disablePiPResizeHandling:!1,interactive:{historyMaxLength:100,noInteractionEventTimeout:3e4},view:{timelineSliderColor:null,timelineSliderHandleColor:null,timelineSliderFilledColor:null,timelineSliderLoadedColor:null,volumeSliderColor:null,volumeSliderHandleColor:null,volumeSliderFilledColor:null,controlsTimeColor:null,timelineSliderFilledActiveLiveColor:null,timelineSliderHandleActiveLiveColor:null,buttonColor:null,buttonToggleOnColor:null,focusedColor:null,font:null,focusedOutlineWidth:null,focusedOutlineRadius:null,controlsDesktopPaddingHorizontal:null,controlsDesktopPaddingHorizontalMinimalView:null,timelinePaddingHorizontal:null,settingsBackgroundColor:null,controlsGradientHeight:null,controlsGradient:null},userSalt:"0",doubleForwardActivationTime:600,playbackStatusAnimationDuration:1e3,playbackStatusNextVideoAnimationDuration:1e3,suitableDurationForUsingRichSeek:180,titleShowBehaviour:"fullscreen",disabledSlotIds:[],disabledAdditionalButtonIds:[]},Rh=t=>T1(t,I1),Dh=t=>$l("ui-config",t),Mt=()=>bl("ui-config");var Ad="vk_player_debug_panel_opened";var Oh="videoplayer",Nh="videoplayer";var hs={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Bh=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Hh=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Fh=new Set(["ShiftRight","ShiftLeft"]);var Uh=["TIMELINE"],Ld=[...Uh,"GRAPH_BUTTON"],bf=[...Uh,"PLAY_BUTTON"],Md=[...Ld,"PLAY_BUTTON"];var _s=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(_s||{}),Vd={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as zh,VERSION as E1}from"@vkontakte/videoplayer-shared/es2015";import{VERSION as P1}from"@vkontakte/videoplayer-core/es2015";import{VERSION as k1}from"@vkontakte/videoplayer-statistics/es2015";var bu="prod",Dl="1.1.85-dev.031b4c0a.0";var Ba=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Wh=Symbol("storeContext"),Kh=Symbol("microStoresContext"),qh=(t,e)=>{$l(Wh,t),$l(Kh,e),bu==="dev"&&(window.app={store:t,microStores:e})},ye=()=>{let t=bl(Wh);return zh(t,"Store context is empty!"),t},wo=()=>{let t=bl(Kh);return zh(t,"MicroStores context is empty!"),t},ti=(t,e)=>yu(t,t.getValue(),e),yu=(t,e,i)=>Lr(e,o=>{let s=t.subscribe(a=>{o(a),i==null||i(a)});return()=>s.unsubscribe()}),Qh=(t,e,i,o,s=["meta config not provided"])=>{var L,z,j,te,ee,oe,ae,le,ce;let a=t.info,{width:l,height:d}=he(i.ui.playerSize),r=(z=(L=a.throughputEstimation$.getValue())==null?void 0:L.toFixed(0))!=null?z:0,u=(te=(j=a.rttEstimation$.getValue())==null?void 0:j.toFixed(0))!=null?te:0,m=a.isAutoQualityEnabled$.getValue()?"auto":"manual",p=`${Dl} (core: ${P1}, stat: ${k1}, shared: ${E1})`,v=he(i.state.errorLog$),$=v.length?`
|
|
45
|
+
`+v.map((X,_e)=>{var ue;let Ee=`${_e}) Type: ${X.id}
|
|
46
|
+
`,de=`Message: ${X.message} (${X.thrown})
|
|
47
|
+
`,ze=`Trace: ${(ue=X.thrown)==null?void 0:ue.stack}
|
|
48
|
+
`;return Ee+de+ze}).join(`
|
|
49
|
+
`):void 0,y=i.state.isAudioDisabled?"disabled":he(i.state.isAudioAvailable$)?void 0:"unavailable",h=t.info.currentVideoStream$.getValue(),x=t.info.currentAudioStream$.getValue(),I=[];h&&I.push(`Video: ${(ee=h==null?void 0:h.codec)!=null?ee:""}`+(h!=null&&h.hdr?" (HDR)":"")),x&&I.push(`Audio: ${(oe=x==null?void 0:x.codec)!=null?oe:""}`+(x!=null&&x.language?` (${x.language})`:""));let T=a.currentQuality$.getValue(),D="";if(T){let X=a.availableQualitiesFps$.getValue()[T];D=X?`${X}fps`:""}let k=a.httpConnectionType$.getValue(),E=(le=(ae=a.currentBuffer$.getValue())==null?void 0:ae.end)!=null?le:0,V=Math.max(E-he(i.state.positionExact$),0),q={Version:p,Browser:navigator.userAgent,Config:s.join(", "),"United video id":String(i.videoId),TraceId:o,VSID:he(i.vsid),"Content host":a.hostname$.getValue(),"Connection type":k?k+(a.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${r}Kbps @ ${u}ms RTT`,Format:a.currentFormat$.getValue(),"Available Formats":e!=null&&e.sources?Object.keys(e.sources).join(", "):"",Streams:I.join(", "),Quality:`${m} ${T!=null?T:""} ${D}`,"Available qualities":a.availableQualities$.getValue().join(", "),Audio:y,Position:`${he(i.state.positionExact$)}s`,Buffer:`${V}s`,State:`${he(i.playerPhase)} ${(ce=a.playbackState$.getValue())!=null?ce:""}`,"Player size":`${l}x${d}`,URL:window.location.href,Errors:$};return Object.entries(q).filter(([X,_e])=>_e!==void 0).map(([X,_e])=>`${X}: ${_e}`).join(`
|
|
50
|
+
`)},Gh=(t,e,i)=>{var L,z,j,te;let o=t.info,{width:s,height:a}=he(i.ui.playerSize),l={version:Dl,viewport:`${s}x${a}`,volume:Math.round(he(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-he(i.state.positionExact$),0),l.nativeBuffer=Math.max(p.end-he(i.state.positionExact$),0))),l.position=he(i.state.positionExact$);let y=o.throughputEstimation$.getValue();y&&(l.speed=y);let h=o.videoBitrate$.getValue();h&&(l.bitrate=h);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 D=he(i.vsid);typeof D=="string"&&(l.vsid=D);let k=(L=t.info.currentVideoStream$.getValue())==null?void 0:L.codec;k&&(l.videoCodec=k);let E=(z=t.info.currentAudioStream$.getValue())==null?void 0:z.codec;E&&(l.audioCodec=E),((j=t.info.currentVideoStream$.getValue())==null?void 0:j.hdr)&&(l.hdr=!0);let q=(te=t.info.currentAudioStream$.getValue())==null?void 0:te.language;return q&&(l.audioLanguage=q),l},Yh=(t,e)=>Ba(t,e,"mp4"),jh=t=>!t.type,Xh=t=>!!t.type,Zh=()=>{let e=[],i=0;return{add:(o,s)=>{e[i]=[o,s],i=(i+1)%10},find:o=>e.find(([s])=>s===o)}},$u=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}download(e){return $t(this,null,function*(){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=yield fetch(e,{signal:this.destroyController.signal});if(i.ok)return yield i.text();throw i}finally{this.pendingDownloads.delete(e)}})}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}};import{isNullable as wf,safeStorage as Ei}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-core/es2015";var A1="vk_player_",Jh="vk_player_prefer_traffic_saving_enabled",e_="vk_player_preferred_volume",t_="vk_player_prefer_volume_mute",Sf="vk_player_preferred_quality",$f="vk_player_preferred_default_quality_settings",yf="vk_player_preferred_quality_settings_by_video",i_="vk_player_preferred_stream_language",o_="vk_player_preferred_rate",n_="vk_player_preferred_autoplay_next",xf="vk_player_preferred_subtitles_language",r_="vk_player_user_video_prefs",s_=`${A1}preview_track_close_tooltip`,a_=t=>t>1?1:t<0?0:t,Cf=t=>Ei.set(e_,a_(t).toString(10)),xu=()=>{let t=Ei.get(e_);return wf(t)?void 0:a_(parseFloat(t))},Tf=(t,e)=>Ei.set(Sf,JSON.stringify({videoId:t,value:e})),wu=()=>Ei.remove(Sf),If=t=>{let e=Ei.get(Sf);if(wf(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){wu();return}return o},l_=(t,e)=>{e?Ei.set(t,"true"):Ei.remove(t)},Ef=t=>Ei.get(t)==="true",Pf=t=>l_(t_,t),d_=()=>Ef(t_),Rd=t=>l_(Jh,t),kf=()=>Ef(Jh),c_=()=>Ei.get(i_),Af=t=>Ei.set(i_,t),Lf=()=>Ei.get(xf),Mf=t=>{t?Ei.set(xf,t):Ei.remove(xf)},u_=t=>Ei.set(o_,JSON.stringify({rate:t})),p_=()=>{let t=Ei.get(o_);if(wf(t))return;let{rate:e}=JSON.parse(t);return e},f_=t=>{Ei.set(n_,String(t))},m_=()=>Ef(n_),L1=()=>{let t=m=>{Ei.set($f,JSON.stringify(m))},e=()=>{try{let m=Ei.get($f);return m?JSON.parse(m):null}catch(m){return null}},i=()=>{try{let m=Ei.get(yf);return m?JSON.parse(m):null}catch(m){return null}},o=m=>{Ei.set(yf,JSON.stringify(m))},s=m=>{u(m);let p=m?i():null;if(p&&(p==null?void 0:p.videoId)===m)return Jt(Ge({},p),{appliesTo:"to-video"});p&&a();let v=e();return v?Jt(Ge({},v),{appliesTo:"as-default"}):(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{Ei.remove(yf)},l=()=>{Ei.remove($f)},d=(m,p="as-default")=>{m.type==="exact_quality"||p==="to-video"?o(m):t(m)},r=m=>{let p=s(m);if(p){switch(p.type){case"traffic_saving":Rd(!0);break;case"exact_quality":Tf(m,p.quality)}a(),l()}},u=m=>{let p=If(m);if(p){o({type:"exact_quality",videoId:m,quality:p});return}kf()&&t({type:"traffic_saving",videoId:m}),Rd(!1),wu()};return{getPreferredQualitySettings:s,migrateSettingsToLegacyWay:r,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:Lf,savePreferredSubtitlesLanguage:Mf}},{getPreferredQualitySettings:v_,migrateSettingsToLegacyWay:g_,savePreferredQualitySettings:Su,savePreferredDefaultQualitySettings:fR,removePreferredQualitySettingsByVideo:mR,getPreferredDefaultQualitySettings:Cu}=L1(),M1=3,V1=3,h_=()=>{let t=Ei.get(r_);if(t)try{return JSON.parse(t)}catch(e){return null}return null},Tu=(t,e)=>{var s,a;let i=h_();return(a=(s=i==null?void 0:i[t])==null?void 0:s[e])!=null?a:null},Vf=(t,e,i)=>{var l,d,r;let o=(l=h_())!=null?l:{},s=(r=(d=o[t])==null?void 0:d[e])!=null?r:{};Object.assign(s,i,{updatedTs:Date.now()}),t in o||(o[t]={}),o[t][e]=s;let a=R1(o);Ei.set(r_,JSON.stringify(a))};function R1(t){let e=Object.entries(t).reduce((o,[s,a])=>{let l=0;return Object.values(a).forEach(d=>{l<d.updatedTs&&(l=d.updatedTs)}),o.push([s,l]),o},[]);return e.sort(([,o],[,s])=>o>s?-1:1),e.splice(V1),e.reduce((o,[s])=>(o[s]=D1(t[s]),o),{})}function D1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(M1),Object.fromEntries(e)}function __(){Ei.set(s_,JSON.stringify(!0))}function b_(){let t=Ei.get(s_);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Kb}from"@vkontakte/videoplayer-core/es2015";wg();var sa="var(--btn-color, #fff)";var O1=ke('<g filter="url(#strokeAndShadow)"><!></g><defs><filter x="-12" width="72" y="-12" height="72" id="strokeAndShadow"><feMorphology operator="dilate" radius=".4" result="outer"></feMorphology><feFlood flood-color="rgba(0,0,0,0.1)" result="outerColor"></feFlood><feComposite operator="in" in="outerColor" in2="outer" result="outerOutline"></feComposite><feDropShadow in="SourceGraphic" dx="0" dy="0" stdDeviation="3" flood-color="rgba(0,0,0,0.4)" result="outerShadow"></feDropShadow><feMerge><feMergeNode in="outerShadow"></feMergeNode><feMergeNode in="outerOutline"></feMergeNode><feMergeNode in="SourceGraphic"></feMergeNode></feMerge></filter></defs>',1),N1=ke('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function Xe(t,e){var m;H(e,!0);let i=g(e,"width",19,()=>"24"),o=g(e,"height",19,()=>"24"),s=g(e,"fill",3,sa),a=(m=e.viewBox)!=null?m:`0 0 ${i()} ${o()}`;var l=N1(),d=C(l);{var r=p=>{var v=O1(),$=se(v),y=C($);ei(y,()=>e.children),S($),Xt(),b(p,v)},u=p=>{var v=Re(),$=se(v);ei($,()=>e.children),b(p,v)};M(d,p=>{e.shadow?p(r):p(u,!1)})}S(l),N(()=>{De(l,"aria-label",e.ariaLabel),De(l,"aria-hidden",!e.ariaLabel),De(l,"width",i()),De(l,"height",o()),De(l,"viewBox",a),De(l,"fill",s()),Ke(l,e.style),De(l,"data-testid",e.testId)}),b(t,l),F()}import{isNullable as x_,InterfaceLanguage as w_}from"@vkontakte/videoplayer-shared/es2015";var B1={auto_quality_invariant:"Авто",auto_quality:"Авто ({actual})",auto_quality_option:"Авто",other_quality:"Другое",high_quality:"Высокое качество",high_quality_description:"Будет использовано больше трафика",auto_quality_limit:"Автоматически",traffic_saving_quality:"Экономия трафика",traffic_saving_quality_description:"Видео грузятся быстрее, но качество ниже",default_quality_for_any_video:"Качество для всех видео",quality_applience:"Качество по умолчанию можно {action}",quality_applience_action:"изменить",menu_quality:"Качество",menu_traffic_saving:"Экономия данных",menu_playback_rate:"Скорость",menu_report:"Сообщить о проблеме",menu_pip:"Картинка в картинке",menu_pip_close:"Развернуть видео",menu_copy_video_link:"Скопировать ссылку на видео",menu_copy_video_link_with_timestamp:"Скопировать ссылку на кадр",menu_video_rotate:"Повернуть",menu_video_loop_on:"Включить повторение",menu_video_loop_off:"Отключить повторение",menu_chromecast:"Chromecast трансляция",menu_copy_debug:"Копировать данные для диагностики",menu_save_debug:"Сохранить данные для диагностики",menu_debug_overlay:"Техническая информация",menu_copy_embed_code:"Копировать код для встраивания",menu_audio_languages:"Звуковая дорожка",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Дорожка {index}",pip_dummy_title:"Видео воспроизводится в режиме картинка в картинке",submenu_quality:"Качество",submenu_playback_rate:"Скорость",submenu_settings:"Настройки",submenu_traffic_saving:"Экономия данных",submenu_audio_languages:"Звуковая дорожка",playing_ads:"Реклама {timeleft}",skip_ads_now:"Пропустить рекламу",skip_ads_after:"Пропустить {time}с",visit_advertiser:"Перейти на сайт",aria_timeline:"Ползунок временной шкалы",aria_timeline_value:"{position} (общая длительность {duration}",doubletap_seek_step:"{seconds} секунд",playback_rate_1:"Обычная",playback_rate:"{multiplier}x",video360:"панорамное видео",subtitles_caption:"Субтитры",subtitles_auto:"{language} (Автоматические)",subtitles_off:"Выкл.",subtitles_auto_caption:"Автоматические субтитры",subtitles_turn_on:"Включить субтитры",subtitles_turn_off:"Выключить субтитры",traffic_saving_off:"Откл.",traffic_saving_on:"Вкл.",traffic_saving_helper_text:"При включении качество видео будет снижено для экономии трафика",tooltip_button_disabled:"Кнопка недоступна",tooltip_previous:"Предыдущее видео",tooltip_restart:"Начать заново",tooltip_play:"Смотреть",tooltip_pause:"Пауза",tooltip_next:"Следующее видео",tooltip_interactive_go_back:"Вернуться к предыдущей главе",tooltip_interactive_go_back_disabled:"История прохождения недоступна",tooltip_interactive_go_back_disabled_first:"Вы смотрите первую главу",tooltip_interactive_go_back_disabled_limit:"Лимит возвратов исчерпан",tooltip_chapter_without_interactive:"В этой главе нет интерактива",tooltip_interactive_of_chapter_completed:"Интерактивы этой главы уже пройдены",tooltip_interactive_seek:"Перейти к интерактиву",tooltip_interactive_graph_off:"Показать карту сюжета",tooltip_interactive_graph_on:"Скрыть карту сюжета",tooltip_live:"Перемотать на актуальный лайв",tooltip_episodes:"Эпизоды",tooltip_volume:"Включить звук",tooltip_volume_muted:"Выключить звук",tooltip_sound_unavailable:"Звук недоступен",tooltip_subtitles_off:"Включить субтитры",tooltip_subtitles_on:"Выключить субтитры",tooltip_settings_off:"Открыть настройки",tooltip_settings_on:"Закрыть настройки",tooltip_fullscreen_off:"На весь экран",tooltip_fullscreen_on:"Выйти из полноэкранного режима",tooltip_chromecast_off:"Включить Chromecast",tooltip_chromecast_on:"Выключить Chromecast",tooltip_episode_finished:"Вы уже сделали свой выбор",tooltip_episode_unfinished:"Не пройдено",tooltip_disabled_when_interactive:"Интерактив уже идёт",tooltip_disabled_when_graph_on:"Кнопка недоступна во время просмотра карты",tooltip_interactive_interaction_time_indicator:"Нажмите на элемент интерактива",tooltip_vk_logo:"Открыть в VK Видео",tooltip_vk_video_logo:"Перейти в VK Видео",tooltip_autoplay_off:"Включить автовоспроизведение",tooltip_autoplay_on:"Отключить автовоспроизведение",tooltip_context_menu_open:"Открыть контекстное меню",tooltip_context_menu_close:"Закрыть контекстное меню",download_video_caption:"Скачать видео",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Быстрые клавиши",hotkey_map_modal_close_btn_text:"Закрыть",hotkey_map_group_title_common:"Общие",hotkey_map_group_title_playback:"Воспроизведение",hotkey_map_group_title_subtitles:"Субтитры",hotkey_map_group_title_episodes:"Эпизоды",hotkey_map_item_mute_description:"Включить или отключить звук",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Увеличить громкость",hotkey_map_item_volume_up_value:"Стрелка вверх",hotkey_map_item_volume_down_description:"Уменьшить громкость",hotkey_map_item_volume_down_value:"Стрелка вниз",hotkey_map_item_pip_description:"Свернуть или развернуть мини-проигрыватель",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Включить или выключить полноэкранный режим",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Скрыть или показать контекстное меню",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Скрыть или показать список горячих клавиш",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Приостановить или продолжить воспроизведение",hotkey_map_item_play_toggle_value:"Пробел (или k)",hotkey_map_item_seek_backward_description:"Перемотать ролик на 10 секунд назад",hotkey_map_item_seek_backward_value:"Стрелка влево (или j)",hotkey_map_item_seek_forward_description:"Перемотать ролик на 10 секунд вперёд",hotkey_map_item_seek_forward_value:"Стрелка вправо (или l)",hotkey_map_item_fast_seek_backward_description:"Ускоренная перемотка назад",hotkey_map_item_fast_seek_backward_value:"Shift + Стрелка влево",hotkey_map_item_fast_seek_forward_description:"Ускоренная перемотка вперёд",hotkey_map_item_fast_seek_forward_value:"Shift + Стрелка вправо",hotkey_map_item_rate_down_description:"Уменьшить скорость воспроизведения",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Увеличить скорость воспроизведения",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Перейти к предыдущему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Перейти к следующему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Перейти к определённому моменту видео <br />(например, при нажатии на цифру «7» ролик будет перемотан до временной отметки, которая соответствует 70% от длительности видео)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Включить или отключить субтитры",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Перейти к предыдущему эпизоду",hotkey_map_item_prev_episode_pc_value:"Ctrl + Стрелка влево",hotkey_map_item_prev_episode_mac_value:"Option + Стрелка влево",hotkey_map_item_next_episode_description:"Перейти к следующему эпизоду",hotkey_map_item_next_episode_pc_value:"Ctrl + Стрелка вправо",hotkey_map_item_next_episode_mac_value:"Option + Стрелка вправо",hotkey_map_item_next_video_description:"Перейти к следующему видео",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Перейти к предыдущему видео",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"дн",waiting_live_hour_value:"ч",waiting_live_minute_value:"мин",waiting_live_second_value:"сек",waiting_live_colon:":",waiting_live_upcoming_title:"Трансляция еще не началась",waiting_live_timer_title:"До начала трансляции осталось",waiting_live_recover_title:"Трансляция приостановлена - она продолжится, когда автор вернётся",waiting_record_title:"Трансляция завершена - запись появится позже",aria_label_video_player:"Видео плеер",aria_label_spherical_control:"Контроллер для сферического видео. Используйте клавиши со стрелками для панорамирования видео.",aria_label_debug_panel:"Область с технической информацией, сделайте скриншот для техподдержки",aria_label_new_tab_alert:"Откроется в новой вкладке.",aria_label_menu_quality:"Качество: {actual}",aria_label_menu_audio_languages:"Язык аудио: {actual}",aria_label_menu_rate:"Скорость: {actual}",aria_label_menu_subtitle:"Субтитры: {actual}",aria_label_menu_download:"Скачать видео",aria_label_menu_debug_overlay:"Отображение технической информации",aria_label_menu_rotate:"Повернуть видео на 90 градусов",aria_label_menu_loop:"Переключение режима повторения",aria_label_submenu_back:"Вернуться в меню настроек",aria_label_submenu_traffic_saving:"Режим экономии данных",aria_label_settings:"Настройки",aria_label_context_menu:"Контекстное меню",aria_label_autoplay:"Автовоспроизведение",end_screen_next_video:"Следующее видео",end_screen_recommended_video:"Рекомендуемое видео",slow_video_notification_button:"Выбрать качество «Авто»",slow_video_notification_force_description:`Видео грузится слишком медленно,
|
|
51
51
|
качество изменено на «Авто»`,slow_video_notification_suggest_description:`Видео загружается слишком медленно -
|
|
52
|
-
попробуйте изменить качество на «Авто»`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"},$_=B1;var
|
|
52
|
+
попробуйте изменить качество на «Авто»`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"},$_=B1;var H1={auto_quality_invariant:"Auto",auto_quality:"Auto ({actual})",auto_quality_option:"Auto",other_quality:"Other",high_quality:"High quality",high_quality_description:"Uses more data",auto_quality_limit:"Auto",traffic_saving_quality:"Data saving",traffic_saving_quality_description:"Videos load faster but at lower quality",quality_applience:"You can {action} the default quality",quality_applience_action:"change",default_quality_for_any_video:"Quality for all videos",menu_quality:"Quality",menu_playback_rate:"Playback rate",menu_traffic_saving:"Data saving",menu_report:"Report a problem",menu_pip:"Picture in picture",menu_pip_close:"Expand video",menu_copy_video_link:"Copy video link",menu_copy_video_link_with_timestamp:"Copy link with timestamp",menu_video_rotate:"Rotate",menu_video_loop_on:"Enable loop",menu_video_loop_off:"Disable loop",menu_chromecast:"Chromecast stream",menu_copy_debug:"Copy debug info",menu_save_debug:"Save debug info",menu_debug_overlay:"Tech stats",menu_copy_embed_code:"Copy embed code",menu_audio_languages:"Audio track",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Audio track {index}",pip_dummy_title:"Video plays in picture-in-picture mode",submenu_quality:"Quality",submenu_playback_rate:"Playback rate",submenu_traffic_saving:"Data saving",submenu_settings:"Settings",submenu_audio_languages:"Audio track",playing_ads:"Ads {timeleft}",skip_ads_after:"Skip ads",skip_ads_now:"Skip {time}s",visit_advertiser:"Visit site",aria_timeline:"Time scale slider",aria_timeline_value:"{position} out of {duration}",doubletap_seek_step:"{seconds} seconds",playback_rate_1:"Normal",playback_rate:"{multiplier}x",video360:"spherical video",subtitles_caption:"Subtitles",subtitles_auto:"{language} (Auto-generated)",subtitles_off:"Off",subtitles_auto_caption:"Auto subtitles",subtitles_turn_on:"Turn on subtitles",subtitles_turn_off:"Turn off subtitles",traffic_saving_off:"Off",traffic_saving_on:"On",traffic_saving_helper_text:"When turned on the video quality will be reduced to save data",tooltip_button_disabled:"Button disabled",tooltip_previous:"Previous video",tooltip_restart:"Watch again",tooltip_play:"Play",tooltip_pause:"Pause",tooltip_next:"Next video",tooltip_interactive_go_back:"Back to previous chapter",tooltip_interactive_go_back_disabled:"Interactive history unavailable",tooltip_interactive_go_back_disabled_first:"You're watching the first chapter",tooltip_interactive_go_back_disabled_limit:"Go-back limit exceeded",tooltip_chapter_without_interactive:"This chapter has no interactive segment",tooltip_interactive_of_chapter_completed:"Chapter's interactive segments already watched",tooltip_interactive_seek:"Go to interactive",tooltip_interactive_graph_off:"Show interactive graph",tooltip_interactive_graph_on:"Hide interactive graph",tooltip_live:"Go to the live edge",tooltip_episodes:"Episodes",tooltip_volume:"Volume off",tooltip_volume_muted:"Turn volume on",tooltip_sound_unavailable:"Sound unavailable",tooltip_subtitles_off:"Turn subtitles on",tooltip_subtitles_on:"Turn subtitles off",tooltip_settings_off:"Open settings",tooltip_settings_on:"Close settings",tooltip_fullscreen_off:"Enter fullscreen mode",tooltip_fullscreen_on:"Exit fullscreen mode",tooltip_chromecast_off:"Turn Chromecast on",tooltip_chromecast_on:"Turn Chromecast off",tooltip_episode_finished:"You have already viewed interactive episode",tooltip_episode_unfinished:"Interactive episode not finished",tooltip_disabled_when_interactive:"Interactive video in progress",tooltip_disabled_when_graph_on:"Button is disabled when graph is opened",tooltip_interactive_interaction_time_indicator:"Press the interactive element",tooltip_vk_logo:"Open in VK Video",tooltip_vk_video_logo:"Go to VK Video",tooltip_autoplay_off:"Turn autoplay on",tooltip_autoplay_on:"Turn autoplay off",tooltip_context_menu_open:"Open context menu",tooltip_context_menu_close:"Close context menu",download_video_caption:"Download video",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Keyboard shortcuts",hotkey_map_modal_close_btn_text:"Close",hotkey_map_group_title_common:"Common",hotkey_map_group_title_playback:"Playback",hotkey_map_group_title_subtitles:"Subtitles",hotkey_map_group_title_episodes:"Episodes",hotkey_map_item_mute_description:"Toggle mute",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Increase volume",hotkey_map_item_volume_up_value:"Arrow up",hotkey_map_item_volume_down_description:"Decrease volume",hotkey_map_item_volume_down_value:"Arrow down",hotkey_map_item_pip_description:"Toggle miniplayer",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Toggle full screen",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Hide or show context menu",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Hide or show list of hotkeys",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Toggle play/pause",hotkey_map_item_play_toggle_value:"Space (or k)",hotkey_map_item_seek_backward_description:"Rewind 10 seconds",hotkey_map_item_seek_backward_value:"Arrow left (or j)",hotkey_map_item_seek_forward_description:"Forward 10 seconds",hotkey_map_item_seek_forward_value:"Arrow right (or l)",hotkey_map_item_fast_seek_backward_description:"Fast rewind",hotkey_map_item_fast_seek_backward_value:"Shift + Arrow left",hotkey_map_item_fast_seek_forward_description:"Fast forward",hotkey_map_item_fast_seek_forward_value:"Shift + Arrow right",hotkey_map_item_rate_down_description:"Decrease playback rate",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Increase playback rate",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Previous frame (while paused)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Next frame (while paused)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Seek to specific point in the video (7 advances to 70% of duration)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Toggle captions ON/OFF",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Seek to previous episode",hotkey_map_item_prev_episode_pc_value:"Ctrl + Arrow left",hotkey_map_item_prev_episode_mac_value:"Option + Arrow left",hotkey_map_item_next_episode_description:"Seek to next episode",hotkey_map_item_next_episode_pc_value:"Ctrl + Arrow right",hotkey_map_item_next_episode_mac_value:"Option + Arrow right",hotkey_map_item_next_video_description:"Next video",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Previous video",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"d",waiting_live_hour_value:"h",waiting_live_minute_value:"min",waiting_live_second_value:"sec",waiting_live_colon:":",waiting_live_upcoming_title:"The broadcast hasn't started yet",waiting_live_timer_title:"Before the start of the broadcast left",waiting_live_recover_title:"The broadcast has been paused - it will resume when the author returns",waiting_record_title:"The broadcast completed - recording will appear later",aria_label_video_player:"Video player",aria_label_spherical_control:"Spherical video control. Use the arrow keys to pan the video.",aria_label_debug_panel:"Technical information area, take a screenshot for technical support",aria_label_new_tab_alert:"Opens in a new tab.",aria_label_menu_quality:"Quality: {actual}",aria_label_menu_audio_languages:"Audio language: {actual}",aria_label_menu_rate:"Rate: {actual}",aria_label_menu_subtitle:"Subtitles: {actual}",aria_label_menu_download:"Download video",aria_label_menu_debug_overlay:"Display of technical information",aria_label_menu_rotate:"Rotate video 90 degrees",aria_label_menu_loop:"Toggle loop",aria_label_submenu_back:"Return to settings menu",aria_label_submenu_traffic_saving:"Data saving mode",aria_label_settings:"Settings",aria_label_context_menu:"Context menu",aria_label_autoplay:"Autoplay",end_screen_next_video:"Next video",end_screen_recommended_video:"Recommended video",slow_video_notification_button:"Select Auto quality",slow_video_notification_force_description:`The video is loading too slowly,
|
|
53
53
|
so the quality was changed to Auto`,slow_video_notification_suggest_description:`The video is loading too slowly.
|
|
54
|
-
Try switching the quality to Auto.`,double_forward_label:"2x",preview_track_notification_text:"pull up to open precise rewind",preview_track_close_tooltip:"dismiss precise rewind"},y_=F1;var Fs=new Map;Fs.set(w_.EN,y_);Fs.set(w_.RU,$_);var S_=new Map,Rf=({language:t,pack:e,fallback:i})=>{if(Fs.has(t)){let o=Fs.get(t);Fs.set(t,Ye(Ye({},o),e))}else Fs.set(t,e);S_.set(t,i)},Df=t=>Fs.has(t),Of=(t,e,i,o)=>{var l;let s=Fs.get(t),a=s==null?void 0:s[e];if(x_(a)){let d=(l=S_.get(t))!=null?l:o,r=d?Fs.get(d):void 0;a=r==null?void 0:r[e]}return x_(a)?e+Object.values(i!=null?i:{}).join(" "):i?a.replaceAll(/{(\w+?)}/g,(d,r)=>{var u;return(u=i[r])!=null?u:""}):a},q=(t,e)=>{let{interfaceLanguage$:i}=xe(),o=_e(i),s=Lt();return Of(o,t,e,s.defaultLanguage)};var H1=ke('<path d="M26.86 15.18a3.7 3.7 0 0 0 2.53-3.6C29.4 8.91 27.2 7 24.07 7c-1.96 0-3.57.78-4.67 2.29l-.1.15a1.33 1.33 0 0 0 .26 1.85c.54.4 1.3.35 1.74-.16l.2-.25a3 3 0 0 1 2.5-1.3c1.53 0 2.6.91 2.6 2.25 0 1.36-1.09 2.27-2.65 2.27h-.58a1.23 1.23 0 0 0 0 2.47h.58c1.75 0 2.91.98 2.91 2.39 0 1.45-1.19 2.46-2.88 2.46a3.2 3.2 0 0 1-2.89-1.6l-.2-.29a1.4 1.4 0 0 0-2.05-.25 1.3 1.3 0 0 0-.3 1.68l.21.33A6 6 0 0 0 24 24c3.28 0 5.63-2.04 5.63-4.92a4 4 0 0 0-2.77-3.9M37.73 12.68c-.46 0-1 .04-1.5.16L38.8 9.1a1.34 1.34 0 1 0-2.2-1.52l-3.76 5.47C31.43 15.18 31 16.87 31 18.33 31 21.8 33.56 24 37.19 24c3.6 0 6.16-2.4 6.16-5.77a5.4 5.4 0 0 0-5.63-5.56m-.53 8.74c-1.98 0-3.33-1.27-3.33-3.14 0-1.85 1.35-3.14 3.33-3.14 1.95 0 3.3 1.29 3.3 3.14 0 1.87-1.35 3.14-3.3 3.14m20.8-5.9c0 5.03-2.7 8.43-6.63 8.43s-6.62-3.4-6.62-8.44 2.7-8.44 6.62-8.44S58 10.47 58 15.51m-10.35 0c0 3.56 1.49 5.85 3.72 5.85s3.72-2.3 3.72-5.86-1.48-5.86-3.72-5.86c-2.23 0-3.72 2.3-3.72 5.86M67 9.49A3.5 3.5 0 0 1 63.51 13 3.5 3.5 0 0 1 60 9.49 3.5 3.5 0 0 1 63.51 6 3.5 3.5 0 0 1 67 9.49m-5 0c0 .83.68 1.51 1.51 1.51.81 0 1.5-.68 1.5-1.51 0-.81-.69-1.5-1.5-1.5-.83 0-1.51.69-1.51 1.5ZM67 23.5c0-1.32-1.2-3.1-4.2-4.67a1.5 1.5 0 1 1 1.4-2.66c3.25 1.72 5.8 4.26 5.8 7.33 0 3.13-2.56 5.55-6.09 7.27-3.63 1.77-8.82 3.06-15.26 3.72a1.5 1.5 0 0 1-.3-2.98c6.25-.64 11.05-1.88 14.25-3.44 3.3-1.6 4.4-3.27 4.4-4.57M38.88 35H38c-9.64 0-17.45-1.13-22.9-3.02-2.72-.94-4.94-2.1-6.5-3.47C7.01 27.14 6 25.44 6 23.5a6.2 6.2 0 0 1 1.9-4.25 16 16 0 0 1 4.43-3.1 1.5 1.5 0 1 1 1.34 2.7q-2.39 1.19-3.59 2.46C9.3 22.14 9 22.87 9 23.5c0 .8.4 1.74 1.57 2.76s3 2.01 5.51 2.89C21.11 30.89 28.55 32 38 32h.88l-1.44-1.44a1.5 1.5 0 0 1 2.12-2.12l4 4h.01a1.5 1.5 0 0 1 .32 1.63 2 2 0 0 1-.33.5l-4 4a1.5 1.5 0 0 1-2.12-2.13z"></path>');function Rd(t,e){B(e,!1);let i=q("video360");Yo(),je(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,s)=>{var a=H1();$(o,a)},$$slots:{default:!0}}),F()}import"@vkontakte/videoplayer-core/es2015";var ws=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(ws||{});var Iu=t=>{if(t.requestFullscreen)return t.requestFullscreen();if(t.msRequestFullscreen)return t.msRequestFullscreen();if(t.webkitRequestFullscreen)return t.webkitRequestFullscreen();if(t.mozRequestFullScreen)return t.mozRequestFullScreen();let e=t.querySelector("video");return e!=null&&e.webkitEnterFullscreen?(e.webkitEnterFullscreen(),Promise.resolve()):Promise.reject()},Eu=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),C_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,T_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Dd=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},ca=()=>!!Dd(),Pu=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},ku=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},I_=t=>{let e=window.screen;return(s=>bt(null,null,function*(){return e.orientation?e.orientation.lock(s):e.mozLockOrientation?e.mozLockOrientation(s):e.msLockOrientation?e.msLockOrientation(s):Promise.reject()}))(((s={width:0,height:0})=>s.width<=s.height?"portrait":"landscape")(t))};import{clientChecker as E_}from"@vkontakte/videoplayer-core/es2015";var P_=()=>({title:q("hotkey_map_modal_title"),closeBtnText:q("hotkey_map_modal_close_btn_text"),groups:[{title:q("hotkey_map_group_title_common"),items:[{description:q("hotkey_map_item_mute_description"),value:q("hotkey_map_item_mute_value")},{description:q("hotkey_map_item_volume_up_description"),value:q("hotkey_map_item_volume_up_value")},{description:q("hotkey_map_item_volume_down_description"),value:q("hotkey_map_item_volume_down_value")},{description:q("hotkey_map_item_pip_description"),value:q("hotkey_map_item_pip_value")},{description:q("hotkey_map_item_full_screen_description"),value:q("hotkey_map_item_full_screen_value")},{description:q("hotkey_map_item_show_context_menu_description"),value:q("hotkey_map_item_show_context_menu_value")},{description:q("hotkey_map_item_show_hotkey_map_description"),value:q("hotkey_map_item_show_hotkey_map_value")}]},{title:q("hotkey_map_group_title_playback"),items:[{description:q("hotkey_map_item_play_toggle_description"),value:q("hotkey_map_item_play_toggle_value")},{description:q("hotkey_map_item_seek_backward_description"),value:q("hotkey_map_item_seek_backward_value")},{description:q("hotkey_map_item_seek_forward_description"),value:q("hotkey_map_item_seek_forward_value")},{description:q("hotkey_map_item_fast_seek_backward_description"),value:q("hotkey_map_item_fast_seek_backward_value")},{description:q("hotkey_map_item_fast_seek_forward_description"),value:q("hotkey_map_item_fast_seek_forward_value")},{description:q("hotkey_map_item_rate_down_description"),value:q("hotkey_map_item_rate_down_value")},{description:q("hotkey_map_item_rate_up_description"),value:q("hotkey_map_item_rate_up_value")},{description:q("hotkey_map_item_prev_frame_description"),value:q("hotkey_map_item_prev_frame_value")},{description:q("hotkey_map_item_next_frame_description"),value:q("hotkey_map_item_next_frame_value")},{description:q("hotkey_map_item_jump_seek_description"),value:q("hotkey_map_item_jump_seek_value")},{description:q("hotkey_map_item_next_video_description"),value:q("hotkey_map_item_next_video_value")},{description:q("hotkey_map_item_prev_video_description"),value:q("hotkey_map_item_prev_video_value")}]},{title:q("hotkey_map_group_title_subtitles"),items:[{description:q("hotkey_map_item_subtitles_toggle_description"),value:q("hotkey_map_item_subtitles_toggle_value")}]},{title:q("hotkey_map_group_title_episodes"),items:[{description:q("hotkey_map_item_prev_episode_description"),value:E_.device.isApple?q("hotkey_map_item_prev_episode_mac_value"):q("hotkey_map_item_prev_episode_pc_value")},{description:q("hotkey_map_item_next_episode_description"),value:E_.device.isApple?q("hotkey_map_item_next_episode_mac_value"):q("hotkey_map_item_next_episode_pc_value")}]}]});import{devNull as k_,now as A_}from"@vkontakte/videoplayer-shared/es2015";function Nf(t,e){B(e,!1);let i=xe();At(()=>{i.getAdmanWrapper().startPostroll()}),Yo(),F()}import{noop as W1}from"@vkontakte/videoplayer-shared/es2015";var U1=ke('<path d="M11.74 6.74a.9.9 0 0 1-1.28 0L6 2.27 1.54 6.74A.9.9 0 1 1 .26 5.46l5.1-5.1a.9.9 0 0 1 1.28 0l5.1 5.1a.9.9 0 0 1 0 1.28Z"></path>'),z1=ke('<path d="m5.773 8 3.363 3.364a.9.9 0 1 1-1.272 1.272l-4-4a.9.9 0 0 1 0-1.272l4-4a.9.9 0 0 1 1.272 1.272L5.773 8z"></path>');function Or(t,e){B(e,!0);let i=g(e,"direction",3,"left"),o=g(e,"useBtnColor",3,!1),s=m(()=>["up","down"].includes(i())),a=m(()=>["right","down"].includes(i())),l=m(()=>`chevron-icon--${i()}`),d=m(()=>(()=>{let f="";return n(a)&&(f+="transform: rotate(180deg);"),f.length?f:void 0})()),r=m(()=>o()?da:"currentColor"),u=m(()=>n(s)?"7":"16");je(t,{width:"12",get height(){return n(u)},get fill(){return n(r)},get testId(){return n(l)},get style(){return n(d)},children:(f,p)=>{var v=Ve(),b=le(v);{var y=w=>{var I=U1();$(w,I)},_=w=>{var I=z1();$(w,I)};M(b,w=>{n(s)?w(y):w(_,!1)})}$(f,v)},$$slots:{default:!0}}),F()}var K1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},Q1=L('<div class="skip s-1h"> <!></div>'),q1=L("<div><!></div>"),G1={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 Bf(t,e){B(e,!0),Q(t,G1);let[i,o]=Be(),s=()=>x(u,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"secondsToWatchBeforeSkip",3,0),d=g(e,"skipAd",3,W1),u=xe().ui.isMobile,f=m(()=>a()>0&&a()>=l());var p=q1();let v;p.__click=[K1,f,d];var b=C(p);{var y=w=>{var I=Q1(),T=C(I),R=k(T);Or(R,{direction:"right"}),S(I),O(A=>he(T,`${A!=null?A:""} `),[()=>q("skip_ads_now")]),$(w,I)},_=w=>{var I=$s();O(T=>he(I,T),[()=>q("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),$(w,I)};M(b,w=>{n(f)?w(y):w(_,!1)})}S(p),O(w=>v=ie(p,1,"container s-1h",null,v,w),[()=>({"container-mobile":s(),skippable:n(f)})]),$(t,p),F(),o()}Ze(["click"]);var Y1=L('<button class="go-to-site s-1g"> </button>'),j1={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 Ff(t,e){B(e,!1),Q(t,j1),Yo();var i=Y1(),o=C(i,!0);S(i),O(s=>he(o,s),[()=>q("visit_advertiser")],hr),$(t,i),F()}var X1=L('<div class="top-gradient-mobile s-i"></div>'),Z1=L('<div class="container s-i"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),J1={hash:"s-i",code:".container.s-i{height:100%;width:100%}.top-gradient-mobile.s-i{background:linear-gradient(1turn,transparent,rgba(0,0,0,.05) 12%,rgba(0,0,0,.15) 25%,rgba(0,0,0,.3) 45%,rgba(0,0,0,.4) 57%,rgba(0,0,0,.5) 77%,rgba(0,0,0,.55) 88%,rgba(0,0,0,.65));height:80px;left:0;pointer-events:none;position:absolute;top:0;width:100%}"};function Od(t,e){B(e,!0),Q(t,J1);let[i,o]=Be(),s=()=>x(W,"$canSkipAd",i),a=()=>x(U,"$adPlaybackState",i),l=()=>x(R,"$isMobile",i),d=()=>x(Y,"$adPosition",i),r=()=>x(te,"$secondsToWatchBeforeSkipAd",i),u=()=>x(T,"$isVideoEnded",i),f=g(e,"adsSlotId",3,void 0),p=g(e,"adsParams",3,void 0),v=g(e,"adsAutoplayParam",3,void 0),b=g(e,"duration",3,0),y=g(e,"adsExternalApi",3,void 0),_=g(e,"adsJson",3,void 0),w=xe(),I=Lt(),T=w.state.isEnded$,R=w.ui.isMobile,A=I.ads.isMobileGoToSiteButton,P=K(void 0),E=K(void 0),z=!1,U=w.ads.playbackState,W=w.ads.canSkip,Y=w.ads.position,te=w.ads.secondsToWatchBeforeSkip,J=m(()=>s()&&a()!=="inactive"),oe=m(()=>l()&&a()!=="inactive"&&A);At(()=>{let X=w.getAdmanWrapper();if(k_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[A_(),f()]}),!f()){X.onAdmanLoadingError();return}let N=()=>{var Le;let{width:Je,height:Ae}=_e(w.ui.playerSize),j=_e(w.ui.isFullscreen),ne=(Le=v())!=null?Le:_e(w.ui.isAutoplay),Se=I.ads.paramsOverride;return{width:Je,height:Ae,isFullscreen:j,isAutoplay:ne,adsContainer:n(P),adsVideoElement:n(E),slotId:f(),params:p(),paramsOverride:Se,duration:b(),externalApi:y(),json:_()}},me=Je=>bt(null,null,function*(){Je&&(yield mo());let Ae=N();yield X.initAdman(Ae),z=!0}),ue=new AbortController,Re=()=>{ue.abort()};return window.AdmanHTML?me(!0).catch(()=>{X.onAdmanLoadingError()}):X.loadAdman(ue.signal).then(()=>me(!1)).catch(()=>{X.onAdmanLoadingError()}),()=>{k_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[A_(),f()]}),!z&&Re()}});var de=Z1(),ae=C(de);{var pe=X=>{var N=X1();$(X,N)};M(ae,X=>{l()&&X(pe)})}var ee=k(ae,2);it(ee,X=>D(E,X),()=>n(E));var $e=k(ee,2);{var Ee=X=>{Bf(X,{get position(){return d()},get secondsToWatchBeforeSkip(){return r()},get skipAd(){return w.actions.internal.skipAd}})};M($e,X=>{n(J)&&X(Ee)})}var ce=k($e,2);{var Qe=X=>{Nf(X,{})};M(ce,X=>{u()&&X(Qe)})}var fe=k(ce,2);{var ve=X=>{Ff(X,{})};M(fe,X=>{n(oe)&&X(ve)})}S(de),it(de,X=>D(P,X),()=>n(P)),$(t,de),F(),o()}var jo=t=>{if(!isFinite(t))return"00:00";let e=Math.round(t),i=Math.floor(e/(60*60));e-=i*3600;let o=Math.floor(e/60);e-=o*60;let s=[o,e].map(a=>String(a).padStart(2,"0")).join(":");return i>0&&(s=`${i}:${s}`),s};var e0=ke('<path fill="#fff"></path>'),t0=ke("<path></path><!>",1);function Nd(t,e){let i=g(e,"isActive",3,!1),o=m(()=>i()?"live-active-icon":"live-icon"),s=m(()=>i()?"var(--timeline-slider-filled-active-live-bg, #FF3347)":void 0),a="M8 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2H9V6a1 1 0 0 0-1-1m7 1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0zm15-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-2h3a1 1 0 1 0 0-2h-3V7h3a1 1 0 1 0 0-2zm-8.32 9.31-2.55-7.82a1 1 0 0 1-.12-.37L19 6.1a1 1 0 1 1 2-.2l2 6.4 2-6.4a1 1 0 0 1 2 .2v.02a1 1 0 0 1-.13.37l-2.55 7.82a1 1 0 0 1-.95.69h-.74a1 1 0 0 1-.95-.69";je(t,{width:"42",height:"20",get testId(){return n(o)},get fill(){return n(s)},children:(l,d)=>{var r=t0(),u=le(r),f=k(u);{var p=v=>{var b=e0();De(b,"d",a),$(v,b)};M(f,v=>{i()&&v(p)})}O(()=>De(u,"d",`M5 0h32s5 0 5 5v10s0 5 -5 5h-32s-5 0 -5 -5v-10s0 -5 5 -5${i()?"":"M5.5 2h31s3.5 0 3.5 3.5v9s0 3.5-3.5 3.5h-31s-3.5 0-3.5-3.5v-9s0-3.5 3.5-3.5"+a}z`)),$(l,r)},$$slots:{default:!0}})}var i0=L('<div class="equalizer s-a"><div class="col s-a"></div> <div class="col s-a"></div> <div class="col s-a"></div></div>'),o0=L('<div class="live-icon s-a"><!></div>'),n0=L('<span class="text s-a"> </span>'),r0=L("<div><!> <!></div>"),s0={hash:"s-a",code:".wrapper.s-a{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-a{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-a{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-a .equalizer:where(.s-a){margin-top:-2px}.equalizer.s-a .col:where(.s-a){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-a .equalizer:where(.s-a) .col:where(.s-a){animation-play-state:running}.equalizer.s-a .col:where(.s-a):first-child{animation-name:s-a-thumb-timer-equalizer-col1;left:0}.equalizer.s-a .col:where(.s-a):nth-child(2){animation-name:s-a-thumb-timer-equalizer-col2;left:3px}.equalizer.s-a .col:where(.s-a):nth-child(3){animation-name:s-a-thumb-timer-equalizer-col3;left:6px}.live-icon.s-a{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-a-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-a-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-a-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-a{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function Bd(t,e){Q(t,s0);let i=g(e,"withEqualizer",3,!1),o=g(e,"isLive",3,!1),s=g(e,"isPlaying",3,!1);var a=r0();let l;var d=C(a);{var r=v=>{var b=i0();$(v,b)};M(d,v=>{i()&&v(r)})}var u=k(d,2);{var f=v=>{var b=o0(),y=C(b);Nd(y,{isActive:!0}),S(b),$(v,b)},p=v=>{var b=n0(),y=C(b,!0);S(b),O(()=>he(y,e.time)),$(v,b)};M(u,v=>{o()?v(f):v(p,!1)})}S(a),O(v=>l=ie(a,1,"wrapper s-a",null,l,v),[()=>({live:o(),playing:s()})]),$(t,a)}var Vl=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var a0=L('<div role="timer" data-testid="thumb-timer"><!></div>'),l0={hash:"s-j",code:".thumb-timer.s-j{bottom:0;margin:8px;position:absolute;right:0;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);z-index:var(--thumb-timer-z-index)}"};function Fd(t,e){B(e,!0),Q(t,l0);let[i,o]=Be(),s=()=>x(f,"$disabled",i),a=g(e,"isHidden",3,!1),l=g(e,"isLive",3,!1),d=g(e,"isPlaying",3,!1),r=Lt(),u=m(()=>jo(e.duration-e.position)),f=se(!1);var p=a0();let v;var b=C(p);Bd(b,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(p),Ns(p,()=>Vl(a()&&r.features.usePerformanceFix,f,r.disableInvisibleComponentsTimeout)),O(y=>v=ie(p,1,"thumb-timer s-j",null,v,y),[()=>({"out-of-flow":s(),hidden:a()})]),$(t,p),F(),o()}var Rl=t=>{if(!navigator.clipboard){L_(t);return}navigator.clipboard.writeText(t).catch(()=>L_(t))};function L_(t){if(document.queryCommandSupported&&document.queryCommandSupported("copy")){let e=document.createElement("textarea");e.textContent=t,e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e),e.select();try{document.execCommand("copy")}finally{document.body.removeChild(e)}}}import{ChromecastState as b0,clientChecker as $0}from"@vkontakte/videoplayer-core/es2015";import{clientChecker as M_}from"@vkontakte/videoplayer-core/es2015";var Hf="focus-hidden";var Nr=t=>{t.stopPropagation(),t.preventDefault()},Uf=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Hf)},c0=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},u0=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},p0=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},f0=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},V_=t=>t.code==="Escape",m0=t=>t.code==="ArrowLeft",Hd=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},R_=t=>{p0(t)?(Nr(t),u0(t.target)):f0(t)&&(Nr(t),c0(t.target))},fa=t=>!M_.device.isAndroid&&(t==null?void 0:t.detail)===0||M_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Dl=(t,e,i)=>bt(null,null,function*(){yield mo(),t&&!t.classList.contains("opened")&&!e&&_e(i)&&(yield mo(),i.set(!1),t.focus())}),D_=(t,e,i)=>bt(null,null,function*(){yield mo(),t&&!e&&_e(i)&&(i.set(!1),t.focus())}),Ud=(t,e,i,o=!1)=>bt(null,null,function*(){if(yield mo(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Hf,!i),a==null||a.focus()}}),O_=(t,e)=>bt(null,null,function*(){setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)}),Au=(t,e)=>{R_(t),Uf(t.target),V_(t)&&(Nr(t),e())},Lu=(t,e)=>bt(null,null,function*(){Hd(t,["ArrowRight"])&&(Nr(t),e())}),N_=(t,e,i)=>bt(null,null,function*(){if(R_(t),m0(t)){Nr(t),e();return}V_(t)&&(Nr(t),i())}),Ol=(t,e)=>{Hd(t)&&(Nr(t),e())},B_=(t,e,i)=>{if(Hd(t))Nr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Nr(t);return}o==="ArrowRight"&&!e&&(i(!0),Nr(t))}},F_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,s=e.top+i;return{right:o,bottom:s}},H_=t=>{if(!t)return{top:0,left:0};let e=t.getBoundingClientRect(),i=-58,o=8,s=e.left+o;return{bottom:e.bottom+i,left:s}};import{isNullable as Mu,isValidURL as y0}from"@vkontakte/videoplayer-shared/es2015";var os={"copy-link":100,"copy-link-timestamp":200,"copy-embed-code":300,pip:400,"video-loop":500,rotate:600,report:700,"save-debug":800,"save-trace":900,"debug-info":1e3};import{noop as U_}from"@vkontakte/videoplayer-shared/es2015";var g0=(t,e)=>{Ol(t,()=>e())},h0=L('<li class="item s-1j" role="menuitem" tabindex="0"> </li>'),_0={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 zf(t,e){B(e,!0),Q(t,_0);let i=g(e,"onClick",3,U_),o=g(e,"closeContextMenu",3,U_),s=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=h0();a.__click=s,a.__keydown=[g0,s];var l=C(a,!0);S(a),O(()=>{var d;De(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),De(a,"data-testid",e.id),he(l,e.label)}),$(t,a),F()}Ze(["click","keydown"]);var Ua=(t,e)=>t.weight-e.weight;var zd=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(zd||{});var x0=(t,e)=>{Au(t,e)},w0=t=>{t.preventDefault()},S0=L('<ul role="menu" data-testid="context-menu" class="s-q"></ul>'),C0={hash:"s-q",code:"ul.s-q{background:rgba(0,0,0,.72);border-radius:8px;list-style:none;margin:0;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;padding:6px 0;position:absolute;transition:visibility .1s,opacity .1s;z-index:var(--context-menu-z-index)}"};function Wf(t,e){B(e,!0),Q(t,C0);let[i,o]=Be(),s=()=>x(ae,"$playerPhase",i),a=()=>x(te,"$isLive$",i),l=()=>x(pe,"$isPiPEnabled$",i),d=()=>x(Y,"$chromecastState$",i),r=()=>x(ee,"$pictureInPictureApiIsActive$",i),u=()=>x(de,"$isLooped$",i),f=()=>x(J,"$positionExact$",i),p=()=>x(z,"$additionalContextMenuItems$",i),v=g(e,"visible",3,!1),b=g(e,"position",19,()=>({top:0,left:0})),y=g(e,"playerContainerRef",3,void 0),_=g(e,"menuElementRef",15,void 0),w=K(0),I=K(0),T=xe(),{pictureInPicture$:R}=_o(),A=Lt(),P=T.ui.contextMenu.visible$,E=T.ui.debugPanelVisible,z=T.ui.additionalContextMenuItems$,U=T.ui.t,W=T.actions.internal.togglePictureInPicture,Y=T.state.chromecastState$,te=T.state.isLive$,J=T.state.positionExact$,oe=T.state.isInteractive,de=T.state.looped$,ae=T.playerPhase,{isEnabled$:pe,isActive$:ee}=R,$e=m(()=>s()==="video"),Ee=m(()=>!!a()&&n($e)),ce=m(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(s())),Qe=m(()=>{var ye;return A.features.copyVideoLink&&((ye=T.callbacks)==null?void 0:ye.onCopyVideoLink)}),fe=m(()=>n(Qe)&&!n(ce)&&!oe&&!n(Ee)),ve=m(()=>{var ye;return!!((ye=T.callbacks)!=null&&ye.onCopyEmbedCodeClicked)}),X=m(()=>l()&&d()!==b0.CONNECTED&&!oe&&n($e)&&!$0.browser.isFirefox),N=m(()=>!oe&&!n(ce)&&!n(Ee)),me=m(()=>A.features.videoRotate&&!oe&&!n(ce)),ue=m(()=>A.showSupport&&!r()),Re=m(()=>A.features.saveTraceInfoToFile),Je=()=>{var ye;P.set(!1),(ye=e.returnFocus)==null||ye.call(e)},Ae=(ye,qe)=>{if(!_()||!y())return;let Ue=_().getBoundingClientRect(),st=y().getBoundingClientRect();D(w,ye-st.left),D(I,qe-st.top),n(w)+Ue.width>st.width&&D(w,st.width-Ue.width),n(I)+Ue.height>st.height&&D(I,st.height-Ue.height),D(w,Math.max(n(w),0),!0),D(I,Math.max(n(I),0),!0)};Fe(()=>{bt(null,null,function*(){if(_()&&y()){yield mo();let{top:qe,left:Ue,bottom:st,right:qt}=b(),Pt=Ue!=null?Ue:0,Yt=qe!=null?qe:0,bi=_().getBoundingClientRect();Mu(Ue)&&!Mu(qt)&&(Pt=qt-bi.width),Mu(qe)&&!Mu(st)&&(Yt=st-bi.height),Pt=Math.max(Pt,0),Yt=Math.max(Yt,0),Ae(Pt,Yt)}})});let j=()=>{T.actions.internal.videoRotate()},ne=()=>{y0(e.supportLink)&&window.open(e.supportLink,"_blank"),T.actions.internal.reportProblem(),T.actions.internal.pause()},Se=()=>{let ye=T.actions.internal.getDebugTextData();if(A.features.saveDebugInfoToFile){let qe=new Blob([...ye],{type:"plain/text"}),Ue=window.URL.createObjectURL(qe);Fa(Ue,"vk_player_debug_info","txt")}else Rl(T.actions.internal.getDebugTextData())},Le=()=>{let ye=T.actions.internal.getTraceTextData(),qe=new Blob([...ye],{type:"application/json"}),Ue=window.URL.createObjectURL(qe);Fa(Ue,"vk_player_trace_info","json")},ze=()=>{E.set(!0)},Ce=()=>bt(null,null,function*(){var ye;try{W()}finally{(ye=e.returnFocus)==null||ye.call(e)}}),we=()=>{T.actions.internal.setLooped(!u())},He=()=>{var ye,qe;if(n(ve)){let Ue=(qe=(ye=T.callbacks)==null?void 0:ye.onCopyEmbedCodeClicked)==null?void 0:qe.call(ye);Ue&&Rl(Ue)}},rt=(ye=!1)=>{var qe,Ue;if((qe=T.callbacks)!=null&&qe.onCopyVideoLink){let st=(Ue=T.callbacks)==null?void 0:Ue.onCopyVideoLink(ye,f());st&&Rl(st)}},ct=m(()=>A.features.saveDebugInfoToFile?U("menu_save_debug"):U("menu_copy_debug")),Mt=m(()=>n(Qe)?{id:"copy-link",weight:os["copy-link"],label:U("menu_copy_video_link"),onClick:()=>rt()}:void 0),lt=m(()=>n(fe)?{id:"copy-link-timestamp",weight:os["copy-link-timestamp"],label:U("menu_copy_video_link_with_timestamp"),onClick:()=>rt(!0)}:void 0),ni=m(()=>n(ve)?{id:"copy-embed-code",weight:os["copy-embed-code"],label:U("menu_copy_embed_code"),onClick:He}:void 0),wt=m(()=>n(X)?{id:"pip",weight:os.pip,label:r()?U("menu_pip_close"):U("menu_pip"),onClick:Ce}:void 0),Rt=m(()=>n(N)?{id:"video-loop",weight:os["video-loop"],label:u()?U("menu_video_loop_off"):U("menu_video_loop_on"),ariaLabel:U("aria_label_menu_loop"),onClick:we}:void 0),Dt=m(()=>n(me)?{id:"rotate",weight:os.rotate,label:U("menu_video_rotate"),ariaLabel:U("aria_label_menu_rotate"),onClick:j}:void 0),Qt=m(()=>n(ue)?{id:"report",weight:os.report,label:U("menu_report"),ariaLabel:`${U("menu_report")}. ${U("aria_label_new_tab_alert")}`,onClick:ne}:void 0),Te=m(()=>({id:"save-debug",weight:os["save-debug"],label:n(ct),onClick:Se})),G=m(()=>n(Re)?{id:"save-trace",weight:os["save-trace"],label:U("menu_save_debug"),onClick:Le}:void 0),Ne=m(()=>({id:"debug-info",weight:os["debug-info"],label:U("menu_debug_overlay"),ariaLabel:U("aria_label_menu_debug_overlay"),onClick:ze})),be=m(()=>[n(Mt),n(lt),n(ni),n(wt),n(Rt),n(Dt),n(Qt),n(Te),n(G),n(Ne),...p()].filter(ye=>!!ye).sort(Ua));var Oe=Ve(),Ie=le(Oe);{var ht=ye=>{var qe=S0();qe.__contextmenu=[w0],qe.__keydown=[x0,Je],yi(qe,21,()=>n(be),Ue=>Ue.id,(Ue,st)=>{zf(Ue,{get id(){return n(st).id},get label(){return n(st).label},get ariaLabel(){return n(st).ariaLabel},get onClick(){return n(st).onClick},closeContextMenu:Je})}),S(qe),it(qe,Ue=>_(Ue),()=>_()),O(()=>{var Ue,st;return Ke(qe,`top: ${(Ue=n(I))!=null?Ue:""}px; left: ${(st=n(w))!=null?st:""}px;`)}),$(ye,qe)};M(Ie,ye=>{v()&&ye(ht)})}$(t,Oe),F(),o()}Ze(["contextmenu","keydown"]);var Vu=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 Vu(e);this.top?(this.top.next=i,this.top=i):(this.top=i,this.bottom=i),this.size++,this.size>this.maxSize&&this.bottom&&(this.bottom=this.bottom.next)}getValuesFromBottom(){let e=[],i=this.bottom;for(;i;)e.push(i.value),i=i.next;return e}};var T0=L('<div class="container s-1f"><canvas class="s-1f"></canvas></div>'),I0={hash:"s-1f",code:".container.s-1f{display:inline-block;height:16px;width:120px}canvas.s-1f{margin-top:2px;transform:scaleY(-1)}"};function Wd(t,e){B(e,!0),Q(t,I0);let i=g(e,"values",19,()=>[]),o=K(void 0),s=K(null),a=16,l=120,d=60,r=l/d;At(()=>{n(o).width=l,n(o).height=a,D(s,n(o).getContext("2d"),!0)});function u(v,b,y,_,w){w===0&&(w=1),v.fillStyle="#fff",v.fillRect(b,y,_,w)}Fe(()=>{let v="";if(n(s)){let b=i()[0];for(let _=1;_<i().length;_++)i()[_]>b&&(b=i()[_]);n(s).clearRect(0,0,l,a);let y=d-1;for(let _=i().length-1;_>=0;_--){let w=y*r,I=b>0?a*(i()[_]/b):0;u(n(s),w,0,r,I),v=I+" "+v,y--}}});var f=T0(),p=C(f);it(p,v=>D(o,v),()=>n(o)),S(f),$(t,f),F()}import{safeStorage as z_}from"@vkontakte/videoplayer-shared/es2015";var E0=(t,e)=>{t.stopPropagation(),z_.remove(kd),e.set(!1)},P0=L('<div class="s-k"><div class="s-k">Video id</div> <span> </span></div>'),k0=L('<div class="s-k"><div class="s-k">VSID</div> <span> </span></div>'),A0=L('<div class="s-k"><div class="s-k">Provider</div> <span> </span></div>'),L0=L('<div class="s-k"><div class="s-k">Streams</div> <span> </span></div>'),M0=L('<div class="s-k"><div class="s-k">Viewport</div> <span> </span></div>'),V0=L('<div class="s-k"><div class="s-k">Video size</div> <span> </span></div>'),R0=L('<div class="s-k"><div class="s-k">CDN host</div> <span> </span></div>'),D0=L('<div class="s-k"><div class="s-k">Volume</div> <span> </span></div>'),O0=L('<div class="s-k"><div class="s-k">Position</div> <span> </span></div>'),N0=L('<div class="s-k"><div class="s-k">Buffer</div> <span> </span></div>'),B0=L('<div class="s-k"><div class="s-k">Nbuffer</div> <span> </span></div>'),F0=L('<div class="s-k"><div class="s-k">Live latency</div> <span> </span></div>'),H0=L('<div class="s-k"><div class="s-k">Segment</div> <span> </span></div>'),U0=L('<div class="s-k"><div class="s-k">Network</div> <!> <span> </span></div>'),z0=L('<div class="s-k"><div class="s-k">V bitrate</div> <!> <span> </span></div>'),W0=L('<div role="region"><button class="close s-k" title="закрыть">[x]</button> <div class="content s-k"><div class="s-k"><div class="s-k">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-k"><div class="s-k">Dropped</div> <span> </span></div> <!> <!> <div class="s-k"><div class="s-k">FPS</div> <!> <span> </span></div></div></div>'),K0={hash:"s-k",code:".container.s-k{background:rgba(28,28,28,.8);border-radius:4px;color:#fff;font-size:10px;left:20px;min-width:160px;position:absolute;text-align:left;top:45px;user-select:text;z-index:var(--debug-panel-z-index)}.container-mobile.s-k{left:16px;top:16px}button.close.s-k{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-k{padding:5px}.content.s-k>div:where(.s-k)>div:where(.s-k){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Kd(t,e){B(e,!0),Q(t,K0);let[i,o]=Be(),s=()=>x(d,"$isMobile",i),a=xe(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,r=K(ri(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),f=K(0),p=K(0),v=K(0),b=new Nl(60),y=new Nl(60),_=new Nl(60),w=K(ri([])),I=K(ri([])),T=K(ri([])),R=q("aria_label_debug_panel");At(()=>{z_.set(kd,"true"),a.actions.internal.startLogging(),u&&(D(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),D(f,u.getVideoPlaybackQuality().totalVideoFrames,!0));let Te=window.setInterval(()=>{D(r,a.actions.internal.getDebugPanelData(),!0)},500),G;return u&&(G=window.setInterval(()=>{if(u){D(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let Ne=u.getVideoPlaybackQuality().totalVideoFrames;D(v,Ne-n(f)),D(f,Ne,!0),b.push(n(v)),n(r).speed&&y.push(n(r).speed),n(r).bitrate&&_.push(n(r).bitrate),D(w,b.getValuesFromBottom(),!0),D(I,y.getValuesFromBottom(),!0),D(T,_.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(Te),G&&clearInterval(G)}});var A=W0();let P;var E=C(A);E.__click=[E0,l];var z=k(E,2),U=C(z),W=k(C(U),2),Y=C(W,!0);S(W),S(U);var te=k(U,2);{var J=Te=>{var G=P0(),Ne=k(C(G),2),be=C(Ne,!0);S(Ne),S(G),O(()=>he(be,n(r).id)),$(Te,G)};M(te,Te=>{n(r).id&&Te(J)})}var oe=k(te,2);{var de=Te=>{var G=k0(),Ne=k(C(G),2),be=C(Ne,!0);S(Ne),S(G),O(()=>he(be,n(r).vsid)),$(Te,G)};M(oe,Te=>{n(r).vsid&&Te(de)})}var ae=k(oe,2);{var pe=Te=>{var G=A0(),Ne=k(C(G),2),be=C(Ne,!0);S(Ne),S(G),O(()=>he(be,n(r).provider)),$(Te,G)};M(ae,Te=>{n(r).provider&&Te(pe)})}var ee=k(ae,2);{var $e=Te=>{var G=L0(),Ne=k(C(G),2),be=C(Ne);S(Ne),S(G),O(()=>{var Oe,Ie;return he(be,`Video: ${(Oe=n(r).videoCodec||"")!=null?Oe:""} ${n(r).hdr?"(HDR)":""}
|
|
54
|
+
Try switching the quality to Auto.`,double_forward_label:"2x",preview_track_notification_text:"pull up to open precise rewind",preview_track_close_tooltip:"dismiss precise rewind"},y_=H1;var Ns=new Map;Ns.set(w_.EN,y_);Ns.set(w_.RU,$_);var S_=new Map,Rf=({language:t,pack:e,fallback:i})=>{if(Ns.has(t)){let o=Ns.get(t);Ns.set(t,Ge(Ge({},o),e))}else Ns.set(t,e);S_.set(t,i)},Df=t=>Ns.has(t),Of=(t,e,i,o)=>{var l;let s=Ns.get(t),a=s==null?void 0:s[e];if(x_(a)){let d=(l=S_.get(t))!=null?l:o,r=d?Ns.get(d):void 0;a=r==null?void 0:r[e]}return x_(a)?e+Object.values(i!=null?i:{}).join(" "):i?a.replaceAll(/{(\w+?)}/g,(d,r)=>{var u;return(u=i[r])!=null?u:""}):a},G=(t,e)=>{let{interfaceLanguage$:i}=ye(),o=he(i),s=Mt();return Of(o,t,e,s.defaultLanguage)};var F1=ke('<path d="M26.86 15.18a3.7 3.7 0 0 0 2.53-3.6C29.4 8.91 27.2 7 24.07 7c-1.96 0-3.57.78-4.67 2.29l-.1.15a1.33 1.33 0 0 0 .26 1.85c.54.4 1.3.35 1.74-.16l.2-.25a3 3 0 0 1 2.5-1.3c1.53 0 2.6.91 2.6 2.25 0 1.36-1.09 2.27-2.65 2.27h-.58a1.23 1.23 0 0 0 0 2.47h.58c1.75 0 2.91.98 2.91 2.39 0 1.45-1.19 2.46-2.88 2.46a3.2 3.2 0 0 1-2.89-1.6l-.2-.29a1.4 1.4 0 0 0-2.05-.25 1.3 1.3 0 0 0-.3 1.68l.21.33A6 6 0 0 0 24 24c3.28 0 5.63-2.04 5.63-4.92a4 4 0 0 0-2.77-3.9M37.73 12.68c-.46 0-1 .04-1.5.16L38.8 9.1a1.34 1.34 0 1 0-2.2-1.52l-3.76 5.47C31.43 15.18 31 16.87 31 18.33 31 21.8 33.56 24 37.19 24c3.6 0 6.16-2.4 6.16-5.77a5.4 5.4 0 0 0-5.63-5.56m-.53 8.74c-1.98 0-3.33-1.27-3.33-3.14 0-1.85 1.35-3.14 3.33-3.14 1.95 0 3.3 1.29 3.3 3.14 0 1.87-1.35 3.14-3.3 3.14m20.8-5.9c0 5.03-2.7 8.43-6.63 8.43s-6.62-3.4-6.62-8.44 2.7-8.44 6.62-8.44S58 10.47 58 15.51m-10.35 0c0 3.56 1.49 5.85 3.72 5.85s3.72-2.3 3.72-5.86-1.48-5.86-3.72-5.86c-2.23 0-3.72 2.3-3.72 5.86M67 9.49A3.5 3.5 0 0 1 63.51 13 3.5 3.5 0 0 1 60 9.49 3.5 3.5 0 0 1 63.51 6 3.5 3.5 0 0 1 67 9.49m-5 0c0 .83.68 1.51 1.51 1.51.81 0 1.5-.68 1.5-1.51 0-.81-.69-1.5-1.5-1.5-.83 0-1.51.69-1.51 1.5ZM67 23.5c0-1.32-1.2-3.1-4.2-4.67a1.5 1.5 0 1 1 1.4-2.66c3.25 1.72 5.8 4.26 5.8 7.33 0 3.13-2.56 5.55-6.09 7.27-3.63 1.77-8.82 3.06-15.26 3.72a1.5 1.5 0 0 1-.3-2.98c6.25-.64 11.05-1.88 14.25-3.44 3.3-1.6 4.4-3.27 4.4-4.57M38.88 35H38c-9.64 0-17.45-1.13-22.9-3.02-2.72-.94-4.94-2.1-6.5-3.47C7.01 27.14 6 25.44 6 23.5a6.2 6.2 0 0 1 1.9-4.25 16 16 0 0 1 4.43-3.1 1.5 1.5 0 1 1 1.34 2.7q-2.39 1.19-3.59 2.46C9.3 22.14 9 22.87 9 23.5c0 .8.4 1.74 1.57 2.76s3 2.01 5.51 2.89C21.11 30.89 28.55 32 38 32h.88l-1.44-1.44a1.5 1.5 0 0 1 2.12-2.12l4 4h.01a1.5 1.5 0 0 1 .32 1.63 2 2 0 0 1-.33.5l-4 4a1.5 1.5 0 0 1-2.12-2.13z"></path>');function Dd(t,e){H(e,!1);let i=G("video360");en(),Xe(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,s)=>{var a=F1();b(o,a)},$$slots:{default:!0}}),F()}import"@vkontakte/videoplayer-core/es2015";var bs=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(bs||{});var Iu=t=>{if(t.requestFullscreen)return t.requestFullscreen();if(t.msRequestFullscreen)return t.msRequestFullscreen();if(t.webkitRequestFullscreen)return t.webkitRequestFullscreen();if(t.mozRequestFullScreen)return t.mozRequestFullScreen();let e=t.querySelector("video");return e!=null&&e.webkitEnterFullscreen?(e.webkitEnterFullscreen(),Promise.resolve()):Promise.reject()},Eu=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),C_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,T_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Od=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},aa=()=>!!Od(),Pu=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},ku=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},I_=t=>{let e=window.screen;return(s=>$t(null,null,function*(){return e.orientation?e.orientation.lock(s):e.mozLockOrientation?e.mozLockOrientation(s):e.msLockOrientation?e.msLockOrientation(s):Promise.reject()}))(((s={width:0,height:0})=>s.width<=s.height?"portrait":"landscape")(t))};import{clientChecker as E_}from"@vkontakte/videoplayer-core/es2015";var P_=()=>({title:G("hotkey_map_modal_title"),closeBtnText:G("hotkey_map_modal_close_btn_text"),groups:[{title:G("hotkey_map_group_title_common"),items:[{description:G("hotkey_map_item_mute_description"),value:G("hotkey_map_item_mute_value")},{description:G("hotkey_map_item_volume_up_description"),value:G("hotkey_map_item_volume_up_value")},{description:G("hotkey_map_item_volume_down_description"),value:G("hotkey_map_item_volume_down_value")},{description:G("hotkey_map_item_pip_description"),value:G("hotkey_map_item_pip_value")},{description:G("hotkey_map_item_full_screen_description"),value:G("hotkey_map_item_full_screen_value")},{description:G("hotkey_map_item_show_context_menu_description"),value:G("hotkey_map_item_show_context_menu_value")},{description:G("hotkey_map_item_show_hotkey_map_description"),value:G("hotkey_map_item_show_hotkey_map_value")}]},{title:G("hotkey_map_group_title_playback"),items:[{description:G("hotkey_map_item_play_toggle_description"),value:G("hotkey_map_item_play_toggle_value")},{description:G("hotkey_map_item_seek_backward_description"),value:G("hotkey_map_item_seek_backward_value")},{description:G("hotkey_map_item_seek_forward_description"),value:G("hotkey_map_item_seek_forward_value")},{description:G("hotkey_map_item_fast_seek_backward_description"),value:G("hotkey_map_item_fast_seek_backward_value")},{description:G("hotkey_map_item_fast_seek_forward_description"),value:G("hotkey_map_item_fast_seek_forward_value")},{description:G("hotkey_map_item_rate_down_description"),value:G("hotkey_map_item_rate_down_value")},{description:G("hotkey_map_item_rate_up_description"),value:G("hotkey_map_item_rate_up_value")},{description:G("hotkey_map_item_prev_frame_description"),value:G("hotkey_map_item_prev_frame_value")},{description:G("hotkey_map_item_next_frame_description"),value:G("hotkey_map_item_next_frame_value")},{description:G("hotkey_map_item_jump_seek_description"),value:G("hotkey_map_item_jump_seek_value")},{description:G("hotkey_map_item_next_video_description"),value:G("hotkey_map_item_next_video_value")},{description:G("hotkey_map_item_prev_video_description"),value:G("hotkey_map_item_prev_video_value")}]},{title:G("hotkey_map_group_title_subtitles"),items:[{description:G("hotkey_map_item_subtitles_toggle_description"),value:G("hotkey_map_item_subtitles_toggle_value")}]},{title:G("hotkey_map_group_title_episodes"),items:[{description:G("hotkey_map_item_prev_episode_description"),value:E_.device.isApple?G("hotkey_map_item_prev_episode_mac_value"):G("hotkey_map_item_prev_episode_pc_value")},{description:G("hotkey_map_item_next_episode_description"),value:E_.device.isApple?G("hotkey_map_item_next_episode_mac_value"):G("hotkey_map_item_next_episode_pc_value")}]}]});import{devNull as k_,now as A_}from"@vkontakte/videoplayer-shared/es2015";function Nf(t,e){H(e,!1);let i=ye();Lt(()=>{i.getAdmanWrapper().startPostroll()}),en(),F()}import{noop as W1}from"@vkontakte/videoplayer-shared/es2015";var U1=ke('<path d="M11.74 6.74a.9.9 0 0 1-1.28 0L6 2.27 1.54 6.74A.9.9 0 1 1 .26 5.46l5.1-5.1a.9.9 0 0 1 1.28 0l5.1 5.1a.9.9 0 0 1 0 1.28Z"></path>'),z1=ke('<path d="m5.773 8 3.363 3.364a.9.9 0 1 1-1.272 1.272l-4-4a.9.9 0 0 1 0-1.272l4-4a.9.9 0 0 1 1.272 1.272L5.773 8z"></path>');function Mr(t,e){H(e,!0);let i=g(e,"direction",3,"left"),o=g(e,"useBtnColor",3,!1),s=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})()),r=f(()=>o()?sa:"currentColor"),u=f(()=>n(s)?"7":"16");Xe(t,{width:"12",get height(){return n(u)},get fill(){return n(r)},get testId(){return n(l)},get style(){return n(d)},children:(m,p)=>{var v=Re(),$=se(v);{var y=x=>{var I=U1();b(x,I)},h=x=>{var I=z1();b(x,I)};M($,x=>{n(s)?x(y):x(h,!1)})}b(m,v)},$$slots:{default:!0}}),F()}var K1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},q1=A('<div class="skip s-1h"> <!></div>'),Q1=A("<div><!></div>"),G1={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 Bf(t,e){H(e,!0),Q(t,G1);let[i,o]=Be(),s=()=>w(u,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"secondsToWatchBeforeSkip",3,0),d=g(e,"skipAd",3,W1),u=ye().ui.isMobile,m=f(()=>a()>0&&a()>=l());var p=Q1();let v;p.__click=[K1,m,d];var $=C(p);{var y=x=>{var I=q1(),T=C(I),D=P(T);Mr(D,{direction:"right"}),S(I),N(k=>ge(T,`${k!=null?k:""} `),[()=>G("skip_ads_now")]),b(x,I)},h=x=>{var I=gs();N(T=>ge(I,T),[()=>G("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),b(x,I)};M($,x=>{n(m)?x(y):x(h,!1)})}S(p),N(x=>v=ie(p,1,"container s-1h",null,v,x),[()=>({"container-mobile":s(),skippable:n(m)})]),b(t,p),F(),o()}et(["click"]);var Y1=A('<button class="go-to-site s-1g"> </button>'),j1={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 Hf(t,e){H(e,!1),Q(t,j1),en();var i=Y1(),o=C(i,!0);S(i),N(s=>ge(o,s),[()=>G("visit_advertiser")],fr),b(t,i),F()}var X1=A('<div class="top-gradient-mobile s-j"></div>'),Z1=A('<div class="container s-j"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),J1={hash:"s-j",code:".container.s-j{height:100%;width:100%}.top-gradient-mobile.s-j{background:linear-gradient(1turn,transparent,rgba(0,0,0,.05) 12%,rgba(0,0,0,.15) 25%,rgba(0,0,0,.3) 45%,rgba(0,0,0,.4) 57%,rgba(0,0,0,.5) 77%,rgba(0,0,0,.55) 88%,rgba(0,0,0,.65));height:80px;left:0;pointer-events:none;position:absolute;top:0;width:100%}"};function Nd(t,e){H(e,!0),Q(t,J1);let[i,o]=Be(),s=()=>w(z,"$canSkipAd",i),a=()=>w(L,"$adPlaybackState",i),l=()=>w(D,"$isMobile",i),d=()=>w(j,"$adPosition",i),r=()=>w(te,"$secondsToWatchBeforeSkipAd",i),u=()=>w(T,"$isVideoEnded",i),m=g(e,"adsSlotId",3,void 0),p=g(e,"adsParams",3,void 0),v=g(e,"adsAutoplayParam",3,void 0),$=g(e,"duration",3,0),y=g(e,"adsExternalApi",3,void 0),h=g(e,"adsJson",3,void 0),x=ye(),I=Mt(),T=x.state.isEnded$,D=x.ui.isMobile,k=I.ads.isMobileGoToSiteButton,E=K(void 0),V=K(void 0),q=!1,L=x.ads.playbackState,z=x.ads.canSkip,j=x.ads.position,te=x.ads.secondsToWatchBeforeSkip,ee=f(()=>s()&&a()!=="inactive"),oe=f(()=>l()&&a()!=="inactive"&&k);Lt(()=>{let Z=x.getAdmanWrapper();if(k_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[A_(),m()]}),m()===void 0){Z.onAdmanLoadingError();return}let B=()=>{var Ae;let{width:ot,height:Me}=he(x.ui.playerSize),be=he(x.ui.isFullscreen),W=(Ae=v())!=null?Ae:he(x.ui.isAutoplay),Ce=I.ads.paramsOverride;return{width:ot,height:Me,isFullscreen:be,isAutoplay:W,adsContainer:n(E),adsVideoElement:n(V),slotId:m(),params:p(),paramsOverride:Ce,duration:$(),externalApi:y(),json:h()}},fe=ot=>$t(null,null,function*(){ot&&(yield _o());let Me=B();yield Z.initAdman(Me),q=!0}),me=new AbortController,Ie=()=>{me.abort()};return window.AdmanHTML?fe(!0).catch(()=>{Z.onAdmanLoadingError()}):Z.loadAdman(me.signal).then(()=>fe(!1)).catch(()=>{Z.onAdmanLoadingError()}),()=>{k_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[A_(),m()]}),!q&&Ie()}});var ae=Z1(),le=C(ae);{var ce=Z=>{var B=X1();b(Z,B)};M(le,Z=>{l()&&Z(ce)})}var X=P(le,2);tt(X,Z=>O(V,Z),()=>n(V));var _e=P(X,2);{var Ee=Z=>{Bf(Z,{get position(){return d()},get secondsToWatchBeforeSkip(){return r()},get skipAd(){return x.actions.internal.skipAd}})};M(_e,Z=>{n(ee)&&Z(Ee)})}var de=P(_e,2);{var ze=Z=>{Nf(Z,{})};M(de,Z=>{u()&&Z(ze)})}var ue=P(de,2);{var pe=Z=>{Hf(Z,{})};M(ue,Z=>{n(oe)&&Z(pe)})}S(ae),tt(ae,Z=>O(E,Z),()=>n(E)),b(t,ae),F(),o()}var tn=t=>{if(!isFinite(t))return"00:00";let e=Math.round(t),i=Math.floor(e/(60*60));e-=i*3600;let o=Math.floor(e/60);e-=o*60;let s=[o,e].map(a=>String(a).padStart(2,"0")).join(":");return i>0&&(s=`${i}:${s}`),s};var ey=ke('<path fill="#fff"></path>'),ty=ke("<path></path><!>",1);function Bd(t,e){let i=g(e,"isActive",3,!1),o=f(()=>i()?"live-active-icon":"live-icon"),s=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";Xe(t,{width:"42",height:"20",get testId(){return n(o)},get fill(){return n(s)},children:(l,d)=>{var r=ty(),u=se(r),m=P(u);{var p=v=>{var $=ey();De($,"d",a),b(v,$)};M(m,v=>{i()&&v(p)})}N(()=>De(u,"d",`M5 0h32s5 0 5 5v10s0 5 -5 5h-32s-5 0 -5 -5v-10s0 -5 5 -5${i()?"":"M5.5 2h31s3.5 0 3.5 3.5v9s0 3.5-3.5 3.5h-31s-3.5 0-3.5-3.5v-9s0-3.5 3.5-3.5"+a}z`)),b(l,r)},$$slots:{default:!0}})}var iy=A('<div class="equalizer s-e"><div class="col s-e"></div> <div class="col s-e"></div> <div class="col s-e"></div></div>'),oy=A('<div class="live-icon s-e"><!></div>'),ny=A('<span class="text s-e"> </span>'),ry=A("<div><!> <!></div>"),sy={hash:"s-e",code:".wrapper.s-e{background-color:var(--black-alpha-40);border-radius:4px;padding:2px 6px;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);white-space:nowrap}.wrapper.live.s-e{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-e{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-e .equalizer:where(.s-e){margin-top:-2px}.equalizer.s-e .col:where(.s-e){animation:1.5s linear infinite alternate;animation-play-state:paused;background:var(--btn-color,--white);bottom:0;height:10px;margin-right:2px;position:absolute;transform-origin:50% 100%;width:2px}.playing.s-e .equalizer:where(.s-e) .col:where(.s-e){animation-play-state:running}.equalizer.s-e .col:where(.s-e):first-child{animation-name:s-e-thumb-timer-equalizer-col1;left:0}.equalizer.s-e .col:where(.s-e):nth-child(2){animation-name:s-e-thumb-timer-equalizer-col2;left:3px}.equalizer.s-e .col:where(.s-e):nth-child(3){animation-name:s-e-thumb-timer-equalizer-col3;left:6px}.live-icon.s-e{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-e-thumb-timer-equalizer-col1{0%{transform:scaleY(.1)}25%{transform:scaleY(.8)}50%{transform:scaleY(.4)}75%{transform:scaleY(.6)}to{transform:scaleY(.1)}}@keyframes s-e-thumb-timer-equalizer-col2{0%{transform:scaleY(1)}25%{transform:scaleY(.3)}50%{transform:scaleY(.9)}75%{transform:scaleY(.6)}to{transform:scaleY(1)}}@keyframes s-e-thumb-timer-equalizer-col3{0%{transform:scaleY(.6)}25%{transform:scaleY(.9)}50%{transform:scaleY(.1)}75%{transform:scaleY(.9)}to{transform:scaleY(.6)}}.text.s-e{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function Hd(t,e){Q(t,sy);let i=g(e,"withEqualizer",3,!1),o=g(e,"isLive",3,!1),s=g(e,"isPlaying",3,!1);var a=ry();let l;var d=C(a);{var r=v=>{var $=iy();b(v,$)};M(d,v=>{i()&&v(r)})}var u=P(d,2);{var m=v=>{var $=oy(),y=C($);Bd(y,{isActive:!0}),S($),b(v,$)},p=v=>{var $=ny(),y=C($,!0);S($),N(()=>ge(y,e.time)),b(v,$)};M(u,v=>{o()?v(m):v(p,!1)})}S(a),N(v=>l=ie(a,1,"wrapper s-e",null,l,v),[()=>({live:o(),playing:s()})]),b(t,a)}var Ol=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var ay=A('<div role="timer" data-testid="thumb-timer"><!></div>'),ly={hash:"s-i",code:".thumb-timer.s-i{bottom:0;margin:8px;position:absolute;right:0;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);z-index:var(--thumb-timer-z-index)}"};function Fd(t,e){H(e,!0),Q(t,ly);let[i,o]=Be(),s=()=>w(m,"$disabled",i),a=g(e,"isHidden",3,!1),l=g(e,"isLive",3,!1),d=g(e,"isPlaying",3,!1),r=Mt(),u=f(()=>tn(e.duration-e.position)),m=re(!1);var p=ay();let v;var $=C(p);Hd($,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(p),Ds(p,()=>Ol(a()&&r.features.usePerformanceFix,m,r.disableInvisibleComponentsTimeout)),N(y=>v=ie(p,1,"thumb-timer s-i",null,v,y),[()=>({"out-of-flow":s(),hidden:a()})]),b(t,p),F(),o()}var Nl=t=>{if(!navigator.clipboard){L_(t);return}navigator.clipboard.writeText(t).catch(()=>L_(t))};function L_(t){if(document.queryCommandSupported&&document.queryCommandSupported("copy")){let e=document.createElement("textarea");e.textContent=t,e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e),e.select();try{document.execCommand("copy")}finally{document.body.removeChild(e)}}}import{ChromecastState as by,clientChecker as $y}from"@vkontakte/videoplayer-core/es2015";import{clientChecker as M_}from"@vkontakte/videoplayer-core/es2015";var Ff="focus-hidden";var Vr=t=>{t.stopPropagation(),t.preventDefault()},Uf=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Ff)},cy=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},uy=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},py=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},fy=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},V_=t=>t.code==="Escape",my=t=>t.code==="ArrowLeft",Ud=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},R_=t=>{py(t)?(Vr(t),uy(t.target)):fy(t)&&(Vr(t),cy(t.target))},ca=t=>!M_.device.isAndroid&&(t==null?void 0:t.detail)===0||M_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Bl=(t,e,i)=>$t(null,null,function*(){yield _o(),t&&!t.classList.contains("opened")&&!e&&he(i)&&(yield _o(),i.set(!1),t.focus())}),D_=(t,e,i)=>$t(null,null,function*(){yield _o(),t&&!e&&he(i)&&(i.set(!1),t.focus())}),zd=(t,e,i,o=!1)=>$t(null,null,function*(){if(yield _o(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Ff,!i),a==null||a.focus()}}),O_=(t,e)=>$t(null,null,function*(){setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)}),Au=(t,e)=>{R_(t),Uf(t.target),V_(t)&&(Vr(t),e())},Lu=(t,e)=>$t(null,null,function*(){Ud(t,["ArrowRight"])&&(Vr(t),e())}),N_=(t,e,i)=>$t(null,null,function*(){if(R_(t),my(t)){Vr(t),e();return}V_(t)&&(Vr(t),i())}),Hl=(t,e)=>{Ud(t)&&(Vr(t),e())},B_=(t,e,i)=>{if(Ud(t))Vr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Vr(t);return}o==="ArrowRight"&&!e&&(i(!0),Vr(t))}},H_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,s=e.top+i;return{right:o,bottom:s}},F_=t=>{if(!t)return{top:0,left:0};let e=t.getBoundingClientRect(),i=-58,o=8,s=e.left+o;return{bottom:e.bottom+i,left:s}};import{isNullable as Mu,isValidURL as yy}from"@vkontakte/videoplayer-shared/es2015";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 U_}from"@vkontakte/videoplayer-shared/es2015";var gy=(t,e)=>{Hl(t,()=>e())},hy=A('<li class="item s-1i" role="menuitem" tabindex="0"> </li>'),_y={hash:"s-1i",code:".item.s-1i{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-1i:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function zf(t,e){H(e,!0),Q(t,_y);let i=g(e,"onClick",3,U_),o=g(e,"closeContextMenu",3,U_),s=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=hy();a.__click=s,a.__keydown=[gy,s];var l=C(a,!0);S(a),N(()=>{var d;De(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),De(a,"data-testid",e.id),ge(l,e.label)}),b(t,a),F()}et(["click","keydown"]);var Fa=(t,e)=>t.weight-e.weight;var Wd=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Wd||{});var xy=(t,e)=>{Au(t,e)},wy=t=>{t.preventDefault()},Sy=A('<ul role="menu" data-testid="context-menu" class="s-s"></ul>'),Cy={hash:"s-s",code:"ul.s-s{background:rgba(0,0,0,.72);border-radius:8px;list-style:none;margin:0;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;padding:6px 0;position:absolute;transition:visibility .1s,opacity .1s;z-index:var(--context-menu-z-index)}"};function Wf(t,e){H(e,!0),Q(t,Cy);let[i,o]=Be(),s=()=>w(le,"$playerPhase",i),a=()=>w(te,"$isLive$",i),l=()=>w(ce,"$isPiPEnabled$",i),d=()=>w(j,"$chromecastState$",i),r=()=>w(X,"$pictureInPictureApiIsActive$",i),u=()=>w(ae,"$isLooped$",i),m=()=>w(ee,"$positionExact$",i),p=()=>w(q,"$additionalContextMenuItems$",i),v=g(e,"visible",3,!1),$=g(e,"position",19,()=>({top:0,left:0})),y=g(e,"playerContainerRef",3,void 0),h=g(e,"menuElementRef",15,void 0),x=K(0),I=K(0),T=ye(),{pictureInPicture$:D}=wo(),k=Mt(),E=T.ui.contextMenu.visible$,V=T.ui.debugPanelVisible,q=T.ui.additionalContextMenuItems$,L=T.ui.t,z=T.actions.internal.togglePictureInPicture,j=T.state.chromecastState$,te=T.state.isLive$,ee=T.state.positionExact$,oe=T.state.isInteractive,ae=T.state.looped$,le=T.playerPhase,{isEnabled$:ce,isActive$:X}=D,_e=f(()=>s()==="video"),Ee=f(()=>!!a()&&n(_e)),de=f(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(s())),ze=f(()=>{var Se;return k.features.copyVideoLink&&((Se=T.callbacks)==null?void 0:Se.onCopyVideoLink)}),ue=f(()=>n(ze)&&!n(de)&&!oe&&!n(Ee)),pe=f(()=>{var Se;return!!((Se=T.callbacks)!=null&&Se.onCopyEmbedCodeClicked)}),Z=f(()=>l()&&d()!==by.CONNECTED&&!oe&&n(_e)&&!$y.browser.isFirefox),B=f(()=>!oe&&!n(de)&&!n(Ee)),fe=f(()=>k.features.videoRotate&&!oe&&!n(de)),me=f(()=>k.showSupport&&!r()),Ie=f(()=>k.features.saveTraceInfoToFile),ot=()=>{var Se;E.set(!1),(Se=e.returnFocus)==null||Se.call(e)},Me=(Se,Ye)=>{if(!h()||!y())return;let Ue=h().getBoundingClientRect(),xe=y().getBoundingClientRect();O(x,Se-xe.left),O(I,Ye-xe.top),n(x)+Ue.width>xe.width&&O(x,xe.width-Ue.width),n(I)+Ue.height>xe.height&&O(I,xe.height-Ue.height),O(x,Math.max(n(x),0),!0),O(I,Math.max(n(I),0),!0)};Fe(()=>{$t(null,null,function*(){if(h()&&y()){yield _o();let{top:Ye,left:Ue,bottom:xe,right:Ot}=$(),Tt=Ue!=null?Ue:0,qt=Ye!=null?Ye:0,_i=h().getBoundingClientRect();Mu(Ue)&&!Mu(Ot)&&(Tt=Ot-_i.width),Mu(Ye)&&!Mu(xe)&&(qt=xe-_i.height),Tt=Math.max(Tt,0),qt=Math.max(qt,0),Me(Tt,qt)}})});let be=()=>{T.actions.internal.videoRotate()},W=()=>{yy(e.supportLink)&&window.open(e.supportLink,"_blank"),T.actions.internal.reportProblem(),T.actions.internal.pause()},Ce=()=>{let Se=T.actions.internal.getDebugTextData();if(k.features.saveDebugInfoToFile){let Ye=new Blob([...Se],{type:"plain/text"}),Ue=window.URL.createObjectURL(Ye);Ba(Ue,"vk_player_debug_info","txt")}else Nl(T.actions.internal.getDebugTextData())},Ae=()=>{let Se=T.actions.internal.getTraceTextData(),Ye=new Blob([...Se],{type:"application/json"}),Ue=window.URL.createObjectURL(Ye);Ba(Ue,"vk_player_trace_info","json")},Qe=()=>{V.set(!0)},Te=()=>$t(null,null,function*(){var Se;try{z()}finally{(Se=e.returnFocus)==null||Se.call(e)}}),we=()=>{T.actions.internal.setLooped(!u())},He=()=>{var Se,Ye;if(n(pe)){let Ue=(Ye=(Se=T.callbacks)==null?void 0:Se.onCopyEmbedCodeClicked)==null?void 0:Ye.call(Se);Ue&&Nl(Ue)}},st=(Se=!1)=>{var Ye,Ue;if((Ye=T.callbacks)!=null&&Ye.onCopyVideoLink){let xe=(Ue=T.callbacks)==null?void 0:Ue.onCopyVideoLink(Se,m());xe&&Nl(xe)}},ct=f(()=>k.features.saveDebugInfoToFile?L("menu_save_debug"):L("menu_copy_debug")),It=f(()=>n(ze)?{id:"copy-link",weight:Zr["copy-link"],label:L("menu_copy_video_link"),onClick:()=>st()}:void 0),lt=f(()=>n(ue)?{id:"copy-link-timestamp",weight:Zr["copy-link-timestamp"],label:L("menu_copy_video_link_with_timestamp"),onClick:()=>st(!0)}:void 0),ai=f(()=>n(pe)?{id:"copy-embed-code",weight:Zr["copy-embed-code"],label:L("menu_copy_embed_code"),onClick:He}:void 0),St=f(()=>n(Z)?{id:"pip",weight:Zr.pip,label:r()?L("menu_pip_close"):L("menu_pip"),onClick:Te}:void 0),Rt=f(()=>n(B)?{id:"video-loop",weight:Zr["video-loop"],label:u()?L("menu_video_loop_off"):L("menu_video_loop_on"),ariaLabel:L("aria_label_menu_loop"),onClick:we}:void 0),Dt=f(()=>n(fe)?{id:"rotate",weight:Zr.rotate,label:L("menu_video_rotate"),ariaLabel:L("aria_label_menu_rotate"),onClick:be}:void 0),Wt=f(()=>n(me)?{id:"report",weight:Zr.report,label:L("menu_report"),ariaLabel:`${L("menu_report")}. ${L("aria_label_new_tab_alert")}`,onClick:W}:void 0),Le=f(()=>({id:"save-debug",weight:Zr["save-debug"],label:n(ct),onClick:Ce})),Y=f(()=>n(Ie)?{id:"save-trace",weight:Zr["save-trace"],label:L("menu_save_debug"),onClick:Ae}:void 0),Oe=f(()=>({id:"debug-info",weight:Zr["debug-info"],label:L("menu_debug_overlay"),ariaLabel:L("aria_label_menu_debug_overlay"),onClick:Qe})),$e=f(()=>[n(It),n(lt),n(ai),n(St),n(Rt),n(Dt),n(Wt),n(Le),n(Y),n(Oe),...p()].filter(Se=>!!Se).sort(Fa));var Ne=Re(),ft=se(Ne);{var Et=Se=>{var Ye=Sy();Ye.__contextmenu=[wy],Ye.__keydown=[xy,ot],wi(Ye,21,()=>n($e),Ue=>Ue.id,(Ue,xe)=>{zf(Ue,{get id(){return n(xe).id},get label(){return n(xe).label},get ariaLabel(){return n(xe).ariaLabel},get onClick(){return n(xe).onClick},closeContextMenu:ot})}),S(Ye),tt(Ye,Ue=>h(Ue),()=>h()),N(()=>{var Ue,xe;return Ke(Ye,`top: ${(Ue=n(I))!=null?Ue:""}px; left: ${(xe=n(x))!=null?xe:""}px;`)}),b(Se,Ye)};M(ft,Se=>{v()&&Se(Et)})}b(t,Ne),F(),o()}et(["contextmenu","keydown"]);var Vu=class{constructor(e){this.value=e,this.next=null}};var Fl=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Vu(e);this.top?(this.top.next=i,this.top=i):(this.top=i,this.bottom=i),this.size++,this.size>this.maxSize&&this.bottom&&(this.bottom=this.bottom.next)}getValuesFromBottom(){let e=[],i=this.bottom;for(;i;)e.push(i.value),i=i.next;return e}};var Ty=A('<div class="container s-1e"><canvas class="s-1e"></canvas></div>'),Iy={hash:"s-1e",code:".container.s-1e{display:inline-block;height:16px;width:120px}canvas.s-1e{margin-top:2px;transform:scaleY(-1)}"};function Kd(t,e){H(e,!0),Q(t,Iy);let i=g(e,"values",19,()=>[]),o=K(void 0),s=K(null),a=16,l=120,d=60,r=l/d;Lt(()=>{n(o).width=l,n(o).height=a,O(s,n(o).getContext("2d"),!0)});function u(v,$,y,h,x){x===0&&(x=1),v.fillStyle="#fff",v.fillRect($,y,h,x)}Fe(()=>{let v="";if(n(s)){let $=i()[0];for(let h=1;h<i().length;h++)i()[h]>$&&($=i()[h]);n(s).clearRect(0,0,l,a);let y=d-1;for(let h=i().length-1;h>=0;h--){let x=y*r,I=$>0?a*(i()[h]/$):0;u(n(s),x,0,r,I),v=I+" "+v,y--}}});var m=Ty(),p=C(m);tt(p,v=>O(o,v),()=>n(o)),S(m),b(t,m),F()}import{safeStorage as z_}from"@vkontakte/videoplayer-shared/es2015";var Ey=(t,e)=>{t.stopPropagation(),z_.remove(Ad),e.set(!1)},Py=A('<div class="s-k"><div class="s-k">Video id</div> <span> </span></div>'),ky=A('<div class="s-k"><div class="s-k">VSID</div> <span> </span></div>'),Ay=A('<div class="s-k"><div class="s-k">Provider</div> <span> </span></div>'),Ly=A('<div class="s-k"><div class="s-k">Streams</div> <span> </span></div>'),My=A('<div class="s-k"><div class="s-k">Viewport</div> <span> </span></div>'),Vy=A('<div class="s-k"><div class="s-k">Video size</div> <span> </span></div>'),Ry=A('<div class="s-k"><div class="s-k">CDN host</div> <span> </span></div>'),Dy=A('<div class="s-k"><div class="s-k">Volume</div> <span> </span></div>'),Oy=A('<div class="s-k"><div class="s-k">Position</div> <span> </span></div>'),Ny=A('<div class="s-k"><div class="s-k">Buffer</div> <span> </span></div>'),By=A('<div class="s-k"><div class="s-k">Nbuffer</div> <span> </span></div>'),Hy=A('<div class="s-k"><div class="s-k">Live latency</div> <span> </span></div>'),Fy=A('<div class="s-k"><div class="s-k">Segment</div> <span> </span></div>'),Uy=A('<div class="s-k"><div class="s-k">Network</div> <!> <span> </span></div>'),zy=A('<div class="s-k"><div class="s-k">V bitrate</div> <!> <span> </span></div>'),Wy=A('<div role="region"><button class="close s-k" title="закрыть">[x]</button> <div class="content s-k"><div class="s-k"><div class="s-k">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-k"><div class="s-k">Dropped</div> <span> </span></div> <!> <!> <div class="s-k"><div class="s-k">FPS</div> <!> <span> </span></div></div></div>'),Ky={hash:"s-k",code:".container.s-k{background:rgba(28,28,28,.8);border-radius:4px;color:#fff;font-size:10px;left:20px;min-width:160px;position:absolute;text-align:left;top:45px;user-select:text;z-index:var(--debug-panel-z-index)}.container-mobile.s-k{left:16px;top:16px}button.close.s-k{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-k{padding:5px}.content.s-k>div:where(.s-k)>div:where(.s-k){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function qd(t,e){H(e,!0),Q(t,Ky);let[i,o]=Be(),s=()=>w(d,"$isMobile",i),a=ye(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,r=K(si(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),m=K(0),p=K(0),v=K(0),$=new Fl(60),y=new Fl(60),h=new Fl(60),x=K(si([])),I=K(si([])),T=K(si([])),D=G("aria_label_debug_panel");Lt(()=>{z_.set(Ad,"true"),a.actions.internal.startLogging(),u&&(O(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),O(m,u.getVideoPlaybackQuality().totalVideoFrames,!0));let Le=window.setInterval(()=>{O(r,a.actions.internal.getDebugPanelData(),!0)},500),Y;return u&&(Y=window.setInterval(()=>{if(u){O(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let Oe=u.getVideoPlaybackQuality().totalVideoFrames;O(v,Oe-n(m)),O(m,Oe,!0),$.push(n(v)),n(r).speed&&y.push(n(r).speed),n(r).bitrate&&h.push(n(r).bitrate),O(x,$.getValuesFromBottom(),!0),O(I,y.getValuesFromBottom(),!0),O(T,h.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(Le),Y&&clearInterval(Y)}});var k=Wy();let E;var V=C(k);V.__click=[Ey,l];var q=P(V,2),L=C(q),z=P(C(L),2),j=C(z,!0);S(z),S(L);var te=P(L,2);{var ee=Le=>{var Y=Py(),Oe=P(C(Y),2),$e=C(Oe,!0);S(Oe),S(Y),N(()=>ge($e,n(r).id)),b(Le,Y)};M(te,Le=>{n(r).id&&Le(ee)})}var oe=P(te,2);{var ae=Le=>{var Y=ky(),Oe=P(C(Y),2),$e=C(Oe,!0);S(Oe),S(Y),N(()=>ge($e,n(r).vsid)),b(Le,Y)};M(oe,Le=>{n(r).vsid&&Le(ae)})}var le=P(oe,2);{var ce=Le=>{var Y=Ay(),Oe=P(C(Y),2),$e=C(Oe,!0);S(Oe),S(Y),N(()=>ge($e,n(r).provider)),b(Le,Y)};M(le,Le=>{n(r).provider&&Le(ce)})}var X=P(le,2);{var _e=Le=>{var Y=Ly(),Oe=P(C(Y),2),$e=C(Oe);S(Oe),S(Y),N(()=>{var Ne,ft;return ge($e,`Video: ${(Ne=n(r).videoCodec||"")!=null?Ne:""} ${n(r).hdr?"(HDR)":""}
|
|
55
55
|
&
|
|
56
|
-
Audio: ${(Ie=n(r).audioCodec||"")!=null?Ie:""} ${n(r).audioLanguage?`(${n(r).audioLanguage})`:""}`)}),$(Te,G)};M(ee,Te=>{(n(r).videoCodec||n(r).audioCodec)&&Te($e)})}var Ee=k(ee,2);{var ce=Te=>{var G=M0(),Ne=k(C(G),2),be=C(Ne,!0);S(Ne),S(G),O(()=>he(be,n(r).viewport)),$(Te,G)};M(Ee,Te=>{n(r).viewport&&Te(ce)})}var Qe=k(Ee,2);{var fe=Te=>{var G=V0(),Ne=k(C(G),2),be=C(Ne,!0);S(Ne),S(G),O(()=>he(be,n(r).videoSize)),$(Te,G)};M(Qe,Te=>{n(r).videoSize&&Te(fe)})}var ve=k(Qe,2);{var X=Te=>{var G=R0(),Ne=k(C(G),2),be=C(Ne,!0);S(Ne),S(G),O(()=>he(be,n(r).cdn)),$(Te,G)};M(ve,Te=>{n(r).cdn&&Te(X)})}var N=k(ve,2);{var me=Te=>{var G=D0(),Ne=k(C(G),2),be=C(Ne);S(Ne),S(G),O(()=>{var Oe;return he(be,`${(Oe=n(r).volume)!=null?Oe:""} %`)}),$(Te,G)};M(N,Te=>{n(r).volume&&Te(me)})}var ue=k(N,2);{var Re=Te=>{var G=O0(),Ne=k(C(G),2),be=C(Ne);S(Ne),S(G),O(Oe=>he(be,`${Oe!=null?Oe:""} s`),[()=>n(r).position.toFixed(2)]),$(Te,G)};M(ue,Te=>{n(r).position&&Te(Re)})}var Je=k(ue,2);{var Ae=Te=>{var G=N0(),Ne=k(C(G),2),be=C(Ne);S(Ne),S(G),O(Oe=>he(be,`${Oe!=null?Oe:""} s`),[()=>n(r).buffer.toFixed(2)]),$(Te,G)};M(Je,Te=>{n(r).buffer&&Te(Ae)})}var j=k(Je,2);{var ne=Te=>{var G=B0(),Ne=k(C(G),2),be=C(Ne);S(Ne),S(G),O(Oe=>he(be,`${Oe!=null?Oe:""} s`),[()=>n(r).nativeBuffer.toFixed(2)]),$(Te,G)};M(j,Te=>{n(r).nativeBuffer&&Te(ne)})}var Se=k(j,2);{var Le=Te=>{var G=F0(),Ne=k(C(G),2),be=C(Ne);S(Ne),S(G),O(Oe=>he(be,`${Oe!=null?Oe:""} s`),[()=>n(r).liveLatency.toFixed(2)]),$(Te,G)};M(Se,Te=>{n(r).liveLatency&&Te(Le)})}var ze=k(Se,2);{var Ce=Te=>{var G=H0(),Ne=k(C(G),2),be=C(Ne,!0);S(Ne),S(G),O(Oe=>he(be,Oe),[()=>[{value:n(r).currentVideoSegmentLength,title:"Video:"},{value:n(r).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Oe})=>Oe).map(({value:Oe,title:Ie})=>`${Ie} ${((Oe!=null?Oe:0)/1e3).toFixed(2)} s`).join(" & ")]),$(Te,G)};M(ze,Te=>{(n(r).currentVideoSegmentLength||n(r).currentAudioSegmentLength)&&Te(Ce)})}var we=k(ze,2),He=k(C(we),2),rt=C(He);S(He),S(we);var ct=k(we,2);{var Mt=Te=>{var G=U0(),Ne=k(C(G),2);Wd(Ne,{get values(){return n(I)}});var be=k(Ne,2),Oe=C(be);S(be),S(G),O(Ie=>he(Oe,`${Ie!=null?Ie:""} Kbps`),[()=>n(r).speed.toFixed(2)]),$(Te,G)};M(ct,Te=>{n(r).speed&&Te(Mt)})}var lt=k(ct,2);{var ni=Te=>{var G=z0(),Ne=k(C(G),2);Wd(Ne,{get values(){return n(T)}});var be=k(Ne,2),Oe=C(be);S(be),S(G),O(Ie=>he(Oe,`${Ie!=null?Ie:""} Kbps`),[()=>n(r).bitrate.toFixed(2)]),$(Te,G)};M(lt,Te=>{n(r).bitrate&&Te(ni)})}var wt=k(lt,2),Rt=k(C(wt),2);Wd(Rt,{get values(){return n(w)}});var Dt=k(Rt,2),Qt=C(Dt,!0);S(Dt),S(wt),S(z),S(A),O(Te=>{var G,Ne;P=ie(A,1,"container s-k",null,P,Te),De(A,"aria-label",R),he(Y,n(r).version),he(rt,`${(G=n(p))!=null?G:""} / ${(Ne=n(f))!=null?Ne:""} frames`),he(Qt,n(v))},[()=>({"container-mobile":s()})]),$(t,A),F(),o()}Ze(["click"]);import{noop as Q0}from"@vkontakte/videoplayer-shared/es2015";var q0=(t,e)=>{t.stopPropagation(),e()()},G0=L('<div class="close s-1e"></div>'),Y0={hash:"s-1e",code:'.close.s-1e{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-1e:hover{opacity:1}.close.s-1e:after,.close.s-1e:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-1e:before{transform:rotate(45deg)}.close.s-1e:after{transform:rotate(-45deg)}'};function Hs(t,e){B(e,!0),Q(t,Y0);let i=g(e,"onClick",3,Q0);var o=G0();o.__click=[q0,i],$(t,o),F()}Ze(["click"]);import{noop as X0}from"@vkontakte/videoplayer-shared/es2015";var dn=t=>`width:${t}px;height:${t}px;`;var j0=ke('<path d="m14.4 8.76 24.02 13.85a1.6 1.6 0 0 1 0 2.78L14.4 39.24a1.6 1.6 0 0 1-2.4-1.39v-27.7a1.6 1.6 0 0 1 2.4-1.39"></path>');function Rn(t,e){B(e,!0);let i=m(()=>dn(e.size));je(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"play-icon",get shadow(){return e.shadow},children:(o,s)=>{var a=j0();$(o,a)},$$slots:{default:!0}}),F()}var Z0=L('<div class="timer s-1c"><canvas class="timer-canvas s-1c" width="100" height="100"></canvas> <!></div>'),J0={hash:"s-1c",code:".timer.s-1c{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-1c:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-1c{height:50px;position:absolute;width:50px}"};function Qd(t,e){B(e,!0),Q(t,J0);let i=g(e,"isRunning",3,!0),o=g(e,"onTimerEnded",3,X0),s=5e3,a=K(void 0),l,d,r=0,u;Fe(()=>{i()&&Et(()=>{d=Date.now(),r=requestAnimationFrame(p)})});let f=()=>{r&&(cancelAnimationFrame(r),r=0)},p=()=>{f(),i()&&(u=(Date.now()-d)/s,u<1?(l==null||l.clearRect(0,0,100,100),l==null||l.beginPath(),l==null||l.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*u),l==null||l.stroke(),r=requestAnimationFrame(p)):o()())};At(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),ln(()=>{f()});var v=Z0(),b=C(v);it(b,_=>D(a,_),()=>n(a));var y=k(b,2);Rn(y,{get size(){return"24"}}),S(v),$(t,v),F()}var ey=(t,e,i)=>{e(!1),i()},ty=L('<div class="overlay s-o"></div> <div class="next-video s-o"><div class="top s-o"><div class="caption s-o"> </div> <!></div> <div class="row s-o"><div class="column s-o"><div class="thumb s-o"><div></div> <!></div></div> <div class="column s-o"><div class="title s-o"> </div></div></div></div>',1),iy={hash:"s-o",code:".overlay.s-o{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-o{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-o{display:flex;justify-content:space-between}.caption.s-o{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-o{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-o{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-o{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-o,.thumb-overlay.s-o{height:100%;width:100%}.thumb-overlay.s-o{position:absolute}.thumb-overlay.withOpacity.s-o{background:var(--black);opacity:.3}.title.s-o{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Kf(t,e){B(e,!0),Q(t,iy);let[i,o]=Be(),s=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(r,"$timerNextVideoRunning$",i),l=xe(),d=l.ui.autoplayNextEnabled$,r=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,f=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,b=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{s()&&(u(!1),v())},_=()=>{e.clickCloseIcon(),b()};At(()=>{e.isHide||f(),e.isHide&&s()&&(u(!1),v())});var w=Ve(),I=le(w);{var T=R=>{var A=ty(),P=k(le(A),2),E=C(P),z=C(E),U=C(z,!0);S(z);var W=k(z,2);Hs(W,{onClick:_}),S(E);var Y=k(E,2);Y.__click=[ey,u,p];var te=C(Y),J=C(te),oe=C(J);let de;var ae=k(oe,2);{var pe=ce=>{let Qe=m(()=>a()&&s());Qd(ce,{get isRunning(){return n(Qe)},onTimerEnded:y})};M(ae,ce=>{s()&&ce(pe)})}S(J),S(te);var ee=k(te,2),$e=C(ee),Ee=C($e,!0);S($e),S(ee),S(Y),S(P),O((ce,Qe)=>{he(U,ce),Ke(J,`background-image: url('${e.thumb}')`),de=ie(oe,1,"thumb-overlay s-o",null,de,Qe),he(Ee,e.title)},[()=>q("end_screen_next_video"),()=>({withOpacity:s()})]),$(R,A)};M(I,R=>{e.isHide||R(T)})}$(t,w),F(),o()}Ze(["click"]);import{PlaybackState as za}from"@vkontakte/videoplayer-core/es2015";import{checkNever as ny}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Xn}from"@vkontakte/videoplayer-statistics/es2015";var Qf=(t,e)=>Math.min(+(t+e).toFixed(2),1),qf=(t,e)=>Math.max(+(t-e).toFixed(2),0),Ru=(t,e,i)=>{let o=Qf(e,i);e<1&&t.actions.internal.setVolume(o)},Du=(t,e,i)=>{let o=qf(e,i);e>0&&t.actions.internal.setVolume(o)};var ma=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:s})=>t?i?!0:(o==null||o(),!1):e?!0:(s==null||s(),!1);function Ou(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var ry=(t,e)=>{e(t)},sy=L('<div class="keyboard-controls s-m" tabindex="-1" role="region"><!></div>'),ay={hash:"s-m",code:".keyboard-controls.s-m{bottom:0;left:0;position:absolute;right:0;top:0}"};function Gf(t,e){var be,Oe;B(e,!0),Q(t,ay);let[i,o]=Be(),s=()=>x(ae,"$disabledControls$",i),a=()=>x(Ae,"$isInteractiveTime$",i),l=()=>x(j,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>x(W,"$playbackState$",i),r=()=>x(X,"$isEnded$",i),u=()=>x(fe,"$doubleForwardAvailable$",i),f=()=>x(Qe,"$doubleForwardOn$",i),p=()=>x(N,"$overlayContainer$",i),v=()=>x(te,"$adPlaybackState",i),b=()=>x(J,"$positionExact$",i),y=()=>x(oe,"$duration$",i),_=()=>x(Re,"$isAudioAvailable$",i),w=()=>x(de,"$volume$",i),I=()=>x(Y,"$canChangePlaybackSpeed$",i),T=()=>x(pe,"$muted$",i),R=()=>x(ee,"$currentSubtitle$",i),A=g(e,"nextButtonActive",3,!1),P=g(e,"prevButtonActive",3,!1),E=xe(),z=Lt(),U=E.getLogger().createComponentLog("KeyboardControls component"),W=E.state.playbackState$,Y=E.state.canChangePlaybackSpeed$,te=E.ads.playbackState,J=E.state.positionExact$,oe=E.state.duration$,de=E.state.volume$,ae=E.ui.controls.disabledControls$,pe=E.state.muted$,ee=E.state.currentSubtitle$,$e=E.ui.contextMenu.openedByHotKey$,Ee=E.ui.contextMenu.lastActiveElem$,ce=E.ui.contextMenu.visible$,Qe=E.ui.doubleForwardOn$,fe=E.ui.doubleForwardAvailable$,ve=E.ui.contextMenu.position$,X=E.state.isEnded$,N=E.ui.overlayContainer$,me=(be=E.callbacks)==null?void 0:be.onAudioDoesNotExistHint,ue=(Oe=E.callbacks)==null?void 0:Oe.onAudioDisabledHint,Re=E.state.isAudioAvailable$,Je=E.state.isAudioDisabled,Ae=E.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:j}=_o(),ne=0,Se=!0,Le=K(void 0),ze=Ie=>(Ie!==Se&&(Se=Ie,ne=0),ne+=1,(z.controls.seekStepKeyboard+z.controls.seekStepKeyboard*ne)/1e3),Ce=!0,we=()=>{if(!s().has("PLAY_BUTTON"))if(a()&&l()&&j.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{E.actions.internal.togglePlay();let Ie="PLAY";d()===za.PAUSED?Ie="PAUSE":r()&&(Ie="REPLAY"),e.showHotKeyHelpers({type:Ie})}},He=Ie=>{if(!u()||!Ie&&f()){we(),e.stopDoubleForward(),Ce=!0;return}Ce=!1,!Ie&&e.startDoubleForwardActivationTimer()},rt=()=>{Ce||(f()||we(),e.stopDoubleForward(),Ce=!0)},ct=Ie=>{Ie!=="Space"&&e.stopDoubleForward()},Mt=Ie=>{let ht=H_(p());ve.set(ht),Ee.set(Ie.target),$e.set(!0),ce.set(!0)},lt=(Ie,ht=!1)=>{var di,Xi;let ye=Ie.target,qe=(di=ye==null?void 0:ye.getAttribute("role"))==null?void 0:di.includes("menuitem"),Ue=ye.classList.contains("btn"),st=Ie.code;if(Ue&&st==="Space")return!1;let qt=Fh.has(st);if(qe&&qt)return!1;let Pt=!Bh.has(st);if(Ie.ctrlKey&&Pt||Ie.altKey&&Pt||Ie.metaKey)return!1;let Yt=qe&&st==="Escape";Hh.has(st)||Yt||e.hideContextMenu();let bi=d()===za.PLAYING||d()===za.PAUSED,Vi=e.isAds&&(v()==="paused"||v()==="playing"),Ai=!Vi&&!s().has("TIMELINE"),ji=Ie.shiftKey&&["Digit1","Numpad1"].includes(st);if(!ji&&!(bi||Vi))return!1;U({message:`key down, code: ${st}, isExternal = ${ht}`});let si=!1,ut=()=>{si=!0,ht||Ie.preventDefault()};if(ct(st),ji)return Mt(Ie),ut(),!0;switch(st){case"KeyJ":case"ArrowLeft":{if(!Ai)break;if(Ie.ctrlKey||Ie.altKey){let It=E.actions.internal.getPrevEpisode();E.actions.internal.seekToPrevEpisode(It),It&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:It.text}),ut()}else{let It=Ie.shiftKey?ze(!1):z.controls.seekStepKeyboard/1e3,hi=Math.max(b()-It,0);b()>0&&(E.actions.internal.seekTime(hi,Xn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:It.toString()}),ut())}break}case"KeyL":case"ArrowRight":{if(!Ai)break;if(Ie.ctrlKey||Ie.altKey){let It=E.actions.internal.getNextEpisode();E.actions.internal.seekToNextEpisode(It),It&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:It.text}),ut()}else{let It=Ie.shiftKey?ze(!0):z.controls.seekStepKeyboard/1e3,hi=Math.min(b()+It,y());Math.round(b())<Math.round(y())&&(E.actions.internal.seekTime(hi,Xn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:It.toString()}),ut())}break}case"ArrowUp":{if(ma({isAudioDisabled:Je,audioDisabledHintCallback:ue,isAudioAvailable:_(),audioIsNotExistHintCallback:me,isAds:e.isAds})){let It=w(),hi=z.controls.volumeStepKeyboard,ui=It<=1;if(Ru(E,It,hi),ui){let We=Math.round(Qf(It,hi)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:We}})}}ut();break}case"ArrowDown":{if(ma({isAudioDisabled:Je,audioDisabledHintCallback:ue,isAudioAvailable:_(),audioIsNotExistHintCallback:me,isAds:e.isAds})){let It=w(),hi=z.controls.volumeStepKeyboard,ui=It>=0;if(Du(E,It,hi),ui){let We=Math.round(qf(It,hi)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:We}})}}ut();break}case"Comma":{if(Ie.shiftKey){if(!f()&&I()){let It=E.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:It==null?void 0:It.displayValue}),ut()}}else{if(Vi||d()!==za.PAUSED)break;let It=Math.max(b()-z.controls.seekStepFrame/1e3,0);b()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),E.actions.internal.clearDelayedBufferingCheckTimeout(),E.actions.internal.seekTime(It,Xn.DOUBLE_TAP),ut())}break}case"Period":{if(Ie.shiftKey){if(!f()&&I()){let It=E.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:It==null?void 0:It.displayValue}),ut()}}else{if(Vi||d()!==za.PAUSED)break;let It=Math.min(b()+z.controls.seekStepFrame/1e3,y());b()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),E.actions.internal.clearDelayedBufferingCheckTimeout(),E.actions.internal.seekTime(It,Xn.DOUBLE_TAP),ut())}break}case"KeyK":we(),ut();break;case"Space":He(Ie.repeat),ut();break;case"KeyM":{ma({isAudioDisabled:Je,audioDisabledHintCallback:ue,isAudioAvailable:_(),audioIsNotExistHintCallback:me,isAds:e.isAds})&&(e.showHotKeyHelpers({type:T()?"VOLUME":"MUTE"}),E.actions.internal.toggleMuted()),ut();break}case"KeyF":e.toggleFullscreen(),ut();break;case"KeyC":E.actions.internal.toggleSubtitle(),R().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(Xi=R())==null?void 0:Xi.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),ut();break;case"KeyI":E.actions.internal.togglePictureInPicture(),ut();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.1,Xn.DOUBLE_TAP),ut();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.2,Xn.DOUBLE_TAP),ut();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.3,Xn.DOUBLE_TAP),ut();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.4,Xn.DOUBLE_TAP),ut();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.5,Xn.DOUBLE_TAP),ut();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.6,Xn.DOUBLE_TAP),ut();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.7,Xn.DOUBLE_TAP),ut();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.8,Xn.DOUBLE_TAP),ut();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.9,Xn.DOUBLE_TAP),ut();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(0,Xn.DOUBLE_TAP),ut();break;case"Slash":{Ie.shiftKey&&z.features.hotKeyMapModal&&(e.showKeyMap(),ut());break}case"KeyN":Ie.shiftKey&&A()&&(E.actions.internal.nextVideoClick(),ut());break;case"KeyP":Ie.shiftKey&&P()&&(E.actions.internal.prevVideoClick(),ut());break;case"ShiftLeft":case"ShiftRight":ut();break;case"Tab":case"Escape":case"Enter":break;default:ny(st);break}return si},ni=Ie=>{let ht=Ie.code;if(Ie.ctrlKey||Ie.altKey||Ie.metaKey)return;let ye=d()===za.PLAYING||d()===za.PAUSED,qe=e.isAds&&(v()==="paused"||v()==="playing");if(ye||qe)switch(ht){case"ShiftLeft":case"ShiftRight":ne=0;break;case"Space":rt();break}},wt=q("aria_label_video_player"),Rt=()=>{var Ie;return(Ie=n(Le))==null?void 0:Ie.focus()},Dt=()=>n(Le)===Ou(),Qt=Ie=>Ie.type==="keydown"?lt(Ie,!0):(Ie.type==="keyup"&&ni(Ie),!1);var Te=sy();Te.__keyup=ni,Te.__keydown=[ry,lt];var G=C(Te);ei(G,()=>{var Ie;return(Ie=e.children)!=null?Ie:$t}),S(Te),it(Te,Ie=>D(Le,Ie),()=>n(Le)),O(()=>De(Te,"aria-label",wt)),$(t,Te);var Ne=F({focus:Rt,isFocused:Dt,handleExternalKeyboardEvent:Qt});return o(),Ne}Ze(["keyup","keydown"]);var ly=L('<div class="container s-l"><div class="dot s-l"></div> <div class="dot s-l"></div> <div class="dot s-l"></div></div>'),dy={hash:"s-l",code:".container.s-l{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-l:first-child{animation-delay:0s}.dot.s-l:nth-child(2){animation-delay:.18s}.dot.s-l:nth-child(3){animation-delay:.36s}@keyframes s-l-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-l{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-l-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-l+.dot:where(.s-l){margin-left:4px}"};function Wa(t,e){Q(t,dy);let i=g(e,"style",3,"");var o=ly();O(()=>Ke(o,i())),$(t,o)}var cy=ke('<path d="M5.26 5.26a.9.9 0 0 1 1.28 0L12 10.73l5.46-5.47a.9.9 0 0 1 1.28 1.28L13.27 12l5.47 5.46a.9.9 0 1 1-1.28 1.28L12 13.27l-5.46 5.47a.9.9 0 1 1-1.28-1.28L10.73 12 5.26 6.54a.9.9 0 0 1 0-1.28Z"></path>');function Yf(t,e){je(t,{get fill(){return e.fill},children:(i,o)=>{var s=cy();$(i,s)},$$slots:{default:!0}})}import{noop as Bl}from"@vkontakte/videoplayer-shared/es2015";var uy=t=>{t.stopPropagation()},py=L("<button><!></button>"),fy={hash:"s-1k",code:"button.btn.s-1k{align-items:center;display:flex;flex-direction:row;height:var(--controls-height);justify-content:center;margin:0;padding:8px;will-change:opacity}button.w-max.s-1k{width:100%}button.btn--live.s-1k{padding:10px 4px}button.btn-jc-l.s-1k{justify-content:left}button.btn-m.s-1k{background-color:rgba(0,0,0,.56);border-radius:12px;height:44px;left:12px;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}button.btn-m.s-1k,button.btn-m--play.s-1k{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1k{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1k,button.btn-m--prev.s-1k{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1k{right:calc(100% + 35px)}button.btn-m--next.s-1k{left:calc(100% + 35px)}button.btn.s-1k:disabled{cursor:default;pointer-events:none}button.btn.s-1k:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1k:not(:disabled):hover{opacity:.8}button.pr-0.s-1k{padding-right:0}button.pl-0.s-1k{padding-left:0}"};function Ft(t,e){B(e,!0),Q(t,fy);let i=g(e,"className",3,""),o=g(e,"style",3,""),s=g(e,"disabled",3,void 0),a=g(e,"testId",3,void 0),l=g(e,"ariaHidden",3,void 0),d=g(e,"ariaLabel",3,void 0),r=g(e,"ref",15,void 0),u=g(e,"ariaKeyShortCut",3,void 0),f=g(e,"ariaExpanded",3,void 0),p=g(e,"tabIndex",3,0),v=g(e,"click",3,Bl),b=g(e,"focus",3,Bl),y=g(e,"blur",3,Bl),_=m(()=>v()===Bl?null:A=>{A.stopPropagation(),v()(A)}),w=m(()=>b()===Bl?null:A=>{A.preventDefault(),b()()}),I=m(()=>y()===Bl?null:A=>{A.preventDefault(),y()()});var T=py();T.__pointerdown=[uy],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:$t}),S(T),it(T,A=>r(A),()=>r()),O(()=>{var A,P,E,z,U,W,Y,te;ie(T,1,`btn ${(A=i())!=null?A:""}`,"s-1k"),Ke(T,o()||null),T.disabled=(P=s())!=null?P:null,De(T,"aria-hidden",(E=l())!=null?E:null),De(T,"aria-label",(z=d())!=null?z:null),De(T,"aria-keyshortcuts",(U=u())!=null?U:null),De(T,"aria-expanded",(W=f())!=null?W:null),De(T,"data-testid",(Y=a())!=null?Y:null),De(T,"tabindex",p()),De(T,"role",e.role),De(T,"aria-checked",(te=e.areaChecked)!=null?te:null)}),ft("focus",T,function(...A){var P;(P=n(w))==null||P.apply(this,A)}),ft("blur",T,function(...A){var P;(P=n(I))==null||P.apply(this,A)}),$(t,T),F()}Ze(["pointerdown","click"]);var my=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},vy=L('<div class="modal-header s-15"><h3 class="modal-title s-15"> </h3> <!></div>'),gy=L('<div class="modal-overlay s-15"><div class="modal-container s-15" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-15" tabindex="0" role="scrollbar"><div class="modal-main s-15"><!></div></div></div></div>'),hy={hash:"s-15",code:'.modal-overlay.s-15{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-15{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-15{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-15{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-15{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-15::-webkit-scrollbar{width:8px}.modal-scroll.s-15::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-15::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-15::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-15{margin:-8px -4px 0 0}'};function jf(t,e){B(e,!0),Q(t,hy);let i=g(e,"showHeader",3,!0),o=g(e,"showCloseCross",3,!0),s=K(void 0),a=K(void 0),{webApi:{focusManager:l}}=xe(),d=q("hotkey_map_modal_close_btn_text");At(()=>{var _;return(_=n(s))==null||_.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var r=gy();r.__keydown=[my,e];var u=C(r),f=C(u);{var p=_=>{var w=vy(),I=C(w),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)=>{Yf(E,{fill:"currentColor"})},$$slots:{default:!0}})};M(R,P=>{o()&&P(A)})}S(w),O(()=>he(T,e.title)),$(_,w)};M(f,_=>{i()&&_(p)})}var v=k(f,2),b=C(v),y=C(b);ei(y,()=>{var _;return(_=e.children)!=null?_:$t}),S(b),S(v),it(v,_=>D(s,_),()=>n(s)),S(u),it(u,_=>D(a,_),()=>n(a)),S(r),$(t,r),F()}Ze(["keydown"]);var _y=new Set(["BR"]),W_=t=>{var s;let e=document.createElement("DIV");e.innerHTML=t;let i=e.querySelectorAll("*"),o=i.length;for(;o--;){let a=i[o],l=a.tagName;_y.has(l)||(s=a.parentElement)==null||s.removeChild(a)}return e.innerHTML};var by=L('<li class="hot-key-map-item s-p"><span class="hot-key-map-item-description s-p"><!></span> <span class="hot-key-map-item-value s-p"> </span></li>'),$y=L('<div class="hot-key-map-group s-p"><h5 class="hot-key-map-group-title s-p"> </h5> <ul class="hot-key-map-group-items s-p"></ul></div>'),yy=L('<div class="hot-key-map s-p"></div>'),xy={hash:"s-p",code:'.hot-key-map.s-p{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-p{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-p:last-child{border-bottom:none}.hot-key-map-group-title.s-p{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-p,.hot-key-map-item.s-p{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-p{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-p{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-p{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-p{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-p,.hot-key-map-item-value.s-p{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function Xf(t,e){B(e,!1),Q(t,xy);let[i,o]=Be(),s=()=>x(l,"$data",i),a=xe(),{data:l,show:d}=a.ui.modals.hotKeyMap,r=()=>{d.set(!1)};Yo(),jf(t,{get title(){return s().title},onClose:r,children:(u,f)=>{var p=yy();yi(p,5,()=>s().groups,({title:v,items:b})=>v,(v,b)=>{let y=()=>n(b).title,_=()=>n(b).items;var w=$y(),I=C(w),T=C(I,!0);S(I);var R=k(I,2);yi(R,5,_,({description:A,value:P})=>P,(A,P)=>{let E=()=>n(P).description,z=()=>n(P).value;var U=by(),W=C(U),Y=C(W);Cd(Y,()=>W_(E())),S(W);var te=k(W,2),J=C(te,!0);S(te),S(U),O(()=>he(J,z())),$(A,U)}),S(R),S(w),O(()=>he(T,y())),$(v,w)}),S(p),$(u,p)},$$slots:{default:!0}}),F(),o()}import{noop as Tb}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as $b,PlaybackState as Gm}from"@vkontakte/videoplayer-core/es2015";import{getVideoQualityLabel as Ly}from"@vkontakte/videoplayer-shared/es2015";var wy=L('<div class="pillow s-1x"><!></div>'),Sy={hash:"s-1x",code:".pillow.s-1x{background-color:#679ff8;color:var(--white);font-size:6px;font-weight:600;-webkit-font-smoothing:antialiased;border-radius:12px;padding:2px 4px}"};function Zf(t,e){Q(t,Sy);var i=wy(),o=C(i);ei(o,()=>{var s;return(s=e.children)!=null?s:$t}),S(i),O(()=>De(i,"data-testid",e.testId)),$(t,i)}import{VideoQuality as qd}from"@vkontakte/videoplayer-shared/es2015";var Cy=ke('<svg><!><path d="M5.52 5c.32 0 .51-.2.51-.54V3.5l.5-.51 1.46 1.74c.16.2.3.28.51.28a.5.5 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.3 2.3 8.8.87c.16-.14.2-.25.2-.4A.47.47 0 0 0 8.52 0c-.18 0-.3.07-.45.22l-2 2.03h-.04V.54C6.03.2 5.84 0 5.52 0S5 .2 5 .54v3.92c0 .34.2.54.52.54M2.55 1.05 1.05 3.1h1.5zM3.5 3.1V.83C3.5.03 2.41-.3 1.94.35L.14 2.82A.75.75 0 0 0 .75 4h1.8v.55c0 .25.25.45.5.45a.45.45 0 0 0 .45-.45V4h.05a.45.45 0 0 0 0-.9z"></path></svg>');function Jf(t,e){let i=Vn(e,["$$slots","$$events","$$legacy","children"]);var o=Cy();oo(o,()=>Ye({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:$t}),Xt(),S(o),$(t,o)}var Ty=ke('<svg><!><path d="M5.51 5c.33 0 .52-.2.52-.54V3.5l.49-.51L7.99 4.7c.16.21.3.29.51.29a.49.49 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.29 2.3 8.82.87C8.95.73 9 .62 9 .47A.47.47 0 0 0 8.52 0c-.17 0-.3.07-.44.22L6.06 2.25h-.03V.54C6.03.2 5.83 0 5.5 0S5 .2 5 .54v3.92c0 .34.19.54.51.54M2 0c-.35 0-.67.06-.95.17a1.5 1.5 0 0 0-.66.49c-.15.2-.23.44-.23.7 0 .43.21.76.62 1-.23.11-.41.26-.55.44-.15.2-.23.44-.23.71 0 .29.08.55.25.78.18.23.41.4.71.52.3.13.65.19 1.04.19s.73-.06 1.03-.19c.3-.12.54-.3.71-.52a1.26 1.26 0 0 0 .03-1.49 1.45 1.45 0 0 0-.55-.44c.4-.23.62-.57.62-1a1.14 1.14 0 0 0-.24-.7 1.44 1.44 0 0 0-.66-.49A2.4 2.4 0 0 0 2 0m-.57.96C1.56.86 1.75.8 2 .8s.43.06.56.16a.51.51 0 0 1 .2.43c0 .2-.06.34-.2.44A.87.87 0 0 1 2 2a.9.9 0 0 1-.57-.16.52.52 0 0 1-.2-.44c0-.18.06-.32.2-.43ZM1.08 3.5a.6.6 0 0 1 .24-.5c.16-.13.38-.2.68-.2s.52.07.68.2a.6.6 0 0 1 .24.5.63.63 0 0 1-.24.52c-.16.12-.38.19-.68.19s-.52-.07-.68-.19a.64.64 0 0 1-.24-.52"></path></svg>');function em(t,e){let i=Vn(e,["$$slots","$$events","$$legacy","children"]);var o=Ty();oo(o,()=>Ye({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:$t}),Xt(),S(o),$(t,o)}var Iy=ke('<svg><!><path d="M5.52 5h1.1C8.1 5 9 4.07 9 2.5S8.1 0 6.62 0h-1.1C5.19 0 5 .2 5 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47C7.41.85 8 1.47 8 2.5c0 1.07-.58 1.65-1.5 1.65zM.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S4 4.8 4 4.46V.54C4 .2 3.8 0 3.48 0s-.51.2-.51.54v1.53H1.03V.54C1.03.2.84 0 .52 0S0 .2 0 .54v3.99c0 .34.2.47.52.47"></path></svg>');function tm(t,e){let i=Vn(e,["$$slots","$$events","$$legacy","children"]);var o=Iy();oo(o,()=>Ye({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:$t}),Xt(),S(o),$(t,o)}var Ey=ke('<svg><!><path d="M9.52 5h1.1C12.1 5 13 4.07 13 2.5S12.1 0 10.62 0h-1.1C9.19 0 9 .2 9 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zM4.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S8 4.8 8 4.46V.54C8 .2 7.8 0 7.48 0s-.51.2-.51.54v1.53H5.03V.54C5.03.2 4.84 0 4.52 0S4 .2 4 .54v3.99c0 .34.2.47.52.47m-4 0c.32 0 .51-.2.51-.54V3h1.33c.27 0 .45-.15.45-.41 0-.25-.18-.4-.45-.4H1.03V.84h1.5C2.81.85 3 .7 3 .43S2.8 0 2.53 0H.52C.19 0 0 .2 0 .54v3.92C0 4.8.2 5 .52 5"></path></svg>');function im(t,e){let i=Vn(e,["$$slots","$$events","$$legacy","children"]);var o=Ey();oo(o,()=>Ye({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:$t}),Xt(),S(o),$(t,o)}var Py=ke('<svg><!><path d="M11.52 5.75h1.1c1.48 0 2.38-.94 2.38-2.5s-.9-2.5-2.38-2.5h-1.1c-.33 0-.52.2-.52.54V5.2c0 .34.2.54.52.54Zm.51-.85V1.6h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zm-5.51.85c.32 0 .51-.2.51-.54V3.67h1.94v1.54c0 .34.19.54.51.54s.52-.2.52-.54V1.3c0-.34-.2-.54-.52-.54s-.51.2-.51.54v1.53H7.03V1.3c0-.34-.19-.54-.51-.54S6 .95 6 1.29v3.99c0 .34.2.47.52.47m-3.18-.09a4 4 0 0 1-.84.09C1.04 5.75 0 4.88 0 3.3 0 1.73 1.04.75 2.5.75S5 1.73 5 3.3c0 .87-.27 1.46-.78 1.88l.2.3a.5.5 0 0 1-.84.55zm-.52-.78-.24-.35a.5.5 0 1 1 .84-.56l.24.37c.18-.26.29-.62.29-1.04 0-1.03-.64-1.65-1.45-1.65s-1.45.62-1.45 1.65.64 1.6 1.45 1.6c.08 0 .2 0 .32-.02"></path></svg>');function om(t,e){let i=Vn(e,["$$slots","$$events","$$legacy","children"]);var o=Py();oo(o,()=>Ye({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:$t}),Xt(),S(o),$(t,o)}var Nu=t=>{switch(t){case qd.Q_720P:return tm;case qd.Q_1080P:return im;case qd.Q_1440P:return om;case qd.Q_2160P:return Jf;case qd.Q_4320P:return em}};var ky=ke('<path d="M12.72 2.21q1.8.07 2.41 1.96l.06.21.06.2.06.23.06.16.04.01.06-.02.14-.05.15-.07c1.42-.66 2.5-.53 3.4.44l.12.14.82 1.02c.73.96.7 2 0 3.1l-.13.19-.12.16-.14.2-.07.12-.04.05v.03l.1.06.13.07.15.09c1.39.7 1.96 1.64 1.74 2.93l-.04.19-.24 1.06c-.16.68-.28 1-.77 1.45-.48.43-1.02.61-1.73.67l-.22.02h-.2l-.25.02-.18.02.02.14v.1l.04.17c.32 1.53-.04 2.56-1.19 3.2l-.17.1-1.17.57q-1.64.73-3.02-.7l-.15-.17-.13-.15-.17-.19-.1-.1-.05-.04-.1.09-.1.1-.12.14c-.95 1.13-1.95 1.54-3.17 1.07l-.18-.08-1.05-.5-.31-.17a2 2 0 0 1-1-1.06 3 3 0 0 1-.16-1.88l.04-.23.04-.24.02-.17-.1-.02-.15-.01h-.18c-1.56-.04-2.48-.62-2.85-1.89l-.05-.18-.3-1.28q-.33-1.77 1.37-2.78l.2-.11.17-.1.22-.12.15-.1v-.02l-.06-.1-.08-.13-.1-.14c-.94-1.25-1.04-2.34-.28-3.4L4 6.32l.82-1.01c.8-.92 1.8-1.1 3.04-.64l.2.08.19.08.22.1.13.04.04-.01.03-.1.05-.13.04-.17c.36-1.43 1.09-2.24 2.4-2.35h1.58Zm-.05 1.8h-1.34l-.14.01c-.28.04-.47.2-.65.83l-.04.16-.06.2a6 6 0 0 1-.46 1.14 6 6 0 0 0-1.15.56 7 7 0 0 1-1.16-.35l-.35-.16q-.37-.15-.59-.17h-.08a.6.6 0 0 0-.4.19l-.08.07-.78.98-.1.12c-.18.26-.2.5.2 1.08l.22.31q.34.48.6 1.1-.2.59-.27 1.2-.51.45-1.01.73l-.34.18c-.62.34-.7.56-.65.88l.01.08.28 1.21.04.16c.1.3.27.47.97.5l.39.02q.57.03 1.22.2.35.53.78.97a6 6 0 0 1-.12 1.45c-.2.95-.01 1.1.38 1.3l1.13.54a1 1 0 0 0 .34.1l.06-.01q.26-.03.67-.49l.26-.3q.4-.42.95-.83l.3.02.3.01h.3l.3-.03q.56.4.95.84l.26.3c.32.36.53.48.73.48h.07l.18-.05.09-.04 1.13-.54.14-.08c.3-.17.42-.4.24-1.22a6 6 0 0 1-.12-1.45q.44-.45.78-.97a7 7 0 0 1 1.22-.2l.39-.01c.81-.04.91-.26 1-.66l.27-1.15c.09-.4.1-.64-.62-1.03l-.34-.18a6 6 0 0 1-1.01-.73 6 6 0 0 0-.27-1.2q.26-.62.6-1.1l.22-.31c.4-.58.38-.81.2-1.08l-.05-.06-.78-.97c-.14-.18-.26-.3-.46-.33h-.07q-.23 0-.67.17l-.35.16a6 6 0 0 1-1.16.35 6 6 0 0 0-1.15-.56 7 7 0 0 1-.45-1.1l-.11-.4c-.2-.68-.4-.81-.72-.83zM12 8.2a3.8 3.8 0 1 1 0 7.6 3.8 3.8 0 0 1 0-7.6m0 1.8a2 2 0 1 0 0 4 2 2 0 0 0 0-4"></path>');function nm(t,e){je(t,{get testId(){return e.testId},children:(i,o)=>{var s=ky();$(i,s)},$$slots:{default:!0}})}var Ay=ke('<path d="M13.25 2.83c.23.75.38 1.5 1.63 2.23 1.4.38 2.08 0 2.72-.42.66-.45.86-.32 1.12-.06l.65.64c.29.3.4.42 0 1.18-.38.7-.8 1.33-.42 2.73.72 1.25 1.47 1.47 2.22 1.62.78.16.83.39.83.76v.9c0 .42 0 .59-.83.84-.75.23-1.5.38-2.23 1.63-.38 1.4 0 2.08.42 2.72.45.66.32.86.06 1.12l-.64.65c-.3.29-.42.4-1.18 0-.7-.38-1.34-.8-2.73-.42-1.25.72-1.47 1.47-1.62 2.22-.16.78-.39.83-.76.83h-.9c-.42 0-.59 0-.84-.83-.23-.75-.38-1.5-1.63-2.23-1.4-.38-2.08 0-2.72.42-.66.45-.86.32-1.12.06l-.65-.64c-.29-.3-.4-.42 0-1.18.38-.7.8-1.34.42-2.73-.72-1.25-1.47-1.47-2.22-1.62-.78-.16-.83-.39-.83-.76v-.9c0-.42 0-.59.83-.84.75-.23 1.5-.38 2.22-1.63.38-1.4 0-2.08-.42-2.72-.44-.66-.31-.86-.05-1.12l.64-.65c.3-.29.42-.4 1.18 0 .7.38 1.33.8 2.73.42 1.25-.72 1.47-1.47 1.62-2.22.16-.78.39-.83.76-.83h.9c.42 0 .59 0 .84.83M12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5"></path>');function rm(t,e){je(t,{get testId(){return e.testId},children:(i,o)=>{var s=Ay();$(i,s)},$$slots:{default:!0}})}var My=L('<div aria-hidden="true"><!> <!></div>'),Vy={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 Gd(t,e){B(e,!0),Q(t,Vy);let i=g(e,"isMobile",3,!1),o=g(e,"currentQuality",3,void 0),s=m(()=>o()?Ly(o()):""),a=m(()=>Nu(o())),l=m(()=>n(s).length>2);var d=Ve(),r=le(d);{var u=p=>{nm(p,{testId:"settings-mobile-icon"})},f=p=>{var v=My();let b;var y=C(v);{var _=T=>{let R=m(()=>`${n(s)}-pill-icon`);Zf(T,{get testId(){return n(R)},children:(A,P)=>{var E=Ve(),z=le(E);Hi(z,()=>n(a),(U,W)=>{W(U,{})}),$(A,E)},$$slots:{default:!0}})};M(y,T=>{n(a)&&T(_)})}var w=k(y,2);let I=m(()=>n(a)?"settings-icon--labeled":"settings-icon");rm(w,{get testId(){return n(I)}}),S(v),O(T=>b=ie(v,1,"icon s-1u",null,b,T),[()=>({triple:n(l)})]),$(p,v)};M(r,p=>{i()?p(u):p(f,!1)})}$(t,d),F()}var Ry=L('<span class="settings-icon-wrapper s-1y"><!></span>'),Dy={hash:"s-1y",code:".settings-icon-wrapper.s-1y{height:24px;position:relative;width:24px}"};function Fl(t,e){B(e,!0),Q(t,Dy);let[i,o]=Be(),s=()=>x(u,"$settingsMenuVisible",i),a=()=>x(v,"$isMobile",i),l=()=>x(r,"$currentQuality",i),d=xe(),r=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,f=d.actions.internal.openSettingsMenu,p=d.actions.internal.closeSettingsMenu,v=d.ui.isMobile,b=d.ui.t,y=K(void 0);Fe(()=>{n(y)&&Et(()=>{e.ref$.set(n(y))})});let _=b("aria_label_settings");function w(T){return bt(this,null,function*(){let R=fa(T);s()?p():f(R,mo)})}let I=m(()=>s()?"opened":"");Ft(t,{get className(){return n(I)},testId:"settings-btn",click:w,get ariaLabel(){return _},get ariaExpanded(){return s()},get ref(){return n(y)},set ref(T){D(y,T,!0)},children:(T,R)=>{var A=Ry(),P=C(A);Gd(P,{get isMobile(){return a()},get currentQuality(){return l()}}),S(A),$(T,A)},$$slots:{default:!0}}),F(),o()}var Oy=ke('<path d="M6.56 4.44a1.5 1.5 0 1 0-2.12 2.12l3.09 3.09a11 11 0 0 0-2.39 3.08 11 11 0 0 0-1.01 4.14C4 18.43 4 20.37 4 22.83v2.34c0 2.46 0 4.4.13 5.96.13 1.6.4 2.93 1.01 4.14a10.5 10.5 0 0 0 4.6 4.59c1.2.61 2.53.88 4.13 1.01 1.56.13 3.5.13 5.96.13h8.34c2.46 0 4.4 0 5.96-.13 1.44-.12 2.66-.35 3.78-.84l3.53 3.53a1.5 1.5 0 0 0 2.12-2.12zM13.5 28a1.5 1.5 0 0 0 0 3h11a1.5 1.5 0 0 0 0-3zM12 22a1.5 1.5 0 0 1 1.5-1.5h4a1.5 1.5 0 0 1 0 3h-4A1.5 1.5 0 0 1 12 22"></path><path d="M34.5 23.5h-4.64l12.55 12.55q.23-.37.45-.78a11 11 0 0 0 1.01-4.14c.13-1.56.13-3.5.13-5.96v-2.34c0-2.46 0-4.4-.13-5.96a11 11 0 0 0-1.01-4.14 10.5 10.5 0 0 0-4.6-4.59 11 11 0 0 0-4.13-1.01C32.57 7 30.63 7 28.17 7h-8.34c-2.46 0-4.4 0-5.96.13l-.35.03L26.86 20.5h7.64a1.5 1.5 0 0 1 0 3"></path>',1),Ny=ke("<path></path>");function va(t,e){B(e,!0);let i=m(()=>`subtitles-icon${e.type==="off"?"-off":e.type==="outline"?"-outline":""}`),o=m(()=>dn(e.size));je(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(i)},get shadow(){return e.shadow},children:(s,a)=>{var l=Ve(),d=le(l);{var r=f=>{var p=Oy();Xt(),$(f,p)},u=f=>{var p=Ny();O(()=>De(p,"d",`M16.92 8h14.16q2.82-.02 4.66.1c1.28.1 2.4.32 3.46.86a8.8 8.8 90 013.84 3.84c.54 1.04.76 2.18.86 3.46q.12 1.84.1 4.66v6.16q.02 2.82-.1 4.66a10 10 90 01-.86 3.46 8.8 8.8 90 01-3.84 3.84 10 10 90 01-3.46.86q-1.84.12-4.66.1H16.92q-2.82.02-4.66-.1a10 10 90 01-3.46-.86 8.8 8.8 90 01-3.84-3.84 10 10 90 01-.86-3.46Q4 29.9 4 27.08v-6.16q-.02-2.82.1-4.66c.1-1.28.32-2.4.86-3.46A8.8 8.8 90 018.8 8.96a10 10 90 013.46-.86Q14.1 8 16.92 8
|
|
56
|
+
Audio: ${(ft=n(r).audioCodec||"")!=null?ft:""} ${n(r).audioLanguage?`(${n(r).audioLanguage})`:""}`)}),b(Le,Y)};M(X,Le=>{(n(r).videoCodec||n(r).audioCodec)&&Le(_e)})}var Ee=P(X,2);{var de=Le=>{var Y=My(),Oe=P(C(Y),2),$e=C(Oe,!0);S(Oe),S(Y),N(()=>ge($e,n(r).viewport)),b(Le,Y)};M(Ee,Le=>{n(r).viewport&&Le(de)})}var ze=P(Ee,2);{var ue=Le=>{var Y=Vy(),Oe=P(C(Y),2),$e=C(Oe,!0);S(Oe),S(Y),N(()=>ge($e,n(r).videoSize)),b(Le,Y)};M(ze,Le=>{n(r).videoSize&&Le(ue)})}var pe=P(ze,2);{var Z=Le=>{var Y=Ry(),Oe=P(C(Y),2),$e=C(Oe,!0);S(Oe),S(Y),N(()=>ge($e,n(r).cdn)),b(Le,Y)};M(pe,Le=>{n(r).cdn&&Le(Z)})}var B=P(pe,2);{var fe=Le=>{var Y=Dy(),Oe=P(C(Y),2),$e=C(Oe);S(Oe),S(Y),N(()=>{var Ne;return ge($e,`${(Ne=n(r).volume)!=null?Ne:""} %`)}),b(Le,Y)};M(B,Le=>{n(r).volume&&Le(fe)})}var me=P(B,2);{var Ie=Le=>{var Y=Oy(),Oe=P(C(Y),2),$e=C(Oe);S(Oe),S(Y),N(Ne=>ge($e,`${Ne!=null?Ne:""} s`),[()=>n(r).position.toFixed(2)]),b(Le,Y)};M(me,Le=>{n(r).position&&Le(Ie)})}var ot=P(me,2);{var Me=Le=>{var Y=Ny(),Oe=P(C(Y),2),$e=C(Oe);S(Oe),S(Y),N(Ne=>ge($e,`${Ne!=null?Ne:""} s`),[()=>n(r).buffer.toFixed(2)]),b(Le,Y)};M(ot,Le=>{n(r).buffer&&Le(Me)})}var be=P(ot,2);{var W=Le=>{var Y=By(),Oe=P(C(Y),2),$e=C(Oe);S(Oe),S(Y),N(Ne=>ge($e,`${Ne!=null?Ne:""} s`),[()=>n(r).nativeBuffer.toFixed(2)]),b(Le,Y)};M(be,Le=>{n(r).nativeBuffer&&Le(W)})}var Ce=P(be,2);{var Ae=Le=>{var Y=Hy(),Oe=P(C(Y),2),$e=C(Oe);S(Oe),S(Y),N(Ne=>ge($e,`${Ne!=null?Ne:""} s`),[()=>n(r).liveLatency.toFixed(2)]),b(Le,Y)};M(Ce,Le=>{n(r).liveLatency&&Le(Ae)})}var Qe=P(Ce,2);{var Te=Le=>{var Y=Fy(),Oe=P(C(Y),2),$e=C(Oe,!0);S(Oe),S(Y),N(Ne=>ge($e,Ne),[()=>[{value:n(r).currentVideoSegmentLength,title:"Video:"},{value:n(r).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Ne})=>Ne).map(({value:Ne,title:ft})=>`${ft} ${((Ne!=null?Ne:0)/1e3).toFixed(2)} s`).join(" & ")]),b(Le,Y)};M(Qe,Le=>{(n(r).currentVideoSegmentLength||n(r).currentAudioSegmentLength)&&Le(Te)})}var we=P(Qe,2),He=P(C(we),2),st=C(He);S(He),S(we);var ct=P(we,2);{var It=Le=>{var Y=Uy(),Oe=P(C(Y),2);Kd(Oe,{get values(){return n(I)}});var $e=P(Oe,2),Ne=C($e);S($e),S(Y),N(ft=>ge(Ne,`${ft!=null?ft:""} Kbps`),[()=>n(r).speed.toFixed(2)]),b(Le,Y)};M(ct,Le=>{n(r).speed&&Le(It)})}var lt=P(ct,2);{var ai=Le=>{var Y=zy(),Oe=P(C(Y),2);Kd(Oe,{get values(){return n(T)}});var $e=P(Oe,2),Ne=C($e);S($e),S(Y),N(ft=>ge(Ne,`${ft!=null?ft:""} Kbps`),[()=>n(r).bitrate.toFixed(2)]),b(Le,Y)};M(lt,Le=>{n(r).bitrate&&Le(ai)})}var St=P(lt,2),Rt=P(C(St),2);Kd(Rt,{get values(){return n(x)}});var Dt=P(Rt,2),Wt=C(Dt,!0);S(Dt),S(St),S(q),S(k),N(Le=>{var Y,Oe;E=ie(k,1,"container s-k",null,E,Le),De(k,"aria-label",D),ge(j,n(r).version),ge(st,`${(Y=n(p))!=null?Y:""} / ${(Oe=n(m))!=null?Oe:""} frames`),ge(Wt,n(v))},[()=>({"container-mobile":s()})]),b(t,k),F(),o()}et(["click"]);import{noop as qy}from"@vkontakte/videoplayer-shared/es2015";var Qy=(t,e)=>{t.stopPropagation(),e()()},Gy=A('<div class="close s-1c"></div>'),Yy={hash:"s-1c",code:'.close.s-1c{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-1c:hover{opacity:1}.close.s-1c:after,.close.s-1c:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-1c:before{transform:rotate(45deg)}.close.s-1c:after{transform:rotate(-45deg)}'};function Bs(t,e){H(e,!0),Q(t,Yy);let i=g(e,"onClick",3,qy);var o=Gy();o.__click=[Qy,i],b(t,o),F()}et(["click"]);import{noop as Xy}from"@vkontakte/videoplayer-shared/es2015";var dn=t=>`width:${t}px;height:${t}px;`;var jy=ke('<path d="m14.4 8.76 24.02 13.85a1.6 1.6 0 0 1 0 2.78L14.4 39.24a1.6 1.6 0 0 1-2.4-1.39v-27.7a1.6 1.6 0 0 1 2.4-1.39"></path>');function Ln(t,e){H(e,!0);let i=f(()=>dn(e.size));Xe(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"play-icon",get shadow(){return e.shadow},children:(o,s)=>{var a=jy();b(o,a)},$$slots:{default:!0}}),F()}var Zy=A('<div class="timer s-1b"><canvas class="timer-canvas s-1b" width="100" height="100"></canvas> <!></div>'),Jy={hash:"s-1b",code:".timer.s-1b{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-1b:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-1b{height:50px;position:absolute;width:50px}"};function Qd(t,e){H(e,!0),Q(t,Jy);let i=g(e,"isRunning",3,!0),o=g(e,"onTimerEnded",3,Xy),s=5e3,a=K(void 0),l,d,r=0,u;Fe(()=>{i()&&Pt(()=>{d=Date.now(),r=requestAnimationFrame(p)})});let m=()=>{r&&(cancelAnimationFrame(r),r=0)},p=()=>{m(),i()&&(u=(Date.now()-d)/s,u<1?(l==null||l.clearRect(0,0,100,100),l==null||l.beginPath(),l==null||l.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*u),l==null||l.stroke(),r=requestAnimationFrame(p)):o()())};Lt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),ln(()=>{m()});var v=Zy(),$=C(v);tt($,h=>O(a,h),()=>n(a));var y=P($,2);Ln(y,{get size(){return"24"}}),S(v),b(t,v),F()}var e0=(t,e,i)=>{e(!1),i()},t0=A('<div class="overlay s-p"></div> <div class="next-video s-p"><div class="top s-p"><div class="caption s-p"> </div> <!></div> <div class="row s-p"><div class="column s-p"><div class="thumb s-p"><div></div> <!></div></div> <div class="column s-p"><div class="title s-p"> </div></div></div></div>',1),i0={hash:"s-p",code:".overlay.s-p{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-p{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-p{display:flex;justify-content:space-between}.caption.s-p{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-p{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-p{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-p{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-p,.thumb-overlay.s-p{height:100%;width:100%}.thumb-overlay.s-p{position:absolute}.thumb-overlay.withOpacity.s-p{background:var(--black);opacity:.3}.title.s-p{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Kf(t,e){H(e,!0),Q(t,i0);let[i,o]=Be(),s=()=>w(d,"$autoplayNextEnabled$",i),a=()=>w(r,"$timerNextVideoRunning$",i),l=ye(),d=l.ui.autoplayNextEnabled$,r=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=()=>{s()&&(u(!1),v())},h=()=>{e.clickCloseIcon(),$()};Lt(()=>{e.isHide||m(),e.isHide&&s()&&(u(!1),v())});var x=Re(),I=se(x);{var T=D=>{var k=t0(),E=P(se(k),2),V=C(E),q=C(V),L=C(q,!0);S(q);var z=P(q,2);Bs(z,{onClick:h}),S(V);var j=P(V,2);j.__click=[e0,u,p];var te=C(j),ee=C(te),oe=C(ee);let ae;var le=P(oe,2);{var ce=de=>{let ze=f(()=>a()&&s());Qd(de,{get isRunning(){return n(ze)},onTimerEnded:y})};M(le,de=>{s()&&de(ce)})}S(ee),S(te);var X=P(te,2),_e=C(X),Ee=C(_e,!0);S(_e),S(X),S(j),S(E),N((de,ze)=>{ge(L,de),Ke(ee,`background-image: url('${e.thumb}')`),ae=ie(oe,1,"thumb-overlay s-p",null,ae,ze),ge(Ee,e.title)},[()=>G("end_screen_next_video"),()=>({withOpacity:s()})]),b(D,k)};M(I,D=>{e.isHide||D(T)})}b(t,x),F(),o()}et(["click"]);import{PlaybackState as Ua}from"@vkontakte/videoplayer-core/es2015";import{checkNever as n0}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Gn}from"@vkontakte/videoplayer-statistics/es2015";var qf=(t,e)=>Math.min(+(t+e).toFixed(2),1),Qf=(t,e)=>Math.max(+(t-e).toFixed(2),0),Ru=(t,e,i)=>{let o=qf(e,i);e<1&&t.actions.internal.setVolume(o)},Du=(t,e,i)=>{let o=Qf(e,i);e>0&&t.actions.internal.setVolume(o)};var ua=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:s})=>t?i?!0:(o==null||o(),!1):e?!0:(s==null||s(),!1);function Ou(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var r0=(t,e)=>{e(t)},s0=A('<div class="keyboard-controls s-l" tabindex="-1" role="region"><!></div>'),a0={hash:"s-l",code:".keyboard-controls.s-l{bottom:0;left:0;position:absolute;right:0;top:0}"};function Gf(t,e){var Ye,Ue;H(e,!0),Q(t,a0);let[i,o]=Be(),s=()=>w(te,"$isMinimalView$",i),a=()=>w(ze,"$availableSubtitlesList$",i),l=()=>w(_e,"$disabledControls$",i),d=()=>w(Qe,"$isInteractiveTime$",i),r=()=>w(Te,"$showInteractiveTimeIndicatorTooltip$",i),u=()=>w(ee,"$playbackState$",i),m=()=>w(ot,"$isEnded$",i),p=()=>w(me,"$doubleForwardAvailable$",i),v=()=>w(fe,"$doubleForwardOn$",i),$=()=>w(Me,"$overlayContainer$",i),y=()=>w(ae,"$adPlaybackState",i),h=()=>w(le,"$positionExact$",i),x=()=>w(ce,"$duration$",i),I=()=>w(Ce,"$isAudioAvailable$",i),T=()=>w(X,"$volume$",i),D=()=>w(oe,"$canChangePlaybackSpeed$",i),k=()=>w(Ee,"$muted$",i),E=()=>w(de,"$currentSubtitle$",i),V=g(e,"hasNextVideo",3,!1),q=g(e,"hasPrevVideo",3,!1),L=ye(),z=Mt(),j=L.getLogger().createComponentLog("KeyboardControls component"),te=L.ui.isMinimalView$,ee=L.state.playbackState$,oe=L.state.canChangePlaybackSpeed$,ae=L.ads.playbackState,le=L.state.positionExact$,ce=L.state.duration$,X=L.state.volume$,_e=L.ui.controls.disabledControls$,Ee=L.state.muted$,de=L.state.currentSubtitle$,ze=L.state.availableSubtitlesList$,ue=f(()=>!s()&&a().length>0),pe=L.ui.contextMenu.openedByHotKey$,Z=L.ui.contextMenu.lastActiveElem$,B=L.ui.contextMenu.visible$,fe=L.ui.doubleForwardOn$,me=L.ui.doubleForwardAvailable$,Ie=L.ui.contextMenu.position$,ot=L.state.isEnded$,Me=L.ui.overlayContainer$,be=(Ye=L.callbacks)==null?void 0:Ye.onAudioDoesNotExistHint,W=(Ue=L.callbacks)==null?void 0:Ue.onAudioDisabledHint,Ce=L.state.isAudioAvailable$,Ae=L.state.isAudioDisabled,Qe=L.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:Te}=wo(),we=0,He=!0,st=K(void 0),ct=xe=>(xe!==He&&(He=xe,we=0),we+=1,(z.controls.seekStepKeyboard+z.controls.seekStepKeyboard*we)/1e3),It=!0,lt=()=>{if(!l().has("PLAY_BUTTON"))if(d()&&r()&&Te.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{L.actions.internal.togglePlay();let xe="PLAY";u()===Ua.PAUSED?xe="PAUSE":m()&&(xe="REPLAY"),e.showHotKeyHelpers({type:xe})}},ai=xe=>{if(!p()||!xe&&v()){lt(),e.stopDoubleForward(),It=!0;return}It=!1,!xe&&e.startDoubleForwardActivationTimer()},St=()=>{It||(v()||lt(),e.stopDoubleForward(),It=!0)},Rt=xe=>{xe!=="Space"&&e.stopDoubleForward()},Dt=xe=>{let Ot=F_($());Ie.set(Ot),Z.set(xe.target),pe.set(!0),B.set(!0)},Wt=(xe,Ot=!1)=>{var We,nt;let Tt=xe.target,qt=(We=Tt==null?void 0:Tt.getAttribute("role"))==null?void 0:We.includes("menuitem"),_i=Tt.classList.contains("btn"),vi=xe.code;if(_i&&vi==="Space")return!1;let Mi=Hh.has(vi);if(qt&&Mi)return!1;let eo=!Bh.has(vi);if(xe.ctrlKey&&eo||xe.altKey&&eo||xe.metaKey)return!1;let di=qt&&vi==="Escape";Fh.has(vi)||di||e.hideContextMenu();let Si=u()===Ua.PLAYING||u()===Ua.PAUSED,to=e.isAds&&(y()==="paused"||y()==="playing"),Vi=!to&&!l().has("TIMELINE"),ci=xe.shiftKey&&["Digit1","Numpad1"].includes(vi);if(!ci&&!(Si||to))return!1;j({message:`key down, code: ${vi}, isExternal = ${Ot}`});let Ki=!1,_t=()=>{Ki=!0,Ot||xe.preventDefault()};if(Rt(vi),ci)return Dt(xe),_t(),!0;switch(vi){case"KeyJ":case"ArrowLeft":{if(!Vi)break;if(xe.ctrlKey||xe.altKey){let ut=L.actions.internal.getPrevEpisode();L.actions.internal.seekToPrevEpisode(ut),ut&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:ut.text}),_t()}else{let ut=xe.shiftKey?ct(!1):z.controls.seekStepKeyboard/1e3,pi=Math.max(h()-ut,0);h()>0&&(L.actions.internal.seekTime(pi,Gn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:ut.toString()}),_t())}break}case"KeyL":case"ArrowRight":{if(!Vi)break;if(xe.ctrlKey||xe.altKey){let ut=L.actions.internal.getNextEpisode();L.actions.internal.seekToNextEpisode(ut),ut&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:ut.text}),_t()}else{let ut=xe.shiftKey?ct(!0):z.controls.seekStepKeyboard/1e3,pi=Math.min(h()+ut,x());Math.round(h())<Math.round(x())&&(L.actions.internal.seekTime(pi,Gn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:ut.toString()}),_t())}break}case"ArrowUp":{if(ua({isAudioDisabled:Ae,audioDisabledHintCallback:W,isAudioAvailable:I(),audioIsNotExistHintCallback:be,isAds:e.isAds})){let ut=T(),pi=z.controls.volumeStepKeyboard,qi=ut<=1;if(Ru(L,ut,pi),qi){let io=Math.round(qf(ut,pi)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:io}})}}_t();break}case"ArrowDown":{if(ua({isAudioDisabled:Ae,audioDisabledHintCallback:W,isAudioAvailable:I(),audioIsNotExistHintCallback:be,isAds:e.isAds})){let ut=T(),pi=z.controls.volumeStepKeyboard,qi=ut>=0;if(Du(L,ut,pi),qi){let io=Math.round(Qf(ut,pi)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:io}})}}_t();break}case"Comma":{if(xe.shiftKey){if(!v()&&D()){let ut=L.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:ut==null?void 0:ut.displayValue}),_t()}}else{if(to||u()!==Ua.PAUSED)break;let ut=Math.max(h()-z.controls.seekStepFrame/1e3,0);h()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),L.actions.internal.clearDelayedBufferingCheckTimeout(),L.actions.internal.seekTime(ut,Gn.DOUBLE_TAP),_t())}break}case"Period":{if(xe.shiftKey){if(!v()&&D()){let ut=L.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:ut==null?void 0:ut.displayValue}),_t()}}else{if(to||u()!==Ua.PAUSED)break;let ut=Math.min(h()+z.controls.seekStepFrame/1e3,x());h()<x()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),L.actions.internal.clearDelayedBufferingCheckTimeout(),L.actions.internal.seekTime(ut,Gn.DOUBLE_TAP),_t())}break}case"KeyK":lt(),_t();break;case"Space":ai(xe.repeat),_t();break;case"KeyM":{ua({isAudioDisabled:Ae,audioDisabledHintCallback:W,isAudioAvailable:I(),audioIsNotExistHintCallback:be,isAds:e.isAds})&&(e.showHotKeyHelpers({type:k()?"VOLUME":"MUTE"}),L.actions.internal.toggleMuted()),_t();break}case"KeyF":e.toggleFullscreen(),_t();break;case"KeyC":if(!n(ue))break;L.actions.internal.toggleSubtitle(),E().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(nt=E())==null?void 0:nt.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),_t();break;case"KeyI":L.actions.internal.togglePictureInPicture(),_t();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),L.actions.internal.seekToPercent(.1,Gn.DOUBLE_TAP),_t();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),L.actions.internal.seekToPercent(.2,Gn.DOUBLE_TAP),_t();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),L.actions.internal.seekToPercent(.3,Gn.DOUBLE_TAP),_t();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),L.actions.internal.seekToPercent(.4,Gn.DOUBLE_TAP),_t();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),L.actions.internal.seekToPercent(.5,Gn.DOUBLE_TAP),_t();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),L.actions.internal.seekToPercent(.6,Gn.DOUBLE_TAP),_t();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),L.actions.internal.seekToPercent(.7,Gn.DOUBLE_TAP),_t();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),L.actions.internal.seekToPercent(.8,Gn.DOUBLE_TAP),_t();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),L.actions.internal.seekToPercent(.9,Gn.DOUBLE_TAP),_t();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),L.actions.internal.seekToPercent(0,Gn.DOUBLE_TAP),_t();break;case"Slash":{xe.shiftKey&&z.features.hotKeyMapModal&&(e.showKeyMap(),_t());break}case"KeyN":xe.shiftKey&&V()&&!s()&&(L.actions.internal.nextVideoClick(),_t());break;case"KeyP":xe.shiftKey&&q()&&!s()&&(L.actions.internal.prevVideoClick(),_t());break;case"ShiftLeft":case"ShiftRight":_t();break;case"Tab":case"Escape":case"Enter":break;default:n0(vi);break}return Ki},Le=xe=>{let Ot=xe.code;if(xe.ctrlKey||xe.altKey||xe.metaKey)return;let Tt=u()===Ua.PLAYING||u()===Ua.PAUSED,qt=e.isAds&&(y()==="paused"||y()==="playing");if(Tt||qt)switch(Ot){case"ShiftLeft":case"ShiftRight":we=0;break;case"Space":St();break}},Y=G("aria_label_video_player"),Oe=()=>{var xe;return(xe=n(st))==null?void 0:xe.focus()},$e=()=>n(st)===Ou(),Ne=xe=>xe.type==="keydown"?Wt(xe,!0):(xe.type==="keyup"&&Le(xe),!1);var ft=s0();ft.__keyup=Le,ft.__keydown=[r0,Wt];var Et=C(ft);ei(Et,()=>{var xe;return(xe=e.children)!=null?xe:yt}),S(ft),tt(ft,xe=>O(st,xe),()=>n(st)),N(()=>De(ft,"aria-label",Y)),b(t,ft);var Se=F({focus:Oe,isFocused:$e,handleExternalKeyboardEvent:Ne});return o(),Se}et(["keyup","keydown"]);var l0=A('<div class="container s-m"><div class="dot s-m"></div> <div class="dot s-m"></div> <div class="dot s-m"></div></div>'),d0={hash:"s-m",code:".container.s-m{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-m:first-child{animation-delay:0s}.dot.s-m:nth-child(2){animation-delay:.18s}.dot.s-m:nth-child(3){animation-delay:.36s}@keyframes s-m-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-m{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-m-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-m+.dot:where(.s-m){margin-left:4px}"};function za(t,e){Q(t,d0);let i=g(e,"style",3,"");var o=l0();N(()=>Ke(o,i())),b(t,o)}var c0=ke('<path d="M5.26 5.26a.9.9 0 0 1 1.28 0L12 10.73l5.46-5.47a.9.9 0 0 1 1.28 1.28L13.27 12l5.47 5.46a.9.9 0 1 1-1.28 1.28L12 13.27l-5.46 5.47a.9.9 0 1 1-1.28-1.28L10.73 12 5.26 6.54a.9.9 0 0 1 0-1.28Z"></path>');function Yf(t,e){Xe(t,{get fill(){return e.fill},children:(i,o)=>{var s=c0();b(i,s)},$$slots:{default:!0}})}import{noop as Ul}from"@vkontakte/videoplayer-shared/es2015";var u0=t=>{t.stopPropagation()},p0=A("<button><!></button>"),f0={hash:"s-1k",code:"button.btn.s-1k{align-items:center;display:flex;flex-direction:row;height:var(--controls-height);justify-content:center;margin:0;padding:8px;will-change:opacity}button.w-max.s-1k{width:100%}button.btn--live.s-1k{padding:10px 4px}button.btn-jc-l.s-1k{justify-content:left}button.btn-m.s-1k{background-color:rgba(0,0,0,.56);border-radius:12px;height:44px;left:12px;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}button.btn-m.s-1k,button.btn-m--play.s-1k{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1k{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1k,button.btn-m--prev.s-1k{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1k{right:calc(100% + 35px)}button.btn-m--next.s-1k{left:calc(100% + 35px)}button.btn.s-1k:disabled{cursor:default;pointer-events:none}button.btn.s-1k:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1k:not(:disabled):hover{opacity:.8}button.pr-0.s-1k{padding-right:0}button.pl-0.s-1k{padding-left:0}"};function Ht(t,e){H(e,!0),Q(t,f0);let i=g(e,"className",3,""),o=g(e,"style",3,""),s=g(e,"disabled",3,void 0),a=g(e,"testId",3,void 0),l=g(e,"ariaHidden",3,void 0),d=g(e,"ariaLabel",3,void 0),r=g(e,"ref",15,void 0),u=g(e,"ariaKeyShortCut",3,void 0),m=g(e,"ariaExpanded",3,void 0),p=g(e,"tabIndex",3,0),v=g(e,"click",3,Ul),$=g(e,"focus",3,Ul),y=g(e,"blur",3,Ul),h=f(()=>v()===Ul?null:k=>{k.stopPropagation(),v()(k)}),x=f(()=>$()===Ul?null:k=>{k.preventDefault(),$()()}),I=f(()=>y()===Ul?null:k=>{k.preventDefault(),y()()});var T=p0();T.__pointerdown=[u0],T.__click=function(...k){var E;(E=n(h))==null||E.apply(this,k)};var D=C(T);ei(D,()=>{var k;return(k=e.children)!=null?k:yt}),S(T),tt(T,k=>r(k),()=>r()),N(()=>{var k,E,V,q,L,z,j,te;ie(T,1,`btn ${(k=i())!=null?k:""}`,"s-1k"),Ke(T,o()||null),T.disabled=(E=s())!=null?E:null,De(T,"aria-hidden",(V=l())!=null?V:null),De(T,"aria-label",(q=d())!=null?q:null),De(T,"aria-keyshortcuts",(L=u())!=null?L:null),De(T,"aria-expanded",(z=m())!=null?z:null),De(T,"data-testid",(j=a())!=null?j:null),De(T,"tabindex",p()),De(T,"role",e.role),De(T,"aria-checked",(te=e.areaChecked)!=null?te:null)}),ht("focus",T,function(...k){var E;(E=n(x))==null||E.apply(this,k)}),ht("blur",T,function(...k){var E;(E=n(I))==null||E.apply(this,k)}),b(t,T),F()}et(["pointerdown","click"]);var m0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},v0=A('<div class="modal-header s-15"><h3 class="modal-title s-15"> </h3> <!></div>'),g0=A('<div class="modal-overlay s-15"><div class="modal-container s-15" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-15" tabindex="0" role="scrollbar"><div class="modal-main s-15"><!></div></div></div></div>'),h0={hash:"s-15",code:'.modal-overlay.s-15{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-15{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-15{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-15{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-15{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-15::-webkit-scrollbar{width:8px}.modal-scroll.s-15::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-15::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-15::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-15{margin:-8px -4px 0 0}'};function jf(t,e){H(e,!0),Q(t,h0);let i=g(e,"showHeader",3,!0),o=g(e,"showCloseCross",3,!0),s=K(void 0),a=K(void 0),{webApi:{focusManager:l}}=ye(),d=G("hotkey_map_modal_close_btn_text");Lt(()=>{var h;return(h=n(s))==null||h.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var r=g0();r.__keydown=[m0,e];var u=C(r),m=C(u);{var p=h=>{var x=v0(),I=C(x),T=C(I,!0);S(I);var D=P(I,2);{var k=E=>{Ht(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(V,q)=>{Yf(V,{fill:"currentColor"})},$$slots:{default:!0}})};M(D,E=>{o()&&E(k)})}S(x),N(()=>ge(T,e.title)),b(h,x)};M(m,h=>{i()&&h(p)})}var v=P(m,2),$=C(v),y=C($);ei(y,()=>{var h;return(h=e.children)!=null?h:yt}),S($),S(v),tt(v,h=>O(s,h),()=>n(s)),S(u),tt(u,h=>O(a,h),()=>n(a)),S(r),b(t,r),F()}et(["keydown"]);var _0=new Set(["BR"]),W_=t=>{var s;let e=document.createElement("DIV");e.innerHTML=t;let i=e.querySelectorAll("*"),o=i.length;for(;o--;){let a=i[o],l=a.tagName;_0.has(l)||(s=a.parentElement)==null||s.removeChild(a)}return e.innerHTML};var b0=A('<li class="hot-key-map-item s-n"><span class="hot-key-map-item-description s-n"><!></span> <span class="hot-key-map-item-value s-n"> </span></li>'),$0=A('<div class="hot-key-map-group s-n"><h5 class="hot-key-map-group-title s-n"> </h5> <ul class="hot-key-map-group-items s-n"></ul></div>'),y0=A('<div class="hot-key-map s-n"></div>'),x0={hash:"s-n",code:'.hot-key-map.s-n{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-n{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-n:last-child{border-bottom:none}.hot-key-map-group-title.s-n{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px}.hot-key-map-group-title.s-n,.hot-key-map-item.s-n{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-n{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-n{align-items:center;box-sizing:border-box;display:flex;justify-content:space-between;--videoplayer-hotkey-item-value-width:156px;--videoplayer-hotkey-item-value-padding-left:24px}.hot-key-map-item-description.s-n{color:var(--white-alpha-72);max-width:388px;width:calc(100% - var(--videoplayer-hotkey-item-value-width) - var(--videoplayer-hotkey-item-value-padding-left))}.hot-key-map-item-value.s-n{color:var(--white);letter-spacing:-.14px;padding-left:var(--videoplayer-hotkey-item-value-padding-left);width:var(--videoplayer-hotkey-item-value-width)}.hot-key-map-item-description.s-n,.hot-key-map-item-value.s-n{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function Xf(t,e){H(e,!1),Q(t,x0);let[i,o]=Be(),s=()=>w(l,"$data",i),a=ye(),{data:l,show:d}=a.ui.modals.hotKeyMap,r=()=>{d.set(!1)};en(),jf(t,{get title(){return s().title},onClose:r,children:(u,m)=>{var p=y0();wi(p,5,()=>s().groups,({title:v,items:$})=>v,(v,$)=>{let y=()=>n($).title,h=()=>n($).items;var x=$0(),I=C(x),T=C(I,!0);S(I);var D=P(I,2);wi(D,5,h,({description:k,value:E})=>E,(k,E)=>{let V=()=>n(E).description,q=()=>n(E).value;var L=b0(),z=C(L),j=C(z);Td(j,()=>W_(V())),S(z);var te=P(z,2),ee=C(te,!0);S(te),S(L),N(()=>ge(ee,q())),b(k,L)}),S(D),S(x),N(()=>ge(T,y())),b(v,x)}),S(p),b(u,p)},$$slots:{default:!0}}),F(),o()}import{noop as Tb}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as $b,PlaybackState as Gm}from"@vkontakte/videoplayer-core/es2015";import{getVideoQualityLabel as L0}from"@vkontakte/videoplayer-shared/es2015";var w0=A('<div class="pillow s-1x"><!></div>'),S0={hash:"s-1x",code:".pillow.s-1x{background-color:#679ff8;color:var(--white);font-size:6px;font-weight:600;-webkit-font-smoothing:antialiased;border-radius:12px;padding:2px 4px}"};function Zf(t,e){Q(t,S0);var i=w0(),o=C(i);ei(o,()=>{var s;return(s=e.children)!=null?s:yt}),S(i),N(()=>De(i,"data-testid",e.testId)),b(t,i)}import{VideoQuality as Gd}from"@vkontakte/videoplayer-shared/es2015";var C0=ke('<svg><!><path d="M5.52 5c.32 0 .51-.2.51-.54V3.5l.5-.51 1.46 1.74c.16.2.3.28.51.28a.5.5 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.3 2.3 8.8.87c.16-.14.2-.25.2-.4A.47.47 0 0 0 8.52 0c-.18 0-.3.07-.45.22l-2 2.03h-.04V.54C6.03.2 5.84 0 5.52 0S5 .2 5 .54v3.92c0 .34.2.54.52.54M2.55 1.05 1.05 3.1h1.5zM3.5 3.1V.83C3.5.03 2.41-.3 1.94.35L.14 2.82A.75.75 0 0 0 .75 4h1.8v.55c0 .25.25.45.5.45a.45.45 0 0 0 .45-.45V4h.05a.45.45 0 0 0 0-.9z"></path></svg>');function Jf(t,e){let i=An(e,["$$slots","$$events","$$legacy","children"]);var o=C0();lo(o,()=>Ge({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:yt}),Xt(),S(o),b(t,o)}var T0=ke('<svg><!><path d="M5.51 5c.33 0 .52-.2.52-.54V3.5l.49-.51L7.99 4.7c.16.21.3.29.51.29a.49.49 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.29 2.3 8.82.87C8.95.73 9 .62 9 .47A.47.47 0 0 0 8.52 0c-.17 0-.3.07-.44.22L6.06 2.25h-.03V.54C6.03.2 5.83 0 5.5 0S5 .2 5 .54v3.92c0 .34.19.54.51.54M2 0c-.35 0-.67.06-.95.17a1.5 1.5 0 0 0-.66.49c-.15.2-.23.44-.23.7 0 .43.21.76.62 1-.23.11-.41.26-.55.44-.15.2-.23.44-.23.71 0 .29.08.55.25.78.18.23.41.4.71.52.3.13.65.19 1.04.19s.73-.06 1.03-.19c.3-.12.54-.3.71-.52a1.26 1.26 0 0 0 .03-1.49 1.45 1.45 0 0 0-.55-.44c.4-.23.62-.57.62-1a1.14 1.14 0 0 0-.24-.7 1.44 1.44 0 0 0-.66-.49A2.4 2.4 0 0 0 2 0m-.57.96C1.56.86 1.75.8 2 .8s.43.06.56.16a.51.51 0 0 1 .2.43c0 .2-.06.34-.2.44A.87.87 0 0 1 2 2a.9.9 0 0 1-.57-.16.52.52 0 0 1-.2-.44c0-.18.06-.32.2-.43ZM1.08 3.5a.6.6 0 0 1 .24-.5c.16-.13.38-.2.68-.2s.52.07.68.2a.6.6 0 0 1 .24.5.63.63 0 0 1-.24.52c-.16.12-.38.19-.68.19s-.52-.07-.68-.19a.64.64 0 0 1-.24-.52"></path></svg>');function em(t,e){let i=An(e,["$$slots","$$events","$$legacy","children"]);var o=T0();lo(o,()=>Ge({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:yt}),Xt(),S(o),b(t,o)}var I0=ke('<svg><!><path d="M5.52 5h1.1C8.1 5 9 4.07 9 2.5S8.1 0 6.62 0h-1.1C5.19 0 5 .2 5 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47C7.41.85 8 1.47 8 2.5c0 1.07-.58 1.65-1.5 1.65zM.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S4 4.8 4 4.46V.54C4 .2 3.8 0 3.48 0s-.51.2-.51.54v1.53H1.03V.54C1.03.2.84 0 .52 0S0 .2 0 .54v3.99c0 .34.2.47.52.47"></path></svg>');function tm(t,e){let i=An(e,["$$slots","$$events","$$legacy","children"]);var o=I0();lo(o,()=>Ge({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:yt}),Xt(),S(o),b(t,o)}var E0=ke('<svg><!><path d="M9.52 5h1.1C12.1 5 13 4.07 13 2.5S12.1 0 10.62 0h-1.1C9.19 0 9 .2 9 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zM4.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S8 4.8 8 4.46V.54C8 .2 7.8 0 7.48 0s-.51.2-.51.54v1.53H5.03V.54C5.03.2 4.84 0 4.52 0S4 .2 4 .54v3.99c0 .34.2.47.52.47m-4 0c.32 0 .51-.2.51-.54V3h1.33c.27 0 .45-.15.45-.41 0-.25-.18-.4-.45-.4H1.03V.84h1.5C2.81.85 3 .7 3 .43S2.8 0 2.53 0H.52C.19 0 0 .2 0 .54v3.92C0 4.8.2 5 .52 5"></path></svg>');function im(t,e){let i=An(e,["$$slots","$$events","$$legacy","children"]);var o=E0();lo(o,()=>Ge({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:yt}),Xt(),S(o),b(t,o)}var P0=ke('<svg><!><path d="M11.52 5.75h1.1c1.48 0 2.38-.94 2.38-2.5s-.9-2.5-2.38-2.5h-1.1c-.33 0-.52.2-.52.54V5.2c0 .34.2.54.52.54Zm.51-.85V1.6h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zm-5.51.85c.32 0 .51-.2.51-.54V3.67h1.94v1.54c0 .34.19.54.51.54s.52-.2.52-.54V1.3c0-.34-.2-.54-.52-.54s-.51.2-.51.54v1.53H7.03V1.3c0-.34-.19-.54-.51-.54S6 .95 6 1.29v3.99c0 .34.2.47.52.47m-3.18-.09a4 4 0 0 1-.84.09C1.04 5.75 0 4.88 0 3.3 0 1.73 1.04.75 2.5.75S5 1.73 5 3.3c0 .87-.27 1.46-.78 1.88l.2.3a.5.5 0 0 1-.84.55zm-.52-.78-.24-.35a.5.5 0 1 1 .84-.56l.24.37c.18-.26.29-.62.29-1.04 0-1.03-.64-1.65-1.45-1.65s-1.45.62-1.45 1.65.64 1.6 1.45 1.6c.08 0 .2 0 .32-.02"></path></svg>');function om(t,e){let i=An(e,["$$slots","$$events","$$legacy","children"]);var o=P0();lo(o,()=>Ge({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:yt}),Xt(),S(o),b(t,o)}var Nu=t=>{switch(t){case Gd.Q_720P:return tm;case Gd.Q_1080P:return im;case Gd.Q_1440P:return om;case Gd.Q_2160P:return Jf;case Gd.Q_4320P:return em}};var k0=ke('<path d="M12.72 2.21q1.8.07 2.41 1.96l.06.21.06.2.06.23.06.16.04.01.06-.02.14-.05.15-.07c1.42-.66 2.5-.53 3.4.44l.12.14.82 1.02c.73.96.7 2 0 3.1l-.13.19-.12.16-.14.2-.07.12-.04.05v.03l.1.06.13.07.15.09c1.39.7 1.96 1.64 1.74 2.93l-.04.19-.24 1.06c-.16.68-.28 1-.77 1.45-.48.43-1.02.61-1.73.67l-.22.02h-.2l-.25.02-.18.02.02.14v.1l.04.17c.32 1.53-.04 2.56-1.19 3.2l-.17.1-1.17.57q-1.64.73-3.02-.7l-.15-.17-.13-.15-.17-.19-.1-.1-.05-.04-.1.09-.1.1-.12.14c-.95 1.13-1.95 1.54-3.17 1.07l-.18-.08-1.05-.5-.31-.17a2 2 0 0 1-1-1.06 3 3 0 0 1-.16-1.88l.04-.23.04-.24.02-.17-.1-.02-.15-.01h-.18c-1.56-.04-2.48-.62-2.85-1.89l-.05-.18-.3-1.28q-.33-1.77 1.37-2.78l.2-.11.17-.1.22-.12.15-.1v-.02l-.06-.1-.08-.13-.1-.14c-.94-1.25-1.04-2.34-.28-3.4L4 6.32l.82-1.01c.8-.92 1.8-1.1 3.04-.64l.2.08.19.08.22.1.13.04.04-.01.03-.1.05-.13.04-.17c.36-1.43 1.09-2.24 2.4-2.35h1.58Zm-.05 1.8h-1.34l-.14.01c-.28.04-.47.2-.65.83l-.04.16-.06.2a6 6 0 0 1-.46 1.14 6 6 0 0 0-1.15.56 7 7 0 0 1-1.16-.35l-.35-.16q-.37-.15-.59-.17h-.08a.6.6 0 0 0-.4.19l-.08.07-.78.98-.1.12c-.18.26-.2.5.2 1.08l.22.31q.34.48.6 1.1-.2.59-.27 1.2-.51.45-1.01.73l-.34.18c-.62.34-.7.56-.65.88l.01.08.28 1.21.04.16c.1.3.27.47.97.5l.39.02q.57.03 1.22.2.35.53.78.97a6 6 0 0 1-.12 1.45c-.2.95-.01 1.1.38 1.3l1.13.54a1 1 0 0 0 .34.1l.06-.01q.26-.03.67-.49l.26-.3q.4-.42.95-.83l.3.02.3.01h.3l.3-.03q.56.4.95.84l.26.3c.32.36.53.48.73.48h.07l.18-.05.09-.04 1.13-.54.14-.08c.3-.17.42-.4.24-1.22a6 6 0 0 1-.12-1.45q.44-.45.78-.97a7 7 0 0 1 1.22-.2l.39-.01c.81-.04.91-.26 1-.66l.27-1.15c.09-.4.1-.64-.62-1.03l-.34-.18a6 6 0 0 1-1.01-.73 6 6 0 0 0-.27-1.2q.26-.62.6-1.1l.22-.31c.4-.58.38-.81.2-1.08l-.05-.06-.78-.97c-.14-.18-.26-.3-.46-.33h-.07q-.23 0-.67.17l-.35.16a6 6 0 0 1-1.16.35 6 6 0 0 0-1.15-.56 7 7 0 0 1-.45-1.1l-.11-.4c-.2-.68-.4-.81-.72-.83zM12 8.2a3.8 3.8 0 1 1 0 7.6 3.8 3.8 0 0 1 0-7.6m0 1.8a2 2 0 1 0 0 4 2 2 0 0 0 0-4"></path>');function nm(t,e){Xe(t,{get testId(){return e.testId},children:(i,o)=>{var s=k0();b(i,s)},$$slots:{default:!0}})}var A0=ke('<path d="M13.25 2.83c.23.75.38 1.5 1.63 2.23 1.4.38 2.08 0 2.72-.42.66-.45.86-.32 1.12-.06l.65.64c.29.3.4.42 0 1.18-.38.7-.8 1.33-.42 2.73.72 1.25 1.47 1.47 2.22 1.62.78.16.83.39.83.76v.9c0 .42 0 .59-.83.84-.75.23-1.5.38-2.23 1.63-.38 1.4 0 2.08.42 2.72.45.66.32.86.06 1.12l-.64.65c-.3.29-.42.4-1.18 0-.7-.38-1.34-.8-2.73-.42-1.25.72-1.47 1.47-1.62 2.22-.16.78-.39.83-.76.83h-.9c-.42 0-.59 0-.84-.83-.23-.75-.38-1.5-1.63-2.23-1.4-.38-2.08 0-2.72.42-.66.45-.86.32-1.12.06l-.65-.64c-.29-.3-.4-.42 0-1.18.38-.7.8-1.34.42-2.73-.72-1.25-1.47-1.47-2.22-1.62-.78-.16-.83-.39-.83-.76v-.9c0-.42 0-.59.83-.84.75-.23 1.5-.38 2.22-1.63.38-1.4 0-2.08-.42-2.72-.44-.66-.31-.86-.05-1.12l.64-.65c.3-.29.42-.4 1.18 0 .7.38 1.33.8 2.73.42 1.25-.72 1.47-1.47 1.62-2.22.16-.78.39-.83.76-.83h.9c.42 0 .59 0 .84.83M12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5"></path>');function rm(t,e){Xe(t,{get testId(){return e.testId},children:(i,o)=>{var s=A0();b(i,s)},$$slots:{default:!0}})}var M0=A('<div aria-hidden="true"><!> <!></div>'),V0={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 Yd(t,e){H(e,!0),Q(t,V0);let i=g(e,"isMobile",3,!1),o=g(e,"currentQuality",3,void 0),s=f(()=>o()?L0(o()):""),a=f(()=>Nu(o())),l=f(()=>n(s).length>2);var d=Re(),r=se(d);{var u=p=>{nm(p,{testId:"settings-mobile-icon"})},m=p=>{var v=M0();let $;var y=C(v);{var h=T=>{let D=f(()=>`${n(s)}-pill-icon`);Zf(T,{get testId(){return n(D)},children:(k,E)=>{var V=Re(),q=se(V);zi(q,()=>n(a),(L,z)=>{z(L,{})}),b(k,V)},$$slots:{default:!0}})};M(y,T=>{n(a)&&T(h)})}var x=P(y,2);let I=f(()=>n(a)?"settings-icon--labeled":"settings-icon");rm(x,{get testId(){return n(I)}}),S(v),N(T=>$=ie(v,1,"icon s-1u",null,$,T),[()=>({triple:n(l)})]),b(p,v)};M(r,p=>{i()?p(u):p(m,!1)})}b(t,d),F()}var R0=A('<span class="settings-icon-wrapper s-20"><!></span>'),D0={hash:"s-20",code:".settings-icon-wrapper.s-20{height:24px;position:relative;width:24px}"};function zl(t,e){H(e,!0),Q(t,D0);let[i,o]=Be(),s=()=>w(u,"$settingsMenuVisible",i),a=()=>w(v,"$isMobile",i),l=()=>w(r,"$currentQuality",i),d=ye(),r=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);Fe(()=>{n(y)&&Pt(()=>{e.ref$.set(n(y))})});let h=$("aria_label_settings");function x(T){return $t(this,null,function*(){let D=ca(T);s()?p():m(D,_o)})}let I=f(()=>s()?"opened":"");Ht(t,{get className(){return n(I)},testId:"settings-btn",click:x,get ariaLabel(){return h},get ariaExpanded(){return s()},get ref(){return n(y)},set ref(T){O(y,T,!0)},children:(T,D)=>{var k=R0(),E=C(k);Yd(E,{get isMobile(){return a()},get currentQuality(){return l()}}),S(k),b(T,k)},$$slots:{default:!0}}),F(),o()}var O0=ke('<path d="M6.56 4.44a1.5 1.5 0 1 0-2.12 2.12l3.09 3.09a11 11 0 0 0-2.39 3.08 11 11 0 0 0-1.01 4.14C4 18.43 4 20.37 4 22.83v2.34c0 2.46 0 4.4.13 5.96.13 1.6.4 2.93 1.01 4.14a10.5 10.5 0 0 0 4.6 4.59c1.2.61 2.53.88 4.13 1.01 1.56.13 3.5.13 5.96.13h8.34c2.46 0 4.4 0 5.96-.13 1.44-.12 2.66-.35 3.78-.84l3.53 3.53a1.5 1.5 0 0 0 2.12-2.12zM13.5 28a1.5 1.5 0 0 0 0 3h11a1.5 1.5 0 0 0 0-3zM12 22a1.5 1.5 0 0 1 1.5-1.5h4a1.5 1.5 0 0 1 0 3h-4A1.5 1.5 0 0 1 12 22"></path><path d="M34.5 23.5h-4.64l12.55 12.55q.23-.37.45-.78a11 11 0 0 0 1.01-4.14c.13-1.56.13-3.5.13-5.96v-2.34c0-2.46 0-4.4-.13-5.96a11 11 0 0 0-1.01-4.14 10.5 10.5 0 0 0-4.6-4.59 11 11 0 0 0-4.13-1.01C32.57 7 30.63 7 28.17 7h-8.34c-2.46 0-4.4 0-5.96.13l-.35.03L26.86 20.5h7.64a1.5 1.5 0 0 1 0 3"></path>',1),N0=ke("<path></path>");function pa(t,e){H(e,!0);let i=f(()=>`subtitles-icon${e.type==="off"?"-off":e.type==="outline"?"-outline":""}`),o=f(()=>dn(e.size));Xe(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(i)},get shadow(){return e.shadow},children:(s,a)=>{var l=Re(),d=se(l);{var r=m=>{var p=O0();Xt(),b(m,p)},u=m=>{var p=N0();N(()=>De(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
|
|
57
57
|
${e.type==="outline"?"M12.54 11.68c-1.04.1-1.64.26-2.1.48a5.2 5.2 90 00-2.28 2.28c-.22.46-.4 1.06-.48 2.1-.08 1.08-.08 2.46-.08 4.46v6c0 2 0 3.38.08 4.46.1 1.04.26 1.64.48 2.1q.78 1.5 2.28 2.28c.46.22 1.06.4 2.1.48 1.08.08 2.48.08 4.46.08h14c2 0 3.38 0 4.46-.08 1.04-.1 1.64-.26 2.1-.48a5.2 5.2 90 002.28-2.28c.22-.46.4-1.06.48-2.1.08-1.08.08-2.48.08-4.46v-6c0-2 0-3.38-.08-4.46a6 6 90 00-.48-2.1 5.2 5.2 90 00-2.28-2.28c-.46-.22-1.06-.4-2.1-.48-1.08-.08-2.48-.08-4.46-.08h-14c-2 0-3.38 0-4.46.08":""}
|
|
58
|
-
M12 29.8c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6H13.8a1.8 1.8 90 01-1.8-1.8m0-7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6H13.8a1.8 1.8 90 01-1.8-1.8m17 7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6h-3.4a1.8 1.8 90 01-1.8-1.8M22 22.2c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6h-10.4a1.8 1.8 90 01-1.8-1.8`)),$(f,p)};M(d,f=>{e.type==="off"?f(r):f(u,!1)})}$(s,l)},$$slots:{default:!0}}),F()}function sm(t,e){B(e,!0);let i=g(e,"isSubtitlesEnabled",3,!1),s=xe().ui.t,a=m(()=>i()?s("tooltip_subtitles_on"):s("tooltip_subtitles_off"));Ft(t,{testId:"subtitles-btn",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return ys.KeyC},role:"button",children:(l,d)=>{let r=m(()=>i()?void 0:"outline");va(l,{get size(){return"24"},get type(){return n(r)}})},$$slots:{default:!0}}),F()}var By=L('<span class="duration s-1z" data-testid="video_duration"> </span>'),Fy=L('<div data-testid="time"><span class="current s-1z" data-testid="current_time"> </span> <!></div>'),Hy={hash:"s-1z",code:'.time.s-1z{align-items:center;color:var(--controls-time);display:flex;font-variant-numeric:tabular-nums;font-weight:500;padding:12px 6px}.time.mobile.s-1z{padding:0 0 0 8px}.current.s-1z{position:relative}.duration.s-1z{opacity:.7}.duration.s-1z:before{content:" / ";white-space:pre}'};function Yd(t,e){B(e,!0),Q(t,Hy);let i=g(e,"isMobile",3,!1),o=g(e,"isHidden",3,!1),s=g(e,"showDuration",3,!0),a=g(e,"ref",15),l=Lt(),d=se(!1),r=m(()=>jo(e.duration)),u=m(()=>jo(e.position));var f=Fy();let p;var v=C(f),b=C(v,!0);S(v);var y=k(v,2);{var _=w=>{var I=By(),T=C(I,!0);S(I),O(()=>he(T,n(r))),$(w,I)};M(y,w=>{s()&&w(_)})}S(f),Ns(f,()=>Vl(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),it(f,w=>a(w),()=>a()),O(w=>{p=ie(f,1,"time s-1z",null,p,w),he(b,n(u))},[()=>({mobile:i()})]),$(t,f),F()}import{noop as Bu}from"@vkontakte/videoplayer-shared/es2015";var Uy=ke('<path d="M21.8632 10.0832C22.2147 9.73171 22.7852 9.73171 23.1367 10.0832C23.4881 10.4347 23.4881 11.0051 23.1367 11.3566L18.6367 15.8566C18.2852 16.2081 17.7147 16.2081 17.3632 15.8566C17.0117 15.5051 17.0117 14.9347 17.3632 14.5832L21.8632 10.0832Z"></path><path d="M17.3632 11.3566C17.0117 11.0051 17.0117 10.4347 17.3632 10.0832C17.7147 9.73171 18.2852 9.73171 18.6367 10.0832L23.1367 14.5832C23.4881 14.9347 23.4881 15.5051 23.1367 15.8566C22.7852 16.2081 22.2147 16.2081 21.8632 15.8566L17.3632 11.3566Z"></path>',1),zy=ke("<path></path>"),Wy=ke('<path d="M14 3C14.5523 3 15 3.44772 15 4V20C15 20.5523 14.5523 21 14 21C13.3585 21 12.7422 20.7509 12.2808 20.3052L6.79013 15H4C2.89543 15 2 14.1046 2 13V11C2 9.89543 2.89543 9 4 9H6.765L12.2794 3.6934C12.7418 3.24852 13.3584 3 14 3Z"></path><!>',1);function ga(t,e){B(e,!0);let i=g(e,"volume",3,1),o=g(e,"muted",3,!1),s=(u,f)=>f?"off":u>.5?"max":u>.2?"mid":u>0?"min":"off",a=m(()=>s(i(),o())),l=m(()=>dn(e.size)),d="M16.8748 8.85259C17.2324 8.50731 17.8021 8.51726 18.1474 8.87481C18.5465 9.28803 18.8614 9.77691 19.0757 10.3128C19.2901 10.8486 19.4 11.4218 19.4 12C19.4 12.5782 19.2901 13.1514 19.0757 13.6872C18.8614 14.2231 18.5465 14.712 18.1474 15.1252C17.8021 15.4827 17.2324 15.4927 16.8748 15.1474C16.5173 14.8021 16.5073 14.2324 16.8526 13.8748C17.0876 13.6314 17.2757 13.3408 17.4045 13.0187C17.5333 12.6966 17.6 12.3504 17.6 12C17.6 11.6496 17.5333 11.3034 17.4045 10.9813C17.2757 10.6592 17.0876 10.3686 16.8526 10.1252C16.5073 9.76764 16.5173 9.19788 16.8748 8.85259Z",r="M19.2636 6.2636C19.6151 5.91213 20.1849 5.91213 20.5364 6.2636C21.2516 6.97878 21.9929 7.99659 22.3989 8.97678C22.7959 9.93525 23.0003 10.9625 23.0003 12C23.0003 13.0374 22.7959 14.0647 22.3989 15.0232C21.9929 16.0034 21.2516 17.0212 20.5364 17.7364C20.1849 18.0879 19.6151 18.0879 19.2636 17.7364C18.9121 17.3849 18.9121 16.8151 19.2636 16.4636C19.8484 15.8788 20.4384 15.0527 20.7359 14.3343C21.0425 13.5943 21.2003 12.801 21.2003 12C21.2003 11.1989 21.0425 10.4057 20.7359 9.66561C20.4384 8.94724 19.8484 8.12124 19.2636 7.5364C18.9121 7.18492 18.9121 6.61508 19.2636 6.2636Z";je(t,{get style(){return n(l)},get testId(){var u;return`volume-${(u=n(a))!=null?u:""}-icon`},get shadow(){return e.shadow},children:(u,f)=>{var p=Wy(),v=k(le(p));{var b=_=>{var w=Uy();Xt(),$(_,w)},y=_=>{var w=zy();O(()=>De(w,"d",`${d}${n(a)==="max"?r:""}`)),$(_,w)};M(v,_=>{n(a)==="off"?_(b):_(y,!1)})}$(u,p)},$$slots:{default:!0}}),F()}import{isNonNullable as Q_,noop as Zn}from"@vkontakte/videoplayer-shared/es2015";import{noop as lm}from"@vkontakte/videoplayer-shared/es2015";import{noop as Qy}from"@vkontakte/videoplayer-shared/es2015";var Ky=L('<div class="overlay"><!></div>');function am(t,e){B(e,!0);let[i,o]=Be(),s=()=>x(l,"$overlayContainer$",i),l=xe().ui.overlayContainer$,d=K(void 0),r=v=>{!v||!n(d)||!v.contains(n(d))||v.removeChild(n(d))},u=v=>{!v||!n(d)||v.contains(n(d))||v.appendChild(n(d))};Fe(()=>{u(s())}),At(()=>(u(s()),()=>r(s())));var f=Ky(),p=C(f);ei(p,()=>{var v;return(v=e.children)!=null?v:$t}),S(f),it(f,v=>D(d,v),()=>n(d)),$(t,f),F(),o()}var qy=L('<div class="tooltip s-1o"><div class="content s-1o"> </div> <div class="tooltip-pointer s-1o"></div></div>'),Gy=L("<div><!></div> <!>",1),Yy={hash:"s-1o",code:'.tooltip-wrapper.s-1o{display:flex;flex-direction:column;min-width:0}.full-width.s-1o{width:100%}.tooltip.s-1o{bottom:100%;left:0;opacity:0;position:absolute;transition:opacity .2s,visibility .2s;visibility:hidden}.content.s-1o{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.tooltip-pointer.s-1o{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;line-height:0;position:absolute;width:0}'};function Ka(t,e){B(e,!0),Q(t,Yy);let[i,o]=Be(),s=()=>x(Y,"$overlayContainer$",i),a=()=>x(W,"$containerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"content",3,""),r=g(e,"active",15,!1),u=g(e,"translateX",3,0),f=g(e,"translateY",3,0),p=g(e,"isFullWidthWrapper",3,!1),v=g(e,"maxTooltipWidth",3,void 0),b=g(e,"placement",3,"top"),y=g(e,"onVisibilityChange",3,Qy),_=5,w=K(void 0),I=K(void 0),T,R=K(0),A=K(0),P=K(0),E=K(0),z=Lt(),U=xe(),W=U.ui.playerSize,Y=U.ui.overlayContainer$;Fe(()=>{Et(()=>{y()(r())})});let te=U.getLogger().createComponentLog("Tooltip component"),J=j=>{if(!s()||!n(I)||!n(w))return;D(A,_);let ne=s().getBoundingClientRect(),Se=n(w).getBoundingClientRect(),Le=Se.width,ze=n(I).clientWidth,Ce=a().width,we=(Le-ze)/2,He=Se.left+u()-ne.left,rt=He+we,ct=Se.top+f()-ne.top,Mt=ze/2-_,lt=rt<8,ni=rt+ze>Ce-8;j==="top-left"&&(rt=He),lt&&(rt=8,Mt=He+Se.width/2-2.5*_),ni&&(rt=Ce-8-ze,Mt=Se.left-ne.left+Se.width/2-rt-_),D(P,rt,!0),D(E,ct),D(R,Mt,!0)},oe=()=>{!s()||!n(I)||!n(w)||D(A,-_)},de=()=>{if(!s()||!n(I)||!n(w))return;D(R,_);let j=s().getBoundingClientRect(),ne=n(w).getBoundingClientRect(),Se=ne.height,Le=n(I).clientHeight,ze=(Se-Le)/2+Le,Ce=ne.left+u()-j.left-n(I).clientWidth,we=2,He=Ce-_;He<8&&(He=8);let ct=ne.top+f()-j.top+ze,Mt=we-ze/2,lt=we-_;D(P,He,!0),D(E,ct),D(A,Mt),D(R,lt)},ae=()=>{!s()||!n(I)||!n(w)||D(R,-_)},pe=()=>{switch(b()){case"top":J();break;case"bottom":oe();break;case"left":de();break;case"top-left":J("top-left");break;default:ae();break}},ee=()=>{try{if(!s()||!n(w))return;pe(),r(!0)}catch(j){te({message:String(j)})}},$e=()=>{r(!1)},Ee=()=>{n(I)&&(T||(T=window.setTimeout(ee,z.controls.hideTimeoutTooltips)),r()&&ee())},ce=()=>{$e(),window.clearTimeout(T),T=void 0},Qe=(j,ne,Se)=>{let Le="";switch(b()){case"top":Le=`transform: translate(${j}px, ${ne}px);`;break;case"bottom":Le=`transform: translate(${j}px, ${ne}px); top: auto; bottom: 100%;`;break;case"left":Le=`transform: translate(${j}px, ${ne}px); left: 0; right: auto;`;break;default:Le=`transform: translate(${j}px, ${ne}px);`}return Le+=` max-width: ${v()===void 0?"auto":`${v()}px`};`,Le+=` opacity: ${Se?1:0}; visibility: ${Se?"visible":"hidden"}`,Le},fe=(j,ne)=>{let Se="";switch(b()){case"top-left":case"top":Se=`transform: translate(${j}px, ${ne}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":Se=`transform: translate(${j}px, ${ne}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":Se=`transform: translate(${j}px, ${ne}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:Se=`transform: translate(${j}px, ${ne}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return Se},ve=m(()=>Qe(n(P),n(E),r())),X=m(()=>fe(n(R),n(A)));At(pe),ln(()=>window.clearTimeout(T));var N=Gy(),me=le(N);let ue;me.__pointermove=Ee,me.__pointerdown=ce,me.__pointerup=function(...j){var ne;(ne=e.disableMouseupTooltipShow?void 0:Ee)==null||ne.apply(this,j)};var Re=C(me);ei(Re,()=>{var j;return(j=e.children)!=null?j:$t}),S(me),it(me,j=>D(w,j),()=>n(w));var Je=k(me,2);{var Ae=j=>{am(j,{children:(ne,Se)=>{var Le=qy(),ze=C(Le),Ce=C(ze,!0);S(ze);var we=k(ze,2);S(Le),it(Le,He=>D(I,He),()=>n(I)),O(()=>{Ke(Le,n(ve)),he(Ce,d()),Ke(we,n(X))}),$(ne,Le)},$$slots:{default:!0}})};M(Je,j=>{d()&&!l()&&j(Ae)})}O(j=>ue=ie(me,1,"tooltip-wrapper s-1o",null,ue,j),[()=>({"full-width":p()})]),ft("pointerenter",me,Ee),ft("pointerleave",me,ce),$(t,N),F(),o()}Ze(["pointermove","pointerdown","pointerup"]);var K_=t=>{t.stopPropagation()},jy=L("<div><!></div>"),Xy={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,Xy);let[i,o]=Be(),s=()=>x(u,"$isGraphOpened$",i),a=()=>x(r,"$isMobile",i),l=xe(),d=_o(),r=l.ui.isMobile,u=d.graphIsOpened$,f=l.ui.t,p=g(e,"className",3,""),v=g(e,"disabled",3,!1),b=g(e,"hasTooltip",3,!0),y=g(e,"ref",15,void 0),_=g(e,"width",15,void 0),w=g(e,"isFullWidthTooltip",3,!0),I=g(e,"tooltipContent",3,""),T=g(e,"tooltipVisible",3,!1),R=g(e,"tooltipPlacement",3,"top"),A=g(e,"disabledTooltipContent",19,()=>f("tooltip_button_disabled")),P=g(e,"isAriaHidden",3,!1),E=g(e,"onTooltipVisibilityChange",3,lm),z=g(e,"initialTranslateXPx",3,0),U=g(e,"initialTranslateYPx",19,()=>-18),W=g(e,"mouseEnter",3,lm),Y=g(e,"mouseLeave",3,lm),te=m(()=>v()?s()?f("tooltip_disabled_when_graph_on"):A():I()),J=K(!1);Fe(()=>{T()||D(J,!1)});var oe=jy();oe.__pointerdown=[K_],oe.__click=[K_];var de=C(oe);{var ae=ee=>{Ka(ee,{get content(){return n(te)},get translateX(){return z()},get translateY(){return U()},get isFullWidthWrapper(){return w()},get placement(){return R()},get onVisibilityChange(){return E()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(J)},set active($e){D(J,$e,!0)},children:($e,Ee)=>{var ce=Ve(),Qe=le(ce);ei(Qe,()=>{var fe;return(fe=e.children)!=null?fe:$t}),$($e,ce)},$$slots:{default:!0}})},pe=ee=>{var $e=Ve(),Ee=le($e);ei(Ee,()=>{var ce;return(ce=e.children)!=null?ce:$t}),$(ee,$e)};M(de,ee=>{b()&&n(te)&&!a()?ee(ae):ee(pe,!1)})}S(oe),it(oe,ee=>y(ee),()=>y()),O(()=>{var ee;ie(oe,1,`btn-container ${(ee=p())!=null?ee:""}`,"s-1i"),De(oe,"aria-hidden",P()||null)}),ft("mouseenter",oe,function(...ee){var $e;($e=W())==null||$e.apply(this,ee)}),ft("mouseleave",oe,function(...ee){var $e;($e=Y())==null||$e.apply(this,ee)}),Mn(oe,"clientWidth",_),$(t,oe),F(),o()}Ze(["pointerdown","click"]);var Zy=ke('<rect width="20" height="20" rx="10"></rect><path d="m12.53 8.69.06.19-.22-.64a.83.83 0 0 0-1.6.47l.13.48-.23-.85a.82.82 0 0 0-1.6.24l-.73-2.93a.85.85 0 0 0-1.65.4L8 11.34l-1.12-1.16a.8.8 0 0 0-1.21 1.03l2.23 2.94s1.23 1.83 4.3 1.23c2.43-.48 3.25-2.67 2.58-4.88l-.55-2.3a.88.88 0 1 0-1.7.49"></path>',1);function jd(t,e){let i=m(()=>(e.completed,"interactive-episode-completed-icon"));je(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,s)=>{var a=Zy(),l=le(a),d=k(l);O(()=>{De(l,"fill",da),De(l,"fill-opacity",e.completed?1:.24),De(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),$(o,a)},$$slots:{default:!0}})}var Jy=L("<div><!></div>"),ex={hash:"s-17",code:".interactive-episode-icon.s-17{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-17{opacity:.4;pointer-events:none}"};function dm(t,e){B(e,!0),Q(t,ex);let o=xe().ui.t,s=K(0),a=m(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));ko(t,{get tooltipContent(){return n(a)},initialTranslateXPx:-10,initialTranslateYPx:-10,get disabled(){return e.disabled},get width(){return n(s)},isAriaHidden:!0,isFullWidthTooltip:!1,children:(l,d)=>{var r=Jy();let u;var f=C(r);let p=m(()=>!!e.videoEpisode.completed);jd(f,{get completed(){return n(p)}}),S(r),O(v=>{u=ie(r,1,"interactive-episode-icon s-17",null,u,v),Ke(r,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),Mn(r,"clientWidth",v=>D(s,v)),$(l,r)},$$slots:{default:!0}}),F()}var tx=L('<div><div class="video-episode-inner s-16"><div class="video-episode-loaded s-16"></div> <div></div></div></div>'),ix=L('<div class="video-episodes-wrap s-16"></div>'),ox={hash:"s-16",code:".video-episodes-wrap.s-16{height:100%;position:absolute;width:100%}.video-episode.s-16{box-sizing:border-box;height:calc(var(--slider-height)*3);margin-top:calc(var(--slider-height)*-1);padding:var(--slider-height) var(--slider-video-episode-gap);position:absolute;transition:transform .2s}.video-episode.s-16:first-child{padding-left:0}.video-episode.s-16:last-child{padding-right:0}.video-episode.s-16:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-16,.video-episode-inner.s-16,.video-episode-loaded.s-16{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-16{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-16:first-child .video-episode-inner:where(.s-16),.video-episode.s-16:last-child .video-episode-inner:where(.s-16){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-16{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-16,.video-episode-loaded.s-16{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-16{background-color:var(--slider-filled-bg)}"};function cm(t,e){Q(t,ox);let i=g(e,"videoEpisodes",19,()=>[]);var o=ix();yi(o,21,i,s=>s.from,(s,a)=>{var l=tx();let d;var r=C(l),u=C(r),f=k(u,2);let p;S(r),S(l),O((v,b)=>{d=ie(l,1,"video-episode s-16",null,d,v),Ke(l,`left: ${n(a).from}%; width: ${n(a).width}%`),Ke(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),p=ie(f,1,"video-episode-filled s-16",null,p,b),Ke(f,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),$(s,l)}),S(o),$(t,o)}function nx(t,e,i,o,s,a,l){if(t.preventDefault(),e()&&D(i,e().getBoundingClientRect(),!0),o()||n(s)||!e())return;D(s,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function rx(t,e,i,o,s,a,l,d){if(t.preventDefault(),e())return;let r=i(t.clientX,t.clientY),u=o(t.clientX);s()(r,u,n(a).width,t),n(l)&&d()(r)}function sx(t,e,i,o,s){if(t.preventDefault(),e()||!n(i))return;D(i,!1);let a=o(t.clientX,t.clientY);s()(a,t)}function ax(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function lx(t,e,i,o,s,a){let l=e(t.clientX,t.clientY);i()&&o()(l),D(s,!1),a()(l)}var dx=L("<div></div>"),cx=L('<div class="bars s-h"><div class="loaded s-h"></div> <div></div></div>'),ux=L('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),px={hash:"s-h",code:'.interactive-icons.s-h{position:absolute;top:-28px;width:calc(100% - 20px)}.interactive-icons.mobile.s-h{top:-10px}.slider.s-h{border-radius:var(--slider-radius);cursor:pointer;height:var(--slider-height);position:relative;touch-action:none;transition:opacity .2s;width:100%;will-change:opacity,transform;-webkit-tap-highlight-color:transparent}.no-handle.s-h{cursor:default}.slider.s-h:before{content:"";height:calc(var(--controls-height)/2);left:0;position:absolute;right:0;top:calc((var(--controls-height)/2 - var(--slider-height))*-1/2)}.bars.s-h{background:var(--slider-bg);overflow:hidden}.bars.s-h,.loaded.s-h{border-radius:var(--slider-radius);height:100%;position:absolute;width:100%}.loaded.s-h{background:var(--slider-loaded-bg);left:-100%;transition:transform .2s;will-change:transform}.filled.s-h{background-color:var(--slider-filled-bg);border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.slider.square.s-h,.slider.square.s-h .filled:where(.s-h),.slider.square.s-h .loaded:where(.s-h),.slider.square.s-h>.bars:where(.s-h){border-radius:unset}.filled.active-live.s-h{background-color:var(--timeline-slider-filled-active-live-bg)}.filled.ads.s-h{background-color:var(--slider-filled-ads)}.handleWrap.s-h{left:-100%;position:absolute;width:100%}.handle.s-h{background-color:var(--slider-handle-bg);border-radius:50%;height:var(--slider-handle-size);opacity:0;position:absolute;right:calc(var(--slider-handle-size)*-1/2);top:calc((var(--slider-height) - var(--slider-handle-size))/2);transform:scale(0);transition:opacity .2s,transform .2s;visibility:hidden;width:var(--slider-handle-size);will-change:opacity,transform}.handle.active-live.s-h{background-color:var(--timeline-slider-handle-active-live-bg)}.handle-always-visible.s-h .handle:where(.s-h),.slider-dragging.s-h .handle:where(.s-h),.slider.s-h:hover .handle:where(.s-h){opacity:1;transform:scale(1);visibility:visible}.slider-dragging.s-h .handle:where(.s-h){transform:scale(1.3)}.slider-vertical.s-h{left:-8px;position:absolute;top:-18px;transform:rotate(-90deg);transform-origin:0 0}.slider.disabled.s-h{cursor:default;opacity:.4}'};function Qa(t,e){B(e,!0),Q(t,px);let i=g(e,"ref",15,void 0),o=g(e,"className",3,""),s=g(e,"testId",3,void 0),a=g(e,"isHidden",3,!1),l=g(e,"isVertical",3,!1),d=g(e,"isActiveLive",3,!1),r=g(e,"isMobile",3,!1),u=g(e,"squareBorders",3,!1),f=g(e,"videoEpisodes",19,()=>[]),p=g(e,"withWheelHandler",3,!1),v=g(e,"isInteractive",3,!1),b=g(e,"disabled",3,!1),y=g(e,"hideHandel",3,!1),_=g(e,"onPointerDown",3,Zn),w=g(e,"onHandleMove",3,Zn),I=g(e,"onPointerUp",3,Zn),T=g(e,"onPointerEnter",3,Zn),R=g(e,"onPointerMove",3,Zn),A=g(e,"onPointerLeave",3,Zn),P=g(e,"onMouseEnter",3,Zn),E=g(e,"onMouseLeave",3,Zn),z=g(e,"onWheelUp",3,Zn),U=g(e,"onWheelDown",3,Zn),W=g(e,"onWheelLeft",3,Zn),Y=g(e,"onWheelRight",3,Zn),te=g(e,"onDisabledClick",3,Zn),J=g(e,"loadedProgress",3,0),oe=g(e,"filledProgress",3,0),de=g(e,"handleProgress",3,0),ae=g(e,"ariaLabel",3,""),pe=g(e,"ariaValueMin",3,void 0),ee=g(e,"ariaValueMax",3,void 0),$e=g(e,"ariaValueNow",3,void 0),Ee=g(e,"ariaValueText",3,""),ce=g(e,"onContextMenu",3,Zn),Qe=g(e,"handleAlwaysVisible",3,!1),fe=Lt(),ve=K(void 0),X=K(!1),N=m(()=>{var be;return(be=ee())!=null?be:0}),me=m(()=>{var be;return Q_(f())&&((be=f()[f().length-1])==null?void 0:be.time)<n(N)}),ue=m(()=>Q_(f())&&f().length&&n(me)&&n(N)?ze(J()*100,oe()*100):[]);function Re(be){if(be.preventDefault(),i()&&D(ve,i().getBoundingClientRect(),!0),b())return;let Oe=Se(be.clientX,be.clientY),Ie=Le(be.clientX);T()(Oe,Ie,n(ve).width)}function Je(be){be.preventDefault(),!b()&&A()()}function Ae(){P()()}function j(){E()()}function ne(be){b()||p()&&(be.preventDefault(),be.deltaY<0?z()():be.deltaY>0?U()():be.deltaX>0?Y()():W()())}function Se(be,Oe){return l()?Math.max(0,Math.min(1,(n(ve).height-(Oe-n(ve).top))/n(ve).height)):Math.min(Math.max(be-n(ve).x,0),n(ve).width)/n(ve).width}function Le(be){return Math.min(Math.max(be-n(ve).x,0),n(ve).width)}function ze(be,Oe){let Ie=fe.features.episodesClustering&&!v()?fe.episodeMinWidthPc:0,ht=[],ye=f()[0].time/n(N)*100,qe=0,Ue=0;for(let Pt=1;Pt<f().length;Pt++)qe=f()[Pt].time/n(N)*100,qe-ye>Ie&&(ht.push({from:ye,width:Math.max(0,qe-ye),loadedWidth:Math.max(0,Math.min(qe,be)-ye),filledWidth:Math.max(0,Math.min(qe,Oe)-ye),interactive:f()[Pt-1].interactive,completed:f()[Pt-1].completed}),ye=f()[Pt].time/n(N)*100,Ue++);let st={from:ye,width:Math.max(0,100-ye),loadedWidth:Math.max(0,Math.min(be,100)-ye),filledWidth:Math.max(0,Math.min(Oe,100)-ye),interactive:f()[Ue].interactive,completed:f()[Ue].completed};100-ye<Ie?(Ue-=1,ht[Ue].width+=100-ye,ht[Ue].loadedWidth+=Math.max(0,Math.min(be,100)-ye),ht[Ue].filledWidth+=Math.max(0,Math.min(Oe,100)-ye)):ht[Ue]=st;let qt=f()[0].time;if(qt!==0){let Pt=qt/n(N)*100;ht.unshift({from:0,width:Pt,loadedWidth:Math.min(Pt,be),filledWidth:Math.min(Pt,Oe)})}return ht}function Ce(be){return Math.max(0,Math.min(100,be*100))}let we=m(()=>Ce(J())),He=m(()=>Ce(oe()));var rt=ux(),ct=le(rt);{var Mt=be=>{var Oe=dx();let Ie;yi(Oe,21,()=>n(ue),ht=>ht.from,(ht,ye)=>{var qe=Ve(),Ue=le(qe);{var st=qt=>{dm(qt,{get videoEpisode(){return n(ye)},get disabled(){return b()}})};M(Ue,qt=>{n(ye).interactive&&qt(st)})}$(ht,qe)}),S(Oe),O(ht=>Ie=ie(Oe,1,"interactive-icons s-h",null,Ie,ht),[()=>({mobile:r(),hidden:r()&&!n(X)})]),$(be,Oe)};M(ct,be=>{v()&&be(Mt)})}var lt=k(ct,2);let ni;lt.__pointerdown=[nx,i,ve,b,X,Se,_],lt.__pointermove=[rx,b,Se,Le,R,ve,X,w],lt.__pointerup=[sx,b,X,Se,I],lt.__click=[ax,b,te,Se],lt.__contextmenu=[lx,Se,b,te,X,ce];var wt=C(lt);{var Rt=be=>{cm(be,{get videoEpisodes(){return n(ue)},get disabled(){return b()},get isMobile(){return r()}})},Dt=be=>{var Oe=cx(),Ie=C(Oe),ht=k(Ie,2);let ye;S(Oe),O(qe=>{De(Ie,"data-value",n(we)),Ke(Ie,`transform: translateX(${n(we)}%);`),ye=ie(ht,1,"filled s-h",null,ye,qe),De(ht,"data-value",n(He)),Ke(ht,`transform: translateX(${n(He)}%);`)},[()=>({"active-live":d()})]),$(be,Oe)};M(wt,be=>{n(ue).length?be(Rt):be(Dt,!1)})}var Qt=k(wt,2);let Te;var G=C(Qt);let Ne;S(Qt),S(lt),it(lt,be=>i(be),()=>i()),O((be,Oe,Ie,ht)=>{var ye,qe;ni=ie(lt,1,`slider ${(ye=o())!=null?ye:""}`,"s-h",ni,be),De(lt,"aria-label",ae()),De(lt,"aria-valuemin",pe()),De(lt,"aria-valuemax",ee()),De(lt,"aria-valuenow",$e()),De(lt,"aria-valuetext",Ee()),De(lt,"data-testid",(qe=s())!=null?qe:null),Te=ie(Qt,1,"handleWrap s-h",null,Te,Oe),Ke(Qt,Ie),Ne=ie(G,1,"handle s-h",null,Ne,ht)},[()=>({disabled:b(),"slider-dragging":n(X),hidden:a(),"handle-always-visible":Qe(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${Ce(de())}%);`,()=>({"active-live":d()})]),ft("pointerenter",lt,Re),ft("pointerleave",lt,Je),ft("mouseenter",lt,Ae),ft("mouseleave",lt,j),ft("wheel",lt,ne),$(t,rt),F()}Ze(["pointerdown","pointermove","pointerup","click","contextmenu"]);var no=(t,e)=>Md[t]>=Md[e];var Us=(t,e)=>Md[t]<=Md[e],q_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var mx=L("<div><!></div>"),vx=L("<div><!> <!></div>"),gx={hash:"s-27",code:".volumeBar-container.s-27{align-items:center;display:flex}.vertical.s-27 .btn,.vertical.s-27 .tooltip-wrapper,.volumeBar-container.vertical.s-27{width:40px}.volumeBar.s-27{align-items:center;display:flex;margin:0 8px;position:relative;width:70px;--slider-height:var(--slider-volume-height);--slider-radius:var(--slider-volume-radius);--slider-handle-size:var(--slider-volume-handle-size);--slider-bg:var(--volume-slider-bg);--slider-filled-bg:var(--volume-slider-filled-bg);--slider-handle-bg:var(--volume-slider-handle-bg)}.volumeBar-slider-vertical{width:50px!important}.volumeBar-vertical.s-27{padding:0 8px 0 0;width:0}"};function um(t,e){var Le,ze;B(e,!0),Q(t,gx);let[i,o]=Be(),s=()=>x(R,"$isAudioAvailable$",i),a=()=>x(v,"$muted$",i),l=()=>x(p,"$volume$",i),d=()=>x(w,"$currentGridType$",i),r=()=>x(Re,"$controlsVisible",i),u=xe(),f=Lt(),p=u.state.volume$,v=u.state.muted$,{setVolume:b,startVolumeChanging:y,stopVolumeChanging:_}=u.actions.internal,w=u.ui.currentGridType$,I=(Le=u.callbacks)==null?void 0:Le.onAudioDoesNotExistHint,T=(ze=u.callbacks)==null?void 0:ze.onAudioDisabledHint,R=u.state.isAudioAvailable$,A=u.state.isAudioDisabled,P=u.ui.t,E=K(!1),z,U=m(()=>e.isAds||s()),W=m(()=>!n(U)||a()||l()===0),Y=m(()=>Us(d(),"l")),te=m(()=>n(Y)?"":n(W)?!s()||A?P("tooltip_sound_unavailable"):P("tooltip_volume"):P("tooltip_volume_muted")),J=m(()=>n(W)?P("tooltip_volume"):P("tooltip_volume_muted")),oe=m(()=>n(W)?0:l()),de=!1,ae=m(()=>e.isAds?!1:A?!T:s()?!1:!I);function pe(Ce){y(),b(Ce)}function ee(){Ru(u,l(),f.controls.volumeStepWheel)}function $e(){Du(u,l(),f.controls.volumeStepWheel)}function Ee(Ce){b(Ce)}function ce(Ce){b(Ce),_()}function Qe(){de=!0}function fe(){de=!1,N()}function ve(){clearTimeout(z),D(E,!0)}function X(){N()}function N(){z=window.setTimeout(()=>{de||D(E,!1)},f.controls.volumeBarTimeout)}function me(Ce){Ce.preventDefault(),Ce.deltaY<0?ee():Ce.deltaY>0&&$e()}let ue=K(!1),Re=u.ui.controlsVisible;Fe(()=>{r()||D(ue,!1)});var Je=vx();let Ae;var j=C(Je);Ka(j,{get content(){return n(te)},translateY:-18,get active(){return n(ue)},set active(Ce){D(ue,Ce,!0)},children:(Ce,we)=>{let He=m(()=>n(Y)?"btn-volume-vertical":"btn-volume-horizontal");Ft(Ce,{className:"btn-full-opacity",get disabled(){return n(ae)},get testId(){return n(He)},get ariaLabel(){return n(J)},get click(){return e.click},get ariaKeyShortCut(){return ys.KeyM},role:"button",children:(rt,ct)=>{ga(rt,{get size(){return"24"},get volume(){return l()},get muted(){return n(W)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var ne=k(j,2);{var Se=Ce=>{var we=mx();let He;var rt=C(we);let ct=m(()=>n(Y)?"volumeBar-slider-vertical":""),Mt=m(()=>n(Y)&&!n(E)),lt=m(()=>n(Y)?Qe:Bu),ni=m(()=>n(Y)?fe:Bu),wt=m(()=>Math.round(n(oe)*100)),Rt=m(()=>`${Math.round(n(oe)*100)}%`),Dt=m(()=>n(Y)?"volume-slider-vertical":"volume-slider");Qa(rt,{get className(){return n(ct)},get isHidden(){return n(Mt)},get isVertical(){return n(Y)},withWheelHandler:!0,onWheelUp:ee,onWheelDown:$e,onPointerDown:pe,onHandleMove:Ee,onPointerUp:ce,get onPointerEnter(){return n(lt)},get onPointerLeave(){return n(ni)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(wt)},get ariaValueText(){return n(Rt)},get filledProgress(){return n(oe)},get handleProgress(){return n(oe)},get testId(){return n(Dt)}}),S(we),O(Qt=>He=ie(we,1,"volumeBar s-27",null,He,Qt),[()=>({"volumeBar-vertical":n(Y)})]),$(Ce,we)};M(ne,Ce=>{n(U)&&Ce(Se)})}S(Je),O(Ce=>Ae=ie(Je,1,"volumeBar-container s-27",null,Ae,Ce),[()=>({vertical:n(Y)})]),ft("mouseenter",Je,function(...Ce){var we;(we=n(Y)?ve:Bu)==null||we.apply(this,Ce)}),ft("mouseleave",Je,function(...Ce){var we;(we=n(Y)?X:Bu)==null||we.apply(this,Ce)}),ft("wheel",Je,me),$(t,Je),F(),o()}import{noop as bx}from"@vkontakte/videoplayer-shared/es2015";var hx=ke('<path d="M4.58 13.98a1 1 0 0 1 .99-1h4.45a1 1 0 0 1 1 1v4.45a.99.99 0 0 1-1.99 0v-2.05L5.71 19.7a1 1 0 1 1-1.41-1.4l3.32-3.32H5.57a1 1 0 0 1-.99-1m10.39-6.36 3.32-3.32a1 1 0 1 1 1.41 1.4l-3.32 3.32h2.05a.99.99 0 0 1 0 1.98H14a1 1 0 0 1-1-1V5.57a.99.99 0 1 1 1.98 0z"></path>'),_x=ke('<path d="M10.5 19a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-4.5a1 1 0 0 1 2 0v2.07l3.36-3.36a1 1 0 0 1 1.42 0l.01.01a1 1 0 0 1 0 1.42L7.43 18H9.5a1 1 0 0 1 1 1M18 7.43l-3.36 3.36a1 1 0 0 1-1.42 0l-.01-.01a1 1 0 0 1 0-1.42L16.57 6H14.5a1 1 0 0 1 0-2H19a1 1 0 0 1 1 1v4.5a1 1 0 0 1-2 0z"></path>');function pm(t,e){let i=g(e,"isFullscreen",8,!1),o=hr(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");je(t,{get testId(){return n(o)},children:(s,a)=>{var l=Ve(),d=le(l);{var r=f=>{var p=hx();$(f,p)},u=f=>{var p=_x();$(f,p)};M(d,f=>{i()?f(r):f(u,!1)})}$(s,l)},$$slots:{default:!0}})}function Xd(t,e){B(e,!0);let i=g(e,"isFullscreen",3,!1),o=g(e,"click",3,bx),s=xe(),a=s.ui.isFullscreenOpenedByKeyboard,l=s.ui.t,d=m(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));Ft(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let f=fa(u);a.set(f),o()()},get ariaKeyShortCut(){return ys.KeyF},role:"button",children:(u,f)=>{pm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),F()}var $x=ke('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.26 4.26C3 5.54 3 7.57 3 11.65v.72c0 4.07 0 6.11 1.26 7.38C5.54 21 7.57 21 11.65 21h.72c4.07 0 6.11 0 7.38-1.26C21 18.47 21 16.43 21 12.36v-.72c0-4.07 0-6.11-1.26-7.38C18.47 3 16.43 3 12.36 3h-.72C7.57 3 5.53 3 4.26 4.26M6 8.5c.1 4.68 2.56 7.5 6.61 7.5h.24v-2.68c1.47.15 2.57 1.25 3.02 2.68H18a6 6 0 0 0-3-3.76 5.7 5.7 0 0 0 2.55-3.74h-1.94c-.4 1.49-1.61 2.84-2.77 2.97V8.5h-1.96v5.2c-1.2-.3-2.76-1.76-2.83-5.2z" clip-rule="evenodd"></path></svg>');function fm(t,e){let i=Vn(e,["$$slots","$$events","$$legacy","children"]);var o=$x();oo(o,()=>Ye({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"vk-logo-icon",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:$t}),Xt(),S(o),$(t,o)}var yx=ke('<svg><!><svg data-logo="vk_video"><path d="M7 8.6c0-1.96 0-2.94.38-3.69a3.5 3.5 0 0 1 1.53-1.53C9.66 3 10.64 3 12.6 3h1.36c2.46 0 3.7 0 4.64.48a4.4 4.4 0 0 1 1.92 1.92c.48.94.48 2.18.48 4.64v3.92c0 2.46 0 3.7-.48 4.64a4.4 4.4 0 0 1-1.92 1.92c-.94.48-2.18.48-4.64.48H12.6c-1.96 0-2.94 0-3.69-.38a3.5 3.5 0 0 1-1.53-1.53C7 18.34 7 17.36 7 15.4zm9.26 1.74c.9.54 1.36.81 1.51 1.16.13.3.13.65 0 .96-.15.34-.6.61-1.5 1.15l-2.4 1.43c-.93.56-1.4.84-1.8.8-.33-.03-.64-.2-.84-.48-.23-.31-.23-.86-.23-1.96v-2.85c0-1.1 0-1.64.23-1.96q.31-.42.85-.48c.38-.04.86.25 1.8.8zM5 9.04c0-2.46 0-3.7.48-4.64q.37-.71.95-1.25-.58.1-1.03.33A4.4 4.4 0 0 0 3.48 5.4C3 6.34 3 7.58 3 10.04v3.92c0 2.46 0 3.7.48 4.64a4.4 4.4 0 0 0 1.92 1.92q.45.23 1.03.33a4 4 0 0 1-.95-1.25C5 18.66 5 17.42 5 14.96z"></path></svg><svg x="4" y="3" data-logo="play_market"><path d="M0 1.26v15.47q0 .66.34 1L9.52 9 .33.28C.08.53 0 .92 0 1.26"></path><path d="M.33.28.38.23c.34-.3.89-.32 1.49 0l10.75 5.81-2.6 2.48zm10.29 8.75 2.88 2.45-.53.29-.34.18-2.58-2.44-9.71 8.22c.33.34.9.37 1.53.04l11.1-6 .53-.29 2.73-1.47c1.03-.56 1.03-1.47 0-2.02l-2.77-1.5-.84-.45.84.45.1.05z"></path></svg><svg x="3" data-logo="app_store"><path d="M17.62 16.37q-.48 1.09-1.15 2.03-.9 1.27-1.48 1.75-.88.8-1.9.83-.72 0-1.76-.42a5 5 0 0 0-1.89-.4q-.9 0-1.94.4a5 5 0 0 1-1.68.44q-.98.04-1.95-.85-.62-.53-1.55-1.82a13 13 0 0 1-1.63-3.2 12 12 0 0 1-.69-3.8q0-2.1.93-3.64A5.4 5.4 0 0 1 5.5 5.03q.77 0 2.03.46t1.62.47q.26 0 1.79-.55a6 6 0 0 1 2.43-.42 5.2 5.2 0 0 1 4.05 2.09q-2.4 1.44-2.4 4.02a4.4 4.4 0 0 0 1.49 3.34q.66.61 1.48.95-.18.5-.38.98M13.5.42q0 1.58-1.17 2.94c-.94 1.08-2.07 1.7-3.3 1.6L9 4.56c0-1 .45-2.08 1.24-2.96q.6-.67 1.5-1.12.93-.44 1.74-.48z"></path></svg><path d="M32.55 17.04h2.5L38.7 7h-1.8l-2.94 8.28h-.28L30.84 7H29zm15.52 0-4.61-5.2L47.72 7H45.6l-3.56 4.09h-.42V7h-1.7v10.04h1.7v-4.3h.43l3.76 4.3z"></path><path d="M57.89 11.89a2.2 2.2 0 0 0 1.44-2.16C59.33 8.14 58 7 56.06 7h-3.92v10.04h4.2c1.96 0 3.29-1.14 3.29-2.8 0-1.17-.66-2.04-1.74-2.35m-4.04-3.4h2.21c.92 0 1.54.56 1.54 1.39 0 .8-.62 1.36-1.54 1.36h-2.2zm2.5 7.06h-2.5v-2.81h2.5c.9 0 1.52.57 1.52 1.4 0 .84-.62 1.4-1.52 1.4m4.84 1.5h2.32l2.77-5.5h.22v5.5h1.57v-7.4h-2.32l-2.77 5.5h-.22v-5.5h-1.57zm7.96 2.21h1.64v-2.2h5.33v2.2h1.64v-3.7h-1.29V9.64h-5.43l-.37 3.78c-.13 1.34-.53 2.13-1.34 2.13h-.18zm2.49-3.7c.4-.39.57-1.04.68-2.15l.23-2.27h2.28v4.42zm14.38-2.3a3.7 3.7 0 0 0-3.84-3.76 3.7 3.7 0 0 0-3.85 3.85 3.7 3.7 0 0 0 3.85 3.84c1.54 0 2.99-.72 3.55-2.13l-1.54-.26c-.36.53-1.04.9-1.91.9-1.26 0-2.09-.77-2.24-1.91H86zm-3.84-2.33c1.02 0 1.8.65 2.06 1.58h-4.1a2.1 2.1 0 0 1 2.04-1.58m8.66 6.26c2.32 0 3.96-1.6 3.96-3.84 0-2.25-1.64-3.85-3.96-3.85s-3.97 1.6-3.97 3.85 1.64 3.84 3.97 3.84m0-1.5c-1.34 0-2.25-.95-2.25-2.34 0-1.4.9-2.35 2.25-2.35 1.34 0 2.25.95 2.25 2.35s-.91 2.35-2.25 2.35" class="_ru"></path><path d="M35.02 17.36h-2.48L29 7.42h1.83l2.83 8.2h.28l2.93-8.2h1.8zm8.41-5.15 4.6 5.15h-2.24l-3.75-4.26h-.43v4.26h-1.7V7.42h1.7v4.05h.41l3.55-4.05h2.1zm13.37 5.15h-2.48L50.8 7.42h1.83l2.82 8.2h.29l2.92-8.2h1.8zm6.46 0h-1.64v-7.33h1.64zm-.81-8.37q-.45 0-.74-.27a1 1 0 0 1-.28-.72q0-.44.28-.72.3-.28.74-.28t.72.28q.3.29.29.72 0 .44-.29.72t-.72.27m5.93 8.51q-1.03 0-1.86-.48a3.5 3.5 0 0 1-1.29-1.35 4 4 0 0 1-.45-1.98q0-1.1.45-1.95.46-.88 1.3-1.36.81-.5 1.85-.5.9 0 1.6.38.68.35 1.13.88V7.42h1.63v9.94h-1.22l-.34-1.18q-.46.54-1.17.94a3.4 3.4 0 0 1-1.63.38m.4-1.45q1.04 0 1.68-.65.65-.66.65-1.7t-.65-1.7a2.2 2.2 0 0 0-1.68-.66 2.2 2.2 0 0 0-1.66.66q-.64.66-.64 1.7t.64 1.7q.64.65 1.66.65m13.15-2.44-.03.52h-5.94q.12.86.71 1.38.6.51 1.52.51.63 0 1.13-.24.51-.24.78-.65l1.53.26q-.39 1.01-1.38 1.56-.96.55-2.16.55-1.1 0-1.98-.48a3.6 3.6 0 0 1-1.85-3.33q0-1.1.48-1.95.5-.88 1.37-1.36a4 4 0 0 1 1.98-.5q1.11 0 1.98.5.88.48 1.36 1.34.5.86.5 1.89m-3.84-2.31q-.73 0-1.29.42-.53.42-.74 1.14h4.1a2.2 2.2 0 0 0-2.07-1.56m8.66 6.2q-1.14 0-2.04-.48a3.7 3.7 0 0 1-1.4-1.35 4 4 0 0 1-.5-1.98q0-1.1.5-1.95.5-.88 1.4-1.36.9-.5 2.04-.5t2.03.5q.91.48 1.4 1.36.52.86.52 1.95 0 1.11-.51 1.98-.5.86-1.4 1.35-.9.48-2.04.48m0-1.48q.99 0 1.62-.63.63-.66.63-1.7t-.63-1.67a2.2 2.2 0 0 0-1.62-.65q-.99 0-1.62.65-.62.63-.62 1.67 0 1.05.62 1.7.63.63 1.62.63" class="_en"></path></svg>');function mm(t,e){let i=Vn(e,["$$slots","$$events","$$legacy","children"]);var o=yx();oo(o,()=>Ye({xmlns:"http://www.w3.org/2000/svg",width:"95",height:"24",fill:"var(--btn-color, #fff)","fill-rule":"evenodd","aria-hidden":"true","clip-rule":"evenodd",viewBox:"0 0 95 24",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:$t}),Xt(6),S(o),$(t,o)}var xx={hash:"s-29",code:"svg [data-logo],svg[data-testid=vk-video-logo-icon--en] ._ru,svg[data-testid=vk-video-logo-icon--short] ._en,svg[data-testid=vk-video-logo-icon--short] ._ru,svg[data-testid=vk-video-logo-icon] ._en{opacity:0;visibility:hidden}svg[data-logo=app_store] [data-logo=app_store],svg[data-logo=play_market] [data-logo=play_market],svg[data-logo=vk_video] [data-logo=vk_video]{opacity:1;visibility:visible}"};function vm(t,e){B(e,!0),Q(t,xx);let i=g(e,"short",3,!1),o=g(e,"isCyrillic",3,!0),s=g(e,"logo",19,()=>"vk_video"),a="vk-video-logo-icon--short",l=24,d=m(()=>!o()&&!i()?91:i()?l:95),r=m(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=m(()=>`0 0 ${n(d)} 24`);mm(t,{get width(){return n(d)},height:"24",get viewBox(){return n(u)},get"data-testid"(){return n(r)},get"data-logo"(){return s()}}),F()}function Zd(t,e){B(e,!0);let[i,o]=Be(),s=()=>x(b,"$isMobile",i),a=()=>x(v,"$currentGridType$",i),l=()=>x(_,"$isCyrillicRelatedInterface$",i),d=g(e,"ref",15,void 0),r=g(e,"logoClickable",3,!1),u=g(e,"targetUrl",3,""),f=Lt(),p=xe(),v=p.ui.currentGridType$,b=p.ui.isMobile,y=p.ui.t,_=p.isCyrillicRelatedInterface$,w=m(()=>f.logoType!=="vk"),I=m(()=>n(w)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),T=m(()=>(s()&&Us(a(),"m")||Us(a(),"l"))&&n(w)),R=()=>{var E,z;e.click(),(E=p.callbacks)!=null&&E.onLogoClicked?(z=p.callbacks)==null||z.onLogoClicked():u()&&window.open(u(),"_blank")},A=m(()=>!r()),P=m(()=>n(w)?"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 U=Ve(),W=le(U);{var Y=J=>{vm(J,{get logo(){return f.logoType},get short(){return n(T)},get isCyrillic(){return l()}})},te=J=>{fm(J,{})};M(W,J=>{n(w)?J(Y):J(te,!1)})}$(E,U)},$$slots:{default:!0}}),F(),o()}import{ChromecastState as Tx}from"@vkontakte/videoplayer-core/es2015";import{ChromecastState as Y_}from"@vkontakte/videoplayer-core/es2015";var wx=ke('<path d="M3.6 13.3a5.1 5.1 0 0 1 5.05 5.83.9.9 0 0 1-1.78-.26 3.3 3.3 0 0 0-3.74-3.74.9.9 0 0 1-.26-1.78c.24-.03.49-.05.73-.05Z" class="s-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),Sx=ke('<path d="M3.60219 13.2993C6.41858 13.2995 8.70256 15.5835 8.70278 18.3999C8.70277 18.6469 8.68424 18.8909 8.65004 19.1294C8.57937 19.6212 8.12333 19.9625 7.63149 19.8921C7.13968 19.8213 6.79823 19.3654 6.86879 18.8735C6.89087 18.7195 6.90199 18.5611 6.902 18.3999C6.90178 16.5776 5.42447 15.1003 3.60219 15.1001C3.441 15.1001 3.28267 15.1112 3.12856 15.1333C2.63666 15.2039 2.18077 14.8624 2.11 14.3706C2.03966 13.8788 2.38091 13.4227 2.8727 13.3521C3.11125 13.3178 3.35516 13.2993 3.60219 13.2993Z"></path><path d="M3.60219 9.69971C8.40682 9.69977 12.3021 13.5953 12.3024 18.3999C12.3024 18.6248 12.2938 18.8489 12.277 19.0698C12.239 19.5651 11.8065 19.9365 11.3112 19.8989C10.8157 19.8611 10.4445 19.4286 10.4821 18.9331C10.4954 18.7576 10.5026 18.5791 10.5026 18.3999C10.5023 14.5894 7.41271 11.5005 3.60219 11.5005C3.42268 11.5005 3.24474 11.5066 3.06899 11.52C2.57352 11.5578 2.14115 11.1863 2.10317 10.6909C2.06587 10.1957 2.43694 9.76287 2.93227 9.7251C3.15348 9.70823 3.37699 9.69971 3.60219 9.69971Z"></path><path d="M3.60219 16.8999C4.43047 16.8999 5.10198 17.5717 5.10219 18.3999C5.10209 19.2282 4.43054 19.8999 3.60219 19.8999C2.77383 19.8999 2.10229 19.2282 2.10219 18.3999C2.10241 17.5717 2.7739 16.8999 3.60219 16.8999Z"></path><path d="M16.2379 4.1001C17.0459 4.10009 17.7067 4.10017 18.2438 4.14404C18.7997 4.18946 19.3022 4.28599 19.7711 4.5249C20.5049 4.89882 21.1014 5.49623 21.4752 6.22998C21.714 6.69873 21.8107 7.20063 21.8561 7.75635C21.9 8.29338 21.9001 8.95424 21.9 9.76221V14.2378C21.9001 15.0458 21.9 15.7066 21.8561 16.2437C21.8107 16.7996 21.7141 17.3021 21.4752 17.771C21.1014 18.5046 20.5048 19.1012 19.7711 19.4751C19.3022 19.714 18.7997 19.8105 18.2438 19.856C17.7067 19.8998 17.0459 19.8999 16.2379 19.8999H14.9997C14.503 19.8996 14.1005 19.4972 14.1002 19.0005C14.1002 18.5036 14.5028 18.1004 14.9997 18.1001H16.1998C17.0548 18.1001 17.6422 18.0992 18.0973 18.062C18.5419 18.0257 18.7809 17.9596 18.9538 17.8716C19.3489 17.6702 19.6704 17.3487 19.8717 16.9536C19.9598 16.7808 20.0258 16.5417 20.0622 16.0972C20.0993 15.6421 20.1002 15.0546 20.1002 14.1997V9.80029C20.1002 8.94536 20.0993 8.35794 20.0622 7.90283C20.0258 7.45834 19.9598 7.21921 19.8717 7.04639C19.6704 6.6514 19.3487 6.33073 18.9538 6.12939C18.7809 6.04133 18.5419 5.97431 18.0973 5.93799C17.6422 5.9008 17.0548 5.8999 16.1998 5.8999H6.00063L5.83071 5.90674C4.99191 5.97398 4.28981 6.53462 4.01918 7.30029C3.85342 7.76872 3.33928 8.01472 2.87075 7.84912C2.40214 7.68346 2.15628 7.16833 2.32192 6.69971C2.85696 5.18632 4.30125 4.1001 6.00063 4.1001H16.2379Z"></path><path d="M2.95114 7.11345C2.42394 7.1914 1.90399 6.78569 2.00995 6.2634C2.05777 6.0277 2.12517 5.82449 2.22018 5.63803C2.5078 5.07354 2.96674 4.6146 3.53123 4.32698C4.17296 4 5.01304 4 6.6932 4H17.2001C18.8803 4 19.7204 4 20.3621 4.32698C20.9266 4.6146 21.3855 5.07354 21.6731 5.63803C22.0001 6.27976 22.0001 7.11984 22.0001 8.8V15.2C22.0001 16.8802 22.0001 17.7202 21.6731 18.362C21.3855 18.9265 20.9266 19.3854 20.3621 19.673C19.7204 20 18.8803 20 17.2001 20H15.7196C15.2009 20 14.8203 19.5134 14.8938 19C14.9638 18.5101 15.0001 18.0093 15.0001 17.5C15.0001 11.701 10.2991 7 4.5001 7C3.97384 7 3.45662 7.03872 2.95114 7.11345Z"></path>',1),Cx={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 Jd(t,e){B(e,!0),Q(t,Cx);let i=g(e,"isMobile",3,!1),o=m(()=>e.iconState===Y_.CONNECTED),s=m(()=>e.iconState===Y_.CONNECTING),a=m(()=>n(o)?"#2688EB":da),l=m(()=>e.size?dn(e.size):void 0);var d=Ve(),r=le(d);{var u=p=>{je(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(v,b)=>{var y=wx();Xt(2),$(v,y)},$$slots:{default:!0}})},f=p=>{je(p,{get style(){return n(l)},testId:"chromecast-icon",children:(v,b)=>{var y=Sx(),_=le(y);let w;var I=k(_);let T;var R=k(I);let A;var P=k(R);let E;var z=k(P);let U;O((W,Y,te,J,oe)=>{w=ie(_,0,"wave2 s-18",null,w,W),T=ie(I,0,"wave3 s-18",null,T,Y),A=ie(R,0,"wave1 s-18",null,A,te),E=ie(P,0,"s-18",null,E,J),U=ie(z,0,"s-18",null,U,oe)},[()=>({animated:n(s)}),()=>({animated:n(s)}),()=>({animated:n(s)}),()=>({hidden:n(o)}),()=>({hidden:!n(o)})]),$(v,y)},$$slots:{default:!0}})};M(r,p=>{i()?p(u):p(f,!1)})}$(t,d),F()}import{noop as Ix}from"@vkontakte/videoplayer-shared/es2015";function ec(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),s=g(e,"click",3,Ix),l=xe().ui.t,d=m(()=>e.state===Tx.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));Ft(t,{get ariaLabel(){return n(d)},get click(){return s()},testId:"btn-chromecast",get ref(){return i()},set ref(r){i(r)},children:(r,u)=>{Jd(r,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),F()}import{noop as Px}from"@vkontakte/videoplayer-shared/es2015";var Ex=ke('<path d="m21.62 16.5-.02.07q-.22 1.27-.42 2.09a5 5 0 0 1-.64 1.5 4.4 4.4 0 0 1-2.51 1.73q-.77.18-1.63.07t-2.11-.34l-4.34-.8q-1.27-.22-2.1-.42a5 5 0 0 1-1.5-.65 4.4 4.4 0 0 1-1.72-2.5 5 5 0 0 1-.07-1.63q.1-.84.34-2.11l.01-.07q.22-1.27.43-2.1a5 5 0 0 1 .64-1.5 4.4 4.4 0 0 1 2.5-1.73 5 5 0 0 1 1.64-.07q.83.1 2.1.35l4.34.8q1.28.21 2.1.42a5 5 0 0 1 1.5.64 4.4 4.4 0 0 1 1.73 2.5q.18.78.07 1.64-.1.83-.34 2.1m-1.45-2.3c.05-.49.03-.77-.02-1a2.6 2.6 0 0 0-1.02-1.48 3 3 0 0 0-.93-.37c-.48-.13-1.1-.24-2-.4l-4.26-.79c-.9-.16-1.52-.27-2.01-.33a3 3 0 0 0-1 .03 2.6 2.6 0 0 0-1.48 1.02 3 3 0 0 0-.37.92c-.13.48-.24 1.1-.4 2s-.28 1.51-.33 2c-.06.5-.04.78.02 1 .15.6.51 1.13 1.02 1.48.19.13.45.25.92.37.48.13 1.1.25 2 .4l4.27.79c.9.16 1.52.28 2.01.33s.77.03 1-.02a2.6 2.6 0 0 0 1.47-1.03c.14-.19.25-.45.38-.92.12-.48.24-1.1.4-2s.28-1.51.33-2"></path><path d="M18.19 7.49a.9.9 0 0 1-1.05-.73c-.14-.8-.2-1.08-.28-1.3A2.6 2.6 0 0 0 14.5 3.8c-.22 0-.5.04-1.31.17l-5.85.96a8 8 0 0 0-2.17.5 2.6 2.6 0 0 0-1.33 1.75c-.08.38-.04.85.11 2.23l.01.1a.9.9 0 1 1-1.78.2l-.01-.1-.02-.17a9 9 0 0 1-.07-2.64 4.4 4.4 0 0 1 2.25-2.97c.63-.33 1.42-.46 2.56-.65l.16-.03 5.85-.96.1-.01c.67-.11 1.13-.19 1.55-.18a4.4 4.4 0 0 1 4 2.82c.14.39.23.85.35 1.53l.01.1a.9.9 0 0 1-.72 1.04"></path><path d="M12.72 12.41a.42.42 0 0 0-.69.23l-.72 4.18a.4.4 0 0 0 .03.23c.08.2.33.3.54.22l3.67-1.47a.4.4 0 0 0 .12-.68z"></path>',1);function gm(t){je(t,{testId:"episodes-icon",children:(e,i)=>{var o=Ex();Xt(2),$(e,o)},$$slots:{default:!0}})}var Fu=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var kx=L('<span class="text mobile s-22"> </span> <div class="chevron-episodes s-22" data-testid="btn-episodes_icon"><!></div>',1),Ax=L('<span class="text s-22"> </span>'),Lx=L('<span class="text count s-22"> </span>'),Mx=L('<span class="icon s-22"><!></span> <!>',1),Vx={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 tc(t,e){var de,ae,pe;B(e,!0),Q(t,Vx);let[i,o]=Be(),s=()=>x(y,"$currentGridType$",i),a=()=>x(_,"$openedByKeyboard$",i),l=()=>x(w,"$panelOpened$",i),d=()=>x(I,"$isMobile",i),r=g(e,"position",3,0),u=g(e,"duration",3,0),f=g(e,"timeCodes",19,()=>[]),p=xe(),v=(ae=(de=p.callbacks)==null?void 0:de.onEpisodeChanged)!=null?ae:Px,b=!!((pe=p.callbacks)!=null&&pe.onEpisodeClicked),y=p.ui.currentGridType$,_=p.ui.episodes.openedByKeyboard$,w=p.ui.episodes.panelOpened$,I=p.ui.isMobile,T=p.ui.t,R=K(void 0),A=ee=>{var Ee,ce,Qe;if(!!((Ee=p.callbacks)!=null&&Ee.onEpisodeClicked)){let fe=fa(ee);_.set(fe),w.set(!0),(Qe=(ce=p.callbacks)==null?void 0:ce.onEpisodeClicked)==null||Qe.call(ce,fe)}},P=K(null),E=m(()=>r()/u());Fe(()=>{var $e;let ee=Fu(n(E),u(),f());ee?(($e=n(P))==null?void 0:$e.time)!==ee.time&&(v(ee),D(P,ee,!0)):D(P,null)});let z=m(()=>{var ee;return((ee=n(P))==null?void 0:ee.text)||""}),U=m(()=>no(s(),"xl")?"FULL":no(s(),"m")?"COUNT":"SHORT"),W=m(()=>`${T("tooltip_episodes")}: ${n(z)}`),Y=(ee,$e,Ee)=>bt(null,null,function*(){yield mo(),(ee==null?void 0:ee.getAttribute("aria-expanded"))==="false"&&$e&&!Ee&&Et(()=>{_.set(!1),ee.focus()})});Fe(()=>{Y(n(R),a(),l())});var te=Ve(),J=le(te);{var oe=ee=>{let $e=m(()=>d()?"px-0":""),Ee=m(()=>!b);Ft(ee,{get className(){var ce;return`w-max btn-full-opacity btn-jc-l ${(ce=n($e))!=null?ce:""}`},testId:"btn-episodes",click:A,get disabled(){return n(Ee)},get ariaExpanded(){return l()},get ariaLabel(){return n(W)},get ref(){return n(R)},set ref(ce){D(R,ce,!0)},children:(ce,Qe)=>{var fe=Ve(),ve=le(fe);{var X=me=>{var ue=kx(),Re=le(ue),Je=C(Re,!0);S(Re);var Ae=k(Re,2),j=C(Ae);Or(j,{direction:"right"}),S(Ae),O(()=>he(Je,n(z))),$(me,ue)},N=me=>{var ue=Mx(),Re=le(ue),Je=C(Re);gm(Je,{}),S(Re);var Ae=k(Re,2);{var j=Se=>{var Le=Ax(),ze=C(Le,!0);S(Le),O(()=>he(ze,n(z))),$(Se,Le)},ne=(Se,Le)=>{{var ze=Ce=>{var we=Lx(),He=C(we,!0);S(we),O(()=>he(He,f().length)),$(Ce,we)};M(Se,Ce=>{n(U)==="COUNT"&&Ce(ze)},Le)}};M(Ae,Se=>{n(U)==="FULL"?Se(j):Se(ne,!1)})}$(me,ue)};M(ve,me=>{d()?me(X):me(N,!1)})}$(ce,fe)},$$slots:{default:!0}})};M(J,ee=>{n(P)&&ee(oe)})}$(t,te),F(),o()}import{debounceFn as yb}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as i2,PlaybackState as Wl,Player as o2,PredefinedQualityLimits as Cs,VideoFormat as rc,clientChecker as ab}from"@vkontakte/videoplayer-core/es2015";import{assertNonNullable as yr,getHighestQuality as n2,InterfaceLanguage as r2,isInvariantQuality as s2,isNonNullable as a2,loadVKLangPack as l2,Logger as d2,map as lb,merge as c2,Observable as ju,Subject as sc,Subscription as db,TracerFactory as u2,ValueSubject as cb,VideoQuality as p2,devNull as f2,now as m2,filter as v2,once as g2,ErrorCategory as ub,suppressAbort as h2}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Ks,ThinOneStat as _2}from"@vkontakte/videoplayer-statistics/es2015";import{detectEmbed as Rx,devNull as ii,now as oi,withoutNullable as j_}from"@vkontakte/videoplayer-shared/es2015";import{addScript as Dx,Subject as cn,clearVideoElement as Ox}from"@vkontakte/videoplayer-shared/es2015";var Nx="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",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 s;this.events.loadStarted$.next();let a=()=>{clearTimeout(s),delete window.admanAsyncInit,window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[oi()]}),o())};Dx(Nx,e,this.loadTimeout).then(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[oi()]}),window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[oi()]}),window.admanAsyncInit=a,s=window.setTimeout(a,this.initTimeout))}).catch(l=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[oi()]}),o(),clearTimeout(s)})});this.loadAdmanNPM=e=>new Promise((i,o)=>{let s;this.events.loadStarted$.next();let a=()=>{clearTimeout(s),delete window.admanAsyncInit,window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[oi()]}),o())},l=()=>{d=!0,o()},d=!1,r=window.setTimeout(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[oi()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[oi()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[oi()]}),!d&&(window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[oi()]}),window.admanAsyncInit=a,s=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(s),clearTimeout(r),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[oi()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[oi(),i.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(i)}`}),this.events.started$.next(e),i.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:"ad muted start"})),this.adsState.duration.set(i.duration),this.adsState.playbackState.set("playing"),this.adsState.canSkip.set(i.allowClose),this.adsState.secondsToWatchBeforeSkip.set(i.allowCloseDelay),this.startWatchDog(),(o=this.externalApi)!=null&&o.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,e,String(i.bannerID))):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=e=>{var o;((o=this.adsState)!=null&&o.playbackState?_e(this.adsState.playbackState):void 0)!=="inactive"&&(this.adsState?(this.adsState.position.set(e.currentTime),this.events.timeRemained$.next(e),this.startWatchDog()):this.onAdError("TimeRemained callback failed: Adman state is not initialized"))};this.onAdPaused=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.stopWatchDog(),this.adsState?(this.log({message:"ad paused"}),this.adsState.playbackState.set("paused")):this.onAdError("Paused callback failed: Adman state is not initialized")};this.onAdPlayed=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.startWatchDog(),this.adsState?(this.log({message:"ad played"}),this.adsState.playbackState.set("playing")):this.onAdError("Player callback failed: Adman is not initialized")};this.onAdMidrollPoint=()=>{if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[oi()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch(e){this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};this.onAdSkipped=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad completed"}),this.currentAdSection?(this.events.ended$.next(this.currentAdSection),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0)):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{var e,i;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad clicked"}),(i=this.videoElement)==null||i.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(e="ad error")=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[oi()]}),this.log({message:e}),this.events.error$.next(e),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()};this.log=e.createComponentLog("AdmanWrapper"),ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[oi()]}),this.loadTimeout=i.loadTimeout,this.initTimeout=i.initTimeout,this.runtimeTimeout=i.runtimeTimeout,this.useAdmanFromNPM=i.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(i.volumeMultiplier,1)),this.isVsidOriginal=i.isVsidOriginal}init(e,i,o){this.actions=e,this.adsState=i,this.playerState=o}onAdmanLoadingError(){this.onAdError("adman loading error")}initAdman(e){return bt(this,null,function*(){var 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:s,adsContainer:a,adsVideoElement:l,slotId:d,params:r={},paramsOverride:u={},duration:f,externalApi:p,json:v}=e;this.externalApi=p;let b,y=this.playerState&&_e(this.playerState.vsid);y&&(this.isVsidOriginal?b=y:b=parseInt(y,36));let{isEmbed:_,immediateOrigin:w}=Rx(),I=(A=_?w:window.location.href)!=null?A:window.location.href,T=j_(Ye(Jt(Ye(Jt(Ye({},r),{dl:encodeURIComponent(I),autoplay:s?1:0,player_width:i,player_height:o}),b?{request_id:b}:{}),{duration:f}),u)),R=j_({slot:v?void 0:d,wrapper:a,videoEl:l,videoQuality:o,params:v?void 0:T,browser:{mobile:!1},json:v});try{let E=new window.AdmanHTML;if(E.onReady(this.onAdsReady),E.onStarted(this.onAdStarted),E.onPlayed(this.onAdPlayed),E.onPaused(this.onAdPaused),E.adMidrollPoint(this.onAdMidrollPoint),E.onClosed(this.onAdClosed),E.onSkipped(this.onAdSkipped),E.onClicked(this.onAdClicked),E.onTimeRemained(this.onAdTimeRemained),E.onCompleted(this.onAdCompleted),E.onError(this.onAdError),E.setDebug(!1),!v&&((P=this.externalApi)!=null&&P.videoGetAds)){let z=yield 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,s,a;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[oi()]}),this.currentAdSection===null&&!e){this.log({message:"switch to video, no currentAdSection. can't switch"});return}let i=this.currentAdSection==="postroll";if(this.actions){if(this.adsState&&this.playerState)this.adsState.playbackState.set("inactive"),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${i}`});else{let l="Switch to video: Adman state was not updated correctly";this.log({message:l}),this.events.error$.next(l)}(a=(s=this.actions).switchFromAdsToVideo)==null||a.call(s,!i)}}setPostrollPassed(e){var i;(i=this.adsState)==null||i.postrollPassed.set(e),this.log({message:"postroll passed"})}togglePlay(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adsState){this.log({message:"toggle play"});let i=_e(this.adsState.playbackState);i==="playing"?this.pause():i==="paused"&&this.play()}else this.onAdError("Can not toggle play: Adman state is not initialized")}setInitialVolume(e){this.log({message:`set initial volume ${e}`}),this.initialVolume=e}setVolume(e){let i=e*this.volumeMultiplier;if(this.log({message:`set volume ${i}`}),this.adman)try{this.adman.setVolume(i)}catch(o){this.onAdError("could not set ad volume")}this.videoElement&&(this.videoElement.volume=i)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch(i){this.onAdError("could not set ad fullscreen")}}startPreroll(){if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[oi()]}),this.adman){if(!this.isDestroyed){this.log({message:"start preroll"}),this.setVolume(this.initialVolume),this.currentAdSection="preroll",this.startWatchDog();try{this.adman.start("preroll")}catch(e){this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch(i){this.onAdError("could not start postroll")}}else this.onAdError("Can not start postroll: Adman is not initialized")}startWatchDog(){this.watchDogTimeout&&this.stopWatchDog(),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch(i){this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch(i){this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(i){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){var o;(o=this.adman)==null||o.setPosition(Math.floor(e),Math.floor(i))}destroy(){var e,i,o,s,a,l,d,r,u,f,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),(s=this.adman)==null||s.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(l=this.adman)==null||l.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(r=this.adman)==null||r.onClicked(void 0),(u=this.adman)==null||u.onTimeRemained(void 0),(f=this.adman)==null||f.onCompleted(void 0),(p=this.adman)==null||p.onError(void 0),(v=this.adman)==null||v.destroy(),this.videoElement&&Ox(this.videoElement),this.isDestroyed=!0}safeExternalCall(e,...i){return bt(this,null,function*(){var o;try{return yield e(...i)}catch(s){return this.onAdError((o=s==null?void 0:s.message)!=null?o:"External call failed"),null}})}};var X_=t=>{let e=Math.round(t);return isNaN(e)||e<40?"":e>=40&&e<55?50:e>=55&&e<90?60:e>=90&&e<180?120:e>=180?240:""};var hm=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(e,i){let o=[],s=e.split(this.twoLinesRegExp);for(let a of s){let l={startTime:0,endTime:0,texts:[],lang:i},d=a.split(this.oneLineRegExp);for(let r of d)if(!l.startTime&&!l.endTime){let u=new Uu,{startTime:f,endTime:p}=u.parse(r);l.startTime=f,l.endTime=p}else if(r.trim()!==""){let u=new _m,{texts:f}=u.parse(r);l.texts=[...l.texts,...f]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},Uu=class{constructor(){this.timeRegExp=/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/;this.timingRegExp=new RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`)}parse(e){let i={startTime:0,endTime:0},o=this.timingRegExp.exec(e);return o&&(i.startTime=this.calcTime(o[1],o[2],o[3],o[4]),i.endTime=this.calcTime(o[6],o[7],o[8],o[9])),i}parseTime(e){let i=this.timeRegExp.exec(e);return i?this.calcTime(i[1],i[2],i[3],i[4]):0}isTime(e){return this.timeRegExp.test(e)}calcTime(e="0",i="0",o="0",s="0"){let a=Number(e)*60*60,l=Number(i)*60,d=Number(o),r=+`0.${s}`;return a+l+d+r}},_m=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},s=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](l){let d=0,r=[];for(;d<l.length;){let u=["<",">"].reduce((f,p)=>{let v=l.indexOf(p,d);return f===-1||f>v?v:f},-1);if(u===-1){r.push(l.substring(d));break}r.push(l.substring(d,u)),d=u+1}return r}}),a=new Uu;for(let l of s)a.isTime(l)?i.texts.push({type:"timestamp",value:a.parseTime(l)}):i.texts.push({type:"text",value:l});return i}},Z_=hm;import{isNonNullable as bm}from"@vkontakte/videoplayer-shared/es2015";var qa,Oi,$m=0,ym=!1,J_="",eb=(t,e=0,i=0)=>t<e&&t<i,zu=(t,e=0,i=0)=>t>=e&&t<=i,Bx=(t,e=0,i=0)=>t>e&&t>i,tb=(t,e,i,o=!1)=>{var d;let s=(d=i.find(({id:r})=>r===e.value))==null?void 0:d.subtitles;if(o)return s==null?void 0:s.find(({startTime:u,endTime:f})=>zu(t,u,f));let a=t>=$m,l=t<$m;if($m=t,l&&(ym=!1),bm(qa)&&zu(t,qa.startTime,qa.endTime)&&J_===e.value)return qa;if(!bm(Oi)&&(s!=null&&s.length)&&!ym){Oi=s.find(({startTime:u,endTime:f})=>zu(t,u,f)||a&&eb(t,u,f)),qa=void 0,!bm(Oi)&&s[s.length-1].endTime<t&&(ym=!0);return}else{if(zu(t,Oi==null?void 0:Oi.startTime,Oi==null?void 0:Oi.endTime))return qa=Oi,Oi=void 0,J_=e.value,qa;(a&&Bx(t,Oi==null?void 0:Oi.startTime,Oi==null?void 0:Oi.endTime)||l&&eb(t,Oi==null?void 0:Oi.startTime,Oi==null?void 0:Oi.endTime))&&(Oi=void 0)}};var Wu={ru:"Русский",en:"English",uk:"Українська",be:"Беларуская (тарашкевiца)",es:"Español",fi:"Suomi",de:"Deutsch",it:"Italiano",bg:"Български",hr:"Hrvatski",hu:"Magyar",sr:"Српски",pt:"Português",el:"Ελληνικά",pl:"Polski",fr:"Français",ko:"한국어","zh-CN":"汉语",lt:"Lietuvių",ja:"日本語",cs:"Čeština",et:"Eesti",tt:"Татарча",ba:"Башҡортса",cv:"Чăвашла",sk:"Slovenčina",ro:"Română",no:"Norsk",lv:"Latviešu",az:"Azərbaycan dili",hy:"Հայերեն",sv:"Svenska",nl:"Nederlands",tk:"Türkmen",ka:"ქართული",da:"Dansk",uz:"O‘zbek",th:"ภาษาไทย",id:"Bahasa Indonesia",tg:"Тоҷикӣ",sl:"Slovenščina",bs:"Bosanski","pt-BR":"Português brasileiro",fa:"فارسی",vi:"Tiếng Việt",hi:"हिन्दी",si:"සිංහල",bn:"বাংলা",tl:"Tagalog",mn:"Монгол",my:"ဗမာစာ",tr:"Türkçe",ne:"नेपाली",ur:"اردو",ky:"Кыргыз тили",pa:"پنجابی",os:"Ирон",kn:"ಕನ್ನಡ",sw:"Kiswahili",kk:"Қазақша",ar:"العربية",he:"עברית",ab:"Аҧсшәа",eu:"Euskara",eo:"Esperanto"},Fx={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"},ic=t=>{var e,i;return(i=(e=Wu[t])!=null?e:Wu[Fx[t]])!=null?i:void 0};import{ValueSubject as Em}from"@vkontakte/videoplayer-shared/es2015";function Ku(t){let e="";return ro(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),ro(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),ro(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),ro(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),ro(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),ro(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),ro(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),ro(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),ro(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),ro(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),ro(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),ro(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),ro(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),ro(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),ro(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),ro(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),ro(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),ro(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),ro(t.font)&&(e+=`--font:${t.font};`),ro(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),ro(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function ro(t){return typeof t=="string"&&!t.includes(";")}var Hx=ke('<path d="M31.257 3.998c3.037.01 4.52.39 6.13 1.24a9 9 0 013.47 3.35l.17.31.15.3c.78 1.55 1.07 3.18 1.09 6.25v9.04a1.5 1.5 0 01-3 .02v-9.65c-.05-2.04-.24-3.12-.64-4.04l-.12-.27-.13-.25A6 6 0 0036.2 7.9c-1.19-.64-2.34-.88-5.11-.9h-8.84c-2.73 0-4 .2-5.07.7l-.25.13a6 6 0 00-2.4 2.41c-.64 1.19-.88 2.34-.9 5.11v20.83c0 2.74.2 4 .7 5.08l.13.25a6 6 0 002.41 2.4c1.1.6 2.13.83 4.44.89H26a1.5 1.5 0 010 3h-4.47c-3-.05-4.53-.38-6.14-1.24a9 9 0 01-3.48-3.35l-.15-.3c-.73-1.47-1.04-3.01-1.08-5.8V15c.05-2.98.39-4.52 1.25-6.12a9 9 0 013.293-3.582c1.85-.871 2.623-1.27 5.747-1.27z"></path><path d="M30.5 33.8c0-1.68 0-2.52.33-3.16a3 3 0 0 1 1.3-1.31c.65-.33 1.49-.33 3.17-.33h6.4c1.68 0 2.52 0 3.16.33a3 3 0 0 1 1.31 1.3c.33.65.33 1.49.33 3.17v13.4c0 1.68 0 2.52-.33 3.16a3 3 0 0 1-1.3 1.31c-.65.33-1.49.33-3.17.33h-6.4c-1.68 0-2.52 0-3.16-.33a3 3 0 0 1-1.31-1.3c-.33-.65-.33-1.49-.33-3.17z"></path>',1),Ux=L('<div><div><!></div> <span class="title s-0"> </span></div>'),zx={hash:"s-0",code:".player-pip-dummy.s-0{align-items:center;background-color:#19191a;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;width:100%}.player-pip-dummy.is-pip-api.s-0{position:relative}.dummy-image.s-0 svg{transform:scale(1.07143)}.dummy-image.desktop.s-0{transform:scale(1.07143) rotate(-90deg) rotateY(180deg)}.title.s-0{color:#fff;font-size:16px;padding:18px 20px 10px;text-align:center}"};function xm(t,e){B(e,!0),Q(t,zx);let[i,o]=Be(),s=()=>x(u,"$interfaceLanguage$",i),a=()=>x(f,"$isMobile$",i),l=xe(),d=Lt(),r=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,f=l.ui.isMobile,p=l.ui.t,v=m(()=>s()&&p("pip_dummy_title")),b=Ku(d.view);var y=Ux();let _;var w=C(y);let I;var T=C(w);je(T,{width:"57",height:"56",testId:"pip-dummy-icon",children:(P,E)=>{var z=Hx();Xt(),$(P,z)},$$slots:{default:!0}}),S(w);var R=k(w,2),A=C(R,!0);S(R),S(y),O((P,E)=>{_=ie(y,1,"player-pip-dummy s-0",null,_,P),Ke(y,b),I=ie(w,1,"dummy-image s-0",null,I,E),he(A,n(v))},[()=>({"is-pip-api":r}),()=>({desktop:!a()})]),$(t,y),F(),o()}import{clientChecker as rb}from"@vkontakte/videoplayer-core/es2015";import{debounceFn as Kx,getWindow as wm,ValueSubject as Sm}from"@vkontakte/videoplayer-shared/es2015";import{detectEmbed as Wx,getWindow as ib}from"@vkontakte/videoplayer-shared/es2015";var ha=()=>{var t;return(t=ib().document)==null?void 0:t.pictureInPictureEnabled},Hl=()=>{let{isEmbed:t}=Wx();return"documentPictureInPicture"in ib()&&!t},Qu=t=>!!t.pictureInPictureWindow,ob=t=>!!t.target&&"height"in t.target&&"width"in t.target,nb=t=>typeof t=="boolean"?t:t!==void 0;var Ga=class{constructor({enabled:e=!0}){this.isRequested=!1;this.videoElement=void 0;this.playerContainer=void 0;this.externalEventHandlers={};this.eventHandlers={enterpictureinpicture:this.onEnterPictureInPicture.bind(this),leavepictureinpicture:this.onLeavePictureInPicture.bind(this),resize:Kx(this.onResize.bind(this),300)};this.info={isActive$:new Sm(!1),isEnabled$:new Sm(!1),type:0};this.info.isEnabled$=new Sm(e)}isSupported(){return ha()}isActive(){return this.info.isActive$.getValue()}setContext(e){this.svelteContext=e}revealPictureInPicture(){return bt(this,null,function*(){this.isRequested&&(this.removeEventHandlers(),yield this.request(),this.addEventHandlers())})}request(){return bt(this,null,function*(){var e;if(!(!this.isSupported()||this.isActive()))try{yield(e=this.videoElement)==null?void 0:e.requestPictureInPicture()}catch(i){this.isRequested=!1}})}exit(){return bt(this,null,function*(){let{document:e}=wm();!this.isSupported()||!this.isActive()||!this.videoElement||!e.pictureInPictureElement||(yield e.exitPictureInPicture(),rb.browser.isYandex&&!this.videoElement.isConnected&&this.onLeavePictureInPicture())})}assignPlayerContainer(e){this.isSupported()&&(this.playerContainer=e)}updateVideoElement(){this.isSupported()&&this.exit().finally(()=>{var i;this.removeEventHandlers();let e=this.videoElement;this.videoElement=(i=this.playerContainer)==null?void 0:i.querySelector("video"),this.waitForSafariLeavePictureInPicture(e,this.videoElement),this.addEventHandlers()})}addEventHandlers(){var e,i;(e=this.videoElement)==null||e.addEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.addEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}setExternalEventHandlers(e){this.externalEventHandlers=Ye({},e)}removeEventHandlers(){var e,i;(e=this.videoElement)==null||e.removeEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.removeEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}dispose(){return bt(this,null,function*(){this.removeEventHandlers(),yield this.exit(),this.info.isActive$.next(!1),this.isRequested=!1})}onEnterPictureInPicture(e){var o,s;let i=Qu(e)?e.pictureInPictureWindow:void 0;this.info.isActive$.next(!0),this.isRequested=!0,i==null||i.addEventListener("resize",this.eventHandlers.resize),(s=(o=this.externalEventHandlers).enterpictureinpicture)==null||s.call(o)}onLeavePictureInPicture(e){var i,o;if(e){let s=Qu(e)?e.pictureInPictureWindow:void 0;s==null||s.removeEventListener("resize",this.eventHandlers.resize)}this.info.isActive$.next(!1),this.isRequested=!1,this.eventHandlers.resize.cancel(),(o=(i=this.externalEventHandlers).leavepictureinpicture)==null||o.call(i)}onResize(e){var o,s;let i=ob(e)?e.target:Qu(e)?e.pictureInPictureWindow:void 0;i&&((s=(o=this.externalEventHandlers).resize)==null||s.call(o,{width:i.width,height:i.height}))}setEnabled(e){this.info.isEnabled$.next(e)}waitForSafariLeavePictureInPicture(e,i){if(rb.browser.isSafari&&e&&e!==i){let s=this.eventHandlers.leavepictureinpicture,a=0,l=()=>{wm().clearTimeout(a),e.removeEventListener("leavepictureinpicture",d)},d=r=>(s(r),l());e.addEventListener("leavepictureinpicture",d),a=wm().setTimeout(l,1e3)}}};function Tm(t){return t instanceof Ga}var Qx=Object.defineProperty,qx=Object.defineProperties,Gx=Object.getOwnPropertyDescriptors,sb=Object.getOwnPropertySymbols,Yx=Object.prototype.hasOwnProperty,jx=Object.prototype.propertyIsEnumerable,Pm=(t,e,i)=>e in t?Qx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Xx=(t,e)=>{for(var i in e||(e={}))Yx.call(e,i)&&Pm(t,i,e[i]);if(sb)for(var i of sb(e))jx.call(e,i)&&Pm(t,i,e[i]);return t},Zx=(t,e)=>qx(t,Gx(e)),zs=(t,e,i)=>Pm(t,typeof e!="symbol"?e+"":e,i),Im=(t,e,i)=>new Promise((o,s)=>{var a=r=>{try{d(i.next(r))}catch(u){s(u)}},l=r=>{try{d(i.throw(r))}catch(u){s(u)}},d=r=>r.done?o(r.value):Promise.resolve(r.value).then(a,l);d((i=i.apply(t,e)).next())}),Jx=400,e2=225,nc=class{constructor({enabled:e=!0,initialSize:i={width:Jx,height:e2}}){zs(this,"initialSize"),zs(this,"playerDomElement"),zs(this,"playerParentShadowRoot"),zs(this,"playerDummyElement"),zs(this,"svelteContext"),zs(this,"pipWindow"),zs(this,"info",{isActive$:new Em(!1),isEnabled$:new Em(!1),type:1}),zs(this,"pipActive",!1),zs(this,"pipApi"),this.initialSize=i,this.info.isEnabled$=new Em(e),ha()&&(this.pipApi=new Ga({enabled:e}),this.pipApi.info.isActive$.subscribe(o=>{(o&&!this.info.isActive$.getValue()||!o&&this.pipActive)&&this.info.isActive$.next(o),this.pipActive=o}))}isSupported(){return Hl()}isActive(){return this.info.isActive$.getValue()}setPlayerDomElement(e,i){this.playerDomElement=e,this.playerParentShadowRoot=i}setContext(e){this.svelteContext=e}request(){return Im(this,null,function*(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=yield documentPictureInPicture.requestWindow(Zx(Xx({},this.initialSize),{copyStyleSheets:!0})),this.pipWindow.document.body.style.margin="0";let o=[...this.playerParentShadowRoot.styleSheets].map(r=>[...r.cssRules].map(u=>u.cssText).join(" ")).filter(Boolean).join(`
|
|
59
|
-
`),s=document.createElement("style");s.textContent=o;let a=this.createStretchedContainer(),l=a.attachShadow({mode:"open"});l.append(s),l.append(this.playerDomElement);let d={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=es(xm,d),(e=this.pipWindow)==null||e.document.body.append(a),this.info.isActive$.next(!0),(i=this.pipWindow)==null||i.addEventListener("unload",r=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(Oa(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})})}exit(){return Im(this,null,function*(){return new Promise(e=>{var i,o,s;this.pipWindow?((i=documentPictureInPicture.window)==null||i.close(),window.focus()):(o=this.pipApi)!=null&&o.isActive()&&((s=this.pipApi)==null||s.exit()),e()})})}dispose(){return Im(this,null,function*(){yield this.exit()})}setEnabled(e){var i;this.info.isEnabled$.next(e),(i=this.pipApi)==null||i.setEnabled(e)}assignPlayerContainer(e){var i;(i=this.pipApi)==null||i.assignPlayerContainer(e)}updateVideoElement(){var e;(e=this.pipApi)==null||e.updateVideoElement()}setExternalEventHandlers(e){var i;(i=this.pipApi)==null||i.setExternalEventHandlers(e)}createStretchedContainer(){let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e}};function qu(t){return t instanceof nc}var km=(t,e)=>{if(nb(e)&&Hl())return new nc(Ye({enabled:t},typeof e!="boolean"&&e));if(ha())return new Ga({enabled:t})};import{Subscription as t2}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-statistics/es2015";var Gu=class{constructor(e,i,o,s=new t2){this.oneStat=e;this.thinOneStat=i;this.mediascopePixel=o;this.statSubscription=s}destroy(){var e,i,o;(e=this.oneStat)==null||e.destroy(),(i=this.thinOneStat)==null||i.destroy(),(o=this.mediascopePixel)==null||o.destroy(),this.statSubscription.unsubscribe()}};var Yu=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(Yu||{});var Ss=t=>t!=null?t:0,Ws=(t,e)=>{var s,a;let i=(s=t==null?void 0:t.getBoundingClientRect)==null?void 0:s.call(t),o=(a=e==null?void 0:e.getBoundingClientRect)==null?void 0:a.call(e);return{top:Math.round(Ss(i==null?void 0:i.top)-Ss(o==null?void 0:o.top)),left:Math.round(Ss(i==null?void 0:i.left)-Ss(o==null?void 0:o.left)),bottom:Math.round(Ss(i==null?void 0:i.bottom)-Ss(o==null?void 0:o.top)),right:Math.round(Ss(i==null?void 0:i.right)-Ss(o==null?void 0:o.left))}},Ul=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:Ss(e==null?void 0:e.width),height:Ss(e==null?void 0:e.height)}};var Dn="off";var zl=t=>!!(Math.round(Math.abs(t)/90)%2);var pb=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:s,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:r,webApi:u,videoEpisodes:f,previewThumbsData:p,uiConfig:v,coreConfig:b,player:y,disabledControls:_,isInteractive:w,interactiveRanges$:I,isInteractiveTime$:T,replayInteractive:R,stopPlayer:A,hasInteractiveBranches:P,playPrevChapterDisabledTooltip:E,additionalButtons:z,additionalSettingsMenuItems:U,additionalContextMenuItems:W,playPrevVideo:Y,playNextVideo:te,onVideoChanged:J,looped:oe=!1,statistics:de,saveRate:ae,internalsExposure:pe,playerView:ee,playerId:$e,metaConfig:Ee,appTracer:ce})=>{var Yv,jv;let Qe=Jt(Ye({},b),{isAudioDisabled:l,live:Jt(Ye({},(Yv=b.live)!=null?Yv:{}),{isLiveCatchUpMode:!!s})}),fe=v,ve=u2.createRootTracer(fe.features.tracer),X=ve.createComponentTracer("Store"),N=y||new o2(Qe,ve,{playerId:$e,onDevNullLog:r==null?void 0:r.onDevNullLog});pe==null||pe.expose({corePlayer:N});let me=new d2,ue=new Hu(me,{loadTimeout:fe.ads.loadTimeout,initTimeout:fe.ads.initTimeout,runtimeTimeout:fe.ads.runtimeTimeout,useAdmanFromNPM:fe.ads.useAdmanFromNPM,volumeMultiplier:fe.ads.volumeMultiplier,isVsidOriginal:fe.ads.isVsidOriginal}),Re=u==null?void 0:u.pictureInPictureApi,Je=u==null?void 0:u.annotationsApi,Ae=u==null?void 0:u.slotsApi,j=u==null?void 0:u.focusManager,ne=me.createComponentLog("Store"),Se,Le,ze={},Ce=new $u,we=new db,He="",rt=se(!1),ct=se(ee==="minimal"),Mt=de&&de.oneStat?ti(de.oneStat.vsid$):Dr(void 0),lt=se(ca()),ni=se(!1),wt=()=>C_(document,ab.device.isIOS),Rt=(jv=Re==null?void 0:Re.info.isActive$)!=null?jv:new cb(!1),Dt=se(0),Qt=se(!1),Te=se(!1),G=se([]),Ne=c2(N.events.fatalError$,N.events.managedError$).subscribe(c=>G.update(h=>[...h,c])),be=Dr(!1,c=>{let h=N.events.fatalError$.subscribe(()=>c(!0));return()=>h.unsubscribe()}),Oe=c=>{ct.set(c)},Ie=c=>bt(null,null,function*(){var re;let h=Object.values(r2).includes(c);if(fe.downloadVKLanguages&&(h&&fe.updateBuiltinLanguages||!Df(c))){let Pe;try{Pe=yield l2(c,Oh,Nh)}catch(Xe){(re=de==null?void 0:de.oneStat)==null||re.logError({errorType:"VKLangPack",fatal:!1}),ce==null||ce.error({category:ub.WTF,id:"VKLangPack",message:String(Xe),thrown:Xe},{severity:"warning"})}Pe&&(Rf({language:c,pack:Pe,fallback:fe.defaultLanguage}),ht.set(c),ye.update(Xe=>Xe+1))}Df(c)&&ht.set(c)}),ht=se(t),ye=se(0),qe=se(e);Ie(t);let Ue=(c,h)=>{let V=_e(ht);return Of(V,c,h,fe.defaultLanguage)},st=se("thumb");st.subscribe(c=>{c==="ads"&&N.info.playbackState$.getValue()&&Yt()});let qt=(()=>{let c=ci([be,st],([h,V])=>h?"crashed":V);return Jt(Ye({},c),{is:h=>_e(c)===h})})(),Pt=se(),Yt=()=>{Pt.set({muted:N.info.muted$.getValue()})},bi=(()=>{let c=se(new Set(_));return Jt(Ye({},c),{add:h=>{c.update(V=>new Set([...V].concat(h)))},remove:h=>{c.update(V=>{let re=[...V];return new Set(Array.isArray(h)?re.filter(Pe=>!h.includes(Pe)):re.filter(Pe=>Pe!==h))})},includes:h=>{let V=_e(c);return Array.isArray(h)?h.every(re=>V.has(re)):V.has(h)}})})(),Vi=se({width:0,height:0}),Ai=null,ji=N.info.isBuffering$,si=Dr(ji.getValue(),c=>{let h=ji.subscribe(V=>{V&&Ai===null?Ai=window.setTimeout(()=>{c(ji.getValue()),Ai=null},fe.loaderDelay):c(V)});return()=>{h.unsubscribe(),Ai&&clearTimeout(Ai)}});X.log("create store"),ne({message:"create store"});let ut=c=>{let h=c.container,V=()=>{at=new MutationObserver(Pe=>{let{removedNodes:Xe}=Pe[0];Xe.length&&h.append(N.experimental.element$.getValue())}),at.observe(h,{childList:!0})},re=N.experimental.element$.getValue();if(re)h.append(re),V();else{let Pe=N.experimental.element$.pipe(v2(Xe=>!!Xe),g2()).subscribe(Xe=>{h.append(Xe),V()});we.add(Pe)}},di=c=>{ne({message:`init video, config: ${JSON.stringify(c)}`}),w?ut(c):(f2.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[m2()]}),N.initVideo(c)),X.log("init video",{isInteractive:w}),c.subtitles&&N.setExternalTextTracks(c.subtitles),Se=c,He=c.subtitlesForcedLanguage||""},Xi=new sc,It=c=>Xi.next(c),hi=new sc,ui=new cb(Ks.UNKNOWN),We=new sc,at=null,Ci={actionRewind$:hi,actionSeek$:ui,inPiP$:Rt,inFullscreen$:new ju(c=>lt.subscribe(h=>c.next(h))),actionSetSubtitle$:We,nextMovie$:Xi},Zi=new sc,bo=new sc,Ao={actionSeek$:ui,actionSubtitlesSwitched$:Zi,actionQuality$:bo,playerSize$:new ju(c=>Vi.subscribe(h=>c.next(h))),inPiP$:Rt,inFullscreen$:new ju(c=>lt.subscribe(h=>c.next(h))),isLoaderVisible$:new ju(c=>si.subscribe(h=>c.next(h)))};if(de){let{oneStat:c,thinOneStat:h,mediascopePixel:V,statSubscription:re}=de;c&&(w||re.add(c.attachTo(N)),re.add(c.attachToUi(Ci)),re.add(c.attachToAds(ue.events)),c.authorize(a).catch(Pe=>{ne({message:`onestat auth error ${String(Pe)}`})}),V&&V.attachTo(N)),h&&(re.add(h.attachTo(N,ue.events)),re.add(h.attachToUi(Ao)),re.add(h.attachToAds(ue.events)),h.updateContext({isMobile:_e(rt)}),h.authorize(a))}ce&&(ce.addSubscription(N.events.managedError$.subscribe(c=>{ce.error(c,{severity:"debug"})})),ce.addSubscription(N.events.fatalError$.subscribe(c=>{ce.error(c,{severity:"fatal"})})),de!=null&&de.oneStat&&ce.addSubscription(de.oneStat.experimental.error$.subscribe(c=>{ce.error(c,{severity:"warning"})})));let pn=()=>{if(ab.device.isIOS&&Le)try{T_(Le)}catch(c){ne({message:`exitIosSafariFullscreen failed: ${c}`})}};we.add(N.experimental.element$.subscribe(c=>{c&&(Le=c,c.classList.add("player-media"),Re==null||Re.updateVideoElement(),w&&c.setAttribute("pip","false"),(ee==="preview"||!fe.features.pip&&!fe.features.dpip)&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(N.events.ended$.subscribe(()=>{var c;pn(),(c=r==null?void 0:r.onEnded)==null||c.call(r)})).add(N.events.looped$.subscribe(()=>{var c;(c=r==null?void 0:r.onLooped)==null||c.call(r)})).add(N.events.started$.subscribe(()=>bt(null,null,function*(){var h,V;Tm(Re)&&(yield Re==null?void 0:Re.revealPictureInPicture());let c=N.info.muted$.getValue();(h=r==null?void 0:r.onStarted)==null||h.call(r),(V=ze.onStarted)==null||V.call(ze,c)}))).add(N.events.willSeek$.subscribe(({from:c,to:h})=>{var V;(V=r==null?void 0:r.onSeek)==null||V.call(r,c,h,ui.getValue())})).add(N.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=r==null?void 0:r.onAutoplaySoundProhibited)==null||c.call(r)})).add(N.info.position$.subscribe(c=>{var V;let h=N.info.duration$.getValue();isFinite(h)&&h>0&&((V=r==null?void 0:r.onTimeupdate)==null||V.call(r,h,c),ue.setPosition(c,h))})).add(N.events.fatalError$.subscribe(c=>{var h;(h=r==null?void 0:r.onCrashed)==null||h.call(r,c?`${c.id}: ${c.message}`:void 0)})).add(N.events.fetcherRecoverableError$.subscribe(c=>{var h;(h=r==null?void 0:r.onRecoverableError)==null||h.call(r,c?`${c.id}: ${c.message}`:void 0)})).add(N.events.loadedMetadata$.subscribe(()=>{Qt.set(!0)})).add(N.info.is3DVideo$.subscribe(c=>{Te.set(c)})).add(N.info.isEnded$.subscribe(c=>{w&&(c?(T!=null&&T.getValue()&&bi.add(Ld),bi.add("PLAY_BUTTON")):bi.remove("PLAY_BUTTON"))})).add(N.info.liveTime$.subscribe(c=>{var h;(h=r==null?void 0:r.onLiveTime)==null||h.call(r,c)})).add(N.info.isStalled$.subscribe(c=>{var h;(h=r==null?void 0:r.onStalledChanged)==null||h.call(r,c)})).add(N.info.isLiveEnded$.subscribe(c=>{var h;return c&&((h=r==null?void 0:r.onLiveEnded)==null?void 0:h.call(r))})).add(ue.events.loadStarted$.subscribe(()=>{var c,h;return(h=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:h.call(c)})).add(ue.events.loadEnded$.subscribe(()=>{var c,h;return(h=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:h.call(c)})).add(ue.events.loadError$.subscribe(()=>{var c,h;return(h=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onLoadError)==null?void 0:h.call(c)})).add(ue.events.init$.subscribe(()=>{var c,h;return(h=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onInit)==null?void 0:h.call(c)})).add(ue.events.ready$.subscribe(()=>{var c,h;return(h=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onReady)==null?void 0:h.call(c)})).add(ue.events.started$.subscribe(c=>{var h,V;return(V=(h=r==null?void 0:r.adsInfo)==null?void 0:h.onStarted)==null?void 0:V.call(h,c)})).add(ue.events.timeRemained$.subscribe(c=>{var h,V;return(V=(h=r==null?void 0:r.adsInfo)==null?void 0:h.onTimeRemained)==null?void 0:V.call(h,c)})).add(ue.events.ended$.subscribe(c=>{var h,V;return(V=(h=r==null?void 0:r.adsInfo)==null?void 0:h.onCompleted)==null?void 0:V.call(h,c)})).add(ue.events.empty$.subscribe(()=>{var c,h;return(h=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onEmpty)==null?void 0:h.call(c)})).add(ue.events.clicked$.subscribe(c=>{var h,V;return(V=(h=r==null?void 0:r.adsInfo)==null?void 0:h.onClicked)==null?void 0:V.call(h,c)})).add(ue.events.closed$.subscribe(c=>{var h,V;return(V=(h=r==null?void 0:r.adsInfo)==null?void 0:h.onClosed)==null?void 0:V.call(h,c)})).add(ue.events.error$.subscribe(c=>{var h,V;return(V=(h=r==null?void 0:r.adsInfo)==null?void 0:h.onError)==null?void 0:V.call(h,c)})).add(ue.events.paused$.subscribe(()=>{var c,h;return(h=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onPaused)==null?void 0:h.call(c)})).add(ue.events.resumed$.subscribe(()=>{var c,h;return(h=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onResumed)==null?void 0:h.call(c)}));let H=new db,ot=()=>{var Xe,kt,Ot;let{debugLog:c}=fe,h,V="#9df7b7",re="#efd169";if(c&&c!==!0){let{colors:zt}=c;h=c.tag,V=(Xe=zt==null?void 0:zt[0])!=null?Xe:V,re=(Ot=(kt=zt==null?void 0:zt[1])!=null?kt:zt==null?void 0:zt[0])!=null?Ot:re}let Pe=h?`: ${h}`:"";H.add(N.events.log$.subscribe(zt=>{console.debug(`%c sdk${Pe} `,`background:${V};`,`sdk component: ${zt.component}`,zt.message)})).add(me.log$.subscribe(zt=>{console.debug(`%c ui${Pe} `,`background:${re};`,`ui component: ${zt.component}.`,zt.message)}))},Ut=()=>{H.unsubscribe()},pi=(c,h)=>{X.log("start camera manual rotation",{mx:c,my:h}),N.startCameraManualRotation(c,h)},dt=(c=!1)=>{X.log("stop camera manual rotation",{immediate:c}),N.stopCameraManualRotation(c)},ai=(c,h,V)=>{X.log("move camera focus px",{xpx:c,ypx:h,dt:V}),N.moveCameraFocusPX(c,h,V)},fi=()=>{N.holdCamera()},Gt=()=>{N.releaseCamera()},Ct=Dr(N.info.position$.getValue(),c=>{let h,V,re=()=>{let Pe=N.info.playbackState$.getValue(),Xe=N.info.isLive$.getValue(),kt=N.info.duration$.getValue(),Ot=N.info.position$.getValue();if(Pe&&[Wl.PLAYING,Wl.PAUSED].includes(Pe)){let zt=Xe?Ot-kt:N.getExactTime();zt!==V&&c(zt),V=zt}h=requestAnimationFrame(re)};return re(),()=>cancelAnimationFrame(h)}),so=ti(N.info.playbackState$),Lo=ti(N.info.isBuffering$),On=ci([so,Lo],([c,h])=>h?"buffering":c),fn=ti(N.info.currentBuffer$),Li=ti(N.info.isEnded$),xi=ti(N.info.isLive$),Xo=fe.features.playbackRate?ti(N.info.canChangePlaybackSpeed$):Dr(!1),tr=ti(N.info.liveBufferTime$),_i=ti(N.info.volume$),$o=ti(N.info.muted$),mn=yu(N.info.predefinedQualityLimitType$.pipe(lb(c=>c===Cs.TRAFFIC_SAVING)),N.info.predefinedQualityLimitType$.getValue()===Cs.TRAFFIC_SAVING),Mo=yu(N.info.predefinedQualityLimitType$.pipe(lb(c=>c===Cs.HIGH_QUALITY)),N.info.predefinedQualityLimitType$.getValue()===Cs.HIGH_QUALITY),vn=ti(N.info.autoQualityLimitingAvailable$),Ts=ti(N.info.availableQualities$),Is=ti(N.info.availableQualitiesFps$),rs=ti(N.info.chromecastState$),xr=ti(N.info.chromecastDeviceName$),gn=ti(N.info.currentFormat$),hn=ti(N.info.throughputEstimation$),ir=ti(N.info.videoBitrate$),wr=ti(N.info.intrinsicVideoSize$),or=ti(N.info.duration$),Br=ti(N.info.isAudioAvailable$),Fr=()=>{Ai&&clearTimeout(Ai),Ai=null},Nn=ci([or,xi],([c,h])=>h?-c:c),nr=ci([so],([c])=>c===Wl.PLAYING),Bn=ti(N.info.atLiveEdge$),rr=ti(N.info.atLiveDurationEdge$),Hr=ti(N.info.position$),Ur=ci([Hr,or],([c,h])=>isFinite(c)&&isFinite(h)&&!!h),Ti=ci([rs],([c])=>c===i2.CONNECTED),ss=ti(N.info.availableVideoStreams$),Zo=fe.features.audioLanguages?ti(N.info.availableAudioStreams$):Dr([]),mt=ti(N.info.currentVideoStream$),jt=ti(N.info.currentAudioStream$),sr=c=>{c.language&&Af(c.language),N.setVideoStream(c)},Fn=(c,h)=>{N.setAudioStream(c),vo(h)&&(c.language&&Af(c.language),fe.features.userVideoPrefs&&i&&Vf(fe.userSalt,String(i),{audioTrackId:c.id}))},zr=c=>{let h;if(c.length===1&&(h=c.at(0)),h!=null||(h=c.find(re=>"isDefault"in re&&re.isDefault)),fe.features.userVideoPrefs&&i){let re=Tu(fe.userSalt,String(i));if(re!=null&&re.audioTrackId){let Pe=c.find(Xe=>Xe.id===re.audioTrackId);h=Pe!=null?Pe:h}}let V=c_();return V&&(h!=null||(h=c.find(({language:re})=>V===re))),h!=null||(h=c.at(0)),h},Sr=c=>{X.log("change audio stream",{id:c});let h=N.info.availableAudioStreams$.getValue().find(V=>V.id===c);h&&Fn(h,!0)},Wr=!1;we.add(N.info.availableAudioStreams$.subscribe(c=>{if(!Wr&&c.length){let h=zr(c);h&&(N.setAudioStream(h),Wr=!0)}})),Zo.subscribe(c=>{var h;(h=r==null?void 0:r.onAvailableAudioStreamsChanged)==null||h.call(r,c.map(({label:V="",id:re="",language:Pe=""})=>({label:V,language:Pe,id:re})))}),jt.subscribe(c=>{var h;return c&&((h=r==null?void 0:r.onAudioStreamChanged)==null?void 0:h.call(r,c.id))});let _n=!1;we.add(N.info.availableVideoStreams$.subscribe(c=>{if(!_n&&c.length){let h=zr(c);h&&(N.setVideoStream(h),_n=!0)}}));let Jo=se(void 0),bn=ti(N.info.isAutoQualityEnabled$,c=>c&&Jo.set(void 0)),Cr=ti(N.info.currentQuality$,()=>Jo.set(void 0)),Tr=ci([Jo,Cr],([c,h])=>c!=null?c:h),$n=ci(gn,c=>c!==rc.MPEG),yn=ci([Ts,Is,bn,Tr,$n],([c,h,V,re,Pe])=>{let Xe=[];Pe&&Xe.push({value:"auto",displayValue:Ue("auto_quality_option"),selected:V});let kt=c.filter(Ot=>!s2(Ot));for(let Ot of kt){let zt=h[Ot];Xe.push({value:Ot,displayValue:`${Ot}${zt?X_(zt):""}`,selected:V?!1:Ot===re})}return Xe}),ar=ti(N.info.currentPlaybackRate$),Mi=ci([ar,Bn,rr],([c,h,V])=>{let re=V||w?1:fe.controls.playbackRateMin,Pe=h?1:fe.controls.playbackRateMax,Xe=fe.controls.playbackRateStep,kt=[];for(let Ot=re;Ot<=Pe;Ot+=Xe)kt.push({value:Ot,displayValue:Ot===1?Ue("playback_rate_1"):Ue("playback_rate",{multiplier:Ot.toString(10)}),selected:c===Ot});return kt}),yo=()=>({displayValue:Ue("subtitles_off"),value:Dn,language:""}),Vo=se(yo()),ao=ci([Vo,ye],([c],h)=>{c.value===Dn?h(yo()):h(c)}),xn=fe.features.subtitles?ti(N.info.availableTextTracks$):Dr([]),wn=Zh(),Kr=ci([xn,ao],([c,h],V)=>{var Xe;let re=[],Pe=c.find(({id:kt})=>kt===h.value);if(Pe!=null&&Pe.url){let[,kt]=(Xe=wn.find(Pe.url))!=null?Xe:[];if(kt){V(kt);return}Ce.download(Pe.url).then(Ot=>{if(!Ot||Ce.isDestroyed())return;let zt=new Z_,Js=Pe.language;if(Js){let p$=!!Pe.isAuto,f$=zt.parse(Ot,Js);re.push({lang:Js,subtitles:f$,isAuto:p$,id:Pe.id})}wn.add(Pe.url,re),_e(ao).value===h.value&&V(re)}).catch(h2).catch(Ot=>{var zt;(zt=de==null?void 0:de.oneStat)==null||zt.logError({errorType:"Subtitles download",fatal:!1}),ce==null||ce.error({category:ub.WTF,id:"Subtitles download",message:String(Ot),thrown:Ot},{severity:"warning"})})}V(re)}),St=ci([ar,nr,ao],([c,h,V],re)=>{let kt;if(N.info.isLive$.getValue()&&h&&V.value!==Dn){let zt=()=>{let Js=1e3/(3*c);kt=setTimeout(zt,Js),re(Date.now())};return zt(),()=>clearTimeout(kt)}}),mi=ci([xn,ao],([c,h])=>{if(!c.length)return[];let V=[];for(let{language:re,isAuto:Pe,id:Xe}of c){let kt=re&&ic(re);re&&kt&&V.push({displayValue:Pe?Ue("subtitles_auto",{language:kt}):kt,value:Xe,selected:(h==null?void 0:h.value)===Xe,isAuto:Pe,language:re})}return V.length?(V.unshift(Jt(Ye({},yo()),{selected:(h==null?void 0:h.value)===Dn})),V):[]}),Wt={available:[],prev:[]},Ro=()=>{var h,V;let c=N.experimental.getCurrentTime$.getValue();return(V=(h=c==null?void 0:c())!=null?h:Le==null?void 0:Le.currentTime)!=null?V:0},xo=ci([Ct,ao,Kr,St],([c,h,V,re])=>{var Xe;let Pe=N.info.isLive$.getValue();if(Pe&&Wt.prev!==V){let kt=V.find(({id:zt})=>zt===h.value),Ot=Wt.prev.find(({id:zt})=>zt===h.value);if(kt){let zt=Jt(Ye({},kt),{subtitles:[...(Xe=Ot==null?void 0:Ot.subtitles)!=null?Xe:[],...kt.subtitles]});Wt.available=[zt],Wt.prev=V}}if(h&&h.value!==Dn){let kt=Pe?Ro():c,Ot=Pe?Wt.available:V;return tb(kt,h,Ot,Pe)}}),Sn=ci([xo],([c])=>c!=null&&c.texts?c.texts:[]);we.add(ao.subscribe(c=>{var h,V;if(c.value===Dn)(h=r==null?void 0:r.onSubtitleOff)==null||h.call(r);else{let re=Object.entries(Wu).find(([Pe,Xe])=>Xe===c.displayValue);(V=r==null?void 0:r.onSubtitleOn)==null||V.call(r,re?re[0]:"",c.value)}}));let wo=se(!0),Cn=ci([fn,Nn,Hr,tr],([c,h,V,re])=>{var Ot;let Pe=(Ot=c==null?void 0:c.end)!=null?Ot:0;if(!re)return Pe/h;let kt=-V+re-h;return(Pe-kt)/h}),zi=ti(N.info.availableSources$),Ir=ci([zi],([c])=>Object.keys((c==null?void 0:c[rc.MPEG])||{}).length>0),Do=()=>{var V,re,Pe;let c=Object.keys(((re=(V=N.info.availableSources$)==null?void 0:V.getValue())==null?void 0:re[rc.MPEG])||{}),h=n2(c)||p2.Q_144P;return(Pe=Se.sources[rc.MPEG])==null?void 0:Pe[h]},Hn=()=>{var h;let c=Do();if(c)X.log("download video",{url:c}),Yh(c,((h=Se==null?void 0:Se.meta)==null?void 0:h.title)||"video");else{let V="There is no URL for download video";X.log("download video",{message:V}),ne({message:V})}},as=()=>{ne({message:"toggle muted"});let c=N.info.muted$.getValue();N.info.volume$.getValue()===0&&!c?Er(Qr(),!1):et(!c,!1)},ls=()=>{var c;if(Ht.ui.settingsMenu.visible$.set(!1),!_e(Ht.ui.settingsSubMenu.visible$)){let h=_e(Ht.ui.settingsMenu.ref$);if((c=r==null?void 0:r.uiInfo)!=null&&c.onSettingsMenu&&h){let re=Ul(h),Pe={top:0,left:0,bottom:0,right:0};r.uiInfo.onSettingsMenu({visible:!1,size:re,position:Pe,name:"settings"})}}X.log("close settings menu")},ds=(c,h=()=>Promise.resolve())=>bt(null,null,function*(){var Pe;Ht.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Ht.ui.settingsMenu.visible$.set(!0),yield h();let V=_e(Ht.ui.settingsMenu.ref$),re=dl();if((Pe=r==null?void 0:r.uiInfo)!=null&&Pe.onSettingsMenu&&V&&re){let kt=Ul(V),Ot=Ws(V,re);r.uiInfo.onSettingsMenu({visible:!0,size:kt,position:Ot,name:"settings"})}X.log("open settings menu",{wasOpenedByKeyboard:c})}),Ji=(c,h=!1)=>{var Xe;Ht.ui.settingsSubMenu.visible$.set(!1);let V=_e(Ht.ui.settingsMenu.ref$),re=dl(),Pe=_e(Ht.ui.settingsMenu.visible$);if((Xe=r==null?void 0:r.uiInfo)!=null&&Xe.onSettingsMenu&&V&&re)if(Pe&&!h){let Ot=Ul(V),zt=Ws(V,re);r.uiInfo.onSettingsMenu({visible:!0,size:Ot,position:zt,name:"settings"})}else{let Ot=Ul(c),zt={top:0,left:0,bottom:0,right:0},Js=_e(Ht.ui.settingsSubMenu.name$);r.uiInfo.onSettingsMenu({visible:!1,size:Ot,position:zt,name:Js})}X.log("close settings sub menu")},cs=(c,h)=>{var re;Ht.ui.settingsSubMenu.visible$.set(!0),Ht.ui.settingsSubMenu.ref$.set(h),Ht.ui.settingsSubMenu.name$.set(c);let V=dl();if((re=r==null?void 0:r.uiInfo)!=null&&re.onSettingsMenu&&h&&V){let Xe=Ul(h),kt=Ws(h,V);r.uiInfo.onSettingsMenu({visible:!0,name:c,size:Xe,position:kt})}X.log("open settings sub menu",{name:c})},Qr=()=>{var h;let c=Math.max(fe.volumeMinRestore,(h=xu())!=null?h:0);return c===0?fe.volumeDefault:c},vo=c=>{let h=fe.features.savePreferredStatesOnUserActionOnly;return!h||h&&!c},Er=(c,h)=>{let V=c===0?Qr():c,re=N.info.muted$.getValue();ne({message:`set volume, volume: ${c}, preferredVolume: ${V}`});let Pe=!l||qt.is("ads");re&&c>0&&Pe&&(re=!1,vo(h)&&Pf(!1)),N.setVolume(c,re),ue.setVolume(c),vo(h)&&Cf(V)},et=(c,h)=>{let V=N.info.volume$.getValue();ne({message:`set muted, currentVolume: ${V}, mute: ${c}`});let re=qt.is("ads");if(N.setMuted(c,re),ue.setVolume(c?0:V),vo(h)&&(!re||!c)&&Pf(c),!c&&V===0){let Pe=Qr();N.setVolume(Pe),vo(h)&&Cf(Pe),ue.setVolume(Pe)}},_t=se(!1),Zt=c=>{var h,V;X.log("set looped",{isLooped:c}),_t.set(c),N.setLooped(c),(V=(h=r==null?void 0:r.uiInfo)==null?void 0:h.onLoopedChanged)==null||V.call(h,c)};Zt(oe);let Ri=()=>{var c,h;(h=(c=r==null?void 0:r.uiInfo)==null?void 0:c.onReportProblem)==null||h.call(c)},lo=(c,h=!1)=>{var V;ne({message:`set autoplayNextEnabled, value: ${c}`}),X.log("set autoplay next enabled",{autoplayNextEnabled:c}),Ht.ui.autoplayNextEnabled$.set(c),f_(c),h&&((V=r==null?void 0:r.onSetAutoplayNextEnabled)==null||V.call(r,c))},Ni=c=>{ne({message:`set timerNextVideoRunning, value: ${c}`}),X.log("set timer next video running",{timerNextVideoRunning:c}),Ht.ui.timerNextVideoRunning$.set(c)},go=(c=!0)=>{var V;let h=!0;if(c&&(r!=null&&r.onPrevVideoClick))try{h=(V=r==null?void 0:r.onPrevVideoClick)==null?void 0:V.call(r)}catch(re){ne({message:"onPrevVideoClick callback failed to execute"})}J(!0),h&&Y()},Oo=(c=!0)=>{var V;let h=!0;if(c&&(r!=null&&r.onNextVideoClick))try{h=(V=r==null?void 0:r.onNextVideoClick)==null?void 0:V.call(r)}catch(re){ne({message:"onNextVideoClick callback failed to execute"})}J(!1),h&&te()},Tn=()=>{var c;(c=r==null?void 0:r.onNextVideoAnnouncementShow)==null||c.call(r)},Un=()=>{var c;(c=r==null?void 0:r.onNextVideoAnnouncementClick)==null||c.call(r)},ho=()=>{var c;(c=r==null?void 0:r.onNextVideoAnnouncementAuto)==null||c.call(r)},en=()=>{var c;(c=r==null?void 0:r.onNextVideoAnnouncementCancel)==null||c.call(r)},Pr=()=>{N.prepare()},kr=()=>{yr(Ht);let c=_e(Ht.ui.controls.disabledControls$),h=_e(Ht.playerPhase),V={playerPhase:h,isInteractive:w,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(ne({message:"toggle play"}),h==="ads"){V.action="play",X.log("toggle adman play",V),ue.togglePlay();return}let re=()=>{var Xe;ne({message:"toggle play, call player.play"}),V.action="play",N.play(),(Xe=r==null?void 0:r.onPlay)==null||Xe.call(r)},Pe=()=>{var Xe;ne({message:"toggle play, call player.pause"}),V.action="pause",N.pause(),(Xe=r==null?void 0:r.onPause)==null||Xe.call(r)};if(N.info.isEnded$.getValue()){if(ne({message:"toggle play, video ended, seek to 0"}),hi.next(),ui.next(Ks.REWIND),w){R==null||R();return}N.seekTime(0),re()}else N.info.playbackState$.getValue()!==Wl.PLAYING?re():Pe();X.log("toggle play",V)},So=(c,{changeReason:h="default",appliesTo:V="to-video",byUser:re=!1}={},Pe)=>{ne({message:`set quality, quality: ${c}`}),X.log("set quality",{quality:c}),re&&bo.next(c),N.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Xe}=fe.features;wu(),c!=="auto"?(Xe?(Su({type:"exact_quality",quality:c,videoId:i},V),N.setPredefinedQualityLimits(Cs.UNKNOWN)):Tf(i,c),Jo.set(c),N.setQuality(c)):Xe&&h==="default"&&(tt("auto_quality",V,Pe),_e(mn)&&lr(!1,void 0,Pe),_e(Mo)&&zn(!1,void 0,Pe))},lr=(c,h="as-default",V)=>{ne({message:`set trafficSavingEnabled, value: ${c}`}),X.log("set traffic saving enabled",{trafficSavingEnabled:c});let re=c?Cs.TRAFFIC_SAVING:Cs.UNKNOWN;fe.features.qualityDetailsSubMenuEnabled?(us(re,h,V),Vd(!1)):(N.setPredefinedQualityLimits(re),vo(V)&&Vd(c))},zn=(c,h="as-default",V)=>{ne({message:`set highQualityEnabled, value: ${c}`}),X.log("set high quality enabled",{highQualityEnabled:c}),us(c?Cs.HIGH_QUALITY:Cs.UNKNOWN,h,V)},us=(c,h,V)=>{c!==Cs.UNKNOWN&&(_e(vn)&&!_e(bn)&&So("auto",{appliesTo:h,changeReason:"limit-changed"},V),tt(c,h,V)),N.setPredefinedQualityLimits(c)},tt=(c,h,V)=>{vo(V)&&(Su({type:c,videoId:i},h),h==="as-default"&&Su({type:c,videoId:i},"to-video"))},Nt=(c,h=!0)=>{X.log("set playback rate",{playbackRate:c}),N.setPlaybackRate(c),fe.features.saveRate&&ae&&!N.info.isLive$.getValue()&&h&&u_(c)},Ii=()=>{let c=_e(Xo),h=_e(Mi),V=h.findIndex(({selected:Pe})=>Pe);if(V===h.length-1||!c)return h[V];let re=h[V+1];return Nt(re.value),re},tn=()=>{let c=_e(Xo),h=_e(Mi),V=h.findIndex(({selected:Pe})=>Pe);if(V===0||!c)return h[V];let re=h[V-1];return Nt(re.value),re},No=(c=Jt(Ye({},yo()),{selected:!1}),h)=>{X.log("set subtitles",Ye({},c)),c.value!==Dn&&We.next(c.isAuto?c.value+"_auto":c.value),Zi.next({enabled:c.value!==Dn,lang:c.language,auto:!!c.isAuto}),Vo.set(c),vo(h)&&(Mf(c.value===Dn?void 0:c.language),fe.features.userVideoPrefs&&i&&Vf(fe.userSalt,String(i),{subtitleTrackId:c.value===Dn?void 0:c.value}))},qr=c=>{X.log("toggle subtitles");let h=_e(ao);(h==null?void 0:h.value)===Dn?dr(c):Gr(c)},on=(c,h)=>{X.log("change subtitle",{enabled:c}),c?dr(!0,h):Gr(!0)},dr=(c,h)=>{if(_e(ct))return;X.log("subtitle on");let V=_e(mi),re=_e(ht),Pe=He!=null?He:re,Xe;h&&(Xe=V.find(kt=>kt.value===h)),Xe!=null||(Xe=V.filter(kt=>kt.value!==Dn).find(kt=>kt.language===Pe)),No(Xe!=null?Xe:V[1],c)},Gr=c=>{X.log("subtitle off"),No(void 0,c)};we.add(N.info.availableTextTracks$.subscribe(c=>{var V;function h(){let re=[];for(let{language:Pe,isAuto:Xe,id:kt}of c){let Ot=Pe&&ic(Pe);Pe&&Ot&&re.push({id:kt,language:Pe,title:Xe?Ue("subtitles_auto",{language:Ot}):Ot})}return re}(V=r==null?void 0:r.onAvailableSubtitlesChanged)==null||V.call(r,h())}));let Es=se(!0),Ys=c=>{Es.set(c)},Wn=(c,h,V=!0)=>{var re;if(ne({message:`seek to time, time: ${c}`}),X.log("seek to time",{time:c,action:h,forcePrecise:V}),ui.next(h),N.info.isLive$.getValue()){let Pe=N.info.duration$.getValue(),Xe=Math.min(0,Pe+c);N.seekTime(Xe,V)}else{if(T!=null&&T.getValue())return;N.info.isEnded$.getValue()&&(ne({message:"seek after ended, call callbacks.onPlay"}),(re=r==null?void 0:r.onPlay)==null||re.call(r)),N.seekTime(Qv(c),V)}},$a=c=>{ne({message:`seek to episode start time: ${c}`}),X.log("seek to episode start time",{time:c}),Wn(c,Ks.EPISODE,!0)},pt=(c,h,V=!1)=>{ne({message:`seek to percent, percent: ${c}`}),X.log("seek to percent",{percent:c,action:h});let re=_e(Nn)*c;Wn(re,h,V)},li=c=>{ne({message:`seek external, time: ${c}`}),X.log("seek external",{time:c}),ui.next(Ks.UNKNOWN),N.seekTime(N.info.isLive$.getValue()?-c:c)},Bo=c=>{var re,Pe;let h=(re=c.max)!=null?re:"none",V=(Pe=c.min)!=null?Pe:"none";ne({message:`set auto quality limitation. Max: ${h}. Min: ${V}`}),X.log("set auto quality limits",{max:h,min:V}),N.setAutoQualityLimits(c)},cr=c=>{ne({message:`seek external to episode start time: ${c}`}),X.log("seek external to episode start time",{time:c}),Wn(c,Ks.EPISODE,!0)},Ar=c=>{ne({message:`set playback rate to: ${c}`}),X.log("set playback rate external",{playbackRate:c}),N.setPlaybackRate(c)},Fo=se(!1),Ei=se(!1),ps=ci([Nn,ct],([c,h])=>!!p&&c>=fe.suitableDurationForUsingRichSeek&&fe.features.useRichSeek&&!w&&ee!=="preview"&&!h),co=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),Wi=ci([Dt],([c])=>{let h=zl(c);return co?!h:h});we.add(qt.subscribe(c=>{c!=="video"&&Fo.set(!1)})),Fo.subscribe(c=>{var h;(h=r==null?void 0:r.onRichSeekActiveChanged)==null||h.call(r,c)});let nn=se(void 0),Kn=se(!1),Yr=c=>{ne({message:`start scrubbing, progress: ${c}`}),X.log("start scrubbing",{progress:c}),Kn.set(!0),ge(c)},ge=c=>{nn.set(c)},Tt,$i,Di=()=>{nn.set(void 0),Kn.set(!1)},Ho=()=>{clearTimeout($i),clearTimeout(Tt),Tt=window.setTimeout(()=>{Di()},500),Le==null||Le.removeEventListener("seeked",Ho)},Co=(c,h=!1,V=_2.ActionSeekType.SLIDER)=>{ne({message:`complete scrubbing, progress: ${c}`}),X.log("complete scrubbing",{progress:c}),pt(c,V,h),_e(Ht.ui.isMobile)&&_e(Ht.state.currentFormat$)===rc.HLS?(Le==null||Le.addEventListener("seeked",Ho),$i=window.setTimeout(()=>{Ho()},300)):Di()},eo=ci([Ct,Nn,nn],([c,h,V],re)=>{re(a2(V)?V*h:c)}),rn=se(!1),Ps=()=>{rn.set(!0)},ks=()=>{rn.set(!1)},js=ci([Vi],([{width:c}],h)=>{let V=q_(c);h(V)}),fs=z.filter(c=>jh(c)),ms=ci([js,rt],([c,h])=>h?fs.filter(V=>!V.hideOnMobile):fs.filter(V=>{var re;return!((re=V.hideOnDesktopGridTypes)!=null&&re.includes(c))})),ur=se(z.filter(c=>Xh(c))),ya=ci([ur,js],([c,h])=>c.filter(V=>{var re;return!((re=V.hideOnDesktopGridTypes)!=null&&re.includes(h))})),Xl=ci([ya,ms],([c,h])=>[...fe.features.additionalButtonsDesktopControlPanelRight?c.filter(V=>V.type==="desktop-control-panel-right"):[],...fe.features.additionalButtons?h.map((V,re)=>{var Pe;return{id:re,weight:re,type:"desktop-control-panel-right",testId:V.testId,icon:V.iconUrl,onClick:V.onClick,ariaLabel:(Pe=V.ariaLabel)!=null?Pe:V.tooltip,tooltipText:V.tooltip}}):[]].filter(V=>!v.disabledAdditionalButtonIds.includes(V.id))),Lr=se(U),Zl=ci([Lr],([c])=>fe.features.additionalSettingsMenuItems?c.map(h=>h.type==="SWITCH"?Jt(Ye({},h),{onClick:h.onChangeEnabled}):h):[]),xa=(c,h)=>{let V=_e(ur).map(re=>re.id!==c?re:Ye(Ye({},re),h));ur.set(V)},Jl=c=>{let h=_e(ur);if(h.some(V=>V.id===c.id)){ne({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),ur.set(h)},al=c=>{let h=_e(ur);if(!h.some(V=>V.id===c)){ne({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),ur.set(h)},ll=c=>{ui.next(Ks.LIVE),ne({message:"live switch to low latency "+c}),X.log("live switch to low latency "+c),N.setLiveLowLatency(c)},wa=(c,h)=>{let V=_e(Lr).map(re=>re.id!==c?re:Ye(Ye({},re),h));Lr.set(V)},vt=c=>{let h=_e(Lr);if(h.some(V=>V.id===c.id)){ne({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),Lr.set(h)},gt=c=>{let h=_e(Lr);if(!h.some(V=>V.id===c)){ne({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),Lr.set(h)},wi=se(W),To=ci([wi],([c])=>fe.features.additionalContextMenuItems?c:[]),to=(c,h)=>{let V=_e(wi).map(re=>re.id!==c?re:Ye(Ye({},re),h));wi.set(V)},vi=c=>{let h=_e(wi);if(h.some(V=>V.id===c.id)){ne({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),wi.set(h)},Ki=c=>{let h=_e(wi);if(!h.some(V=>V.id===c)){ne({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),wi.set(h)},Xs=ci([rt,be],([c,h],V)=>{V(c&&h)}),ed=()=>{ui.next(Ks.LIVE),ne({message:"switch to active live"}),X.log("switch to active live"),N.seekTime(0),N.info.playbackState$.getValue()!==Wl.PLAYING&&Ht.actions.internal.togglePlay()},Rc=()=>{X.log("skip adman"),ue.skip()},gp=(c=!0)=>{var re;yr(Ht),ne({message:`switch from ads to video, callPlay: ${c}`}),X.log("switch from ads to video",{callPlay:c}),st.set("video"),c&&N.play(),l&&et(!0,!0);let h=(re=_e(Pt))==null?void 0:re.muted,V=!N.info.muted$.getValue();h!==void 0&&!V&&et(h,!0),Pt.set(void 0)},Dc=()=>{yr(Ht),ne({message:"switch from video to ads"}),X.log("switch from video to ads"),Ht.actions.internal.pause(),pn(),st.set("ads")},hp=c=>{yr(Ht);let h=c?"LiveWaitingStart":"thumb";X.log("set live waiting start",{state:c,playerPhase:h}),st.set(h)},Oc=c=>{yr(Ht);let h=c?"LiveWaitingRecover":"thumb";X.log("set live waiting recover",{state:c,playerPhase:h}),st.set(h)},_p=c=>{yr(Ht);let h=c?"LiveWaitingRecord":"thumb";X.log("set live waiting record",{state:c,playerPhase:h}),st.set(h)},Nc=()=>(yr(Ht),X.log("get debug text data"),qh(N,Se,Ht,ve.getTraceId(),Ee)),bp=()=>(yr(Ht),JSON.stringify(ve.getFinishedSpans())),Bc=()=>(yr(Ht),Gh(N,Se,Ht)),dl=()=>Le,Fc=()=>{ne({message:"toggle chromecast"}),X.log("toggle chromecast"),N.toggleChromecast()},Zs=c=>{var V;if(yr(Ht),N.info.isEnded$.getValue())return;let h=!c;if(_e(Ht.playerPhase)==="ads"){ne({message:`pause ads, internalCall: ${h}`}),X.log("pause ads",{internalCall:h}),ue.pause();return}ne({message:`pause video, internalCall: ${h}`}),X.log("pause video",{internalCall:h}),h&&((V=r==null?void 0:r.onPause)==null||V.call(r)),N.pause()},Sa=c=>{var V;yr(Ht);let h=!c;if(_e(Ht.playerPhase)==="ads"){ne({message:`play ads, internalCall: ${h}`}),X.log("play ads",{internalCall:h}),ue.play();return}ne({message:`play video, internalCall: ${h}`}),X.log("play video",{internalCall:h}),h&&((V=r==null?void 0:r.onPlay)==null||V.call(r)),N.play()},$p=c=>{yr(Ht);let h=!c;if(_e(Ht.playerPhase)==="ads"){ne({message:"player cannot be stopped during ads via external method"});return}ne({message:`player will be stopped, internalCall: ${h}`}),A==null||A()},td=(c,h)=>{yr(Ht),ne({message:`first start, show ads: ${c}, internalCall: ${!h}`}),X.log("first start",{showAds:c,external:h}),c?st.set("ads"):(st.set("video"),h?N.play():Ht.actions.internal.togglePlay())},id=()=>(ne({message:"getting time codes"}),f),od=()=>{let c=id();if(!c||[0,1].includes(c.length))return;let h=N.info.position$.getValue();return c.find(V=>V.time>h)},yp=c=>{let h=c;h||(h=od());let V=N.info.position$.getValue();X.log("seek to next episode",Ye({currentTime:V},h)),h&&(ne({message:"seek to next episode"}),Wn(h.time,Ks.EPISODE,!0))},Hc=()=>{let c=id();if(!c||[0,1].includes(c.length))return;let h=N.info.position$.getValue(),V=c.findIndex(Pe=>Pe.time>h),re=V===-1?c.length-2:V-2;if(!(re<0))return c[re]},xp=c=>{let h=c;h||(h=Hc());let V=N.info.position$.getValue();X.log("seek to prev episode",Ye({currentTime:V},h)),h&&(ne({message:"seek to prev episode"}),Wn(h.time,Ks.EPISODE,!0))},Ge=()=>(ne({message:"getting preview thumbs data"}),X.log("get preview thumbs data",Ye({},p)),p),gi=()=>bt(null,null,function*(){let c=Re==null?void 0:Re.isActive(),h="none";Re!=null&&Re.isActive()?(h="exit",yield Re==null?void 0:Re.exit()):(h="request",yield Re==null?void 0:Re.request()),X.log("toggle picture in picture",{isActive:c,action:h})}),Uo=(c=-90)=>{X.log("rotate video",{alphaDiff:c}),Dt.update(h=>h+c)},In=se([]);I==null||I.subscribe(c=>{let h=[];for(let V=0;V<c.length;V++){let{range:[re,Pe],subjects:Xe}=c[V];V===0&&re!==0&&h.push({time:0,text:"",interactive:!1,completed:!0}),h.push({time:re/1e3,text:"",interactive:!0,completed:fe.features.interactiveTimeOpenUri?!Xe.length||Xe.every(kt=>kt.isRemoved):!Xe.length}),Pe!==1/0&&h.push({time:Pe/1e3,text:"",interactive:!1,completed:!0})}In.set(h)});let En=se(!1);T==null||T.subscribe(c=>{c&&_e(Kn)&&Di()});let Qv=c=>{if(!w)return c;let h=_e(In),V=_e(Nn),Pe=_e(Hr)/V,Xe=h.find(kt=>kt.interactive&&!kt.completed&&kt.time>Pe);return typeof(Xe==null?void 0:Xe.time)=="number"?Math.min(c,Xe.time-.05):c},r$=()=>{Ht.ui.episodes.panelOpened$.set(!1)},s$=()=>{X.log("destroy store"),clearTimeout($i),clearTimeout(Tt),we.unsubscribe(),H.unsubscribe(),N.destroy(),ue.destroy(),de==null||de.destroy(),Ne.unsubscribe(),at==null||at.disconnect(),at=null,Ce.destroy(),ce==null||ce.destroy()},a$=ci([Bn,qt,Xo],([c,h,V])=>v.features.doubleForwardAvailable&&!c&&h==="video"&&V),wp=se(!1),qv=2,Uc=null,Gv=c=>{if(!_e(nr)&&c)return;let h=N.info.currentPlaybackRate$.getValue();c?h!==qv&&(Uc=h,Nt(qv,!1),wp.set(!0)):(Uc&&Nt(Uc,!1),wp.set(!1),Uc=null)};qt.subscribe(c=>{c!=="video"&&Gv(!1)});let l$=()=>{Zs(!1),Fo.set(!0)},d$=()=>{Sa(!1),Fo.set(!1)},Sp=!1,c$=()=>{Ei.set(!0),Sp=N.info.playbackState$.getValue()===Wl.PLAYING,Zs(!1)},u$=()=>{Ei.set(!1),!_e(Fo)&&Sp&&Sa(!1),Sp=!1};N.events.playing$.subscribe(()=>{_e(Fo)&&Zs(!1)});let Ht={interfaceLanguage$:ht,isCyrillicRelatedInterface$:qe,initVideo:di,videoId:i,isClip:o,playerPhase:qt,vsid:Mt,state:{positionExact$:Ct,positionWithScrubbing$:eo,duration$:Nn,playbackState$:so,playbackStateRealistic$:On,isPlaying$:nr,isLoaderVisible:si,bufferedProgress$:Cn,isLive$:xi,canChangePlaybackSpeed$:Xo,isActiveLive$:Bn,isOldestAvailableLive$:rr,isRewindableLive$:Ur,isEnded$:Li,muted$:$o,volume$:_i,trafficSavingEnabled$:mn,highQualityEnabled$:Mo,autoQualityLimitingAvailable$:vn,availableVideoStreams$:ss,availableAudioStreams$:Zo,videoStream$:mt,audioStream$:jt,currentQuality$:Tr,isAutoQualityEnabled$:bn,availableQualities$:yn,currentPlaybackRate$:ar,availablePlaybackRates$:Mi,currentSubtitle$:ao,availableTextTracks$:xn,availableSubtitlesList$:mi,currentSubtitleCaptions$:Sn,isAutoSubtitleCaptionVisible$:wo,chromecastState$:rs,chromecastDeviceName$:xr,chromecastConnected$:Ti,currentFormat$:gn,throughputEstimation$:hn,videoBitrate$:ir,videoSize$:wr,errorLog$:G,crashed$:be,isAudioAvailable$:Br,isAudioDisabled:!!l,canDownload:fe.features.download&&!!d,availableSources$:zi,hasMpegSources$:Ir,isInteractive:w,showInteractiveGraph:fe.features.interactiveGraph,showSeekToInteractive:fe.features.seekToInteractive,showPlayPrevChapter:fe.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:fe.features.interactiveTimeIndicator&&!!_e(In).length,interactiveEpisodes$:In,isInteractiveTime$:T?ti(T):se(!1),isInteractiveExpectation$:En,hasInteractiveBranches:P,playPrevChapterDisabledTooltip:E,looped$:_t,loadedMetadata$:Qt,isAutoQualityAvailable$:$n,previewTrackActive:Fo,previewTrackDragInProgress:Ei},ui:{t:Ue,isMinimalMode$:ct,controlsVisible:se(!1),touched:se(!1),controls:{prevButton:se(void 0),playButton:se(void 0),replayButton:se(void 0),nextButton:se(void 0),playPrevChapterButton:se(void 0),seekToInteractiveButton:se(void 0),interactiveGraphButton:se(void 0),liveButton:se(void 0),time:se(void 0),episodes:se(void 0),volume:se(void 0),subtitles:se(void 0),settings:se(void 0),context:se(void 0),chromecast:se(void 0),pip:se(void 0),"theater-mode-button":se(void 0),fullscreen:se(void 0),vkLogo:se(void 0),interactiveTimeIndicator:se(void 0),timeline:se(void 0),autoplayNextToggle:se(void 0),additionalButtons:z.length?z.reduce(c=>[...c,se(void 0)],[]):[],disabledControls$:bi},modals:{hotKeyMap:{show:se(!1),data:se({title:"",closeBtnText:"",groups:[]})}},isFullscreen:lt,isFullscreenOpenedByKeyboard:ni,rotateAlpha:Dt,isAutoplay:se(!1),debugPanelVisible:se(!1),episodes:{panelOpened$:se(!1),openedByKeyboard$:se(!1)},contextMenu:{visible$:se(!1),btnRef$:se(void 0),openedByBtnKeyboard$:se(!1),openedByHotKey$:se(!1),lastActiveElem$:se(void 0),showContextMenuBtn$:se(!1),position$:se({top:0,left:0})},playerSize:Vi,isMobile:rt,mobileNotReportControlHidden$:Xs,icon3DVideoVisible:se(!1),scrubbingInProgress:Kn,volumeChangingInProgress:rn,is3DVideo:Te,currentGridType$:js,additionalButtonsDeprecated$:ms,additionalDesktopControlPanelRightButtons$:Xl,additionalSettingsMenuItems$:Zl,additionalContextMenuItems$:To,interactiveHideMobileControls:se(!1),overlayContainer$:se(void 0),startedByKeyboard$:se(!1),autoplayNextEnabled$:se(!1),timerNextVideoRunning$:se(!0),settingsMenu:{visible$:se(!1),ref$:se(void 0),openedByBtnKeyboard$:se(!1)},settingsSubMenu:{visible$:se(!1),ref$:se(void 0),name$:se(void 0)},userActionsDisabled:se(!1),hiddenControls:{volume:se(!1),vkLogo:se(!1),pip:se(!1),chromecast:se(!1),settings:se(!1)},isControlsAvailable:Es,controlBlocks:{topLeft:se(void 0),topRight:se(void 0),middle:se(void 0),bottom:se(void 0),bottomLeft:se(void 0),bottomRight:se(void 0)},videoTitleInfo:se(void 0),doubleForwardOn$:wp,doubleForwardAvailable$:a$,previewTrackActive:Fo,previewTrackDragInProgress:Ei,previewTrackAvailable:ps,isPreviewTrackHorizontallyAligned:Wi},ads:{position:se(0),duration:se(0),playbackState:se("inactive"),canSkip:se(!1),secondsToWatchBeforeSkip:se(0),postrollPassed:se(!1)},webApi:{pictureInPictureApi:Re,annotationsApi:Je,slotsApi:Ae,focusManager:j},actions:{internal:{preload:Pr,firstStart:c=>td(c,!1),play:()=>Sa(!1),pause:()=>Zs(!1),togglePlay:kr,toggleMuted:as,openSettingsMenu:ds,closeSettingsMenu:ls,openSettingsSubMenu:cs,closeSettingsSubMenu:Ji,setVolume:c=>Er(c,!1),setMuted:c=>et(c,!1),startVolumeChanging:Ps,stopVolumeChanging:ks,setVideoStream:sr,setAudioStream:c=>Fn(c,!1),setQuality:(c,h)=>So(c,h,!1),setTrafficSavingEnabled:(c,h)=>lr(c,h,!1),setHighQualityEnabled:(c,h)=>zn(c,h,!1),setPlaybackRate:Nt,incrementPlaybackRate:Ii,decrementPlaybackRate:tn,setSubtitle:c=>No(c,!1),toggleSubtitle:()=>qr(!1),togglePictureInPicture:gi,startScrubbing:Yr,progressScrubbing:ge,completeScrubbing:Co,toggleChromecast:Fc,switchToActiveLive:ed,switchFromAdsToVideo:gp,switchFromVideoToAds:Dc,skipAd:Rc,setLiveWaitingStart:hp,setLiveWaitingRecover:Oc,setLiveWaitingRecord:_p,getDebugTextData:Nc,getTraceTextData:bp,getDebugPanelData:Bc,getVideoElement:dl,seekTime:(c,h,V)=>Wn(c,h,V),clearDelayedBufferingCheckTimeout:Fr,seekEpisodeStartTime:$a,seekToPercent:pt,getNextEpisode:od,seekToNextEpisode:yp,getPrevEpisode:Hc,seekToPrevEpisode:xp,startLogging:ot,stopLogging:Ut,startCameraManualRotation:pi,stopCameraManualRotation:dt,moveCameraFocusPX:ai,holdCamera:fi,releaseCamera:Gt,getVideoEpisodes:id,getPreviewThumbsData:Ge,downloadVideo:Hn,addLanguage:Rf,setLanguage:Ie,nextMovie:It,videoRotate:Uo,correctSeekTimeToInteractive:Qv,replayInteractive:R,setLooped:Zt,reportProblem:Ri,setAutoplayNextEnabled:lo,setTimerNextVideoRunning:Ni,prevVideoClick:go,nextVideoClick:Oo,nextVideoAnnouncementShow:Tn,nextVideoAnnouncementClick:Un,nextVideoAnnouncementAuto:ho,nextVideoAnnouncementCancel:en,checkFullscreenSupport:wt,changeDoubleForwardOn:Gv,closePreviewTrack:d$,previewTrackOpened:l$,previewTrackDragStarted:c$,previewTrackDragFinished:u$},external:{firstStart:c=>td(c,!0),play:()=>Sa(!0),pause:()=>Zs(!0),stop:()=>$p(!0),seekTime:c=>li(c),seekEpisodeStartTime:c=>cr(c),setPlaybackRate:c=>Ar(c),setAutoQualityLimits:c=>Bo(c),setMuted:c=>et(c,!0),toggleSubtitle:()=>qr(!0),changeSubtitle:on,setVolume:c=>Er(c,!0),returnFocusToEpisodes:r$,updateAdditionalSettingsItem:wa,addAdditionalSettingsItem:vt,removeAdditionalSettingsItem:gt,updateAdditionalContextItem:to,addAdditionalContextItem:vi,removeAdditionalContextItem:Ki,updateAdditionalButton:xa,addAdditionalButton:Jl,removeAdditionalButton:al,setLiveLowLatency:ll,hideControls:()=>Ys(!1),showControls:()=>Ys(!0),setQuality:c=>So(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>lr(c,"to-video",!0),setHighQualityEnabled:c=>zn(c,"to-video",!0),changeAudioStream:Sr,setMinimalMode:Oe}},callbacks:r,setUiCallbacks:c=>{ze=Ye({},c)},getAdmanWrapper:()=>ue,getLogger:()=>me,getPlayer:()=>N,destroy:s$};return Ht};function Jn(t,e,i,o){var f;let s=(f=e[i])==null?void 0:f.getBoundingClientRect(),a=o&&!!s&&!!(s.right-s.left),{top:l,left:d,bottom:r,right:u}=Ws(e[i],t||void 0);return{left:a?d:0,right:a?u:0,top:a?l:0,bottom:a?r:0,isDisplayed:a}}var b2=["disabledControls$","additionalButtons"],$2=["interactiveTimeIndicator"],Ql=(t,e,i,o)=>{if(t){for(let[s,a]of Object.entries(e))if(!b2.includes(s)){let l=o||$2.includes(s);a.set(Jn(t,i,s,l))}}};var Xu=(t,e,i)=>bt(null,null,function*(){yield mo(),e&&i&&(i.focus(),t.set(!1))});var y2=ke('<path d="M18 10c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2Zm-6 4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Zm-6 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Z"></path>');function Am(t){je(t,{children:(e,i)=>{var o=y2();$(e,o)},$$slots:{default:!0}})}function Lm(t,e){B(e,!0);let[i,o]=Be(),s=()=>x(r,"$contextMenuVisible$",i),a=g(e,"disabled",3,!1),l=g(e,"ariaLabel",3,""),d=xe(),r=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,f=d.ui.contextMenu.showContextMenuBtn$,p=d.ui.contextMenu.position$,v=d.ui.contextMenu.btnRef$,b=K(void 0);Fe(()=>{n(b)&&Et(()=>{v.set(n(b))})});let y=T=>{let R=fa(T),A=F_(n(b));p.set(A),u.set(R),r.set(!s())},_=()=>{f.set(!0)},w=()=>{f.set(!1)},I=m(()=>s()?"opened":"");Ft(t,{get className(){return n(I)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:_,blur:w,get ariaExpanded(){return s()},get ref(){return n(b)},set ref(T){D(b,T,!0)},children:(T,R)=>{Am(T,{})},$$slots:{default:!0}}),F(),o()}var x2=t=>{t.stopPropagation()},w2=L("<div><!> <div></div> <div></div></div>"),S2={hash:"s-24",code:'.interactive-episode-icon-animated.s-24{height:32px;opacity:1;position:absolute;right:16px;top:16px;transition:.3s;width:32px}.interactive-episode-icon-animated.icon-small.s-24{height:28px;width:28px}.invisible.s-24{opacity:0;visibility:hidden}.fullscreen.s-24:not(.mobile){height:40px;right:23px;top:19px;width:40px}.mobile.s-24{height:28px;right:14px;top:12px;width:28px}.fullscreen.mobile.s-24{height:32px;width:32px}@media screen and (orientation:portrait){.interactive-episode-icon-animated.mobile.fullscreen.s-24{right:16px;top:40px}}@keyframes s-24-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-24{animation:s-24-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-24{animation-play-state:paused}.interactive-episode-icon-animated svg{height:100%;width:100%}.ref-block.s-24{height:100%;position:absolute;top:0;visibility:hidden;width:100%}.hidden.s-24{display:none}'};function ac(t,e){var me;B(e,!0),Q(t,S2);let[i,o]=Be(),s=()=>x(w,"$isMobile",i),a=()=>x(A,"$areControlsVisible",i),l=()=>x(E,"$currentGridType$",i),d=()=>x(T,"$isInteractiveTime$",i),r=()=>x(_,"$interactiveControlsOpacity$",i),u=()=>x(R,"$showInteractiveTimeIndicatorTooltip$",i),f=()=>x(I,"$isFullscreen",i),p=g(e,"ref",15,void 0),v=K(void 0),b=xe(),y=_o(),{interactiveControlsOpacity$:_}=y,w=b.ui.isMobile,I=b.ui.isFullscreen,T=b.state.isInteractiveTime$,R=y.showInteractiveTimeIndicatorTooltip$,A=b.ui.controlsVisible,P=(me=b.callbacks)==null?void 0:me.onInteractiveTimeIndicatorClick,E=b.ui.currentGridType$,z=m(()=>!s()&&a()),U=m(()=>Us(l(),"s")),W=m(()=>!d()||!!r()||n(z)),Y=K(!1);Fe(()=>{D(Y,n(W),!0)});let te=()=>{D(Y,!0)},J=()=>{var ue;oe(),(ue=n(v))==null||ue.addEventListener("animationiteration",te,{once:!0})},oe=()=>{var ue;D(Y,!1),(ue=n(v))==null||ue.removeEventListener("animationiteration",te)},de=ue=>{R.set(ue)},ae=m(()=>u()&&!n(W));Fe(()=>{u()?J():oe()});let pe=()=>{n(W)||(R.set(!0),P==null||P())};ln(()=>{R.clearTimeout(),oe()});let ee=()=>{R.set(!1)},$e=q("tooltip_interactive_interaction_time_indicator");var Ee=w2();let ce;Ee.__mousemove=[x2],Ee.__click=pe;var Qe=C(Ee);ko(Qe,{get tooltipContent(){return $e},get tooltipVisible(){return n(ae)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:de,get ref(){return p()},set ref(ue){p(ue)},children:(ue,Re)=>{jd(ue,{completed:!0})},$$slots:{default:!0}});var fe=k(Qe,2);let ve;it(fe,ue=>p(ue),()=>p());var X=k(fe,2);let N;it(X,ue=>D(v,ue),()=>n(v)),S(Ee),O((ue,Re,Je)=>{ce=ie(Ee,1,"interactive-episode-icon-animated s-24",null,ce,ue),ve=ie(fe,1,"ref-block s-24",null,ve,Re),N=ie(X,1,"pulse s-24",null,N,Je)},[()=>({mobile:s(),fullscreen:f(),invisible:n(W),"icon-small":n(U)}),()=>({hidden:n(W)}),()=>({paused:n(Y)})]),ft("mouseleave",Ee,ee),$(t,Ee),F(),o()}Ze(["mousemove","click"]);function Zu(t,e){B(e,!0);let i=g(e,"tooltipEnabled",3,!0),o=g(e,"disabled",3,!1),s=g(e,"className",3,void 0),a=g(e,"ref",15),l=g(e,"tooltipVisible",3,!1);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 s()},get ref(){return a()},set ref(d){a(d)},children:(d,r)=>{var u=Ve();let f=m(()=>e.buttonComponent);var p=le(u);Hi(p,()=>n(f),(v,b)=>{b(v,is(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),$(d,u)},$$slots:{default:!0}}),F()}var Qs={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var T2=ke('<path d="M32 21.68V15a2 2 90 114 0v18a2 2 90 01-4 0v-6.66l-16.3 9.32A2.48 2.48 90 0112 33.56V14.46c0-1.9 2.06-3.08 3.7-2.12z"></path>');function _a(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=m(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),s=m(()=>`${dn(e.size)}${n(o)}`),a=m(()=>i()?"prev-icon":"next-icon");je(t,{get width(){return"48"},get height(){return"48"},get style(){return n(s)},get testId(){return n(a)},get shadow(){return e.shadow},children:(l,d)=>{var r=T2();$(l,r)},$$slots:{default:!0}}),F()}var I2=L('<div class="icon-background-mobile s-21"><!></div>'),E2={hash:"s-21",code:".icon-background-mobile.s-21{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:100%;justify-content:space-around;left:0;position:absolute;top:0;width:100%}"};function Ya(t,e){B(e,!0),Q(t,E2);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),s=g(e,"disabled",3,!1),l=xe().ui.t,d=m(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),r=m(()=>e.type==="prev"?l("hotkey_map_item_prev_video_value"):l("hotkey_map_item_next_video_value")),u=m(()=>`btn-${o()?"m":"d"}--${e.type}`);Ft(t,{get className(){return n(u)},get testId(){var f;return`btn-${(f=e.type)!=null?f:""}`},get disabled(){return s()},get ariaLabel(){return n(d)},get click(){return e.click},get ariaKeyShortCut(){return n(r)},get ref(){return i()},set ref(f){i(f)},children:(f,p)=>{var v=Ve(),b=le(v);{var y=w=>{var I=I2(),T=C(I);let R=m(()=>e.type==="prev");_a(T,{get size(){return"32"},get reversed(){return n(R)}}),S(I),$(w,I)},_=w=>{let I=m(()=>e.type==="prev");_a(w,{get size(){return"24"},get reversed(){return n(I)}})};M(b,w=>{o()?w(y):w(_,!1)})}$(f,v)},$$slots:{default:!0}}),F()}var P2=ke('<path d="M24 21.2a.8.8 90 01-1.34.6L14.08 14a1.34 1.34 90 010-2l8.6-7.8a.8.8 90 011.32.6V11a16 16 90 11-16 16 2 2 90 114 0 12 12 90 1012-12z"></path>');function lc(t,e){B(e,!0);let i=m(()=>dn(e.size));je(t,{get width(){return"48"},get height(){return"48"},get style(){return n(i)},testId:"replay-icon",get shadow(){return e.shadow},children:(o,s)=>{var a=P2();$(o,a)},$$slots:{default:!0}}),F()}import{noop as k2}from"@vkontakte/videoplayer-shared/es2015";var A2=L('<div class="icon-background-mobile s-25"></div>'),L2=L("<!> <div><!></div>",1),M2={hash:"s-25",code:".mobile.s-25{align-items:center;display:flex;justify-content:center;position:relative}.icon-background-mobile.s-25{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);height:calc(100% - 32px);left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function ql(t,e){B(e,!0),Q(t,M2);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),s=g(e,"disabled",3,!1),a=g(e,"className",3,""),l=g(e,"click",3,k2),d=q("tooltip_restart"),r=m(()=>`${o()?"btn-m--play":""} ${a()}`);Ft(t,{get className(){return n(r)},testId:"replay-btn",get ariaLabel(){return d},get disabled(){return s()},get click(){return l()},get ariaKeyShortCut(){return ys.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,f)=>{var p=L2(),v=le(p);{var b=T=>{var R=A2();$(T,R)};M(v,T=>{o()&&T(b)})}var y=k(v,2);let _;var w=C(y);let I=m(()=>o()?"48":"24");lc(w,{get size(){return n(I)}}),S(y),O(T=>_=ie(y,1,"s-25",null,_,T),[()=>({mobile:o()})]),$(u,p)},$$slots:{default:!0}}),F()}var V2=ke('<path d="m17.4 10 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h3.801zm16 0 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h4z"></path>');function qs(t,e){B(e,!0);let i=m(()=>dn(e.size));je(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"pause-icon",get shadow(){return e.shadow},children:(o,s)=>{var a=V2();$(o,a)},$$slots:{default:!0}}),F()}import{noop as R2}from"@vkontakte/videoplayer-shared/es2015";var D2=L('<div class="icon-background-mobile s-23"><!></div>'),O2={hash:"s-23",code:".icon-background-mobile.s-23{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:calc(100% - 32px);justify-content:space-around;left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function Gl(t,e){B(e,!0),Q(t,O2);let[i,o]=Be(),s=()=>x(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=_o(),l=g(e,"ref",15,void 0),d=g(e,"isMobile",3,!1),r=g(e,"isPlaying",3,!1),u=g(e,"disabled",3,!1),f=g(e,"className",3,""),p=g(e,"click",3,R2),b=xe().ui.t,{toggle:y}=a,_=m(()=>y),w=m(()=>s()!==null),I=m(()=>n(w)?s():r()),T=m(()=>n(I)?b("tooltip_pause"):b("tooltip_play")),R=m(()=>n(I)?qs:Rn),A=m(()=>`${d()?"btn-m--play":""} ${f()}`),P=m(()=>n(w)?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 ys.KeyK},get ref(){return l()},set ref(E){l(E)},children:(E,z)=>{var U=Ve();let W=m(()=>n(R));var Y=le(U);{var te=oe=>{var de=D2(),ae=C(de);Hi(ae,()=>n(W),(pe,ee)=>{ee(pe,{get size(){return"48"}})}),S(de),$(oe,de)},J=oe=>{var de=Ve(),ae=le(de);Hi(ae,()=>n(W),(pe,ee)=>{ee(pe,{get size(){return"24"}})}),$(oe,de)};M(Y,oe=>{d()?oe(te):oe(J,!1)})}$(E,U)},$$slots:{default:!0}}),F(),o()}var N2=ke('<path d="M12.58 12.92v2.5a1 1 0 0 1-1.52.85l-5.58-3.42a1 1 0 0 1 0-1.7l5.58-3.42a1 1 0 0 1 1.52.86v2.5l5.48-3.36a1 1 0 0 1 1.52.86v6.82a1 1 0 0 1-1.52.86z"></path>');function Mm(t){je(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=N2();$(e,o)},$$slots:{default:!0}})}function dc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),s=g(e,"disabled",3,!1),a=q("tooltip_interactive_go_back"),l=m(()=>o()?"hidden":"");Ft(t,{get className(){return n(l)},testId:"play-prev-chapter-btn",get ariaLabel(){return a},get disabled(){return s()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,r)=>{Mm(d,{})},$$slots:{default:!0}}),F()}var B2=L('<span class="gutter s-26"><span><!></span></span>'),F2={hash:"s-26",code:".gutter.s-26{--gutterWidth:32px;--gutterHeight:12px;--togglerWidth:18px;--togglerHeight:18px;--togglerGap:calc(var(--togglerWidth)/6);background-color:hsla(0,0%,100%,.3);border-radius:50px;height:var(--gutterHeight);position:relative;width:var(--gutterWidth)}.toggler.s-26{align-items:center;background-color:#626364;border-radius:50%;display:flex;height:var(--togglerHeight);justify-content:center;left:0;position:absolute;top:calc((var(--togglerHeight) - var(--gutterHeight))/2*-1);transform:translateX(calc(var(--togglerGap)*-1));transition-duration:.2s;transition-property:background-color,transform;transition-timing-function:ease;width:var(--togglerWidth)}.toggler.enabled.s-26{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function cc(t,e){B(e,!0),Q(t,F2);let[i,o]=Be(),s=()=>x(r,"$autoplayNextEnabled$",i),a=g(e,"ref",15,void 0),l=xe(),d=l.ui.t,r=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,f=()=>{u(!s(),!0)},p=d("aria_label_autoplay"),v="12",b="#000",y=m(()=>s()?"true":"false");Ft(t,{click:f,get ariaLabel(){return p},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref(_){a(_)},children:(_,w)=>{var I=B2(),T=C(I);let R;var A=C(T);{var P=z=>{Rn(z,{get size(){return v},fill:b})},E=z=>{qs(z,{get size(){return v},fill:b})};M(A,z=>{s()?z(P):z(E,!1)})}S(T),S(I),O(z=>R=ie(T,1,"toggler s-26",null,R,z),[()=>({enabled:s()})]),$(_,I)},$$slots:{default:!0}}),F(),o()}var H2=ke('<path d="M16.73 4.85c-.54-.05-1.23-.05-2.23-.05H7.9a.9.9 0 1 1 0-1.8h6.64q1.41-.01 2.33.05c.64.05 1.2.16 1.73.43a4.4 4.4 0 0 1 1.92 1.92c.27.52.38 1.09.43 1.73q.06.92.05 2.33v5.08q.01 1.41-.05 2.33a5 5 0 0 1-.43 1.73 4.4 4.4 0 0 1-1.92 1.92 5 5 0 0 1-1.73.43q-.92.06-2.33.05H7.9a.9.9 0 1 1 0-1.8h6.6c1 0 1.69 0 2.23-.04.52-.05.82-.13 1.05-.24a2.6 2.6 0 0 0 1.14-1.14c.11-.23.2-.53.24-1.06s.04-1.23.04-2.22v-5c0-1 0-1.69-.04-2.23a3 3 0 0 0-.24-1.05 2.6 2.6 0 0 0-1.14-1.14c-.23-.11-.53-.2-1.05-.24"></path><path d="M7.76 11.17V8.9c0-.71.7-1.15 1.25-.78l4.6 3.1a.96.96 0 0 1 0 1.54L9 15.87c-.55.37-1.25-.07-1.25-.78v-2.26l-4.5 3.04C2.7 16.24 2 15.8 2 15.09V8.91c0-.71.7-1.15 1.25-.78z "></path>',1);function Vm(t){je(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=H2();Xt(),$(e,o)},$$slots:{default:!0}})}function uc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),s=g(e,"disabled",3,!1),a=q("tooltip_interactive_seek"),l=m(()=>o()?"hidden":"");Ft(t,{get className(){return n(l)},testId:"btn-seek-to-interactive",get ariaLabel(){return a},get disabled(){return s()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,r)=>{Vm(d,{})},$$slots:{default:!0}}),F()}var U2=ke('<path d="M15.2 5.9v1.2c0 .6 0 .9.12 1.12q.15.3.46.46c.23.12.52.12 1.12.12h1.2c.6 0 .9 0 1.12-.12q.3-.15.46-.46c.12-.23.12-.52.12-1.12V5.9c0-.6 0-.9-.12-1.12a1 1 0 0 0-.46-.46c-.23-.12-.52-.12-1.12-.12h-1.2c-.6 0-.9 0-1.12.12q-.3.15-.47.46c-.11.23-.11.53-.11 1.12m-.05 11.03v1.14c0 .6 0 .91.12 1.14q.15.31.47.47c.23.12.53.12 1.14.12h1.22c.6 0 .9 0 1.14-.12a1 1 0 0 0 .47-.47c.12-.23.12-.53.12-1.14v-1.14c0-.6 0-.9-.12-1.14a1 1 0 0 0-.47-.47c-.23-.12-.54-.12-1.14-.12h-1.22c-.6 0-.91 0-1.14.12a1 1 0 0 0-.47.47c-.12.23-.12.53-.12 1.14"></path>'),z2=ke('<path d="M16.78 3h1.42q.47 0 .83.02.4.02.82.21.61.31.92.92.2.41.21.81.03.36.02.83v1.4q0 .47-.02.83-.02.4-.21.81a2 2 0 0 1-.92.92 2 2 0 0 1-.82.21q-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.2 2 2 0 0 1-.93-.93 2 2 0 0 1-.2-.8l-.03-.64h-2.2c-.49 0-.8 0-1.04.02a1 1 0 0 0-.35.06 1 1 0 0 0-.35.35 1 1 0 0 0-.07.35c-.02.24-.02.55-.02 1.04v5.57c0 .5 0 .8.02 1.04s.05.31.07.34q.12.23.35.35c.03.02.11.05.34.07s.56.02 1.05.02h2.2q0-.34.02-.62.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02h1.42q.47 0 .83.02.4.01.82.2.61.31.92.93.2.41.21.8.03.37.02.84v1.4q0 .47-.02.83-.02.39-.21.81a2 2 0 0 1-.92.92q-.43.2-.82.21-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.21 2 2 0 0 1-.93-.92 2 2 0 0 1-.2-.81l-.03-.63h-2.24q-.68 0-1.16-.03a3 3 0 0 1-1.01-.26 2.6 2.6 0 0 1-1.14-1.14 3 3 0 0 1-.26-1q-.04-.5-.03-1.16v-1.93H2.9A.9.9 0 0 1 2 12c0-.5.4-.9.9-.9h5.23V9.18q0-.68.03-1.16.02-.51.26-1.02a2.6 2.6 0 0 1 1.14-1.13q.5-.24 1.02-.26.48-.04 1.16-.02h2.23q0-.34.02-.63.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02m-.84 1.84.15-.02c.16-.02.37-.02.72-.02h1.35c.36 0 .57 0 .72.02l.15.02a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.13l-.15.02-.72.01h-1.35l-.72-.01-.15-.03a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71V5.82q0-.5.02-.71l.02-.15a.3.3 0 0 1 .12-.12m0 11.02.15-.03.72-.01h1.35l.72.01.15.03a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.12l-.15.02c-.15.02-.36.02-.72.02h-1.35c-.35 0-.56 0-.72-.02l-.15-.02a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71v-1.34c0-.35 0-.56.02-.71l.02-.15a.3.3 0 0 1 .12-.13"></path><!>',1);function Rm(t,e){let i=g(e,"isOpened",3,!1),o=m(()=>i()?"graph-close-icon":"graph-open-icon");je(t,{get testId(){return n(o)},children:(s,a)=>{var l=z2(),d=k(le(l));{var r=u=>{var f=U2();$(u,f)};M(d,u=>{i()&&u(r)})}$(s,l)},$$slots:{default:!0}})}function pc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),s=g(e,"disabled",3,!1),a=g(e,"graphIsOpened",3,!1),d=xe().ui.t,r=m(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=m(()=>o()?"hidden":"");Ft(t,{get className(){return n(u)},testId:"btn-graph",get disabled(){return s()},get ariaLabel(){return n(r)},get click(){return e.click},get ref(){return i()},set ref(f){i(f)},children:(f,p)=>{let v=m(()=>!!a());Rm(f,{get isOpened(){return n(v)}})},$$slots:{default:!0}}),F()}import{PlaybackState as fb}from"@vkontakte/videoplayer-core/es2015";function fc(t,e){B(e,!0);let[i,o]=Be(),s=()=>x(u,"$playbackState$",i),a=g(e,"isMobile",3,!1),l=g(e,"isLiveActive",3,!1),d=g(e,"ariaLabel",3,""),r=xe(),u=r.state.playbackState$,f=r.actions.internal.switchToActiveLive,p=r.actions.internal.togglePlay,v=m(()=>()=>{if(!l()){f();return}s()===fb.PAUSED&&p()}),b=m(()=>a()?"":"btn--live btn-full-opacity"),y=m(()=>l()?"btn-live":"btn-live-offset"),_=m(()=>l()&&s()===fb.PLAYING);Ft(t,{get className(){return n(b)},get testId(){return n(y)},get disabled(){return n(_)},get ariaLabel(){return d()},get click(){return n(v)},children:(w,I)=>{Nd(w,{get isActive(){return l()}})},$$slots:{default:!0}}),F(),o()}import{noop as mb}from"@vkontakte/videoplayer-shared/es2015";var W2=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),K2=L('<img class="icon" aria-hidden="true"/>');function ja(t,e){"use strict";let i=K(!1),o=()=>{D(i,!0)};var s=Ve(),a=le(s);{var l=r=>{var u=W2();$(r,u)},d=r=>{var u=K2();O(()=>De(u,"src",e.icon)),ft("error",u,o),Da(u),$(r,u)};M(a,r=>{n(i)?r(l):r(d,!1)})}$(t,s)}function Dm(t,e){B(e,!0);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,mb),s=g(e,"ref",15),a=m(()=>o()===mb),l=m(()=>n(a)||i()),d=m(()=>n(a)?"btn-full-opacity":"");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 s()},set ref(r){s(r)},children:(r,u)=>{let f=m(()=>{var p;return(p=e.testId)!=null?p:e.id});Ft(r,{get className(){return n(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(l)},get testId(){return n(f)},children:(p,v)=>{ja(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),F()}var vb=t=>!!t.buttonComponent;var Gs={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var Ju=(t,e,i,o)=>{if(t)for(let[s,a]of Object.entries(e))a.set(Jn(t,i,s,o))};import{interpolate as Om}from"@vkontakte/videoplayer-shared/es2015";var gb=10,hb=40,Nm=.2,q2=.5,G2=65,Y2=114,j2=4,_b=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=m(()=>i?G2:Y2),s=K(!1),a=K(0),l=K(0),d=m(()=>n(o)+gb-hb-j2),r=m(()=>Om(n(a),[Nm,1],[0,-n(d)])),u=m(()=>Om(n(a),[Nm,1],[0,hb])),f=m(()=>Om(n(a),[Nm,1],[0,n(o)+gb]));return{progressBarY:()=>n(r),controlsY:()=>n(u),calculatedHeight:()=>n(f),onPointerDown:_=>{var w;D(l,((w=e())==null?void 0:w.getBoundingClientRect().bottom)||0,!0),D(s,!0)},onPointerMove:_=>{if(!n(s))return;let w=Math.max(Math.min(_.clientY-n(l),0),-n(d));D(a,Math.abs(w/n(d)),!0)},onPointerUp:()=>{D(s,!1),D(a,n(a)>=q2?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{D(a,0)}}};var X2=t=>t;function ba(t,{delay:e=0,duration:i=400,easing:o=X2}={}){let s=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*s}`}}var Z2=L('<span class="root s-2a"> </span>'),J2={hash:"s-2a",code:".root.s-2a{box-shadow:0 8px 24px 0 rgba(0,0,0,.08);box-shadow:0 0 2px 0 rgba(0,0,0,.08);color:#fff;font-size:13px;font-weight:500;line-height:16px}"};function Bm(t,e){Q(t,J2);var i=Z2(),o=C(i,!0);S(i),O(()=>he(o,e.time)),$(t,i)}var ew=L('<div class="tooltip-wrapper s-12"><div><!></div></div>'),tw={hash:"s-12",code:'.tooltip-wrapper.s-12{display:block;position:relative}.tooltip.s-12{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-12: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-12{opacity:1;visibility:visible}'};function Fm(t,e){Q(t,tw);let i=g(e,"active",3,!1),o=g(e,"pointer",3,!1),s=g(e,"translateXPx",3,0),a=g(e,"translateYPx",3,0),l=g(e,"leftOffset",3,0),d=g(e,"rightOffset",3,0),r=K(void 0),u=K(void 0);function f(w){if(!n(u))return 0;let{width:I}=n(u).getBoundingClientRect(),T=I/2;return w<T?T+l():w>e.containerWidth-T?e.containerWidth-T-d():w}let p=m(()=>f(s()));var v=ew(),b=C(v);let y;var _=C(b);ei(_,()=>{var w;return(w=e.children)!=null?w:$t}),S(b),it(b,w=>D(u,w),()=>n(u)),S(v),it(v,w=>D(r,w),()=>n(r)),O(w=>{Ke(v,`transform: translate(${n(p)}px, ${a()}px);`),y=ie(b,1,"tooltip s-12",null,y,w),Ke(b,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),$(t,v)}var bb=t=>Math.abs(t)/90%4===1;var iw=ke('<path xmlns="http://www.w3.org/2000/svg" d="M15.782 10.152a.75.75 0 0 1-1.06 0L9.999 5.438l-4.72 4.716a.75.75 0 0 1-1.061-1.061l5.251-5.246a.75.75 0 0 1 1.06 0l5.253 5.246a.75.75 0 0 1 0 1.06Z"></path><path xmlns="http://www.w3.org/2000/svg" d="M15.782 16.152a.75.75 0 0 1-1.06 0l-4.723-4.715-4.72 4.716a.75.75 0 0 1-1.061-1.061l5.251-5.246a.75.75 0 0 1 1.06 0l5.253 5.245a.75.75 0 0 1 0 1.061Z"></path>',1);function Hm(t){je(t,{height:"20",width:"20",shadow:!0,children:(e,i)=>{var o=iw();Xt(),$(e,o)},$$slots:{default:!0}})}var ow=L('<div class="rich-seek-hint s-10"><span class="icon_wrapper s-10"><!></span> <span class="rich-seek-hint-text s-10"> </span></div>'),nw=L('<div class="preview s-10"><!></div>'),rw=L('<div class="episode s-10"><!></div>'),sw=L('<div class="time s-10"> </div>'),aw=L("<div><!> <!> <!></div>"),lw={hash:"s-10",code:".timeline-preview.s-10{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-10{bottom:72px}.preview.s-10{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-10{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-10,.time.s-10{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-10{color:var(--white)}.rich-seek-hint.s-10{position:absolute;text-align:center;top:-12px;transform:translateY(-100%)}.icon_wrapper.s-10{display:inline-block;height:20px;margin-right:6px;vertical-align:top;width:20px}.rich-seek-hint-text.s-10{font-size:14px;line-height:18px;text-shadow:0 2px 4px rgba(0,0,0,.3),0 7px 16px rgba(0,0,0,.25);vertical-align:top}"};function Um(t,e){B(e,!0),Q(t,lw);let[i,o]=Be(),s=()=>x(w,"$isMinimalMode$",i),a=()=>x(I,"$rotateAlpha",i),l=()=>x(T,"$playerSize",i),d=()=>x(R,"$previewTrackAvailable",i),r={MOBILE:150,DESKTOP:278},u=g(e,"time",3,""),f=g(e,"isMobile",3,!1),p=g(e,"videoEpisodes",19,()=>[]),v=g(e,"progress",3,0),b=g(e,"duration",3,0),y=g(e,"isInteractive",3,!1),_=xe(),w=_.ui.isMinimalMode$,I=_.ui.rotateAlpha,T=_.ui.playerSize,R=_.ui.previewTrackAvailable,A=K(0),P=K(0),E=K(""),z=K(0),U=K(0),W=K(0),Y=K(0),te=m(()=>Fu(v(),b(),p())),J=m(()=>!s()),oe=m(()=>zl(a())),de=m(()=>bb(a())),ae=m($e),pe=m(()=>(n(de)?1:-1)*(n(A)/2-n(P)/2)),ee=m(()=>n(pe)*-1);Fe(()=>{(Ae=>{D(A,Ae.width,!0),D(P,Ae.height,!0)})(ce())}),Fe(()=>{(Ae=>{D(E,Ae.imgSrc,!0),D(z,Ae.imgWidth,!0),D(U,Ae.imgHeight,!0),D(W,Ae.imgOffsetX,!0),D(Y,Ae.imgOffsetY,!0)})(Qe(v()))});function $e(){var Se;let Ae=f()?r.MOBILE:r.DESKTOP,{isVertical:j}=Ee(),ne=30;return(Se=n(te))!=null&&Se.text&&(ne+=16),(j||n(oe))&&(ne+=18,ne+=50),Math.min(Math.max(l().height-ne,0),Ae)}function Ee(){let Ae=e.previewThumbsData.frameWidth,j=e.previewThumbsData.frameHeight,ne=j>Ae;return{width:Ae,height:j,isHorizontal:!ne,isVertical:ne}}function ce(){let{height:Ae,isHorizontal:j,isVertical:ne,width:Se}=Ee();return j&&(Ae=Ae/Se*n(ae),Se=n(ae)),ne&&(Se=Se/Ae*n(ae),Ae=n(ae)),{width:Se,height:Ae}}function Qe(Ae){let j;e.previewThumbsData.isUV?j=Math.floor(b()*Ae/e.previewThumbsData.frequency):j=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*Ae)));let ne=Math.floor(j/e.previewThumbsData.countPerImage),Se=Math.floor(j%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),Le=j%e.previewThumbsData.countPerRow,ze=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&ne===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(ze=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&ze++);let Ce=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&ne===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(Ce=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let we=n(A)*Ce,He=n(P)*ze,rt=-Le*n(A),ct=-Se*n(P);return{imgSrc:e.previewThumbsData.links[ne],imgWidth:we,imgHeight:He,imgOffsetX:rt,imgOffsetY:ct}}var fe=aw();let ve;var X=C(fe);{var N=Ae=>{var j=nw(),ne=C(j);{var Se=Le=>{var ze=ow(),Ce=C(ze),we=C(Ce);Hm(we,{}),S(Ce);var He=k(Ce,2),rt=C(He,!0);S(He),S(ze),O(ct=>he(rt,ct),[()=>q("preview_track_notification_text")]),$(Le,ze)};M(ne,Le=>{d()&&Le(Se)})}S(j),O(()=>Ke(j,`width: ${n(A)}px; height: ${n(P)}px; background-image: url(${n(E)}); background-size: ${n(z)}px ${n(U)}px; background-position: ${n(W)}px ${n(Y)}px;
|
|
60
|
-
transform: rotate(${a()}deg) ${n(oe)?`translate(${n(
|
|
61
|
-
`)),$(Ae,j)};M(X,Ae=>{n(E)&&Ae(N)})}var me=k(X,2);{var ue=Ae=>{var j=rw(),ne=C(j);{var Se=Le=>{var ze=Ve(),Ce=le(ze);{var we=rt=>{var ct=$s();O(Mt=>he(ct,Mt),[()=>q("tooltip_episode_unfinished")]),$(rt,ct)},He=rt=>{var ct=$s();O(()=>he(ct,n(te).text||"")),$(rt,ct)};M(Ce,rt=>{y()&&n(te).completed===!1?rt(we):rt(He,!1)})}$(Le,ze)};M(ne,Le=>{n(te)&&Le(Se)})}S(j),$(Ae,j)};M(me,Ae=>{n(J)&&Ae(ue)})}var Re=k(me,2);{var Je=Ae=>{var j=sw(),ne=C(j,!0);S(j),O(()=>he(ne,u())),$(Ae,j)};M(Re,Ae=>{y()||Ae(Je)})}S(fe),O(Ae=>{ve=ie(fe,1,"timeline-preview s-10",null,ve,Ae),Ke(fe,`width: ${n(oe)?n(P):n(A)}px;`)},[()=>({mobile:f()})]),$(t,fe),F(),o()}var dw=L('<span class="time s-f"> </span>'),cw=L("<!> <!>",1),uw={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 zm(t,e){var Ne,be,Oe,Ie,ht;B(e,!0),Q(t,uw);let[i,o]=Be(),s=()=>x(J,"$interactiveEpisodes$",i),a=()=>x(E,"$duration$",i),l=()=>x(P,"$position$",i),d=()=>x(ae,"$isInteractiveExpectation$",i),r=()=>x(de,"$isInteractiveTime$",i),u=()=>x(Ee,"$previewTrackActive",i),f=()=>x(z,"$isLive$",i),p=()=>x($e,"$disabledControls$",i),v=()=>x(W,"$isMobile",i),b=()=>x(U,"$isActiveLive$",i),y=()=>x(A,"$bufferedProgress$",i),_=g(e,"showTimeline",3,!1),w=g(e,"withEpisodes",3,!0),I=g(e,"ref",15,void 0),T=xe(),R=Lt(),A=T.state.bufferedProgress$,P=T.state.positionWithScrubbing$,E=T.state.duration$,z=T.state.isLive$,U=T.state.isActiveLive$,W=T.ui.isMobile,Y=R.features.episodes&&w()?T.actions.internal.getVideoEpisodes():void 0,te=T.actions.internal.getPreviewThumbsData(),J=T.state.interactiveEpisodes$,oe=T.state.isInteractive,de=T.state.isInteractiveTime$,ae=T.state.isInteractiveExpectation$,pe=T.actions.internal.correctSeekTimeToInteractive,ee=(Ne=T.callbacks)==null?void 0:Ne.onDisabledTimelineClick,$e=T.ui.controls.disabledControls$,Ee=T.ui.previewTrackActive,ce=(Oe=(be=T.callbacks)==null?void 0:be.uiInfo)==null?void 0:Oe.onTimelineMouseEnter,Qe=(ht=(Ie=T.callbacks)==null?void 0:Ie.uiInfo)==null?void 0:ht.onTimelineMouseLeave,fe=T.ui.t,ve=R.features.interactiveResponsiveUi,X=m(()=>oe?s():Y),N=m(()=>jo(a())),me=m(()=>jo(l())),ue=m(()=>l()/a()),Re=m(()=>d()||r()),Je=K(!1),Ae=K(""),j=K(0),ne=K(0),Se=K(0),Le=m(()=>({containerWidth:n(ne),translateXPx:n(j),translateYPx:oe&&te?-36:-16,active:n(Je)&&_()&&!n(Re)&&!ve&&!u(),pointer:!R.features.timelinePreview||!te||f()})),ze=fe("aria_timeline"),Ce=m(()=>fe("aria_timeline_value",{position:n(me),duration:n(N)}));function we(ye){return!pe||!oe?ye:pe(ye*a())/a()}function He(ye,qe){var Ue;(Ue=e.onSliderPointerDown)==null||Ue.call(e,qe),T.actions.internal.startScrubbing(we(ye))}function rt(ye){r()||T.actions.internal.progressScrubbing(we(ye))}function ct(ye){var qe;T.actions.internal.completeScrubbing(we(ye)),D(Je,!1),(qe=e.onSliderPointerUp)==null||qe.call(e)}function Mt(ye,qe,Ue){var st;(st=e.onSliderPointerEnter)==null||st.call(e,ye),wt(ye,qe,Ue),D(Je,!0)}function lt(ye,qe,Ue,st){var qt;(qt=e.onSliderMove)==null||qt.call(e,st,ye),wt(ye,qe,Ue),D(Je,!0)}function ni(){var ye;D(Je,!1),(ye=e.onSliderLeave)==null||ye.call(e)}function wt(ye,qe,Ue){D(Se,we(ye),!0),D(j,qe,!0),Ue&&D(ne,Ue,!0),D(Ae,Rt(ye),!0)}function Rt(ye){let qe=jo((f()?1-ye:ye)*a());return f()?`-${qe}`:qe}let Dt=m(()=>p().has("TIMELINE"));var Qt=cw(),Te=le(Qt);Fm(Te,is(()=>n(Le),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(ye,qe)=>{var Ue=Ve(),st=le(Ue);{var qt=Yt=>{Um(Yt,{get time(){return n(Ae)},get isMobile(){return v()},get videoEpisodes(){return n(X)},get previewThumbsData(){return te},get progress(){return n(Se)},get duration(){return a()},get isInteractive(){return oe}})},Pt=Yt=>{var bi=dw(),Vi=C(bi,!0);S(bi),O(()=>he(Vi,n(Ae))),$(Yt,bi)};M(st,Yt=>{R.features.timelinePreview&&te&&!f()?Yt(qt):Yt(Pt,!1)})}$(ye,Ue)},$$slots:{default:!0}}));var G=k(Te,2);Qa(G,{className:"timeline-slider",get isActiveLive(){return b()},get isMobile(){return v()},get ariaLabel(){return ze},ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return l()},get ariaValueText(){return n(Ce)},get loadedProgress(){return y()},get filledProgress(){return n(ue)},get handleProgress(){return n(ue)},get videoEpisodes(){return n(X)},onPointerDown:He,onHandleMove:rt,onPointerMove:lt,onPointerUp:ct,onPointerEnter:Mt,onPointerLeave:ni,get onMouseEnter(){return ce},get onMouseLeave(){return Qe},get onDisabledClick(){return ee},get isInteractive(){return oe},get disabled(){return n(Dt)},get handleAlwaysVisible(){return u()},get hideHandel(){return r()},testId:"progress_bar",onContextMenu:ct,get ref(){return I()},set ref(ye){I(ye)}}),$(t,Qt),F(),o()}var pw={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 mc(t,e){B(e,!0),Q(t,pw);let[i,o]=Be(),s=()=>x(r,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"duration",3,0),d=xe(),r=d.ui.isMobile,u=d.ui.t,f=m(()=>jo(l())),p=m(()=>jo(a())),v=m(()=>a()/l()),b=m(()=>u("aria_timeline_value",{position:n(p),duration:n(f)})),y=m(()=>Math.round(n(v)*100));Qa(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n(b)},get filledProgress(){return n(v)},hideHandel:!0,get squareBorders(){return s()}}),F(),o()}var fw=L("<div><!></div>"),mw=L("<div></div>"),vw={hash:"s-d",code:".timeline.s-d{align-items:center;bottom:0;box-sizing:border-box;display:flex;min-width:86px;pointer-events:all;position:relative;width:100%}.timeline.mobile.s-d{height:16px;margin-top:6px;padding:6px 12px 7px}.withoutPadding.s-d{padding:0}.timeline-stub.s-d{min-width:20px;width:100%}.timeline-stub.mobile.s-d{height:8px}"};function Xa(t,e){B(e,!0),Q(t,vw);let[i,o]=Be(),s=()=>x(w,"$isLive$",i),a=()=>x(R,"$isMobile",i),l=()=>x(A,"$disabled",i),d=()=>x(T,"$adPosition",i),r=()=>x(I,"$adDuration",i),u=g(e,"isAds",3,!1),f=g(e,"isHidden",3,!1),p=g(e,"timelineNotAvailable",3,!1),v=g(e,"needPadding",3,!0),b=g(e,"ref",15,void 0),y=xe(),_=Lt(),w=y.state.isLive$,I=y.ads.duration,T=y.ads.position,R=y.ui.isMobile,A=se(!1),P=m(()=>!p()&&(!s()||s()&&e.canRewindLive&&e.isRewindableLive||u()));var E=Ve(),z=le(E);{var U=Y=>{var te=fw();let J;var oe=C(te);{var de=pe=>{mc(pe,{get position(){return d()},get duration(){return r()}})},ae=pe=>{zm(pe,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return n(P)},get withEpisodes(){return e.withEpisodes},get onSliderMove(){return e.onSliderMove},get onSliderPointerDown(){return e.onSliderPointerDown},get onSliderPointerUp(){return e.onSliderPointerUp},get onSliderLeave(){return e.onSliderLeave},get onSliderPointerEnter(){return e.onSliderPointerEnter},get ref(){return b()},set ref(ee){b(ee)}})};M(oe,pe=>{u()?pe(de):pe(ae,!1)})}S(te),Ns(te,()=>Vl(f()&&_.features.usePerformanceFix,A,_.disableInvisibleComponentsTimeout)),O(pe=>J=ie(te,1,"timeline s-d",null,J,pe),[()=>({withoutPadding:!v(),mobile:a(),"out-of-flow":l()})]),$(Y,te)},W=Y=>{var te=mw();let J;O(oe=>J=ie(te,1,"timeline-stub s-d",null,J,oe),[()=>({mobile:a()})]),$(Y,te)};M(z,Y=>{n(P)?Y(U):Y(W,!1)})}$(t,E),F(),o()}import{getRangeAroundIndex as gw}from"@vkontakte/videoplayer-shared/es2015";import{ThinOneStat as hw}from"@vkontakte/videoplayer-statistics/es2015";var _w=(t,e,i,o,s,a,l)=>{D(e,!0),D(i,t.clientX,!0),D(o,n(s),!0),a(l())},bw=L("<div></div>"),$w=L('<div><div class="track s-2c"></div></div>'),yw={hash:"s-2c",code:'.root.s-2c{display:flex;height:var(--preview-track-frame-height-horizontal);overflow:hidden;position:relative;width:100%}.root.is-vertical-video.s-2c,.root.vertically-rotated.s-2c{height:var(--preview-track-frame-height-vertical)}.root.s-2c:after{background-color:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.12);box-shadow:0 0 2px 0 rgba(0,0,0,.06);content:"";height:100%;margin:0 auto;pointer-events:none;width:3px;z-index:1}.track.s-2c{bottom:0;display:flex;left:0;padding:0 50%;top:0}.frame.s-2c,.track.s-2c{position:absolute}.frame.s-2c{background-position-x:calc(var(--column-index)*-1*var(--frame-width));background-position-y:calc(var(--frame-height)*-1*var(--row-index));background-size:calc(var(--frame-width)*var(--column-numbers)) calc(var(--frame-height)*var(--row-numbers));flex-shrink:0;height:var(--frame-height);pointer-events:none;transform-origin:center;width:var(--frame-width)}.vertically-rotated.s-2c .frame:where(.s-2c){transform-origin:0 0}.rotate-1.s-2c{transform:rotate(-90deg) translateX(-100%)}.rotate-2.s-2c{transform:rotate(-180deg)}.rotate-3.s-2c{transform:rotate(-270deg) translateY(-100%)}'};function Km(t,e){B(e,!0),Q(t,yw);let[i,o]=Be(),s=()=>x(R,"$rotateAlpha",i),a=()=>x(_,"$position$",i),l=()=>x(y,"$duration$",i),d=xe(),{countPerImage:r=0,countPerRow:u=0,countTotal:f=0,links:p=[],frameHeight:v=0,frameWidth:b=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:_}=d.state,{startScrubbing:w,progressScrubbing:I,completeScrubbing:T}=d.actions.internal,R=d.ui.rotateAlpha,A=K(void 0),P=K(!1),E=K(0),z=K(0),U=K(0),W=K(0),Y=m(()=>v<=b),te=m(()=>zl(s())),J=m(()=>n(Y)?!n(te):n(te)),oe=114,de=65,ae=3,pe=m(()=>n(J)?oe:de),ee=m(()=>n(Y)?oe:de),$e=m(()=>n(Y)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),Ee=m(()=>f*n(pe)),ce=K(0);Fe(()=>{D(W,Math.ceil(-n(U)/n(pe))-1),D(U,-n(Ee)*a()/l())});let Qe=()=>{T(fe(),!0,hw.ActionSeekType.RICH)},fe=()=>l()*-n(U)/n(Ee)/l(),ve=!1,X=Ce=>{if(!n(P))return!1;let we=Ce.clientX-n(E);D(U,n(z)+we),D(U,Math.max(Math.min(n(U),0),-n(Ee)),!0),Math.abs(we)>1&&(ve=!0),I(fe())},N=Ce=>{n(P)&&(D(P,!1),!ve&&Ce&&D(U,-(Ce.offsetX-n(ce)/2)),ve=!1,Qe())},me=()=>{n(P)&&N()},ue=m(()=>r/u),Re=(Ce,we)=>{if(Ce!==p.length-1)return u;let He=0,rt=we*u;for(let ct=1;ct<=u;ct++)Ce*r+He+rt<f&&He++;return He},Je=m(()=>Math.floor(n(W)/r)),Ae=m(()=>gw(3,n(Je),p.length-1)),j=(Ce,we,He)=>{let rt=r*n(pe);return Ce*rt+we*n(pe)*u+n(ce)/2-ae/2+He*n(pe)},ne=m(()=>[`--row-numbers: ${n(ue)}`,`--column-numbers: ${u}`,`--frame-width: ${n(ee)}px`,`--frame-height: ${n($e)}`].join(";"));var Se=$w();let Le;var ze=C(Se);ze.__pointerdown=[_w,P,E,z,U,w,fe],ze.__pointermove=X,ze.__pointerup=N,yi(ze,20,()=>n(Ae),Ce=>Ce,(Ce,we)=>{var He=Ve(),rt=le(He);yi(rt,16,()=>Array.from({length:n(ue)},(ct,Mt)=>Mt),ct=>ct,(ct,Mt)=>{var lt=Ve(),ni=le(lt);yi(ni,16,()=>Array.from({length:Re(we,Mt)},(wt,Rt)=>Rt),wt=>wt,(wt,Rt)=>{var Dt=bw();O((Qt,Te)=>{Ke(Dt,Qt),ie(Dt,1,Te,"s-2c")},[()=>`--row-index: ${Mt}; --column-index: ${Rt}; left: ${j(we,Mt,Rt)}px; background-image: url(${p[we]});`,()=>`frame rotate-${Math.abs(s())/90%4}`]),$(wt,Dt)}),$(ct,lt)}),$(Ce,He)}),S(ze),S(Se),it(Se,Ce=>D(A,Ce),()=>n(A)),O(Ce=>{Le=ie(Se,1,"root s-2c",null,Le,Ce),Ke(Se,n(ne)),Ke(ze,`transform: translateX(${n(U)}px); width: ${n(Ee)}px;`)},[()=>({"is-vertical-video":!n(Y),"vertically-rotated":n(te)})]),ft("mouseleave",ze,me),Mn(Se,"clientWidth",Ce=>D(ce,Ce)),$(t,Se),F(),o()}Ze(["pointerdown","pointermove","pointerup"]);var xw=L('<div class="notification s-2b"><span class="description s-2b"> </span></div>'),ww={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 Qm(t,e){B(e,!1),Q(t,ww);let i=340,{ui:{t:o}}=xe();Yo();var s=xw(),a=C(s),l=C(a,!0);S(a),S(s),O(d=>he(l,d),[()=>o("preview_track_close_tooltip")],hr),Bs(3,s,()=>ba,()=>({duration:i})),$(t,s),F()}import{getRangeAroundIndex as Sw}from"@vkontakte/videoplayer-shared/es2015";var Cw=L('<div class="preview-track-close tooltip s-28"><!></div>'),Tw=L('<div class="preview-track-control s-28"><!> <div class="preview-track-close s-28"><!></div> <!></div>'),Iw=L('<div class="wrapper-preview-track s-28"><!></div>'),Ew=L('<div class="enriched-timeline s-28"><!> <!> <!></div>'),Pw={hash:"s-28",code:".enriched-timeline.s-28{padding:var(--timeline-padding-vertical-top) var(--timeline-padding-horizontal) var(--timeline-padding-vertical-bottom);pointer-events:auto;position:relative}.preview-track-control.s-28{align-items:center;display:flex;justify-content:center;left:0;padding:0 calc(var(--timeline-padding-horizontal));pointer-events:none;position:absolute;right:0;top:calc((var(--timeline-height) + var(--preview-track-controls-top))*-1)}.preview-track-close.s-28{pointer-events:auto;position:absolute;right:calc(var(--timeline-padding-horizontal))}.preview-track-close.tooltip.s-28{bottom:32px;opacity:0;transition:opacity .2s}.preview-track-close.s-28:hover+.tooltip:where(.s-28){opacity:1}.wrapper-preview-track.s-28{box-sizing:border-box;left:0;overflow:hidden;padding:0 calc(var(--timeline-padding-horizontal));position:absolute;right:0;z-index:-1}"};function qm(t,e){B(e,!0),Q(t,Pw);let[i,o]=Be(),s=()=>x(_,"$playerSize",i),a=()=>x(y,"$duration$",i),l=()=>x(w,"$previewTrackActive",i),d=()=>x(v,"$position$",i),r=()=>x(b,"$isRewindableLive$",i),u=g(e,"timelineRef",15,void 0),f=xe(),p=200,{positionWithScrubbing$:v,isRewindableLive$:b,duration$:y}=f.state,{playerSize:_,previewTrackActive:w}=f.ui,{countPerImage:I=0,links:T=[],frequency:R=0}=f.actions.internal.getPreviewThumbsData()||{},A=m(()=>s().width>100),P=K(!b_()),E=()=>{n(P)&&(__(),D(P,!1))},z=pe=>{let ee=Math.floor(a()*pe/R),$e=Math.floor(ee/I),Ee=Sw(3,$e,T.length-1);for(let ce of Ee){let Qe=new Image;Qe.src=T[ce]}},U=(pe,ee)=>{z(ee),!l()&&e.onTimelineMove(pe)};var W=Ew(),Y=C(W);{var te=pe=>{var ee=Tw(),$e=C(ee);let Ee=m(()=>jo(d()));Bm($e,{get time(){return n(Ee)}});var ce=k($e,2),Qe=C(ce);Hs(Qe,{onClick:()=>f.actions.internal.closePreviewTrack()}),S(ce);var fe=k(ce,2);{var ve=X=>{var N=Cw(),me=C(N);Qm(me,{}),S(N),$(X,N)};M(fe,X=>{n(P)&&X(ve)})}S(ee),ft("mouseleave",ce,E),Bs(3,ee,()=>ba,()=>({duration:p})),$(pe,ee)};M(Y,pe=>{l()&&pe(te)})}var J=k(Y,2);let oe=m(()=>!n(A));Xa(J,{get isHidden(){return n(oe)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return r()},onSliderMove:U,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:z,get ref(){return u()},set ref(pe){u(pe)}});var de=k(J,2);{var ae=pe=>{var ee=Iw(),$e=C(ee);Km($e,{}),S(ee),O(()=>Ke(ee,`height: ${e.animatedPreviewTrackHeight}px;`)),$(pe,ee)};M(de,pe=>{e.previewTrackAvailable&&pe(ae)})}S(W),O(()=>Ke(W,`transform: translateY(${e.animatedOffsetY}px);`)),$(t,W),F(),o()}var Aw=L('<div><!> <div class="controls s-1a" data-testid="player_controls"><div class="controls-left s-1a"><!> <!> <!></div> <div class="controls-right s-1a"></div></div></div> <!>',1),Lw={hash:"s-1a",code:'.wrapper-bottom.s-1a{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-1a:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-1a>:where(.s-1a){pointer-events:auto}.controls.s-1a{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-1a,.controls-right.s-1a{align-content:center;display:flex}.controls-left.s-1a{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-1a >:not(:first-child),.controls-right.s-1a >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-1a{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1a{transition:none}'};function Ym(t,e){var ll,wa;B(e,!0),Q(t,Lw);let[i,o]=Be(),s=()=>x(Ao,"$disabledControls$",i),a=()=>x(Gt,"$adPlaybackState",i),l=()=>x(bi,"$playbackState$",i),d=()=>x(bo,"$currentSubtitle$",i),r=()=>x(ji,"$isEnded$",i),u=()=>x(Lo,"$currentGridType$",i),f=()=>x(qt,"$isMinimalMode$",i),p=()=>x(si,"$isLive$",i),v=()=>x(Ci,"$chromecastState$",i),b=()=>x(Xi,"$isPictureInPictureActive",i),y=()=>x(It,"$pictureInPictureType$",i),_=()=>x(Zi,"$availableSubtitlesList$",i),w=()=>x(ot,"$contextMenuOpenedByKeyboard$",i),I=()=>x(H,"$showContextMenuBtn$",i),T=()=>x(di,"$isRewindableLive$",i),R=()=>x(ut,"$isActiveLive$",i),A=()=>x(xr,"$graphIsOpened$",i),P=()=>x(pn,"$contextMenuVisible$",i),E=()=>x(Ct,"$isFullscreen",i),z=()=>x(fn,"$autoplayNextEnabled",i),U=()=>x(n(xo),"$prevButton",i),W=()=>x(n(Sn),"$replayButton",i),Y=()=>x(n(wo),"$playButton",i),te=()=>x(n(Cn),"$nextButton",i),J=()=>x(n(zi),"$playPrevChapterButton",i),oe=()=>x(n(Ir),"$seekToInteractiveButton",i),de=()=>x(n(Do),"$interactiveGraphButton",i),ae=()=>x(n(Hn),"$liveButton",i),pe=()=>x(n(as),"$time",i),ee=()=>x(n(ls),"$episodes",i),$e=()=>x(n(ds),"$vkLogo",i),Ee=()=>x(n(Ji),"$volume",i),ce=()=>x(n(cs),"$subtitles",i),Qe=()=>x(n(Qr),"$settings",i),fe=()=>x(n(vo),"$context",i),ve=()=>x(n(Er),"$fullscreen",i),X=()=>x(n(et),"$chromecast",i),N=()=>x(On,"$additionalDesktopControlPanelRightButtons$",i),me=()=>x(so,"$playerSize",i),ue=()=>x($o,"$isInteractiveTime$",i),Re=()=>x(Bo,"$previewTrackActive",i),Je=()=>x(hi,"$settingsMenuVisible",i),Ae=()=>x(Oo,"$settingButtonRef$",i),j=()=>x(Ut,"$startedByKeyboard$",i),ne=()=>x(Vi,"$isAudioAvailable$",i),Se=()=>x(Te,"$fakeIsPlaying$",i),Le=()=>x(rs,"$seekToInteractiveDisabledTooltip$",i),ze=()=>x(Fo,"$isPreviewTrackHorizontallyAligned$",i),Ce=()=>x(Ar,"$previewTrackAvailable",i),we=()=>x(cr,"$previewTrackDragInProgress",i),He=()=>x(fi,"$adPosition",i),rt=()=>x(Yt,"$position$",i),ct=()=>x(ai,"$adDuration",i),Mt=()=>x(Pt,"$duration$",i),lt=g(e,"playerControlsWrapperRef",15,void 0),ni=g(e,"playerControlsRef",15,void 0),wt=g(e,"isAds",3,!1),Rt=g(e,"logoTargetUrl",3,""),Dt=g(e,"isOneVideoPlaylist",3,!1),Qt=g(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:Te}=_o(),G=xe(),Ne=_o(),be=Lt(),Oe=G.actions.internal.toggleMuted,Ie=G.actions.internal.togglePlay,ht=G.actions.internal.pause,ye=G.actions.internal.toggleSubtitle,qe=G.actions.internal.checkFullscreenSupport,Ue=(ll=G.callbacks)==null?void 0:ll.onAudioDoesNotExistHint,st=(wa=G.callbacks)==null?void 0:wa.onAudioDisabledHint,qt=G.ui.isMinimalMode$,Pt=G.state.duration$,Yt=G.state.positionWithScrubbing$,bi=G.state.playbackState$,Vi=G.state.isAudioAvailable$,Ai=G.state.isAudioDisabled,ji=G.state.isEnded$,si=G.state.isLive$,ut=G.state.isActiveLive$,di=G.state.isRewindableLive$,{isActive$:Xi,type$:It}=Ne.pictureInPicture$,hi=G.ui.settingsMenu.visible$,ui=G.ui.settingsMenu.openedByBtnKeyboard$,We=G.ui.controls,at=G.actions.internal.getVideoEpisodes(),Ci=G.state.chromecastState$,Zi=G.state.availableSubtitlesList$,bo=G.state.currentSubtitle$,Ao=We.disabledControls$,pn=G.ui.contextMenu.visible$,H=G.ui.contextMenu.showContextMenuBtn$,ot=G.ui.contextMenu.openedByBtnKeyboard$,Ut=G.ui.startedByKeyboard$,pi=G.ui.controlBlocks,dt=G.ui.t,ai=G.ads.duration,fi=G.ads.position,Gt=G.ads.playbackState,Ct=G.ui.isFullscreen,so=G.ui.playerSize,Lo=G.ui.currentGridType$,On=G.ui.additionalDesktopControlPanelRightButtons$,fn=G.ui.autoplayNextEnabled$,Li=G.actions.internal.getVideoElement,xi=G.actions.internal.replayInteractive,Xo=G.actions.internal.prevVideoClick,tr=G.actions.internal.nextVideoClick,_i=G.state.isInteractive,$o=G.state.isInteractiveTime$,mn=G.state.showInteractiveGraph,Mo=G.state.showSeekToInteractive,vn=G.state.showPlayPrevChapter,Ts=G.state.showInteractiveTimeIndicator,Is=G.state.playPrevChapterDisabledTooltip,rs=Ne.seekToInteractiveDisabledTooltip$,xr=Ne.graphIsOpened$,gn=be.features.interactiveResponsiveUi,hn=m(()=>s().has("EPISODE_BUTTON")),ir=m(()=>s().has("GRAPH_BUTTON")),wr=m(()=>s().has("SEEK_TO_INTERACTIVE_BUTTON")),or=m(()=>s().has("PLAY_BUTTON")),Br=m(()=>s().has("REPLAY_BUTTON")),Fr=m(()=>s().has("PLAY_PREV_CHAPTER_BUTTON")),Nn=()=>G.actions.internal.toggleChromecast(),nr=m(()=>wt()?a()==="playing":l()===Gm.PLAYING),Bn=m(()=>d().value!=="off"),rr=m(()=>r()&&!wt()||_i),Hr=m(()=>gn?n(rr)&&no(u(),"m"):n(rr)),Ur=m(()=>!r()||_i||wt()),Ti=m(()=>!f()&&no(u(),"m")),ss=m(()=>e.showNextPrevButtons&&!f()&&no(u(),"m")&&!wt()&&e.nextButtonActive),Zo=m(()=>e.showNextPrevButtons&&!f()&&no(u(),"m")&&!wt()&&e.prevButtonActive),mt=m(()=>!wt()&&!!p()),jt=m(()=>!f()&&v()!==$b.NOT_AVAILABLE&&!(b()&&y()===1)&&no(u(),"m")&&!_i&&!wt()),sr=m(()=>e.showAutoplayNext&&!f()&&!Dt()&&no(u(),"s")),Fn=m(()=>!f()&&_().length>0&&no(u(),"m")),zr=m(()=>w()||I()),Sr=m(()=>no(u(),"s")&&!wt()),Wr=m(()=>!e.logoHidden&&!wt()&&!f()),_n=m(()=>be.features.fullscreen&&qe()&&(e.logoHidden||no(u(),gn?"xs":"s"))&&!(b()&&y()===1)&&(_i?Qt():!0)),Jo=m(()=>(!p()||wt())&&!(be.features.interactiveHideTime&&_i)),bn=m(()=>mn&&no(u(),"m")),Cr=m(()=>gn?Mo&&no(u(),"s"):Mo),Tr=m(()=>gn?vn&&no(u(),"s"):vn),$n=m(()=>!f()&&!wt()&&!p()&&!!(at!=null&&at.length)&&n(Ti)&&!n(hn)),yn=m(()=>!T()||!!R()),ar=m(()=>A()?dt("tooltip_interactive_graph_on"):dt("tooltip_interactive_graph_off")),Mi=m(()=>P()?dt("tooltip_context_menu_close"):dt("tooltip_context_menu_open")),yo=(vt,gt)=>vt?gt&>===Gm.PAUSED?dt("tooltip_play"):"":dt("tooltip_live"),Vo=m(()=>yo(n(yn),l())),ao=m(()=>be.logoType==="vk_video"?dt("tooltip_vk_video_logo"):dt("tooltip_vk_logo")),xn=m(()=>n(Bn)?dt("tooltip_subtitles_on"):dt("tooltip_subtitles_off")),wn=m(()=>E()?dt("tooltip_fullscreen_on"):dt("tooltip_fullscreen_off")),Kr=m(()=>v()===$b.CONNECTED?dt("tooltip_chromecast_on"):dt("tooltip_chromecast_off")),St=m(()=>z()?dt("tooltip_autoplay_on"):dt("tooltip_autoplay_off")),mi=K(0),Wt=ri({}),Ro=ri({}),xo=m(()=>We.prevButton),Sn=m(()=>We.replayButton),wo=m(()=>We.playButton),Cn=m(()=>We.nextButton),zi=m(()=>We.playPrevChapterButton),Ir=m(()=>We.seekToInteractiveButton),Do=m(()=>We.interactiveGraphButton),Hn=m(()=>We.liveButton),as=m(()=>We.time),ls=m(()=>We.episodes),ds=m(()=>We.vkLogo),Ji=m(()=>We.volume),cs=m(()=>We.subtitles),Qr=m(()=>We.settings),vo=m(()=>We.context),Er=m(()=>We.fullscreen),et=m(()=>We.chromecast),_t=m(()=>({prevButton:U()?U().right-U().left:0,replayButton:W()?W().right-W().left:0,playButton:Y()?Y().right-Y().left:0,nextButton:te()?te().right-te().left:0,playPrevChapterButton:J()?J().right-J().left:0,seekToInteractiveButton:oe()?oe().right-oe().left:0,interactiveGraphButton:de()?de().right-de().left:0,liveButton:ae()?ae().right-ae().left:0,time:pe()?pe().right-pe().left:0,episodes:ee()?ee().right-ee().left:0,vkLogo:$e()?$e().right-$e().left:0,volume:Ee()?Ee().right-Ee().left:0,subtitles:ce()?ce().right-ce().left:0,settings:Qe()?Qe().right-Qe().left:0,context:fe()?fe().right-fe().left:0,fullscreen:ve()?ve().right-ve().left:0,chromecast:X()?X().right-X().left:0,additionalButtons:N().length?N().reduce(vt=>[...vt,40],[]):[]})),Zt=K(0);Fe(()=>{(!n(Zt)||n(Zt)<n(_t).time)&&Et(()=>D(Zt,n(_t).time,!0))});let Ri=K(!1);Fe(()=>{let vt=0;n($n)&&(no(u(),"xl")?vt=n(_t).time:vt=60);let gt=n(_t).prevButton+n(_t).playButton+n(_t).nextButton+n(_t).seekToInteractiveButton+n(_t).interactiveGraphButton+n(_t).liveButton+n(Zt)+vt;D(Ri,n(Jo)&&n(mi)>=gt,!0)});let lo=m(()=>n(Ri)&&no(u(),"m")),Ni=yb(Ql,260),go=yb(Ju,260);Fe(()=>{me(),ue(),Re(),Ni(Li(),We,Wt,e.showControls),go(Li(),pi,Ro,e.showControls)}),Fe(()=>{Ro.bottom=lt()});let Oo=se();Fe(()=>{Je(),Ae()&&Et(()=>Dl(Ae(),Je(),ui))});let Tn;Fe(()=>{j(),Et(()=>Xu(Ut,j(),Tn))});function Un(){ma({isAudioDisabled:Ai,isAudioAvailable:ne(),isAds:wt(),audioIsNotExistHintCallback:Ue,audioDisabledHintCallback:st})&&Oe()}let ho=_i?xi:Ie,en=m(()=>Se()!==null),Pr=m(()=>n(en)?Se():n(nr)),kr=m(()=>n(Pr)?dt("tooltip_pause"):dt("tooltip_play")),So=dt("tooltip_episodes"),lr=m(()=>{var vt,gt,wi,To;return n(Zo)?{id:"prevButton",type:"desktop-control-panel-left",weight:Qs.prevButton,buttonComponent:Ya,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:Xo.bind(null,!0)},tooltipEnabled:!((gt=(vt=G.callbacks)==null?void 0:vt.uiInfo)!=null&>.onPrevButtonMouseEnter)&&!((To=(wi=G.callbacks)==null?void 0:wi.uiInfo)!=null&&To.onPrevButtonMouseLeave),mouseEnter:()=>{var to,vi,Ki;(Ki=(vi=(to=G.callbacks)==null?void 0:to.uiInfo)==null?void 0:vi.onPrevButtonMouseEnter)==null||Ki.call(vi,Jn(Li(),Wt,"prevButton",e.showControls))},mouseLeave:()=>{var to,vi,Ki;(Ki=(vi=(to=G.callbacks)==null?void 0:to.uiInfo)==null?void 0:vi.onPrevButtonMouseLeave)==null||Ki.call(vi,Jn(Li(),Wt,"prevButton",e.showControls))},tooltipText:dt("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),zn=m(()=>n(Hr)?{id:"replayButton",type:"desktop-control-panel-left",weight:Qs.replayButton,buttonComponent:ql,buttonComponentProps:{disabled:n(Br),click:ho},tooltipText:dt("tooltip_restart"),disabled:n(Br)}:void 0),us=m(()=>n(Ur)?{id:"playButton",type:"desktop-control-panel-left",weight:Qs.playButton,buttonComponent:Gl,buttonComponentProps:{disabled:n(or),isPlaying:n(nr),click:Ie},tooltipText:n(kr),disabled:n(or)}:void 0),tt=m(()=>{var vt,gt,wi,To;return n(ss)?{id:"nextButton",type:"desktop-control-panel-left",weight:Qs.nextButton,buttonComponent:Ya,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:tr.bind(null,!0)},tooltipEnabled:!((gt=(vt=G.callbacks)==null?void 0:vt.uiInfo)!=null&>.onNextButtonMouseEnter)&&!((To=(wi=G.callbacks)==null?void 0:wi.uiInfo)!=null&&To.onNextButtonMouseLeave),mouseEnter:()=>{var to,vi,Ki;(Ki=(vi=(to=G.callbacks)==null?void 0:to.uiInfo)==null?void 0:vi.onNextButtonMouseEnter)==null||Ki.call(vi,Jn(Li(),Wt,"nextButton",e.showControls))},mouseLeave:()=>{var to,vi,Ki;(Ki=(vi=(to=G.callbacks)==null?void 0:to.uiInfo)==null?void 0:vi.onNextButtonMouseLeave)==null||Ki.call(vi,Jn(Li(),Wt,"nextButton",e.showControls))},tooltipText:dt("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Nt=m(()=>_i&&n(Tr)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Qs.playPrevChapterButton,buttonComponent:dc,buttonComponentProps:{disabled:n(Fr),click:e.playPrevChapter},tooltipText:dt("tooltip_interactive_go_back"),disabledTooltipContent:dt(Is),disabled:n(Fr)}:void 0),Ii=m(()=>_i&&n(Cr)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Qs.seekToInteractiveButton,buttonComponent:uc,buttonComponentProps:{disabled:n(wr),click:e.seekToInteractive},tooltipText:dt("tooltip_interactive_seek"),disabled:n(wr),disabledTooltipContent:dt(Le())}:void 0),tn=m(()=>_i&&n(bn)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Qs.interactiveGraphButton,buttonComponent:pc,buttonComponentProps:{disabled:n(ir),click:xr.toggle,graphIsOpened:A()},tooltipText:n(ar)}:void 0),No=m(()=>n(mt)?{id:"liveButton",type:"desktop-control-panel-left",weight:Qs.liveButton,buttonComponent:fc,buttonComponentProps:{isLiveActive:n(yn),ariaLabel:n(Vo)},tooltipText:n(Vo),disabled:n(yn)&&l()===Gm.PLAYING}:void 0),qr=m(()=>[n(lr),n(zn),n(us),n(tt),n(Nt),n(Ii),n(tn),n(No)].filter(vt=>!!vt).sort(Ua)),on=m(()=>n(Wr)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Gs.vkLogo,buttonComponent:Zd,buttonComponentProps:{targetUrl:Rt(),logoClickable:e.logoClickable,click:ht},tooltipText:n(ao),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),dr=m(()=>n(sr)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Gs.autoplayNext,buttonComponent:cc,tooltipText:n(St)}:void 0),Gr=m(()=>({id:"volume",type:"desktop-control-panel-right",weight:Gs.volume,buttonComponent:um,buttonComponentProps:{click:Un,isAds:wt()}})),Es=m(()=>n(Fn)?{id:"subtitles",type:"desktop-control-panel-right",weight:Gs.subtitles,buttonComponent:sm,buttonComponentProps:{isSubtitlesEnabled:n(Bn),click:ye},tooltipText:n(xn)}:void 0),Ys=m(()=>n(Sr)?{id:"settings",type:"desktop-control-panel-right",weight:Gs.settings,buttonComponent:Fl,buttonComponentProps:{ref$:Oo},tooltipText:Je()?void 0:dt("tooltip_settings_off")}:void 0),Wn=m(()=>be.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Gs.context,buttonComponent:Lm,buttonComponentProps:{ariaLabel:dt("aria_label_context_menu")},className:n(zr)?"":"out-of-view",tooltipText:n(Mi)}:void 0),$a=m(()=>n(_n)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Gs.fullscreen,buttonComponent:Xd,buttonComponentProps:{isFullscreen:E(),click:e.toggleFullscreen},tooltipText:n(wn)}:void 0),pt=m(()=>n(jt)?{id:"chromecast",type:"desktop-control-panel-right",weight:Gs.chromecast,buttonComponent:ec,buttonComponentProps:{state:v(),click:Nn},tooltipText:n(Kr)}:void 0),li=m(()=>[n(on),n(dr),n(Gr),n(Es),n(Ys),n(Wn),n($a),n(pt),...N()].filter(vt=>!!vt).sort(Ua)),Bo=G.ui.previewTrackActive,cr=G.ui.previewTrackDragInProgress,Ar=G.ui.previewTrackAvailable,Fo=G.ui.isPreviewTrackHorizontallyAligned,Ei=m(()=>_b({onPreviewTrackOpened:G.actions.internal.previewTrackOpened,getTimelineRef:()=>Wt.timeline,isHorizontal:ze()})),ps=m(()=>n(Ei).progressBarY),co=m(()=>n(Ei).controlsY),Wi=m(()=>n(Ei).onPointerDown),nn=m(()=>n(Ei).onPointerMove),Kn=m(()=>n(Ei).onPointerUp),Yr=m(()=>n(Ei).calculatedHeight),ge=m(()=>n(Ei).closePreviewTrack);Fe(()=>{Re()||n(ge)()});let Tt;At(()=>()=>Tt&&clearTimeout(Tt));let $i=vt=>{Re()||!Ce()||(n(Wi)(vt),Tt=setTimeout(()=>{G.actions.internal.previewTrackDragStarted()},200))},Di=()=>{Re()||n(Kn)(),Tt&&clearTimeout(Tt),we()&&G.actions.internal.previewTrackDragFinished()},Ho=vt=>{n(nn)(vt)},Co=-(parseInt("24")/2+4);var eo=Aw(),rn=le(eo);let Ps;var ks=C(rn);{var js=vt=>{let gt=m(()=>n(ps)()),wi=m(()=>n(Yr)());qm(vt,{get animatedOffsetY(){return n(gt)},get animatedPreviewTrackHeight(){return n(wi)},get canRewindLive(){return e.canRewindLive},get isAds(){return wt()},onTimelineMove:Ho,onTimelinePointerDown:$i,onTimelinePointerUp:Di,get previewTrackAvailable(){return Ce()},get timelineRef(){return Wt.timeline},set timelineRef(To){Wt.timeline=To}})};M(ks,vt=>{e.showControls&&vt(js)})}var fs=k(ks,2),ms=C(fs),ur=C(ms);yi(ur,17,()=>n(qr),vt=>vt.id,(vt,gt)=>{Zu(vt,{get buttonComponent(){return n(gt).buttonComponent},get buttonComponentProps(){return n(gt).buttonComponentProps},get tooltipText(){return n(gt).tooltipText},get disabledTooltipContent(){return n(gt).disabledTooltipContent},get disabled(){return n(gt).disabled},get className(){return n(gt).className},get tooltipEnabled(){return n(gt).tooltipEnabled},get mouseEnter(){return n(gt).mouseEnter},get mouseLeave(){return n(gt).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return Wt[n(gt).id]},set ref(wi){Wt[n(gt).id]=wi}})});var ya=k(ur,2);{var Xl=vt=>{let gt=m(()=>!e.showControls),wi=m(()=>wt()?He():rt()),To=m(()=>wt()?ct():Mt());Yd(vt,{get isHidden(){return n(gt)},isMobile:!1,get showDuration(){return n(lo)},get position(){return n(wi)},get duration(){return n(To)},get ref(){return Wt.time},set ref(to){Wt.time=to}})};M(ya,vt=>{n(Jo)&&vt(Xl)})}var Lr=k(ya,2);let Zl=m(()=>!n($n));ko(Lr,{className:"w-max",get disabled(){return n(Zl)},get tooltipContent(){return So},get tooltipVisible(){return e.showControls},tooltipPlacement:"top-left",get initialTranslateXPx(){return Co},get ref(){return Wt.episodes},set ref(vt){Wt.episodes=vt},children:(vt,gt)=>{var wi=Ve(),To=le(wi);{var to=vi=>{tc(vi,{get position(){return rt()},get duration(){return Mt()},get timeCodes(){return at}})};M(To,vi=>{n($n)&&vi(to)})}$(vt,wi)},$$slots:{default:!0}}),S(ms);var xa=k(ms,2);yi(xa,21,()=>n(li),vt=>vt.id,(vt,gt)=>{var wi=Ve(),To=le(wi);{var to=Ki=>{Zu(Ki,{get buttonComponent(){return n(gt).buttonComponent},get buttonComponentProps(){return n(gt).buttonComponentProps},get tooltipText(){return n(gt).tooltipText},get disabledTooltipContent(){return n(gt).disabledTooltipContent},get disabled(){return n(gt).disabled},get className(){return n(gt).className},get tooltipVisible(){return e.showControls},get ref(){return Wt[n(gt).id]},set ref(Xs){Wt[n(gt).id]=Xs}})},vi=Ki=>{let Xs=m(()=>!!n(gt).disabled);Dm(Ki,{get id(){return n(gt).id},get testId(){return n(gt).testId},get icon(){return n(gt).icon},get ariaLabel(){return n(gt).ariaLabel},get tooltipText(){return n(gt).tooltipText},get disabledTooltipContent(){return n(gt).disabledTooltipContent},get disabled(){return n(Xs)},get onClick(){return n(gt).onClick},get disableMouseupTooltipShow(){return n(gt).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return Wt[n(gt).id]},set ref(ed){Wt[n(gt).id]=ed}})};M(To,Ki=>{vb(n(gt))?Ki(to):Ki(vi,!1)})}$(vt,wi)}),S(xa),S(fs),it(fs,vt=>ni(vt),()=>ni()),S(rn),it(rn,vt=>lt(vt),()=>lt());var Jl=k(rn,2);{var al=vt=>{ac(vt,{get ref(){return Wt.interactiveTimeIndicator},set ref(gt){Wt.interactiveTimeIndicator=gt}})};M(Jl,vt=>{Ts&&vt(al)})}O((vt,gt)=>{Ps=ie(rn,1,"wrapper-bottom s-1a",null,Ps,vt),Ke(rn,`transform: ${e.showControls?"translateY(0)":"translateY(100%)"}`),Ke(fs,gt),fs.inert=Re()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||we()}),()=>`transform: translateY(${n(co)()}px);`]),Mn(ms,"clientWidth",vt=>D(mi,vt)),$(t,eo),F(),o()}import{ChromecastState as wb,PlaybackState as Sb}from"@vkontakte/videoplayer-core/es2015";import{noop as xb}from"@vkontakte/videoplayer-shared/es2015";var Mw=L('<div class="icon icon-error-stub s-20"><div class="inner s-20"></div></div>'),Vw=L('<img class="icon s-20" aria-hidden="true"/>'),Rw={hash:"s-20",code:".icon.s-20{height:24px!important;width:24px!important}.inner.s-20{background-color:var(--white);height:16px;width:16px}"};function jm(t,e){Q(t,Rw);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,xb),s=m(()=>o()===xb),a=m(()=>n(s)||i()),l=K(!1),d=()=>{D(l,!0)},r=m(()=>n(s)?"btn-full-opacity":"");Ft(t,{get className(){return n(r)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(a)},get testId(){return e.testId},children:(u,f)=>{var p=Ve(),v=le(p);{var b=_=>{var w=Mw();$(_,w)},y=_=>{var w=Vw();O(()=>De(w,"src",e.iconUrl)),ft("error",w,d),Da(w),$(_,w)};M(v,_=>{n(l)?_(b):_(y,!1)})}$(u,p)},$$slots:{default:!0}})}var Dw=ke('<path d="M8.7 8.1 5.3 4.72A1 1 0 0 1 6.72 3.3L20.7 17.29a1 1 0 0 1-1.41 1.41L16 15.41V20a1 1 0 0 1-1 1c-.64 0-1.26-.25-1.72-.7L7.79 15H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2.77zm2.88-2.76 1.7-1.65A2.5 2.5 0 0 1 15 3a1 1 0 0 1 1 1v5.76z"></path>');function Xm(t){je(t,{testId:"muted-icon",children:(e,i)=>{var o=Dw();$(e,o)},$$slots:{default:!0}})}import{noop as Ow}from"@vkontakte/videoplayer-shared/es2015";function ep(t,e){B(e,!0);let i=g(e,"muted",3,!1),o=g(e,"click",3,Ow),s=g(e,"ref",15,void 0),l=xe().ui.t,d=m(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),r=m(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");Ft(t,{get testId(){return n(r)},get click(){return o()},get ariaLabel(){return n(d)},role:"button",get ref(){return s()},set ref(u){s(u)},children:(u,f)=>{var p=Ve(),v=le(p);{var b=_=>{Xm(_,{})},y=_=>{ga(_,{get size(){return"24"}})};M(v,_=>{i()?_(b):_(y,!1)})}$(u,p)},$$slots:{default:!0}}),F()}var Nw=ke('<path d="M11.64 12.37 9.07 9.8h1.03a.9.9 0 1 0 0-1.8H6.9a.9.9 0 0 0-.9.9v3.2a.9.9 0 0 0 1.8 0v-1.02l2.53 2.52.13.14a.9.9 0 0 0 1.28-1.28z"></path>'),Bw=ke('<path d="m6.36 9.63 2.57 2.57H7.9a.9.9 0 1 0 0 1.8h3.2a.9.9 0 0 0 .9-.9V9.9a.9.9 0 0 0-1.8 0v1.02L7.67 8.4l-.13-.14a.9.9 0 0 0-1.28 1.28z"></path>'),Fw=ke('<path d="M7.66 4h6.68q1.2-.01 2 .04.83.06 1.53.38a4 4 0 0 1 1.7 1.7c.24.48.34.98.39 1.54q.05.8.04 2v1.44a.9.9 0 0 1-1.8 0V9.7c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2 2 0 0 0-.92-.92 2 2 0 0 0-.85-.2c-.46-.03-1.04-.03-1.9-.03H7.7c-.85 0-1.44 0-1.9.04-.44.03-.68.1-.85.19a2 2 0 0 0-.92.92c-.09.17-.16.4-.2.85-.03.46-.03 1.05-.03 1.9v2.65c0 .85 0 1.44.04 1.9.03.44.1.68.19.85a2 2 0 0 0 .92.92c.17.08.4.15.85.19.46.03 1.04.04 1.9.04h2.4a.9.9 0 0 1 0 1.8H7.66q-1.2.01-2-.05a4 4 0 0 1-1.53-.38 4 4 0 0 1-1.7-1.7 4 4 0 0 1-.39-1.53q-.05-.8-.04-2V9.65q-.01-1.2.04-2c.05-.56.15-1.06.39-1.53a4 4 0 0 1 1.7-1.7c.47-.24.97-.34 1.53-.39q.8-.05 2-.04M13 16.8c0-.98 0-1.47.19-1.84a2 2 0 0 1 .77-.77c.37-.19.86-.19 1.84-.19h3.4c.98 0 1.47 0 1.85.19q.5.27.76.77c.19.37.19.86.19 1.84v.4c0 .98 0 1.47-.19 1.85a2 2 0 0 1-.77.76c-.37.19-.86.19-1.84.19h-3.4c-.98 0-1.47 0-1.85-.19a2 2 0 0 1-.76-.76c-.19-.38-.19-.87-.19-1.85z"></path><!>',1);function Zm(t,e){let i=g(e,"isActive",3,!1),o=m(()=>i()?"pip-icon--active":"pip-icon");je(t,{get testId(){return n(o)},children:(s,a)=>{var l=Fw(),d=k(le(l));{var r=f=>{var p=Nw();$(f,p)},u=f=>{var p=Bw();$(f,p)};M(d,f=>{i()?f(r):f(u,!1)})}$(s,l)},$$slots:{default:!0}})}import{noop as Hw}from"@vkontakte/videoplayer-shared/es2015";function Jm(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isPictureInPictureActive",3,!1),s=g(e,"click",3,Hw),a=q("menu_pip");Ft(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return s()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{Zm(l,{get isActive(){return o()}})},$$slots:{default:!0}}),F()}import{debounceFn as Cb}from"@vkontakte/videoplayer-shared/es2015";var Uw=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},zw=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},Ww=L("<div><!></div>"),Kw=L("<div><!></div>"),Qw=L("<div><!></div>"),qw=L("<!> <!> <!>",1),Gw=L("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),Yw=L('<div class="wrapper-middle s-19"><!></div>'),jw=L("<div><!></div> <!> <div><!></div>",1),Xw=L('<div aria-hidden="true">·</div> <!>',1),Zw=L('<!> <!> <div><div><div class="controls mobile s-19" data-testid="bottom-controls"><div class="controls-group contain s-19"><!> <!> <!> <!></div> <div class="controls-group s-19"><!> <!> <!></div></div> <!></div></div> <!>',1),Jw={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 ev(t,e){var vo,Er;B(e,!0),Q(t,Jw);let[i,o]=Be(),s=()=>x(Ct,"$seekToInteractiveDisabledTooltip$",i),a=()=>x(hi,"$disabledControls$",i),l=()=>x(Rt,"$playbackState$",i),d=()=>x(Zi,"$adPlaybackState",i),r=()=>x(Te,"$isEnded$",i),u=()=>x(Ao,"$playerSize",i),f=()=>x(ht,"$scrubbingInProgress",i),p=()=>x(Xi,"$chromecastState$",i),v=()=>x(qe,"$isPictureInPictureActive",i),b=()=>x(Ue,"$pictureInPictureType$",i),y=()=>x(ye,"$mobileNotReportControlHidden$",i),_=()=>x(si,"$chromecastHidden",i),w=()=>x(lt,"$playerPhase",i),I=()=>x(Ai,"$pipHidden",i),T=()=>x(We,"$currentGridType$",i),R=()=>x(bi,"$vkLogoHidden",i),A=()=>x(Yt,"$volumeHidden",i),P=()=>x(G,"$isLive$",i),E=()=>x(st,"$settingsMenuVisible",i),z=()=>x(Ie,"$isRewindableLive$",i),U=()=>x(Oe,"$isActiveLive$",i),W=()=>x(Dt,"$isAudioAvailable$",i),Y=()=>x(be,"$muted$",i),te=()=>x(Ne,"$volume$",i),J=()=>x(pi,"$isInteractiveTime$",i),oe=()=>x(bn,"$settingButtonRef$",i),de=()=>x(ui,"$startedByKeyboard$",i),ae=()=>x(bo,"$isFullscreen",i),pe=()=>x(pn,"$additionalButtons$",i),ee=()=>x(Vi,"$autoplayNextToggleHidden",i),$e=()=>x(It,"$crashed$",i),Ee=()=>x(ji,"$settingsHidden",i),ce=()=>x(so,"$graphIsOpened$",i),Qe=()=>x(Ci,"$adPosition",i),fe=()=>x(at,"$adDuration",i),ve=()=>x(wt,"$position$",i),X=()=>x(ni,"$duration$",i),N=g(e,"playerControlsWrapperRef",15,void 0),me=g(e,"playerControlsRef",15,void 0),ue=g(e,"isAds",3,!1),Re=g(e,"logoTargetUrl",3,""),Je=g(e,"isOneVideoPlaylist",3,!1),Ae=g(e,"customFullscreenSupported",3,!0),j=xe(),ne=_o(),Se=Lt(),Le=j.actions.internal.toggleMuted,ze=j.actions.internal.togglePlay,Ce=j.actions.internal.pause,we=j.actions.internal.prevVideoClick,He=j.actions.internal.nextVideoClick,rt=j.actions.internal.checkFullscreenSupport,ct=(vo=j.callbacks)==null?void 0:vo.onAudioDoesNotExistHint,Mt=(Er=j.callbacks)==null?void 0:Er.onAudioDisabledHint,lt=j.playerPhase,ni=j.state.duration$,wt=j.state.positionWithScrubbing$,Rt=j.state.playbackState$,Dt=j.state.isAudioAvailable$,Qt=j.state.isAudioDisabled,Te=j.state.isEnded$,G=j.state.isLive$,Ne=j.state.volume$,be=j.state.muted$,Oe=j.state.isActiveLive$,Ie=j.state.isRewindableLive$,ht=j.ui.scrubbingInProgress,ye=j.ui.mobileNotReportControlHidden$,{isActive$:qe,type$:Ue}=ne.pictureInPicture$,st=j.ui.settingsMenu.visible$,qt=j.ui.settingsMenu.openedByBtnKeyboard$,Pt=j.ui.controls,{volume:Yt,vkLogo:bi,autoplayNextToggle:Vi,pip:Ai,settings:ji,chromecast:si}=j.ui.hiddenControls,ut=j.actions.internal.getVideoEpisodes(),di=j.webApi.pictureInPictureApi,Xi=j.state.chromecastState$,It=j.state.crashed$,hi=Pt.disabledControls$,ui=j.ui.startedByKeyboard$,We=j.ui.currentGridType$,at=j.ads.duration,Ci=j.ads.position,Zi=j.ads.playbackState,bo=j.ui.isFullscreen,Ao=j.ui.playerSize,pn=j.ui.additionalButtonsDeprecated$,H=j.actions.internal.getVideoElement,ot=j.actions.internal.replayInteractive,Ut=j.state.isInteractive,pi=j.state.isInteractiveTime$,dt=j.state.showInteractiveGraph,ai=j.state.showSeekToInteractive,fi=j.state.showPlayPrevChapter,Gt=j.state.showInteractiveTimeIndicator,Ct=ne.seekToInteractiveDisabledTooltip$,so=ne.graphIsOpened$,Lo=j.ui.controlBlocks,On=m(()=>q(j.state.playPrevChapterDisabledTooltip)),fn=m(()=>q(s())),Li=m(()=>a().has("EPISODE_BUTTON")),xi=m(()=>a().has("GRAPH_BUTTON")),Xo=m(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),tr=m(()=>a().has("PLAY_BUTTON")),_i=m(()=>a().has("REPLAY_BUTTON")),$o=m(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),mn=m(()=>l()===Sb.PLAYING),Mo=m(()=>d()==="paused"),vn=m(()=>r()&&!ue()&&!Ut),Ts=m(()=>!r()||ue()),Is=m(()=>e.showNextPrevButtons&&!ue()&&e.prevButtonActive),rs=m(()=>e.showNextPrevButtons&&!ue()&&e.nextButtonActive),xr=m(()=>u().width>300),gn=m(()=>u().width>400),hn=m(f),ir=m(()=>p()!==wb.NOT_AVAILABLE&&!(v()&&b()===1)&&!y()&&!Ut&&!_()),wr=m(()=>w()==="LiveWaitingStart"),or=m(()=>!!di&&p()!==wb.CONNECTED&&!y()&&(b()===1&&n(wr)||!n(wr))&&!n(hn)&&!Ut&&!I()),Br=K(!1);At(()=>{let et=di==null?void 0:di.info.isActive$.subscribe(_t=>D(Br,_t,!0));return()=>et==null?void 0:et.unsubscribe()});let Fr=m(()=>!n(hn)&&no(T(),"s")),Nn=m(()=>!e.logoHidden&&u().width>350&&!R()),nr=m(()=>Se.features.fullscreen&&rt()&&!(v()&&b()===1)&&(Ut?Ae():!0)&&!n(hn)&&!n(Br)),Bn=m(()=>!A()&&!n(hn)),rr=m(()=>(!P()||ue())&&u().width>260&&!n(hn)&&!(Se.features.interactiveHideTime&&Ut)),Hr=m(()=>E()||e.showControls),Ur=m(()=>!ue()&&!P()&&!!(ut!=null&&ut.length)&&n(xr)&&!n(Li)&&!n(hn)),Ti=m(()=>!z()||!!U()),ss=m(()=>dt&&no(T(),"m")),Zo=m(()=>!W()||Y()||te()===0),mt=ri({}),jt=ri({}),sr=Cb(Ql,260),Fn=Cb(Ju,260);Fe(()=>{u(),J(),sr(H(),Pt,mt,e.showControls),Fn(H(),Lo,jt,e.showControls)});let zr=()=>j.actions.internal.toggleChromecast();function Sr(){return bt(this,null,function*(){di!=null&&di.isActive()?yield di==null?void 0:di.exit():yield di==null?void 0:di.request()})}function Wr(){ma({isAudioDisabled:Qt,audioDisabledHintCallback:Mt,isAudioAvailable:W(),audioIsNotExistHintCallback:ct,isAds:ue()})&&Le()}let _n=K(""),Jo=(et,_t)=>{if(!et){D(_n,q("tooltip_live"),!0);return}_t&&_t===Sb.PAUSED&&D(_n,q("tooltip_play"),!0)};Fe(()=>{Jo(n(Ti),l())});let bn=se();Fe(()=>{oe()&&Dl(oe(),E(),qt)}),Fe(()=>{Xu(ui,de(),mt.playButton)});var Cr=Zw(),Tr=le(Cr);{var $n=et=>{var _t=Gw(),Zt=le(_t);let Ri;var lo=k(Zt,2);let Ni;it(lo,pt=>jt.topLeft=pt,()=>jt==null?void 0:jt.topLeft);var go=k(lo,2);let Oo;var Tn=C(go);yi(Tn,1,pe,({iconUrl:pt,ariaLabel:li,testId:Bo,onClick:cr,tooltip:Ar})=>pt,(pt,li)=>{let Bo=()=>n(li).iconUrl,cr=()=>n(li).ariaLabel,Ar=()=>n(li).testId,Fo=()=>n(li).onClick,Ei=()=>n(li).tooltip,ps=m(()=>{var co;return(co=cr())!=null?co:Ei()});jm(pt,{get iconUrl(){return Bo()},get ariaLabel(){return n(ps)},get testId(){return Ar()},get onClick(){return Fo()}})});var Un=k(Tn,2);{var ho=pt=>{cc(pt,{get ref(){return mt.autoplayNextToggle},set ref(li){mt.autoplayNextToggle=li}})};M(Un,pt=>{e.showAutoplayNext&&!Je()&&!ee()&&pt(ho)})}var en=k(Un,2);{var Pr=pt=>{ec(pt,{isMobile:!0,click:zr,get state(){return p()},get ref(){return mt.chromecast},set ref(li){mt.chromecast=li}})};M(en,pt=>{n(ir)&&pt(Pr)})}var kr=k(en,2);{var So=pt=>{Jm(pt,{click:Sr,get isPictureInPictureActive(){return v()},get ref(){return mt.pip},set ref(li){mt.pip=li}})};M(kr,pt=>{n(or)&&pt(So)})}var lr=k(kr,2);{var zn=pt=>{Fl(pt,{get ref$(){return bn}})};M(lr,pt=>{$e()&&!Ee()&&pt(zn)})}var us=k(lr,2);{var tt=pt=>{Zd(pt,{get click(){return Ce},get targetUrl(){return Re()},get logoClickable(){return e.logoClickable},get ref(){return mt.vkLogo},set ref(li){mt.vkLogo=li}})};M(us,pt=>{n(Nn)&&pt(tt)})}S(go),it(go,pt=>jt.topRight=pt,()=>jt==null?void 0:jt.topRight);var Nt=k(go,2);let Ii;var tn=C(Nt);{var No=pt=>{let li=m(()=>we.bind(null,!0));Ya(pt,{get click(){return n(li)},type:"prev",isMobile:!0,get ref(){return mt.prevButton},set ref(Bo){mt.prevButton=Bo}})};M(tn,pt=>{n(Is)&&pt(No)})}var qr=k(tn,2);{var on=pt=>{Gl(pt,{get disabled(){return n(tr)},get click(){return ze},isMobile:!0,get isPlaying(){return n(mn)},get ref(){return mt.playButton},set ref(li){mt.playButton=li}})};M(qr,pt=>{n(Ts)&&pt(on)})}var dr=k(qr,2);{var Gr=pt=>{ql(pt,{get disabled(){return n(_i)},get click(){return ze},isMobile:!0,get ref(){return mt.replayButton},set ref(li){mt.replayButton=li}})};M(dr,pt=>{n(vn)&&pt(Gr)})}var Es=k(dr,2);{var Ys=pt=>{let li=m(()=>He.bind(null,!0));Ya(pt,{get click(){return n(li)},type:"next",isMobile:!0,get ref(){return mt.nextButton},set ref(Bo){mt.nextButton=Bo}})};M(Es,pt=>{n(rs)&&pt(Ys)})}S(Nt),it(Nt,pt=>jt.middle=pt,()=>jt==null?void 0:jt.middle);var Wn=k(Nt,2);{var $a=pt=>{var li=qw(),Bo=le(li);{var cr=co=>{var Wi=Ww();let nn;Wi.__click=[Uw,$o,e,On];var Kn=C(Wi);let Yr=m(()=>!e.showControls);dc(Kn,{get hidden(){return n(Yr)},get disabled(){return n($o)},get click(){return e.playPrevChapter},get ref(){return mt.playPrevChapterButton},set ref(ge){mt.playPrevChapterButton=ge}}),S(Wi),O(ge=>nn=ie(Wi,1,"wrapper-middle-left s-19",null,nn,ge),[()=>({fullscreen:ae(),hidden:!e.showControls})]),$(co,Wi)};M(Bo,co=>{fi&&co(cr)})}var Ar=k(Bo,2);{var Fo=co=>{var Wi=Kw();let nn;var Kn=C(Wi);let Yr=m(()=>!e.showControls&&!ce());pc(Kn,{get hidden(){return n(Yr)},get disabled(){return n(xi)},get click(){return so.toggle},get graphIsOpened(){return ce()},get ref(){return mt.interactiveGraphButton},set ref(ge){mt.interactiveGraphButton=ge}}),S(Wi),O(ge=>nn=ie(Wi,1,Td(fi?"wrapper-middle-left-second":"wrapper-middle-left"),"s-19",nn,ge),[()=>({fullscreen:ae(),hidden:!e.showControls&&!ce()})]),$(co,Wi)};M(Ar,co=>{n(ss)&&co(Fo)})}var Ei=k(Ar,2);{var ps=co=>{var Wi=Qw();let nn;Wi.__click=[zw,Xo,e,fn];var Kn=C(Wi);let Yr=m(()=>!e.showControls);uc(Kn,{get hidden(){return n(Yr)},get disabled(){return n(Xo)},get click(){return e.seekToInteractive},get ref(){return mt.seekToInteractiveButton},set ref(ge){mt.seekToInteractiveButton=ge}}),S(Wi),O(ge=>nn=ie(Wi,1,"wrapper-middle-right s-19",null,nn,ge),[()=>({fullscreen:ae(),hidden:!e.showControls})]),$(co,Wi)};M(Ei,co=>{ai&&co(ps)})}$(pt,li)};M(Wn,pt=>{Ut&&!f()&&pt($a)})}O((pt,li,Bo,cr)=>{Ri=ie(Zt,1,"overlay-mobile s-19",null,Ri,pt),Ni=ie(lo,1,"wrapper-top-left s-19",null,Ni,li),Oo=ie(go,1,"wrapper-top-right s-19",null,Oo,Bo),Ii=ie(Nt,1,"wrapper-middle s-19",null,Ii,cr)},[()=>({hidden:!n(Hr)}),()=>({hidden:!e.showControls,fullscreen:ae()}),()=>({hidden:!e.showControls&&!y(),fullscreen:ae()}),()=>({hidden:!e.showControls||f()||e.endScreenShown&&e.showNextPrevButtons})]),$(et,_t)};M(Tr,et=>{ue()||et($n)})}var yn=k(Tr,2);{var ar=et=>{var _t=jw(),Zt=le(_t);let Ri;var lo=C(Zt);ep(lo,{get muted(){return Y()},click:Wr,get ref(){return mt.volume},set ref(ho){mt.volume=ho}}),S(Zt);var Ni=k(Zt,2);{var go=ho=>{var en=Yw(),Pr=C(en);let kr=m(()=>!n(Mo));Gl(Pr,{get disabled(){return n(tr)},get click(){return ze},isMobile:!0,get isPlaying(){return n(kr)},get ref(){return mt.playButton},set ref(So){mt.playButton=So}}),S(en),$(ho,en)};M(Ni,ho=>{n(Mo)&&ho(go)})}var Oo=k(Ni,2);let Tn;var Un=C(Oo);mc(Un,{get position(){return Qe()},get duration(){return fe()}}),S(Oo),O((ho,en)=>{Ri=ie(Zt,1,"wrapper-top-right s-19",null,Ri,ho),Tn=ie(Oo,1,"wrapper-bottom ads-timeline-mobile s-19",null,Tn,en)},[()=>({fullscreen:ae()}),()=>({fullscreen:ae()})]),$(et,_t)};M(yn,et=>{ue()&&d()!=="inactive"&&et(ar)})}var Mi=k(yn,2);let yo;var Vo=C(Mi);let ao;var xn=C(Vo),wn=C(xn),Kr=C(wn);{var St=et=>{ko(et,{get disabled(){return n(_i)},get ref(){return mt.replayButton},set ref(_t){mt.replayButton=_t},children:(_t,Zt)=>{ql(_t,{get disabled(){return n(_i)},get click(){return ot}})},$$slots:{default:!0}})};M(Kr,et=>{Ut&&et(St)})}var mi=k(Kr,2);{var Wt=et=>{ko(et,{get ref(){return mt.liveButton},set ref(_t){mt.liveButton=_t},children:(_t,Zt)=>{fc(_t,{get isLiveActive(){return n(Ti)},isMobile:!0,get ariaLabel(){return n(_n)}})},$$slots:{default:!0}})};M(mi,et=>{!ue()&&P()&&et(Wt)})}var Ro=k(mi,2);{var xo=et=>{let _t=m(()=>ue()?Qe():ve()),Zt=m(()=>ue()?fe():X()),Ri=m(()=>!e.showControls);Yd(et,{get showDuration(){return n(gn)},get position(){return n(_t)},get duration(){return n(Zt)},isMobile:!0,get isHidden(){return n(Ri)},get ref(){return mt.time},set ref(lo){mt.time=lo}})};M(Ro,et=>{n(rr)&&et(xo)})}var Sn=k(Ro,2);let wo=m(()=>!n(Ur));ko(Sn,{className:"w-max",get disabled(){return n(wo)},get ref(){return mt.episodes},set ref(et){mt.episodes=et},children:(et,_t)=>{var Zt=Ve(),Ri=le(Zt);{var lo=Ni=>{var go=Xw(),Oo=k(le(go),2);tc(Oo,{get position(){return ve()},get duration(){return X()},get timeCodes(){return ut}}),$(Ni,go)};M(Ri,Ni=>{n(Ur)&&Ni(lo)})}$(et,Zt)},$$slots:{default:!0}}),S(wn),it(wn,et=>jt.bottomLeft=et,()=>jt==null?void 0:jt.bottomLeft);var Cn=k(wn,2),zi=C(Cn);{var Ir=et=>{ko(et,{get ref(){return mt.volume},set ref(_t){mt.volume=_t},children:(_t,Zt)=>{ep(_t,{get muted(){return n(Zo)},click:Wr})},$$slots:{default:!0}})};M(zi,et=>{n(Bn)&&et(Ir)})}var Do=k(zi,2);{var Hn=et=>{ko(et,{get ref(){return mt.settings},set ref(_t){mt.settings=_t},children:(_t,Zt)=>{Fl(_t,{get ref$(){return bn}})},$$slots:{default:!0}})};M(Do,et=>{n(Fr)&&et(Hn)})}var as=k(Do,2);{var ls=et=>{ko(et,{get ref(){return mt.fullscreen},set ref(_t){mt.fullscreen=_t},children:(_t,Zt)=>{Xd(_t,{get click(){return e.toggleFullscreen},get isFullscreen(){return ae()}})},$$slots:{default:!0}})};M(as,et=>{n(nr)&&et(ls)})}S(Cn),it(Cn,et=>jt.bottomRight=et,()=>jt==null?void 0:jt.bottomRight),S(xn),it(xn,et=>me(et),()=>me());var ds=k(xn,2);let Ji=m(()=>!e.showControls);Xa(ds,{get isHidden(){return n(Ji)},get isAds(){return ue()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return z()},get ref(){return mt.timeline},set ref(et){mt.timeline=et}}),S(Vo),it(Vo,et=>jt.bottom=et,()=>jt==null?void 0:jt.bottom),S(Mi),it(Mi,et=>N(et),()=>N());var cs=k(Mi,2);{var Qr=et=>{ac(et,{get ref(){return mt.interactiveTimeIndicator},set ref(_t){mt.interactiveTimeIndicator=_t}})};M(cs,et=>{Gt&&et(Qr)})}O((et,_t)=>{yo=ie(Mi,1,"wrapper-bottom mobile s-19",null,yo,et),Ke(Mi,`transform: ${e.showControls?"translateY(0)":"translateY(100%)"}`),ao=ie(Vo,1,"controls-wrapper s-19",null,ao,_t)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:ae()})]),$(t,Cr),F(),o()}Ze(["click"]);function vc(t,e){B(e,!0);let[i,o]=Be(),s=()=>x(I,"$isMobile",i),a=g(e,"bottomNoSmooth",3,!1),l=g(e,"playerControlsWrapperRef",15,void 0),d=g(e,"playerControlsRef",15,void 0),r=g(e,"isAds",3,!1),u=g(e,"logoTargetUrl",3,""),f=g(e,"showAutoplayNext",3,!1),p=g(e,"isOneVideoPlaylist",3,!1),v=g(e,"customFullscreenSupported",3,!0),b=g(e,"endScreenShown",3,!1),y=g(e,"onDisabledPlayPrevChapterClick",3,Tb),_=g(e,"onDisabledSeekToInteractiveClick",3,Tb),I=xe().ui.isMobile,T=K(!1);At(()=>{let E=setTimeout(()=>D(T,!0),0);return()=>clearTimeout(E)});var R=Ve(),A=le(R);{var P=E=>{var z=Ve(),U=le(z);{var W=te=>{ev(te,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return r()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get showAutoplayNext(){return f()},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 b()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return y()},get onDisabledSeekToInteractiveClick(){return _()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(J){l(J)},get playerControlsRef(){return d()},set playerControlsRef(J){d(J)}})},Y=te=>{Ym(te,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return r()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get isOneVideoPlaylist(){return p()},get showAutoplayNext(){return f()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return v()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(J){l(J)},get playerControlsRef(){return d()},set playerControlsRef(J){d(J)}})};M(U,te=>{s()?te(W):te(Y,!1)})}$(E,z)};M(A,E=>{n(T)&&E(P)})}$(t,R),F(),o()}var eS=ke('<path d="M23.75 31.2v-5.45l-11.84 6.7a1.45 1.45 180 01-2.16-1.25v-14.4a1.45 1.45 180 012.16-1.26l11.84 6.7v-5.44a1.45 1.45 180 012.16-1.26l12.7 7.19a1.45 1.45 180 010 2.52l-12.7 7.2a1.45 1.45 180 01-2.16-1.27Z"></path>');function gc(t,e){B(e,!0);let i=m(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=m(()=>`${dn(e.size)}${n(i)}`);je(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(o)},get testId(){return e.testId},get shadow(){return e.shadow},children:(s,a)=>{var l=eS();$(s,l)},$$slots:{default:!0}}),F()}var tS=ke('<path d="M32.46 9.53a1.16 1.16 90 010 1.96l-7.66 4.83c-.78.49-1.8-.07-1.8-.98v-3.3a14 14 90 1014.1 18.93 1.5 1.5 90 012.8 1.06 17 17 90 11-16.9-23V5.66c0-.91 1.03-1.47 1.8-.98z"></path>');function tv(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=m(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),s=m(()=>`seek-icon-${i()?"backward":"forward"}`);je(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(s)},get shadow(){return e.shadow},children:(a,l)=>{var d=tS();$(a,d)},$$slots:{default:!0}}),F()}var iS=L('<span class="hot-key-helpers-text s-n"> </span>'),oS=L('<div data-testid="hotkey-helper-icon" class="s-n"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),nS=L("<div><!></div>"),rS={hash:"s-n",code:'.hot-key-helpers-container.s-n{align-items:center;animation:s-n-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-n{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-n{left:calc(75% - 100px)}.hot-key-helpers-text.s-n{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-n{animation:s-n-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-n-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-n-fadeOut{0%{opacity:1}to{opacity:0}}'};function iv(t,e){B(e,!0),Q(t,rS);let[i,o]=Be(),s=()=>x(e.data,"$data",i),a=xe(),{features:l}=Lt(),d=a.ui.t,r=m(()=>!s()),u=m(()=>{var I;return((I=s())==null?void 0:I.type)==="BACKWARD_SEEK"}),f=m(()=>{var I;return((I=s())==null?void 0:I.type)==="FORWARD_SEEK"}),p=m(()=>{var I;return(I=s())==null?void 0:I.type}),v=m(()=>{var I,T;return(I=s())!=null&&I.t?d(s().t.key,{value:s().t.value||""}):(T=s())==null?void 0:T.text});var b=nS();let y;var _=C(b);{var w=I=>{var T=oS(),R=le(T),A=C(R);{var P=me=>{let ue=m(()=>n(p)==="BACKWARD_SEEK");tv(me,{get reversed(){return n(ue)},shadow:!0})};M(A,me=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&me(P)})}var E=k(A,2);{var z=me=>{qs(me,{get size(){return"48"},shadow:!0})};M(E,me=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&me(z)})}var U=k(E,2);{var W=me=>{Rn(me,{get size(){return"48"},shadow:!0})};M(U,me=>{n(p)==="PLAY"&&!l.playbackStatusShow&&me(W)})}var Y=k(U,2);{var te=me=>{lc(me,{get size(){return"48"},shadow:!0})};M(Y,me=>{n(p)==="REPLAY"&&!l.playbackStatusShow&&me(te)})}var J=k(Y,2);{var oe=me=>{va(me,{get size(){return"48"},type:"off",shadow:!0})};M(J,me=>{n(p)==="SUBTITLES_OFF"&&me(oe)})}var de=k(J,2);{var ae=me=>{va(me,{get size(){return"48"},shadow:!0})};M(de,me=>{n(p)==="SUBTITLES_ON"&&me(ae)})}var pe=k(de,2);{var ee=me=>{let ue=m(()=>n(p)==="RATE_DOWN");gc(me,{get size(){return"48"},get reversed(){return n(ue)},testId:"rate-change-icon",shadow:!0})};M(pe,me=>{["RATE_DOWN","RATE_UP"].includes(n(p))&&me(ee)})}var $e=k(pe,2);{var Ee=me=>{let ue=m(()=>n(p)==="EPISODE_PREV");_a(me,{get size(){return"48"},get reversed(){return n(ue)},shadow:!0})};M($e,me=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(p))&&me(Ee)})}var ce=k($e,2);{var Qe=me=>{ga(me,{get size(){return"48"},volume:0,shadow:!0})};M(ce,me=>{n(p)==="MUTE"&&me(Qe)})}var fe=k(ce,2);{var ve=me=>{ga(me,{get size(){return"48"},volume:1,shadow:!0})};M(fe,me=>{n(p)==="VOLUME"&&me(ve)})}S(R);var X=k(R,2);{var N=me=>{var ue=iS(),Re=C(ue,!0);S(ue),O(()=>he(Re,n(v))),$(me,ue)};M(X,me=>{n(v)&&me(N)})}O(()=>De(R,"data-type",n(p))),$(I,T)};M(_,I=>{!n(r)&&n(p)&&I(w)})}S(b),O(I=>y=ie(b,1,"hot-key-helpers-container s-n",null,y,I),[()=>({hidden:n(r),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(f)})]),$(t,b),F(),o()}var sS=(t,e,i,o,s,a)=>{if(e.has(t.code))switch(t.preventDefault(),t.stopPropagation(),t.code){case"ArrowUp":i();break;case"ArrowDown":o();break;case"ArrowLeft":s();break;case"ArrowRight":a();break}},aS=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},lS=L('<div tabindex="0" role="button"><div class="button-block s-s" aria-hidden="true"><div class="button-row s-s"><div class="button button-up s-s"><!></div> <div class="button button-right s-s"><!></div></div> <div class="button-row s-s"><div class="button button-left s-s"><!></div> <div class="button button-down s-s"><!></div></div></div></div>'),dS={hash:"s-s",code:".immersive-controls.s-s{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-s{left:20px;top:50px}.button-block.s-s{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-s{display:flex;flex-direction:row;position:relative}.button.s-s{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-s svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-s svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-s svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-s svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-s svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-s:hover svg{opacity:1}"};function hc(t,e){B(e,!0),Q(t,dS);let i=g(e,"isShifted",3,!1),o=xe(),s=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},l=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},r=()=>{o.actions.internal.startCameraManualRotation(-1,0)},u=()=>(o.actions.internal.stopCameraManualRotation(),null),f=q("aria_label_spherical_control");var p=lS();let v;p.__keydown=[sS,s,a,l,r,d],p.__keyup=[aS,s,u];var b=C(p),y=C(b),_=C(y);_.__mousedown=a,_.__mouseup=u;var w=C(_);Or(w,{direction:"up",useBtnColor:!0}),S(_);var I=k(_,2);I.__mousedown=d,I.__mouseup=u;var T=C(I);Or(T,{direction:"up",useBtnColor:!0}),S(I),S(y);var R=k(y,2),A=C(R);A.__mousedown=r,A.__mouseup=u;var P=C(A);Or(P,{direction:"up",useBtnColor:!0}),S(A);var E=k(A,2);E.__mousedown=l,E.__mouseup=u;var z=C(E);Or(z,{direction:"up",useBtnColor:!0}),S(E),S(R),S(b),S(p),O(U=>{v=ie(p,1,"immersive-controls s-s",null,v,U),De(p,"aria-label",f)},[()=>({"m-shifted":i()})]),ft("mouseleave",_,u),ft("mouseleave",I,u),ft("mouseleave",A,u),ft("mouseleave",E,u),$(t,p),F()}Ze(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as Eb,Subscription as cS,filterChanged as uS,filter as pS}from"@vkontakte/videoplayer-shared/es2015";var Ib=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var tp=class{constructor(){this.flickeringTimeout=Ib(1e3);this.subscriptions=new cS;this.isAuto=!1;this.isLive=!1;this.captions$=new Eb([]);this.captionsPrepared$=new Eb([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(pS(()=>this.isEnabled()),uS()).subscribe(e=>{this.processCaptions(e)})),this}setIsAuto(e){this.isAuto=e}setIsLive(e){this.isLive=e}setCaptions(e){this.captions$.next(e)}destroy(){this.subscriptions.unsubscribe(),this.flickeringTimeout.clear()}isEnabled(){return this.isAuto&&!this.isLive}processCaptions(e){if(!e.length){this.flickeringTimeout.add(()=>{this.captionsPrepared$.next([])});return}this.flickeringTimeout.clear();let i=[],o=e.length>1&&e[0].type!=="timestamp"&&e[1].type!=="timestamp";o&&i.push([{value:String(e[0].value),timeAppeared:null}]),i.push(e.reduce((s,{type:a,value:l},d)=>(o&&!d||(a==="timestamp"?s.push({timeAppeared:Number(l),value:""}):s.length===0?s.push({value:String(l)}):s[s.length-1].value=String(l)),s),[])),this.captionsPrepared$.next(i)}};var fS=L('<span class="caption-line s-c"><span class="caption-segment s-c"> </span></span>'),mS=L('<span class="caption-line s-c"><span class="caption-segment s-c"></span></span>'),vS=L('<span class="caption-line s-c"><span class="caption-segment s-c"> </span></span>'),gS=L('<div><span class="caption s-c"><!></span></div>'),hS=L("<div><!></div>"),_S={hash:"s-c",code:".subtitles-container.s-c{height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:transform var(--controls-transition-duration);width:100%}.subtitles-container.shifted.s-c{transform:translateY(calc(var(--controls-height)*-1))}.subtitles-container.preview-track-active.s-c{transform:translateY(calc(var(--preview-track-height)*-1))}.preview-track-active.s-c .subtitles-caption:where(.s-c){bottom:var(--preview-track-controls-top-offset)}.subtitles-caption.s-c{bottom:4%;display:flex;justify-content:center;left:4%;position:absolute;right:4%}.subtitles-caption.mobile.s-c{bottom:8%}.subtitles-container.auto.s-c .subtitles-caption:where(.s-c){left:var(--subtitles-caption-margin);right:var(--subtitles-caption-margin)}.caption.s-c{background:rgba(0,0,0,.4);border-radius:4px;display:block;overflow-wrap:normal;padding:4px 8px}.subtitles-container.auto.s-c .caption:where(.s-c){width:100%}.caption-line.s-c{display:block;text-align:center}.subtitles-container.auto.s-c .caption-line:where(.s-c){text-align:left}.caption-segment.s-c{color:var(--white);display:inline-block;font-size:13px;line-height:1.2;white-space:pre-wrap}"};function Ja(t,e){B(e,!0),Q(t,_S);let[i,o]=Be(),s=()=>x(v,"$currentSubtitle$",i),a=()=>x(y,"$isLive$",i),l=()=>x(_,"$isFullscreen",i),d=()=>x(w,"$previewTrackActive",i),r=()=>x(b,"$isAutoSubtitleCaptionVisible$",i),u=g(e,"isMobile",3,!1),f=xe(),p=Lt(),v=f.state.currentSubtitle$,b=f.state.isAutoSubtitleCaptionVisible$,y=f.state.isLive$,_=f.ui.isFullscreen,w=f.ui.previewTrackActive,I=m(()=>!!s().isAuto),T=m(()=>!!a()),R=m(()=>e.playerSize.width*.02),A=m(()=>u()&&!l()||n(R)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(R)),P=K(null);Fe(()=>{var J,oe,de;(J=n(P))==null||J.setIsAuto(n(I)),(oe=n(P))==null||oe.setIsLive(n(T)),(de=n(P))==null||de.setCaptions(e.captions)});let E=K(ri([[]]));At(()=>{D(P,new tp().subscribe(),!0);let J=n(P).captionsPrepared$.subscribe(oe=>{D(E,oe,!0)});return()=>{var oe;(oe=n(P))==null||oe.destroy(),J.unsubscribe()}}),At(()=>{if(n(I)){let J=window.setTimeout(()=>{b.set(!1)},p.autoSubtitlesTimeout);return()=>{window.clearTimeout(J)}}else b.set(!1)});let z=m(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var U=hS();let W;var Y=C(U);{var te=J=>{var oe=gS();let de;var ae=C(oe),pe=C(ae);{var ee=Ee=>{var ce=fS(),Qe=C(ce),fe=C(Qe,!0);S(Qe),S(ce),O(ve=>{var X;Ke(Qe,`font-size: ${(X=n(A))!=null?X:""}px`),he(fe,ve)},[()=>q("subtitles_auto_caption")]),$(Ee,ce)},$e=(Ee,ce)=>{{var Qe=ve=>{var X=Ve(),N=le(X);yi(N,17,()=>n(E),Sd,(me,ue)=>{var Re=mS(),Je=C(Re);yi(Je,21,()=>n(ue),({value:Ae,timeAppeared:j})=>j,(Ae,j)=>{let ne=()=>n(j).value,Se=()=>n(j).timeAppeared;var Le=Ve(),ze=le(Le);{var Ce=we=>{var He=$s();O(()=>he(He,ne())),$(we,He)};M(ze,we=>{(!Se()||Se()<=e.position)&&we(Ce)})}$(Ae,Le)}),S(Je),S(Re),O(()=>{var Ae;return Ke(Je,`font-size: ${(Ae=n(A))!=null?Ae:""}px`)}),$(me,Re)}),$(ve,X)},fe=ve=>{var X=Ve(),N=le(X);yi(N,17,()=>e.captions,({value:me})=>me,(me,ue)=>{let Re=()=>n(ue).value;var Je=vS(),Ae=C(Je),j=C(Ae,!0);S(Ae),S(Je),O(()=>{var ne;Ke(Ae,`font-size: ${(ne=n(A))!=null?ne:""}px`),he(j,Re())}),$(me,Je)}),$(ve,X)};M(Ee,ve=>{var X;n(I)&&((X=n(E))!=null&&X.length)?ve(Qe):ve(fe,!1)},ce)}};M(pe,Ee=>{n(I)&&r()?Ee(ee):Ee($e,!1)})}S(ae),S(oe),O(Ee=>{var ce;de=ie(oe,1,"subtitles-caption s-c",null,de,Ee),Ke(oe,`--subtitles-caption-margin: ${(ce=n(z))!=null?ce:""}%`)},[()=>({mobile:u()})]),$(J,oe)};M(Y,J=>{var oe;(e.captions.length||(oe=n(E))!=null&&oe.length)&&J(te)})}S(U),O(J=>W=ie(U,1,"subtitles-container s-c",null,W,J),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(I)&&!n(T)&&!r()})]),$(t,U),F(),o()}import{ChromecastState as bS}from"@vkontakte/videoplayer-core/es2015";var $S=L('<div class="text s-v"> </div>'),yS=L('<div><div class="icon_wrapper s-v"><!></div> <!></div>'),xS={hash:"s-v",code:".wrapper.s-v{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-v{background-size:cover}.icon_wrapper.s-v{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-v{margin-top:20px}"};function _c(t,e){B(e,!0),Q(t,xS);let i=g(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Lt();var s=yS();let a;s.__contextmenu=function(...f){var p;(p=e.onContextMenu)==null||p.apply(this,f)},s.__click=function(...f){var p;(p=e.onClick)==null||p.apply(this,f)},s.__dblclick=function(...f){var p;(p=e.onDblClick)==null||p.apply(this,f)};var l=C(s),d=C(l);Jd(d,{get size(){return"48"},get iconState(){return bS.CONNECTED}}),S(l);var r=k(l,2);{var u=f=>{var p=$S(),v=C(p);S(p),O(()=>{var b;return he(v,`Видео воспроизводится на ${(b=i())!=null?b:""}`)}),$(f,p)};M(r,f=>{i()&&f(u)})}S(s),O(f=>{a=ie(s,1,"wrapper s-v",null,a,f),Ke(s,`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e.thumbUrl||""}')`)},[()=>({bgCover:o.features.previewNoEmptySpace})]),$(t,s),F()}Ze(["contextmenu","click","dblclick"]);var wS=ke('<path d="M460 194a4 4 0 0 1 4-4h122a4 4 0 0 1 4 4v82a4 4 0 0 1-4 4H464a4 4 0 0 1-4-4zm6 3a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm112-72a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm-71-37a6 6 0 1 0 0-12 6 6 0 0 0 0 12m36 0a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-18.05 15c6.05 0 11.62 4.45 11.94 4.65 2.11 1.35 3.26.77 3.96.16s1.15-2.81-1.04-4.66c-1.74-1.48-5.8-5.16-14.86-5.15s-12.95 3.5-14.8 5.18c-1.83 1.69-2.28 3.5-.96 4.66s2.31 1.16 4.35-.33c0 .01 5.36-4.51 11.41-4.51"></path>');function ov(t){je(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=wS();$(e,o)},$$slots:{default:!0}})}var SS=L('<div class="container s-5"><!></div>'),CS={hash:"s-5",code:".container.s-5{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function el(t){Q(t,CS);var e=SS(),i=C(e);ov(i,{}),S(e),$(t,e)}var TS=L('<div class="playButton s-e" tabindex="0" role="button"><div class="playButtonBackground s-e"></div> <!></div>'),IS=L('<div data-testid="unstarted-thumb"><!></div>'),ES={hash:"s-e",code:".container.s-e{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-e{opacity:0;visibility:hidden}.container.bgCover.s-e{background-size:cover}.playButton.s-e{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-e,.playButtonBackground.s-e{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-e{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-e:hover .playButtonBackground:where(.s-e){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-e svg{position:relative}"};function tl(t,e){B(e,!0),Q(t,ES);let i=g(e,"iconVisible",3,!0),o=xe(),s=Lt(),a=o.ui.startedByKeyboard$,l=q("tooltip_play"),d=b=>{var _;let y=b.code;["Enter","Space"].includes(y)&&(b.stopPropagation(),b.preventDefault(),a.set(!0),(_=e.startVideo)==null||_.call(e))},r=b=>{var y,_;b.stopPropagation(),(y=e.startVideo)==null||y.call(e),(_=e.onClick)==null||_.call(e,b)};var u=IS();let f;u.__click=r,u.__contextmenu=function(...b){var y;(y=e.onContextMenu)==null||y.apply(this,b)};var p=C(u);{var v=b=>{var y=TS();y.__keydown=d;var _=k(C(y),2);Rn(_,{get size(){return"48"}}),S(y),O(()=>De(y,"aria-label",l)),$(b,y)};M(p,b=>{i()&&b(v)})}return S(u),O(b=>{f=ie(u,1,"container s-e",null,f,b),Ke(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:s.features.previewNoEmptySpace})]),$(t,u),F({handlePressKey:d,handleClick:r})}Ze(["click","contextmenu","keydown"]);var PS=L('<span class="text s-x"> </span>'),kS=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},AS=L('<a target="_blank" class="link s-x"><!></a>'),LS=(t,e)=>e.onTitleClicked(),MS=L("<button><!></button>"),VS=L('<div data-testid="video_title"><!></div>'),RS={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 nv(t,e){B(e,!0),Q(t,RS);let i=b=>{var y=PS(),_=C(y,!0);S(y),it(y,w=>l(w),()=>l()),O(()=>he(_,o())),ft("mouseenter",y,function(...w){var I;(I=e.onMouseEnter)==null||I.apply(this,w)}),ft("mouseleave",y,function(...w){var I;(I=e.onMouseLeave)==null||I.apply(this,w)}),$(b,y)},o=g(e,"title",3,""),s=g(e,"isHidden",3,!1),a=g(e,"size",3,"md"),l=g(e,"ref",15),d=K(void 0);At(()=>{var y;requestAnimationFrame(()=>{var _;(_=e.onVisibilityChanged)==null||_.call(e,!0)});function b(_){var w;_.propertyName==="transform"&&((w=e.onVisibilityChanged)==null||w.call(e,!s()))}return(y=n(d))==null||y.addEventListener("transitionend",b),()=>{var _;return(_=n(d))==null?void 0:_.removeEventListener("transitionend",b)}});var r=VS();let u;var f=C(r);{var p=b=>{var y=AS();y.__click=[kS,e];var _=C(y);i(_),S(y),O(()=>De(y,"href",e.titleLinkHref)),$(b,y)},v=(b,y)=>{{var _=I=>{var T=MS();T.__click=[LS,e];var R=C(T);i(R),S(T),$(I,T)},w=I=>{i(I)};M(b,I=>{e.onTitleClicked?I(_):I(w,!1)},y)}};M(f,b=>{e.titleLinkHref?b(p):b(v,!1)})}S(r),it(r,b=>D(d,b),()=>n(d)),O(b=>u=ie(r,1,`title size-${a()}`,"s-x",u,b),[()=>({hidden:s()})]),$(t,r),F()}Ze(["click"]);import{throttleFn as US}from"@vkontakte/videoplayer-shared/es2015";var DS=L('<div class="timer__cell cell s-1b"><span class="cell__value s-1b"> </span> <span class="cell__unit s-1b"> </span></div> <span class="timer__points s-1b"> </span>',1),OS=L('<div class="timer__cell cell s-1b"><span class="cell__value s-1b"> </span> <span class="cell__unit s-1b"> </span></div> <span class="timer__points s-1b"> </span>',1),NS=L('<div class="timer__cell cell s-1b"><span class="cell__value s-1b"> </span> <span class="cell__unit s-1b"> </span></div> <span class="timer__points s-1b"> </span>',1),BS=L('<div class="timer__cell cell s-1b"><span class="cell__value s-1b"> </span> <span class="cell__unit s-1b"> </span></div>'),FS=L("<div><!> <!> <!> <!></div>"),HS={hash:"s-1b",code:".timer__container.s-1b{align-items:flex-start;display:flex;justify-content:center}.cell.s-1b{align-items:center;display:flex;flex-direction:column}.cell__value.s-1b{font-size:48px;font-weight:600;line-height:1.2}.small.s-1b .cell__value:where(.s-1b){font-size:24px}.cell__unit.s-1b{font-size:14px;font-weight:400;line-height:1.2}.small.s-1b .cell__unit:where(.s-1b){font-size:12px}.timer__points.s-1b{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-1b .timer__points:where(.s-1b){font-size:20px}"};function rv(t,e){B(e,!0),Q(t,HS);let i=K(""),o=K(""),s=K(""),a=K(""),l,d=32,r=d/2,u=U=>String(U).padStart(2,"0"),f=U=>Math.max(U.length,1),p=U=>`${(e.isSmallSize?r:d)*f(U)}px`,v=U=>{let W=Math.floor(U/86400);W&&(U-=W*86400,D(i,u(W),!0));let Y=Math.floor(U/3600);D(o,u(Y),!0);let te=Math.floor(U/60)%60;D(s,u(te),!0);let J=U%60;D(a,u(J),!0)},b=()=>{let U=Math.floor(Date.now()/1e3),W=e.startTime-U;v(W),W>=1?l=requestAnimationFrame(b):e.onTimerOver()};At(()=>{l=requestAnimationFrame(b)}),ln(()=>{cancelAnimationFrame(l)});var y=FS();let _;var w=C(y);{var I=U=>{var W=DS(),Y=le(W);let te;var J=C(Y),oe=C(J,!0);S(J);var de=k(J,2),ae=C(de,!0);S(de),S(Y);var pe=k(Y,2),ee=C(pe,!0);S(pe),O(($e,Ee,ce)=>{te=Ke(Y,"",te,{width:$e}),he(oe,n(i)),he(ae,Ee),he(ee,ce)},[()=>p(n(i)),()=>q("waiting_live_day_value"),()=>q("waiting_live_colon")]),$(U,W)};M(w,U=>{n(i)&&U(I)})}var T=k(w,2);{var R=U=>{var W=OS(),Y=le(W);let te;var J=C(Y),oe=C(J,!0);S(J);var de=k(J,2),ae=C(de,!0);S(de),S(Y);var pe=k(Y,2),ee=C(pe,!0);S(pe),O(($e,Ee,ce)=>{te=Ke(Y,"",te,{width:$e}),he(oe,n(o)),he(ae,Ee),he(ee,ce)},[()=>p(n(o)),()=>q("waiting_live_hour_value"),()=>q("waiting_live_colon")]),$(U,W)};M(T,U=>{n(o)&&U(R)})}var A=k(T,2);{var P=U=>{var W=NS(),Y=le(W);let te;var J=C(Y),oe=C(J,!0);S(J);var de=k(J,2),ae=C(de,!0);S(de),S(Y);var pe=k(Y,2),ee=C(pe,!0);S(pe),O(($e,Ee,ce)=>{te=Ke(Y,"",te,{width:$e}),he(oe,n(s)),he(ae,Ee),he(ee,ce)},[()=>p(n(s)),()=>q("waiting_live_minute_value"),()=>q("waiting_live_colon")]),$(U,W)};M(A,U=>{n(s)&&U(P)})}var E=k(A,2);{var z=U=>{var W=BS();let Y;var te=C(W),J=C(te,!0);S(te);var oe=k(te,2),de=C(oe,!0);S(oe),S(W),O((ae,pe)=>{Y=Ke(W,"",Y,{width:ae}),he(J,n(a)),he(de,pe)},[()=>p(n(a)),()=>q("waiting_live_second_value")]),$(U,W)};M(E,U=>{n(a)&&U(z)})}S(y),O(U=>_=ie(y,1,"timer__container s-1b",null,_,U),[()=>({small:e.isSmallSize})]),$(t,y),F()}var zS=L('<div class="waiting s-r"><span> </span></div>'),WS=L('<div class="upcoming-timer timer s-r"><span> </span> <!></div>'),KS=L('<div class="waiting-container s-r"><!></div>'),QS={hash:"s-r",code:'.waiting-container.s-r{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.waiting-container.s-r,.waiting-container.s-r:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-r:before{backdrop-filter:blur(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-r{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-r{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-r{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-r{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-r{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-r{font-size:15px}.medium.s-r{font-size:17px}'};function bc(t,e){B(e,!0),Q(t,QS);let i=g(e,"startTime",3,0),o=m(()=>i()<Math.floor(Date.now()/1e3)),s=K(void 0),a=K(void 0),l=0,d=K(void 0),r=K(void 0),u=m(()=>{var w,I;return((w=n(d))!=null?w:1/0)<=509||((I=n(r))!=null?I:1/0)<=320}),f=m(()=>{var w,I;return!n(u)&&(((w=n(d))!=null?w:1/0)<=699||((I=n(r))!=null?I:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?US(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let w={type:n(o)?"expired":"default",size:n(u)?"s":n(f)?"m":"l"},I=n(o)?n(s):n(a);e.onUpcomingLiveViewStateChanged(w,I)})},300):void 0;Fe(()=>{n(r),n(d),n(o),p==null||p()}),ln(()=>{if(cancelAnimationFrame(l),p==null||p.cancel(),e.onUpcomingLiveViewStateChanged){let w={type:n(o)?"expired":"default",size:n(u)?"s":n(f)?"m":"l"};e.onUpcomingLiveViewStateChanged(w)}});var v=KS();v.__contextmenu=function(...w){var I;(I=e.onContextMenu)==null||I.apply(this,w)},v.__click=function(...w){var I;(I=e.onClick)==null||I.apply(this,w)};var b=C(v);{var y=w=>{var I=zS(),T=C(I);let R;var A=C(T,!0);S(T),S(I),it(I,P=>D(s,P),()=>n(s)),O((P,E)=>{R=ie(T,1,"waiting__title s-r",null,R,P),he(A,E)},[()=>({medium:n(f),small:n(u)}),()=>q("waiting_live_upcoming_title")]),$(w,I)},_=w=>{var I=WS(),T=C(I);let R;var A=C(T,!0);S(T);var P=k(T,2);let E=m(()=>n(u)||n(f)),z=m(()=>i()||0);rv(P,{get isSmallSize(){return n(E)},get startTime(){return n(z)},onTimerOver:()=>D(o,!0)}),S(I),it(I,U=>D(a,U),()=>n(a)),O((U,W)=>{R=ie(T,1,"timer__title s-r",null,R,U),he(A,W)},[()=>({medium:n(f),small:n(u)}),()=>q("waiting_live_timer_title")]),$(w,I)};M(b,w=>{n(o)?w(y):w(_,!1)})}S(v),O(()=>Ke(v,`background-image: url(${e.thumbUrl})`)),Mn(v,"clientWidth",w=>D(d,w)),Mn(v,"clientHeight",w=>D(r,w)),$(t,v),F()}Ze(["contextmenu","click"]);var qS=L('<div class="waiting-container s-u"><div class="waiting-caption s-u"><!> <p class="waiting-title s-u"> </p></div></div>'),GS={hash:"s-u",code:'.waiting-container.s-u{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-u,.waiting-container.s-u:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-u:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-u{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-u{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function il(t,e){B(e,!0),Q(t,GS);let i=g(e,"thumbUrl",3,""),o={recover:q("waiting_live_recover_title"),record:q("waiting_record_title")},s=m(()=>o[e.kind]||"");var a=qS();a.__contextmenu=function(...f){var p;(p=e.onContextMenu)==null||p.apply(this,f)},a.__click=function(...f){var p;(p=e.onClick)==null||p.apply(this,f)};var l=C(a),d=C(l);Wa(d,{style:"position: static; transform: translate(0, 0)"});var r=k(d,2),u=C(r,!0);S(r),S(l),S(a),O(()=>{Ke(a,`background-image: url('${i()}')`),he(u,n(s))}),$(t,a),F()}Ze(["contextmenu","click"]);var YS=ke('<path d="M6 10.2 3.5 7.7a.99.99 0 0 0-1.4 1.4l3.2 3.2a1 1 0 0 0 1.4 0l7.6-7.6a.99.99 0 0 0-1.4-1.4z"></path>');function sv(t){je(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=YS();$(e,o)},$$slots:{default:!0}})}var jS=L('<div class="select-icon s-1w"><!></div>'),XS={hash:"s-1w",code:".select-icon.s-1w{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function $c(t){Q(t,XS);var e=jS(),i=C(e);sv(i,{}),S(e),$(t,e)}var ZS=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},JS=(t,e)=>{Ol(t,()=>e.item.selectItem(e.item.value))},eC=L("<p> </p>"),tC=L('<p class="sublabel s-1t"> </p>'),iC=L('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),oC={hash:"s-1t",code:".menu-item-value.s-1t{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1t{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1t,.sublabel.s-1t{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1t{opacity:.5}"};function av(t,e){B(e,!0),Q(t,oC);let i=g(e,"isMobile",3,!1);var o=iC();let s;o.__click=[ZS,e],o.__keydown=[JS,e];var a=C(o);{var l=y=>{$c(y,{})};M(a,y=>{e.item.selected&&y(l)})}var d=k(a,2);let r;var u=C(d);{var f=y=>{var _=Ve(),w=le(_);Hi(w,()=>e.item.valueComponent,(I,T)=>{T(I,is(()=>{var R;return(R=e.item.valueComponentParams)!=null?R:{}}))}),$(y,_)},p=y=>{var _=eC();let w;var I=C(_,!0);S(_),O(T=>{var R;w=ie(_,1,"label s-1t",null,w,T),he(I,(R=e.item.label)!=null?R:e.item.value)},[()=>({mobile:i()})]),$(y,_)};M(u,y=>{e.item.valueComponent?y(f):y(p,!1)})}var v=k(u,2);{var b=y=>{var _=tC(),w=C(_,!0);S(_),O(()=>he(w,e.item.sublabel)),$(y,_)};M(v,y=>{e.item.sublabel&&y(b)})}S(d),S(o),O((y,_,w)=>{var I;s=ie(o,1,"item",null,s,y),De(o,"data-value",(I=e.item.dataValue)!=null?I:e.item.value),De(o,"aria-label",_),De(o,"data-testid",e.item.dataTestid),r=ie(d,1,"menu-item-value s-1t",null,r,w),De(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var y,_;return(_=(y=e.item.ariaLabel)!=null?y:e.item.label)!=null?_:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),$(t,o),F()}Ze(["click","keydown"]);var nC=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function lv(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"refMenuItems",15),s=m(()=>()=>e.openSubMenuList(e.item.children)),a=m(()=>_=>Lu(_,n(s)));var l=nC();let d;l.__click=function(..._){var w;(w=n(s))==null||w.apply(this,_)},l.__keydown=function(..._){var w;(w=n(a))==null||w.apply(this,_)};var r=C(l);{var u=_=>{$c(_,{})};M(r,_=>{e.item.selected&&_(u)})}var f=k(r,2);let p;var v=C(f);{var b=_=>{var w=Ve();let I=m(()=>e.item.valueComponent);var T=le(w);Hi(T,()=>n(I),(R,A)=>{A(R,is(()=>{var P;return(P=e.item.valueComponentParams)!=null?P:{}}))}),$(_,w)},y=_=>{var w=$s();O(()=>he(w,e.item.label)),$(_,w)};M(v,_=>{e.item.valueComponent?_(b):_(y,!1)})}S(f),S(l),it(l,_=>o(o()[e.item.id]=_,!0),()=>{var _;return(_=o())==null?void 0:_[e.item.id]}),O((_,w)=>{var I;d=ie(l,1,"item",null,d,_),De(l,"aria-label",(I=e.item.ariaLabel)!=null?I:e.item.label),De(l,"data-testid",e.item.id),p=ie(f,1,"menu-item-value",null,p,w)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),$(t,l),F()}Ze(["click","keydown"]);var ns={"quality-settings":100,"audio-language-settings":200,"playback-rate-settings":300,"subtitles-settings":400,"traffic-saving-settings":500,download:600,report:700,"copy-data":800,"save-trace-info":900,"debug-info":1e3};var sC=(t,e)=>{N_(t,e.returnFromSubMenu,e.closeSettingsMenu)},aC=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},lC=(t,e)=>{Hd(t)&&(Nr(t),e.returnFromSubMenu())},dC=L('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1m"> </p></li> <!></ul></div>'),cC={hash:"s-1m",code:".sub-menu.s-1m{--item-padding-vertical-mobile:16px;--item-padding-vertical:7px;--item-label-line-height:18px;--edge-item-padding-vertical-mobile:calc(6px + var(--item-padding-vertical-mobile));--edge-item-padding-vertical:calc(8px + var(--item-padding-vertical))}.sub-menu.s-1m .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1m{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1m{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1m .items:where(.s-1m) .item.header:where(.s-1m){border-bottom:var(--divider-border);display:flex;justify-content:space-between;left:0;min-width:max-content;position:absolute;right:0;top:0}.header.s-1m .title:where(.s-1m){margin-left:8px}.sub-menu.s-1m .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1m .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1m .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1m .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1m .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1m .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1m .item .sublabel{font-size:12px;line-height:14px}.item.s-1m:not(.mobile) p:where(.s-1m),.sub-menu.s-1m .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function cv(t,e){B(e,!0),Q(t,cC);let[i,o]=Be(),s=()=>x(p,"$isFullscreen",i),a=()=>x(v,"$playerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"playerControlsHeight",3,0),r=g(e,"ariaLabelReturnFromSubMenu",19,()=>q("aria_label_submenu_back")),u=g(e,"listRef",15);At(()=>{let J=e.items.findIndex(oe=>oe.selected);u().children[J+1].focus()});let f=xe(),p=f.ui.isFullscreen,v=f.ui.playerSize,b=K(void 0),y=K(0),_=K(0),w=m(()=>l()&&s()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n(_)-d()}px; overflow: auto;`),I=m(()=>Math.max(e.minWidth,n(y)));var T=dC();let R;var A=C(T);let P;A.__keydown=[sC,e];var E=C(A);let z;E.__click=[aC,e],E.__keydown=[lC,e];var U=C(E);Or(U,{direction:"left"});var W=k(U,2),Y=C(W,!0);S(W),S(E),it(E,J=>D(b,J),()=>n(b));var te=k(E,2);yi(te,17,()=>e.items,Sd,(J,oe)=>{var de=Ve(),ae=le(de);{var pe=$e=>{av($e,{get item(){return n(oe)},get isMobile(){return l()}})},ee=($e,Ee)=>{{var ce=Qe=>{lv(Qe,{get isMobile(){return l()},get item(){return n(oe)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};M($e,Qe=>{n(oe).type==="OPEN_SUB_MENU"&&Qe(ce)},Ee)}};M(ae,$e=>{n(oe).type==="SELECT_VALUE"?$e(pe):$e(ee,!1)})}$(J,de)}),S(A),it(A,J=>u(J),()=>u()),S(T),O((J,oe,de)=>{R=ie(T,1,"sub-menu menu s-1m",null,R,J),De(T,"data-testid",`${e.id}-sub-menu`),Ke(T,`min-width: ${n(I)}px`),P=ie(A,1,"items s-1m",null,P,oe),Ke(A,n(w)),z=ie(E,1,"item header back s-1m",null,z,de),De(E,"aria-label",r()),he(Y,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),Mn(E,"clientWidth",J=>D(y,J)),Mn(E,"clientHeight",J=>D(_,J)),$(t,T),F(),o()}Ze(["keydown","click"]);import{noop as uC}from"@vkontakte/videoplayer-shared/es2015";var pC=(t,e)=>Lu(t,e()),fC=(t,e)=>{t.stopPropagation(),e()()},mC=L('<div class="value s-1l"> </div>'),vC=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),gC={hash:"s-1l",code:".value.s-1l{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function uv(t,e){B(e,!0),Q(t,gC);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,uC),s=g(e,"valueComponent",3,void 0),a=g(e,"iconProps",19,()=>({})),l=g(e,"ref",15);var d=vC();let r;d.__click=[fC,o],d.__keydown=[pC,o];var u=C(d),f=C(u);{var p=T=>{ja(T,{get icon(){return e.icon}})},v=T=>{var R=Ve();let A=m(()=>e.icon);var P=le(R);Hi(P,()=>n(A),(E,z)=>{z(E,is(a))}),$(T,R)};M(f,T=>{typeof e.icon=="string"?T(p):T(v,!1)})}S(u);var b=k(u,2),y=C(b,!0);S(b);var _=k(b,2);{var w=T=>{var R=Ve();let A=m(s);var P=le(R);Hi(P,()=>n(A),(E,z)=>{z(E,{})}),$(T,R)},I=T=>{var R=mC(),A=C(R,!0);S(R),O(()=>he(A,e.value)),$(T,R)};M(_,T=>{s()?T(w):T(I,!1)})}S(d),it(d,T=>l(T),()=>l()),O(T=>{r=ie(d,1,"item",null,r,T),De(d,"aria-label",e.ariaLabel),De(d,"data-testid",e.id),he(y,e.label)},[()=>({mobile:i()})]),$(t,d),F()}Ze(["click","keydown"]);import{noop as kb}from"@vkontakte/videoplayer-shared/es2015";var hC=(t,e)=>{Ol(t,()=>e())},_C=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),bC=L('<img class="icon" aria-hidden="true"/>'),$C=L('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1n"> </div></li>'),yC={hash:"s-1n",code:".label.s-1n{overflow:hidden;text-overflow:ellipsis}"};function pv(t,e){B(e,!0),Q(t,yC);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,kb),s=g(e,"closeSettings",3,kb),a=K(!1),l=()=>{D(a,!0)},d=w=>{w==null||w.stopPropagation(),o()(),s()()};var r=$C();let u;r.__click=d,r.__keydown=[hC,d];var f=C(r),p=C(f);{var v=w=>{var I=Ve(),T=le(I);{var R=P=>{var E=_C();$(P,E)},A=P=>{var E=bC();O(()=>De(E,"src",e.icon)),ft("error",E,l),Da(E),$(P,E)};M(T,P=>{n(a)?P(R):P(A,!1)})}$(w,I)},b=w=>{var I=Ve();let T=m(()=>e.icon);var R=le(I);Hi(R,()=>n(T),(A,P)=>{P(A,{})}),$(w,I)};M(p,w=>{typeof e.icon=="string"?w(v):w(b,!1)})}S(f);var y=k(f,2),_=C(y,!0);S(y),S(r),O(w=>{var I;u=ie(r,1,"item",null,u,w),De(r,"aria-label",(I=e.ariaLabel)!=null?I:e.label),De(r,"data-testid",e.id),he(_,e.label)},[()=>({mobile:i()})]),$(t,r),F()}Ze(["click","keydown"]);import{noop as SC}from"@vkontakte/videoplayer-shared/es2015";var xC=L('<div class="toggle_wrap s-1q"><div></div> <div class="toggle-label s-1q"></div></div>'),wC={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 fv(t,e){Q(t,wC);let i=g(e,"enabled",3,!1);var o=xC(),s=C(o);let a;Xt(2),S(o),O(l=>a=ie(s,1,"toggle s-1q",null,a,l),[()=>({on:i()})]),$(t,o)}var CC=(t,e,i)=>{B_(t,e(),o=>i()(o))},TC=(t,e,i)=>{t.stopPropagation(),e()(!i())},IC=L('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),EC=L('<li role="menuitem" tabindex="0"><!></li>');function mv(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,SC),s=g(e,"enabled",3,!1),a=g(e,"tooltipText",3,void 0),l=g(e,"maxTooltipWidth",3,void 0);var d=EC();let r;d.__click=[TC,o,s],d.__keydown=[CC,s,o];var u=C(d);Ka(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(f,p)=>{var v=IC();let b;var y=C(v),_=C(y);{var w=P=>{ja(P,{get icon(){return e.icon}})},I=P=>{var E=Ve();let z=m(()=>e.icon);var U=le(E);Hi(U,()=>n(z),(W,Y)=>{Y(W,{})}),$(P,E)};M(_,P=>{typeof e.icon=="string"?P(w):P(I,!1)})}S(y);var T=k(y,2),R=C(T,!0);S(T);var A=k(T,2);fv(A,{get enabled(){return s()}}),S(v),O(P=>{b=ie(v,1,"switch-wrapper",null,b,P),he(R,e.label)},[()=>({mobile:i()})]),$(f,v)},$$slots:{default:!0}}),S(d),O(f=>{var p;r=ie(d,1,"item switch-item",null,r,f),De(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),De(d,"data-testid",e.id)},[()=>({mobile:i()})]),$(t,d),F()}Ze(["click","keydown"]);import{isValidURL as JC,VideoQuality as Hb}from"@vkontakte/videoplayer-shared/es2015";var Ab=()=>{let t=K(ri([])),e=m(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{D(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{D(t,[],!0)}}};import{getVideoQualityLabel as PC}from"@vkontakte/videoplayer-shared/es2015";var kC=L('<div class="quality-icon s-1p"><!></div>'),AC=L('<div class="quality-label s-1p"><span> </span> <!></div>'),LC={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 ol(t,e){B(e,!0),Q(t,LC);let i=g(e,"isSubCase",3,!1),o=m(()=>e.quality?PC(e.quality):""),s=m(()=>Nu(e.quality));var a=AC(),l=C(a);let d;var r=C(l,!0);S(l);var u=k(l,2);{var f=p=>{var v=kC();let b=m(()=>n(s));var y=C(v);Hi(y,()=>n(b),(_,w)=>{w(_,{})}),S(v),O(()=>De(v,"data-testid",`${n(o)}-icon`)),$(p,v)};M(u,p=>{n(s)&&!e.isMobile&&p(f)})}S(a),O(p=>{d=ie(l,1,"s-1p",null,d,p),he(r,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),$(t,a),F()}import{VideoQuality as MC}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as Lb}from"@vkontakte/videoplayer-core/es2015";var Mb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},Vb=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=Mb({quality:t,availableQualities:e});return i?t===Lb.INVARIANT?q("auto_quality_invariant"):q("auto_quality",{actual:o}):o},Rb=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===Lb.INVARIANT?i:`${i}${Mb({quality:t,availableQualities:e})}`:"...";var VC=L('<div class="menu-item-value-wrapper s-1r"><!></div>'),RC={hash:"s-1r",code:".menu-item-value-wrapper.s-1r{line-height:normal}"};function Yl(t,e){B(e,!0),Q(t,RC);let[i,o]=Be(),s=()=>x(r,"$currentQuality$",i),a=()=>x(u,"$availableQualities$",i),l=()=>x(f,"$isMobile$",i),d=xe(),r=d.state.currentQuality$,u=d.state.availableQualities$,f=d.ui.isMobile,p=" · ",v=m(()=>e.prefix+(e.selected&&s()!==MC.INVARIANT?p:"")),b=m(()=>Rb({prefix:n(v),quality:s(),availableQualities:a(),onlyPrefix:!e.selected}));var y=VC(),_=C(y);let w=m(()=>e.selected?s():void 0);ol(_,{get quality(){return n(w)},get label(){return n(b)},get isMobile(){return l()},isSubCase:!0}),S(y),$(t,y),F(),o()}var DC=t=>{let e=t.join("|"),i="<(?<keyhtml>.*?)(?<propshtml> .*?)?>(?<childrenhtml>.*?)</\\k<keyhtml>>",o=`{(?<keyi18n>${e})}(?<childreni18n>.*?){/\\k<keyi18n>}`,s="<(?<keyhtmlself>.*?)(?<propshtmlself> .*?)?/?>",a=`{(?<keyi18nself>${e})}`;return new RegExp(`${i}|${o}|${s}|${a}`,"g")},OC={br:!0,span:!0},vv=(t,e={})=>{var d,r,u,f,p,v,b;if(!t)return t;let i=Ye(Ye({},OC),e),o=Object.keys(i);if(!o.length)return t;let s=DC(o),a=[],l=0;for(let y of t.matchAll(s)){let _=y[0],w=((d=y.groups)==null?void 0:d.keyhtml)||((r=y.groups)==null?void 0:r.keyi18n)||((u=y.groups)==null?void 0:u.keyhtmlself)||((f=y.groups)==null?void 0:f.keyi18nself)||"",{index:I}=y;if(!i[w]){a.push(t.slice(l,I)),l=I+_.length;continue}let T=(p=y.groups)!=null&&p.childrenhtml?vv(y.groups.childrenhtml,i):"",R=(v=y.groups)!=null&&v.childrenhtml?_.replace(new RegExp((b=y.groups)==null?void 0:b.childrenhtml),()=>T||""):_;a.push(t.slice(l,I),R),l=I+_.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function yc(t,e){B(e,!1);let i=g(e,"message",8),o=vv(i());Yo();var s=Ve(),a=le(s);{var l=d=>{var r=Ve(),u=le(r);Cd(u,()=>o),$(d,r)};M(a,d=>{o&&d(l)})}$(t,s),F()}var NC=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 gv(t,e){B(e,!1),Q(t,BC),Yo();var i=NC(),o=C(i);let s=hr(()=>q("quality_applience",{action:`<span>${q("quality_applience_action")}</span>`}));yc(o,{get message(){return n(s)}}),S(i),$(t,i),F()}var Ob=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",label:q("other_quality"),selected:o,valueComponent:Yl,valueComponentParams:{prefix:q("other_quality"),selected:o},children:"quality-other-settings"}},hv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:q("auto_quality_limit"),valueComponent:e?Yl:void 0,valueComponentParams:{prefix:q("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),Nb=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:gv,bottomBordered:!0,children:"quality-appliance"}),_v=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"quality-high",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:q("high_quality"),valueComponent:t?Yl:void 0,valueComponentParams:{prefix:q("high_quality"),selected:i},sublabel:q("high_quality_description")}),bv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleTrafficSaving:o})=>({id:"quality-traffic-saving",type:"SELECT_VALUE",value:"save_traffic",selectItem:()=>o(!0,e),selected:i,label:q("traffic_saving_quality"),valueComponent:t?Yl:void 0,valueComponentParams:{prefix:q("traffic_saving_quality"),selected:i},sublabel:q("traffic_saving_quality_description")});var ip=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),op=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,s;if(i==="und"?s=void 0:i&&(s=(l=ic(i))!=null?l:i),o&&i&&s){let d=e.filter(r=>r.label===o&&r.language===i);if(d.length===1)return q("audio_stream_display_language_label",{language:s,label:o});{let r=ip(t,d);return q("audio_stream_display_language_label_index",{language:s,label:o,index:r})}}if(o){let d=e.filter(r=>r.label===o);if(d.length===1)return o;{let r=ip(t,d);return q("audio_stream_display_label_index",{label:o,index:r})}}if(i&&s){let d=e.filter(r=>r.language===i);if(d.length===1)return s;{let r=ip(t,d);return q("audio_stream_display_language_index",{language:s,index:r})}}let a=ip(t,e);return q("audio_stream_display_unknown",{index:a})};var FC={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:s}=t,a=[];return i&&a.push({handler:hv,selected:e&&!o&&!s||!1}),a.push({handler:bv,selected:o},{handler:_v,selected:s}),{title:q("submenu_quality"),id:"quality-settings",items:[Nb(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),Ob(t)]}},"quality-other-settings":({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"quality-other-settings",title:q("submenu_quality"),closeSettingsMenu:t,items:i.map(s=>({type:"SELECT_VALUE",value:s.value,valueComponent:ol,valueComponentParams:{quality:s.value,label:s.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:s.selected,label:s.displayValue}))}),"quality-appliance":t=>{var i,o,s;let{closeSettingsMenu:e}=t;return{id:"quality-appliance",title:q("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:hv,selected:((i=Cu())==null?void 0:i.type)==="auto_quality"},{handler:bv,selected:((o=Cu())==null?void 0:o.type)==="traffic_saving"},{handler:_v,selected:((s=Cu())==null?void 0:s.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-tracks":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-tracks",title:q("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(s=>({type:"SELECT_VALUE",value:s,dataValue:s.id,selectItem:o,selected:s.id===(i==null?void 0:i.id),label:op(s,e)}))}),"playback-rate":({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"playback-rate",title:q("submenu_playback_rate"),closeSettingsMenu:t,items:e.map(o=>({type:"SELECT_VALUE",value:o.value,selectItem:i,selected:o.selected,label:o.displayValue}))}),subtitles:({availableSubtitlesList:t,selectSubtitle:e})=>({id:"subtitles",minWidth:164,title:q("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i.value,selectItem:()=>e(i),selected:i.selected,label:i.displayValue,dataTestid:i.value===Dn?"sub_off":void 0}))})},Bb=({subMenuId:t,context:e})=>t?[FC[t](e)]:[];var HC=ke('<path d="M3.1 9.5c0-2.24 0-3.36.44-4.22A4 4 0 015.28 3.54C6.14 3.1 7.26 3.1 9.5 3.1h5c2.24 0 3.36 0 4.22.44a4 4 0 011.74 1.74c.44.86.44 1.98.44 4.22s0 3.36-.44 4.22a4 4 0 01-1.74 1.74c-.84.43-1.93.44-4.07.44l.55 2.2h1.9a.9.9 0 010 1.8H6.9a.9.9 0 110-1.8h1.9l.55-2.2c-2.14 0-3.23-.01-4.07-.44a4 4 0 01-1.74-1.74C3.1 12.86 3.1 11.74 3.1 9.5m11.4-4.6h-5c-1.15 0-1.9 0-2.48.05-.56.04-.79.12-.92.19a2.2 2.2 0 00-.96.96 2 2 0 00-.2.92C4.9 7.6 4.9 8.35 4.9 9.5s0 1.9.05 2.48c.04.56.12.79.19.92q.33.63.96.96c.13.07.36.15.92.2.58.04 1.33.04 2.48.04h5c1.15 0 1.9 0 2.48-.05.56-.04.79-.12.92-.19a2.2 2.2 0 00.96-.96c.07-.13.15-.36.2-.92.04-.58.04-1.33.04-2.48s0-1.9-.05-2.48a3 3 0 00-.19-.92 2.2 2.2 0 00-.96-.96 2 2 0 00-.92-.2c-.58-.04-1.33-.04-2.48-.04m-3.3 11-.55 2.2h2.7l-.55-2.2z"></path>');function $v(t){je(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=HC();$(e,o)},$$slots:{default:!0}})}var UC=ke('<path d="M8.3 14.25c1.86 1.9 5.5.02 5.5-3.55V5.64l2.4-.7A2.74 2.74 0 0 0 18 2.37V.64a.75.75 0 0 0-.92-.62l-.26.06C15.88.3 14.93.51 14 .8c-1.33.45-2.03 1.62-2.01 3.08V9c-3.89.2-5.64 3.29-3.7 5.25ZM.9.1a.9.9 0 0 0 0 1.8h8.2a.9.9 0 0 0 0-1.8H.9ZM.9 5.1a.9.9 0 1 0 0 1.8h7.2a.9.9 0 0 0 0-1.8H.9ZM0 11c0-.5.4-.9.9-.9h4.18a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 11Z"></path>');function yv(t){je(t,{width:"18",height:"15",children:(e,i)=>{var o=UC();$(e,o)},$$slots:{default:!0}})}var zC=ke('<path d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69A8 8 0 0 1 11 4.07M5.69 7.1 4.26 5.68A10 10 0 0 0 2.05 11h2.02a8 8 0 0 1 1.62-3.9M2.05 13c.2 2.01 1 3.84 2.21 5.32l1.43-1.43A8 8 0 0 1 4.07 13zM11 21.95v-2.02a8 8 0 0 1-3.9-1.62l-1.42 1.43A10 10 0 0 0 11 21.95M22 12c0 5.16-3.92 9.42-8.95 9.95v-2.02C16.97 19.41 20 16.05 20 12s-3.03-7.41-6.95-7.93V2.05C18.08 2.58 22 6.84 22 12M10.69 8.58l4.74 2.73a.8.8 0 0 1 0 1.37l-4.74 2.74a.8.8 0 0 1-1.19-.68V9.26a.8.8 0 0 1 1.19-.68"></path>');function xv(t){je(t,{testId:"play-speed-icon",children:(e,i)=>{var o=zC();$(e,o)},$$slots:{default:!0}})}var WC=ke('<path d="M12 2a.9.9 0 01.9.9v10.93l4.56-4.57a.9.9 0 011.28 1.28l-6.1 6.1a.9.9 0 01-1.28 0l-6.1-6.1a.9.9 0 111.28-1.28l4.56 4.57V2.9A.9.9 0 0112 2M4 20a.9.9 0 01.9-.9h14.2a.9.9 0 110 1.8H4.9A.9.9 0 014 20"></path>');function wv(t){je(t,{testId:"download-icon",children:(e,i)=>{var o=WC();$(e,o)},$$slots:{default:!0}})}var KC=ke('<path d="M8.86 2.1h6.28c.67 0 1.2.21 1.68.7l4.38 4.38c.48.48.7 1 .7 1.68v6.28c0 .68-.22 1.2-.7 1.68l-4.38 4.38c-.48.48-1 .7-1.68.7H8.86c-.68 0-1.2-.22-1.68-.7L2.8 16.82c-.48-.48-.7-1-.7-1.68V8.86c0-.68.22-1.2.7-1.68L7.18 2.8c.48-.49 1-.7 1.68-.7m-.44 2L4.1 8.43c-.18.18-.21.24-.21.5v6.17c0 .25.03.31.2.5l4.32 4.3c.18.18.24.21.5.21h6.17c.25 0 .31-.03.5-.2l4.3-4.32c.18-.18.21-.24.21-.5V8.92c0-.25-.03-.31-.2-.5l-4.32-4.3c-.18-.18-.24-.21-.5-.21H8.92c-.25 0-.32.03-.5.2M13 16a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-.1-8.1a.9.9 0 0 0-1.8 0v5.2a.9.9 0 1 0 1.8 0z"></path>');function Sv(t){je(t,{testId:"report-icon",children:(e,i)=>{var o=KC();$(e,o)},$$slots:{default:!0}})}var QC=ke('<path d="M4 12.3V12c0-1.47 0-2.55.08-3.4.07-.9.21-1.48.45-1.95a4.85 4.85 0 0 1 2.12-2.12 5.1 5.1 0 0 1 1.95-.45C9.5 4 10.68 4 12.3 4h4.51c-.03-.16-.09-.33-.17-.49a2.4 2.4 0 0 0-1.05-1.05c-.3-.16-.63-.21-.93-.24-.29-.02-.64-.02-1.03-.02h-1.37c-1.58 0-2.81 0-3.81.08a6.84 6.84 0 0 0-2.62.64 6.65 6.65 0 0 0-2.9 2.91c-.4.76-.57 1.6-.65 2.62-.08 1-.08 2.23-.08 3.81v1.37c0 .4 0 .74.02 1.03.03.3.08.62.24.93A2.4 2.4 0 0 0 4 16.8V12.3ZM10.08 6h-.03c-.53 0-.97 0-1.33.03-.39.03-.76.1-1.12.28a2.9 2.9 0 0 0-1.3 1.3c-.17.35-.24.72-.27 1.1C6 9.09 6 9.53 6 10.06v7.9c0 .53 0 .97.03 1.33.03.39.1.76.28 1.12a2.9 2.9 0 0 0 1.3 1.3c.35.17.72.24 1.1.27.37.03.81.03 1.33.03h6.91c.53 0 .97 0 1.33-.03.39-.03.76-.1 1.12-.28a2.9 2.9 0 0 0 1.3-1.3c.17-.35.24-.72.27-1.1.03-.37.03-.81.03-1.34v-7.9c0-.53 0-.97-.03-1.33-.03-.39-.1-.76-.28-1.12a2.9 2.9 0 0 0-1.3-1.3 2.96 2.96 0 0 0-1.1-.27C17.91 6 17.47 6 16.94 6h-6.87ZM8.41 7.92c.06-.04.18-.07.45-.1.28-.02.65-.02 1.22-.02h6.84c.57 0 .94 0 1.22.02.27.03.39.06.45.1.21.1.39.28.5.49.03.06.06.18.09.45.02.28.02.65.02 1.22v7.84c0 .57 0 .94-.02 1.22-.03.27-.06.39-.1.45-.1.21-.28.39-.49.5-.06.03-.18.06-.45.09-.28.02-.65.02-1.22.02h-6.84c-.57 0-.94 0-1.22-.02a1.23 1.23 0 0 1-.45-.1 1.1 1.1 0 0 1-.5-.49 1.23 1.23 0 0 1-.09-.45c-.02-.28-.02-.65-.02-1.22v-7.84c0-.57 0-.94.02-1.22.03-.27.06-.39.1-.45.1-.21.28-.39.49-.5Z"></path>');function np(t){je(t,{children:(e,i)=>{var o=QC();$(e,o)},$$slots:{default:!0}})}var qC=ke('<path d="M12 20.1a8.1 8.1 0 1 0 0-16.2 8.1 8.1 0 0 0 0 16.2m0 1.9a10 10 0 1 1 0-20 10 10 0 0 1 0 20m0-12.37A1.32 1.32 0 1 1 12 7a1.32 1.32 0 0 1 0 2.63m-.95 2.82c0-.54.43-.98.95-.98s.95.44.95.98v3.83c0 .54-.43.98-.95.98a.96.96 0 0 1-.95-.98z"></path>');function Cv(t){je(t,{testId:"info-icon",children:(e,i)=>{var o=qC();$(e,o)},$$slots:{default:!0}})}var GC=L('<div class="menu-item-value-wrapper s-1v"><!></div>'),YC={hash:"s-1v",code:".menu-item-value-wrapper.s-1v{line-height:normal}"};function Tv(t,e){B(e,!0),Q(t,YC);let[i,o]=Be(),s=()=>x(u,"$currentQuality$",i),a=()=>x(f,"$availableQualities$",i),l=()=>x(p,"$isAutoQualityEnabled$",i),d=()=>x(v,"$isMobile$",i),r=xe(),u=r.state.currentQuality$,f=r.state.availableQualities$,p=r.state.isAutoQualityEnabled$,v=r.ui.isMobile,b=m(()=>Vb({quality:s(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=GC(),_=C(y);ol(_,{get quality(){return s()},get label(){return n(b)},get isMobile(){return d()}}),S(y),$(t,y),F(),o()}var XC={"quality-settings":({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?q("auto_quality_option"):e)||"";return{id:"quality-settings",type:"OPEN_SUB_MENU",ariaLabel:q("aria_label_menu_quality",{actual:o}),icon:Gd,label:q("menu_quality"),value:e,valueComponent:Tv,weight:ns["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:ns["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:q("aria_label_submenu_traffic_saving"),icon:$v,label:q("menu_traffic_saving"),enabled:t,tooltipText:q("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-tracks-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=op(t,e);return{id:"audio-tracks-settings",weight:ns["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:q("aria_label_menu_audio_languages",{actual:i}),icon:yv,label:q("menu_audio_languages"),value:i,children:"audio-tracks"}},"playback-rate-settings":({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(s=>s.value===e))==null?void 0:o.displayValue)||"";return{id:"playback-rate-settings",weight:ns["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:q("aria_label_menu_rate",{actual:i}),icon:xv,label:q("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:ns["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:q("aria_label_menu_subtitle",{actual:t.displayValue}),icon:va,iconProps:{type:"outline"},label:q("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:ns.download,type:"CLICK",onClick:t,label:q("download_video_caption"),ariaLabel:q("aria_label_menu_download"),icon:wv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:ns.report,type:"CLICK",onClick:t,label:q("menu_report"),ariaLabel:`${q("menu_report")}. ${q("aria_label_new_tab_alert")}`,icon:Sv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:ns["copy-data"],type:"CLICK",onClick:t,label:q("menu_copy_debug"),ariaLabel:q("menu_copy_debug"),icon:np,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:ns["save-trace-info"],type:"CLICK",onClick:t,label:q("menu_save_debug"),ariaLabel:q("menu_save_debug"),icon:np,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:ns["debug-info"],type:"CLICK",onClick:t,ariaLabel:q("aria_label_menu_debug_overlay"),label:q("menu_debug_overlay"),icon:Cv,isHiddenFor:["desktop"]})},Fb=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(s=>XC[s](e)),...i.map(s=>Jt(Ye({},s),{isAdditional:!0}))].filter(s=>{var a,l,d;return!((a=s==null?void 0:s.isHiddenFor)!=null&&a.length)||!((l=s==null?void 0:s.isHiddenFor)!=null&&l.includes("desktop"))&&!o||!((d=s==null?void 0:s.isHiddenFor)!=null&&d.includes("mobile"))&&o}).sort(Ua)};var eT=(t,e)=>{Au(t,e)},tT=L('<div><div> </div> <div class="close s-w" data-testid="close-settings-menu"></div></div>'),iT=L('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),oT=L("<div><!> <!></div>"),nT={hash:"s-w",code:'.settings-menu-container.mobile.s-w{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-w ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-w .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-w .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-w .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-w .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-w .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-w .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-w{line-height:40px}.settings-menu.desktop.s-w{min-width:300px}.settings-menu-container.s-w .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-w .menu.mobile.hidden{display:none}.settings-menu-container.s-w .menu .item:not(.switch-item),.settings-menu-container.s-w .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-w .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-w .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-w .item:not(.switch-item),.settings-menu.s-w .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-w .item.mobile:not(.switch-item),.settings-menu.s-w .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-w .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-w .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-w .item.header.mobile:where(.s-w){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-w .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-w .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-w .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-w .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-w .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-w{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-w:after,.close.s-w:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-w:before{transform:rotate(45deg)}.close.s-w:after{transform:rotate(-45deg)}'};function xc(t,e){B(e,!0),Q(t,nT);let[i,o]=Be(),s=()=>x(j,"$settingsMenuVisible",i),a=()=>x(ne,"$settingsMenuOpenedByKeyboard",i),l=()=>x(ct,"$debugPanelVisible",i),d=()=>x(Le,"$isMobile",i),r=()=>x(rt,"$playerSize",i),u=()=>x(Ae,"$hasMpegSources$",i),f=()=>x(ze,"$mobileNotReportControlHidden$",i),p=()=>x(fe,"$autoQualityLimitingAvailable$",i),v=()=>x(ee,"$isMinimalMode$",i),b=()=>x(Re,"$availableSubtitlesList$",i),y=()=>x(Ce,"$isLiveWithPlaybackSpeed",i),_=()=>x(Ee,"$availableAudioStreams$",i),w=()=>x(me,"$availablePlaybackRates$",i),I=()=>x($e,"$currentAudioStream$",i),T=()=>x(N,"$currentPlaybackRate$",i),R=()=>x(we,"$trafficSavingEnabled",i),A=()=>x(ce,"$currentQuality$",i),P=()=>x(ve,"$isAutoQualityEnabled$",i),E=()=>x(ue,"$currentSubtitle$",i),z=()=>x(lt,"$additionalSettingsMenuItems$",i),U=()=>x(X,"$isAutoQualityAvailable$",i),W=()=>x(Qe,"$availableQualities$",i),Y=()=>x(He,"$highQualityEnabled",i),te=g(e,"ref",15,void 0),J=g(e,"playerControlsHeight",3,0),oe=ri({}),de=ri({}),ae=xe(),pe=Lt(),ee=ae.ui.isMinimalMode$,$e=ae.state.audioStream$,Ee=ae.state.availableAudioStreams$,ce=ae.state.currentQuality$,Qe=ae.state.availableQualities$,fe=ae.state.autoQualityLimitingAvailable$,ve=ae.state.isAutoQualityEnabled$,X=ae.state.isAutoQualityAvailable$,N=ae.state.currentPlaybackRate$,me=ae.state.availablePlaybackRates$,ue=ae.state.currentSubtitle$,Re=ae.state.availableSubtitlesList$,Je=ae.state.canDownload,Ae=ae.state.hasMpegSources$,j=ae.ui.settingsMenu.visible$,ne=ae.ui.settingsMenu.openedByBtnKeyboard$,Se=ae.ui.settingsMenu.ref$,Le=ae.ui.isMobile,ze=ae.ui.mobileNotReportControlHidden$,Ce=ae.state.canChangePlaybackSpeed$,we=ae.state.trafficSavingEnabled$,He=ae.state.highQualityEnabled$,rt=ae.ui.playerSize,ct=ae.ui.debugPanelVisible,Mt=ae.state.isInteractiveTime$,lt=ae.ui.additionalSettingsMenuItems$,ni=ae.ui.t,wt=ae.actions.internal.downloadVideo,Rt=ae.actions.internal.closeSettingsMenu,Dt=ae.actions.internal.openSettingsSubMenu,Qt=ae.actions.internal.closeSettingsSubMenu,Te=K(!1),G=K(void 0),Ne=Ab();Fe(()=>{!s()&&Ne.current&&(Qt(de[Ne.current]),Ne.popAllSubMenus())}),Fe(()=>{s()||D(G,void 0)}),Fe(()=>{!Ne.current&&n(G)&&O_(oe,n(G))}),Fe(()=>{te()&&Se.set(te())});function be(H){return bt(this,null,function*(){var Ut;Ne.pushSubMenu(H),yield mo(),Dt(H,de[H]);let ot=(Ut=te())==null?void 0:Ut.firstElementChild;ot&&Uf(ot)})}function Oe(H){var ot;H==null||H.stopPropagation(),a()||(ot=e.returnFocus)==null||ot.call(e),Rt(),D(Te,!1)}function Ie(H,ot){ae.actions.internal.setQuality(H,{appliesTo:ot,byUser:!0}),Oe()}function ht(H){ae.actions.internal.setAudioStream(H),Oe()}function ye(H,ot){ae.actions.internal.setTrafficSavingEnabled(H,ot),pe.features.qualityDetailsSubMenuEnabled&&Oe()}function qe(H,ot){ae.actions.internal.setHighQualityEnabled(H,ot),Oe()}function Ue(H){ae.actions.internal.setPlaybackRate(H),Oe()}function st(H){ae.actions.internal.setSubtitle(H),Oe()}function qt(){wt()}function Pt(){JC(e.supportLink)&&window.open(e.supportLink,"_blank"),ae.actions.internal.reportProblem(),ae.actions.internal.pause()}function Yt(){Rl(ae.actions.internal.getDebugTextData())}let bi=()=>{let H=ae.actions.internal.getTraceTextData(),ot=new Blob([...H],{type:"application/json"}),Ut=window.URL.createObjectURL(ot);Fa(Ut,"vk_player_trace_info","json")};function Vi(){ct.set(!l())}function Ai(){D(Te,!0)}function ji(){D(Te,!1)}function si(){return d()?`max-height: ${Math.round(r().height*.6)}px`:`max-height: ${r().height-32-J()}px; overflow: auto;`}let ut=m(()=>Je&&u()&&!f()),di=m(()=>pe.features.trafficSaving&&!f()&&p()&&!pe.features.qualityDetailsSubMenuEnabled),Xi=m(()=>!v()&&b().length>0&&!f()),It=m(()=>!!y()&&!f()),hi=m(()=>pe.features.audioLanguages&&_().length>=2&&!f()),ui=m(()=>!f());At(()=>Mt.subscribe(H=>{H&&!d()&&!n(Te)&&!a()&&Oe()}));let We=m(()=>{let H=[n(ui)&&"quality-settings",n(hi)&&"audio-tracks-settings",n(It)&&"playback-rate-settings",n(Xi)&&"subtitles-settings",n(di)&&"traffic-saving-switch",n(ut)&&"download",pe.showSupport&&"show-support","copy-data",pe.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(ot=>!!ot);return Fb({items:H,context:{qualityDetailsSubMenuEnabled:pe.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:w(),currentAudioStream:I(),availableAudioStreams:_(),currentPlaybackRate:T(),selectPlaybackRate:Ue,trafficSavingEnabled:R(),toggleTrafficSaving:ye,currentQuality:A()||Hb.INVARIANT,isAutoQualityEnabled:P()||!1,currentSubtitle:E(),isMobile:d(),onDownloadClick:qt,onCopyDataClick:Yt,onReportProblemClick:Pt,onSaveTraceDataClick:bi,toggleShowDebugInfo:Vi},additionalSettingsMenuItems:z()})}),at=m(()=>Bb({subMenuId:Ne.current,context:{availablePlaybackRates:w(),selectPlaybackRate:Ue,trafficSavingEnabled:R(),toggleTrafficSaving:ye,currentQuality:A()||Hb.INVARIANT,isAutoQualityEnabled:P()||!1,isAutoQualityAvailable:U()||!1,availableQualities:W(),highQualityEnabled:Y(),toggleHighQuality:qe,availableAudioStreams:_(),availableSubtitlesList:b(),closeSettingsMenu:Rt,currentAudioStream:I(),isMobile:d(),selectAudioLanguage:ht,selectQuality:Ie,selectSubtitle:st}}));var Ci=oT();let Zi;var bo=C(Ci);{var Ao=H=>{var ot=iT();let Ut;ot.__keydown=[eT,Rt];var pi=C(ot);{var dt=Gt=>{var Ct=tT();let so;var Lo=C(Ct),On=C(Lo,!0);S(Lo);var fn=k(Lo,2);fn.__click=Oe,S(Ct),O((Li,xi)=>{so=ie(Ct,1,"item header s-w",null,so,Li),he(On,xi)},[()=>({mobile:d()}),()=>ni("submenu_settings")]),$(Gt,Ct)};M(pi,Gt=>{d()&&Gt(dt)})}var ai=k(pi,2);let fi;yi(ai,21,()=>n(We),Gt=>Gt.id,(Gt,Ct)=>{var so=Ve(),Lo=le(so);{var On=Li=>{uv(Li,{get isMobile(){return d()},get id(){return n(Ct).id},get icon(){return n(Ct).icon},get iconProps(){return n(Ct).iconProps},get label(){return n(Ct).label},get ariaLabel(){return n(Ct).ariaLabel},get value(){return n(Ct).value},get valueComponent(){return n(Ct).valueComponent},onClick:()=>{be(n(Ct).children),D(G,n(Ct).id,!0)},get ref(){return oe[n(Ct).id]},set ref(xi){oe[n(Ct).id]=xi}})},fn=(Li,xi)=>{{var Xo=_i=>{let $o=m(()=>`${n(Ct).id}-menu-item`);pv(_i,{get isMobile(){return d()},get id(){return n($o)},get onClick(){return n(Ct).onClick},get icon(){return n(Ct).icon},get label(){return n(Ct).label},get ariaLabel(){return n(Ct).ariaLabel},closeSettings:Oe})},tr=(_i,$o)=>{{var mn=Mo=>{let vn=m(()=>`${n(Ct).id}-menu-item`);mv(Mo,{get isMobile(){return d()},get id(){return n(vn)},get onClick(){return n(Ct).onClick},get icon(){return n(Ct).icon},get label(){return n(Ct).label},get ariaLabel(){return n(Ct).ariaLabel},get enabled(){return n(Ct).enabled},get tooltipText(){return n(Ct).tooltipText},get maxTooltipWidth(){return n(Ct).maxTooltipWidth}})};M(_i,Mo=>{n(Ct).type==="SWITCH"&&Mo(mn)},$o)}};M(Li,_i=>{n(Ct).type==="CLICK"?_i(Xo):_i(tr,!1)},xi)}};M(Lo,Li=>{n(Ct).type==="OPEN_SUB_MENU"?Li(On):Li(fn,!1)})}$(Gt,so)}),S(ai),it(ai,Gt=>te(Gt),()=>te()),S(ot),O((Gt,Ct,so)=>{Ut=ie(ot,1,"settings-menu menu s-w",null,Ut,Gt),fi=ie(ai,1,"items",null,fi,Ct),Ke(ai,so)},[()=>({desktop:!d(),mobile:d(),hidden:!!Ne.current}),()=>({mobile:d()}),si]),ft("mouseenter",ot,Ai),ft("mouseleave",ot,ji),$(H,ot)};M(bo,H=>{s()&&H(Ao)})}var pn=k(bo,2);yi(pn,17,()=>n(at),H=>H.id,(H,ot)=>{let Ut=m(()=>{var pi;return(pi=n(ot).minWidth)!=null?pi:137});cv(H,{get isMobile(){return d()},get playerControlsHeight(){return J()},get returnFromSubMenu(){return Ne.popSubMenu},get id(){return n(ot).id},get title(){return n(ot).title},get closeSettingsMenu(){return Rt},openSubMenuList:be,get items(){return n(ot).items},get minWidth(){return n(Ut)},get refMenuItems(){return oe},get listRef(){return de[n(ot).id]},set listRef(pi){de[n(ot).id]=pi}})}),S(Ci),O(H=>Zi=ie(Ci,1,"settings-menu-container s-w",null,Zi,H),[()=>({mobile:d(),hidden:!s()})]),$(t,Ci),F(),o()}Ze(["keydown","click"]);var rT=L('<button class="btn s-1d"> </button>'),sT={hash:"s-1d",code:"button.btn.s-1d{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function Iv(t,e){Q(t,sT);var i=rT();i.__click=function(...s){var a;(a=e.onClick)==null||a.apply(this,s)};var o=C(i,!0);S(i),O(()=>he(o,e.label)),$(t,i)}Ze(["click"]);var aT=L('<div class="container s-t"><div class="notification s-t"><div><p class="description s-t"><!></p> <!></div> <!></div></div>'),lT={hash:"s-t",code:".container.s-t{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-t{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-t{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function wc(t,e){B(e,!0),Q(t,lT);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Lt(),{ui:{t:s}}=xe(),a=s(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=aT(),d=C(l),r=C(d),u=C(r),f=C(u);yc(f,{get message(){return a}}),S(u);var p=k(u,2);{var v=y=>{let _=m(()=>s("slow_video_notification_button"));Iv(y,{get label(){return n(_)},get onClick(){return e.onSelectAutoQuality}})};M(p,y=>{o||y(v)})}S(r);var b=k(r,2);Hs(b,{get onClick(){return e.onClose}}),S(d),S(l),Bs(3,d,()=>ba,()=>({duration:i})),$(t,l),F()}import{isIntersecting as Ub,Subscription as dT}from"@vkontakte/videoplayer-shared/es2015";var nl="annotation",rp=class{constructor(e){this.slots=new Map;this.disabledIds=new Set(e)}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var r;let{overlay:o,id:s,controlsBehaviour:a,hideAllControls:l}=i;if(this.disabledIds.has(s))return{success:!1,message:"current slotId is disabled via config"};let d=typeof e=="function"?e():e;return d.setAttribute("slot",nl),this.setupSlotStyles(d,o),this.shadowRootContainer.append(d),this.slots.set(s,{rootElement:d,options:i}),a&&this.runHidingControlsWhenIntersected(s,a),l&&((r=this.store)==null||r.ui.isControlsAvailable.set(!1)),{success:!0}}setupSlotStyles(e,i){switch(e.style.position="absolute",i){case"over_video":e.style.zIndex="calc(var(--video-container-z-index) + 1)";break;case"over_controls":e.style.zIndex="calc(var(--controls-container-z-index) + 1)";break;default:e.style.zIndex="0"}}runHidingControlsWhenIntersected(s,a){return bt(this,arguments,function*(e,{observedSlotElementId:i,controlsToObserve:o}){var v;let l=this.slots.get(e);if(!l)return;let d=yield this.findSlotElement(l.rootElement,i,e),{controls:r,hiddenControls:u}=((v=this.store)==null?void 0:v.ui)||{},f=new MutationObserver(b=>b.forEach(()=>{let y=Ws(d,this.shadowRootContainer);o.forEach(_=>{let w=r==null?void 0:r[_],I=w?_e(w):null,T=u==null?void 0:u[_];I&&(T==null||T.set(Ub(I,y)))})}));f.observe(d,{childList:!0,subtree:!0}),l.observer=f;let p=new dT;o.forEach(b=>{r&&p.add(r[b].subscribe(y=>{let _=u==null?void 0:u[b];y&&y.isDisplayed?_==null||_.set(Ub(y,Ws(d,this.shadowRootContainer))):_==null||_.set(!1)}))}),l.subs=p})}findSlotElement(e,i,o){return bt(this,null,function*(){return new Promise(s=>{let a=null,l=new MutationObserver(()=>{if(a=e.querySelector(`#${i}`),a){l.disconnect();let r=this.slots.get(o);r&&(r.observerForFindingSlotElement=void 0),s(a)}});l.observe(e,{childList:!0,subtree:!0});let d=this.slots.get(o);d&&(d.observerForFindingSlotElement=l)})})}remove(e){var u,f;let i=this.slots.get(e);if(!i)return;let{rootElement:o,observer:s,observerForFindingSlotElement:a,subs:l,options:{controlsBehaviour:d,hideAllControls:r}}=i;o&&o.remove(),[s,a].forEach(p=>p==null?void 0:p.disconnect()),l==null||l.unsubscribe(),this.slots.delete(e),r&&((u=this.store)==null||u.ui.isControlsAvailable.set(!0)),(f=d==null?void 0:d.controlsToObserve)==null||f.forEach(p=>{var v,b;(b=(v=this.store)==null?void 0:v.ui.hiddenControls[p])==null||b.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var cT=L('<div class="container s-6"><!></div>'),uT={hash:"s-6",code:".container.s-6{align-items:center;animation-fill-mode:forwards;animation-name:s-6-videoPlayerStatusIconPopup;background-color:#00000073;border-radius:100%;display:flex;height:64px;justify-content:center;width:64px;will-change:opacity,scale}@keyframes s-6-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 Sc(t,e){B(e,!0),Q(t,uT);let i=g(e,"reversed",3,!1);var o=Ve(),s=le(o);Ds(s,()=>e.Icon,a=>{var l=cT(),d=C(l);Hi(d,()=>e.Icon,(r,u)=>{u(r,{get size(){return"48"},get reversed(){return i()}})}),S(l),O(()=>Ke(l,`animation-duration: ${e.duration}ms`)),$(a,l)}),$(t,o),F()}import{PlaybackState as zb}from"@vkontakte/videoplayer-core/es2015";var pT=L('<div class="container s-y"><!></div>'),fT={hash:"s-y",code:".container.s-y{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function Ev(t,e){B(e,!0),Q(t,fT);let[i,o]=Be(),s=()=>x(r,"$playbackState$",i),a=()=>x(f,"$previewTrackActive",i),l=()=>x(p,"$previewTrackDragInProgress",i),d=()=>x(u,"$isPlaying$",i),{state:{playbackState$:r,isPlaying$:u},ui:{previewTrackActive:f,previewTrackDragInProgress:p}}=xe(),{features:{playbackStatusShow:v},playbackStatusAnimationDuration:b}=Lt(),y=0,_=K(null),w=K(!1);Fe(()=>{s()===zb.PLAYING?D(_,Rn,!0):s()===zb.PAUSED?D(_,qs,!0):D(_,null)}),Fe(()=>{if(!(!v||a()||l()))return y=window.setTimeout(()=>{y=0,D(_,null)},b),()=>{y&&(window.clearTimeout(y),y=0)}}),Fe(()=>{d()&&!n(w)&&(D(w,!0),D(_,null))});var I=Ve(),T=le(I);{var R=A=>{var P=pT(),E=C(P);Sc(E,{get duration(){return b},get Icon(){return n(_)}}),S(P),$(A,P)};M(T,A=>{n(_)&&v&&A(R)})}$(t,I),F(),o()}var mT=L('<div><div data-testid="video-container"></div></div>'),vT={hash:"s-b",code:".video-container.s-b,.video-wrapper.s-b{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-b{background:var(--black)}.video-container.s-b,.video-wrapper.s-b{z-index:var(--video-container-z-index)}.video-container.s-b{transition:var(--rotate-transition-duration) ease all}.video-container.fast-rotate.s-b{transition:none}.nocursor.s-b{cursor:none}"};function rl(t,e){B(e,!0),Q(t,vT);let[i,o]=Be(),s=()=>x(p,"$rotateAlpha",i),a=()=>x(v,"$playerSize",i),l=()=>x(f,"$playerPhase",i),d=()=>x(y,"$chromecastConnected$",i),r=()=>x(b,"$isPlaying$",i),u=g(e,"videoContainer",15),{playerPhase:f,ui:{rotateAlpha:p,playerSize:v},state:{isPlaying$:b,chromecastConnected$:y}}=xe(),{isSmoothVideoRotate:_}=Lt(),w=m(()=>u()&&s()%180?a().height/a().width:1);var I=mT();let T;I.__contextmenu=function(...P){var E;(E=e.onContextMenu)==null||E.apply(this,P)},I.__mousedown=function(...P){var E;(E=e.onMouseDown)==null||E.apply(this,P)},I.__mouseup=function(...P){var E;(E=e.onMouseUp)==null||E.apply(this,P)},I.__click=function(...P){var E;(E=e.onClick)==null||E.apply(this,P)},I.__dblclick=function(...P){var E;(E=e.onDblClick)==null||E.apply(this,P)};var R=C(I);let A;it(R,P=>u(P),()=>u()),S(I),O((P,E)=>{T=ie(I,1,"video-wrapper s-b",null,T,P),A=ie(R,1,"video-container s-b",null,A,E),Ke(R,`transform: rotate(${s()}deg) scale(${n(w)})`),De(R,"data-is-playing",r())},[()=>({hidden:l()!=="video"||d(),nocursor:e.hideCursor}),()=>({"fast-rotate":!_})]),$(t,I),F(),o()}Ze(["contextmenu","mousedown","mouseup","click","dblclick"]);var gT=L('<div><span class="text s-z"> </span> <!></div>'),hT={hash:"s-z",code:".root.s-z{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-z,.root.visible.s-z{transform:translateX(-50%)}.root.visible.s-z{opacity:1;visibility:visible}.text.s-z{font-size:13px;font-weight:600;line-height:16px}"};function Pv(t,e){B(e,!0),Q(t,hT);let{ui:{t:i}}=xe();var o=gT();let s;var a=C(o),l=C(a,!0);S(a);var d=k(a,2);gc(d,{get size(){return"16"},fill:"currentColor"}),S(o),O((r,u)=>{s=ie(o,1,"root s-z",null,s,r),he(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),$(t,o),F()}var _T=L('<div class="container s-11" role="button" data-testid="preview-track-overlay"><div class="icon s-11"><!></div></div>'),bT={hash:"s-11",code:".container.s-11{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-11,.icon.s-11{align-items:center;display:flex;justify-content:center}.icon.s-11{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-11:hover .icon:where(.s-11){transform:scale(1.15)}"};function kv(t,e){B(e,!1),Q(t,bT);let o=xe().actions.internal.closePreviewTrack,s=200,a=u=>{u.stopPropagation(),o()};Yo();var l=_T();l.__click=a;var d=C(l),r=C(d);return Rn(r,{get size(){return"32"}}),S(d),S(l),Bs(3,l,()=>ba,()=>({duration:s})),$(t,l),mf(e,"handleClick",a),F({handleClick:a})}Ze(["click"]);var $T=(t,e,i,o,s,a)=>{if(t.stopPropagation(),e()||o()){a();return}},yT=L("<div><!></div>"),xT=L('<div class="spherical-video-icon s-7"><!></div>'),wT=L("<div><!></div>"),ST=L('<div class="settings-menu s-7"><!></div>'),CT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),TT=L("<!> <!> <!>",1),IT=L('<div class="blocked s-7"></div>'),ET=L('<div class="player-wrapper s-7"><!> <div class="overlay-container"></div></div> <!>',1),PT={hash:"s-7",code:".blocked.s-7,.player-wrapper.s-7{height:100%;position:absolute;width:100%}.blocked.s-7{z-index:var(--overlay-container-z-index)}.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-menu.s-7{bottom:57px;left:0;position:absolute;right:18px;transition:opacity .2s;z-index:var(--settings-menu-z-index)}"};function Av(t,e){B(e,!0),Q(t,PT);let[i,o]=Be(),s=()=>x(Sr,"$notificationsToShow$",i),a=()=>x(di,"$playerPhase",i),l=()=>x(Ao,"$isLoaderVisible",i),d=()=>x(ji,"$adPlaybackState",i),r=()=>x(ai,"$crashed",i),u=()=>x(Xo,"$isInteractiveTime$",i),f=()=>x(ui,"$settingsMenuVisible",i),p=()=>x(tr,"$isInteractiveExpectation$",i),v=()=>x(Vi,"$isMinimalMode$",i),b=()=>x(hi,"$controlsVisible",i),y=()=>x($o,"$touched",i),_=()=>x(Ur,"$graphIsOpened$",i),w=()=>x(Xi,"$isFullscreen",i),I=()=>x(ir,"$autoplayNextEnabled$",i),T=()=>x(Ut,"$postrollPassed",i),R=()=>x(pn,"$isEnded$",i),A=()=>x(Ct,"$currentSubtitle$",i),P=()=>x(ar,"$cursorInside",i),E=()=>x(or,"$isControlsAvailable",i),z=()=>x(Fr,"$doubleForwardOn$",i),U=()=>x(rr,"$fakeIsPlaying$",i),W=()=>x(Cr,"$bottomNoSmooth",i),Y=()=>x(Is,"$interactiveTimeIndicator",i),te=()=>x(Lo,"$playerSize",i),J=()=>x(fn,"$is3DVideo",i),oe=()=>x(Nn,"$doubleForwardAvailable$",i),de=()=>x(Zi,"$contextMenuVisible$",i),ae=()=>x(Ai,"$playbackState$",i),pe=()=>x(mn,"$hotKeyMapData",i),ee=()=>x(at,"$scrubbingInProgress",i),$e=()=>x(Ci,"$volumeChangingInProgress",i),Ee=()=>x(H,"$chromecastConnected$",i),ce=()=>x($n,"$controlsTimeoutActive",i),Qe=()=>x(On,"$adsPlaybackState",i),fe=()=>x(We,"$settingsMenuOpenedByKeyboard",i),ve=()=>x(on,"$contextMenuOpenedByKeyboard$",i),X=()=>x(Es,"$contextMenuOpenedByHotKey$",i),N=()=>x(dr,"$contextMenuButtonRef$",i),me=()=>x(Ys,"$contextMenuLastActiveElem$",i),ue=()=>x(It,"$isFullscreenOpenedByKeyboard",i),Re=()=>x(vn,"$positionExact$",i),Je=()=>x(bi,"$language$",i),Ae=()=>x($a,"$previewTrackActive$",i),j=()=>x(Li,"$icon3DVideoVisible",i),ne=()=>x(ot,"$chromecastDeviceName$",i),Se=()=>x(so,"$currentSubtitleCaptions$",i),Le=()=>x(si,"$position$",i),ze=()=>x(ut,"$duration$",i),Ce=()=>x(pi,"$isLive$",i),we=()=>x(dt,"$isPlaying$",i),He=()=>x(xr,"$contextMenuPosition$",i),rt=()=>x(Mo,"$showHotKeyMap",i),ct=()=>x(bo,"$debugPanelVisible",i),Mt=()=>x(wr,"$userActionsDisabled$",i),lt=g(e,"videoContainer",15),ni=g(e,"adsSlotId",3,void 0),wt=g(e,"adsParams",3,void 0),Rt=g(e,"adsAutoplayParam",3,void 0),Dt=g(e,"duration",3,void 0),Qt=g(e,"logoTargetUrl",3,""),Te=g(e,"showNextPrevButtons",3,!1),G=g(e,"nextButtonActive",3,!1),Ne=g(e,"prevButtonActive",3,!1),be=g(e,"endScreenVideoTitle",3,void 0),Oe=g(e,"endScreenVideoThumb",3,void 0),Ie=g(e,"isOneVideoPlaylist",3,!1),ht=g(e,"shadowRootContainer",3,void 0),ye=g(e,"outerContainerRef",3,void 0),qe=g(e,"playerStarted",3,!1),Ue=g(e,"fullScreenTarget",3,void 0),st=g(e,"showMiniTimer",3,!1),qt=g(e,"showEndScreen",3,!0),Pt=g(e,"keyboardControls",15),Yt=e.store.getLogger().createComponentLog("Root component"),bi=e.store.interfaceLanguage$,Vi=e.store.ui.isMinimalMode$,Ai=e.store.state.playbackState$,ji=e.store.ads.playbackState,si=e.store.state.positionWithScrubbing$,ut=e.store.state.duration$,di=e.store.playerPhase,Xi=e.store.ui.isFullscreen,It=e.store.ui.isFullscreenOpenedByKeyboard,hi=e.store.ui.controlsVisible,ui=e.store.ui.settingsMenu.visible$,We=e.store.ui.settingsMenu.openedByBtnKeyboard$,at=e.store.ui.scrubbingInProgress,Ci=e.store.ui.volumeChangingInProgress,Zi=e.store.ui.contextMenu.visible$,bo=e.store.ui.debugPanelVisible,Ao=e.store.state.isLoaderVisible,pn=e.store.state.isEnded$,H=e.store.state.chromecastConnected$,ot=e.store.state.chromecastDeviceName$,Ut=e.store.ads.postrollPassed,pi=e.store.state.isLive$,dt=e.store.state.isPlaying$,ai=e.store.state.crashed$,fi=e.store.webApi.annotationsApi,Gt=e.store.webApi.pictureInPictureApi,Ct=e.store.state.currentSubtitle$,so=e.store.state.currentSubtitleCaptions$,Lo=e.store.ui.playerSize,On=e.store.ads.playbackState,fn=e.store.ui.is3DVideo,Li=e.store.ui.icon3DVideoVisible,xi=e.store.state.isInteractive,Xo=e.store.state.isInteractiveTime$,tr=e.store.state.isInteractiveExpectation$,_i=e.store.state.hasInteractiveBranches,$o=e.store.ui.touched,mn=e.store.ui.modals.hotKeyMap.data,Mo=e.store.ui.modals.hotKeyMap.show,vn=e.store.state.positionExact$,Ts=e.store.ui.overlayContainer$,Is=e.store.ui.controls.interactiveTimeIndicator,rs=e.store.state.showInteractiveTimeIndicator,xr=e.store.ui.contextMenu.position$,gn=e.store.actions.internal.setQuality,hn=e.store.actions.internal.closeSettingsMenu,ir=e.store.ui.autoplayNextEnabled$,wr=e.store.ui.userActionsDisabled,or=e.store.ui.isControlsAvailable,Br=e.store.ui.videoTitleInfo,Fr=e.store.ui.doubleForwardOn$,Nn=e.store.ui.doubleForwardAvailable$,nr=e.store.actions.internal.getVideoElement,Bn=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:rr,notifications$:Hr,graphIsOpened$:Ur}=_o(),Ti=K(void 0),ss=K(void 0),Zo=K(void 0),mt=K(void 0),jt,sr,Fn;mn.set(P_());let{closeNotification:zr,notificationsToShow$:Sr}=Hr,Wr=m(()=>!!s().slow_video),_n=()=>zr("slow_video"),Jo=m(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!r()),bn=K(void 0),Cr=se(!1),Tr,$n=se(!1),yn=se(),ar=se(!1),Mi=K(!1),yo=K(!1),Vo=K(!1),ao=K(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),xn=m(()=>u()&&!f()&&!(n(Mi)||n(yo))&&!(n(Vo)&&!p())),wn=!0,Kr=m(()=>e.uiConfig.features.thumbTimer&&!v()&&st()&&a()==="video"&&!b()&&!r()&&!xi&&(e.uiConfig.hideThumbTimerAfterTouch&&!y()||!e.uiConfig.hideThumbTimerAfterTouch)),St=e.uiConfig.titleShowBehaviour,mi=m(()=>!["video","thumb"].includes(a())||St==="never"||_()?!1:St==="fullscreen"?w():!0),Wt=m(()=>St==="always"||a()==="thumb"?!1:!b()),Ro=K(!1),xo=m(()=>(qt()||e.showAutoplayNext&&I())&&!!be()&&!!Oe()&&(e.showAds&&T()||!e.showAds)&&R()&&!r()&&!n(Ro)&&!_i),Sn=m(()=>!v()&&A().value!=="off"&&a()==="video"),wo=m(()=>P()&&!(b()||n(xo))&&!u()&&E()&&!z()),Cn=K(!1),zi=m(()=>U()!==null),{toggle:Ir}=rr,Do=!1,Hn=null;Gt==null||Gt.setContext(ld());let as=()=>{e.autoplay&&!xi&&e.uiConfig.controls.showOnStartupAtAutoplay&&Ji(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:as});let ls=()=>{window.clearTimeout(jt),$n.set(!1)},ds=()=>{window.clearTimeout(sr),yn.set(null)},Ji=ge=>{ls(),$n.set(!0),jt=window.setTimeout(()=>$n.set(!1),ge);let Tt=ge-100;Tr=window.setTimeout(()=>{W()&&Cr.set(!1)},Tt>0?Tt:ge)},cs=(ge,Tt)=>{ds(),yn.set(Tt),sr=window.setTimeout(()=>yn.set(null),ge)},Qr=fn.subscribe(ge=>{Li.set(ge),ge&&(window.clearTimeout(Fn),Fn=window.setTimeout(()=>Li.set(!1),e.uiConfig.controls.hide360IconTimeout))}),vo=()=>bt(null,null,function*(){var Tt,$i,Di,Ho;let ge=ca();if(ge){let Co=Dd(),eo=_t();ge=Co===eo||Co===ht()}if(ge){Ji(e.uiConfig.controls.hideTimeoutFullscreen);try{yield Gt==null?void 0:Gt.exit()}catch(Co){Yt({message:String(Co)})}}Xi.set(ge),e.store.getAdmanWrapper().setFullscreen(ge),w()?($i=(Tt=e.store.callbacks)==null?void 0:Tt.onFullscreenEnter)==null||$i.call(Tt):(Ho=(Di=e.store.callbacks)==null?void 0:Di.onFullscreenExit)==null||Ho.call(Di)}),Er=ge=>{Lo.set(ge)},et=()=>{if(n(Ti)){let{width:ge,height:Tt}=n(Ti).getBoundingClientRect();Lo.set({width:ge,height:Tt})}};At(()=>{var Tt;return Pu(vo),e.uiConfig.features.annotationsInside&&(fi==null||fi.init(n(Ti))),Gt==null||Gt.assignPlayerContainer(n(Ti)),e.uiConfig.disablePiPResizeHandling||Gt==null||Gt.setExternalEventHandlers({resize:Er,leavepictureinpicture:et}),e.interactiveContainer&&((Tt=lt().parentElement)==null||Tt.insertBefore(e.interactiveContainer,lt().nextSibling)),()=>{window.clearTimeout(jt),window.clearTimeout(Tr),window.clearTimeout(sr),window.clearTimeout(Fn),Qr(),Gt==null||Gt.dispose().catch($i=>{Yt({message:String($i)})}),ku(vo)}});let _t=()=>{let ge=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!ye()?n(Ti):ye(),Tt=ge.getRootNode(),$i=Tt instanceof ShadowRoot?Tt.host:Tt,Di=Ue()instanceof HTMLElement&&Ue().contains($i);return e.uiConfig.allowChangingFullscreenTarget&&Ue()&&Di?Ue():ge},Zt=()=>{Zi.set(!1)},Ri=()=>{hn(),Zt()},lo=()=>bt(null,null,function*(){if(!Bn()){Yt({message:"fullscreen disabled"});return}Zt(),ca()?(yield Eu(document),Yt({message:"exit fullscreen"})):(Yt({message:"request fullscreen"}),yield Iu(_t()))}),Ni=ge=>{_()||(ge.preventDefault(),Zi.set(!0),xr.set({left:ge.clientX,top:ge.clientY}))};function go(){ar.set(!0),xi||Ji(e.uiConfig.controls.hideTimeoutCursor)}function Oo(ge){var Co,eo;let{relatedTarget:Tt}=ge,Di=!!(Tt&&((Co=n(Zo))!=null&&Co.contains(Tt)))&&((eo=Pt())==null?void 0:eo.isFocused()),Ho=e.uiConfig.controls.showOnStartupAtAutoplay||!!Tt;!xi&&!Di&&Ho&&(Cr.set(!0),Ji(e.uiConfig.controls.hideTimeoutCursor))}function Tn(){ar.set(!1),D(yo,!1),D(Mi,!1),Do=!1,e.store.actions.internal.releaseCamera(),Ji(e.uiConfig.controls.hideTimeout),z()&&zn()}function Un(ge){return ge?ge.offsetTop+Un(ge.offsetParent):0}function ho(ge){return ge?ge.offsetLeft+ho(ge.offsetParent):0}function en(ge){if(Y()&&rs){let Tt=ge.currentTarget,$i=Un(Tt),Di=ho(Tt),Ho=ge.pageX-Di,Co=ge.pageY-$i,{left:eo,bottom:rn,right:Ps}=Y(),ks=Ps-eo;return Ho>=eo-ks&&Co<=rn+ks}}function Pr(ge){if(n(Ti)){let Tt=Un(ge.currentTarget),$i=te().height,Di=ge.pageY-Tt;if(en(ge)){D(yo,!1);return}Di<40?D(yo,!0):Di>$i-40?D(Mi,!0):(D(yo,!1),f()||D(Mi,!1))}}function kr(ge){Pr(ge),!n(xn)&&!z()&&Ji(e.uiConfig.controls.hideTimeoutCursor),J()&&Do&&Hn&&e.store.actions.internal.moveCameraFocusPX(Hn.clientX-ge.clientX,Hn.clientY-ge.clientY,ge.timeStamp-Hn.timeStamp),Hn=ge}let So=null,lr=()=>{So=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),ls()},e.uiConfig.doubleForwardActivationTime)},zn=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),So&&clearTimeout(So),So=null},us=ge=>{ge.preventDefault(),ge.button===0&&(Do=!0,e.store.actions.internal.holdCamera(),oe()&&lr()),!Do&&Ji(e.uiConfig.controls.hideTimeoutCursor)},tt=ge=>{ge.preventDefault(),ge.button===0&&(Hn=ge,Do=!1,e.store.actions.internal.releaseCamera()),!z()&&Ji(e.uiConfig.controls.hideTimeoutCursor)},Nt=ge=>{ge.preventDefault(),wn&&(Yt({message:"double click on video"}),lo(),Ji(e.uiConfig.controls.hideTimeoutCursor))},Ii=ge=>{var Tt;if(ge.preventDefault(),z()){zn();return}if(So&&zn(),de()||f()){Ri();return}if(!(R()&&!_i)){if(n(zi))return Ir();if((Tt=Pt())==null||Tt.focus(),!qe()){e.firstStart(),Ji(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||ae()!==Kb.PLAYING)&&e.store.actions.internal.togglePlay(),Ji(e.uiConfig.controls.hideTimeoutCursor)}},tn=ge=>{Ri(),$o.set(!0),Ji(e.uiConfig.controls.hideTimeout),ge&&cs(e.uiConfig.controls.hideHotKeyHelpers,ge)},No=()=>{var ge,Tt;v()||(Ri(),(ge=e.store.callbacks)!=null&&ge.onOpenHotKeyMap?(Tt=e.store.callbacks)==null||Tt.onOpenHotKeyMap(pe()):Mo.update($i=>!$i))},qr=()=>{$o.set(!0)},on=e.store.ui.contextMenu.openedByBtnKeyboard$,dr=e.store.ui.contextMenu.btnRef$,Gr=K(void 0),Es=e.store.ui.contextMenu.openedByHotKey$,Ys=e.store.ui.contextMenu.lastActiveElem$,Wn=K(!1),$a=e.store.ui.previewTrackActive;Fe(()=>{Ts.set(n(bn))}),Fe(()=>{D(Vo,n(ao)&&ae()!==Kb.PLAYING,!0),n(ao)||Et(()=>D(ao,!0))}),Fe(()=>{var Tt,$i;let ge=(n(Vo)||R()||f()||ee()||$e()||Ee()||ce()||n(Wn))&&!n(xn)&&(a()==="video"||a()==="ads"&&(e.uiConfig.controls.showOnStartupAtAutoplay||Qe()!=="inactive"))&&!r()&&E();hi.set(ge),!ge&&!ce()&&((Tt=n(Zo))!=null&&Tt.contains(Ou()))&&(($i=Pt())==null||$i.focus())}),Fe(()=>{!ee()&&n(Cn)&&!u()&&Ji(e.uiConfig.controls.hideTimeoutCursor),Et(()=>D(Cn,ee(),!0))}),Fe(()=>{n(mt),f(),fe(),Et(()=>Ud(n(mt),f(),fe()))}),Fe(()=>{n(Gr),de(),ve(),X(),Et(()=>{let ge=ve()||X();Ud(n(Gr),de(),ge)})}),Fe(()=>{let ge=N();ge&&(de(),Et(()=>Dl(ge,de(),on)))}),Fe(()=>{let ge=me();ge&&(de(),Et(()=>D_(ge,de(),Es)))}),Fe(()=>{var ge;!ue()&&w()&&(Et(()=>It.set(!1)),(ge=Pt())==null||ge.focus())}),Fe(()=>{_()&&Ri()});let pt=K(void 0),li=ge=>{Br.set(Jn(nr(),{title:n(pt)},"title",ge))},Bo=(ge,Tt)=>{var Co,eo;let $i=(eo=(Co=e.store.callbacks)==null?void 0:Co.uiInfo)==null?void 0:eo.onUpcomingLiveViewStateChanged;if(!$i)return;let Di=!!Tt,Ho=Ye(Ye({},Jn(n(Ti),{upcomingLiveScreen:Tt},"upcomingLiveScreen",Di)),ge);$i(Ho)},cr="",Ar=m(()=>{var ge;return n(Wt)?cr:(ge=e.getVideoDeeplink)==null?void 0:ge.call(e,Re())});Fe(()=>{cr=n(Ar)});var Fo=ET();ft("blur",La,Ri);var Ei=le(Fo);Ei.__mousemove=kr;var ps=C(Ei);let co=m(()=>a()==="ads"),Wi=m(()=>n(zi)?Ir:void 0);it(Gf(ps,{startDoubleForwardActivationTimer:lr,stopDoubleForward:zn,toggleFullscreen:lo,hideContextMenu:Ri,showHotKeyHelpers:tn,showKeyMap:No,get isAds(){return n(co)},get fakePlayButtonHandler(){return n(Wi)},get nextButtonActive(){return G()},get prevButtonActive(){return Ne()},children:(ge,Tt)=>{var $i=TT(),Di=le($i);rl(Di,{get hideCursor(){return n(wo)},onClick:Ii,onContextMenu:Ni,onMouseDown:us,onMouseUp:tt,onDblClick:Nt,get videoContainer(){return lt()},set videoContainer(eo){lt(eo)}});var Ho=k(Di,2);Na(Ho,()=>"slot",!1,(eo,rn)=>{oo(eo,()=>({name:nl}))});var Co=k(Ho,2);Ds(Co,Je,eo=>{var rn=CT(),Ps=le(rn);let ks=m(()=>a()!=="thumb"||r()||xi&&e.autoplay);tl(Ps,{get hidden(){return n(ks)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:Ni,onClick:Zt});var js=k(Ps,2);{var fs=Ge=>{kv(Ge,{})};M(js,Ge=>{Ae()&&Ge(fs)})}var ms=k(js,2);Ev(ms,{});var ur=k(ms,2);Pv(ur,{get isVisible(){return z()}});var ya=k(ur,2);{var Xl=Ge=>{let gi=m(()=>{var Uo;return(Uo=e.live)==null?void 0:Uo.startTime});bc(Ge,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(gi)},onUpcomingLiveViewStateChanged:Bo,onContextMenu:Ni,onClick:Zt})};M(ya,Ge=>{a()==="LiveWaitingStart"&&Ge(Xl)})}var Lr=k(ya,2);{var Zl=Ge=>{il(Ge,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:Ni,onClick:Zt})};M(Lr,Ge=>{a()==="LiveWaitingRecover"&&Ge(Zl)})}var xa=k(Lr,2);{var Jl=Ge=>{il(Ge,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:Ni,onClick:Zt})};M(xa,Ge=>{a()==="LiveWaitingRecord"&&Ge(Jl)})}var al=k(xa,2);{var ll=Ge=>{var gi=yT();let Uo;var In=C(gi);Od(In,{get adsSlotId(){return ni()},get adsParams(){return wt()},get adsAutoplayParam(){return Rt()},get duration(){return Dt()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson}}),S(gi),O(En=>Uo=ie(gi,1,"ads-container s-7",null,Uo,En),[()=>({hidden:a()!=="ads"})]),$(Ge,gi)};M(al,Ge=>{e.showAds&&qe()&&Ge(ll)})}var wa=k(al,2);{var vt=Ge=>{let gi=m(()=>!qt()&&e.showAutoplayNext&&I());Kf(Ge,{get title(){return be()},get thumb(){return Oe()},get isHide(){return n(gi)},clickCloseIcon:()=>D(Ro,!0)})};M(wa,Ge=>{n(xo)&&be()&&Oe()&&Ge(vt)})}var gt=k(wa,2);{var wi=Ge=>{let gi=m(()=>w()?"md":"sm"),Uo=m(()=>{var In;return(In=e.store.callbacks)==null?void 0:In.onTitleClicked});nv(Ge,{get title(){return e.title},get isHidden(){return n(Wt)},onVisibilityChanged:li,get titleLinkHref(){return n(Ar)},onMouseEnter:()=>{D(Wn,!0)},onMouseLeave:()=>{D(Wn,!1)},get size(){return n(gi)},get onTitleClicked(){return n(Uo)},get ref(){return n(pt)},set ref(In){D(pt,In,!0)}})};M(gt,Ge=>{n(mi)&&Ge(wi)})}var To=k(gt,2);{var to=Ge=>{let gi=m(()=>a()==="video"&&b());hc(Ge,{get isShifted(){return n(gi)}})};M(To,Ge=>{J()&&Ge(to)})}var vi=k(To,2);{var Ki=Ge=>{var gi=xT(),Uo=C(gi);Rd(Uo,{}),S(gi),$(Ge,gi)};M(vi,Ge=>{j()&&Ge(Ki)})}var Xs=k(vi,2);{var ed=Ge=>{_c(Ge,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return ne()},onClick:Ii,onContextMenu:Ni,onDblClick:Nt})};M(Xs,Ge=>{Ee()&&Ge(ed)})}var Rc=k(Xs,2);{var gp=Ge=>{Ja(Ge,{get shifted(){return b()},get captions(){return Se()},get position(){return Le()},get playerSize(){return te()}})};M(Rc,Ge=>{n(Sn)&&Ge(gp)})}var Dc=k(Rc,2);{var hp=Ge=>{var gi=wT();gi.__contextmenu=Ni,gi.__click=[$T,de,Zi,f,ui,Ri];var Uo=C(gi);el(Uo,{}),S(gi),$(Ge,gi)};M(Dc,Ge=>{r()&&Ge(hp)})}var Oc=k(Dc,2);{var _p=Ge=>{let gi=m(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),Uo=m(()=>a()==="ads"),In=m(()=>e.canRewindLive&&ze()!==0);vc(Ge,{get bottomHidden(){return n(gi)},get bottomNoSmooth(){return W()},get showControls(){return b()},get isAds(){return n(Uo)},get canRewindLive(){return n(In)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Qt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Te()},get nextButtonActive(){return G()},get prevButtonActive(){return Ne()},get isOneVideoPlaylist(){return Ie()},customFullscreenSupported:wn,toggleFullscreen:lo,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(ss)},set playerControlsWrapperRef(En){D(ss,En,!0)},get playerControlsRef(){return n(Zo)},set playerControlsRef(En){D(Zo,En,!0)}})};M(Oc,Ge=>{qe()&&Ge(_p)})}var Nc=k(Oc,2);{var bp=Ge=>{var gi=ST(),Uo=C(gi);let In=m(()=>{var En;return(En=n(Zo))==null?void 0:En.clientHeight});xc(Uo,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(In)},returnFocus:()=>{var En;return(En=Pt())==null?void 0:En.focus()},get ref(){return n(mt)},set ref(En){D(mt,En,!0)}}),S(gi),$(Ge,gi)};M(Nc,Ge=>{!Ee()&&a()!=="ads"&&Ge(bp)})}var Bc=k(Nc,2);let dl=m(()=>!n(Kr));Fd(Bc,{get isLive(){return Ce()},get isHidden(){return n(dl)},get isPlaying(){return we()},get position(){return Le()},get duration(){return ze()}});var Fc=k(Bc,2);iv(Fc,{get data(){return yn}});var Zs=k(Fc,2);Wf(Zs,{get supportLink(){return e.supportLink},returnFocus:()=>{var Ge;return(Ge=Pt())==null?void 0:Ge.focus()},get visible(){return de()},get playerContainerRef(){return n(Ti)},get position(){return He()},get menuElementRef(){return n(Gr)},set menuElementRef(Ge){D(Gr,Ge,!0)}});var Sa=k(Zs,2);{var $p=Ge=>{wc(Ge,{onClose:_n,onSelectAutoQuality:()=>{gn("auto"),_n()}})};M(Sa,Ge=>{n(Wr)&&Ge($p)})}var td=k(Sa,2);{var id=Ge=>{Wa(Ge,{})};M(td,Ge=>{n(Jo)&&Ge(id)})}var od=k(td,2);{var yp=Ge=>{Xf(Ge,{})};M(od,Ge=>{rt()&&Ge(yp)})}var Hc=k(od,2);{var xp=Ge=>{Kd(Ge,{})};M(Hc,Ge=>{ct()&&Ge(xp)})}$(eo,rn)}),$(ge,$i)},$$slots:{default:!0}}),ge=>Pt(ge),()=>Pt());var nn=k(ps,2);it(nn,ge=>D(bn,ge),()=>n(bn)),S(Ei),it(Ei,ge=>D(Ti,ge),()=>n(Ti));var Kn=k(Ei,2);{var Yr=ge=>{var Tt=IT();$(ge,Tt)};M(Kn,ge=>{Mt()&&ge(Yr)})}ft("mouseenter",Ei,go),ft("mouseleave",Ei,Tn),ft("click",Ei,qr,!0),ft("focusin",Ei,Oo,!0),$(t,Fo),F(),o()}Ze(["mousemove","contextmenu","click"]);import{clientChecker as Cc,PlaybackState as BT}from"@vkontakte/videoplayer-core/es2015";import{noop as FT}from"@vkontakte/videoplayer-shared/es2015";var kT=L('<div></div> <div class="info s-13"><div class="triangles-wrapper s-13"><div></div> <div></div> <div></div></div> <p class="step-caption s-13"> </p></div>',1),AT=L("<div><!></div>"),LT={hash:"s-13",code:".double-click-area.s-13{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-13{left:0}.double-click-area.right.s-13{right:0}.semicircle.s-13{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-13{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-13{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-13{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-13,.triangles-wrapper.s-13{display:flex;justify-content:center}.triangles-wrapper.s-13{margin-bottom:10px;position:relative}.triangle.s-13{animation:s-13-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-13:nth-child(3),.triangle.right.s-13:first-child{animation-delay:0s}.triangle.left.s-13:nth-child(2),.triangle.right.s-13:nth-child(2){animation-delay:.1s}.triangle.left.s-13:first-child,.triangle.right.s-13:nth-child(3){animation-delay:.2s}@keyframes s-13-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-13{border-right:8px solid var(--white)}.triangle.right.s-13{border-left:8px solid var(--white)}.triangle.s-13:not(:last-child){margin-right:5px}.step-caption.s-13{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function sp(t,e){B(e,!0),Q(t,LT);let i=g(e,"seekStep",3,0),o=K(!1),s=0,a=0,l=K(ri(i())),d=p=>{p.stopPropagation(),a+=1,D(l,i()*(a-1)),a===1?e.handleSingleFirstClick(p):(D(o,!0),e.handleSecondClick()),window.clearTimeout(s),s=window.setTimeout(()=>{a=0,D(o,!1)},300)};ln(()=>{window.clearTimeout(s)});var r=AT();r.__click=d;var u=C(r);{var f=p=>{var v=kT(),b=le(v),y=k(b,2),_=C(y),w=C(_),I=k(w,2),T=k(I,2);S(_);var R=k(_,2),A=C(R,!0);S(R),S(y),O(P=>{var E,z,U,W;ie(b,1,`semicircle ${(E=e.side)!=null?E:""}`,"s-13"),ie(w,1,`triangle ${(z=e.side)!=null?z:""}`,"s-13"),ie(I,1,`triangle ${(U=e.side)!=null?U:""}`,"s-13"),ie(T,1,`triangle ${(W=e.side)!=null?W:""}`,"s-13"),he(A,P)},[()=>q("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),$(p,v)};M(u,p=>{n(o)&&p(f)})}S(r),O(()=>{var p;return ie(r,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-13")}),$(t,r),F()}Ze(["click"]);var MT=(t,e,i)=>{e(!1),i()},VT=L('<div class="overlay s-14"></div> <div class="next-video s-14"><div class="top s-14"><div class="caption s-14"> </div> <!></div> <div class="row s-14"><div class="column s-14"><div class="thumb s-14"><div></div> <!></div></div> <div class="column s-14"><div class="title s-14"> </div></div></div></div>',1),RT={hash:"s-14",code:".overlay.s-14{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-14{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-14{display:flex;justify-content:space-between}.caption.s-14{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-14{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-14{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-14{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-14,.thumb-overlay.s-14{height:100%;width:100%}.thumb-overlay.s-14{position:absolute}.thumb-overlay.withOpacity.s-14{background:var(--black);opacity:.3}.title.s-14{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Lv(t,e){B(e,!0),Q(t,RT);let[i,o]=Be(),s=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(r,"$timerNextVideoRunning$",i),l=xe(),d=l.ui.autoplayNextEnabled$,r=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,f=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,b=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),v()},_=()=>{e.clickCloseIcon(),b()};At(()=>{e.isHide||f(),e.isHide&&s()&&(u(!1),v())});var w=Ve(),I=le(w);{var T=R=>{var A=VT(),P=k(le(A),2),E=C(P),z=C(E),U=C(z,!0);S(z);var W=k(z,2);Hs(W,{onClick:_}),S(E);var Y=k(E,2);Y.__click=[MT,u,p];var te=C(Y),J=C(te),oe=C(J);let de;var ae=k(oe,2);{var pe=ce=>{Qd(ce,{get isRunning(){return a()},onTimerEnded:y})};M(ae,ce=>{s()&&ce(pe)})}S(J),S(te);var ee=k(te,2),$e=C(ee),Ee=C($e,!0);S($e),S(ee),S(Y),S(P),O((ce,Qe)=>{he(U,ce),Ke(J,`background-image: url('${e.thumb}')`),de=ie(oe,1,"thumb-overlay s-14",null,de,Qe),he(Ee,e.title)},[()=>s()?q("end_screen_next_video"):q("end_screen_recommended_video"),()=>({withOpacity:s()})]),$(R,A)};M(I,R=>{e.isHide||R(T)})}$(t,w),F(),o()}Ze(["click"]);import{clientChecker as DT}from"@vkontakte/videoplayer-core/es2015";var Qb=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;At(()=>{DT.device.isIOS&&(o=setTimeout(()=>{let a=t().querySelector("video");if(!a)return;let l=()=>e(!0),d=()=>e(!1);a.addEventListener("webkitbeginfullscreen",l),a.addEventListener("webkitendfullscreen",d),i=()=>{a.removeEventListener("webkitbeginfullscreen",l),a.removeEventListener("webkitendfullscreen",d)}},0))}),ln(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as OT}from"@vkontakte/videoplayer-core/es2015";var ap=class{constructor(e){this.video=e}getTracksArray(){return Array.from(this.video.getElementsByTagName("track"))}attach(e,i=!1){let o=document.createElement("track");o.setAttribute("src",e.url),o.setAttribute("id",e.id),e.label&&o.setAttribute("label",e.label),e.language&&o.setAttribute("srclang",e.language),i&&(o.track.mode="showing"),this.video.appendChild(o)}detachAll(){for(let e of this.getTracksArray())this.video.removeChild(e)}updateSrc(e){let i=this.getTracksArray().find(o=>o.id===e.id);i&&(i.src=e.url)}getCurrentShowingId(){var e,i;return(i=(e=this.getTracksArray().find(o=>o.track.mode==="showing"))==null?void 0:e.id)!=null?i:null}};import{clientChecker as NT}from"@vkontakte/videoplayer-core/es2015";var qb=({store:t,getFullscreenTarget:e})=>{let{isFullscreen:i}=t.ui,{setSubtitle:o}=t.actions.internal,{currentSubtitle$:s,availableSubtitlesList$:a,currentFormat$:l,availableTextTracks$:d}=t.state,r=null,u=()=>e().querySelector("video"),f=()=>NT.device.isIOS&&_e(l)===OT.DASH_LIVE_CMAF,p=()=>{r==null||r(),r=null},v=b=>{if(p(),!f()||!b)return;let y=u();if(!y)return;let _=new ap(y),w=_e(d),I=_e(a),T=_e(s);for(let P of w)I.some(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(_e(a).find(E=>E.value===P))};y.textTracks.addEventListener("change",A),r=()=>{R(),_.detachAll(),y.textTracks.removeEventListener("change",A)}};At(()=>i.subscribe(v)),ln(p)};var HT=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},UT=L("<!> <!>",1),zT=L("<div><!></div>"),WT=L('<div class="spherical-video-icon s-9"><!></div>'),KT=L("<div><!></div>"),QT=L('<div class="settings-mobile s-9"><!></div>'),qT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),GT=L('<div class="player-wrapper s-9" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),YT={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 Mv(t,e){var wn,Kr;B(e,!0),Q(t,YT);let[i,o]=Be(),s=()=>x(Oe,"$playerPhase",i),a=()=>x(bi,"$isLoaderVisible",i),l=()=>x(G,"$adPlaybackState",i),d=()=>x(hi,"$crashed",i),r=()=>x(Is,"$notificationsToShow$",i),u=()=>x(Te,"$playbackState$",i),f=()=>x(Rt,"$graphIsOpened$",i),p=()=>x(qe,"$interactiveHideMobileControls",i),v=()=>x(Vi,"$isEnded$",i),b=()=>x(pi,"$isInteractiveExpectation$",i),y=()=>x(ht,"$controlsVisible",i),_=()=>x(fi,"$touched",i),w=()=>x(Ct,"$autoplayNextEnabled$",i),I=()=>x(si,"$postrollPassed",i),T=()=>x(gn,"$bottomNoSmooth",i),R=()=>x(at,"$videoSize",i),A=()=>x(Ao,"$playerSize",i),P=()=>x(Ie,"$isFullscreen",i),E=()=>x(Ne,"$position$",i),z=()=>x(be,"$duration$",i),U=()=>x(so,"$loadedMetadata",i),W=()=>x(Ue,"$settingsMenuVisible",i),Y=()=>x(qt,"$scrubbingInProgress",i),te=()=>x(Pt,"$volumeChangingInProgress",i),J=()=>x(Ai,"$chromecastConnected$",i),oe=()=>x(ye,"$isControlsAvailable",i),de=()=>x(Ut,"$isInteractiveTime$",i),ae=()=>x(Xi,"$isActiveLive",i),pe=()=>x(st,"$settingsMenuOpenedByKeyboard",i),ee=()=>x(Qt,"$language$",i),$e=()=>x(ai,"$disabledControls$",i),Ee=()=>x(pn,"$is3DVideo",i),ce=()=>x(H,"$icon3DVideoVisible",i),Qe=()=>x(ji,"$chromecastDeviceName$",i),fe=()=>x(Ci,"$currentSubtitle$",i),ve=()=>x(Zi,"$currentSubtitleCaptions$",i),X=()=>x(bo,"$realDuration$",i),N=()=>x(ut,"$isLive$",i),me=()=>x(di,"$isPlaying$",i),ue=()=>x(Yt,"$debugPanelVisible",i),Re=g(e,"videoContainer",15),Je=g(e,"adsSlotId",3,void 0),Ae=g(e,"adsParams",3,void 0),j=g(e,"adsAutoplayParam",3,void 0),ne=g(e,"duration",3,void 0),Se=g(e,"logoTargetUrl",3,""),Le=g(e,"showNextPrevButtons",3,!1),ze=g(e,"nextButtonActive",3,!1),Ce=g(e,"prevButtonActive",3,!1),we=g(e,"endScreenVideoTitle",3,void 0),He=g(e,"endScreenVideoThumb",3,void 0),rt=g(e,"isOneVideoPlaylist",3,!1),ct=g(e,"showMiniTimer",3,!1),Mt=g(e,"fullScreenTarget",3,void 0),lt=g(e,"playerStarted",3,!1),ni=g(e,"showEndScreen",3,!0),{notifications$:wt,graphIsOpened$:Rt}=_o(),Dt=e.store.getLogger().createComponentLog("Root component"),Qt=e.store.interfaceLanguage$,Te=e.store.state.playbackState$,G=e.store.ads.playbackState,Ne=e.store.state.positionWithScrubbing$,be=e.store.state.duration$,Oe=e.store.playerPhase,Ie=e.store.ui.isFullscreen,ht=e.store.ui.controlsVisible,ye=e.store.ui.isControlsAvailable,qe=e.store.ui.interactiveHideMobileControls,Ue=e.store.ui.settingsMenu.visible$,st=e.store.ui.settingsMenu.openedByBtnKeyboard$,qt=e.store.ui.scrubbingInProgress,Pt=e.store.ui.volumeChangingInProgress,Yt=e.store.ui.debugPanelVisible,bi=e.store.state.isLoaderVisible,Vi=e.store.state.isEnded$,Ai=e.store.state.chromecastConnected$,ji=e.store.state.chromecastDeviceName$,si=e.store.ads.postrollPassed,ut=e.store.state.isLive$,di=e.store.state.isPlaying$,Xi=e.store.state.isActiveLive$,It=e.store.state.isRewindableLive$,hi=e.store.state.crashed$,ui=e.store.webApi.annotationsApi,We=e.store.webApi.pictureInPictureApi,at=e.store.state.videoSize$,Ci=e.store.state.currentSubtitle$,Zi=e.store.state.currentSubtitleCaptions$,bo=e.store.state.duration$,Ao=e.store.ui.playerSize,pn=e.store.ui.is3DVideo,H=e.store.ui.icon3DVideoVisible,ot=e.store.state.isInteractive,Ut=e.store.state.isInteractiveTime$,pi=e.store.state.isInteractiveExpectation$,dt=e.store.state.hasInteractiveBranches,ai=e.store.ui.controls.disabledControls$,fi=e.store.ui.touched,Gt=e.store.ui.overlayContainer$,Ct=e.store.ui.autoplayNextEnabled$,so=e.store.state.loadedMetadata$,Lo=e.store.actions.internal.closeSettingsMenu,On=(wn=e.store.callbacks)==null?void 0:wn.onDisabledPlayPrevChapterClick,fn=(Kr=e.store.callbacks)==null?void 0:Kr.onDisabledSeekToInteractiveClick,Li=e.store.actions.internal.setQuality,xi=K(void 0),Xo=K(void 0),tr=K(void 0),_i=K(void 0),$o,mn,Mo=m(()=>(s()==="video"&&a()||s()==="ads"&&l()==="inactive")&&!d()),vn=K(void 0),{closeNotification:Ts,notificationsToShow$:Is}=wt,rs=m(()=>!!r().slow_video),xr=()=>Ts("slow_video"),gn=se(!1),hn,ir=K(!1),wr=m(()=>u()!==BT.PLAYING),or=K(!1),Br=m(()=>f()||p()||!n(ir)&&(v()&&!!dt||n(wr)&&b())),Fr=K(!0),Nn=m(()=>e.uiConfig.features.thumbTimer&&ct()&&s()==="video"&&!y()&&!d()&&!ot&&(e.uiConfig.hideThumbTimerAfterTouch&&!_()||!e.uiConfig.hideThumbTimerAfterTouch)),nr=K(!1),Bn=m(()=>(ni()||e.showAutoplayNext&&w())&&!!we()&&!!He()&&(e.showAds&&I()||!e.showAds)&&v()&&!d()&&!n(nr)),rr=K(!1);We==null||We.setContext(ld());let Hr=St=>{St&&!ot&&e.uiConfig.controls.showOnStartupAtAutoplay&&Ti(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:Hr});let Ur=()=>{clearTimeout($o),D(ir,!1),p()&&qe.set(!1)},Ti=St=>{Ur(),D(ir,!0),$o=setTimeout(()=>D(ir,!1),St);let mi=St-100;hn=setTimeout(()=>{T()&&gn.set(!1)},mi>0?mi:St)},ss=pn.subscribe(St=>{H.set(St),St&&(clearTimeout(mn),mn=setTimeout(()=>H.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Zo=(...mi)=>bt(null,[...mi],function*(St=ca()){var Wt,Ro,xo,Sn,wo,Cn;if(St&&!Cc.device.isIOS){let zi=Dd(),Ir=Sr(),Do=Cc.browser.isSamsungBrowser&&zi===e.shadowRootContainer;St=zi===Ir||Do}if(St){Ti(e.uiConfig.controls.hideTimeoutFullscreen);try{yield We==null?void 0:We.exit()}catch(zi){Dt({message:String(zi)})}try{let zi=(Wt=R())!=null&&Wt.width&&((Ro=R())!=null&&Ro.height)?R():A();yield I_(zi)}catch(zi){Dt({message:String(zi)})}}Ie.set(St),e.store.getAdmanWrapper().setFullscreen(St),P()?(Sn=(xo=e.store.callbacks)==null?void 0:xo.onFullscreenEnter)==null||Sn.call(xo):(Cn=(wo=e.store.callbacks)==null?void 0:wo.onFullscreenExit)==null||Cn.call(wo)}),mt=St=>{Ao.set(St)},jt=()=>{if(n(xi)){let{width:St,height:mi}=n(xi).getBoundingClientRect();Ao.set({width:St,height:mi})}};At(()=>{var St;return Pu(Zo),e.uiConfig.features.annotationsInside&&(ui==null||ui.init(n(xi))),We==null||We.assignPlayerContainer(n(xi)),e.uiConfig.disablePiPResizeHandling||We==null||We.setExternalEventHandlers({resize:mt,leavepictureinpicture:jt}),D(Fr,!Cc.device.isIphoneOrOldIpad),e.interactiveContainer&&((St=Re().parentElement)==null||St.insertBefore(e.interactiveContainer,Re().nextSibling)),()=>{clearTimeout($o),clearTimeout(hn),clearTimeout(mn),ss(),We==null||We.dispose().catch(mi=>{Dt({message:String(mi)})}),ku(Zo)}});let sr=K(!0),Fn=K(!0),zr=St=>{let mi=E()+(St==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;mi<0?(D(sr,!1),mi=0):mi>=z()&&(D(Fn,!1),mi=z()),D(or,!0),e.seekTime(mi)},Sr=()=>Cc.device.isIOS?n(xi):!e.uiConfig.allowChangingFullscreenTarget||!Mt()?e.outerContainerRef:Mt().contains(e.outerContainerRef)?Mt():e.outerContainerRef,Wr=()=>bt(null,null,function*(){try{if(ca())yield Eu(document),Dt({message:"exit fullscreen"});else{if(Dt({message:"request fullscreen"}),Cc.device.isIOS&&!U())return;yield Iu(Sr())}}catch(St){Dt({message:String(St)})}}),_n=()=>{Lo()},Jo=St=>{if(St.preventDefault(),W()){_n();return}if(!lt()){e.firstStart(),Ti(e.uiConfig.controls.hideTimeoutCursor);return}D(or,!1),y()?Ur():Ti(e.uiConfig.controls.hideTimeoutMobile)},bn=()=>{fi.set(!0)},Cr=()=>{ot||(gn.set(!0),Ti(e.uiConfig.controls.hideTimeoutCursor))},Tr=St=>{On&&(On(St),Ti(e.uiConfig.controls.hideTimeoutMobile))},$n=St=>{fn&&(fn(St),Ti(e.uiConfig.controls.hideTimeoutMobile))};Fe(()=>{Gt.set(n(vn))}),Fe(()=>{ht.set((n(wr)||W()||Y()||te()||J()||!n(Bn)&&(v()||n(ir)&&!n(or)))&&!n(Br)&&s()==="video"&&!d()&&oe())}),Fe(()=>{!Y()&&n(rr)&&!de()&&Ti(e.uiConfig.controls.hideTimeoutMobile),D(rr,Y(),!0)}),Fe(()=>{D(sr,E()>0),D(Fn,!ae()&&E()<z(),!0)}),Fe(()=>{Ud(n(_i),W(),pe(),!0)});let yn=q("aria_label_video_player");Qb({fullScreenChangeHandler:Zo,getFullscreenTarget:Sr}),qb({store:e.store,getFullscreenTarget:Sr});let ar=(St,mi)=>{var Sn,wo;let Wt=(wo=(Sn=e.store.callbacks)==null?void 0:Sn.uiInfo)==null?void 0:wo.onUpcomingLiveViewStateChanged;if(!Wt)return;let Ro=!!mi,xo=Ye(Ye({},Jn(n(xi),{upcomingLiveScreen:mi},"upcomingLiveScreen",Ro)),St);Wt(xo)};var Mi=GT();ft("blur",La,_n);var yo=C(Mi);rl(yo,{onClick:Jo,get videoContainer(){return Re()},set videoContainer(St){Re(St)}});var Vo=k(yo,2);Na(Vo,()=>"slot",!1,(St,mi)=>{oo(St,()=>({name:nl}))});var ao=k(Vo,2);Ds(ao,ee,St=>{var mi=qT(),Wt=le(mi);let Ro=m(()=>s()!=="thumb"||d()||ot&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);tl(Wt,{get hidden(){return n(Ro)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var xo=k(Wt,2);{var Sn=tt=>{var Nt=UT(),Ii=le(Nt);{var tn=on=>{let dr=m(()=>e.uiConfig.controls.seekStepMobile/1e3);sp(on,{side:"left",get seekStep(){return n(dr)},handleSingleFirstClick:Jo,handleSecondClick:()=>zr("backward")})};M(Ii,on=>{n(sr)&&on(tn)})}var No=k(Ii,2);{var qr=on=>{let dr=m(()=>e.uiConfig.controls.seekStepMobile/1e3);sp(on,{side:"right",get seekStep(){return n(dr)},handleSingleFirstClick:Jo,handleSecondClick:()=>zr("forward")})};M(No,on=>{n(Fn)&&on(qr)})}$(tt,Nt)};M(xo,tt=>{e.canRewindLive&&It&&!$e().has("TIMELINE")&&tt(Sn)})}var wo=k(xo,2);{var Cn=tt=>{let Nt=m(()=>{var Ii;return(Ii=e.live)==null?void 0:Ii.startTime});bc(tt,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(Nt)},onUpcomingLiveViewStateChanged:ar})};M(wo,tt=>{s()==="LiveWaitingStart"&&tt(Cn)})}var zi=k(wo,2);{var Ir=tt=>{il(tt,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};M(zi,tt=>{s()==="LiveWaitingRecover"&&tt(Ir)})}var Do=k(zi,2);{var Hn=tt=>{il(tt,{kind:"record",get thumbUrl(){return e.thumbUrl}})};M(Do,tt=>{s()==="LiveWaitingRecord"&&tt(Hn)})}var as=k(Do,2);{var ls=tt=>{var Nt=zT();let Ii;var tn=C(Nt);Od(tn,{get adsSlotId(){return Je()},get adsParams(){return Ae()},get adsAutoplayParam(){return j()},get duration(){return ne()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson}}),S(Nt),O(No=>Ii=ie(Nt,1,"ads-container s-9",null,Ii,No),[()=>({hidden:s()!=="ads"})]),$(tt,Nt)};M(as,tt=>{e.showAds&<()&&tt(ls)})}var ds=k(as,2);{var Ji=tt=>{let Nt=m(()=>!ni()&&e.showAutoplayNext&&w());Lv(tt,{get title(){return we()},get thumb(){return He()},get isHide(){return n(Nt)},clickCloseIcon:()=>D(nr,!0)})};M(ds,tt=>{n(Bn)&&we()&&He()&&tt(Ji)})}var cs=k(ds,2);{var Qr=tt=>{hc(tt,{})};M(cs,tt=>{Ee()&&tt(Qr)})}var vo=k(cs,2);{var Er=tt=>{var Nt=WT(),Ii=C(Nt);Rd(Ii,{}),S(Nt),$(tt,Nt)};M(vo,tt=>{ce()&&tt(Er)})}var et=k(vo,2);{var _t=tt=>{_c(tt,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Qe()},onClick:Jo})};M(et,tt=>{J()&&tt(_t)})}var Zt=k(et,2);{var Ri=tt=>{Ja(tt,{get shifted(){return y()},get captions(){return ve()},get position(){return E()},get playerSize(){return A()},isMobile:!0})};M(Zt,tt=>{fe().value!=="off"&&tt(Ri)})}var lo=k(Zt,2);{var Ni=tt=>{var Nt=KT();Nt.__click=[HT,W,Ue,_n];var Ii=C(Nt);el(Ii,{}),S(Nt),$(tt,Nt)};M(lo,tt=>{d()&&tt(Ni)})}var go=k(lo,2);{var Oo=tt=>{let Nt=m(()=>s()==="thumb"||s()==="LiveWaitingStart"||s()==="LiveWaitingRecover"||s()==="LiveWaitingRecord"||s()==="ads"),Ii=m(()=>s()==="ads"),tn=m(()=>e.canRewindLive&&X()!==0);vc(tt,{get bottomHidden(){return n(Nt)},get showControls(){return y()},get bottomNoSmooth(){return T()},get isAds(){return n(Ii)},get canRewindLive(){return n(tn)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Se()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Le()},get nextButtonActive(){return ze()},get prevButtonActive(){return Ce()},get isOneVideoPlaylist(){return rt()},get customFullscreenSupported(){return n(Fr)},get endScreenShown(){return n(Bn)},toggleFullscreen:Wr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:Tr,onDisabledSeekToInteractiveClick:$n,get playerControlsWrapperRef(){return n(Xo)},set playerControlsWrapperRef(No){D(Xo,No,!0)},get playerControlsRef(){return n(tr)},set playerControlsRef(No){D(tr,No,!0)}})};M(go,tt=>{lt()&&tt(Oo)})}var Tn=k(go,2);{var Un=tt=>{var Nt=QT(),Ii=C(Nt);xc(Ii,{get supportLink(){return e.supportLink},get returnFocus(){return FT},get ref(){return n(_i)},set ref(tn){D(_i,tn,!0)}}),S(Nt),$(tt,Nt)};M(Tn,tt=>{W()&&tt(Un)})}var ho=k(Tn,2);let en=m(()=>!n(Nn));Fd(ho,{get isLive(){return N()},get isHidden(){return n(en)},get isPlaying(){return me()},get position(){return E()},get duration(){return z()}});var Pr=k(ho,2);{var kr=tt=>{Wa(tt,{})};M(Pr,tt=>{n(Mo)&&tt(kr)})}var So=k(Pr,2);{var lr=tt=>{Kd(tt,{})};M(So,tt=>{ue()&&tt(lr)})}var zn=k(So,2);{var us=tt=>{wc(tt,{onClose:xr,onSelectAutoQuality:()=>{Li("auto"),xr()}})};M(zn,tt=>{n(rs)&&tt(us)})}$(St,mi)});var xn=k(ao,2);it(xn,St=>D(vn,St),()=>n(vn)),S(Mi),it(Mi,St=>D(xi,St),()=>n(xi)),O(()=>De(Mi,"aria-label",yn)),ft("click",Mi,bn,!0),ft("focusin",Mi,Cr,!0),$(t,Mi),F(),o()}Ze(["click"]);import{debounceFn as jT}from"@vkontakte/videoplayer-shared/es2015";var XT=L('<div class="time-container s-8"><!></div>'),ZT=L('<div class="player-wrapper s-8" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),JT={hash:"s-8",code:".player-wrapper.s-8{height:100%;position:absolute;width:100%}.player-wrapper.s-8 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.timeline.s-8{bottom:0;left:0;opacity:0;opacity:1;position:absolute;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.visible.s-8{opacity:1}.time-container.s-8{bottom:8px;position:absolute;right:8px;z-index:var(--thumb-timer-z-index)}"};function Vv(t,e){B(e,!0),Q(t,JT);let[i,o]=Be(),s=()=>x(de,"$scrubbingInProgress",i),a=()=>x(J,"$playerSize",i),l=()=>x(E,"$isPlaying$",i),d=()=>x(A,"$duration$",i),r=()=>x(W,"$positionWithScrubbing$",i),u=()=>x(T,"$playerPhase",i),f=()=>x(R,"$crashed$",i),p=()=>x(z,"$currentSubtitle$",i),v=()=>x(U,"$currentSubtitleCaptions$",i),b=()=>x(P,"$positionExact$",i),y=()=>x(Y,"$isLive$",i),_=()=>x(te,"$isRewindableLive$",i),w=g(e,"outsideDuration",3,0),I=g(e,"videoContainer",15),{playerPhase:T,state:{crashed$:R,duration$:A,positionExact$:P,isPlaying$:E,currentSubtitle$:z,currentSubtitleCaptions$:U,positionWithScrubbing$:W,isLive$:Y,isRewindableLive$:te},ui:{playerSize:J,controls:oe,scrubbingInProgress:de},actions:{internal:{getVideoElement:ae}}}=xe(),pe=8,ee=K(!1),$e=ri({}),Ee=K(!1),ce=m(()=>!s()&&!n(Ee)),Qe=()=>{D(ee,!0)},fe=()=>{D(ee,!1)},ve=jT(Ql,260);Fe(()=>{a(),ve(ae(),oe,$e,n(ee))});let X=m(()=>l()?jo(d()-r()):jo(isFinite(d())?d():w()));var N=ZT(),me=C(N);rl(me,{hideCursor:!1,get videoContainer(){return I()},set videoContainer(we){I(we)}});var ue=k(me,2);Na(ue,()=>"slot",!1,(we,He)=>{oo(we,()=>({name:nl}))});var Re=k(ue,2);let Je=m(()=>u()!=="thumb"||f());tl(Re,{get hidden(){return n(Je)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var Ae=k(Re,2);{var j=we=>{Ja(we,{shifted:!1,get captions(){return v()},get position(){return b()},get playerSize(){return a()}})};M(Ae,we=>{p().value!=="off"&&n(ce)&&we(j)})}var ne=k(Ae,2);{var Se=we=>{var He=XT(),rt=C(He);Bd(rt,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(X)}}),S(He),$(we,He)};M(ne,we=>{n(ce)&&we(Se)})}var Le=k(ne,2);let ze;var Ce=C(Le);Xa(Ce,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return _()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:pe,tooltipRightOffset:pe,get ref(){return $e.timeline},set ref(we){$e.timeline=we}}),S(Le),S(N),O(we=>ze=ie(Le,1,"timeline s-8",null,ze,we),[()=>({visible:n(ee)})]),ft("mouseenter",N,Qe),ft("mouseleave",N,fe),ft("mouseenter",Le,()=>D(Ee,!0)),ft("mouseleave",Le,()=>D(Ee,!1)),$(t,N),F(),o()}var nI=L("<div><!></div>"),rI={hash:"s-4",code:'.vk-vp-root.s-4{--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-4{overflow:visible}.vk-vp-root.s-4 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-4 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-4 p{margin:0}.vk-vp-root.s-4 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-4 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-4 :focus,.vk-vp-root.s-4 :focus-visible{outline:none}.vk-vp-root.s-4 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-4 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-4 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-4 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-4 .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-4 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-4 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function Dv(t,e){B(e,!0),Q(t,rI);let[i,o]=Be(),s=()=>x(lt,"$isLive$",i),a=()=>x(ui,"$availableSubtitlesList$",i),l=()=>x(We,"$isPreviewTrackHorizontallyAligned$",i),d=g(e,"sources",7),r=g(e,"store",7),u=g(e,"microStoresRoot",7),f=g(e,"videoConfig",7),p=g(e,"uiConfig",7),v=g(e,"title",7),b=g(e,"thumbUrl",7),y=g(e,"interactiveContainer",7),_=g(e,"interactiveController",7),w=g(e,"subtitles",7),I=g(e,"subtitlesForcedLanguage",7),T=g(e,"live",7),R=g(e,"preload",7),A=g(e,"autoplay",7),P=g(e,"volume",7,void 0),E=g(e,"muted",7,void 0),z=g(e,"fromTime",7),U=g(e,"canRewindLive",7),W=g(e,"showAds",7),Y=g(e,"adsSlotId",7,void 0),te=g(e,"adsParams",7,void 0),J=g(e,"adsAutoplayParam",7,void 0),oe=g(e,"duration",7,void 0),de=g(e,"logoClickable",7),ae=g(e,"logoHidden",7),pe=g(e,"isMobile",7),ee=g(e,"showNextPrevButtons",7,!1),$e=g(e,"nextButtonActive",7,!1),Ee=g(e,"prevButtonActive",7,!1),ce=g(e,"endScreenVideoTitle",7,void 0),Qe=g(e,"endScreenVideoThumb",7,void 0),fe=g(e,"isOneVideoPlaylist",7,!1),ve=g(e,"supportLink",7),X=g(e,"shadowRootContainer",7),N=g(e,"outerContainerRef",7),me=g(e,"fullScreenTarget",7,void 0),ue=g(e,"failoverHosts",7,void 0),Re=g(e,"showMiniTimer",7,!1),Je=g(e,"saveRate",7),Ae=g(e,"seekToInteractive",7,Gb),j=g(e,"playPrevChapter",7,Gb),ne=g(e,"volumeMultiplier",7),Se=g(e,"showAutoplayNext",7),Le=g(e,"showEndScreen",7,!0),ze=g(e,"keyboardControls",15,void 0),{subscribers:Ce,stores:we}=u();Dh(p());let He=Lt(),rt=p().logoLink,ct=r().ui.debugPanelVisible,Mt=r().ui.playerSize,lt=r().state.isLive$,wt=r().state.isInteractive&&Rv.device.isAndroid,Rt=K(void 0),Dt=null,Qt=K(!1);r().getAdmanWrapper().init({switchFromAdsToVideo:r().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:r().actions.internal.switchFromVideoToAds,setMuted:r().actions.external.setMuted},r().ads,{vsid:r().vsid}),Qh(r(),we),Fe(()=>{var H,ot;r().ui.isMobile.set(pe()),(ot=(H=f().callbacks)==null?void 0:H.onDomReady)==null||ot.call(H)});let Te=(H=!1)=>{D(Qt,!0),H?r().actions.external.firstStart(W()):r().actions.internal.firstStart(W())},G=()=>{if(He.features.qualityDetailsSubMenuEnabled){let H=v_(r().videoId);if(H)switch(H.type){case"high_quality":r().actions.internal.setHighQualityEnabled(!0,H.appliesTo);break;case"traffic_saving":r().actions.internal.setTrafficSavingEnabled(!0,H.appliesTo);break;case"exact_quality":r().actions.internal.setQuality(H.quality);break}}else{g_(r().videoId),kf()&&r().actions.internal.setTrafficSavingEnabled(!0);let ot=If(r().videoId);ot&&r().actions.internal.setQuality(ot)}};function Ne(H){var ai,fi,Gt;let ot=d()||H;ot&&r().initVideo({container:n(Rt),sources:ot,failoverHosts:ue(),subtitles:w(),subtitlesForcedLanguage:I(),volumeMultiplier:ne()});let Ut=tI.get(kd)==="true";ct.set(Ut),z()>0&&r().actions.external.seekTime(z());let pi=pe()?He.volumeDefault:(fi=(ai=P())!=null?ai:xu())!=null?fi:He.volumeDefault,dt=(Gt=E())!=null?Gt:d_();if(r().actions.external.setVolume(pi),r().actions.external.setMuted(dt),r().getAdmanWrapper().setInitialVolume(dt?0:pi),G(),He.features.saveRate&&Je()){let Ct=p_();Ct&&!s()&&r().actions.internal.setPlaybackRate(Ct)}if(Se()){let Ct=m_();Ct&&r().actions.internal.setAutoplayNextEnabled(Ct)}r().ui.isAutoplay.set(A()),A()&&Te(),R()&&He.features.preload&&r().actions.internal.preload()}let be=H=>{if(window.ResizeObserver){let ot,Ut;Dt=new ResizeObserver(iI(pi=>{let dt=pi[0];if(dt.contentBoxSize){let ai=Array.isArray(dt.contentBoxSize)?dt.contentBoxSize[0]:dt.contentBoxSize;ot=ai.inlineSize,Ut=ai.blockSize}else dt.contentRect&&(ot=dt.contentRect.width,Ut=dt.contentRect.height);Mt.set({width:ot,height:Ut})},300)),Dt.observe(H)}H.clientWidth&&H.clientHeight&&Mt.set({width:H.clientWidth,height:H.clientHeight})},Oe=()=>{document.hidden&&r().actions.external.stop()};At(()=>{var Ut,pi,dt,ai;wt&&document.addEventListener("visibilitychange",Oe),He.debugLog&&r().actions.internal.startLogging(),be(n(Rt));let H=Ce.map(fi=>fi.init({store:r(),microStores:we,config:f(),interactiveController:_(),uiConfig:p()})),ot=()=>{wt&&document.removeEventListener("visibilitychange",Oe),Dt==null||Dt.disconnect(),H.forEach(fi=>fi.unsubscribe()),r().destroy()};return((Ut=T())==null?void 0:Ut.status)==="upcoming"?(r().actions.internal.setLiveWaitingStart(!0),ot):((pi=T())==null?void 0:pi.status)==="waiting"?(r().actions.internal.setLiveWaitingRecover(!0),ot):(((dt=T())==null?void 0:dt.status)==="finished"||((ai=T())==null?void 0:ai.status)==="postlive")&&!(d()&&eI(d()))?(r().actions.internal.setLiveWaitingRecord(!0),ot):(Ne(),ot)});function Ie(){n(Qt)?r().actions.external.play():Te(!0)}function ht(){r().actions.external.pause()}function ye(H){r().actions.external.setMuted(H)}function qe(){r().actions.external.toggleSubtitle()}function Ue(H,ot){r().actions.external.changeSubtitle(H,ot)}function st(H){r().actions.external.changeAudioStream(H)}function qt(){var H;(H=r().webApi.slotsApi)!=null&&H.haveSlots()&&r().actions.external.hideControls()}function Pt(){var H;(H=r().webApi.slotsApi)!=null&&H.haveSlots()&&r().actions.external.showControls()}function Yt(H){pe()||H>=0&&H<=1&&r().actions.external.setVolume(H)}function bi(H){r().actions.internal.seekTime(H,oI.UNKNOWN)}function Vi(H){r().actions.external.seekEpisodeStartTime(H)}function Ai(){r().actions.external.returnFocusToEpisodes()}function ji(H){r().actions.external.setPlaybackRate(H)}function si(H){r().actions.external.setAutoQualityLimits(H)}function ut(){r().actions.external.setQuality("auto")}function di(H){r().actions.external.setTrafficSavingEnabled(H)}function Xi(H){r().actions.external.setHighQualityEnabled(H)}let It=Ku(He.view),hi=f().playerView==="preview",ui=r().state.availableSubtitlesList$;if(He.features.initSubtitles){let H=!1;Fe(()=>{var ot;if(!H&&a().length){H=!0;let Ut;if(He.features.userVideoPrefs&&r().videoId){let dt=Tu(He.userSalt,String(r().videoId));dt!=null&&dt.subtitleTrackId&&(Ut=a().find(ai=>ai.value===dt.subtitleTrackId))}let pi=(ot=I())!=null?ot:Lf();pi&&(Ut=a().find(dt=>dt.language===pi)),r().actions.internal.setSubtitle(Ut)}})}let We=r().ui.isPreviewTrackHorizontallyAligned;var at=nI();let Ci;var Zi=C(at);{var bo=H=>{Mv(H,{get store(){return r()},get uiConfig(){return He},get thumbUrl(){return b()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return A()},get canRewindLive(){return U()},get showAds(){return W()},get adsSlotId(){return Y()},get adsParams(){return te()},get adsAutoplayParam(){return J()},get duration(){return oe()},get logoClickable(){return de()},get logoHidden(){return ae()},get logoTargetUrl(){return rt},get nextButtonActive(){return $e()},get prevButtonActive(){return Ee()},get endScreenVideoTitle(){return ce()},get endScreenVideoThumb(){return Qe()},get isOneVideoPlaylist(){return fe()},get supportLink(){return ve()},get shadowRootContainer(){return X()},get outerContainerRef(){return N()},get fullScreenTarget(){return me()},get showMiniTimer(){return Re()},get playerStarted(){return n(Qt)},get seekToInteractive(){return Ae()},get playPrevChapter(){return j()},firstStart:Te,seekTime:bi,get showEndScreen(){return Le()},get showAutoplayNext(){return Se()},get showNextPrevButtons(){return ee()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson},get videoContainer(){return n(Rt)},set videoContainer(ot){D(Rt,ot,!0)}})},Ao=H=>{var ot=Ve(),Ut=le(ot);{var pi=ai=>{Vv(ai,{get thumbUrl(){return b()},get outsideDuration(){return oe()},get canRewindLive(){return U()},get videoContainer(){return n(Rt)},set videoContainer(fi){D(Rt,fi,!0)}})},dt=ai=>{Av(ai,{get store(){return r()},get uiConfig(){return He},get title(){return v()},get thumbUrl(){return b()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return A()},get canRewindLive(){return U()},get showAds(){return W()},get adsSlotId(){return Y()},get adsParams(){return te()},get adsAutoplayParam(){return J()},get duration(){return oe()},get logoClickable(){return de()},get logoHidden(){return ae()},get logoTargetUrl(){return rt},get nextButtonActive(){return $e()},get prevButtonActive(){return Ee()},get endScreenVideoTitle(){return ce()},get endScreenVideoThumb(){return Qe()},get isOneVideoPlaylist(){return fe()},get supportLink(){return ve()},get shadowRootContainer(){return X()},get outerContainerRef(){return N()},get fullScreenTarget(){return me()},get showMiniTimer(){return Re()},get playerStarted(){return n(Qt)},get seekToInteractive(){return Ae()},get playPrevChapter(){return j()},firstStart:Te,get showEndScreen(){return Le()},get showAutoplayNext(){return Se()},get showNextPrevButtons(){return ee()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(Rt)},set videoContainer(fi){D(Rt,fi,!0)},get keyboardControls(){return ze()},set keyboardControls(fi){ze(fi)}})};M(Ut,ai=>{hi?ai(pi):ai(dt,!1)})}$(H,ot)};M(Zi,H=>{pe()?H(bo):H(Ao,!1)})}S(at),O(H=>{Ci=ie(at,1,"vk-vp-root s-4",null,Ci,H),Ke(at,It)},[()=>({"root--miui-browser":Rv.device.isMobile&&Rv.browser.isMiuiBrowser,"visible-outside":hi,"preview-track-horizontally-alinged":l()})]),$(t,at);var pn=F({initVideo:Ne,play:Ie,pause:ht,setMuted:ye,toggleSubtitle:qe,changeSubtitle:Ue,changeAudioStream:st,hideControls:qt,showControls:Pt,setVolume:Yt,seekTime:bi,seekEpisodeStartTime:Vi,returnFocusToEpisodes:Ai,setPlaybackRate:ji,setAutoQualityLimits:si,setAutoQuality:ut,toggleTrafficSaving:di,toggleHighQuality:Xi,get sources(){return d()},set sources(H){d(H)},get store(){return r()},set store(H){r(H)},get microStoresRoot(){return u()},set microStoresRoot(H){u(H)},get videoConfig(){return f()},set videoConfig(H){f(H)},get uiConfig(){return p()},set uiConfig(H){p(H)},get title(){return v()},set title(H){v(H)},get thumbUrl(){return b()},set thumbUrl(H){b(H)},get interactiveContainer(){return y()},set interactiveContainer(H){y(H)},get interactiveController(){return _()},set interactiveController(H){_(H)},get subtitles(){return w()},set subtitles(H){w(H)},get subtitlesForcedLanguage(){return I()},set subtitlesForcedLanguage(H){I(H)},get live(){return T()},set live(H){T(H)},get preload(){return R()},set preload(H){R(H)},get autoplay(){return A()},set autoplay(H){A(H)},get volume(){return P()},set volume(H){P(H)},get muted(){return E()},set muted(H){E(H)},get fromTime(){return z()},set fromTime(H){z(H)},get canRewindLive(){return U()},set canRewindLive(H){U(H)},get showAds(){return W()},set showAds(H){W(H)},get adsSlotId(){return Y()},set adsSlotId(H){Y(H)},get adsParams(){return te()},set adsParams(H){te(H)},get adsAutoplayParam(){return J()},set adsAutoplayParam(H){J(H)},get duration(){return oe()},set duration(H){oe(H)},get logoClickable(){return de()},set logoClickable(H){de(H)},get logoHidden(){return ae()},set logoHidden(H){ae(H)},get isMobile(){return pe()},set isMobile(H){pe(H)},get showNextPrevButtons(){return ee()},set showNextPrevButtons(H){ee(H)},get nextButtonActive(){return $e()},set nextButtonActive(H){$e(H)},get prevButtonActive(){return Ee()},set prevButtonActive(H){Ee(H)},get endScreenVideoTitle(){return ce()},set endScreenVideoTitle(H){ce(H)},get endScreenVideoThumb(){return Qe()},set endScreenVideoThumb(H){Qe(H)},get isOneVideoPlaylist(){return fe()},set isOneVideoPlaylist(H){fe(H)},get supportLink(){return ve()},set supportLink(H){ve(H)},get shadowRootContainer(){return X()},set shadowRootContainer(H){X(H)},get outerContainerRef(){return N()},set outerContainerRef(H){N(H)},get fullScreenTarget(){return me()},set fullScreenTarget(H){me(H)},get failoverHosts(){return ue()},set failoverHosts(H){ue(H)},get showMiniTimer(){return Re()},set showMiniTimer(H){Re(H)},get saveRate(){return Je()},set saveRate(H){Je(H)},get showAutoplayNext(){return Se()},set showAutoplayNext(H){Se(H)},get seekToInteractive(){return Ae()},set seekToInteractive(H){Ae(H)},get playPrevChapter(){return j()},set playPrevChapter(H){j(H)},get volumeMultiplier(){return ne()},set volumeMultiplier(H){ne(H)},get showEndScreen(){return Le()},set showEndScreen(H){Le(H)},get keyboardControls(){return ze()},set keyboardControls(H){ze(H)}});return o(),pn}var sI=ke('<defs><path id="rect" d="m2.72 0c.45 0 .6.05.77.13a1 1 0 01.38.38c.09.16.13.33.13.77v1.44c0 .44-.04.6-.13.77a1 1 0 01-.38.38c-.16.08-.32.13-.77.13h-1.44c-.44 0-.6-.05-.77-.13a1 1 0 01-.37-.38c-.1-.16-.14-.33-.14-.77v-1.44c0-.44.05-.6.13-.77a1 1 0 01.38-.38c.17-.08.33-.13.77-.13z"></path></defs><path d="M38.24 6c3.57 0 4.86.37 6.17 1.07a7.3 7.3 0 0 1 3.02 3.02c.7 1.3 1.07 2.6 1.07 6.17v23.49c0 3.56-.37 4.85-1.07 6.16a7.3 7.3 0 0 1-3.02 3.02c-1.3.7-2.6 1.07-6.16 1.07h-19.5c-3.56 0-4.85-.37-6.16-1.07a7.3 7.3 0 0 1-3.02-3.02c-.7-1.3-1.07-2.6-1.07-6.16v-23.5c0-3.56.37-4.85 1.07-6.16a7.3 7.3 0 0 1 3.02-3.02C13.9 6.37 15.2 6 18.76 6zm.32 3h-19.8c-2.8 0-3.77.19-4.75.71a4.3 4.3 0 0 0-1.8 1.8c-.5.95-.7 1.87-.7 4.43l-.01 23.8c0 2.8.19 3.76.71 4.75a4.3 4.3 0 0 0 1.8 1.8c.98.52 1.95.71 4.75.71h19.49c2.8 0 3.76-.19 4.74-.71a4.3 4.3 0 0 0 1.8-1.8c.52-.98.71-1.95.71-4.74v-23.5c0-2.8-.19-3.75-.71-4.74a4.3 4.3 0 0 0-1.8-1.8c-.95-.5-1.87-.7-4.43-.7z"></path><use xlink:href="#rect" x="16.5" y="14"></use><use xlink:href="#rect" x="16.5" y="22"></use><use xlink:href="#rect" x="16.5" y="30"></use><use xlink:href="#rect" x="16.5" y="38"></use><use xlink:href="#rect" x="37" y="14"></use><use xlink:href="#rect" x="37" y="22"></use><use xlink:href="#rect" x="37" y="30"></use><use xlink:href="#rect" x="37" y="38"></use>',1);function Ov(t,e){let i=g(e,"isWhite",3,!1),o=m(()=>i()?"#fff":"#909499");je(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(s,a)=>{var l=sI();Xt(9),$(s,l)},$$slots:{default:!0}})}var aI=L('<div class="title s-2"> </div>'),lI=L('<div class="playerStub s-2"><!> <!></div>'),dI={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 Nv(t,e){Q(t,dI);var i=lI(),o=C(i);{var s=d=>{var r=aI(),u=C(r,!0);S(r),O(()=>he(u,e.title)),$(d,r)};M(o,d=>{e.title&&d(s)})}var a=k(o,2);{var l=d=>{let r=m(()=>!!e.thumbUrl);Ov(d,{get isWhite(){return n(r)}})};M(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}S(i),O(()=>Ke(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),$(t,i)}var cI=L('<div class="playerError s-1"><!></div>'),uI={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 Bv(t){Q(t,uI);var e=cI(),i=C(e);el(i,{}),S(e),$(t,e)}import{AppTracer as DI,now as OI,ValueSubject as NI,withoutNullable as BI}from"@vkontakte/videoplayer-shared/es2015";import{cloneDeepWith as FI,InterfaceLanguage as HI,isNonNullable as i$,Logger as UI,Observable as zI,Subscription as o$,once as WI,InternalsExposure as KI,skip as QI,getPlayerId as qI}from"@vkontakte/videoplayer-shared/es2015";import{clientChecker as n$,isMobile as GI}from"@vkontakte/videoplayer-core/es2015";import{OneStat as YI,ThinOneStat as jI,MediascopePixel as XI}from"@vkontakte/videoplayer-statistics/es2015";import{Logger as pI,Subscription as fI}from"@vkontakte/videoplayer-shared/es2015";var lp=class{constructor(){this.subscription=new fI,this.logger=new pI,this.log=this.logger.createComponentLog("MediaSessionApi")}isSupported(){return"mediaSession"in navigator}setMetaData({title:e,artist:i="",thumbUrl:o=""}){this.isSupported()&&(navigator.mediaSession.metadata=new MediaMetadata({title:e,artist:i,artwork:[{src:o,sizes:"96x96",type:"image/png"},{src:o,sizes:"128x128",type:"image/png"},{src:o,sizes:"192x192",type:"image/png"},{src:o,sizes:"256x256",type:"image/png"},{src:o,sizes:"384x384",type:"image/png"},{src:o,sizes:"512x512",type:"image/png"}]}))}updateActionHandlers(e){this.resetActionHandlers(),this.setActionHandlers(e)}resetActionHandlers(){let e=[["play",null],["pause",null],["stop",null],["nexttrack",null],["previoustrack",null],["seekto",null],["seekbackward",null],["seekforward",null]];this.setActionHandlers(e)}setActionHandlers(e){var i,o;if(this.isSupported())for(let[s,a]of e)try{(o=(i=navigator.mediaSession).setActionHandler)==null||o.call(i,s,a)}catch(l){throw new Error(`The media session action "${s}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{var a,l;let o=_e(e.state.currentPlaybackRate$),s=_e(e.state.duration$);if(!(!isFinite(i)||!isFinite(s)))try{(l=(a=navigator.mediaSession).setPositionState)==null||l.call(a,{position:i,playbackRate:o,duration:s})}catch(d){this.log({message:`MediaSession setPositionState can't call with position: ${i} and duration: ${s}`})}})))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};function Tc(t,e){var s,a;let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let l of i)o[l]=(a=(s=e[l])!=null?s:t[l])!=null?a:void 0;return o}var Yb="Inner error. Unexpectedly root annotation container null reference exception",jb="Annotation with such name already exists",Xb="Annotation with such name does not exist";var jl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as mI,Subscription as vI,throttleFn as gI}from"@vkontakte/videoplayer-shared/es2015";var hI="1",_I=100,dp=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new vI}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=gI(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},_I);this.subscriptions.add(mI(this.rootAnnotationsContainer).subscribe(({width:o,height:s})=>{this.playerSize={width:o,height:s},i()})),this.mutationObserver=new MutationObserver(i),this.mutationObserver.observe(this.rootAnnotationsContainer,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}add(e,i){var o;if(!this.rootAnnotationsContainer)throw new jl(Yb);if(this.annotations.has(e))throw new jl(jb);i.style.zIndex=(o=i.style.zIndex)!=null?o:hI,i.style.position="absolute",this.rootAnnotationsContainer.append(i),this.annotations.set(e,i)}get(e){let i=this.annotations.get(e);if(!i)throw new jl(Xb);return i}remove(e){let i=this.get(e);this.annotations.delete(e)&&i.remove()}clear(){for(let e in this.annotations.keys())this.remove(e)}destroy(){var e;this.annotations.clear(),this.subscriptions.unsubscribe(),(e=this.mutationObserver)==null||e.disconnect(),this.rootAnnotationsContainer=null}isElementExceedsBoundaries(e,i,o){let s=e.offsetTop,a=e.offsetLeft,l=e.offsetWidth,d=e.offsetHeight;return s<0||a<0||a+l>i||s+d>o}registryRootContainer(e){}addLayer(e){return document.createElement("div")}getLayer(e){}removeLayer(e){}clearLayer(e){}detach(){}reattach(){}};import{assertNonNullable as cp,Subscription as bI}from"@vkontakte/videoplayer-shared/es2015";var un=class{init({store:e,microStores:i,interactiveController:o,config:s}){return cp(e),cp(i),cp(s),s.interactiveData&&cp(o),this.subscription=new bI,this.subscription}};var Ic=class extends un{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$=Jt(Ye({},se(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{isInteractiveExpectation$:s}=i.store.state;return o.add(s.subscribe(a=>{this.state$.set(a?!0:null)})),o}};var Ec=class extends un{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$=Jt(Ye({},se(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{microStores:s,store:a}=i,{fakeIsPlaying$:l}=s,{isInteractiveExpectation$:d,isPlaying$:r}=a.state,{controlsVisible:u,isMobile:f}=a.ui,p=_e(f),v=()=>p&&_e(u);return o.add(u.subscribe(b=>{if(!p)return;let y=_e(l);_e(r)?this.state$.set(b):y!==null&&this.state$.set(!y||b)})),o.add(r.subscribe(b=>{this.state$.set(!b||v())})),o.add(l.subscribe(b=>{if(b===null)return;let y=_e(d);if(v()){this.state$.set(!0);return}y&&this.state$.set(!b)})),o}};var Pc=class extends un{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=se("tooltip_chapter_without_interactive")}init(i){let o=super.init(i),{store:s}=i;return o.add(s.state.interactiveEpisodes$.subscribe(a=>{a.length&&(a.every(l=>l.completed)?this.state$.set("tooltip_interactive_of_chapter_completed"):this.state$.set("tooltip_disabled_when_interactive"))})),o}};import{combine as $I}from"@vkontakte/videoplayer-shared/es2015";var Fv=se(!1),up=null,kc=class extends un{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$=Jt(Ye({},Fv),{set:(i,o=!1)=>{i!==_e(Fv)&&(this.clearTimeout(),Fv.set(i),!i&&up&&(up=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()})}init(i){let o=super.init(i),{store:s,config:a}=i,{isInteractiveTime$:l,isPlaying$:d}=s.state,r=s.ui.controlsVisible,{interactiveTimeIndicator:u}=s.ui.controls;o.add(r.subscribe(p=>{_e(l)&&p&&this.state$.set(!1)}));let f=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add($I({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:v,interactiveTimeIndicator:b})=>{var y,_;if(!(!p||!(b!=null&&b.isDisplayed))){if(!v)return this.state$.set(!1);f.tooltipHelpHintActive&&up===null&&(up=!0,f.tooltipHelpHintActive=!1,this.state$.set(!0),(_=(y=s.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||_.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as yI,noop as xI}from"@vkontakte/videoplayer-shared/es2015";var Ac=class extends un{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$=Jt(Ye({},se(null)),{toggle:xI});this.checkIfShouldHide=i=>Us(i,"s")}init(i){let o=super.init(i),{store:s,interactiveController:a}=i,l=s.ui.currentGridType$,d=s.getLogger().createComponentLog("GraphIsOpened microStore");return this.state$.toggle=()=>bt(this,null,function*(){if(this.checkIfShouldHide(_e(l)))return;let r=_e(this.state$),{isEnded$:u,playbackState$:f}=s.state,{disabledControls$:p}=s.ui.controls,v=_e(u),b=_e(f);if(r)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1),p.remove(bf),!v&&this.graphMadePause&&s.actions.internal.play()}catch(y){d({message:"Cant hide graph"})}else{this.graphMadePause=b==="playing";try{yield a==null?void 0:a.toggleGraphView(!0),this.state$.set(!0),p.add(bf),!v&&this.graphMadePause&&s.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}}),o.add(yI({graphIsOpened:this.state$,currentGridType:l}).subscribe(f=>bt(this,[f],function*({graphIsOpened:r,currentGridType:u}){if(this.checkIfShouldHide(u)&&r)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1)}catch(v){d({message:"Cant hide graph"})}}))),o}};import{ValueSubject as Zb}from"@vkontakte/videoplayer-shared/es2015";var Lc=class extends un{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:se(!1),isEnabled$:se(!1),type$:se(void 0)}}init(i){let o=super.init(i),{store:s}=i,{info:{isActive$:a,isEnabled$:l,type:d}}=s.webApi.pictureInPictureApi||{info:{isActive$:new Zb(!1),isEnabled$:new Zb(!1)}};return o.add(a.subscribe(r=>{this.state$.isActive$.set(r)})),o.add(l.subscribe(r=>{this.state$.isEnabled$.set(r)})),this.state$.type$.set(d),o}};import{filter as CI,filterChanged as TI}from"@vkontakte/videoplayer-shared/es2015";import{safeStorage as Hv}from"@vkontakte/videoplayer-shared/es2015";var Jb=({maxShowCount:t,timeout:e})=>{let i=[t!==0?wI({maxCount:t}):void 0,e!==0?SI({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(s=>s.notificationShowed(o)),canShowNotification:o=>i.every(s=>s.canShowNotification(o))}},wI=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,s;e[i]=((o=e[i])!=null?o:0)+1,Hv.set("videoplayer_notifications_manager_count",JSON.stringify((s=e[i])!=null?s:0))},canShowNotification:i=>{var o;return((o=e[i])!=null?o:0)<t}}},SI=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Hv.get(e)||"{}")}catch(a){return{}}},o=a=>Hv.set(e,JSON.stringify(a)),s=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o(Jt(Ye({},i()),{[a]:{timeout:t,launchTime:Date.now()}}))},canShowNotification:a=>{let l=i()[a];if(l){let d=Date.now()-l.launchTime>t;return d&&s(a),d}else return!0}}};var Mc=class extends un{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:se({}),showNotification:i=>{this.state$.notificationsToShow$.update(o=>(o[i]=!0,o)),this.notificationManager.notificationShowed(i)},closeNotification:i=>{this.state$.notificationsToShow$.update(o=>(delete o[i],o))}}}init(i){let o=super.init(i),{store:s,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:l,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:r}}}=i;this.notificationManager=Jb({maxShowCount:a,timeout:l});let u=s.getPlayer();return o.add(u.events.severeStallOccured$.pipe(TI(),CI(f=>f)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(r&&s.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var e$=()=>[Ic,Ec,Pc,kc,Ac,Lc,Mc].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:Jt(Ye({},e),{[o.stateName]:o.state$})}},{subscribers:[],stores:{}});import{devNull as Vc}from"@vkontakte/videoplayer-shared/es2015";var pp=class{constructor(e){this.getActiveElement=e;this.focusableElements=[];this.isActive=!1;this.handleTabKey=e=>{if(this.updateFocusableElements(),!this.focusableElements.length)return;let i=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1],s=this.getActiveElement();e.shiftKey&&s===i?(e.preventDefault(),o.focus()):!e.shiftKey&&s===o&&(e.preventDefault(),i.focus())}}activate(){this.isActive||(document.addEventListener("keydown",this.handleTabKey),this.isActive=!0)}deactivate(){this.isActive&&(document.removeEventListener("keydown",this.handleTabKey),this.isActive=!1,this.focusableElements=[])}updateFocusableElements(){this.isActive&&(this.focusableElements=this.getFocusableElements())}getFocusableElements(){let e=["button:not([disabled])","[href]:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"]):not([disabled])'].join(", ");return Array.from(this.container.querySelectorAll(e)).filter(i=>!i.disabled&&i.offsetParent!==null)}destroy(){this.deactivate()}setContainer(e){this.container=e}};var fp=class{constructor(e){this.shadowRoot=e;this.lastFocusedNode=null;this.init=()=>{this.shadowRoot.addEventListener("focusin",this.handleFocusChange)};this.handleFocusChange=()=>{this.lastFocusedNode=this.shadowRoot.activeElement};this.restoreFocus=()=>{var e;(e=this.lastFocusedNode)==null||e.focus()};this.focusLock=new pp(()=>this.lastFocusedNode),this.init()}destroy(){this.shadowRoot.removeEventListener("focusin",this.handleFocusChange),this.focusLock.destroy()}getLastFocusedNode(){return this.lastFocusedNode}activateLock(){this.focusLock.activate()}deactivateLock(){this.focusLock.deactivate()}setContainerForFocusLock(e){this.focusLock.setContainer(e)}};var II=L('<div class="root s-3"><!></div>'),EI={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 Uv(t,e){B(e,!0),Q(t,EI);let i=null,o=K(null);Fe(()=>(n(o)&&(i=window.setTimeout(()=>{D(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function s(r){e.playbackStatusShow&&D(o,r?"prev":"next",!0)}var a=Ve(),l=le(a);{var d=r=>{var u=Ve(),f=le(u);Ds(f,()=>n(o),p=>{var v=II(),b=C(v);let y=m(()=>n(o)==="prev");Sc(b,{get duration(){return e.animationDuration},get Icon(){return _a},get reversed(){return n(y)}}),S(v),$(p,v)}),$(r,u)};M(l,r=>{e.playbackStatusShow&&n(o)&&r(d)})}return $(t,a),F({startVideoChangedAnimation:s})}import{getWindow as PI}from"@vkontakte/videoplayer-shared/es2015";var zv=PI().HTMLElement||class{constructor(){this.isConnected=!1}};var kI=Object.defineProperty,AI=Object.defineProperties,LI=Object.getOwnPropertyDescriptors,t$=Object.getOwnPropertySymbols,MI=Object.prototype.hasOwnProperty,VI=Object.prototype.propertyIsEnumerable,Kv=(t,e,i)=>e in t?kI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,sl=(t,e)=>{for(var i in e||(e={}))MI.call(e,i)&&Kv(t,i,e[i]);if(t$)for(var i of t$(e))VI.call(e,i)&&Kv(t,i,e[i]);return t},RI=(t,e)=>AI(t,LI(e)),Kt=(t,e,i)=>Kv(t,typeof e!="symbol"?e+"":e,i),mp=(t,e,i)=>new Promise((o,s)=>{var a=r=>{try{d(i.next(r))}catch(u){s(u)}},l=r=>{try{d(i.throw(r))}catch(u){s(u)}},d=r=>r.done?o(r.value):Promise.resolve(r.value).then(a,l);d((i=i.apply(t,e)).next())}),ZI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:HI.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:GI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},er=K(void 0),Wv=ri({animationDuration:0,playbackStatusShow:!1}),vp=class extends zv{constructor(){super(),Kt(this,"svelteStubComponent"),Kt(this,"svelteRootComponent"),Kt(this,"sveltePersistentLayerComponent"),Kt(this,"svelteErrorComponent"),Kt(this,"store"),Kt(this,"microStoresRoot"),Kt(this,"statistics"),Kt(this,"_shadowRoot"),Kt(this,"playerContainer"),Kt(this,"rootContainer"),Kt(this,"stateContainer"),Kt(this,"shadowRootContainer"),Kt(this,"playerId"),Kt(this,"uiConfig"),Kt(this,"coreConfig"),Kt(this,"statisticsConfig"),Kt(this,"metaConfig"),Kt(this,"interactiveController"),Kt(this,"interactiveContainer"),Kt(this,"graphMadePause"),Kt(this,"currentPlayingVideoIndex",0),Kt(this,"needToRepeatPlaylist",!1),Kt(this,"videoConfig"),Kt(this,"pictureInPictureApi"),Kt(this,"mediaSessionApi"),Kt(this,"unsubscribePlayerPhaseSubscription"),Kt(this,"logger"),Kt(this,"log"),Kt(this,"subscription"),Kt(this,"interactiveSubscription"),Kt(this,"annotationsApi"),Kt(this,"slotsApi"),Kt(this,"focusManager"),Kt(this,"prevIsid"),Kt(this,"isInited",!1),Kt(this,"postponedInitParams",null),Kt(this,"internalsExposure",null),Kt(this,"shadowDOMCallbacksDisabled",!1),Kt(this,"fatalError$",new NI(null)),Kt(this,"createOneStat",(e,i={})=>{var o,s,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:r,statUserSalt:u,statTrackCode:f,statVKAppId:p,refreshStatAuthToken:v,autoplay:b,isMobile:y,isTouch:_,refDomain:w,deviceId:I,interactiveData:T}=Tc(this.videoConfig,i),R=(o=T==null?void 0:T.projectInfo)==null?void 0:o.pid,A=(a=(s=this.interactiveController)==null?void 0:s.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 YI(sl({movieId:P,albumId:d,place:r,trackCode:f,vkAppId:p,autoplay:(l=b&&!this.interactiveController)!=null?l:!1,mobile:_!=null?_:y,clip:E,refDomain:w,deviceId:I,isPreviewPlayerView:this.videoConfig.playerView==="preview"},R&&(!this.isInited||A)&&{projectId:Number(R)}),sl({refreshAuthToken:v,userSalt:u,config:this.statisticsConfig},this.interactiveController&&{useIsid:!0,isid:this.prevIsid}))}catch(U){console.error(U),this.log({message:U.message})}}),Vc.create("ui"),this.logger=new UI,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new o$,this.interactiveSubscription=new o$,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=es(Bv,{target:this.playerContainer}))})}connectedCallback(){var e,i;if(this.rootContainer)return;this.initPlayerRootContainers();let o=(e=this.getAttribute("stub-title"))!=null?e:void 0,s=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=ri({title:o,thumbUrl:s}),l={target:this.playerContainer,props:a};this.svelteStubComponent=es(Nv,l),this.sveltePersistentLayerComponent=es(Uv,{target:this.playerContainer,props:Wv}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;Wv.animationDuration=e,Wv.playbackStatusShow=i&&o}disconnectedCallback(){var e,i,o,s,a,l,d;this.shadowDOMCallbacksDisabled||((e=this.annotationsApi)==null||e.destroy(),(i=this.slotsApi)==null||i.destroy(),(o=this.focusManager)==null||o.destroy(),(s=this.mediaSessionApi)==null||s.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteErrorComponent),this.unmountComponent(this.sveltePersistentLayerComponent),this.subscription.unsubscribe(),(a=this.unsubscribePlayerPhaseSubscription)==null||a.call(this),(l=this.interactiveController)==null||l.destroy(),this.interactiveSubscription.unsubscribe(),(d=this.internalsExposure)==null||d.destroy(),Vc.destroy("ui"))}initPlayerRootContainers(){this.rootContainer=document.createElement("div"),this.rootContainer.style.position="relative",this.rootContainer.className="root-container",this.rootContainer.style.width="100%",this.rootContainer.style.height="100%",this.rootContainer.style.minHeight="206px",this.shadowRootContainer=document.createElement("div"),this.shadowRootContainer.style.position="absolute",this.shadowRootContainer.className="shadow-root-container",this.shadowRootContainer.style.width="100%",this.shadowRootContainer.style.height="100%",this._shadowRoot=this.shadowRootContainer.attachShadow({mode:"open"}),this.playerContainer=document.createElement("div"),this.playerContainer.style.all="initial",this.playerContainer.style.display="block",this.playerContainer.style.contain="strict",this.playerContainer.style.width="100%",this.playerContainer.style.height="100%",this._shadowRoot.append(this.playerContainer),this.rootContainer.append(this.shadowRootContainer),this.stateContainer=document.createElement("div"),this.stateContainer.className="state-container",this.stateContainer.style.width="1px",this.stateContainer.style.height="1px",this.stateContainer.style.position="absolute",this.stateContainer.style.backgroundColor="transparent",this.stateContainer.style.left="-100000px",this.append(this.rootContainer),this.append(this.stateContainer)}needToShowNextPrevButtons(){return this.videoConfig?this.videoConfig.videos.length>1&&this.videoConfig.showNextPrevButtons:!1}isNextButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1||this.needToRepeatPlaylist):!1}isPrevButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex>0||this.needToRepeatPlaylist):!1}isControlDisabled(e){var i;let o=(i=this.store)==null?void 0:i.ui.controls.disabledControls$;return(o==null?void 0:o.includes(e))||!1}getNextVideoInfo(){if(!this.videoConfig)return{nextVideoTitle:void 0,nextVideoThumb:void 0};let e=this.videoConfig.videos[this.currentPlayingVideoIndex+1]||{};return{nextVideoTitle:e.title,nextVideoThumb:e.thumbUrl}}createThinOneStat(e,i={}){if(!this.videoConfig)return;let{deviceId:o,preload:s,refreshStatAuthToken:a}=Tc(this.videoConfig,i),{unitedVideoId:l}=e;if(this.uiConfig.features.thinStatistics&&l)return new jI.ThinOneStat({deviceId:o,movieId:l,preload:s,isPreviewPlayerView:this.videoConfig.playerView==="preview"},{config:this.statisticsConfig,refreshAuthToken:a})}createPlayer(e,i={},o){var s,a,l,d,r,u,f,p,v,b;if(!this.videoConfig)return;let{albumId:y,statPlace:_,statAuthToken:w,preload:I,autoplay:T,volume:R,muted:A,fromTime:P,canRewindLive:E,supportLink:z,showAds:U,adsSlotId:W,adsParams:Y={},adsAutoplayParam:te,interfaceLanguage:J,isCyrillicRelatedInterface:oe,logoClickable:de,logoHidden:ae,isMobile:pe,isTouch:ee,isAudioDisabled:$e,isLiveCatchUpMode:Ee,fullScreenTarget:ce,failoverHosts:Qe,canDownload:fe,callbacks:ve,interactiveData:X,showThumbTimer:N,additionalButtons:me=[],additionalSettingsMenuItems:ue=[],additionalContextMenuItems:Re=[],repeat:Je,loop:Ae,saveRate:j,volumeMultiplier:ne,showEndScreen:Se,showAutoplayNext:Le,mediascopePixels:ze}=Tc(this.videoConfig,i),{sources:Ce,title:we,thumbUrl:He,unitedVideoId:rt,isClip:ct=!1,duration:Mt,adsParams:lt={},videoEpisodes:ni,previewThumbsData:wt,subtitles:Rt,subtitlesForcedLanguage:Dt,live:Qt,adsExternalApi:Te,adsJson:G}=e;if(!Ce&&!Qt){let si=new Error("empty sources and live");this.fatalError$.next(si),(s=ve.onCrashed)==null||s.call(ve,si.message);return}let Ne=sl(sl({},Y),lt),be=this.getNextVideoInfo(),Oe={sources:Ce,title:we,thumbUrl:He,subtitles:Rt,subtitlesForcedLanguage:Dt,unitedVideoId:rt,isClip:ct,live:Qt,albumId:y,statPlace:_,autoplay:T,muted:A,volume:R,fromTime:P,canRewindLive:E,showAds:U,adsSlotId:W,adsParams:Ne,adsAutoplayParam:te,duration:Mt,logoClickable:de,logoHidden:ae,isTouch:ee!=null?ee:pe,repeat:Je,loop:Ae,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:be.nextVideoTitle,endScreenVideoThumb:be.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},Ie={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(Oe)}`});let ht=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),ye=(ht==null?void 0:ht.oneStat)||this.createOneStat(e,i),qe=this.createThinOneStat(e,i),Ue;ze&&(Ue=new XI({pixels:ze})),(ye||qe)&&(this.statistics=new Gu(ye,qe,Ue,ht==null?void 0:ht.statSubscription));let st=this.uiConfig.features.apptracer.enabled?new DI("videoplayer",this.uiConfig.features.apptracer,{version:Ml,env:bu},BI({movieId:rt,albumId:y,place:_,autoplay:(l=T&&!this.interactiveController)!=null?l:!1,mobile:ee!=null?ee:pe,clip:ct})):void 0;this.interactiveController&&((u=this.prevIsid)!=null||(this.prevIsid=(r=(d=this.statistics)==null?void 0:d.oneStat)==null?void 0:r.isid$.getValue()));let qt=!!X,Pt=[],Yt="tooltip_interactive_go_back_disabled_first";if(qt&&this.interactiveController){let si=this.interactiveController.state.isInitialChapter$.getValue(),ut=this.interactiveController.getHistoryState();si&&Pt.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Pt.push("SEEK_TO_INTERACTIVE_BUTTON"),ut.hasPrevChapter$.getValue()||(Pt.push("PLAY_PREV_CHAPTER_BUTTON"),si||(ut.isGoBackLimited$.getValue()?Yt="tooltip_interactive_go_back_disabled_limit":Yt="tooltip_interactive_go_back_disabled"))}let bi=()=>{var si;this.isInited=!1,this.prevIsid=void 0;let ut=(o==null?void 0:o.info.isEnded$.getValue())&&((si=this.interactiveController)==null?void 0:si.state.isEndChapter$.getValue());ve.onReplayInteractiveVideo&&!ut?ve.onReplayInteractiveVideo():this.replayInteractiveVideo()},Vi=Je&&this.videoConfig.videos.length===1;this.store=pb({player:o,interfaceLanguage:J,isCyrillicRelatedInterface:oe,videoId:rt,isClip:ct,isLiveCatchUpMode:Ee,isAudioDisabled:$e,statAuthToken:w,callbacks:ve,webApi:Ie,videoEpisodes:ni,previewThumbsData:wt,canDownload:fe,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,disabledControls:Pt,isInteractive:qt,saveRate:j,interactiveRanges$:(f=this.interactiveController)==null?void 0:f.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:bi,playPrevChapterDisabledTooltip:Yt,hasInteractiveBranches:!!((b=(v=this.interactiveController)==null?void 0:v.getChapterBranches())!=null&&b.length),additionalButtons:this.uiConfig.features.additionalButtons?me:[],additionalSettingsMenuItems:ue!=null?ue:[],additionalContextMenuItems:Re!=null?Re:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:si=>{var ut;return(ut=this.sveltePersistentLayerComponent)==null?void 0:ut.startVideoChangedAnimation(si)},looped:this.uiConfig.features.useLoopSetting?Ae:Vi,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId,appTracer:st});let{stores:Ai}=this.microStoresRoot=e$(),ji=()=>{var si,ut,di,Xi,It,hi;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(We=>{var at;return(at=ve==null?void 0:ve.onCurrentFormatChanged)==null?void 0:at.call(ve,We)})),this.subscription.add(Ai.interactiveControlsOpacity$.subscribe(We=>{var at;We!==null&&((at=this==null?void 0:this.interactiveController)==null||at.setDisabledControls(We))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(We=>{var at;return(at=ve==null?void 0:ve.onThroughputEstimationChanged)==null?void 0:at.call(ve,We)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(We=>{var at;return(at=ve==null?void 0:ve.onTrafficSavingEnabledChanged)==null?void 0:at.call(ve,We)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(We=>{var at;return(at=ve==null?void 0:ve.onHighQualityEnabledChanged)==null?void 0:at.call(ve,We)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(We=>{var at;return(at=ve==null?void 0:ve.onAutoQualityEnabledChanged)==null?void 0:at.call(ve,!!We)})),this.subscription.add(new zI(We=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(at=>We.next(at)))}).pipe(QI(1)).subscribe(We=>{var at;return(at=ve==null?void 0:ve.onCurrentPlaybackRateChanged)==null?void 0:at.call(ve,We)})),this.subscription.add(this.store.state.volume$.subscribe(We=>{var at;return(at=ve==null?void 0:ve.onVolumeChange)==null?void 0:at.call(ve,We)})),this.subscription.add(this.store.state.muted$.subscribe(We=>{var at,Ci,Zi,bo;if(We)(at=ve==null?void 0:ve.onMute)==null||at.call(ve);else{let Ao=(Zi=((Ci=this.store)==null?void 0:Ci.state.volume$)&&_e(this.store.state.volume$))!=null?Zi:0;(bo=ve==null?void 0:ve.onUnmute)==null||bo.call(ve,Ao)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(We=>{var at;return(at=ve==null?void 0:ve.onVideoBitrateChanged)==null?void 0:at.call(ve,We)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(We=>{var at;let Ci=(at=this.store)==null?void 0:at.ui.controls.disabledControls$;Ci&&(We&&!Ci.includes(Ad)&&Ci.add(Ad),We||Ci.remove(Ad))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(We=>mp(this,null,function*(){var at;if(!n$.browser.isSamsungBrowser||!We||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&(yield this.replayInteractiveChapter((at=this.videoConfig)==null?void 0:at.callbacks.onExternalFullscreenExit))}))),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(We=>{var at;return(at=ve==null?void 0:ve.onVSIDChanged)==null?void 0:at.call(ve,We)})),this.initMediaSession(),D(er,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:Ce,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:we,thumbUrl:He,subtitles:Rt,subtitlesForcedLanguage:Dt,live:Qt,preload:I,autoplay:T,muted:A,volume:R,fromTime:P,canRewindLive:E,supportLink:z,showAds:U,adsSlotId:W,adsParams:Ne,adsAutoplayParam:te,duration:Mt,logoClickable:de,logoHidden:ae,isMobile:ee!=null?ee:pe,failoverHosts:Qe,fullScreenTarget:ce,saveRate:j,shadowRootContainer:this.shadowRootContainer,showMiniTimer:N,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:be.nextVideoTitle,endScreenVideoThumb:be.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:ne,showEndScreen:Se,showAutoplayNext:Le,adsExternalApi:Te,adsJson:G,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let ui={target:this.playerContainer,props:n(er)};this.svelteRootComponent=es(Dv,ui),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(di=(ut=(si=this.videoConfig)==null?void 0:si.callbacks)==null?void 0:ut.onInited)==null||di.call(ut)),(Xi=this.internalsExposure)==null||Xi.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((hi=(It=this.videoConfig)==null?void 0:It.callbacks)!=null&&hi.onDevNullLog)?Vc.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Vc.destroy("ui")};this.coreConfig.asyncResolveClientChecker?n$.isInited$.subscribe(si=>{si&&(console.log("UI SDK async start"),ji())}):ji()}addPlayerInfoSubscriptions(){var e,i;let o=this.store,s=(e=this.microStoresRoot)==null?void 0:e.stores;if(!o||!s)return;let a=(i=this.videoConfig)==null?void 0:i.callbacks;a&&this.subscription.add(o.playerPhase.subscribe(d=>{var r;return(r=a.onPlayerPhaseChanged)==null?void 0:r.call(a,d)})).add(o.state.playbackState$.subscribe(d=>{var r;return d&&((r=a.onPlaybackStateChanged)==null?void 0:r.call(a,d))})).add(o.state.playbackStateRealistic$.subscribe(d=>{d?this.stateContainer.setAttribute("data-playback-state",d):this.stateContainer.removeAttribute("data-playback-state")})).add(o.state.isLive$.subscribe(d=>{var r;return(r=a.onIsLiveChanged)==null?void 0:r.call(a,d)})).add(o.state.isActiveLive$.subscribe(d=>{var r;return(r=a.onIsActiveLiveChanged)==null?void 0:r.call(a,d)})).add(o.state.isAudioAvailable$.subscribe(d=>{var r;return(r=a.onIsAudioAvailableChanged)==null?void 0:r.call(a,d)})).add(o.state.currentQuality$.subscribe(d=>{var r;return(r=a.onCurrentQualityChanged)==null?void 0:r.call(a,d)})).add(o.state.availableQualities$.subscribe(d=>{var r;return(r=a.onAvailableQualitiesChanged)==null?void 0:r.call(a,d.map(({value:u})=>u).filter(u=>u!=="auto"))})).add(o.state.availableAudioStreams$.subscribe(d=>{d.length>1&&a.onAudioLanguagesAvailable&&a.onAudioLanguagesAvailable()})).add(s.pictureInPicture$.isActive$.subscribe(d=>{var r,u,f;qu(this.pictureInPictureApi)&&this.uiConfig.features.dpip&&!((r=this.videoConfig)!=null&&r.playerView)&&o.actions.external.setMinimalMode(d),d?(u=a.onPiPEnter)==null||u.call(a):(f=a.onPiPExit)==null||f.call(a)}));let l=a==null?void 0:a.uiInfo;l&&this.subscription.add(o.ui.controlsVisible.subscribe(d=>{var r;return(r=l.onControlsVisibleChanged)==null?void 0:r.call(l,d)})).add(o.ui.isMobile.subscribe(d=>{var r;return(r=l.onIsMobileChanged)==null?void 0:r.call(l,d)})).add(o.ui.playerSize.subscribe(d=>{var r;return(r=l.onPlayerSizeChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.prevButton.subscribe(d=>{var r;return(r=l.onPrevButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.playButton.subscribe(d=>{var r;return(r=l.onPlayButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.replayButton.subscribe(d=>{var r;return(r=l.onReplayButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.nextButton.subscribe(d=>{var r;return(r=l.onNextButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.playPrevChapterButton.subscribe(d=>{var r;return(r=l.onPlayPrevChapterChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.seekToInteractiveButton.subscribe(d=>{var r;return(r=l.onSeekToInteractiveButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.interactiveGraphButton.subscribe(d=>{var r;return(r=l.onGraphButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.liveButton.subscribe(d=>{var r;return(r=l.onLiveButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.time.subscribe(d=>{var r;return(r=l.onTimeUpdateChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.episodes.subscribe(d=>{var r;return(r=l.onEpisodesChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.subtitles.subscribe(d=>{var r;return(r=l.onSubtitlesChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.topLeft.subscribe(d=>{var r;return(r=l.onTopLeftControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.topRight.subscribe(d=>{var r;return(r=l.onTopRightControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.bottomLeft.subscribe(d=>{var r;return(r=l.onBottomLeftControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.bottomRight.subscribe(d=>{var r;return(r=l.onBottomRightControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.middle.subscribe(d=>{var r;return(r=l.onMiddleControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.bottom.subscribe(d=>{var r;return(r=l.onBottomControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.videoTitleInfo.subscribe(d=>{var r;return(r=l.onTitleChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.settings.subscribe(d=>{var r;return(r=l.onSettingsChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.fullscreen.subscribe(d=>{var r;return(r=l.onFullscreenChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.chromecast.subscribe(d=>{var r;return(r=l.onChromecastChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.pip.subscribe(d=>{var r;return(r=l.onPipChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls["theater-mode-button"].subscribe(d=>{var r;return(r=l.onTheaterModeChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.vkLogo.subscribe(d=>{var r;return(r=l.onVkLogoChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.interactiveTimeIndicator.subscribe(d=>{var r;return(r=l.onInteractiveTimeIndicatorChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.timeline.subscribe(d=>{var r;return(r=l.onTimelineChanged)==null?void 0:r.call(l,d)}))}playNextVideo(){this.videoConfig&&(this.currentPlayingVideoIndex++,this.currentPlayingVideoIndex>=this.videoConfig.videos.length&&(this.currentPlayingVideoIndex=0),this.log({message:`play next video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}playPrevVideo(){this.videoConfig&&(this.currentPlayingVideoIndex--,this.currentPlayingVideoIndex<0&&(this.currentPlayingVideoIndex=this.videoConfig.videos.length-1),this.log({message:`play prev video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}createPlayerWithCurrentVideo(e,i=!0){var o;if(!this.videoConfig)return;let s=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!s){this.log({message:"no next video"});return}this.isInited&&i$(s.unitedVideoId)&&((o=this.store)==null||o.actions.internal.nextMovie(s.unitedVideoId)),this.unmountComponent(this.svelteRootComponent),this.createPlayer(s,{autoplay:i,fromTime:0},e)}playPrevChapter(){var e;(e=this.interactiveController)==null||e.playPrevChapter()}seekToInteractive(){var e;let i=(e=this.interactiveController)==null?void 0:e.getNextInteractiveStartTime();typeof i=="number"&&this.seekTime(i/1e3)}initInteractives(){return mp(this,null,function*(){var e,i,o,s,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=yield import("@vkontakte/videoplayer-interactive/es2015");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let r=(i=this.store)==null?void 0:i.interfaceLanguage$,u=r?_e(r):this.videoConfig.interfaceLanguage,{projectInfo:f,initChapterId:p,historyApi:v,videoLoader:b}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:f,initChapterId:p,historyApi:v,vkVideoLoader:b,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,isTouch:this.videoConfig.isTouch,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation,controlsTapPlace:this.uiConfig.features.interactiveControlsTapPlace,controlsFillAnimation:this.uiConfig.features.interactiveControlsFillAnimation,controlsHideAnimation:this.uiConfig.features.interactiveControlsHideAnimation},endChapterHistoryFix:this.uiConfig.features.interactiveHistoryEndChapterFix});let{isInteractiveExpectation$:y,isSeekable$:_}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(_.subscribe(I=>{if(!this.isInited)return;let T=this.store;I?T.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):T.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(y.subscribe(I=>{this.store&&this.store.state.isInteractiveExpectation$.set(I)}));let w=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(I=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]=RI(sl({},I.config),{title:(f==null?void 0:f.title)||I.config.title});let T=w?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(I.player,T),w&&(w=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:I,actionType:T})=>{var R,A,P,E,z,U;if(!this.store||!this.microStoresRoot)return;let W=y.getValue();if(I==="action-choice"&&T==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Ld)),I==="action-choice-canceled"){let Y=_e(this.store.state.isPlaying$)||W;if(((P=(R=this.videoConfig)==null?void 0:R.isTouch)!=null?P:(A=this.videoConfig)!=null&&A.isMobile)&&Y){this.store.ui.interactiveHideMobileControls.set(!0);return}(U=(E=this.videoConfig)==null?void 0:(z=E.callbacks).onDisabledInteractiveClick)==null||U.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(Ld)})),yield this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(s=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&s.onInteractiveHistoryChanged){let I=this.interactiveController.getHistoryState();this.subscription.add(I.history$.subscribe(T=>{var R,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,s,a,l,d,r,u,f,p,v,b,y,_,w,I,T,R,A,P,E;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),(s=(o=e.callbacks)==null?void 0:o.onCrashed)==null||s.call(o,z.message);return}else this.fatalError$.next(null);this.videoConfig=Tc(ZI,FI(e,z=>z instanceof zv?z:void 0)),this.playerId=qI(e.playerId),this.uiConfig=Rh((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.uiConfig.features.exposeInternalsToGlobal&&((r=this.internalsExposure)!=null||(this.internalsExposure=new KI("ui",this.playerId))),Vc.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((u=this.videoConfig)==null?void 0:u.showAds)],numbers:[OI()]}),i$(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(p=(f=this.uiConfig.features.mediaSession)!=null?f:this.videoConfig.isMediaSessionEnabled)!=null?p:!0),this.uiConfig.ads.paramsOverride=sl({preview:(v=this.uiConfig.ads.preview)!=null?v:this.videoConfig.adsPreviewParam},this.uiConfig.ads.paramsOverride),this.videoConfig.isTouch=(y=(b=this.uiConfig.isMobile)!=null?b:this.videoConfig.isTouch)!=null?y:this.videoConfig.isMobile,(_=this.videoConfig).autoplay&&(_.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(w=this.uiConfig.ads.enable)!=null?w:this.videoConfig.showAds,this.videoConfig.adsSlotId=(I=this.uiConfig.ads.slot)!=null?I:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((T=this.uiConfig.showLogo)!=null?T:!this.videoConfig.logoHidden),(R=this.videoConfig).canRewindLive&&(R.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(A=this.videoConfig.supportLink)!=null?A: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&&((P=this.videoConfig.videos)!=null&&P[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip&&(this.pictureInPictureApi=km(this.videoConfig.pipEnabled!==!1,this.uiConfig.features.dpip)),this.mediaSessionApi=this.uiConfig.features.mediaSession?new lp:void 0,this.slotsApi=this.uiConfig.features.slots?new rp(this.uiConfig.disabledSlotIds):void 0,this.annotationsApi=this.uiConfig.features.annotations?new dp(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new fp(this._shadowRoot):void 0,this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.isInited=!1,this.prevIsid=void 0,this.interactiveController&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveSubscription.unsubscribe()),this.videoConfig.interactiveData?this.initInteractives():this.createPlayer(this.videoConfig.videos[this.currentPlayingVideoIndex]),qu(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(E=this.slotsApi)==null||E.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(er)&&(n(er).showNextPrevButtons=this.needToShowNextPrevButtons(),n(er).nextButtonActive=this.isNextButtonActive(),n(er).prevButtonActive=this.isPrevButtonActive(),n(er).endScreenVideoTitle=o.nextVideoTitle,n(er).endScreenVideoThumb=o.nextVideoThumb,n(er).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}=sl({},this.videoConfig.videos[this.currentPlayingVideoIndex]),o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",s=>this.seekTime(s.seekTime)]];this.videoConfig.videos.length>1&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1&&o.push(["nexttrack",()=>{var s,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(s=this.videoConfig)==null?void 0:s.callbacks)==null?void 0:a.onNextVideoClick)==null||l.call(a)}catch(d){this.log({message:"onNextVideoClick callback failed to execute"})}else this.playNextVideo()}]),this.currentPlayingVideoIndex>0&&o.push(["previoustrack",()=>{var s,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(s=this.videoConfig)==null?void 0:s.callbacks)==null?void 0:a.onPrevVideoClick)==null||l.call(a)}catch(d){this.log({message:"onPrevVideoClick callback failed to execute"})}else this.playPrevVideo()}])),this.mediaSessionApi.setMetaData({title:e,thumbUrl:i}),this.mediaSessionApi.updateActionHandlers(o),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}setupMediaSessionForAds(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let e="Реклама",i=[["play",()=>this.play()],["pause",()=>this.pause()]];this.mediaSessionApi.setMetaData({title:e}),this.mediaSessionApi.updateActionHandlers(i),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}moveTo(e){this.shadowDOMCallbacksDisabled=!0,e.append(this),this.shadowDOMCallbacksDisabled=!1}play(){var e,i,o,s;this.isControlDisabled("PLAY_BUTTON")||(e=this.store)!=null&&e.playerPhase.is("LiveWaitingStart")||(i=this.store)!=null&&i.playerPhase.is("LiveWaitingRecover")||(o=this.store)!=null&&o.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),(s=this.svelteRootComponent)==null||s.play())}pause(){var e;this.log({message:"pause"}),(e=this.svelteRootComponent)==null||e.pause()}stop(){var e;if(!this.videoConfig)return;this.log({message:"stop"});let i=!!this.interactiveController;i&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveContainer=void 0,this.interactiveSubscription.unsubscribe()),this.unmountComponent(this.svelteStubComponent),(e=this.mediaSessionApi)==null||e.destroy();let o=this.videoConfig.videos[0];o&&(this.unmountComponent(this.svelteRootComponent),i?(this.videoConfig.autoplay=!1,this.initInteractives()):this.createPlayer(o))}setMuted(e){var i;this.log({message:`set muted, muted: ${e}`}),(i=this.svelteRootComponent)==null||i.setMuted(e)}toggleSubtitle(){var e;this.log({message:"toggle subtitle"}),(e=this.svelteRootComponent)==null||e.toggleSubtitle()}changeSubtitle(e,i){var o;this.log({message:"change subtitle"}),(o=this.svelteRootComponent)==null||o.changeSubtitle(e,i)}hideControls(){var e;this.log({message:"hide controls"}),(e=this.svelteRootComponent)==null||e.hideControls()}showControls(){var e;this.log({message:"show controls"}),(e=this.svelteRootComponent)==null||e.showControls()}setPiPEnabled(e){var i,o;(o=(i=this.store)==null?void 0:i.webApi.pictureInPictureApi)==null||o.setEnabled(e)}setVolume(e){var i;this.log({message:`set volume, volume: ${e}`}),(i=this.svelteRootComponent)==null||i.setVolume(e)}setRepeat(e){this.log({message:`set repeat, repeat: ${e}`}),this.needToRepeatPlaylist=e,n(er)&&(n(er).needToRepeatPlaylist=this.needToRepeatPlaylist,n(er).showNextPrevButtons=this.needToShowNextPrevButtons(),n(er).nextButtonActive=this.isNextButtonActive(),n(er).prevButtonActive=this.isPrevButtonActive())}seekTime(e){var i;this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekTime(e))}seekEpisodeStartTime(e){var i;this.log({message:`seek episode start time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekEpisodeStartTime(e)}returnFocusToEpisodes(){var e;this.log({message:"return focus to episodes button"}),(e=this.svelteRootComponent)==null||e.returnFocusToEpisodes()}setPlaybackRate(e){var i;this.log({message:`set playback rate to: ${e}`}),(i=this.svelteRootComponent)==null||i.setPlaybackRate(e)}setAutoQualityLimits(e){var i,o,s;this.log({message:`set auto quality limitation. Max: ${(i=e.max)!=null?i:"none"}. Min: ${(o=e.min)!=null?o:"none"}`}),(s=this.svelteRootComponent)==null||s.setAutoQualityLimits(e)}setAutoQuality(){var e;(e=this.svelteRootComponent)==null||e.setAutoQuality()}toggleTrafficSaving(e){var i;(i=this.svelteRootComponent)==null||i.toggleTrafficSaving(e)}toggleHighQuality(e){var i;(i=this.svelteRootComponent)==null||i.toggleHighQuality(e)}changeAudioStream(e){var i;(i=this.svelteRootComponent)==null||i.changeAudioStream(e)}addLanguage(e){var i;(i=this.store)==null||i.actions.internal.addLanguage(e)}setLanguage(e){return mp(this,null,function*(){var i;yield(i=this.store)==null?void 0:i.actions.internal.setLanguage(e)})}setLiveStart(e){var i,o;let s=this.isLiveTailPlaying();this.log({message:`live started: liveTailPlaying = ${s}`}),s||((i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!1),(o=this.store)==null||o.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){var e;this.log({message:"live waiting"}),(e=this.store)==null||e.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){var e;let i=(e=this.store)==null?void 0:e.getPlayer();if(!i)return!1;let{info:o}=i;return o.canPlayLiveTailBuffer$.getValue()&&!o.isStalled$.getValue()&&!o.atLiveEdge$.getValue()}setLiveWaitingRecover(e=!1){var i;let o=this.isLiveTailPlaying(),s=e||!o;this.log({message:`live waiting recover: forceImmediate = ${e}, liveTailPlaying = ${o}`});let a=()=>{var l;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!0)};s&&a(),(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var l;s||a(),(l=this.store)==null||l.destroy()})}setLiveWaitingRecord(){var e;let i=this.isLiveTailPlaying(),o=!i;this.log({message:`live waiting record: liveTailPlaying = ${i}`});let s=()=>{var a;(a=this.store)==null||a.actions.internal.setLiveWaitingRecord(!0)};o&&s(),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var a;o||s(),(a=this.store)==null||a.destroy()})}setLiveEnd(e){var i;let o=this.isLiveTailPlaying(),s=!o;this.log({message:`live ended: liveTailPlaying = ${o}`});let a=()=>{var l,d;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!1),(d=this.store)==null||d.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};if(s){a();return}(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=a)}setLiveLowLatency(e){var i;this.log({message:"live switch to low latency "+e}),(i=this.store)==null||i.actions.external.setLiveLowLatency(e)}setLooped(e){var i;(i=this.store)==null||i.actions.internal.setLooped(e)}getDebugData(){var e,i;return(i=(e=this.store)==null?void 0:e.actions.internal.getDebugTextData())!=null?i:""}getDeviceId(){var e,i,o;return(o=(i=(e=this.statistics)==null?void 0:e.oneStat)==null?void 0:i.getDeviceId())!=null?o:void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}replayInteractiveChapter(e){return mp(this,null,function*(){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let s=_e(this.store.state.positionExact$),l=_e(this.store.state.interactiveEpisodes$).find(r=>!r.completed);this.interactiveController.events.playerChanged$.pipe(WI()).subscribe(()=>{l&&s>=l.time?this.seekTime(l.time):this.seekTime(s),e==null||e()});let d=this.interactiveController.getCurrentChapter();yield this.interactiveController.setChapter({chapterId:(o=d==null?void 0:d.chapter)==null?void 0:o.id,pushToHistory:!1})}})}showInteractiveIndicatorTooltip(e,i=!1){var o;(o=this.microStoresRoot)==null||o.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){var e;(e=this.store)==null||e.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}handleTimerNextVideo(e){var i;(i=this.store)==null||i.actions.internal.setTimerNextVideoRunning(e)}togglePictureInPicture(){var e;(e=this.store)==null||e.actions.internal.togglePictureInPicture()}focus(){var e,i,o;(o=(i=(e=this.svelteRootComponent)==null?void 0:e.keyboardControls)==null?void 0:i.focus)==null||o.call(i)}restoreFocus(){var e;(e=this.focusManager)==null||e.restoreFocus()}handleExternalKeyboardEvent(e){var i,o;return!!((o=(i=this.svelteRootComponent)==null?void 0:i.keyboardControls)!=null&&o.handleExternalKeyboardEvent(e))}setAutoplayNext(e){var i;(i=this.store)==null||i.actions.internal.setAutoplayNextEnabled(e)}getTotalViewTime(){var e,i;return(i=(e=this.statistics)==null?void 0:e.thinOneStat)==null?void 0:i.getTotalViewTime()}unmountComponent(e){e&&Oa(e)}};import{InterfaceLanguage as Vne,VKNumericLanguage as Rne,loadVKLangPack as Dne}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as Nne,VideoFormat as Bne}from"@vkontakte/videoplayer-core/es2015";var Cne=()=>{window.customElements.define("vk-video-player",vp)};export{Yu as ControlButtonType,xs as GridTypes,Vne as InterfaceLanguage,zd as MenuItemType,ws as PlayerPhase,Ml as VERSION,Rne as VKNumericLanguage,Bne as VideoFormat,Nne as VideoQuality,Hl as isDpipSupported,ha as isPiPSupported,Dne as loadVKLangPack,Cne as registerPlayerWebComponent};
|
|
58
|
+
M12 29.8c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6H13.8a1.8 1.8 90 01-1.8-1.8m0-7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6H13.8a1.8 1.8 90 01-1.8-1.8m17 7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6h-3.4a1.8 1.8 90 01-1.8-1.8M22 22.2c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6h-10.4a1.8 1.8 90 01-1.8-1.8`)),b(m,p)};M(d,m=>{e.type==="off"?m(r):m(u,!1)})}b(s,l)},$$slots:{default:!0}}),F()}function sm(t,e){H(e,!0);let i=g(e,"isSubtitlesEnabled",3,!1),s=ye().ui.t,a=f(()=>i()?s("tooltip_subtitles_on"):s("tooltip_subtitles_off"));Ht(t,{testId:"subtitles-btn",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return hs.KeyC},role:"button",children:(l,d)=>{let r=f(()=>i()?void 0:"outline");pa(l,{get size(){return"24"},get type(){return n(r)}})},$$slots:{default:!0}}),F()}var B0=A('<span class="duration s-1z" data-testid="video_duration"> </span>'),H0=A('<div data-testid="time"><span class="current s-1z" data-testid="current_time"> </span> <!></div>'),F0={hash:"s-1z",code:'.time.s-1z{align-items:center;color:var(--controls-time);display:flex;font-variant-numeric:tabular-nums;font-weight:500;padding:12px 6px}.time.mobile.s-1z{padding:0 0 0 8px}.current.s-1z{position:relative}.duration.s-1z{opacity:.7}.duration.s-1z:before{content:" / ";white-space:pre}'};function jd(t,e){H(e,!0),Q(t,F0);let i=g(e,"isMobile",3,!1),o=g(e,"isHidden",3,!1),s=g(e,"showDuration",3,!0),a=g(e,"ref",15),l=Mt(),d=re(!1),r=f(()=>tn(e.duration)),u=f(()=>tn(e.position));var m=H0();let p;var v=C(m),$=C(v,!0);S(v);var y=P(v,2);{var h=x=>{var I=B0(),T=C(I,!0);S(I),N(()=>ge(T,n(r))),b(x,I)};M(y,x=>{s()&&x(h)})}S(m),Ds(m,()=>Ol(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),tt(m,x=>a(x),()=>a()),N(x=>{p=ie(m,1,"time s-1z",null,p,x),ge($,n(u))},[()=>({mobile:i()})]),b(t,m),F()}import{noop as Bu}from"@vkontakte/videoplayer-shared/es2015";var U0=ke('<path d="M21.8632 10.0832C22.2147 9.73171 22.7852 9.73171 23.1367 10.0832C23.4881 10.4347 23.4881 11.0051 23.1367 11.3566L18.6367 15.8566C18.2852 16.2081 17.7147 16.2081 17.3632 15.8566C17.0117 15.5051 17.0117 14.9347 17.3632 14.5832L21.8632 10.0832Z"></path><path d="M17.3632 11.3566C17.0117 11.0051 17.0117 10.4347 17.3632 10.0832C17.7147 9.73171 18.2852 9.73171 18.6367 10.0832L23.1367 14.5832C23.4881 14.9347 23.4881 15.5051 23.1367 15.8566C22.7852 16.2081 22.2147 16.2081 21.8632 15.8566L17.3632 11.3566Z"></path>',1),z0=ke("<path></path>"),W0=ke('<path d="M14 3C14.5523 3 15 3.44772 15 4V20C15 20.5523 14.5523 21 14 21C13.3585 21 12.7422 20.7509 12.2808 20.3052L6.79013 15H4C2.89543 15 2 14.1046 2 13V11C2 9.89543 2.89543 9 4 9H6.765L12.2794 3.6934C12.7418 3.24852 13.3584 3 14 3Z"></path><!>',1);function fa(t,e){H(e,!0);let i=g(e,"volume",3,1),o=g(e,"muted",3,!1),s=(u,m)=>m?"off":u>.5?"max":u>.2?"mid":u>0?"min":"off",a=f(()=>s(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",r="M19.2636 6.2636C19.6151 5.91213 20.1849 5.91213 20.5364 6.2636C21.2516 6.97878 21.9929 7.99659 22.3989 8.97678C22.7959 9.93525 23.0003 10.9625 23.0003 12C23.0003 13.0374 22.7959 14.0647 22.3989 15.0232C21.9929 16.0034 21.2516 17.0212 20.5364 17.7364C20.1849 18.0879 19.6151 18.0879 19.2636 17.7364C18.9121 17.3849 18.9121 16.8151 19.2636 16.4636C19.8484 15.8788 20.4384 15.0527 20.7359 14.3343C21.0425 13.5943 21.2003 12.801 21.2003 12C21.2003 11.1989 21.0425 10.4057 20.7359 9.66561C20.4384 8.94724 19.8484 8.12124 19.2636 7.5364C18.9121 7.18492 18.9121 6.61508 19.2636 6.2636Z";Xe(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=W0(),v=P(se(p));{var $=h=>{var x=U0();Xt(),b(h,x)},y=h=>{var x=z0();N(()=>De(x,"d",`${d}${n(a)==="max"?r:""}`)),b(h,x)};M(v,h=>{n(a)==="off"?h($):h(y,!1)})}b(u,p)},$$slots:{default:!0}}),F()}import{isNonNullable as q_,noop as Yn}from"@vkontakte/videoplayer-shared/es2015";import{noop as lm}from"@vkontakte/videoplayer-shared/es2015";import{noop as q0}from"@vkontakte/videoplayer-shared/es2015";var K0=A('<div class="overlay"><!></div>');function am(t,e){H(e,!0);let[i,o]=Be(),s=()=>w(l,"$overlayContainer$",i),l=ye().ui.overlayContainer$,d=K(void 0),r=v=>{!v||!n(d)||!v.contains(n(d))||v.removeChild(n(d))},u=v=>{!v||!n(d)||v.contains(n(d))||v.appendChild(n(d))};Fe(()=>{u(s())}),Lt(()=>(u(s()),()=>r(s())));var m=K0(),p=C(m);ei(p,()=>{var v;return(v=e.children)!=null?v:yt}),S(m),tt(m,v=>O(d,v),()=>n(d)),b(t,m),F(),o()}var Q0=A('<div class="tooltip s-1o"><div class="content s-1o"> </div> <div class="tooltip-pointer s-1o"></div></div>'),G0=A("<div><!></div> <!>",1),Y0={hash:"s-1o",code:'.tooltip-wrapper.s-1o{display:flex;flex-direction:column;min-width:0}.full-width.s-1o{width:100%}.tooltip.s-1o{bottom:100%;left:0;opacity:0;position:absolute;transition:opacity .2s,visibility .2s;visibility:hidden}.content.s-1o{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.tooltip-pointer.s-1o{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;line-height:0;position:absolute;width:0}'};function Wa(t,e){H(e,!0),Q(t,Y0);let[i,o]=Be(),s=()=>w(j,"$overlayContainer$",i),a=()=>w(z,"$containerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"content",3,""),r=g(e,"active",15,!1),u=g(e,"translateX",3,0),m=g(e,"translateY",3,0),p=g(e,"isFullWidthWrapper",3,!1),v=g(e,"maxTooltipWidth",3,void 0),$=g(e,"placement",3,"top"),y=g(e,"onVisibilityChange",3,q0),h=5,x=K(void 0),I=K(void 0),T,D=K(0),k=K(0),E=K(0),V=K(0),q=Mt(),L=ye(),z=L.ui.playerSize,j=L.ui.overlayContainer$;Fe(()=>{Pt(()=>{y()(r())})});let te=L.getLogger().createComponentLog("Tooltip component"),ee=be=>{if(!s()||!n(I)||!n(x))return;O(k,h);let W=s().getBoundingClientRect(),Ce=n(x).getBoundingClientRect(),Ae=Ce.width,Qe=n(I).clientWidth,Te=a().width,we=(Ae-Qe)/2,He=Ce.left+u()-W.left,st=He+we,ct=Ce.top+m()-W.top,It=Qe/2-h,lt=st<8,ai=st+Qe>Te-8;be==="top-left"&&(st=He),lt&&(st=8,It=He+Ce.width/2-2.5*h),ai&&(st=Te-8-Qe,It=Ce.left-W.left+Ce.width/2-st-h),O(E,st,!0),O(V,ct),O(D,It,!0)},oe=()=>{!s()||!n(I)||!n(x)||O(k,-h)},ae=()=>{if(!s()||!n(I)||!n(x))return;O(D,h);let be=s().getBoundingClientRect(),W=n(x).getBoundingClientRect(),Ce=W.height,Ae=n(I).clientHeight,Qe=(Ce-Ae)/2+Ae,Te=W.left+u()-be.left-n(I).clientWidth,we=2,He=Te-h;He<8&&(He=8);let ct=W.top+m()-be.top+Qe,It=we-Qe/2,lt=we-h;O(E,He,!0),O(V,ct),O(k,It),O(D,lt)},le=()=>{!s()||!n(I)||!n(x)||O(D,-h)},ce=()=>{switch($()){case"top":ee();break;case"bottom":oe();break;case"left":ae();break;case"top-left":ee("top-left");break;default:le();break}},X=()=>{try{if(!s()||!n(x))return;ce(),r(!0)}catch(be){te({message:String(be)})}},_e=()=>{r(!1)},Ee=()=>{n(I)&&(T||(T=window.setTimeout(X,q.controls.hideTimeoutTooltips)),r()&&X())},de=()=>{_e(),window.clearTimeout(T),T=void 0},ze=(be,W,Ce)=>{let Ae="";switch($()){case"top":Ae=`transform: translate(${be}px, ${W}px);`;break;case"bottom":Ae=`transform: translate(${be}px, ${W}px); top: auto; bottom: 100%;`;break;case"left":Ae=`transform: translate(${be}px, ${W}px); left: 0; right: auto;`;break;default:Ae=`transform: translate(${be}px, ${W}px);`}return Ae+=` max-width: ${v()===void 0?"auto":`${v()}px`};`,Ae+=` opacity: ${Ce?1:0}; visibility: ${Ce?"visible":"hidden"}`,Ae},ue=(be,W)=>{let Ce="";switch($()){case"top-left":case"top":Ce=`transform: translate(${be}px, ${W}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":Ce=`transform: translate(${be}px, ${W}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":Ce=`transform: translate(${be}px, ${W}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:Ce=`transform: translate(${be}px, ${W}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return Ce},pe=f(()=>ze(n(E),n(V),r())),Z=f(()=>ue(n(D),n(k)));Lt(ce),ln(()=>window.clearTimeout(T));var B=G0(),fe=se(B);let me;fe.__pointermove=Ee,fe.__pointerdown=de,fe.__pointerup=function(...be){var W;(W=e.disableMouseupTooltipShow?void 0:Ee)==null||W.apply(this,be)};var Ie=C(fe);ei(Ie,()=>{var be;return(be=e.children)!=null?be:yt}),S(fe),tt(fe,be=>O(x,be),()=>n(x));var ot=P(fe,2);{var Me=be=>{am(be,{children:(W,Ce)=>{var Ae=Q0(),Qe=C(Ae),Te=C(Qe,!0);S(Qe);var we=P(Qe,2);S(Ae),tt(Ae,He=>O(I,He),()=>n(I)),N(()=>{Ke(Ae,n(pe)),ge(Te,d()),Ke(we,n(Z))}),b(W,Ae)},$$slots:{default:!0}})};M(ot,be=>{d()&&!l()&&be(Me)})}N(be=>me=ie(fe,1,"tooltip-wrapper s-1o",null,me,be),[()=>({"full-width":p()})]),ht("pointerenter",fe,Ee),ht("pointerleave",fe,de),b(t,B),F(),o()}et(["pointermove","pointerdown","pointerup"]);var K_=t=>{t.stopPropagation()},j0=A("<div><!></div>"),X0={hash:"s-1j",code:".btn-container.s-1j{align-items:center;display:flex;height:100%;position:relative;transition:var(--button-hover-transition);will-change:opacity;-webkit-tap-highlight-color:transparent}.w-max.s-1j{min-width:0;width:100%}"};function Do(t,e){H(e,!0),Q(t,X0);let[i,o]=Be(),s=()=>w(u,"$isGraphOpened$",i),a=()=>w(r,"$isMobile",i),l=ye(),d=wo(),r=l.ui.isMobile,u=d.graphIsOpened$,m=l.ui.t,p=g(e,"className",3,""),v=g(e,"disabled",3,!1),$=g(e,"hasTooltip",3,!0),y=g(e,"ref",15,void 0),h=g(e,"width",15,void 0),x=g(e,"isFullWidthTooltip",3,!0),I=g(e,"tooltipContent",3,""),T=g(e,"tooltipVisible",3,!1),D=g(e,"tooltipPlacement",3,"top"),k=g(e,"disabledTooltipContent",19,()=>m("tooltip_button_disabled")),E=g(e,"isAriaHidden",3,!1),V=g(e,"onTooltipVisibilityChange",3,lm),q=g(e,"initialTranslateXPx",3,0),L=g(e,"initialTranslateYPx",19,()=>-18),z=g(e,"mouseEnter",3,lm),j=g(e,"mouseLeave",3,lm),te=f(()=>v()?s()?m("tooltip_disabled_when_graph_on"):k():I()),ee=K(!1);Fe(()=>{T()||O(ee,!1)});var oe=j0();oe.__pointerdown=[K_],oe.__click=[K_];var ae=C(oe);{var le=X=>{Wa(X,{get content(){return n(te)},get translateX(){return q()},get translateY(){return L()},get isFullWidthWrapper(){return x()},get placement(){return D()},get onVisibilityChange(){return V()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(ee)},set active(_e){O(ee,_e,!0)},children:(_e,Ee)=>{var de=Re(),ze=se(de);ei(ze,()=>{var ue;return(ue=e.children)!=null?ue:yt}),b(_e,de)},$$slots:{default:!0}})},ce=X=>{var _e=Re(),Ee=se(_e);ei(Ee,()=>{var de;return(de=e.children)!=null?de:yt}),b(X,_e)};M(ae,X=>{$()&&n(te)&&!a()?X(le):X(ce,!1)})}S(oe),tt(oe,X=>y(X),()=>y()),N(()=>{var X;ie(oe,1,`btn-container ${(X=p())!=null?X:""}`,"s-1j"),De(oe,"aria-hidden",E()||null)}),ht("mouseenter",oe,function(...X){var _e;(_e=z())==null||_e.apply(this,X)}),ht("mouseleave",oe,function(...X){var _e;(_e=j())==null||_e.apply(this,X)}),kn(oe,"clientWidth",h),b(t,oe),F(),o()}et(["pointerdown","click"]);var Z0=ke('<rect width="20" height="20" rx="10"></rect><path d="m12.53 8.69.06.19-.22-.64a.83.83 0 0 0-1.6.47l.13.48-.23-.85a.82.82 0 0 0-1.6.24l-.73-2.93a.85.85 0 0 0-1.65.4L8 11.34l-1.12-1.16a.8.8 0 0 0-1.21 1.03l2.23 2.94s1.23 1.83 4.3 1.23c2.43-.48 3.25-2.67 2.58-4.88l-.55-2.3a.88.88 0 1 0-1.7.49"></path>',1);function Xd(t,e){let i=f(()=>(e.completed,"interactive-episode-completed-icon"));Xe(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,s)=>{var a=Z0(),l=se(a),d=P(l);N(()=>{De(l,"fill",sa),De(l,"fill-opacity",e.completed?1:.24),De(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),b(o,a)},$$slots:{default:!0}})}var J0=A("<div><!></div>"),ex={hash:"s-16",code:".interactive-episode-icon.s-16{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-16{opacity:.4;pointer-events:none}"};function dm(t,e){H(e,!0),Q(t,ex);let o=ye().ui.t,s=K(0),a=f(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Do(t,{get tooltipContent(){return n(a)},initialTranslateXPx:-10,initialTranslateYPx:-10,get disabled(){return e.disabled},get width(){return n(s)},isAriaHidden:!0,isFullWidthTooltip:!1,children:(l,d)=>{var r=J0();let u;var m=C(r);let p=f(()=>!!e.videoEpisode.completed);Xd(m,{get completed(){return n(p)}}),S(r),N(v=>{u=ie(r,1,"interactive-episode-icon s-16",null,u,v),Ke(r,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),kn(r,"clientWidth",v=>O(s,v)),b(l,r)},$$slots:{default:!0}}),F()}var tx=A('<div><div class="video-episode-inner s-19"><div class="video-episode-loaded s-19"></div> <div></div></div></div>'),ix=A('<div class="video-episodes-wrap s-19"></div>'),ox={hash:"s-19",code:".video-episodes-wrap.s-19{height:100%;position:absolute;width:100%}.video-episode.s-19{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-19:first-child{padding-left:0}.video-episode.s-19:last-child{padding-right:0}.video-episode.s-19:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-19,.video-episode-inner.s-19,.video-episode-loaded.s-19{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-19{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-19:first-child .video-episode-inner:where(.s-19),.video-episode.s-19:last-child .video-episode-inner:where(.s-19){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-19{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-19,.video-episode-loaded.s-19{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-19{background-color:var(--slider-filled-bg)}"};function cm(t,e){Q(t,ox);let i=g(e,"videoEpisodes",19,()=>[]);var o=ix();wi(o,21,i,s=>s.from,(s,a)=>{var l=tx();let d;var r=C(l),u=C(r),m=P(u,2);let p;S(r),S(l),N((v,$)=>{d=ie(l,1,"video-episode s-19",null,d,v),Ke(l,`left: ${n(a).from}%; width: ${n(a).width}%`),Ke(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),p=ie(m,1,"video-episode-filled s-19",null,p,$),Ke(m,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),b(s,l)}),S(o),b(t,o)}function nx(t,e,i,o,s,a,l){if(t.preventDefault(),e()&&O(i,e().getBoundingClientRect(),!0),o()||n(s)||!e())return;O(s,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function rx(t,e,i,o,s,a,l,d){if(t.preventDefault(),e())return;let r=i(t.clientX,t.clientY),u=o(t.clientX);s()(r,u,n(a).width,t),n(l)&&d()(r)}function sx(t,e,i,o,s){if(t.preventDefault(),e()||!n(i))return;O(i,!1);let a=o(t.clientX,t.clientY);s()(a,t)}function ax(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function lx(t,e,i,o,s,a){let l=e(t.clientX,t.clientY);i()&&o()(l),O(s,!1),a()(l)}var dx=A("<div></div>"),cx=A('<div class="bars s-h"><div class="loaded s-h"></div> <div></div></div>'),ux=A('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),px={hash:"s-h",code:'.interactive-icons.s-h{position:absolute;top:-28px;width:calc(100% - 20px)}.interactive-icons.mobile.s-h{top:-10px}.slider.s-h{border-radius:var(--slider-radius);cursor:pointer;height:var(--slider-height);position:relative;touch-action:none;transition:opacity .2s;width:100%;will-change:opacity,transform;-webkit-tap-highlight-color:transparent}.no-handle.s-h{cursor:default}.slider.s-h:before{content:"";height:calc(var(--controls-height)/2);left:0;position:absolute;right:0;top:calc((var(--controls-height)/2 - var(--slider-height))*-1/2)}.bars.s-h{background:var(--slider-bg);overflow:hidden}.bars.s-h,.loaded.s-h{border-radius:var(--slider-radius);height:100%;position:absolute;width:100%}.loaded.s-h{background:var(--slider-loaded-bg);left:-100%;transition:transform .2s;will-change:transform}.filled.s-h{background-color:var(--slider-filled-bg);border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.slider.square.s-h,.slider.square.s-h .filled:where(.s-h),.slider.square.s-h .loaded:where(.s-h),.slider.square.s-h>.bars:where(.s-h){border-radius:unset}.filled.active-live.s-h{background-color:var(--timeline-slider-filled-active-live-bg)}.filled.ads.s-h{background-color:var(--slider-filled-ads)}.handleWrap.s-h{left:-100%;position:absolute;width:100%}.handle.s-h{background-color:var(--slider-handle-bg);border-radius:50%;height:var(--slider-handle-size);opacity:0;position:absolute;right:calc(var(--slider-handle-size)*-1/2);top:calc((var(--slider-height) - var(--slider-handle-size))/2);transform:scale(0);transition:opacity .2s,transform .2s;visibility:hidden;width:var(--slider-handle-size);will-change:opacity,transform}.handle.active-live.s-h{background-color:var(--timeline-slider-handle-active-live-bg)}.handle-always-visible.s-h .handle:where(.s-h),.slider-dragging.s-h .handle:where(.s-h),.slider.s-h:hover .handle:where(.s-h){opacity:1;transform:scale(1);visibility:visible}.slider-dragging.s-h .handle:where(.s-h){transform:scale(1.3)}.slider-vertical.s-h{left:-8px;position:absolute;top:-18px;transform:rotate(-90deg);transform-origin:0 0}.slider.disabled.s-h{cursor:default;opacity:.4}'};function Ka(t,e){H(e,!0),Q(t,px);let i=g(e,"ref",15,void 0),o=g(e,"className",3,""),s=g(e,"testId",3,void 0),a=g(e,"isHidden",3,!1),l=g(e,"isVertical",3,!1),d=g(e,"isActiveLive",3,!1),r=g(e,"isMobile",3,!1),u=g(e,"squareBorders",3,!1),m=g(e,"videoEpisodes",19,()=>[]),p=g(e,"withWheelHandler",3,!1),v=g(e,"isInteractive",3,!1),$=g(e,"disabled",3,!1),y=g(e,"hideHandel",3,!1),h=g(e,"onPointerDown",3,Yn),x=g(e,"onHandleMove",3,Yn),I=g(e,"onPointerUp",3,Yn),T=g(e,"onPointerEnter",3,Yn),D=g(e,"onPointerMove",3,Yn),k=g(e,"onPointerLeave",3,Yn),E=g(e,"onMouseEnter",3,Yn),V=g(e,"onMouseLeave",3,Yn),q=g(e,"onWheelUp",3,Yn),L=g(e,"onWheelDown",3,Yn),z=g(e,"onWheelLeft",3,Yn),j=g(e,"onWheelRight",3,Yn),te=g(e,"onDisabledClick",3,Yn),ee=g(e,"loadedProgress",3,0),oe=g(e,"filledProgress",3,0),ae=g(e,"handleProgress",3,0),le=g(e,"ariaLabel",3,""),ce=g(e,"ariaValueMin",3,void 0),X=g(e,"ariaValueMax",3,void 0),_e=g(e,"ariaValueNow",3,void 0),Ee=g(e,"ariaValueText",3,""),de=g(e,"onContextMenu",3,Yn),ze=g(e,"handleAlwaysVisible",3,!1),ue=Mt(),pe=K(void 0),Z=K(!1),B=f(()=>{var $e;return($e=X())!=null?$e:0}),fe=f(()=>{var $e;return q_(m())&&(($e=m()[m().length-1])==null?void 0:$e.time)<n(B)}),me=f(()=>q_(m())&&m().length&&n(fe)&&n(B)?Qe(ee()*100,oe()*100):[]);function Ie($e){if($e.preventDefault(),i()&&O(pe,i().getBoundingClientRect(),!0),$())return;let Ne=Ce($e.clientX,$e.clientY),ft=Ae($e.clientX);T()(Ne,ft,n(pe).width)}function ot($e){$e.preventDefault(),!$()&&k()()}function Me(){E()()}function be(){V()()}function W($e){$()||p()&&($e.preventDefault(),$e.deltaY<0?q()():$e.deltaY>0?L()():$e.deltaX>0?j()():z()())}function Ce($e,Ne){return l()?Math.max(0,Math.min(1,(n(pe).height-(Ne-n(pe).top))/n(pe).height)):Math.min(Math.max($e-n(pe).x,0),n(pe).width)/n(pe).width}function Ae($e){return Math.min(Math.max($e-n(pe).x,0),n(pe).width)}function Qe($e,Ne){let ft=ue.features.episodesClustering&&!v()?ue.episodeMinWidthPc:0,Et=[],Se=m()[0].time/n(B)*100,Ye=0,Ue=0;for(let Tt=1;Tt<m().length;Tt++)Ye=m()[Tt].time/n(B)*100,Ye-Se>ft&&(Et.push({from:Se,width:Math.max(0,Ye-Se),loadedWidth:Math.max(0,Math.min(Ye,$e)-Se),filledWidth:Math.max(0,Math.min(Ye,Ne)-Se),interactive:m()[Tt-1].interactive,completed:m()[Tt-1].completed}),Se=m()[Tt].time/n(B)*100,Ue++);let xe={from:Se,width:Math.max(0,100-Se),loadedWidth:Math.max(0,Math.min($e,100)-Se),filledWidth:Math.max(0,Math.min(Ne,100)-Se),interactive:m()[Ue].interactive,completed:m()[Ue].completed};100-Se<ft?(Ue-=1,Et[Ue].width+=100-Se,Et[Ue].loadedWidth+=Math.max(0,Math.min($e,100)-Se),Et[Ue].filledWidth+=Math.max(0,Math.min(Ne,100)-Se)):Et[Ue]=xe;let Ot=m()[0].time;if(Ot!==0){let Tt=Ot/n(B)*100;Et.unshift({from:0,width:Tt,loadedWidth:Math.min(Tt,$e),filledWidth:Math.min(Tt,Ne)})}return Et}function Te($e){return Math.max(0,Math.min(100,$e*100))}let we=f(()=>Te(ee())),He=f(()=>Te(oe()));var st=ux(),ct=se(st);{var It=$e=>{var Ne=dx();let ft;wi(Ne,21,()=>n(me),Et=>Et.from,(Et,Se)=>{var Ye=Re(),Ue=se(Ye);{var xe=Ot=>{dm(Ot,{get videoEpisode(){return n(Se)},get disabled(){return $()}})};M(Ue,Ot=>{n(Se).interactive&&Ot(xe)})}b(Et,Ye)}),S(Ne),N(Et=>ft=ie(Ne,1,"interactive-icons s-h",null,ft,Et),[()=>({mobile:r(),hidden:r()&&!n(Z)})]),b($e,Ne)};M(ct,$e=>{v()&&$e(It)})}var lt=P(ct,2);let ai;lt.__pointerdown=[nx,i,pe,$,Z,Ce,h],lt.__pointermove=[rx,$,Ce,Ae,D,pe,Z,x],lt.__pointerup=[sx,$,Z,Ce,I],lt.__click=[ax,$,te,Ce],lt.__contextmenu=[lx,Ce,$,te,Z,de];var St=C(lt);{var Rt=$e=>{cm($e,{get videoEpisodes(){return n(me)},get disabled(){return $()},get isMobile(){return r()}})},Dt=$e=>{var Ne=cx(),ft=C(Ne),Et=P(ft,2);let Se;S(Ne),N(Ye=>{De(ft,"data-value",n(we)),Ke(ft,`transform: translateX(${n(we)}%);`),Se=ie(Et,1,"filled s-h",null,Se,Ye),De(Et,"data-value",n(He)),Ke(Et,`transform: translateX(${n(He)}%);`)},[()=>({"active-live":d()})]),b($e,Ne)};M(St,$e=>{n(me).length?$e(Rt):$e(Dt,!1)})}var Wt=P(St,2);let Le;var Y=C(Wt);let Oe;S(Wt),S(lt),tt(lt,$e=>i($e),()=>i()),N(($e,Ne,ft,Et)=>{var Se,Ye;ai=ie(lt,1,`slider ${(Se=o())!=null?Se:""}`,"s-h",ai,$e),De(lt,"aria-label",le()),De(lt,"aria-valuemin",ce()),De(lt,"aria-valuemax",X()),De(lt,"aria-valuenow",_e()),De(lt,"aria-valuetext",Ee()),De(lt,"data-testid",(Ye=s())!=null?Ye:null),Le=ie(Wt,1,"handleWrap s-h",null,Le,Ne),Ke(Wt,ft),Oe=ie(Y,1,"handle s-h",null,Oe,Et)},[()=>({disabled:$(),"slider-dragging":n(Z),hidden:a(),"handle-always-visible":ze(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${Te(ae())}%);`,()=>({"active-live":d()})]),ht("pointerenter",lt,Ie),ht("pointerleave",lt,ot),ht("mouseenter",lt,Me),ht("mouseleave",lt,be),ht("wheel",lt,W),b(t,st),F()}et(["pointerdown","pointermove","pointerup","click","contextmenu"]);var co=(t,e)=>Vd[t]>=Vd[e];var Hs=(t,e)=>Vd[t]<=Vd[e],Q_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var mx=A("<div><!></div>"),vx=A("<div><!> <!></div>"),gx={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 um(t,e){var Ae,Qe;H(e,!0),Q(t,gx);let[i,o]=Be(),s=()=>w(D,"$isAudioAvailable$",i),a=()=>w(v,"$muted$",i),l=()=>w(p,"$volume$",i),d=()=>w(x,"$currentGridType$",i),r=()=>w(Ie,"$controlsVisible",i),u=ye(),m=Mt(),p=u.state.volume$,v=u.state.muted$,{setVolume:$,startVolumeChanging:y,stopVolumeChanging:h}=u.actions.internal,x=u.ui.currentGridType$,I=(Ae=u.callbacks)==null?void 0:Ae.onAudioDoesNotExistHint,T=(Qe=u.callbacks)==null?void 0:Qe.onAudioDisabledHint,D=u.state.isAudioAvailable$,k=u.state.isAudioDisabled,E=u.ui.t,V=K(!1),q,L=f(()=>e.isAds||s()),z=f(()=>!n(L)||a()||l()===0),j=f(()=>Hs(d(),"l")),te=f(()=>n(j)?"":n(z)?!s()||k?E("tooltip_sound_unavailable"):E("tooltip_volume"):E("tooltip_volume_muted")),ee=f(()=>n(z)?E("tooltip_volume"):E("tooltip_volume_muted")),oe=f(()=>n(z)?0:l()),ae=!1,le=f(()=>e.isAds?!1:k?!T:s()?!1:!I);function ce(Te){y(),$(Te)}function X(){Ru(u,l(),m.controls.volumeStepWheel)}function _e(){Du(u,l(),m.controls.volumeStepWheel)}function Ee(Te){$(Te)}function de(Te){$(Te),h()}function ze(){ae=!0}function ue(){ae=!1,B()}function pe(){clearTimeout(q),O(V,!0)}function Z(){B()}function B(){q=window.setTimeout(()=>{ae||O(V,!1)},m.controls.volumeBarTimeout)}function fe(Te){Te.preventDefault(),Te.deltaY<0?X():Te.deltaY>0&&_e()}let me=K(!1),Ie=u.ui.controlsVisible;Fe(()=>{r()||O(me,!1)});var ot=vx();let Me;var be=C(ot);Wa(be,{get content(){return n(te)},translateY:-18,get active(){return n(me)},set active(Te){O(me,Te,!0)},children:(Te,we)=>{let He=f(()=>n(j)?"btn-volume-vertical":"btn-volume-horizontal");Ht(Te,{className:"btn-full-opacity",get disabled(){return n(le)},get testId(){return n(He)},get ariaLabel(){return n(ee)},get click(){return e.click},get ariaKeyShortCut(){return hs.KeyM},role:"button",children:(st,ct)=>{fa(st,{get size(){return"24"},get volume(){return l()},get muted(){return n(z)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var W=P(be,2);{var Ce=Te=>{var we=mx();let He;var st=C(we);let ct=f(()=>n(j)?"volumeBar-slider-vertical":""),It=f(()=>n(j)&&!n(V)),lt=f(()=>n(j)?ze:Bu),ai=f(()=>n(j)?ue:Bu),St=f(()=>Math.round(n(oe)*100)),Rt=f(()=>`${Math.round(n(oe)*100)}%`),Dt=f(()=>n(j)?"volume-slider-vertical":"volume-slider");Ka(st,{get className(){return n(ct)},get isHidden(){return n(It)},get isVertical(){return n(j)},withWheelHandler:!0,onWheelUp:X,onWheelDown:_e,onPointerDown:ce,onHandleMove:Ee,onPointerUp:de,get onPointerEnter(){return n(lt)},get onPointerLeave(){return n(ai)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(St)},get ariaValueText(){return n(Rt)},get filledProgress(){return n(oe)},get handleProgress(){return n(oe)},get testId(){return n(Dt)}}),S(we),N(Wt=>He=ie(we,1,"volumeBar s-28",null,He,Wt),[()=>({"volumeBar-vertical":n(j)})]),b(Te,we)};M(W,Te=>{n(L)&&Te(Ce)})}S(ot),N(Te=>Me=ie(ot,1,"volumeBar-container s-28",null,Me,Te),[()=>({vertical:n(j)})]),ht("mouseenter",ot,function(...Te){var we;(we=n(j)?pe:Bu)==null||we.apply(this,Te)}),ht("mouseleave",ot,function(...Te){var we;(we=n(j)?Z:Bu)==null||we.apply(this,Te)}),ht("wheel",ot,fe),b(t,ot),F(),o()}import{noop as bx}from"@vkontakte/videoplayer-shared/es2015";var hx=ke('<path d="M4.58 13.98a1 1 0 0 1 .99-1h4.45a1 1 0 0 1 1 1v4.45a.99.99 0 0 1-1.99 0v-2.05L5.71 19.7a1 1 0 1 1-1.41-1.4l3.32-3.32H5.57a1 1 0 0 1-.99-1m10.39-6.36 3.32-3.32a1 1 0 1 1 1.41 1.4l-3.32 3.32h2.05a.99.99 0 0 1 0 1.98H14a1 1 0 0 1-1-1V5.57a.99.99 0 1 1 1.98 0z"></path>'),_x=ke('<path d="M10.5 19a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-4.5a1 1 0 0 1 2 0v2.07l3.36-3.36a1 1 0 0 1 1.42 0l.01.01a1 1 0 0 1 0 1.42L7.43 18H9.5a1 1 0 0 1 1 1M18 7.43l-3.36 3.36a1 1 0 0 1-1.42 0l-.01-.01a1 1 0 0 1 0-1.42L16.57 6H14.5a1 1 0 0 1 0-2H19a1 1 0 0 1 1 1v4.5a1 1 0 0 1-2 0z"></path>');function pm(t,e){let i=g(e,"isFullscreen",8,!1),o=fr(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");Xe(t,{get testId(){return n(o)},children:(s,a)=>{var l=Re(),d=se(l);{var r=m=>{var p=hx();b(m,p)},u=m=>{var p=_x();b(m,p)};M(d,m=>{i()?m(r):m(u,!1)})}b(s,l)},$$slots:{default:!0}})}function Zd(t,e){H(e,!0);let i=g(e,"isFullscreen",3,!1),o=g(e,"click",3,bx),s=ye(),a=s.ui.isFullscreenOpenedByKeyboard,l=s.ui.t,d=f(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));Ht(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let m=ca(u);a.set(m),o()()},get ariaKeyShortCut(){return hs.KeyF},role:"button",children:(u,m)=>{pm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),F()}var $x=ke('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.26 4.26C3 5.54 3 7.57 3 11.65v.72c0 4.07 0 6.11 1.26 7.38C5.54 21 7.57 21 11.65 21h.72c4.07 0 6.11 0 7.38-1.26C21 18.47 21 16.43 21 12.36v-.72c0-4.07 0-6.11-1.26-7.38C18.47 3 16.43 3 12.36 3h-.72C7.57 3 5.53 3 4.26 4.26M6 8.5c.1 4.68 2.56 7.5 6.61 7.5h.24v-2.68c1.47.15 2.57 1.25 3.02 2.68H18a6 6 0 0 0-3-3.76 5.7 5.7 0 0 0 2.55-3.74h-1.94c-.4 1.49-1.61 2.84-2.77 2.97V8.5h-1.96v5.2c-1.2-.3-2.76-1.76-2.83-5.2z" clip-rule="evenodd"></path></svg>');function fm(t,e){let i=An(e,["$$slots","$$events","$$legacy","children"]);var o=$x();lo(o,()=>Ge({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"vk-logo-icon",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:yt}),Xt(),S(o),b(t,o)}var yx=ke('<svg><!><svg data-logo="vk_video"><path d="M7 8.6c0-1.96 0-2.94.38-3.69a3.5 3.5 0 0 1 1.53-1.53C9.66 3 10.64 3 12.6 3h1.36c2.46 0 3.7 0 4.64.48a4.4 4.4 0 0 1 1.92 1.92c.48.94.48 2.18.48 4.64v3.92c0 2.46 0 3.7-.48 4.64a4.4 4.4 0 0 1-1.92 1.92c-.94.48-2.18.48-4.64.48H12.6c-1.96 0-2.94 0-3.69-.38a3.5 3.5 0 0 1-1.53-1.53C7 18.34 7 17.36 7 15.4zm9.26 1.74c.9.54 1.36.81 1.51 1.16.13.3.13.65 0 .96-.15.34-.6.61-1.5 1.15l-2.4 1.43c-.93.56-1.4.84-1.8.8-.33-.03-.64-.2-.84-.48-.23-.31-.23-.86-.23-1.96v-2.85c0-1.1 0-1.64.23-1.96q.31-.42.85-.48c.38-.04.86.25 1.8.8zM5 9.04c0-2.46 0-3.7.48-4.64q.37-.71.95-1.25-.58.1-1.03.33A4.4 4.4 0 0 0 3.48 5.4C3 6.34 3 7.58 3 10.04v3.92c0 2.46 0 3.7.48 4.64a4.4 4.4 0 0 0 1.92 1.92q.45.23 1.03.33a4 4 0 0 1-.95-1.25C5 18.66 5 17.42 5 14.96z"></path></svg><svg x="4" y="3" data-logo="play_market"><path d="M0 1.26v15.47q0 .66.34 1L9.52 9 .33.28C.08.53 0 .92 0 1.26"></path><path d="M.33.28.38.23c.34-.3.89-.32 1.49 0l10.75 5.81-2.6 2.48zm10.29 8.75 2.88 2.45-.53.29-.34.18-2.58-2.44-9.71 8.22c.33.34.9.37 1.53.04l11.1-6 .53-.29 2.73-1.47c1.03-.56 1.03-1.47 0-2.02l-2.77-1.5-.84-.45.84.45.1.05z"></path></svg><svg x="3" data-logo="app_store"><path d="M17.62 16.37q-.48 1.09-1.15 2.03-.9 1.27-1.48 1.75-.88.8-1.9.83-.72 0-1.76-.42a5 5 0 0 0-1.89-.4q-.9 0-1.94.4a5 5 0 0 1-1.68.44q-.98.04-1.95-.85-.62-.53-1.55-1.82a13 13 0 0 1-1.63-3.2 12 12 0 0 1-.69-3.8q0-2.1.93-3.64A5.4 5.4 0 0 1 5.5 5.03q.77 0 2.03.46t1.62.47q.26 0 1.79-.55a6 6 0 0 1 2.43-.42 5.2 5.2 0 0 1 4.05 2.09q-2.4 1.44-2.4 4.02a4.4 4.4 0 0 0 1.49 3.34q.66.61 1.48.95-.18.5-.38.98M13.5.42q0 1.58-1.17 2.94c-.94 1.08-2.07 1.7-3.3 1.6L9 4.56c0-1 .45-2.08 1.24-2.96q.6-.67 1.5-1.12.93-.44 1.74-.48z"></path></svg><path d="M32.55 17.04h2.5L38.7 7h-1.8l-2.94 8.28h-.28L30.84 7H29zm15.52 0-4.61-5.2L47.72 7H45.6l-3.56 4.09h-.42V7h-1.7v10.04h1.7v-4.3h.43l3.76 4.3z"></path><path d="M57.89 11.89a2.2 2.2 0 0 0 1.44-2.16C59.33 8.14 58 7 56.06 7h-3.92v10.04h4.2c1.96 0 3.29-1.14 3.29-2.8 0-1.17-.66-2.04-1.74-2.35m-4.04-3.4h2.21c.92 0 1.54.56 1.54 1.39 0 .8-.62 1.36-1.54 1.36h-2.2zm2.5 7.06h-2.5v-2.81h2.5c.9 0 1.52.57 1.52 1.4 0 .84-.62 1.4-1.52 1.4m4.84 1.5h2.32l2.77-5.5h.22v5.5h1.57v-7.4h-2.32l-2.77 5.5h-.22v-5.5h-1.57zm7.96 2.21h1.64v-2.2h5.33v2.2h1.64v-3.7h-1.29V9.64h-5.43l-.37 3.78c-.13 1.34-.53 2.13-1.34 2.13h-.18zm2.49-3.7c.4-.39.57-1.04.68-2.15l.23-2.27h2.28v4.42zm14.38-2.3a3.7 3.7 0 0 0-3.84-3.76 3.7 3.7 0 0 0-3.85 3.85 3.7 3.7 0 0 0 3.85 3.84c1.54 0 2.99-.72 3.55-2.13l-1.54-.26c-.36.53-1.04.9-1.91.9-1.26 0-2.09-.77-2.24-1.91H86zm-3.84-2.33c1.02 0 1.8.65 2.06 1.58h-4.1a2.1 2.1 0 0 1 2.04-1.58m8.66 6.26c2.32 0 3.96-1.6 3.96-3.84 0-2.25-1.64-3.85-3.96-3.85s-3.97 1.6-3.97 3.85 1.64 3.84 3.97 3.84m0-1.5c-1.34 0-2.25-.95-2.25-2.34 0-1.4.9-2.35 2.25-2.35 1.34 0 2.25.95 2.25 2.35s-.91 2.35-2.25 2.35" class="_ru"></path><path d="M35.02 17.36h-2.48L29 7.42h1.83l2.83 8.2h.28l2.93-8.2h1.8zm8.41-5.15 4.6 5.15h-2.24l-3.75-4.26h-.43v4.26h-1.7V7.42h1.7v4.05h.41l3.55-4.05h2.1zm13.37 5.15h-2.48L50.8 7.42h1.83l2.82 8.2h.29l2.92-8.2h1.8zm6.46 0h-1.64v-7.33h1.64zm-.81-8.37q-.45 0-.74-.27a1 1 0 0 1-.28-.72q0-.44.28-.72.3-.28.74-.28t.72.28q.3.29.29.72 0 .44-.29.72t-.72.27m5.93 8.51q-1.03 0-1.86-.48a3.5 3.5 0 0 1-1.29-1.35 4 4 0 0 1-.45-1.98q0-1.1.45-1.95.46-.88 1.3-1.36.81-.5 1.85-.5.9 0 1.6.38.68.35 1.13.88V7.42h1.63v9.94h-1.22l-.34-1.18q-.46.54-1.17.94a3.4 3.4 0 0 1-1.63.38m.4-1.45q1.04 0 1.68-.65.65-.66.65-1.7t-.65-1.7a2.2 2.2 0 0 0-1.68-.66 2.2 2.2 0 0 0-1.66.66q-.64.66-.64 1.7t.64 1.7q.64.65 1.66.65m13.15-2.44-.03.52h-5.94q.12.86.71 1.38.6.51 1.52.51.63 0 1.13-.24.51-.24.78-.65l1.53.26q-.39 1.01-1.38 1.56-.96.55-2.16.55-1.1 0-1.98-.48a3.6 3.6 0 0 1-1.85-3.33q0-1.1.48-1.95.5-.88 1.37-1.36a4 4 0 0 1 1.98-.5q1.11 0 1.98.5.88.48 1.36 1.34.5.86.5 1.89m-3.84-2.31q-.73 0-1.29.42-.53.42-.74 1.14h4.1a2.2 2.2 0 0 0-2.07-1.56m8.66 6.2q-1.14 0-2.04-.48a3.7 3.7 0 0 1-1.4-1.35 4 4 0 0 1-.5-1.98q0-1.1.5-1.95.5-.88 1.4-1.36.9-.5 2.04-.5t2.03.5q.91.48 1.4 1.36.52.86.52 1.95 0 1.11-.51 1.98-.5.86-1.4 1.35-.9.48-2.04.48m0-1.48q.99 0 1.62-.63.63-.66.63-1.7t-.63-1.67a2.2 2.2 0 0 0-1.62-.65q-.99 0-1.62.65-.62.63-.62 1.67 0 1.05.62 1.7.63.63 1.62.63" class="_en"></path></svg>');function mm(t,e){let i=An(e,["$$slots","$$events","$$legacy","children"]);var o=yx();lo(o,()=>Ge({xmlns:"http://www.w3.org/2000/svg",width:"95",height:"24",fill:"var(--btn-color, #fff)","fill-rule":"evenodd","aria-hidden":"true","clip-rule":"evenodd",viewBox:"0 0 95 24",role:"img"},i));var s=C(o);ei(s,()=>{var a;return(a=e.children)!=null?a:yt}),Xt(6),S(o),b(t,o)}var xx={hash:"s-29",code:"svg [data-logo],svg[data-testid=vk-video-logo-icon--en] ._ru,svg[data-testid=vk-video-logo-icon--short] ._en,svg[data-testid=vk-video-logo-icon--short] ._ru,svg[data-testid=vk-video-logo-icon] ._en{opacity:0;visibility:hidden}svg[data-logo=app_store] [data-logo=app_store],svg[data-logo=play_market] [data-logo=play_market],svg[data-logo=vk_video] [data-logo=vk_video]{opacity:1;visibility:visible}"};function vm(t,e){H(e,!0),Q(t,xx);let i=g(e,"short",3,!1),o=g(e,"isCyrillic",3,!0),s=g(e,"logo",19,()=>"vk_video"),a="vk-video-logo-icon--short",l=24,d=f(()=>!o()&&!i()?91:i()?l:95),r=f(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=f(()=>`0 0 ${n(d)} 24`);mm(t,{get width(){return n(d)},height:"24",get viewBox(){return n(u)},get"data-testid"(){return n(r)},get"data-logo"(){return s()}}),F()}function Jd(t,e){H(e,!0);let[i,o]=Be(),s=()=>w($,"$isMobile",i),a=()=>w(v,"$currentGridType$",i),l=()=>w(h,"$isCyrillicRelatedInterface$",i),d=g(e,"ref",15,void 0),r=g(e,"logoClickable",3,!1),u=g(e,"targetUrl",3,""),m=Mt(),p=ye(),v=p.ui.currentGridType$,$=p.ui.isMobile,y=p.ui.t,h=p.isCyrillicRelatedInterface$,x=f(()=>m.logoType!=="vk"),I=f(()=>n(x)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),T=f(()=>(s()&&Hs(a(),"m")||Hs(a(),"l"))&&n(x)),D=()=>{var V,q;e.click(),(V=p.callbacks)!=null&&V.onLogoClicked?(q=p.callbacks)==null||q.onLogoClicked():u()&&window.open(u(),"_blank")},k=f(()=>!r()),E=f(()=>n(x)?"btn-vk-video-logo":"btn-vk-logo");Ht(t,{className:"btn-full-opacity",get disabled(){return n(k)},click:D,get testId(){return n(E)},get ariaLabel(){return n(I)},get ref(){return d()},set ref(V){d(V)},children:(V,q)=>{var L=Re(),z=se(L);{var j=ee=>{vm(ee,{get logo(){return m.logoType},get short(){return n(T)},get isCyrillic(){return l()}})},te=ee=>{fm(ee,{})};M(z,ee=>{n(x)?ee(j):ee(te,!1)})}b(V,L)},$$slots:{default:!0}}),F(),o()}import{ChromecastState as Tx}from"@vkontakte/videoplayer-core/es2015";import{ChromecastState as Y_}from"@vkontakte/videoplayer-core/es2015";var wx=ke('<path d="M3.6 13.3a5.1 5.1 0 0 1 5.05 5.83.9.9 0 0 1-1.78-.26 3.3 3.3 0 0 0-3.74-3.74.9.9 0 0 1-.26-1.78c.24-.03.49-.05.73-.05Z" class="s-1d"></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-1d"></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-1d"></path>',1),Sx=ke('<path d="M3.60219 13.2993C6.41858 13.2995 8.70256 15.5835 8.70278 18.3999C8.70277 18.6469 8.68424 18.8909 8.65004 19.1294C8.57937 19.6212 8.12333 19.9625 7.63149 19.8921C7.13968 19.8213 6.79823 19.3654 6.86879 18.8735C6.89087 18.7195 6.90199 18.5611 6.902 18.3999C6.90178 16.5776 5.42447 15.1003 3.60219 15.1001C3.441 15.1001 3.28267 15.1112 3.12856 15.1333C2.63666 15.2039 2.18077 14.8624 2.11 14.3706C2.03966 13.8788 2.38091 13.4227 2.8727 13.3521C3.11125 13.3178 3.35516 13.2993 3.60219 13.2993Z"></path><path d="M3.60219 9.69971C8.40682 9.69977 12.3021 13.5953 12.3024 18.3999C12.3024 18.6248 12.2938 18.8489 12.277 19.0698C12.239 19.5651 11.8065 19.9365 11.3112 19.8989C10.8157 19.8611 10.4445 19.4286 10.4821 18.9331C10.4954 18.7576 10.5026 18.5791 10.5026 18.3999C10.5023 14.5894 7.41271 11.5005 3.60219 11.5005C3.42268 11.5005 3.24474 11.5066 3.06899 11.52C2.57352 11.5578 2.14115 11.1863 2.10317 10.6909C2.06587 10.1957 2.43694 9.76287 2.93227 9.7251C3.15348 9.70823 3.37699 9.69971 3.60219 9.69971Z"></path><path d="M3.60219 16.8999C4.43047 16.8999 5.10198 17.5717 5.10219 18.3999C5.10209 19.2282 4.43054 19.8999 3.60219 19.8999C2.77383 19.8999 2.10229 19.2282 2.10219 18.3999C2.10241 17.5717 2.7739 16.8999 3.60219 16.8999Z"></path><path d="M16.2379 4.1001C17.0459 4.10009 17.7067 4.10017 18.2438 4.14404C18.7997 4.18946 19.3022 4.28599 19.7711 4.5249C20.5049 4.89882 21.1014 5.49623 21.4752 6.22998C21.714 6.69873 21.8107 7.20063 21.8561 7.75635C21.9 8.29338 21.9001 8.95424 21.9 9.76221V14.2378C21.9001 15.0458 21.9 15.7066 21.8561 16.2437C21.8107 16.7996 21.7141 17.3021 21.4752 17.771C21.1014 18.5046 20.5048 19.1012 19.7711 19.4751C19.3022 19.714 18.7997 19.8105 18.2438 19.856C17.7067 19.8998 17.0459 19.8999 16.2379 19.8999H14.9997C14.503 19.8996 14.1005 19.4972 14.1002 19.0005C14.1002 18.5036 14.5028 18.1004 14.9997 18.1001H16.1998C17.0548 18.1001 17.6422 18.0992 18.0973 18.062C18.5419 18.0257 18.7809 17.9596 18.9538 17.8716C19.3489 17.6702 19.6704 17.3487 19.8717 16.9536C19.9598 16.7808 20.0258 16.5417 20.0622 16.0972C20.0993 15.6421 20.1002 15.0546 20.1002 14.1997V9.80029C20.1002 8.94536 20.0993 8.35794 20.0622 7.90283C20.0258 7.45834 19.9598 7.21921 19.8717 7.04639C19.6704 6.6514 19.3487 6.33073 18.9538 6.12939C18.7809 6.04133 18.5419 5.97431 18.0973 5.93799C17.6422 5.9008 17.0548 5.8999 16.1998 5.8999H6.00063L5.83071 5.90674C4.99191 5.97398 4.28981 6.53462 4.01918 7.30029C3.85342 7.76872 3.33928 8.01472 2.87075 7.84912C2.40214 7.68346 2.15628 7.16833 2.32192 6.69971C2.85696 5.18632 4.30125 4.1001 6.00063 4.1001H16.2379Z"></path><path d="M2.95114 7.11345C2.42394 7.1914 1.90399 6.78569 2.00995 6.2634C2.05777 6.0277 2.12517 5.82449 2.22018 5.63803C2.5078 5.07354 2.96674 4.6146 3.53123 4.32698C4.17296 4 5.01304 4 6.6932 4H17.2001C18.8803 4 19.7204 4 20.3621 4.32698C20.9266 4.6146 21.3855 5.07354 21.6731 5.63803C22.0001 6.27976 22.0001 7.11984 22.0001 8.8V15.2C22.0001 16.8802 22.0001 17.7202 21.6731 18.362C21.3855 18.9265 20.9266 19.3854 20.3621 19.673C19.7204 20 18.8803 20 17.2001 20H15.7196C15.2009 20 14.8203 19.5134 14.8938 19C14.9638 18.5101 15.0001 18.0093 15.0001 17.5C15.0001 11.701 10.2991 7 4.5001 7C3.97384 7 3.45662 7.03872 2.95114 7.11345Z"></path>',1),Cx={hash:"s-1d",code:".animated.s-1d{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-1d{animation-name:s-1d-wave1}.wave2.animated.s-1d{animation-name:s-1d-wave2}.wave3.animated.s-1d{animation-name:s-1d-wave3}@keyframes s-1d-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-1d-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-1d-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function ec(t,e){H(e,!0),Q(t,Cx);let i=g(e,"isMobile",3,!1),o=f(()=>e.iconState===Y_.CONNECTED),s=f(()=>e.iconState===Y_.CONNECTING),a=f(()=>n(o)?"#2688EB":sa),l=f(()=>e.size?dn(e.size):void 0);var d=Re(),r=se(d);{var u=p=>{Xe(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(v,$)=>{var y=wx();Xt(2),b(v,y)},$$slots:{default:!0}})},m=p=>{Xe(p,{get style(){return n(l)},testId:"chromecast-icon",children:(v,$)=>{var y=Sx(),h=se(y);let x;var I=P(h);let T;var D=P(I);let k;var E=P(D);let V;var q=P(E);let L;N((z,j,te,ee,oe)=>{x=ie(h,0,"wave2 s-1d",null,x,z),T=ie(I,0,"wave3 s-1d",null,T,j),k=ie(D,0,"wave1 s-1d",null,k,te),V=ie(E,0,"s-1d",null,V,ee),L=ie(q,0,"s-1d",null,L,oe)},[()=>({animated:n(s)}),()=>({animated:n(s)}),()=>({animated:n(s)}),()=>({hidden:n(o)}),()=>({hidden:!n(o)})]),b(v,y)},$$slots:{default:!0}})};M(r,p=>{i()?p(u):p(m,!1)})}b(t,d),F()}import{noop as Ix}from"@vkontakte/videoplayer-shared/es2015";function tc(t,e){H(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),s=g(e,"click",3,Ix),l=ye().ui.t,d=f(()=>e.state===Tx.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));Ht(t,{get ariaLabel(){return n(d)},get click(){return s()},testId:"btn-chromecast",get ref(){return i()},set ref(r){i(r)},children:(r,u)=>{ec(r,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),F()}import{noop as Px}from"@vkontakte/videoplayer-shared/es2015";var Ex=ke('<path d="m21.62 16.5-.02.07q-.22 1.27-.42 2.09a5 5 0 0 1-.64 1.5 4.4 4.4 0 0 1-2.51 1.73q-.77.18-1.63.07t-2.11-.34l-4.34-.8q-1.27-.22-2.1-.42a5 5 0 0 1-1.5-.65 4.4 4.4 0 0 1-1.72-2.5 5 5 0 0 1-.07-1.63q.1-.84.34-2.11l.01-.07q.22-1.27.43-2.1a5 5 0 0 1 .64-1.5 4.4 4.4 0 0 1 2.5-1.73 5 5 0 0 1 1.64-.07q.83.1 2.1.35l4.34.8q1.28.21 2.1.42a5 5 0 0 1 1.5.64 4.4 4.4 0 0 1 1.73 2.5q.18.78.07 1.64-.1.83-.34 2.1m-1.45-2.3c.05-.49.03-.77-.02-1a2.6 2.6 0 0 0-1.02-1.48 3 3 0 0 0-.93-.37c-.48-.13-1.1-.24-2-.4l-4.26-.79c-.9-.16-1.52-.27-2.01-.33a3 3 0 0 0-1 .03 2.6 2.6 0 0 0-1.48 1.02 3 3 0 0 0-.37.92c-.13.48-.24 1.1-.4 2s-.28 1.51-.33 2c-.06.5-.04.78.02 1 .15.6.51 1.13 1.02 1.48.19.13.45.25.92.37.48.13 1.1.25 2 .4l4.27.79c.9.16 1.52.28 2.01.33s.77.03 1-.02a2.6 2.6 0 0 0 1.47-1.03c.14-.19.25-.45.38-.92.12-.48.24-1.1.4-2s.28-1.51.33-2"></path><path d="M18.19 7.49a.9.9 0 0 1-1.05-.73c-.14-.8-.2-1.08-.28-1.3A2.6 2.6 0 0 0 14.5 3.8c-.22 0-.5.04-1.31.17l-5.85.96a8 8 0 0 0-2.17.5 2.6 2.6 0 0 0-1.33 1.75c-.08.38-.04.85.11 2.23l.01.1a.9.9 0 1 1-1.78.2l-.01-.1-.02-.17a9 9 0 0 1-.07-2.64 4.4 4.4 0 0 1 2.25-2.97c.63-.33 1.42-.46 2.56-.65l.16-.03 5.85-.96.1-.01c.67-.11 1.13-.19 1.55-.18a4.4 4.4 0 0 1 4 2.82c.14.39.23.85.35 1.53l.01.1a.9.9 0 0 1-.72 1.04"></path><path d="M12.72 12.41a.42.42 0 0 0-.69.23l-.72 4.18a.4.4 0 0 0 .03.23c.08.2.33.3.54.22l3.67-1.47a.4.4 0 0 0 .12-.68z"></path>',1);function gm(t){Xe(t,{testId:"episodes-icon",children:(e,i)=>{var o=Ex();Xt(2),b(e,o)},$$slots:{default:!0}})}var Hu=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var kx=A('<span class="text mobile s-23"> </span> <div class="chevron-episodes s-23" data-testid="btn-episodes_icon"><!></div>',1),Ax=A('<span class="text s-23"> </span>'),Lx=A('<span class="text count s-23"> </span>'),Mx=A('<span class="icon s-23"><!></span> <!>',1),Vx={hash:"s-23",code:".icon.s-23{flex-shrink:0}.text.s-23{overflow:hidden;padding:0 8px;text-overflow:ellipsis;white-space:nowrap}.text.count.s-23{overflow:visible}.text.mobile.s-23{padding:0 3px 0 4px}.chevron-episodes.s-23{margin-bottom:-6px;opacity:.7;transform:scale(.8)}"};function ic(t,e){var ae,le,ce;H(e,!0),Q(t,Vx);let[i,o]=Be(),s=()=>w(y,"$currentGridType$",i),a=()=>w(h,"$openedByKeyboard$",i),l=()=>w(x,"$panelOpened$",i),d=()=>w(I,"$isMobile",i),r=g(e,"position",3,0),u=g(e,"duration",3,0),m=g(e,"timeCodes",19,()=>[]),p=ye(),v=(le=(ae=p.callbacks)==null?void 0:ae.onEpisodeChanged)!=null?le:Px,$=!!((ce=p.callbacks)!=null&&ce.onEpisodeClicked),y=p.ui.currentGridType$,h=p.ui.episodes.openedByKeyboard$,x=p.ui.episodes.panelOpened$,I=p.ui.isMobile,T=p.ui.t,D=K(void 0),k=X=>{var Ee,de,ze;if(!!((Ee=p.callbacks)!=null&&Ee.onEpisodeClicked)){let ue=ca(X);h.set(ue),x.set(!0),(ze=(de=p.callbacks)==null?void 0:de.onEpisodeClicked)==null||ze.call(de,ue)}},E=K(null),V=f(()=>r()/u());Fe(()=>{var _e;let X=Hu(n(V),u(),m());X?((_e=n(E))==null?void 0:_e.time)!==X.time&&(v(X),O(E,X,!0)):O(E,null)});let q=f(()=>{var X;return((X=n(E))==null?void 0:X.text)||""}),L=f(()=>co(s(),"xl")?"FULL":co(s(),"m")?"COUNT":"SHORT"),z=f(()=>`${T("tooltip_episodes")}: ${n(q)}`),j=(X,_e,Ee)=>$t(null,null,function*(){yield _o(),(X==null?void 0:X.getAttribute("aria-expanded"))==="false"&&_e&&!Ee&&Pt(()=>{h.set(!1),X.focus()})});Fe(()=>{j(n(D),a(),l())});var te=Re(),ee=se(te);{var oe=X=>{let _e=f(()=>d()?"px-0":""),Ee=f(()=>!$);Ht(X,{get className(){var de;return`w-max btn-full-opacity btn-jc-l ${(de=n(_e))!=null?de:""}`},testId:"btn-episodes",click:k,get disabled(){return n(Ee)},get ariaExpanded(){return l()},get ariaLabel(){return n(z)},get ref(){return n(D)},set ref(de){O(D,de,!0)},children:(de,ze)=>{var ue=Re(),pe=se(ue);{var Z=fe=>{var me=kx(),Ie=se(me),ot=C(Ie,!0);S(Ie);var Me=P(Ie,2),be=C(Me);Mr(be,{direction:"right"}),S(Me),N(()=>ge(ot,n(q))),b(fe,me)},B=fe=>{var me=Mx(),Ie=se(me),ot=C(Ie);gm(ot,{}),S(Ie);var Me=P(Ie,2);{var be=Ce=>{var Ae=Ax(),Qe=C(Ae,!0);S(Ae),N(()=>ge(Qe,n(q))),b(Ce,Ae)},W=(Ce,Ae)=>{{var Qe=Te=>{var we=Lx(),He=C(we,!0);S(we),N(()=>ge(He,m().length)),b(Te,we)};M(Ce,Te=>{n(L)==="COUNT"&&Te(Qe)},Ae)}};M(Me,Ce=>{n(L)==="FULL"?Ce(be):Ce(W,!1)})}b(fe,me)};M(pe,fe=>{d()?fe(Z):fe(B,!1)})}b(de,ue)},$$slots:{default:!0}})};M(ee,X=>{n(E)&&X(oe)})}b(t,te),F(),o()}import{debounceFn as yb}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as i2,PlaybackState as Ql,Player as o2,PredefinedQualityLimits as ys,VideoFormat as sc,clientChecker as ab}from"@vkontakte/videoplayer-core/es2015";import{assertNonNullable as hr,getHighestQuality as n2,InterfaceLanguage as r2,isInvariantQuality as s2,isNonNullable as a2,loadVKLangPack as l2,Logger as d2,map as lb,merge as c2,Observable as ju,Subject as ac,Subscription as db,TracerFactory as u2,ValueSubject as cb,VideoQuality as p2,devNull as f2,now as m2,filter as v2,once as g2,ErrorCategory as ub,suppressAbort as h2}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as zs,ThinOneStat as _2}from"@vkontakte/videoplayer-statistics/es2015";import{detectEmbed as Rx,devNull as ii,now as oi,withoutNullable as j_}from"@vkontakte/videoplayer-shared/es2015";import{addScript as Dx,Subject as cn,clearVideoElement as Ox}from"@vkontakte/videoplayer-shared/es2015";var Nx="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Fu=class{constructor(e,i){this.adman=null;this.initialVolume=1;this.videoElement=null;this.currentAdSection=null;this.actions=null;this.adsState=null;this.playerState=null;this.events={init$:new cn,loadStarted$:new cn,loadEnded$:new cn,loadError$:new cn,ready$:new cn,slotRequested$:new cn,started$:new cn,timeRemained$:new cn,paused$:new cn,resumed$:new cn,ended$:new cn,empty$:new cn,skipped$:new cn,clicked$:new cn,closed$:new cn,error$:new cn};this.loadAdman=e=>(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[oi()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));this.loadAdmanMailRu=e=>new Promise((i,o)=>{let s;this.events.loadStarted$.next();let a=()=>{clearTimeout(s),delete window.admanAsyncInit,window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[oi()]}),o())};Dx(Nx,e,this.loadTimeout).then(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[oi()]}),window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[oi()]}),window.admanAsyncInit=a,s=window.setTimeout(a,this.initTimeout))}).catch(l=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[oi()]}),o(),clearTimeout(s)})});this.loadAdmanNPM=e=>new Promise((i,o)=>{let s;this.events.loadStarted$.next();let a=()=>{clearTimeout(s),delete window.admanAsyncInit,window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[oi()]}),o())},l=()=>{d=!0,o()},d=!1,r=window.setTimeout(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[oi()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[oi()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[oi()]}),!d&&(window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[oi()]}),window.admanAsyncInit=a,s=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(s),clearTimeout(r),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[oi()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[oi(),i.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(i)}`}),this.events.started$.next(e),i.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:"ad muted start"})),this.adsState.duration.set(i.duration),this.adsState.playbackState.set("playing"),this.adsState.canSkip.set(i.allowClose),this.adsState.secondsToWatchBeforeSkip.set(i.allowCloseDelay),this.startWatchDog(),(o=this.externalApi)!=null&&o.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,e,String(i.bannerID))):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=e=>{var o;((o=this.adsState)!=null&&o.playbackState?he(this.adsState.playbackState):void 0)!=="inactive"&&(this.adsState?(this.adsState.position.set(e.currentTime),this.events.timeRemained$.next(e),this.startWatchDog()):this.onAdError("TimeRemained callback failed: Adman state is not initialized"))};this.onAdPaused=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.stopWatchDog(),this.adsState?(this.log({message:"ad paused"}),this.adsState.playbackState.set("paused")):this.onAdError("Paused callback failed: Adman state is not initialized")};this.onAdPlayed=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.startWatchDog(),this.adsState?(this.log({message:"ad played"}),this.adsState.playbackState.set("playing")):this.onAdError("Player callback failed: Adman is not initialized")};this.onAdMidrollPoint=()=>{if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[oi()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch(e){this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};this.onAdSkipped=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad completed"}),this.currentAdSection?(this.events.ended$.next(this.currentAdSection),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0)):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{var e,i;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad clicked"}),(i=this.videoElement)==null||i.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(e="ad error")=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[oi()]}),this.log({message:e}),this.events.error$.next(e),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()};this.log=e.createComponentLog("AdmanWrapper"),ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[oi()]}),this.loadTimeout=i.loadTimeout,this.initTimeout=i.initTimeout,this.runtimeTimeout=i.runtimeTimeout,this.useAdmanFromNPM=i.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(i.volumeMultiplier,1)),this.isVsidOriginal=i.isVsidOriginal}init(e,i,o){this.actions=e,this.adsState=i,this.playerState=o}onAdmanLoadingError(){this.onAdError("adman loading error")}initAdman(e){return $t(this,null,function*(){var k,E;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[oi(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:o,isAutoplay:s,adsContainer:a,adsVideoElement:l,slotId:d,params:r={},paramsOverride:u={},duration:m,externalApi:p,json:v}=e;this.externalApi=p;let $,y=this.playerState&&he(this.playerState.vsid);y&&(this.isVsidOriginal?$=y:$=parseInt(y,36));let{isEmbed:h,immediateOrigin:x}=Rx(),I=(k=h?x:window.location.href)!=null?k:window.location.href,T=j_(Ge(Jt(Ge(Jt(Ge({},r),{dl:encodeURIComponent(I),autoplay:s?1:0,player_width:i,player_height:o}),$?{request_id:$}:{}),{duration:m}),u)),D=j_({slot:v?void 0:d,wrapper:a,videoEl:l,videoQuality:o,params:v?void 0:T,browser:{mobile:!1},json:v});try{let V=new window.AdmanHTML;if(V.onReady(this.onAdsReady),V.onStarted(this.onAdStarted),V.onPlayed(this.onAdPlayed),V.onPaused(this.onAdPaused),V.adMidrollPoint(this.onAdMidrollPoint),V.onClosed(this.onAdClosed),V.onSkipped(this.onAdSkipped),V.onClicked(this.onAdClicked),V.onTimeRemained(this.onAdTimeRemained),V.onCompleted(this.onAdCompleted),V.onError(this.onAdError),V.setDebug(!1),!v&&((E=this.externalApi)!=null&&E.videoGetAds)){let q=yield this.safeExternalCall(this.externalApi.videoGetAds,T);q&&(delete D.slot,delete D.params,Object.assign(D,{json:q}))}V.init(D),this.adman=V,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(D)}`})}catch(V){ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(V)],numbers:[oi()]}),this.onAdError("could not init adman")}})}switchToVideo(e=!1){var o,s,a;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[oi()]}),this.currentAdSection===null&&!e){this.log({message:"switch to video, no currentAdSection. can't switch"});return}let i=this.currentAdSection==="postroll";if(this.actions){if(this.adsState&&this.playerState)this.adsState.playbackState.set("inactive"),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${i}`});else{let l="Switch to video: Adman state was not updated correctly";this.log({message:l}),this.events.error$.next(l)}(a=(s=this.actions).switchFromAdsToVideo)==null||a.call(s,!i)}}setPostrollPassed(e){var i;(i=this.adsState)==null||i.postrollPassed.set(e),this.log({message:"postroll passed"})}togglePlay(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adsState){this.log({message:"toggle play"});let i=he(this.adsState.playbackState);i==="playing"?this.pause():i==="paused"&&this.play()}else this.onAdError("Can not toggle play: Adman state is not initialized")}setInitialVolume(e){this.log({message:`set initial volume ${e}`}),this.initialVolume=e}setVolume(e){let i=e*this.volumeMultiplier;if(this.log({message:`set volume ${i}`}),this.adman)try{this.adman.setVolume(i)}catch(o){this.onAdError("could not set ad volume")}this.videoElement&&(this.videoElement.volume=i)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch(i){this.onAdError("could not set ad fullscreen")}}startPreroll(){if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[oi()]}),this.adman){if(!this.isDestroyed){this.log({message:"start preroll"}),this.setVolume(this.initialVolume),this.currentAdSection="preroll",this.startWatchDog();try{this.adman.start("preroll")}catch(e){this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch(i){this.onAdError("could not start postroll")}}else this.onAdError("Can not start postroll: Adman is not initialized")}startWatchDog(){this.watchDogTimeout&&this.stopWatchDog(),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch(i){this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch(i){this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(i){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){var o;(o=this.adman)==null||o.setPosition(Math.floor(e),Math.floor(i))}destroy(){var e,i,o,s,a,l,d,r,u,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),(s=this.adman)==null||s.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(l=this.adman)==null||l.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(r=this.adman)==null||r.onClicked(void 0),(u=this.adman)==null||u.onTimeRemained(void 0),(m=this.adman)==null||m.onCompleted(void 0),(p=this.adman)==null||p.onError(void 0),(v=this.adman)==null||v.destroy(),this.videoElement&&Ox(this.videoElement),this.isDestroyed=!0}safeExternalCall(e,...i){return $t(this,null,function*(){var o;try{return yield e(...i)}catch(s){return this.onAdError((o=s==null?void 0:s.message)!=null?o:"External call failed"),null}})}};var X_=t=>{let e=Math.round(t);return isNaN(e)||e<40?"":e>=40&&e<55?50:e>=55&&e<90?60:e>=90&&e<180?120:e>=180?240:""};var hm=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(e,i){let o=[],s=e.split(this.twoLinesRegExp);for(let a of s){let l={startTime:0,endTime:0,texts:[],lang:i},d=a.split(this.oneLineRegExp);for(let r of d)if(!l.startTime&&!l.endTime){let u=new Uu,{startTime:m,endTime:p}=u.parse(r);l.startTime=m,l.endTime=p}else if(r.trim()!==""){let u=new _m,{texts:m}=u.parse(r);l.texts=[...l.texts,...m]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},Uu=class{constructor(){this.timeRegExp=/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/;this.timingRegExp=new RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`)}parse(e){let i={startTime:0,endTime:0},o=this.timingRegExp.exec(e);return o&&(i.startTime=this.calcTime(o[1],o[2],o[3],o[4]),i.endTime=this.calcTime(o[6],o[7],o[8],o[9])),i}parseTime(e){let i=this.timeRegExp.exec(e);return i?this.calcTime(i[1],i[2],i[3],i[4]):0}isTime(e){return this.timeRegExp.test(e)}calcTime(e="0",i="0",o="0",s="0"){let a=Number(e)*60*60,l=Number(i)*60,d=Number(o),r=+`0.${s}`;return a+l+d+r}},_m=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},s=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](l){let d=0,r=[];for(;d<l.length;){let u=["<",">"].reduce((m,p)=>{let v=l.indexOf(p,d);return m===-1||m>v?v:m},-1);if(u===-1){r.push(l.substring(d));break}r.push(l.substring(d,u)),d=u+1}return r}}),a=new Uu;for(let l of s)a.isTime(l)?i.texts.push({type:"timestamp",value:a.parseTime(l)}):i.texts.push({type:"text",value:l});return i}},Z_=hm;import{isNonNullable as bm}from"@vkontakte/videoplayer-shared/es2015";var qa,Oi,$m=0,ym=!1,J_="",eb=(t,e=0,i=0)=>t<e&&t<i,zu=(t,e=0,i=0)=>t>=e&&t<=i,Bx=(t,e=0,i=0)=>t>e&&t>i,tb=(t,e,i,o=!1)=>{var d;let s=(d=i.find(({id:r})=>r===e.value))==null?void 0:d.subtitles;if(o)return s==null?void 0:s.find(({startTime:u,endTime:m})=>zu(t,u,m));let a=t>=$m,l=t<$m;if($m=t,l&&(ym=!1),bm(qa)&&zu(t,qa.startTime,qa.endTime)&&J_===e.value)return qa;if(!bm(Oi)&&(s!=null&&s.length)&&!ym){Oi=s.find(({startTime:u,endTime:m})=>zu(t,u,m)||a&&eb(t,u,m)),qa=void 0,!bm(Oi)&&s[s.length-1].endTime<t&&(ym=!0);return}else{if(zu(t,Oi==null?void 0:Oi.startTime,Oi==null?void 0:Oi.endTime))return qa=Oi,Oi=void 0,J_=e.value,qa;(a&&Bx(t,Oi==null?void 0:Oi.startTime,Oi==null?void 0:Oi.endTime)||l&&eb(t,Oi==null?void 0:Oi.startTime,Oi==null?void 0:Oi.endTime))&&(Oi=void 0)}};var Wu={ru:"Русский",en:"English",uk:"Українська",be:"Беларуская (тарашкевiца)",es:"Español",fi:"Suomi",de:"Deutsch",it:"Italiano",bg:"Български",hr:"Hrvatski",hu:"Magyar",sr:"Српски",pt:"Português",el:"Ελληνικά",pl:"Polski",fr:"Français",ko:"한국어","zh-CN":"汉语",lt:"Lietuvių",ja:"日本語",cs:"Čeština",et:"Eesti",tt:"Татарча",ba:"Башҡортса",cv:"Чăвашла",sk:"Slovenčina",ro:"Română",no:"Norsk",lv:"Latviešu",az:"Azərbaycan dili",hy:"Հայերեն",sv:"Svenska",nl:"Nederlands",tk:"Türkmen",ka:"ქართული",da:"Dansk",uz:"O‘zbek",th:"ภาษาไทย",id:"Bahasa Indonesia",tg:"Тоҷикӣ",sl:"Slovenščina",bs:"Bosanski","pt-BR":"Português brasileiro",fa:"فارسی",vi:"Tiếng Việt",hi:"हिन्दी",si:"සිංහල",bn:"বাংলা",tl:"Tagalog",mn:"Монгол",my:"ဗမာစာ",tr:"Türkçe",ne:"नेपाली",ur:"اردو",ky:"Кыргыз тили",pa:"پنجابی",os:"Ирон",kn:"ಕನ್ನಡ",sw:"Kiswahili",kk:"Қазақша",ar:"العربية",he:"עברית",ab:"Аҧсшәа",eu:"Euskara",eo:"Esperanto"},Hx={abk:"as",ara:"ar",aze:"az",bak:"ba",bel:"be",ben:"bn",bos:"bs",bul:"bg",ces:"cs",chv:"cv",dan:"da",deu:"de",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",fas:"fa",fin:"fi",fra:"fr",heb:"he",hin:"hi",hrv:"hr",hun:"hu",hye:"hy",ind:"id",ita:"it",jpn:"ja",kan:"kn",kat:"ka",kaz:"kk",kir:"ky",kor:"ko",lav:"lv",lit:"lt",mon:"mn",mya:"my",nep:"ne",nld:"nl",nor:"no",oss:"os",pan:"pa",pol:"pl",por:"pt",ron:"ro",rus:"ru",sin:"si",slk:"sk",slv:"sl",spa:"es",srp:"sr",swa:"sw",swe:"sv",tat:"tt",tgk:"tg",tgl:"tl",tha:"th",tuk:"tk",tur:"tr",ukr:"uk",urd:"ur",uzb:"uz",vie:"vi"},oc=t=>{var e,i;return(i=(e=Wu[t])!=null?e:Wu[Hx[t]])!=null?i:void 0};import{ValueSubject as Em}from"@vkontakte/videoplayer-shared/es2015";function Ku(t){let e="";return Ji(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),Ji(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),Ji(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),Ji(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),Ji(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),Ji(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),Ji(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),Ji(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),Ji(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),Ji(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),Ji(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),Ji(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),Ji(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),Ji(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),Ji(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),Ji(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),Ji(t.controlsDesktopPaddingHorizontalMinimalView)&&(e+=`--controls-desktop-padding-horizontal-minimal-view:${t.controlsDesktopPaddingHorizontalMinimalView};`),Ji(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),Ji(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),Ji(t.font)&&(e+=`--font:${t.font};`),Ji(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),Ji(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function Ji(t){return typeof t=="string"&&!t.includes(";")}var Fx=ke('<path d="M31.257 3.998c3.037.01 4.52.39 6.13 1.24a9 9 0 013.47 3.35l.17.31.15.3c.78 1.55 1.07 3.18 1.09 6.25v9.04a1.5 1.5 0 01-3 .02v-9.65c-.05-2.04-.24-3.12-.64-4.04l-.12-.27-.13-.25A6 6 0 0036.2 7.9c-1.19-.64-2.34-.88-5.11-.9h-8.84c-2.73 0-4 .2-5.07.7l-.25.13a6 6 0 00-2.4 2.41c-.64 1.19-.88 2.34-.9 5.11v20.83c0 2.74.2 4 .7 5.08l.13.25a6 6 0 002.41 2.4c1.1.6 2.13.83 4.44.89H26a1.5 1.5 0 010 3h-4.47c-3-.05-4.53-.38-6.14-1.24a9 9 0 01-3.48-3.35l-.15-.3c-.73-1.47-1.04-3.01-1.08-5.8V15c.05-2.98.39-4.52 1.25-6.12a9 9 0 013.293-3.582c1.85-.871 2.623-1.27 5.747-1.27z"></path><path d="M30.5 33.8c0-1.68 0-2.52.33-3.16a3 3 0 0 1 1.3-1.31c.65-.33 1.49-.33 3.17-.33h6.4c1.68 0 2.52 0 3.16.33a3 3 0 0 1 1.31 1.3c.33.65.33 1.49.33 3.17v13.4c0 1.68 0 2.52-.33 3.16a3 3 0 0 1-1.3 1.31c-.65.33-1.49.33-3.17.33h-6.4c-1.68 0-2.52 0-3.16-.33a3 3 0 0 1-1.31-1.3c-.33-.65-.33-1.49-.33-3.17z"></path>',1),Ux=A('<div data-testid="player-pip-dummy"><div><!></div> <span class="title s-0"> </span></div>'),zx={hash:"s-0",code:".player-pip-dummy.s-0{align-items:center;background-color:#19191a;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;width:100%}.player-pip-dummy.is-pip-api.s-0{position:relative}.dummy-image.s-0 svg{transform:scale(1.07143)}.dummy-image.desktop.s-0{transform:scale(1.07143) rotate(-90deg) rotateY(180deg)}.title.s-0{color:#fff;font-size:16px;padding:18px 20px 10px;text-align:center}"};function xm(t,e){H(e,!0),Q(t,zx);let[i,o]=Be(),s=()=>w(u,"$interfaceLanguage$",i),a=()=>w(m,"$isMobile$",i),l=ye(),d=Mt(),r=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,m=l.ui.isMobile,p=l.ui.t,v=f(()=>s()&&p("pip_dummy_title")),$=Ku(d.view);var y=Ux();let h;var x=C(y);let I;var T=C(x);Xe(T,{width:"57",height:"56",testId:"pip-dummy-icon",children:(E,V)=>{var q=Fx();Xt(),b(E,q)},$$slots:{default:!0}}),S(x);var D=P(x,2),k=C(D,!0);S(D),S(y),N((E,V)=>{h=ie(y,1,"player-pip-dummy s-0",null,h,E),Ke(y,$),I=ie(x,1,"dummy-image s-0",null,I,V),ge(k,n(v))},[()=>({"is-pip-api":r}),()=>({desktop:!a()})]),b(t,y),F(),o()}import{clientChecker as rb}from"@vkontakte/videoplayer-core/es2015";import{debounceFn as Kx,getWindow as wm,ValueSubject as Sm}from"@vkontakte/videoplayer-shared/es2015";import{detectEmbed as Wx,getWindow as ib}from"@vkontakte/videoplayer-shared/es2015";var ma=()=>{var t;return(t=ib().document)==null?void 0:t.pictureInPictureEnabled},Wl=()=>{let{isEmbed:t}=Wx();return"documentPictureInPicture"in ib()&&!t},qu=t=>!!t.pictureInPictureWindow,ob=t=>!!t.target&&"height"in t.target&&"width"in t.target,nb=t=>typeof t=="boolean"?t:t!==void 0;var Qa=class{constructor({enabled:e=!0}){this.isRequested=!1;this.videoElement=void 0;this.playerContainer=void 0;this.externalEventHandlers={};this.eventHandlers={enterpictureinpicture:this.onEnterPictureInPicture.bind(this),leavepictureinpicture:this.onLeavePictureInPicture.bind(this),resize:Kx(this.onResize.bind(this),300)};this.info={isActive$:new Sm(!1),isEnabled$:new Sm(!1),type:0};this.info.isEnabled$=new Sm(e)}isSupported(){return ma()}isActive(){return this.info.isActive$.getValue()}setContext(e){this.svelteContext=e}revealPictureInPicture(){return $t(this,null,function*(){this.isRequested&&(this.removeEventHandlers(),yield this.request(),this.addEventHandlers())})}request(){return $t(this,null,function*(){var e;if(!(!this.isSupported()||this.isActive()))try{yield(e=this.videoElement)==null?void 0:e.requestPictureInPicture()}catch(i){this.isRequested=!1}})}exit(){return $t(this,null,function*(){let{document:e}=wm();!this.isSupported()||!this.isActive()||!this.videoElement||!e.pictureInPictureElement||(yield e.exitPictureInPicture(),rb.browser.isYandex&&!this.videoElement.isConnected&&this.onLeavePictureInPicture())})}assignPlayerContainer(e){this.isSupported()&&(this.playerContainer=e)}updateVideoElement(){this.isSupported()&&this.exit().finally(()=>{var i;this.removeEventHandlers();let e=this.videoElement;this.videoElement=(i=this.playerContainer)==null?void 0:i.querySelector("video"),this.waitForSafariLeavePictureInPicture(e,this.videoElement),this.addEventHandlers()})}addEventHandlers(){var e,i;(e=this.videoElement)==null||e.addEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.addEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}setExternalEventHandlers(e){this.externalEventHandlers=Ge({},e)}removeEventHandlers(){var e,i;(e=this.videoElement)==null||e.removeEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.removeEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}dispose(){return $t(this,null,function*(){this.removeEventHandlers(),yield this.exit(),this.info.isActive$.next(!1),this.isRequested=!1})}onEnterPictureInPicture(e){var o,s;let i=qu(e)?e.pictureInPictureWindow:void 0;this.info.isActive$.next(!0),this.isRequested=!0,i==null||i.addEventListener("resize",this.eventHandlers.resize),(s=(o=this.externalEventHandlers).enterpictureinpicture)==null||s.call(o)}onLeavePictureInPicture(e){var i,o;if(e){let s=qu(e)?e.pictureInPictureWindow:void 0;s==null||s.removeEventListener("resize",this.eventHandlers.resize)}this.info.isActive$.next(!1),this.isRequested=!1,this.eventHandlers.resize.cancel(),(o=(i=this.externalEventHandlers).leavepictureinpicture)==null||o.call(i)}onResize(e){var o,s;let i=ob(e)?e.target:qu(e)?e.pictureInPictureWindow:void 0;i&&((s=(o=this.externalEventHandlers).resize)==null||s.call(o,{width:i.width,height:i.height}))}setEnabled(e){this.info.isEnabled$.next(e)}waitForSafariLeavePictureInPicture(e,i){if(rb.browser.isSafari&&e&&e!==i){let s=this.eventHandlers.leavepictureinpicture,a=0,l=()=>{wm().clearTimeout(a),e.removeEventListener("leavepictureinpicture",d)},d=r=>(s(r),l());e.addEventListener("leavepictureinpicture",d),a=wm().setTimeout(l,1e3)}}};function Tm(t){return t instanceof Qa}var qx=Object.defineProperty,Qx=Object.defineProperties,Gx=Object.getOwnPropertyDescriptors,sb=Object.getOwnPropertySymbols,Yx=Object.prototype.hasOwnProperty,jx=Object.prototype.propertyIsEnumerable,Pm=(t,e,i)=>e in t?qx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Xx=(t,e)=>{for(var i in e||(e={}))Yx.call(e,i)&&Pm(t,i,e[i]);if(sb)for(var i of sb(e))jx.call(e,i)&&Pm(t,i,e[i]);return t},Zx=(t,e)=>Qx(t,Gx(e)),Fs=(t,e,i)=>Pm(t,typeof e!="symbol"?e+"":e,i),Im=(t,e,i)=>new Promise((o,s)=>{var a=r=>{try{d(i.next(r))}catch(u){s(u)}},l=r=>{try{d(i.throw(r))}catch(u){s(u)}},d=r=>r.done?o(r.value):Promise.resolve(r.value).then(a,l);d((i=i.apply(t,e)).next())}),Jx=400,e2=225,rc=class{constructor({enabled:e=!0,initialSize:i={width:Jx,height:e2}}){Fs(this,"initialSize"),Fs(this,"playerDomElement"),Fs(this,"playerParentShadowRoot"),Fs(this,"playerDummyElement"),Fs(this,"svelteContext"),Fs(this,"pipWindow"),Fs(this,"info",{isActive$:new Em(!1),isEnabled$:new Em(!1),type:1}),Fs(this,"pipActive",!1),Fs(this,"pipApi"),this.initialSize=i,this.info.isEnabled$=new Em(e),ma()&&(this.pipApi=new Qa({enabled:e}),this.pipApi.info.isActive$.subscribe(o=>{(o&&!this.info.isActive$.getValue()||!o&&this.pipActive)&&this.info.isActive$.next(o),this.pipActive=o}))}isSupported(){return Wl()}isActive(){return this.info.isActive$.getValue()}setPlayerDomElement(e,i){this.playerDomElement=e,this.playerParentShadowRoot=i}setContext(e){this.svelteContext=e}request(){return Im(this,null,function*(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=yield documentPictureInPicture.requestWindow(Zx(Xx({},this.initialSize),{copyStyleSheets:!0})),this.pipWindow.document.body.style.margin="0";let o=[...this.playerParentShadowRoot.styleSheets].map(r=>[...r.cssRules].map(u=>u.cssText).join(" ")).filter(Boolean).join(`
|
|
59
|
+
`),s=document.createElement("style");s.textContent=o;let a=this.createStretchedContainer(),l=a.attachShadow({mode:"open"});l.append(s),l.append(this.playerDomElement);let d={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=Yr(xm,d),(e=this.pipWindow)==null||e.document.body.append(a),this.pipWindow.focus(),this.info.isActive$.next(!0),(i=this.pipWindow)==null||i.addEventListener("unload",r=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(Da(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})})}exit(){return Im(this,null,function*(){return new Promise(e=>{var i,o,s;this.pipWindow?((i=documentPictureInPicture.window)==null||i.close(),window.focus()):(o=this.pipApi)!=null&&o.isActive()&&((s=this.pipApi)==null||s.exit()),e()})})}dispose(){return Im(this,null,function*(){yield this.exit()})}setEnabled(e){var i;this.info.isEnabled$.next(e),(i=this.pipApi)==null||i.setEnabled(e)}assignPlayerContainer(e){var i;(i=this.pipApi)==null||i.assignPlayerContainer(e)}updateVideoElement(){var e;(e=this.pipApi)==null||e.updateVideoElement()}setExternalEventHandlers(e){var i;(i=this.pipApi)==null||i.setExternalEventHandlers(e)}createStretchedContainer(){let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e}};function Qu(t){return t instanceof rc}var km=(t,e)=>{if(nb(e)&&Wl())return new rc(Ge({enabled:t},typeof e!="boolean"&&e));if(ma())return new Qa({enabled:t})};import{Subscription as t2}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-statistics/es2015";var Gu=class{constructor(e,i,o,s=new t2){this.oneStat=e;this.thinOneStat=i;this.mediascopePixel=o;this.statSubscription=s}destroy(){var e,i,o;(e=this.oneStat)==null||e.destroy(),(i=this.thinOneStat)==null||i.destroy(),(o=this.mediascopePixel)==null||o.destroy(),this.statSubscription.unsubscribe()}};var Yu=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(Yu||{});var $s=t=>t!=null?t:0,Us=(t,e)=>{var s,a;let i=(s=t==null?void 0:t.getBoundingClientRect)==null?void 0:s.call(t),o=(a=e==null?void 0:e.getBoundingClientRect)==null?void 0:a.call(e);return{top:Math.round($s(i==null?void 0:i.top)-$s(o==null?void 0:o.top)),left:Math.round($s(i==null?void 0:i.left)-$s(o==null?void 0:o.left)),bottom:Math.round($s(i==null?void 0:i.bottom)-$s(o==null?void 0:o.top)),right:Math.round($s(i==null?void 0:i.right)-$s(o==null?void 0:o.left))}},Kl=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:$s(e==null?void 0:e.width),height:$s(e==null?void 0:e.height)}};var Mn="off";var ql=t=>!!(Math.round(Math.abs(t)/90)%2);var pb=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:s,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:r,webApi:u,videoEpisodes:m,previewThumbsData:p,uiConfig:v,coreConfig:$,player:y,disabledControls:h,isInteractive:x,interactiveRanges$:I,isInteractiveTime$:T,replayInteractive:D,stopPlayer:k,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:V,additionalButtons:q,additionalSettingsMenuItems:L,additionalContextMenuItems:z,playPrevVideo:j,playNextVideo:te,onVideoChanged:ee,looped:oe=!1,statistics:ae,saveRate:le,internalsExposure:ce,playerView:X,playerId:_e,metaConfig:Ee,appTracer:de})=>{var Yv,jv;let ze=Jt(Ge({},$),{isAudioDisabled:l,live:Jt(Ge({},(Yv=$.live)!=null?Yv:{}),{isLiveCatchUpMode:!!s})}),ue=v,pe=u2.createRootTracer(ue.features.tracer),Z=pe.createComponentTracer("Store"),B=y||new o2(ze,pe,{playerId:_e,onDevNullLog:r==null?void 0:r.onDevNullLog});ce==null||ce.expose({corePlayer:B});let fe=new d2,me=new Fu(fe,{loadTimeout:ue.ads.loadTimeout,initTimeout:ue.ads.initTimeout,runtimeTimeout:ue.ads.runtimeTimeout,useAdmanFromNPM:ue.ads.useAdmanFromNPM,volumeMultiplier:ue.ads.volumeMultiplier,isVsidOriginal:ue.ads.isVsidOriginal}),Ie=u==null?void 0:u.pictureInPictureApi,ot=u==null?void 0:u.annotationsApi,Me=u==null?void 0:u.slotsApi,be=u==null?void 0:u.focusManager,W=fe.createComponentLog("Store"),Ce,Ae,Qe={},Te=new $u,we=new db,He="",st=re(!1),ct=re(!1),It=ae&&ae.oneStat?ti(ae.oneStat.vsid$):Lr(void 0),lt=re(aa()),ai=re(!1),St=()=>C_(document,ab.device.isIOS),Rt=(jv=Ie==null?void 0:Ie.info.isActive$)!=null?jv:new cb(!1),Dt=re(0),Wt=re(!1),Le=re(!1),Y=re([]),Oe=c2(B.events.fatalError$,B.events.managedError$).subscribe(c=>Y.update(_=>[..._,c])),$e=Lr(!1,c=>{let _=B.events.fatalError$.subscribe(()=>c(!0));return()=>_.unsubscribe()}),Ne=c=>{ct.set(c)},ft=c=>$t(null,null,function*(){var ne;let _=Object.values(r2).includes(c);if(ue.downloadVKLanguages&&(_&&ue.updateBuiltinLanguages||!Df(c))){let Pe;try{Pe=yield l2(c,Oh,Nh)}catch(Je){(ne=ae==null?void 0:ae.oneStat)==null||ne.logError({errorType:"VKLangPack",fatal:!1}),de==null||de.error({category:ub.WTF,id:"VKLangPack",message:String(Je),thrown:Je},{severity:"warning"})}Pe&&(Rf({language:c,pack:Pe,fallback:ue.defaultLanguage}),Et.set(c),Se.update(Je=>Je+1))}Df(c)&&Et.set(c)}),Et=re(t),Se=re(0),Ye=re(e);ft(t);let Ue=(c,_)=>{let R=he(Et);return Of(R,c,_,ue.defaultLanguage)},xe=re("thumb");xe.subscribe(c=>{c==="ads"&&B.info.playbackState$.getValue()&&qt()});let Ot=(()=>{let c=mi([$e,xe],([_,R])=>_?"crashed":R);return Jt(Ge({},c),{is:_=>he(c)===_})})(),Tt=re(),qt=()=>{Tt.set({muted:B.info.muted$.getValue()})},_i=(()=>{let c=re(new Set(h));return Jt(Ge({},c),{add:_=>{c.update(R=>new Set([...R].concat(_)))},remove:_=>{c.update(R=>{let ne=[...R];return new Set(Array.isArray(_)?ne.filter(Pe=>!_.includes(Pe)):ne.filter(Pe=>Pe!==_))})},includes:_=>{let R=he(c);return Array.isArray(_)?_.every(ne=>R.has(ne)):R.has(_)}})})(),vi=re({width:0,height:0}),Mi=null,eo=B.info.isBuffering$,di=Lr(eo.getValue(),c=>{let _=eo.subscribe(R=>{R&&Mi===null?Mi=window.setTimeout(()=>{c(eo.getValue()),Mi=null},ue.loaderDelay):c(R)});return()=>{_.unsubscribe(),Mi&&clearTimeout(Mi)}});Z.log("create store"),W({message:"create store"});let Si=c=>{let _=c.container,R=()=>{nt=new MutationObserver(Pe=>{let{removedNodes:Je}=Pe[0];Je.length&&_.append(B.experimental.element$.getValue())}),nt.observe(_,{childList:!0})},ne=B.experimental.element$.getValue();if(ne)_.append(ne),R();else{let Pe=B.experimental.element$.pipe(v2(Je=>!!Je),g2()).subscribe(Je=>{_.append(Je),R()});we.add(Pe)}},to=c=>{W({message:`init video, config: ${JSON.stringify(c)}`}),x?Si(c):(f2.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[m2()]}),B.initVideo(c)),Z.log("init video",{isInteractive:x}),c.subtitles&&B.setExternalTextTracks(c.subtitles),Ce=c,He=c.subtitlesForcedLanguage||""},Vi=new ac,ci=c=>Vi.next(c),Ki=new ac,_t=new cb(zs.UNKNOWN),We=new ac,nt=null,ut={actionRewind$:Ki,actionSeek$:_t,inPiP$:Rt,inFullscreen$:new ju(c=>lt.subscribe(_=>c.next(_))),actionSetSubtitle$:We,nextMovie$:Vi},pi=new ac,qi=new ac,io={actionSeek$:_t,actionSubtitlesSwitched$:pi,actionQuality$:qi,playerSize$:new ju(c=>vi.subscribe(_=>c.next(_))),inPiP$:Rt,inFullscreen$:new ju(c=>lt.subscribe(_=>c.next(_))),isLoaderVisible$:new ju(c=>di.subscribe(_=>c.next(_)))};if(ae){let{oneStat:c,thinOneStat:_,mediascopePixel:R,statSubscription:ne}=ae;c&&(x||ne.add(c.attachTo(B)),ne.add(c.attachToUi(ut)),ne.add(c.attachToAds(me.events)),c.authorize(a).catch(Pe=>{W({message:`onestat auth error ${String(Pe)}`})}),R&&R.attachTo(B)),_&&(ne.add(_.attachTo(B,me.events)),ne.add(_.attachToUi(io)),ne.add(_.attachToAds(me.events)),_.updateContext({isMobile:he(st)}),_.authorize(a))}de&&(de.addSubscription(B.events.managedError$.subscribe(c=>{de.error(c,{severity:"debug"})})),de.addSubscription(B.events.fatalError$.subscribe(c=>{de.error(c,{severity:"fatal"})})),ae!=null&&ae.oneStat&&de.addSubscription(ae.oneStat.experimental.error$.subscribe(c=>{de.error(c,{severity:"warning"})})));let pn=()=>{if(ab.device.isIOS&&Ae)try{T_(Ae)}catch(c){W({message:`exitIosSafariFullscreen failed: ${c}`})}};we.add(B.experimental.element$.subscribe(c=>{c&&c!==Ae&&(Ae=c,c.classList.add("player-media"),Ie==null||Ie.updateVideoElement(),x&&c.setAttribute("pip","false"),(X==="preview"||!ue.features.pip&&!ue.features.dpip)&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(B.events.ended$.subscribe(()=>{var c;pn(),(c=r==null?void 0:r.onEnded)==null||c.call(r)})).add(B.events.looped$.subscribe(()=>{var c;(c=r==null?void 0:r.onLooped)==null||c.call(r)})).add(B.events.started$.subscribe(()=>$t(null,null,function*(){var _,R;Tm(Ie)&&(yield Ie==null?void 0:Ie.revealPictureInPicture());let c=B.info.muted$.getValue();(_=r==null?void 0:r.onStarted)==null||_.call(r),(R=Qe.onStarted)==null||R.call(Qe,c)}))).add(B.events.willSeek$.subscribe(({from:c,to:_})=>{var R;(R=r==null?void 0:r.onSeek)==null||R.call(r,c,_,_t.getValue())})).add(B.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=r==null?void 0:r.onAutoplaySoundProhibited)==null||c.call(r)})).add(B.info.position$.subscribe(c=>{var R;let _=B.info.duration$.getValue();isFinite(_)&&_>0&&((R=r==null?void 0:r.onTimeupdate)==null||R.call(r,_,c),me.setPosition(c,_))})).add(B.events.fatalError$.subscribe(c=>{var _;(_=r==null?void 0:r.onCrashed)==null||_.call(r,c?`${c.id}: ${c.message}`:void 0)})).add(B.events.fetcherRecoverableError$.subscribe(c=>{var _;(_=r==null?void 0:r.onRecoverableError)==null||_.call(r,c?`${c.id}: ${c.message}`:void 0)})).add(B.events.loadedMetadata$.subscribe(()=>{Wt.set(!0)})).add(B.info.is3DVideo$.subscribe(c=>{Le.set(c)})).add(B.info.isEnded$.subscribe(c=>{x&&(c?(T!=null&&T.getValue()&&_i.add(Md),_i.add("PLAY_BUTTON")):_i.remove("PLAY_BUTTON"))})).add(B.info.liveTime$.subscribe(c=>{var _;(_=r==null?void 0:r.onLiveTime)==null||_.call(r,c)})).add(B.info.isStalled$.subscribe(c=>{var _;(_=r==null?void 0:r.onStalledChanged)==null||_.call(r,c)})).add(B.info.isLiveEnded$.subscribe(c=>{var _;return c&&((_=r==null?void 0:r.onLiveEnded)==null?void 0:_.call(r))})).add(me.events.loadStarted$.subscribe(()=>{var c,_;return(_=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:_.call(c)})).add(me.events.loadEnded$.subscribe(()=>{var c,_;return(_=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:_.call(c)})).add(me.events.loadError$.subscribe(()=>{var c,_;return(_=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onLoadError)==null?void 0:_.call(c)})).add(me.events.init$.subscribe(()=>{var c,_;return(_=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onInit)==null?void 0:_.call(c)})).add(me.events.ready$.subscribe(()=>{var c,_;return(_=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onReady)==null?void 0:_.call(c)})).add(me.events.started$.subscribe(c=>{var _,R;return(R=(_=r==null?void 0:r.adsInfo)==null?void 0:_.onStarted)==null?void 0:R.call(_,c)})).add(me.events.timeRemained$.subscribe(c=>{var _,R;return(R=(_=r==null?void 0:r.adsInfo)==null?void 0:_.onTimeRemained)==null?void 0:R.call(_,c)})).add(me.events.ended$.subscribe(c=>{var _,R;return(R=(_=r==null?void 0:r.adsInfo)==null?void 0:_.onCompleted)==null?void 0:R.call(_,c)})).add(me.events.empty$.subscribe(()=>{var c,_;return(_=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onEmpty)==null?void 0:_.call(c)})).add(me.events.clicked$.subscribe(c=>{var _,R;return(R=(_=r==null?void 0:r.adsInfo)==null?void 0:_.onClicked)==null?void 0:R.call(_,c)})).add(me.events.closed$.subscribe(c=>{var _,R;return(R=(_=r==null?void 0:r.adsInfo)==null?void 0:_.onClosed)==null?void 0:R.call(_,c)})).add(me.events.error$.subscribe(c=>{var _,R;return(R=(_=r==null?void 0:r.adsInfo)==null?void 0:_.onError)==null?void 0:R.call(_,c)})).add(me.events.paused$.subscribe(()=>{var c,_;return(_=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onPaused)==null?void 0:_.call(c)})).add(me.events.resumed$.subscribe(()=>{var c,_;return(_=(c=r==null?void 0:r.adsInfo)==null?void 0:c.onResumed)==null?void 0:_.call(c)}));let U=new db,it=()=>{var Je,kt,Nt;let{debugLog:c}=ue,_,R="#9df7b7",ne="#efd169";if(c&&c!==!0){let{colors:zt}=c;_=c.tag,R=(Je=zt==null?void 0:zt[0])!=null?Je:R,ne=(Nt=(kt=zt==null?void 0:zt[1])!=null?kt:zt==null?void 0:zt[0])!=null?Nt:ne}let Pe=_?`: ${_}`:"";U.add(B.events.log$.subscribe(zt=>{console.debug(`%c sdk${Pe} `,`background:${R};`,`sdk component: ${zt.component}`,zt.message)})).add(fe.log$.subscribe(zt=>{console.debug(`%c ui${Pe} `,`background:${ne};`,`ui component: ${zt.component}.`,zt.message)}))},Yt=()=>{U.unsubscribe()},gi=(c,_)=>{Z.log("start camera manual rotation",{mx:c,my:_}),B.startCameraManualRotation(c,_)},at=(c=!1)=>{Z.log("stop camera manual rotation",{immediate:c}),B.stopCameraManualRotation(c)},li=(c,_,R)=>{Z.log("move camera focus px",{xpx:c,ypx:_,dt:R}),B.moveCameraFocusPX(c,_,R)},bi=()=>{B.holdCamera()},Gt=()=>{B.releaseCamera()},Ct=Lr(B.info.position$.getValue(),c=>{let _,R,ne=()=>{let Pe=B.info.playbackState$.getValue(),Je=B.info.isLive$.getValue(),kt=B.info.duration$.getValue(),Nt=B.info.position$.getValue();if(Pe&&[Ql.PLAYING,Ql.PAUSED].includes(Pe)){let zt=Je?Nt-kt:B.getExactTime();zt!==R&&c(zt),R=zt}_=requestAnimationFrame(ne)};return ne(),()=>cancelAnimationFrame(_)}),bo=ti(B.info.playbackState$),Oo=ti(B.info.isBuffering$),fn=mi([bo,Oo],([c,_])=>_?"buffering":c),mn=ti(B.info.currentBuffer$),Pi=ti(B.info.isEnded$),Ci=ti(B.info.isLive$),vn=ue.features.playbackRate?ti(B.info.canChangePlaybackSpeed$):Lr(!1),_r=ti(B.info.liveBufferTime$),xi=ti(B.info.volume$),So=ti(B.info.muted$),No=yu(B.info.predefinedQualityLimitType$.pipe(lb(c=>c===ys.TRAFFIC_SAVING)),B.info.predefinedQualityLimitType$.getValue()===ys.TRAFFIC_SAVING),Bo=yu(B.info.predefinedQualityLimitType$.pipe(lb(c=>c===ys.HIGH_QUALITY)),B.info.predefinedQualityLimitType$.getValue()===ys.HIGH_QUALITY),gn=ti(B.info.autoQualityLimitingAvailable$),es=ti(B.info.availableQualities$),xs=ti(B.info.availableQualitiesFps$),ts=ti(B.info.chromecastState$),br=ti(B.info.chromecastDeviceName$),hn=ti(B.info.currentFormat$),is=ti(B.info.throughputEstimation$),Zn=ti(B.info.videoBitrate$),Rr=ti(B.info.intrinsicVideoSize$),Co=ti(B.info.duration$),os=ti(B.info.isAudioAvailable$),$r=()=>{Mi&&clearTimeout(Mi),Mi=null},Vn=mi([Co,Ci],([c,_])=>_?-c:c),Rn=mi([bo],([c])=>c===Ql.PLAYING),Dn=ti(B.info.atLiveEdge$),Jn=ti(B.info.atLiveDurationEdge$),Dr=ti(B.info.position$),ns=mi([Dr,Co],([c,_])=>isFinite(c)&&isFinite(_)&&!!_),ki=mi([ts],([c])=>c===i2.CONNECTED),rs=ti(B.info.availableVideoStreams$),Ho=ue.features.audioLanguages?ti(B.info.availableAudioStreams$):Lr([]),er=ti(B.info.currentVideoStream$),yr=ti(B.info.currentAudioStream$),tr=c=>{c.language&&Af(c.language),B.setVideoStream(c)},pt=(c,_)=>{B.setAudioStream(c),Eo(_)&&(c.language&&Af(c.language),ue.features.userVideoPrefs&&i&&Vf(ue.userSalt,String(i),{audioTrackId:c.id}))},Zt=c=>{let _;if(c.length===1&&(_=c.at(0)),_!=null||(_=c.find(ne=>"isDefault"in ne&&ne.isDefault)),ue.features.userVideoPrefs&&i){let ne=Tu(ue.userSalt,String(i));if(ne!=null&&ne.audioTrackId){let Pe=c.find(Je=>Je.id===ne.audioTrackId);_=Pe!=null?Pe:_}}let R=c_();return R&&(_!=null||(_=c.find(({language:ne})=>R===ne))),_!=null||(_=c.at(0)),_},xr=c=>{Z.log("change audio stream",{id:c});let _=B.info.availableAudioStreams$.getValue().find(R=>R.id===c);_&&pt(_,!0)},ss=!1;we.add(B.info.availableAudioStreams$.subscribe(c=>{if(!ss&&c.length){let _=Zt(c);_&&(B.setAudioStream(_),ss=!0)}})),Ho.subscribe(c=>{var _;(_=r==null?void 0:r.onAvailableAudioStreamsChanged)==null||_.call(r,c.map(({label:R="",id:ne="",language:Pe=""})=>({label:R,language:Pe,id:ne})))}),yr.subscribe(c=>{var _;return c&&((_=r==null?void 0:r.onAudioStreamChanged)==null?void 0:_.call(r,c.id))});let ir=!1;we.add(B.info.availableVideoStreams$.subscribe(c=>{if(!ir&&c.length){let _=Zt(c);_&&(B.setVideoStream(_),ir=!0)}}));let on=re(void 0),On=ti(B.info.isAutoQualityEnabled$,c=>c&&on.set(void 0)),or=ti(B.info.currentQuality$,()=>on.set(void 0)),Or=mi([on,or],([c,_])=>c!=null?c:_),Fo=mi(hn,c=>c!==sc.MPEG),_n=mi([es,xs,On,Or,Fo],([c,_,R,ne,Pe])=>{let Je=[];Pe&&Je.push({value:"auto",displayValue:Ue("auto_quality_option"),selected:R});let kt=c.filter(Nt=>!s2(Nt));for(let Nt of kt){let zt=_[Nt];Je.push({value:Nt,displayValue:`${Nt}${zt?X_(zt):""}`,selected:R?!1:Nt===ne})}return Je}),Nn=ti(B.info.currentPlaybackRate$),uo=mi([Nn,Dn,Jn],([c,_,R])=>{let ne=R||x?1:ue.controls.playbackRateMin,Pe=_?1:ue.controls.playbackRateMax,Je=ue.controls.playbackRateStep,kt=[];for(let Nt=ne;Nt<=Pe;Nt+=Je)kt.push({value:Nt,displayValue:Nt===1?Ue("playback_rate_1"):Ue("playback_rate",{multiplier:Nt.toString(10)}),selected:c===Nt});return kt}),To=()=>({displayValue:Ue("subtitles_off"),value:Mn,language:""}),Bn=re(To()),Ri=mi([Bn,Se],([c],_)=>{c.value===Mn?_(To()):_(c)}),nr=ue.features.subtitles?ti(B.info.availableTextTracks$):Lr([]),bn=Zh(),Nr=mi([nr,Ri],([c,_],R)=>{var Je;let ne=[],Pe=c.find(({id:kt})=>kt===_.value);if(Pe!=null&&Pe.url){let[,kt]=(Je=bn.find(Pe.url))!=null?Je:[];if(kt){R(kt);return}Te.download(Pe.url).then(Nt=>{if(!Nt||Te.isDestroyed())return;let zt=new Z_,js=Pe.language;if(js){let p$=!!Pe.isAuto,f$=zt.parse(Nt,js);ne.push({lang:js,subtitles:f$,isAuto:p$,id:Pe.id})}bn.add(Pe.url,ne),he(Ri).value===_.value&&R(ne)}).catch(h2).catch(Nt=>{var zt;(zt=ae==null?void 0:ae.oneStat)==null||zt.logError({errorType:"Subtitles download",fatal:!1}),de==null||de.error({category:ub.WTF,id:"Subtitles download",message:String(Nt),thrown:Nt},{severity:"warning"})})}R(ne)}),bt=mi([Nn,Rn,Ri],([c,_,R],ne)=>{let kt;if(B.info.isLive$.getValue()&&_&&R.value!==Mn){let zt=()=>{let js=1e3/(3*c);kt=setTimeout(zt,js),ne(Date.now())};return zt(),()=>clearTimeout(kt)}}),ui=mi([nr,Ri],([c,_])=>{if(!c.length)return[];let R=[];for(let{language:ne,isAuto:Pe,id:Je}of c){let kt=ne&&oc(ne);ne&&kt&&R.push({displayValue:Pe?Ue("subtitles_auto",{language:kt}):kt,value:Je,selected:(_==null?void 0:_.value)===Je,isAuto:Pe,language:ne})}return R.length?(R.unshift(Jt(Ge({},To()),{selected:(_==null?void 0:_.value)===Mn})),R):[]}),Ut={available:[],prev:[]},nn=()=>{var _,R;let c=B.experimental.getCurrentTime$.getValue();return(R=(_=c==null?void 0:c())!=null?_:Ae==null?void 0:Ae.currentTime)!=null?R:0},$o=mi([Ct,Ri,Nr,bt],([c,_,R,ne])=>{var Je;let Pe=B.info.isLive$.getValue();if(Pe&&Ut.prev!==R){let kt=R.find(({id:zt})=>zt===_.value),Nt=Ut.prev.find(({id:zt})=>zt===_.value);if(kt){let zt=Jt(Ge({},kt),{subtitles:[...(Je=Nt==null?void 0:Nt.subtitles)!=null?Je:[],...kt.subtitles]});Ut.available=[zt],Ut.prev=R}}if(_&&_.value!==Mn){let kt=Pe?nn():c,Nt=Pe?Ut.available:R;return tb(kt,_,Nt,Pe)}}),$n=mi([$o],([c])=>c!=null&&c.texts?c.texts:[]);we.add(Ri.subscribe(c=>{var _,R;if(c.value===Mn)(_=r==null?void 0:r.onSubtitleOff)==null||_.call(r);else{let ne=Object.entries(Wu).find(([Pe,Je])=>Je===c.displayValue);(R=r==null?void 0:r.onSubtitleOn)==null||R.call(r,ne?ne[0]:"",c.value)}}));let yo=re(!0),rr=mi([mn,Vn,Dr,_r],([c,_,R,ne])=>{var Nt;let Pe=(Nt=c==null?void 0:c.end)!=null?Nt:0;if(!ne)return Pe/_;let kt=-R+ne-_;return(Pe-kt)/_}),oo=ti(B.info.availableSources$),wr=mi([oo],([c])=>Object.keys((c==null?void 0:c[sc.MPEG])||{}).length>0),Io=()=>{var R,ne,Pe;let c=Object.keys(((ne=(R=B.info.availableSources$)==null?void 0:R.getValue())==null?void 0:ne[sc.MPEG])||{}),_=n2(c)||p2.Q_144P;return(Pe=Ce.sources[sc.MPEG])==null?void 0:Pe[_]},yn=()=>{var _;let c=Io();if(c)Z.log("download video",{url:c}),Yh(c,((_=Ce==null?void 0:Ce.meta)==null?void 0:_.title)||"video");else{let R="There is no URL for download video";Z.log("download video",{message:R}),W({message:R})}},as=()=>{W({message:"toggle muted"});let c=B.info.muted$.getValue();B.info.volume$.getValue()===0&&!c?Fr(Hr(),!1):Hn(!c,!1)},Br=()=>{var c;if(Ft.ui.settingsMenu.visible$.set(!1),!he(Ft.ui.settingsSubMenu.visible$)){let _=he(Ft.ui.settingsMenu.ref$);if((c=r==null?void 0:r.uiInfo)!=null&&c.onSettingsMenu&&_){let ne=Kl(_),Pe={top:0,left:0,bottom:0,right:0};r.uiInfo.onSettingsMenu({visible:!1,size:ne,position:Pe,name:"settings"})}}Z.log("close settings menu")},ls=(c,_=()=>Promise.resolve())=>$t(null,null,function*(){var Pe;Ft.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Ft.ui.settingsMenu.visible$.set(!0),yield _();let R=he(Ft.ui.settingsMenu.ref$),ne=pl();if((Pe=r==null?void 0:r.uiInfo)!=null&&Pe.onSettingsMenu&&R&&ne){let kt=Kl(R),Nt=Us(R,ne);r.uiInfo.onSettingsMenu({visible:!0,size:kt,position:Nt,name:"settings"})}Z.log("open settings menu",{wasOpenedByKeyboard:c})}),no=(c,_=!1)=>{var Je;Ft.ui.settingsSubMenu.visible$.set(!1);let R=he(Ft.ui.settingsMenu.ref$),ne=pl(),Pe=he(Ft.ui.settingsMenu.visible$);if((Je=r==null?void 0:r.uiInfo)!=null&&Je.onSettingsMenu&&R&&ne)if(Pe&&!_){let Nt=Kl(R),zt=Us(R,ne);r.uiInfo.onSettingsMenu({visible:!0,size:Nt,position:zt,name:"settings"})}else{let Nt=Kl(c),zt={top:0,left:0,bottom:0,right:0},js=he(Ft.ui.settingsSubMenu.name$);r.uiInfo.onSettingsMenu({visible:!1,size:Nt,position:zt,name:js})}Z.log("close settings sub menu")},ds=(c,_)=>{var ne;Ft.ui.settingsSubMenu.visible$.set(!0),Ft.ui.settingsSubMenu.ref$.set(_),Ft.ui.settingsSubMenu.name$.set(c);let R=pl();if((ne=r==null?void 0:r.uiInfo)!=null&&ne.onSettingsMenu&&_&&R){let Je=Kl(_),kt=Us(_,R);r.uiInfo.onSettingsMenu({visible:!0,name:c,size:Je,position:kt})}Z.log("open settings sub menu",{name:c})},Hr=()=>{var _;let c=Math.max(ue.volumeMinRestore,(_=xu())!=null?_:0);return c===0?ue.volumeDefault:c},Eo=c=>{let _=ue.features.savePreferredStatesOnUserActionOnly;return!_||_&&!c},Fr=(c,_)=>{let R=c===0?Hr():c,ne=B.info.muted$.getValue();W({message:`set volume, volume: ${c}, preferredVolume: ${R}`});let Pe=!l||Ot.is("ads");ne&&c>0&&Pe&&(ne=!1,Eo(_)&&Pf(!1)),B.setVolume(c,ne),me.setVolume(c),Eo(_)&&Cf(R)},Hn=(c,_)=>{let R=B.info.volume$.getValue();W({message:`set muted, currentVolume: ${R}, mute: ${c}`});let ne=Ot.is("ads");if(B.setMuted(c,ne),me.setVolume(c?0:R),Eo(_)&&(!ne||!c)&&Pf(c),!c&&R===0){let Pe=Hr();B.setVolume(Pe),Eo(_)&&Cf(Pe),me.setVolume(Pe)}},po=re(!1),fo=c=>{var _,R;Z.log("set looped",{isLooped:c}),po.set(c),B.setLooped(c),(R=(_=r==null?void 0:r.uiInfo)==null?void 0:_.onLoopedChanged)==null||R.call(_,c)};fo(oe);let je=()=>{var c,_;(_=(c=r==null?void 0:r.uiInfo)==null?void 0:c.onReportProblem)==null||_.call(c)},At=(c,_=!1)=>{var R;W({message:`set autoplayNextEnabled, value: ${c}`}),Z.log("set autoplay next enabled",{autoplayNextEnabled:c}),Ft.ui.autoplayNextEnabled$.set(c),f_(c),_&&((R=r==null?void 0:r.onSetAutoplayNextEnabled)==null||R.call(r,c))},fi=c=>{W({message:`set timerNextVideoRunning, value: ${c}`}),Z.log("set timer next video running",{timerNextVideoRunning:c}),Ft.ui.timerNextVideoRunning$.set(c)},Po=(c=!0)=>{var R;let _=!0;if(c&&(r!=null&&r.onPrevVideoClick))try{_=(R=r==null?void 0:r.onPrevVideoClick)==null?void 0:R.call(r)}catch(ne){W({message:"onPrevVideoClick callback failed to execute"})}ee(!0),_&&j()},ko=(c=!0)=>{var R;let _=!0;if(c&&(r!=null&&r.onNextVideoClick))try{_=(R=r==null?void 0:r.onNextVideoClick)==null?void 0:R.call(r)}catch(ne){W({message:"onNextVideoClick callback failed to execute"})}ee(!1),_&&te()},xo=()=>{var c;(c=r==null?void 0:r.onNextVideoAnnouncementShow)==null||c.call(r)},mo=()=>{var c;(c=r==null?void 0:r.onNextVideoAnnouncementClick)==null||c.call(r)},Ao=()=>{var c;(c=r==null?void 0:r.onNextVideoAnnouncementAuto)==null||c.call(r)},sr=()=>{var c;(c=r==null?void 0:r.onNextVideoAnnouncementCancel)==null||c.call(r)},ar=()=>{B.prepare()},Uo=()=>{hr(Ft);let c=he(Ft.ui.controls.disabledControls$),_=he(Ft.playerPhase),R={playerPhase:_,isInteractive:x,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(W({message:"toggle play"}),_==="ads"){R.action="play",Z.log("toggle adman play",R),me.togglePlay();return}let ne=()=>{var Je;W({message:"toggle play, call player.play"}),R.action="play",B.play(),(Je=r==null?void 0:r.onPlay)==null||Je.call(r)},Pe=()=>{var Je;W({message:"toggle play, call player.pause"}),R.action="pause",B.pause(),(Je=r==null?void 0:r.onPause)==null||Je.call(r)};if(B.info.isEnded$.getValue()){if(W({message:"toggle play, video ended, seek to 0"}),Ki.next(),_t.next(zs.REWIND),x){D==null||D();return}B.seekTime(0),ne()}else B.info.playbackState$.getValue()!==Ql.PLAYING?ne():Pe();Z.log("toggle play",R)},Ni=(c,{changeReason:_="default",appliesTo:R="to-video",byUser:ne=!1}={},Pe)=>{W({message:`set quality, quality: ${c}`}),Z.log("set quality",{quality:c}),ne&&qi.next(c),B.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Je}=ue.features;wu(),c!=="auto"?(Je?(Su({type:"exact_quality",quality:c,videoId:i},R),B.setPredefinedQualityLimits(ys.UNKNOWN)):Tf(i,c),on.set(c),B.setQuality(c)):Je&&_==="default"&&(Ze("auto_quality",R,Pe),he(No)&&Fn(!1,void 0,Pe),he(Bo)&&zo(!1,void 0,Pe))},Fn=(c,_="as-default",R)=>{W({message:`set trafficSavingEnabled, value: ${c}`}),Z.log("set traffic saving enabled",{trafficSavingEnabled:c});let ne=c?ys.TRAFFIC_SAVING:ys.UNKNOWN;ue.features.qualityDetailsSubMenuEnabled?(Sr(ne,_,R),Rd(!1)):(B.setPredefinedQualityLimits(ne),Eo(R)&&Rd(c))},zo=(c,_="as-default",R)=>{W({message:`set highQualityEnabled, value: ${c}`}),Z.log("set high quality enabled",{highQualityEnabled:c}),Sr(c?ys.HIGH_QUALITY:ys.UNKNOWN,_,R)},Sr=(c,_,R)=>{c!==ys.UNKNOWN&&(he(gn)&&!he(On)&&Ni("auto",{appliesTo:_,changeReason:"limit-changed"},R),Ze(c,_,R)),B.setPredefinedQualityLimits(c)},Ze=(c,_,R)=>{Eo(R)&&(Su({type:c,videoId:i},_),_==="as-default"&&Su({type:c,videoId:i},"to-video"))},Qt=(c,_=!0)=>{Z.log("set playback rate",{playbackRate:c}),B.setPlaybackRate(c),ue.features.saveRate&&le&&!B.info.isLive$.getValue()&&_&&u_(c)},Ai=()=>{let c=he(vn),_=he(uo),R=_.findIndex(({selected:Pe})=>Pe);if(R===_.length-1||!c)return _[R];let ne=_[R+1];return Qt(ne.value),ne},xn=()=>{let c=he(vn),_=he(uo),R=_.findIndex(({selected:Pe})=>Pe);if(R===0||!c)return _[R];let ne=_[R-1];return Qt(ne.value),ne},ro=(c=Jt(Ge({},To()),{selected:!1}),_)=>{Z.log("set subtitles",Ge({},c)),c.value!==Mn&&We.next(c.isAuto?c.value+"_auto":c.value),pi.next({enabled:c.value!==Mn,lang:c.language,auto:!!c.isAuto}),Bn.set(c),Eo(_)&&(Mf(c.value===Mn?void 0:c.language),ue.features.userVideoPrefs&&i&&Vf(ue.userSalt,String(i),{subtitleTrackId:c.value===Mn?void 0:c.value}))},Ur=c=>{Z.log("toggle subtitles");let _=he(Ri);(_==null?void 0:_.value)===Mn?Cr(c):Tr(c)},Wo=(c,_)=>{Z.log("change subtitle",{enabled:c}),c?Cr(!0,_):Tr(!0)},Cr=(c,_)=>{if(he(ct))return;Z.log("subtitle on");let R=he(ui),ne=he(Et),Pe=He!=null?He:ne,Je;_&&(Je=R.find(kt=>kt.value===_)),Je!=null||(Je=R.filter(kt=>kt.value!==Mn).find(kt=>kt.language===Pe)),ro(Je!=null?Je:R[1],c)},Tr=c=>{Z.log("subtitle off"),ro(void 0,c)};we.add(B.info.availableTextTracks$.subscribe(c=>{var R;function _(){let ne=[];for(let{language:Pe,isAuto:Je,id:kt}of c){let Nt=Pe&&oc(Pe);Pe&&Nt&&ne.push({id:kt,language:Pe,title:Je?Ue("subtitles_auto",{language:Nt}):Nt})}return ne}(R=r==null?void 0:r.onAvailableSubtitlesChanged)==null||R.call(r,_())}));let ws=re(!0),Ss=c=>{ws.set(c)},Un=(c,_,R=!0)=>{var ne;if(W({message:`seek to time, time: ${c}`}),Z.log("seek to time",{time:c,action:_,forcePrecise:R}),_t.next(_),B.info.isLive$.getValue()){let Pe=B.info.duration$.getValue(),Je=Math.min(0,Pe+c);B.seekTime(Je,R)}else{if(T!=null&&T.getValue())return;B.info.isEnded$.getValue()&&(W({message:"seek after ended, call callbacks.onPlay"}),(ne=r==null?void 0:r.onPlay)==null||ne.call(r)),B.seekTime(qv(c),R)}},ha=c=>{W({message:`seek to episode start time: ${c}`}),Z.log("seek to episode start time",{time:c}),Un(c,zs.EPISODE,!0)},cs=(c,_,R=!1)=>{W({message:`seek to percent, percent: ${c}`}),Z.log("seek to percent",{percent:c,action:_});let ne=he(Vn)*c;Un(ne,_,R)},_a=c=>{W({message:`seek external, time: ${c}`}),Z.log("seek external",{time:c}),_t.next(zs.UNKNOWN),B.seekTime(B.info.isLive$.getValue()?-c:c)},ba=c=>{var ne,Pe;let _=(ne=c.max)!=null?ne:"none",R=(Pe=c.min)!=null?Pe:"none";W({message:`set auto quality limitation. Max: ${_}. Min: ${R}`}),Z.log("set auto quality limits",{max:_,min:R}),B.setAutoQualityLimits(c)},mt=c=>{W({message:`seek external to episode start time: ${c}`}),Z.log("seek external to episode start time",{time:c}),Un(c,zs.EPISODE,!0)},ni=c=>{W({message:`set playback rate to: ${c}`}),Z.log("set playback rate external",{playbackRate:c}),B.setPlaybackRate(c)},Li=re(!1),$i=re(!1),Ir=mi([Vn,ct],([c,_])=>!!p&&c>=ue.suitableDurationForUsingRichSeek&&ue.features.useRichSeek&&!x&&X!=="preview"&&!_),Cs=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),Ts=mi([Dt],([c])=>{let _=ql(c);return Cs?!_:_});we.add(Ot.subscribe(c=>{c!=="video"&&Li.set(!1)})),Li.subscribe(c=>{var _;(_=r==null?void 0:r.onRichSeekActiveChanged)==null||_.call(r,c)});let zr=re(void 0),Bi=re(!1),Qi=c=>{W({message:`start scrubbing, progress: ${c}`}),Z.log("start scrubbing",{progress:c}),Bi.set(!0),ve(c)},ve=c=>{zr.set(c)},vt,ri,jt=()=>{zr.set(void 0),Bi.set(!1)},Ko=()=>{clearTimeout(ri),clearTimeout(vt),vt=window.setTimeout(()=>{jt()},500),Ae==null||Ae.removeEventListener("seeked",Ko)},Lo=(c,_=!1,R=_2.ActionSeekType.SLIDER)=>{W({message:`complete scrubbing, progress: ${c}`}),Z.log("complete scrubbing",{progress:c}),cs(c,R,_),he(Ft.ui.isMobile)&&he(Ft.state.currentFormat$)===sc.HLS?(Ae==null||Ae.addEventListener("seeked",Ko),ri=window.setTimeout(()=>{Ko()},300)):jt()},so=mi([Ct,Vn,zr],([c,_,R],ne)=>{ne(a2(R)?R*_:c)}),rn=re(!1),Is=()=>{rn.set(!0)},Es=()=>{rn.set(!1)},Qs=mi([vi],([{width:c}],_)=>{let R=Q_(c);_(R)}),Wr=q.filter(c=>jh(c)),Gs=mi([Qs,st],([c,_])=>_?Wr.filter(R=>!R.hideOnMobile):Wr.filter(R=>{var ne;return!((ne=R.hideOnDesktopGridTypes)!=null&&ne.includes(c))})),wn=re(q.filter(c=>Xh(c))),$a=mi([wn,Qs],([c,_])=>c.filter(R=>{var ne;return!((ne=R.hideOnDesktopGridTypes)!=null&&ne.includes(_))})),sl=mi([$a,Gs],([c,_])=>[...ue.features.additionalButtonsDesktopControlPanelRight?c.filter(R=>R.type==="desktop-control-panel-right"):[],...ue.features.additionalButtons?_.map((R,ne)=>{var Pe;return{id:ne,weight:ne,type:"desktop-control-panel-right",testId:R.testId,icon:R.iconUrl,onClick:R.onClick,ariaLabel:(Pe=R.ariaLabel)!=null?Pe:R.tooltip,tooltipText:R.tooltip}}):[]].filter(R=>!v.disabledAdditionalButtonIds.includes(R.id))),Er=re(L),ed=mi([Er],([c])=>ue.features.additionalSettingsMenuItems?c.map(_=>_.type==="SWITCH"?Jt(Ge({},_),{onClick:_.onChangeEnabled}):_):[]),al=(c,_)=>{let R=he(wn).map(ne=>ne.id!==c?ne:Ge(Ge({},ne),_));wn.set(R)},ll=c=>{let _=he(wn);if(_.some(R=>R.id===c.id)){W({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}_.push(c),wn.set(_)},dl=c=>{let _=he(wn);if(!_.some(R=>R.id===c)){W({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}_=_.filter(R=>R.id!==c),wn.set(_)},td=c=>{_t.next(zs.LIVE),W({message:"live switch to low latency "+c}),Z.log("live switch to low latency "+c),B.setLiveLowLatency(c)},ya=(c,_)=>{let R=he(Er).map(ne=>ne.id!==c?ne:Ge(Ge({},ne),_));Er.set(R)},cl=c=>{let _=he(Er);if(_.some(R=>R.id===c.id)){W({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}_.push(c),Er.set(_)},gt=c=>{let _=he(Er);if(!_.some(R=>R.id===c)){W({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}_=_.filter(R=>R.id!==c),Er.set(_)},dt=re(z),Di=mi([dt],([c])=>ue.features.additionalContextMenuItems?c:[]),qo=(c,_)=>{let R=he(dt).map(ne=>ne.id!==c?ne:Ge(Ge({},ne),_));dt.set(R)},Gi=c=>{let _=he(dt);if(_.some(R=>R.id===c.id)){W({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}_.push(c),dt.set(_)},yi=c=>{let _=he(dt);if(!_.some(R=>R.id===c)){W({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}_=_.filter(R=>R.id!==c),dt.set(_)},Hi=mi([st,$e],([c,_],R)=>{R(c&&_)}),xa=()=>{_t.next(zs.LIVE),W({message:"switch to active live"}),Z.log("switch to active live"),B.seekTime(0),B.info.playbackState$.getValue()!==Ql.PLAYING&&Ft.actions.internal.togglePlay()},ul=()=>{Z.log("skip adman"),me.skip()},gp=(c=!0)=>{var ne;hr(Ft),W({message:`switch from ads to video, callPlay: ${c}`}),Z.log("switch from ads to video",{callPlay:c}),xe.set("video"),c&&B.play(),l&&Hn(!0,!0);let _=(ne=he(Tt))==null?void 0:ne.muted,R=!B.info.muted$.getValue();_!==void 0&&!R&&Hn(_,!0),Tt.set(void 0)},Dc=()=>{hr(Ft),W({message:"switch from video to ads"}),Z.log("switch from video to ads"),Ft.actions.internal.pause(),pn(),xe.set("ads")},hp=c=>{hr(Ft);let _=c?"LiveWaitingStart":"thumb";Z.log("set live waiting start",{state:c,playerPhase:_}),xe.set(_)},Oc=c=>{hr(Ft);let _=c?"LiveWaitingRecover":"thumb";Z.log("set live waiting recover",{state:c,playerPhase:_}),xe.set(_)},_p=c=>{hr(Ft);let _=c?"LiveWaitingRecord":"thumb";Z.log("set live waiting record",{state:c,playerPhase:_}),xe.set(_)},Nc=()=>(hr(Ft),Z.log("get debug text data"),Qh(B,Ce,Ft,pe.getTraceId(),Ee)),bp=()=>(hr(Ft),JSON.stringify(pe.getFinishedSpans())),Bc=()=>(hr(Ft),Gh(B,Ce,Ft)),pl=()=>Ae,Hc=()=>{W({message:"toggle chromecast"}),Z.log("toggle chromecast"),B.toggleChromecast()},Ys=c=>{var R;if(hr(Ft),B.info.isEnded$.getValue())return;let _=!c;if(he(Ft.playerPhase)==="ads"){W({message:`pause ads, internalCall: ${_}`}),Z.log("pause ads",{internalCall:_}),me.pause();return}W({message:`pause video, internalCall: ${_}`}),Z.log("pause video",{internalCall:_}),_&&((R=r==null?void 0:r.onPause)==null||R.call(r)),B.pause()},wa=c=>{var R;hr(Ft);let _=!c;if(he(Ft.playerPhase)==="ads"){W({message:`play ads, internalCall: ${_}`}),Z.log("play ads",{internalCall:_}),me.play();return}W({message:`play video, internalCall: ${_}`}),Z.log("play video",{internalCall:_}),_&&((R=r==null?void 0:r.onPlay)==null||R.call(r)),B.play()},$p=c=>{hr(Ft);let _=!c;if(he(Ft.playerPhase)==="ads"){W({message:"player cannot be stopped during ads via external method"});return}W({message:`player will be stopped, internalCall: ${_}`}),k==null||k()},id=(c,_)=>{hr(Ft),W({message:`first start, show ads: ${c}, internalCall: ${!_}`}),Z.log("first start",{showAds:c,external:_}),c?xe.set("ads"):(xe.set("video"),_?B.play():Ft.actions.internal.togglePlay())},od=()=>(W({message:"getting time codes"}),m),nd=()=>{let c=od();if(!c||[0,1].includes(c.length))return;let _=B.info.position$.getValue();return c.find(R=>R.time>_)},yp=c=>{let _=c;_||(_=nd());let R=B.info.position$.getValue();Z.log("seek to next episode",Ge({currentTime:R},_)),_&&(W({message:"seek to next episode"}),Un(_.time,zs.EPISODE,!0))},Fc=()=>{let c=od();if(!c||[0,1].includes(c.length))return;let _=B.info.position$.getValue(),R=c.findIndex(Pe=>Pe.time>_),ne=R===-1?c.length-2:R-2;if(!(ne<0))return c[ne]},xp=c=>{let _=c;_||(_=Fc());let R=B.info.position$.getValue();Z.log("seek to prev episode",Ge({currentTime:R},_)),_&&(W({message:"seek to prev episode"}),Un(_.time,zs.EPISODE,!0))},qe=()=>(W({message:"getting preview thumbs data"}),Z.log("get preview thumbs data",Ge({},p)),p),hi=()=>$t(null,null,function*(){let c=Ie==null?void 0:Ie.isActive(),_="none";Ie!=null&&Ie.isActive()?(_="exit",yield Ie==null?void 0:Ie.exit()):(_="request",yield Ie==null?void 0:Ie.request()),Z.log("toggle picture in picture",{isActive:c,action:_})}),Qo=(c=-90)=>{Z.log("rotate video",{alphaDiff:c}),Dt.update(_=>_+c)},Sn=re([]);I==null||I.subscribe(c=>{let _=[];for(let R=0;R<c.length;R++){let{range:[ne,Pe],subjects:Je}=c[R];R===0&&ne!==0&&_.push({time:0,text:"",interactive:!1,completed:!0}),_.push({time:ne/1e3,text:"",interactive:!0,completed:ue.features.interactiveTimeOpenUri?!Je.length||Je.every(kt=>kt.isRemoved):!Je.length}),Pe!==1/0&&_.push({time:Pe/1e3,text:"",interactive:!1,completed:!0})}Sn.set(_)});let Cn=re(!1);T==null||T.subscribe(c=>{c&&he(Bi)&&jt()});let qv=c=>{if(!x)return c;let _=he(Sn),R=he(Vn),Pe=he(Dr)/R,Je=_.find(kt=>kt.interactive&&!kt.completed&&kt.time>Pe);return typeof(Je==null?void 0:Je.time)=="number"?Math.min(c,Je.time-.05):c},r$=()=>{Ft.ui.episodes.panelOpened$.set(!1)},s$=()=>{Z.log("destroy store"),clearTimeout(ri),clearTimeout(vt),we.unsubscribe(),U.unsubscribe(),B.destroy(),me.destroy(),ae==null||ae.destroy(),Oe.unsubscribe(),nt==null||nt.disconnect(),nt=null,Te.destroy(),de==null||de.destroy()},a$=mi([Dn,Ot,vn],([c,_,R])=>v.features.doubleForwardAvailable&&!c&&_==="video"&&R),wp=re(!1),Qv=2,Uc=null,Gv=c=>{if(!he(Rn)&&c)return;let _=B.info.currentPlaybackRate$.getValue();c?_!==Qv&&(Uc=_,Qt(Qv,!1),wp.set(!0)):(Uc&&Qt(Uc,!1),wp.set(!1),Uc=null)};Ot.subscribe(c=>{c!=="video"&&Gv(!1)});let l$=()=>{Ys(!1),Li.set(!0)},d$=()=>{wa(!1),Li.set(!1)},Sp=!1,c$=()=>{$i.set(!0),Sp=B.info.playbackState$.getValue()===Ql.PLAYING,Ys(!1)},u$=()=>{$i.set(!1),!he(Li)&&Sp&&wa(!1),Sp=!1};B.events.playing$.subscribe(()=>{he(Li)&&Ys(!1)});let Ft={interfaceLanguage$:Et,isCyrillicRelatedInterface$:Ye,initVideo:to,videoId:i,isClip:o,playerPhase:Ot,vsid:It,state:{positionExact$:Ct,positionWithScrubbing$:so,duration$:Vn,playbackState$:bo,playbackStateRealistic$:fn,isPlaying$:Rn,isLoaderVisible:di,bufferedProgress$:rr,isLive$:Ci,canChangePlaybackSpeed$:vn,isActiveLive$:Dn,isOldestAvailableLive$:Jn,isRewindableLive$:ns,isEnded$:Pi,muted$:So,volume$:xi,trafficSavingEnabled$:No,highQualityEnabled$:Bo,autoQualityLimitingAvailable$:gn,availableVideoStreams$:rs,availableAudioStreams$:Ho,videoStream$:er,audioStream$:yr,currentQuality$:Or,isAutoQualityEnabled$:On,availableQualities$:_n,currentPlaybackRate$:Nn,availablePlaybackRates$:uo,currentSubtitle$:Ri,availableTextTracks$:nr,availableSubtitlesList$:ui,currentSubtitleCaptions$:$n,isAutoSubtitleCaptionVisible$:yo,chromecastState$:ts,chromecastDeviceName$:br,chromecastConnected$:ki,currentFormat$:hn,throughputEstimation$:is,videoBitrate$:Zn,videoSize$:Rr,errorLog$:Y,crashed$:$e,isAudioAvailable$:os,isAudioDisabled:!!l,canDownload:ue.features.download&&!!d,availableSources$:oo,hasMpegSources$:wr,isInteractive:x,showInteractiveGraph:ue.features.interactiveGraph,showSeekToInteractive:ue.features.seekToInteractive,showPlayPrevChapter:ue.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:ue.features.interactiveTimeIndicator&&!!he(Sn).length,interactiveEpisodes$:Sn,isInteractiveTime$:T?ti(T):re(!1),isInteractiveExpectation$:Cn,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:V,looped$:po,loadedMetadata$:Wt,isAutoQualityAvailable$:Fo,previewTrackActive:Li,previewTrackDragInProgress:$i},ui:{t:Ue,isMinimalView$:ct,controlsVisible:re(!1),touched:re(!1),controls:{prevButton:re(void 0),playButton:re(void 0),replayButton:re(void 0),nextButton:re(void 0),playPrevChapterButton:re(void 0),seekToInteractiveButton:re(void 0),interactiveGraphButton:re(void 0),liveButton:re(void 0),time:re(void 0),episodes:re(void 0),volume:re(void 0),subtitles:re(void 0),settings:re(void 0),context:re(void 0),chromecast:re(void 0),pip:re(void 0),"theater-mode-button":re(void 0),fullscreen:re(void 0),vkLogo:re(void 0),interactiveTimeIndicator:re(void 0),timeline:re(void 0),autoplayNextToggle:re(void 0),additionalButtons:q.length?q.reduce(c=>[...c,re(void 0)],[]):[],disabledControls$:_i},modals:{hotKeyMap:{show:re(!1),data:re({title:"",closeBtnText:"",groups:[]})}},isFullscreen:lt,isFullscreenOpenedByKeyboard:ai,rotateAlpha:Dt,isAutoplay:re(!1),debugPanelVisible:re(!1),episodes:{panelOpened$:re(!1),openedByKeyboard$:re(!1)},contextMenu:{visible$:re(!1),btnRef$:re(void 0),openedByBtnKeyboard$:re(!1),openedByHotKey$:re(!1),lastActiveElem$:re(void 0),showContextMenuBtn$:re(!1),position$:re({top:0,left:0})},playerSize:vi,isMobile:st,mobileNotReportControlHidden$:Hi,icon3DVideoVisible:re(!1),scrubbingInProgress:Bi,volumeChangingInProgress:rn,is3DVideo:Le,currentGridType$:Qs,additionalButtonsDeprecated$:Gs,additionalDesktopControlPanelRightButtons$:sl,additionalSettingsMenuItems$:ed,additionalContextMenuItems$:Di,interactiveHideMobileControls:re(!1),overlayContainer$:re(void 0),startedByKeyboard$:re(!1),autoplayNextEnabled$:re(!1),timerNextVideoRunning$:re(!0),settingsMenu:{visible$:re(!1),ref$:re(void 0),openedByBtnKeyboard$:re(!1)},settingsSubMenu:{visible$:re(!1),ref$:re(void 0),name$:re(void 0)},userActionsDisabled:re(!1),hiddenControls:{volume:re(!1),vkLogo:re(!1),pip:re(!1),chromecast:re(!1),settings:re(!1)},isControlsAvailable:ws,controlBlocks:{topLeft:re(void 0),topRight:re(void 0),middle:re(void 0),bottom:re(void 0),bottomLeft:re(void 0),bottomRight:re(void 0)},videoTitleInfo:re(void 0),doubleForwardOn$:wp,doubleForwardAvailable$:a$,previewTrackActive:Li,previewTrackDragInProgress:$i,previewTrackAvailable:Ir,isPreviewTrackHorizontallyAligned:Ts},ads:{position:re(0),duration:re(0),playbackState:re("inactive"),canSkip:re(!1),secondsToWatchBeforeSkip:re(0),postrollPassed:re(!1)},webApi:{pictureInPictureApi:Ie,annotationsApi:ot,slotsApi:Me,focusManager:be},actions:{internal:{preload:ar,firstStart:c=>id(c,!1),play:()=>wa(!1),pause:()=>Ys(!1),togglePlay:Uo,toggleMuted:as,openSettingsMenu:ls,closeSettingsMenu:Br,openSettingsSubMenu:ds,closeSettingsSubMenu:no,setVolume:c=>Fr(c,!1),setMuted:c=>Hn(c,!1),startVolumeChanging:Is,stopVolumeChanging:Es,setVideoStream:tr,setAudioStream:c=>pt(c,!1),setQuality:(c,_)=>Ni(c,_,!1),setTrafficSavingEnabled:(c,_)=>Fn(c,_,!1),setHighQualityEnabled:(c,_)=>zo(c,_,!1),setPlaybackRate:Qt,incrementPlaybackRate:Ai,decrementPlaybackRate:xn,setSubtitle:c=>ro(c,!1),toggleSubtitle:()=>Ur(!1),togglePictureInPicture:hi,startScrubbing:Qi,progressScrubbing:ve,completeScrubbing:Lo,toggleChromecast:Hc,switchToActiveLive:xa,switchFromAdsToVideo:gp,switchFromVideoToAds:Dc,skipAd:ul,setLiveWaitingStart:hp,setLiveWaitingRecover:Oc,setLiveWaitingRecord:_p,getDebugTextData:Nc,getTraceTextData:bp,getDebugPanelData:Bc,getVideoElement:pl,seekTime:(c,_,R)=>Un(c,_,R),clearDelayedBufferingCheckTimeout:$r,seekEpisodeStartTime:ha,seekToPercent:cs,getNextEpisode:nd,seekToNextEpisode:yp,getPrevEpisode:Fc,seekToPrevEpisode:xp,startLogging:it,stopLogging:Yt,startCameraManualRotation:gi,stopCameraManualRotation:at,moveCameraFocusPX:li,holdCamera:bi,releaseCamera:Gt,getVideoEpisodes:od,getPreviewThumbsData:qe,downloadVideo:yn,addLanguage:Rf,setLanguage:ft,nextMovie:ci,videoRotate:Qo,correctSeekTimeToInteractive:qv,replayInteractive:D,setLooped:fo,reportProblem:je,setAutoplayNextEnabled:At,setTimerNextVideoRunning:fi,prevVideoClick:Po,nextVideoClick:ko,nextVideoAnnouncementShow:xo,nextVideoAnnouncementClick:mo,nextVideoAnnouncementAuto:Ao,nextVideoAnnouncementCancel:sr,checkFullscreenSupport:St,changeDoubleForwardOn:Gv,closePreviewTrack:d$,previewTrackOpened:l$,previewTrackDragStarted:c$,previewTrackDragFinished:u$},external:{firstStart:c=>id(c,!0),play:()=>wa(!0),pause:()=>Ys(!0),stop:()=>$p(!0),seekTime:c=>_a(c),seekEpisodeStartTime:c=>mt(c),setPlaybackRate:c=>ni(c),setAutoQualityLimits:c=>ba(c),setMuted:c=>Hn(c,!0),toggleSubtitle:()=>Ur(!0),changeSubtitle:Wo,setVolume:c=>Fr(c,!0),returnFocusToEpisodes:r$,updateAdditionalSettingsItem:ya,addAdditionalSettingsItem:cl,removeAdditionalSettingsItem:gt,updateAdditionalContextItem:qo,addAdditionalContextItem:Gi,removeAdditionalContextItem:yi,updateAdditionalButton:al,addAdditionalButton:ll,removeAdditionalButton:dl,setLiveLowLatency:td,hideControls:()=>Ss(!1),showControls:()=>Ss(!0),setQuality:c=>Ni(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>Fn(c,"to-video",!0),setHighQualityEnabled:c=>zo(c,"to-video",!0),changeAudioStream:xr,setMinimalView:Ne}},callbacks:r,setUiCallbacks:c=>{Qe=Ge({},c)},getAdmanWrapper:()=>me,getLogger:()=>fe,getPlayer:()=>B,destroy:s$};return Ft};function jn(t,e,i,o){var m;let s=(m=e[i])==null?void 0:m.getBoundingClientRect(),a=o&&!!s&&!!(s.right-s.left),{top:l,left:d,bottom:r,right:u}=Us(e[i],t||void 0);return{left:a?d:0,right:a?u:0,top:a?l:0,bottom:a?r:0,isDisplayed:a}}var b2=["disabledControls$","additionalButtons"],$2=["interactiveTimeIndicator"],Yl=(t,e,i,o)=>{if(t){for(let[s,a]of Object.entries(e))if(!b2.includes(s)){let l=o||$2.includes(s);a.set(jn(t,i,s,l))}}};var Xu=(t,e,i)=>$t(null,null,function*(){yield _o(),e&&i&&(i.focus(),t.set(!1))});var y2=ke('<path d="M18 10c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2Zm-6 4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Zm-6 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Z"></path>');function Am(t){Xe(t,{children:(e,i)=>{var o=y2();b(e,o)},$$slots:{default:!0}})}function Lm(t,e){H(e,!0);let[i,o]=Be(),s=()=>w(r,"$contextMenuVisible$",i),a=g(e,"disabled",3,!1),l=g(e,"ariaLabel",3,""),d=ye(),r=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);Fe(()=>{n($)&&Pt(()=>{v.set(n($))})});let y=T=>{let D=ca(T),k=H_(n($));p.set(k),u.set(D),r.set(!s())},h=()=>{m.set(!0)},x=()=>{m.set(!1)},I=f(()=>s()?"opened":"");Ht(t,{get className(){return n(I)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:h,blur:x,get ariaExpanded(){return s()},get ref(){return n($)},set ref(T){O($,T,!0)},children:(T,D)=>{Am(T,{})},$$slots:{default:!0}}),F(),o()}var x2=t=>{t.stopPropagation()},w2=A("<div><!> <div></div> <div></div></div>"),S2={hash:"s-25",code:'.interactive-episode-icon-animated.s-25{height:32px;opacity:1;position:absolute;right:16px;top:16px;transition:.3s;width:32px}.interactive-episode-icon-animated.icon-small.s-25{height:28px;width:28px}.invisible.s-25{opacity:0;visibility:hidden}.fullscreen.s-25:not(.mobile){height:40px;right:23px;top:19px;width:40px}.mobile.s-25{height:28px;right:14px;top:12px;width:28px}.fullscreen.mobile.s-25{height:32px;width:32px}@media screen and (orientation:portrait){.interactive-episode-icon-animated.mobile.fullscreen.s-25{right:16px;top:40px}}@keyframes s-25-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-25{animation:s-25-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-25{animation-play-state:paused}.interactive-episode-icon-animated svg{height:100%;width:100%}.ref-block.s-25{height:100%;position:absolute;top:0;visibility:hidden;width:100%}.hidden.s-25{display:none}'};function lc(t,e){var fe;H(e,!0),Q(t,S2);let[i,o]=Be(),s=()=>w(x,"$isMobile",i),a=()=>w(k,"$areControlsVisible",i),l=()=>w(V,"$currentGridType$",i),d=()=>w(T,"$isInteractiveTime$",i),r=()=>w(h,"$interactiveControlsOpacity$",i),u=()=>w(D,"$showInteractiveTimeIndicatorTooltip$",i),m=()=>w(I,"$isFullscreen",i),p=g(e,"ref",15,void 0),v=K(void 0),$=ye(),y=wo(),{interactiveControlsOpacity$:h}=y,x=$.ui.isMobile,I=$.ui.isFullscreen,T=$.state.isInteractiveTime$,D=y.showInteractiveTimeIndicatorTooltip$,k=$.ui.controlsVisible,E=(fe=$.callbacks)==null?void 0:fe.onInteractiveTimeIndicatorClick,V=$.ui.currentGridType$,q=f(()=>!s()&&a()),L=f(()=>Hs(l(),"s")),z=f(()=>!d()||!!r()||n(q)),j=K(!1);Fe(()=>{O(j,n(z),!0)});let te=()=>{O(j,!0)},ee=()=>{var me;oe(),(me=n(v))==null||me.addEventListener("animationiteration",te,{once:!0})},oe=()=>{var me;O(j,!1),(me=n(v))==null||me.removeEventListener("animationiteration",te)},ae=me=>{D.set(me)},le=f(()=>u()&&!n(z));Fe(()=>{u()?ee():oe()});let ce=()=>{n(z)||(D.set(!0),E==null||E())};ln(()=>{D.clearTimeout(),oe()});let X=()=>{D.set(!1)},_e=G("tooltip_interactive_interaction_time_indicator");var Ee=w2();let de;Ee.__mousemove=[x2],Ee.__click=ce;var ze=C(Ee);Do(ze,{get tooltipContent(){return _e},get tooltipVisible(){return n(le)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:ae,get ref(){return p()},set ref(me){p(me)},children:(me,Ie)=>{Xd(me,{completed:!0})},$$slots:{default:!0}});var ue=P(ze,2);let pe;tt(ue,me=>p(me),()=>p());var Z=P(ue,2);let B;tt(Z,me=>O(v,me),()=>n(v)),S(Ee),N((me,Ie,ot)=>{de=ie(Ee,1,"interactive-episode-icon-animated s-25",null,de,me),pe=ie(ue,1,"ref-block s-25",null,pe,Ie),B=ie(Z,1,"pulse s-25",null,B,ot)},[()=>({mobile:s(),fullscreen:m(),invisible:n(z),"icon-small":n(L)}),()=>({hidden:n(z)}),()=>({paused:n(j)})]),ht("mouseleave",Ee,X),b(t,Ee),F(),o()}et(["mousemove","click"]);function Zu(t,e){H(e,!0);let i=g(e,"tooltipEnabled",3,!0),o=g(e,"disabled",3,!1),s=g(e,"className",3,void 0),a=g(e,"ref",15),l=g(e,"tooltipVisible",3,!1);Do(t,{get disabled(){return o()},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},get hasTooltip(){return i()},get mouseEnter(){return e.mouseEnter},get mouseLeave(){return e.mouseLeave},get tooltipVisible(){return l()},get className(){return s()},get ref(){return a()},set ref(d){a(d)},children:(d,r)=>{var u=Re();let m=f(()=>e.buttonComponent);var p=se(u);zi(p,()=>n(m),(v,$)=>{$(v,Xr(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),b(d,u)},$$slots:{default:!0}}),F()}var Ws={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var T2=ke('<path d="M32 21.68V15a2 2 90 114 0v18a2 2 90 01-4 0v-6.66l-16.3 9.32A2.48 2.48 90 0112 33.56V14.46c0-1.9 2.06-3.08 3.7-2.12z"></path>');function va(t,e){H(e,!0);let i=g(e,"reversed",3,!1),o=f(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),s=f(()=>`${dn(e.size)}${n(o)}`),a=f(()=>i()?"prev-icon":"next-icon");Xe(t,{get width(){return"48"},get height(){return"48"},get style(){return n(s)},get testId(){return n(a)},get shadow(){return e.shadow},children:(l,d)=>{var r=T2();b(l,r)},$$slots:{default:!0}}),F()}var I2=A('<div class="icon-background-mobile s-22"><!></div>'),E2={hash:"s-22",code:".icon-background-mobile.s-22{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:100%;justify-content:space-around;left:0;position:absolute;top:0;width:100%}"};function Ga(t,e){H(e,!0),Q(t,E2);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),s=g(e,"disabled",3,!1),l=ye().ui.t,d=f(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),r=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}`);Ht(t,{get className(){return n(u)},get testId(){var m;return`btn-${(m=e.type)!=null?m:""}`},get disabled(){return s()},get ariaLabel(){return n(d)},get click(){return e.click},get ariaKeyShortCut(){return n(r)},get ref(){return i()},set ref(m){i(m)},children:(m,p)=>{var v=Re(),$=se(v);{var y=x=>{var I=I2(),T=C(I);let D=f(()=>e.type==="prev");va(T,{get size(){return"32"},get reversed(){return n(D)}}),S(I),b(x,I)},h=x=>{let I=f(()=>e.type==="prev");va(x,{get size(){return"24"},get reversed(){return n(I)}})};M($,x=>{o()?x(y):x(h,!1)})}b(m,v)},$$slots:{default:!0}}),F()}var P2=ke('<path d="M24 21.2a.8.8 90 01-1.34.6L14.08 14a1.34 1.34 90 010-2l8.6-7.8a.8.8 90 011.32.6V11a16 16 90 11-16 16 2 2 90 114 0 12 12 90 1012-12z"></path>');function dc(t,e){H(e,!0);let i=f(()=>dn(e.size));Xe(t,{get width(){return"48"},get height(){return"48"},get style(){return n(i)},testId:"replay-icon",get shadow(){return e.shadow},children:(o,s)=>{var a=P2();b(o,a)},$$slots:{default:!0}}),F()}import{noop as k2}from"@vkontakte/videoplayer-shared/es2015";var A2=A('<div class="icon-background-mobile s-24"></div>'),L2=A("<!> <div><!></div>",1),M2={hash:"s-24",code:".mobile.s-24{align-items:center;display:flex;justify-content:center;position:relative}.icon-background-mobile.s-24{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);height:calc(100% - 32px);left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function jl(t,e){H(e,!0),Q(t,M2);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),s=g(e,"disabled",3,!1),a=g(e,"className",3,""),l=g(e,"click",3,k2),d=G("tooltip_restart"),r=f(()=>`${o()?"btn-m--play":""} ${a()}`);Ht(t,{get className(){return n(r)},testId:"replay-btn",get ariaLabel(){return d},get disabled(){return s()},get click(){return l()},get ariaKeyShortCut(){return hs.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,m)=>{var p=L2(),v=se(p);{var $=T=>{var D=A2();b(T,D)};M(v,T=>{o()&&T($)})}var y=P(v,2);let h;var x=C(y);let I=f(()=>o()?"48":"24");dc(x,{get size(){return n(I)}}),S(y),N(T=>h=ie(y,1,"s-24",null,h,T),[()=>({mobile:o()})]),b(u,p)},$$slots:{default:!0}}),F()}var V2=ke('<path d="m17.4 10 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h3.801zm16 0 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h4z"></path>');function Ks(t,e){H(e,!0);let i=f(()=>dn(e.size));Xe(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"pause-icon",get shadow(){return e.shadow},children:(o,s)=>{var a=V2();b(o,a)},$$slots:{default:!0}}),F()}import{noop as R2}from"@vkontakte/videoplayer-shared/es2015";var D2=A('<div class="icon-background-mobile s-21"><!></div>'),O2={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 Xl(t,e){H(e,!0),Q(t,O2);let[i,o]=Be(),s=()=>w(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=wo(),l=g(e,"ref",15,void 0),d=g(e,"isMobile",3,!1),r=g(e,"isPlaying",3,!1),u=g(e,"disabled",3,!1),m=g(e,"className",3,""),p=g(e,"click",3,R2),$=ye().ui.t,{toggle:y}=a,h=f(()=>y),x=f(()=>s()!==null),I=f(()=>n(x)?s():r()),T=f(()=>n(I)?$("tooltip_pause"):$("tooltip_play")),D=f(()=>n(I)?Ks:Ln),k=f(()=>`${d()?"btn-m--play":""} ${m()}`),E=f(()=>n(x)?n(h):p());Ht(t,{get className(){return n(k)},testId:"play-btn",get click(){return n(E)},get disabled(){return u()},get ariaLabel(){return n(T)},get ariaKeyShortCut(){return hs.KeyK},get ref(){return l()},set ref(V){l(V)},children:(V,q)=>{var L=Re();let z=f(()=>n(D));var j=se(L);{var te=oe=>{var ae=D2(),le=C(ae);zi(le,()=>n(z),(ce,X)=>{X(ce,{get size(){return"48"}})}),S(ae),b(oe,ae)},ee=oe=>{var ae=Re(),le=se(ae);zi(le,()=>n(z),(ce,X)=>{X(ce,{get size(){return"24"}})}),b(oe,ae)};M(j,oe=>{d()?oe(te):oe(ee,!1)})}b(V,L)},$$slots:{default:!0}}),F(),o()}var N2=ke('<path d="M12.58 12.92v2.5a1 1 0 0 1-1.52.85l-5.58-3.42a1 1 0 0 1 0-1.7l5.58-3.42a1 1 0 0 1 1.52.86v2.5l5.48-3.36a1 1 0 0 1 1.52.86v6.82a1 1 0 0 1-1.52.86z"></path>');function Mm(t){Xe(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=N2();b(e,o)},$$slots:{default:!0}})}function cc(t,e){H(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),s=g(e,"disabled",3,!1),a=G("tooltip_interactive_go_back"),l=f(()=>o()?"hidden":"");Ht(t,{get className(){return n(l)},testId:"play-prev-chapter-btn",get ariaLabel(){return a},get disabled(){return s()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,r)=>{Mm(d,{})},$$slots:{default:!0}}),F()}var B2=A('<span class="gutter s-26"><span><!></span></span>'),H2={hash:"s-26",code:".gutter.s-26{--gutterWidth:32px;--gutterHeight:12px;--togglerWidth:18px;--togglerHeight:18px;--togglerGap:calc(var(--togglerWidth)/6);background-color:hsla(0,0%,100%,.3);border-radius:50px;height:var(--gutterHeight);position:relative;width:var(--gutterWidth)}.toggler.s-26{align-items:center;background-color:#626364;border-radius:50%;display:flex;height:var(--togglerHeight);justify-content:center;left:0;position:absolute;top:calc((var(--togglerHeight) - var(--gutterHeight))/2*-1);transform:translateX(calc(var(--togglerGap)*-1));transition-duration:.2s;transition-property:background-color,transform;transition-timing-function:ease;width:var(--togglerWidth)}.toggler.enabled.s-26{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function uc(t,e){H(e,!0),Q(t,H2);let[i,o]=Be(),s=()=>w(r,"$autoplayNextEnabled$",i),a=g(e,"ref",15,void 0),l=ye(),d=l.ui.t,r=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,m=()=>{u(!s(),!0)},p=d("aria_label_autoplay"),v="12",$="#000",y=f(()=>s()?"true":"false");Ht(t,{click:m,get ariaLabel(){return p},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref(h){a(h)},children:(h,x)=>{var I=B2(),T=C(I);let D;var k=C(T);{var E=q=>{Ln(q,{get size(){return v},fill:$})},V=q=>{Ks(q,{get size(){return v},fill:$})};M(k,q=>{s()?q(E):q(V,!1)})}S(T),S(I),N(q=>D=ie(T,1,"toggler s-26",null,D,q),[()=>({enabled:s()})]),b(h,I)},$$slots:{default:!0}}),F(),o()}var F2=ke('<path d="M16.73 4.85c-.54-.05-1.23-.05-2.23-.05H7.9a.9.9 0 1 1 0-1.8h6.64q1.41-.01 2.33.05c.64.05 1.2.16 1.73.43a4.4 4.4 0 0 1 1.92 1.92c.27.52.38 1.09.43 1.73q.06.92.05 2.33v5.08q.01 1.41-.05 2.33a5 5 0 0 1-.43 1.73 4.4 4.4 0 0 1-1.92 1.92 5 5 0 0 1-1.73.43q-.92.06-2.33.05H7.9a.9.9 0 1 1 0-1.8h6.6c1 0 1.69 0 2.23-.04.52-.05.82-.13 1.05-.24a2.6 2.6 0 0 0 1.14-1.14c.11-.23.2-.53.24-1.06s.04-1.23.04-2.22v-5c0-1 0-1.69-.04-2.23a3 3 0 0 0-.24-1.05 2.6 2.6 0 0 0-1.14-1.14c-.23-.11-.53-.2-1.05-.24"></path><path d="M7.76 11.17V8.9c0-.71.7-1.15 1.25-.78l4.6 3.1a.96.96 0 0 1 0 1.54L9 15.87c-.55.37-1.25-.07-1.25-.78v-2.26l-4.5 3.04C2.7 16.24 2 15.8 2 15.09V8.91c0-.71.7-1.15 1.25-.78z "></path>',1);function Vm(t){Xe(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=F2();Xt(),b(e,o)},$$slots:{default:!0}})}function pc(t,e){H(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),s=g(e,"disabled",3,!1),a=G("tooltip_interactive_seek"),l=f(()=>o()?"hidden":"");Ht(t,{get className(){return n(l)},testId:"btn-seek-to-interactive",get ariaLabel(){return a},get disabled(){return s()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,r)=>{Vm(d,{})},$$slots:{default:!0}}),F()}var U2=ke('<path d="M15.2 5.9v1.2c0 .6 0 .9.12 1.12q.15.3.46.46c.23.12.52.12 1.12.12h1.2c.6 0 .9 0 1.12-.12q.3-.15.46-.46c.12-.23.12-.52.12-1.12V5.9c0-.6 0-.9-.12-1.12a1 1 0 0 0-.46-.46c-.23-.12-.52-.12-1.12-.12h-1.2c-.6 0-.9 0-1.12.12q-.3.15-.47.46c-.11.23-.11.53-.11 1.12m-.05 11.03v1.14c0 .6 0 .91.12 1.14q.15.31.47.47c.23.12.53.12 1.14.12h1.22c.6 0 .9 0 1.14-.12a1 1 0 0 0 .47-.47c.12-.23.12-.53.12-1.14v-1.14c0-.6 0-.9-.12-1.14a1 1 0 0 0-.47-.47c-.23-.12-.54-.12-1.14-.12h-1.22c-.6 0-.91 0-1.14.12a1 1 0 0 0-.47.47c-.12.23-.12.53-.12 1.14"></path>'),z2=ke('<path d="M16.78 3h1.42q.47 0 .83.02.4.02.82.21.61.31.92.92.2.41.21.81.03.36.02.83v1.4q0 .47-.02.83-.02.4-.21.81a2 2 0 0 1-.92.92 2 2 0 0 1-.82.21q-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.2 2 2 0 0 1-.93-.93 2 2 0 0 1-.2-.8l-.03-.64h-2.2c-.49 0-.8 0-1.04.02a1 1 0 0 0-.35.06 1 1 0 0 0-.35.35 1 1 0 0 0-.07.35c-.02.24-.02.55-.02 1.04v5.57c0 .5 0 .8.02 1.04s.05.31.07.34q.12.23.35.35c.03.02.11.05.34.07s.56.02 1.05.02h2.2q0-.34.02-.62.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02h1.42q.47 0 .83.02.4.01.82.2.61.31.92.93.2.41.21.8.03.37.02.84v1.4q0 .47-.02.83-.02.39-.21.81a2 2 0 0 1-.92.92q-.43.2-.82.21-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.21 2 2 0 0 1-.93-.92 2 2 0 0 1-.2-.81l-.03-.63h-2.24q-.68 0-1.16-.03a3 3 0 0 1-1.01-.26 2.6 2.6 0 0 1-1.14-1.14 3 3 0 0 1-.26-1q-.04-.5-.03-1.16v-1.93H2.9A.9.9 0 0 1 2 12c0-.5.4-.9.9-.9h5.23V9.18q0-.68.03-1.16.02-.51.26-1.02a2.6 2.6 0 0 1 1.14-1.13q.5-.24 1.02-.26.48-.04 1.16-.02h2.23q0-.34.02-.63.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02m-.84 1.84.15-.02c.16-.02.37-.02.72-.02h1.35c.36 0 .57 0 .72.02l.15.02a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.13l-.15.02-.72.01h-1.35l-.72-.01-.15-.03a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71V5.82q0-.5.02-.71l.02-.15a.3.3 0 0 1 .12-.12m0 11.02.15-.03.72-.01h1.35l.72.01.15.03a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.12l-.15.02c-.15.02-.36.02-.72.02h-1.35c-.35 0-.56 0-.72-.02l-.15-.02a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71v-1.34c0-.35 0-.56.02-.71l.02-.15a.3.3 0 0 1 .12-.13"></path><!>',1);function Rm(t,e){let i=g(e,"isOpened",3,!1),o=f(()=>i()?"graph-close-icon":"graph-open-icon");Xe(t,{get testId(){return n(o)},children:(s,a)=>{var l=z2(),d=P(se(l));{var r=u=>{var m=U2();b(u,m)};M(d,u=>{i()&&u(r)})}b(s,l)},$$slots:{default:!0}})}function fc(t,e){H(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),s=g(e,"disabled",3,!1),a=g(e,"graphIsOpened",3,!1),d=ye().ui.t,r=f(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=f(()=>o()?"hidden":"");Ht(t,{get className(){return n(u)},testId:"btn-graph",get disabled(){return s()},get ariaLabel(){return n(r)},get click(){return e.click},get ref(){return i()},set ref(m){i(m)},children:(m,p)=>{let v=f(()=>!!a());Rm(m,{get isOpened(){return n(v)}})},$$slots:{default:!0}}),F()}import{PlaybackState as fb}from"@vkontakte/videoplayer-core/es2015";function mc(t,e){H(e,!0);let[i,o]=Be(),s=()=>w(u,"$playbackState$",i),a=g(e,"isMobile",3,!1),l=g(e,"isLiveActive",3,!1),d=g(e,"ariaLabel",3,""),r=ye(),u=r.state.playbackState$,m=r.actions.internal.switchToActiveLive,p=r.actions.internal.togglePlay,v=f(()=>()=>{if(!l()){m();return}s()===fb.PAUSED&&p()}),$=f(()=>a()?"":"btn--live btn-full-opacity"),y=f(()=>l()?"btn-live":"btn-live-offset"),h=f(()=>l()&&s()===fb.PLAYING);Ht(t,{get className(){return n($)},get testId(){return n(y)},get disabled(){return n(h)},get ariaLabel(){return d()},get click(){return n(v)},children:(x,I)=>{Bd(x,{get isActive(){return l()}})},$$slots:{default:!0}}),F(),o()}import{noop as mb}from"@vkontakte/videoplayer-shared/es2015";var W2=A('<div class="icon icon-error-stub"><div class="inner"></div></div>'),K2=A('<img class="icon" aria-hidden="true"/>');function Ya(t,e){"use strict";let i=K(!1),o=()=>{O(i,!0)};var s=Re(),a=se(s);{var l=r=>{var u=W2();b(r,u)},d=r=>{var u=K2();N(()=>De(u,"src",e.icon)),ht("error",u,o),Ra(u),b(r,u)};M(a,r=>{n(i)?r(l):r(d,!1)})}b(t,s)}function Dm(t,e){H(e,!0);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,mb),s=g(e,"ref",15),a=f(()=>o()===mb),l=f(()=>n(a)||i()),d=f(()=>n(a)?"btn-full-opacity":"");Do(t,{get disabled(){return n(l)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get tooltipVisible(){return e.tooltipVisible},get ref(){return s()},set ref(r){s(r)},children:(r,u)=>{let m=f(()=>{var p;return(p=e.testId)!=null?p:e.id});Ht(r,{get className(){return n(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(l)},get testId(){return n(m)},children:(p,v)=>{Ya(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),F()}var vb=t=>!!t.buttonComponent;var qs={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var Ju=(t,e,i,o)=>{if(t)for(let[s,a]of Object.entries(e))a.set(jn(t,i,s,o))};import{interpolate as Om}from"@vkontakte/videoplayer-shared/es2015";var gb=10,hb=40,Nm=.2,Q2=.5,G2=65,Y2=114,j2=4,_b=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=f(()=>i?G2:Y2),s=K(!1),a=K(0),l=K(0),d=f(()=>n(o)+gb-hb-j2),r=f(()=>Om(n(a),[Nm,1],[0,-n(d)])),u=f(()=>Om(n(a),[Nm,1],[0,hb])),m=f(()=>Om(n(a),[Nm,1],[0,n(o)+gb]));return{progressBarY:()=>n(r),controlsY:()=>n(u),calculatedHeight:()=>n(m),onPointerDown:h=>{var x;O(l,((x=e())==null?void 0:x.getBoundingClientRect().bottom)||0,!0),O(s,!0)},onPointerMove:h=>{if(!n(s))return;let x=Math.max(Math.min(h.clientY-n(l),0),-n(d));O(a,Math.abs(x/n(d)),!0)},onPointerUp:()=>{O(s,!1),O(a,n(a)>=Q2?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{O(a,0)}}};var X2=t=>t;function ga(t,{delay:e=0,duration:i=400,easing:o=X2}={}){let s=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*s}`}}var Z2=A('<span class="root s-2c"> </span>'),J2={hash:"s-2c",code:".root.s-2c{box-shadow:0 8px 24px 0 rgba(0,0,0,.08);box-shadow:0 0 2px 0 rgba(0,0,0,.08);color:#fff;font-size:13px;font-weight:500;line-height:16px}"};function Bm(t,e){Q(t,J2);var i=Z2(),o=C(i,!0);S(i),N(()=>ge(o,e.time)),b(t,i)}var ew=A('<div class="tooltip-wrapper s-12"><div><!></div></div>'),tw={hash:"s-12",code:'.tooltip-wrapper.s-12{display:block;position:relative}.tooltip.s-12{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-12: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-12{opacity:1;visibility:visible}'};function Hm(t,e){Q(t,tw);let i=g(e,"active",3,!1),o=g(e,"pointer",3,!1),s=g(e,"translateXPx",3,0),a=g(e,"translateYPx",3,0),l=g(e,"leftOffset",3,0),d=g(e,"rightOffset",3,0),r=K(void 0),u=K(void 0);function 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(s()));var v=ew(),$=C(v);let y;var h=C($);ei(h,()=>{var x;return(x=e.children)!=null?x:yt}),S($),tt($,x=>O(u,x),()=>n(u)),S(v),tt(v,x=>O(r,x),()=>n(r)),N(x=>{Ke(v,`transform: translate(${n(p)}px, ${a()}px);`),y=ie($,1,"tooltip s-12",null,y,x),Ke($,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,v)}var bb=t=>Math.abs(t)/90%4===1;var iw=ke('<path xmlns="http://www.w3.org/2000/svg" d="M15.782 10.152a.75.75 0 0 1-1.06 0L9.999 5.438l-4.72 4.716a.75.75 0 0 1-1.061-1.061l5.251-5.246a.75.75 0 0 1 1.06 0l5.253 5.246a.75.75 0 0 1 0 1.06Z"></path><path xmlns="http://www.w3.org/2000/svg" d="M15.782 16.152a.75.75 0 0 1-1.06 0l-4.723-4.715-4.72 4.716a.75.75 0 0 1-1.061-1.061l5.251-5.246a.75.75 0 0 1 1.06 0l5.253 5.245a.75.75 0 0 1 0 1.061Z"></path>',1);function Fm(t){Xe(t,{height:"20",width:"20",shadow:!0,children:(e,i)=>{var o=iw();Xt(),b(e,o)},$$slots:{default:!0}})}var ow=A('<div class="rich-seek-hint s-11"><span class="icon_wrapper s-11"><!></span> <span class="rich-seek-hint-text s-11"> </span></div>'),nw=A('<div class="preview s-11"><!></div>'),rw=A('<div class="episode s-11"><!></div>'),sw=A('<div class="time s-11"> </div>'),aw=A("<div><!> <!> <!></div>"),lw={hash:"s-11",code:".timeline-preview.s-11{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-11{bottom:72px}.preview.s-11{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-11{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-11,.time.s-11{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-11{color:var(--white)}.rich-seek-hint.s-11{position:absolute;text-align:center;top:-12px;transform:translateY(-100%)}.icon_wrapper.s-11{display:inline-block;height:20px;margin-right:6px;vertical-align:top;width:20px}.rich-seek-hint-text.s-11{font-size:14px;line-height:18px;text-shadow:0 2px 4px rgba(0,0,0,.3),0 7px 16px rgba(0,0,0,.25);vertical-align:top}"};function Um(t,e){H(e,!0),Q(t,lw);let[i,o]=Be(),s=()=>w(x,"$isMinimalView$",i),a=()=>w(I,"$rotateAlpha",i),l=()=>w(T,"$playerSize",i),d=()=>w(D,"$previewTrackAvailable",i),r={MOBILE:150,DESKTOP:278},u=g(e,"time",3,""),m=g(e,"isMobile",3,!1),p=g(e,"videoEpisodes",19,()=>[]),v=g(e,"progress",3,0),$=g(e,"duration",3,0),y=g(e,"isInteractive",3,!1),h=ye(),x=h.ui.isMinimalView$,I=h.ui.rotateAlpha,T=h.ui.playerSize,D=h.ui.previewTrackAvailable,k=K(0),E=K(0),V=K(""),q=K(0),L=K(0),z=K(0),j=K(0),te=f(()=>Hu(v(),$(),p())),ee=f(()=>!s()),oe=f(()=>ql(a())),ae=f(()=>bb(a())),le=f(_e),ce=f(()=>(n(ae)?1:-1)*(n(k)/2-n(E)/2)),X=f(()=>n(ce)*-1);Fe(()=>{(Me=>{O(k,Me.width,!0),O(E,Me.height,!0)})(de())}),Fe(()=>{(Me=>{O(V,Me.imgSrc,!0),O(q,Me.imgWidth,!0),O(L,Me.imgHeight,!0),O(z,Me.imgOffsetX,!0),O(j,Me.imgOffsetY,!0)})(ze(v()))});function _e(){var Ce;let Me=m()?r.MOBILE:r.DESKTOP,{isVertical:be}=Ee(),W=30;return(Ce=n(te))!=null&&Ce.text&&(W+=16),(be||n(oe))&&(W+=18,W+=50),Math.min(Math.max(l().height-W,0),Me)}function Ee(){let Me=e.previewThumbsData.frameWidth,be=e.previewThumbsData.frameHeight,W=be>Me;return{width:Me,height:be,isHorizontal:!W,isVertical:W}}function de(){let{height:Me,isHorizontal:be,isVertical:W,width:Ce}=Ee();return be&&(Me=Me/Ce*n(le),Ce=n(le)),W&&(Ce=Ce/Me*n(le),Me=n(le)),{width:Ce,height:Me}}function ze(Me){let be;e.previewThumbsData.isUV?be=Math.floor($()*Me/e.previewThumbsData.frequency):be=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*Me)));let W=Math.floor(be/e.previewThumbsData.countPerImage),Ce=Math.floor(be%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),Ae=be%e.previewThumbsData.countPerRow,Qe=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&W===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(Qe=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&Qe++);let Te=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&W===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(Te=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let we=n(k)*Te,He=n(E)*Qe,st=-Ae*n(k),ct=-Ce*n(E);return{imgSrc:e.previewThumbsData.links[W],imgWidth:we,imgHeight:He,imgOffsetX:st,imgOffsetY:ct}}var ue=aw();let pe;var Z=C(ue);{var B=Me=>{var be=nw(),W=C(be);{var Ce=Ae=>{var Qe=ow(),Te=C(Qe),we=C(Te);Fm(we,{}),S(Te);var He=P(Te,2),st=C(He,!0);S(He),S(Qe),N(ct=>ge(st,ct),[()=>G("preview_track_notification_text")]),b(Ae,Qe)};M(W,Ae=>{d()&&Ae(Ce)})}S(be),N(()=>Ke(be,`width: ${n(k)}px; height: ${n(E)}px; background-image: url(${n(V)}); background-size: ${n(q)}px ${n(L)}px; background-position: ${n(z)}px ${n(j)}px;
|
|
60
|
+
transform: rotate(${a()}deg) ${n(oe)?`translate(${n(ce)}px, ${n(X)}px)`:""};
|
|
61
|
+
`)),b(Me,be)};M(Z,Me=>{n(V)&&Me(B)})}var fe=P(Z,2);{var me=Me=>{var be=rw(),W=C(be);{var Ce=Ae=>{var Qe=Re(),Te=se(Qe);{var we=st=>{var ct=gs();N(It=>ge(ct,It),[()=>G("tooltip_episode_unfinished")]),b(st,ct)},He=st=>{var ct=gs();N(()=>ge(ct,n(te).text||"")),b(st,ct)};M(Te,st=>{y()&&n(te).completed===!1?st(we):st(He,!1)})}b(Ae,Qe)};M(W,Ae=>{n(te)&&Ae(Ce)})}S(be),b(Me,be)};M(fe,Me=>{n(ee)&&Me(me)})}var Ie=P(fe,2);{var ot=Me=>{var be=sw(),W=C(be,!0);S(be),N(()=>ge(W,u())),b(Me,be)};M(Ie,Me=>{y()||Me(ot)})}S(ue),N(Me=>{pe=ie(ue,1,"timeline-preview s-11",null,pe,Me),Ke(ue,`width: ${n(oe)?n(E):n(k)}px;`)},[()=>({mobile:m()})]),b(t,ue),F(),o()}var dw=A('<span class="time s-g"> </span>'),cw=A("<!> <!>",1),uw={hash:"s-g",code:".time.s-g{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.timeline-slider{--slider-bg:var(--timeline-slider-bg);--slider-filled-bg:var(--timeline-slider-filled-bg);--slider-handle-bg:var(--timeline-slider-handle-bg);--slider-loaded-bg:var(--timeline-slider-loaded-bg)}"};function zm(t,e){var Oe,$e,Ne,ft,Et;H(e,!0),Q(t,uw);let[i,o]=Be(),s=()=>w(ee,"$interactiveEpisodes$",i),a=()=>w(V,"$duration$",i),l=()=>w(E,"$position$",i),d=()=>w(le,"$isInteractiveExpectation$",i),r=()=>w(ae,"$isInteractiveTime$",i),u=()=>w(Ee,"$previewTrackActive",i),m=()=>w(q,"$isLive$",i),p=()=>w(_e,"$disabledControls$",i),v=()=>w(z,"$isMobile",i),$=()=>w(L,"$isActiveLive$",i),y=()=>w(k,"$bufferedProgress$",i),h=g(e,"showTimeline",3,!1),x=g(e,"withEpisodes",3,!0),I=g(e,"ref",15,void 0),T=ye(),D=Mt(),k=T.state.bufferedProgress$,E=T.state.positionWithScrubbing$,V=T.state.duration$,q=T.state.isLive$,L=T.state.isActiveLive$,z=T.ui.isMobile,j=D.features.episodes&&x()?T.actions.internal.getVideoEpisodes():void 0,te=T.actions.internal.getPreviewThumbsData(),ee=T.state.interactiveEpisodes$,oe=T.state.isInteractive,ae=T.state.isInteractiveTime$,le=T.state.isInteractiveExpectation$,ce=T.actions.internal.correctSeekTimeToInteractive,X=(Oe=T.callbacks)==null?void 0:Oe.onDisabledTimelineClick,_e=T.ui.controls.disabledControls$,Ee=T.ui.previewTrackActive,de=(Ne=($e=T.callbacks)==null?void 0:$e.uiInfo)==null?void 0:Ne.onTimelineMouseEnter,ze=(Et=(ft=T.callbacks)==null?void 0:ft.uiInfo)==null?void 0:Et.onTimelineMouseLeave,ue=T.ui.t,pe=D.features.interactiveResponsiveUi,Z=f(()=>oe?s():j),B=f(()=>tn(a())),fe=f(()=>tn(l())),me=f(()=>l()/a()),Ie=f(()=>d()||r()),ot=K(!1),Me=K(""),be=K(0),W=K(0),Ce=K(0),Ae=f(()=>({containerWidth:n(W),translateXPx:n(be),translateYPx:oe&&te?-36:-16,active:n(ot)&&h()&&!n(Ie)&&!pe&&!u(),pointer:!D.features.timelinePreview||!te||m()})),Qe=ue("aria_timeline"),Te=f(()=>ue("aria_timeline_value",{position:n(fe),duration:n(B)}));function we(Se){return!ce||!oe?Se:ce(Se*a())/a()}function He(Se,Ye){var Ue;(Ue=e.onSliderPointerDown)==null||Ue.call(e,Ye),T.actions.internal.startScrubbing(we(Se))}function st(Se){r()||T.actions.internal.progressScrubbing(we(Se))}function ct(Se){var Ye;T.actions.internal.completeScrubbing(we(Se)),O(ot,!1),(Ye=e.onSliderPointerUp)==null||Ye.call(e)}function It(Se,Ye,Ue){var xe;(xe=e.onSliderPointerEnter)==null||xe.call(e,Se),St(Se,Ye,Ue),O(ot,!0)}function lt(Se,Ye,Ue,xe){var Ot;(Ot=e.onSliderMove)==null||Ot.call(e,xe,Se),St(Se,Ye,Ue),O(ot,!0)}function ai(){var Se;O(ot,!1),(Se=e.onSliderLeave)==null||Se.call(e)}function St(Se,Ye,Ue){O(Ce,we(Se),!0),O(be,Ye,!0),Ue&&O(W,Ue,!0),O(Me,Rt(Se),!0)}function Rt(Se){let Ye=tn((m()?1-Se:Se)*a());return m()?`-${Ye}`:Ye}let Dt=f(()=>p().has("TIMELINE"));var Wt=cw(),Le=se(Wt);Hm(Le,Xr(()=>n(Ae),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(Se,Ye)=>{var Ue=Re(),xe=se(Ue);{var Ot=qt=>{Um(qt,{get time(){return n(Me)},get isMobile(){return v()},get videoEpisodes(){return n(Z)},get previewThumbsData(){return te},get progress(){return n(Ce)},get duration(){return a()},get isInteractive(){return oe}})},Tt=qt=>{var _i=dw(),vi=C(_i,!0);S(_i),N(()=>ge(vi,n(Me))),b(qt,_i)};M(xe,qt=>{D.features.timelinePreview&&te&&!m()?qt(Ot):qt(Tt,!1)})}b(Se,Ue)},$$slots:{default:!0}}));var Y=P(Le,2);Ka(Y,{className:"timeline-slider",get isActiveLive(){return $()},get isMobile(){return v()},get ariaLabel(){return Qe},ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return l()},get ariaValueText(){return n(Te)},get loadedProgress(){return y()},get filledProgress(){return n(me)},get handleProgress(){return n(me)},get videoEpisodes(){return n(Z)},onPointerDown:He,onHandleMove:st,onPointerMove:lt,onPointerUp:ct,onPointerEnter:It,onPointerLeave:ai,get onMouseEnter(){return de},get onMouseLeave(){return ze},get onDisabledClick(){return X},get isInteractive(){return oe},get disabled(){return n(Dt)},get handleAlwaysVisible(){return u()},get hideHandel(){return r()},testId:"progress_bar",onContextMenu:ct,get ref(){return I()},set ref(Se){I(Se)}}),b(t,Wt),F(),o()}var pw={hash:"s-f",code:".timeline-ads-slider{--slider-bg:var(--timeline-slider-bg);--slider-filled-bg:var(--timeline-slider-filled-bg);--slider-handle-bg:var(--timeline-slider-handle-bg);--slider-loaded-bg:var(--timeline-slider-loaded-bg)}"};function vc(t,e){H(e,!0),Q(t,pw);let[i,o]=Be(),s=()=>w(r,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"duration",3,0),d=ye(),r=d.ui.isMobile,u=d.ui.t,m=f(()=>tn(l())),p=f(()=>tn(a())),v=f(()=>a()/l()),$=f(()=>u("aria_timeline_value",{position:n(p),duration:n(m)})),y=f(()=>Math.round(n(v)*100));Ka(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n($)},get filledProgress(){return n(v)},hideHandel:!0,get squareBorders(){return s()}}),F(),o()}var fw=A("<div><!></div>"),mw=A("<div></div>"),vw={hash:"s-d",code:".timeline.s-d{align-items:center;bottom:0;box-sizing:border-box;display:flex;min-width:86px;pointer-events:all;position:relative;width:100%}.timeline.mobile.s-d{height:16px;margin-top:6px;padding:6px 12px 7px}.withoutPadding.s-d{padding:0}.timeline-stub.s-d{min-width:20px;width:100%}.timeline-stub.mobile.s-d{height:8px}"};function ja(t,e){H(e,!0),Q(t,vw);let[i,o]=Be(),s=()=>w(x,"$isLive$",i),a=()=>w(D,"$isMobile",i),l=()=>w(k,"$disabled",i),d=()=>w(T,"$adPosition",i),r=()=>w(I,"$adDuration",i),u=g(e,"isAds",3,!1),m=g(e,"isHidden",3,!1),p=g(e,"timelineNotAvailable",3,!1),v=g(e,"needPadding",3,!0),$=g(e,"ref",15,void 0),y=ye(),h=Mt(),x=y.state.isLive$,I=y.ads.duration,T=y.ads.position,D=y.ui.isMobile,k=re(!1),E=f(()=>!p()&&(!s()||s()&&e.canRewindLive&&e.isRewindableLive||u()));var V=Re(),q=se(V);{var L=j=>{var te=fw();let ee;var oe=C(te);{var ae=ce=>{vc(ce,{get position(){return d()},get duration(){return r()}})},le=ce=>{zm(ce,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return n(E)},get withEpisodes(){return e.withEpisodes},get onSliderMove(){return e.onSliderMove},get onSliderPointerDown(){return e.onSliderPointerDown},get onSliderPointerUp(){return e.onSliderPointerUp},get onSliderLeave(){return e.onSliderLeave},get onSliderPointerEnter(){return e.onSliderPointerEnter},get ref(){return $()},set ref(X){$(X)}})};M(oe,ce=>{u()?ce(ae):ce(le,!1)})}S(te),Ds(te,()=>Ol(m()&&h.features.usePerformanceFix,k,h.disableInvisibleComponentsTimeout)),N(ce=>ee=ie(te,1,"timeline s-d",null,ee,ce),[()=>({withoutPadding:!v(),mobile:a(),"out-of-flow":l()})]),b(j,te)},z=j=>{var te=mw();let ee;N(oe=>ee=ie(te,1,"timeline-stub s-d",null,ee,oe),[()=>({mobile:a()})]),b(j,te)};M(q,j=>{n(E)?j(L):j(z,!1)})}b(t,V),F(),o()}import{getRangeAroundIndex as gw}from"@vkontakte/videoplayer-shared/es2015";import{ThinOneStat as hw}from"@vkontakte/videoplayer-statistics/es2015";var _w=(t,e,i,o,s,a,l)=>{O(e,!0),O(i,t.clientX,!0),O(o,n(s),!0),a(l())},bw=A("<div></div>"),$w=A('<div><div class="track s-2a"></div></div>'),yw={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 Km(t,e){H(e,!0),Q(t,yw);let[i,o]=Be(),s=()=>w(D,"$rotateAlpha",i),a=()=>w(h,"$position$",i),l=()=>w(y,"$duration$",i),d=ye(),{countPerImage:r=0,countPerRow:u=0,countTotal:m=0,links:p=[],frameHeight:v=0,frameWidth:$=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:h}=d.state,{startScrubbing:x,progressScrubbing:I,completeScrubbing:T}=d.actions.internal,D=d.ui.rotateAlpha,k=K(void 0),E=K(!1),V=K(0),q=K(0),L=K(0),z=K(0),j=f(()=>v<=$),te=f(()=>ql(s())),ee=f(()=>n(j)?!n(te):n(te)),oe=114,ae=65,le=3,ce=f(()=>n(ee)?oe:ae),X=f(()=>n(j)?oe:ae),_e=f(()=>n(j)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),Ee=f(()=>m*n(ce)),de=K(0);Fe(()=>{O(z,Math.ceil(-n(L)/n(ce))-1),O(L,-n(Ee)*a()/l())});let ze=()=>{T(ue(),!0,hw.ActionSeekType.RICH)},ue=()=>l()*-n(L)/n(Ee)/l(),pe=!1,Z=Te=>{if(!n(E))return!1;let we=Te.clientX-n(V);O(L,n(q)+we),O(L,Math.max(Math.min(n(L),0),-n(Ee)),!0),Math.abs(we)>1&&(pe=!0),I(ue())},B=Te=>{n(E)&&(O(E,!1),!pe&&Te&&O(L,-(Te.offsetX-n(de)/2)),pe=!1,ze())},fe=()=>{n(E)&&B()},me=f(()=>r/u),Ie=(Te,we)=>{if(Te!==p.length-1)return u;let He=0,st=we*u;for(let ct=1;ct<=u;ct++)Te*r+He+st<m&&He++;return He},ot=f(()=>Math.floor(n(z)/r)),Me=f(()=>gw(3,n(ot),p.length-1)),be=(Te,we,He)=>{let st=r*n(ce);return Te*st+we*n(ce)*u+n(de)/2-le/2+He*n(ce)},W=f(()=>[`--row-numbers: ${n(me)}`,`--column-numbers: ${u}`,`--frame-width: ${n(X)}px`,`--frame-height: ${n(_e)}`].join(";"));var Ce=$w();let Ae;var Qe=C(Ce);Qe.__pointerdown=[_w,E,V,q,L,x,ue],Qe.__pointermove=Z,Qe.__pointerup=B,wi(Qe,20,()=>n(Me),Te=>Te,(Te,we)=>{var He=Re(),st=se(He);wi(st,16,()=>Array.from({length:n(me)},(ct,It)=>It),ct=>ct,(ct,It)=>{var lt=Re(),ai=se(lt);wi(ai,16,()=>Array.from({length:Ie(we,It)},(St,Rt)=>Rt),St=>St,(St,Rt)=>{var Dt=bw();N((Wt,Le)=>{Ke(Dt,Wt),ie(Dt,1,Le,"s-2a")},[()=>`--row-index: ${It}; --column-index: ${Rt}; left: ${be(we,It,Rt)}px; background-image: url(${p[we]});`,()=>`frame rotate-${Math.abs(s())/90%4}`]),b(St,Dt)}),b(ct,lt)}),b(Te,He)}),S(Qe),S(Ce),tt(Ce,Te=>O(k,Te),()=>n(k)),N(Te=>{Ae=ie(Ce,1,"root s-2a",null,Ae,Te),Ke(Ce,n(W)),Ke(Qe,`transform: translateX(${n(L)}px); width: ${n(Ee)}px;`)},[()=>({"is-vertical-video":!n(j),"vertically-rotated":n(te)})]),ht("mouseleave",Qe,fe),kn(Ce,"clientWidth",Te=>O(de,Te)),b(t,Ce),F(),o()}et(["pointerdown","pointermove","pointerup"]);var xw=A('<div class="notification s-2b"><span class="description s-2b"> </span></div>'),ww={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 qm(t,e){H(e,!1),Q(t,ww);let i=340,{ui:{t:o}}=ye();en();var s=xw(),a=C(s),l=C(a,!0);S(a),S(s),N(d=>ge(l,d),[()=>o("preview_track_close_tooltip")],fr),Os(3,s,()=>ga,()=>({duration:i})),b(t,s),F()}import{getRangeAroundIndex as Sw}from"@vkontakte/videoplayer-shared/es2015";var Cw=A('<div class="preview-track-close tooltip s-27"><!></div>'),Tw=A('<div class="preview-track-control s-27"><!> <div class="preview-track-close s-27"><!></div> <!></div>'),Iw=A('<div class="wrapper-preview-track s-27"><!></div>'),Ew=A('<div class="enriched-timeline s-27"><!> <!> <!></div>'),Pw={hash:"s-27",code:".enriched-timeline.s-27{padding:var(--timeline-padding-vertical-top) var(--timeline-padding-horizontal) var(--timeline-padding-vertical-bottom);pointer-events:auto;position:relative}.preview-track-control.s-27{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-27{pointer-events:auto;position:absolute;right:calc(var(--timeline-padding-horizontal))}.preview-track-close.tooltip.s-27{bottom:32px;opacity:0;transition:opacity .2s}.preview-track-close.s-27:hover+.tooltip:where(.s-27){opacity:1}.wrapper-preview-track.s-27{box-sizing:border-box;left:0;overflow:hidden;padding:0 calc(var(--timeline-padding-horizontal));position:absolute;right:0;z-index:-1}"};function Qm(t,e){H(e,!0),Q(t,Pw);let[i,o]=Be(),s=()=>w(h,"$playerSize",i),a=()=>w(y,"$duration$",i),l=()=>w(x,"$previewTrackActive",i),d=()=>w(v,"$position$",i),r=()=>w($,"$isRewindableLive$",i),u=g(e,"timelineRef",15,void 0),m=ye(),p=200,{positionWithScrubbing$:v,isRewindableLive$:$,duration$:y}=m.state,{playerSize:h,previewTrackActive:x}=m.ui,{countPerImage:I=0,links:T=[],frequency:D=0}=m.actions.internal.getPreviewThumbsData()||{},k=f(()=>s().width>100),E=K(!b_()),V=()=>{n(E)&&(__(),O(E,!1))},q=ce=>{let X=Math.floor(a()*ce/D),_e=Math.floor(X/I),Ee=Sw(3,_e,T.length-1);for(let de of Ee){let ze=new Image;ze.src=T[de]}},L=(ce,X)=>{q(X),!l()&&e.onTimelineMove(ce)};var z=Ew(),j=C(z);{var te=ce=>{var X=Tw(),_e=C(X);let Ee=f(()=>tn(d()));Bm(_e,{get time(){return n(Ee)}});var de=P(_e,2),ze=C(de);Bs(ze,{onClick:()=>m.actions.internal.closePreviewTrack()}),S(de);var ue=P(de,2);{var pe=Z=>{var B=Cw(),fe=C(B);qm(fe,{}),S(B),b(Z,B)};M(ue,Z=>{n(E)&&Z(pe)})}S(X),ht("mouseleave",de,V),Os(3,X,()=>ga,()=>({duration:p})),b(ce,X)};M(j,ce=>{l()&&ce(te)})}var ee=P(j,2);let oe=f(()=>!n(k));ja(ee,{get isHidden(){return n(oe)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return r()},onSliderMove:L,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:q,get ref(){return u()},set ref(ce){u(ce)}});var ae=P(ee,2);{var le=ce=>{var X=Iw(),_e=C(X);Km(_e,{}),S(X),N(()=>Ke(X,`height: ${e.animatedPreviewTrackHeight}px;`)),b(ce,X)};M(ae,ce=>{e.previewTrackAvailable&&ce(le)})}S(z),N(()=>Ke(z,`transform: translateY(${e.animatedOffsetY}px);`)),b(t,z),F(),o()}var Aw=A('<div><!> <div data-testid="player_controls"><div class="controls-left s-18"><!> <!> <!></div> <div class="controls-right s-18"></div></div></div> <!>',1),Lw={hash:"s-18",code:'.wrapper-bottom.s-18{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-18:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-18>:where(.s-18){pointer-events:auto}.controls.s-18{align-items:center;box-sizing:border-box;display:flex;font-size:13px;height:var(--controls-height);justify-content:space-between;padding:0 var(--controls-desktop-padding-horizontal) 4px;white-space:nowrap;width:100%}.controls.minimal-view.s-18{padding:0 var(--controls-desktop-padding-horizontal-minimal-view) 4px}.controls-left.s-18,.controls-right.s-18{align-content:center;display:flex}.controls-left.s-18{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-18 >:not(:first-child),.controls-right.s-18 >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-18{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-18{transition:none}'};function Ym(t,e){var ya,cl;H(e,!0),Q(t,Lw);let[i,o]=Be(),s=()=>w(io,"$disabledControls$",i),a=()=>w(Gt,"$adPlaybackState",i),l=()=>w(_i,"$playbackState$",i),d=()=>w(qi,"$currentSubtitle$",i),r=()=>w(eo,"$isEnded$",i),u=()=>w(Oo,"$currentGridType$",i),m=()=>w(Ot,"$isMinimalView$",i),p=()=>w(di,"$isLive$",i),v=()=>w(ut,"$chromecastState$",i),$=()=>w(Vi,"$isPictureInPictureActive",i),y=()=>w(ci,"$pictureInPictureType$",i),h=()=>w(pi,"$availableSubtitlesList$",i),x=()=>w(it,"$contextMenuOpenedByKeyboard$",i),I=()=>w(U,"$showContextMenuBtn$",i),T=()=>w(to,"$isRewindableLive$",i),D=()=>w(Si,"$isActiveLive$",i),k=()=>w(br,"$graphIsOpened$",i),E=()=>w(pn,"$contextMenuVisible$",i),V=()=>w(Ct,"$isFullscreen",i),q=()=>w(mn,"$autoplayNextEnabled",i),L=()=>w(n($o),"$prevButton",i),z=()=>w(n($n),"$replayButton",i),j=()=>w(n(yo),"$playButton",i),te=()=>w(n(rr),"$nextButton",i),ee=()=>w(n(oo),"$playPrevChapterButton",i),oe=()=>w(n(wr),"$seekToInteractiveButton",i),ae=()=>w(n(Io),"$interactiveGraphButton",i),le=()=>w(n(yn),"$liveButton",i),ce=()=>w(n(as),"$time",i),X=()=>w(n(Br),"$episodes",i),_e=()=>w(n(ls),"$vkLogo",i),Ee=()=>w(n(no),"$volume",i),de=()=>w(n(ds),"$subtitles",i),ze=()=>w(n(Hr),"$settings",i),ue=()=>w(n(Eo),"$context",i),pe=()=>w(n(Fr),"$fullscreen",i),Z=()=>w(n(Hn),"$chromecast",i),B=()=>w(fn,"$additionalDesktopControlPanelRightButtons$",i),fe=()=>w(bo,"$playerSize",i),me=()=>w(So,"$isInteractiveTime$",i),Ie=()=>w(ba,"$previewTrackActive",i),ot=()=>w(Ki,"$settingsMenuVisible",i),Me=()=>w(ko,"$settingButtonRef$",i),be=()=>w(Yt,"$startedByKeyboard$",i),W=()=>w(vi,"$isAudioAvailable$",i),Ce=()=>w(Le,"$fakeIsPlaying$",i),Ae=()=>w(ts,"$seekToInteractiveDisabledTooltip$",i),Qe=()=>w(Li,"$isPreviewTrackHorizontallyAligned$",i),Te=()=>w(ni,"$previewTrackAvailable",i),we=()=>w(mt,"$previewTrackDragInProgress",i),He=()=>w(bi,"$adPosition",i),st=()=>w(qt,"$position$",i),ct=()=>w(li,"$adDuration",i),It=()=>w(Tt,"$duration$",i),lt=g(e,"playerControlsWrapperRef",15,void 0),ai=g(e,"playerControlsRef",15,void 0),St=g(e,"isAds",3,!1),Rt=g(e,"logoTargetUrl",3,""),Dt=g(e,"isOneVideoPlaylist",3,!1),Wt=g(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:Le}=wo(),Y=ye(),Oe=wo(),$e=Mt(),Ne=Y.actions.internal.toggleMuted,ft=Y.actions.internal.togglePlay,Et=Y.actions.internal.pause,Se=Y.actions.internal.toggleSubtitle,Ye=Y.actions.internal.checkFullscreenSupport,Ue=(ya=Y.callbacks)==null?void 0:ya.onAudioDoesNotExistHint,xe=(cl=Y.callbacks)==null?void 0:cl.onAudioDisabledHint,Ot=Y.ui.isMinimalView$,Tt=Y.state.duration$,qt=Y.state.positionWithScrubbing$,_i=Y.state.playbackState$,vi=Y.state.isAudioAvailable$,Mi=Y.state.isAudioDisabled,eo=Y.state.isEnded$,di=Y.state.isLive$,Si=Y.state.isActiveLive$,to=Y.state.isRewindableLive$,{isActive$:Vi,type$:ci}=Oe.pictureInPicture$,Ki=Y.ui.settingsMenu.visible$,_t=Y.ui.settingsMenu.openedByBtnKeyboard$,We=Y.ui.controls,nt=Y.actions.internal.getVideoEpisodes(),ut=Y.state.chromecastState$,pi=Y.state.availableSubtitlesList$,qi=Y.state.currentSubtitle$,io=We.disabledControls$,pn=Y.ui.contextMenu.visible$,U=Y.ui.contextMenu.showContextMenuBtn$,it=Y.ui.contextMenu.openedByBtnKeyboard$,Yt=Y.ui.startedByKeyboard$,gi=Y.ui.controlBlocks,at=Y.ui.t,li=Y.ads.duration,bi=Y.ads.position,Gt=Y.ads.playbackState,Ct=Y.ui.isFullscreen,bo=Y.ui.playerSize,Oo=Y.ui.currentGridType$,fn=Y.ui.additionalDesktopControlPanelRightButtons$,mn=Y.ui.autoplayNextEnabled$,Pi=Y.actions.internal.getVideoElement,Ci=Y.actions.internal.replayInteractive,vn=Y.actions.internal.prevVideoClick,_r=Y.actions.internal.nextVideoClick,xi=Y.state.isInteractive,So=Y.state.isInteractiveTime$,No=Y.state.showInteractiveGraph,Bo=Y.state.showSeekToInteractive,gn=Y.state.showPlayPrevChapter,es=Y.state.showInteractiveTimeIndicator,xs=Y.state.playPrevChapterDisabledTooltip,ts=Oe.seekToInteractiveDisabledTooltip$,br=Oe.graphIsOpened$,hn=$e.features.interactiveResponsiveUi,is=f(()=>s().has("EPISODE_BUTTON")),Zn=f(()=>s().has("GRAPH_BUTTON")),Rr=f(()=>s().has("SEEK_TO_INTERACTIVE_BUTTON")),Co=f(()=>s().has("PLAY_BUTTON")),os=f(()=>s().has("REPLAY_BUTTON")),$r=f(()=>s().has("PLAY_PREV_CHAPTER_BUTTON")),Vn=()=>Y.actions.internal.toggleChromecast(),Rn=f(()=>St()?a()==="playing":l()===Gm.PLAYING),Dn=f(()=>d().value!=="off"),Jn=f(()=>r()&&!St()||xi),Dr=f(()=>hn?n(Jn)&&co(u(),"m"):n(Jn)),ns=f(()=>!r()||xi||St()),ki=f(()=>!m()&&co(u(),"m")),rs=f(()=>!m()&&co(u(),"m")&&!St()&&e.nextButtonActive),Ho=f(()=>!m()&&co(u(),"m")&&!St()&&e.prevButtonActive),er=f(()=>!St()&&!!p()),yr=f(()=>!m()&&v()!==$b.NOT_AVAILABLE&&!($()&&y()===1)&&co(u(),"m")&&!xi&&!St()),tr=f(()=>e.showAutoplayNext&&!m()&&!Dt()&&co(u(),"s")),pt=f(()=>!m()&&h().length>0&&co(u(),"m")),Zt=f(()=>x()||I()),xr=f(()=>co(u(),"s")&&!St()),ss=f(()=>!e.logoHidden&&!St()&&!m()),ir=f(()=>$e.features.fullscreen&&Ye()&&(e.logoHidden||co(u(),hn?"xs":"s"))&&!($()&&y()===1)&&(xi?Wt():!0)),on=f(()=>(!p()||St())&&!($e.features.interactiveHideTime&&xi)),On=f(()=>No&&co(u(),"m")),or=f(()=>hn?Bo&&co(u(),"s"):Bo),Or=f(()=>hn?gn&&co(u(),"s"):gn),Fo=f(()=>!m()&&!St()&&!p()&&!!(nt!=null&&nt.length)&&n(ki)&&!n(is)),_n=f(()=>!T()||!!D()),Nn=f(()=>k()?at("tooltip_interactive_graph_on"):at("tooltip_interactive_graph_off")),uo=f(()=>E()?at("tooltip_context_menu_close"):at("tooltip_context_menu_open")),To=(gt,dt)=>gt?dt&&dt===Gm.PAUSED?at("tooltip_play"):"":at("tooltip_live"),Bn=f(()=>To(n(_n),l())),Ri=f(()=>$e.logoType==="vk_video"?at("tooltip_vk_video_logo"):at("tooltip_vk_logo")),nr=f(()=>n(Dn)?at("tooltip_subtitles_on"):at("tooltip_subtitles_off")),bn=f(()=>V()?at("tooltip_fullscreen_on"):at("tooltip_fullscreen_off")),Nr=f(()=>v()===$b.CONNECTED?at("tooltip_chromecast_on"):at("tooltip_chromecast_off")),bt=f(()=>q()?at("tooltip_autoplay_on"):at("tooltip_autoplay_off")),ui=K(0),Ut=si({}),nn=si({}),$o=f(()=>We.prevButton),$n=f(()=>We.replayButton),yo=f(()=>We.playButton),rr=f(()=>We.nextButton),oo=f(()=>We.playPrevChapterButton),wr=f(()=>We.seekToInteractiveButton),Io=f(()=>We.interactiveGraphButton),yn=f(()=>We.liveButton),as=f(()=>We.time),Br=f(()=>We.episodes),ls=f(()=>We.vkLogo),no=f(()=>We.volume),ds=f(()=>We.subtitles),Hr=f(()=>We.settings),Eo=f(()=>We.context),Fr=f(()=>We.fullscreen),Hn=f(()=>We.chromecast),po=f(()=>({prevButton:L()?L().right-L().left:0,replayButton:z()?z().right-z().left:0,playButton:j()?j().right-j().left:0,nextButton:te()?te().right-te().left:0,playPrevChapterButton:ee()?ee().right-ee().left:0,seekToInteractiveButton:oe()?oe().right-oe().left:0,interactiveGraphButton:ae()?ae().right-ae().left:0,liveButton:le()?le().right-le().left:0,time:ce()?ce().right-ce().left:0,episodes:X()?X().right-X().left:0,vkLogo:_e()?_e().right-_e().left:0,volume:Ee()?Ee().right-Ee().left:0,subtitles:de()?de().right-de().left:0,settings:ze()?ze().right-ze().left:0,context:ue()?ue().right-ue().left:0,fullscreen:pe()?pe().right-pe().left:0,chromecast:Z()?Z().right-Z().left:0,additionalButtons:B().length?B().reduce(gt=>[...gt,40],[]):[]})),fo=K(0);Fe(()=>{(!n(fo)||n(fo)<n(po).time)&&Pt(()=>O(fo,n(po).time,!0))});let je=K(!1);Fe(()=>{let gt=0;n(Fo)&&(co(u(),"xl")?gt=n(po).time:gt=60);let dt=n(po).prevButton+n(po).playButton+n(po).nextButton+n(po).seekToInteractiveButton+n(po).interactiveGraphButton+n(po).liveButton+n(fo)+gt;O(je,n(on)&&n(ui)>=dt,!0)});let At=f(()=>n(je)&&co(u(),"m")),fi=yb(Yl,260),Po=yb(Ju,260);Fe(()=>{fe(),me(),Ie(),fi(Pi(),We,Ut,e.showControls),Po(Pi(),gi,nn,e.showControls)}),Fe(()=>{nn.bottom=lt()});let ko=re();Fe(()=>{ot(),Me()&&Pt(()=>Bl(Me(),ot(),_t))});let xo;Fe(()=>{be(),Pt(()=>Xu(Yt,be(),xo))});function mo(){ua({isAudioDisabled:Mi,isAudioAvailable:W(),isAds:St(),audioIsNotExistHintCallback:Ue,audioDisabledHintCallback:xe})&&Ne()}let Ao=xi?Ci:ft,sr=f(()=>Ce()!==null),ar=f(()=>n(sr)?Ce():n(Rn)),Uo=f(()=>n(ar)?at("tooltip_pause"):at("tooltip_play")),Ni=at("tooltip_episodes"),Fn=f(()=>{var gt,dt,Di,qo;return n(Ho)?{id:"prevButton",type:"desktop-control-panel-left",weight:Ws.prevButton,buttonComponent:Ga,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:vn.bind(null,!0)},tooltipEnabled:!((dt=(gt=Y.callbacks)==null?void 0:gt.uiInfo)!=null&&dt.onPrevButtonMouseEnter)&&!((qo=(Di=Y.callbacks)==null?void 0:Di.uiInfo)!=null&&qo.onPrevButtonMouseLeave),mouseEnter:()=>{var Gi,yi,Hi;(Hi=(yi=(Gi=Y.callbacks)==null?void 0:Gi.uiInfo)==null?void 0:yi.onPrevButtonMouseEnter)==null||Hi.call(yi,jn(Pi(),Ut,"prevButton",e.showControls))},mouseLeave:()=>{var Gi,yi,Hi;(Hi=(yi=(Gi=Y.callbacks)==null?void 0:Gi.uiInfo)==null?void 0:yi.onPrevButtonMouseLeave)==null||Hi.call(yi,jn(Pi(),Ut,"prevButton",e.showControls))},tooltipText:at("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),zo=f(()=>n(Dr)?{id:"replayButton",type:"desktop-control-panel-left",weight:Ws.replayButton,buttonComponent:jl,buttonComponentProps:{disabled:n(os),click:Ao},tooltipText:at("tooltip_restart"),disabled:n(os)}:void 0),Sr=f(()=>n(ns)?{id:"playButton",type:"desktop-control-panel-left",weight:Ws.playButton,buttonComponent:Xl,buttonComponentProps:{disabled:n(Co),isPlaying:n(Rn),click:ft},tooltipText:n(Uo),disabled:n(Co)}:void 0),Ze=f(()=>{var gt,dt,Di,qo;return n(rs)?{id:"nextButton",type:"desktop-control-panel-left",weight:Ws.nextButton,buttonComponent:Ga,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:_r.bind(null,!0)},tooltipEnabled:!((dt=(gt=Y.callbacks)==null?void 0:gt.uiInfo)!=null&&dt.onNextButtonMouseEnter)&&!((qo=(Di=Y.callbacks)==null?void 0:Di.uiInfo)!=null&&qo.onNextButtonMouseLeave),mouseEnter:()=>{var Gi,yi,Hi;(Hi=(yi=(Gi=Y.callbacks)==null?void 0:Gi.uiInfo)==null?void 0:yi.onNextButtonMouseEnter)==null||Hi.call(yi,jn(Pi(),Ut,"nextButton",e.showControls))},mouseLeave:()=>{var Gi,yi,Hi;(Hi=(yi=(Gi=Y.callbacks)==null?void 0:Gi.uiInfo)==null?void 0:yi.onNextButtonMouseLeave)==null||Hi.call(yi,jn(Pi(),Ut,"nextButton",e.showControls))},tooltipText:at("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Qt=f(()=>xi&&n(Or)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Ws.playPrevChapterButton,buttonComponent:cc,buttonComponentProps:{disabled:n($r),click:e.playPrevChapter},tooltipText:at("tooltip_interactive_go_back"),disabledTooltipContent:at(xs),disabled:n($r)}:void 0),Ai=f(()=>xi&&n(or)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Ws.seekToInteractiveButton,buttonComponent:pc,buttonComponentProps:{disabled:n(Rr),click:e.seekToInteractive},tooltipText:at("tooltip_interactive_seek"),disabled:n(Rr),disabledTooltipContent:at(Ae())}:void 0),xn=f(()=>xi&&n(On)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Ws.interactiveGraphButton,buttonComponent:fc,buttonComponentProps:{disabled:n(Zn),click:br.toggle,graphIsOpened:k()},tooltipText:n(Nn)}:void 0),ro=f(()=>n(er)?{id:"liveButton",type:"desktop-control-panel-left",weight:Ws.liveButton,buttonComponent:mc,buttonComponentProps:{isLiveActive:n(_n),ariaLabel:n(Bn)},tooltipText:n(Bn),disabled:n(_n)&&l()===Gm.PLAYING}:void 0),Ur=f(()=>[n(Fn),n(zo),n(Sr),n(Ze),n(Qt),n(Ai),n(xn),n(ro)].filter(gt=>!!gt).sort(Fa)),Wo=f(()=>n(ss)?{id:"vkLogo",type:"desktop-control-panel-right",weight:qs.vkLogo,buttonComponent:Jd,buttonComponentProps:{targetUrl:Rt(),logoClickable:e.logoClickable,click:Et},tooltipText:n(Ri),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),Cr=f(()=>n(tr)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:qs.autoplayNext,buttonComponent:uc,tooltipText:n(bt)}:void 0),Tr=f(()=>({id:"volume",type:"desktop-control-panel-right",weight:qs.volume,buttonComponent:um,buttonComponentProps:{click:mo,isAds:St()}})),ws=f(()=>n(pt)?{id:"subtitles",type:"desktop-control-panel-right",weight:qs.subtitles,buttonComponent:sm,buttonComponentProps:{isSubtitlesEnabled:n(Dn),click:Se},tooltipText:n(nr)}:void 0),Ss=f(()=>n(xr)?{id:"settings",type:"desktop-control-panel-right",weight:qs.settings,buttonComponent:zl,buttonComponentProps:{ref$:ko},tooltipText:ot()?void 0:at("tooltip_settings_off")}:void 0),Un=f(()=>$e.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:qs.context,buttonComponent:Lm,buttonComponentProps:{ariaLabel:at("aria_label_context_menu")},className:n(Zt)?"":"out-of-view",tooltipText:n(uo)}:void 0),ha=f(()=>n(ir)?{id:"fullscreen",type:"desktop-control-panel-right",weight:qs.fullscreen,buttonComponent:Zd,buttonComponentProps:{isFullscreen:V(),click:e.toggleFullscreen},tooltipText:n(bn)}:void 0),cs=f(()=>n(yr)?{id:"chromecast",type:"desktop-control-panel-right",weight:qs.chromecast,buttonComponent:tc,buttonComponentProps:{state:v(),click:Vn},tooltipText:n(Nr)}:void 0),_a=f(()=>[n(Wo),n(Cr),n(Tr),n(ws),n(Ss),n(Un),n(ha),n(cs),...B()].filter(gt=>!!gt).sort(Fa)),ba=Y.ui.previewTrackActive,mt=Y.ui.previewTrackDragInProgress,ni=Y.ui.previewTrackAvailable,Li=Y.ui.isPreviewTrackHorizontallyAligned,$i=f(()=>_b({onPreviewTrackOpened:Y.actions.internal.previewTrackOpened,getTimelineRef:()=>Ut.timeline,isHorizontal:Qe()})),Ir=f(()=>n($i).progressBarY),Cs=f(()=>n($i).controlsY),Ts=f(()=>n($i).onPointerDown),zr=f(()=>n($i).onPointerMove),Bi=f(()=>n($i).onPointerUp),Qi=f(()=>n($i).calculatedHeight),ve=f(()=>n($i).closePreviewTrack);Fe(()=>{Ie()||n(ve)()});let vt;Lt(()=>()=>vt&&clearTimeout(vt));let ri=gt=>{Ie()||!Te()||(n(Ts)(gt),vt=setTimeout(()=>{Y.actions.internal.previewTrackDragStarted()},200))},jt=()=>{Ie()||n(Bi)(),vt&&clearTimeout(vt),we()&&Y.actions.internal.previewTrackDragFinished()},Ko=gt=>{n(zr)(gt)},Lo=-(parseInt("24")/2+4);var so=Aw(),rn=se(so);let Is;var Es=C(rn);{var Qs=gt=>{let dt=f(()=>n(Ir)()),Di=f(()=>n(Qi)());Qm(gt,{get animatedOffsetY(){return n(dt)},get animatedPreviewTrackHeight(){return n(Di)},get canRewindLive(){return e.canRewindLive},get isAds(){return St()},onTimelineMove:Ko,onTimelinePointerDown:ri,onTimelinePointerUp:jt,get previewTrackAvailable(){return Te()},get timelineRef(){return Ut.timeline},set timelineRef(qo){Ut.timeline=qo}})};M(Es,gt=>{e.showControls&>(Qs)})}var Wr=P(Es,2);let Gs;var wn=C(Wr),$a=C(wn);wi($a,17,()=>n(Ur),gt=>gt.id,(gt,dt)=>{Zu(gt,{get buttonComponent(){return n(dt).buttonComponent},get buttonComponentProps(){return n(dt).buttonComponentProps},get tooltipText(){return n(dt).tooltipText},get disabledTooltipContent(){return n(dt).disabledTooltipContent},get disabled(){return n(dt).disabled},get className(){return n(dt).className},get tooltipEnabled(){return n(dt).tooltipEnabled},get mouseEnter(){return n(dt).mouseEnter},get mouseLeave(){return n(dt).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return Ut[n(dt).id]},set ref(Di){Ut[n(dt).id]=Di}})});var sl=P($a,2);{var Er=gt=>{let dt=f(()=>!e.showControls),Di=f(()=>St()?He():st()),qo=f(()=>St()?ct():It());jd(gt,{get isHidden(){return n(dt)},isMobile:!1,get showDuration(){return n(At)},get position(){return n(Di)},get duration(){return n(qo)},get ref(){return Ut.time},set ref(Gi){Ut.time=Gi}})};M(sl,gt=>{n(on)&>(Er)})}var ed=P(sl,2);let al=f(()=>!n(Fo));Do(ed,{className:"w-max",get disabled(){return n(al)},get tooltipContent(){return Ni},get tooltipVisible(){return e.showControls},tooltipPlacement:"top-left",get initialTranslateXPx(){return Lo},get ref(){return Ut.episodes},set ref(gt){Ut.episodes=gt},children:(gt,dt)=>{var Di=Re(),qo=se(Di);{var Gi=yi=>{ic(yi,{get position(){return st()},get duration(){return It()},get timeCodes(){return nt}})};M(qo,yi=>{n(Fo)&&yi(Gi)})}b(gt,Di)},$$slots:{default:!0}}),S(wn);var ll=P(wn,2);wi(ll,21,()=>n(_a),gt=>gt.id,(gt,dt)=>{var Di=Re(),qo=se(Di);{var Gi=Hi=>{Zu(Hi,{get buttonComponent(){return n(dt).buttonComponent},get buttonComponentProps(){return n(dt).buttonComponentProps},get tooltipText(){return n(dt).tooltipText},get disabledTooltipContent(){return n(dt).disabledTooltipContent},get disabled(){return n(dt).disabled},get className(){return n(dt).className},get tooltipVisible(){return e.showControls},get ref(){return Ut[n(dt).id]},set ref(xa){Ut[n(dt).id]=xa}})},yi=Hi=>{let xa=f(()=>!!n(dt).disabled);Dm(Hi,{get id(){return n(dt).id},get testId(){return n(dt).testId},get icon(){return n(dt).icon},get ariaLabel(){return n(dt).ariaLabel},get tooltipText(){return n(dt).tooltipText},get disabledTooltipContent(){return n(dt).disabledTooltipContent},get disabled(){return n(xa)},get onClick(){return n(dt).onClick},get disableMouseupTooltipShow(){return n(dt).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return Ut[n(dt).id]},set ref(ul){Ut[n(dt).id]=ul}})};M(qo,Hi=>{vb(n(dt))?Hi(Gi):Hi(yi,!1)})}b(gt,Di)}),S(ll),S(Wr),tt(Wr,gt=>ai(gt),()=>ai()),S(rn),tt(rn,gt=>lt(gt),()=>lt());var dl=P(rn,2);{var td=gt=>{lc(gt,{get ref(){return Ut.interactiveTimeIndicator},set ref(dt){Ut.interactiveTimeIndicator=dt}})};M(dl,gt=>{es&>(td)})}N((gt,dt,Di)=>{Is=ie(rn,1,"wrapper-bottom s-18",null,Is,gt),Ke(rn,`transform: ${e.showControls?"translateY(0)":"translateY(100%)"}`),Gs=ie(Wr,1,"controls s-18",null,Gs,dt),Ke(Wr,Di),Wr.inert=Ie()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||we()}),()=>({"minimal-view":m()}),()=>`transform: translateY(${n(Cs)()}px);`]),kn(wn,"clientWidth",gt=>O(ui,gt)),b(t,so),F(),o()}import{ChromecastState as wb,PlaybackState as Sb}from"@vkontakte/videoplayer-core/es2015";import{noop as xb}from"@vkontakte/videoplayer-shared/es2015";var Mw=A('<div class="icon icon-error-stub s-1y"><div class="inner s-1y"></div></div>'),Vw=A('<img class="icon s-1y" aria-hidden="true"/>'),Rw={hash:"s-1y",code:".icon.s-1y{height:24px!important;width:24px!important}.inner.s-1y{background-color:var(--white);height:16px;width:16px}"};function jm(t,e){Q(t,Rw);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,xb),s=f(()=>o()===xb),a=f(()=>n(s)||i()),l=K(!1),d=()=>{O(l,!0)},r=f(()=>n(s)?"btn-full-opacity":"");Ht(t,{get className(){return n(r)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(a)},get testId(){return e.testId},children:(u,m)=>{var p=Re(),v=se(p);{var $=h=>{var x=Mw();b(h,x)},y=h=>{var x=Vw();N(()=>De(x,"src",e.iconUrl)),ht("error",x,d),Ra(x),b(h,x)};M(v,h=>{n(l)?h($):h(y,!1)})}b(u,p)},$$slots:{default:!0}})}var Dw=ke('<path d="M8.7 8.1 5.3 4.72A1 1 0 0 1 6.72 3.3L20.7 17.29a1 1 0 0 1-1.41 1.41L16 15.41V20a1 1 0 0 1-1 1c-.64 0-1.26-.25-1.72-.7L7.79 15H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2.77zm2.88-2.76 1.7-1.65A2.5 2.5 0 0 1 15 3a1 1 0 0 1 1 1v5.76z"></path>');function Xm(t){Xe(t,{testId:"muted-icon",children:(e,i)=>{var o=Dw();b(e,o)},$$slots:{default:!0}})}import{noop as Ow}from"@vkontakte/videoplayer-shared/es2015";function ep(t,e){H(e,!0);let i=g(e,"muted",3,!1),o=g(e,"click",3,Ow),s=g(e,"ref",15,void 0),l=ye().ui.t,d=f(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),r=f(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");Ht(t,{get testId(){return n(r)},get click(){return o()},get ariaLabel(){return n(d)},role:"button",get ref(){return s()},set ref(u){s(u)},children:(u,m)=>{var p=Re(),v=se(p);{var $=h=>{Xm(h,{})},y=h=>{fa(h,{get size(){return"24"}})};M(v,h=>{i()?h($):h(y,!1)})}b(u,p)},$$slots:{default:!0}}),F()}var Nw=ke('<path d="M11.64 12.37 9.07 9.8h1.03a.9.9 0 1 0 0-1.8H6.9a.9.9 0 0 0-.9.9v3.2a.9.9 0 0 0 1.8 0v-1.02l2.53 2.52.13.14a.9.9 0 0 0 1.28-1.28z"></path>'),Bw=ke('<path d="m6.36 9.63 2.57 2.57H7.9a.9.9 0 1 0 0 1.8h3.2a.9.9 0 0 0 .9-.9V9.9a.9.9 0 0 0-1.8 0v1.02L7.67 8.4l-.13-.14a.9.9 0 0 0-1.28 1.28z"></path>'),Hw=ke('<path d="M7.66 4h6.68q1.2-.01 2 .04.83.06 1.53.38a4 4 0 0 1 1.7 1.7c.24.48.34.98.39 1.54q.05.8.04 2v1.44a.9.9 0 0 1-1.8 0V9.7c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2 2 0 0 0-.92-.92 2 2 0 0 0-.85-.2c-.46-.03-1.04-.03-1.9-.03H7.7c-.85 0-1.44 0-1.9.04-.44.03-.68.1-.85.19a2 2 0 0 0-.92.92c-.09.17-.16.4-.2.85-.03.46-.03 1.05-.03 1.9v2.65c0 .85 0 1.44.04 1.9.03.44.1.68.19.85a2 2 0 0 0 .92.92c.17.08.4.15.85.19.46.03 1.04.04 1.9.04h2.4a.9.9 0 0 1 0 1.8H7.66q-1.2.01-2-.05a4 4 0 0 1-1.53-.38 4 4 0 0 1-1.7-1.7 4 4 0 0 1-.39-1.53q-.05-.8-.04-2V9.65q-.01-1.2.04-2c.05-.56.15-1.06.39-1.53a4 4 0 0 1 1.7-1.7c.47-.24.97-.34 1.53-.39q.8-.05 2-.04M13 16.8c0-.98 0-1.47.19-1.84a2 2 0 0 1 .77-.77c.37-.19.86-.19 1.84-.19h3.4c.98 0 1.47 0 1.85.19q.5.27.76.77c.19.37.19.86.19 1.84v.4c0 .98 0 1.47-.19 1.85a2 2 0 0 1-.77.76c-.37.19-.86.19-1.84.19h-3.4c-.98 0-1.47 0-1.85-.19a2 2 0 0 1-.76-.76c-.19-.38-.19-.87-.19-1.85z"></path><!>',1);function Zm(t,e){let i=g(e,"isActive",3,!1),o=f(()=>i()?"pip-icon--active":"pip-icon");Xe(t,{get testId(){return n(o)},children:(s,a)=>{var l=Hw(),d=P(se(l));{var r=m=>{var p=Nw();b(m,p)},u=m=>{var p=Bw();b(m,p)};M(d,m=>{i()?m(r):m(u,!1)})}b(s,l)},$$slots:{default:!0}})}import{noop as Fw}from"@vkontakte/videoplayer-shared/es2015";function Jm(t,e){H(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isPictureInPictureActive",3,!1),s=g(e,"click",3,Fw),a=G("menu_pip");Ht(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return s()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{Zm(l,{get isActive(){return o()}})},$$slots:{default:!0}}),F()}import{debounceFn as Cb}from"@vkontakte/videoplayer-shared/es2015";var Uw=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},zw=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},Ww=A("<div><!></div>"),Kw=A("<div><!></div>"),qw=A("<div><!></div>"),Qw=A("<!> <!> <!>",1),Gw=A("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),Yw=A('<div class="wrapper-middle s-17"><!></div>'),jw=A("<div><!></div> <!> <div><!></div>",1),Xw=A('<div aria-hidden="true">·</div> <!>',1),Zw=A('<!> <!> <div><div><div class="controls mobile s-17" data-testid="bottom-controls"><div class="controls-group contain s-17"><!> <!> <!> <!></div> <div class="controls-group s-17"><!> <!> <!></div></div> <!></div></div> <!>',1),Jw={hash:"s-17",code:".wrapper-bottom.s-17{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-17>:where(.s-17){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-17{height:9px;padding:0 4px 4px}.wrapper-middle.s-17{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-17,.wrapper-top-right.s-17{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-17{right:8px;top:4px}.wrapper-top-left.s-17{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-17,.wrapper-middle-left-second.s-17,.wrapper-middle-right.s-17{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-17{left:12px}.wrapper-middle-left-second.s-17{left:64px}.wrapper-middle-right.s-17{right:12px}.controls.s-17{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-17,.controls-group.s-17{display:flex}.controls-group.contain.s-17{min-width:0}.controls-group.s-17 >:not(:first-child){margin-left:8px}.hidden.s-17{opacity:0;visibility:hidden}.controls-hidden.s-17{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-17{transition:none}.overlay-mobile.s-17{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-17,.wrapper-top-right.fullscreen.s-17{top:16px}.controls-wrapper.fullscreen.s-17{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-17{left:44px;top:12px}.wrapper-top-right.fullscreen.s-17{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-17{left:44px}.wrapper-middle-left-second.fullscreen.s-17{left:96px}.wrapper-middle-right.fullscreen.s-17{right:44px}.controls-wrapper.fullscreen.s-17{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function ev(t,e){var po,fo;H(e,!0),Q(t,Jw);let[i,o]=Be(),s=()=>w(Oo,"$seekToInteractiveDisabledTooltip$",i),a=()=>w(We,"$disabledControls$",i),l=()=>w(Dt,"$playbackState$",i),d=()=>w(io,"$adPlaybackState",i),r=()=>w(Y,"$isEnded$",i),u=()=>w(Se,"$isMinimalView$",i),m=()=>w(eo,"$autoplayNextToggleHidden",i),p=()=>w(U,"$playerSize",i),v=()=>w(Ye,"$scrubbingInProgress",i),$=()=>w(Ki,"$chromecastState$",i),y=()=>w(xe,"$isPictureInPictureActive",i),h=()=>w(Ot,"$pictureInPictureType$",i),x=()=>w(Ue,"$mobileNotReportControlHidden$",i),I=()=>w(to,"$chromecastHidden",i),T=()=>w(ai,"$playerPhase",i),D=()=>w(di,"$pipHidden",i),k=()=>w(ut,"$currentGridType$",i),E=()=>w(Mi,"$vkLogoHidden",i),V=()=>w(vi,"$volumeHidden",i),q=()=>w(Oe,"$isLive$",i),L=()=>w(Tt,"$settingsMenuVisible",i),z=()=>w(Et,"$isRewindableLive$",i),j=()=>w(ft,"$isActiveLive$",i),te=()=>w(Wt,"$isAudioAvailable$",i),ee=()=>w(Ne,"$muted$",i),oe=()=>w($e,"$volume$",i),ae=()=>w(li,"$isInteractiveTime$",i),le=()=>w(Fo,"$settingButtonRef$",i),ce=()=>w(nt,"$startedByKeyboard$",i),X=()=>w(pn,"$isFullscreen",i),_e=()=>w(it,"$additionalButtons$",i),Ee=()=>w(_t,"$crashed$",i),de=()=>w(Si,"$settingsHidden",i),ze=()=>w(fn,"$graphIsOpened$",i),ue=()=>w(qi,"$adPosition",i),pe=()=>w(pi,"$adDuration",i),Z=()=>w(Rt,"$position$",i),B=()=>w(St,"$duration$",i),fe=g(e,"playerControlsWrapperRef",15,void 0),me=g(e,"playerControlsRef",15,void 0),Ie=g(e,"isAds",3,!1),ot=g(e,"logoTargetUrl",3,""),Me=g(e,"isOneVideoPlaylist",3,!1),be=g(e,"customFullscreenSupported",3,!0),W=ye(),Ce=wo(),Ae=Mt(),Qe=W.actions.internal.toggleMuted,Te=W.actions.internal.togglePlay,we=W.actions.internal.pause,He=W.actions.internal.prevVideoClick,st=W.actions.internal.nextVideoClick,ct=W.actions.internal.checkFullscreenSupport,It=(po=W.callbacks)==null?void 0:po.onAudioDoesNotExistHint,lt=(fo=W.callbacks)==null?void 0:fo.onAudioDisabledHint,ai=W.playerPhase,St=W.state.duration$,Rt=W.state.positionWithScrubbing$,Dt=W.state.playbackState$,Wt=W.state.isAudioAvailable$,Le=W.state.isAudioDisabled,Y=W.state.isEnded$,Oe=W.state.isLive$,$e=W.state.volume$,Ne=W.state.muted$,ft=W.state.isActiveLive$,Et=W.state.isRewindableLive$,Se=W.ui.isMinimalView$,Ye=W.ui.scrubbingInProgress,Ue=W.ui.mobileNotReportControlHidden$,{isActive$:xe,type$:Ot}=Ce.pictureInPicture$,Tt=W.ui.settingsMenu.visible$,qt=W.ui.settingsMenu.openedByBtnKeyboard$,_i=W.ui.controls,{volume:vi,vkLogo:Mi,autoplayNextToggle:eo,pip:di,settings:Si,chromecast:to}=W.ui.hiddenControls,Vi=W.actions.internal.getVideoEpisodes(),ci=W.webApi.pictureInPictureApi,Ki=W.state.chromecastState$,_t=W.state.crashed$,We=_i.disabledControls$,nt=W.ui.startedByKeyboard$,ut=W.ui.currentGridType$,pi=W.ads.duration,qi=W.ads.position,io=W.ads.playbackState,pn=W.ui.isFullscreen,U=W.ui.playerSize,it=W.ui.additionalButtonsDeprecated$,Yt=W.actions.internal.getVideoElement,gi=W.actions.internal.replayInteractive,at=W.state.isInteractive,li=W.state.isInteractiveTime$,bi=W.state.showInteractiveGraph,Gt=W.state.showSeekToInteractive,Ct=W.state.showPlayPrevChapter,bo=W.state.showInteractiveTimeIndicator,Oo=Ce.seekToInteractiveDisabledTooltip$,fn=Ce.graphIsOpened$,mn=W.ui.controlBlocks,Pi=f(()=>G(W.state.playPrevChapterDisabledTooltip)),Ci=f(()=>G(s())),vn=f(()=>a().has("EPISODE_BUTTON")),_r=f(()=>a().has("GRAPH_BUTTON")),xi=f(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),So=f(()=>a().has("PLAY_BUTTON")),No=f(()=>a().has("REPLAY_BUTTON")),Bo=f(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),gn=f(()=>l()===Sb.PLAYING),es=f(()=>d()==="paused"),xs=f(()=>r()&&!Ie()&&!at),ts=f(()=>!r()||Ie()),br=f(()=>!u()&&!Ie()&&e.prevButtonActive),hn=f(()=>!u()&&!Ie()&&e.nextButtonActive),is=f(()=>e.showAutoplayNext&&!u()&&!Me()&&!m()),Zn=f(()=>!u()&&p().width>300),Rr=f(()=>p().width>400),Co=f(v),os=f(()=>$()!==wb.NOT_AVAILABLE&&!(y()&&h()===1)&&!x()&&!at&&!I()),$r=f(()=>T()==="LiveWaitingStart"),Vn=f(()=>!!ci&&!u()&&$()!==wb.CONNECTED&&!x()&&(h()===1&&n($r)||!n($r))&&!n(Co)&&!at&&!D()),Rn=K(!1);Lt(()=>{let je=ci==null?void 0:ci.info.isActive$.subscribe(At=>O(Rn,At,!0));return()=>je==null?void 0:je.unsubscribe()});let Dn=f(()=>!n(Co)&&co(k(),"s")),Jn=f(()=>!e.logoHidden&&p().width>350&&!E()),Dr=f(()=>Ae.features.fullscreen&&ct()&&!(y()&&h()===1)&&(at?be():!0)&&!n(Co)&&!n(Rn)),ns=f(()=>!V()&&!n(Co)),ki=f(()=>(!q()||Ie())&&p().width>260&&!n(Co)&&!(Ae.features.interactiveHideTime&&at)),rs=f(()=>L()||e.showControls),Ho=f(()=>!Ie()&&!q()&&!!(Vi!=null&&Vi.length)&&n(Zn)&&!n(vn)&&!n(Co)),er=f(()=>!z()||!!j()),yr=f(()=>bi&&co(k(),"m")),tr=f(()=>!te()||ee()||oe()===0),pt=si({}),Zt=si({}),xr=Cb(Yl,260),ss=Cb(Ju,260);Fe(()=>{p(),ae(),xr(Yt(),_i,pt,e.showControls),ss(Yt(),mn,Zt,e.showControls)});let ir=()=>W.actions.internal.toggleChromecast();function on(){return $t(this,null,function*(){ci!=null&&ci.isActive()?yield ci==null?void 0:ci.exit():yield ci==null?void 0:ci.request()})}function On(){ua({isAudioDisabled:Le,audioDisabledHintCallback:lt,isAudioAvailable:te(),audioIsNotExistHintCallback:It,isAds:Ie()})&&Qe()}let or=K(""),Or=(je,At)=>{if(!je){O(or,G("tooltip_live"),!0);return}At&&At===Sb.PAUSED&&O(or,G("tooltip_play"),!0)};Fe(()=>{Or(n(er),l())});let Fo=re();Fe(()=>{le()&&Bl(le(),L(),qt)}),Fe(()=>{Xu(nt,ce(),pt.playButton)});var _n=Zw(),Nn=se(_n);{var uo=je=>{var At=Gw(),fi=se(At);let Po;var ko=P(fi,2);let xo;tt(ko,mt=>Zt.topLeft=mt,()=>Zt==null?void 0:Zt.topLeft);var mo=P(ko,2);let Ao;var sr=C(mo);wi(sr,1,_e,({iconUrl:mt,ariaLabel:ni,testId:Li,onClick:$i,tooltip:Ir})=>mt,(mt,ni)=>{let Li=()=>n(ni).iconUrl,$i=()=>n(ni).ariaLabel,Ir=()=>n(ni).testId,Cs=()=>n(ni).onClick,Ts=()=>n(ni).tooltip,zr=f(()=>{var Bi;return(Bi=$i())!=null?Bi:Ts()});jm(mt,{get iconUrl(){return Li()},get ariaLabel(){return n(zr)},get testId(){return Ir()},get onClick(){return Cs()}})});var ar=P(sr,2);{var Uo=mt=>{uc(mt,{get ref(){return pt.autoplayNextToggle},set ref(ni){pt.autoplayNextToggle=ni}})};M(ar,mt=>{n(is)&&mt(Uo)})}var Ni=P(ar,2);{var Fn=mt=>{tc(mt,{isMobile:!0,click:ir,get state(){return $()},get ref(){return pt.chromecast},set ref(ni){pt.chromecast=ni}})};M(Ni,mt=>{n(os)&&mt(Fn)})}var zo=P(Ni,2);{var Sr=mt=>{Jm(mt,{click:on,get isPictureInPictureActive(){return y()},get ref(){return pt.pip},set ref(ni){pt.pip=ni}})};M(zo,mt=>{n(Vn)&&mt(Sr)})}var Ze=P(zo,2);{var Qt=mt=>{zl(mt,{get ref$(){return Fo}})};M(Ze,mt=>{Ee()&&!de()&&mt(Qt)})}var Ai=P(Ze,2);{var xn=mt=>{Jd(mt,{get click(){return we},get targetUrl(){return ot()},get logoClickable(){return e.logoClickable},get ref(){return pt.vkLogo},set ref(ni){pt.vkLogo=ni}})};M(Ai,mt=>{n(Jn)&&mt(xn)})}S(mo),tt(mo,mt=>Zt.topRight=mt,()=>Zt==null?void 0:Zt.topRight);var ro=P(mo,2);let Ur;var Wo=C(ro);{var Cr=mt=>{let ni=f(()=>He.bind(null,!0));Ga(mt,{get click(){return n(ni)},type:"prev",isMobile:!0,get ref(){return pt.prevButton},set ref(Li){pt.prevButton=Li}})};M(Wo,mt=>{n(br)&&mt(Cr)})}var Tr=P(Wo,2);{var ws=mt=>{Xl(mt,{get disabled(){return n(So)},get click(){return Te},isMobile:!0,get isPlaying(){return n(gn)},get ref(){return pt.playButton},set ref(ni){pt.playButton=ni}})};M(Tr,mt=>{n(ts)&&mt(ws)})}var Ss=P(Tr,2);{var Un=mt=>{jl(mt,{get disabled(){return n(No)},get click(){return Te},isMobile:!0,get ref(){return pt.replayButton},set ref(ni){pt.replayButton=ni}})};M(Ss,mt=>{n(xs)&&mt(Un)})}var ha=P(Ss,2);{var cs=mt=>{let ni=f(()=>st.bind(null,!0));Ga(mt,{get click(){return n(ni)},type:"next",isMobile:!0,get ref(){return pt.nextButton},set ref(Li){pt.nextButton=Li}})};M(ha,mt=>{n(hn)&&mt(cs)})}S(ro),tt(ro,mt=>Zt.middle=mt,()=>Zt==null?void 0:Zt.middle);var _a=P(ro,2);{var ba=mt=>{var ni=Qw(),Li=se(ni);{var $i=Bi=>{var Qi=Ww();let ve;Qi.__click=[Uw,Bo,e,Pi];var vt=C(Qi);let ri=f(()=>!e.showControls);cc(vt,{get hidden(){return n(ri)},get disabled(){return n(Bo)},get click(){return e.playPrevChapter},get ref(){return pt.playPrevChapterButton},set ref(jt){pt.playPrevChapterButton=jt}}),S(Qi),N(jt=>ve=ie(Qi,1,"wrapper-middle-left s-17",null,ve,jt),[()=>({fullscreen:X(),hidden:!e.showControls})]),b(Bi,Qi)};M(Li,Bi=>{Ct&&Bi($i)})}var Ir=P(Li,2);{var Cs=Bi=>{var Qi=Kw();let ve;var vt=C(Qi);let ri=f(()=>!e.showControls&&!ze());fc(vt,{get hidden(){return n(ri)},get disabled(){return n(_r)},get click(){return fn.toggle},get graphIsOpened(){return ze()},get ref(){return pt.interactiveGraphButton},set ref(jt){pt.interactiveGraphButton=jt}}),S(Qi),N(jt=>ve=ie(Qi,1,Id(Ct?"wrapper-middle-left-second":"wrapper-middle-left"),"s-17",ve,jt),[()=>({fullscreen:X(),hidden:!e.showControls&&!ze()})]),b(Bi,Qi)};M(Ir,Bi=>{n(yr)&&Bi(Cs)})}var Ts=P(Ir,2);{var zr=Bi=>{var Qi=qw();let ve;Qi.__click=[zw,xi,e,Ci];var vt=C(Qi);let ri=f(()=>!e.showControls);pc(vt,{get hidden(){return n(ri)},get disabled(){return n(xi)},get click(){return e.seekToInteractive},get ref(){return pt.seekToInteractiveButton},set ref(jt){pt.seekToInteractiveButton=jt}}),S(Qi),N(jt=>ve=ie(Qi,1,"wrapper-middle-right s-17",null,ve,jt),[()=>({fullscreen:X(),hidden:!e.showControls})]),b(Bi,Qi)};M(Ts,Bi=>{Gt&&Bi(zr)})}b(mt,ni)};M(_a,mt=>{at&&!v()&&mt(ba)})}N((mt,ni,Li,$i)=>{Po=ie(fi,1,"overlay-mobile s-17",null,Po,mt),xo=ie(ko,1,"wrapper-top-left s-17",null,xo,ni),Ao=ie(mo,1,"wrapper-top-right s-17",null,Ao,Li),Ur=ie(ro,1,"wrapper-middle s-17",null,Ur,$i)},[()=>({hidden:!n(rs)}),()=>({hidden:!e.showControls,fullscreen:X()}),()=>({hidden:!e.showControls&&!x(),fullscreen:X()}),()=>({hidden:!e.showControls||v()||e.endScreenShown&&e.showNextPrevButtons})]),b(je,At)};M(Nn,je=>{Ie()||je(uo)})}var To=P(Nn,2);{var Bn=je=>{var At=jw(),fi=se(At);let Po;var ko=C(fi);ep(ko,{get muted(){return ee()},click:On,get ref(){return pt.volume},set ref(Uo){pt.volume=Uo}}),S(fi);var xo=P(fi,2);{var mo=Uo=>{var Ni=Yw(),Fn=C(Ni);let zo=f(()=>!n(es));Xl(Fn,{get disabled(){return n(So)},get click(){return Te},isMobile:!0,get isPlaying(){return n(zo)},get ref(){return pt.playButton},set ref(Sr){pt.playButton=Sr}}),S(Ni),b(Uo,Ni)};M(xo,Uo=>{n(es)&&Uo(mo)})}var Ao=P(xo,2);let sr;var ar=C(Ao);vc(ar,{get position(){return ue()},get duration(){return pe()}}),S(Ao),N((Uo,Ni)=>{Po=ie(fi,1,"wrapper-top-right s-17",null,Po,Uo),sr=ie(Ao,1,"wrapper-bottom ads-timeline-mobile s-17",null,sr,Ni)},[()=>({fullscreen:X()}),()=>({fullscreen:X()})]),b(je,At)};M(To,je=>{Ie()&&d()!=="inactive"&&je(Bn)})}var Ri=P(To,2);let nr;var bn=C(Ri);let Nr;var bt=C(bn),ui=C(bt),Ut=C(ui);{var nn=je=>{Do(je,{get disabled(){return n(No)},get ref(){return pt.replayButton},set ref(At){pt.replayButton=At},children:(At,fi)=>{jl(At,{get disabled(){return n(No)},get click(){return gi}})},$$slots:{default:!0}})};M(Ut,je=>{at&&je(nn)})}var $o=P(Ut,2);{var $n=je=>{Do(je,{get ref(){return pt.liveButton},set ref(At){pt.liveButton=At},children:(At,fi)=>{mc(At,{get isLiveActive(){return n(er)},isMobile:!0,get ariaLabel(){return n(or)}})},$$slots:{default:!0}})};M($o,je=>{!Ie()&&q()&&je($n)})}var yo=P($o,2);{var rr=je=>{let At=f(()=>Ie()?ue():Z()),fi=f(()=>Ie()?pe():B()),Po=f(()=>!e.showControls);jd(je,{get showDuration(){return n(Rr)},get position(){return n(At)},get duration(){return n(fi)},isMobile:!0,get isHidden(){return n(Po)},get ref(){return pt.time},set ref(ko){pt.time=ko}})};M(yo,je=>{n(ki)&&je(rr)})}var oo=P(yo,2);let wr=f(()=>!n(Ho));Do(oo,{className:"w-max",get disabled(){return n(wr)},get ref(){return pt.episodes},set ref(je){pt.episodes=je},children:(je,At)=>{var fi=Re(),Po=se(fi);{var ko=xo=>{var mo=Xw(),Ao=P(se(mo),2);ic(Ao,{get position(){return Z()},get duration(){return B()},get timeCodes(){return Vi}}),b(xo,mo)};M(Po,xo=>{n(Ho)&&xo(ko)})}b(je,fi)},$$slots:{default:!0}}),S(ui),tt(ui,je=>Zt.bottomLeft=je,()=>Zt==null?void 0:Zt.bottomLeft);var Io=P(ui,2),yn=C(Io);{var as=je=>{Do(je,{get ref(){return pt.volume},set ref(At){pt.volume=At},children:(At,fi)=>{ep(At,{get muted(){return n(tr)},click:On})},$$slots:{default:!0}})};M(yn,je=>{n(ns)&&je(as)})}var Br=P(yn,2);{var ls=je=>{Do(je,{get ref(){return pt.settings},set ref(At){pt.settings=At},children:(At,fi)=>{zl(At,{get ref$(){return Fo}})},$$slots:{default:!0}})};M(Br,je=>{n(Dn)&&je(ls)})}var no=P(Br,2);{var ds=je=>{Do(je,{get ref(){return pt.fullscreen},set ref(At){pt.fullscreen=At},children:(At,fi)=>{Zd(At,{get click(){return e.toggleFullscreen},get isFullscreen(){return X()}})},$$slots:{default:!0}})};M(no,je=>{n(Dr)&&je(ds)})}S(Io),tt(Io,je=>Zt.bottomRight=je,()=>Zt==null?void 0:Zt.bottomRight),S(bt),tt(bt,je=>me(je),()=>me());var Hr=P(bt,2);let Eo=f(()=>!e.showControls);ja(Hr,{get isHidden(){return n(Eo)},get isAds(){return Ie()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return z()},get ref(){return pt.timeline},set ref(je){pt.timeline=je}}),S(bn),tt(bn,je=>Zt.bottom=je,()=>Zt==null?void 0:Zt.bottom),S(Ri),tt(Ri,je=>fe(je),()=>fe());var Fr=P(Ri,2);{var Hn=je=>{lc(je,{get ref(){return pt.interactiveTimeIndicator},set ref(At){pt.interactiveTimeIndicator=At}})};M(Fr,je=>{bo&&je(Hn)})}N((je,At)=>{nr=ie(Ri,1,"wrapper-bottom mobile s-17",null,nr,je),Ke(Ri,`transform: ${e.showControls?"translateY(0)":"translateY(100%)"}`),Nr=ie(bn,1,"controls-wrapper s-17",null,Nr,At)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:X()})]),b(t,_n),F(),o()}et(["click"]);function gc(t,e){H(e,!0);let[i,o]=Be(),s=()=>w(I,"$isMobile",i),a=g(e,"bottomNoSmooth",3,!1),l=g(e,"playerControlsWrapperRef",15,void 0),d=g(e,"playerControlsRef",15,void 0),r=g(e,"isAds",3,!1),u=g(e,"logoTargetUrl",3,""),m=g(e,"showAutoplayNext",3,!1),p=g(e,"isOneVideoPlaylist",3,!1),v=g(e,"customFullscreenSupported",3,!0),$=g(e,"endScreenShown",3,!1),y=g(e,"onDisabledPlayPrevChapterClick",3,Tb),h=g(e,"onDisabledSeekToInteractiveClick",3,Tb),I=ye().ui.isMobile,T=K(!1);Lt(()=>{let V=setTimeout(()=>O(T,!0),0);return()=>clearTimeout(V)});var D=Re(),k=se(D);{var E=V=>{var q=Re(),L=se(q);{var z=te=>{ev(te,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return r()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get showAutoplayNext(){return 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 h()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(ee){l(ee)},get playerControlsRef(){return d()},set playerControlsRef(ee){d(ee)}})},j=te=>{Ym(te,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return r()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get isOneVideoPlaylist(){return p()},get showAutoplayNext(){return m()},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(ee){l(ee)},get playerControlsRef(){return d()},set playerControlsRef(ee){d(ee)}})};M(L,te=>{s()?te(z):te(j,!1)})}b(V,q)};M(k,V=>{n(T)&&V(E)})}b(t,D),F(),o()}var eS=ke('<path d="M23.75 31.2v-5.45l-11.84 6.7a1.45 1.45 180 01-2.16-1.25v-14.4a1.45 1.45 180 012.16-1.26l11.84 6.7v-5.44a1.45 1.45 180 012.16-1.26l12.7 7.19a1.45 1.45 180 010 2.52l-12.7 7.2a1.45 1.45 180 01-2.16-1.27Z"></path>');function hc(t,e){H(e,!0);let i=f(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=f(()=>`${dn(e.size)}${n(i)}`);Xe(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(o)},get testId(){return e.testId},get shadow(){return e.shadow},children:(s,a)=>{var l=eS();b(s,l)},$$slots:{default:!0}}),F()}var tS=ke('<path d="M32.46 9.53a1.16 1.16 90 010 1.96l-7.66 4.83c-.78.49-1.8-.07-1.8-.98v-3.3a14 14 90 1014.1 18.93 1.5 1.5 90 012.8 1.06 17 17 90 11-16.9-23V5.66c0-.91 1.03-1.47 1.8-.98z"></path>');function tv(t,e){H(e,!0);let i=g(e,"reversed",3,!1),o=f(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),s=f(()=>`seek-icon-${i()?"backward":"forward"}`);Xe(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(s)},get shadow(){return e.shadow},children:(a,l)=>{var d=tS();b(a,d)},$$slots:{default:!0}}),F()}var iS=A('<span class="hot-key-helpers-text s-r"> </span>'),oS=A('<div data-testid="hotkey-helper-icon" class="s-r"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),nS=A("<div><!></div>"),rS={hash:"s-r",code:'.hot-key-helpers-container.s-r{align-items:center;animation:s-r-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-r{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-r{left:calc(75% - 100px)}.hot-key-helpers-text.s-r{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-r{animation:s-r-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-r-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-r-fadeOut{0%{opacity:1}to{opacity:0}}'};function iv(t,e){H(e,!0),Q(t,rS);let[i,o]=Be(),s=()=>w(e.data,"$data",i),a=ye(),{features:l}=Mt(),d=a.ui.t,r=f(()=>!s()),u=f(()=>{var I;return((I=s())==null?void 0:I.type)==="BACKWARD_SEEK"}),m=f(()=>{var I;return((I=s())==null?void 0:I.type)==="FORWARD_SEEK"}),p=f(()=>{var I;return(I=s())==null?void 0:I.type}),v=f(()=>{var I,T;return(I=s())!=null&&I.t?d(s().t.key,{value:s().t.value||""}):(T=s())==null?void 0:T.text});var $=nS();let y;var h=C($);{var x=I=>{var T=oS(),D=se(T),k=C(D);{var E=fe=>{let me=f(()=>n(p)==="BACKWARD_SEEK");tv(fe,{get reversed(){return n(me)},shadow:!0})};M(k,fe=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&fe(E)})}var V=P(k,2);{var q=fe=>{Ks(fe,{get size(){return"48"},shadow:!0})};M(V,fe=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&fe(q)})}var L=P(V,2);{var z=fe=>{Ln(fe,{get size(){return"48"},shadow:!0})};M(L,fe=>{n(p)==="PLAY"&&!l.playbackStatusShow&&fe(z)})}var j=P(L,2);{var te=fe=>{dc(fe,{get size(){return"48"},shadow:!0})};M(j,fe=>{n(p)==="REPLAY"&&!l.playbackStatusShow&&fe(te)})}var ee=P(j,2);{var oe=fe=>{pa(fe,{get size(){return"48"},type:"off",shadow:!0})};M(ee,fe=>{n(p)==="SUBTITLES_OFF"&&fe(oe)})}var ae=P(ee,2);{var le=fe=>{pa(fe,{get size(){return"48"},shadow:!0})};M(ae,fe=>{n(p)==="SUBTITLES_ON"&&fe(le)})}var ce=P(ae,2);{var X=fe=>{let me=f(()=>n(p)==="RATE_DOWN");hc(fe,{get size(){return"48"},get reversed(){return n(me)},testId:"rate-change-icon",shadow:!0})};M(ce,fe=>{["RATE_DOWN","RATE_UP"].includes(n(p))&&fe(X)})}var _e=P(ce,2);{var Ee=fe=>{let me=f(()=>n(p)==="EPISODE_PREV");va(fe,{get size(){return"48"},get reversed(){return n(me)},shadow:!0})};M(_e,fe=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(p))&&fe(Ee)})}var de=P(_e,2);{var ze=fe=>{fa(fe,{get size(){return"48"},volume:0,shadow:!0})};M(de,fe=>{n(p)==="MUTE"&&fe(ze)})}var ue=P(de,2);{var pe=fe=>{fa(fe,{get size(){return"48"},volume:1,shadow:!0})};M(ue,fe=>{n(p)==="VOLUME"&&fe(pe)})}S(D);var Z=P(D,2);{var B=fe=>{var me=iS(),Ie=C(me,!0);S(me),N(()=>ge(Ie,n(v))),b(fe,me)};M(Z,fe=>{n(v)&&fe(B)})}N(()=>De(D,"data-type",n(p))),b(I,T)};M(h,I=>{!n(r)&&n(p)&&I(x)})}S($),N(I=>y=ie($,1,"hot-key-helpers-container s-r",null,y,I),[()=>({hidden:n(r),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(m)})]),b(t,$),F(),o()}var sS=(t,e,i,o,s,a)=>{if(e.has(t.code))switch(t.preventDefault(),t.stopPropagation(),t.code){case"ArrowUp":i();break;case"ArrowDown":o();break;case"ArrowLeft":s();break;case"ArrowRight":a();break}},aS=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},lS=A('<div tabindex="0" role="button"><div class="button-block s-o" aria-hidden="true"><div class="button-row s-o"><div class="button button-up s-o"><!></div> <div class="button button-right s-o"><!></div></div> <div class="button-row s-o"><div class="button button-left s-o"><!></div> <div class="button button-down s-o"><!></div></div></div></div>'),dS={hash:"s-o",code:".immersive-controls.s-o{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-o{left:20px;top:50px}.button-block.s-o{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-o{display:flex;flex-direction:row;position:relative}.button.s-o{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-o svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-o svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-o svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-o svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-o svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-o:hover svg{opacity:1}"};function _c(t,e){H(e,!0),Q(t,dS);let i=g(e,"isShifted",3,!1),o=ye(),s=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},l=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},r=()=>{o.actions.internal.startCameraManualRotation(-1,0)},u=()=>(o.actions.internal.stopCameraManualRotation(),null),m=G("aria_label_spherical_control");var p=lS();let v;p.__keydown=[sS,s,a,l,r,d],p.__keyup=[aS,s,u];var $=C(p),y=C($),h=C(y);h.__mousedown=a,h.__mouseup=u;var x=C(h);Mr(x,{direction:"up",useBtnColor:!0}),S(h);var I=P(h,2);I.__mousedown=d,I.__mouseup=u;var T=C(I);Mr(T,{direction:"up",useBtnColor:!0}),S(I),S(y);var D=P(y,2),k=C(D);k.__mousedown=r,k.__mouseup=u;var E=C(k);Mr(E,{direction:"up",useBtnColor:!0}),S(k);var V=P(k,2);V.__mousedown=l,V.__mouseup=u;var q=C(V);Mr(q,{direction:"up",useBtnColor:!0}),S(V),S(D),S($),S(p),N(L=>{v=ie(p,1,"immersive-controls s-o",null,v,L),De(p,"aria-label",m)},[()=>({"m-shifted":i()})]),ht("mouseleave",h,u),ht("mouseleave",I,u),ht("mouseleave",k,u),ht("mouseleave",V,u),b(t,p),F()}et(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as Eb,Subscription as cS,filterChanged as uS,filter as pS}from"@vkontakte/videoplayer-shared/es2015";var Ib=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var tp=class{constructor(){this.flickeringTimeout=Ib(1e3);this.subscriptions=new cS;this.isAuto=!1;this.isLive=!1;this.captions$=new Eb([]);this.captionsPrepared$=new Eb([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(pS(()=>this.isEnabled()),uS()).subscribe(e=>{this.processCaptions(e)})),this}setIsAuto(e){this.isAuto=e}setIsLive(e){this.isLive=e}setCaptions(e){this.captions$.next(e)}destroy(){this.subscriptions.unsubscribe(),this.flickeringTimeout.clear()}isEnabled(){return this.isAuto&&!this.isLive}processCaptions(e){if(!e.length){this.flickeringTimeout.add(()=>{this.captionsPrepared$.next([])});return}this.flickeringTimeout.clear();let i=[],o=e.length>1&&e[0].type!=="timestamp"&&e[1].type!=="timestamp";o&&i.push([{value:String(e[0].value),timeAppeared:null}]),i.push(e.reduce((s,{type:a,value:l},d)=>(o&&!d||(a==="timestamp"?s.push({timeAppeared:Number(l),value:""}):s.length===0?s.push({value:String(l)}):s[s.length-1].value=String(l)),s),[])),this.captionsPrepared$.next(i)}};var fS=A('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),mS=A('<span class="caption-line s-a"><span class="caption-segment s-a"></span></span>'),vS=A('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),gS=A('<div><span class="caption s-a"><!></span></div>'),hS=A("<div><!></div>"),_S={hash:"s-a",code:".subtitles-container.s-a{height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:transform var(--controls-transition-duration);width:100%}.subtitles-container.shifted.s-a{transform:translateY(calc(var(--controls-height)*-1))}.subtitles-container.preview-track-active.s-a{transform:translateY(calc(var(--preview-track-height)*-1))}.preview-track-active.s-a .subtitles-caption:where(.s-a){bottom:var(--preview-track-controls-top-offset)}.subtitles-caption.s-a{bottom:4%;display:flex;justify-content:center;left:4%;position:absolute;right:4%}.subtitles-caption.mobile.s-a{bottom:8%}.subtitles-container.auto.s-a .subtitles-caption:where(.s-a){left:var(--subtitles-caption-margin);right:var(--subtitles-caption-margin)}.caption.s-a{background:rgba(0,0,0,.4);border-radius:4px;display:block;overflow-wrap:normal;padding:4px 8px}.subtitles-container.auto.s-a .caption:where(.s-a){width:100%}.caption-line.s-a{display:block;text-align:center}.subtitles-container.auto.s-a .caption-line:where(.s-a){text-align:left}.caption-segment.s-a{color:var(--white);display:inline-block;font-size:13px;line-height:1.2;white-space:pre-wrap}"};function Za(t,e){H(e,!0),Q(t,_S);let[i,o]=Be(),s=()=>w(v,"$currentSubtitle$",i),a=()=>w(y,"$isLive$",i),l=()=>w(h,"$isFullscreen",i),d=()=>w(x,"$previewTrackActive",i),r=()=>w($,"$isAutoSubtitleCaptionVisible$",i),u=g(e,"isMobile",3,!1),m=ye(),p=Mt(),v=m.state.currentSubtitle$,$=m.state.isAutoSubtitleCaptionVisible$,y=m.state.isLive$,h=m.ui.isFullscreen,x=m.ui.previewTrackActive,I=f(()=>!!s().isAuto),T=f(()=>!!a()),D=f(()=>e.playerSize.width*.02),k=f(()=>u()&&!l()||n(D)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(D)),E=K(null);Fe(()=>{var ee,oe,ae;(ee=n(E))==null||ee.setIsAuto(n(I)),(oe=n(E))==null||oe.setIsLive(n(T)),(ae=n(E))==null||ae.setCaptions(e.captions)});let V=K(si([[]]));Lt(()=>{O(E,new tp().subscribe(),!0);let ee=n(E).captionsPrepared$.subscribe(oe=>{O(V,oe,!0)});return()=>{var oe;(oe=n(E))==null||oe.destroy(),ee.unsubscribe()}}),Lt(()=>{if(n(I)){let ee=window.setTimeout(()=>{$.set(!1)},p.autoSubtitlesTimeout);return()=>{window.clearTimeout(ee)}}else $.set(!1)});let q=f(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var L=hS();let z;var j=C(L);{var te=ee=>{var oe=gS();let ae;var le=C(oe),ce=C(le);{var X=Ee=>{var de=fS(),ze=C(de),ue=C(ze,!0);S(ze),S(de),N(pe=>{var Z;Ke(ze,`font-size: ${(Z=n(k))!=null?Z:""}px`),ge(ue,pe)},[()=>G("subtitles_auto_caption")]),b(Ee,de)},_e=(Ee,de)=>{{var ze=pe=>{var Z=Re(),B=se(Z);wi(B,17,()=>n(V),Cd,(fe,me)=>{var Ie=mS(),ot=C(Ie);wi(ot,21,()=>n(me),({value:Me,timeAppeared:be})=>be,(Me,be)=>{let W=()=>n(be).value,Ce=()=>n(be).timeAppeared;var Ae=Re(),Qe=se(Ae);{var Te=we=>{var He=gs();N(()=>ge(He,W())),b(we,He)};M(Qe,we=>{(!Ce()||Ce()<=e.position)&&we(Te)})}b(Me,Ae)}),S(ot),S(Ie),N(()=>{var Me;return Ke(ot,`font-size: ${(Me=n(k))!=null?Me:""}px`)}),b(fe,Ie)}),b(pe,Z)},ue=pe=>{var Z=Re(),B=se(Z);wi(B,17,()=>e.captions,({value:fe})=>fe,(fe,me)=>{let Ie=()=>n(me).value;var ot=vS(),Me=C(ot),be=C(Me,!0);S(Me),S(ot),N(()=>{var W;Ke(Me,`font-size: ${(W=n(k))!=null?W:""}px`),ge(be,Ie())}),b(fe,ot)}),b(pe,Z)};M(Ee,pe=>{var Z;n(I)&&((Z=n(V))!=null&&Z.length)?pe(ze):pe(ue,!1)},de)}};M(ce,Ee=>{n(I)&&r()?Ee(X):Ee(_e,!1)})}S(le),S(oe),N(Ee=>{var de;ae=ie(oe,1,"subtitles-caption s-a",null,ae,Ee),Ke(oe,`--subtitles-caption-margin: ${(de=n(q))!=null?de:""}%`)},[()=>({mobile:u()})]),b(ee,oe)};M(j,ee=>{var oe;(e.captions.length||(oe=n(V))!=null&&oe.length)&&ee(te)})}S(L),N(ee=>z=ie(L,1,"subtitles-container s-a",null,z,ee),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(I)&&!n(T)&&!r()})]),b(t,L),F(),o()}import{ChromecastState as bS}from"@vkontakte/videoplayer-core/es2015";var $S=A('<div class="text s-10"> </div>'),yS=A('<div><div class="icon_wrapper s-10"><!></div> <!></div>'),xS={hash:"s-10",code:".wrapper.s-10{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-10{background-size:cover}.icon_wrapper.s-10{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-10{margin-top:20px}"};function bc(t,e){H(e,!0),Q(t,xS);let i=g(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Mt();var s=yS();let a;s.__contextmenu=function(...m){var p;(p=e.onContextMenu)==null||p.apply(this,m)},s.__click=function(...m){var p;(p=e.onClick)==null||p.apply(this,m)},s.__dblclick=function(...m){var p;(p=e.onDblClick)==null||p.apply(this,m)};var l=C(s),d=C(l);ec(d,{get size(){return"48"},get iconState(){return bS.CONNECTED}}),S(l);var r=P(l,2);{var u=m=>{var p=$S(),v=C(p);S(p),N(()=>{var $;return ge(v,`Видео воспроизводится на ${($=i())!=null?$:""}`)}),b(m,p)};M(r,m=>{i()&&m(u)})}S(s),N(m=>{a=ie(s,1,"wrapper s-10",null,a,m),Ke(s,`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e.thumbUrl||""}')`)},[()=>({bgCover:o.features.previewNoEmptySpace})]),b(t,s),F()}et(["contextmenu","click","dblclick"]);var wS=ke('<path d="M460 194a4 4 0 0 1 4-4h122a4 4 0 0 1 4 4v82a4 4 0 0 1-4 4H464a4 4 0 0 1-4-4zm6 3a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm112-72a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm-71-37a6 6 0 1 0 0-12 6 6 0 0 0 0 12m36 0a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-18.05 15c6.05 0 11.62 4.45 11.94 4.65 2.11 1.35 3.26.77 3.96.16s1.15-2.81-1.04-4.66c-1.74-1.48-5.8-5.16-14.86-5.15s-12.95 3.5-14.8 5.18c-1.83 1.69-2.28 3.5-.96 4.66s2.31 1.16 4.35-.33c0 .01 5.36-4.51 11.41-4.51"></path>');function ov(t){Xe(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=wS();b(e,o)},$$slots:{default:!0}})}var SS=A('<div class="container s-5"><!></div>'),CS={hash:"s-5",code:".container.s-5{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function Ja(t){Q(t,CS);var e=SS(),i=C(e);ov(i,{}),S(e),b(t,e)}var TS=A('<div class="playButton s-b" tabindex="0" role="button"><div class="playButtonBackground s-b"></div> <!></div>'),IS=A('<div data-testid="unstarted-thumb"><!></div>'),ES={hash:"s-b",code:".container.s-b{background-position:50%;background-repeat:no-repeat;background-size:contain;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:opacity .2s,visibility .2s;will-change:opacity}.container.hidden.s-b{opacity:0;visibility:hidden}.container.bgCover.s-b{background-size:cover}.playButton.s-b{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-b,.playButtonBackground.s-b{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-b{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);transition:background .2s,transform .2s;transition-timing-function:ease-out;will-change:background,transform}.container.s-b:hover .playButtonBackground:where(.s-b){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-b svg{position:relative}"};function el(t,e){H(e,!0),Q(t,ES);let i=g(e,"iconVisible",3,!0),o=ye(),s=Mt(),a=o.ui.startedByKeyboard$,l=G("tooltip_play"),d=$=>{var h;let y=$.code;["Enter","Space"].includes(y)&&($.stopPropagation(),$.preventDefault(),a.set(!0),(h=e.startVideo)==null||h.call(e))},r=$=>{var y,h;$.stopPropagation(),(y=e.startVideo)==null||y.call(e),(h=e.onClick)==null||h.call(e,$)};var u=IS();let m;u.__click=r,u.__contextmenu=function(...$){var y;(y=e.onContextMenu)==null||y.apply(this,$)};var p=C(u);{var v=$=>{var y=TS();y.__keydown=d;var h=P(C(y),2);Ln(h,{get size(){return"48"}}),S(y),N(()=>De(y,"aria-label",l)),b($,y)};M(p,$=>{i()&&$(v)})}return S(u),N($=>{m=ie(u,1,"container s-b",null,m,$),Ke(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:s.features.previewNoEmptySpace})]),b(t,u),F({handlePressKey:d,handleClick:r})}et(["click","contextmenu","keydown"]);var PS=A('<span class="text s-q"> </span>'),kS=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},AS=A('<a target="_blank" class="link s-q"><!></a>'),LS=(t,e)=>e.onTitleClicked(),MS=A("<button><!></button>"),VS=A('<div data-testid="video_title"><!></div>'),RS={hash:"s-q",code:".title.s-q{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-q,.title.s-q{color:var(--white)}.link.s-q{pointer-events:auto;text-decoration:none}.link.s-q:hover{text-decoration:underline}.text.s-q{pointer-events:auto}.size-sm.s-q{font-size:14px;font-weight:500;line-height:18px}.hidden.s-q{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function nv(t,e){H(e,!0),Q(t,RS);let i=$=>{var y=PS(),h=C(y,!0);S(y),tt(y,x=>l(x),()=>l()),N(()=>ge(h,o())),ht("mouseenter",y,function(...x){var I;(I=e.onMouseEnter)==null||I.apply(this,x)}),ht("mouseleave",y,function(...x){var I;(I=e.onMouseLeave)==null||I.apply(this,x)}),b($,y)},o=g(e,"title",3,""),s=g(e,"isHidden",3,!1),a=g(e,"size",3,"md"),l=g(e,"ref",15),d=K(void 0);Lt(()=>{var y;requestAnimationFrame(()=>{var h;(h=e.onVisibilityChanged)==null||h.call(e,!0)});function $(h){var x;h.propertyName==="transform"&&((x=e.onVisibilityChanged)==null||x.call(e,!s()))}return(y=n(d))==null||y.addEventListener("transitionend",$),()=>{var h;return(h=n(d))==null?void 0:h.removeEventListener("transitionend",$)}});var r=VS();let u;var m=C(r);{var p=$=>{var y=AS();y.__click=[kS,e];var h=C(y);i(h),S(y),N(()=>De(y,"href",e.titleLinkHref)),b($,y)},v=($,y)=>{{var h=I=>{var T=MS();T.__click=[LS,e];var D=C(T);i(D),S(T),b(I,T)},x=I=>{i(I)};M($,I=>{e.onTitleClicked?I(h):I(x,!1)},y)}};M(m,$=>{e.titleLinkHref?$(p):$(v,!1)})}S(r),tt(r,$=>O(d,$),()=>n(d)),N($=>u=ie(r,1,`title size-${a()}`,"s-q",u,$),[()=>({hidden:s()})]),b(t,r),F()}et(["click"]);import{throttleFn as US}from"@vkontakte/videoplayer-shared/es2015";var DS=A('<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),OS=A('<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),NS=A('<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=A('<div class="timer__cell cell s-1a"><span class="cell__value s-1a"> </span> <span class="cell__unit s-1a"> </span></div>'),HS=A("<div><!> <!> <!> <!></div>"),FS={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 rv(t,e){H(e,!0),Q(t,FS);let i=K(""),o=K(""),s=K(""),a=K(""),l,d=32,r=d/2,u=L=>String(L).padStart(2,"0"),m=L=>Math.max(L.length,1),p=L=>`${(e.isSmallSize?r:d)*m(L)}px`,v=L=>{let z=Math.floor(L/86400);z&&(L-=z*86400,O(i,u(z),!0));let j=Math.floor(L/3600);O(o,u(j),!0);let te=Math.floor(L/60)%60;O(s,u(te),!0);let ee=L%60;O(a,u(ee),!0)},$=()=>{let L=Math.floor(Date.now()/1e3),z=e.startTime-L;v(z),z>=1?l=requestAnimationFrame($):e.onTimerOver()};Lt(()=>{l=requestAnimationFrame($)}),ln(()=>{cancelAnimationFrame(l)});var y=HS();let h;var x=C(y);{var I=L=>{var z=DS(),j=se(z);let te;var ee=C(j),oe=C(ee,!0);S(ee);var ae=P(ee,2),le=C(ae,!0);S(ae),S(j);var ce=P(j,2),X=C(ce,!0);S(ce),N((_e,Ee,de)=>{te=Ke(j,"",te,{width:_e}),ge(oe,n(i)),ge(le,Ee),ge(X,de)},[()=>p(n(i)),()=>G("waiting_live_day_value"),()=>G("waiting_live_colon")]),b(L,z)};M(x,L=>{n(i)&&L(I)})}var T=P(x,2);{var D=L=>{var z=OS(),j=se(z);let te;var ee=C(j),oe=C(ee,!0);S(ee);var ae=P(ee,2),le=C(ae,!0);S(ae),S(j);var ce=P(j,2),X=C(ce,!0);S(ce),N((_e,Ee,de)=>{te=Ke(j,"",te,{width:_e}),ge(oe,n(o)),ge(le,Ee),ge(X,de)},[()=>p(n(o)),()=>G("waiting_live_hour_value"),()=>G("waiting_live_colon")]),b(L,z)};M(T,L=>{n(o)&&L(D)})}var k=P(T,2);{var E=L=>{var z=NS(),j=se(z);let te;var ee=C(j),oe=C(ee,!0);S(ee);var ae=P(ee,2),le=C(ae,!0);S(ae),S(j);var ce=P(j,2),X=C(ce,!0);S(ce),N((_e,Ee,de)=>{te=Ke(j,"",te,{width:_e}),ge(oe,n(s)),ge(le,Ee),ge(X,de)},[()=>p(n(s)),()=>G("waiting_live_minute_value"),()=>G("waiting_live_colon")]),b(L,z)};M(k,L=>{n(s)&&L(E)})}var V=P(k,2);{var q=L=>{var z=BS();let j;var te=C(z),ee=C(te,!0);S(te);var oe=P(te,2),ae=C(oe,!0);S(oe),S(z),N((le,ce)=>{j=Ke(z,"",j,{width:le}),ge(ee,n(a)),ge(ae,ce)},[()=>p(n(a)),()=>G("waiting_live_second_value")]),b(L,z)};M(V,L=>{n(a)&&L(q)})}S(y),N(L=>h=ie(y,1,"timer__container s-1a",null,h,L),[()=>({small:e.isSmallSize})]),b(t,y),F()}var zS=A('<div class="waiting s-u"><span> </span></div>'),WS=A('<div class="upcoming-timer timer s-u"><span> </span> <!></div>'),KS=A('<div class="waiting-container s-u"><!></div>'),qS={hash:"s-u",code:'.waiting-container.s-u{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.waiting-container.s-u,.waiting-container.s-u:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-u:before{backdrop-filter:blur(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-u{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-u{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-u{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-u{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-u{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-u{font-size:15px}.medium.s-u{font-size:17px}'};function $c(t,e){H(e,!0),Q(t,qS);let i=g(e,"startTime",3,0),o=f(()=>i()<Math.floor(Date.now()/1e3)),s=K(void 0),a=K(void 0),l=0,d=K(void 0),r=K(void 0),u=f(()=>{var x,I;return((x=n(d))!=null?x:1/0)<=509||((I=n(r))!=null?I:1/0)<=320}),m=f(()=>{var x,I;return!n(u)&&(((x=n(d))!=null?x:1/0)<=699||((I=n(r))!=null?I:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?US(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let x={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"},I=n(o)?n(s):n(a);e.onUpcomingLiveViewStateChanged(x,I)})},300):void 0;Fe(()=>{n(r),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=KS();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=zS(),T=C(I);let D;var k=C(T,!0);S(T),S(I),tt(I,E=>O(s,E),()=>n(s)),N((E,V)=>{D=ie(T,1,"waiting__title s-u",null,D,E),ge(k,V)},[()=>({medium:n(m),small:n(u)}),()=>G("waiting_live_upcoming_title")]),b(x,I)},h=x=>{var I=WS(),T=C(I);let D;var k=C(T,!0);S(T);var E=P(T,2);let V=f(()=>n(u)||n(m)),q=f(()=>i()||0);rv(E,{get isSmallSize(){return n(V)},get startTime(){return n(q)},onTimerOver:()=>O(o,!0)}),S(I),tt(I,L=>O(a,L),()=>n(a)),N((L,z)=>{D=ie(T,1,"timer__title s-u",null,D,L),ge(k,z)},[()=>({medium:n(m),small:n(u)}),()=>G("waiting_live_timer_title")]),b(x,I)};M($,x=>{n(o)?x(y):x(h,!1)})}S(v),N(()=>Ke(v,`background-image: url(${e.thumbUrl})`)),kn(v,"clientWidth",x=>O(d,x)),kn(v,"clientHeight",x=>O(r,x)),b(t,v),F()}et(["contextmenu","click"]);var QS=A('<div class="waiting-container s-t"><div class="waiting-caption s-t"><!> <p class="waiting-title s-t"> </p></div></div>'),GS={hash:"s-t",code:'.waiting-container.s-t{align-items:center;background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;justify-content:center}.waiting-container.s-t,.waiting-container.s-t:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-t:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-t{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-t{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function tl(t,e){H(e,!0),Q(t,GS);let i=g(e,"thumbUrl",3,""),o={recover:G("waiting_live_recover_title"),record:G("waiting_record_title")},s=f(()=>o[e.kind]||"");var a=QS();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);za(d,{style:"position: static; transform: translate(0, 0)"});var r=P(d,2),u=C(r,!0);S(r),S(l),S(a),N(()=>{Ke(a,`background-image: url('${i()}')`),ge(u,n(s))}),b(t,a),F()}et(["contextmenu","click"]);var YS=ke('<path d="M6 10.2 3.5 7.7a.99.99 0 0 0-1.4 1.4l3.2 3.2a1 1 0 0 0 1.4 0l7.6-7.6a.99.99 0 0 0-1.4-1.4z"></path>');function sv(t){Xe(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=YS();b(e,o)},$$slots:{default:!0}})}var jS=A('<div class="select-icon s-1w"><!></div>'),XS={hash:"s-1w",code:".select-icon.s-1w{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function yc(t){Q(t,XS);var e=jS(),i=C(e);sv(i,{}),S(e),b(t,e)}var ZS=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},JS=(t,e)=>{Hl(t,()=>e.item.selectItem(e.item.value))},eC=A("<p> </p>"),tC=A('<p class="sublabel s-1t"> </p>'),iC=A('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),oC={hash:"s-1t",code:".menu-item-value.s-1t{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1t{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1t,.sublabel.s-1t{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1t{opacity:.5}"};function av(t,e){H(e,!0),Q(t,oC);let i=g(e,"isMobile",3,!1);var o=iC();let s;o.__click=[ZS,e],o.__keydown=[JS,e];var a=C(o);{var l=y=>{yc(y,{})};M(a,y=>{e.item.selected&&y(l)})}var d=P(a,2);let r;var u=C(d);{var m=y=>{var h=Re(),x=se(h);zi(x,()=>e.item.valueComponent,(I,T)=>{T(I,Xr(()=>{var D;return(D=e.item.valueComponentParams)!=null?D:{}}))}),b(y,h)},p=y=>{var h=eC();let x;var I=C(h,!0);S(h),N(T=>{var D;x=ie(h,1,"label s-1t",null,x,T),ge(I,(D=e.item.label)!=null?D:e.item.value)},[()=>({mobile:i()})]),b(y,h)};M(u,y=>{e.item.valueComponent?y(m):y(p,!1)})}var v=P(u,2);{var $=y=>{var h=tC(),x=C(h,!0);S(h),N(()=>ge(x,e.item.sublabel)),b(y,h)};M(v,y=>{e.item.sublabel&&y($)})}S(d),S(o),N((y,h,x)=>{var I;s=ie(o,1,"item",null,s,y),De(o,"data-value",(I=e.item.dataValue)!=null?I:e.item.value),De(o,"aria-label",h),De(o,"data-testid",e.item.dataTestid),r=ie(d,1,"menu-item-value s-1t",null,r,x),De(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var y,h;return(h=(y=e.item.ariaLabel)!=null?y:e.item.label)!=null?h:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),b(t,o),F()}et(["click","keydown"]);var nC=A('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function lv(t,e){H(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"refMenuItems",15),s=f(()=>()=>e.openSubMenuList(e.item.children)),a=f(()=>h=>Lu(h,n(s)));var l=nC();let d;l.__click=function(...h){var x;(x=n(s))==null||x.apply(this,h)},l.__keydown=function(...h){var x;(x=n(a))==null||x.apply(this,h)};var r=C(l);{var u=h=>{yc(h,{})};M(r,h=>{e.item.selected&&h(u)})}var m=P(r,2);let p;var v=C(m);{var $=h=>{var x=Re();let I=f(()=>e.item.valueComponent);var T=se(x);zi(T,()=>n(I),(D,k)=>{k(D,Xr(()=>{var E;return(E=e.item.valueComponentParams)!=null?E:{}}))}),b(h,x)},y=h=>{var x=gs();N(()=>ge(x,e.item.label)),b(h,x)};M(v,h=>{e.item.valueComponent?h($):h(y,!1)})}S(m),S(l),tt(l,h=>o(o()[e.item.id]=h,!0),()=>{var h;return(h=o())==null?void 0:h[e.item.id]}),N((h,x)=>{var I;d=ie(l,1,"item",null,d,h),De(l,"aria-label",(I=e.item.ariaLabel)!=null?I:e.item.label),De(l,"data-testid",e.item.id),p=ie(m,1,"menu-item-value",null,p,x)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),b(t,l),F()}et(["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 sC=(t,e)=>{N_(t,e.returnFromSubMenu,e.closeSettingsMenu)},aC=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},lC=(t,e)=>{Ud(t)&&(Vr(t),e.returnFromSubMenu())},dC=A('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1l"> </p></li> <!></ul></div>'),cC={hash:"s-1l",code:".sub-menu.s-1l{--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-1l .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1l{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1l{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1l .items:where(.s-1l) .item.header:where(.s-1l){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-1l .title:where(.s-1l){margin-left:8px}.sub-menu.s-1l .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1l .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1l .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1l .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1l .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1l .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1l .item .sublabel{font-size:12px;line-height:14px}.item.s-1l:not(.mobile) p:where(.s-1l),.sub-menu.s-1l .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function cv(t,e){H(e,!0),Q(t,cC);let[i,o]=Be(),s=()=>w(p,"$isFullscreen",i),a=()=>w(v,"$playerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"playerControlsHeight",3,0),r=g(e,"ariaLabelReturnFromSubMenu",19,()=>G("aria_label_submenu_back")),u=g(e,"listRef",15);Lt(()=>{let ee=e.items.findIndex(oe=>oe.selected);u().children[ee+1].focus()});let m=ye(),p=m.ui.isFullscreen,v=m.ui.playerSize,$=K(void 0),y=K(0),h=K(0),x=f(()=>l()&&s()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n(h)-d()}px; overflow: auto;`),I=f(()=>Math.max(e.minWidth,n(y)));var T=dC();let D;var k=C(T);let E;k.__keydown=[sC,e];var V=C(k);let q;V.__click=[aC,e],V.__keydown=[lC,e];var L=C(V);Mr(L,{direction:"left"});var z=P(L,2),j=C(z,!0);S(z),S(V),tt(V,ee=>O($,ee),()=>n($));var te=P(V,2);wi(te,17,()=>e.items,Cd,(ee,oe)=>{var ae=Re(),le=se(ae);{var ce=_e=>{av(_e,{get item(){return n(oe)},get isMobile(){return l()}})},X=(_e,Ee)=>{{var de=ze=>{lv(ze,{get isMobile(){return l()},get item(){return n(oe)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};M(_e,ze=>{n(oe).type==="OPEN_SUB_MENU"&&ze(de)},Ee)}};M(le,_e=>{n(oe).type==="SELECT_VALUE"?_e(ce):_e(X,!1)})}b(ee,ae)}),S(k),tt(k,ee=>u(ee),()=>u()),S(T),N((ee,oe,ae)=>{D=ie(T,1,"sub-menu menu s-1l",null,D,ee),De(T,"data-testid",`${e.id}-sub-menu`),Ke(T,`min-width: ${n(I)}px`),E=ie(k,1,"items s-1l",null,E,oe),Ke(k,n(x)),q=ie(V,1,"item header back s-1l",null,q,ae),De(V,"aria-label",r()),ge(j,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),kn(V,"clientWidth",ee=>O(y,ee)),kn(V,"clientHeight",ee=>O(h,ee)),b(t,T),F(),o()}et(["keydown","click"]);import{noop as uC}from"@vkontakte/videoplayer-shared/es2015";var pC=(t,e)=>Lu(t,e()),fC=(t,e)=>{t.stopPropagation(),e()()},mC=A('<div class="value s-1n"> </div>'),vC=A('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),gC={hash:"s-1n",code:".value.s-1n{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function uv(t,e){H(e,!0),Q(t,gC);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,uC),s=g(e,"valueComponent",3,void 0),a=g(e,"iconProps",19,()=>({})),l=g(e,"ref",15);var d=vC();let r;d.__click=[fC,o],d.__keydown=[pC,o];var u=C(d),m=C(u);{var p=T=>{Ya(T,{get icon(){return e.icon}})},v=T=>{var D=Re();let k=f(()=>e.icon);var E=se(D);zi(E,()=>n(k),(V,q)=>{q(V,Xr(a))}),b(T,D)};M(m,T=>{typeof e.icon=="string"?T(p):T(v,!1)})}S(u);var $=P(u,2),y=C($,!0);S($);var h=P($,2);{var x=T=>{var D=Re();let k=f(s);var E=se(D);zi(E,()=>n(k),(V,q)=>{q(V,{})}),b(T,D)},I=T=>{var D=mC(),k=C(D,!0);S(D),N(()=>ge(k,e.value)),b(T,D)};M(h,T=>{s()?T(x):T(I,!1)})}S(d),tt(d,T=>l(T),()=>l()),N(T=>{r=ie(d,1,"item",null,r,T),De(d,"aria-label",e.ariaLabel),De(d,"data-testid",e.id),ge(y,e.label)},[()=>({mobile:i()})]),b(t,d),F()}et(["click","keydown"]);import{noop as kb}from"@vkontakte/videoplayer-shared/es2015";var hC=(t,e)=>{Hl(t,()=>e())},_C=A('<div class="icon icon-error-stub"><div class="inner"></div></div>'),bC=A('<img class="icon" aria-hidden="true"/>'),$C=A('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1m"> </div></li>'),yC={hash:"s-1m",code:".label.s-1m{overflow:hidden;text-overflow:ellipsis}"};function pv(t,e){H(e,!0),Q(t,yC);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,kb),s=g(e,"closeSettings",3,kb),a=K(!1),l=()=>{O(a,!0)},d=x=>{x==null||x.stopPropagation(),o()(),s()()};var r=$C();let u;r.__click=d,r.__keydown=[hC,d];var m=C(r),p=C(m);{var v=x=>{var I=Re(),T=se(I);{var D=E=>{var V=_C();b(E,V)},k=E=>{var V=bC();N(()=>De(V,"src",e.icon)),ht("error",V,l),Ra(V),b(E,V)};M(T,E=>{n(a)?E(D):E(k,!1)})}b(x,I)},$=x=>{var I=Re();let T=f(()=>e.icon);var D=se(I);zi(D,()=>n(T),(k,E)=>{E(k,{})}),b(x,I)};M(p,x=>{typeof e.icon=="string"?x(v):x($,!1)})}S(m);var y=P(m,2),h=C(y,!0);S(y),S(r),N(x=>{var I;u=ie(r,1,"item",null,u,x),De(r,"aria-label",(I=e.ariaLabel)!=null?I:e.label),De(r,"data-testid",e.id),ge(h,e.label)},[()=>({mobile:i()})]),b(t,r),F()}et(["click","keydown"]);import{noop as SC}from"@vkontakte/videoplayer-shared/es2015";var xC=A('<div class="toggle_wrap s-1q"><div></div> <div class="toggle-label s-1q"></div></div>'),wC={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 fv(t,e){Q(t,wC);let i=g(e,"enabled",3,!1);var o=xC(),s=C(o);let a;Xt(2),S(o),N(l=>a=ie(s,1,"toggle s-1q",null,a,l),[()=>({on:i()})]),b(t,o)}var CC=(t,e,i)=>{B_(t,e(),o=>i()(o))},TC=(t,e,i)=>{t.stopPropagation(),e()(!i())},IC=A('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),EC=A('<li role="menuitem" tabindex="0"><!></li>');function mv(t,e){H(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,SC),s=g(e,"enabled",3,!1),a=g(e,"tooltipText",3,void 0),l=g(e,"maxTooltipWidth",3,void 0);var d=EC();let r;d.__click=[TC,o,s],d.__keydown=[CC,s,o];var u=C(d);Wa(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(m,p)=>{var v=IC();let $;var y=C(v),h=C(y);{var x=E=>{Ya(E,{get icon(){return e.icon}})},I=E=>{var V=Re();let q=f(()=>e.icon);var L=se(V);zi(L,()=>n(q),(z,j)=>{j(z,{})}),b(E,V)};M(h,E=>{typeof e.icon=="string"?E(x):E(I,!1)})}S(y);var T=P(y,2),D=C(T,!0);S(T);var k=P(T,2);fv(k,{get enabled(){return s()}}),S(v),N(E=>{$=ie(v,1,"switch-wrapper",null,$,E),ge(D,e.label)},[()=>({mobile:i()})]),b(m,v)},$$slots:{default:!0}}),S(d),N(m=>{var p;r=ie(d,1,"item switch-item",null,r,m),De(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),De(d,"data-testid",e.id)},[()=>({mobile:i()})]),b(t,d),F()}et(["click","keydown"]);import{isValidURL as JC,VideoQuality as Fb}from"@vkontakte/videoplayer-shared/es2015";var Ab=()=>{let t=K(si([])),e=f(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{O(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{O(t,[],!0)}}};import{getVideoQualityLabel as PC}from"@vkontakte/videoplayer-shared/es2015";var kC=A('<div class="quality-icon s-1p"><!></div>'),AC=A('<div class="quality-label s-1p"><span> </span> <!></div>'),LC={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 il(t,e){H(e,!0),Q(t,LC);let i=g(e,"isSubCase",3,!1),o=f(()=>e.quality?PC(e.quality):""),s=f(()=>Nu(e.quality));var a=AC(),l=C(a);let d;var r=C(l,!0);S(l);var u=P(l,2);{var m=p=>{var v=kC();let $=f(()=>n(s));var y=C(v);zi(y,()=>n($),(h,x)=>{x(h,{})}),S(v),N(()=>De(v,"data-testid",`${n(o)}-icon`)),b(p,v)};M(u,p=>{n(s)&&!e.isMobile&&p(m)})}S(a),N(p=>{d=ie(l,1,"s-1p",null,d,p),ge(r,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),b(t,a),F()}import{VideoQuality as MC}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as Lb}from"@vkontakte/videoplayer-core/es2015";var Mb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},Vb=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=Mb({quality:t,availableQualities:e});return i?t===Lb.INVARIANT?G("auto_quality_invariant"):G("auto_quality",{actual:o}):o},Rb=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===Lb.INVARIANT?i:`${i}${Mb({quality:t,availableQualities:e})}`:"...";var VC=A('<div class="menu-item-value-wrapper s-1s"><!></div>'),RC={hash:"s-1s",code:".menu-item-value-wrapper.s-1s{line-height:normal}"};function Zl(t,e){H(e,!0),Q(t,RC);let[i,o]=Be(),s=()=>w(r,"$currentQuality$",i),a=()=>w(u,"$availableQualities$",i),l=()=>w(m,"$isMobile$",i),d=ye(),r=d.state.currentQuality$,u=d.state.availableQualities$,m=d.ui.isMobile,p=" · ",v=f(()=>e.prefix+(e.selected&&s()!==MC.INVARIANT?p:"")),$=f(()=>Rb({prefix:n(v),quality:s(),availableQualities:a(),onlyPrefix:!e.selected}));var y=VC(),h=C(y);let x=f(()=>e.selected?s():void 0);il(h,{get quality(){return n(x)},get label(){return n($)},get isMobile(){return l()},isSubCase:!0}),S(y),b(t,y),F(),o()}var DC=t=>{let e=t.join("|"),i="<(?<keyhtml>.*?)(?<propshtml> .*?)?>(?<childrenhtml>.*?)</\\k<keyhtml>>",o=`{(?<keyi18n>${e})}(?<childreni18n>.*?){/\\k<keyi18n>}`,s="<(?<keyhtmlself>.*?)(?<propshtmlself> .*?)?/?>",a=`{(?<keyi18nself>${e})}`;return new RegExp(`${i}|${o}|${s}|${a}`,"g")},OC={br:!0,span:!0},vv=(t,e={})=>{var d,r,u,m,p,v,$;if(!t)return t;let i=Ge(Ge({},OC),e),o=Object.keys(i);if(!o.length)return t;let s=DC(o),a=[],l=0;for(let y of t.matchAll(s)){let h=y[0],x=((d=y.groups)==null?void 0:d.keyhtml)||((r=y.groups)==null?void 0:r.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+h.length;continue}let T=(p=y.groups)!=null&&p.childrenhtml?vv(y.groups.childrenhtml,i):"",D=(v=y.groups)!=null&&v.childrenhtml?h.replace(new RegExp(($=y.groups)==null?void 0:$.childrenhtml),()=>T||""):h;a.push(t.slice(l,I),D),l=I+h.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function xc(t,e){H(e,!1);let i=g(e,"message",8),o=vv(i());en();var s=Re(),a=se(s);{var l=d=>{var r=Re(),u=se(r);Td(u,()=>o),b(d,r)};M(a,d=>{o&&d(l)})}b(t,s),F()}var NC=A('<p class="quality-applies sublabel s-1r"><!></p>'),BC={hash:"s-1r",code:".quality-applies.s-1r{color:hsla(0,0%,100%,.5);display:flex;justify-content:end;padding:3px 0}.quality-applies span{color:#70c1ff}"};function gv(t,e){H(e,!1),Q(t,BC),en();var i=NC(),o=C(i);let s=fr(()=>G("quality_applience",{action:`<span>${G("quality_applience_action")}</span>`}));xc(o,{get message(){return n(s)}}),S(i),b(t,i),F()}var Ob=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",label:G("other_quality"),selected:o,valueComponent:Zl,valueComponentParams:{prefix:G("other_quality"),selected:o},children:"quality-other-settings"}},hv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:G("auto_quality_limit"),valueComponent:e?Zl:void 0,valueComponentParams:{prefix:G("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),Nb=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:gv,bottomBordered:!0,children:"quality-appliance"}),_v=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"quality-high",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:G("high_quality"),valueComponent:t?Zl:void 0,valueComponentParams:{prefix:G("high_quality"),selected:i},sublabel:G("high_quality_description")}),bv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleTrafficSaving:o})=>({id:"quality-traffic-saving",type:"SELECT_VALUE",value:"save_traffic",selectItem:()=>o(!0,e),selected:i,label:G("traffic_saving_quality"),valueComponent:t?Zl:void 0,valueComponentParams:{prefix:G("traffic_saving_quality"),selected:i},sublabel:G("traffic_saving_quality_description")});var ip=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),op=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,s;if(i==="und"?s=void 0:i&&(s=(l=oc(i))!=null?l:i),o&&i&&s){let d=e.filter(r=>r.label===o&&r.language===i);if(d.length===1)return G("audio_stream_display_language_label",{language:s,label:o});{let r=ip(t,d);return G("audio_stream_display_language_label_index",{language:s,label:o,index:r})}}if(o){let d=e.filter(r=>r.label===o);if(d.length===1)return o;{let r=ip(t,d);return G("audio_stream_display_label_index",{label:o,index:r})}}if(i&&s){let d=e.filter(r=>r.language===i);if(d.length===1)return s;{let r=ip(t,d);return G("audio_stream_display_language_index",{language:s,index:r})}}let a=ip(t,e);return G("audio_stream_display_unknown",{index:a})};var HC={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:s}=t,a=[];return i&&a.push({handler:hv,selected:e&&!o&&!s||!1}),a.push({handler:bv,selected:o},{handler:_v,selected:s}),{title:G("submenu_quality"),id:"quality-settings",items:[Nb(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),Ob(t)]}},"quality-other-settings":({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"quality-other-settings",title:G("submenu_quality"),closeSettingsMenu:t,items:i.map(s=>({type:"SELECT_VALUE",value:s.value,valueComponent:il,valueComponentParams:{quality:s.value,label:s.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:s.selected,label:s.displayValue}))}),"quality-appliance":t=>{var i,o,s;let{closeSettingsMenu:e}=t;return{id:"quality-appliance",title:G("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:hv,selected:((i=Cu())==null?void 0:i.type)==="auto_quality"},{handler:bv,selected:((o=Cu())==null?void 0:o.type)==="traffic_saving"},{handler:_v,selected:((s=Cu())==null?void 0:s.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-tracks":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-tracks",title:G("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(s=>({type:"SELECT_VALUE",value:s,dataValue:s.id,selectItem:o,selected:s.id===(i==null?void 0:i.id),label:op(s,e)}))}),"playback-rate":({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"playback-rate",title:G("submenu_playback_rate"),closeSettingsMenu:t,items:e.map(o=>({type:"SELECT_VALUE",value:o.value,selectItem:i,selected:o.selected,label:o.displayValue}))}),subtitles:({availableSubtitlesList:t,selectSubtitle:e})=>({id:"subtitles",minWidth:164,title:G("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i.value,selectItem:()=>e(i),selected:i.selected,label:i.displayValue,dataTestid:i.value===Mn?"sub_off":void 0}))})},Bb=({subMenuId:t,context:e})=>t?[HC[t](e)]:[];var FC=ke('<path d="M3.1 9.5c0-2.24 0-3.36.44-4.22A4 4 0 015.28 3.54C6.14 3.1 7.26 3.1 9.5 3.1h5c2.24 0 3.36 0 4.22.44a4 4 0 011.74 1.74c.44.86.44 1.98.44 4.22s0 3.36-.44 4.22a4 4 0 01-1.74 1.74c-.84.43-1.93.44-4.07.44l.55 2.2h1.9a.9.9 0 010 1.8H6.9a.9.9 0 110-1.8h1.9l.55-2.2c-2.14 0-3.23-.01-4.07-.44a4 4 0 01-1.74-1.74C3.1 12.86 3.1 11.74 3.1 9.5m11.4-4.6h-5c-1.15 0-1.9 0-2.48.05-.56.04-.79.12-.92.19a2.2 2.2 0 00-.96.96 2 2 0 00-.2.92C4.9 7.6 4.9 8.35 4.9 9.5s0 1.9.05 2.48c.04.56.12.79.19.92q.33.63.96.96c.13.07.36.15.92.2.58.04 1.33.04 2.48.04h5c1.15 0 1.9 0 2.48-.05.56-.04.79-.12.92-.19a2.2 2.2 0 00.96-.96c.07-.13.15-.36.2-.92.04-.58.04-1.33.04-2.48s0-1.9-.05-2.48a3 3 0 00-.19-.92 2.2 2.2 0 00-.96-.96 2 2 0 00-.92-.2c-.58-.04-1.33-.04-2.48-.04m-3.3 11-.55 2.2h2.7l-.55-2.2z"></path>');function $v(t){Xe(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=FC();b(e,o)},$$slots:{default:!0}})}var UC=ke('<path d="M8.3 14.25c1.86 1.9 5.5.02 5.5-3.55V5.64l2.4-.7A2.74 2.74 0 0 0 18 2.37V.64a.75.75 0 0 0-.92-.62l-.26.06C15.88.3 14.93.51 14 .8c-1.33.45-2.03 1.62-2.01 3.08V9c-3.89.2-5.64 3.29-3.7 5.25ZM.9.1a.9.9 0 0 0 0 1.8h8.2a.9.9 0 0 0 0-1.8H.9ZM.9 5.1a.9.9 0 1 0 0 1.8h7.2a.9.9 0 0 0 0-1.8H.9ZM0 11c0-.5.4-.9.9-.9h4.18a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 11Z"></path>');function yv(t){Xe(t,{width:"18",height:"15",children:(e,i)=>{var o=UC();b(e,o)},$$slots:{default:!0}})}var zC=ke('<path d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69A8 8 0 0 1 11 4.07M5.69 7.1 4.26 5.68A10 10 0 0 0 2.05 11h2.02a8 8 0 0 1 1.62-3.9M2.05 13c.2 2.01 1 3.84 2.21 5.32l1.43-1.43A8 8 0 0 1 4.07 13zM11 21.95v-2.02a8 8 0 0 1-3.9-1.62l-1.42 1.43A10 10 0 0 0 11 21.95M22 12c0 5.16-3.92 9.42-8.95 9.95v-2.02C16.97 19.41 20 16.05 20 12s-3.03-7.41-6.95-7.93V2.05C18.08 2.58 22 6.84 22 12M10.69 8.58l4.74 2.73a.8.8 0 0 1 0 1.37l-4.74 2.74a.8.8 0 0 1-1.19-.68V9.26a.8.8 0 0 1 1.19-.68"></path>');function xv(t){Xe(t,{testId:"play-speed-icon",children:(e,i)=>{var o=zC();b(e,o)},$$slots:{default:!0}})}var WC=ke('<path d="M12 2a.9.9 0 01.9.9v10.93l4.56-4.57a.9.9 0 011.28 1.28l-6.1 6.1a.9.9 0 01-1.28 0l-6.1-6.1a.9.9 0 111.28-1.28l4.56 4.57V2.9A.9.9 0 0112 2M4 20a.9.9 0 01.9-.9h14.2a.9.9 0 110 1.8H4.9A.9.9 0 014 20"></path>');function wv(t){Xe(t,{testId:"download-icon",children:(e,i)=>{var o=WC();b(e,o)},$$slots:{default:!0}})}var KC=ke('<path d="M8.86 2.1h6.28c.67 0 1.2.21 1.68.7l4.38 4.38c.48.48.7 1 .7 1.68v6.28c0 .68-.22 1.2-.7 1.68l-4.38 4.38c-.48.48-1 .7-1.68.7H8.86c-.68 0-1.2-.22-1.68-.7L2.8 16.82c-.48-.48-.7-1-.7-1.68V8.86c0-.68.22-1.2.7-1.68L7.18 2.8c.48-.49 1-.7 1.68-.7m-.44 2L4.1 8.43c-.18.18-.21.24-.21.5v6.17c0 .25.03.31.2.5l4.32 4.3c.18.18.24.21.5.21h6.17c.25 0 .31-.03.5-.2l4.3-4.32c.18-.18.21-.24.21-.5V8.92c0-.25-.03-.31-.2-.5l-4.32-4.3c-.18-.18-.24-.21-.5-.21H8.92c-.25 0-.32.03-.5.2M13 16a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-.1-8.1a.9.9 0 0 0-1.8 0v5.2a.9.9 0 1 0 1.8 0z"></path>');function Sv(t){Xe(t,{testId:"report-icon",children:(e,i)=>{var o=KC();b(e,o)},$$slots:{default:!0}})}var qC=ke('<path d="M4 12.3V12c0-1.47 0-2.55.08-3.4.07-.9.21-1.48.45-1.95a4.85 4.85 0 0 1 2.12-2.12 5.1 5.1 0 0 1 1.95-.45C9.5 4 10.68 4 12.3 4h4.51c-.03-.16-.09-.33-.17-.49a2.4 2.4 0 0 0-1.05-1.05c-.3-.16-.63-.21-.93-.24-.29-.02-.64-.02-1.03-.02h-1.37c-1.58 0-2.81 0-3.81.08a6.84 6.84 0 0 0-2.62.64 6.65 6.65 0 0 0-2.9 2.91c-.4.76-.57 1.6-.65 2.62-.08 1-.08 2.23-.08 3.81v1.37c0 .4 0 .74.02 1.03.03.3.08.62.24.93A2.4 2.4 0 0 0 4 16.8V12.3ZM10.08 6h-.03c-.53 0-.97 0-1.33.03-.39.03-.76.1-1.12.28a2.9 2.9 0 0 0-1.3 1.3c-.17.35-.24.72-.27 1.1C6 9.09 6 9.53 6 10.06v7.9c0 .53 0 .97.03 1.33.03.39.1.76.28 1.12a2.9 2.9 0 0 0 1.3 1.3c.35.17.72.24 1.1.27.37.03.81.03 1.33.03h6.91c.53 0 .97 0 1.33-.03.39-.03.76-.1 1.12-.28a2.9 2.9 0 0 0 1.3-1.3c.17-.35.24-.72.27-1.1.03-.37.03-.81.03-1.34v-7.9c0-.53 0-.97-.03-1.33-.03-.39-.1-.76-.28-1.12a2.9 2.9 0 0 0-1.3-1.3 2.96 2.96 0 0 0-1.1-.27C17.91 6 17.47 6 16.94 6h-6.87ZM8.41 7.92c.06-.04.18-.07.45-.1.28-.02.65-.02 1.22-.02h6.84c.57 0 .94 0 1.22.02.27.03.39.06.45.1.21.1.39.28.5.49.03.06.06.18.09.45.02.28.02.65.02 1.22v7.84c0 .57 0 .94-.02 1.22-.03.27-.06.39-.1.45-.1.21-.28.39-.49.5-.06.03-.18.06-.45.09-.28.02-.65.02-1.22.02h-6.84c-.57 0-.94 0-1.22-.02a1.23 1.23 0 0 1-.45-.1 1.1 1.1 0 0 1-.5-.49 1.23 1.23 0 0 1-.09-.45c-.02-.28-.02-.65-.02-1.22v-7.84c0-.57 0-.94.02-1.22.03-.27.06-.39.1-.45.1-.21.28-.39.49-.5Z"></path>');function np(t){Xe(t,{children:(e,i)=>{var o=qC();b(e,o)},$$slots:{default:!0}})}var QC=ke('<path d="M12 20.1a8.1 8.1 0 1 0 0-16.2 8.1 8.1 0 0 0 0 16.2m0 1.9a10 10 0 1 1 0-20 10 10 0 0 1 0 20m0-12.37A1.32 1.32 0 1 1 12 7a1.32 1.32 0 0 1 0 2.63m-.95 2.82c0-.54.43-.98.95-.98s.95.44.95.98v3.83c0 .54-.43.98-.95.98a.96.96 0 0 1-.95-.98z"></path>');function Cv(t){Xe(t,{testId:"info-icon",children:(e,i)=>{var o=QC();b(e,o)},$$slots:{default:!0}})}var GC=A('<div class="menu-item-value-wrapper s-1v"><!></div>'),YC={hash:"s-1v",code:".menu-item-value-wrapper.s-1v{line-height:normal}"};function Tv(t,e){H(e,!0),Q(t,YC);let[i,o]=Be(),s=()=>w(u,"$currentQuality$",i),a=()=>w(m,"$availableQualities$",i),l=()=>w(p,"$isAutoQualityEnabled$",i),d=()=>w(v,"$isMobile$",i),r=ye(),u=r.state.currentQuality$,m=r.state.availableQualities$,p=r.state.isAutoQualityEnabled$,v=r.ui.isMobile,$=f(()=>Vb({quality:s(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=GC(),h=C(y);il(h,{get quality(){return s()},get label(){return n($)},get isMobile(){return d()}}),S(y),b(t,y),F(),o()}var XC={"quality-settings":({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?G("auto_quality_option"):e)||"";return{id:"quality-settings",type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_quality",{actual:o}),icon:Yd,label:G("menu_quality"),value:e,valueComponent:Tv,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:G("aria_label_submenu_traffic_saving"),icon:$v,label:G("menu_traffic_saving"),enabled:t,tooltipText:G("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-tracks-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=op(t,e);return{id:"audio-tracks-settings",weight:Jr["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_audio_languages",{actual:i}),icon:yv,label:G("menu_audio_languages"),value:i,children:"audio-tracks"}},"playback-rate-settings":({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(s=>s.value===e))==null?void 0:o.displayValue)||"";return{id:"playback-rate-settings",weight:Jr["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_rate",{actual:i}),icon:xv,label:G("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:G("aria_label_menu_subtitle",{actual:t.displayValue}),icon:pa,iconProps:{type:"outline"},label:G("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:Jr.download,type:"CLICK",onClick:t,label:G("download_video_caption"),ariaLabel:G("aria_label_menu_download"),icon:wv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:Jr.report,type:"CLICK",onClick:t,label:G("menu_report"),ariaLabel:`${G("menu_report")}. ${G("aria_label_new_tab_alert")}`,icon:Sv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:Jr["copy-data"],type:"CLICK",onClick:t,label:G("menu_copy_debug"),ariaLabel:G("menu_copy_debug"),icon:np,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:Jr["save-trace-info"],type:"CLICK",onClick:t,label:G("menu_save_debug"),ariaLabel:G("menu_save_debug"),icon:np,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:Jr["debug-info"],type:"CLICK",onClick:t,ariaLabel:G("aria_label_menu_debug_overlay"),label:G("menu_debug_overlay"),icon:Cv,isHiddenFor:["desktop"]})},Hb=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(s=>XC[s](e)),...i.map(s=>Jt(Ge({},s),{isAdditional:!0}))].filter(s=>{var a,l,d;return!((a=s==null?void 0:s.isHiddenFor)!=null&&a.length)||!((l=s==null?void 0:s.isHiddenFor)!=null&&l.includes("desktop"))&&!o||!((d=s==null?void 0:s.isHiddenFor)!=null&&d.includes("mobile"))&&o}).sort(Fa)};var eT=(t,e)=>{Au(t,e)},tT=A('<div><div> </div> <div class="close s-y" data-testid="close-settings-menu"></div></div>'),iT=A('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),oT=A("<div><!> <!></div>"),nT={hash:"s-y",code:'.settings-menu-container.mobile.s-y{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-y ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-y .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-y .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-y .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-y .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-y .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-y .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-y{line-height:40px}.settings-menu.desktop.s-y{min-width:300px}.settings-menu-container.s-y .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-y .menu.mobile.hidden{display:none}.settings-menu-container.s-y .menu .item:not(.switch-item),.settings-menu-container.s-y .menu .switch-wrapper{align-items:center;color:var(--white);cursor:pointer;display:flex;justify-content:flex-end;position:relative;white-space:nowrap}.settings-menu-container.s-y .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-y .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-y .item:not(.switch-item),.settings-menu.s-y .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-y .item.mobile:not(.switch-item),.settings-menu.s-y .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-y .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-y .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-y .item.header.mobile:where(.s-y){border-bottom:var(--divider-border);color:var(--white);column-gap:12px;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:4px}.settings-menu-container.s-y .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-y .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-y .items::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.settings-menu-container.s-y .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-y .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-y{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-y:after,.close.s-y:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-y:before{transform:rotate(45deg)}.close.s-y:after{transform:rotate(-45deg)}'};function wc(t,e){H(e,!0),Q(t,nT);let[i,o]=Be(),s=()=>w(be,"$settingsMenuVisible",i),a=()=>w(W,"$settingsMenuOpenedByKeyboard",i),l=()=>w(ct,"$debugPanelVisible",i),d=()=>w(Ae,"$isMobile",i),r=()=>w(st,"$playerSize",i),u=()=>w(Me,"$hasMpegSources$",i),m=()=>w(Qe,"$mobileNotReportControlHidden$",i),p=()=>w(ue,"$autoQualityLimitingAvailable$",i),v=()=>w(X,"$isMinimalView$",i),$=()=>w(Ie,"$availableSubtitlesList$",i),y=()=>w(Te,"$isLiveWithPlaybackSpeed",i),h=()=>w(Ee,"$availableAudioStreams$",i),x=()=>w(fe,"$availablePlaybackRates$",i),I=()=>w(_e,"$currentAudioStream$",i),T=()=>w(B,"$currentPlaybackRate$",i),D=()=>w(we,"$trafficSavingEnabled",i),k=()=>w(de,"$currentQuality$",i),E=()=>w(pe,"$isAutoQualityEnabled$",i),V=()=>w(me,"$currentSubtitle$",i),q=()=>w(lt,"$additionalSettingsMenuItems$",i),L=()=>w(Z,"$isAutoQualityAvailable$",i),z=()=>w(ze,"$availableQualities$",i),j=()=>w(He,"$highQualityEnabled",i),te=g(e,"ref",15,void 0),ee=g(e,"playerControlsHeight",3,0),oe=si({}),ae=si({}),le=ye(),ce=Mt(),X=le.ui.isMinimalView$,_e=le.state.audioStream$,Ee=le.state.availableAudioStreams$,de=le.state.currentQuality$,ze=le.state.availableQualities$,ue=le.state.autoQualityLimitingAvailable$,pe=le.state.isAutoQualityEnabled$,Z=le.state.isAutoQualityAvailable$,B=le.state.currentPlaybackRate$,fe=le.state.availablePlaybackRates$,me=le.state.currentSubtitle$,Ie=le.state.availableSubtitlesList$,ot=le.state.canDownload,Me=le.state.hasMpegSources$,be=le.ui.settingsMenu.visible$,W=le.ui.settingsMenu.openedByBtnKeyboard$,Ce=le.ui.settingsMenu.ref$,Ae=le.ui.isMobile,Qe=le.ui.mobileNotReportControlHidden$,Te=le.state.canChangePlaybackSpeed$,we=le.state.trafficSavingEnabled$,He=le.state.highQualityEnabled$,st=le.ui.playerSize,ct=le.ui.debugPanelVisible,It=le.state.isInteractiveTime$,lt=le.ui.additionalSettingsMenuItems$,ai=le.ui.t,St=le.actions.internal.downloadVideo,Rt=le.actions.internal.closeSettingsMenu,Dt=le.actions.internal.openSettingsSubMenu,Wt=le.actions.internal.closeSettingsSubMenu,Le=K(!1),Y=K(void 0),Oe=Ab();Fe(()=>{!s()&&Oe.current&&(Wt(ae[Oe.current]),Oe.popAllSubMenus())}),Fe(()=>{s()||O(Y,void 0)}),Fe(()=>{!Oe.current&&n(Y)&&O_(oe,n(Y))}),Fe(()=>{te()&&Ce.set(te())});function $e(U){return $t(this,null,function*(){var Yt;Oe.pushSubMenu(U),yield _o(),Dt(U,ae[U]);let it=(Yt=te())==null?void 0:Yt.firstElementChild;it&&Uf(it)})}function Ne(U){var it;U==null||U.stopPropagation(),a()||(it=e.returnFocus)==null||it.call(e),Rt(),O(Le,!1)}function ft(U,it){le.actions.internal.setQuality(U,{appliesTo:it,byUser:!0}),Ne()}function Et(U){le.actions.internal.setAudioStream(U),Ne()}function Se(U,it){le.actions.internal.setTrafficSavingEnabled(U,it),ce.features.qualityDetailsSubMenuEnabled&&Ne()}function Ye(U,it){le.actions.internal.setHighQualityEnabled(U,it),Ne()}function Ue(U){le.actions.internal.setPlaybackRate(U),Ne()}function xe(U){le.actions.internal.setSubtitle(U),Ne()}function Ot(){St()}function Tt(){JC(e.supportLink)&&window.open(e.supportLink,"_blank"),le.actions.internal.reportProblem(),le.actions.internal.pause()}function qt(){Nl(le.actions.internal.getDebugTextData())}let _i=()=>{let U=le.actions.internal.getTraceTextData(),it=new Blob([...U],{type:"application/json"}),Yt=window.URL.createObjectURL(it);Ba(Yt,"vk_player_trace_info","json")};function vi(){ct.set(!l())}function Mi(){O(Le,!0)}function eo(){O(Le,!1)}function di(){return d()?`max-height: ${Math.round(r().height*.6)}px`:`max-height: ${r().height-32-ee()}px; overflow: auto;`}let Si=f(()=>ot&&u()&&!m()),to=f(()=>ce.features.trafficSaving&&!m()&&p()&&!ce.features.qualityDetailsSubMenuEnabled),Vi=f(()=>!v()&&$().length>0&&!m()),ci=f(()=>!!y()&&!m()),Ki=f(()=>ce.features.audioLanguages&&h().length>=2&&!m()),_t=f(()=>!m());Lt(()=>It.subscribe(U=>{U&&!d()&&!n(Le)&&!a()&&Ne()}));let We=f(()=>{let U=[n(_t)&&"quality-settings",n(Ki)&&"audio-tracks-settings",n(ci)&&"playback-rate-settings",n(Vi)&&"subtitles-settings",n(to)&&"traffic-saving-switch",n(Si)&&"download",ce.showSupport&&"show-support","copy-data",ce.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(it=>!!it);return Hb({items:U,context:{qualityDetailsSubMenuEnabled:ce.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:x(),currentAudioStream:I(),availableAudioStreams:h(),currentPlaybackRate:T(),selectPlaybackRate:Ue,trafficSavingEnabled:D(),toggleTrafficSaving:Se,currentQuality:k()||Fb.INVARIANT,isAutoQualityEnabled:E()||!1,currentSubtitle:V(),isMobile:d(),onDownloadClick:Ot,onCopyDataClick:qt,onReportProblemClick:Tt,onSaveTraceDataClick:_i,toggleShowDebugInfo:vi},additionalSettingsMenuItems:q()})}),nt=f(()=>Bb({subMenuId:Oe.current,context:{availablePlaybackRates:x(),selectPlaybackRate:Ue,trafficSavingEnabled:D(),toggleTrafficSaving:Se,currentQuality:k()||Fb.INVARIANT,isAutoQualityEnabled:E()||!1,isAutoQualityAvailable:L()||!1,availableQualities:z(),highQualityEnabled:j(),toggleHighQuality:Ye,availableAudioStreams:h(),availableSubtitlesList:$(),closeSettingsMenu:Rt,currentAudioStream:I(),isMobile:d(),selectAudioLanguage:Et,selectQuality:ft,selectSubtitle:xe}}));var ut=oT();let pi;var qi=C(ut);{var io=U=>{var it=iT();let Yt;it.__keydown=[eT,Rt];var gi=C(it);{var at=Gt=>{var Ct=tT();let bo;var Oo=C(Ct),fn=C(Oo,!0);S(Oo);var mn=P(Oo,2);mn.__click=Ne,S(Ct),N((Pi,Ci)=>{bo=ie(Ct,1,"item header s-y",null,bo,Pi),ge(fn,Ci)},[()=>({mobile:d()}),()=>ai("submenu_settings")]),b(Gt,Ct)};M(gi,Gt=>{d()&&Gt(at)})}var li=P(gi,2);let bi;wi(li,21,()=>n(We),Gt=>Gt.id,(Gt,Ct)=>{var bo=Re(),Oo=se(bo);{var fn=Pi=>{uv(Pi,{get isMobile(){return d()},get id(){return n(Ct).id},get icon(){return n(Ct).icon},get iconProps(){return n(Ct).iconProps},get label(){return n(Ct).label},get ariaLabel(){return n(Ct).ariaLabel},get value(){return n(Ct).value},get valueComponent(){return n(Ct).valueComponent},onClick:()=>{$e(n(Ct).children),O(Y,n(Ct).id,!0)},get ref(){return oe[n(Ct).id]},set ref(Ci){oe[n(Ct).id]=Ci}})},mn=(Pi,Ci)=>{{var vn=xi=>{let So=f(()=>`${n(Ct).id}-menu-item`);pv(xi,{get isMobile(){return d()},get id(){return n(So)},get onClick(){return n(Ct).onClick},get icon(){return n(Ct).icon},get label(){return n(Ct).label},get ariaLabel(){return n(Ct).ariaLabel},closeSettings:Ne})},_r=(xi,So)=>{{var No=Bo=>{let gn=f(()=>`${n(Ct).id}-menu-item`);mv(Bo,{get isMobile(){return d()},get id(){return n(gn)},get onClick(){return n(Ct).onClick},get icon(){return n(Ct).icon},get label(){return n(Ct).label},get ariaLabel(){return n(Ct).ariaLabel},get enabled(){return n(Ct).enabled},get tooltipText(){return n(Ct).tooltipText},get maxTooltipWidth(){return n(Ct).maxTooltipWidth}})};M(xi,Bo=>{n(Ct).type==="SWITCH"&&Bo(No)},So)}};M(Pi,xi=>{n(Ct).type==="CLICK"?xi(vn):xi(_r,!1)},Ci)}};M(Oo,Pi=>{n(Ct).type==="OPEN_SUB_MENU"?Pi(fn):Pi(mn,!1)})}b(Gt,bo)}),S(li),tt(li,Gt=>te(Gt),()=>te()),S(it),N((Gt,Ct,bo)=>{Yt=ie(it,1,"settings-menu menu s-y",null,Yt,Gt),bi=ie(li,1,"items",null,bi,Ct),Ke(li,bo)},[()=>({desktop:!d(),mobile:d(),hidden:!!Oe.current}),()=>({mobile:d()}),di]),ht("mouseenter",it,Mi),ht("mouseleave",it,eo),b(U,it)};M(qi,U=>{s()&&U(io)})}var pn=P(qi,2);wi(pn,17,()=>n(nt),U=>U.id,(U,it)=>{let Yt=f(()=>{var gi;return(gi=n(it).minWidth)!=null?gi:137});cv(U,{get isMobile(){return d()},get playerControlsHeight(){return ee()},get returnFromSubMenu(){return Oe.popSubMenu},get id(){return n(it).id},get title(){return n(it).title},get closeSettingsMenu(){return Rt},openSubMenuList:$e,get items(){return n(it).items},get minWidth(){return n(Yt)},get refMenuItems(){return oe},get listRef(){return ae[n(it).id]},set listRef(gi){ae[n(it).id]=gi}})}),S(ut),N(U=>pi=ie(ut,1,"settings-menu-container s-y",null,pi,U),[()=>({mobile:d(),hidden:!s()})]),b(t,ut),F(),o()}et(["keydown","click"]);var rT=A('<button class="btn s-1f"> </button>'),sT={hash:"s-1f",code:"button.btn.s-1f{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function Iv(t,e){Q(t,sT);var i=rT();i.__click=function(...s){var a;(a=e.onClick)==null||a.apply(this,s)};var o=C(i,!0);S(i),N(()=>ge(o,e.label)),b(t,i)}et(["click"]);var aT=A('<div class="container s-v"><div class="notification s-v"><div><p class="description s-v"><!></p> <!></div> <!></div></div>'),lT={hash:"s-v",code:".container.s-v{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-v{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-v{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function Sc(t,e){H(e,!0),Q(t,lT);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Mt(),{ui:{t:s}}=ye(),a=s(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=aT(),d=C(l),r=C(d),u=C(r),m=C(u);xc(m,{get message(){return a}}),S(u);var p=P(u,2);{var v=y=>{let h=f(()=>s("slow_video_notification_button"));Iv(y,{get label(){return n(h)},get onClick(){return e.onSelectAutoQuality}})};M(p,y=>{o||y(v)})}S(r);var $=P(r,2);Bs($,{get onClick(){return e.onClose}}),S(d),S(l),Os(3,d,()=>ga,()=>({duration:i})),b(t,l),F()}import{isIntersecting as Ub,Subscription as dT}from"@vkontakte/videoplayer-shared/es2015";var ol="annotation",rp=class{constructor(e){this.slots=new Map;this.disabledIds=new Set(e)}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var r;let{overlay:o,id:s,controlsBehaviour:a,hideAllControls:l}=i;if(this.disabledIds.has(s))return{success:!1,message:"current slotId is disabled via config"};let d=typeof e=="function"?e():e;return d.setAttribute("slot",ol),this.setupSlotStyles(d,o),this.shadowRootContainer.append(d),this.slots.set(s,{rootElement:d,options:i}),a&&this.runHidingControlsWhenIntersected(s,a),l&&((r=this.store)==null||r.ui.isControlsAvailable.set(!1)),{success:!0}}setupSlotStyles(e,i){switch(e.style.position="absolute",i){case"over_video":e.style.zIndex="calc(var(--video-container-z-index) + 1)";break;case"over_controls":e.style.zIndex="calc(var(--controls-container-z-index) + 1)";break;default:e.style.zIndex="0"}}runHidingControlsWhenIntersected(s,a){return $t(this,arguments,function*(e,{observedSlotElementId:i,controlsToObserve:o}){var v;let l=this.slots.get(e);if(!l)return;let d=yield this.findSlotElement(l.rootElement,i,e),{controls:r,hiddenControls:u}=((v=this.store)==null?void 0:v.ui)||{},m=new MutationObserver($=>$.forEach(()=>{let y=Us(d,this.shadowRootContainer);o.forEach(h=>{let x=r==null?void 0:r[h],I=x?he(x):null,T=u==null?void 0:u[h];I&&(T==null||T.set(Ub(I,y)))})}));m.observe(d,{childList:!0,subtree:!0}),l.observer=m;let p=new dT;o.forEach($=>{r&&p.add(r[$].subscribe(y=>{let h=u==null?void 0:u[$];y&&y.isDisplayed?h==null||h.set(Ub(y,Us(d,this.shadowRootContainer))):h==null||h.set(!1)}))}),l.subs=p})}findSlotElement(e,i,o){return $t(this,null,function*(){return new Promise(s=>{let a=null,l=new MutationObserver(()=>{if(a=e.querySelector(`#${i}`),a){l.disconnect();let r=this.slots.get(o);r&&(r.observerForFindingSlotElement=void 0),s(a)}});l.observe(e,{childList:!0,subtree:!0});let d=this.slots.get(o);d&&(d.observerForFindingSlotElement=l)})})}remove(e){var u,m;let i=this.slots.get(e);if(!i)return;let{rootElement:o,observer:s,observerForFindingSlotElement:a,subs:l,options:{controlsBehaviour:d,hideAllControls:r}}=i;o&&o.remove(),[s,a].forEach(p=>p==null?void 0:p.disconnect()),l==null||l.unsubscribe(),this.slots.delete(e),r&&((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 cT=A('<div class="container s-6"><!></div>'),uT={hash:"s-6",code:".container.s-6{align-items:center;animation-fill-mode:forwards;animation-name:s-6-videoPlayerStatusIconPopup;background-color:#00000073;border-radius:100%;display:flex;height:64px;justify-content:center;width:64px;will-change:opacity,scale}@keyframes s-6-videoPlayerStatusIconPopup{0%{opacity:0;scale:.6}10%{animation-timing-function:ease-in;opacity:1;scale:1}75%{opacity:1;scale:1}90%{animation-timing-function:ease-out;opacity:0;scale:.4}to{opacity:0;scale:0}}"};function Cc(t,e){H(e,!0),Q(t,uT);let i=g(e,"reversed",3,!1);var o=Re(),s=se(o);Vs(s,()=>e.Icon,a=>{var l=cT(),d=C(l);zi(d,()=>e.Icon,(r,u)=>{u(r,{get size(){return"48"},get reversed(){return i()}})}),S(l),N(()=>Ke(l,`animation-duration: ${e.duration}ms`)),b(a,l)}),b(t,o),F()}import{PlaybackState as zb}from"@vkontakte/videoplayer-core/es2015";var pT=A('<div class="container s-w"><!></div>'),fT={hash:"s-w",code:".container.s-w{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function Ev(t,e){H(e,!0),Q(t,fT);let[i,o]=Be(),s=()=>w(r,"$playbackState$",i),a=()=>w(m,"$previewTrackActive",i),l=()=>w(p,"$previewTrackDragInProgress",i),d=()=>w(u,"$isPlaying$",i),{state:{playbackState$:r,isPlaying$:u},ui:{previewTrackActive:m,previewTrackDragInProgress:p}}=ye(),{features:{playbackStatusShow:v},playbackStatusAnimationDuration:$}=Mt(),y=0,h=K(null),x=K(!1);Fe(()=>{s()===zb.PLAYING?O(h,Ln,!0):s()===zb.PAUSED?O(h,Ks,!0):O(h,null)}),Fe(()=>{if(!(!v||a()||l()))return y=window.setTimeout(()=>{y=0,O(h,null)},$),()=>{y&&(window.clearTimeout(y),y=0)}}),Fe(()=>{d()&&!n(x)&&(O(x,!0),O(h,null))});var I=Re(),T=se(I);{var D=k=>{var E=pT(),V=C(E);Cc(V,{get duration(){return $},get Icon(){return n(h)}}),S(E),b(k,E)};M(T,k=>{n(h)&&v&&k(D)})}b(t,I),F(),o()}var mT=A('<div><div data-testid="video-container"></div></div>'),vT={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 nl(t,e){H(e,!0),Q(t,vT);let[i,o]=Be(),s=()=>w(p,"$rotateAlpha",i),a=()=>w(v,"$playerSize",i),l=()=>w(m,"$playerPhase",i),d=()=>w(y,"$chromecastConnected$",i),r=()=>w($,"$isPlaying$",i),u=g(e,"videoContainer",15),{playerPhase:m,ui:{rotateAlpha:p,playerSize:v},state:{isPlaying$:$,chromecastConnected$:y}}=ye(),{isSmoothVideoRotate:h}=Mt(),x=f(()=>u()&&s()%180?a().height/a().width:1);var I=mT();let T;I.__contextmenu=function(...E){var V;(V=e.onContextMenu)==null||V.apply(this,E)},I.__mousedown=function(...E){var V;(V=e.onMouseDown)==null||V.apply(this,E)},I.__mouseup=function(...E){var V;(V=e.onMouseUp)==null||V.apply(this,E)},I.__click=function(...E){var V;(V=e.onClick)==null||V.apply(this,E)},I.__dblclick=function(...E){var V;(V=e.onDblClick)==null||V.apply(this,E)};var D=C(I);let k;tt(D,E=>u(E),()=>u()),S(I),N((E,V)=>{T=ie(I,1,"video-wrapper s-c",null,T,E),k=ie(D,1,"video-container s-c",null,k,V),Ke(D,`transform: rotate(${s()}deg) scale(${n(x)})`),De(D,"data-is-playing",r())},[()=>({hidden:l()!=="video"||d(),nocursor:e.hideCursor}),()=>({"fast-rotate":!h})]),b(t,I),F(),o()}et(["contextmenu","mousedown","mouseup","click","dblclick"]);var gT=A('<div><span class="text s-z"> </span> <!></div>'),hT={hash:"s-z",code:".root.s-z{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-z,.root.visible.s-z{transform:translateX(-50%)}.root.visible.s-z{opacity:1;visibility:visible}.text.s-z{font-size:13px;font-weight:600;line-height:16px}"};function Pv(t,e){H(e,!0),Q(t,hT);let{ui:{t:i}}=ye();var o=gT();let s;var a=C(o),l=C(a,!0);S(a);var d=P(a,2);hc(d,{get size(){return"16"},fill:"currentColor"}),S(o),N((r,u)=>{s=ie(o,1,"root s-z",null,s,r),ge(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),b(t,o),F()}var _T=A('<div class="container s-x" role="button" data-testid="preview-track-overlay"><div class="icon s-x"><!></div></div>'),bT={hash:"s-x",code:".container.s-x{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-x,.icon.s-x{align-items:center;display:flex;justify-content:center}.icon.s-x{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-x:hover .icon:where(.s-x){transform:scale(1.15)}"};function kv(t,e){H(e,!1),Q(t,bT);let o=ye().actions.internal.closePreviewTrack,s=200,a=u=>{u.stopPropagation(),o()};en();var l=_T();l.__click=a;var d=C(l),r=C(d);return Ln(r,{get size(){return"32"}}),S(d),S(l),Os(3,l,()=>ga,()=>({duration:s})),b(t,l),mf(e,"handleClick",a),F({handleClick:a})}et(["click"]);var $T=(t,e,i,o,s,a)=>{if(t.stopPropagation(),e()||o()){a();return}},yT=A("<div><!></div>"),xT=A('<div class="spherical-video-icon s-7"><!></div>'),wT=A("<div><!></div>"),ST=A('<div class="settings-menu s-7"><!></div>'),CT=A("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),TT=A("<!> <!> <!>",1),IT=A('<div class="blocked s-7"></div>'),ET=A('<div class="player-wrapper s-7"><!> <div class="overlay-container"></div></div> <!>',1),PT={hash:"s-7",code:".blocked.s-7,.player-wrapper.s-7{height:100%;position:absolute;width:100%}.blocked.s-7{z-index:var(--overlay-container-z-index)}.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-menu.s-7{bottom:57px;left:0;position:absolute;right:18px;transition:opacity .2s;z-index:var(--settings-menu-z-index)}"};function Av(t,e){H(e,!0),Q(t,PT);let[i,o]=Be(),s=()=>w(xr,"$notificationsToShow$",i),a=()=>w(to,"$playerPhase",i),l=()=>w(io,"$isLoaderVisible",i),d=()=>w(eo,"$adPlaybackState",i),r=()=>w(li,"$crashed",i),u=()=>w(vn,"$isInteractiveTime$",i),m=()=>w(_t,"$settingsMenuVisible",i),p=()=>w(_r,"$isInteractiveExpectation$",i),v=()=>w(vi,"$isMinimalView$",i),$=()=>w(Ki,"$controlsVisible",i),y=()=>w(So,"$touched",i),h=()=>w(ns,"$graphIsOpened$",i),x=()=>w(Vi,"$isFullscreen",i),I=()=>w(Zn,"$autoplayNextEnabled$",i),T=()=>w(Yt,"$postrollPassed",i),D=()=>w(pn,"$isEnded$",i),k=()=>w(Ct,"$currentSubtitle$",i),E=()=>w(Nn,"$cursorInside",i),V=()=>w(Co,"$isControlsAvailable",i),q=()=>w($r,"$doubleForwardOn$",i),L=()=>w(Jn,"$fakeIsPlaying$",i),z=()=>w(or,"$bottomNoSmooth",i),j=()=>w(xs,"$interactiveTimeIndicator",i),te=()=>w(Oo,"$playerSize",i),ee=()=>w(mn,"$is3DVideo",i),oe=()=>w(Vn,"$doubleForwardAvailable$",i),ae=()=>w(pi,"$contextMenuVisible$",i),le=()=>w(Mi,"$playbackState$",i),ce=()=>w(No,"$hotKeyMapData",i),X=()=>w(nt,"$scrubbingInProgress",i),_e=()=>w(ut,"$volumeChangingInProgress",i),Ee=()=>w(U,"$chromecastConnected$",i),de=()=>w(Fo,"$controlsTimeoutActive",i),ze=()=>w(fn,"$adsPlaybackState",i),ue=()=>w(We,"$settingsMenuOpenedByKeyboard",i),pe=()=>w(Wo,"$contextMenuOpenedByKeyboard$",i),Z=()=>w(ws,"$contextMenuOpenedByHotKey$",i),B=()=>w(Cr,"$contextMenuButtonRef$",i),fe=()=>w(Ss,"$contextMenuLastActiveElem$",i),me=()=>w(ci,"$isFullscreenOpenedByKeyboard",i),Ie=()=>w(gn,"$positionExact$",i),ot=()=>w(_i,"$language$",i),Me=()=>w(ha,"$previewTrackActive$",i),be=()=>w(Pi,"$icon3DVideoVisible",i),W=()=>w(it,"$chromecastDeviceName$",i),Ce=()=>w(bo,"$currentSubtitleCaptions$",i),Ae=()=>w(di,"$position$",i),Qe=()=>w(Si,"$duration$",i),Te=()=>w(gi,"$isLive$",i),we=()=>w(at,"$isPlaying$",i),He=()=>w(br,"$contextMenuPosition$",i),st=()=>w(Bo,"$showHotKeyMap",i),ct=()=>w(qi,"$debugPanelVisible",i),It=()=>w(Rr,"$userActionsDisabled$",i),lt=g(e,"videoContainer",15),ai=g(e,"adsSlotId",3,void 0),St=g(e,"adsParams",3,void 0),Rt=g(e,"adsAutoplayParam",3,void 0),Dt=g(e,"duration",3,void 0),Wt=g(e,"logoTargetUrl",3,""),Le=g(e,"showNextPrevButtons",3,!1),Y=g(e,"nextButtonActive",3,!1),Oe=g(e,"prevButtonActive",3,!1),$e=g(e,"endScreenVideoTitle",3,void 0),Ne=g(e,"endScreenVideoThumb",3,void 0),ft=g(e,"isOneVideoPlaylist",3,!1),Et=g(e,"shadowRootContainer",3,void 0),Se=g(e,"outerContainerRef",3,void 0),Ye=g(e,"playerStarted",3,!1),Ue=g(e,"fullScreenTarget",3,void 0),xe=g(e,"showMiniTimer",3,!1),Ot=g(e,"showEndScreen",3,!0),Tt=g(e,"keyboardControls",15),qt=e.store.getLogger().createComponentLog("Root component"),_i=e.store.interfaceLanguage$,vi=e.store.ui.isMinimalView$,Mi=e.store.state.playbackState$,eo=e.store.ads.playbackState,di=e.store.state.positionWithScrubbing$,Si=e.store.state.duration$,to=e.store.playerPhase,Vi=e.store.ui.isFullscreen,ci=e.store.ui.isFullscreenOpenedByKeyboard,Ki=e.store.ui.controlsVisible,_t=e.store.ui.settingsMenu.visible$,We=e.store.ui.settingsMenu.openedByBtnKeyboard$,nt=e.store.ui.scrubbingInProgress,ut=e.store.ui.volumeChangingInProgress,pi=e.store.ui.contextMenu.visible$,qi=e.store.ui.debugPanelVisible,io=e.store.state.isLoaderVisible,pn=e.store.state.isEnded$,U=e.store.state.chromecastConnected$,it=e.store.state.chromecastDeviceName$,Yt=e.store.ads.postrollPassed,gi=e.store.state.isLive$,at=e.store.state.isPlaying$,li=e.store.state.crashed$,bi=e.store.webApi.annotationsApi,Gt=e.store.webApi.pictureInPictureApi,Ct=e.store.state.currentSubtitle$,bo=e.store.state.currentSubtitleCaptions$,Oo=e.store.ui.playerSize,fn=e.store.ads.playbackState,mn=e.store.ui.is3DVideo,Pi=e.store.ui.icon3DVideoVisible,Ci=e.store.state.isInteractive,vn=e.store.state.isInteractiveTime$,_r=e.store.state.isInteractiveExpectation$,xi=e.store.state.hasInteractiveBranches,So=e.store.ui.touched,No=e.store.ui.modals.hotKeyMap.data,Bo=e.store.ui.modals.hotKeyMap.show,gn=e.store.state.positionExact$,es=e.store.ui.overlayContainer$,xs=e.store.ui.controls.interactiveTimeIndicator,ts=e.store.state.showInteractiveTimeIndicator,br=e.store.ui.contextMenu.position$,hn=e.store.actions.internal.setQuality,is=e.store.actions.internal.closeSettingsMenu,Zn=e.store.ui.autoplayNextEnabled$,Rr=e.store.ui.userActionsDisabled,Co=e.store.ui.isControlsAvailable,os=e.store.ui.videoTitleInfo,$r=e.store.ui.doubleForwardOn$,Vn=e.store.ui.doubleForwardAvailable$,Rn=e.store.actions.internal.getVideoElement,Dn=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:Jn,notifications$:Dr,graphIsOpened$:ns}=wo(),ki=K(void 0),rs=K(void 0),Ho=K(void 0),er=K(void 0),yr,tr,pt;No.set(P_());let{closeNotification:Zt,notificationsToShow$:xr}=Dr,ss=f(()=>!!s().slow_video),ir=()=>Zt("slow_video"),on=f(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!r()),On=K(void 0),or=re(!1),Or,Fo=re(!1),_n=re(),Nn=re(!1),uo=K(!1),To=K(!1),Bn=K(!1),Ri=K(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),nr=f(()=>u()&&!m()&&!(n(uo)||n(To))&&!(n(Bn)&&!p())),bn=!0,Nr=f(()=>e.uiConfig.features.thumbTimer&&!v()&&xe()&&a()==="video"&&!$()&&!r()&&!Ci&&(e.uiConfig.hideThumbTimerAfterTouch&&!y()||!e.uiConfig.hideThumbTimerAfterTouch)),bt=e.uiConfig.titleShowBehaviour,ui=f(()=>!["video","thumb"].includes(a())||bt==="never"||h()?!1:bt==="fullscreen"?x():!0),Ut=f(()=>bt==="always"||a()==="thumb"?!1:!$()),nn=K(!1),$o=f(()=>(Ot()||e.showAutoplayNext&&I())&&!!$e()&&!!Ne()&&(e.showAds&&T()||!e.showAds)&&D()&&!r()&&!n(nn)&&!xi),$n=f(()=>!v()&&k().value!=="off"&&a()==="video"),yo=f(()=>E()&&!($()||n($o))&&!u()&&V()&&!q()),rr=K(!1),oo=f(()=>L()!==null),{toggle:wr}=Jn,Io=!1,yn=null;Gt==null||Gt.setContext(dd());let as=()=>{e.autoplay&&!Ci&&e.uiConfig.controls.showOnStartupAtAutoplay&&no(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:as});let Br=()=>{window.clearTimeout(yr),Fo.set(!1)},ls=()=>{window.clearTimeout(tr),_n.set(null)},no=ve=>{Br(),Fo.set(!0),yr=window.setTimeout(()=>Fo.set(!1),ve);let vt=ve-100;Or=window.setTimeout(()=>{z()&&or.set(!1)},vt>0?vt:ve)},ds=(ve,vt)=>{ls(),_n.set(vt),tr=window.setTimeout(()=>_n.set(null),ve)},Hr=mn.subscribe(ve=>{Pi.set(ve),ve&&(window.clearTimeout(pt),pt=window.setTimeout(()=>Pi.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Eo=()=>$t(null,null,function*(){var vt,ri,jt,Ko;let ve=aa();if(ve){let Lo=Od(),so=po();ve=Lo===so||Lo===Et()}if(ve){no(e.uiConfig.controls.hideTimeoutFullscreen);try{yield Gt==null?void 0:Gt.exit()}catch(Lo){qt({message:String(Lo)})}}Vi.set(ve),e.store.getAdmanWrapper().setFullscreen(ve),x()?(ri=(vt=e.store.callbacks)==null?void 0:vt.onFullscreenEnter)==null||ri.call(vt):(Ko=(jt=e.store.callbacks)==null?void 0:jt.onFullscreenExit)==null||Ko.call(jt)}),Fr=ve=>{Oo.set(ve)},Hn=()=>{if(n(ki)){let{width:ve,height:vt}=n(ki).getBoundingClientRect();Oo.set({width:ve,height:vt})}};Lt(()=>{var vt;return Pu(Eo),e.uiConfig.features.annotationsInside&&(bi==null||bi.init(n(ki))),Gt==null||Gt.assignPlayerContainer(n(ki)),e.uiConfig.disablePiPResizeHandling||Gt==null||Gt.setExternalEventHandlers({resize:Fr,leavepictureinpicture:Hn}),e.interactiveContainer&&((vt=lt().parentElement)==null||vt.insertBefore(e.interactiveContainer,lt().nextSibling)),()=>{window.clearTimeout(yr),window.clearTimeout(Or),window.clearTimeout(tr),window.clearTimeout(pt),Hr(),Gt==null||Gt.dispose().catch(ri=>{qt({message:String(ri)})}),ku(Eo)}});let po=()=>{let ve=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!Se()?n(ki):Se(),vt=ve.getRootNode(),ri=vt instanceof ShadowRoot?vt.host:vt,jt=Ue()instanceof HTMLElement&&Ue().contains(ri);return e.uiConfig.allowChangingFullscreenTarget&&Ue()&&jt?Ue():ve},fo=()=>{pi.set(!1)},je=()=>{is(),fo()},At=()=>$t(null,null,function*(){if(!Dn()){qt({message:"fullscreen disabled"});return}fo(),aa()?(yield Eu(document),qt({message:"exit fullscreen"})):(qt({message:"request fullscreen"}),yield Iu(po()))}),fi=ve=>{h()||(ve.preventDefault(),pi.set(!0),br.set({left:ve.clientX,top:ve.clientY}))};function Po(){Nn.set(!0),Ci||no(e.uiConfig.controls.hideTimeoutCursor)}function ko(ve){var Lo,so;let{relatedTarget:vt}=ve,jt=!!(vt&&((Lo=n(Ho))!=null&&Lo.contains(vt)))&&((so=Tt())==null?void 0:so.isFocused()),Ko=e.uiConfig.controls.showOnStartupAtAutoplay||!!vt;!Ci&&!jt&&Ko&&(or.set(!0),no(e.uiConfig.controls.hideTimeoutCursor))}function xo(){Nn.set(!1),O(To,!1),O(uo,!1),Io=!1,e.store.actions.internal.releaseCamera(),no(e.uiConfig.controls.hideTimeout),q()&&zo()}function mo(ve){return ve?ve.offsetTop+mo(ve.offsetParent):0}function Ao(ve){return ve?ve.offsetLeft+Ao(ve.offsetParent):0}function sr(ve){if(j()&&ts){let vt=ve.currentTarget,ri=mo(vt),jt=Ao(vt),Ko=ve.pageX-jt,Lo=ve.pageY-ri,{left:so,bottom:rn,right:Is}=j(),Es=Is-so;return Ko>=so-Es&&Lo<=rn+Es}}function ar(ve){if(n(ki)){let vt=mo(ve.currentTarget),ri=te().height,jt=ve.pageY-vt;if(sr(ve)){O(To,!1);return}jt<40?O(To,!0):jt>ri-40?O(uo,!0):(O(To,!1),m()||O(uo,!1))}}function Uo(ve){ar(ve),!n(nr)&&!q()&&no(e.uiConfig.controls.hideTimeoutCursor),ee()&&Io&&yn&&e.store.actions.internal.moveCameraFocusPX(yn.clientX-ve.clientX,yn.clientY-ve.clientY,ve.timeStamp-yn.timeStamp),yn=ve}let Ni=null,Fn=()=>{Ni=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),Br()},e.uiConfig.doubleForwardActivationTime)},zo=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),Ni&&clearTimeout(Ni),Ni=null},Sr=ve=>{ve.preventDefault(),ve.button===0&&(Io=!0,e.store.actions.internal.holdCamera(),oe()&&Fn()),!Io&&no(e.uiConfig.controls.hideTimeoutCursor)},Ze=ve=>{ve.preventDefault(),ve.button===0&&(yn=ve,Io=!1,e.store.actions.internal.releaseCamera()),!q()&&no(e.uiConfig.controls.hideTimeoutCursor)},Qt=ve=>{ve.preventDefault(),bn&&(qt({message:"double click on video"}),At(),no(e.uiConfig.controls.hideTimeoutCursor))},Ai=ve=>{var vt;if(ve.preventDefault(),q()){zo();return}if(Ni&&zo(),ae()||m()){je();return}if(!(D()&&!xi)){if(n(oo))return wr();if((vt=Tt())==null||vt.focus(),!Ye()){e.firstStart(),no(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||le()!==Kb.PLAYING)&&e.store.actions.internal.togglePlay(),no(e.uiConfig.controls.hideTimeoutCursor)}},xn=ve=>{je(),So.set(!0),no(e.uiConfig.controls.hideTimeout),ve&&ds(e.uiConfig.controls.hideHotKeyHelpers,ve)},ro=()=>{var ve,vt;v()||(je(),(ve=e.store.callbacks)!=null&&ve.onOpenHotKeyMap?(vt=e.store.callbacks)==null||vt.onOpenHotKeyMap(ce()):Bo.update(ri=>!ri))},Ur=()=>{So.set(!0)},Wo=e.store.ui.contextMenu.openedByBtnKeyboard$,Cr=e.store.ui.contextMenu.btnRef$,Tr=K(void 0),ws=e.store.ui.contextMenu.openedByHotKey$,Ss=e.store.ui.contextMenu.lastActiveElem$,Un=K(!1),ha=e.store.ui.previewTrackActive;Fe(()=>{es.set(n(On))}),Fe(()=>{O(Bn,n(Ri)&&le()!==Kb.PLAYING,!0),n(Ri)||Pt(()=>O(Ri,!0))}),Fe(()=>{var vt,ri;let ve=(n(Bn)||D()||m()||X()||_e()||Ee()||de()||n(Un))&&!n(nr)&&(a()==="video"||a()==="ads"&&(e.uiConfig.controls.showOnStartupAtAutoplay||ze()!=="inactive"))&&!r()&&V();Ki.set(ve),!ve&&!de()&&((vt=n(Ho))!=null&&vt.contains(Ou()))&&((ri=Tt())==null||ri.focus())}),Fe(()=>{!X()&&n(rr)&&!u()&&no(e.uiConfig.controls.hideTimeoutCursor),Pt(()=>O(rr,X(),!0))}),Fe(()=>{n(er),m(),ue(),Pt(()=>zd(n(er),m(),ue()))}),Fe(()=>{n(Tr),ae(),pe(),Z(),Pt(()=>{let ve=pe()||Z();zd(n(Tr),ae(),ve)})}),Fe(()=>{let ve=B();ve&&(ae(),Pt(()=>Bl(ve,ae(),Wo)))}),Fe(()=>{let ve=fe();ve&&(ae(),Pt(()=>D_(ve,ae(),ws)))}),Fe(()=>{var ve;!me()&&x()&&(Pt(()=>ci.set(!1)),(ve=Tt())==null||ve.focus())}),Fe(()=>{h()&&je()});let cs=K(void 0),_a=ve=>{os.set(jn(Rn(),{title:n(cs)},"title",ve))},ba=(ve,vt)=>{var Lo,so;let ri=(so=(Lo=e.store.callbacks)==null?void 0:Lo.uiInfo)==null?void 0:so.onUpcomingLiveViewStateChanged;if(!ri)return;let jt=!!vt,Ko=Ge(Ge({},jn(n(ki),{upcomingLiveScreen:vt},"upcomingLiveScreen",jt)),ve);ri(Ko)},mt="",ni=f(()=>{var ve;return n(Ut)?mt:(ve=e.getVideoDeeplink)==null?void 0:ve.call(e,Ie())});Fe(()=>{mt=n(ni)});var Li=ET();ht("blur",Aa,je);var $i=se(Li);$i.__mousemove=Uo;var Ir=C($i);let Cs=f(()=>a()==="ads"),Ts=f(()=>n(oo)?wr:void 0);tt(Gf(Ir,{startDoubleForwardActivationTimer:Fn,stopDoubleForward:zo,toggleFullscreen:At,hideContextMenu:je,showHotKeyHelpers:xn,showKeyMap:ro,get isAds(){return n(Cs)},get fakePlayButtonHandler(){return n(Ts)},get hasNextVideo(){return Y()},get hasPrevVideo(){return Oe()},children:(ve,vt)=>{var ri=TT(),jt=se(ri);nl(jt,{get hideCursor(){return n(yo)},onClick:Ai,onContextMenu:fi,onMouseDown:Sr,onMouseUp:Ze,onDblClick:Qt,get videoContainer(){return lt()},set videoContainer(so){lt(so)}});var Ko=P(jt,2);Oa(Ko,()=>"slot",!1,(so,rn)=>{lo(so,()=>({name:ol}))});var Lo=P(Ko,2);Vs(Lo,ot,so=>{var rn=CT(),Is=se(rn);let Es=f(()=>a()!=="thumb"||r()||Ci&&e.autoplay);el(Is,{get hidden(){return n(Es)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:fi,onClick:fo});var Qs=P(Is,2);{var Wr=qe=>{kv(qe,{})};M(Qs,qe=>{Me()&&qe(Wr)})}var Gs=P(Qs,2);Ev(Gs,{});var wn=P(Gs,2);Pv(wn,{get isVisible(){return q()}});var $a=P(wn,2);{var sl=qe=>{let hi=f(()=>{var Qo;return(Qo=e.live)==null?void 0:Qo.startTime});$c(qe,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(hi)},onUpcomingLiveViewStateChanged:ba,onContextMenu:fi,onClick:fo})};M($a,qe=>{a()==="LiveWaitingStart"&&qe(sl)})}var Er=P($a,2);{var ed=qe=>{tl(qe,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:fi,onClick:fo})};M(Er,qe=>{a()==="LiveWaitingRecover"&&qe(ed)})}var al=P(Er,2);{var ll=qe=>{tl(qe,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:fi,onClick:fo})};M(al,qe=>{a()==="LiveWaitingRecord"&&qe(ll)})}var dl=P(al,2);{var td=qe=>{var hi=yT();let Qo;var Sn=C(hi);Nd(Sn,{get adsSlotId(){return ai()},get adsParams(){return St()},get adsAutoplayParam(){return Rt()},get duration(){return Dt()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson}}),S(hi),N(Cn=>Qo=ie(hi,1,"ads-container s-7",null,Qo,Cn),[()=>({hidden:a()!=="ads"})]),b(qe,hi)};M(dl,qe=>{e.showAds&&Ye()&&qe(td)})}var ya=P(dl,2);{var cl=qe=>{let hi=f(()=>!Ot()&&e.showAutoplayNext&&I());Kf(qe,{get title(){return $e()},get thumb(){return Ne()},get isHide(){return n(hi)},clickCloseIcon:()=>O(nn,!0)})};M(ya,qe=>{n($o)&&$e()&&Ne()&&qe(cl)})}var gt=P(ya,2);{var dt=qe=>{let hi=f(()=>x()?"md":"sm"),Qo=f(()=>{var Sn;return(Sn=e.store.callbacks)==null?void 0:Sn.onTitleClicked});nv(qe,{get title(){return e.title},get isHidden(){return n(Ut)},onVisibilityChanged:_a,get titleLinkHref(){return n(ni)},onMouseEnter:()=>{O(Un,!0)},onMouseLeave:()=>{O(Un,!1)},get size(){return n(hi)},get onTitleClicked(){return n(Qo)},get ref(){return n(cs)},set ref(Sn){O(cs,Sn,!0)}})};M(gt,qe=>{n(ui)&&qe(dt)})}var Di=P(gt,2);{var qo=qe=>{let hi=f(()=>a()==="video"&&$());_c(qe,{get isShifted(){return n(hi)}})};M(Di,qe=>{ee()&&qe(qo)})}var Gi=P(Di,2);{var yi=qe=>{var hi=xT(),Qo=C(hi);Dd(Qo,{}),S(hi),b(qe,hi)};M(Gi,qe=>{be()&&qe(yi)})}var Hi=P(Gi,2);{var xa=qe=>{bc(qe,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return W()},onClick:Ai,onContextMenu:fi,onDblClick:Qt})};M(Hi,qe=>{Ee()&&qe(xa)})}var ul=P(Hi,2);{var gp=qe=>{Za(qe,{get shifted(){return $()},get captions(){return Ce()},get position(){return Ae()},get playerSize(){return te()}})};M(ul,qe=>{n($n)&&qe(gp)})}var Dc=P(ul,2);{var hp=qe=>{var hi=wT();hi.__contextmenu=fi,hi.__click=[$T,ae,pi,m,_t,je];var Qo=C(hi);Ja(Qo,{}),S(hi),b(qe,hi)};M(Dc,qe=>{r()&&qe(hp)})}var Oc=P(Dc,2);{var _p=qe=>{let hi=f(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),Qo=f(()=>a()==="ads"),Sn=f(()=>e.canRewindLive&&Qe()!==0);gc(qe,{get bottomHidden(){return n(hi)},get bottomNoSmooth(){return z()},get showControls(){return $()},get isAds(){return n(Qo)},get canRewindLive(){return n(Sn)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Wt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Le()},get nextButtonActive(){return Y()},get prevButtonActive(){return Oe()},get isOneVideoPlaylist(){return ft()},customFullscreenSupported:bn,toggleFullscreen:At,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(rs)},set playerControlsWrapperRef(Cn){O(rs,Cn,!0)},get playerControlsRef(){return n(Ho)},set playerControlsRef(Cn){O(Ho,Cn,!0)}})};M(Oc,qe=>{Ye()&&qe(_p)})}var Nc=P(Oc,2);{var bp=qe=>{var hi=ST(),Qo=C(hi);let Sn=f(()=>{var Cn;return(Cn=n(Ho))==null?void 0:Cn.clientHeight});wc(Qo,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(Sn)},returnFocus:()=>{var Cn;return(Cn=Tt())==null?void 0:Cn.focus()},get ref(){return n(er)},set ref(Cn){O(er,Cn,!0)}}),S(hi),b(qe,hi)};M(Nc,qe=>{!Ee()&&a()!=="ads"&&qe(bp)})}var Bc=P(Nc,2);let pl=f(()=>!n(Nr));Fd(Bc,{get isLive(){return Te()},get isHidden(){return n(pl)},get isPlaying(){return we()},get position(){return Ae()},get duration(){return Qe()}});var Hc=P(Bc,2);iv(Hc,{get data(){return _n}});var Ys=P(Hc,2);Wf(Ys,{get supportLink(){return e.supportLink},returnFocus:()=>{var qe;return(qe=Tt())==null?void 0:qe.focus()},get visible(){return ae()},get playerContainerRef(){return n(ki)},get position(){return He()},get menuElementRef(){return n(Tr)},set menuElementRef(qe){O(Tr,qe,!0)}});var wa=P(Ys,2);{var $p=qe=>{Sc(qe,{onClose:ir,onSelectAutoQuality:()=>{hn("auto"),ir()}})};M(wa,qe=>{n(ss)&&qe($p)})}var id=P(wa,2);{var od=qe=>{za(qe,{})};M(id,qe=>{n(on)&&qe(od)})}var nd=P(id,2);{var yp=qe=>{Xf(qe,{})};M(nd,qe=>{st()&&qe(yp)})}var Fc=P(nd,2);{var xp=qe=>{qd(qe,{})};M(Fc,qe=>{ct()&&qe(xp)})}b(so,rn)}),b(ve,ri)},$$slots:{default:!0}}),ve=>Tt(ve),()=>Tt());var zr=P(Ir,2);tt(zr,ve=>O(On,ve),()=>n(On)),S($i),tt($i,ve=>O(ki,ve),()=>n(ki));var Bi=P($i,2);{var Qi=ve=>{var vt=IT();b(ve,vt)};M(Bi,ve=>{It()&&ve(Qi)})}ht("mouseenter",$i,Po),ht("mouseleave",$i,xo),ht("click",$i,Ur,!0),ht("focusin",$i,ko,!0),b(t,Li),F(),o()}et(["mousemove","contextmenu","click"]);import{clientChecker as Tc,PlaybackState as BT}from"@vkontakte/videoplayer-core/es2015";import{noop as HT}from"@vkontakte/videoplayer-shared/es2015";var kT=A('<div></div> <div class="info s-13"><div class="triangles-wrapper s-13"><div></div> <div></div> <div></div></div> <p class="step-caption s-13"> </p></div>',1),AT=A("<div><!></div>"),LT={hash:"s-13",code:".double-click-area.s-13{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-13{left:0}.double-click-area.right.s-13{right:0}.semicircle.s-13{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-13{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-13{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-13{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-13,.triangles-wrapper.s-13{display:flex;justify-content:center}.triangles-wrapper.s-13{margin-bottom:10px;position:relative}.triangle.s-13{animation:s-13-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-13:nth-child(3),.triangle.right.s-13:first-child{animation-delay:0s}.triangle.left.s-13:nth-child(2),.triangle.right.s-13:nth-child(2){animation-delay:.1s}.triangle.left.s-13:first-child,.triangle.right.s-13:nth-child(3){animation-delay:.2s}@keyframes s-13-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-13{border-right:8px solid var(--white)}.triangle.right.s-13{border-left:8px solid var(--white)}.triangle.s-13:not(:last-child){margin-right:5px}.step-caption.s-13{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function sp(t,e){H(e,!0),Q(t,LT);let i=g(e,"seekStep",3,0),o=K(!1),s=0,a=0,l=K(si(i())),d=p=>{p.stopPropagation(),a+=1,O(l,i()*(a-1)),a===1?e.handleSingleFirstClick(p):(O(o,!0),e.handleSecondClick()),window.clearTimeout(s),s=window.setTimeout(()=>{a=0,O(o,!1)},300)};ln(()=>{window.clearTimeout(s)});var r=AT();r.__click=d;var u=C(r);{var m=p=>{var v=kT(),$=se(v),y=P($,2),h=C(y),x=C(h),I=P(x,2),T=P(I,2);S(h);var D=P(h,2),k=C(D,!0);S(D),S(y),N(E=>{var V,q,L,z;ie($,1,`semicircle ${(V=e.side)!=null?V:""}`,"s-13"),ie(x,1,`triangle ${(q=e.side)!=null?q:""}`,"s-13"),ie(I,1,`triangle ${(L=e.side)!=null?L:""}`,"s-13"),ie(T,1,`triangle ${(z=e.side)!=null?z:""}`,"s-13"),ge(k,E)},[()=>G("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),b(p,v)};M(u,p=>{n(o)&&p(m)})}S(r),N(()=>{var p;return ie(r,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-13")}),b(t,r),F()}et(["click"]);var MT=(t,e,i)=>{e(!1),i()},VT=A('<div class="overlay s-14"></div> <div class="next-video s-14"><div class="top s-14"><div class="caption s-14"> </div> <!></div> <div class="row s-14"><div class="column s-14"><div class="thumb s-14"><div></div> <!></div></div> <div class="column s-14"><div class="title s-14"> </div></div></div></div>',1),RT={hash:"s-14",code:".overlay.s-14{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-14{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-14{display:flex;justify-content:space-between}.caption.s-14{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-14{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-14{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-14{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-14,.thumb-overlay.s-14{height:100%;width:100%}.thumb-overlay.s-14{position:absolute}.thumb-overlay.withOpacity.s-14{background:var(--black);opacity:.3}.title.s-14{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Lv(t,e){H(e,!0),Q(t,RT);let[i,o]=Be(),s=()=>w(d,"$autoplayNextEnabled$",i),a=()=>w(r,"$timerNextVideoRunning$",i),l=ye(),d=l.ui.autoplayNextEnabled$,r=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()},h=()=>{e.clickCloseIcon(),$()};Lt(()=>{e.isHide||m(),e.isHide&&s()&&(u(!1),v())});var x=Re(),I=se(x);{var T=D=>{var k=VT(),E=P(se(k),2),V=C(E),q=C(V),L=C(q,!0);S(q);var z=P(q,2);Bs(z,{onClick:h}),S(V);var j=P(V,2);j.__click=[MT,u,p];var te=C(j),ee=C(te),oe=C(ee);let ae;var le=P(oe,2);{var ce=de=>{Qd(de,{get isRunning(){return a()},onTimerEnded:y})};M(le,de=>{s()&&de(ce)})}S(ee),S(te);var X=P(te,2),_e=C(X),Ee=C(_e,!0);S(_e),S(X),S(j),S(E),N((de,ze)=>{ge(L,de),Ke(ee,`background-image: url('${e.thumb}')`),ae=ie(oe,1,"thumb-overlay s-14",null,ae,ze),ge(Ee,e.title)},[()=>s()?G("end_screen_next_video"):G("end_screen_recommended_video"),()=>({withOpacity:s()})]),b(D,k)};M(I,D=>{e.isHide||D(T)})}b(t,x),F(),o()}et(["click"]);import{clientChecker as DT}from"@vkontakte/videoplayer-core/es2015";var qb=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Lt(()=>{DT.device.isIOS&&(o=setTimeout(()=>{let a=t().querySelector("video");if(!a)return;let l=()=>e(!0),d=()=>e(!1);a.addEventListener("webkitbeginfullscreen",l),a.addEventListener("webkitendfullscreen",d),i=()=>{a.removeEventListener("webkitbeginfullscreen",l),a.removeEventListener("webkitendfullscreen",d)}},0))}),ln(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as OT}from"@vkontakte/videoplayer-core/es2015";var ap=class{constructor(e){this.video=e}getTracksArray(){return Array.from(this.video.getElementsByTagName("track"))}attach(e,i=!1){let o=document.createElement("track");o.setAttribute("src",e.url),o.setAttribute("id",e.id),e.label&&o.setAttribute("label",e.label),e.language&&o.setAttribute("srclang",e.language),i&&(o.track.mode="showing"),this.video.appendChild(o)}detachAll(){for(let e of this.getTracksArray())this.video.removeChild(e)}updateSrc(e){let i=this.getTracksArray().find(o=>o.id===e.id);i&&(i.src=e.url)}getCurrentShowingId(){var e,i;return(i=(e=this.getTracksArray().find(o=>o.track.mode==="showing"))==null?void 0:e.id)!=null?i:null}};import{clientChecker as NT}from"@vkontakte/videoplayer-core/es2015";var Qb=({store:t,getFullscreenTarget:e})=>{let{isFullscreen:i}=t.ui,{setSubtitle:o}=t.actions.internal,{currentSubtitle$:s,availableSubtitlesList$:a,currentFormat$:l,availableTextTracks$:d}=t.state,r=null,u=()=>e().querySelector("video"),m=()=>NT.device.isIOS&&he(l)===OT.DASH_LIVE_CMAF,p=()=>{r==null||r(),r=null},v=$=>{if(p(),!m()||!$)return;let y=u();if(!y)return;let h=new ap(y),x=he(d),I=he(a),T=he(s);for(let E of x)I.some(q=>q.value===E.id)&&h.attach(E,T.value===E.id);let D=d.subscribe(E=>{for(let V of E)h.updateSrc(V)}),k=()=>{let E=h.getCurrentShowingId();o(he(a).find(V=>V.value===E))};y.textTracks.addEventListener("change",k),r=()=>{D(),h.detachAll(),y.textTracks.removeEventListener("change",k)}};Lt(()=>i.subscribe(v)),ln(p)};var FT=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},UT=A("<!> <!>",1),zT=A("<div><!></div>"),WT=A('<div class="spherical-video-icon s-9"><!></div>'),KT=A("<div><!></div>"),qT=A('<div class="settings-mobile s-9"><!></div>'),QT=A("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),GT=A('<div class="player-wrapper s-9" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),YT={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 Mv(t,e){var bn,Nr;H(e,!0),Q(t,YT);let[i,o]=Be(),s=()=>w(Ne,"$playerPhase",i),a=()=>w(_i,"$isLoaderVisible",i),l=()=>w(Y,"$adPlaybackState",i),d=()=>w(Ki,"$crashed",i),r=()=>w(xs,"$notificationsToShow$",i),u=()=>w(Le,"$playbackState$",i),m=()=>w(Rt,"$graphIsOpened$",i),p=()=>w(Ye,"$interactiveHideMobileControls",i),v=()=>w(vi,"$isEnded$",i),$=()=>w(gi,"$isInteractiveExpectation$",i),y=()=>w(Et,"$controlsVisible",i),h=()=>w(bi,"$touched",i),x=()=>w(Ct,"$autoplayNextEnabled$",i),I=()=>w(di,"$postrollPassed",i),T=()=>w(hn,"$bottomNoSmooth",i),D=()=>w(nt,"$videoSize",i),k=()=>w(io,"$playerSize",i),E=()=>w(ft,"$isFullscreen",i),V=()=>w(Oe,"$position$",i),q=()=>w($e,"$duration$",i),L=()=>w(bo,"$loadedMetadata",i),z=()=>w(Ue,"$settingsMenuVisible",i),j=()=>w(Ot,"$scrubbingInProgress",i),te=()=>w(Tt,"$volumeChangingInProgress",i),ee=()=>w(Mi,"$chromecastConnected$",i),oe=()=>w(Se,"$isControlsAvailable",i),ae=()=>w(Yt,"$isInteractiveTime$",i),le=()=>w(Vi,"$isActiveLive",i),ce=()=>w(xe,"$settingsMenuOpenedByKeyboard",i),X=()=>w(Wt,"$language$",i),_e=()=>w(li,"$disabledControls$",i),Ee=()=>w(pn,"$is3DVideo",i),de=()=>w(U,"$icon3DVideoVisible",i),ze=()=>w(eo,"$chromecastDeviceName$",i),ue=()=>w(ut,"$currentSubtitle$",i),pe=()=>w(pi,"$currentSubtitleCaptions$",i),Z=()=>w(qi,"$realDuration$",i),B=()=>w(Si,"$isLive$",i),fe=()=>w(to,"$isPlaying$",i),me=()=>w(qt,"$debugPanelVisible",i),Ie=g(e,"videoContainer",15),ot=g(e,"adsSlotId",3,void 0),Me=g(e,"adsParams",3,void 0),be=g(e,"adsAutoplayParam",3,void 0),W=g(e,"duration",3,void 0),Ce=g(e,"logoTargetUrl",3,""),Ae=g(e,"showNextPrevButtons",3,!1),Qe=g(e,"nextButtonActive",3,!1),Te=g(e,"prevButtonActive",3,!1),we=g(e,"endScreenVideoTitle",3,void 0),He=g(e,"endScreenVideoThumb",3,void 0),st=g(e,"isOneVideoPlaylist",3,!1),ct=g(e,"showMiniTimer",3,!1),It=g(e,"fullScreenTarget",3,void 0),lt=g(e,"playerStarted",3,!1),ai=g(e,"showEndScreen",3,!0),{notifications$:St,graphIsOpened$:Rt}=wo(),Dt=e.store.getLogger().createComponentLog("Root component"),Wt=e.store.interfaceLanguage$,Le=e.store.state.playbackState$,Y=e.store.ads.playbackState,Oe=e.store.state.positionWithScrubbing$,$e=e.store.state.duration$,Ne=e.store.playerPhase,ft=e.store.ui.isFullscreen,Et=e.store.ui.controlsVisible,Se=e.store.ui.isControlsAvailable,Ye=e.store.ui.interactiveHideMobileControls,Ue=e.store.ui.settingsMenu.visible$,xe=e.store.ui.settingsMenu.openedByBtnKeyboard$,Ot=e.store.ui.scrubbingInProgress,Tt=e.store.ui.volumeChangingInProgress,qt=e.store.ui.debugPanelVisible,_i=e.store.state.isLoaderVisible,vi=e.store.state.isEnded$,Mi=e.store.state.chromecastConnected$,eo=e.store.state.chromecastDeviceName$,di=e.store.ads.postrollPassed,Si=e.store.state.isLive$,to=e.store.state.isPlaying$,Vi=e.store.state.isActiveLive$,ci=e.store.state.isRewindableLive$,Ki=e.store.state.crashed$,_t=e.store.webApi.annotationsApi,We=e.store.webApi.pictureInPictureApi,nt=e.store.state.videoSize$,ut=e.store.state.currentSubtitle$,pi=e.store.state.currentSubtitleCaptions$,qi=e.store.state.duration$,io=e.store.ui.playerSize,pn=e.store.ui.is3DVideo,U=e.store.ui.icon3DVideoVisible,it=e.store.state.isInteractive,Yt=e.store.state.isInteractiveTime$,gi=e.store.state.isInteractiveExpectation$,at=e.store.state.hasInteractiveBranches,li=e.store.ui.controls.disabledControls$,bi=e.store.ui.touched,Gt=e.store.ui.overlayContainer$,Ct=e.store.ui.autoplayNextEnabled$,bo=e.store.state.loadedMetadata$,Oo=e.store.actions.internal.closeSettingsMenu,fn=(bn=e.store.callbacks)==null?void 0:bn.onDisabledPlayPrevChapterClick,mn=(Nr=e.store.callbacks)==null?void 0:Nr.onDisabledSeekToInteractiveClick,Pi=e.store.actions.internal.setQuality,Ci=K(void 0),vn=K(void 0),_r=K(void 0),xi=K(void 0),So,No,Bo=f(()=>(s()==="video"&&a()||s()==="ads"&&l()==="inactive")&&!d()),gn=K(void 0),{closeNotification:es,notificationsToShow$:xs}=St,ts=f(()=>!!r().slow_video),br=()=>es("slow_video"),hn=re(!1),is,Zn=K(!1),Rr=f(()=>u()!==BT.PLAYING),Co=K(!1),os=f(()=>m()||p()||!n(Zn)&&(v()&&!!at||n(Rr)&&$())),$r=K(!0),Vn=f(()=>e.uiConfig.features.thumbTimer&&ct()&&s()==="video"&&!y()&&!d()&&!it&&(e.uiConfig.hideThumbTimerAfterTouch&&!h()||!e.uiConfig.hideThumbTimerAfterTouch)),Rn=K(!1),Dn=f(()=>(ai()||e.showAutoplayNext&&x())&&!!we()&&!!He()&&(e.showAds&&I()||!e.showAds)&&v()&&!d()&&!n(Rn)),Jn=K(!1);We==null||We.setContext(dd());let Dr=bt=>{bt&&!it&&e.uiConfig.controls.showOnStartupAtAutoplay&&ki(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:Dr});let ns=()=>{clearTimeout(So),O(Zn,!1),p()&&Ye.set(!1)},ki=bt=>{ns(),O(Zn,!0),So=setTimeout(()=>O(Zn,!1),bt);let ui=bt-100;is=setTimeout(()=>{T()&&hn.set(!1)},ui>0?ui:bt)},rs=pn.subscribe(bt=>{U.set(bt),bt&&(clearTimeout(No),No=setTimeout(()=>U.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Ho=(...ui)=>$t(null,[...ui],function*(bt=aa()){var Ut,nn,$o,$n,yo,rr;if(bt&&!Tc.device.isIOS){let oo=Od(),wr=xr(),Io=Tc.browser.isSamsungBrowser&&oo===e.shadowRootContainer;bt=oo===wr||Io}if(bt){ki(e.uiConfig.controls.hideTimeoutFullscreen);try{yield We==null?void 0:We.exit()}catch(oo){Dt({message:String(oo)})}try{let oo=(Ut=D())!=null&&Ut.width&&((nn=D())!=null&&nn.height)?D():k();yield I_(oo)}catch(oo){Dt({message:String(oo)})}}ft.set(bt),e.store.getAdmanWrapper().setFullscreen(bt),E()?($n=($o=e.store.callbacks)==null?void 0:$o.onFullscreenEnter)==null||$n.call($o):(rr=(yo=e.store.callbacks)==null?void 0:yo.onFullscreenExit)==null||rr.call(yo)}),er=bt=>{io.set(bt)},yr=()=>{if(n(Ci)){let{width:bt,height:ui}=n(Ci).getBoundingClientRect();io.set({width:bt,height:ui})}};Lt(()=>{var bt;return Pu(Ho),e.uiConfig.features.annotationsInside&&(_t==null||_t.init(n(Ci))),We==null||We.assignPlayerContainer(n(Ci)),e.uiConfig.disablePiPResizeHandling||We==null||We.setExternalEventHandlers({resize:er,leavepictureinpicture:yr}),O($r,!Tc.device.isIphoneOrOldIpad),e.interactiveContainer&&((bt=Ie().parentElement)==null||bt.insertBefore(e.interactiveContainer,Ie().nextSibling)),()=>{clearTimeout(So),clearTimeout(is),clearTimeout(No),rs(),We==null||We.dispose().catch(ui=>{Dt({message:String(ui)})}),ku(Ho)}});let tr=K(!0),pt=K(!0),Zt=bt=>{let ui=V()+(bt==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;ui<0?(O(tr,!1),ui=0):ui>=q()&&(O(pt,!1),ui=q()),O(Co,!0),e.seekTime(ui)},xr=()=>Tc.device.isIOS?n(Ci):!e.uiConfig.allowChangingFullscreenTarget||!It()?e.outerContainerRef:It().contains(e.outerContainerRef)?It():e.outerContainerRef,ss=()=>$t(null,null,function*(){try{if(aa())yield Eu(document),Dt({message:"exit fullscreen"});else{if(Dt({message:"request fullscreen"}),Tc.device.isIOS&&!L())return;yield Iu(xr())}}catch(bt){Dt({message:String(bt)})}}),ir=()=>{Oo()},on=bt=>{if(bt.preventDefault(),z()){ir();return}if(!lt()){e.firstStart(),ki(e.uiConfig.controls.hideTimeoutCursor);return}O(Co,!1),y()?ns():ki(e.uiConfig.controls.hideTimeoutMobile)},On=()=>{bi.set(!0)},or=()=>{it||(hn.set(!0),ki(e.uiConfig.controls.hideTimeoutCursor))},Or=bt=>{fn&&(fn(bt),ki(e.uiConfig.controls.hideTimeoutMobile))},Fo=bt=>{mn&&(mn(bt),ki(e.uiConfig.controls.hideTimeoutMobile))};Fe(()=>{Gt.set(n(gn))}),Fe(()=>{Et.set((n(Rr)||z()||j()||te()||ee()||!n(Dn)&&(v()||n(Zn)&&!n(Co)))&&!n(os)&&s()==="video"&&!d()&&oe())}),Fe(()=>{!j()&&n(Jn)&&!ae()&&ki(e.uiConfig.controls.hideTimeoutMobile),O(Jn,j(),!0)}),Fe(()=>{O(tr,V()>0),O(pt,!le()&&V()<q(),!0)}),Fe(()=>{zd(n(xi),z(),ce(),!0)});let _n=G("aria_label_video_player");qb({fullScreenChangeHandler:Ho,getFullscreenTarget:xr}),Qb({store:e.store,getFullscreenTarget:xr});let Nn=(bt,ui)=>{var $n,yo;let Ut=(yo=($n=e.store.callbacks)==null?void 0:$n.uiInfo)==null?void 0:yo.onUpcomingLiveViewStateChanged;if(!Ut)return;let nn=!!ui,$o=Ge(Ge({},jn(n(Ci),{upcomingLiveScreen:ui},"upcomingLiveScreen",nn)),bt);Ut($o)};var uo=GT();ht("blur",Aa,ir);var To=C(uo);nl(To,{onClick:on,get videoContainer(){return Ie()},set videoContainer(bt){Ie(bt)}});var Bn=P(To,2);Oa(Bn,()=>"slot",!1,(bt,ui)=>{lo(bt,()=>({name:ol}))});var Ri=P(Bn,2);Vs(Ri,X,bt=>{var ui=QT(),Ut=se(ui);let nn=f(()=>s()!=="thumb"||d()||it&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);el(Ut,{get hidden(){return n(nn)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var $o=P(Ut,2);{var $n=Ze=>{var Qt=UT(),Ai=se(Qt);{var xn=Wo=>{let Cr=f(()=>e.uiConfig.controls.seekStepMobile/1e3);sp(Wo,{side:"left",get seekStep(){return n(Cr)},handleSingleFirstClick:on,handleSecondClick:()=>Zt("backward")})};M(Ai,Wo=>{n(tr)&&Wo(xn)})}var ro=P(Ai,2);{var Ur=Wo=>{let Cr=f(()=>e.uiConfig.controls.seekStepMobile/1e3);sp(Wo,{side:"right",get seekStep(){return n(Cr)},handleSingleFirstClick:on,handleSecondClick:()=>Zt("forward")})};M(ro,Wo=>{n(pt)&&Wo(Ur)})}b(Ze,Qt)};M($o,Ze=>{e.canRewindLive&&ci&&!_e().has("TIMELINE")&&Ze($n)})}var yo=P($o,2);{var rr=Ze=>{let Qt=f(()=>{var Ai;return(Ai=e.live)==null?void 0:Ai.startTime});$c(Ze,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(Qt)},onUpcomingLiveViewStateChanged:Nn})};M(yo,Ze=>{s()==="LiveWaitingStart"&&Ze(rr)})}var oo=P(yo,2);{var wr=Ze=>{tl(Ze,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};M(oo,Ze=>{s()==="LiveWaitingRecover"&&Ze(wr)})}var Io=P(oo,2);{var yn=Ze=>{tl(Ze,{kind:"record",get thumbUrl(){return e.thumbUrl}})};M(Io,Ze=>{s()==="LiveWaitingRecord"&&Ze(yn)})}var as=P(Io,2);{var Br=Ze=>{var Qt=zT();let Ai;var xn=C(Qt);Nd(xn,{get adsSlotId(){return ot()},get adsParams(){return Me()},get adsAutoplayParam(){return be()},get duration(){return W()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson}}),S(Qt),N(ro=>Ai=ie(Qt,1,"ads-container s-9",null,Ai,ro),[()=>({hidden:s()!=="ads"})]),b(Ze,Qt)};M(as,Ze=>{e.showAds&<()&&Ze(Br)})}var ls=P(as,2);{var no=Ze=>{let Qt=f(()=>!ai()&&e.showAutoplayNext&&x());Lv(Ze,{get title(){return we()},get thumb(){return He()},get isHide(){return n(Qt)},clickCloseIcon:()=>O(Rn,!0)})};M(ls,Ze=>{n(Dn)&&we()&&He()&&Ze(no)})}var ds=P(ls,2);{var Hr=Ze=>{_c(Ze,{})};M(ds,Ze=>{Ee()&&Ze(Hr)})}var Eo=P(ds,2);{var Fr=Ze=>{var Qt=WT(),Ai=C(Qt);Dd(Ai,{}),S(Qt),b(Ze,Qt)};M(Eo,Ze=>{de()&&Ze(Fr)})}var Hn=P(Eo,2);{var po=Ze=>{bc(Ze,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return ze()},onClick:on})};M(Hn,Ze=>{ee()&&Ze(po)})}var fo=P(Hn,2);{var je=Ze=>{Za(Ze,{get shifted(){return y()},get captions(){return pe()},get position(){return V()},get playerSize(){return k()},isMobile:!0})};M(fo,Ze=>{ue().value!=="off"&&Ze(je)})}var At=P(fo,2);{var fi=Ze=>{var Qt=KT();Qt.__click=[FT,z,Ue,ir];var Ai=C(Qt);Ja(Ai,{}),S(Qt),b(Ze,Qt)};M(At,Ze=>{d()&&Ze(fi)})}var Po=P(At,2);{var ko=Ze=>{let Qt=f(()=>s()==="thumb"||s()==="LiveWaitingStart"||s()==="LiveWaitingRecover"||s()==="LiveWaitingRecord"||s()==="ads"),Ai=f(()=>s()==="ads"),xn=f(()=>e.canRewindLive&&Z()!==0);gc(Ze,{get bottomHidden(){return n(Qt)},get showControls(){return y()},get bottomNoSmooth(){return T()},get isAds(){return n(Ai)},get canRewindLive(){return n(xn)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Ce()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Ae()},get nextButtonActive(){return Qe()},get prevButtonActive(){return Te()},get isOneVideoPlaylist(){return st()},get customFullscreenSupported(){return n($r)},get endScreenShown(){return n(Dn)},toggleFullscreen:ss,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:Or,onDisabledSeekToInteractiveClick:Fo,get playerControlsWrapperRef(){return n(vn)},set playerControlsWrapperRef(ro){O(vn,ro,!0)},get playerControlsRef(){return n(_r)},set playerControlsRef(ro){O(_r,ro,!0)}})};M(Po,Ze=>{lt()&&Ze(ko)})}var xo=P(Po,2);{var mo=Ze=>{var Qt=qT(),Ai=C(Qt);wc(Ai,{get supportLink(){return e.supportLink},get returnFocus(){return HT},get ref(){return n(xi)},set ref(xn){O(xi,xn,!0)}}),S(Qt),b(Ze,Qt)};M(xo,Ze=>{z()&&Ze(mo)})}var Ao=P(xo,2);let sr=f(()=>!n(Vn));Fd(Ao,{get isLive(){return B()},get isHidden(){return n(sr)},get isPlaying(){return fe()},get position(){return V()},get duration(){return q()}});var ar=P(Ao,2);{var Uo=Ze=>{za(Ze,{})};M(ar,Ze=>{n(Bo)&&Ze(Uo)})}var Ni=P(ar,2);{var Fn=Ze=>{qd(Ze,{})};M(Ni,Ze=>{me()&&Ze(Fn)})}var zo=P(Ni,2);{var Sr=Ze=>{Sc(Ze,{onClose:br,onSelectAutoQuality:()=>{Pi("auto"),br()}})};M(zo,Ze=>{n(ts)&&Ze(Sr)})}b(bt,ui)});var nr=P(Ri,2);tt(nr,bt=>O(gn,bt),()=>n(gn)),S(uo),tt(uo,bt=>O(Ci,bt),()=>n(Ci)),N(()=>De(uo,"aria-label",_n)),ht("click",uo,On,!0),ht("focusin",uo,or,!0),b(t,uo),F(),o()}et(["click"]);import{debounceFn as jT}from"@vkontakte/videoplayer-shared/es2015";var XT=A('<div class="time-container s-8"><!></div>'),ZT=A('<div class="player-wrapper s-8" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),JT={hash:"s-8",code:".player-wrapper.s-8{height:100%;position:absolute;width:100%}.player-wrapper.s-8 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.timeline.s-8{bottom:0;left:0;opacity:0;opacity:1;position:absolute;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.visible.s-8{opacity:1}.time-container.s-8{bottom:8px;position:absolute;right:8px;z-index:var(--thumb-timer-z-index)}"};function Vv(t,e){H(e,!0),Q(t,JT);let[i,o]=Be(),s=()=>w(ae,"$scrubbingInProgress",i),a=()=>w(ee,"$playerSize",i),l=()=>w(V,"$isPlaying$",i),d=()=>w(k,"$duration$",i),r=()=>w(z,"$positionWithScrubbing$",i),u=()=>w(T,"$playerPhase",i),m=()=>w(D,"$crashed$",i),p=()=>w(q,"$currentSubtitle$",i),v=()=>w(L,"$currentSubtitleCaptions$",i),$=()=>w(E,"$positionExact$",i),y=()=>w(j,"$isLive$",i),h=()=>w(te,"$isRewindableLive$",i),x=g(e,"outsideDuration",3,0),I=g(e,"videoContainer",15),{playerPhase:T,state:{crashed$:D,duration$:k,positionExact$:E,isPlaying$:V,currentSubtitle$:q,currentSubtitleCaptions$:L,positionWithScrubbing$:z,isLive$:j,isRewindableLive$:te},ui:{playerSize:ee,controls:oe,scrubbingInProgress:ae},actions:{internal:{getVideoElement:le}}}=ye(),ce=8,X=K(!1),_e=si({}),Ee=K(!1),de=f(()=>!s()&&!n(Ee)),ze=()=>{O(X,!0)},ue=()=>{O(X,!1)},pe=jT(Yl,260);Fe(()=>{a(),pe(le(),oe,_e,n(X))});let Z=f(()=>l()?tn(d()-r()):tn(isFinite(d())?d():x()));var B=ZT(),fe=C(B);nl(fe,{hideCursor:!1,get videoContainer(){return I()},set videoContainer(we){I(we)}});var me=P(fe,2);Oa(me,()=>"slot",!1,(we,He)=>{lo(we,()=>({name:ol}))});var Ie=P(me,2);let ot=f(()=>u()!=="thumb"||m());el(Ie,{get hidden(){return n(ot)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var Me=P(Ie,2);{var be=we=>{Za(we,{shifted:!1,get captions(){return v()},get position(){return $()},get playerSize(){return a()}})};M(Me,we=>{p().value!=="off"&&n(de)&&we(be)})}var W=P(Me,2);{var Ce=we=>{var He=XT(),st=C(He);Hd(st,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(Z)}}),S(He),b(we,He)};M(W,we=>{n(de)&&we(Ce)})}var Ae=P(W,2);let Qe;var Te=C(Ae);ja(Te,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return h()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:ce,tooltipRightOffset:ce,get ref(){return _e.timeline},set ref(we){_e.timeline=we}}),S(Ae),S(B),N(we=>Qe=ie(Ae,1,"timeline s-8",null,Qe,we),[()=>({visible:n(X)})]),ht("mouseenter",B,ze),ht("mouseleave",B,ue),ht("mouseenter",Ae,()=>O(Ee,!0)),ht("mouseleave",Ae,()=>O(Ee,!1)),b(t,B),F(),o()}var nI=A("<div><!></div>"),rI={hash:"s-1",code:'.vk-vp-root.s-1{--white:#fff;--black:#000;--red:#ff3347;--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--controls-desktop-padding-horizontal-minimal-view:8px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px;--interactive-episode-complete:#5c9ce6;--slider-bg:hsla(0,0%,100%,.4);--slider-filled-bg:var(--white);--slider-handle-bg:var(--white);--slider-loaded-bg:hsla(0,0%,100%,.4);--slider-height:3px;--slider-video-episode-gap:1.5px;--slider-radius:0px;--slider-handle-size:12px;--slider-filled-ads:#67a5eb;--slider-disabled-color:hsla(0,0%,97%,.31);--slider-volume-height:5px;--slider-volume-radius:calc(var(--slider-volume-height)/2);--slider-volume-handle-size:13px;--timeline-slider-filled-active-live-bg:var(--red);--timeline-slider-handle-active-live-bg:var(--red);--timeline-slider-bg:var(--slider-bg);--timeline-slider-filled-bg:var(--slider-filled-bg);--timeline-slider-handle-bg:var(--slider-handle-bg);--timeline-slider-loaded-bg:var(--slider-loaded-bg);--volume-slider-bg:var(--slider-bg);--volume-slider-filled-bg:var(--slider-filled-bg);--volume-slider-handle-bg:var(--slider-handle-bg);--controls-time:var(--white);--controls-gradient:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.005) 6.67%,rgba(0,0,0,.02) 13.33%,rgba(1,1,1,.04) 20%,rgba(1,1,1,.07) 26.67%,rgba(2,2,2,.11) 33.33%,rgba(3,3,3,.16) 40%,rgba(4,4,4,.22) 46.67%,rgba(6,6,6,.28) 53.33%,rgba(7,7,7,.33) 60%,rgba(8,8,8,.38) 66.67%,rgba(9,9,9,.42) 73.33%,rgba(9,9,9,.46) 80%,hsla(0,0%,4%,.48) 86.67%,hsla(0,0%,4%,.5));--timeline-preview-shadow:rgba(0,0,0,.08);--timeline-preview-bg:#222;--timeline-padding-horizontal:10px;--timeline-padding-vertical-top:3px;--timeline-padding-vertical-bottom:4px;--timeline-height:calc(var(--timeline-padding-vertical-bottom) + var(--timeline-padding-vertical-top) + var(--slider-height));--preview-track-frame-height-vertical:114px;--preview-track-frame-height-horizontal:65px;--preview-track-controls-top:16px;--preview-track-time-line-height:16px;--preview-track-bottom-offset:10px;--preview-track-height:calc(var(--preview-track-frame-height-vertical) + var(--preview-track-bottom-offset));--preview-track-controls-top-offset:calc(var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height));--settings-bg:rgba(0,0,0,.72);--settings-item-bg-hover:hsla(0,0%,100%,.08);--settings-radius:8px;--mobile-settings-bg:#2c2d2e;--divider-border:1px solid var(--white-alpha-24);--toggle-color-separator:#363738;--toggle-color-off:#656565;--toggle-color-on:#71aaeb;--toggle-color-autoplay-on:var(--white);--notification-bg:#2c2d2e;--notification-radius:8px;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--controls-container-z-index:1;--ads-container-z-index:1;--end-screen-mobile-z-index:1;--notification-z-index:1;--thumb-timer-z-index:2;--debug-panel-z-index:2;--modal-z-index:2;--settings-menu-z-index:2;--context-menu-z-index:3;--hot-key-helpers-container-z-index:3;--overlay-container-z-index:4;--rotate-transition-duration:0.25s;--btn-color:var(--white);--double-forward-bg:rgba(0,0,0,.6);background:var(--black);color:var(--white);font-family:var(--vk-vp-custom-font,var(--font));font-size:12px;height:100%;line-height:normal;outline:0;overflow:hidden;position:relative;user-select:none;width:100%}.vk-vp-root.visible-outside.s-1{overflow:visible}.vk-vp-root.s-1 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-1 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-1 p{margin:0}.vk-vp-root.s-1 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-1 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-1 :focus,.vk-vp-root.s-1 :focus-visible{outline:none}.vk-vp-root.s-1 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-1 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-1 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-1 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-1 .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-1 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-1 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function Dv(t,e){H(e,!0),Q(t,rI);let[i,o]=Be(),s=()=>w(lt,"$isLive$",i),a=()=>w(_t,"$availableSubtitlesList$",i),l=()=>w(We,"$isPreviewTrackHorizontallyAligned$",i),d=g(e,"sources",7),r=g(e,"store",7),u=g(e,"microStoresRoot",7),m=g(e,"videoConfig",7),p=g(e,"uiConfig",7),v=g(e,"title",7),$=g(e,"thumbUrl",7),y=g(e,"interactiveContainer",7),h=g(e,"interactiveController",7),x=g(e,"subtitles",7),I=g(e,"subtitlesForcedLanguage",7),T=g(e,"live",7),D=g(e,"preload",7),k=g(e,"autoplay",7),E=g(e,"volume",7,void 0),V=g(e,"muted",7,void 0),q=g(e,"fromTime",7),L=g(e,"canRewindLive",7),z=g(e,"showAds",7),j=g(e,"adsSlotId",7,void 0),te=g(e,"adsParams",7,void 0),ee=g(e,"adsAutoplayParam",7,void 0),oe=g(e,"duration",7,void 0),ae=g(e,"logoClickable",7),le=g(e,"logoHidden",7),ce=g(e,"isMobile",7),X=g(e,"showNextPrevButtons",7,!1),_e=g(e,"nextButtonActive",7,!1),Ee=g(e,"prevButtonActive",7,!1),de=g(e,"endScreenVideoTitle",7,void 0),ze=g(e,"endScreenVideoThumb",7,void 0),ue=g(e,"isOneVideoPlaylist",7,!1),pe=g(e,"supportLink",7),Z=g(e,"shadowRootContainer",7),B=g(e,"outerContainerRef",7),fe=g(e,"fullScreenTarget",7,void 0),me=g(e,"failoverHosts",7,void 0),Ie=g(e,"showMiniTimer",7,!1),ot=g(e,"saveRate",7),Me=g(e,"seekToInteractive",7,Gb),be=g(e,"playPrevChapter",7,Gb),W=g(e,"volumeMultiplier",7),Ce=g(e,"showAutoplayNext",7),Ae=g(e,"showEndScreen",7,!0),Qe=g(e,"keyboardControls",15,void 0),{subscribers:Te,stores:we}=u();Dh(p());let He=Mt(),st=p().logoLink,ct=r().ui.debugPanelVisible,It=r().ui.playerSize,lt=r().state.isLive$,St=r().state.isInteractive&&Rv.device.isAndroid,Rt=K(void 0),Dt=null,Wt=K(!1);r().getAdmanWrapper().init({switchFromAdsToVideo:r().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:r().actions.internal.switchFromVideoToAds,setMuted:r().actions.external.setMuted},r().ads,{vsid:r().vsid}),qh(r(),we),Fe(()=>{var U,it;r().ui.isMobile.set(ce()),(it=(U=m().callbacks)==null?void 0:U.onDomReady)==null||it.call(U)});let Le=(U=!1)=>{O(Wt,!0),U?r().actions.external.firstStart(z()):r().actions.internal.firstStart(z())},Y=()=>{if(He.features.qualityDetailsSubMenuEnabled){let U=v_(r().videoId);if(U)switch(U.type){case"high_quality":r().actions.internal.setHighQualityEnabled(!0,U.appliesTo);break;case"traffic_saving":r().actions.internal.setTrafficSavingEnabled(!0,U.appliesTo);break;case"exact_quality":r().actions.internal.setQuality(U.quality);break}}else{g_(r().videoId),kf()&&r().actions.internal.setTrafficSavingEnabled(!0);let it=If(r().videoId);it&&r().actions.internal.setQuality(it)}};function Oe(U){var li,bi,Gt;let it=d()||U;it&&r().initVideo({container:n(Rt),sources:it,failoverHosts:me(),subtitles:x(),subtitlesForcedLanguage:I(),volumeMultiplier:W()});let Yt=tI.get(Ad)==="true";ct.set(Yt),q()>0&&r().actions.external.seekTime(q());let gi=ce()?He.volumeDefault:(bi=(li=E())!=null?li:xu())!=null?bi:He.volumeDefault,at=(Gt=V())!=null?Gt:d_();if(r().actions.external.setVolume(gi),r().actions.external.setMuted(at),r().getAdmanWrapper().setInitialVolume(at?0:gi),Y(),He.features.saveRate&&ot()){let Ct=p_();Ct&&!s()&&r().actions.internal.setPlaybackRate(Ct)}if(Ce()){let Ct=m_();Ct&&r().actions.internal.setAutoplayNextEnabled(Ct)}r().ui.isAutoplay.set(k()),k()&&Le(),D()&&He.features.preload&&r().actions.internal.preload()}let $e=U=>{if(window.ResizeObserver){let it,Yt;Dt=new ResizeObserver(iI(gi=>{let at=gi[0];if(at.contentBoxSize){let li=Array.isArray(at.contentBoxSize)?at.contentBoxSize[0]:at.contentBoxSize;it=li.inlineSize,Yt=li.blockSize}else at.contentRect&&(it=at.contentRect.width,Yt=at.contentRect.height);It.set({width:it,height:Yt})},300)),Dt.observe(U)}U.clientWidth&&U.clientHeight&&It.set({width:U.clientWidth,height:U.clientHeight})},Ne=()=>{document.hidden&&r().actions.external.stop()};Lt(()=>{var Yt,gi,at,li;St&&document.addEventListener("visibilitychange",Ne),He.debugLog&&r().actions.internal.startLogging(),$e(n(Rt));let U=Te.map(bi=>bi.init({store:r(),microStores:we,config:m(),interactiveController:h(),uiConfig:p()})),it=()=>{St&&document.removeEventListener("visibilitychange",Ne),Dt==null||Dt.disconnect(),U.forEach(bi=>bi.unsubscribe()),r().destroy()};return((Yt=T())==null?void 0:Yt.status)==="upcoming"?(r().actions.internal.setLiveWaitingStart(!0),it):((gi=T())==null?void 0:gi.status)==="waiting"?(r().actions.internal.setLiveWaitingRecover(!0),it):(((at=T())==null?void 0:at.status)==="finished"||((li=T())==null?void 0:li.status)==="postlive")&&!(d()&&eI(d()))?(r().actions.internal.setLiveWaitingRecord(!0),it):(Oe(),it)});function ft(){n(Wt)?r().actions.external.play():Le(!0)}function Et(){r().actions.external.pause()}function Se(U){r().actions.external.setMuted(U)}function Ye(){r().actions.external.toggleSubtitle()}function Ue(U,it){r().actions.external.changeSubtitle(U,it)}function xe(U){r().actions.external.changeAudioStream(U)}function Ot(){var U;(U=r().webApi.slotsApi)!=null&&U.haveSlots()&&r().actions.external.hideControls()}function Tt(){var U;(U=r().webApi.slotsApi)!=null&&U.haveSlots()&&r().actions.external.showControls()}function qt(U){ce()||U>=0&&U<=1&&r().actions.external.setVolume(U)}function _i(U){r().actions.internal.seekTime(U,oI.UNKNOWN)}function vi(U){r().actions.external.seekEpisodeStartTime(U)}function Mi(){r().actions.external.returnFocusToEpisodes()}function eo(U){r().actions.external.setPlaybackRate(U)}function di(U){r().actions.external.setAutoQualityLimits(U)}function Si(){r().actions.external.setQuality("auto")}function to(U){r().actions.external.setTrafficSavingEnabled(U)}function Vi(U){r().actions.external.setHighQualityEnabled(U)}let ci=Ku(He.view),Ki=m().playerView==="preview",_t=r().state.availableSubtitlesList$;if(He.features.initSubtitles){let U=!1;Fe(()=>{var it;if(!U&&a().length){U=!0;let Yt;if(He.features.userVideoPrefs&&r().videoId){let at=Tu(He.userSalt,String(r().videoId));at!=null&&at.subtitleTrackId&&(Yt=a().find(li=>li.value===at.subtitleTrackId))}let gi=(it=I())!=null?it:Lf();gi&&(Yt=a().find(at=>at.language===gi)),r().actions.internal.setSubtitle(Yt)}})}let We=r().ui.isPreviewTrackHorizontallyAligned;var nt=nI();let ut;var pi=C(nt);{var qi=U=>{Mv(U,{get store(){return r()},get uiConfig(){return He},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return k()},get canRewindLive(){return L()},get showAds(){return z()},get adsSlotId(){return j()},get adsParams(){return te()},get adsAutoplayParam(){return ee()},get duration(){return oe()},get logoClickable(){return ae()},get logoHidden(){return le()},get logoTargetUrl(){return st},get nextButtonActive(){return _e()},get prevButtonActive(){return Ee()},get endScreenVideoTitle(){return de()},get endScreenVideoThumb(){return ze()},get isOneVideoPlaylist(){return ue()},get supportLink(){return pe()},get shadowRootContainer(){return Z()},get outerContainerRef(){return B()},get fullScreenTarget(){return fe()},get showMiniTimer(){return Ie()},get playerStarted(){return n(Wt)},get seekToInteractive(){return Me()},get playPrevChapter(){return be()},firstStart:Le,seekTime:_i,get showEndScreen(){return Ae()},get showAutoplayNext(){return Ce()},get showNextPrevButtons(){return X()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson},get videoContainer(){return n(Rt)},set videoContainer(it){O(Rt,it,!0)}})},io=U=>{var it=Re(),Yt=se(it);{var gi=li=>{Vv(li,{get thumbUrl(){return $()},get outsideDuration(){return oe()},get canRewindLive(){return L()},get videoContainer(){return n(Rt)},set videoContainer(bi){O(Rt,bi,!0)}})},at=li=>{Av(li,{get store(){return r()},get uiConfig(){return He},get title(){return v()},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return k()},get canRewindLive(){return L()},get showAds(){return z()},get adsSlotId(){return j()},get adsParams(){return te()},get adsAutoplayParam(){return ee()},get duration(){return oe()},get logoClickable(){return ae()},get logoHidden(){return le()},get logoTargetUrl(){return st},get nextButtonActive(){return _e()},get prevButtonActive(){return Ee()},get endScreenVideoTitle(){return de()},get endScreenVideoThumb(){return ze()},get isOneVideoPlaylist(){return ue()},get supportLink(){return pe()},get shadowRootContainer(){return Z()},get outerContainerRef(){return B()},get fullScreenTarget(){return fe()},get showMiniTimer(){return Ie()},get playerStarted(){return n(Wt)},get seekToInteractive(){return Me()},get playPrevChapter(){return be()},firstStart:Le,get showEndScreen(){return Ae()},get showAutoplayNext(){return Ce()},get showNextPrevButtons(){return X()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(Rt)},set videoContainer(bi){O(Rt,bi,!0)},get keyboardControls(){return Qe()},set keyboardControls(bi){Qe(bi)}})};M(Yt,li=>{Ki?li(gi):li(at,!1)})}b(U,it)};M(pi,U=>{ce()?U(qi):U(io,!1)})}S(nt),N(U=>{ut=ie(nt,1,"vk-vp-root s-1",null,ut,U),Ke(nt,ci)},[()=>({"root--miui-browser":Rv.device.isMobile&&Rv.browser.isMiuiBrowser,"visible-outside":Ki,"preview-track-horizontally-alinged":l()})]),b(t,nt);var pn=F({initVideo:Oe,play:ft,pause:Et,setMuted:Se,toggleSubtitle:Ye,changeSubtitle:Ue,changeAudioStream:xe,hideControls:Ot,showControls:Tt,setVolume:qt,seekTime:_i,seekEpisodeStartTime:vi,returnFocusToEpisodes:Mi,setPlaybackRate:eo,setAutoQualityLimits:di,setAutoQuality:Si,toggleTrafficSaving:to,toggleHighQuality:Vi,get sources(){return d()},set sources(U){d(U)},get store(){return r()},set store(U){r(U)},get microStoresRoot(){return u()},set microStoresRoot(U){u(U)},get videoConfig(){return m()},set videoConfig(U){m(U)},get uiConfig(){return p()},set uiConfig(U){p(U)},get title(){return v()},set title(U){v(U)},get thumbUrl(){return $()},set thumbUrl(U){$(U)},get interactiveContainer(){return y()},set interactiveContainer(U){y(U)},get interactiveController(){return h()},set interactiveController(U){h(U)},get subtitles(){return x()},set subtitles(U){x(U)},get subtitlesForcedLanguage(){return I()},set subtitlesForcedLanguage(U){I(U)},get live(){return T()},set live(U){T(U)},get preload(){return D()},set preload(U){D(U)},get autoplay(){return k()},set autoplay(U){k(U)},get volume(){return E()},set volume(U){E(U)},get muted(){return V()},set muted(U){V(U)},get fromTime(){return q()},set fromTime(U){q(U)},get canRewindLive(){return L()},set canRewindLive(U){L(U)},get showAds(){return z()},set showAds(U){z(U)},get adsSlotId(){return j()},set adsSlotId(U){j(U)},get adsParams(){return te()},set adsParams(U){te(U)},get adsAutoplayParam(){return ee()},set adsAutoplayParam(U){ee(U)},get duration(){return oe()},set duration(U){oe(U)},get logoClickable(){return ae()},set logoClickable(U){ae(U)},get logoHidden(){return le()},set logoHidden(U){le(U)},get isMobile(){return ce()},set isMobile(U){ce(U)},get showNextPrevButtons(){return X()},set showNextPrevButtons(U){X(U)},get nextButtonActive(){return _e()},set nextButtonActive(U){_e(U)},get prevButtonActive(){return Ee()},set prevButtonActive(U){Ee(U)},get endScreenVideoTitle(){return de()},set endScreenVideoTitle(U){de(U)},get endScreenVideoThumb(){return ze()},set endScreenVideoThumb(U){ze(U)},get isOneVideoPlaylist(){return ue()},set isOneVideoPlaylist(U){ue(U)},get supportLink(){return pe()},set supportLink(U){pe(U)},get shadowRootContainer(){return Z()},set shadowRootContainer(U){Z(U)},get outerContainerRef(){return B()},set outerContainerRef(U){B(U)},get fullScreenTarget(){return fe()},set fullScreenTarget(U){fe(U)},get failoverHosts(){return me()},set failoverHosts(U){me(U)},get showMiniTimer(){return Ie()},set showMiniTimer(U){Ie(U)},get saveRate(){return ot()},set saveRate(U){ot(U)},get showAutoplayNext(){return Ce()},set showAutoplayNext(U){Ce(U)},get seekToInteractive(){return Me()},set seekToInteractive(U){Me(U)},get playPrevChapter(){return be()},set playPrevChapter(U){be(U)},get volumeMultiplier(){return W()},set volumeMultiplier(U){W(U)},get showEndScreen(){return Ae()},set showEndScreen(U){Ae(U)},get keyboardControls(){return Qe()},set keyboardControls(U){Qe(U)}});return o(),pn}var sI=ke('<defs><path id="rect" d="m2.72 0c.45 0 .6.05.77.13a1 1 0 01.38.38c.09.16.13.33.13.77v1.44c0 .44-.04.6-.13.77a1 1 0 01-.38.38c-.16.08-.32.13-.77.13h-1.44c-.44 0-.6-.05-.77-.13a1 1 0 01-.37-.38c-.1-.16-.14-.33-.14-.77v-1.44c0-.44.05-.6.13-.77a1 1 0 01.38-.38c.17-.08.33-.13.77-.13z"></path></defs><path d="M38.24 6c3.57 0 4.86.37 6.17 1.07a7.3 7.3 0 0 1 3.02 3.02c.7 1.3 1.07 2.6 1.07 6.17v23.49c0 3.56-.37 4.85-1.07 6.16a7.3 7.3 0 0 1-3.02 3.02c-1.3.7-2.6 1.07-6.16 1.07h-19.5c-3.56 0-4.85-.37-6.16-1.07a7.3 7.3 0 0 1-3.02-3.02c-.7-1.3-1.07-2.6-1.07-6.16v-23.5c0-3.56.37-4.85 1.07-6.16a7.3 7.3 0 0 1 3.02-3.02C13.9 6.37 15.2 6 18.76 6zm.32 3h-19.8c-2.8 0-3.77.19-4.75.71a4.3 4.3 0 0 0-1.8 1.8c-.5.95-.7 1.87-.7 4.43l-.01 23.8c0 2.8.19 3.76.71 4.75a4.3 4.3 0 0 0 1.8 1.8c.98.52 1.95.71 4.75.71h19.49c2.8 0 3.76-.19 4.74-.71a4.3 4.3 0 0 0 1.8-1.8c.52-.98.71-1.95.71-4.74v-23.5c0-2.8-.19-3.75-.71-4.74a4.3 4.3 0 0 0-1.8-1.8c-.95-.5-1.87-.7-4.43-.7z"></path><use xlink:href="#rect" x="16.5" y="14"></use><use xlink:href="#rect" x="16.5" y="22"></use><use xlink:href="#rect" x="16.5" y="30"></use><use xlink:href="#rect" x="16.5" y="38"></use><use xlink:href="#rect" x="37" y="14"></use><use xlink:href="#rect" x="37" y="22"></use><use xlink:href="#rect" x="37" y="30"></use><use xlink:href="#rect" x="37" y="38"></use>',1);function Ov(t,e){let i=g(e,"isWhite",3,!1),o=f(()=>i()?"#fff":"#909499");Xe(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(s,a)=>{var l=sI();Xt(9),b(s,l)},$$slots:{default:!0}})}var aI=A('<div class="title s-2"> </div>'),lI=A('<div class="playerStub s-2"><!> <!></div>'),dI={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 Nv(t,e){Q(t,dI);var i=lI(),o=C(i);{var s=d=>{var r=aI(),u=C(r,!0);S(r),N(()=>ge(u,e.title)),b(d,r)};M(o,d=>{e.title&&d(s)})}var a=P(o,2);{var l=d=>{let r=f(()=>!!e.thumbUrl);Ov(d,{get isWhite(){return n(r)}})};M(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}S(i),N(()=>Ke(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}var cI=A('<div class="playerError s-3"><!></div>'),uI={hash:"s-3",code:".playerError.s-3{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}"};function Bv(t){Q(t,uI);var e=cI(),i=C(e);Ja(i,{}),S(e),b(t,e)}import{AppTracer as DI,now as OI,ValueSubject as NI,withoutNullable as BI}from"@vkontakte/videoplayer-shared/es2015";import{cloneDeepWith as HI,InterfaceLanguage as FI,isNonNullable as i$,Logger as UI,Observable as zI,Subscription as o$,once as WI,InternalsExposure as KI,skip as qI,getPlayerId as QI}from"@vkontakte/videoplayer-shared/es2015";import{clientChecker as n$,isMobile as GI}from"@vkontakte/videoplayer-core/es2015";import{OneStat as YI,ThinOneStat as jI,MediascopePixel as XI}from"@vkontakte/videoplayer-statistics/es2015";import{Logger as pI,Subscription as fI}from"@vkontakte/videoplayer-shared/es2015";var lp=class{constructor(){this.subscription=new fI,this.logger=new pI,this.log=this.logger.createComponentLog("MediaSessionApi")}isSupported(){return"mediaSession"in navigator}setMetaData({title:e,artist:i="",thumbUrl:o=""}){this.isSupported()&&(navigator.mediaSession.metadata=new MediaMetadata({title:e,artist:i,artwork:[{src:o,sizes:"96x96",type:"image/png"},{src:o,sizes:"128x128",type:"image/png"},{src:o,sizes:"192x192",type:"image/png"},{src:o,sizes:"256x256",type:"image/png"},{src:o,sizes:"384x384",type:"image/png"},{src:o,sizes:"512x512",type:"image/png"}]}))}updateActionHandlers(e){this.resetActionHandlers(),this.setActionHandlers(e)}resetActionHandlers(){let e=[["play",null],["pause",null],["stop",null],["nexttrack",null],["previoustrack",null],["seekto",null],["seekbackward",null],["seekforward",null]];this.setActionHandlers(e)}setActionHandlers(e){var i,o;if(this.isSupported())for(let[s,a]of e)try{(o=(i=navigator.mediaSession).setActionHandler)==null||o.call(i,s,a)}catch(l){throw new Error(`The media session action "${s}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{var a,l;let o=he(e.state.currentPlaybackRate$),s=he(e.state.duration$);if(!(!isFinite(i)||!isFinite(s)))try{(l=(a=navigator.mediaSession).setPositionState)==null||l.call(a,{position:i,playbackRate:o,duration:s})}catch(d){this.log({message:`MediaSession setPositionState can't call with position: ${i} and duration: ${s}`})}})))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};function Ic(t,e){var s,a;let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let l of i)o[l]=(a=(s=e[l])!=null?s:t[l])!=null?a:void 0;return o}var Yb="Inner error. Unexpectedly root annotation container null reference exception",jb="Annotation with such name already exists",Xb="Annotation with such name does not exist";var Jl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as mI,Subscription as vI,throttleFn as gI}from"@vkontakte/videoplayer-shared/es2015";var hI="1",_I=100,dp=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new vI}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=gI(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},_I);this.subscriptions.add(mI(this.rootAnnotationsContainer).subscribe(({width:o,height:s})=>{this.playerSize={width:o,height:s},i()})),this.mutationObserver=new MutationObserver(i),this.mutationObserver.observe(this.rootAnnotationsContainer,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}add(e,i){var o;if(!this.rootAnnotationsContainer)throw new Jl(Yb);if(this.annotations.has(e))throw new Jl(jb);i.style.zIndex=(o=i.style.zIndex)!=null?o:hI,i.style.position="absolute",this.rootAnnotationsContainer.append(i),this.annotations.set(e,i)}get(e){let i=this.annotations.get(e);if(!i)throw new Jl(Xb);return i}remove(e){let i=this.get(e);this.annotations.delete(e)&&i.remove()}clear(){for(let e in this.annotations.keys())this.remove(e)}destroy(){var e;this.annotations.clear(),this.subscriptions.unsubscribe(),(e=this.mutationObserver)==null||e.disconnect(),this.rootAnnotationsContainer=null}isElementExceedsBoundaries(e,i,o){let s=e.offsetTop,a=e.offsetLeft,l=e.offsetWidth,d=e.offsetHeight;return s<0||a<0||a+l>i||s+d>o}registryRootContainer(e){}addLayer(e){return document.createElement("div")}getLayer(e){}removeLayer(e){}clearLayer(e){}detach(){}reattach(){}};import{assertNonNullable as cp,Subscription as bI}from"@vkontakte/videoplayer-shared/es2015";var un=class{init({store:e,microStores:i,interactiveController:o,config:s}){return cp(e),cp(i),cp(s),s.interactiveData&&cp(o),this.subscription=new bI,this.subscription}};var Ec=class extends un{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$=Jt(Ge({},re(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{isInteractiveExpectation$:s}=i.store.state;return o.add(s.subscribe(a=>{this.state$.set(a?!0:null)})),o}};var Pc=class extends un{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$=Jt(Ge({},re(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{microStores:s,store:a}=i,{fakeIsPlaying$:l}=s,{isInteractiveExpectation$:d,isPlaying$:r}=a.state,{controlsVisible:u,isMobile:m}=a.ui,p=he(m),v=()=>p&&he(u);return o.add(u.subscribe($=>{if(!p)return;let y=he(l);he(r)?this.state$.set($):y!==null&&this.state$.set(!y||$)})),o.add(r.subscribe($=>{this.state$.set(!$||v())})),o.add(l.subscribe($=>{if($===null)return;let y=he(d);if(v()){this.state$.set(!0);return}y&&this.state$.set(!$)})),o}};var kc=class extends un{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=re("tooltip_chapter_without_interactive")}init(i){let o=super.init(i),{store:s}=i;return o.add(s.state.interactiveEpisodes$.subscribe(a=>{a.length&&(a.every(l=>l.completed)?this.state$.set("tooltip_interactive_of_chapter_completed"):this.state$.set("tooltip_disabled_when_interactive"))})),o}};import{combine as $I}from"@vkontakte/videoplayer-shared/es2015";var Hv=re(!1),up=null,Ac=class extends un{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$=Jt(Ge({},Hv),{set:(i,o=!1)=>{i!==he(Hv)&&(this.clearTimeout(),Hv.set(i),!i&&up&&(up=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()})}init(i){let o=super.init(i),{store:s,config:a}=i,{isInteractiveTime$:l,isPlaying$:d}=s.state,r=s.ui.controlsVisible,{interactiveTimeIndicator:u}=s.ui.controls;o.add(r.subscribe(p=>{he(l)&&p&&this.state$.set(!1)}));let m=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add($I({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:v,interactiveTimeIndicator:$})=>{var y,h;if(!(!p||!($!=null&&$.isDisplayed))){if(!v)return this.state$.set(!1);m.tooltipHelpHintActive&&up===null&&(up=!0,m.tooltipHelpHintActive=!1,this.state$.set(!0),(h=(y=s.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||h.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as yI,noop as xI}from"@vkontakte/videoplayer-shared/es2015";var Lc=class extends un{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$=Jt(Ge({},re(null)),{toggle:xI});this.checkIfShouldHide=i=>Hs(i,"s")}init(i){let o=super.init(i),{store:s,interactiveController:a}=i,l=s.ui.currentGridType$,d=s.getLogger().createComponentLog("GraphIsOpened microStore");return this.state$.toggle=()=>$t(this,null,function*(){if(this.checkIfShouldHide(he(l)))return;let r=he(this.state$),{isEnded$:u,playbackState$:m}=s.state,{disabledControls$:p}=s.ui.controls,v=he(u),$=he(m);if(r)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1),p.remove(bf),!v&&this.graphMadePause&&s.actions.internal.play()}catch(y){d({message:"Cant hide graph"})}else{this.graphMadePause=$==="playing";try{yield a==null?void 0:a.toggleGraphView(!0),this.state$.set(!0),p.add(bf),!v&&this.graphMadePause&&s.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}}),o.add(yI({graphIsOpened:this.state$,currentGridType:l}).subscribe(m=>$t(this,[m],function*({graphIsOpened:r,currentGridType:u}){if(this.checkIfShouldHide(u)&&r)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1)}catch(v){d({message:"Cant hide graph"})}}))),o}};import{ValueSubject as Zb}from"@vkontakte/videoplayer-shared/es2015";var Mc=class extends un{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:re(!1),isEnabled$:re(!1),type$:re(void 0)}}init(i){let o=super.init(i),{store:s}=i,{info:{isActive$:a,isEnabled$:l,type:d}}=s.webApi.pictureInPictureApi||{info:{isActive$:new Zb(!1),isEnabled$:new Zb(!1)}};return o.add(a.subscribe(r=>{this.state$.isActive$.set(r)})),o.add(l.subscribe(r=>{this.state$.isEnabled$.set(r)})),this.state$.type$.set(d),o}};import{filter as CI,filterChanged as TI}from"@vkontakte/videoplayer-shared/es2015";import{safeStorage as Fv}from"@vkontakte/videoplayer-shared/es2015";var Jb=({maxShowCount:t,timeout:e})=>{let i=[t!==0?wI({maxCount:t}):void 0,e!==0?SI({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(s=>s.notificationShowed(o)),canShowNotification:o=>i.every(s=>s.canShowNotification(o))}},wI=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,s;e[i]=((o=e[i])!=null?o:0)+1,Fv.set("videoplayer_notifications_manager_count",JSON.stringify((s=e[i])!=null?s:0))},canShowNotification:i=>{var o;return((o=e[i])!=null?o:0)<t}}},SI=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Fv.get(e)||"{}")}catch(a){return{}}},o=a=>Fv.set(e,JSON.stringify(a)),s=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o(Jt(Ge({},i()),{[a]:{timeout:t,launchTime:Date.now()}}))},canShowNotification:a=>{let l=i()[a];if(l){let d=Date.now()-l.launchTime>t;return d&&s(a),d}else return!0}}};var Vc=class extends un{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:re({}),showNotification:i=>{this.state$.notificationsToShow$.update(o=>(o[i]=!0,o)),this.notificationManager.notificationShowed(i)},closeNotification:i=>{this.state$.notificationsToShow$.update(o=>(delete o[i],o))}}}init(i){let o=super.init(i),{store:s,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:l,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:r}}}=i;this.notificationManager=Jb({maxShowCount:a,timeout:l});let u=s.getPlayer();return o.add(u.events.severeStallOccured$.pipe(TI(),CI(m=>m)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(r&&s.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var e$=()=>[Ec,Pc,kc,Ac,Lc,Mc,Vc].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:Jt(Ge({},e),{[o.stateName]:o.state$})}},{subscribers:[],stores:{}});import{devNull as Rc}from"@vkontakte/videoplayer-shared/es2015";var pp=class{constructor(e){this.getActiveElement=e;this.focusableElements=[];this.isActive=!1;this.handleTabKey=e=>{if(this.updateFocusableElements(),!this.focusableElements.length)return;let i=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1],s=this.getActiveElement();e.shiftKey&&s===i?(e.preventDefault(),o.focus()):!e.shiftKey&&s===o&&(e.preventDefault(),i.focus())}}activate(){this.isActive||(document.addEventListener("keydown",this.handleTabKey),this.isActive=!0)}deactivate(){this.isActive&&(document.removeEventListener("keydown",this.handleTabKey),this.isActive=!1,this.focusableElements=[])}updateFocusableElements(){this.isActive&&(this.focusableElements=this.getFocusableElements())}getFocusableElements(){let e=["button:not([disabled])","[href]:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"]):not([disabled])'].join(", ");return Array.from(this.container.querySelectorAll(e)).filter(i=>!i.disabled&&i.offsetParent!==null)}destroy(){this.deactivate()}setContainer(e){this.container=e}};var fp=class{constructor(e){this.shadowRoot=e;this.lastFocusedNode=null;this.init=()=>{this.shadowRoot.addEventListener("focusin",this.handleFocusChange)};this.handleFocusChange=()=>{this.lastFocusedNode=this.shadowRoot.activeElement};this.restoreFocus=()=>{var e;(e=this.lastFocusedNode)==null||e.focus()};this.focusLock=new pp(()=>this.lastFocusedNode),this.init()}destroy(){this.shadowRoot.removeEventListener("focusin",this.handleFocusChange),this.focusLock.destroy()}getLastFocusedNode(){return this.lastFocusedNode}activateLock(){this.focusLock.activate()}deactivateLock(){this.focusLock.deactivate()}setContainerForFocusLock(e){this.focusLock.setContainer(e)}};var II=A('<div class="root s-4"><!></div>'),EI={hash:"s-4",code:".root.s-4{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:1}"};function Uv(t,e){H(e,!0),Q(t,EI);let i=null,o=K(null);Fe(()=>(n(o)&&(i=window.setTimeout(()=>{O(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function s(r){e.playbackStatusShow&&O(o,r?"prev":"next",!0)}var a=Re(),l=se(a);{var d=r=>{var u=Re(),m=se(u);Vs(m,()=>n(o),p=>{var v=II(),$=C(v);let y=f(()=>n(o)==="prev");Cc($,{get duration(){return e.animationDuration},get Icon(){return va},get reversed(){return n(y)}}),S(v),b(p,v)}),b(r,u)};M(l,r=>{e.playbackStatusShow&&n(o)&&r(d)})}return b(t,a),F({startVideoChangedAnimation:s})}import{getWindow as PI}from"@vkontakte/videoplayer-shared/es2015";var zv=PI().HTMLElement||class{constructor(){this.isConnected=!1}};var kI=Object.defineProperty,AI=Object.defineProperties,LI=Object.getOwnPropertyDescriptors,t$=Object.getOwnPropertySymbols,MI=Object.prototype.hasOwnProperty,VI=Object.prototype.propertyIsEnumerable,Kv=(t,e,i)=>e in t?kI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,rl=(t,e)=>{for(var i in e||(e={}))MI.call(e,i)&&Kv(t,i,e[i]);if(t$)for(var i of t$(e))VI.call(e,i)&&Kv(t,i,e[i]);return t},RI=(t,e)=>AI(t,LI(e)),Kt=(t,e,i)=>Kv(t,typeof e!="symbol"?e+"":e,i),mp=(t,e,i)=>new Promise((o,s)=>{var a=r=>{try{d(i.next(r))}catch(u){s(u)}},l=r=>{try{d(i.throw(r))}catch(u){s(u)}},d=r=>r.done?o(r.value):Promise.resolve(r.value).then(a,l);d((i=i.apply(t,e)).next())}),ZI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:FI.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:GI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},Xn=K(void 0),Wv=si({animationDuration:0,playbackStatusShow:!1}),vp=class extends zv{constructor(){super(),Kt(this,"svelteStubComponent"),Kt(this,"svelteRootComponent"),Kt(this,"sveltePersistentLayerComponent"),Kt(this,"svelteErrorComponent"),Kt(this,"store"),Kt(this,"microStoresRoot"),Kt(this,"statistics"),Kt(this,"_shadowRoot"),Kt(this,"playerContainer"),Kt(this,"rootContainer"),Kt(this,"stateContainer"),Kt(this,"shadowRootContainer"),Kt(this,"playerId"),Kt(this,"uiConfig"),Kt(this,"coreConfig"),Kt(this,"statisticsConfig"),Kt(this,"metaConfig"),Kt(this,"interactiveController"),Kt(this,"interactiveContainer"),Kt(this,"graphMadePause"),Kt(this,"currentPlayingVideoIndex",0),Kt(this,"needToRepeatPlaylist",!1),Kt(this,"videoConfig"),Kt(this,"pictureInPictureApi"),Kt(this,"mediaSessionApi"),Kt(this,"unsubscribePlayerPhaseSubscription"),Kt(this,"logger"),Kt(this,"log"),Kt(this,"subscription"),Kt(this,"interactiveSubscription"),Kt(this,"annotationsApi"),Kt(this,"slotsApi"),Kt(this,"focusManager"),Kt(this,"prevIsid"),Kt(this,"isInited",!1),Kt(this,"postponedInitParams",null),Kt(this,"internalsExposure",null),Kt(this,"shadowDOMCallbacksDisabled",!1),Kt(this,"fatalError$",new NI(null)),Kt(this,"createOneStat",(e,i={})=>{var o,s,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:r,statUserSalt:u,statTrackCode:m,statVKAppId:p,refreshStatAuthToken:v,autoplay:$,isMobile:y,isTouch:h,refDomain:x,deviceId:I,interactiveData:T}=Ic(this.videoConfig,i),D=(o=T==null?void 0:T.projectInfo)==null?void 0:o.pid,k=(a=(s=this.interactiveController)==null?void 0:s.state.isReplay$.getValue())!=null?a:!1;k&&(this.prevIsid=void 0);let{unitedVideoId:E,isClip:V=!1}=e;if(this.uiConfig.features.statistics&&E)try{return new YI(rl({movieId:E,albumId:d,place:r,trackCode:m,vkAppId:p,autoplay:(l=$&&!this.interactiveController)!=null?l:!1,mobile:h!=null?h:y,clip:V,refDomain:x,deviceId:I,isPreviewPlayerView:this.videoConfig.playerView==="preview"},D&&(!this.isInited||k)&&{projectId:Number(D)}),rl({refreshAuthToken:v,userSalt:u,config:this.statisticsConfig},this.interactiveController&&{useIsid:!0,isid:this.prevIsid}))}catch(L){console.error(L),this.log({message:L.message})}}),Rc.create("ui"),this.logger=new UI,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new o$,this.interactiveSubscription=new o$,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Yr(Bv,{target:this.playerContainer}))})}connectedCallback(){var e,i;if(this.rootContainer)return;this.initPlayerRootContainers();let o=(e=this.getAttribute("stub-title"))!=null?e:void 0,s=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=si({title:o,thumbUrl:s}),l={target:this.playerContainer,props:a};this.svelteStubComponent=Yr(Nv,l),this.sveltePersistentLayerComponent=Yr(Uv,{target:this.playerContainer,props:Wv}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;Wv.animationDuration=e,Wv.playbackStatusShow=i&&o}disconnectedCallback(){var e,i,o,s,a,l,d;this.shadowDOMCallbacksDisabled||((e=this.annotationsApi)==null||e.destroy(),(i=this.slotsApi)==null||i.destroy(),(o=this.focusManager)==null||o.destroy(),(s=this.mediaSessionApi)==null||s.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteErrorComponent),this.unmountComponent(this.sveltePersistentLayerComponent),this.subscription.unsubscribe(),(a=this.unsubscribePlayerPhaseSubscription)==null||a.call(this),(l=this.interactiveController)==null||l.destroy(),this.interactiveSubscription.unsubscribe(),(d=this.internalsExposure)==null||d.destroy(),Rc.destroy("ui"))}initPlayerRootContainers(){this.rootContainer=document.createElement("div"),this.rootContainer.style.position="relative",this.rootContainer.className="root-container",this.rootContainer.style.width="100%",this.rootContainer.style.height="100%",this.rootContainer.style.minHeight="206px",this.shadowRootContainer=document.createElement("div"),this.shadowRootContainer.style.position="absolute",this.shadowRootContainer.className="shadow-root-container",this.shadowRootContainer.style.width="100%",this.shadowRootContainer.style.height="100%",this._shadowRoot=this.shadowRootContainer.attachShadow({mode:"open"}),this.playerContainer=document.createElement("div"),this.playerContainer.style.all="initial",this.playerContainer.style.display="block",this.playerContainer.style.contain="strict",this.playerContainer.style.width="100%",this.playerContainer.style.height="100%",this._shadowRoot.append(this.playerContainer),this.rootContainer.append(this.shadowRootContainer),this.stateContainer=document.createElement("div"),this.stateContainer.className="state-container",this.stateContainer.style.width="1px",this.stateContainer.style.height="1px",this.stateContainer.style.position="absolute",this.stateContainer.style.backgroundColor="transparent",this.stateContainer.style.left="-100000px",this.append(this.rootContainer),this.append(this.stateContainer)}needToShowNextPrevButtons(){return this.videoConfig?this.videoConfig.videos.length>1&&this.videoConfig.showNextPrevButtons:!1}isNextButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1||this.needToRepeatPlaylist):!1}isPrevButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex>0||this.needToRepeatPlaylist):!1}isControlDisabled(e){var i;let o=(i=this.store)==null?void 0:i.ui.controls.disabledControls$;return(o==null?void 0:o.includes(e))||!1}getNextVideoInfo(){if(!this.videoConfig)return{nextVideoTitle:void 0,nextVideoThumb:void 0};let e=this.videoConfig.videos[this.currentPlayingVideoIndex+1]||{};return{nextVideoTitle:e.title,nextVideoThumb:e.thumbUrl}}createThinOneStat(e,i={}){if(!this.videoConfig)return;let{deviceId:o,preload:s,refreshStatAuthToken:a}=Ic(this.videoConfig,i),{unitedVideoId:l}=e;if(this.uiConfig.features.thinStatistics&&l)return new jI.ThinOneStat({deviceId:o,movieId:l,preload:s,isPreviewPlayerView:this.videoConfig.playerView==="preview"},{config:this.statisticsConfig,refreshAuthToken:a})}createPlayer(e,i={},o){var s,a,l,d,r,u,m,p,v,$;if(!this.videoConfig)return;let{albumId:y,statPlace:h,statAuthToken:x,preload:I,autoplay:T,volume:D,muted:k,fromTime:E,canRewindLive:V,supportLink:q,showAds:L,adsSlotId:z,adsParams:j={},adsAutoplayParam:te,interfaceLanguage:ee,isCyrillicRelatedInterface:oe,logoClickable:ae,logoHidden:le,isMobile:ce,isTouch:X,isAudioDisabled:_e,isLiveCatchUpMode:Ee,fullScreenTarget:de,failoverHosts:ze,canDownload:ue,callbacks:pe,interactiveData:Z,showThumbTimer:B,additionalButtons:fe=[],additionalSettingsMenuItems:me=[],additionalContextMenuItems:Ie=[],repeat:ot,loop:Me,saveRate:be,volumeMultiplier:W,showEndScreen:Ce,showAutoplayNext:Ae,mediascopePixels:Qe}=Ic(this.videoConfig,i),{sources:Te,title:we,thumbUrl:He,unitedVideoId:st,isClip:ct=!1,duration:It,adsParams:lt={},videoEpisodes:ai,previewThumbsData:St,subtitles:Rt,subtitlesForcedLanguage:Dt,live:Wt,adsExternalApi:Le,adsJson:Y}=e;if(!Te&&!Wt){let di=new Error("empty sources and live");this.fatalError$.next(di),(s=pe.onCrashed)==null||s.call(pe,di.message);return}let Oe=rl(rl({},j),lt),$e=this.getNextVideoInfo(),Ne={sources:Te,title:we,thumbUrl:He,subtitles:Rt,subtitlesForcedLanguage:Dt,unitedVideoId:st,isClip:ct,live:Wt,albumId:y,statPlace:h,autoplay:T,muted:k,volume:D,fromTime:E,canRewindLive:V,showAds:L,adsSlotId:z,adsParams:Oe,adsAutoplayParam:te,duration:It,logoClickable:ae,logoHidden:le,isTouch:X!=null?X:ce,repeat:ot,loop:Me,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:$e.nextVideoTitle,endScreenVideoThumb:$e.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},ft={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(Ne)}`});let Et=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),Se=(Et==null?void 0:Et.oneStat)||this.createOneStat(e,i),Ye=this.createThinOneStat(e,i),Ue;Qe&&(Ue=new XI({pixels:Qe})),(Se||Ye)&&(this.statistics=new Gu(Se,Ye,Ue,Et==null?void 0:Et.statSubscription));let xe=this.uiConfig.features.apptracer.enabled?new DI("videoplayer",this.uiConfig.features.apptracer,{version:Dl,env:bu},BI({movieId:st,albumId:y,place:h,autoplay:(l=T&&!this.interactiveController)!=null?l:!1,mobile:X!=null?X:ce,clip:ct})):void 0;this.interactiveController&&((u=this.prevIsid)!=null||(this.prevIsid=(r=(d=this.statistics)==null?void 0:d.oneStat)==null?void 0:r.isid$.getValue()));let Ot=!!Z,Tt=[],qt="tooltip_interactive_go_back_disabled_first";if(Ot&&this.interactiveController){let di=this.interactiveController.state.isInitialChapter$.getValue(),Si=this.interactiveController.getHistoryState();di&&Tt.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Tt.push("SEEK_TO_INTERACTIVE_BUTTON"),Si.hasPrevChapter$.getValue()||(Tt.push("PLAY_PREV_CHAPTER_BUTTON"),di||(Si.isGoBackLimited$.getValue()?qt="tooltip_interactive_go_back_disabled_limit":qt="tooltip_interactive_go_back_disabled"))}let _i=()=>{var di;this.isInited=!1,this.prevIsid=void 0;let Si=(o==null?void 0:o.info.isEnded$.getValue())&&((di=this.interactiveController)==null?void 0:di.state.isEndChapter$.getValue());pe.onReplayInteractiveVideo&&!Si?pe.onReplayInteractiveVideo():this.replayInteractiveVideo()},vi=ot&&this.videoConfig.videos.length===1;this.store=pb({player:o,interfaceLanguage:ee,isCyrillicRelatedInterface:oe,videoId:st,isClip:ct,isLiveCatchUpMode:Ee,isAudioDisabled:_e,statAuthToken:x,callbacks:pe,webApi:ft,videoEpisodes:ai,previewThumbsData:St,canDownload:ue,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,disabledControls:Tt,isInteractive:Ot,saveRate:be,interactiveRanges$:(m=this.interactiveController)==null?void 0:m.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:_i,playPrevChapterDisabledTooltip:qt,hasInteractiveBranches:!!(($=(v=this.interactiveController)==null?void 0:v.getChapterBranches())!=null&&$.length),additionalButtons:this.uiConfig.features.additionalButtons?fe:[],additionalSettingsMenuItems:me!=null?me:[],additionalContextMenuItems:Ie!=null?Ie:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:di=>{var Si;return(Si=this.sveltePersistentLayerComponent)==null?void 0:Si.startVideoChangedAnimation(di)},looped:this.uiConfig.features.useLoopSetting?Me:vi,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId,appTracer:xe});let{stores:Mi}=this.microStoresRoot=e$(),eo=()=>{var di,Si,to,Vi,ci,Ki;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(We=>{var nt;return(nt=pe==null?void 0:pe.onCurrentFormatChanged)==null?void 0:nt.call(pe,We)})),this.subscription.add(Mi.interactiveControlsOpacity$.subscribe(We=>{var nt;We!==null&&((nt=this==null?void 0:this.interactiveController)==null||nt.setDisabledControls(We))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(We=>{var nt;return(nt=pe==null?void 0:pe.onThroughputEstimationChanged)==null?void 0:nt.call(pe,We)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(We=>{var nt;return(nt=pe==null?void 0:pe.onTrafficSavingEnabledChanged)==null?void 0:nt.call(pe,We)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(We=>{var nt;return(nt=pe==null?void 0:pe.onHighQualityEnabledChanged)==null?void 0:nt.call(pe,We)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(We=>{var nt;return(nt=pe==null?void 0:pe.onAutoQualityEnabledChanged)==null?void 0:nt.call(pe,!!We)})),this.subscription.add(new zI(We=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(nt=>We.next(nt)))}).pipe(qI(1)).subscribe(We=>{var nt;return(nt=pe==null?void 0:pe.onCurrentPlaybackRateChanged)==null?void 0:nt.call(pe,We)})),this.subscription.add(this.store.state.volume$.subscribe(We=>{var nt;return(nt=pe==null?void 0:pe.onVolumeChange)==null?void 0:nt.call(pe,We)})),this.subscription.add(this.store.state.muted$.subscribe(We=>{var nt,ut,pi,qi;if(We)(nt=pe==null?void 0:pe.onMute)==null||nt.call(pe);else{let io=(pi=((ut=this.store)==null?void 0:ut.state.volume$)&&he(this.store.state.volume$))!=null?pi:0;(qi=pe==null?void 0:pe.onUnmute)==null||qi.call(pe,io)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(We=>{var nt;return(nt=pe==null?void 0:pe.onVideoBitrateChanged)==null?void 0:nt.call(pe,We)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(We=>{var nt;let ut=(nt=this.store)==null?void 0:nt.ui.controls.disabledControls$;ut&&(We&&!ut.includes(Ld)&&ut.add(Ld),We||ut.remove(Ld))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(We=>mp(this,null,function*(){var nt;if(!n$.browser.isSamsungBrowser||!We||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&(yield this.replayInteractiveChapter((nt=this.videoConfig)==null?void 0:nt.callbacks.onExternalFullscreenExit))}))),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(We=>{var nt;return(nt=pe==null?void 0:pe.onVSIDChanged)==null?void 0:nt.call(pe,We)})),this.initMediaSession(),O(Xn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:Te,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:we,thumbUrl:He,subtitles:Rt,subtitlesForcedLanguage:Dt,live:Wt,preload:I,autoplay:T,muted:k,volume:D,fromTime:E,canRewindLive:V,supportLink:q,showAds:L,adsSlotId:z,adsParams:Oe,adsAutoplayParam:te,duration:It,logoClickable:ae,logoHidden:le,isMobile:X!=null?X:ce,failoverHosts:ze,fullScreenTarget:de,saveRate:be,shadowRootContainer:this.shadowRootContainer,showMiniTimer:B,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:W,showEndScreen:Ce,showAutoplayNext:Ae,adsExternalApi:Le,adsJson:Y,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let _t={target:this.playerContainer,props:n(Xn)};this.svelteRootComponent=Yr(Dv,_t),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(to=(Si=(di=this.videoConfig)==null?void 0:di.callbacks)==null?void 0:Si.onInited)==null||to.call(Si)),(Vi=this.internalsExposure)==null||Vi.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((Ki=(ci=this.videoConfig)==null?void 0:ci.callbacks)!=null&&Ki.onDevNullLog)?Rc.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Rc.destroy("ui")};this.coreConfig.asyncResolveClientChecker?n$.isInited$.subscribe(di=>{di&&(console.log("UI SDK async start"),eo())}):eo()}get useMinimalViewForDpip(){var e;let i=(e=this.uiConfig.features.dpip)!=null?e:!1;return typeof i=="boolean"?!1:!!i.minimalView}addPlayerInfoSubscriptions(){var e,i;let o=this.store,s=(e=this.microStoresRoot)==null?void 0:e.stores;if(!o||!s)return;let a=(i=this.videoConfig)==null?void 0:i.callbacks;a&&this.subscription.add(o.playerPhase.subscribe(d=>{var r;return(r=a.onPlayerPhaseChanged)==null?void 0:r.call(a,d)})).add(o.state.playbackState$.subscribe(d=>{var r;return d&&((r=a.onPlaybackStateChanged)==null?void 0:r.call(a,d))})).add(o.state.playbackStateRealistic$.subscribe(d=>{d?this.stateContainer.setAttribute("data-playback-state",d):this.stateContainer.removeAttribute("data-playback-state")})).add(o.state.isLive$.subscribe(d=>{var r;return(r=a.onIsLiveChanged)==null?void 0:r.call(a,d)})).add(o.state.isActiveLive$.subscribe(d=>{var r;return(r=a.onIsActiveLiveChanged)==null?void 0:r.call(a,d)})).add(o.state.isAudioAvailable$.subscribe(d=>{var r;return(r=a.onIsAudioAvailableChanged)==null?void 0:r.call(a,d)})).add(o.state.currentQuality$.subscribe(d=>{var r;return(r=a.onCurrentQualityChanged)==null?void 0:r.call(a,d)})).add(o.state.availableQualities$.subscribe(d=>{var r;return(r=a.onAvailableQualitiesChanged)==null?void 0:r.call(a,d.map(({value:u})=>u).filter(u=>u!=="auto"))})).add(o.state.availableAudioStreams$.subscribe(d=>{d.length>1&&a.onAudioLanguagesAvailable&&a.onAudioLanguagesAvailable()})).add(s.pictureInPicture$.isActive$.subscribe(d=>{var r,u;Qu(this.pictureInPictureApi)&&this.useMinimalViewForDpip&&o.actions.external.setMinimalView(d),d?(r=a.onPiPEnter)==null||r.call(a):(u=a.onPiPExit)==null||u.call(a)}));let l=a==null?void 0:a.uiInfo;l&&this.subscription.add(o.ui.controlsVisible.subscribe(d=>{var r;return(r=l.onControlsVisibleChanged)==null?void 0:r.call(l,d)})).add(o.ui.isMobile.subscribe(d=>{var r;return(r=l.onIsMobileChanged)==null?void 0:r.call(l,d)})).add(o.ui.playerSize.subscribe(d=>{var r;return(r=l.onPlayerSizeChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.prevButton.subscribe(d=>{var r;return(r=l.onPrevButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.playButton.subscribe(d=>{var r;return(r=l.onPlayButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.replayButton.subscribe(d=>{var r;return(r=l.onReplayButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.nextButton.subscribe(d=>{var r;return(r=l.onNextButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.playPrevChapterButton.subscribe(d=>{var r;return(r=l.onPlayPrevChapterChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.seekToInteractiveButton.subscribe(d=>{var r;return(r=l.onSeekToInteractiveButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.interactiveGraphButton.subscribe(d=>{var r;return(r=l.onGraphButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.liveButton.subscribe(d=>{var r;return(r=l.onLiveButtonChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.time.subscribe(d=>{var r;return(r=l.onTimeUpdateChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.episodes.subscribe(d=>{var r;return(r=l.onEpisodesChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.subtitles.subscribe(d=>{var r;return(r=l.onSubtitlesChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.topLeft.subscribe(d=>{var r;return(r=l.onTopLeftControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.topRight.subscribe(d=>{var r;return(r=l.onTopRightControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.bottomLeft.subscribe(d=>{var r;return(r=l.onBottomLeftControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.bottomRight.subscribe(d=>{var r;return(r=l.onBottomRightControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.middle.subscribe(d=>{var r;return(r=l.onMiddleControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.controlBlocks.bottom.subscribe(d=>{var r;return(r=l.onBottomControlBlockChanged)==null?void 0:r.call(l,d)})).add(o.ui.videoTitleInfo.subscribe(d=>{var r;return(r=l.onTitleChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.settings.subscribe(d=>{var r;return(r=l.onSettingsChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.fullscreen.subscribe(d=>{var r;return(r=l.onFullscreenChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.chromecast.subscribe(d=>{var r;return(r=l.onChromecastChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.pip.subscribe(d=>{var r;return(r=l.onPipChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls["theater-mode-button"].subscribe(d=>{var r;return(r=l.onTheaterModeChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.vkLogo.subscribe(d=>{var r;return(r=l.onVkLogoChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.interactiveTimeIndicator.subscribe(d=>{var r;return(r=l.onInteractiveTimeIndicatorChanged)==null?void 0:r.call(l,d)})).add(o.ui.controls.timeline.subscribe(d=>{var r;return(r=l.onTimelineChanged)==null?void 0:r.call(l,d)}))}playNextVideo(){this.videoConfig&&(this.currentPlayingVideoIndex++,this.currentPlayingVideoIndex>=this.videoConfig.videos.length&&(this.currentPlayingVideoIndex=0),this.log({message:`play next video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}playPrevVideo(){this.videoConfig&&(this.currentPlayingVideoIndex--,this.currentPlayingVideoIndex<0&&(this.currentPlayingVideoIndex=this.videoConfig.videos.length-1),this.log({message:`play prev video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}createPlayerWithCurrentVideo(e,i=!0){var o;if(!this.videoConfig)return;let s=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!s){this.log({message:"no next video"});return}this.isInited&&i$(s.unitedVideoId)&&((o=this.store)==null||o.actions.internal.nextMovie(s.unitedVideoId)),this.unmountComponent(this.svelteRootComponent),this.createPlayer(s,{autoplay:i,fromTime:0},e)}playPrevChapter(){var e;(e=this.interactiveController)==null||e.playPrevChapter()}seekToInteractive(){var e;let i=(e=this.interactiveController)==null?void 0:e.getNextInteractiveStartTime();typeof i=="number"&&this.seekTime(i/1e3)}initInteractives(){return mp(this,null,function*(){var e,i,o,s,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=yield import("@vkontakte/videoplayer-interactive/es2015");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let r=(i=this.store)==null?void 0:i.interfaceLanguage$,u=r?he(r):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$:h}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(h.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]=RI(rl({},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 D,k,E,V,q,L;if(!this.store||!this.microStoresRoot)return;let z=y.getValue();if(I==="action-choice"&&T==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Md)),I==="action-choice-canceled"){let j=he(this.store.state.isPlaying$)||z;if(((E=(D=this.videoConfig)==null?void 0:D.isTouch)!=null?E:(k=this.videoConfig)!=null&&k.isMobile)&&j){this.store.ui.interactiveHideMobileControls.set(!0);return}(L=(V=this.videoConfig)==null?void 0:(q=V.callbacks).onDisabledInteractiveClick)==null||L.call(q)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:I,removeAllOpenURI:T})=>{this.store&&I==="container-fake-removed"&&T&&this.store.ui.controls.disabledControls$.remove(Md)})),yield this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(s=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&s.onInteractiveHistoryChanged){let I=this.interactiveController.getHistoryState();this.subscription.add(I.history$.subscribe(T=>{var D,k,E;T.length&&((E=(k=(D=this.videoConfig)==null?void 0:D.callbacks)==null?void 0:k.onInteractiveHistoryChanged)==null||E.call(k,T))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(I=>{var T,D,k;(k=(T=this.videoConfig)==null?void 0:(D=T.callbacks).onInteractiveChapterChanged)==null||k.call(D,I.chapter,I.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var I,T,D,k;(I=this.microStoresRoot)==null||I.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(k=(T=this.videoConfig)==null?void 0:(D=T.callbacks).onInteractiveTimeIndicatorClick)==null||k.call(D)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(I=>{this.log({message:I.toString()})}))}catch(d){this.log({message:d.message})}})}initPlayer(e,i={}){var o,s,a,l,d,r,u,m,p,v,$,y,h,x,I,T,D,k,E,V,q;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let L=new Error("empty videos");this.fatalError$.next(L),(s=(o=e.callbacks)==null?void 0:o.onCrashed)==null||s.call(o,L.message);return}else this.fatalError$.next(null);this.videoConfig=Ic(ZI,HI(e,L=>L instanceof zv?L:void 0)),(a=this.playerId)!=null||(this.playerId=QI(e.playerId)),this.uiConfig=Rh((l=i.ui)!=null?l:{}),this.updatePersistentLayerProps(),this.coreConfig=(d=i.core)!=null?d:{},this.statisticsConfig=(r=i.statistics)!=null?r:{},this.metaConfig=i.meta,this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer&&(this.rootContainer.style.minHeight="unset"),this.style.display="block",this.style.width="100%",this.style.height="100%"),this.videoConfig.playerView==="preview"&&(this.playerContainer.style.contain="none"),this.uiConfig.features.exposeInternalsToGlobal&&((u=this.internalsExposure)!=null||(this.internalsExposure=new KI("ui",this.playerId))),Rc.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((m=this.videoConfig)==null?void 0:m.showAds)],numbers:[OI()]}),i$(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(v=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?v:!0),this.uiConfig.ads.paramsOverride=rl({preview:($=this.uiConfig.ads.preview)!=null?$:this.videoConfig.adsPreviewParam},this.uiConfig.ads.paramsOverride),this.videoConfig.isTouch=(h=(y=this.uiConfig.isMobile)!=null?y:this.videoConfig.isTouch)!=null?h:this.videoConfig.isMobile,(x=this.videoConfig).autoplay&&(x.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(I=this.uiConfig.ads.enable)!=null?I:this.videoConfig.showAds,this.videoConfig.adsSlotId=(T=this.uiConfig.ads.slot)!=null?T:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((D=this.uiConfig.showLogo)!=null?D:!this.videoConfig.logoHidden),(k=this.videoConfig).canRewindLive&&(k.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(E=this.videoConfig.supportLink)!=null?E: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&&((V=this.videoConfig.videos)!=null&&V[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip&&(this.pictureInPictureApi=km(this.videoConfig.pipEnabled!==!1,this.uiConfig.features.dpip)),this.mediaSessionApi=this.uiConfig.features.mediaSession?new lp:void 0,this.slotsApi=this.uiConfig.features.slots?new rp(this.uiConfig.disabledSlotIds):void 0,this.annotationsApi=this.uiConfig.features.annotations?new dp(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new fp(this._shadowRoot):void 0,this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.isInited=!1,this.prevIsid=void 0,this.interactiveController&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveSubscription.unsubscribe()),this.videoConfig.interactiveData?this.initInteractives():this.createPlayer(this.videoConfig.videos[this.currentPlayingVideoIndex]),Qu(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(q=this.slotsApi)==null||q.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}=rl({},this.videoConfig.videos[this.currentPlayingVideoIndex]),o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",s=>this.seekTime(s.seekTime)]];this.videoConfig.videos.length>1&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1&&o.push(["nexttrack",()=>{var s,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(s=this.videoConfig)==null?void 0:s.callbacks)==null?void 0:a.onNextVideoClick)==null||l.call(a)}catch(d){this.log({message:"onNextVideoClick callback failed to execute"})}else this.playNextVideo()}]),this.currentPlayingVideoIndex>0&&o.push(["previoustrack",()=>{var s,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(s=this.videoConfig)==null?void 0:s.callbacks)==null?void 0:a.onPrevVideoClick)==null||l.call(a)}catch(d){this.log({message:"onPrevVideoClick callback failed to execute"})}else this.playPrevVideo()}])),this.mediaSessionApi.setMetaData({title:e,thumbUrl:i}),this.mediaSessionApi.updateActionHandlers(o),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}setupMediaSessionForAds(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let e="Реклама",i=[["play",()=>this.play()],["pause",()=>this.pause()]];this.mediaSessionApi.setMetaData({title:e}),this.mediaSessionApi.updateActionHandlers(i),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}moveTo(e){this.shadowDOMCallbacksDisabled=!0,e.append(this),this.shadowDOMCallbacksDisabled=!1}play(){var e,i,o,s;this.isControlDisabled("PLAY_BUTTON")||(e=this.store)!=null&&e.playerPhase.is("LiveWaitingStart")||(i=this.store)!=null&&i.playerPhase.is("LiveWaitingRecover")||(o=this.store)!=null&&o.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),(s=this.svelteRootComponent)==null||s.play())}pause(){var e;this.log({message:"pause"}),(e=this.svelteRootComponent)==null||e.pause()}stop(){var e;if(!this.videoConfig)return;this.log({message:"stop"});let i=!!this.interactiveController;i&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveContainer=void 0,this.interactiveSubscription.unsubscribe()),this.unmountComponent(this.svelteStubComponent),(e=this.mediaSessionApi)==null||e.destroy();let o=this.videoConfig.videos[0];o&&(this.unmountComponent(this.svelteRootComponent),i?(this.videoConfig.autoplay=!1,this.initInteractives()):this.createPlayer(o))}setMuted(e){var i;this.log({message:`set muted, muted: ${e}`}),(i=this.svelteRootComponent)==null||i.setMuted(e)}toggleSubtitle(){var e;this.log({message:"toggle subtitle"}),(e=this.svelteRootComponent)==null||e.toggleSubtitle()}changeSubtitle(e,i){var o;this.log({message:"change subtitle"}),(o=this.svelteRootComponent)==null||o.changeSubtitle(e,i)}hideControls(){var e;this.log({message:"hide controls"}),(e=this.svelteRootComponent)==null||e.hideControls()}showControls(){var e;this.log({message:"show controls"}),(e=this.svelteRootComponent)==null||e.showControls()}setPiPEnabled(e){var i,o;(o=(i=this.store)==null?void 0:i.webApi.pictureInPictureApi)==null||o.setEnabled(e)}setVolume(e){var i;this.log({message:`set volume, volume: ${e}`}),(i=this.svelteRootComponent)==null||i.setVolume(e)}setRepeat(e){this.log({message:`set repeat, repeat: ${e}`}),this.needToRepeatPlaylist=e,n(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,s;this.log({message:`set auto quality limitation. Max: ${(i=e.max)!=null?i:"none"}. Min: ${(o=e.min)!=null?o:"none"}`}),(s=this.svelteRootComponent)==null||s.setAutoQualityLimits(e)}setAutoQuality(){var e;(e=this.svelteRootComponent)==null||e.setAutoQuality()}toggleTrafficSaving(e){var i;(i=this.svelteRootComponent)==null||i.toggleTrafficSaving(e)}toggleHighQuality(e){var i;(i=this.svelteRootComponent)==null||i.toggleHighQuality(e)}changeAudioStream(e){var i;(i=this.svelteRootComponent)==null||i.changeAudioStream(e)}addLanguage(e){var i;(i=this.store)==null||i.actions.internal.addLanguage(e)}setLanguage(e){return mp(this,null,function*(){var i;yield(i=this.store)==null?void 0:i.actions.internal.setLanguage(e)})}setLiveStart(e){var i,o;let s=this.isLiveTailPlaying();this.log({message:`live started: liveTailPlaying = ${s}`}),s||((i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!1),(o=this.store)==null||o.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){var e;this.log({message:"live waiting"}),(e=this.store)==null||e.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){var e;let i=(e=this.store)==null?void 0:e.getPlayer();if(!i)return!1;let{info:o}=i;return o.canPlayLiveTailBuffer$.getValue()&&!o.isStalled$.getValue()&&!o.atLiveEdge$.getValue()}setLiveWaitingRecover(e=!1){var i;let o=this.isLiveTailPlaying(),s=e||!o;this.log({message:`live waiting recover: forceImmediate = ${e}, liveTailPlaying = ${o}`});let a=()=>{var l;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!0)};s&&a(),(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var l;s||a(),(l=this.store)==null||l.destroy()})}setLiveWaitingRecord(){var e;let i=this.isLiveTailPlaying(),o=!i;this.log({message:`live waiting record: liveTailPlaying = ${i}`});let s=()=>{var a;(a=this.store)==null||a.actions.internal.setLiveWaitingRecord(!0)};o&&s(),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var a;o||s(),(a=this.store)==null||a.destroy()})}setLiveEnd(e){var i;let o=this.isLiveTailPlaying(),s=!o;this.log({message:`live ended: liveTailPlaying = ${o}`});let a=()=>{var l,d;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!1),(d=this.store)==null||d.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};if(s){a();return}(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=a)}setLiveLowLatency(e){var i;this.log({message:"live switch to low latency "+e}),(i=this.store)==null||i.actions.external.setLiveLowLatency(e)}setLooped(e){var i;(i=this.store)==null||i.actions.internal.setLooped(e)}getDebugData(){var e,i;return(i=(e=this.store)==null?void 0:e.actions.internal.getDebugTextData())!=null?i:""}getDeviceId(){var e,i,o;return(o=(i=(e=this.statistics)==null?void 0:e.oneStat)==null?void 0:i.getDeviceId())!=null?o:void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}replayInteractiveChapter(e){return mp(this,null,function*(){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let s=he(this.store.state.positionExact$),l=he(this.store.state.interactiveEpisodes$).find(r=>!r.completed);this.interactiveController.events.playerChanged$.pipe(WI()).subscribe(()=>{l&&s>=l.time?this.seekTime(l.time):this.seekTime(s),e==null||e()});let d=this.interactiveController.getCurrentChapter();yield this.interactiveController.setChapter({chapterId:(o=d==null?void 0:d.chapter)==null?void 0:o.id,pushToHistory:!1})}})}showInteractiveIndicatorTooltip(e,i=!1){var o;(o=this.microStoresRoot)==null||o.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){var e;(e=this.store)==null||e.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}handleTimerNextVideo(e){var i;(i=this.store)==null||i.actions.internal.setTimerNextVideoRunning(e)}togglePictureInPicture(){var e;(e=this.store)==null||e.actions.internal.togglePictureInPicture()}focus(){var e,i,o;(o=(i=(e=this.svelteRootComponent)==null?void 0:e.keyboardControls)==null?void 0:i.focus)==null||o.call(i)}restoreFocus(){var e;(e=this.focusManager)==null||e.restoreFocus()}handleExternalKeyboardEvent(e){var i,o;return!!((o=(i=this.svelteRootComponent)==null?void 0:i.keyboardControls)!=null&&o.handleExternalKeyboardEvent(e))}setAutoplayNext(e){var i;(i=this.store)==null||i.actions.internal.setAutoplayNextEnabled(e)}getTotalViewTime(){var e,i;return(i=(e=this.statistics)==null?void 0:e.thinOneStat)==null?void 0:i.getTotalViewTime()}unmountComponent(e){e&&Da(e)}};import{InterfaceLanguage as Vne,VKNumericLanguage as Rne,loadVKLangPack as Dne}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as Nne,VideoFormat as Bne}from"@vkontakte/videoplayer-core/es2015";var Cne=()=>{window.customElements.define("vk-video-player",vp)};export{Yu as ControlButtonType,_s as GridTypes,Vne as InterfaceLanguage,Wd as MenuItemType,bs as PlayerPhase,Dl as VERSION,Rne as VKNumericLanguage,Bne as VideoFormat,Nne as VideoQuality,Wl as isDpipSupported,ma as isPiPSupported,Dne as loadVKLangPack,Cne as registerPlayerWebComponent};
|