@vkontakte/videoplayer 1.1.85-dev.a9123e27.0 → 1.1.85-dev.efae8891.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es2018.esm.js CHANGED
@@ -1,61 +1,61 @@
1
1
  /**
2
- * @vkontakte/videoplayer v1.1.85-dev.a9123e27.0
3
- * Wed, 25 Feb 2026 09:07:34 GMT
2
+ * @vkontakte/videoplayer v1.1.85-dev.efae8891.0
3
+ * Thu, 26 Feb 2026 15:09:39 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-1-85/doc/
5
5
  */
6
- var Xb=Object.defineProperty;var Nv=t=>{throw TypeError(t)};var Zb=(t,e,i)=>e in t?Xb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var rr=(t,e,i)=>Zb(t,typeof e!="symbol"?e+"":e,i),gp=(t,e,i)=>e.has(t)||Nv("Cannot "+i);var Ri=(t,e,i)=>(gp(t,e,"read from private field"),i?i.call(t):e.get(t)),Qs=(t,e,i)=>e.has(t)?Nv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),al=(t,e,i,o)=>(gp(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),Ov=(t,e,i)=>(gp(t,e,"access private method"),i);var qs="[",Gs="[!",_a="]",as={};var Zi=Symbol(),Hn=Symbol("filename"),Bv=Symbol("hmr"),Hv="http://www.w3.org/1999/xhtml",Rc="http://www.w3.org/2000/svg";var hp="@attach";var Dc=!0;var Uv,zv,Fv=(zv=(Uv=globalThis.process)==null?void 0:Uv.env)==null?void 0:zv.NODE_ENV,Re=Fv&&!Fv.toLowerCase().startsWith("prod");var sr=Array.isArray,Wv=Array.prototype.indexOf,Gl=Array.from,_p=Object.keys,so=Object.defineProperty,Wo=Object.getOwnPropertyDescriptor,Nc=Object.getOwnPropertyDescriptors,bp=Object.prototype,Kv=Array.prototype,ba=Object.getPrototypeOf,$p=Object.isExtensible;function Ys(t){return typeof t=="function"}var ht=()=>{};function Qv(t){return t()}function js(t){for(var e=0;e<t.length;e++)t[e]()}var Ko=Symbol("$state"),ll=Symbol("legacy props"),qv=Symbol(""),Oc=Symbol("proxy path"),Bc=1,dl=3,ar=8;function Hc(t){return t===this.v}function cl(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Gv(t,e){return t!==e}function ul(t){return!cl(t,this.v)}function Yv(){if(Re){let t=new Error(`derived_references_self
6
+ var i$=Object.defineProperty;var Uv=t=>{throw TypeError(t)};var o$=(t,e,i)=>e in t?i$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var dr=(t,e,i)=>o$(t,typeof e!="symbol"?e+"":e,i),$p=(t,e,i)=>e.has(t)||Uv("Cannot "+i);var Ni=(t,e,i)=>($p(t,e,"read from private field"),i?i.call(t):e.get(t)),js=(t,e,i)=>e.has(t)?Uv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),dl=(t,e,i,o)=>($p(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),zv=(t,e,i)=>($p(t,e,"access private method"),i);var Xs="[",Zs="[!",ya="]",us={};var eo=Symbol(),Wn=Symbol("filename"),Wv=Symbol("hmr"),Kv="http://www.w3.org/1999/xhtml",Bc="http://www.w3.org/2000/svg";var yp="@attach";var Hc=!0;var qv,Gv,Qv=(Gv=(qv=globalThis.process)==null?void 0:qv.env)==null?void 0:Gv.NODE_ENV,Me=Qv&&!Qv.toLowerCase().startsWith("prod");var cr=Array.isArray,Yv=Array.prototype.indexOf,td=Array.from,xp=Object.keys,ao=Object.defineProperty,Oo=Object.getOwnPropertyDescriptor,Fc=Object.getOwnPropertyDescriptors,wp=Object.prototype,jv=Array.prototype,xa=Object.getPrototypeOf,Sp=Object.isExtensible;function Js(t){return typeof t=="function"}var _t=()=>{};function Xv(t){return t()}function ea(t){for(var e=0;e<t.length;e++)t[e]()}var Bo=Symbol("$state"),cl=Symbol("legacy props"),Zv=Symbol(""),Uc=Symbol("proxy path"),zc=1,ul=3,ur=8;function Wc(t){return t===this.v}function pl(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Jv(t,e){return t!==e}function fl(t){return!pl(t,this.v)}function eg(){if(Me){let t=new Error(`derived_references_self
7
7
  A derived value cannot reference itself recursively
8
- https://svelte.dev/e/derived_references_self`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/derived_references_self")}function jv(t){if(Re){let e=new Error(`effect_in_teardown
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 tg(t){if(Me){let e=new Error(`effect_in_teardown
9
9
  \`${t}\` cannot be used inside an effect cleanup function
10
- https://svelte.dev/e/effect_in_teardown`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function Xv(){if(Re){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 Zv(t){if(Re){let e=new Error(`effect_orphan
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 ig(){if(Me){let t=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function og(t){if(Me){let e=new Error(`effect_orphan
11
11
  \`${t}\` can only be used inside an effect (e.g. during component initialisation)
12
- https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function Jv(){if(Re){let t=new Error(`effect_update_depth_exceeded
12
+ https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function ng(){if(Me){let t=new Error(`effect_update_depth_exceeded
13
13
  Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
14
- https://svelte.dev/e/effect_update_depth_exceeded`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function eg(){if(Re){let t=new Error(`hydration_failed
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 rg(){if(Me){let t=new Error(`hydration_failed
15
15
  Failed to hydrate the application
16
- https://svelte.dev/e/hydration_failed`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/hydration_failed")}function tg(){if(Re){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 ig(t){if(Re){let e=new Error(`props_invalid_value
16
+ https://svelte.dev/e/hydration_failed`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/hydration_failed")}function sg(){if(Me){let t=new Error("invalid_snippet\nCould not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\nhttps://svelte.dev/e/invalid_snippet");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/invalid_snippet")}function ag(t){if(Me){let e=new Error(`props_invalid_value
17
17
  Cannot do \`bind:${t}={undefined}\` when \`${t}\` has a fallback value
18
- https://svelte.dev/e/props_invalid_value`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_invalid_value")}function og(t){if(Re){let e=new Error(`props_rest_readonly
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 lg(t){if(Me){let e=new Error(`props_rest_readonly
19
19
  Rest element properties of \`$props()\` such as \`${t}\` are readonly
20
- https://svelte.dev/e/props_rest_readonly`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_rest_readonly")}function ng(t){if(Re){let e=new Error(`rune_outside_svelte
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 dg(t){if(Me){let e=new Error(`rune_outside_svelte
21
21
  The \`${t}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
22
- https://svelte.dev/e/rune_outside_svelte`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function rg(){if(Re){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 sg(){if(Re){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 ag(){if(Re){let t=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}var ls=!1,ds=!1;function lg(){ls=!0}var Yl=null;function Cs(t){let e=Error(),i=e.stack;if(i){let o=i.split(`
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 cg(){if(Me){let t=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ug(){if(Me){let t=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function pg(){if(Me){let t=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}var ps=!1,fs=!1;function fg(){ps=!0}var id=null;function Is(t){let e=Error(),i=e.stack;if(i){let o=i.split(`
23
23
  `),r=[`
24
- `];for(let a=0;a<o.length;a++){let l=o[a];if(l!=="Error"){if(l.includes("validate_each_keys"))return null;l.includes("svelte/src/internal")||r.push(l)}}if(r.length===1)return null;so(e,"stack",{value:r.join(`
25
- `)}),so(e,"name",{value:`${t}Error`})}return e}function Wr(t,e){return t.label=e,Fc(t.v,e),t}function Fc(t,e){var i;return(i=t==null?void 0:t[Oc])==null||i.call(t,e),t}function pl(t){if(Re){let e=new Error(`lifecycle_outside_component
24
+ `];for(let a=0;a<o.length;a++){let l=o[a];if(l!=="Error"){if(l.includes("validate_each_keys"))return null;l.includes("svelte/src/internal")||r.push(l)}}if(r.length===1)return null;ao(e,"stack",{value:r.join(`
25
+ `)}),ao(e,"name",{value:`${t}Error`})}return e}function Gr(t,e){return t.label=e,Kc(t.v,e),t}function Kc(t,e){var i;return(i=t==null?void 0:t[Uc])==null||i.call(t,e),t}function ml(t){if(Me){let e=new Error(`lifecycle_outside_component
26
26
  \`${t}(...)\` can only be used during component initialisation
27
- https://svelte.dev/e/lifecycle_outside_component`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var Ht=null;function jl(t){Ht=t}var lr=null;function Xl(t){lr=t}function fl(t){return wp("getContext").get(t)}function ml(t,e){return wp("setContext").set(t,e),e}function Zl(){return wp("getAllContexts")}function B(t,e=!1,i){var o=Ht={p:Ht,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};ls&&!e&&(Ht.l={s:null,u:null,r1:[],r2:Er(!1)}),To(()=>{o.d=!0}),Re&&(Ht.function=i,lr=i)}function H(t){var l,d;let e=Ht;if(e!==null){t!==void 0&&(e.x=t);let s=e.e;if(s!==null){var i=bt,o=Vt;e.e=null;try{for(var r=0;r<s.length;r++){var a=s[r];ao(a.effect),Wi(a.reaction),Io(a.fn)}}finally{ao(i),Wi(o)}}Ht=e.p,Re&&(lr=(d=(l=e.p)==null?void 0:l.function)!=null?d:null),e.m=!0}return t||{}}function cs(){return!ls||Ht!==null&&Ht.l===null}function wp(t){var e;return Ht===null&&pl(t),(e=Ht.c)!=null?e:Ht.c=new Map(e$(Ht)||void 0)}function e$(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var t$=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function ri(t){if(typeof t!="object"||t===null||Ko in t)return t;let e=ba(t);if(e!==bp&&e!==Kv)return t;var i=new Map,o=sr(t),r=K(0),a=Re&&ds?Cs("CreatedAt"):null,l=Vt,d=m=>{var p=Vt;Wi(l);var v=m();return Wi(p),v};o&&i.set("length",K(t.length,a));var s="";function u(m){s=m,Wr(r,`${s} version`);for(let[p,v]of i)Wr(v,$a(s,p))}return new Proxy(t,{defineProperty(m,p,v){(!("value"in v)||v.configurable===!1||v.enumerable===!1||v.writable===!1)&&rg();var _=i.get(p);return _===void 0?_=d(()=>{var $=K(v.value,a);return i.set(p,$),Re&&typeof p=="string"&&Wr($,$a(s,p)),$}):D(_,v.value,!0),!0},deleteProperty(m,p){var v=i.get(p);if(v===void 0){if(p in m){let y=d(()=>K(Zi,a));i.set(p,y),Sp(r),Re&&Wr(y,$a(s,p))}}else{if(o&&typeof p=="string"){var _=i.get("length"),$=Number(p);Number.isInteger($)&&$<_.v&&D(_,$)}D(v,Zi),Sp(r)}return!0},get(m,p,v){var x;if(p===Ko)return t;if(Re&&p===Oc)return u;var _=i.get(p),$=p in m;if(_===void 0&&(!$||(x=Wo(m,p))!=null&&x.writable)&&(_=d(()=>{var I=ri($?m[p]:Zi),T=K(I,a);return Re&&Wr(T,$a(s,p)),T}),i.set(p,_)),_!==void 0){var y=n(_);return y===Zi?void 0:y}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 $=i.get(p),y=$==null?void 0:$.v;if($!==void 0&&y!==Zi)return{enumerable:!0,configurable:!0,value:y,writable:!0}}return v},has(m,p){var y;if(p===Ko)return!0;var v=i.get(p),_=v!==void 0&&v.v!==Zi||Reflect.has(m,p);if(v!==void 0||bt!==null&&(!_||(y=Wo(m,p))!=null&&y.writable)){v===void 0&&(v=d(()=>{var x=_?ri(m[p]):Zi,I=K(x,a);return Re&&Wr(I,$a(s,p)),I}),i.set(p,v));var $=n(v);if($===Zi)return!1}return _},set(m,p,v,_){var E;var $=i.get(p),y=p in m;if(o&&p==="length")for(var x=v;x<$.v;x+=1){var I=i.get(x+"");I!==void 0?D(I,Zi):x in m&&(I=d(()=>K(Zi,a)),i.set(x+"",I),Re&&Wr(I,$a(s,x)))}if($===void 0)(!y||(E=Wo(m,p))!=null&&E.writable)&&($=d(()=>K(void 0,a)),D($,ri(v)),i.set(p,$),Re&&Wr($,$a(s,p)));else{y=$.v!==Zi;var T=d(()=>ri(v));D($,T)}var R=Reflect.getOwnPropertyDescriptor(m,p);if(R!=null&&R.set&&R.set.call(_,v),!y){if(o&&typeof p=="string"){var k=i.get("length"),P=Number(p);Number.isInteger(P)&&P>=k.v&&D(k,P+1)}Sp(r)}return!0},ownKeys(m){n(r);var p=Reflect.ownKeys(m).filter($=>{var y=i.get($);return y===void 0||y.v!==Zi});for(var[v,_]of i)_.v!==Zi&&!(v in m)&&p.push(v);return p},setPrototypeOf(){sg()}})}function $a(t,e){var i;return typeof e=="symbol"?`${t}[Symbol(${(i=e.description)!=null?i:""})]`:t$.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function Sp(t,e=1){D(t,t.v+e)}function vl(t){try{if(t!==null&&typeof t=="object"&&Ko in t)return t[Ko]}catch(e){}return t}function Cp(t,e){return Object.is(vl(t),vl(e))}function Kr(t){var e=2050,i=Vt!==null&&(Vt.f&2)!==0?Vt:null;bt===null||i!==null&&(i.f&256)!==0?e|=256:bt.f|=1048576;let o={ctx:Ht,deps:null,effects:null,equals:Hc,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:i!=null?i:bt};return Re&&ds&&(o.created=Cs("CreatedAt")),o}function f(t){let e=Kr(t);return Wc(e),e}function yn(t){let e=Kr(t);return e.equals=ul,e}function Uc(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)Ki(e[i])}}var Tp=[];function i$(t){for(var e=t.parent;e!==null;){if((e.f&2)===0)return e;e=e.parent}return null}function Pp(t){var e,i=bt;if(ao(i$(t)),Re){let o=ya;Ip(new Set);try{Tp.includes(t)&&Yv(),Tp.push(t),Uc(t),e=zc(t)}finally{ao(i),Ip(o),Tp.pop()}}else try{Uc(t),e=zc(t)}finally{ao(i)}return e}function Ap(t){var e=Pp(t);if(t.equals(e)||(t.v=e,t.wv=Jl()),!Ts){var i=(Is||(t.f&256)!==0)&&t.deps!==null?4096:1024;xn(t,i)}}var ya=new Set,gl=new Map;function Ip(t){ya=t}function Er(t,e){var i={f:0,v:t,reactions:null,equals:Hc,rv:0,wv:0};return Re&&ds&&(i.created=e!=null?e:Cs("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function K(t,e){let i=Er(t,e);return Wc(i),i}function us(t,e=!1,i=!0){var r,a;let o=Er(t);return e||(o.equals=ul),ls&&i&&Ht!==null&&Ht.l!==null&&((a=(r=Ht.l).s)!=null?a:r.s=[]).push(o),o}function D(t,e,i=!1){var r;Vt!==null&&(!ur||(Vt.f&262144)!==0)&&cs()&&(Vt.f&262162)!==0&&!((r=qo)!=null&&r[1].includes(t)&&qo[0]===Vt)&&ag();let o=i?ri(e):e;return Re&&Fc(o,t.label),hl(t,o)}function hl(t,e){if(!t.equals(e)){var i=t.v;if(Ts?gl.set(t,e):gl.set(t,i),t.v=e,Re&&ds&&(t.updated=Cs("UpdatedAt"),bt!==null&&(t.set_during_effect=!0)),(t.f&2)!==0&&((t.f&2048)!==0&&Pp(t),xn(t,(t.f&256)===0?1024:4096)),t.wv=Jl(),cg(t,2048),cs()&&bt!==null&&(bt.f&1024)!==0&&(bt.f&96)===0&&(cr===null?ug([t]):cr.push(t)),Re&&ya.size>0){let o=Array.from(ya);for(let r of o)(r.f&1024)!==0&&xn(r,4096),wa(r)&&_l(r);ya.clear()}}return e}function cg(t,e){var i=t.reactions;if(i!==null)for(var o=cs(),r=i.length,a=0;a<r;a++){var l=i[a],d=l.f;if((d&2048)===0&&!(!o&&l===bt)){if(Re&&(d&262144)!==0){ya.add(l);continue}xn(l,e),(d&1280)!==0&&((d&2)!==0?cg(l,4096):td(l))}}}var bl="font-weight: bold",$l="font-weight: normal";function pg(t,e,i){Re?console.warn(`%c[svelte] hydration_attribute_changed
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 Nt=null;function od(t){Nt=t}var pr=null;function nd(t){pr=t}function vl(t){return Ip("getContext").get(t)}function gl(t,e){return Ip("setContext").set(t,e),e}function rd(){return Ip("getAllContexts")}function B(t,e=!1,i){var o=Nt={p:Nt,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};ps&&!e&&(Nt.l={s:null,u:null,r1:[],r2:kr(!1)}),xo(()=>{o.d=!0}),Me&&(Nt.function=i,pr=i)}function H(t){var l,d;let e=Nt;if(e!==null){t!==void 0&&(e.x=t);let s=e.e;if(s!==null){var i=bt,o=Lt;e.e=null;try{for(var r=0;r<s.length;r++){var a=s[r];lo(a.effect),zi(a.reaction),wo(a.fn)}}finally{lo(i),zi(o)}}Nt=e.p,Me&&(pr=(d=(l=e.p)==null?void 0:l.function)!=null?d:null),e.m=!0}return t||{}}function ms(){return!ps||Nt!==null&&Nt.l===null}function Ip(t){var e;return Nt===null&&ml(t),(e=Nt.c)!=null?e:Nt.c=new Map(r$(Nt)||void 0)}function r$(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var s$=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function ii(t){if(typeof t!="object"||t===null||Bo in t)return t;let e=xa(t);if(e!==wp&&e!==jv)return t;var i=new Map,o=cr(t),r=K(0),a=Me&&fs?Is("CreatedAt"):null,l=Lt,d=f=>{var p=Lt;zi(l);var v=f();return zi(p),v};o&&i.set("length",K(t.length,a));var s="";function u(f){s=f,Gr(r,`${s} version`);for(let[p,v]of i)Gr(v,wa(s,p))}return new Proxy(t,{defineProperty(f,p,v){(!("value"in v)||v.configurable===!1||v.enumerable===!1||v.writable===!1)&&cg();var _=i.get(p);return _===void 0?_=d(()=>{var y=K(v.value,a);return i.set(p,y),Me&&typeof p=="string"&&Gr(y,wa(s,p)),y}):D(_,v.value,!0),!0},deleteProperty(f,p){var v=i.get(p);if(v===void 0){if(p in f){let $=d(()=>K(eo,a));i.set(p,$),Ep(r),Me&&Gr($,wa(s,p))}}else{if(o&&typeof p=="string"){var _=i.get("length"),y=Number(p);Number.isInteger(y)&&y<_.v&&D(_,y)}D(v,eo),Ep(r)}return!0},get(f,p,v){var x;if(p===Bo)return t;if(Me&&p===Uc)return u;var _=i.get(p),y=p in f;if(_===void 0&&(!y||(x=Oo(f,p))!=null&&x.writable)&&(_=d(()=>{var I=ii(y?f[p]:eo),T=K(I,a);return Me&&Gr(T,wa(s,p)),T}),i.set(p,_)),_!==void 0){var $=n(_);return $===eo?void 0:$}return Reflect.get(f,p,v)},getOwnPropertyDescriptor(f,p){var v=Reflect.getOwnPropertyDescriptor(f,p);if(v&&"value"in v){var _=i.get(p);_&&(v.value=n(_))}else if(v===void 0){var y=i.get(p),$=y==null?void 0:y.v;if(y!==void 0&&$!==eo)return{enumerable:!0,configurable:!0,value:$,writable:!0}}return v},has(f,p){var $;if(p===Bo)return!0;var v=i.get(p),_=v!==void 0&&v.v!==eo||Reflect.has(f,p);if(v!==void 0||bt!==null&&(!_||($=Oo(f,p))!=null&&$.writable)){v===void 0&&(v=d(()=>{var x=_?ii(f[p]):eo,I=K(x,a);return Me&&Gr(I,wa(s,p)),I}),i.set(p,v));var y=n(v);if(y===eo)return!1}return _},set(f,p,v,_){var E;var y=i.get(p),$=p in f;if(o&&p==="length")for(var x=v;x<y.v;x+=1){var I=i.get(x+"");I!==void 0?D(I,eo):x in f&&(I=d(()=>K(eo,a)),i.set(x+"",I),Me&&Gr(I,wa(s,x)))}if(y===void 0)(!$||(E=Oo(f,p))!=null&&E.writable)&&(y=d(()=>K(void 0,a)),D(y,ii(v)),i.set(p,y),Me&&Gr(y,wa(s,p)));else{$=y.v!==eo;var T=d(()=>ii(v));D(y,T)}var R=Reflect.getOwnPropertyDescriptor(f,p);if(R!=null&&R.set&&R.set.call(_,v),!$){if(o&&typeof p=="string"){var k=i.get("length"),P=Number(p);Number.isInteger(P)&&P>=k.v&&D(k,P+1)}Ep(r)}return!0},ownKeys(f){n(r);var p=Reflect.ownKeys(f).filter(y=>{var $=i.get(y);return $===void 0||$.v!==eo});for(var[v,_]of i)_.v!==eo&&!(v in f)&&p.push(v);return p},setPrototypeOf(){ug()}})}function wa(t,e){var i;return typeof e=="symbol"?`${t}[Symbol(${(i=e.description)!=null?i:""})]`:s$.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function Ep(t,e=1){D(t,t.v+e)}function hl(t){try{if(t!==null&&typeof t=="object"&&Bo in t)return t[Bo]}catch(e){}return t}function Pp(t,e){return Object.is(hl(t),hl(e))}function Yr(t){var e=2050,i=Lt!==null&&(Lt.f&2)!==0?Lt:null;bt===null||i!==null&&(i.f&256)!==0?e|=256:bt.f|=1048576;let o={ctx:Nt,deps:null,effects:null,equals:Wc,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:i!=null?i:bt};return Me&&fs&&(o.created=Is("CreatedAt")),o}function m(t){let e=Yr(t);return Gc(e),e}function mr(t){let e=Yr(t);return e.equals=fl,e}function Qc(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)Wi(e[i])}}var Ap=[];function a$(t){for(var e=t.parent;e!==null;){if((e.f&2)===0)return e;e=e.parent}return null}function Mp(t){var e,i=bt;if(lo(a$(t)),Me){let o=Sa;kp(new Set);try{Ap.includes(t)&&eg(),Ap.push(t),Qc(t),e=qc(t)}finally{lo(i),kp(o),Ap.pop()}}else try{Qc(t),e=qc(t)}finally{lo(i)}return e}function Vp(t){var e=Mp(t);if(t.equals(e)||(t.v=e,t.wv=sd()),!Es){var i=(Ps||(t.f&256)!==0)&&t.deps!==null?4096:1024;In(t,i)}}var Sa=new Set,_l=new Map;function kp(t){Sa=t}function kr(t,e){var i={f:0,v:t,reactions:null,equals:Wc,rv:0,wv:0};return Me&&fs&&(i.created=e!=null?e:Is("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function K(t,e){let i=kr(t,e);return Gc(i),i}function vs(t,e=!1,i=!0){var r,a;let o=kr(t);return e||(o.equals=fl),ps&&i&&Nt!==null&&Nt.l!==null&&((a=(r=Nt.l).s)!=null?a:r.s=[]).push(o),o}function D(t,e,i=!1){var r;Lt!==null&&(!gr||(Lt.f&262144)!==0)&&ms()&&(Lt.f&262162)!==0&&!((r=Fo)!=null&&r[1].includes(t)&&Fo[0]===Lt)&&pg();let o=i?ii(e):e;return Me&&Kc(o,t.label),bl(t,o)}function bl(t,e){if(!t.equals(e)){var i=t.v;if(Es?_l.set(t,e):_l.set(t,i),t.v=e,Me&&fs&&(t.updated=Is("UpdatedAt"),bt!==null&&(t.set_during_effect=!0)),(t.f&2)!==0&&((t.f&2048)!==0&&Mp(t),In(t,(t.f&256)===0?1024:4096)),t.wv=sd(),vg(t,2048),ms()&&bt!==null&&(bt.f&1024)!==0&&(bt.f&96)===0&&(vr===null?gg([t]):vr.push(t)),Me&&Sa.size>0){let o=Array.from(Sa);for(let r of o)(r.f&1024)!==0&&In(r,4096),Ta(r)&&$l(r);Sa.clear()}}return e}function vg(t,e){var i=t.reactions;if(i!==null)for(var o=ms(),r=i.length,a=0;a<r;a++){var l=i[a],d=l.f;if((d&2048)===0&&!(!o&&l===bt)){if(Me&&(d&262144)!==0){Sa.add(l);continue}In(l,e),(d&1280)!==0&&((d&2)!==0?vg(l,4096):ld(l))}}}var yl="font-weight: bold",xl="font-weight: normal";function hg(t,e,i){Me?console.warn(`%c[svelte] hydration_attribute_changed
28
28
  %cThe \`${t}\` attribute on \`${e}\` changed its value between server and client renders. The client value, \`${i}\`, will be ignored in favour of the server value
29
- https://svelte.dev/e/hydration_attribute_changed`,bl,$l):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function fg(t){Re?console.warn(`%c[svelte] hydration_html_changed
29
+ https://svelte.dev/e/hydration_attribute_changed`,yl,xl):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function _g(t){Me?console.warn(`%c[svelte] hydration_html_changed
30
30
  %c${t?`The value of an \`{@html ...}\` block ${t} changed between server and client renders. The client value will be ignored in favour of the server value`:"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
31
- https://svelte.dev/e/hydration_html_changed`,bl,$l):console.warn("https://svelte.dev/e/hydration_html_changed")}function Xs(t){Re?console.warn(`%c[svelte] hydration_mismatch
31
+ https://svelte.dev/e/hydration_html_changed`,yl,xl):console.warn("https://svelte.dev/e/hydration_html_changed")}function ta(t){Me?console.warn(`%c[svelte] hydration_mismatch
32
32
  %c${t?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${t}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
33
- https://svelte.dev/e/hydration_mismatch`,bl,$l):console.warn("https://svelte.dev/e/hydration_mismatch")}function mg(){Re?console.warn(`%c[svelte] lifecycle_double_unmount
33
+ https://svelte.dev/e/hydration_mismatch`,yl,xl):console.warn("https://svelte.dev/e/hydration_mismatch")}function bg(){Me?console.warn(`%c[svelte] lifecycle_double_unmount
34
34
  %cTried to unmount a component that was not mounted
35
- https://svelte.dev/e/lifecycle_double_unmount`,bl,$l):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function vg(){Re?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",bl,$l):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Kc(t){Re?console.warn(`%c[svelte] state_proxy_equality_mismatch
35
+ https://svelte.dev/e/lifecycle_double_unmount`,yl,xl):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function $g(){Me?console.warn("%c[svelte] select_multiple_invalid_value\n%cThe `value` property of a `<select multiple>` element should be an array, but it received a non-array value. The selection will be kept as is.\nhttps://svelte.dev/e/select_multiple_invalid_value",yl,xl):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Yc(t){Me?console.warn(`%c[svelte] state_proxy_equality_mismatch
36
36
  %cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${t}\` will produce unexpected results
37
- https://svelte.dev/e/state_proxy_equality_mismatch`,bl,$l):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var it=!1;function lo(t){it=t}var $t;function xi(t){if(t===null)throw Xs(),as;return $t=t}function Qi(){return xi(Go($t))}function S(t){if(it){if(Go($t)!==null)throw Xs(),as;$t=t}}function Jt(t=1){if(it){for(var e=t,i=$t;e--;)i=Go(i);$t=i}}function Sa(){for(var t=0,e=$t;;){if(e.nodeType===ar){var i=e.data;if(i===_a){if(t===0)return e;t-=1}else(i===qs||i===Gs)&&(t+=1)}var o=Go(e);e.remove(),e=o}}function Qc(t){if(!t||t.nodeType!==ar)throw Xs(),as;return t.data}function gg(){let t=Array.prototype,e=Array.__svelte_cleanup;e&&e();let{indexOf:i,lastIndexOf:o,includes:r}=t;t.indexOf=function(a,l){let d=i.call(this,a,l);if(d===-1){for(let s=l!=null?l:0;s<this.length;s+=1)if(vl(this[s])===a){Kc("array.indexOf(...)");break}}return d},t.lastIndexOf=function(a,l){let d=o.call(this,a,l!=null?l:this.length-1);if(d===-1){for(let s=0;s<=(l!=null?l:this.length-1);s+=1)if(vl(this[s])===a){Kc("array.lastIndexOf(...)");break}}return d},t.includes=function(a,l){let d=r.call(this,a,l);if(!d){for(let s=0;s<this.length;s+=1)if(vl(this[s])===a){Kc("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{t.indexOf=i,t.lastIndexOf=o,t.includes=r}}var Ca,hg,id,_g,bg;function qc(){if(Ca===void 0){Ca=window,hg=document,id=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;_g=Wo(e,"firstChild").get,bg=Wo(e,"nextSibling").get,$p(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),$p(i)&&(i.__t=void 0),Re&&(t.__svelte_meta=null,gg())}}function wn(t=""){return document.createTextNode(t)}function Si(t){return _g.call(t)}function Go(t){return bg.call(t)}function C(t,e){if(!it)return Si(t);var i=Si($t);if(i===null)i=$t.appendChild(wn());else if(e&&i.nodeType!==dl){var o=wn();return i==null||i.before(o),xi(o),o}return xi(i),i}function ae(t,e){var r,a;if(!it){var i=Si(t);return i.nodeType===8&&i.data===""?Go(i):i}if(e&&((r=$t)==null?void 0:r.nodeType)!==dl){var o=wn();return(a=$t)==null||a.before(o),xi(o),o}return $t}function A(t,e=1,i=!1){let o=it?$t:t;for(var r;e--;)r=o,o=Go(o);if(!it)return o;if(i&&(o==null?void 0:o.nodeType)!==dl){var a=wn();return o===null?r==null||r.after(a):o.before(a),xi(a),a}return xi(o),o}function od(t){t.textContent=""}function Mp(t){bt===null&&Vt===null&&Zv(t),Vt!==null&&(Vt.f&256)!==0&&bt===null&&Xv(),Ts&&jv(t)}function o$(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function Ta(t,e,i,o=!0){var s;var r=bt;if(Re)for(;r!==null&&(r.f&262144)!==0;)r=r.parent;var a={ctx:Ht,deps:null,nodes_start:null,nodes_end:null,f:t|2048,first:null,fn:e,last:null,next:null,parent:r,prev:null,teardown:null,transitions:null,wv:0};if(Re&&(a.component_function=lr),i)try{_l(a),a.f|=32768}catch(u){throw Ki(a),u}else e!==null&&td(a);var l=i&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&1048704)===0;if(!l&&o&&(r!==null&&o$(a,r),Vt!==null&&(Vt.f&2)!==0)){var d=Vt;((s=d.effects)!=null?s:d.effects=[]).push(a)}return a}function To(t){let e=Ta(8,null,!1);return xn(e,1024),e.teardown=t,e}function He(t){var r;Mp("$effect");var e=bt!==null&&(bt.f&32)!==0&&Ht!==null&&!Ht.m;if(Re&&so(t,"name",{value:"$effect"}),e){var i=Ht;((r=i.e)!=null?r:i.e=[]).push({fn:t,effect:bt,reaction:Vt})}else{var o=Io(t);return o}}function sd(t){return Mp("$effect.pre"),Re&&so(t,"name",{value:"$effect.pre"}),Yo(t)}function jc(t){let e=Ta(64,t,!0);return()=>{Ki(e)}}function yg(t){let e=Ta(64,t,!0);return(i={})=>new Promise(o=>{i.outro?Wn(e,()=>{Ki(e),o(void 0)}):(Ki(e),o(void 0))})}function Io(t){return Ta(4,t,!1)}function Yo(t){return Ta(8,t,!0)}function N(t,e=[],i=Kr){if(Re)return Yo(()=>{var r=bt,a=()=>t(...l.map(n));so(r.fn,"name",{value:"{expression}"}),so(a,"name",{value:"{expression}"});let l=e.map(i);qi(a)});let o=e.map(i);return qi(()=>t(...o.map(n)))}function qi(t,e=0){return Ta(24|e,t,!0)}function Di(t,e=!0){return Ta(40,t,!0,e)}function Vp(t){var e=t.teardown;if(e!==null){let i=Ts,o=Vt;kp(!0),Wi(null);try{e.call(null)}finally{kp(i),Wi(o)}}}function Rp(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:Ki(i,e),i=o}}function xg(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&32)===0&&Ki(e),e=i}}function Ki(t,e=!0){var i=!1;(e||(t.f&524288)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(Dp(t.nodes_start,t.nodes_end),i=!0),Rp(t,e&&!i),ad(t,0),xn(t,16384);var o=t.transitions;if(o!==null)for(let a of o)a.stop();Vp(t);var r=t.parent;r!==null&&r.first!==null&&Np(t),Re&&(t.component_function=null),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Dp(t,e){for(;t!==null;){var i=t===e?null:Go(t);t.remove(),t=i}}function Np(t){var e=t.parent,i=t.prev,o=t.next;i!==null&&(i.next=o),o!==null&&(o.prev=i),e!==null&&(e.first===t&&(e.first=o),e.last===t&&(e.last=i))}function Wn(t,e){var i=[];Xc(t,i,!0),Op(i,()=>{Ki(t),e&&e()})}function Op(t,e){var i=t.length;if(i>0){var o=()=>--i||e();for(var r of t)r.out(o)}else e()}function Xc(t,e,i){if((t.f&8192)===0){if(t.f^=8192,t.transitions!==null)for(let l of t.transitions)(l.is_global||i)&&e.push(l);for(var o=t.first;o!==null;){var r=o.next,a=(o.f&65536)!==0||(o.f&32)!==0;Xc(o,e,a?i:!1),o=r}}}function Ps(t){wg(t,!0)}function wg(t,e){if((t.f&8192)!==0){t.f^=8192;for(var i=t.first;i!==null;){var o=i.next,r=(i.f&65536)!==0||(i.f&32)!==0;wg(i,r?e:!1),i=o}if(t.transitions!==null)for(let a of t.transitions)(a.is_global||e)&&a.in()}}var ld=[],Bp=[];function Sg(){var t=ld;ld=[],js(t)}function n$(){var t=Bp;Bp=[],js(t)}function Sn(t){ld.length===0&&queueMicrotask(Sg),ld.push(t)}function Cg(){ld.length>0&&Sg(),Bp.length>0&&n$()}function Ig(t){var e=bt;if(Re&&t instanceof Error&&r$(t,e),(e.f&32768)===0){if((e.f&128)===0)throw t;e.fn(t)}else dd(t,e)}function dd(t,e){for(;e!==null;){if((e.f&128)!==0)try{e.fn(t);return}catch(i){}e=e.parent}throw t}var Tg=new WeakSet;function r$(t,e){var l,d;if(Tg.has(t))return;Tg.add(t);let i=Wo(t,"message");if(!(i&&!i.configurable)){for(var o=id?" ":" ",r=`
37
+ https://svelte.dev/e/state_proxy_equality_mismatch`,yl,xl):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var ot=!1;function co(t){ot=t}var $t;function $i(t){if(t===null)throw ta(),us;return $t=t}function Ki(){return $i(Uo($t))}function S(t){if(ot){if(Uo($t)!==null)throw ta(),us;$t=t}}function Yt(t=1){if(ot){for(var e=t,i=$t;e--;)i=Uo(i);$t=i}}function Ia(){for(var t=0,e=$t;;){if(e.nodeType===ur){var i=e.data;if(i===ya){if(t===0)return e;t-=1}else(i===Xs||i===Zs)&&(t+=1)}var o=Uo(e);e.remove(),e=o}}function jc(t){if(!t||t.nodeType!==ur)throw ta(),us;return t.data}function yg(){let t=Array.prototype,e=Array.__svelte_cleanup;e&&e();let{indexOf:i,lastIndexOf:o,includes:r}=t;t.indexOf=function(a,l){let d=i.call(this,a,l);if(d===-1){for(let s=l!=null?l:0;s<this.length;s+=1)if(hl(this[s])===a){Yc("array.indexOf(...)");break}}return d},t.lastIndexOf=function(a,l){let d=o.call(this,a,l!=null?l:this.length-1);if(d===-1){for(let s=0;s<=(l!=null?l:this.length-1);s+=1)if(hl(this[s])===a){Yc("array.lastIndexOf(...)");break}}return d},t.includes=function(a,l){let d=r.call(this,a,l);if(!d){for(let s=0;s<this.length;s+=1)if(hl(this[s])===a){Yc("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{t.indexOf=i,t.lastIndexOf=o,t.includes=r}}var Ea,xg,dd,wg,Sg;function Xc(){if(Ea===void 0){Ea=window,xg=document,dd=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;wg=Oo(e,"firstChild").get,Sg=Oo(e,"nextSibling").get,Sp(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Sp(i)&&(i.__t=void 0),Me&&(t.__svelte_meta=null,yg())}}function En(t=""){return document.createTextNode(t)}function Ci(t){return wg.call(t)}function Uo(t){return Sg.call(t)}function C(t,e){if(!ot)return Ci(t);var i=Ci($t);if(i===null)i=$t.appendChild(En());else if(e&&i.nodeType!==ul){var o=En();return i==null||i.before(o),$i(o),o}return $i(i),i}function le(t,e){var r,a;if(!ot){var i=Ci(t);return i.nodeType===8&&i.data===""?Uo(i):i}if(e&&((r=$t)==null?void 0:r.nodeType)!==ul){var o=En();return(a=$t)==null||a.before(o),$i(o),o}return $t}function A(t,e=1,i=!1){let o=ot?$t:t;for(var r;e--;)r=o,o=Uo(o);if(!ot)return o;if(i&&(o==null?void 0:o.nodeType)!==ul){var a=En();return o===null?r==null||r.after(a):o.before(a),$i(a),a}return $i(o),o}function cd(t){t.textContent=""}function Np(t){bt===null&&Lt===null&&og(t),Lt!==null&&(Lt.f&256)!==0&&bt===null&&ig(),Es&&tg(t)}function l$(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function Pa(t,e,i,o=!0){var s;var r=bt;if(Me)for(;r!==null&&(r.f&262144)!==0;)r=r.parent;var a={ctx:Nt,deps:null,nodes_start:null,nodes_end:null,f:t|2048,first:null,fn:e,last:null,next:null,parent:r,prev:null,teardown:null,transitions:null,wv:0};if(Me&&(a.component_function=pr),i)try{$l(a),a.f|=32768}catch(u){throw Wi(a),u}else e!==null&&ld(a);var l=i&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&1048704)===0;if(!l&&o&&(r!==null&&l$(a,r),Lt!==null&&(Lt.f&2)!==0)){var d=Lt;((s=d.effects)!=null?s:d.effects=[]).push(a)}return a}function xo(t){let e=Pa(8,null,!1);return In(e,1024),e.teardown=t,e}function He(t){var r;Np("$effect");var e=bt!==null&&(bt.f&32)!==0&&Nt!==null&&!Nt.m;if(Me&&ao(t,"name",{value:"$effect"}),e){var i=Nt;((r=i.e)!=null?r:i.e=[]).push({fn:t,effect:bt,reaction:Lt})}else{var o=wo(t);return o}}function fd(t){return Np("$effect.pre"),Me&&ao(t,"name",{value:"$effect.pre"}),zo(t)}function eu(t){let e=Pa(64,t,!0);return()=>{Wi(e)}}function Tg(t){let e=Pa(64,t,!0);return(i={})=>new Promise(o=>{i.outro?Gn(e,()=>{Wi(e),o(void 0)}):(Wi(e),o(void 0))})}function wo(t){return Pa(4,t,!1)}function zo(t){return Pa(8,t,!0)}function N(t,e=[],i=Yr){if(Me)return zo(()=>{var r=bt,a=()=>t(...l.map(n));ao(r.fn,"name",{value:"{expression}"}),ao(a,"name",{value:"{expression}"});let l=e.map(i);Qi(a)});let o=e.map(i);return Qi(()=>t(...o.map(n)))}function Qi(t,e=0){return Pa(24|e,t,!0)}function Oi(t,e=!0){return Pa(40,t,!0,e)}function Op(t){var e=t.teardown;if(e!==null){let i=Es,o=Lt;Rp(!0),zi(null);try{e.call(null)}finally{Rp(i),zi(o)}}}function Bp(t,e=!1){var i=t.first;for(t.first=t.last=null;i!==null;){var o=i.next;(i.f&64)!==0?i.parent=null:Wi(i,e),i=o}}function Ig(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&32)===0&&Wi(e),e=i}}function Wi(t,e=!0){var i=!1;(e||(t.f&524288)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(Hp(t.nodes_start,t.nodes_end),i=!0),Bp(t,e&&!i),md(t,0),In(t,16384);var o=t.transitions;if(o!==null)for(let a of o)a.stop();Op(t);var r=t.parent;r!==null&&r.first!==null&&Fp(t),Me&&(t.component_function=null),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Hp(t,e){for(;t!==null;){var i=t===e?null:Uo(t);t.remove(),t=i}}function Fp(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 Gn(t,e){var i=[];tu(t,i,!0),Up(i,()=>{Wi(t),e&&e()})}function Up(t,e){var i=t.length;if(i>0){var o=()=>--i||e();for(var r of t)r.out(o)}else e()}function tu(t,e,i){if((t.f&8192)===0){if(t.f^=8192,t.transitions!==null)for(let l of t.transitions)(l.is_global||i)&&e.push(l);for(var o=t.first;o!==null;){var r=o.next,a=(o.f&65536)!==0||(o.f&32)!==0;tu(o,e,a?i:!1),o=r}}}function ks(t){Eg(t,!0)}function Eg(t,e){if((t.f&8192)!==0){t.f^=8192;for(var i=t.first;i!==null;){var o=i.next,r=(i.f&65536)!==0||(i.f&32)!==0;Eg(i,r?e:!1),i=o}if(t.transitions!==null)for(let a of t.transitions)(a.is_global||e)&&a.in()}}var vd=[],zp=[];function Pg(){var t=vd;vd=[],ea(t)}function d$(){var t=zp;zp=[],ea(t)}function Pn(t){vd.length===0&&queueMicrotask(Pg),vd.push(t)}function Ag(){vd.length>0&&Pg(),zp.length>0&&d$()}function Lg(t){var e=bt;if(Me&&t instanceof Error&&c$(t,e),(e.f&32768)===0){if((e.f&128)===0)throw t;e.fn(t)}else gd(t,e)}function gd(t,e){for(;e!==null;){if((e.f&128)!==0)try{e.fn(t);return}catch(i){}e=e.parent}throw t}var kg=new WeakSet;function c$(t,e){var l,d;if(kg.has(t))return;kg.add(t);let i=Oo(t,"message");if(!(i&&!i.configurable)){for(var o=dd?" ":" ",r=`
38
38
  ${o}in ${((l=e.fn)==null?void 0:l.name)||"<unknown>"}`,a=e.ctx;a!==null;)r+=`
39
- ${o}in ${(d=a.function)==null?void 0:d[Hn].split("/").pop()}`,a=a.p;so(t,"message",{value:t.message+`
39
+ ${o}in ${(d=a.function)==null?void 0:d[Wn].split("/").pop()}`,a=a.p;ao(t,"message",{value:t.message+`
40
40
  ${r}
41
- `}),t.stack&&so(t,"stack",{value:t.stack.split(`
41
+ `}),t.stack&&ao(t,"stack",{value:t.stack.split(`
42
42
  `).filter(s=>!s.includes("svelte/src/internal")).join(`
43
- `)})}}var Ia=!1,yl=null,Ea=!1,Ts=!1;function kp(t){Ts=t}var cd=[],ud=[],Vt=null,ur=!1;function Wi(t){Vt=t}var bt=null;function ao(t){bt=t}var qo=null;function Wc(t){Vt!==null&&Vt.f&2097152&&(qo===null?qo=[Vt,[t]]:qo[1].push(t))}var Cn=null,pr=0,cr=null;function ug(t){cr=t}var Ag=1,Jc=0,Is=!1,eu=null;function Jl(){return++Ag}function wa(t){var p,v;var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){var i=t.deps,o=(e&256)!==0;if(i!==null){var r,a,l=(e&512)!==0,d=o&&bt!==null&&!Is,s=i.length;if(l||d){var u=t,m=u.parent;for(r=0;r<s;r++)a=i[r],(l||!((p=a==null?void 0:a.reactions)!=null&&p.includes(u)))&&((v=a.reactions)!=null?v:a.reactions=[]).push(u);l&&(u.f^=512),d&&m!==null&&(m.f&256)===0&&(u.f^=256)}for(r=0;r<s;r++)if(a=i[r],wa(a)&&Ap(a),a.wv>t.wv)return!0}(!o||bt!==null&&!Is)&&xn(t,1024)}return!1}function kg(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];qo!=null&&qo[1].includes(t)&&qo[0]===Vt||((a.f&2)!==0?kg(a,e,!1):e===a&&(i?xn(a,2048):(a.f&1024)!==0&&xn(a,4096),td(a)))}}function zc(t){var _,$;var e=Cn,i=pr,o=cr,r=Vt,a=Is,l=qo,d=Ht,s=ur,u=t.f;Cn=null,pr=0,cr=null,Is=(u&256)!==0&&(ur||!Ea||Vt===null),Vt=(u&96)===0?t:null,qo=null,jl(t.ctx),ur=!1,Jc++,t.f|=2097152;try{var m=(0,t.fn)(),p=t.deps;if(Cn!==null){var v;if(ad(t,pr),p!==null&&pr>0)for(p.length=pr+Cn.length,v=0;v<Cn.length;v++)p[pr+v]=Cn[v];else t.deps=p=Cn;if(!Is||(u&2)!==0&&t.reactions!==null)for(v=pr;v<p.length;v++)(($=(_=p[v]).reactions)!=null?$:_.reactions=[]).push(t)}else p!==null&&pr<p.length&&(ad(t,pr),p.length=pr);if(cs()&&cr!==null&&!ur&&p!==null&&(t.f&6146)===0)for(v=0;v<cr.length;v++)kg(cr[v],t);return r!==null&&r!==t&&(Jc++,cr!==null&&(o===null?o=cr:o.push(...cr))),m}catch(y){Ig(y)}finally{Cn=e,pr=i,cr=o,Vt=r,Is=a,qo=l,jl(d),ur=s,t.f^=2097152}}function s$(t,e){let i=e.reactions;if(i!==null){var o=Wv.call(i,t);if(o!==-1){var r=i.length-1;r===0?i=e.reactions=null:(i[o]=i[r],i.pop())}}i===null&&(e.f&2)!==0&&(Cn===null||!Cn.includes(e))&&(xn(e,4096),(e.f&768)===0&&(e.f^=512),Uc(e),ad(e,0))}function ad(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)s$(t,i[o])}function _l(t){var e=t.f;if((e&16384)===0){xn(t,1024);var i=bt,o=Ea;if(bt=t,Ea=!0,Re){var r=lr;Xl(t.component_function)}try{(e&16)!==0?xg(t):Rp(t),Vp(t);var a=zc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Ag,Re&&ds&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=Jl(),l.set_during_effect=!1);Re&&ud.push(t)}finally{Ea=o,bt=i,Re&&Xl(r)}}}function Eg(){console.error("Last ten effects were: ",ud.slice(-10).map(t=>t.fn)),ud=[]}function a$(){try{Jv()}catch(t){if(Re&&so(t,"stack",{value:""}),yl!==null)if(Re)try{dd(t,yl)}catch(e){throw Eg(),e}else dd(t,yl);else throw Re&&Eg(),t}}function Fp(){var t=Ea;try{var e=0;for(Ea=!0;cd.length>0;){e++>1e3&&a$();var i=cd,o=i.length;cd=[];for(var r=0;r<o;r++){var a=d$(i[r]);l$(a)}gl.clear()}}finally{Ia=!1,Ea=t,yl=null,Re&&(ud=[])}}function l$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&wa(o)&&(_l(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?Np(o):o.fn=null))}}function td(t){Ia||(Ia=!0,queueMicrotask(Fp));for(var e=yl=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}cd.push(e)}function d$(t){for(var e=[],i=t;i!==null;){var o=i.f,r=(o&96)!==0,a=r&&(o&1024)!==0;if(!a&&(o&8192)===0){(o&4)!==0?e.push(i):r?i.f^=1024:wa(i)&&_l(i);var l=i.first;if(l!==null){i=l;continue}}var d=i.parent;for(i=i.next;i===null&&d!==null;)i=d.next,d=d.parent}return e}function xl(t){var e;for(t&&(Ia=!0,Fp(),Ia=!0,e=t());;){if(Cg(),cd.length===0)return Ia=!1,yl=null,Re&&(ud=[]),e;Ia=!0,Fp()}}async function co(){await Promise.resolve(),xl()}function n(t){var e=t.f,i=(e&2)!==0;if(eu!==null&&eu.add(t),Vt!==null&&!ur){if(!(qo!=null&&qo[1].includes(t))||qo[0]!==Vt){var o=Vt.deps;t.rv<Jc&&(t.rv=Jc,Cn===null&&o!==null&&o[pr]===t?pr++:Cn===null?Cn=[t]:(!Is||!Cn.includes(t))&&Cn.push(t))}}else if(i&&t.deps===null&&t.effects===null){var r=t,a=r.parent;a!==null&&(a.f&256)===0&&(r.f^=256)}if(i&&(r=t,wa(r)&&Ap(r)),Re&&ds&&!ur&&Yl!==null&&Vt!==null&&Yl.reaction===Vt)if(t.trace)t.trace();else{var l=Cs("TracedAt");if(l){var d=Yl.entries.get(t);d===void 0&&(d={traces:[]},Yl.entries.set(t,d));var s=d.traces[d.traces.length-1];l.stack!==(s==null?void 0:s.stack)&&d.traces.push(l)}}return Ts&&gl.has(t)?gl.get(t):t.v}function Tt(t){var e=ur;try{return ur=!0,t()}finally{ur=e}}var c$=-7169;function xn(t,e){t.f=t.f&c$|e}function iu(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Ko in t)tu(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&Ko in i&&tu(i)}}}function tu(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{tu(t[o],e)}catch(r){}let i=ba(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){let o=Nc(i);for(let r in o){let a=o[r].get;if(a)try{a.call(t)}catch(l){}}}}}function Up(t,e){if(e){let i=document.body;t.autofocus=!0,Sn(()=>{document.activeElement===i&&t.focus()})}}function pd(t){var e=Vt,i=bt;Wi(null),ao(null);try{return t()}finally{Wi(e),ao(i)}}var zp=new Set,ou=new Set;function Pa(t){if(!it)return;t.removeAttribute("onload"),t.removeAttribute("onerror");let e=t.__e;e!==void 0&&(t.__e=void 0,queueMicrotask(()=>{t.isConnected&&t.dispatchEvent(e)}))}function Wp(t,e,i,o={}){function r(a){if(o.capture||wl.call(e,a),!a.cancelBubble)return pd(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Sn(()=>{e.addEventListener(t,r,o)}):e.addEventListener(t,r,o),r}function ft(t,e,i,o,r){var a={capture:o,passive:r},l=Wp(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&To(()=>{e.removeEventListener(t,l,a)})}function Je(t){for(var e=0;e<t.length;e++)zp.add(t[e]);for(var i of ou)i(t)}function wl(t){var T;var e=this,i=e.ownerDocument,o=t.type,r=((T=t.composedPath)==null?void 0:T.call(t))||[],a=r[0]||t.target,l=0,d=t.__root;if(d){var s=r.indexOf(d);if(s!==-1&&(e===document||e===window)){t.__root=e;return}var u=r.indexOf(e);if(u===-1)return;s<=u&&(l=s)}if(a=r[l]||t.target,a!==e){so(t,"currentTarget",{configurable:!0,get(){return a||i}});var m=Vt,p=bt;Wi(null),ao(null);try{for(var v,_=[];a!==null;){var $=a.assignedSlot||a.parentNode||a.host||null;try{var y=a["__"+o];if(y!=null&&(!a.disabled||t.target===a))if(sr(y)){var[x,...I]=y;x.apply(a,[t,...I])}else y.call(a,t)}catch(R){v?_.push(R):v=R}if(t.cancelBubble||$===e||$===null)break;a=$}if(v){for(let R of _)queueMicrotask(()=>{throw R});throw v}}finally{t.__root=e,delete t.currentTarget,Wi(m),ao(p)}}}var p$;function Lg(){p$=void 0}function Sl(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Eo(t,e){var i=bt;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function L(t,e){var i=(e&1)!==0,o=(e&2)!==0,r,a=!t.startsWith("<!>");return()=>{if(it)return Eo($t,null),$t;r===void 0&&(r=Sl(a?t:"<!>"+t),i||(r=Si(r)));var l=o||id?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=Si(l),s=l.lastChild;Eo(d,s)}else Eo(l,l);return l}}function v$(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(it)return Eo($t,null),$t;if(!l){var d=Sl(a),s=Si(d);if(r)for(l=document.createDocumentFragment();Si(s);)l.appendChild(Si(s));else l=Si(s)}var u=l.cloneNode(!0);if(r){var m=Si(u),p=u.lastChild;Eo(m,p)}else Eo(u,u);return u}}function ke(t,e){return v$(t,e,"svg")}function ps(t=""){if(!it){var e=wn(t+"");return Eo(e,e),e}var i=$t;return i.nodeType!==dl&&(i.before(i=wn()),xi(i)),Eo(i,i),i}function De(){if(it)return Eo($t,null),$t;var t=document.createDocumentFragment(),e=document.createComment(""),i=wn();return t.append(e,i),Eo(e,i),t}function b(t,e){if(it){bt.nodes_end=$t,Qi();return}t!==null&&t.before(e)}var g$=/\r/g;function Vg(t){t=t.replace(g$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function Rg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var h$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Dg(t){return h$.includes(t)}var _$=["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 Ng(t){var e;return t=t.toLowerCase(),(e=b$[t])!=null?e:t}var u3=[..._$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var $$=["touchstart","touchmove"];function Og(t){return $$.includes(t)}var y$=["$state","$state.raw","$derived","$derived.by"],p3=[...y$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var x$=["textarea","script","style","title"];function Bg(t){return x$.includes(t)}function nu(t){return t==null?void 0:t.replace(/\//g,"/​")}var fd=!0;function ru(t){fd=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 Gr(t,e){return Hg(t,e)}function Qp(t,e){var l;qc(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=it,r=$t;try{for(var a=Si(i);a&&(a.nodeType!==ar||a.data!==qs);)a=Go(a);if(!a)throw as;lo(!0),xi(a),Qi();let d=Hg(t,{...e,anchor:a});if($t===null||$t.nodeType!==ar||$t.data!==_a)throw Xs(),as;return lo(!1),d}catch(d){if(d===as)return e.recover===!1&&eg(),qc(),od(i),lo(!1),Gr(t,e);throw d}finally{lo(o),xi(r),Lg()}}var Cl=new Map;function Hg(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){qc();var d=new Set,s=p=>{for(var v=0;v<p.length;v++){var _=p[v];if(!d.has(_)){d.add(_);var $=Og(_);e.addEventListener(_,wl,{passive:$});var y=Cl.get(_);y===void 0?(document.addEventListener(_,wl,{passive:$}),Cl.set(_,1)):Cl.set(_,y+1)}}};s(Gl(zp)),ou.add(s);var u=void 0,m=yg(()=>{var p=i!=null?i:e.appendChild(wn());return Di(()=>{if(a){B({});var v=Ht;v.c=a}r&&(o.$$events=r),it&&Eo(p,null),fd=l,u=t(p,o)||{},fd=!0,it&&(bt.nodes_end=$t),a&&H()}),()=>{var $;for(var v of d){e.removeEventListener(v,wl);var _=Cl.get(v);--_===0?(document.removeEventListener(v,wl),Cl.delete(v)):Cl.set(v,_)}ou.delete(s),p!==i&&(($=p.parentNode)==null||$.removeChild(p))}});return Kp.set(u,m),u}var Kp=new WeakMap;function Aa(t,e){let i=Kp.get(t);return i?(Kp.delete(t),i(e)):(Re&&mg(),Promise.resolve())}function ei(t,e,...i){var o=t,r=ht,a;qi(()=>{r!==(r=e())&&(a&&(Ki(a),a=null),Re&&r==null&&tg(),a=Di(()=>r(o,...i)))},65536),it&&(o=$t)}if(Re){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;ng(e)},set:o=>{i=o}})}};T$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var T$;function kt(t){Ht===null&&pl("onMount"),ls&&Ht.l!==null?C$(Ht).m.push(t):He(()=>{let e=Tt(t);if(typeof e=="function")return e})}function ln(t){Ht===null&&pl("onDestroy"),kt(()=>()=>Tt(t))}function C$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var Fg=new Map;function Ug(t,e){var i=Fg.get(t);i||(i=new Set,Fg.set(t,i)),i.add(e)}function M(t,e,[i,o]=[0,0]){it&&i===0&&Qi();var r=t,a=null,l=null,d=Zi,s=i>0?65536:0,u=!1;let m=(v,_=!0)=>{u=!0,p(_,v)},p=(v,_)=>{if(d===(d=v))return;let $=!1;if(it&&o!==-1){if(i===0){let x=Qc(r);x===qs?o=0:x===Gs?o=1/0:(o=parseInt(x.substring(1)),o!==o&&(o=d?1/0:-1))}let y=o>i;!!d===y&&(r=Sa(),xi(r),lo(!1),$=!0,o=-1)}d?(a?Ps(a):_&&(a=Di(()=>_(r))),l&&Wn(l,()=>{l=null})):(l?Ps(l):_&&(l=Di(()=>_(r,[i+1,o]))),a&&Wn(a,()=>{a=null})),$&&lo(!0)};qi(()=>{u=!1,e(m),u||p(null,null)},s),it&&(r=$t)}function As(t,e,i){it&&Qi();var o=t,r=Zi,a,l=cs()?Gv:cl;qi(()=>{l(r,r=e())&&(a&&Wn(a),a=Di(()=>i(o)))}),it&&(o=$t)}var Js=null;function Yp(t){Js=t}function md(t,e){return e}function P$(t,e,i,o){for(var r=[],a=e.length,l=0;l<a;l++)Xc(e[l].e,r,!0);var d=a>0&&r.length===0&&i!==null;if(d){var s=i.parentNode;od(s),s.append(i),o.clear(),Zs(t,e[0].prev,e[a-1].next)}Op(r,()=>{for(var u=0;u<a;u++){var m=e[u];d||(o.delete(m.k),Zs(t,m.prev,m.next)),Ki(m.e,!d)}})}function bi(t,e,i,o,r,a=null){var l=t,d={flags:e,items:new Map,first:null},s=(e&4)!==0;if(s){var u=t;l=it?xi(Si(u)):u.appendChild(wn())}it&&Qi();var m=null,p=!1,v=yn(()=>{var _=i();return sr(_)?_:_==null?[]:Gl(_)});qi(()=>{var _=n(v),$=_.length;if(p&&$===0)return;p=$===0;let y=!1;if(it){var x=Qc(l)===Gs;x!==($===0)&&(l=Sa(),xi(l),lo(!1),y=!0)}if(it){for(var I=null,T,R=0;R<$;R++){if($t.nodeType===ar&&$t.data===_a){l=$t,y=!0,lo(!1);break}var k=_[R],P=o(k,R);T=Kg($t,d,I,null,k,P,R,r,e,i),d.items.set(P,T),I=T}$>0&&xi(Sa())}it||A$(_,d,l,r,e,o,i),a!==null&&($===0?m?Ps(m):m=Di(()=>a(l)):m!==null&&Wn(m,()=>{m=null})),y&&lo(!0),n(v)}),it&&(l=$t)}function A$(t,e,i,o,r,a,l){var X,Ie,fe,ee;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,m=e.items,p=e.first,v=p,_,$=null,y,x=[],I=[],T,R,k,P;if(d)for(P=0;P<u;P+=1)T=t[P],R=a(T,P),k=m.get(R),k!==void 0&&((X=k.a)==null||X.measure(),(y!=null?y:y=new Set).add(k));for(P=0;P<u;P+=1){if(T=t[P],R=a(T,P),k=m.get(R),k===void 0){var E=v?v.e.nodes_start:i;$=Kg(E,e,$,$===null?e.first:$.next,T,R,P,o,r,l),m.set(R,$),x=[],I=[],v=$.next;continue}if(s&&k$(k,T,P,r),(k.e.f&8192)!==0&&(Ps(k.e),d&&((Ie=k.a)==null||Ie.unfix(),(y!=null?y:y=new Set).delete(k))),k!==v){if(_!==void 0&&_.has(k)){if(x.length<I.length){var W=I[0],F;$=W.prev;var U=x[0],j=x[x.length-1];for(F=0;F<x.length;F+=1)zg(x[F],W,i);for(F=0;F<I.length;F+=1)_.delete(I[F]);Zs(e,U.prev,j.next),Zs(e,$,U),Zs(e,j,W),v=W,$=j,P-=1,x=[],I=[]}else _.delete(k),zg(k,v,i),Zs(e,k.prev,k.next),Zs(e,k,$===null?e.first:$.next),Zs(e,$,k),$=k;continue}for(x=[],I=[];v!==null&&v.k!==R;)(v.e.f&8192)===0&&(_!=null?_:_=new Set).add(v),I.push(v),v=v.next;if(v===null)continue;k=v}x.push(k),$=k,v=k.next}if(v!==null||_!==void 0){for(var re=_===void 0?[]:Gl(_);v!==null;)(v.e.f&8192)===0&&re.push(v),v=v.next;var G=re.length;if(G>0){var oe=(r&4)!==0&&u===0?i:null;if(d){for(P=0;P<G;P+=1)(fe=re[P].a)==null||fe.measure();for(P=0;P<G;P+=1)(ee=re[P].a)==null||ee.fix()}P$(e,re,oe,m)}}d&&Sn(()=>{var be;if(y!==void 0)for(k of y)(be=k.a)==null||be.apply()}),bt.first=e.first&&e.first.e,bt.last=$&&$.e}function k$(t,e,i,o){(o&1)!==0&&hl(t.v,e),(o&2)!==0?hl(t.i,i):t.i=i}function Kg(t,e,i,o,r,a,l,d,s,u){var m=Js,p=(s&1)!==0,v=(s&16)===0,_=p?v?us(r,!1,!1):Er(r):r,$=(s&2)===0?l:Er(l);Re&&p&&(_.trace=()=>{var x=typeof $=="number"?l:$.v;u()[x]});var y={i:$,v:_,k:a,a:null,e:null,prev:i,next:o};Js=y;try{return y.e=Di(()=>d(t,_,$,u),it),y.e.prev=i&&i.e,y.e.next=o&&o.e,i===null?e.first=y:(i.next=y,i.e.next=y.e),o!==null&&(o.prev=y,o.e.prev=y.e),y}finally{Js=m}}function zg(t,e,i){for(var o=t.next?t.next.e.nodes_start:i,r=e?e.e.nodes_start:i,a=t.e.nodes_start;a!==o;){var l=Go(a);r.before(a),a=l}}function Zs(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 L$(t,e,i){var a,l;if(!e||e===Vg(String(i!=null?i:"")))return;let o,r=(a=t.__svelte_meta)==null?void 0:a.loc;r?o=`near ${r.file}:${r.line}:${r.column}`:(l=lr)!=null&&l[Hn]&&(o=`in ${lr[Hn]}`),fg(nu(o))}function vd(t,e,i=!1,o=!1,r=!1){var a=t,l="";N(()=>{var _;var d=bt;if(l===(l=(_=e())!=null?_:"")){it&&Qi();return}if(d.nodes_start!==null&&(Dp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(it){for(var s=$t.data,u=Qi(),m=u;u!==null&&(u.nodeType!==ar||u.data!=="");)m=u,u=Go(u);if(u===null)throw Xs(),as;Re&&!r&&L$(u.parentNode,s,l),Eo($t,m),a=xi(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var v=Sl(p);if((i||o)&&(v=Si(v)),Eo(Si(v),v.lastChild),i||o)for(;Si(v);)a.before(Si(v));else a.before(v)}})}function Ni(t,e,i){it&&Qi();var o=t,r,a;qi(()=>{r!==(r=e())&&(a&&(Wn(a),a=null),r&&(a=Di(()=>i(o,r))))},65536),it&&(o=$t)}function ka(t,e,i,o,r,a){var $;let l=it;it&&Qi();var d=Re&&a&&(($=Ht)==null?void 0:$.function[Hn]),s,u,m=null;it&&$t.nodeType===Bc&&(m=$t,Qi());var p=it?$t:t,v,_=Js;qi(()=>{let y=e()||null;var x=r?r():i||y==="svg"?Rc:null;if(y!==s){var I=Js;Yp(_),v&&(y===null?Wn(v,()=>{v=null,u=null}):y===u?Ps(v):(Ki(v),ru(!1))),y&&y!==u&&(v=Di(()=>{if(m=it?m:x?document.createElementNS(x,y):document.createElement(y),Re&&a&&(m.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),Eo(m,m),o){it&&Bg(y)&&m.append(document.createComment(""));var T=it?Si(m):m.appendChild(wn());it&&(T===null?lo(!1):xi(T)),o(m,T)}bt.nodes_end=m,p.before(m)})),s=y,s&&(u=s),ru(!0),Yp(I)}},65536),l&&(lo(!0),xi(p))}var Xp;function Qg(t){return Xp=t.target,new jp(t)}var ks,Pr,jp=class{constructor(e){Qs(this,ks);Qs(this,Pr);var a,l;var i=new Map,o=(d,s)=>{var u=us(s,!1,!1);return i.set(d,u),u};let r=new Proxy({...e.props||{},$$events:{}},{get(d,s){var u;return n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s)))},has(d,s){var u;return s===ll?!0:(n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s))),Reflect.has(d,s))},set(d,s,u){var m;return D((m=i.get(s))!=null?m:o(s,u),u),Reflect.set(d,s,u)}});al(this,Pr,(e.hydrate?Qp:Gr)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:(a=e.intro)!=null?a:!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&xl(),al(this,ks,r.$$events);for(let d of Object.keys(Ri(this,Pr)))d==="$set"||d==="$destroy"||d==="$on"||so(this,d,{get(){return Ri(this,Pr)[d]},set(s){Ri(this,Pr)[d]=s},enumerable:!0});Ri(this,Pr).$set=d=>{Object.assign(r,d)},Ri(this,Pr).$destroy=()=>{Aa(Ri(this,Pr))}}$set(e){Ri(this,Pr).$set(e)}$on(e,i){Ri(this,ks)[e]=Ri(this,ks)[e]||[];let o=(...r)=>i.call(this,...r);return Ri(this,ks)[e].push(o),()=>{Ri(this,ks)[e]=Ri(this,ks)[e].filter(r=>r!==o)}}$destroy(){Ri(this,Pr).$destroy()}};ks=new WeakMap,Pr=new WeakMap;function q(t,e){Sn(()=>{var r,a,l;var i=t.getRootNode(),o=i.host?i:(l=(r=i.head)!=null?r:i.ownerDocument.head)!=null?l:(a=Xp)==null?void 0:a.parentNode;if(!(o!=null&&o.querySelector("#"+e.hash))){let d=document.createElement("style");d.id=e.hash,d.textContent=e.code,o.appendChild(d),Re&&Ug(e.hash,d)}})}function Ls(t,e){var i=void 0,o;qi(()=>{i!==(i=e())&&(o&&(Ki(o),o=null),i&&(o=Di(()=>{Io(()=>i(t))})))})}function qg(t){var e,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(i=qg(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function Gg(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=qg(t))&&(o&&(o+=" "),o+=e);return o}function gd(t){return typeof t=="object"?Gg(t):t!=null?t:""}var Yg=[...`
44
- \r\f \v\uFEFF`];function Xg(t,e,i){var o=t==null?"":""+t;if(e&&(o=o?o+" "+e:e),i){for(var r in i)if(i[r])o=o?o+" "+r:r;else if(o.length)for(var a=r.length,l=0;(l=o.indexOf(r,l))>=0;){var d=l+a;(l===0||Yg.includes(o[l-1]))&&(d===o.length||Yg.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function jg(t,e=!1){var i=e?" !important;":";",o="";for(var r in t){var a=t[r];a!=null&&a!==""&&(o+=" "+r+": "+a+i)}return o}function Zp(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Zg(t,e){if(e){var i="",o,r;if(Array.isArray(e)?(o=e[0],r=e[1]):o=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,l=0,d=!1,s=[];o&&s.push(...Object.keys(o).map(Zp)),r&&s.push(...Object.keys(r).map(Zp));var u=0,m=-1;let y=t.length;for(var p=0;p<y;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===y-1){if(m!==-1){var _=Zp(t.substring(u,m).trim());if(!s.includes(_)){v!==";"&&p++;var $=t.substring(u,p).trim();i+=" "+$+";"}}u=p+1,m=-1}}}}return o&&(i+=jg(o)),r&&(i+=jg(r,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function ie(t,e,i,o,r,a){var l=t.__className;if(it||l!==i||l===void 0){var d=Xg(i,o,a);(!it||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&r!==a)for(var s in a){var u=!!a[s];(r==null||u!==!!r[s])&&t.classList.toggle(s,u)}return a}function Jp(t,e={},i,o){for(var r in i){var a=i[r];e[r]!==a&&(i[r]==null?t.style.removeProperty(r):t.style.setProperty(r,a,o))}}function Ke(t,e,i,o){var r=t.__style;if(it||r!==e){var a=Zg(e,o);(!it||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(Jp(t,i==null?void 0:i[0],o[0]),Jp(t,i==null?void 0:i[1],o[1],"important")):Jp(t,i,o));return o}function hd(t,e,i){if(t.multiple){if(e==null)return;if(!sr(e))return vg();for(var o of t.options)o.selected=e.includes(Jg(o));return}for(o of t.options){var r=Jg(o);if(Cp(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function ef(t){var e=new MutationObserver(()=>{hd(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),To(()=>{e.disconnect()})}function Jg(t){return"__value"in t?t.__value:t.value}var Tl=Symbol("class"),Il=Symbol("style"),ih=Symbol("is custom element"),oh=Symbol("is html");function nh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Ne(t,e,i,o){var r=sh(t);if(it&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||H$(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[qv]=i),i==null?t.removeAttribute(e):typeof i!="string"&&ah(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function rh(t,e,i,o,r=!1){var k;var a=sh(t),l=a[ih],d=!a[oh];let s=it&&l;s&&lo(!1);var u=e||{},m=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=gd(i.class):(o||i[Tl])&&(i.class=null),i[Il]&&((k=i.style)!=null||(i.style=null));var v=ah(t);for(let P in i){let E=i[P];if(m&&P==="value"&&E==null){t.value=t.__value="",u[P]=E;continue}if(P==="class"){var _=t.namespaceURI==="http://www.w3.org/1999/xhtml";ie(t,_,E,o,e==null?void 0:e[Tl],i[Tl]),u[P]=E,u[Tl]=i[Tl];continue}if(P==="style"){Ke(t,E,e==null?void 0:e[Il],i[Il]),u[P]=E,u[Il]=i[Il];continue}var $=u[P];if(!(E===$&&!(E===void 0&&t.hasAttribute(P)))){u[P]=E;var y=P[0]+P[1];if(y!=="$$")if(y==="on"){let W={},F="$$"+P,U=P.slice(2);var x=Dg(U);if(Rg(U)&&(U=U.slice(0,-7),W.capture=!0),!x&&$){if(E!=null)continue;t.removeEventListener(U,u[F],W),u[F]=null}if(E!=null)if(x)t[`__${U}`]=E,Je([U]);else{let j=function(re){u[P].call(this,re)};var R=j;u[F]=Wp(U,t,j,W)}else x&&(t[`__${U}`]=void 0)}else if(P==="style")Ne(t,P,E);else if(P==="autofocus")Up(t,!!E);else if(!l&&(P==="__value"||P==="value"&&E!=null))t.value=t.__value=E;else if(P==="selected"&&m)nh(t,E);else{var I=P;d||(I=Ng(I));var T=I==="defaultValue"||I==="defaultChecked";if(E==null&&!l&&!T)if(a[P]=null,I==="value"||I==="checked"){let W=t,F=e===void 0;if(I==="value"){let U=W.defaultValue;W.removeAttribute(I),W.defaultValue=U,W.value=W.__value=F?U:null}else{let U=W.defaultChecked;W.removeAttribute(I),W.defaultChecked=U,W.checked=F?U:!1}}else t.removeAttribute(P);else T||v.includes(I)&&(l||typeof E!="string")?t[I]=E:typeof E!="function"&&Ne(t,I,E,r)}}}return s&&lo(!0),u}function Ji(t,e,i=[],o,r=!1,a=Kr){let l=i.map(a);var d=void 0,s={},u=t.nodeName==="SELECT",m=!1;if(qi(()=>{var v=e(...l.map(n)),_=rh(t,d,v,o,r);m&&u&&"value"in v&&hd(t,v.value,!1);for(let y of Object.getOwnPropertySymbols(s))v[y]||Ki(s[y]);for(let y of Object.getOwnPropertySymbols(v)){var $=v[y];y.description===hp&&(!d||$!==d[y])&&(s[y]&&Ki(s[y]),s[y]=Di(()=>Ls(t,()=>$))),_[y]=$}d=_}),u){var p=t;Io(()=>{hd(p,d.value),ef(p)})}m=!0}function sh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[ih]:t.nodeName.includes("-"),[oh]:t.namespaceURI===Hv}}var eh=new Map;function ah(t){var e=eh.get(t.nodeName);if(e)return e;eh.set(t.nodeName,e=[]);for(var i,o=t,r=Element.prototype;r!==o;){i=Nc(o);for(var a in i)i[a].set&&e.push(a);o=ba(o)}return e}function H$(t,e,i){var o;Re&&(e==="srcset"&&F$(t,i)||tf((o=t.getAttribute(e))!=null?o:"",i)||pg(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function tf(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function th(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function F$(t,e){var i=th(t.srcset),o=th(e);return o.length===i.length&&o.every(([r,a],l)=>a===i[l][1]&&(tf(i[l][0],r)||tf(r,i[l][0])))}var U$=Dc?()=>performance.now():()=>Date.now(),Yr={tick:t=>(Dc?requestAnimationFrame:ht)(t),now:()=>U$(),tasks:new Set};function lh(){let t=Yr.now();Yr.tasks.forEach(e=>{e.c(t)||(Yr.tasks.delete(e),e.f())}),Yr.tasks.size!==0&&Yr.tick(lh)}function dh(t){let e;return Yr.tasks.size===0&&Yr.tick(lh),{promise:new Promise(i=>{Yr.tasks.add(e={c:t,f:i})}),abort(){Yr.tasks.delete(e)}}}function su(t,e){pd(()=>{t.dispatchEvent(new CustomEvent(e))})}function Q$(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[r,a]=o.split(":");if(!r||a===void 0)break;let l=Q$(r.trim());e[l]=a.trim()}return e}var q$=t=>t;function Ms(t,e,i,o){var R;var r=(t&1)!==0,a=(t&2)!==0,l=r&&a,d=(t&4)!==0,s=l?"both":r?"in":"out",u,m=e.inert,p=e.style.overflow,v,_;function $(){var E;var k=Vt,P=bt;Wi(null),ao(null);try{return u!=null?u:u=i()(e,(E=o==null?void 0:o())!=null?E:{},{direction:s})}finally{Wi(k),ao(P)}}var y={is_global:d,in(){var k;if(e.inert=m,!r){_==null||_.abort(),(k=_==null?void 0:_.reset)==null||k.call(_);return}a||v==null||v.abort(),su(e,"introstart"),v=of(e,$(),_,1,()=>{su(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,su(e,"outrostart"),_=of(e,$(),v,0,()=>{su(e,"outroend"),k==null||k()})},stop:()=>{v==null||v.abort(),_==null||_.abort()}},x=bt;if(((R=x.transitions)!=null?R:x.transitions=[]).push(y),r&&fd){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&&Io(()=>{Tt(()=>y.in())})}}function of(t,e,i,o,r){var a=o===1;if(Ys(e)){var l,d=!1;return Sn(()=>{if(!d){var x=e({direction:a?"in":"out"});l=of(t,x,i,o,r)}}),{abort:()=>{d=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return r(),{abort:ht,deactivate:ht,reset:ht,t:()=>o};let{delay:s=0,css:u,tick:m,easing:p=q$}=e;var v=[];if(a&&i===void 0&&(m&&m(0,1),u)){var _=ch(u(0,1));v.push(_,_)}var $=()=>1-o,y=t.animate(v,{duration:s,fill:"forwards"});return y.onfinish=()=>{var U;y.cancel();var x=(U=i==null?void 0:i.t())!=null?U:1-o;i==null||i.abort();var I=o-x,T=e.duration*Math.abs(I),R=[];if(T>0){var k=!1;if(u)for(var P=Math.ceil(T/16.666666666666668),E=0;E<=P;E+=1){var W=x+I*p(E/P),F=ch(u(W,1-W));R.push(F),k||(k=F.overflow==="hidden")}k&&(t.style.overflow="hidden"),$=()=>{var j=y.currentTime;return x+I*p(j/T)},m&&dh(()=>{if(y.playState!=="running")return!1;var j=$();return m(j,1-j),!0})}y=t.animate(R,{duration:T,fill:"forwards"}),y.onfinish=()=>{$=()=>o,m==null||m(o,1-o),r()}},{abort:()=>{y&&(y.cancel(),y.effect=null,y.onfinish=ht)},deactivate:()=>{r=ht},reset:()=>{o===0&&(m==null||m(1,0))},t:()=>$()}}function nf(t,e,i){var o=Wo(t,e);o&&o.set&&(t[e]=i,To(()=>{t[e]=null}))}var ea,El,_d,lu,uh,du=class du{constructor(e){Qs(this,lu);Qs(this,ea,new WeakMap);Qs(this,El);Qs(this,_d);al(this,_d,e)}observe(e,i){var o=Ri(this,ea).get(e)||new Set;return o.add(i),Ri(this,ea).set(e,o),Ov(this,lu,uh).call(this).observe(e,Ri(this,_d)),()=>{var r=Ri(this,ea).get(e);r.delete(i),r.size===0&&(Ri(this,ea).delete(e),Ri(this,El).unobserve(e))}}};ea=new WeakMap,El=new WeakMap,_d=new WeakMap,lu=new WeakSet,uh=function(){var e;return(e=Ri(this,El))!=null?e:al(this,El,new ResizeObserver(i=>{for(var o of i){du.entries.set(o.target,o);for(var r of Ri(this,ea).get(o.target)||[])r(o)}}))},rr(du,"entries",new WeakMap);var rf=du;var G$=new rf({box:"border-box"});function Tn(t,e,i){var o=G$.observe(t,()=>i(t[e]));Io(()=>(Tt(()=>i(t[e])),o))}function ph(t,e){return t===e||(t==null?void 0:t[Ko])===e}function et(t={},e,i,o){return Io(()=>{var r,a;return Yo(()=>{r=a,a=(o==null?void 0:o())||[],Tt(()=>{t!==i(...a)&&(e(t,...a),r&&ph(i(...r),t)&&e(null,...r))})}),()=>{Sn(()=>{a&&ph(i(...a),t)&&e(null,...a)})}}),t}function jo(t=!1){let e=Ht,i=e.l.u;if(!i)return;let o=()=>iu(e.s);if(t){let r=0,a={},l=Kr(()=>{let d=!1,s=e.s;for(let u in s)s[u]!==a[u]&&(a[u]=s[u],d=!0);return d&&r++,r});o=()=>n(l)}i.b.length&&sd(()=>{fh(e,o),js(i.b)}),He(()=>{let r=Tt(()=>i.m.map(Qv));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&He(()=>{fh(e,o),js(i.a)})}function fh(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function bd(t,e,i){if(t==null)return e(void 0),i&&i(void 0),ht;let o=Tt(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Pl=[];function Ar(t,e){return{subscribe:se(t,e).subscribe}}function se(t,e=ht){let i=null,o=new Set;function r(d){if(cl(t,d)&&(t=d,i)){let s=!Pl.length;for(let u of o)u[1](),Pl.push(u,t);if(s){for(let u=0;u<Pl.length;u+=2)Pl[u][0](Pl[u+1]);Pl.length=0}}}function a(d){r(d(t))}function l(d,s=ht){let u=[d,s];return o.add(u),o.size===1&&(i=e(r,a)||ht),d(t),()=>{o.delete(u),o.size===0&&i&&(i(),i=null)}}return{set:r,update:a,subscribe:l}}function pi(t,e,i){let o=!Array.isArray(t),r=o?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let a=e.length<2;return Ar(i,(l,d)=>{let s=!1,u=[],m=0,p=ht,v=()=>{if(m)return;p();let $=e(o?u[0]:u,l,d);a?l($):p=typeof $=="function"?$:ht},_=r.map(($,y)=>bd($,x=>{u[y]=x,m&=~(1<<y),s&&v()},()=>{m|=1<<y}));return s=!0,v(),function(){js(_),p(),s=!1}})}function $e(t){let e;return bd(t,i=>e=i)(),e}var cu=!1,sf=Symbol();function w(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:us(void 0),unsubscribe:ht};if(o.store!==t&&!(sf in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=ht;else{var r=!0;o.unsubscribe=bd(t,l=>{r?o.source.v=l:D(o.source,l)}),r=!1}return t&&sf in i?$e(t):n(o.source)}function Be(){let t={};function e(){To(()=>{for(var i in t)t[i].unsubscribe();so(t,sf,{enumerable:!1,value:!0})})}return[t,e]}function af(t){var e=cu;try{return cu=!1,[t(),cu]}finally{cu=e}}var t1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Re&&og(`${t.name}.${String(e)}`),!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function In(t,e,i){return new Proxy(Re?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},t1)}var i1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(Ys(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o)return o[e]}},set(t,e,i){let o=t.props.length;for(;o--;){let r=t.props[o];Ys(r)&&(r=r());let a=Wo(r,e);if(a&&a.set)return a.set(i),!0}return!1},getOwnPropertyDescriptor(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(Ys(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let r=Wo(o,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===Ko||e===ll)return!1;for(let i of t.props)if(Ys(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(Ys(i)&&(i=i()),!!i){for(let o in i)e.includes(o)||e.push(o);for(let o of Object.getOwnPropertySymbols(i))e.includes(o)||e.push(o)}return e}};function jr(...t){return new Proxy({props:t},i1)}function mh(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function g(t,e,i,o){var W,F;var r=(i&1)!==0,a=!ls||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,s=!1,u;l?[u,s]=af(()=>t[e]):u=t[e];var m=Ko in t||ll in t,p=l&&((F=(W=Wo(t,e))==null?void 0:W.set)!=null?F:m&&e in t&&(U=>t[e]=U))||void 0,v=o,_=!0,$=!1,y=()=>($=!0,_&&(_=!1,d?v=Tt(o):v=o),v);u===void 0&&o!==void 0&&(p&&a&&ig(e),u=y(),p&&p(u));var x;if(a)x=()=>{var U=t[e];return U===void 0?y():(_=!0,$=!1,U)};else{var I=(r?Kr:yn)(()=>t[e]);I.f|=131072,x=()=>{var U=n(I);return U!==void 0&&(v=void 0),U===void 0?v:U}}if((i&4)===0&&a)return x;if(p){var T=t.$$legacy;return function(U,j){return arguments.length>0?((!a||!j||T||s)&&p(j?x():U),U):x()}}var R=!1,k=!1,P=us(u),E=Kr(()=>{var U=x(),j=n(P);return R?(R=!1,k=!0,j):(k=!1,P.v=U)});return l&&n(E),r||(E.equals=ul),function(U,j){if(eu!==null&&(R=k,x(),n(P)),arguments.length>0){let re=j?n(E):a&&l?ri(U):U;if(!E.equals(re)){if(R=!0,D(P,re),$&&v!==void 0&&(v=re),mh(E))return U;Tt(()=>n(E))}return U}return mh(E)?E.v:n(E)}}var o1;typeof HTMLElement=="function"&&(o1=class extends HTMLElement{constructor(e,i,o){super();rr(this,"$$ctor");rr(this,"$$s");rr(this,"$$c");rr(this,"$$cn",!1);rr(this,"$$d",{});rr(this,"$$r",!1);rr(this,"$$p_d",{});rr(this,"$$l",{});rr(this,"$$l_u",new Map);rr(this,"$$me");this.$$ctor=e,this.$$s=i,o&&this.attachShadow({mode:"open"})}addEventListener(e,i,o){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){let r=this.$$c.$on(e,i);this.$$l_u.set(i,r)}super.addEventListener(e,i,o)}removeEventListener(e,i,o){if(super.removeEventListener(e,i,o),this.$$c){let r=this.$$l_u.get(i);r&&(r(),this.$$l_u.delete(i))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(a){return l=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),b(l,d)}};var e=i;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let o={},r=n1(this);for(let a of this.$$s)a in r&&(a==="default"&&!this.$$d.children?(this.$$d.children=i(a),o.default=!0):o[a]=i(a));for(let a of this.attributes){let l=this.$$g_p(a.name);l in this.$$d||(this.$$d[l]=lf(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=Qg({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:o,$$host:this}}),this.$$me=jc(()=>{Yo(()=>{var a;this.$$r=!0;for(let l of _p(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=lf(l,this.$$d[l],this.$$p_d,"toAttribute");d==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,d)}this.$$r=!1})});for(let a in this.$$l)for(let l of this.$$l[a]){let d=this.$$c.$on(a,l);this.$$l_u.set(l,d)}this.$$l={}}}attributeChangedCallback(e,i,o){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=lf(e,o,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return _p(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function lf(t,e,i,o){var a;let r=(a=i[t])==null?void 0:a.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!i[t])return e;if(o==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e==null?null:e;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function n1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var vh="5";var gh,hh,_h;typeof window!="undefined"&&((_h=(hh=(gh=window.__svelte)!=null?gh:window.__svelte={}).v)!=null?_h:hh.v=new Set).add(vh);import{areValidLiveRecordSources as yT,clientChecker as bv}from"@vkontakte/videoplayer-core/es2018";import"@vkontakte/videoplayer-core/es2018";import{noop as kb,safeStorage as xT,throttleFn as wT}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as ST}from"@vkontakte/videoplayer-statistics/es2018";import{InterfaceLanguage as r1,fillWithDefault as s1,VideoQuality as bh}from"@vkontakte/videoplayer-shared/es2018";var a1={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:r1.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:bh.Q_480P,highQualityLimit:bh.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,features:{autoplay:!0,statistics:!0,thinStatistics:!1,preload:!0,subtitles:!0,episodes:!0,fullscreen:!0,timelinePreview:!0,mediaSession:!0,annotations:!0,slots:!0,annotationsInside:!1,pip:!0,dpip:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,episodesClustering:!0,copyVideoLink:!0,videoRotate:!0,tracer:!1,apptracer:{enabled:!1,sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},interactiveGraph:!1,interactiveResponsiveUi:!1,seekToInteractive:!0,interactiveLastFrame:!1,interactiveTextPermanent:!0,interactiveHideTime:!0,interactivePlayPrevChapter:!0,interactiveTimeIndicator:!0,interactiveTimeOpenUri:!1,interactiveAreaControlShadow:!1,interactiveControlsExpectTimeBlinkAnimation:!1,interactiveControlsTapPlace:!1,interactiveControlsFillAnimation:!1,interactiveControlsHideAnimation:!1,interactiveHistoryEndChapterFix:!0,thumbTimer:!0,hotKeyMapModal:!0,hotKeyHelpers:!0,saveDebugInfoToFile:!1,saveTraceInfoToFile:!1,additionalButtons:!0,additionalButtonsDesktopControlPanelRight:!0,additionalSettingsMenuItems:!0,additionalContextMenuItems:!0,contextMenuButton:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,autoplayNext:!0,nextPrevButtons:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,qualityDetailsSubMenuEnabled:!1,showSlowVideoNotification:!1,forceAutoQualityWhenSevereStallHappens:!1,timeoutShowSlowVideoNotification:0,maxCountShowSlowVideoNotification:1,forcePlayerDisplayBlock:!1,playbackStatusShow:!1,playbackStatusNextVideoShow:!1,initSubtitles:!0,useCallbackForMediaSessionNextPrevClick:!1,usePerformanceFix:!1,userVideoPrefs:!1,savePreferredStatesOnUserActionOnly:!1,useLoopSetting:!1,doubleForwardAvailable:!1,useRichSeek:!1,disableThumbUnstartedOnAutoplay:!1},controls:{showOnStartupAtAutoplay:!0,hideTimeout:500,hideTimeoutMobile:3e3,hideTimeoutInitial:200,hideTimeoutFullscreen:3e3,hideTimeoutCursor:3e3,hideTimeoutTooltips:1e3,collapseMobileUnmute:6e3,hide360IconTimeout:3e3,hideHotKeyHelpers:2e3,playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25,volumeStepKeyboard:.05,volumeStepWheel:.05,volumeBarTimeout:300,seekStepKeyboard:1e4,seekStepMobile:15e3,seekStepFrame:400},ads:{enable:void 0,initTimeout:2e3,loadTimeout:2e3,runtimeTimeout:5e3,slot:void 0,preview:void 0,paramsOverride:void 0,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},disablePiPResizeHandling:!1,interactive:{historyMaxLength:100,noInteractionEventTimeout:3e4},view:{timelineSliderColor:null,timelineSliderHandleColor:null,timelineSliderFilledColor:null,timelineSliderLoadedColor:null,volumeSliderColor:null,volumeSliderHandleColor:null,volumeSliderFilledColor:null,controlsTimeColor:null,timelineSliderFilledActiveLiveColor:null,timelineSliderHandleActiveLiveColor:null,buttonColor:null,buttonToggleOnColor:null,focusedColor:null,font:null,focusedOutlineWidth:null,focusedOutlineRadius:null,controlsDesktopPaddingHorizontal:null,timelinePaddingHorizontal:null,settingsBackgroundColor:null,controlsGradientHeight:null,controlsGradient:null},userSalt:"0",doubleForwardActivationTime:600,playbackStatusAnimationDuration:1e3,playbackStatusNextVideoAnimationDuration:1e3,suitableDurationForUsingRichSeek:180,titleShowBehaviour:"fullscreen",disabledSlotIds:[],disabledAdditionalButtonIds:[]},$h=t=>s1(t,a1),yh=t=>ml("ui-config",t),Lt=()=>fl("ui-config");var $d="vk_player_debug_panel_opened";var xh="videoplayer",wh="videoplayer";var fs={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Sh=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Ch=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Th=new Set(["ShiftRight","ShiftLeft"]);var Ih=["TIMELINE"],yd=[...Ih,"GRAPH_BUTTON"],df=[...Ih,"PLAY_BUTTON"],xd=[...yd,"PLAY_BUTTON"];var ms=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(ms||{}),wd={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Eh,VERSION as l1}from"@vkontakte/videoplayer-shared/es2018";import{VERSION as d1}from"@vkontakte/videoplayer-core/es2018";import{VERSION as c1}from"@vkontakte/videoplayer-statistics/es2018";var uu="prod",Al="1.1.85-dev.a9123e27.0";var Ma=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Ph=Symbol("storeContext"),Ah=Symbol("microStoresContext"),kh=(t,e)=>{ml(Ph,t),ml(Ah,e),uu==="dev"&&(window.app={store:t,microStores:e})},ye=()=>{let t=fl(Ph);return Eh(t,"Store context is empty!"),t},mo=()=>{let t=fl(Ah);return Eh(t,"MicroStores context is empty!"),t},ti=(t,e)=>fu(t,t.getValue(),e),fu=(t,e,i)=>Ar(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),Lh=(t,e,i,o,r=["meta config not provided"])=>{var F,U,j,re,G,oe,X,Ie,fe;let a=t.info,{width:l,height:d}=$e(i.ui.playerSize),s=(U=(F=a.throughputEstimation$.getValue())==null?void 0:F.toFixed(0))!=null?U:0,u=(re=(j=a.rttEstimation$.getValue())==null?void 0:j.toFixed(0))!=null?re:0,m=a.isAutoQualityEnabled$.getValue()?"auto":"manual",p=`${Al} (core: ${d1}, stat: ${c1}, shared: ${l1})`,v=$e(i.state.errorLog$),_=v.length?`
45
- `+v.map((ee,be)=>{var ve;let Ce=`${be}) Type: ${ee.id}
46
- `,de=`Message: ${ee.message} (${ee.thrown})
47
- `,We=`Trace: ${(ve=ee.thrown)==null?void 0:ve.stack}
48
- `;return Ce+de+We}).join(`
49
- `):void 0,$=i.state.isAudioDisabled?"disabled":$e(i.state.isAudioAvailable$)?void 0:"unavailable",y=t.info.currentVideoStream$.getValue(),x=t.info.currentAudioStream$.getValue(),I=[];y&&I.push(`Video: ${(G=y==null?void 0:y.codec)!=null?G:""}`+(y!=null&&y.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(),R="";if(T){let ee=a.availableQualitiesFps$.getValue()[T];R=ee?`${ee}fps`:""}let k=a.httpConnectionType$.getValue(),P=(Ie=(X=a.currentBuffer$.getValue())==null?void 0:X.end)!=null?Ie:0,E=Math.max(P-$e(i.state.positionExact$),0),W={Version:p,Browser:navigator.userAgent,Config:r.join(", "),"United video id":String(i.videoId),TraceId:o,VSID:$e(i.vsid),"Content host":a.hostname$.getValue(),"Connection type":k?k+(a.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${s}Kbps @ ${u}ms RTT`,Format:a.currentFormat$.getValue(),"Available Formats":e!=null&&e.sources?Object.keys(e.sources).join(", "):"",Streams:I.join(", "),Quality:`${m} ${T!=null?T:""} ${R}`,"Available qualities":a.availableQualities$.getValue().join(", "),Audio:$,Position:`${$e(i.state.positionExact$)}s`,Buffer:`${E}s`,State:`${$e(i.playerPhase)} ${(fe=a.playbackState$.getValue())!=null?fe:""}`,"Player size":`${l}x${d}`,URL:window.location.href,Errors:_};return Object.entries(W).filter(([ee,be])=>be!==void 0).map(([ee,be])=>`${ee}: ${be}`).join(`
50
- `)},Mh=(t,e,i)=>{var F,U,j,re;let o=t.info,{width:r,height:a}=$e(i.ui.playerSize),l={version:Al,viewport:`${r}x${a}`,volume:Math.round($e(i.state.volume$)*100)};l.id=i.videoId,o.currentFormat$.getValue()&&(l.provider=o.currentFormat$.getValue()),o.hostname$.getValue()&&(l.cdn=o.hostname$.getValue());let u=o.intrinsicVideoSize$.getValue();u&&(l.videoSize=`${u.width}x${u.height}`);let m=o.currentBuffer$.getValue(),p=o.currentNativeBuffer$.getValue(),v=o.isLive$.getValue(),_=o.liveBufferTime$.getValue();m&&p&&(v&&_?(l.buffer=m.end-_,l.nativeBuffer=p.end-_):(l.buffer=Math.max(m.end-$e(i.state.positionExact$),0),l.nativeBuffer=Math.max(p.end-$e(i.state.positionExact$),0))),l.position=$e(i.state.positionExact$);let $=o.throughputEstimation$.getValue();$&&(l.speed=$);let y=o.videoBitrate$.getValue();y&&(l.bitrate=y);let x=o.liveLatency$.getValue();x&&(l.liveLatency=x);let I=o.currentVideoSegmentLength$.getValue();I&&(l.currentVideoSegmentLength=I);let T=o.currentAudioSegmentLength$.getValue();T&&(l.currentAudioSegmentLength=T);let R=$e(i.vsid);typeof R=="string"&&(l.vsid=R);let k=(F=t.info.currentVideoStream$.getValue())==null?void 0:F.codec;k&&(l.videoCodec=k);let P=(U=t.info.currentAudioStream$.getValue())==null?void 0:U.codec;P&&(l.audioCodec=P),((j=t.info.currentVideoStream$.getValue())==null?void 0:j.hdr)&&(l.hdr=!0);let W=(re=t.info.currentAudioStream$.getValue())==null?void 0:re.language;return W&&(l.audioLanguage=W),l},Vh=(t,e)=>Ma(t,e,"mp4"),Rh=t=>!t.type,Dh=t=>!!t.type,Nh=()=>{let e=[],i=0;return{add:(o,r)=>{e[i]=[o,r],i=(i+1)%10},find:o=>e.find(([r])=>r===o)}},pu=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}async download(e){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=await fetch(e,{signal:this.destroyController.signal});if(i.ok)return await i.text();throw i}finally{this.pendingDownloads.delete(e)}}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}};import{isNullable as ff,safeStorage as Ci}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-core/es2018";var u1="vk_player_",Oh="vk_player_prefer_traffic_saving_enabled",Bh="vk_player_preferred_volume",Hh="vk_player_prefer_volume_mute",mf="vk_player_preferred_quality",cf="vk_player_preferred_default_quality_settings",uf="vk_player_preferred_quality_settings_by_video",Fh="vk_player_preferred_stream_language",Uh="vk_player_preferred_rate",zh="vk_player_preferred_autoplay_next",pf="vk_player_preferred_subtitles_language",Wh="vk_player_user_video_prefs",Kh=`${u1}preview_track_close_tooltip`,Qh=t=>t>1?1:t<0?0:t,vf=t=>Ci.set(Bh,Qh(t).toString(10)),mu=()=>{let t=Ci.get(Bh);return ff(t)?void 0:Qh(parseFloat(t))},gf=(t,e)=>Ci.set(mf,JSON.stringify({videoId:t,value:e})),vu=()=>Ci.remove(mf),hf=t=>{let e=Ci.get(mf);if(ff(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){vu();return}return o},qh=(t,e)=>{e?Ci.set(t,"true"):Ci.remove(t)},_f=t=>Ci.get(t)==="true",bf=t=>qh(Hh,t),Gh=()=>_f(Hh),Sd=t=>qh(Oh,t),$f=()=>_f(Oh),Yh=()=>Ci.get(Fh),yf=t=>Ci.set(Fh,t),xf=()=>Ci.get(pf),wf=t=>{t?Ci.set(pf,t):Ci.remove(pf)},jh=t=>Ci.set(Uh,JSON.stringify({rate:t})),Xh=()=>{let t=Ci.get(Uh);if(ff(t))return;let{rate:e}=JSON.parse(t);return e},Zh=t=>{Ci.set(zh,String(t))},Jh=()=>_f(zh),p1=()=>{let t=m=>{Ci.set(cf,JSON.stringify(m))},e=()=>{try{let m=Ci.get(cf);return m?JSON.parse(m):null}catch(m){return null}},i=()=>{try{let m=Ci.get(uf);return m?JSON.parse(m):null}catch(m){return null}},o=m=>{Ci.set(uf,JSON.stringify(m))},r=m=>{u(m);let p=m?i():null;if(p&&(p==null?void 0:p.videoId)===m)return{...p,appliesTo:"to-video"};p&&a();let v=e();return v?{...v,appliesTo:"as-default"}:(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{Ci.remove(uf)},l=()=>{Ci.remove(cf)},d=(m,p="as-default")=>{m.type==="exact_quality"||p==="to-video"?o(m):t(m)},s=m=>{let p=r(m);if(p){switch(p.type){case"traffic_saving":Sd(!0);break;case"exact_quality":gf(m,p.quality)}a(),l()}},u=m=>{let p=hf(m);if(p){o({type:"exact_quality",videoId:m,quality:p});return}$f()&&t({type:"traffic_saving",videoId:m}),Sd(!1),vu()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:xf,savePreferredSubtitlesLanguage:wf}},{getPreferredQualitySettings:e_,migrateSettingsToLegacyWay:t_,savePreferredQualitySettings:gu,savePreferredDefaultQualitySettings:R9,removePreferredQualitySettingsByVideo:D9,getPreferredDefaultQualitySettings:hu}=p1(),f1=3,m1=3,i_=()=>{let t=Ci.get(Wh);if(t)try{return JSON.parse(t)}catch(e){return null}return null},_u=(t,e)=>{var r,a;let i=i_();return(a=(r=i==null?void 0:i[t])==null?void 0:r[e])!=null?a:null},Sf=(t,e,i)=>{var l,d,s;let o=(l=i_())!=null?l:{},r=(s=(d=o[t])==null?void 0:d[e])!=null?s:{};Object.assign(r,i,{updatedTs:Date.now()}),t in o||(o[t]={}),o[t][e]=r;let a=v1(o);Ci.set(Wh,JSON.stringify(a))};function v1(t){let e=Object.entries(t).reduce((o,[r,a])=>{let l=0;return Object.values(a).forEach(d=>{l<d.updatedTs&&(l=d.updatedTs)}),o.push([r,l]),o},[]);return e.sort(([,o],[,r])=>o>r?-1:1),e.splice(m1),e.reduce((o,[r])=>(o[r]=g1(t[r]),o),{})}function g1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(f1),Object.fromEntries(e)}function o_(){Ci.set(Kh,JSON.stringify(!0))}function n_(){let t=Ci.get(Kh);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Eb}from"@vkontakte/videoplayer-core/es2018";lg();var ta="var(--btn-color, #fff)";var h1=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),_1=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;B(e,!0);let i=g(e,"width",19,()=>"24"),o=g(e,"height",19,()=>"24"),r=g(e,"fill",3,ta),a=(m=e.viewBox)!=null?m:`0 0 ${i()} ${o()}`;var l=_1(),d=C(l);{var s=p=>{var v=h1(),_=ae(v),$=C(_);ei($,()=>e.children),S(_),Jt(),b(p,v)},u=p=>{var v=De(),_=ae(v);ei(_,()=>e.children),b(p,v)};M(d,p=>{e.shadow?p(s):p(u,!1)})}S(l),N(()=>{Ne(l,"aria-label",e.ariaLabel),Ne(l,"aria-hidden",!e.ariaLabel),Ne(l,"width",i()),Ne(l,"height",o()),Ne(l,"viewBox",a),Ne(l,"fill",r()),Ke(l,e.style),Ne(l,"data-testid",e.testId)}),b(t,l),H()}import{isNullable as a_,InterfaceLanguage as l_}from"@vkontakte/videoplayer-shared/es2018";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 Aa=!1,wl=null,ka=!1,Es=!1;function Rp(t){Es=t}var hd=[],_d=[],Lt=null,gr=!1;function zi(t){Lt=t}var bt=null;function lo(t){bt=t}var Fo=null;function Gc(t){Lt!==null&&Lt.f&2097152&&(Fo===null?Fo=[Lt,[t]]:Fo[1].push(t))}var An=null,hr=0,vr=null;function gg(t){vr=t}var Rg=1,ou=0,Ps=!1,nu=null;function sd(){return++Rg}function Ta(t){var p,v;var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){var i=t.deps,o=(e&256)!==0;if(i!==null){var r,a,l=(e&512)!==0,d=o&&bt!==null&&!Ps,s=i.length;if(l||d){var u=t,f=u.parent;for(r=0;r<s;r++)a=i[r],(l||!((p=a==null?void 0:a.reactions)!=null&&p.includes(u)))&&((v=a.reactions)!=null?v:a.reactions=[]).push(u);l&&(u.f^=512),d&&f!==null&&(f.f&256)===0&&(u.f^=256)}for(r=0;r<s;r++)if(a=i[r],Ta(a)&&Vp(a),a.wv>t.wv)return!0}(!o||bt!==null&&!Ps)&&In(t,1024)}return!1}function Dg(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];Fo!=null&&Fo[1].includes(t)&&Fo[0]===Lt||((a.f&2)!==0?Dg(a,e,!1):e===a&&(i?In(a,2048):(a.f&1024)!==0&&In(a,4096),ld(a)))}}function qc(t){var _,y;var e=An,i=hr,o=vr,r=Lt,a=Ps,l=Fo,d=Nt,s=gr,u=t.f;An=null,hr=0,vr=null,Ps=(u&256)!==0&&(gr||!ka||Lt===null),Lt=(u&96)===0?t:null,Fo=null,od(t.ctx),gr=!1,ou++,t.f|=2097152;try{var f=(0,t.fn)(),p=t.deps;if(An!==null){var v;if(md(t,hr),p!==null&&hr>0)for(p.length=hr+An.length,v=0;v<An.length;v++)p[hr+v]=An[v];else t.deps=p=An;if(!Ps||(u&2)!==0&&t.reactions!==null)for(v=hr;v<p.length;v++)((y=(_=p[v]).reactions)!=null?y:_.reactions=[]).push(t)}else p!==null&&hr<p.length&&(md(t,hr),p.length=hr);if(ms()&&vr!==null&&!gr&&p!==null&&(t.f&6146)===0)for(v=0;v<vr.length;v++)Dg(vr[v],t);return r!==null&&r!==t&&(ou++,vr!==null&&(o===null?o=vr:o.push(...vr))),f}catch($){Lg($)}finally{An=e,hr=i,vr=o,Lt=r,Ps=a,Fo=l,od(d),gr=s,t.f^=2097152}}function u$(t,e){let i=e.reactions;if(i!==null){var o=Yv.call(i,t);if(o!==-1){var r=i.length-1;r===0?i=e.reactions=null:(i[o]=i[r],i.pop())}}i===null&&(e.f&2)!==0&&(An===null||!An.includes(e))&&(In(e,4096),(e.f&768)===0&&(e.f^=512),Qc(e),md(e,0))}function md(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)u$(t,i[o])}function $l(t){var e=t.f;if((e&16384)===0){In(t,1024);var i=bt,o=ka;if(bt=t,ka=!0,Me){var r=pr;nd(t.component_function)}try{(e&16)!==0?Ig(t):Bp(t),Op(t);var a=qc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Rg,Me&&fs&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=sd(),l.set_during_effect=!1);Me&&_d.push(t)}finally{ka=o,bt=i,Me&&nd(r)}}}function Mg(){console.error("Last ten effects were: ",_d.slice(-10).map(t=>t.fn)),_d=[]}function p$(){try{ng()}catch(t){if(Me&&ao(t,"stack",{value:""}),wl!==null)if(Me)try{gd(t,wl)}catch(e){throw Mg(),e}else gd(t,wl);else throw Me&&Mg(),t}}function Kp(){var t=ka;try{var e=0;for(ka=!0;hd.length>0;){e++>1e3&&p$();var i=hd,o=i.length;hd=[];for(var r=0;r<o;r++){var a=m$(i[r]);f$(a)}_l.clear()}}finally{Aa=!1,ka=t,wl=null,Me&&(_d=[])}}function f$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&Ta(o)&&($l(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?Fp(o):o.fn=null))}}function ld(t){Aa||(Aa=!0,queueMicrotask(Kp));for(var e=wl=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}hd.push(e)}function m$(t){for(var e=[],i=t;i!==null;){var o=i.f,r=(o&96)!==0,a=r&&(o&1024)!==0;if(!a&&(o&8192)===0){(o&4)!==0?e.push(i):r?i.f^=1024:Ta(i)&&$l(i);var l=i.first;if(l!==null){i=l;continue}}var d=i.parent;for(i=i.next;i===null&&d!==null;)i=d.next,d=d.parent}return e}function Sl(t){var e;for(t&&(Aa=!0,Kp(),Aa=!0,e=t());;){if(Ag(),hd.length===0)return Aa=!1,wl=null,Me&&(_d=[]),e;Aa=!0,Kp()}}async function uo(){await Promise.resolve(),Sl()}function n(t){var e=t.f,i=(e&2)!==0;if(nu!==null&&nu.add(t),Lt!==null&&!gr){if(!(Fo!=null&&Fo[1].includes(t))||Fo[0]!==Lt){var o=Lt.deps;t.rv<ou&&(t.rv=ou,An===null&&o!==null&&o[hr]===t?hr++:An===null?An=[t]:(!Ps||!An.includes(t))&&An.push(t))}}else if(i&&t.deps===null&&t.effects===null){var r=t,a=r.parent;a!==null&&(a.f&256)===0&&(r.f^=256)}if(i&&(r=t,Ta(r)&&Vp(r)),Me&&fs&&!gr&&id!==null&&Lt!==null&&id.reaction===Lt)if(t.trace)t.trace();else{var l=Is("TracedAt");if(l){var d=id.entries.get(t);d===void 0&&(d={traces:[]},id.entries.set(t,d));var s=d.traces[d.traces.length-1];l.stack!==(s==null?void 0:s.stack)&&d.traces.push(l)}}return Es&&_l.has(t)?_l.get(t):t.v}function Tt(t){var e=gr;try{return gr=!0,t()}finally{gr=e}}var v$=-7169;function In(t,e){t.f=t.f&v$|e}function su(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Bo in t)ru(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&Bo in i&&ru(i)}}}function ru(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let o in t)try{ru(t[o],e)}catch(r){}let i=xa(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){let o=Fc(i);for(let r in o){let a=o[r].get;if(a)try{a.call(t)}catch(l){}}}}}function Qp(t,e){if(e){let i=document.body;t.autofocus=!0,Pn(()=>{document.activeElement===i&&t.focus()})}}function bd(t){var e=Lt,i=bt;zi(null),lo(null);try{return t()}finally{zi(e),lo(i)}}var qp=new Set,au=new Set;function La(t){if(!ot)return;t.removeAttribute("onload"),t.removeAttribute("onerror");let e=t.__e;e!==void 0&&(t.__e=void 0,queueMicrotask(()=>{t.isConnected&&t.dispatchEvent(e)}))}function Gp(t,e,i,o={}){function r(a){if(o.capture||Cl.call(e,a),!a.cancelBubble)return bd(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Pn(()=>{e.addEventListener(t,r,o)}):e.addEventListener(t,r,o),r}function mt(t,e,i,o,r){var a={capture:o,passive:r},l=Gp(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&xo(()=>{e.removeEventListener(t,l,a)})}function Xe(t){for(var e=0;e<t.length;e++)qp.add(t[e]);for(var i of au)i(t)}function Cl(t){var T;var e=this,i=e.ownerDocument,o=t.type,r=((T=t.composedPath)==null?void 0:T.call(t))||[],a=r[0]||t.target,l=0,d=t.__root;if(d){var s=r.indexOf(d);if(s!==-1&&(e===document||e===window)){t.__root=e;return}var u=r.indexOf(e);if(u===-1)return;s<=u&&(l=s)}if(a=r[l]||t.target,a!==e){ao(t,"currentTarget",{configurable:!0,get(){return a||i}});var f=Lt,p=bt;zi(null),lo(null);try{for(var v,_=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var $=a["__"+o];if($!=null&&(!a.disabled||t.target===a))if(cr($)){var[x,...I]=$;x.apply(a,[t,...I])}else $.call(a,t)}catch(R){v?_.push(R):v=R}if(t.cancelBubble||y===e||y===null)break;a=y}if(v){for(let R of _)queueMicrotask(()=>{throw R});throw v}}finally{t.__root=e,delete t.currentTarget,zi(f),lo(p)}}}var h$;function Ng(){h$=void 0}function Tl(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function So(t,e){var i=bt;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function L(t,e){var i=(e&1)!==0,o=(e&2)!==0,r,a=!t.startsWith("<!>");return()=>{if(ot)return So($t,null),$t;r===void 0&&(r=Tl(a?t:"<!>"+t),i||(r=Ci(r)));var l=o||dd?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=Ci(l),s=l.lastChild;So(d,s)}else So(l,l);return l}}function $$(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(ot)return So($t,null),$t;if(!l){var d=Tl(a),s=Ci(d);if(r)for(l=document.createDocumentFragment();Ci(s);)l.appendChild(Ci(s));else l=Ci(s)}var u=l.cloneNode(!0);if(r){var f=Ci(u),p=u.lastChild;So(f,p)}else So(u,u);return u}}function Ae(t,e){return $$(t,e,"svg")}function gs(t=""){if(!ot){var e=En(t+"");return So(e,e),e}var i=$t;return i.nodeType!==ul&&(i.before(i=En()),$i(i)),So(i,i),i}function Ve(){if(ot)return So($t,null),$t;var t=document.createDocumentFragment(),e=document.createComment(""),i=En();return t.append(e,i),So(e,i),t}function b(t,e){if(ot){bt.nodes_end=$t,Ki();return}t!==null&&t.before(e)}var y$=/\r/g;function Bg(t){t=t.replace(y$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function Hg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var x$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Fg(t){return x$.includes(t)}var w$=["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 S$={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 Ug(t){var e;return t=t.toLowerCase(),(e=S$[t])!=null?e:t}var g3=[...w$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var C$=["touchstart","touchmove"];function zg(t){return C$.includes(t)}var T$=["$state","$state.raw","$derived","$derived.by"],h3=[...T$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var I$=["textarea","script","style","title"];function Wg(t){return I$.includes(t)}function lu(t){return t==null?void 0:t.replace(/\//g,"/​")}var $d=!0;function du(t){$d=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 Zr(t,e){return Kg(t,e)}function jp(t,e){var l;Xc(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=ot,r=$t;try{for(var a=Ci(i);a&&(a.nodeType!==ur||a.data!==Xs);)a=Uo(a);if(!a)throw us;co(!0),$i(a),Ki();let d=Kg(t,{...e,anchor:a});if($t===null||$t.nodeType!==ur||$t.data!==ya)throw ta(),us;return co(!1),d}catch(d){if(d===us)return e.recover===!1&&rg(),Xc(),cd(i),co(!1),Zr(t,e);throw d}finally{co(o),$i(r),Ng()}}var Il=new Map;function Kg(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){Xc();var d=new Set,s=p=>{for(var v=0;v<p.length;v++){var _=p[v];if(!d.has(_)){d.add(_);var y=zg(_);e.addEventListener(_,Cl,{passive:y});var $=Il.get(_);$===void 0?(document.addEventListener(_,Cl,{passive:y}),Il.set(_,1)):Il.set(_,$+1)}}};s(td(qp)),au.add(s);var u=void 0,f=Tg(()=>{var p=i!=null?i:e.appendChild(En());return Oi(()=>{if(a){B({});var v=Nt;v.c=a}r&&(o.$$events=r),ot&&So(p,null),$d=l,u=t(p,o)||{},$d=!0,ot&&(bt.nodes_end=$t),a&&H()}),()=>{var y;for(var v of d){e.removeEventListener(v,Cl);var _=Il.get(v);--_===0?(document.removeEventListener(v,Cl),Il.delete(v)):Il.set(v,_)}au.delete(s),p!==i&&((y=p.parentNode)==null||y.removeChild(p))}});return Yp.set(u,f),u}var Yp=new WeakMap;function Ma(t,e){let i=Yp.get(t);return i?(Yp.delete(t),i(e)):(Me&&bg(),Promise.resolve())}function Xt(t,e,...i){var o=t,r=_t,a;Qi(()=>{r!==(r=e())&&(a&&(Wi(a),a=null),Me&&r==null&&sg(),a=Oi(()=>r(o,...i)))},65536),ot&&(o=$t)}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;dg(e)},set:o=>{i=o}})}};k$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var k$;function Pt(t){Nt===null&&ml("onMount"),ps&&Nt.l!==null?A$(Nt).m.push(t):He(()=>{let e=Tt(t);if(typeof e=="function")return e})}function rn(t){Nt===null&&ml("onDestroy"),Pt(()=>()=>Tt(t))}function A$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var Qg=new Map;function qg(t,e){var i=Qg.get(t);i||(i=new Set,Qg.set(t,i)),i.add(e)}function M(t,e,[i,o]=[0,0]){ot&&i===0&&Ki();var r=t,a=null,l=null,d=eo,s=i>0?65536:0,u=!1;let f=(v,_=!0)=>{u=!0,p(_,v)},p=(v,_)=>{if(d===(d=v))return;let y=!1;if(ot&&o!==-1){if(i===0){let x=jc(r);x===Xs?o=0:x===Zs?o=1/0:(o=parseInt(x.substring(1)),o!==o&&(o=d?1/0:-1))}let $=o>i;!!d===$&&(r=Ia(),$i(r),co(!1),y=!0,o=-1)}d?(a?ks(a):_&&(a=Oi(()=>_(r))),l&&Gn(l,()=>{l=null})):(l?ks(l):_&&(l=Oi(()=>_(r,[i+1,o]))),a&&Gn(a,()=>{a=null})),y&&co(!0)};Qi(()=>{u=!1,e(f),u||p(null,null)},s),ot&&(r=$t)}function Ls(t,e,i){ot&&Ki();var o=t,r=eo,a,l=ms()?Jv:pl;Qi(()=>{l(r,r=e())&&(a&&Gn(a),a=Oi(()=>i(o)))}),ot&&(o=$t)}var oa=null;function Jp(t){oa=t}function yd(t,e){return e}function V$(t,e,i,o){for(var r=[],a=e.length,l=0;l<a;l++)tu(e[l].e,r,!0);var d=a>0&&r.length===0&&i!==null;if(d){var s=i.parentNode;cd(s),s.append(i),o.clear(),ia(t,e[0].prev,e[a-1].next)}Up(r,()=>{for(var u=0;u<a;u++){var f=e[u];d||(o.delete(f.k),ia(t,f.prev,f.next)),Wi(f.e,!d)}})}function _i(t,e,i,o,r,a=null){var l=t,d={flags:e,items:new Map,first:null},s=(e&4)!==0;if(s){var u=t;l=ot?$i(Ci(u)):u.appendChild(En())}ot&&Ki();var f=null,p=!1,v=mr(()=>{var _=i();return cr(_)?_:_==null?[]:td(_)});Qi(()=>{var _=n(v),y=_.length;if(p&&y===0)return;p=y===0;let $=!1;if(ot){var x=jc(l)===Zs;x!==(y===0)&&(l=Ia(),$i(l),co(!1),$=!0)}if(ot){for(var I=null,T,R=0;R<y;R++){if($t.nodeType===ur&&$t.data===ya){l=$t,$=!0,co(!1);break}var k=_[R],P=o(k,R);T=jg($t,d,I,null,k,P,R,r,e,i),d.items.set(P,T),I=T}y>0&&$i(Ia())}ot||R$(_,d,l,r,e,o,i),a!==null&&(y===0?f?ks(f):f=Oi(()=>a(l)):f!==null&&Gn(f,()=>{f=null})),$&&co(!0),n(v)}),ot&&(l=$t)}function R$(t,e,i,o,r,a,l){var de,ae,pe,ee;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,f=e.items,p=e.first,v=p,_,y=null,$,x=[],I=[],T,R,k,P;if(d)for(P=0;P<u;P+=1)T=t[P],R=a(T,P),k=f.get(R),k!==void 0&&((de=k.a)==null||de.measure(),($!=null?$:$=new Set).add(k));for(P=0;P<u;P+=1){if(T=t[P],R=a(T,P),k=f.get(R),k===void 0){var E=v?v.e.nodes_start:i;y=jg(E,e,y,y===null?e.first:y.next,T,R,P,o,r,l),f.set(R,y),x=[],I=[],v=y.next;continue}if(s&&D$(k,T,P,r),(k.e.f&8192)!==0&&(ks(k.e),d&&((ae=k.a)==null||ae.unfix(),($!=null?$:$=new Set).delete(k))),k!==v){if(_!==void 0&&_.has(k)){if(x.length<I.length){var W=I[0],U;y=W.prev;var z=x[0],Y=x[x.length-1];for(U=0;U<x.length;U+=1)Gg(x[U],W,i);for(U=0;U<I.length;U+=1)_.delete(I[U]);ia(e,z.prev,Y.next),ia(e,y,z),ia(e,Y,W),v=W,y=Y,P-=1,x=[],I=[]}else _.delete(k),Gg(k,v,i),ia(e,k.prev,k.next),ia(e,k,y===null?e.first:y.next),ia(e,y,k),y=k;continue}for(x=[],I=[];v!==null&&v.k!==R;)(v.e.f&8192)===0&&(_!=null?_:_=new Set).add(v),I.push(v),v=v.next;if(v===null)continue;k=v}x.push(k),y=k,v=k.next}if(v!==null||_!==void 0){for(var ie=_===void 0?[]:td(_);v!==null;)(v.e.f&8192)===0&&ie.push(v),v=v.next;var J=ie.length;if(J>0){var oe=(r&4)!==0&&u===0?i:null;if(d){for(P=0;P<J;P+=1)(pe=ie[P].a)==null||pe.measure();for(P=0;P<J;P+=1)(ee=ie[P].a)==null||ee.fix()}V$(e,ie,oe,f)}}d&&Pn(()=>{var $e;if($!==void 0)for(k of $)($e=k.a)==null||$e.apply()}),bt.first=e.first&&e.first.e,bt.last=y&&y.e}function D$(t,e,i,o){(o&1)!==0&&bl(t.v,e),(o&2)!==0?bl(t.i,i):t.i=i}function jg(t,e,i,o,r,a,l,d,s,u){var f=oa,p=(s&1)!==0,v=(s&16)===0,_=p?v?vs(r,!1,!1):kr(r):r,y=(s&2)===0?l:kr(l);Me&&p&&(_.trace=()=>{var x=typeof y=="number"?l:y.v;u()[x]});var $={i:y,v:_,k:a,a:null,e:null,prev:i,next:o};oa=$;try{return $.e=Oi(()=>d(t,_,y,u),ot),$.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{oa=f}}function Gg(t,e,i){for(var o=t.next?t.next.e.nodes_start:i,r=e?e.e.nodes_start:i,a=t.e.nodes_start;a!==o;){var l=Uo(a);r.before(a),a=l}}function ia(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 N$(t,e,i){var a,l;if(!e||e===Bg(String(i!=null?i:"")))return;let o,r=(a=t.__svelte_meta)==null?void 0:a.loc;r?o=`near ${r.file}:${r.line}:${r.column}`:(l=pr)!=null&&l[Wn]&&(o=`in ${pr[Wn]}`),_g(lu(o))}function xd(t,e,i=!1,o=!1,r=!1){var a=t,l="";N(()=>{var _;var d=bt;if(l===(l=(_=e())!=null?_:"")){ot&&Ki();return}if(d.nodes_start!==null&&(Hp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(ot){for(var s=$t.data,u=Ki(),f=u;u!==null&&(u.nodeType!==ur||u.data!=="");)f=u,u=Uo(u);if(u===null)throw ta(),us;Me&&!r&&N$(u.parentNode,s,l),So($t,f),a=$i(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var v=Tl(p);if((i||o)&&(v=Ci(v)),So(Ci(v),v.lastChild),i||o)for(;Ci(v);)a.before(Ci(v));else a.before(v)}})}function Bi(t,e,i){ot&&Ki();var o=t,r,a;Qi(()=>{r!==(r=e())&&(a&&(Gn(a),a=null),r&&(a=Oi(()=>i(o,r))))},65536),ot&&(o=$t)}function Va(t,e,i,o,r,a){var y;let l=ot;ot&&Ki();var d=Me&&a&&((y=Nt)==null?void 0:y.function[Wn]),s,u,f=null;ot&&$t.nodeType===zc&&(f=$t,Ki());var p=ot?$t:t,v,_=oa;Qi(()=>{let $=e()||null;var x=r?r():i||$==="svg"?Bc:null;if($!==s){var I=oa;Jp(_),v&&($===null?Gn(v,()=>{v=null,u=null}):$===u?ks(v):(Wi(v),du(!1))),$&&$!==u&&(v=Oi(()=>{if(f=ot?f:x?document.createElementNS(x,$):document.createElement($),Me&&a&&(f.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),So(f,f),o){ot&&Wg($)&&f.append(document.createComment(""));var T=ot?Ci(f):f.appendChild(En());ot&&(T===null?co(!1):$i(T)),o(f,T)}bt.nodes_end=f,p.before(f)})),s=$,s&&(u=s),du(!0),Jp(I)}},65536),l&&(co(!0),$i(p))}var tf;function Xg(t){return tf=t.target,new ef(t)}var Ms,Lr,ef=class{constructor(e){js(this,Ms);js(this,Lr);var a,l;var i=new Map,o=(d,s)=>{var u=vs(s,!1,!1);return i.set(d,u),u};let r=new Proxy({...e.props||{},$$events:{}},{get(d,s){var u;return n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s)))},has(d,s){var u;return s===cl?!0:(n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s))),Reflect.has(d,s))},set(d,s,u){var f;return D((f=i.get(s))!=null?f:o(s,u),u),Reflect.set(d,s,u)}});dl(this,Lr,(e.hydrate?jp:Zr)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:(a=e.intro)!=null?a:!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&Sl(),dl(this,Ms,r.$$events);for(let d of Object.keys(Ni(this,Lr)))d==="$set"||d==="$destroy"||d==="$on"||ao(this,d,{get(){return Ni(this,Lr)[d]},set(s){Ni(this,Lr)[d]=s},enumerable:!0});Ni(this,Lr).$set=d=>{Object.assign(r,d)},Ni(this,Lr).$destroy=()=>{Ma(Ni(this,Lr))}}$set(e){Ni(this,Lr).$set(e)}$on(e,i){Ni(this,Ms)[e]=Ni(this,Ms)[e]||[];let o=(...r)=>i.call(this,...r);return Ni(this,Ms)[e].push(o),()=>{Ni(this,Ms)[e]=Ni(this,Ms)[e].filter(r=>r!==o)}}$destroy(){Ni(this,Lr).$destroy()}};Ms=new WeakMap,Lr=new WeakMap;function Q(t,e){Pn(()=>{var r,a,l;var i=t.getRootNode(),o=i.host?i:(l=(r=i.head)!=null?r:i.ownerDocument.head)!=null?l:(a=tf)==null?void 0:a.parentNode;if(!(o!=null&&o.querySelector("#"+e.hash))){let d=document.createElement("style");d.id=e.hash,d.textContent=e.code,o.appendChild(d),Me&&qg(e.hash,d)}})}function Vs(t,e){var i=void 0,o;Qi(()=>{i!==(i=e())&&(o&&(Wi(o),o=null),i&&(o=Oi(()=>{wo(()=>i(t))})))})}function Zg(t){var e,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(i=Zg(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function Jg(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=Zg(t))&&(o&&(o+=" "),o+=e);return o}function wd(t){return typeof t=="object"?Jg(t):t!=null?t:""}var eh=[...`
44
+ \r\f \v\uFEFF`];function ih(t,e,i){var o=t==null?"":""+t;if(e&&(o=o?o+" "+e:e),i){for(var r in i)if(i[r])o=o?o+" "+r:r;else if(o.length)for(var a=r.length,l=0;(l=o.indexOf(r,l))>=0;){var d=l+a;(l===0||eh.includes(o[l-1]))&&(d===o.length||eh.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function th(t,e=!1){var i=e?" !important;":";",o="";for(var r in t){var a=t[r];a!=null&&a!==""&&(o+=" "+r+": "+a+i)}return o}function of(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function oh(t,e){if(e){var i="",o,r;if(Array.isArray(e)?(o=e[0],r=e[1]):o=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,l=0,d=!1,s=[];o&&s.push(...Object.keys(o).map(of)),r&&s.push(...Object.keys(r).map(of));var u=0,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 _=of(t.substring(u,f).trim());if(!s.includes(_)){v!==";"&&p++;var y=t.substring(u,p).trim();i+=" "+y+";"}}u=p+1,f=-1}}}}return o&&(i+=th(o)),r&&(i+=th(r,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function te(t,e,i,o,r,a){var l=t.__className;if(ot||l!==i||l===void 0){var d=ih(i,o,a);(!ot||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&r!==a)for(var s in a){var u=!!a[s];(r==null||u!==!!r[s])&&t.classList.toggle(s,u)}return a}function nf(t,e={},i,o){for(var r in i){var a=i[r];e[r]!==a&&(i[r]==null?t.style.removeProperty(r):t.style.setProperty(r,a,o))}}function Ke(t,e,i,o){var r=t.__style;if(ot||r!==e){var a=oh(e,o);(!ot||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(nf(t,i==null?void 0:i[0],o[0]),nf(t,i==null?void 0:i[1],o[1],"important")):nf(t,i,o));return o}function Sd(t,e,i){if(t.multiple){if(e==null)return;if(!cr(e))return $g();for(var o of t.options)o.selected=e.includes(nh(o));return}for(o of t.options){var r=nh(o);if(Pp(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function rf(t){var e=new MutationObserver(()=>{Sd(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),xo(()=>{e.disconnect()})}function nh(t){return"__value"in t?t.__value:t.value}var El=Symbol("class"),Pl=Symbol("style"),ah=Symbol("is custom element"),lh=Symbol("is html");function dh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function De(t,e,i,o){var r=uh(t);if(ot&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||K$(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[Zv]=i),i==null?t.removeAttribute(e):typeof i!="string"&&ph(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function ch(t,e,i,o,r=!1){var k;var a=uh(t),l=a[ah],d=!a[lh];let s=ot&&l;s&&co(!1);var u=e||{},f=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=wd(i.class):(o||i[El])&&(i.class=null),i[Pl]&&((k=i.style)!=null||(i.style=null));var v=ph(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 _=t.namespaceURI==="http://www.w3.org/1999/xhtml";te(t,_,E,o,e==null?void 0:e[El],i[El]),u[P]=E,u[El]=i[El];continue}if(P==="style"){Ke(t,E,e==null?void 0:e[Pl],i[Pl]),u[P]=E,u[Pl]=i[Pl];continue}var y=u[P];if(!(E===y&&!(E===void 0&&t.hasAttribute(P)))){u[P]=E;var $=P[0]+P[1];if($!=="$$")if($==="on"){let W={},U="$$"+P,z=P.slice(2);var x=Fg(z);if(Hg(z)&&(z=z.slice(0,-7),W.capture=!0),!x&&y){if(E!=null)continue;t.removeEventListener(z,u[U],W),u[U]=null}if(E!=null)if(x)t[`__${z}`]=E,Xe([z]);else{let Y=function(ie){u[P].call(this,ie)};var R=Y;u[U]=Gp(z,t,Y,W)}else x&&(t[`__${z}`]=void 0)}else if(P==="style")De(t,P,E);else if(P==="autofocus")Qp(t,!!E);else if(!l&&(P==="__value"||P==="value"&&E!=null))t.value=t.__value=E;else if(P==="selected"&&f)dh(t,E);else{var I=P;d||(I=Ug(I));var T=I==="defaultValue"||I==="defaultChecked";if(E==null&&!l&&!T)if(a[P]=null,I==="value"||I==="checked"){let W=t,U=e===void 0;if(I==="value"){let z=W.defaultValue;W.removeAttribute(I),W.defaultValue=z,W.value=W.__value=U?z:null}else{let z=W.defaultChecked;W.removeAttribute(I),W.defaultChecked=z,W.checked=U?z:!1}}else t.removeAttribute(P);else T||v.includes(I)&&(l||typeof E!="string")?t[I]=E:typeof E!="function"&&De(t,I,E,r)}}}return s&&co(!0),u}function to(t,e,i=[],o,r=!1,a=Yr){let l=i.map(a);var d=void 0,s={},u=t.nodeName==="SELECT",f=!1;if(Qi(()=>{var v=e(...l.map(n)),_=ch(t,d,v,o,r);f&&u&&"value"in v&&Sd(t,v.value,!1);for(let $ of Object.getOwnPropertySymbols(s))v[$]||Wi(s[$]);for(let $ of Object.getOwnPropertySymbols(v)){var y=v[$];$.description===yp&&(!d||y!==d[$])&&(s[$]&&Wi(s[$]),s[$]=Oi(()=>Vs(t,()=>y))),_[$]=y}d=_}),u){var p=t;wo(()=>{Sd(p,d.value),rf(p)})}f=!0}function uh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[ah]:t.nodeName.includes("-"),[lh]:t.namespaceURI===Kv}}var rh=new Map;function ph(t){var e=rh.get(t.nodeName);if(e)return e;rh.set(t.nodeName,e=[]);for(var i,o=t,r=Element.prototype;r!==o;){i=Fc(o);for(var a in i)i[a].set&&e.push(a);o=xa(o)}return e}function K$(t,e,i){var o;Me&&(e==="srcset"&&Q$(t,i)||sf((o=t.getAttribute(e))!=null?o:"",i)||hg(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function sf(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function sh(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function Q$(t,e){var i=sh(t.srcset),o=sh(e);return o.length===i.length&&o.every(([r,a],l)=>a===i[l][1]&&(sf(i[l][0],r)||sf(r,i[l][0])))}var q$=Hc?()=>performance.now():()=>Date.now(),Jr={tick:t=>(Hc?requestAnimationFrame:_t)(t),now:()=>q$(),tasks:new Set};function fh(){let t=Jr.now();Jr.tasks.forEach(e=>{e.c(t)||(Jr.tasks.delete(e),e.f())}),Jr.tasks.size!==0&&Jr.tick(fh)}function mh(t){let e;return Jr.tasks.size===0&&Jr.tick(fh),{promise:new Promise(i=>{Jr.tasks.add(e={c:t,f:i})}),abort(){Jr.tasks.delete(e)}}}function cu(t,e){bd(()=>{t.dispatchEvent(new CustomEvent(e))})}function X$(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 vh(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=X$(r.trim());e[l]=a.trim()}return e}var Z$=t=>t;function Rs(t,e,i,o){var R;var r=(t&1)!==0,a=(t&2)!==0,l=r&&a,d=(t&4)!==0,s=l?"both":r?"in":"out",u,f=e.inert,p=e.style.overflow,v,_;function y(){var E;var k=Lt,P=bt;zi(null),lo(null);try{return u!=null?u:u=i()(e,(E=o==null?void 0:o())!=null?E:{},{direction:s})}finally{zi(k),lo(P)}}var $={is_global:d,in(){var k;if(e.inert=f,!r){_==null||_.abort(),(k=_==null?void 0:_.reset)==null||k.call(_);return}a||v==null||v.abort(),cu(e,"introstart"),v=af(e,y(),_,1,()=>{cu(e,"introend"),v==null||v.abort(),v=u=void 0,e.style.overflow=p})},out(k){if(!a){k==null||k(),u=void 0;return}e.inert=!0,cu(e,"outrostart"),_=af(e,y(),v,0,()=>{cu(e,"outroend"),k==null||k()})},stop:()=>{v==null||v.abort(),_==null||_.abort()}},x=bt;if(((R=x.transitions)!=null?R:x.transitions=[]).push($),r&&$d){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&&wo(()=>{Tt(()=>$.in())})}}function af(t,e,i,o,r){var a=o===1;if(Js(e)){var l,d=!1;return Pn(()=>{if(!d){var x=e({direction:a?"in":"out"});l=af(t,x,i,o,r)}}),{abort:()=>{d=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return r(),{abort:_t,deactivate:_t,reset:_t,t:()=>o};let{delay:s=0,css:u,tick:f,easing:p=Z$}=e;var v=[];if(a&&i===void 0&&(f&&f(0,1),u)){var _=vh(u(0,1));v.push(_,_)}var y=()=>1-o,$=t.animate(v,{duration:s,fill:"forwards"});return $.onfinish=()=>{var z;$.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),R=[];if(T>0){var k=!1;if(u)for(var P=Math.ceil(T/16.666666666666668),E=0;E<=P;E+=1){var W=x+I*p(E/P),U=vh(u(W,1-W));R.push(U),k||(k=U.overflow==="hidden")}k&&(t.style.overflow="hidden"),y=()=>{var Y=$.currentTime;return x+I*p(Y/T)},f&&mh(()=>{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),r()}},{abort:()=>{$&&($.cancel(),$.effect=null,$.onfinish=_t)},deactivate:()=>{r=_t},reset:()=>{o===0&&(f==null||f(1,0))},t:()=>y()}}function lf(t,e,i){var o=Oo(t,e);o&&o.set&&(t[e]=i,xo(()=>{t[e]=null}))}var na,Al,Cd,pu,gh,fu=class fu{constructor(e){js(this,pu);js(this,na,new WeakMap);js(this,Al);js(this,Cd);dl(this,Cd,e)}observe(e,i){var o=Ni(this,na).get(e)||new Set;return o.add(i),Ni(this,na).set(e,o),zv(this,pu,gh).call(this).observe(e,Ni(this,Cd)),()=>{var r=Ni(this,na).get(e);r.delete(i),r.size===0&&(Ni(this,na).delete(e),Ni(this,Al).unobserve(e))}}};na=new WeakMap,Al=new WeakMap,Cd=new WeakMap,pu=new WeakSet,gh=function(){var e;return(e=Ni(this,Al))!=null?e:dl(this,Al,new ResizeObserver(i=>{for(var o of i){fu.entries.set(o.target,o);for(var r of Ni(this,na).get(o.target)||[])r(o)}}))},dr(fu,"entries",new WeakMap);var df=fu;var J$=new df({box:"border-box"});function kn(t,e,i){var o=J$.observe(t,()=>i(t[e]));wo(()=>(Tt(()=>i(t[e])),o))}function hh(t,e){return t===e||(t==null?void 0:t[Bo])===e}function tt(t={},e,i,o){return wo(()=>{var r,a;return zo(()=>{r=a,a=(o==null?void 0:o())||[],Tt(()=>{t!==i(...a)&&(e(t,...a),r&&hh(i(...r),t)&&e(null,...r))})}),()=>{Pn(()=>{a&&hh(i(...a),t)&&e(null,...a)})}}),t}function Wo(t=!1){let e=Nt,i=e.l.u;if(!i)return;let o=()=>su(e.s);if(t){let r=0,a={},l=Yr(()=>{let d=!1,s=e.s;for(let u in s)s[u]!==a[u]&&(a[u]=s[u],d=!0);return d&&r++,r});o=()=>n(l)}i.b.length&&fd(()=>{_h(e,o),ea(i.b)}),He(()=>{let r=Tt(()=>i.m.map(Xv));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&He(()=>{_h(e,o),ea(i.a)})}function _h(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function Td(t,e,i){if(t==null)return e(void 0),i&&i(void 0),_t;let o=Tt(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var kl=[];function Mr(t,e){return{subscribe:se(t,e).subscribe}}function se(t,e=_t){let i=null,o=new Set;function r(d){if(pl(t,d)&&(t=d,i)){let s=!kl.length;for(let u of o)u[1](),kl.push(u,t);if(s){for(let u=0;u<kl.length;u+=2)kl[u][0](kl[u+1]);kl.length=0}}}function a(d){r(d(t))}function l(d,s=_t){let u=[d,s];return o.add(u),o.size===1&&(i=e(r,a)||_t),d(t),()=>{o.delete(u),o.size===0&&i&&(i(),i=null)}}return{set:r,update:a,subscribe:l}}function li(t,e,i){let o=!Array.isArray(t),r=o?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let a=e.length<2;return Mr(i,(l,d)=>{let s=!1,u=[],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},_=r.map((y,$)=>Td(y,x=>{u[$]=x,f&=~(1<<$),s&&v()},()=>{f|=1<<$}));return s=!0,v(),function(){ea(_),p(),s=!1}})}function _e(t){let e;return Td(t,i=>e=i)(),e}var mu=!1,cf=Symbol();function w(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:vs(void 0),unsubscribe:_t};if(o.store!==t&&!(cf in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=_t;else{var r=!0;o.unsubscribe=Td(t,l=>{r?o.source.v=l:D(o.source,l)}),r=!1}return t&&cf in i?_e(t):n(o.source)}function Be(){let t={};function e(){xo(()=>{for(var i in t)t[i].unsubscribe();ao(t,cf,{enumerable:!1,value:!0})})}return[t,e]}function uf(t){var e=mu;try{return mu=!1,[t(),mu]}finally{mu=e}}var s1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Me&&lg(`${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 Ln(t,e,i){return new Proxy(Me?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},s1)}var a1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(Js(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o)return o[e]}},set(t,e,i){let o=t.props.length;for(;o--;){let r=t.props[o];Js(r)&&(r=r());let a=Oo(r,e);if(a&&a.set)return a.set(i),!0}return!1},getOwnPropertyDescriptor(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(Js(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let r=Oo(o,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===Bo||e===cl)return!1;for(let i of t.props)if(Js(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(Js(i)&&(i=i()),!!i){for(let o in i)e.includes(o)||e.push(o);for(let o of Object.getOwnPropertySymbols(i))e.includes(o)||e.push(o)}return e}};function es(...t){return new Proxy({props:t},a1)}function bh(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function g(t,e,i,o){var W,U;var r=(i&1)!==0,a=!ps||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,s=!1,u;l?[u,s]=uf(()=>t[e]):u=t[e];var f=Bo in t||cl in t,p=l&&((U=(W=Oo(t,e))==null?void 0:W.set)!=null?U:f&&e in t&&(z=>t[e]=z))||void 0,v=o,_=!0,y=!1,$=()=>(y=!0,_&&(_=!1,d?v=Tt(o):v=o),v);u===void 0&&o!==void 0&&(p&&a&&ag(e),u=$(),p&&p(u));var x;if(a)x=()=>{var z=t[e];return z===void 0?$():(_=!0,y=!1,z)};else{var I=(r?Yr:mr)(()=>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,Y){return arguments.length>0?((!a||!Y||T||s)&&p(Y?x():z),z):x()}}var R=!1,k=!1,P=vs(u),E=Yr(()=>{var z=x(),Y=n(P);return R?(R=!1,k=!0,Y):(k=!1,P.v=z)});return l&&n(E),r||(E.equals=fl),function(z,Y){if(nu!==null&&(R=k,x(),n(P)),arguments.length>0){let ie=Y?n(E):a&&l?ii(z):z;if(!E.equals(ie)){if(R=!0,D(P,ie),y&&v!==void 0&&(v=ie),bh(E))return z;Tt(()=>n(E))}return z}return bh(E)?E.v:n(E)}}var l1;typeof HTMLElement=="function"&&(l1=class extends HTMLElement{constructor(e,i,o){super();dr(this,"$$ctor");dr(this,"$$s");dr(this,"$$c");dr(this,"$$cn",!1);dr(this,"$$d",{});dr(this,"$$r",!1);dr(this,"$$p_d",{});dr(this,"$$l",{});dr(this,"$$l_u",new Map);dr(this,"$$me");this.$$ctor=e,this.$$s=i,o&&this.attachShadow({mode:"open"})}addEventListener(e,i,o){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){let r=this.$$c.$on(e,i);this.$$l_u.set(i,r)}super.addEventListener(e,i,o)}removeEventListener(e,i,o){if(super.removeEventListener(e,i,o),this.$$c){let r=this.$$l_u.get(i);r&&(r(),this.$$l_u.delete(i))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(a){return l=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),b(l,d)}};var e=i;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let o={},r=d1(this);for(let a of this.$$s)a in r&&(a==="default"&&!this.$$d.children?(this.$$d.children=i(a),o.default=!0):o[a]=i(a));for(let a of this.attributes){let l=this.$$g_p(a.name);l in this.$$d||(this.$$d[l]=pf(l,a.value,this.$$p_d,"toProp"))}for(let a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=Xg({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:o,$$host:this}}),this.$$me=eu(()=>{zo(()=>{var a;this.$$r=!0;for(let l of xp(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=pf(l,this.$$d[l],this.$$p_d,"toAttribute");d==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,d)}this.$$r=!1})});for(let a in this.$$l)for(let l of this.$$l[a]){let d=this.$$c.$on(a,l);this.$$l_u.set(l,d)}this.$$l={}}}attributeChangedCallback(e,i,o){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=pf(e,o,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return xp(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function pf(t,e,i,o){var a;let r=(a=i[t])==null?void 0:a.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!i[t])return e;if(o==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e==null?null:e;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function d1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var $h="5";var yh,xh,wh;typeof window!="undefined"&&((wh=(xh=(yh=window.__svelte)!=null?yh:window.__svelte={}).v)!=null?wh:xh.v=new Set).add($h);import{areValidLiveRecordSources as VT,clientChecker as Iv}from"@vkontakte/videoplayer-core/es2018";import"@vkontakte/videoplayer-core/es2018";import{noop as Nb,safeStorage as RT,throttleFn as DT}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as NT}from"@vkontakte/videoplayer-statistics/es2018";import{InterfaceLanguage as c1,fillWithDefault as u1,VideoQuality as Sh}from"@vkontakte/videoplayer-shared/es2018";var p1={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:Sh.Q_480P,highQualityLimit:Sh.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:[]},Ch=t=>u1(t,p1),Th=t=>gl("ui-config",t),At=()=>vl("ui-config");var Id="vk_player_debug_panel_opened";var Ih="videoplayer",Eh="videoplayer";var hs={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Ph=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Ah=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),kh=new Set(["ShiftRight","ShiftLeft"]);var Lh=["TIMELINE"],Ed=[...Lh,"GRAPH_BUTTON"],ff=[...Lh,"PLAY_BUTTON"],Pd=[...Ed,"PLAY_BUTTON"];var _s=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(_s||{}),Ad={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Mh,VERSION as f1}from"@vkontakte/videoplayer-shared/es2018";import{VERSION as m1}from"@vkontakte/videoplayer-core/es2018";import{VERSION as v1}from"@vkontakte/videoplayer-statistics/es2018";var vu="prod",Ll="1.1.85-dev.efae8891.0";var Da=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Vh=Symbol("storeContext"),Rh=Symbol("microStoresContext"),Dh=(t,e)=>{gl(Vh,t),gl(Rh,e),vu==="dev"&&(window.app={store:t,microStores:e})},xe=()=>{let t=vl(Vh);return Mh(t,"Store context is empty!"),t},go=()=>{let t=vl(Rh);return Mh(t,"MicroStores context is empty!"),t},Zt=(t,e)=>hu(t,t.getValue(),e),hu=(t,e,i)=>Mr(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),Nh=(t,e,i,o,r=["meta config not provided"])=>{var U,z,Y,ie,J,oe,de,ae,pe;let a=t.info,{width:l,height:d}=_e(i.ui.playerSize),s=(z=(U=a.throughputEstimation$.getValue())==null?void 0:U.toFixed(0))!=null?z:0,u=(ie=(Y=a.rttEstimation$.getValue())==null?void 0:Y.toFixed(0))!=null?ie:0,f=a.isAutoQualityEnabled$.getValue()?"auto":"manual",p=`${Ll} (core: ${m1}, stat: ${v1}, shared: ${f1})`,v=_e(i.state.errorLog$),_=v.length?`
45
+ `+v.map((ee,$e)=>{var fe;let Ee=`${$e}) Type: ${ee.id}
46
+ `,ce=`Message: ${ee.message} (${ee.thrown})
47
+ `,Qe=`Trace: ${(fe=ee.thrown)==null?void 0:fe.stack}
48
+ `;return Ee+ce+Qe}).join(`
49
+ `):void 0,y=i.state.isAudioDisabled?"disabled":_e(i.state.isAudioAvailable$)?void 0:"unavailable",$=t.info.currentVideoStream$.getValue(),x=t.info.currentAudioStream$.getValue(),I=[];$&&I.push(`Video: ${(J=$==null?void 0:$.codec)!=null?J:""}`+($!=null&&$.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(),R="";if(T){let ee=a.availableQualitiesFps$.getValue()[T];R=ee?`${ee}fps`:""}let k=a.httpConnectionType$.getValue(),P=(ae=(de=a.currentBuffer$.getValue())==null?void 0:de.end)!=null?ae:0,E=Math.max(P-_e(i.state.positionExact$),0),W={Version:p,Browser:navigator.userAgent,Config:r.join(", "),"United video id":String(i.videoId),TraceId:o,VSID:_e(i.vsid),"Content host":a.hostname$.getValue(),"Connection type":k?k+(a.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${s}Kbps @ ${u}ms RTT`,Format:a.currentFormat$.getValue(),"Available Formats":e!=null&&e.sources?Object.keys(e.sources).join(", "):"",Streams:I.join(", "),Quality:`${f} ${T!=null?T:""} ${R}`,"Available qualities":a.availableQualities$.getValue().join(", "),Audio:y,Position:`${_e(i.state.positionExact$)}s`,Buffer:`${E}s`,State:`${_e(i.playerPhase)} ${(pe=a.playbackState$.getValue())!=null?pe:""}`,"Player size":`${l}x${d}`,URL:window.location.href,Errors:_};return Object.entries(W).filter(([ee,$e])=>$e!==void 0).map(([ee,$e])=>`${ee}: ${$e}`).join(`
50
+ `)},Oh=(t,e,i)=>{var U,z,Y,ie;let o=t.info,{width:r,height:a}=_e(i.ui.playerSize),l={version:Ll,viewport:`${r}x${a}`,volume:Math.round(_e(i.state.volume$)*100)};l.id=i.videoId,o.currentFormat$.getValue()&&(l.provider=o.currentFormat$.getValue()),o.hostname$.getValue()&&(l.cdn=o.hostname$.getValue());let u=o.intrinsicVideoSize$.getValue();u&&(l.videoSize=`${u.width}x${u.height}`);let f=o.currentBuffer$.getValue(),p=o.currentNativeBuffer$.getValue(),v=o.isLive$.getValue(),_=o.liveBufferTime$.getValue();f&&p&&(v&&_?(l.buffer=f.end-_,l.nativeBuffer=p.end-_):(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 x=o.liveLatency$.getValue();x&&(l.liveLatency=x);let I=o.currentVideoSegmentLength$.getValue();I&&(l.currentVideoSegmentLength=I);let T=o.currentAudioSegmentLength$.getValue();T&&(l.currentAudioSegmentLength=T);let R=_e(i.vsid);typeof R=="string"&&(l.vsid=R);let k=(U=t.info.currentVideoStream$.getValue())==null?void 0:U.codec;k&&(l.videoCodec=k);let P=(z=t.info.currentAudioStream$.getValue())==null?void 0:z.codec;P&&(l.audioCodec=P),((Y=t.info.currentVideoStream$.getValue())==null?void 0:Y.hdr)&&(l.hdr=!0);let W=(ie=t.info.currentAudioStream$.getValue())==null?void 0:ie.language;return W&&(l.audioLanguage=W),l},Bh=(t,e)=>Da(t,e,"mp4"),Hh=t=>!t.type,Fh=t=>!!t.type,Uh=()=>{let e=[],i=0;return{add:(o,r)=>{e[i]=[o,r],i=(i+1)%10},find:o=>e.find(([r])=>r===o)}},gu=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}async download(e){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=await fetch(e,{signal:this.destroyController.signal});if(i.ok)return await i.text();throw i}finally{this.pendingDownloads.delete(e)}}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}};import{isNullable as hf,safeStorage as Ti}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-core/es2018";var g1="vk_player_",zh="vk_player_prefer_traffic_saving_enabled",Wh="vk_player_preferred_volume",Kh="vk_player_prefer_volume_mute",_f="vk_player_preferred_quality",mf="vk_player_preferred_default_quality_settings",vf="vk_player_preferred_quality_settings_by_video",Qh="vk_player_preferred_stream_language",qh="vk_player_preferred_rate",Gh="vk_player_preferred_autoplay_next",gf="vk_player_preferred_subtitles_language",Yh="vk_player_user_video_prefs",jh=`${g1}preview_track_close_tooltip`,Xh=t=>t>1?1:t<0?0:t,bf=t=>Ti.set(Wh,Xh(t).toString(10)),_u=()=>{let t=Ti.get(Wh);return hf(t)?void 0:Xh(parseFloat(t))},$f=(t,e)=>Ti.set(_f,JSON.stringify({videoId:t,value:e})),bu=()=>Ti.remove(_f),yf=t=>{let e=Ti.get(_f);if(hf(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){bu();return}return o},Zh=(t,e)=>{e?Ti.set(t,"true"):Ti.remove(t)},xf=t=>Ti.get(t)==="true",wf=t=>Zh(Kh,t),Jh=()=>xf(Kh),kd=t=>Zh(zh,t),Sf=()=>xf(zh),e_=()=>Ti.get(Qh),Cf=t=>Ti.set(Qh,t),Tf=()=>Ti.get(gf),If=t=>{t?Ti.set(gf,t):Ti.remove(gf)},t_=t=>Ti.set(qh,JSON.stringify({rate:t})),i_=()=>{let t=Ti.get(qh);if(hf(t))return;let{rate:e}=JSON.parse(t);return e},o_=t=>{Ti.set(Gh,String(t))},n_=()=>xf(Gh),h1=()=>{let t=f=>{Ti.set(mf,JSON.stringify(f))},e=()=>{try{let f=Ti.get(mf);return f?JSON.parse(f):null}catch(f){return null}},i=()=>{try{let f=Ti.get(vf);return f?JSON.parse(f):null}catch(f){return null}},o=f=>{Ti.set(vf,JSON.stringify(f))},r=f=>{u(f);let p=f?i():null;if(p&&(p==null?void 0:p.videoId)===f)return{...p,appliesTo:"to-video"};p&&a();let v=e();return v?{...v,appliesTo:"as-default"}:(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{Ti.remove(vf)},l=()=>{Ti.remove(mf)},d=(f,p="as-default")=>{f.type==="exact_quality"||p==="to-video"?o(f):t(f)},s=f=>{let p=r(f);if(p){switch(p.type){case"traffic_saving":kd(!0);break;case"exact_quality":$f(f,p.quality)}a(),l()}},u=f=>{let p=yf(f);if(p){o({type:"exact_quality",videoId:f,quality:p});return}Sf()&&t({type:"traffic_saving",videoId:f}),kd(!1),bu()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:Tf,savePreferredSubtitlesLanguage:If}},{getPreferredQualitySettings:r_,migrateSettingsToLegacyWay:s_,savePreferredQualitySettings:$u,savePreferredDefaultQualitySettings:H9,removePreferredQualitySettingsByVideo:F9,getPreferredDefaultQualitySettings:yu}=h1(),_1=3,b1=3,a_=()=>{let t=Ti.get(Yh);if(t)try{return JSON.parse(t)}catch(e){return null}return null},xu=(t,e)=>{var r,a;let i=a_();return(a=(r=i==null?void 0:i[t])==null?void 0:r[e])!=null?a:null},Ef=(t,e,i)=>{var l,d,s;let o=(l=a_())!=null?l:{},r=(s=(d=o[t])==null?void 0:d[e])!=null?s:{};Object.assign(r,i,{updatedTs:Date.now()}),t in o||(o[t]={}),o[t][e]=r;let a=$1(o);Ti.set(Yh,JSON.stringify(a))};function $1(t){let e=Object.entries(t).reduce((o,[r,a])=>{let l=0;return Object.values(a).forEach(d=>{l<d.updatedTs&&(l=d.updatedTs)}),o.push([r,l]),o},[]);return e.sort(([,o],[,r])=>o>r?-1:1),e.splice(b1),e.reduce((o,[r])=>(o[r]=y1(t[r]),o),{})}function y1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(_1),Object.fromEntries(e)}function l_(){Ti.set(jh,JSON.stringify(!0))}function d_(){let t=Ti.get(jh);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Vb}from"@vkontakte/videoplayer-core/es2018";fg();var ra="var(--btn-color, #fff)";var x1=Ae('<g filter="url(#strokeAndShadow)"><!></g><defs><filter x="-12" width="72" y="-12" height="72" id="strokeAndShadow"><feMorphology operator="dilate" radius=".4" result="outer"></feMorphology><feFlood flood-color="rgba(0,0,0,0.1)" result="outerColor"></feFlood><feComposite operator="in" in="outerColor" in2="outer" result="outerOutline"></feComposite><feDropShadow in="SourceGraphic" dx="0" dy="0" stdDeviation="3" flood-color="rgba(0,0,0,0.4)" result="outerShadow"></feDropShadow><feMerge><feMergeNode in="outerShadow"></feMergeNode><feMergeNode in="outerOutline"></feMergeNode><feMergeNode in="SourceGraphic"></feMergeNode></feMerge></filter></defs>',1),w1=Ae('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function Ye(t,e){var f;B(e,!0);let i=g(e,"width",19,()=>"24"),o=g(e,"height",19,()=>"24"),r=g(e,"fill",3,ra),a=(f=e.viewBox)!=null?f:`0 0 ${i()} ${o()}`;var l=w1(),d=C(l);{var s=p=>{var v=x1(),_=le(v),y=C(_);Xt(y,()=>e.children),S(_),Yt(),b(p,v)},u=p=>{var v=Ve(),_=le(v);Xt(_,()=>e.children),b(p,v)};M(d,p=>{e.shadow?p(s):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",r()),Ke(l,e.style),De(l,"data-testid",e.testId)}),b(t,l),H()}import{isNullable as p_,InterfaceLanguage as f_}from"@vkontakte/videoplayer-shared/es2018";var S1={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:"Выйти из режима точной перемотки"},r_=b1;var $1={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,
52
+ попробуйте изменить качество на «Авто»`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"},c_=S1;var C1={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"},s_=$1;var Vs=new Map;Vs.set(l_.EN,s_);Vs.set(l_.RU,r_);var d_=new Map,Cf=({language:t,pack:e,fallback:i})=>{if(Vs.has(t)){let o=Vs.get(t);Vs.set(t,{...o,...e})}else Vs.set(t,e);d_.set(t,i)},Tf=t=>Vs.has(t),If=(t,e,i,o)=>{var l;let r=Vs.get(t),a=r==null?void 0:r[e];if(a_(a)){let d=(l=d_.get(t))!=null?l:o,s=d?Vs.get(d):void 0;a=s==null?void 0:s[e]}return a_(a)?e+Object.values(i!=null?i:{}).join(" "):i?a.replaceAll(/{(\w+?)}/g,(d,s)=>{var u;return(u=i[s])!=null?u:""}):a},Y=(t,e)=>{let{interfaceLanguage$:i}=ye(),o=$e(i),r=Lt();return If(o,t,e,r.defaultLanguage)};var y1=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 Cd(t,e){B(e,!1);let i=Y("video360");jo(),Xe(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,r)=>{var a=y1();b(o,a)},$$slots:{default:!0}}),H()}import"@vkontakte/videoplayer-core/es2018";var vs=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(vs||{});var bu=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()},$u=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,u_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Td=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},ia=()=>!!Td(),yu=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},xu=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},p_=t=>{let e=window.screen;return(async r=>e.orientation?e.orientation.lock(r):e.mozLockOrientation?e.mozLockOrientation(r):e.msLockOrientation?e.msLockOrientation(r):Promise.reject())(((r={width:0,height:0})=>r.width<=r.height?"portrait":"landscape")(t))};import{clientChecker as f_}from"@vkontakte/videoplayer-core/es2018";var m_=()=>({title:Y("hotkey_map_modal_title"),closeBtnText:Y("hotkey_map_modal_close_btn_text"),groups:[{title:Y("hotkey_map_group_title_common"),items:[{description:Y("hotkey_map_item_mute_description"),value:Y("hotkey_map_item_mute_value")},{description:Y("hotkey_map_item_volume_up_description"),value:Y("hotkey_map_item_volume_up_value")},{description:Y("hotkey_map_item_volume_down_description"),value:Y("hotkey_map_item_volume_down_value")},{description:Y("hotkey_map_item_pip_description"),value:Y("hotkey_map_item_pip_value")},{description:Y("hotkey_map_item_full_screen_description"),value:Y("hotkey_map_item_full_screen_value")},{description:Y("hotkey_map_item_show_context_menu_description"),value:Y("hotkey_map_item_show_context_menu_value")},{description:Y("hotkey_map_item_show_hotkey_map_description"),value:Y("hotkey_map_item_show_hotkey_map_value")}]},{title:Y("hotkey_map_group_title_playback"),items:[{description:Y("hotkey_map_item_play_toggle_description"),value:Y("hotkey_map_item_play_toggle_value")},{description:Y("hotkey_map_item_seek_backward_description"),value:Y("hotkey_map_item_seek_backward_value")},{description:Y("hotkey_map_item_seek_forward_description"),value:Y("hotkey_map_item_seek_forward_value")},{description:Y("hotkey_map_item_fast_seek_backward_description"),value:Y("hotkey_map_item_fast_seek_backward_value")},{description:Y("hotkey_map_item_fast_seek_forward_description"),value:Y("hotkey_map_item_fast_seek_forward_value")},{description:Y("hotkey_map_item_rate_down_description"),value:Y("hotkey_map_item_rate_down_value")},{description:Y("hotkey_map_item_rate_up_description"),value:Y("hotkey_map_item_rate_up_value")},{description:Y("hotkey_map_item_prev_frame_description"),value:Y("hotkey_map_item_prev_frame_value")},{description:Y("hotkey_map_item_next_frame_description"),value:Y("hotkey_map_item_next_frame_value")},{description:Y("hotkey_map_item_jump_seek_description"),value:Y("hotkey_map_item_jump_seek_value")},{description:Y("hotkey_map_item_next_video_description"),value:Y("hotkey_map_item_next_video_value")},{description:Y("hotkey_map_item_prev_video_description"),value:Y("hotkey_map_item_prev_video_value")}]},{title:Y("hotkey_map_group_title_subtitles"),items:[{description:Y("hotkey_map_item_subtitles_toggle_description"),value:Y("hotkey_map_item_subtitles_toggle_value")}]},{title:Y("hotkey_map_group_title_episodes"),items:[{description:Y("hotkey_map_item_prev_episode_description"),value:f_.device.isApple?Y("hotkey_map_item_prev_episode_mac_value"):Y("hotkey_map_item_prev_episode_pc_value")},{description:Y("hotkey_map_item_next_episode_description"),value:f_.device.isApple?Y("hotkey_map_item_next_episode_mac_value"):Y("hotkey_map_item_next_episode_pc_value")}]}]});import{devNull as v_,now as g_}from"@vkontakte/videoplayer-shared/es2018";function Ef(t,e){B(e,!1);let i=ye();kt(()=>{i.getAdmanWrapper().startPostroll()}),jo(),H()}import{noop as S1}from"@vkontakte/videoplayer-shared/es2018";var x1=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>'),w1=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 kr(t,e){B(e,!0);let i=g(e,"direction",3,"left"),o=g(e,"useBtnColor",3,!1),r=f(()=>["up","down"].includes(i())),a=f(()=>["right","down"].includes(i())),l=f(()=>`chevron-icon--${i()}`),d=f(()=>(()=>{let m="";return n(a)&&(m+="transform: rotate(180deg);"),m.length?m:void 0})()),s=f(()=>o()?ta:"currentColor"),u=f(()=>n(r)?"7":"16");Xe(t,{width:"12",get height(){return n(u)},get fill(){return n(s)},get testId(){return n(l)},get style(){return n(d)},children:(m,p)=>{var v=De(),_=ae(v);{var $=x=>{var I=x1();b(x,I)},y=x=>{var I=w1();b(x,I)};M(_,x=>{n(r)?x($):x(y,!1)})}b(m,v)},$$slots:{default:!0}}),H()}var C1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},T1=L('<div class="skip s-14"> <!></div>'),I1=L("<div><!></div>"),E1={hash:"s-14",code:".container.s-14{background:rgba(0,0,0,.56);border-radius:6px;color:#fff;font-size:13px;padding:6px 10px;position:absolute;right:16px;top:14px;transition:color .2s}.container-mobile.s-14{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-14{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-14{color:var(--white);cursor:pointer}.skippable.s-14:hover{color:hsla(0,0%,100%,.75)}"};function Pf(t,e){B(e,!0),q(t,E1);let[i,o]=Be(),r=()=>w(u,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"secondsToWatchBeforeSkip",3,0),d=g(e,"skipAd",3,S1),u=ye().ui.isMobile,m=f(()=>a()>0&&a()>=l());var p=I1();let v;p.__click=[C1,m,d];var _=C(p);{var $=x=>{var I=T1(),T=C(I),R=A(T);kr(R,{direction:"right"}),S(I),N(k=>he(T,`${k!=null?k:""} `),[()=>Y("skip_ads_now")]),b(x,I)},y=x=>{var I=ps();N(T=>he(I,T),[()=>Y("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),b(x,I)};M(_,x=>{n(m)?x($):x(y,!1)})}S(p),N(x=>v=ie(p,1,"container s-14",null,v,x),[()=>({"container-mobile":r(),skippable:n(m)})]),b(t,p),H(),o()}Je(["click"]);var P1=L('<button class="go-to-site s-16"> </button>'),A1={hash:"s-16",code:"button.go-to-site.s-16{background:#fff;border:none;border-radius:6px;bottom:14px;color:#000;font-size:15px;left:16px;padding:6px 10px;pointer-events:none;position:absolute}"};function Af(t,e){B(e,!1),q(t,A1),jo();var i=P1(),o=C(i,!0);S(i),N(r=>he(o,r),[()=>Y("visit_advertiser")],yn),b(t,i),H()}var k1=L('<div class="top-gradient-mobile s-j"></div>'),L1=L('<div class="container s-j"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),M1={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 Id(t,e){B(e,!0),q(t,M1);let[i,o]=Be(),r=()=>w(U,"$canSkipAd",i),a=()=>w(F,"$adPlaybackState",i),l=()=>w(R,"$isMobile",i),d=()=>w(j,"$adPosition",i),s=()=>w(re,"$secondsToWatchBeforeSkipAd",i),u=()=>w(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),$=g(e,"adsExternalApi",3,void 0),y=g(e,"adsJson",3,void 0),x=ye(),I=Lt(),T=x.state.isEnded$,R=x.ui.isMobile,k=I.ads.isMobileGoToSiteButton,P=K(void 0),E=K(void 0),W=!1,F=x.ads.playbackState,U=x.ads.canSkip,j=x.ads.position,re=x.ads.secondsToWatchBeforeSkip,G=f(()=>r()&&a()!=="inactive"),oe=f(()=>l()&&a()!=="inactive"&&k);kt(()=>{let Z=x.getAdmanWrapper();if(v_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[g_(),m()]}),!m()){Z.onAdmanLoadingError();return}let O=()=>{var Ee;let{width:Le,height:ze}=$e(x.ui.playerSize),te=$e(x.ui.isFullscreen),ce=(Ee=v())!=null?Ee:$e(x.ui.isAutoplay),we=I.ads.paramsOverride;return{width:Le,height:ze,isFullscreen:te,isAutoplay:ce,adsContainer:n(P),adsVideoElement:n(E),slotId:m(),params:p(),paramsOverride:we,duration:_(),externalApi:$(),json:y()}},pe=async Le=>{Le&&await co();let ze=O();await Z.initAdman(ze),W=!0},le=new AbortController,ue=()=>{le.abort()};return window.AdmanHTML?pe(!0).catch(()=>{Z.onAdmanLoadingError()}):Z.loadAdman(le.signal).then(()=>pe(!1)).catch(()=>{Z.onAdmanLoadingError()}),()=>{v_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[g_(),m()]}),!W&&ue()}});var X=L1(),Ie=C(X);{var fe=Z=>{var O=k1();b(Z,O)};M(Ie,Z=>{l()&&Z(fe)})}var ee=A(Ie,2);et(ee,Z=>D(E,Z),()=>n(E));var be=A(ee,2);{var Ce=Z=>{Pf(Z,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return x.actions.internal.skipAd}})};M(be,Z=>{n(G)&&Z(Ce)})}var de=A(be,2);{var We=Z=>{Ef(Z,{})};M(de,Z=>{u()&&Z(We)})}var ve=A(de,2);{var me=Z=>{Af(Z,{})};M(ve,Z=>{n(oe)&&Z(me)})}S(X),et(X,Z=>D(P,Z),()=>n(P)),b(t,X),H(),o()}var Xo=t=>{if(!isFinite(t))return"00:00";let e=Math.round(t),i=Math.floor(e/(60*60));e-=i*3600;let o=Math.floor(e/60);e-=o*60;let r=[o,e].map(a=>String(a).padStart(2,"0")).join(":");return i>0&&(r=`${i}:${r}`),r};var V1=ke('<path fill="#fff"></path>'),R1=ke("<path></path><!>",1);function Ed(t,e){let i=g(e,"isActive",3,!1),o=f(()=>i()?"live-active-icon":"live-icon"),r=f(()=>i()?"var(--timeline-slider-filled-active-live-bg, #FF3347)":void 0),a="M8 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2H9V6a1 1 0 0 0-1-1m7 1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0zm15-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-2h3a1 1 0 1 0 0-2h-3V7h3a1 1 0 1 0 0-2zm-8.32 9.31-2.55-7.82a1 1 0 0 1-.12-.37L19 6.1a1 1 0 1 1 2-.2l2 6.4 2-6.4a1 1 0 0 1 2 .2v.02a1 1 0 0 1-.13.37l-2.55 7.82a1 1 0 0 1-.95.69h-.74a1 1 0 0 1-.95-.69";Xe(t,{width:"42",height:"20",get testId(){return n(o)},get fill(){return n(r)},children:(l,d)=>{var s=R1(),u=ae(s),m=A(u);{var p=v=>{var _=V1();Ne(_,"d",a),b(v,_)};M(m,v=>{i()&&v(p)})}N(()=>Ne(u,"d",`M5 0h32s5 0 5 5v10s0 5 -5 5h-32s-5 0 -5 -5v-10s0 -5 5 -5${i()?"":"M5.5 2h31s3.5 0 3.5 3.5v9s0 3.5-3.5 3.5h-31s-3.5 0-3.5-3.5v-9s0-3.5 3.5-3.5"+a}z`)),b(l,s)},$$slots:{default:!0}})}var D1=L('<div class="equalizer s-c"><div class="col s-c"></div> <div class="col s-c"></div> <div class="col s-c"></div></div>'),N1=L('<div class="live-icon s-c"><!></div>'),O1=L('<span class="text s-c"> </span>'),B1=L("<div><!> <!></div>"),H1={hash:"s-c",code:".wrapper.s-c{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-c{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-c{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-c .equalizer:where(.s-c){margin-top:-2px}.equalizer.s-c .col:where(.s-c){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-c .equalizer:where(.s-c) .col:where(.s-c){animation-play-state:running}.equalizer.s-c .col:where(.s-c):first-child{animation-name:s-c-thumb-timer-equalizer-col1;left:0}.equalizer.s-c .col:where(.s-c):nth-child(2){animation-name:s-c-thumb-timer-equalizer-col2;left:3px}.equalizer.s-c .col:where(.s-c):nth-child(3){animation-name:s-c-thumb-timer-equalizer-col3;left:6px}.live-icon.s-c{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-c-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-c-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-c-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-c{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function Pd(t,e){q(t,H1);let i=g(e,"withEqualizer",3,!1),o=g(e,"isLive",3,!1),r=g(e,"isPlaying",3,!1);var a=B1();let l;var d=C(a);{var s=v=>{var _=D1();b(v,_)};M(d,v=>{i()&&v(s)})}var u=A(d,2);{var m=v=>{var _=N1(),$=C(_);Ed($,{isActive:!0}),S(_),b(v,_)},p=v=>{var _=O1(),$=C(_,!0);S(_),N(()=>he($,e.time)),b(v,_)};M(u,v=>{o()?v(m):v(p,!1)})}S(a),N(v=>l=ie(a,1,"wrapper s-c",null,l,v),[()=>({live:o(),playing:r()})]),b(t,a)}var kl=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var F1=L('<div role="timer" data-testid="thumb-timer"><!></div>'),U1={hash:"s-l",code:".thumb-timer.s-l{bottom:0;margin:8px;position:absolute;right:0;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);z-index:var(--thumb-timer-z-index)}"};function Ad(t,e){B(e,!0),q(t,U1);let[i,o]=Be(),r=()=>w(m,"$disabled",i),a=g(e,"isHidden",3,!1),l=g(e,"isLive",3,!1),d=g(e,"isPlaying",3,!1),s=Lt(),u=f(()=>Xo(e.duration-e.position)),m=se(!1);var p=F1();let v;var _=C(p);Pd(_,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(p),Ls(p,()=>kl(a()&&s.features.usePerformanceFix,m,s.disableInvisibleComponentsTimeout)),N($=>v=ie(p,1,"thumb-timer s-l",null,v,$),[()=>({"out-of-flow":r(),hidden:a()})]),b(t,p),H(),o()}var Ll=t=>{if(!navigator.clipboard){h_(t);return}navigator.clipboard.writeText(t).catch(()=>h_(t))};function h_(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 J1,clientChecker as e0}from"@vkontakte/videoplayer-core/es2018";import{clientChecker as __}from"@vkontakte/videoplayer-core/es2018";var kf="focus-hidden";var Lr=t=>{t.stopPropagation(),t.preventDefault()},Lf=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(kf)},W1=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},K1=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},Q1=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},q1=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},b_=t=>t.code==="Escape",G1=t=>t.code==="ArrowLeft",kd=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},$_=t=>{Q1(t)?(Lr(t),K1(t.target)):q1(t)&&(Lr(t),W1(t.target))},ra=t=>!__.device.isAndroid&&(t==null?void 0:t.detail)===0||__.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Ml=async(t,e,i)=>{await co(),t&&!t.classList.contains("opened")&&!e&&$e(i)&&(await co(),i.set(!1),t.focus())},y_=async(t,e,i)=>{await co(),t&&!e&&$e(i)&&(i.set(!1),t.focus())},Ld=async(t,e,i,o=!1)=>{if(await co(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(kf,!i),a==null||a.focus()}},x_=async(t,e)=>{setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)},wu=(t,e)=>{$_(t),Lf(t.target),b_(t)&&(Lr(t),e())},Su=async(t,e)=>{kd(t,["ArrowRight"])&&(Lr(t),e())},w_=async(t,e,i)=>{if($_(t),G1(t)){Lr(t),e();return}b_(t)&&(Lr(t),i())},Vl=(t,e)=>{kd(t)&&(Lr(t),e())},S_=(t,e,i)=>{if(kd(t))Lr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Lr(t);return}o==="ArrowRight"&&!e&&(i(!0),Lr(t))}},C_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},T_=t=>{if(!t)return{top:0,left:0};let e=t.getBoundingClientRect(),i=-58,o=8,r=e.left+o;return{bottom:e.bottom+i,left:r}};import{isNullable as Cu,isValidURL as t0}from"@vkontakte/videoplayer-shared/es2018";var Xr={"copy-link":100,"copy-link-timestamp":200,"copy-embed-code":300,pip:400,"video-loop":500,rotate:600,report:700,"save-debug":800,"save-trace":900,"debug-info":1e3};import{noop as I_}from"@vkontakte/videoplayer-shared/es2018";var j1=(t,e)=>{Vl(t,()=>e())},X1=L('<li class="item s-1s" role="menuitem" tabindex="0"> </li>'),Z1={hash:"s-1s",code:".item.s-1s{color:hsla(0,0%,100%,.72);cursor:pointer;display:block;font-size:13px;letter-spacing:-.14px;line-height:18px;padding:8px 16px;position:relative;white-space:nowrap}.item.s-1s:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function Mf(t,e){B(e,!0),q(t,Z1);let i=g(e,"onClick",3,I_),o=g(e,"closeContextMenu",3,I_),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=X1();a.__click=r,a.__keydown=[j1,r];var l=C(a,!0);S(a),N(()=>{var d;Ne(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Ne(a,"data-testid",e.id),he(l,e.label)}),b(t,a),H()}Je(["click","keydown"]);var Ra=(t,e)=>t.weight-e.weight;var Md=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Md||{});var i0=(t,e)=>{wu(t,e)},o0=t=>{t.preventDefault()},n0=L('<ul role="menu" data-testid="context-menu" class="s-1a"></ul>'),r0={hash:"s-1a",code:"ul.s-1a{background:rgba(0,0,0,.72);border-radius:8px;list-style:none;margin:0;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;padding:6px 0;position:absolute;transition:visibility .1s,opacity .1s;z-index:var(--context-menu-z-index)}"};function Vf(t,e){B(e,!0),q(t,r0);let[i,o]=Be(),r=()=>w(Ie,"$playerPhase",i),a=()=>w(re,"$isLive$",i),l=()=>w(fe,"$isPiPEnabled$",i),d=()=>w(j,"$chromecastState$",i),s=()=>w(ee,"$pictureInPictureApiIsActive$",i),u=()=>w(X,"$isLooped$",i),m=()=>w(G,"$positionExact$",i),p=()=>w(W,"$additionalContextMenuItems$",i),v=g(e,"visible",3,!1),_=g(e,"position",19,()=>({top:0,left:0})),$=g(e,"playerContainerRef",3,void 0),y=g(e,"menuElementRef",15,void 0),x=K(0),I=K(0),T=ye(),{pictureInPicture$:R}=mo(),k=Lt(),P=T.ui.contextMenu.visible$,E=T.ui.debugPanelVisible,W=T.ui.additionalContextMenuItems$,F=T.ui.t,U=T.actions.internal.togglePictureInPicture,j=T.state.chromecastState$,re=T.state.isLive$,G=T.state.positionExact$,oe=T.state.isInteractive,X=T.state.looped$,Ie=T.playerPhase,{isEnabled$:fe,isActive$:ee}=R,be=f(()=>r()==="video"),Ce=f(()=>!!a()&&n(be)),de=f(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),We=f(()=>{var ge;return k.features.copyVideoLink&&((ge=T.callbacks)==null?void 0:ge.onCopyVideoLink)}),ve=f(()=>n(We)&&!n(de)&&!oe&&!n(Ce)),me=f(()=>{var ge;return!!((ge=T.callbacks)!=null&&ge.onCopyEmbedCodeClicked)}),Z=f(()=>l()&&d()!==J1.CONNECTED&&!oe&&n(be)&&!e0.browser.isFirefox),O=f(()=>!oe&&!n(de)&&!n(Ce)),pe=f(()=>k.features.videoRotate&&!oe&&!n(de)),le=f(()=>k.showSupport&&!s()),ue=f(()=>k.features.saveTraceInfoToFile),Le=()=>{var ge;P.set(!1),(ge=e.returnFocus)==null||ge.call(e)},ze=(ge,Oe)=>{if(!y()||!$())return;let Ge=y().getBoundingClientRect(),at=$().getBoundingClientRect();D(x,ge-at.left),D(I,Oe-at.top),n(x)+Ge.width>at.width&&D(x,at.width-Ge.width),n(I)+Ge.height>at.height&&D(I,at.height-Ge.height),D(x,Math.max(n(x),0),!0),D(I,Math.max(n(I),0),!0)};He(()=>{(async()=>{if(y()&&$()){await co();let{top:Oe,left:Ge,bottom:at,right:Kt}=_(),Et=Ge!=null?Ge:0,si=Oe!=null?Oe:0,li=y().getBoundingClientRect();Cu(Ge)&&!Cu(Kt)&&(Et=Kt-li.width),Cu(Oe)&&!Cu(at)&&(si=at-li.height),Et=Math.max(Et,0),si=Math.max(si,0),ze(Et,si)}})()});let te=()=>{T.actions.internal.videoRotate()},ce=()=>{t0(e.supportLink)&&window.open(e.supportLink,"_blank"),T.actions.internal.reportProblem(),T.actions.internal.pause()},we=()=>{let ge=T.actions.internal.getDebugTextData();if(k.features.saveDebugInfoToFile){let Oe=new Blob([...ge],{type:"plain/text"}),Ge=window.URL.createObjectURL(Oe);Ma(Ge,"vk_player_debug_info","txt")}else Ll(T.actions.internal.getDebugTextData())},Ee=()=>{let ge=T.actions.internal.getTraceTextData(),Oe=new Blob([...ge],{type:"application/json"}),Ge=window.URL.createObjectURL(Oe);Ma(Ge,"vk_player_trace_info","json")},Ye=()=>{E.set(!0)},Ae=async()=>{var ge;try{U()}finally{(ge=e.returnFocus)==null||ge.call(e)}},Te=()=>{T.actions.internal.setLooped(!u())},Fe=()=>{var ge,Oe;if(n(me)){let Ge=(Oe=(ge=T.callbacks)==null?void 0:ge.onCopyEmbedCodeClicked)==null?void 0:Oe.call(ge);Ge&&Ll(Ge)}},gt=(ge=!1)=>{var Oe,Ge;if((Oe=T.callbacks)!=null&&Oe.onCopyVideoLink){let at=(Ge=T.callbacks)==null?void 0:Ge.onCopyVideoLink(ge,m());at&&Ll(at)}},Mt=f(()=>k.features.saveDebugInfoToFile?F("menu_save_debug"):F("menu_copy_debug")),Ct=f(()=>n(We)?{id:"copy-link",weight:Xr["copy-link"],label:F("menu_copy_video_link"),onClick:()=>gt()}:void 0),dt=f(()=>n(ve)?{id:"copy-link-timestamp",weight:Xr["copy-link-timestamp"],label:F("menu_copy_video_link_with_timestamp"),onClick:()=>gt(!0)}:void 0),St=f(()=>n(me)?{id:"copy-embed-code",weight:Xr["copy-embed-code"],label:F("menu_copy_embed_code"),onClick:Fe}:void 0),qt=f(()=>n(Z)?{id:"pip",weight:Xr.pip,label:s()?F("menu_pip_close"):F("menu_pip"),onClick:Ae}:void 0),Ot=f(()=>n(O)?{id:"video-loop",weight:Xr["video-loop"],label:u()?F("menu_video_loop_off"):F("menu_video_loop_on"),ariaLabel:F("aria_label_menu_loop"),onClick:Te}:void 0),Rt=f(()=>n(pe)?{id:"rotate",weight:Xr.rotate,label:F("menu_video_rotate"),ariaLabel:F("aria_label_menu_rotate"),onClick:te}:void 0),Ut=f(()=>n(le)?{id:"report",weight:Xr.report,label:F("menu_report"),ariaLabel:`${F("menu_report")}. ${F("aria_label_new_tab_alert")}`,onClick:ce}:void 0),Q=f(()=>({id:"save-debug",weight:Xr["save-debug"],label:n(Mt),onClick:we})),Me=f(()=>n(ue)?{id:"save-trace",weight:Xr["save-trace"],label:F("menu_save_debug"),onClick:Ee}:void 0),Ve=f(()=>({id:"debug-info",weight:Xr["debug-info"],label:F("menu_debug_overlay"),ariaLabel:F("aria_label_menu_debug_overlay"),onClick:Ye})),xe=f(()=>[n(Ct),n(dt),n(St),n(qt),n(Ot),n(Rt),n(Ut),n(Q),n(Me),n(Ve),...p()].filter(ge=>!!ge).sort(Ra));var Ue=De(),Se=ae(Ue);{var wt=ge=>{var Oe=n0();Oe.__contextmenu=[o0],Oe.__keydown=[i0,Le],bi(Oe,21,()=>n(xe),Ge=>Ge.id,(Ge,at)=>{Mf(Ge,{get id(){return n(at).id},get label(){return n(at).label},get ariaLabel(){return n(at).ariaLabel},get onClick(){return n(at).onClick},closeContextMenu:Le})}),S(Oe),et(Oe,Ge=>y(Ge),()=>y()),N(()=>{var Ge,at;return Ke(Oe,`top: ${(Ge=n(I))!=null?Ge:""}px; left: ${(at=n(x))!=null?at:""}px;`)}),b(ge,Oe)};M(Se,ge=>{v()&&ge(wt)})}b(t,Ue),H(),o()}Je(["contextmenu","keydown"]);var Tu=class{constructor(e){this.value=e,this.next=null}};var Rl=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Tu(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 s0=L('<div class="container s-15"><canvas class="s-15"></canvas></div>'),a0={hash:"s-15",code:".container.s-15{display:inline-block;height:16px;width:120px}canvas.s-15{margin-top:2px;transform:scaleY(-1)}"};function Vd(t,e){B(e,!0),q(t,a0);let i=g(e,"values",19,()=>[]),o=K(void 0),r=K(null),a=16,l=120,d=60,s=l/d;kt(()=>{n(o).width=l,n(o).height=a,D(r,n(o).getContext("2d"),!0)});function u(v,_,$,y,x){x===0&&(x=1),v.fillStyle="#fff",v.fillRect(_,$,y,x)}He(()=>{let v="";if(n(r)){let _=i()[0];for(let y=1;y<i().length;y++)i()[y]>_&&(_=i()[y]);n(r).clearRect(0,0,l,a);let $=d-1;for(let y=i().length-1;y>=0;y--){let x=$*s,I=_>0?a*(i()[y]/_):0;u(n(r),x,0,s,I),v=I+" "+v,$--}}});var m=s0(),p=C(m);et(p,v=>D(o,v),()=>n(o)),S(m),b(t,m),H()}import{safeStorage as E_}from"@vkontakte/videoplayer-shared/es2018";var l0=(t,e)=>{t.stopPropagation(),E_.remove($d),e.set(!1)},d0=L('<div class="s-i"><div class="s-i">Video id</div> <span> </span></div>'),c0=L('<div class="s-i"><div class="s-i">VSID</div> <span> </span></div>'),u0=L('<div class="s-i"><div class="s-i">Provider</div> <span> </span></div>'),p0=L('<div class="s-i"><div class="s-i">Streams</div> <span> </span></div>'),f0=L('<div class="s-i"><div class="s-i">Viewport</div> <span> </span></div>'),m0=L('<div class="s-i"><div class="s-i">Video size</div> <span> </span></div>'),v0=L('<div class="s-i"><div class="s-i">CDN host</div> <span> </span></div>'),g0=L('<div class="s-i"><div class="s-i">Volume</div> <span> </span></div>'),h0=L('<div class="s-i"><div class="s-i">Position</div> <span> </span></div>'),_0=L('<div class="s-i"><div class="s-i">Buffer</div> <span> </span></div>'),b0=L('<div class="s-i"><div class="s-i">Nbuffer</div> <span> </span></div>'),$0=L('<div class="s-i"><div class="s-i">Live latency</div> <span> </span></div>'),y0=L('<div class="s-i"><div class="s-i">Segment</div> <span> </span></div>'),x0=L('<div class="s-i"><div class="s-i">Network</div> <!> <span> </span></div>'),w0=L('<div class="s-i"><div class="s-i">V bitrate</div> <!> <span> </span></div>'),S0=L('<div role="region"><button class="close s-i" title="закрыть">[x]</button> <div class="content s-i"><div class="s-i"><div class="s-i">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-i"><div class="s-i">Dropped</div> <span> </span></div> <!> <!> <div class="s-i"><div class="s-i">FPS</div> <!> <span> </span></div></div></div>'),C0={hash:"s-i",code:".container.s-i{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-i{left:16px;top:16px}button.close.s-i{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-i{padding:5px}.content.s-i>div:where(.s-i)>div:where(.s-i){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Rd(t,e){B(e,!0),q(t,C0);let[i,o]=Be(),r=()=>w(d,"$isMobile",i),a=ye(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=K(ri(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),m=K(0),p=K(0),v=K(0),_=new Rl(60),$=new Rl(60),y=new Rl(60),x=K(ri([])),I=K(ri([])),T=K(ri([])),R=Y("aria_label_debug_panel");kt(()=>{E_.set($d,"true"),a.actions.internal.startLogging(),u&&(D(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),D(m,u.getVideoPlaybackQuality().totalVideoFrames,!0));let Q=window.setInterval(()=>{D(s,a.actions.internal.getDebugPanelData(),!0)},500),Me;return u&&(Me=window.setInterval(()=>{if(u){D(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let Ve=u.getVideoPlaybackQuality().totalVideoFrames;D(v,Ve-n(m)),D(m,Ve,!0),_.push(n(v)),n(s).speed&&$.push(n(s).speed),n(s).bitrate&&y.push(n(s).bitrate),D(x,_.getValuesFromBottom(),!0),D(I,$.getValuesFromBottom(),!0),D(T,y.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(Q),Me&&clearInterval(Me)}});var k=S0();let P;var E=C(k);E.__click=[l0,l];var W=A(E,2),F=C(W),U=A(C(F),2),j=C(U,!0);S(U),S(F);var re=A(F,2);{var G=Q=>{var Me=d0(),Ve=A(C(Me),2),xe=C(Ve,!0);S(Ve),S(Me),N(()=>he(xe,n(s).id)),b(Q,Me)};M(re,Q=>{n(s).id&&Q(G)})}var oe=A(re,2);{var X=Q=>{var Me=c0(),Ve=A(C(Me),2),xe=C(Ve,!0);S(Ve),S(Me),N(()=>he(xe,n(s).vsid)),b(Q,Me)};M(oe,Q=>{n(s).vsid&&Q(X)})}var Ie=A(oe,2);{var fe=Q=>{var Me=u0(),Ve=A(C(Me),2),xe=C(Ve,!0);S(Ve),S(Me),N(()=>he(xe,n(s).provider)),b(Q,Me)};M(Ie,Q=>{n(s).provider&&Q(fe)})}var ee=A(Ie,2);{var be=Q=>{var Me=p0(),Ve=A(C(Me),2),xe=C(Ve);S(Ve),S(Me),N(()=>{var Ue,Se;return he(xe,`Video: ${(Ue=n(s).videoCodec||"")!=null?Ue:""} ${n(s).hdr?"(HDR)":""}
54
+ Try switching the quality to Auto.`,double_forward_label:"2x",preview_track_notification_text:"pull up to open precise rewind",preview_track_close_tooltip:"dismiss precise rewind"},u_=C1;var Ds=new Map;Ds.set(f_.EN,u_);Ds.set(f_.RU,c_);var m_=new Map,Pf=({language:t,pack:e,fallback:i})=>{if(Ds.has(t)){let o=Ds.get(t);Ds.set(t,{...o,...e})}else Ds.set(t,e);m_.set(t,i)},Af=t=>Ds.has(t),kf=(t,e,i,o)=>{var l;let r=Ds.get(t),a=r==null?void 0:r[e];if(p_(a)){let d=(l=m_.get(t))!=null?l:o,s=d?Ds.get(d):void 0;a=s==null?void 0:s[e]}return p_(a)?e+Object.values(i!=null?i:{}).join(" "):i?a.replaceAll(/{(\w+?)}/g,(d,s)=>{var u;return(u=i[s])!=null?u:""}):a},q=(t,e)=>{let{interfaceLanguage$:i}=xe(),o=_e(i),r=At();return kf(o,t,e,r.defaultLanguage)};var T1=Ae('<path d="M26.86 15.18a3.7 3.7 0 0 0 2.53-3.6C29.4 8.91 27.2 7 24.07 7c-1.96 0-3.57.78-4.67 2.29l-.1.15a1.33 1.33 0 0 0 .26 1.85c.54.4 1.3.35 1.74-.16l.2-.25a3 3 0 0 1 2.5-1.3c1.53 0 2.6.91 2.6 2.25 0 1.36-1.09 2.27-2.65 2.27h-.58a1.23 1.23 0 0 0 0 2.47h.58c1.75 0 2.91.98 2.91 2.39 0 1.45-1.19 2.46-2.88 2.46a3.2 3.2 0 0 1-2.89-1.6l-.2-.29a1.4 1.4 0 0 0-2.05-.25 1.3 1.3 0 0 0-.3 1.68l.21.33A6 6 0 0 0 24 24c3.28 0 5.63-2.04 5.63-4.92a4 4 0 0 0-2.77-3.9M37.73 12.68c-.46 0-1 .04-1.5.16L38.8 9.1a1.34 1.34 0 1 0-2.2-1.52l-3.76 5.47C31.43 15.18 31 16.87 31 18.33 31 21.8 33.56 24 37.19 24c3.6 0 6.16-2.4 6.16-5.77a5.4 5.4 0 0 0-5.63-5.56m-.53 8.74c-1.98 0-3.33-1.27-3.33-3.14 0-1.85 1.35-3.14 3.33-3.14 1.95 0 3.3 1.29 3.3 3.14 0 1.87-1.35 3.14-3.3 3.14m20.8-5.9c0 5.03-2.7 8.43-6.63 8.43s-6.62-3.4-6.62-8.44 2.7-8.44 6.62-8.44S58 10.47 58 15.51m-10.35 0c0 3.56 1.49 5.85 3.72 5.85s3.72-2.3 3.72-5.86-1.48-5.86-3.72-5.86c-2.23 0-3.72 2.3-3.72 5.86M67 9.49A3.5 3.5 0 0 1 63.51 13 3.5 3.5 0 0 1 60 9.49 3.5 3.5 0 0 1 63.51 6 3.5 3.5 0 0 1 67 9.49m-5 0c0 .83.68 1.51 1.51 1.51.81 0 1.5-.68 1.5-1.51 0-.81-.69-1.5-1.5-1.5-.83 0-1.51.69-1.51 1.5ZM67 23.5c0-1.32-1.2-3.1-4.2-4.67a1.5 1.5 0 1 1 1.4-2.66c3.25 1.72 5.8 4.26 5.8 7.33 0 3.13-2.56 5.55-6.09 7.27-3.63 1.77-8.82 3.06-15.26 3.72a1.5 1.5 0 0 1-.3-2.98c6.25-.64 11.05-1.88 14.25-3.44 3.3-1.6 4.4-3.27 4.4-4.57M38.88 35H38c-9.64 0-17.45-1.13-22.9-3.02-2.72-.94-4.94-2.1-6.5-3.47C7.01 27.14 6 25.44 6 23.5a6.2 6.2 0 0 1 1.9-4.25 16 16 0 0 1 4.43-3.1 1.5 1.5 0 1 1 1.34 2.7q-2.39 1.19-3.59 2.46C9.3 22.14 9 22.87 9 23.5c0 .8.4 1.74 1.57 2.76s3 2.01 5.51 2.89C21.11 30.89 28.55 32 38 32h.88l-1.44-1.44a1.5 1.5 0 0 1 2.12-2.12l4 4h.01a1.5 1.5 0 0 1 .32 1.63 2 2 0 0 1-.33.5l-4 4a1.5 1.5 0 0 1-2.12-2.13z"></path>');function Ld(t,e){B(e,!1);let i=q("video360");Wo(),Ye(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,r)=>{var a=T1();b(o,a)},$$slots:{default:!0}}),H()}import"@vkontakte/videoplayer-core/es2018";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 wu=t=>{if(t.requestFullscreen)return t.requestFullscreen();if(t.msRequestFullscreen)return t.msRequestFullscreen();if(t.webkitRequestFullscreen)return t.webkitRequestFullscreen();if(t.mozRequestFullScreen)return t.mozRequestFullScreen();let e=t.querySelector("video");return e!=null&&e.webkitEnterFullscreen?(e.webkitEnterFullscreen(),Promise.resolve()):Promise.reject()},Su=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),v_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,g_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Md=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},sa=()=>!!Md(),Cu=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},Tu=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},h_=t=>{let e=window.screen;return(async r=>e.orientation?e.orientation.lock(r):e.mozLockOrientation?e.mozLockOrientation(r):e.msLockOrientation?e.msLockOrientation(r):Promise.reject())(((r={width:0,height:0})=>r.width<=r.height?"portrait":"landscape")(t))};import{clientChecker as __}from"@vkontakte/videoplayer-core/es2018";var b_=()=>({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:__.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:__.device.isApple?q("hotkey_map_item_next_episode_mac_value"):q("hotkey_map_item_next_episode_pc_value")}]}]});import{devNull as $_,now as y_}from"@vkontakte/videoplayer-shared/es2018";function Lf(t,e){B(e,!1);let i=xe();Pt(()=>{i.getAdmanWrapper().startPostroll()}),Wo(),H()}import{noop as P1}from"@vkontakte/videoplayer-shared/es2018";var I1=Ae('<path d="M11.74 6.74a.9.9 0 0 1-1.28 0L6 2.27 1.54 6.74A.9.9 0 1 1 .26 5.46l5.1-5.1a.9.9 0 0 1 1.28 0l5.1 5.1a.9.9 0 0 1 0 1.28Z"></path>'),E1=Ae('<path d="m5.773 8 3.363 3.364a.9.9 0 1 1-1.272 1.272l-4-4a.9.9 0 0 1 0-1.272l4-4a.9.9 0 0 1 1.272 1.272L5.773 8z"></path>');function Vr(t,e){B(e,!0);let i=g(e,"direction",3,"left"),o=g(e,"useBtnColor",3,!1),r=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})()),s=m(()=>o()?ra:"currentColor"),u=m(()=>n(r)?"7":"16");Ye(t,{width:"12",get height(){return n(u)},get fill(){return n(s)},get testId(){return n(l)},get style(){return n(d)},children:(f,p)=>{var v=Ve(),_=le(v);{var y=x=>{var I=I1();b(x,I)},$=x=>{var I=E1();b(x,I)};M(_,x=>{n(r)?x(y):x($,!1)})}b(f,v)},$$slots:{default:!0}}),H()}var A1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},k1=L('<div class="skip s-14"> <!></div>'),L1=L("<div><!></div>"),M1={hash:"s-14",code:".container.s-14{background:rgba(0,0,0,.56);border-radius:6px;color:#fff;font-size:13px;padding:6px 10px;position:absolute;right:16px;top:14px;transition:color .2s}.container-mobile.s-14{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-14{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-14{color:var(--white);cursor:pointer}.skippable.s-14:hover{color:hsla(0,0%,100%,.75)}"};function Mf(t,e){B(e,!0),Q(t,M1);let[i,o]=Be(),r=()=>w(u,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"secondsToWatchBeforeSkip",3,0),d=g(e,"skipAd",3,P1),u=xe().ui.isMobile,f=m(()=>a()>0&&a()>=l());var p=L1();let v;p.__click=[A1,f,d];var _=C(p);{var y=x=>{var I=k1(),T=C(I),R=A(T);Vr(R,{direction:"right"}),S(I),N(k=>he(T,`${k!=null?k:""} `),[()=>q("skip_ads_now")]),b(x,I)},$=x=>{var I=gs();N(T=>he(I,T),[()=>q("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),b(x,I)};M(_,x=>{n(f)?x(y):x($,!1)})}S(p),N(x=>v=te(p,1,"container s-14",null,v,x),[()=>({"container-mobile":r(),skippable:n(f)})]),b(t,p),H(),o()}Xe(["click"]);var V1=L('<button class="go-to-site s-17"> </button>'),R1={hash:"s-17",code:"button.go-to-site.s-17{background:#fff;border:none;border-radius:6px;bottom:14px;color:#000;font-size:15px;left:16px;padding:6px 10px;pointer-events:none;position:absolute}"};function Vf(t,e){B(e,!1),Q(t,R1),Wo();var i=V1(),o=C(i,!0);S(i),N(r=>he(o,r),[()=>q("visit_advertiser")],mr),b(t,i),H()}var D1=L('<div class="top-gradient-mobile s-r"></div>'),N1=L('<div class="container s-r"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),O1={hash:"s-r",code:".container.s-r{height:100%;width:100%}.top-gradient-mobile.s-r{background:linear-gradient(1turn,transparent,rgba(0,0,0,.05) 12%,rgba(0,0,0,.15) 25%,rgba(0,0,0,.3) 45%,rgba(0,0,0,.4) 57%,rgba(0,0,0,.5) 77%,rgba(0,0,0,.55) 88%,rgba(0,0,0,.65));height:80px;left:0;pointer-events:none;position:absolute;top:0;width:100%}"};function Vd(t,e){B(e,!0),Q(t,O1);let[i,o]=Be(),r=()=>w(z,"$canSkipAd",i),a=()=>w(U,"$adPlaybackState",i),l=()=>w(R,"$isMobile",i),d=()=>w(Y,"$adPosition",i),s=()=>w(ie,"$secondsToWatchBeforeSkipAd",i),u=()=>w(T,"$isVideoEnded",i),f=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),$=g(e,"adsJson",3,void 0),x=xe(),I=At(),T=x.state.isEnded$,R=x.ui.isMobile,k=I.ads.isMobileGoToSiteButton,P=K(void 0),E=K(void 0),W=!1,U=x.ads.playbackState,z=x.ads.canSkip,Y=x.ads.position,ie=x.ads.secondsToWatchBeforeSkip,J=m(()=>r()&&a()!=="inactive"),oe=m(()=>l()&&a()!=="inactive"&&k);Pt(()=>{let X=x.getAdmanWrapper();if($_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[y_(),f()]}),!f()){X.onAdmanLoadingError();return}let O=()=>{var Le;let{width:Ze,height:ke}=_e(x.ui.playerSize),j=_e(x.ui.isFullscreen),ne=(Le=v())!=null?Le:_e(x.ui.isAutoplay),Se=I.ads.paramsOverride;return{width:Ze,height:ke,isFullscreen:j,isAutoplay:ne,adsContainer:n(P),adsVideoElement:n(E),slotId:f(),params:p(),paramsOverride:Se,duration:_(),externalApi:y(),json:$()}},me=async Ze=>{Ze&&await uo();let ke=O();await X.initAdman(ke),W=!0},ue=new AbortController,Re=()=>{ue.abort()};return window.AdmanHTML?me(!0).catch(()=>{X.onAdmanLoadingError()}):X.loadAdman(ue.signal).then(()=>me(!1)).catch(()=>{X.onAdmanLoadingError()}),()=>{$_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[y_(),f()]}),!W&&Re()}});var de=N1(),ae=C(de);{var pe=X=>{var O=D1();b(X,O)};M(ae,X=>{l()&&X(pe)})}var ee=A(ae,2);tt(ee,X=>D(E,X),()=>n(E));var $e=A(ee,2);{var Ee=X=>{Mf(X,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return x.actions.internal.skipAd}})};M($e,X=>{n(J)&&X(Ee)})}var ce=A($e,2);{var Qe=X=>{Lf(X,{})};M(ce,X=>{u()&&X(Qe)})}var fe=A(ce,2);{var ve=X=>{Vf(X,{})};M(fe,X=>{n(oe)&&X(ve)})}S(de),tt(de,X=>D(P,X),()=>n(P)),b(t,de),H(),o()}var Ko=t=>{if(!isFinite(t))return"00:00";let e=Math.round(t),i=Math.floor(e/(60*60));e-=i*3600;let o=Math.floor(e/60);e-=o*60;let r=[o,e].map(a=>String(a).padStart(2,"0")).join(":");return i>0&&(r=`${i}:${r}`),r};var B1=Ae('<path fill="#fff"></path>'),H1=Ae("<path></path><!>",1);function Rd(t,e){let i=g(e,"isActive",3,!1),o=m(()=>i()?"live-active-icon":"live-icon"),r=m(()=>i()?"var(--timeline-slider-filled-active-live-bg, #FF3347)":void 0),a="M8 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2H9V6a1 1 0 0 0-1-1m7 1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0zm15-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-2h3a1 1 0 1 0 0-2h-3V7h3a1 1 0 1 0 0-2zm-8.32 9.31-2.55-7.82a1 1 0 0 1-.12-.37L19 6.1a1 1 0 1 1 2-.2l2 6.4 2-6.4a1 1 0 0 1 2 .2v.02a1 1 0 0 1-.13.37l-2.55 7.82a1 1 0 0 1-.95.69h-.74a1 1 0 0 1-.95-.69";Ye(t,{width:"42",height:"20",get testId(){return n(o)},get fill(){return n(r)},children:(l,d)=>{var s=H1(),u=le(s),f=A(u);{var p=v=>{var _=B1();De(_,"d",a),b(v,_)};M(f,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,s)},$$slots:{default:!0}})}var F1=L('<div class="equalizer s-b"><div class="col s-b"></div> <div class="col s-b"></div> <div class="col s-b"></div></div>'),U1=L('<div class="live-icon s-b"><!></div>'),z1=L('<span class="text s-b"> </span>'),W1=L("<div><!> <!></div>"),K1={hash:"s-b",code:".wrapper.s-b{background-color:var(--black-alpha-40);border-radius:4px;padding:2px 6px;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);white-space:nowrap}.wrapper.live.s-b{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-b{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-b .equalizer:where(.s-b){margin-top:-2px}.equalizer.s-b .col:where(.s-b){animation:1.5s linear infinite alternate;animation-play-state:paused;background:var(--btn-color,--white);bottom:0;height:10px;margin-right:2px;position:absolute;transform-origin:50% 100%;width:2px}.playing.s-b .equalizer:where(.s-b) .col:where(.s-b){animation-play-state:running}.equalizer.s-b .col:where(.s-b):first-child{animation-name:s-b-thumb-timer-equalizer-col1;left:0}.equalizer.s-b .col:where(.s-b):nth-child(2){animation-name:s-b-thumb-timer-equalizer-col2;left:3px}.equalizer.s-b .col:where(.s-b):nth-child(3){animation-name:s-b-thumb-timer-equalizer-col3;left:6px}.live-icon.s-b{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-b-thumb-timer-equalizer-col1{0%{transform:scaleY(.1)}25%{transform:scaleY(.8)}50%{transform:scaleY(.4)}75%{transform:scaleY(.6)}to{transform:scaleY(.1)}}@keyframes s-b-thumb-timer-equalizer-col2{0%{transform:scaleY(1)}25%{transform:scaleY(.3)}50%{transform:scaleY(.9)}75%{transform:scaleY(.6)}to{transform:scaleY(1)}}@keyframes s-b-thumb-timer-equalizer-col3{0%{transform:scaleY(.6)}25%{transform:scaleY(.9)}50%{transform:scaleY(.1)}75%{transform:scaleY(.9)}to{transform:scaleY(.6)}}.text.s-b{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function Dd(t,e){Q(t,K1);let i=g(e,"withEqualizer",3,!1),o=g(e,"isLive",3,!1),r=g(e,"isPlaying",3,!1);var a=W1();let l;var d=C(a);{var s=v=>{var _=F1();b(v,_)};M(d,v=>{i()&&v(s)})}var u=A(d,2);{var f=v=>{var _=U1(),y=C(_);Rd(y,{isActive:!0}),S(_),b(v,_)},p=v=>{var _=z1(),y=C(_,!0);S(_),N(()=>he(y,e.time)),b(v,_)};M(u,v=>{o()?v(f):v(p,!1)})}S(a),N(v=>l=te(a,1,"wrapper s-b",null,l,v),[()=>({live:o(),playing:r()})]),b(t,a)}var Ml=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var Q1=L('<div role="timer" data-testid="thumb-timer"><!></div>'),q1={hash:"s-q",code:".thumb-timer.s-q{bottom:0;margin:8px;position:absolute;right:0;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);z-index:var(--thumb-timer-z-index)}"};function Nd(t,e){B(e,!0),Q(t,q1);let[i,o]=Be(),r=()=>w(f,"$disabled",i),a=g(e,"isHidden",3,!1),l=g(e,"isLive",3,!1),d=g(e,"isPlaying",3,!1),s=At(),u=m(()=>Ko(e.duration-e.position)),f=se(!1);var p=Q1();let v;var _=C(p);Dd(_,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(p),Vs(p,()=>Ml(a()&&s.features.usePerformanceFix,f,s.disableInvisibleComponentsTimeout)),N(y=>v=te(p,1,"thumb-timer s-q",null,v,y),[()=>({"out-of-flow":r(),hidden:a()})]),b(t,p),H(),o()}var Vl=t=>{if(!navigator.clipboard){x_(t);return}navigator.clipboard.writeText(t).catch(()=>x_(t))};function x_(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 n0,clientChecker as r0}from"@vkontakte/videoplayer-core/es2018";import{clientChecker as w_}from"@vkontakte/videoplayer-core/es2018";var Rf="focus-hidden";var Rr=t=>{t.stopPropagation(),t.preventDefault()},Df=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Rf)},Y1=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},j1=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},X1=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},Z1=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},S_=t=>t.code==="Escape",J1=t=>t.code==="ArrowLeft",Od=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},C_=t=>{X1(t)?(Rr(t),j1(t.target)):Z1(t)&&(Rr(t),Y1(t.target))},da=t=>!w_.device.isAndroid&&(t==null?void 0:t.detail)===0||w_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Rl=async(t,e,i)=>{await uo(),t&&!t.classList.contains("opened")&&!e&&_e(i)&&(await uo(),i.set(!1),t.focus())},T_=async(t,e,i)=>{await uo(),t&&!e&&_e(i)&&(i.set(!1),t.focus())},Bd=async(t,e,i,o=!1)=>{if(await uo(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Rf,!i),a==null||a.focus()}},I_=async(t,e)=>{setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)},Iu=(t,e)=>{C_(t),Df(t.target),S_(t)&&(Rr(t),e())},Eu=async(t,e)=>{Od(t,["ArrowRight"])&&(Rr(t),e())},E_=async(t,e,i)=>{if(C_(t),J1(t)){Rr(t),e();return}S_(t)&&(Rr(t),i())},Dl=(t,e)=>{Od(t)&&(Rr(t),e())},P_=(t,e,i)=>{if(Od(t))Rr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Rr(t);return}o==="ArrowRight"&&!e&&(i(!0),Rr(t))}},A_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},k_=t=>{if(!t)return{top:0,left:0};let e=t.getBoundingClientRect(),i=-58,o=8,r=e.left+o;return{bottom:e.bottom+i,left:r}};import{isNullable as Pu,isValidURL as s0}from"@vkontakte/videoplayer-shared/es2018";var ts={"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 L_}from"@vkontakte/videoplayer-shared/es2018";var t0=(t,e)=>{Dl(t,()=>e())},i0=L('<li class="item s-1s" role="menuitem" tabindex="0"> </li>'),o0={hash:"s-1s",code:".item.s-1s{color:hsla(0,0%,100%,.72);cursor:pointer;display:block;font-size:13px;letter-spacing:-.14px;line-height:18px;padding:8px 16px;position:relative;white-space:nowrap}.item.s-1s:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function Nf(t,e){B(e,!0),Q(t,o0);let i=g(e,"onClick",3,L_),o=g(e,"closeContextMenu",3,L_),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=i0();a.__click=r,a.__keydown=[t0,r];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),he(l,e.label)}),b(t,a),H()}Xe(["click","keydown"]);var Oa=(t,e)=>t.weight-e.weight;var Hd=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Hd||{});var a0=(t,e)=>{Iu(t,e)},l0=t=>{t.preventDefault()},d0=L('<ul role="menu" data-testid="context-menu" class="s-18"></ul>'),c0={hash:"s-18",code:"ul.s-18{background:rgba(0,0,0,.72);border-radius:8px;list-style:none;margin:0;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;padding:6px 0;position:absolute;transition:visibility .1s,opacity .1s;z-index:var(--context-menu-z-index)}"};function Of(t,e){B(e,!0),Q(t,c0);let[i,o]=Be(),r=()=>w(ae,"$playerPhase",i),a=()=>w(ie,"$isLive$",i),l=()=>w(pe,"$isPiPEnabled$",i),d=()=>w(Y,"$chromecastState$",i),s=()=>w(ee,"$pictureInPictureApiIsActive$",i),u=()=>w(de,"$isLooped$",i),f=()=>w(J,"$positionExact$",i),p=()=>w(W,"$additionalContextMenuItems$",i),v=g(e,"visible",3,!1),_=g(e,"position",19,()=>({top:0,left:0})),y=g(e,"playerContainerRef",3,void 0),$=g(e,"menuElementRef",15,void 0),x=K(0),I=K(0),T=xe(),{pictureInPicture$:R}=go(),k=At(),P=T.ui.contextMenu.visible$,E=T.ui.debugPanelVisible,W=T.ui.additionalContextMenuItems$,U=T.ui.t,z=T.actions.internal.togglePictureInPicture,Y=T.state.chromecastState$,ie=T.state.isLive$,J=T.state.positionExact$,oe=T.state.isInteractive,de=T.state.looped$,ae=T.playerPhase,{isEnabled$:pe,isActive$:ee}=R,$e=m(()=>r()==="video"),Ee=m(()=>!!a()&&n($e)),ce=m(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),Qe=m(()=>{var ye;return k.features.copyVideoLink&&((ye=T.callbacks)==null?void 0:ye.onCopyVideoLink)}),fe=m(()=>n(Qe)&&!n(ce)&&!oe&&!n(Ee)),ve=m(()=>{var ye;return!!((ye=T.callbacks)!=null&&ye.onCopyEmbedCodeClicked)}),X=m(()=>l()&&d()!==n0.CONNECTED&&!oe&&n($e)&&!r0.browser.isFirefox),O=m(()=>!oe&&!n(ce)&&!n(Ee)),me=m(()=>k.features.videoRotate&&!oe&&!n(ce)),ue=m(()=>k.showSupport&&!s()),Re=m(()=>k.features.saveTraceInfoToFile),Ze=()=>{var ye;P.set(!1),(ye=e.returnFocus)==null||ye.call(e)},ke=(ye,qe)=>{if(!$()||!y())return;let Ue=$().getBoundingClientRect(),rt=y().getBoundingClientRect();D(x,ye-rt.left),D(I,qe-rt.top),n(x)+Ue.width>rt.width&&D(x,rt.width-Ue.width),n(I)+Ue.height>rt.height&&D(I,rt.height-Ue.height),D(x,Math.max(n(x),0),!0),D(I,Math.max(n(I),0),!0)};He(()=>{(async()=>{if($()&&y()){await uo();let{top:qe,left:Ue,bottom:rt,right:Kt}=_(),It=Ue!=null?Ue:0,qt=qe!=null?qe:0,gi=$().getBoundingClientRect();Pu(Ue)&&!Pu(Kt)&&(It=Kt-gi.width),Pu(qe)&&!Pu(rt)&&(qt=rt-gi.height),It=Math.max(It,0),qt=Math.max(qt,0),ke(It,qt)}})()});let j=()=>{T.actions.internal.videoRotate()},ne=()=>{s0(e.supportLink)&&window.open(e.supportLink,"_blank"),T.actions.internal.reportProblem(),T.actions.internal.pause()},Se=()=>{let ye=T.actions.internal.getDebugTextData();if(k.features.saveDebugInfoToFile){let qe=new Blob([...ye],{type:"plain/text"}),Ue=window.URL.createObjectURL(qe);Da(Ue,"vk_player_debug_info","txt")}else Vl(T.actions.internal.getDebugTextData())},Le=()=>{let ye=T.actions.internal.getTraceTextData(),qe=new Blob([...ye],{type:"application/json"}),Ue=window.URL.createObjectURL(qe);Da(Ue,"vk_player_trace_info","json")},ze=()=>{E.set(!0)},Ce=async()=>{var ye;try{z()}finally{(ye=e.returnFocus)==null||ye.call(e)}},we=()=>{T.actions.internal.setLooped(!u())},Fe=()=>{var ye,qe;if(n(ve)){let Ue=(qe=(ye=T.callbacks)==null?void 0:ye.onCopyEmbedCodeClicked)==null?void 0:qe.call(ye);Ue&&Vl(Ue)}},nt=(ye=!1)=>{var qe,Ue;if((qe=T.callbacks)!=null&&qe.onCopyVideoLink){let rt=(Ue=T.callbacks)==null?void 0:Ue.onCopyVideoLink(ye,f());rt&&Vl(rt)}},ct=m(()=>k.features.saveDebugInfoToFile?U("menu_save_debug"):U("menu_copy_debug")),kt=m(()=>n(Qe)?{id:"copy-link",weight:ts["copy-link"],label:U("menu_copy_video_link"),onClick:()=>nt()}:void 0),at=m(()=>n(fe)?{id:"copy-link-timestamp",weight:ts["copy-link-timestamp"],label:U("menu_copy_video_link_with_timestamp"),onClick:()=>nt(!0)}:void 0),ti=m(()=>n(ve)?{id:"copy-embed-code",weight:ts["copy-embed-code"],label:U("menu_copy_embed_code"),onClick:Fe}:void 0),yt=m(()=>n(X)?{id:"pip",weight:ts.pip,label:s()?U("menu_pip_close"):U("menu_pip"),onClick:Ce}:void 0),Mt=m(()=>n(O)?{id:"video-loop",weight:ts["video-loop"],label:u()?U("menu_video_loop_off"):U("menu_video_loop_on"),ariaLabel:U("aria_label_menu_loop"),onClick:we}:void 0),Vt=m(()=>n(me)?{id:"rotate",weight:ts.rotate,label:U("menu_video_rotate"),ariaLabel:U("aria_label_menu_rotate"),onClick:j}:void 0),Wt=m(()=>n(ue)?{id:"report",weight:ts.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:ts["save-debug"],label:n(ct),onClick:Se})),G=m(()=>n(Re)?{id:"save-trace",weight:ts["save-trace"],label:U("menu_save_debug"),onClick:Le}:void 0),Oe=m(()=>({id:"debug-info",weight:ts["debug-info"],label:U("menu_debug_overlay"),ariaLabel:U("aria_label_menu_debug_overlay"),onClick:ze})),be=m(()=>[n(kt),n(at),n(ti),n(yt),n(Mt),n(Vt),n(Wt),n(Te),n(G),n(Oe),...p()].filter(ye=>!!ye).sort(Oa));var Ne=Ve(),Ie=le(Ne);{var gt=ye=>{var qe=d0();qe.__contextmenu=[l0],qe.__keydown=[a0,Ze],_i(qe,21,()=>n(be),Ue=>Ue.id,(Ue,rt)=>{Nf(Ue,{get id(){return n(rt).id},get label(){return n(rt).label},get ariaLabel(){return n(rt).ariaLabel},get onClick(){return n(rt).onClick},closeContextMenu:Ze})}),S(qe),tt(qe,Ue=>$(Ue),()=>$()),N(()=>{var Ue,rt;return Ke(qe,`top: ${(Ue=n(I))!=null?Ue:""}px; left: ${(rt=n(x))!=null?rt:""}px;`)}),b(ye,qe)};M(Ie,ye=>{v()&&ye(gt)})}b(t,Ne),H(),o()}Xe(["contextmenu","keydown"]);var Au=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 Au(e);this.top?(this.top.next=i,this.top=i):(this.top=i,this.bottom=i),this.size++,this.size>this.maxSize&&this.bottom&&(this.bottom=this.bottom.next)}getValuesFromBottom(){let e=[],i=this.bottom;for(;i;)e.push(i.value),i=i.next;return e}};var u0=L('<div class="container s-13"><canvas class="s-13"></canvas></div>'),p0={hash:"s-13",code:".container.s-13{display:inline-block;height:16px;width:120px}canvas.s-13{margin-top:2px;transform:scaleY(-1)}"};function Fd(t,e){B(e,!0),Q(t,p0);let i=g(e,"values",19,()=>[]),o=K(void 0),r=K(null),a=16,l=120,d=60,s=l/d;Pt(()=>{n(o).width=l,n(o).height=a,D(r,n(o).getContext("2d"),!0)});function u(v,_,y,$,x){x===0&&(x=1),v.fillStyle="#fff",v.fillRect(_,y,$,x)}He(()=>{let v="";if(n(r)){let _=i()[0];for(let $=1;$<i().length;$++)i()[$]>_&&(_=i()[$]);n(r).clearRect(0,0,l,a);let y=d-1;for(let $=i().length-1;$>=0;$--){let x=y*s,I=_>0?a*(i()[$]/_):0;u(n(r),x,0,s,I),v=I+" "+v,y--}}});var f=u0(),p=C(f);tt(p,v=>D(o,v),()=>n(o)),S(f),b(t,f),H()}import{safeStorage as M_}from"@vkontakte/videoplayer-shared/es2018";var f0=(t,e)=>{t.stopPropagation(),M_.remove(Id),e.set(!1)},m0=L('<div class="s-n"><div class="s-n">Video id</div> <span> </span></div>'),v0=L('<div class="s-n"><div class="s-n">VSID</div> <span> </span></div>'),g0=L('<div class="s-n"><div class="s-n">Provider</div> <span> </span></div>'),h0=L('<div class="s-n"><div class="s-n">Streams</div> <span> </span></div>'),_0=L('<div class="s-n"><div class="s-n">Viewport</div> <span> </span></div>'),b0=L('<div class="s-n"><div class="s-n">Video size</div> <span> </span></div>'),$0=L('<div class="s-n"><div class="s-n">CDN host</div> <span> </span></div>'),y0=L('<div class="s-n"><div class="s-n">Volume</div> <span> </span></div>'),x0=L('<div class="s-n"><div class="s-n">Position</div> <span> </span></div>'),w0=L('<div class="s-n"><div class="s-n">Buffer</div> <span> </span></div>'),S0=L('<div class="s-n"><div class="s-n">Nbuffer</div> <span> </span></div>'),C0=L('<div class="s-n"><div class="s-n">Live latency</div> <span> </span></div>'),T0=L('<div class="s-n"><div class="s-n">Segment</div> <span> </span></div>'),I0=L('<div class="s-n"><div class="s-n">Network</div> <!> <span> </span></div>'),E0=L('<div class="s-n"><div class="s-n">V bitrate</div> <!> <span> </span></div>'),P0=L('<div role="region"><button class="close s-n" title="закрыть">[x]</button> <div class="content s-n"><div class="s-n"><div class="s-n">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-n"><div class="s-n">Dropped</div> <span> </span></div> <!> <!> <div class="s-n"><div class="s-n">FPS</div> <!> <span> </span></div></div></div>'),A0={hash:"s-n",code:".container.s-n{background:rgba(28,28,28,.8);border-radius:4px;color:#fff;font-size:10px;left:20px;min-width:160px;position:absolute;text-align:left;top:45px;user-select:text;z-index:var(--debug-panel-z-index)}.container-mobile.s-n{left:16px;top:16px}button.close.s-n{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-n{padding:5px}.content.s-n>div:where(.s-n)>div:where(.s-n){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Ud(t,e){B(e,!0),Q(t,A0);let[i,o]=Be(),r=()=>w(d,"$isMobile",i),a=xe(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=K(ii(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),f=K(0),p=K(0),v=K(0),_=new Nl(60),y=new Nl(60),$=new Nl(60),x=K(ii([])),I=K(ii([])),T=K(ii([])),R=q("aria_label_debug_panel");Pt(()=>{M_.set(Id,"true"),a.actions.internal.startLogging(),u&&(D(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),D(f,u.getVideoPlaybackQuality().totalVideoFrames,!0));let Te=window.setInterval(()=>{D(s,a.actions.internal.getDebugPanelData(),!0)},500),G;return u&&(G=window.setInterval(()=>{if(u){D(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let Oe=u.getVideoPlaybackQuality().totalVideoFrames;D(v,Oe-n(f)),D(f,Oe,!0),_.push(n(v)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&$.push(n(s).bitrate),D(x,_.getValuesFromBottom(),!0),D(I,y.getValuesFromBottom(),!0),D(T,$.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(Te),G&&clearInterval(G)}});var k=P0();let P;var E=C(k);E.__click=[f0,l];var W=A(E,2),U=C(W),z=A(C(U),2),Y=C(z,!0);S(z),S(U);var ie=A(U,2);{var J=Te=>{var G=m0(),Oe=A(C(G),2),be=C(Oe,!0);S(Oe),S(G),N(()=>he(be,n(s).id)),b(Te,G)};M(ie,Te=>{n(s).id&&Te(J)})}var oe=A(ie,2);{var de=Te=>{var G=v0(),Oe=A(C(G),2),be=C(Oe,!0);S(Oe),S(G),N(()=>he(be,n(s).vsid)),b(Te,G)};M(oe,Te=>{n(s).vsid&&Te(de)})}var ae=A(oe,2);{var pe=Te=>{var G=g0(),Oe=A(C(G),2),be=C(Oe,!0);S(Oe),S(G),N(()=>he(be,n(s).provider)),b(Te,G)};M(ae,Te=>{n(s).provider&&Te(pe)})}var ee=A(ae,2);{var $e=Te=>{var G=h0(),Oe=A(C(G),2),be=C(Oe);S(Oe),S(G),N(()=>{var Ne,Ie;return he(be,`Video: ${(Ne=n(s).videoCodec||"")!=null?Ne:""} ${n(s).hdr?"(HDR)":""}
55
55
  &
56
- Audio: ${(Se=n(s).audioCodec||"")!=null?Se:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),b(Q,Me)};M(ee,Q=>{(n(s).videoCodec||n(s).audioCodec)&&Q(be)})}var Ce=A(ee,2);{var de=Q=>{var Me=f0(),Ve=A(C(Me),2),xe=C(Ve,!0);S(Ve),S(Me),N(()=>he(xe,n(s).viewport)),b(Q,Me)};M(Ce,Q=>{n(s).viewport&&Q(de)})}var We=A(Ce,2);{var ve=Q=>{var Me=m0(),Ve=A(C(Me),2),xe=C(Ve,!0);S(Ve),S(Me),N(()=>he(xe,n(s).videoSize)),b(Q,Me)};M(We,Q=>{n(s).videoSize&&Q(ve)})}var me=A(We,2);{var Z=Q=>{var Me=v0(),Ve=A(C(Me),2),xe=C(Ve,!0);S(Ve),S(Me),N(()=>he(xe,n(s).cdn)),b(Q,Me)};M(me,Q=>{n(s).cdn&&Q(Z)})}var O=A(me,2);{var pe=Q=>{var Me=g0(),Ve=A(C(Me),2),xe=C(Ve);S(Ve),S(Me),N(()=>{var Ue;return he(xe,`${(Ue=n(s).volume)!=null?Ue:""} %`)}),b(Q,Me)};M(O,Q=>{n(s).volume&&Q(pe)})}var le=A(O,2);{var ue=Q=>{var Me=h0(),Ve=A(C(Me),2),xe=C(Ve);S(Ve),S(Me),N(Ue=>he(xe,`${Ue!=null?Ue:""} s`),[()=>n(s).position.toFixed(2)]),b(Q,Me)};M(le,Q=>{n(s).position&&Q(ue)})}var Le=A(le,2);{var ze=Q=>{var Me=_0(),Ve=A(C(Me),2),xe=C(Ve);S(Ve),S(Me),N(Ue=>he(xe,`${Ue!=null?Ue:""} s`),[()=>n(s).buffer.toFixed(2)]),b(Q,Me)};M(Le,Q=>{n(s).buffer&&Q(ze)})}var te=A(Le,2);{var ce=Q=>{var Me=b0(),Ve=A(C(Me),2),xe=C(Ve);S(Ve),S(Me),N(Ue=>he(xe,`${Ue!=null?Ue:""} s`),[()=>n(s).nativeBuffer.toFixed(2)]),b(Q,Me)};M(te,Q=>{n(s).nativeBuffer&&Q(ce)})}var we=A(te,2);{var Ee=Q=>{var Me=$0(),Ve=A(C(Me),2),xe=C(Ve);S(Ve),S(Me),N(Ue=>he(xe,`${Ue!=null?Ue:""} s`),[()=>n(s).liveLatency.toFixed(2)]),b(Q,Me)};M(we,Q=>{n(s).liveLatency&&Q(Ee)})}var Ye=A(we,2);{var Ae=Q=>{var Me=y0(),Ve=A(C(Me),2),xe=C(Ve,!0);S(Ve),S(Me),N(Ue=>he(xe,Ue),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Ue})=>Ue).map(({value:Ue,title:Se})=>`${Se} ${((Ue!=null?Ue:0)/1e3).toFixed(2)} s`).join(" & ")]),b(Q,Me)};M(Ye,Q=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&Q(Ae)})}var Te=A(Ye,2),Fe=A(C(Te),2),gt=C(Fe);S(Fe),S(Te);var Mt=A(Te,2);{var Ct=Q=>{var Me=x0(),Ve=A(C(Me),2);Vd(Ve,{get values(){return n(I)}});var xe=A(Ve,2),Ue=C(xe);S(xe),S(Me),N(Se=>he(Ue,`${Se!=null?Se:""} Kbps`),[()=>n(s).speed.toFixed(2)]),b(Q,Me)};M(Mt,Q=>{n(s).speed&&Q(Ct)})}var dt=A(Mt,2);{var St=Q=>{var Me=w0(),Ve=A(C(Me),2);Vd(Ve,{get values(){return n(T)}});var xe=A(Ve,2),Ue=C(xe);S(xe),S(Me),N(Se=>he(Ue,`${Se!=null?Se:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),b(Q,Me)};M(dt,Q=>{n(s).bitrate&&Q(St)})}var qt=A(dt,2),Ot=A(C(qt),2);Vd(Ot,{get values(){return n(x)}});var Rt=A(Ot,2),Ut=C(Rt,!0);S(Rt),S(qt),S(W),S(k),N(Q=>{var Me,Ve;P=ie(k,1,"container s-i",null,P,Q),Ne(k,"aria-label",R),he(j,n(s).version),he(gt,`${(Me=n(p))!=null?Me:""} / ${(Ve=n(m))!=null?Ve:""} frames`),he(Ut,n(v))},[()=>({"container-mobile":r()})]),b(t,k),H(),o()}Je(["click"]);import{noop as T0}from"@vkontakte/videoplayer-shared/es2018";var I0=(t,e)=>{t.stopPropagation(),e()()},E0=L('<div class="close s-z"></div>'),P0={hash:"s-z",code:'.close.s-z{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-z:hover{opacity:1}.close.s-z:after,.close.s-z:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-z:before{transform:rotate(45deg)}.close.s-z:after{transform:rotate(-45deg)}'};function Rs(t,e){B(e,!0),q(t,P0);let i=g(e,"onClick",3,T0);var o=E0();o.__click=[I0,i],b(t,o),H()}Je(["click"]);import{noop as k0}from"@vkontakte/videoplayer-shared/es2018";var dn=t=>`width:${t}px;height:${t}px;`;var A0=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 fr(t,e){B(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,r)=>{var a=A0();b(o,a)},$$slots:{default:!0}}),H()}var L0=L('<div class="timer s-10"><canvas class="timer-canvas s-10" width="100" height="100"></canvas> <!></div>'),M0={hash:"s-10",code:".timer.s-10{align-items:center;background:rgba(31,31,31,.65);border-radius:50%;display:flex;height:50px;justify-content:space-around;transition:background .2s;width:50px}.timer.s-10:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-10{height:50px;position:absolute;width:50px}"};function Dd(t,e){B(e,!0),q(t,M0);let i=g(e,"isRunning",3,!0),o=g(e,"onTimerEnded",3,k0),r=5e3,a=K(void 0),l,d,s=0,u;He(()=>{i()&&Tt(()=>{d=Date.now(),s=requestAnimationFrame(p)})});let m=()=>{s&&(cancelAnimationFrame(s),s=0)},p=()=>{m(),i()&&(u=(Date.now()-d)/r,u<1?(l==null||l.clearRect(0,0,100,100),l==null||l.beginPath(),l==null||l.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*u),l==null||l.stroke(),s=requestAnimationFrame(p)):o()())};kt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),ln(()=>{m()});var v=L0(),_=C(v);et(_,y=>D(a,y),()=>n(a));var $=A(_,2);fr($,{get size(){return"24"}}),S(v),b(t,v),H()}var V0=(t,e,i)=>{e(!1),i()},R0=L('<div class="overlay s-1d"></div> <div class="next-video s-1d"><div class="top s-1d"><div class="caption s-1d"> </div> <!></div> <div class="row s-1d"><div class="column s-1d"><div class="thumb s-1d"><div></div> <!></div></div> <div class="column s-1d"><div class="title s-1d"> </div></div></div></div>',1),D0={hash:"s-1d",code:".overlay.s-1d{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-1d{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-1d{display:flex;justify-content:space-between}.caption.s-1d{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-1d{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-1d{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-1d{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-1d,.thumb-overlay.s-1d{height:100%;width:100%}.thumb-overlay.s-1d{position:absolute}.thumb-overlay.withOpacity.s-1d{background:var(--black);opacity:.3}.title.s-1d{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Rf(t,e){B(e,!0),q(t,D0);let[i,o]=Be(),r=()=>w(d,"$autoplayNextEnabled$",i),a=()=>w(s,"$timerNextVideoRunning$",i),l=ye(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,m=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,_=l.actions.internal.nextVideoAnnouncementCancel,$=()=>{r()&&(u(!1),v())},y=()=>{e.clickCloseIcon(),_()};kt(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),v())});var x=De(),I=ae(x);{var T=R=>{var k=R0(),P=A(ae(k),2),E=C(P),W=C(E),F=C(W,!0);S(W);var U=A(W,2);Rs(U,{onClick:y}),S(E);var j=A(E,2);j.__click=[V0,u,p];var re=C(j),G=C(re),oe=C(G);let X;var Ie=A(oe,2);{var fe=de=>{let We=f(()=>a()&&r());Dd(de,{get isRunning(){return n(We)},onTimerEnded:$})};M(Ie,de=>{r()&&de(fe)})}S(G),S(re);var ee=A(re,2),be=C(ee),Ce=C(be,!0);S(be),S(ee),S(j),S(P),N((de,We)=>{he(F,de),Ke(G,`background-image: url('${e.thumb}')`),X=ie(oe,1,"thumb-overlay s-1d",null,X,We),he(Ce,e.title)},[()=>Y("end_screen_next_video"),()=>({withOpacity:r()})]),b(R,k)};M(I,R=>{e.isHide||R(T)})}b(t,x),H(),o()}Je(["click"]);import{PlaybackState as Da}from"@vkontakte/videoplayer-core/es2018";import{checkNever as O0}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as Kn}from"@vkontakte/videoplayer-statistics/es2018";var Df=(t,e)=>Math.min(+(t+e).toFixed(2),1),Nf=(t,e)=>Math.max(+(t-e).toFixed(2),0),Iu=(t,e,i)=>{let o=Df(e,i);e<1&&t.actions.internal.setVolume(o)},Eu=(t,e,i)=>{let o=Nf(e,i);e>0&&t.actions.internal.setVolume(o)};var sa=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:r})=>t?i?!0:(o==null||o(),!1):e?!0:(r==null||r(),!1);function Pu(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var B0=(t,e)=>{e(t)},H0=L('<div class="keyboard-controls s-1b" tabindex="-1" role="region"><!></div>'),F0={hash:"s-1b",code:".keyboard-controls.s-1b{bottom:0;left:0;position:absolute;right:0;top:0}"};function Of(t,e){var xe,Ue;B(e,!0),q(t,F0);let[i,o]=Be(),r=()=>w(Ie,"$disabledControls$",i),a=()=>w(ze,"$isInteractiveTime$",i),l=()=>w(te,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>w(U,"$playbackState$",i),s=()=>w(Z,"$isEnded$",i),u=()=>w(ve,"$doubleForwardAvailable$",i),m=()=>w(We,"$doubleForwardOn$",i),p=()=>w(O,"$overlayContainer$",i),v=()=>w(re,"$adPlaybackState",i),_=()=>w(G,"$positionExact$",i),$=()=>w(oe,"$duration$",i),y=()=>w(ue,"$isAudioAvailable$",i),x=()=>w(X,"$volume$",i),I=()=>w(j,"$canChangePlaybackSpeed$",i),T=()=>w(fe,"$muted$",i),R=()=>w(ee,"$currentSubtitle$",i),k=g(e,"nextButtonActive",3,!1),P=g(e,"prevButtonActive",3,!1),E=ye(),W=Lt(),F=E.getLogger().createComponentLog("KeyboardControls component"),U=E.state.playbackState$,j=E.state.canChangePlaybackSpeed$,re=E.ads.playbackState,G=E.state.positionExact$,oe=E.state.duration$,X=E.state.volume$,Ie=E.ui.controls.disabledControls$,fe=E.state.muted$,ee=E.state.currentSubtitle$,be=E.ui.contextMenu.openedByHotKey$,Ce=E.ui.contextMenu.lastActiveElem$,de=E.ui.contextMenu.visible$,We=E.ui.doubleForwardOn$,ve=E.ui.doubleForwardAvailable$,me=E.ui.contextMenu.position$,Z=E.state.isEnded$,O=E.ui.overlayContainer$,pe=(xe=E.callbacks)==null?void 0:xe.onAudioDoesNotExistHint,le=(Ue=E.callbacks)==null?void 0:Ue.onAudioDisabledHint,ue=E.state.isAudioAvailable$,Le=E.state.isAudioDisabled,ze=E.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:te}=mo(),ce=0,we=!0,Ee=K(void 0),Ye=Se=>(Se!==we&&(we=Se,ce=0),ce+=1,(W.controls.seekStepKeyboard+W.controls.seekStepKeyboard*ce)/1e3),Ae=!0,Te=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&te.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{E.actions.internal.togglePlay();let Se="PLAY";d()===Da.PAUSED?Se="PAUSE":s()&&(Se="REPLAY"),e.showHotKeyHelpers({type:Se})}},Fe=Se=>{if(!u()||!Se&&m()){Te(),e.stopDoubleForward(),Ae=!0;return}Ae=!1,!Se&&e.startDoubleForwardActivationTimer()},gt=()=>{Ae||(m()||Te(),e.stopDoubleForward(),Ae=!0)},Mt=Se=>{Se!=="Space"&&e.stopDoubleForward()},Ct=Se=>{let wt=T_(p());me.set(wt),Ce.set(Se.target),be.set(!0),de.set(!0)},dt=(Se,wt=!1)=>{var ci,Yi;let ge=Se.target,Oe=(ci=ge==null?void 0:ge.getAttribute("role"))==null?void 0:ci.includes("menuitem"),Ge=ge.classList.contains("btn"),at=Se.code;if(Ge&&at==="Space")return!1;let Kt=Ch.has(at);if(Oe&&Kt)return!1;let Et=!Sh.has(at);if(Se.ctrlKey&&Et||Se.altKey&&Et||Se.metaKey)return!1;let si=Oe&&at==="Escape";Th.has(at)||si||e.hideContextMenu();let li=d()===Da.PLAYING||d()===Da.PAUSED,Ei=e.isAds&&(v()==="paused"||v()==="playing"),uo=!Ei&&!r().has("TIMELINE"),po=Se.shiftKey&&["Digit1","Numpad1"].includes(at);if(!po&&!(li||Ei))return!1;F({message:`key down, code: ${at}, isExternal = ${wt}`});let di=!1,rt=()=>{di=!0,wt||Se.preventDefault()};if(Mt(at),po)return Ct(Se),rt(),!0;switch(at){case"KeyJ":case"ArrowLeft":{if(!uo)break;if(Se.ctrlKey||Se.altKey){let ct=E.actions.internal.getPrevEpisode();E.actions.internal.seekToPrevEpisode(ct),ct&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:ct.text}),rt()}else{let ct=Se.shiftKey?Ye(!1):W.controls.seekStepKeyboard/1e3,Dt=Math.max(_()-ct,0);_()>0&&(E.actions.internal.seekTime(Dt,Kn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:ct.toString()}),rt())}break}case"KeyL":case"ArrowRight":{if(!uo)break;if(Se.ctrlKey||Se.altKey){let ct=E.actions.internal.getNextEpisode();E.actions.internal.seekToNextEpisode(ct),ct&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:ct.text}),rt()}else{let ct=Se.shiftKey?Ye(!0):W.controls.seekStepKeyboard/1e3,Dt=Math.min(_()+ct,$());Math.round(_())<Math.round($())&&(E.actions.internal.seekTime(Dt,Kn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:ct.toString()}),rt())}break}case"ArrowUp":{if(sa({isAudioDisabled:Le,audioDisabledHintCallback:le,isAudioAvailable:y(),audioIsNotExistHintCallback:pe,isAds:e.isAds})){let ct=x(),Dt=W.controls.volumeStepKeyboard,fi=ct<=1;if(Iu(E,ct,Dt),fi){let ot=Math.round(Df(ct,Dt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:ot}})}}rt();break}case"ArrowDown":{if(sa({isAudioDisabled:Le,audioDisabledHintCallback:le,isAudioAvailable:y(),audioIsNotExistHintCallback:pe,isAds:e.isAds})){let ct=x(),Dt=W.controls.volumeStepKeyboard,fi=ct>=0;if(Eu(E,ct,Dt),fi){let ot=Math.round(Nf(ct,Dt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:ot}})}}rt();break}case"Comma":{if(Se.shiftKey){if(!m()&&I()){let ct=E.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:ct==null?void 0:ct.displayValue}),rt()}}else{if(Ei||d()!==Da.PAUSED)break;let ct=Math.max(_()-W.controls.seekStepFrame/1e3,0);_()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),E.actions.internal.clearDelayedBufferingCheckTimeout(),E.actions.internal.seekTime(ct,Kn.DOUBLE_TAP),rt())}break}case"Period":{if(Se.shiftKey){if(!m()&&I()){let ct=E.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:ct==null?void 0:ct.displayValue}),rt()}}else{if(Ei||d()!==Da.PAUSED)break;let ct=Math.min(_()+W.controls.seekStepFrame/1e3,$());_()<$()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),E.actions.internal.clearDelayedBufferingCheckTimeout(),E.actions.internal.seekTime(ct,Kn.DOUBLE_TAP),rt())}break}case"KeyK":Te(),rt();break;case"Space":Fe(Se.repeat),rt();break;case"KeyM":{sa({isAudioDisabled:Le,audioDisabledHintCallback:le,isAudioAvailable:y(),audioIsNotExistHintCallback:pe,isAds:e.isAds})&&(e.showHotKeyHelpers({type:T()?"VOLUME":"MUTE"}),E.actions.internal.toggleMuted()),rt();break}case"KeyF":e.toggleFullscreen(),rt();break;case"KeyC":E.actions.internal.toggleSubtitle(),R().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(Yi=R())==null?void 0:Yi.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),rt();break;case"KeyI":E.actions.internal.togglePictureInPicture(),rt();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.1,Kn.DOUBLE_TAP),rt();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.2,Kn.DOUBLE_TAP),rt();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.3,Kn.DOUBLE_TAP),rt();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.4,Kn.DOUBLE_TAP),rt();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.5,Kn.DOUBLE_TAP),rt();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.6,Kn.DOUBLE_TAP),rt();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.7,Kn.DOUBLE_TAP),rt();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.8,Kn.DOUBLE_TAP),rt();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.9,Kn.DOUBLE_TAP),rt();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(0,Kn.DOUBLE_TAP),rt();break;case"Slash":{Se.shiftKey&&W.features.hotKeyMapModal&&(e.showKeyMap(),rt());break}case"KeyN":Se.shiftKey&&k()&&(E.actions.internal.nextVideoClick(),rt());break;case"KeyP":Se.shiftKey&&P()&&(E.actions.internal.prevVideoClick(),rt());break;case"ShiftLeft":case"ShiftRight":rt();break;case"Tab":case"Escape":case"Enter":break;default:O0(at);break}return di},St=Se=>{let wt=Se.code;if(Se.ctrlKey||Se.altKey||Se.metaKey)return;let ge=d()===Da.PLAYING||d()===Da.PAUSED,Oe=e.isAds&&(v()==="paused"||v()==="playing");if(ge||Oe)switch(wt){case"ShiftLeft":case"ShiftRight":ce=0;break;case"Space":gt();break}},qt=Y("aria_label_video_player"),Ot=()=>{var Se;return(Se=n(Ee))==null?void 0:Se.focus()},Rt=()=>n(Ee)===Pu(),Ut=Se=>Se.type==="keydown"?dt(Se,!0):(Se.type==="keyup"&&St(Se),!1);var Q=H0();Q.__keyup=St,Q.__keydown=[B0,dt];var Me=C(Q);ei(Me,()=>{var Se;return(Se=e.children)!=null?Se:ht}),S(Q),et(Q,Se=>D(Ee,Se),()=>n(Ee)),N(()=>Ne(Q,"aria-label",qt)),b(t,Q);var Ve=H({focus:Ot,isFocused:Rt,handleExternalKeyboardEvent:Ut});return o(),Ve}Je(["keyup","keydown"]);var U0=L('<div class="container s-k"><div class="dot s-k"></div> <div class="dot s-k"></div> <div class="dot s-k"></div></div>'),z0={hash:"s-k",code:".container.s-k{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-k:first-child{animation-delay:0s}.dot.s-k:nth-child(2){animation-delay:.18s}.dot.s-k:nth-child(3){animation-delay:.36s}@keyframes s-k-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-k{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-k-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-k+.dot:where(.s-k){margin-left:4px}"};function Na(t,e){q(t,z0);let i=g(e,"style",3,"");var o=U0();N(()=>Ke(o,i())),b(t,o)}var W0=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 Bf(t,e){Xe(t,{get fill(){return e.fill},children:(i,o)=>{var r=W0();b(i,r)},$$slots:{default:!0}})}import{noop as Dl}from"@vkontakte/videoplayer-shared/es2018";var K0=t=>{t.stopPropagation()},Q0=L("<button><!></button>"),q0={hash:"s-1v",code:"button.btn.s-1v{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-1v{width:100%}button.btn--live.s-1v{padding:10px 4px}button.btn-jc-l.s-1v{justify-content:left}button.btn-m.s-1v{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-1v,button.btn-m--play.s-1v{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1v{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1v,button.btn-m--prev.s-1v{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1v{right:calc(100% + 35px)}button.btn-m--next.s-1v{left:calc(100% + 35px)}button.btn.s-1v:disabled{cursor:default;pointer-events:none}button.btn.s-1v:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1v:not(:disabled):hover{opacity:.8}button.pr-0.s-1v{padding-right:0}button.pl-0.s-1v{padding-left:0}"};function Ft(t,e){B(e,!0),q(t,q0);let i=g(e,"className",3,""),o=g(e,"style",3,""),r=g(e,"disabled",3,void 0),a=g(e,"testId",3,void 0),l=g(e,"ariaHidden",3,void 0),d=g(e,"ariaLabel",3,void 0),s=g(e,"ref",15,void 0),u=g(e,"ariaKeyShortCut",3,void 0),m=g(e,"ariaExpanded",3,void 0),p=g(e,"tabIndex",3,0),v=g(e,"click",3,Dl),_=g(e,"focus",3,Dl),$=g(e,"blur",3,Dl),y=f(()=>v()===Dl?null:k=>{k.stopPropagation(),v()(k)}),x=f(()=>_()===Dl?null:k=>{k.preventDefault(),_()()}),I=f(()=>$()===Dl?null:k=>{k.preventDefault(),$()()});var T=Q0();T.__pointerdown=[K0],T.__click=function(...k){var P;(P=n(y))==null||P.apply(this,k)};var R=C(T);ei(R,()=>{var k;return(k=e.children)!=null?k:ht}),S(T),et(T,k=>s(k),()=>s()),N(()=>{var k,P,E,W,F,U,j,re;ie(T,1,`btn ${(k=i())!=null?k:""}`,"s-1v"),Ke(T,o()||null),T.disabled=(P=r())!=null?P:null,Ne(T,"aria-hidden",(E=l())!=null?E:null),Ne(T,"aria-label",(W=d())!=null?W:null),Ne(T,"aria-keyshortcuts",(F=u())!=null?F:null),Ne(T,"aria-expanded",(U=m())!=null?U:null),Ne(T,"data-testid",(j=a())!=null?j:null),Ne(T,"tabindex",p()),Ne(T,"role",e.role),Ne(T,"aria-checked",(re=e.areaChecked)!=null?re:null)}),ft("focus",T,function(...k){var P;(P=n(x))==null||P.apply(this,k)}),ft("blur",T,function(...k){var P;(P=n(I))==null||P.apply(this,k)}),b(t,T),H()}Je(["pointerdown","click"]);var G0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},Y0=L('<div class="modal-header s-1m"><h3 class="modal-title s-1m"> </h3> <!></div>'),j0=L('<div class="modal-overlay s-1m"><div class="modal-container s-1m" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-1m" tabindex="0" role="scrollbar"><div class="modal-main s-1m"><!></div></div></div></div>'),X0={hash:"s-1m",code:'.modal-overlay.s-1m{align-items:center;background:transparent;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:var(--modal-z-index)}.modal-container.s-1m{background:var(--mobile-settings-bg);border-radius:8px;color:var(--white);display:flex;flex-direction:column;height:calc(100% - 24px);max-height:490px;max-width:600px;width:calc(100% - 32px)}.modal-header.s-1m{align-items:start;border-bottom:1px solid var(--white-alpha-24);box-sizing:border-box;display:flex;height:40px;justify-content:space-between;padding:8px 10px}.modal-title.s-1m{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px;margin:3px 0 0 6px}.modal-scroll.s-1m{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-1m::-webkit-scrollbar{width:8px}.modal-scroll.s-1m::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-1m::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-1m::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-1m{margin:-8px -4px 0 0}'};function Hf(t,e){B(e,!0),q(t,X0);let i=g(e,"showHeader",3,!0),o=g(e,"showCloseCross",3,!0),r=K(void 0),a=K(void 0),{webApi:{focusManager:l}}=ye(),d=Y("hotkey_map_modal_close_btn_text");kt(()=>{var y;return(y=n(r))==null||y.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var s=j0();s.__keydown=[G0,e];var u=C(s),m=C(u);{var p=y=>{var x=Y0(),I=C(x),T=C(I,!0);S(I);var R=A(I,2);{var k=P=>{Ft(P,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(E,W)=>{Bf(E,{fill:"currentColor"})},$$slots:{default:!0}})};M(R,P=>{o()&&P(k)})}S(x),N(()=>he(T,e.title)),b(y,x)};M(m,y=>{i()&&y(p)})}var v=A(m,2),_=C(v),$=C(_);ei($,()=>{var y;return(y=e.children)!=null?y:ht}),S(_),S(v),et(v,y=>D(r,y),()=>n(r)),S(u),et(u,y=>D(a,y),()=>n(a)),S(s),b(t,s),H()}Je(["keydown"]);var Z0=new Set(["BR"]),P_=t=>{var r;let e=document.createElement("DIV");e.innerHTML=t;let i=e.querySelectorAll("*"),o=i.length;for(;o--;){let a=i[o],l=a.tagName;Z0.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var J0=L('<li class="hot-key-map-item s-1h"><span class="hot-key-map-item-description s-1h"><!></span> &nbsp; <span class="hot-key-map-item-value s-1h"> </span></li>'),ey=L('<div class="hot-key-map-group s-1h"><h5 class="hot-key-map-group-title s-1h"> </h5> <ul class="hot-key-map-group-items s-1h"></ul></div>'),ty=L('<div class="hot-key-map s-1h"></div>'),iy={hash:"s-1h",code:'.hot-key-map.s-1h{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-1h{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-1h:last-child{border-bottom:none}.hot-key-map-group-title.s-1h{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-1h,.hot-key-map-item.s-1h{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-1h{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-1h{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-1h{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-1h{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-1h,.hot-key-map-item-value.s-1h{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function Ff(t,e){B(e,!1),q(t,iy);let[i,o]=Be(),r=()=>w(l,"$data",i),a=ye(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};jo(),Hf(t,{get title(){return r().title},onClose:s,children:(u,m)=>{var p=ty();bi(p,5,()=>r().groups,({title:v,items:_})=>v,(v,_)=>{let $=()=>n(_).title,y=()=>n(_).items;var x=ey(),I=C(x),T=C(I,!0);S(I);var R=A(I,2);bi(R,5,y,({description:k,value:P})=>P,(k,P)=>{let E=()=>n(P).description,W=()=>n(P).value;var F=J0(),U=C(F),j=C(U);vd(j,()=>P_(E())),S(U);var re=A(U,2),G=C(re,!0);S(re),S(F),N(()=>he(G,W())),b(k,F)}),S(R),S(x),N(()=>he(T,$())),b(v,x)}),S(p),b(u,p)},$$slots:{default:!0}}),H(),o()}import{noop as db}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as ob,PlaybackState as Lm}from"@vkontakte/videoplayer-core/es2018";import{getVideoQualityLabel as py}from"@vkontakte/videoplayer-shared/es2018";var oy=L('<div class="pillow s-1x"><!></div>'),ny={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 Uf(t,e){q(t,ny);var i=oy(),o=C(i);ei(o,()=>{var r;return(r=e.children)!=null?r:ht}),S(i),N(()=>Ne(i,"data-testid",e.testId)),b(t,i)}import{VideoQuality as Nd}from"@vkontakte/videoplayer-shared/es2018";var ry=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 zf(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=ry();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:ht}),Jt(),S(o),b(t,o)}var sy=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 Wf(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=sy();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:ht}),Jt(),S(o),b(t,o)}var ay=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 Kf(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=ay();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:ht}),Jt(),S(o),b(t,o)}var ly=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 Qf(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=ly();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:ht}),Jt(),S(o),b(t,o)}var dy=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 qf(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=dy();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:ht}),Jt(),S(o),b(t,o)}var Au=t=>{switch(t){case Nd.Q_720P:return Kf;case Nd.Q_1080P:return Qf;case Nd.Q_1440P:return qf;case Nd.Q_2160P:return zf;case Nd.Q_4320P:return Wf}};var cy=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 Gf(t,e){Xe(t,{get testId(){return e.testId},children:(i,o)=>{var r=cy();b(i,r)},$$slots:{default:!0}})}var uy=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 Yf(t,e){Xe(t,{get testId(){return e.testId},children:(i,o)=>{var r=uy();b(i,r)},$$slots:{default:!0}})}var fy=L('<div aria-hidden="true"><!> <!></div>'),my={hash:"s-1t",code:".icon.s-1t{display:flex;height:24px;position:relative;width:24px}.icon.s-1t .pillow{position:absolute;right:-9px;top:1px}.icon.triple.s-1t .pillow{right:-13px}.icon.s-1t svg[data-testid=settings-icon--labeled] ._full{opacity:0;visibility:hidden}"};function Od(t,e){B(e,!0),q(t,my);let i=g(e,"isMobile",3,!1),o=g(e,"currentQuality",3,void 0),r=f(()=>o()?py(o()):""),a=f(()=>Au(o())),l=f(()=>n(r).length>2);var d=De(),s=ae(d);{var u=p=>{Gf(p,{testId:"settings-mobile-icon"})},m=p=>{var v=fy();let _;var $=C(v);{var y=T=>{let R=f(()=>`${n(r)}-pill-icon`);Uf(T,{get testId(){return n(R)},children:(k,P)=>{var E=De(),W=ae(E);Ni(W,()=>n(a),(F,U)=>{U(F,{})}),b(k,E)},$$slots:{default:!0}})};M($,T=>{n(a)&&T(y)})}var x=A($,2);let I=f(()=>n(a)?"settings-icon--labeled":"settings-icon");Yf(x,{get testId(){return n(I)}}),S(v),N(T=>_=ie(v,1,"icon s-1t",null,_,T),[()=>({triple:n(l)})]),b(p,v)};M(s,p=>{i()?p(u):p(m,!1)})}b(t,d),H()}var vy=L('<span class="settings-icon-wrapper s-1y"><!></span>'),gy={hash:"s-1y",code:".settings-icon-wrapper.s-1y{height:24px;position:relative;width:24px}"};function Nl(t,e){B(e,!0),q(t,gy);let[i,o]=Be(),r=()=>w(u,"$settingsMenuVisible",i),a=()=>w(v,"$isMobile",i),l=()=>w(s,"$currentQuality",i),d=ye(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,m=d.actions.internal.openSettingsMenu,p=d.actions.internal.closeSettingsMenu,v=d.ui.isMobile,_=d.ui.t,$=K(void 0);He(()=>{n($)&&Tt(()=>{e.ref$.set(n($))})});let y=_("aria_label_settings");async function x(T){let R=ra(T);r()?p():m(R,co)}let I=f(()=>r()?"opened":"");Ft(t,{get className(){return n(I)},testId:"settings-btn",click:x,get ariaLabel(){return y},get ariaExpanded(){return r()},get ref(){return n($)},set ref(T){D($,T,!0)},children:(T,R)=>{var k=vy(),P=C(k);Od(P,{get isMobile(){return a()},get currentQuality(){return l()}}),S(k),b(T,k)},$$slots:{default:!0}}),H(),o()}var hy=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),_y=ke("<path></path>");function aa(t,e){B(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:(r,a)=>{var l=De(),d=ae(l);{var s=m=>{var p=hy();Jt(),b(m,p)},u=m=>{var p=_y();N(()=>Ne(p,"d",`M16.92 8h14.16q2.82-.02 4.66.1c1.28.1 2.4.32 3.46.86a8.8 8.8 90 013.84 3.84c.54 1.04.76 2.18.86 3.46q.12 1.84.1 4.66v6.16q.02 2.82-.1 4.66a10 10 90 01-.86 3.46 8.8 8.8 90 01-3.84 3.84 10 10 90 01-3.46.86q-1.84.12-4.66.1H16.92q-2.82.02-4.66-.1a10 10 90 01-3.46-.86 8.8 8.8 90 01-3.84-3.84 10 10 90 01-.86-3.46Q4 29.9 4 27.08v-6.16q-.02-2.82.1-4.66c.1-1.28.32-2.4.86-3.46A8.8 8.8 90 018.8 8.96a10 10 90 013.46-.86Q14.1 8 16.92 8
56
+ Audio: ${(Ie=n(s).audioCodec||"")!=null?Ie:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),b(Te,G)};M(ee,Te=>{(n(s).videoCodec||n(s).audioCodec)&&Te($e)})}var Ee=A(ee,2);{var ce=Te=>{var G=_0(),Oe=A(C(G),2),be=C(Oe,!0);S(Oe),S(G),N(()=>he(be,n(s).viewport)),b(Te,G)};M(Ee,Te=>{n(s).viewport&&Te(ce)})}var Qe=A(Ee,2);{var fe=Te=>{var G=b0(),Oe=A(C(G),2),be=C(Oe,!0);S(Oe),S(G),N(()=>he(be,n(s).videoSize)),b(Te,G)};M(Qe,Te=>{n(s).videoSize&&Te(fe)})}var ve=A(Qe,2);{var X=Te=>{var G=$0(),Oe=A(C(G),2),be=C(Oe,!0);S(Oe),S(G),N(()=>he(be,n(s).cdn)),b(Te,G)};M(ve,Te=>{n(s).cdn&&Te(X)})}var O=A(ve,2);{var me=Te=>{var G=y0(),Oe=A(C(G),2),be=C(Oe);S(Oe),S(G),N(()=>{var Ne;return he(be,`${(Ne=n(s).volume)!=null?Ne:""} %`)}),b(Te,G)};M(O,Te=>{n(s).volume&&Te(me)})}var ue=A(O,2);{var Re=Te=>{var G=x0(),Oe=A(C(G),2),be=C(Oe);S(Oe),S(G),N(Ne=>he(be,`${Ne!=null?Ne:""} s`),[()=>n(s).position.toFixed(2)]),b(Te,G)};M(ue,Te=>{n(s).position&&Te(Re)})}var Ze=A(ue,2);{var ke=Te=>{var G=w0(),Oe=A(C(G),2),be=C(Oe);S(Oe),S(G),N(Ne=>he(be,`${Ne!=null?Ne:""} s`),[()=>n(s).buffer.toFixed(2)]),b(Te,G)};M(Ze,Te=>{n(s).buffer&&Te(ke)})}var j=A(Ze,2);{var ne=Te=>{var G=S0(),Oe=A(C(G),2),be=C(Oe);S(Oe),S(G),N(Ne=>he(be,`${Ne!=null?Ne:""} s`),[()=>n(s).nativeBuffer.toFixed(2)]),b(Te,G)};M(j,Te=>{n(s).nativeBuffer&&Te(ne)})}var Se=A(j,2);{var Le=Te=>{var G=C0(),Oe=A(C(G),2),be=C(Oe);S(Oe),S(G),N(Ne=>he(be,`${Ne!=null?Ne:""} s`),[()=>n(s).liveLatency.toFixed(2)]),b(Te,G)};M(Se,Te=>{n(s).liveLatency&&Te(Le)})}var ze=A(Se,2);{var Ce=Te=>{var G=T0(),Oe=A(C(G),2),be=C(Oe,!0);S(Oe),S(G),N(Ne=>he(be,Ne),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Ne})=>Ne).map(({value:Ne,title:Ie})=>`${Ie} ${((Ne!=null?Ne:0)/1e3).toFixed(2)} s`).join(" & ")]),b(Te,G)};M(ze,Te=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&Te(Ce)})}var we=A(ze,2),Fe=A(C(we),2),nt=C(Fe);S(Fe),S(we);var ct=A(we,2);{var kt=Te=>{var G=I0(),Oe=A(C(G),2);Fd(Oe,{get values(){return n(I)}});var be=A(Oe,2),Ne=C(be);S(be),S(G),N(Ie=>he(Ne,`${Ie!=null?Ie:""} Kbps`),[()=>n(s).speed.toFixed(2)]),b(Te,G)};M(ct,Te=>{n(s).speed&&Te(kt)})}var at=A(ct,2);{var ti=Te=>{var G=E0(),Oe=A(C(G),2);Fd(Oe,{get values(){return n(T)}});var be=A(Oe,2),Ne=C(be);S(be),S(G),N(Ie=>he(Ne,`${Ie!=null?Ie:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),b(Te,G)};M(at,Te=>{n(s).bitrate&&Te(ti)})}var yt=A(at,2),Mt=A(C(yt),2);Fd(Mt,{get values(){return n(x)}});var Vt=A(Mt,2),Wt=C(Vt,!0);S(Vt),S(yt),S(W),S(k),N(Te=>{var G,Oe;P=te(k,1,"container s-n",null,P,Te),De(k,"aria-label",R),he(Y,n(s).version),he(nt,`${(G=n(p))!=null?G:""} / ${(Oe=n(f))!=null?Oe:""} frames`),he(Wt,n(v))},[()=>({"container-mobile":r()})]),b(t,k),H(),o()}Xe(["click"]);import{noop as k0}from"@vkontakte/videoplayer-shared/es2018";var L0=(t,e)=>{t.stopPropagation(),e()()},M0=L('<div class="close s-y"></div>'),V0={hash:"s-y",code:'.close.s-y{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-y:hover{opacity:1}.close.s-y:after,.close.s-y:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-y:before{transform:rotate(45deg)}.close.s-y:after{transform:rotate(-45deg)}'};function Ns(t,e){B(e,!0),Q(t,V0);let i=g(e,"onClick",3,k0);var o=M0();o.__click=[L0,i],b(t,o),H()}Xe(["click"]);import{noop as D0}from"@vkontakte/videoplayer-shared/es2018";var sn=t=>`width:${t}px;height:${t}px;`;var R0=Ae('<path d="m14.4 8.76 24.02 13.85a1.6 1.6 0 0 1 0 2.78L14.4 39.24a1.6 1.6 0 0 1-2.4-1.39v-27.7a1.6 1.6 0 0 1 2.4-1.39"></path>');function Mn(t,e){B(e,!0);let i=m(()=>sn(e.size));Ye(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"play-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=R0();b(o,a)},$$slots:{default:!0}}),H()}var N0=L('<div class="timer s-x"><canvas class="timer-canvas s-x" width="100" height="100"></canvas> <!></div>'),O0={hash:"s-x",code:".timer.s-x{align-items:center;background:rgba(31,31,31,.65);border-radius:50%;display:flex;height:50px;justify-content:space-around;transition:background .2s;width:50px}.timer.s-x:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-x{height:50px;position:absolute;width:50px}"};function zd(t,e){B(e,!0),Q(t,O0);let i=g(e,"isRunning",3,!0),o=g(e,"onTimerEnded",3,D0),r=5e3,a=K(void 0),l,d,s=0,u;He(()=>{i()&&Tt(()=>{d=Date.now(),s=requestAnimationFrame(p)})});let f=()=>{s&&(cancelAnimationFrame(s),s=0)},p=()=>{f(),i()&&(u=(Date.now()-d)/r,u<1?(l==null||l.clearRect(0,0,100,100),l==null||l.beginPath(),l==null||l.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*u),l==null||l.stroke(),s=requestAnimationFrame(p)):o()())};Pt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),rn(()=>{f()});var v=N0(),_=C(v);tt(_,$=>D(a,$),()=>n(a));var y=A(_,2);Mn(y,{get size(){return"24"}}),S(v),b(t,v),H()}var B0=(t,e,i)=>{e(!1),i()},H0=L('<div class="overlay s-1f"></div> <div class="next-video s-1f"><div class="top s-1f"><div class="caption s-1f"> </div> <!></div> <div class="row s-1f"><div class="column s-1f"><div class="thumb s-1f"><div></div> <!></div></div> <div class="column s-1f"><div class="title s-1f"> </div></div></div></div>',1),F0={hash:"s-1f",code:".overlay.s-1f{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-1f{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-1f{display:flex;justify-content:space-between}.caption.s-1f{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-1f{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-1f{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-1f{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-1f,.thumb-overlay.s-1f{height:100%;width:100%}.thumb-overlay.s-1f{position:absolute}.thumb-overlay.withOpacity.s-1f{background:var(--black);opacity:.3}.title.s-1f{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Bf(t,e){B(e,!0),Q(t,F0);let[i,o]=Be(),r=()=>w(d,"$autoplayNextEnabled$",i),a=()=>w(s,"$timerNextVideoRunning$",i),l=xe(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,f=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,_=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),v())},$=()=>{e.clickCloseIcon(),_()};Pt(()=>{e.isHide||f(),e.isHide&&r()&&(u(!1),v())});var x=Ve(),I=le(x);{var T=R=>{var k=H0(),P=A(le(k),2),E=C(P),W=C(E),U=C(W,!0);S(W);var z=A(W,2);Ns(z,{onClick:$}),S(E);var Y=A(E,2);Y.__click=[B0,u,p];var ie=C(Y),J=C(ie),oe=C(J);let de;var ae=A(oe,2);{var pe=ce=>{let Qe=m(()=>a()&&r());zd(ce,{get isRunning(){return n(Qe)},onTimerEnded:y})};M(ae,ce=>{r()&&ce(pe)})}S(J),S(ie);var ee=A(ie,2),$e=C(ee),Ee=C($e,!0);S($e),S(ee),S(Y),S(P),N((ce,Qe)=>{he(U,ce),Ke(J,`background-image: url('${e.thumb}')`),de=te(oe,1,"thumb-overlay s-1f",null,de,Qe),he(Ee,e.title)},[()=>q("end_screen_next_video"),()=>({withOpacity:r()})]),b(R,k)};M(I,R=>{e.isHide||R(T)})}b(t,x),H(),o()}Xe(["click"]);import{PlaybackState as Ba}from"@vkontakte/videoplayer-core/es2018";import{checkNever as z0}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as Yn}from"@vkontakte/videoplayer-statistics/es2018";var Hf=(t,e)=>Math.min(+(t+e).toFixed(2),1),Ff=(t,e)=>Math.max(+(t-e).toFixed(2),0),ku=(t,e,i)=>{let o=Hf(e,i);e<1&&t.actions.internal.setVolume(o)},Lu=(t,e,i)=>{let o=Ff(e,i);e>0&&t.actions.internal.setVolume(o)};var ca=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:r})=>t?i?!0:(o==null||o(),!1):e?!0:(r==null||r(),!1);function Mu(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var W0=(t,e)=>{e(t)},K0=L('<div class="keyboard-controls s-1b" tabindex="-1" role="region"><!></div>'),Q0={hash:"s-1b",code:".keyboard-controls.s-1b{bottom:0;left:0;position:absolute;right:0;top:0}"};function Uf(t,e){var be,Ne;B(e,!0),Q(t,Q0);let[i,o]=Be(),r=()=>w(ae,"$disabledControls$",i),a=()=>w(ke,"$isInteractiveTime$",i),l=()=>w(j,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>w(z,"$playbackState$",i),s=()=>w(X,"$isEnded$",i),u=()=>w(fe,"$doubleForwardAvailable$",i),f=()=>w(Qe,"$doubleForwardOn$",i),p=()=>w(O,"$overlayContainer$",i),v=()=>w(ie,"$adPlaybackState",i),_=()=>w(J,"$positionExact$",i),y=()=>w(oe,"$duration$",i),$=()=>w(Re,"$isAudioAvailable$",i),x=()=>w(de,"$volume$",i),I=()=>w(Y,"$canChangePlaybackSpeed$",i),T=()=>w(pe,"$muted$",i),R=()=>w(ee,"$currentSubtitle$",i),k=g(e,"nextButtonActive",3,!1),P=g(e,"prevButtonActive",3,!1),E=xe(),W=At(),U=E.getLogger().createComponentLog("KeyboardControls component"),z=E.state.playbackState$,Y=E.state.canChangePlaybackSpeed$,ie=E.ads.playbackState,J=E.state.positionExact$,oe=E.state.duration$,de=E.state.volume$,ae=E.ui.controls.disabledControls$,pe=E.state.muted$,ee=E.state.currentSubtitle$,$e=E.ui.contextMenu.openedByHotKey$,Ee=E.ui.contextMenu.lastActiveElem$,ce=E.ui.contextMenu.visible$,Qe=E.ui.doubleForwardOn$,fe=E.ui.doubleForwardAvailable$,ve=E.ui.contextMenu.position$,X=E.state.isEnded$,O=E.ui.overlayContainer$,me=(be=E.callbacks)==null?void 0:be.onAudioDoesNotExistHint,ue=(Ne=E.callbacks)==null?void 0:Ne.onAudioDisabledHint,Re=E.state.isAudioAvailable$,Ze=E.state.isAudioDisabled,ke=E.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:j}=go(),ne=0,Se=!0,Le=K(void 0),ze=Ie=>(Ie!==Se&&(Se=Ie,ne=0),ne+=1,(W.controls.seekStepKeyboard+W.controls.seekStepKeyboard*ne)/1e3),Ce=!0,we=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&j.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{E.actions.internal.togglePlay();let Ie="PLAY";d()===Ba.PAUSED?Ie="PAUSE":s()&&(Ie="REPLAY"),e.showHotKeyHelpers({type:Ie})}},Fe=Ie=>{if(!u()||!Ie&&f()){we(),e.stopDoubleForward(),Ce=!0;return}Ce=!1,!Ie&&e.startDoubleForwardActivationTimer()},nt=()=>{Ce||(f()||we(),e.stopDoubleForward(),Ce=!0)},ct=Ie=>{Ie!=="Space"&&e.stopDoubleForward()},kt=Ie=>{let gt=k_(p());ve.set(gt),Ee.set(Ie.target),$e.set(!0),ce.set(!0)},at=(Ie,gt=!1)=>{var ai,Yi;let ye=Ie.target,qe=(ai=ye==null?void 0:ye.getAttribute("role"))==null?void 0:ai.includes("menuitem"),Ue=ye.classList.contains("btn"),rt=Ie.code;if(Ue&&rt==="Space")return!1;let Kt=Ah.has(rt);if(qe&&Kt)return!1;let It=!Ph.has(rt);if(Ie.ctrlKey&&It||Ie.altKey&&It||Ie.metaKey)return!1;let qt=qe&&rt==="Escape";kh.has(rt)||qt||e.hideContextMenu();let gi=d()===Ba.PLAYING||d()===Ba.PAUSED,Ai=e.isAds&&(v()==="paused"||v()==="playing"),Ii=!Ai&&!r().has("TIMELINE"),Gi=Ie.shiftKey&&["Digit1","Numpad1"].includes(rt);if(!Gi&&!(gi||Ai))return!1;U({message:`key down, code: ${rt}, isExternal = ${gt}`});let oi=!1,ut=()=>{oi=!0,gt||Ie.preventDefault()};if(ct(rt),Gi)return kt(Ie),ut(),!0;switch(rt){case"KeyJ":case"ArrowLeft":{if(!Ii)break;if(Ie.ctrlKey||Ie.altKey){let Ct=E.actions.internal.getPrevEpisode();E.actions.internal.seekToPrevEpisode(Ct),Ct&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:Ct.text}),ut()}else{let Ct=Ie.shiftKey?ze(!1):W.controls.seekStepKeyboard/1e3,fi=Math.max(_()-Ct,0);_()>0&&(E.actions.internal.seekTime(fi,Yn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:Ct.toString()}),ut())}break}case"KeyL":case"ArrowRight":{if(!Ii)break;if(Ie.ctrlKey||Ie.altKey){let Ct=E.actions.internal.getNextEpisode();E.actions.internal.seekToNextEpisode(Ct),Ct&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:Ct.text}),ut()}else{let Ct=Ie.shiftKey?ze(!0):W.controls.seekStepKeyboard/1e3,fi=Math.min(_()+Ct,y());Math.round(_())<Math.round(y())&&(E.actions.internal.seekTime(fi,Yn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:Ct.toString()}),ut())}break}case"ArrowUp":{if(ca({isAudioDisabled:Ze,audioDisabledHintCallback:ue,isAudioAvailable:$(),audioIsNotExistHintCallback:me,isAds:e.isAds})){let Ct=x(),fi=W.controls.volumeStepKeyboard,di=Ct<=1;if(ku(E,Ct,fi),di){let We=Math.round(Hf(Ct,fi)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:We}})}}ut();break}case"ArrowDown":{if(ca({isAudioDisabled:Ze,audioDisabledHintCallback:ue,isAudioAvailable:$(),audioIsNotExistHintCallback:me,isAds:e.isAds})){let Ct=x(),fi=W.controls.volumeStepKeyboard,di=Ct>=0;if(Lu(E,Ct,fi),di){let We=Math.round(Ff(Ct,fi)*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 Ct=E.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:Ct==null?void 0:Ct.displayValue}),ut()}}else{if(Ai||d()!==Ba.PAUSED)break;let Ct=Math.max(_()-W.controls.seekStepFrame/1e3,0);_()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),E.actions.internal.clearDelayedBufferingCheckTimeout(),E.actions.internal.seekTime(Ct,Yn.DOUBLE_TAP),ut())}break}case"Period":{if(Ie.shiftKey){if(!f()&&I()){let Ct=E.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:Ct==null?void 0:Ct.displayValue}),ut()}}else{if(Ai||d()!==Ba.PAUSED)break;let Ct=Math.min(_()+W.controls.seekStepFrame/1e3,y());_()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),E.actions.internal.clearDelayedBufferingCheckTimeout(),E.actions.internal.seekTime(Ct,Yn.DOUBLE_TAP),ut())}break}case"KeyK":we(),ut();break;case"Space":Fe(Ie.repeat),ut();break;case"KeyM":{ca({isAudioDisabled:Ze,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:(Yi=R())==null?void 0:Yi.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,Yn.DOUBLE_TAP),ut();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.2,Yn.DOUBLE_TAP),ut();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.3,Yn.DOUBLE_TAP),ut();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.4,Yn.DOUBLE_TAP),ut();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.5,Yn.DOUBLE_TAP),ut();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.6,Yn.DOUBLE_TAP),ut();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.7,Yn.DOUBLE_TAP),ut();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.8,Yn.DOUBLE_TAP),ut();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(.9,Yn.DOUBLE_TAP),ut();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),E.actions.internal.seekToPercent(0,Yn.DOUBLE_TAP),ut();break;case"Slash":{Ie.shiftKey&&W.features.hotKeyMapModal&&(e.showKeyMap(),ut());break}case"KeyN":Ie.shiftKey&&k()&&(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:z0(rt);break}return oi},ti=Ie=>{let gt=Ie.code;if(Ie.ctrlKey||Ie.altKey||Ie.metaKey)return;let ye=d()===Ba.PLAYING||d()===Ba.PAUSED,qe=e.isAds&&(v()==="paused"||v()==="playing");if(ye||qe)switch(gt){case"ShiftLeft":case"ShiftRight":ne=0;break;case"Space":nt();break}},yt=q("aria_label_video_player"),Mt=()=>{var Ie;return(Ie=n(Le))==null?void 0:Ie.focus()},Vt=()=>n(Le)===Mu(),Wt=Ie=>Ie.type==="keydown"?at(Ie,!0):(Ie.type==="keyup"&&ti(Ie),!1);var Te=K0();Te.__keyup=ti,Te.__keydown=[W0,at];var G=C(Te);Xt(G,()=>{var Ie;return(Ie=e.children)!=null?Ie:_t}),S(Te),tt(Te,Ie=>D(Le,Ie),()=>n(Le)),N(()=>De(Te,"aria-label",yt)),b(t,Te);var Oe=H({focus:Mt,isFocused:Vt,handleExternalKeyboardEvent:Wt});return o(),Oe}Xe(["keyup","keydown"]);var q0=L('<div class="container s-o"><div class="dot s-o"></div> <div class="dot s-o"></div> <div class="dot s-o"></div></div>'),G0={hash:"s-o",code:".container.s-o{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-o:first-child{animation-delay:0s}.dot.s-o:nth-child(2){animation-delay:.18s}.dot.s-o:nth-child(3){animation-delay:.36s}@keyframes s-o-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-o{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-o-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-o+.dot:where(.s-o){margin-left:4px}"};function Ha(t,e){Q(t,G0);let i=g(e,"style",3,"");var o=q0();N(()=>Ke(o,i())),b(t,o)}var Y0=Ae('<path d="M5.26 5.26a.9.9 0 0 1 1.28 0L12 10.73l5.46-5.47a.9.9 0 0 1 1.28 1.28L13.27 12l5.47 5.46a.9.9 0 1 1-1.28 1.28L12 13.27l-5.46 5.47a.9.9 0 1 1-1.28-1.28L10.73 12 5.26 6.54a.9.9 0 0 1 0-1.28Z"></path>');function zf(t,e){Ye(t,{get fill(){return e.fill},children:(i,o)=>{var r=Y0();b(i,r)},$$slots:{default:!0}})}import{noop as Ol}from"@vkontakte/videoplayer-shared/es2018";var j0=t=>{t.stopPropagation()},X0=L("<button><!></button>"),Z0={hash:"s-1t",code:"button.btn.s-1t{align-items:center;display:flex;flex-direction:row;height:var(--controls-height);justify-content:center;margin:0;padding:8px;will-change:opacity}button.w-max.s-1t{width:100%}button.btn--live.s-1t{padding:10px 4px}button.btn-jc-l.s-1t{justify-content:left}button.btn-m.s-1t{background-color:rgba(0,0,0,.56);border-radius:12px;height:44px;left:12px;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}button.btn-m.s-1t,button.btn-m--play.s-1t{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1t{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1t,button.btn-m--prev.s-1t{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1t{right:calc(100% + 35px)}button.btn-m--next.s-1t{left:calc(100% + 35px)}button.btn.s-1t:disabled{cursor:default;pointer-events:none}button.btn.s-1t:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1t:not(:disabled):hover{opacity:.8}button.pr-0.s-1t{padding-right:0}button.pl-0.s-1t{padding-left:0}"};function Ot(t,e){B(e,!0),Q(t,Z0);let i=g(e,"className",3,""),o=g(e,"style",3,""),r=g(e,"disabled",3,void 0),a=g(e,"testId",3,void 0),l=g(e,"ariaHidden",3,void 0),d=g(e,"ariaLabel",3,void 0),s=g(e,"ref",15,void 0),u=g(e,"ariaKeyShortCut",3,void 0),f=g(e,"ariaExpanded",3,void 0),p=g(e,"tabIndex",3,0),v=g(e,"click",3,Ol),_=g(e,"focus",3,Ol),y=g(e,"blur",3,Ol),$=m(()=>v()===Ol?null:k=>{k.stopPropagation(),v()(k)}),x=m(()=>_()===Ol?null:k=>{k.preventDefault(),_()()}),I=m(()=>y()===Ol?null:k=>{k.preventDefault(),y()()});var T=X0();T.__pointerdown=[j0],T.__click=function(...k){var P;(P=n($))==null||P.apply(this,k)};var R=C(T);Xt(R,()=>{var k;return(k=e.children)!=null?k:_t}),S(T),tt(T,k=>s(k),()=>s()),N(()=>{var k,P,E,W,U,z,Y,ie;te(T,1,`btn ${(k=i())!=null?k:""}`,"s-1t"),Ke(T,o()||null),T.disabled=(P=r())!=null?P:null,De(T,"aria-hidden",(E=l())!=null?E:null),De(T,"aria-label",(W=d())!=null?W:null),De(T,"aria-keyshortcuts",(U=u())!=null?U:null),De(T,"aria-expanded",(z=f())!=null?z:null),De(T,"data-testid",(Y=a())!=null?Y:null),De(T,"tabindex",p()),De(T,"role",e.role),De(T,"aria-checked",(ie=e.areaChecked)!=null?ie:null)}),mt("focus",T,function(...k){var P;(P=n(x))==null||P.apply(this,k)}),mt("blur",T,function(...k){var P;(P=n(I))==null||P.apply(this,k)}),b(t,T),H()}Xe(["pointerdown","click"]);var J0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},ey=L('<div class="modal-header s-1l"><h3 class="modal-title s-1l"> </h3> <!></div>'),ty=L('<div class="modal-overlay s-1l"><div class="modal-container s-1l" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-1l" tabindex="0" role="scrollbar"><div class="modal-main s-1l"><!></div></div></div></div>'),iy={hash:"s-1l",code:'.modal-overlay.s-1l{align-items:center;background:transparent;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:var(--modal-z-index)}.modal-container.s-1l{background:var(--mobile-settings-bg);border-radius:8px;color:var(--white);display:flex;flex-direction:column;height:calc(100% - 24px);max-height:490px;max-width:600px;width:calc(100% - 32px)}.modal-header.s-1l{align-items:start;border-bottom:1px solid var(--white-alpha-24);box-sizing:border-box;display:flex;height:40px;justify-content:space-between;padding:8px 10px}.modal-title.s-1l{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px;margin:3px 0 0 6px}.modal-scroll.s-1l{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-1l::-webkit-scrollbar{width:8px}.modal-scroll.s-1l::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-1l::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-1l::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-1l{margin:-8px -4px 0 0}'};function Wf(t,e){B(e,!0),Q(t,iy);let i=g(e,"showHeader",3,!0),o=g(e,"showCloseCross",3,!0),r=K(void 0),a=K(void 0),{webApi:{focusManager:l}}=xe(),d=q("hotkey_map_modal_close_btn_text");Pt(()=>{var $;return($=n(r))==null||$.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var s=ty();s.__keydown=[J0,e];var u=C(s),f=C(u);{var p=$=>{var x=ey(),I=C(x),T=C(I,!0);S(I);var R=A(I,2);{var k=P=>{Ot(P,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(E,W)=>{zf(E,{fill:"currentColor"})},$$slots:{default:!0}})};M(R,P=>{o()&&P(k)})}S(x),N(()=>he(T,e.title)),b($,x)};M(f,$=>{i()&&$(p)})}var v=A(f,2),_=C(v),y=C(_);Xt(y,()=>{var $;return($=e.children)!=null?$:_t}),S(_),S(v),tt(v,$=>D(r,$),()=>n(r)),S(u),tt(u,$=>D(a,$),()=>n(a)),S(s),b(t,s),H()}Xe(["keydown"]);var oy=new Set(["BR"]),V_=t=>{var r;let e=document.createElement("DIV");e.innerHTML=t;let i=e.querySelectorAll("*"),o=i.length;for(;o--;){let a=i[o],l=a.tagName;oy.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var ny=L('<li class="hot-key-map-item s-19"><span class="hot-key-map-item-description s-19"><!></span> &nbsp; <span class="hot-key-map-item-value s-19"> </span></li>'),ry=L('<div class="hot-key-map-group s-19"><h5 class="hot-key-map-group-title s-19"> </h5> <ul class="hot-key-map-group-items s-19"></ul></div>'),sy=L('<div class="hot-key-map s-19"></div>'),ay={hash:"s-19",code:'.hot-key-map.s-19{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-19{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-19:last-child{border-bottom:none}.hot-key-map-group-title.s-19{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px}.hot-key-map-group-title.s-19,.hot-key-map-item.s-19{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-19{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-19{align-items:center;box-sizing:border-box;display:flex;justify-content:space-between;--videoplayer-hotkey-item-value-width:156px;--videoplayer-hotkey-item-value-padding-left:24px}.hot-key-map-item-description.s-19{color:var(--white-alpha-72);max-width:388px;width:calc(100% - var(--videoplayer-hotkey-item-value-width) - var(--videoplayer-hotkey-item-value-padding-left))}.hot-key-map-item-value.s-19{color:var(--white);letter-spacing:-.14px;padding-left:var(--videoplayer-hotkey-item-value-padding-left);width:var(--videoplayer-hotkey-item-value-width)}.hot-key-map-item-description.s-19,.hot-key-map-item-value.s-19{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function Kf(t,e){B(e,!1),Q(t,ay);let[i,o]=Be(),r=()=>w(l,"$data",i),a=xe(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};Wo(),Wf(t,{get title(){return r().title},onClose:s,children:(u,f)=>{var p=sy();_i(p,5,()=>r().groups,({title:v,items:_})=>v,(v,_)=>{let y=()=>n(_).title,$=()=>n(_).items;var x=ry(),I=C(x),T=C(I,!0);S(I);var R=A(I,2);_i(R,5,$,({description:k,value:P})=>P,(k,P)=>{let E=()=>n(P).description,W=()=>n(P).value;var U=ny(),z=C(U),Y=C(z);xd(Y,()=>V_(E())),S(z);var ie=A(z,2),J=C(ie,!0);S(ie),S(U),N(()=>he(J,W())),b(k,U)}),S(R),S(x),N(()=>he(T,y())),b(v,x)}),S(p),b(u,p)},$$slots:{default:!0}}),H(),o()}import{noop as vb}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as db,PlaybackState as Hm}from"@vkontakte/videoplayer-core/es2018";import{getVideoQualityLabel as hy}from"@vkontakte/videoplayer-shared/es2018";var ly=L('<div class="pillow s-1x"><!></div>'),dy={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 Qf(t,e){Q(t,dy);var i=ly(),o=C(i);Xt(o,()=>{var r;return(r=e.children)!=null?r:_t}),S(i),N(()=>De(i,"data-testid",e.testId)),b(t,i)}import{VideoQuality as Wd}from"@vkontakte/videoplayer-shared/es2018";var cy=Ae('<svg><!><path d="M5.52 5c.32 0 .51-.2.51-.54V3.5l.5-.51 1.46 1.74c.16.2.3.28.51.28a.5.5 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.3 2.3 8.8.87c.16-.14.2-.25.2-.4A.47.47 0 0 0 8.52 0c-.18 0-.3.07-.45.22l-2 2.03h-.04V.54C6.03.2 5.84 0 5.52 0S5 .2 5 .54v3.92c0 .34.2.54.52.54M2.55 1.05 1.05 3.1h1.5zM3.5 3.1V.83C3.5.03 2.41-.3 1.94.35L.14 2.82A.75.75 0 0 0 .75 4h1.8v.55c0 .25.25.45.5.45a.45.45 0 0 0 .45-.45V4h.05a.45.45 0 0 0 0-.9z"></path></svg>');function qf(t,e){let i=Ln(e,["$$slots","$$events","$$legacy","children"]);var o=cy();to(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=C(o);Xt(r,()=>{var a;return(a=e.children)!=null?a:_t}),Yt(),S(o),b(t,o)}var uy=Ae('<svg><!><path d="M5.51 5c.33 0 .52-.2.52-.54V3.5l.49-.51L7.99 4.7c.16.21.3.29.51.29a.49.49 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.29 2.3 8.82.87C8.95.73 9 .62 9 .47A.47.47 0 0 0 8.52 0c-.17 0-.3.07-.44.22L6.06 2.25h-.03V.54C6.03.2 5.83 0 5.5 0S5 .2 5 .54v3.92c0 .34.19.54.51.54M2 0c-.35 0-.67.06-.95.17a1.5 1.5 0 0 0-.66.49c-.15.2-.23.44-.23.7 0 .43.21.76.62 1-.23.11-.41.26-.55.44-.15.2-.23.44-.23.71 0 .29.08.55.25.78.18.23.41.4.71.52.3.13.65.19 1.04.19s.73-.06 1.03-.19c.3-.12.54-.3.71-.52a1.26 1.26 0 0 0 .03-1.49 1.45 1.45 0 0 0-.55-.44c.4-.23.62-.57.62-1a1.14 1.14 0 0 0-.24-.7 1.44 1.44 0 0 0-.66-.49A2.4 2.4 0 0 0 2 0m-.57.96C1.56.86 1.75.8 2 .8s.43.06.56.16a.51.51 0 0 1 .2.43c0 .2-.06.34-.2.44A.87.87 0 0 1 2 2a.9.9 0 0 1-.57-.16.52.52 0 0 1-.2-.44c0-.18.06-.32.2-.43ZM1.08 3.5a.6.6 0 0 1 .24-.5c.16-.13.38-.2.68-.2s.52.07.68.2a.6.6 0 0 1 .24.5.63.63 0 0 1-.24.52c-.16.12-.38.19-.68.19s-.52-.07-.68-.19a.64.64 0 0 1-.24-.52"></path></svg>');function Gf(t,e){let i=Ln(e,["$$slots","$$events","$$legacy","children"]);var o=uy();to(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=C(o);Xt(r,()=>{var a;return(a=e.children)!=null?a:_t}),Yt(),S(o),b(t,o)}var py=Ae('<svg><!><path d="M5.52 5h1.1C8.1 5 9 4.07 9 2.5S8.1 0 6.62 0h-1.1C5.19 0 5 .2 5 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47C7.41.85 8 1.47 8 2.5c0 1.07-.58 1.65-1.5 1.65zM.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S4 4.8 4 4.46V.54C4 .2 3.8 0 3.48 0s-.51.2-.51.54v1.53H1.03V.54C1.03.2.84 0 .52 0S0 .2 0 .54v3.99c0 .34.2.47.52.47"></path></svg>');function Yf(t,e){let i=Ln(e,["$$slots","$$events","$$legacy","children"]);var o=py();to(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);Xt(r,()=>{var a;return(a=e.children)!=null?a:_t}),Yt(),S(o),b(t,o)}var fy=Ae('<svg><!><path d="M9.52 5h1.1C12.1 5 13 4.07 13 2.5S12.1 0 10.62 0h-1.1C9.19 0 9 .2 9 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zM4.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S8 4.8 8 4.46V.54C8 .2 7.8 0 7.48 0s-.51.2-.51.54v1.53H5.03V.54C5.03.2 4.84 0 4.52 0S4 .2 4 .54v3.99c0 .34.2.47.52.47m-4 0c.32 0 .51-.2.51-.54V3h1.33c.27 0 .45-.15.45-.41 0-.25-.18-.4-.45-.4H1.03V.84h1.5C2.81.85 3 .7 3 .43S2.8 0 2.53 0H.52C.19 0 0 .2 0 .54v3.92C0 4.8.2 5 .52 5"></path></svg>');function jf(t,e){let i=Ln(e,["$$slots","$$events","$$legacy","children"]);var o=fy();to(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);Xt(r,()=>{var a;return(a=e.children)!=null?a:_t}),Yt(),S(o),b(t,o)}var my=Ae('<svg><!><path d="M11.52 5.75h1.1c1.48 0 2.38-.94 2.38-2.5s-.9-2.5-2.38-2.5h-1.1c-.33 0-.52.2-.52.54V5.2c0 .34.2.54.52.54Zm.51-.85V1.6h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zm-5.51.85c.32 0 .51-.2.51-.54V3.67h1.94v1.54c0 .34.19.54.51.54s.52-.2.52-.54V1.3c0-.34-.2-.54-.52-.54s-.51.2-.51.54v1.53H7.03V1.3c0-.34-.19-.54-.51-.54S6 .95 6 1.29v3.99c0 .34.2.47.52.47m-3.18-.09a4 4 0 0 1-.84.09C1.04 5.75 0 4.88 0 3.3 0 1.73 1.04.75 2.5.75S5 1.73 5 3.3c0 .87-.27 1.46-.78 1.88l.2.3a.5.5 0 0 1-.84.55zm-.52-.78-.24-.35a.5.5 0 1 1 .84-.56l.24.37c.18-.26.29-.62.29-1.04 0-1.03-.64-1.65-1.45-1.65s-1.45.62-1.45 1.65.64 1.6 1.45 1.6c.08 0 .2 0 .32-.02"></path></svg>');function Xf(t,e){let i=Ln(e,["$$slots","$$events","$$legacy","children"]);var o=my();to(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img",...i}));var r=C(o);Xt(r,()=>{var a;return(a=e.children)!=null?a:_t}),Yt(),S(o),b(t,o)}var Vu=t=>{switch(t){case Wd.Q_720P:return Yf;case Wd.Q_1080P:return jf;case Wd.Q_1440P:return Xf;case Wd.Q_2160P:return qf;case Wd.Q_4320P:return Gf}};var vy=Ae('<path d="M12.72 2.21q1.8.07 2.41 1.96l.06.21.06.2.06.23.06.16.04.01.06-.02.14-.05.15-.07c1.42-.66 2.5-.53 3.4.44l.12.14.82 1.02c.73.96.7 2 0 3.1l-.13.19-.12.16-.14.2-.07.12-.04.05v.03l.1.06.13.07.15.09c1.39.7 1.96 1.64 1.74 2.93l-.04.19-.24 1.06c-.16.68-.28 1-.77 1.45-.48.43-1.02.61-1.73.67l-.22.02h-.2l-.25.02-.18.02.02.14v.1l.04.17c.32 1.53-.04 2.56-1.19 3.2l-.17.1-1.17.57q-1.64.73-3.02-.7l-.15-.17-.13-.15-.17-.19-.1-.1-.05-.04-.1.09-.1.1-.12.14c-.95 1.13-1.95 1.54-3.17 1.07l-.18-.08-1.05-.5-.31-.17a2 2 0 0 1-1-1.06 3 3 0 0 1-.16-1.88l.04-.23.04-.24.02-.17-.1-.02-.15-.01h-.18c-1.56-.04-2.48-.62-2.85-1.89l-.05-.18-.3-1.28q-.33-1.77 1.37-2.78l.2-.11.17-.1.22-.12.15-.1v-.02l-.06-.1-.08-.13-.1-.14c-.94-1.25-1.04-2.34-.28-3.4L4 6.32l.82-1.01c.8-.92 1.8-1.1 3.04-.64l.2.08.19.08.22.1.13.04.04-.01.03-.1.05-.13.04-.17c.36-1.43 1.09-2.24 2.4-2.35h1.58Zm-.05 1.8h-1.34l-.14.01c-.28.04-.47.2-.65.83l-.04.16-.06.2a6 6 0 0 1-.46 1.14 6 6 0 0 0-1.15.56 7 7 0 0 1-1.16-.35l-.35-.16q-.37-.15-.59-.17h-.08a.6.6 0 0 0-.4.19l-.08.07-.78.98-.1.12c-.18.26-.2.5.2 1.08l.22.31q.34.48.6 1.1-.2.59-.27 1.2-.51.45-1.01.73l-.34.18c-.62.34-.7.56-.65.88l.01.08.28 1.21.04.16c.1.3.27.47.97.5l.39.02q.57.03 1.22.2.35.53.78.97a6 6 0 0 1-.12 1.45c-.2.95-.01 1.1.38 1.3l1.13.54a1 1 0 0 0 .34.1l.06-.01q.26-.03.67-.49l.26-.3q.4-.42.95-.83l.3.02.3.01h.3l.3-.03q.56.4.95.84l.26.3c.32.36.53.48.73.48h.07l.18-.05.09-.04 1.13-.54.14-.08c.3-.17.42-.4.24-1.22a6 6 0 0 1-.12-1.45q.44-.45.78-.97a7 7 0 0 1 1.22-.2l.39-.01c.81-.04.91-.26 1-.66l.27-1.15c.09-.4.1-.64-.62-1.03l-.34-.18a6 6 0 0 1-1.01-.73 6 6 0 0 0-.27-1.2q.26-.62.6-1.1l.22-.31c.4-.58.38-.81.2-1.08l-.05-.06-.78-.97c-.14-.18-.26-.3-.46-.33h-.07q-.23 0-.67.17l-.35.16a6 6 0 0 1-1.16.35 6 6 0 0 0-1.15-.56 7 7 0 0 1-.45-1.1l-.11-.4c-.2-.68-.4-.81-.72-.83zM12 8.2a3.8 3.8 0 1 1 0 7.6 3.8 3.8 0 0 1 0-7.6m0 1.8a2 2 0 1 0 0 4 2 2 0 0 0 0-4"></path>');function Zf(t,e){Ye(t,{get testId(){return e.testId},children:(i,o)=>{var r=vy();b(i,r)},$$slots:{default:!0}})}var gy=Ae('<path d="M13.25 2.83c.23.75.38 1.5 1.63 2.23 1.4.38 2.08 0 2.72-.42.66-.45.86-.32 1.12-.06l.65.64c.29.3.4.42 0 1.18-.38.7-.8 1.33-.42 2.73.72 1.25 1.47 1.47 2.22 1.62.78.16.83.39.83.76v.9c0 .42 0 .59-.83.84-.75.23-1.5.38-2.23 1.63-.38 1.4 0 2.08.42 2.72.45.66.32.86.06 1.12l-.64.65c-.3.29-.42.4-1.18 0-.7-.38-1.34-.8-2.73-.42-1.25.72-1.47 1.47-1.62 2.22-.16.78-.39.83-.76.83h-.9c-.42 0-.59 0-.84-.83-.23-.75-.38-1.5-1.63-2.23-1.4-.38-2.08 0-2.72.42-.66.45-.86.32-1.12.06l-.65-.64c-.29-.3-.4-.42 0-1.18.38-.7.8-1.34.42-2.73-.72-1.25-1.47-1.47-2.22-1.62-.78-.16-.83-.39-.83-.76v-.9c0-.42 0-.59.83-.84.75-.23 1.5-.38 2.22-1.63.38-1.4 0-2.08-.42-2.72-.44-.66-.31-.86-.05-1.12l.64-.65c.3-.29.42-.4 1.18 0 .7.38 1.33.8 2.73.42 1.25-.72 1.47-1.47 1.62-2.22.16-.78.39-.83.76-.83h.9c.42 0 .59 0 .84.83M12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5"></path>');function Jf(t,e){Ye(t,{get testId(){return e.testId},children:(i,o)=>{var r=gy();b(i,r)},$$slots:{default:!0}})}var _y=L('<div aria-hidden="true"><!> <!></div>'),by={hash:"s-1v",code:".icon.s-1v{display:flex;height:24px;position:relative;width:24px}.icon.s-1v .pillow{position:absolute;right:-9px;top:1px}.icon.triple.s-1v .pillow{right:-13px}.icon.s-1v svg[data-testid=settings-icon--labeled] ._full{opacity:0;visibility:hidden}"};function Kd(t,e){B(e,!0),Q(t,by);let i=g(e,"isMobile",3,!1),o=g(e,"currentQuality",3,void 0),r=m(()=>o()?hy(o()):""),a=m(()=>Vu(o())),l=m(()=>n(r).length>2);var d=Ve(),s=le(d);{var u=p=>{Zf(p,{testId:"settings-mobile-icon"})},f=p=>{var v=_y();let _;var y=C(v);{var $=T=>{let R=m(()=>`${n(r)}-pill-icon`);Qf(T,{get testId(){return n(R)},children:(k,P)=>{var E=Ve(),W=le(E);Bi(W,()=>n(a),(U,z)=>{z(U,{})}),b(k,E)},$$slots:{default:!0}})};M(y,T=>{n(a)&&T($)})}var x=A(y,2);let I=m(()=>n(a)?"settings-icon--labeled":"settings-icon");Jf(x,{get testId(){return n(I)}}),S(v),N(T=>_=te(v,1,"icon s-1v",null,_,T),[()=>({triple:n(l)})]),b(p,v)};M(s,p=>{i()?p(u):p(f,!1)})}b(t,d),H()}var $y=L('<span class="settings-icon-wrapper s-1z"><!></span>'),yy={hash:"s-1z",code:".settings-icon-wrapper.s-1z{height:24px;position:relative;width:24px}"};function Bl(t,e){B(e,!0),Q(t,yy);let[i,o]=Be(),r=()=>w(u,"$settingsMenuVisible",i),a=()=>w(v,"$isMobile",i),l=()=>w(s,"$currentQuality",i),d=xe(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,f=d.actions.internal.openSettingsMenu,p=d.actions.internal.closeSettingsMenu,v=d.ui.isMobile,_=d.ui.t,y=K(void 0);He(()=>{n(y)&&Tt(()=>{e.ref$.set(n(y))})});let $=_("aria_label_settings");async function x(T){let R=da(T);r()?p():f(R,uo)}let I=m(()=>r()?"opened":"");Ot(t,{get className(){return n(I)},testId:"settings-btn",click:x,get ariaLabel(){return $},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(T){D(y,T,!0)},children:(T,R)=>{var k=$y(),P=C(k);Kd(P,{get isMobile(){return a()},get currentQuality(){return l()}}),S(k),b(T,k)},$$slots:{default:!0}}),H(),o()}var xy=Ae('<path d="M6.56 4.44a1.5 1.5 0 1 0-2.12 2.12l3.09 3.09a11 11 0 0 0-2.39 3.08 11 11 0 0 0-1.01 4.14C4 18.43 4 20.37 4 22.83v2.34c0 2.46 0 4.4.13 5.96.13 1.6.4 2.93 1.01 4.14a10.5 10.5 0 0 0 4.6 4.59c1.2.61 2.53.88 4.13 1.01 1.56.13 3.5.13 5.96.13h8.34c2.46 0 4.4 0 5.96-.13 1.44-.12 2.66-.35 3.78-.84l3.53 3.53a1.5 1.5 0 0 0 2.12-2.12zM13.5 28a1.5 1.5 0 0 0 0 3h11a1.5 1.5 0 0 0 0-3zM12 22a1.5 1.5 0 0 1 1.5-1.5h4a1.5 1.5 0 0 1 0 3h-4A1.5 1.5 0 0 1 12 22"></path><path d="M34.5 23.5h-4.64l12.55 12.55q.23-.37.45-.78a11 11 0 0 0 1.01-4.14c.13-1.56.13-3.5.13-5.96v-2.34c0-2.46 0-4.4-.13-5.96a11 11 0 0 0-1.01-4.14 10.5 10.5 0 0 0-4.6-4.59 11 11 0 0 0-4.13-1.01C32.57 7 30.63 7 28.17 7h-8.34c-2.46 0-4.4 0-5.96.13l-.35.03L26.86 20.5h7.64a1.5 1.5 0 0 1 0 3"></path>',1),wy=Ae("<path></path>");function ua(t,e){B(e,!0);let i=m(()=>`subtitles-icon${e.type==="off"?"-off":e.type==="outline"?"-outline":""}`),o=m(()=>sn(e.size));Ye(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(i)},get shadow(){return e.shadow},children:(r,a)=>{var l=Ve(),d=le(l);{var s=f=>{var p=xy();Yt(),b(f,p)},u=f=>{var p=wy();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`)),b(m,p)};M(d,m=>{e.type==="off"?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}}),H()}function jf(t,e){B(e,!0);let i=g(e,"isSubtitlesEnabled",3,!1),r=ye().ui.t,a=f(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));Ft(t,{testId:"subtitles-btn",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return fs.KeyC},role:"button",children:(l,d)=>{let s=f(()=>i()?void 0:"outline");aa(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),H()}var by=L('<span class="duration s-26" data-testid="video_duration"> </span>'),$y=L('<div data-testid="time"><span class="current s-26" data-testid="current_time"> </span> <!></div>'),yy={hash:"s-26",code:'.time.s-26{align-items:center;color:var(--controls-time);display:flex;font-variant-numeric:tabular-nums;font-weight:500;padding:12px 6px}.time.mobile.s-26{padding:0 0 0 8px}.current.s-26{position:relative}.duration.s-26{opacity:.7}.duration.s-26:before{content:" / ";white-space:pre}'};function Bd(t,e){B(e,!0),q(t,yy);let i=g(e,"isMobile",3,!1),o=g(e,"isHidden",3,!1),r=g(e,"showDuration",3,!0),a=g(e,"ref",15),l=Lt(),d=se(!1),s=f(()=>Xo(e.duration)),u=f(()=>Xo(e.position));var m=$y();let p;var v=C(m),_=C(v,!0);S(v);var $=A(v,2);{var y=x=>{var I=by(),T=C(I,!0);S(I),N(()=>he(T,n(s))),b(x,I)};M($,x=>{r()&&x(y)})}S(m),Ls(m,()=>kl(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),et(m,x=>a(x),()=>a()),N(x=>{p=ie(m,1,"time s-26",null,p,x),he(_,n(u))},[()=>({mobile:i()})]),b(t,m),H()}import{noop as ku}from"@vkontakte/videoplayer-shared/es2018";var xy=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),wy=ke("<path></path>"),Sy=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 la(t,e){B(e,!0);let i=g(e,"volume",3,1),o=g(e,"muted",3,!1),r=(u,m)=>m?"off":u>.5?"max":u>.2?"mid":u>0?"min":"off",a=f(()=>r(i(),o())),l=f(()=>dn(e.size)),d="M16.8748 8.85259C17.2324 8.50731 17.8021 8.51726 18.1474 8.87481C18.5465 9.28803 18.8614 9.77691 19.0757 10.3128C19.2901 10.8486 19.4 11.4218 19.4 12C19.4 12.5782 19.2901 13.1514 19.0757 13.6872C18.8614 14.2231 18.5465 14.712 18.1474 15.1252C17.8021 15.4827 17.2324 15.4927 16.8748 15.1474C16.5173 14.8021 16.5073 14.2324 16.8526 13.8748C17.0876 13.6314 17.2757 13.3408 17.4045 13.0187C17.5333 12.6966 17.6 12.3504 17.6 12C17.6 11.6496 17.5333 11.3034 17.4045 10.9813C17.2757 10.6592 17.0876 10.3686 16.8526 10.1252C16.5073 9.76764 16.5173 9.19788 16.8748 8.85259Z",s="M19.2636 6.2636C19.6151 5.91213 20.1849 5.91213 20.5364 6.2636C21.2516 6.97878 21.9929 7.99659 22.3989 8.97678C22.7959 9.93525 23.0003 10.9625 23.0003 12C23.0003 13.0374 22.7959 14.0647 22.3989 15.0232C21.9929 16.0034 21.2516 17.0212 20.5364 17.7364C20.1849 18.0879 19.6151 18.0879 19.2636 17.7364C18.9121 17.3849 18.9121 16.8151 19.2636 16.4636C19.8484 15.8788 20.4384 15.0527 20.7359 14.3343C21.0425 13.5943 21.2003 12.801 21.2003 12C21.2003 11.1989 21.0425 10.4057 20.7359 9.66561C20.4384 8.94724 19.8484 8.12124 19.2636 7.5364C18.9121 7.18492 18.9121 6.61508 19.2636 6.2636Z";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=Sy(),v=A(ae(p));{var _=y=>{var x=xy();Jt(),b(y,x)},$=y=>{var x=wy();N(()=>Ne(x,"d",`${d}${n(a)==="max"?s:""}`)),b(y,x)};M(v,y=>{n(a)==="off"?y(_):y($,!1)})}b(u,p)},$$slots:{default:!0}}),H()}import{isNonNullable as k_,noop as Qn}from"@vkontakte/videoplayer-shared/es2018";import{noop as Zf}from"@vkontakte/videoplayer-shared/es2018";import{noop as Ty}from"@vkontakte/videoplayer-shared/es2018";var Cy=L('<div class="overlay"><!></div>');function Xf(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(l,"$overlayContainer$",i),l=ye().ui.overlayContainer$,d=K(void 0),s=v=>{!v||!n(d)||!v.contains(n(d))||v.removeChild(n(d))},u=v=>{!v||!n(d)||v.contains(n(d))||v.appendChild(n(d))};He(()=>{u(r())}),kt(()=>(u(r()),()=>s(r())));var m=Cy(),p=C(m);ei(p,()=>{var v;return(v=e.children)!=null?v:ht}),S(m),et(m,v=>D(d,v),()=>n(d)),b(t,m),H(),o()}var Iy=L('<div class="tooltip s-1l"><div class="content s-1l"> </div> <div class="tooltip-pointer s-1l"></div></div>'),Ey=L("<div><!></div> <!>",1),Py={hash:"s-1l",code:'.tooltip-wrapper.s-1l{display:flex;flex-direction:column;min-width:0}.full-width.s-1l{width:100%}.tooltip.s-1l{bottom:100%;left:0;opacity:0;position:absolute;transition:opacity .2s,visibility .2s;visibility:hidden}.content.s-1l{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.tooltip-pointer.s-1l{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;line-height:0;position:absolute;width:0}'};function Oa(t,e){B(e,!0),q(t,Py);let[i,o]=Be(),r=()=>w(j,"$overlayContainer$",i),a=()=>w(U,"$containerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"content",3,""),s=g(e,"active",15,!1),u=g(e,"translateX",3,0),m=g(e,"translateY",3,0),p=g(e,"isFullWidthWrapper",3,!1),v=g(e,"maxTooltipWidth",3,void 0),_=g(e,"placement",3,"top"),$=g(e,"onVisibilityChange",3,Ty),y=5,x=K(void 0),I=K(void 0),T,R=K(0),k=K(0),P=K(0),E=K(0),W=Lt(),F=ye(),U=F.ui.playerSize,j=F.ui.overlayContainer$;He(()=>{Tt(()=>{$()(s())})});let re=F.getLogger().createComponentLog("Tooltip component"),G=te=>{if(!r()||!n(I)||!n(x))return;D(k,y);let ce=r().getBoundingClientRect(),we=n(x).getBoundingClientRect(),Ee=we.width,Ye=n(I).clientWidth,Ae=a().width,Te=(Ee-Ye)/2,Fe=we.left+u()-ce.left,gt=Fe+Te,Mt=we.top+m()-ce.top,Ct=Ye/2-y,dt=gt<8,St=gt+Ye>Ae-8;te==="top-left"&&(gt=Fe),dt&&(gt=8,Ct=Fe+we.width/2-2.5*y),St&&(gt=Ae-8-Ye,Ct=we.left-ce.left+we.width/2-gt-y),D(P,gt,!0),D(E,Mt),D(R,Ct,!0)},oe=()=>{!r()||!n(I)||!n(x)||D(k,-y)},X=()=>{if(!r()||!n(I)||!n(x))return;D(R,y);let te=r().getBoundingClientRect(),ce=n(x).getBoundingClientRect(),we=ce.height,Ee=n(I).clientHeight,Ye=(we-Ee)/2+Ee,Ae=ce.left+u()-te.left-n(I).clientWidth,Te=2,Fe=Ae-y;Fe<8&&(Fe=8);let Mt=ce.top+m()-te.top+Ye,Ct=Te-Ye/2,dt=Te-y;D(P,Fe,!0),D(E,Mt),D(k,Ct),D(R,dt)},Ie=()=>{!r()||!n(I)||!n(x)||D(R,-y)},fe=()=>{switch(_()){case"top":G();break;case"bottom":oe();break;case"left":X();break;case"top-left":G("top-left");break;default:Ie();break}},ee=()=>{try{if(!r()||!n(x))return;fe(),s(!0)}catch(te){re({message:String(te)})}},be=()=>{s(!1)},Ce=()=>{n(I)&&(T||(T=window.setTimeout(ee,W.controls.hideTimeoutTooltips)),s()&&ee())},de=()=>{be(),window.clearTimeout(T),T=void 0},We=(te,ce,we)=>{let Ee="";switch(_()){case"top":Ee=`transform: translate(${te}px, ${ce}px);`;break;case"bottom":Ee=`transform: translate(${te}px, ${ce}px); top: auto; bottom: 100%;`;break;case"left":Ee=`transform: translate(${te}px, ${ce}px); left: 0; right: auto;`;break;default:Ee=`transform: translate(${te}px, ${ce}px);`}return Ee+=` max-width: ${v()===void 0?"auto":`${v()}px`};`,Ee+=` opacity: ${we?1:0}; visibility: ${we?"visible":"hidden"}`,Ee},ve=(te,ce)=>{let we="";switch(_()){case"top-left":case"top":we=`transform: translate(${te}px, ${ce}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":we=`transform: translate(${te}px, ${ce}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":we=`transform: translate(${te}px, ${ce}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:we=`transform: translate(${te}px, ${ce}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return we},me=f(()=>We(n(P),n(E),s())),Z=f(()=>ve(n(R),n(k)));kt(fe),ln(()=>window.clearTimeout(T));var O=Ey(),pe=ae(O);let le;pe.__pointermove=Ce,pe.__pointerdown=de,pe.__pointerup=function(...te){var ce;(ce=e.disableMouseupTooltipShow?void 0:Ce)==null||ce.apply(this,te)};var ue=C(pe);ei(ue,()=>{var te;return(te=e.children)!=null?te:ht}),S(pe),et(pe,te=>D(x,te),()=>n(x));var Le=A(pe,2);{var ze=te=>{Xf(te,{children:(ce,we)=>{var Ee=Iy(),Ye=C(Ee),Ae=C(Ye,!0);S(Ye);var Te=A(Ye,2);S(Ee),et(Ee,Fe=>D(I,Fe),()=>n(I)),N(()=>{Ke(Ee,n(me)),he(Ae,d()),Ke(Te,n(Z))}),b(ce,Ee)},$$slots:{default:!0}})};M(Le,te=>{d()&&!l()&&te(ze)})}N(te=>le=ie(pe,1,"tooltip-wrapper s-1l",null,le,te),[()=>({"full-width":p()})]),ft("pointerenter",pe,Ce),ft("pointerleave",pe,de),b(t,O),H(),o()}Je(["pointermove","pointerdown","pointerup"]);var A_=t=>{t.stopPropagation()},Ay=L("<div><!></div>"),ky={hash:"s-18",code:".btn-container.s-18{align-items:center;display:flex;height:100%;position:relative;transition:var(--button-hover-transition);will-change:opacity;-webkit-tap-highlight-color:transparent}.w-max.s-18{min-width:0;width:100%}"};function Po(t,e){B(e,!0),q(t,ky);let[i,o]=Be(),r=()=>w(u,"$isGraphOpened$",i),a=()=>w(s,"$isMobile",i),l=ye(),d=mo(),s=l.ui.isMobile,u=d.graphIsOpened$,m=l.ui.t,p=g(e,"className",3,""),v=g(e,"disabled",3,!1),_=g(e,"hasTooltip",3,!0),$=g(e,"ref",15,void 0),y=g(e,"width",15,void 0),x=g(e,"isFullWidthTooltip",3,!0),I=g(e,"tooltipContent",3,""),T=g(e,"tooltipVisible",3,!1),R=g(e,"tooltipPlacement",3,"top"),k=g(e,"disabledTooltipContent",19,()=>m("tooltip_button_disabled")),P=g(e,"isAriaHidden",3,!1),E=g(e,"onTooltipVisibilityChange",3,Zf),W=g(e,"initialTranslateXPx",3,0),F=g(e,"initialTranslateYPx",19,()=>-18),U=g(e,"mouseEnter",3,Zf),j=g(e,"mouseLeave",3,Zf),re=f(()=>v()?r()?m("tooltip_disabled_when_graph_on"):k():I()),G=K(!1);He(()=>{T()||D(G,!1)});var oe=Ay();oe.__pointerdown=[A_],oe.__click=[A_];var X=C(oe);{var Ie=ee=>{Oa(ee,{get content(){return n(re)},get translateX(){return W()},get translateY(){return F()},get isFullWidthWrapper(){return x()},get placement(){return R()},get onVisibilityChange(){return E()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(G)},set active(be){D(G,be,!0)},children:(be,Ce)=>{var de=De(),We=ae(de);ei(We,()=>{var ve;return(ve=e.children)!=null?ve:ht}),b(be,de)},$$slots:{default:!0}})},fe=ee=>{var be=De(),Ce=ae(be);ei(Ce,()=>{var de;return(de=e.children)!=null?de:ht}),b(ee,be)};M(X,ee=>{_()&&n(re)&&!a()?ee(Ie):ee(fe,!1)})}S(oe),et(oe,ee=>$(ee),()=>$()),N(()=>{var ee;ie(oe,1,`btn-container ${(ee=p())!=null?ee:""}`,"s-18"),Ne(oe,"aria-hidden",P()||null)}),ft("mouseenter",oe,function(...ee){var be;(be=U())==null||be.apply(this,ee)}),ft("mouseleave",oe,function(...ee){var be;(be=j())==null||be.apply(this,ee)}),Tn(oe,"clientWidth",y),b(t,oe),H(),o()}Je(["pointerdown","click"]);var Ly=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 Hd(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,r)=>{var a=Ly(),l=ae(a),d=A(l);N(()=>{Ne(l,"fill",ta),Ne(l,"fill-opacity",e.completed?1:.24),Ne(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),b(o,a)},$$slots:{default:!0}})}var My=L("<div><!></div>"),Vy={hash:"s-y",code:".interactive-episode-icon.s-y{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-y{opacity:.4;pointer-events:none}"};function Jf(t,e){B(e,!0),q(t,Vy);let o=ye().ui.t,r=K(0),a=f(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Po(t,{get tooltipContent(){return n(a)},initialTranslateXPx:-10,initialTranslateYPx:-10,get disabled(){return e.disabled},get width(){return n(r)},isAriaHidden:!0,isFullWidthTooltip:!1,children:(l,d)=>{var s=My();let u;var m=C(s);let p=f(()=>!!e.videoEpisode.completed);Hd(m,{get completed(){return n(p)}}),S(s),N(v=>{u=ie(s,1,"interactive-episode-icon s-y",null,u,v),Ke(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),Tn(s,"clientWidth",v=>D(r,v)),b(l,s)},$$slots:{default:!0}}),H()}var Ry=L('<div><div class="video-episode-inner s-x"><div class="video-episode-loaded s-x"></div> <div></div></div></div>'),Dy=L('<div class="video-episodes-wrap s-x"></div>'),Ny={hash:"s-x",code:".video-episodes-wrap.s-x{height:100%;position:absolute;width:100%}.video-episode.s-x{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-x:first-child{padding-left:0}.video-episode.s-x:last-child{padding-right:0}.video-episode.s-x:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-x,.video-episode-inner.s-x,.video-episode-loaded.s-x{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-x{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-x:first-child .video-episode-inner:where(.s-x),.video-episode.s-x:last-child .video-episode-inner:where(.s-x){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-x{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-x,.video-episode-loaded.s-x{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-x{background-color:var(--slider-filled-bg)}"};function em(t,e){q(t,Ny);let i=g(e,"videoEpisodes",19,()=>[]);var o=Dy();bi(o,21,i,r=>r.from,(r,a)=>{var l=Ry();let d;var s=C(l),u=C(s),m=A(u,2);let p;S(s),S(l),N((v,_)=>{d=ie(l,1,"video-episode s-x",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-x",null,p,_),Ke(m,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),b(r,l)}),S(o),b(t,o)}function Oy(t,e,i,o,r,a,l){if(t.preventDefault(),e()&&D(i,e().getBoundingClientRect(),!0),o()||n(r)||!e())return;D(r,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function By(t,e,i,o,r,a,l,d){if(t.preventDefault(),e())return;let s=i(t.clientX,t.clientY),u=o(t.clientX);r()(s,u,n(a).width,t),n(l)&&d()(s)}function Hy(t,e,i,o,r){if(t.preventDefault(),e()||!n(i))return;D(i,!1);let a=o(t.clientX,t.clientY);r()(a,t)}function Fy(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function Uy(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),D(r,!1),a()(l)}var zy=L("<div></div>"),Wy=L('<div class="bars s-h"><div class="loaded s-h"></div> <div></div></div>'),Ky=L('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),Qy={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 Ba(t,e){B(e,!0),q(t,Qy);let i=g(e,"ref",15,void 0),o=g(e,"className",3,""),r=g(e,"testId",3,void 0),a=g(e,"isHidden",3,!1),l=g(e,"isVertical",3,!1),d=g(e,"isActiveLive",3,!1),s=g(e,"isMobile",3,!1),u=g(e,"squareBorders",3,!1),m=g(e,"videoEpisodes",19,()=>[]),p=g(e,"withWheelHandler",3,!1),v=g(e,"isInteractive",3,!1),_=g(e,"disabled",3,!1),$=g(e,"hideHandel",3,!1),y=g(e,"onPointerDown",3,Qn),x=g(e,"onHandleMove",3,Qn),I=g(e,"onPointerUp",3,Qn),T=g(e,"onPointerEnter",3,Qn),R=g(e,"onPointerMove",3,Qn),k=g(e,"onPointerLeave",3,Qn),P=g(e,"onMouseEnter",3,Qn),E=g(e,"onMouseLeave",3,Qn),W=g(e,"onWheelUp",3,Qn),F=g(e,"onWheelDown",3,Qn),U=g(e,"onWheelLeft",3,Qn),j=g(e,"onWheelRight",3,Qn),re=g(e,"onDisabledClick",3,Qn),G=g(e,"loadedProgress",3,0),oe=g(e,"filledProgress",3,0),X=g(e,"handleProgress",3,0),Ie=g(e,"ariaLabel",3,""),fe=g(e,"ariaValueMin",3,void 0),ee=g(e,"ariaValueMax",3,void 0),be=g(e,"ariaValueNow",3,void 0),Ce=g(e,"ariaValueText",3,""),de=g(e,"onContextMenu",3,Qn),We=g(e,"handleAlwaysVisible",3,!1),ve=Lt(),me=K(void 0),Z=K(!1),O=f(()=>{var xe;return(xe=ee())!=null?xe:0}),pe=f(()=>{var xe;return k_(m())&&((xe=m()[m().length-1])==null?void 0:xe.time)<n(O)}),le=f(()=>k_(m())&&m().length&&n(pe)&&n(O)?Ye(G()*100,oe()*100):[]);function ue(xe){if(xe.preventDefault(),i()&&D(me,i().getBoundingClientRect(),!0),_())return;let Ue=we(xe.clientX,xe.clientY),Se=Ee(xe.clientX);T()(Ue,Se,n(me).width)}function Le(xe){xe.preventDefault(),!_()&&k()()}function ze(){P()()}function te(){E()()}function ce(xe){_()||p()&&(xe.preventDefault(),xe.deltaY<0?W()():xe.deltaY>0?F()():xe.deltaX>0?j()():U()())}function we(xe,Ue){return l()?Math.max(0,Math.min(1,(n(me).height-(Ue-n(me).top))/n(me).height)):Math.min(Math.max(xe-n(me).x,0),n(me).width)/n(me).width}function Ee(xe){return Math.min(Math.max(xe-n(me).x,0),n(me).width)}function Ye(xe,Ue){let Se=ve.features.episodesClustering&&!v()?ve.episodeMinWidthPc:0,wt=[],ge=m()[0].time/n(O)*100,Oe=0,Ge=0;for(let Et=1;Et<m().length;Et++)Oe=m()[Et].time/n(O)*100,Oe-ge>Se&&(wt.push({from:ge,width:Math.max(0,Oe-ge),loadedWidth:Math.max(0,Math.min(Oe,xe)-ge),filledWidth:Math.max(0,Math.min(Oe,Ue)-ge),interactive:m()[Et-1].interactive,completed:m()[Et-1].completed}),ge=m()[Et].time/n(O)*100,Ge++);let at={from:ge,width:Math.max(0,100-ge),loadedWidth:Math.max(0,Math.min(xe,100)-ge),filledWidth:Math.max(0,Math.min(Ue,100)-ge),interactive:m()[Ge].interactive,completed:m()[Ge].completed};100-ge<Se?(Ge-=1,wt[Ge].width+=100-ge,wt[Ge].loadedWidth+=Math.max(0,Math.min(xe,100)-ge),wt[Ge].filledWidth+=Math.max(0,Math.min(Ue,100)-ge)):wt[Ge]=at;let Kt=m()[0].time;if(Kt!==0){let Et=Kt/n(O)*100;wt.unshift({from:0,width:Et,loadedWidth:Math.min(Et,xe),filledWidth:Math.min(Et,Ue)})}return wt}function Ae(xe){return Math.max(0,Math.min(100,xe*100))}let Te=f(()=>Ae(G())),Fe=f(()=>Ae(oe()));var gt=Ky(),Mt=ae(gt);{var Ct=xe=>{var Ue=zy();let Se;bi(Ue,21,()=>n(le),wt=>wt.from,(wt,ge)=>{var Oe=De(),Ge=ae(Oe);{var at=Kt=>{Jf(Kt,{get videoEpisode(){return n(ge)},get disabled(){return _()}})};M(Ge,Kt=>{n(ge).interactive&&Kt(at)})}b(wt,Oe)}),S(Ue),N(wt=>Se=ie(Ue,1,"interactive-icons s-h",null,Se,wt),[()=>({mobile:s(),hidden:s()&&!n(Z)})]),b(xe,Ue)};M(Mt,xe=>{v()&&xe(Ct)})}var dt=A(Mt,2);let St;dt.__pointerdown=[Oy,i,me,_,Z,we,y],dt.__pointermove=[By,_,we,Ee,R,me,Z,x],dt.__pointerup=[Hy,_,Z,we,I],dt.__click=[Fy,_,re,we],dt.__contextmenu=[Uy,we,_,re,Z,de];var qt=C(dt);{var Ot=xe=>{em(xe,{get videoEpisodes(){return n(le)},get disabled(){return _()},get isMobile(){return s()}})},Rt=xe=>{var Ue=Wy(),Se=C(Ue),wt=A(Se,2);let ge;S(Ue),N(Oe=>{Ne(Se,"data-value",n(Te)),Ke(Se,`transform: translateX(${n(Te)}%);`),ge=ie(wt,1,"filled s-h",null,ge,Oe),Ne(wt,"data-value",n(Fe)),Ke(wt,`transform: translateX(${n(Fe)}%);`)},[()=>({"active-live":d()})]),b(xe,Ue)};M(qt,xe=>{n(le).length?xe(Ot):xe(Rt,!1)})}var Ut=A(qt,2);let Q;var Me=C(Ut);let Ve;S(Ut),S(dt),et(dt,xe=>i(xe),()=>i()),N((xe,Ue,Se,wt)=>{var ge,Oe;St=ie(dt,1,`slider ${(ge=o())!=null?ge:""}`,"s-h",St,xe),Ne(dt,"aria-label",Ie()),Ne(dt,"aria-valuemin",fe()),Ne(dt,"aria-valuemax",ee()),Ne(dt,"aria-valuenow",be()),Ne(dt,"aria-valuetext",Ce()),Ne(dt,"data-testid",(Oe=r())!=null?Oe:null),Q=ie(Ut,1,"handleWrap s-h",null,Q,Ue),Ke(Ut,Se),Ve=ie(Me,1,"handle s-h",null,Ve,wt)},[()=>({disabled:_(),"slider-dragging":n(Z),hidden:a(),"handle-always-visible":We(),"slider-vertical":l(),"no-handle":$(),square:u()}),()=>({hidden:$()}),()=>`transform: translateX(${Ae(X())}%);`,()=>({"active-live":d()})]),ft("pointerenter",dt,ue),ft("pointerleave",dt,Le),ft("mouseenter",dt,ze),ft("mouseleave",dt,te),ft("wheel",dt,ce),b(t,gt),H()}Je(["pointerdown","pointermove","pointerup","click","contextmenu"]);var eo=(t,e)=>wd[t]>=wd[e];var Ds=(t,e)=>wd[t]<=wd[e],L_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var Gy=L("<div><!></div>"),Yy=L("<div><!> <!></div>"),jy={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 tm(t,e){var Ee,Ye;B(e,!0),q(t,jy);let[i,o]=Be(),r=()=>w(R,"$isAudioAvailable$",i),a=()=>w(v,"$muted$",i),l=()=>w(p,"$volume$",i),d=()=>w(x,"$currentGridType$",i),s=()=>w(ue,"$controlsVisible",i),u=ye(),m=Lt(),p=u.state.volume$,v=u.state.muted$,{setVolume:_,startVolumeChanging:$,stopVolumeChanging:y}=u.actions.internal,x=u.ui.currentGridType$,I=(Ee=u.callbacks)==null?void 0:Ee.onAudioDoesNotExistHint,T=(Ye=u.callbacks)==null?void 0:Ye.onAudioDisabledHint,R=u.state.isAudioAvailable$,k=u.state.isAudioDisabled,P=u.ui.t,E=K(!1),W,F=f(()=>e.isAds||r()),U=f(()=>!n(F)||a()||l()===0),j=f(()=>Ds(d(),"l")),re=f(()=>n(j)?"":n(U)?!r()||k?P("tooltip_sound_unavailable"):P("tooltip_volume"):P("tooltip_volume_muted")),G=f(()=>n(U)?P("tooltip_volume"):P("tooltip_volume_muted")),oe=f(()=>n(U)?0:l()),X=!1,Ie=f(()=>e.isAds?!1:k?!T:r()?!1:!I);function fe(Ae){$(),_(Ae)}function ee(){Iu(u,l(),m.controls.volumeStepWheel)}function be(){Eu(u,l(),m.controls.volumeStepWheel)}function Ce(Ae){_(Ae)}function de(Ae){_(Ae),y()}function We(){X=!0}function ve(){X=!1,O()}function me(){clearTimeout(W),D(E,!0)}function Z(){O()}function O(){W=window.setTimeout(()=>{X||D(E,!1)},m.controls.volumeBarTimeout)}function pe(Ae){Ae.preventDefault(),Ae.deltaY<0?ee():Ae.deltaY>0&&be()}let le=K(!1),ue=u.ui.controlsVisible;He(()=>{s()||D(le,!1)});var Le=Yy();let ze;var te=C(Le);Oa(te,{get content(){return n(re)},translateY:-18,get active(){return n(le)},set active(Ae){D(le,Ae,!0)},children:(Ae,Te)=>{let Fe=f(()=>n(j)?"btn-volume-vertical":"btn-volume-horizontal");Ft(Ae,{className:"btn-full-opacity",get disabled(){return n(Ie)},get testId(){return n(Fe)},get ariaLabel(){return n(G)},get click(){return e.click},get ariaKeyShortCut(){return fs.KeyM},role:"button",children:(gt,Mt)=>{la(gt,{get size(){return"24"},get volume(){return l()},get muted(){return n(U)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var ce=A(te,2);{var we=Ae=>{var Te=Gy();let Fe;var gt=C(Te);let Mt=f(()=>n(j)?"volumeBar-slider-vertical":""),Ct=f(()=>n(j)&&!n(E)),dt=f(()=>n(j)?We:ku),St=f(()=>n(j)?ve:ku),qt=f(()=>Math.round(n(oe)*100)),Ot=f(()=>`${Math.round(n(oe)*100)}%`),Rt=f(()=>n(j)?"volume-slider-vertical":"volume-slider");Ba(gt,{get className(){return n(Mt)},get isHidden(){return n(Ct)},get isVertical(){return n(j)},withWheelHandler:!0,onWheelUp:ee,onWheelDown:be,onPointerDown:fe,onHandleMove:Ce,onPointerUp:de,get onPointerEnter(){return n(dt)},get onPointerLeave(){return n(St)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(qt)},get ariaValueText(){return n(Ot)},get filledProgress(){return n(oe)},get handleProgress(){return n(oe)},get testId(){return n(Rt)}}),S(Te),N(Ut=>Fe=ie(Te,1,"volumeBar s-27",null,Fe,Ut),[()=>({"volumeBar-vertical":n(j)})]),b(Ae,Te)};M(ce,Ae=>{n(F)&&Ae(we)})}S(Le),N(Ae=>ze=ie(Le,1,"volumeBar-container s-27",null,ze,Ae),[()=>({vertical:n(j)})]),ft("mouseenter",Le,function(...Ae){var Te;(Te=n(j)?me:ku)==null||Te.apply(this,Ae)}),ft("mouseleave",Le,function(...Ae){var Te;(Te=n(j)?Z:ku)==null||Te.apply(this,Ae)}),ft("wheel",Le,pe),b(t,Le),H(),o()}import{noop as Jy}from"@vkontakte/videoplayer-shared/es2018";var Xy=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>'),Zy=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 im(t,e){let i=g(e,"isFullscreen",8,!1),o=yn(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");Xe(t,{get testId(){return n(o)},children:(r,a)=>{var l=De(),d=ae(l);{var s=m=>{var p=Xy();b(m,p)},u=m=>{var p=Zy();b(m,p)};M(d,m=>{i()?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}})}function Fd(t,e){B(e,!0);let i=g(e,"isFullscreen",3,!1),o=g(e,"click",3,Jy),r=ye(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=f(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));Ft(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let m=ra(u);a.set(m),o()()},get ariaKeyShortCut(){return fs.KeyF},role:"button",children:(u,m)=>{im(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),H()}var ex=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 om(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=ex();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"vk-logo-icon",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:ht}),Jt(),S(o),b(t,o)}var tx=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 nm(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=tx();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"95",height:"24",fill:"var(--btn-color, #fff)","fill-rule":"evenodd","aria-hidden":"true","clip-rule":"evenodd",viewBox:"0 0 95 24",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:ht}),Jt(6),S(o),b(t,o)}var ix={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 rm(t,e){B(e,!0),q(t,ix);let i=g(e,"short",3,!1),o=g(e,"isCyrillic",3,!0),r=g(e,"logo",19,()=>"vk_video"),a="vk-video-logo-icon--short",l=24,d=f(()=>!o()&&!i()?91:i()?l:95),s=f(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=f(()=>`0 0 ${n(d)} 24`);nm(t,{get width(){return n(d)},height:"24",get viewBox(){return n(u)},get"data-testid"(){return n(s)},get"data-logo"(){return r()}}),H()}function Ud(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(_,"$isMobile",i),a=()=>w(v,"$currentGridType$",i),l=()=>w(y,"$isCyrillicRelatedInterface$",i),d=g(e,"ref",15,void 0),s=g(e,"logoClickable",3,!1),u=g(e,"targetUrl",3,""),m=Lt(),p=ye(),v=p.ui.currentGridType$,_=p.ui.isMobile,$=p.ui.t,y=p.isCyrillicRelatedInterface$,x=f(()=>m.logoType!=="vk"),I=f(()=>n(x)?$("tooltip_vk_video_logo"):$("tooltip_vk_logo")),T=f(()=>(r()&&Ds(a(),"m")||Ds(a(),"l"))&&n(x)),R=()=>{var E,W;e.click(),(E=p.callbacks)!=null&&E.onLogoClicked?(W=p.callbacks)==null||W.onLogoClicked():u()&&window.open(u(),"_blank")},k=f(()=>!s()),P=f(()=>n(x)?"btn-vk-video-logo":"btn-vk-logo");Ft(t,{className:"btn-full-opacity",get disabled(){return n(k)},click:R,get testId(){return n(P)},get ariaLabel(){return n(I)},get ref(){return d()},set ref(E){d(E)},children:(E,W)=>{var F=De(),U=ae(F);{var j=G=>{rm(G,{get logo(){return m.logoType},get short(){return n(T)},get isCyrillic(){return l()}})},re=G=>{om(G,{})};M(U,G=>{n(x)?G(j):G(re,!1)})}b(E,F)},$$slots:{default:!0}}),H(),o()}import{ChromecastState as sx}from"@vkontakte/videoplayer-core/es2018";import{ChromecastState as V_}from"@vkontakte/videoplayer-core/es2018";var ox=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-w"></path><path d="M3.6 9.7a8.7 8.7 0 0 1 8.68 9.37.9.9 0 0 1-1.8-.14c.02-.17.02-.35.02-.53a6.9 6.9 0 0 0-7.43-6.88.9.9 0 0 1-.14-1.8l.67-.02ZM3.6 16.9a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z" class="s-w"></path><path d="M16.24 4.1c.8 0 1.47 0 2 .04a4 4 0 0 1 1.53.38 3.9 3.9 0 0 1 1.7 1.71 4 4 0 0 1 .39 1.53c.04.53.04 1.2.04 2v4.48c0 .8 0 1.47-.04 2a4 4 0 0 1-.38 1.53 3.9 3.9 0 0 1-1.7 1.7 4 4 0 0 1-1.54.39c-.53.04-1.2.04-2 .04H15a.9.9 0 0 1 0-1.8h1.2c.85 0 1.44 0 1.9-.04.44-.03.68-.1.85-.19.4-.2.72-.52.92-.92.09-.17.16-.4.2-.85.03-.46.03-1.05.03-1.9V9.8c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2.1 2.1 0 0 0-.92-.92 2.25 2.25 0 0 0-.85-.2 25.9 25.9 0 0 0-1.9-.03H5.83a2.1 2.1 0 0 0-1.81 1.4.9.9 0 1 1-1.7-.6A3.9 3.9 0 0 1 6 4.1h10.24Z" class="s-w"></path>',1),nx=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),rx={hash:"s-w",code:".animated.s-w{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-w{animation-name:s-w-wave1}.wave2.animated.s-w{animation-name:s-w-wave2}.wave3.animated.s-w{animation-name:s-w-wave3}@keyframes s-w-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-w-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-w-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function zd(t,e){B(e,!0),q(t,rx);let i=g(e,"isMobile",3,!1),o=f(()=>e.iconState===V_.CONNECTED),r=f(()=>e.iconState===V_.CONNECTING),a=f(()=>n(o)?"#2688EB":ta),l=f(()=>e.size?dn(e.size):void 0);var d=De(),s=ae(d);{var u=p=>{Xe(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(v,_)=>{var $=ox();Jt(2),b(v,$)},$$slots:{default:!0}})},m=p=>{Xe(p,{get style(){return n(l)},testId:"chromecast-icon",children:(v,_)=>{var $=nx(),y=ae($);let x;var I=A(y);let T;var R=A(I);let k;var P=A(R);let E;var W=A(P);let F;N((U,j,re,G,oe)=>{x=ie(y,0,"wave2 s-w",null,x,U),T=ie(I,0,"wave3 s-w",null,T,j),k=ie(R,0,"wave1 s-w",null,k,re),E=ie(P,0,"s-w",null,E,G),F=ie(W,0,"s-w",null,F,oe)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:n(o)}),()=>({hidden:!n(o)})]),b(v,$)},$$slots:{default:!0}})};M(s,p=>{i()?p(u):p(m,!1)})}b(t,d),H()}import{noop as ax}from"@vkontakte/videoplayer-shared/es2018";function Wd(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"click",3,ax),l=ye().ui.t,d=f(()=>e.state===sx.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));Ft(t,{get ariaLabel(){return n(d)},get click(){return r()},testId:"btn-chromecast",get ref(){return i()},set ref(s){i(s)},children:(s,u)=>{zd(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),H()}import{noop as dx}from"@vkontakte/videoplayer-shared/es2018";var lx=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 sm(t){Xe(t,{testId:"episodes-icon",children:(e,i)=>{var o=lx();Jt(2),b(e,o)},$$slots:{default:!0}})}var Lu=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var cx=L('<span class="text mobile s-22"> </span> <div class="chevron-episodes s-22" data-testid="btn-episodes_icon"><!></div>',1),ux=L('<span class="text s-22"> </span>'),px=L('<span class="text count s-22"> </span>'),fx=L('<span class="icon s-22"><!></span> <!>',1),mx={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 Kd(t,e){var X,Ie,fe;B(e,!0),q(t,mx);let[i,o]=Be(),r=()=>w($,"$currentGridType$",i),a=()=>w(y,"$openedByKeyboard$",i),l=()=>w(x,"$panelOpened$",i),d=()=>w(I,"$isMobile",i),s=g(e,"position",3,0),u=g(e,"duration",3,0),m=g(e,"timeCodes",19,()=>[]),p=ye(),v=(Ie=(X=p.callbacks)==null?void 0:X.onEpisodeChanged)!=null?Ie:dx,_=!!((fe=p.callbacks)!=null&&fe.onEpisodeClicked),$=p.ui.currentGridType$,y=p.ui.episodes.openedByKeyboard$,x=p.ui.episodes.panelOpened$,I=p.ui.isMobile,T=p.ui.t,R=K(void 0),k=ee=>{var Ce,de,We;if(!!((Ce=p.callbacks)!=null&&Ce.onEpisodeClicked)){let ve=ra(ee);y.set(ve),x.set(!0),(We=(de=p.callbacks)==null?void 0:de.onEpisodeClicked)==null||We.call(de,ve)}},P=K(null),E=f(()=>s()/u());He(()=>{var be;let ee=Lu(n(E),u(),m());ee?((be=n(P))==null?void 0:be.time)!==ee.time&&(v(ee),D(P,ee,!0)):D(P,null)});let W=f(()=>{var ee;return((ee=n(P))==null?void 0:ee.text)||""}),F=f(()=>eo(r(),"xl")?"FULL":eo(r(),"m")?"COUNT":"SHORT"),U=f(()=>`${T("tooltip_episodes")}: ${n(W)}`),j=async(ee,be,Ce)=>{await co(),(ee==null?void 0:ee.getAttribute("aria-expanded"))==="false"&&be&&!Ce&&Tt(()=>{y.set(!1),ee.focus()})};He(()=>{j(n(R),a(),l())});var re=De(),G=ae(re);{var oe=ee=>{let be=f(()=>d()?"px-0":""),Ce=f(()=>!_);Ft(ee,{get className(){var de;return`w-max btn-full-opacity btn-jc-l ${(de=n(be))!=null?de:""}`},testId:"btn-episodes",click:k,get disabled(){return n(Ce)},get ariaExpanded(){return l()},get ariaLabel(){return n(U)},get ref(){return n(R)},set ref(de){D(R,de,!0)},children:(de,We)=>{var ve=De(),me=ae(ve);{var Z=pe=>{var le=cx(),ue=ae(le),Le=C(ue,!0);S(ue);var ze=A(ue,2),te=C(ze);kr(te,{direction:"right"}),S(ze),N(()=>he(Le,n(W))),b(pe,le)},O=pe=>{var le=fx(),ue=ae(le),Le=C(ue);sm(Le,{}),S(ue);var ze=A(ue,2);{var te=we=>{var Ee=ux(),Ye=C(Ee,!0);S(Ee),N(()=>he(Ye,n(W))),b(we,Ee)},ce=(we,Ee)=>{{var Ye=Ae=>{var Te=px(),Fe=C(Te,!0);S(Te),N(()=>he(Fe,m().length)),b(Ae,Te)};M(we,Ae=>{n(F)==="COUNT"&&Ae(Ye)},Ee)}};M(ze,we=>{n(F)==="FULL"?we(te):we(ce,!1)})}b(pe,le)};M(me,pe=>{d()?pe(Z):pe(O,!1)})}b(de,ve)},$$slots:{default:!0}})};M(G,ee=>{n(P)&&ee(oe)})}b(t,re),H(),o()}import{debounceFn as nb}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as Sx,PlaybackState as Hl,Player as Cx,PredefinedQualityLimits as hs,VideoFormat as Gd,clientChecker as W_}from"@vkontakte/videoplayer-core/es2018";import{assertNonNullable as mr,getHighestQuality as Tx,InterfaceLanguage as Ix,isInvariantQuality as Ex,isNonNullable as Px,loadVKLangPack as Ax,Logger as kx,map as K_,merge as Lx,Observable as Fu,Subject as Yd,Subscription as Q_,TracerFactory as Mx,ValueSubject as q_,VideoQuality as Vx,devNull as Rx,now as Dx,filter as Nx,once as Ox,ErrorCategory as G_,suppressAbort as Bx}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as Bs,ThinOneStat as Hx}from"@vkontakte/videoplayer-statistics/es2018";import{detectEmbed as vx,devNull as ii,now as oi,withoutNullable as R_}from"@vkontakte/videoplayer-shared/es2018";import{addScript as gx,Subject as cn,clearVideoElement as hx}from"@vkontakte/videoplayer-shared/es2018";var _x="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Mu=class{constructor(e,i){this.adman=null;this.initialVolume=1;this.videoElement=null;this.currentAdSection=null;this.actions=null;this.adsState=null;this.playerState=null;this.events={init$:new cn,loadStarted$:new cn,loadEnded$:new cn,loadError$:new cn,ready$:new cn,slotRequested$:new cn,started$:new cn,timeRemained$:new cn,paused$:new cn,resumed$:new cn,ended$:new cn,empty$:new cn,skipped$:new cn,clicked$:new cn,closed$:new cn,error$:new cn};this.loadAdman=e=>(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[oi()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));this.loadAdmanMailRu=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[oi()]}),o())};gx(_x,e,this.loadTimeout).then(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[oi()]}),window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[oi()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[oi()]}),o(),clearTimeout(r)})});this.loadAdmanNPM=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[oi()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[oi()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[oi()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[oi()]}),!d&&(window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[oi()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[oi()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[oi(),i.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(i)}`}),this.events.started$.next(e),i.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:"ad muted start"})),this.adsState.duration.set(i.duration),this.adsState.playbackState.set("playing"),this.adsState.canSkip.set(i.allowClose),this.adsState.secondsToWatchBeforeSkip.set(i.allowCloseDelay),this.startWatchDog(),(o=this.externalApi)!=null&&o.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,e,String(i.bannerID))):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=e=>{var o;((o=this.adsState)!=null&&o.playbackState?$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")}async initAdman(e){var k,P;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[oi(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:o,isAutoplay:r,adsContainer:a,adsVideoElement:l,slotId:d,params:s={},paramsOverride:u={},duration:m,externalApi:p,json:v}=e;this.externalApi=p;let _,$=this.playerState&&$e(this.playerState.vsid);$&&(this.isVsidOriginal?_=$:_=parseInt($,36));let{isEmbed:y,immediateOrigin:x}=vx(),I=(k=y?x:window.location.href)!=null?k:window.location.href,T=R_({...s,dl:encodeURIComponent(I),autoplay:r?1:0,player_width:i,player_height:o,..._?{request_id:_}:{},duration:m,...u}),R=R_({slot:v?void 0:d,wrapper:a,videoEl:l,videoQuality:o,params:v?void 0:T,browser:{mobile:!1},json:v});try{let E=new window.AdmanHTML;if(E.onReady(this.onAdsReady),E.onStarted(this.onAdStarted),E.onPlayed(this.onAdPlayed),E.onPaused(this.onAdPaused),E.adMidrollPoint(this.onAdMidrollPoint),E.onClosed(this.onAdClosed),E.onSkipped(this.onAdSkipped),E.onClicked(this.onAdClicked),E.onTimeRemained(this.onAdTimeRemained),E.onCompleted(this.onAdCompleted),E.onError(this.onAdError),E.setDebug(!1),!v&&((P=this.externalApi)!=null&&P.videoGetAds)){let W=await this.safeExternalCall(this.externalApi.videoGetAds,T);W&&(delete R.slot,delete R.params,Object.assign(R,{json:W}))}E.init(R),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(R)}`})}catch(E){ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[oi()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){var o,r,a;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[oi()]}),this.currentAdSection===null&&!e){this.log({message:"switch to video, no currentAdSection. can't switch"});return}let i=this.currentAdSection==="postroll";if(this.actions){if(this.adsState&&this.playerState)this.adsState.playbackState.set("inactive"),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${i}`});else{let l="Switch to video: Adman state was not updated correctly";this.log({message:l}),this.events.error$.next(l)}(a=(r=this.actions).switchFromAdsToVideo)==null||a.call(r,!i)}}setPostrollPassed(e){var i;(i=this.adsState)==null||i.postrollPassed.set(e),this.log({message:"postroll passed"})}togglePlay(){var e;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adsState){this.log({message:"toggle play"});let i=$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,r,a,l,d,s,u,m,p,v;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[oi()]}),this.log({message:"destroy"}),this.stopWatchDog(),(e=this.adman)==null||e.onReady(void 0),(i=this.adman)==null||i.onStarted(void 0),(o=this.adman)==null||o.onPlayed(void 0),(r=this.adman)==null||r.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(l=this.adman)==null||l.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(s=this.adman)==null||s.onClicked(void 0),(u=this.adman)==null||u.onTimeRemained(void 0),(m=this.adman)==null||m.onCompleted(void 0),(p=this.adman)==null||p.onError(void 0),(v=this.adman)==null||v.destroy(),this.videoElement&&hx(this.videoElement),this.isDestroyed=!0}async safeExternalCall(e,...i){var o;try{return await e(...i)}catch(r){return this.onAdError((o=r==null?void 0:r.message)!=null?o:"External call failed"),null}}};var D_=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 am=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(e,i){let o=[],r=e.split(this.twoLinesRegExp);for(let a of r){let l={startTime:0,endTime:0,texts:[],lang:i},d=a.split(this.oneLineRegExp);for(let s of d)if(!l.startTime&&!l.endTime){let u=new Vu,{startTime:m,endTime:p}=u.parse(s);l.startTime=m,l.endTime=p}else if(s.trim()!==""){let u=new lm,{texts:m}=u.parse(s);l.texts=[...l.texts,...m]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},Vu=class{constructor(){this.timeRegExp=/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/;this.timingRegExp=new RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`)}parse(e){let i={startTime:0,endTime:0},o=this.timingRegExp.exec(e);return o&&(i.startTime=this.calcTime(o[1],o[2],o[3],o[4]),i.endTime=this.calcTime(o[6],o[7],o[8],o[9])),i}parseTime(e){let i=this.timeRegExp.exec(e);return i?this.calcTime(i[1],i[2],i[3],i[4]):0}isTime(e){return this.timeRegExp.test(e)}calcTime(e="0",i="0",o="0",r="0"){let a=Number(e)*60*60,l=Number(i)*60,d=Number(o),s=+`0.${r}`;return a+l+d+s}},lm=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},r=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](l){let d=0,s=[];for(;d<l.length;){let u=["<",">"].reduce((m,p)=>{let v=l.indexOf(p,d);return m===-1||m>v?v:m},-1);if(u===-1){s.push(l.substring(d));break}s.push(l.substring(d,u)),d=u+1}return s}}),a=new Vu;for(let l of r)a.isTime(l)?i.texts.push({type:"timestamp",value:a.parseTime(l)}):i.texts.push({type:"text",value:l});return i}},N_=am;import{isNonNullable as dm}from"@vkontakte/videoplayer-shared/es2018";var Ha,Li,cm=0,um=!1,O_="",B_=(t,e=0,i=0)=>t<e&&t<i,Ru=(t,e=0,i=0)=>t>=e&&t<=i,bx=(t,e=0,i=0)=>t>e&&t>i,H_=(t,e,i,o=!1)=>{var d;let r=(d=i.find(({id:s})=>s===e.value))==null?void 0:d.subtitles;if(o)return r==null?void 0:r.find(({startTime:u,endTime:m})=>Ru(t,u,m));let a=t>=cm,l=t<cm;if(cm=t,l&&(um=!1),dm(Ha)&&Ru(t,Ha.startTime,Ha.endTime)&&O_===e.value)return Ha;if(!dm(Li)&&(r!=null&&r.length)&&!um){Li=r.find(({startTime:u,endTime:m})=>Ru(t,u,m)||a&&B_(t,u,m)),Ha=void 0,!dm(Li)&&r[r.length-1].endTime<t&&(um=!0);return}else{if(Ru(t,Li==null?void 0:Li.startTime,Li==null?void 0:Li.endTime))return Ha=Li,Li=void 0,O_=e.value,Ha;(a&&bx(t,Li==null?void 0:Li.startTime,Li==null?void 0:Li.endTime)||l&&B_(t,Li==null?void 0:Li.startTime,Li==null?void 0:Li.endTime))&&(Li=void 0)}};var Du={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"},$x={abk:"as",ara:"ar",aze:"az",bak:"ba",bel:"be",ben:"bn",bos:"bs",bul:"bg",ces:"cs",chv:"cv",dan:"da",deu:"de",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",fas:"fa",fin:"fi",fra:"fr",heb:"he",hin:"hi",hrv:"hr",hun:"hu",hye:"hy",ind:"id",ita:"it",jpn:"ja",kan:"kn",kat:"ka",kaz:"kk",kir:"ky",kor:"ko",lav:"lv",lit:"lt",mon:"mn",mya:"my",nep:"ne",nld:"nl",nor:"no",oss:"os",pan:"pa",pol:"pl",por:"pt",ron:"ro",rus:"ru",sin:"si",slk:"sk",slv:"sl",spa:"es",srp:"sr",swa:"sw",swe:"sv",tat:"tt",tgk:"tg",tgl:"tl",tha:"th",tuk:"tk",tur:"tr",ukr:"uk",urd:"ur",uzb:"uz",vie:"vi"},Qd=t=>{var e,i;return(i=(e=Du[t])!=null?e:Du[$x[t]])!=null?i:void 0};import{clientChecker as U_}from"@vkontakte/videoplayer-core/es2018";import{debounceFn as xx,getWindow as pm,ValueSubject as fm}from"@vkontakte/videoplayer-shared/es2018";import{getWindow as yx}from"@vkontakte/videoplayer-shared/es2018";var Nu=()=>{var t;return(t=yx().document)==null?void 0:t.pictureInPictureEnabled},Ou=t=>!!t.pictureInPictureWindow,F_=t=>!!t.target&&"height"in t.target&&"width"in t.target;var Ns=class{constructor({enabled:e=!0}={enabled:!0}){this.isRequested=!1;this.videoElement=void 0;this.playerContainer=void 0;this.externalEventHandlers={};this.eventHandlers={enterpictureinpicture:this.onEnterPictureInPicture.bind(this),leavepictureinpicture:this.onLeavePictureInPicture.bind(this),resize:xx(this.onResize.bind(this),300)};this.info={isActive$:new fm(!1),isEnabled$:new fm(!1),type:0};this.info.isEnabled$=new fm(e)}isSupported(){return Nu()}isActive(){return this.info.isActive$.getValue()}setContext(e){this.svelteContext=e}async revealPictureInPicture(){this.isRequested&&(this.removeEventHandlers(),await this.request(),this.addEventHandlers())}async request(){var e;if(!(!this.isSupported()||this.isActive()))try{await((e=this.videoElement)==null?void 0:e.requestPictureInPicture())}catch(i){this.isRequested=!1}}async exit(){let{document:e}=pm();!this.isSupported()||!this.isActive()||!this.videoElement||!e.pictureInPictureElement||(await e.exitPictureInPicture(),U_.browser.isYandex&&!this.videoElement.isConnected&&this.onLeavePictureInPicture())}assignPlayerContainer(e){this.isSupported()&&(this.playerContainer=e)}updateVideoElement(){this.isSupported()&&this.exit().finally(()=>{var i;this.removeEventHandlers();let e=this.videoElement;this.videoElement=(i=this.playerContainer)==null?void 0:i.querySelector("video"),this.waitForSafariLeavePictureInPicture(e,this.videoElement),this.addEventHandlers()})}addEventHandlers(){var e,i;(e=this.videoElement)==null||e.addEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.addEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}setExternalEventHandlers(e){this.externalEventHandlers={...e}}removeEventHandlers(){var e,i;(e=this.videoElement)==null||e.removeEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.removeEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}async dispose(){this.removeEventHandlers(),await this.exit(),this.info.isActive$.next(!1),this.isRequested=!1}onEnterPictureInPicture(e){var o,r;let i=Ou(e)?e.pictureInPictureWindow:void 0;this.info.isActive$.next(!0),this.isRequested=!0,i==null||i.addEventListener("resize",this.eventHandlers.resize),(r=(o=this.externalEventHandlers).enterpictureinpicture)==null||r.call(o)}onLeavePictureInPicture(e){var i,o;if(e){let r=Ou(e)?e.pictureInPictureWindow:void 0;r==null||r.removeEventListener("resize",this.eventHandlers.resize)}this.info.isActive$.next(!1),this.isRequested=!1,this.eventHandlers.resize.cancel(),(o=(i=this.externalEventHandlers).leavepictureinpicture)==null||o.call(i)}onResize(e){var o,r;let i=F_(e)?e.target:Ou(e)?e.pictureInPictureWindow:void 0;i&&((r=(o=this.externalEventHandlers).resize)==null||r.call(o,{width:i.width,height:i.height}))}setEnabled(e){this.info.isEnabled$.next(e)}waitForSafariLeavePictureInPicture(e,i){if(U_.browser.isSafari&&e&&e!==i){let r=this.eventHandlers.leavepictureinpicture,a=0,l=()=>{pm().clearTimeout(a),e.removeEventListener("leavepictureinpicture",d)},d=s=>(r(s),l());e.addEventListener("leavepictureinpicture",d),a=pm().setTimeout(l,1e3)}}};function z_(t){return t instanceof Ns}import{Subscription as wx}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-statistics/es2018";var Bu=class{constructor(e,i,o,r=new wx){this.oneStat=e;this.thinOneStat=i;this.mediascopePixel=o;this.statSubscription=r}destroy(){var e,i,o;(e=this.oneStat)==null||e.destroy(),(i=this.thinOneStat)==null||i.destroy(),(o=this.mediascopePixel)==null||o.destroy(),this.statSubscription.unsubscribe()}};var Hu=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(Hu||{});var gs=t=>t!=null?t:0,Os=(t,e)=>{var r,a;let i=(r=t==null?void 0:t.getBoundingClientRect)==null?void 0:r.call(t),o=(a=e==null?void 0:e.getBoundingClientRect)==null?void 0:a.call(e);return{top:Math.round(gs(i==null?void 0:i.top)-gs(o==null?void 0:o.top)),left:Math.round(gs(i==null?void 0:i.left)-gs(o==null?void 0:o.left)),bottom:Math.round(gs(i==null?void 0:i.bottom)-gs(o==null?void 0:o.top)),right:Math.round(gs(i==null?void 0:i.right)-gs(o==null?void 0:o.left))}},Ol=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:gs(e==null?void 0:e.width),height:gs(e==null?void 0:e.height)}};var En="off";var Bl=t=>!!(Math.round(Math.abs(t)/90)%2);var Y_=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:m,previewThumbsData:p,uiConfig:v,coreConfig:_,player:$,disabledControls:y,isInteractive:x,interactiveRanges$:I,isInteractiveTime$:T,replayInteractive:R,stopPlayer:k,hasInteractiveBranches:P,playPrevChapterDisabledTooltip:E,additionalButtons:W,additionalSettingsMenuItems:F,additionalContextMenuItems:U,playPrevVideo:j,playNextVideo:re,onVideoChanged:G,looped:oe=!1,statistics:X,saveRate:Ie,internalsExposure:fe,playerView:ee,playerId:be,metaConfig:Ce,appTracer:de})=>{var Rv,Dv;let We={..._,isAudioDisabled:l,live:{...(Rv=_.live)!=null?Rv:{},isLiveCatchUpMode:!!r}},ve=v,me=Mx.createRootTracer(ve.features.tracer),Z=me.createComponentTracer("Store"),O=$||new Cx(We,me,{playerId:be,onDevNullLog:s==null?void 0:s.onDevNullLog});fe==null||fe.expose({corePlayer:O});let pe=new kx,le=new Mu(pe,{loadTimeout:ve.ads.loadTimeout,initTimeout:ve.ads.initTimeout,runtimeTimeout:ve.ads.runtimeTimeout,useAdmanFromNPM:ve.ads.useAdmanFromNPM,volumeMultiplier:ve.ads.volumeMultiplier,isVsidOriginal:ve.ads.isVsidOriginal}),ue=u==null?void 0:u.pictureInPictureApi,Le=u==null?void 0:u.annotationsApi,ze=u==null?void 0:u.slotsApi,te=u==null?void 0:u.focusManager,ce=pe.createComponentLog("Store"),we,Ee,Ye={},Ae=new pu,Te=new Q_,Fe="",gt=se(!1),Mt=X&&X.oneStat?ti(X.oneStat.vsid$):Ar(void 0),Ct=se(ia()),dt=se(!1),St=()=>c_(document,W_.device.isIOS),qt=(Dv=ue==null?void 0:ue.info.isActive$)!=null?Dv:new q_(!1),Ot=se(0),Rt=se(!1),Ut=se(!1),Q=se([]),Me=Lx(O.events.fatalError$,O.events.managedError$).subscribe(c=>Q.update(h=>[...h,c])),Ve=Ar(!1,c=>{let h=O.events.fatalError$.subscribe(()=>c(!0));return()=>h.unsubscribe()}),xe=async c=>{var ne;let h=Object.values(Ix).includes(c);if(ve.downloadVKLanguages&&(h&&ve.updateBuiltinLanguages||!Tf(c))){let Pe;try{Pe=await Ax(c,xh,wh)}catch(Ze){(ne=X==null?void 0:X.oneStat)==null||ne.logError({errorType:"VKLangPack",fatal:!1}),de==null||de.error({category:G_.WTF,id:"VKLangPack",message:String(Ze),thrown:Ze},{severity:"warning"})}Pe&&(Cf({language:c,pack:Pe,fallback:ve.defaultLanguage}),Ue.set(c),Se.update(Ze=>Ze+1))}Tf(c)&&Ue.set(c)},Ue=se(t),Se=se(0),wt=se(e);xe(t);let ge=(c,h)=>{let V=$e(Ue);return If(V,c,h,ve.defaultLanguage)},Oe=se("thumb");Oe.subscribe(c=>{c==="ads"&&O.info.playbackState$.getValue()&&Kt()});let Ge=(()=>{let c=pi([Ve,Oe],([h,V])=>h?"crashed":V);return{...c,is:h=>$e(c)===h}})(),at=se(),Kt=()=>{at.set({muted:O.info.muted$.getValue()})},Et=(()=>{let c=se(new Set(y));return{...c,add:h=>{c.update(V=>new Set([...V].concat(h)))},remove:h=>{c.update(V=>{let ne=[...V];return new Set(Array.isArray(h)?ne.filter(Pe=>!h.includes(Pe)):ne.filter(Pe=>Pe!==h))})},includes:h=>{let V=$e(c);return Array.isArray(h)?h.every(ne=>V.has(ne)):V.has(h)}}})(),si=se({width:0,height:0}),li=null,Ei=O.info.isBuffering$,uo=Ar(Ei.getValue(),c=>{let h=Ei.subscribe(V=>{V&&li===null?li=window.setTimeout(()=>{c(Ei.getValue()),li=null},ve.loaderDelay):c(V)});return()=>{h.unsubscribe(),li&&clearTimeout(li)}});Z.log("create store"),ce({message:"create store"});let po=c=>{let h=c.container,V=()=>{fi=new MutationObserver(Pe=>{let{removedNodes:Ze}=Pe[0];Ze.length&&h.append(O.experimental.element$.getValue())}),fi.observe(h,{childList:!0})},ne=O.experimental.element$.getValue();if(ne)h.append(ne),V();else{let Pe=O.experimental.element$.pipe(Nx(Ze=>!!Ze),Ox()).subscribe(Ze=>{h.append(Ze),V()});Te.add(Pe)}},di=c=>{ce({message:`init video, config: ${JSON.stringify(c)}`}),x?po(c):(Rx.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[Dx()]}),O.initVideo(c)),Z.log("init video",{isInteractive:x}),c.subtitles&&O.setExternalTextTracks(c.subtitles),we=c,Fe=c.subtitlesForcedLanguage||""},rt=new Yd,ci=c=>rt.next(c),Yi=new Yd,ct=new q_(Bs.UNKNOWN),Dt=new Yd,fi=null,ot={actionRewind$:Yi,actionSeek$:ct,inPiP$:qt,inFullscreen$:new Fu(c=>Ct.subscribe(h=>c.next(h))),actionSetSubtitle$:Dt,nextMovie$:rt},nt=new Yd,Ti=new Yd,Zo={actionSeek$:ct,actionSubtitlesSwitched$:nt,actionQuality$:Ti,playerSize$:new Fu(c=>si.subscribe(h=>c.next(h))),inPiP$:qt,inFullscreen$:new Fu(c=>Ct.subscribe(h=>c.next(h))),isLoaderVisible$:new Fu(c=>uo.subscribe(h=>c.next(h)))};if(X){let{oneStat:c,thinOneStat:h,mediascopePixel:V,statSubscription:ne}=X;c&&(x||ne.add(c.attachTo(O)),ne.add(c.attachToUi(ot)),ne.add(c.attachToAds(le.events)),c.authorize(a).catch(Pe=>{ce({message:`onestat auth error ${String(Pe)}`})}),V&&V.attachTo(O)),h&&(ne.add(h.attachTo(O,le.events)),ne.add(h.attachToUi(Zo)),ne.add(h.attachToAds(le.events)),h.updateContext({isMobile:$e(gt)}),h.authorize(a))}de&&(de.addSubscription(O.events.managedError$.subscribe(c=>{de.error(c,{severity:"debug"})})),de.addSubscription(O.events.fatalError$.subscribe(c=>{de.error(c,{severity:"fatal"})})),X!=null&&X.oneStat&&de.addSubscription(X.oneStat.experimental.error$.subscribe(c=>{de.error(c,{severity:"warning"})})));let Ao=()=>{if(W_.device.isIOS&&Ee)try{u_(Ee)}catch(c){ce({message:`exitIosSafariFullscreen failed: ${c}`})}};Te.add(O.experimental.element$.subscribe(c=>{c&&(Ee=c,c.classList.add("player-media"),ue==null||ue.updateVideoElement(),x&&c.setAttribute("pip","false"),(ee==="preview"||!ve.features.pip&&!ve.features.dpip)&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(O.events.ended$.subscribe(()=>{var c;Ao(),(c=s==null?void 0:s.onEnded)==null||c.call(s)})).add(O.events.looped$.subscribe(()=>{var c;(c=s==null?void 0:s.onLooped)==null||c.call(s)})).add(O.events.started$.subscribe(async()=>{var h,V;z_(ue)&&await(ue==null?void 0:ue.revealPictureInPicture());let c=O.info.muted$.getValue();(h=s==null?void 0:s.onStarted)==null||h.call(s),(V=Ye.onStarted)==null||V.call(Ye,c)})).add(O.events.willSeek$.subscribe(({from:c,to:h})=>{var V;(V=s==null?void 0:s.onSeek)==null||V.call(s,c,h,ct.getValue())})).add(O.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=s==null?void 0:s.onAutoplaySoundProhibited)==null||c.call(s)})).add(O.info.position$.subscribe(c=>{var V;let h=O.info.duration$.getValue();isFinite(h)&&h>0&&((V=s==null?void 0:s.onTimeupdate)==null||V.call(s,h,c),le.setPosition(c,h))})).add(O.events.fatalError$.subscribe(c=>{var h;(h=s==null?void 0:s.onCrashed)==null||h.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(O.events.fetcherRecoverableError$.subscribe(c=>{var h;(h=s==null?void 0:s.onRecoverableError)==null||h.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(O.events.loadedMetadata$.subscribe(()=>{Rt.set(!0)})).add(O.info.is3DVideo$.subscribe(c=>{Ut.set(c)})).add(O.info.isEnded$.subscribe(c=>{x&&(c?(T!=null&&T.getValue()&&Et.add(xd),Et.add("PLAY_BUTTON")):Et.remove("PLAY_BUTTON"))})).add(O.info.liveTime$.subscribe(c=>{var h;(h=s==null?void 0:s.onLiveTime)==null||h.call(s,c)})).add(O.info.isStalled$.subscribe(c=>{var h;(h=s==null?void 0:s.onStalledChanged)==null||h.call(s,c)})).add(O.info.isLiveEnded$.subscribe(c=>{var h;return c&&((h=s==null?void 0:s.onLiveEnded)==null?void 0:h.call(s))})).add(le.events.loadStarted$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:h.call(c)})).add(le.events.loadEnded$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:h.call(c)})).add(le.events.loadError$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadError)==null?void 0:h.call(c)})).add(le.events.init$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onInit)==null?void 0:h.call(c)})).add(le.events.ready$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onReady)==null?void 0:h.call(c)})).add(le.events.started$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onStarted)==null?void 0:V.call(h,c)})).add(le.events.timeRemained$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onTimeRemained)==null?void 0:V.call(h,c)})).add(le.events.ended$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onCompleted)==null?void 0:V.call(h,c)})).add(le.events.empty$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onEmpty)==null?void 0:h.call(c)})).add(le.events.clicked$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onClicked)==null?void 0:V.call(h,c)})).add(le.events.closed$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onClosed)==null?void 0:V.call(h,c)})).add(le.events.error$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onError)==null?void 0:V.call(h,c)})).add(le.events.paused$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onPaused)==null?void 0:h.call(c)})).add(le.events.resumed$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onResumed)==null?void 0:h.call(c)}));let _t=new Q_,Bt=()=>{var Ze,It,Nt;let{debugLog:c}=ve,h,V="#9df7b7",ne="#efd169";if(c&&c!==!0){let{colors:Wt}=c;h=c.tag,V=(Ze=Wt==null?void 0:Wt[0])!=null?Ze:V,ne=(Nt=(It=Wt==null?void 0:Wt[1])!=null?It:Wt==null?void 0:Wt[0])!=null?Nt:ne}let Pe=h?`: ${h}`:"";_t.add(O.events.log$.subscribe(Wt=>{console.debug(`%c sdk${Pe} `,`background:${V};`,`sdk component: ${Wt.component}`,Wt.message)})).add(pe.log$.subscribe(Wt=>{console.debug(`%c ui${Pe} `,`background:${ne};`,`ui component: ${Wt.component}.`,Wt.message)}))},z=()=>{_t.unsubscribe()},Pt=(c,h)=>{Z.log("start camera manual rotation",{mx:c,my:h}),O.startCameraManualRotation(c,h)},lt=(c=!1)=>{Z.log("stop camera manual rotation",{immediate:c}),O.stopCameraManualRotation(c)},gi=(c,h,V)=>{Z.log("move camera focus px",{xpx:c,ypx:h,dt:V}),O.moveCameraFocusPX(c,h,V)},jt=()=>{O.holdCamera()},yt=()=>{O.releaseCamera()},st=Ar(O.info.position$.getValue(),c=>{let h,V,ne=()=>{let Pe=O.info.playbackState$.getValue(),Ze=O.info.isLive$.getValue(),It=O.info.duration$.getValue(),Nt=O.info.position$.getValue();if(Pe&&[Hl.PLAYING,Hl.PAUSED].includes(Pe)){let Wt=Ze?Nt-It:O.getExactTime();Wt!==V&&c(Wt),V=Wt}h=requestAnimationFrame(ne)};return ne(),()=>cancelAnimationFrame(h)}),Oi=ti(O.info.playbackState$),Mi=ti(O.info.isBuffering$),Pn=pi([Oi,Mi],([c,h])=>h?"buffering":c),An=ti(O.info.currentBuffer$),wi=ti(O.info.isEnded$),ji=ti(O.info.isLive$),kn=ve.features.playbackRate?ti(O.info.canChangePlaybackSpeed$):Ar(!1),vo=ti(O.info.liveBufferTime$),$i=ti(O.info.volume$),ko=ti(O.info.muted$),Lo=fu(O.info.predefinedQualityLimitType$.pipe(K_(c=>c===hs.TRAFFIC_SAVING)),O.info.predefinedQualityLimitType$.getValue()===hs.TRAFFIC_SAVING),fo=fu(O.info.predefinedQualityLimitType$.pipe(K_(c=>c===hs.HIGH_QUALITY)),O.info.predefinedQualityLimitType$.getValue()===hs.HIGH_QUALITY),pn=ti(O.info.autoQualityLimitingAvailable$),Jr=ti(O.info.availableQualities$),Mr=ti(O.info.availableQualitiesFps$),es=ti(O.info.chromecastState$),Vr=ti(O.info.chromecastDeviceName$),Yn=ti(O.info.currentFormat$),ts=ti(O.info.throughputEstimation$),Rr=ti(O.info.videoBitrate$),Jo=ti(O.info.intrinsicVideoSize$),fn=ti(O.info.duration$),vr=ti(O.info.isAudioAvailable$),gr=()=>{li&&clearTimeout(li),li=null},mn=pi([fn,ji],([c,h])=>h?-c:c),jn=pi([Oi],([c])=>c===Hl.PLAYING),hr=ti(O.info.atLiveEdge$),Xn=ti(O.info.atLiveDurationEdge$),Zn=ti(O.info.position$),is=pi([Zn,fn],([c,h])=>isFinite(c)&&isFinite(h)&&!!h),go=pi([es],([c])=>c===Sx.CONNECTED),_r=ti(O.info.availableVideoStreams$),Bi=ve.features.audioLanguages?ti(O.info.availableAudioStreams$):Ar([]),br=ti(O.info.currentVideoStream$),Ln=ti(O.info.currentAudioStream$),mt=c=>{c.language&&yf(c.language),O.setVideoStream(c)},Xt=(c,h)=>{O.setAudioStream(c),Do(h)&&(c.language&&yf(c.language),ve.features.userVideoPrefs&&i&&Sf(ve.userSalt,String(i),{audioTrackId:c.id}))},$r=c=>{let h;if(c.length===1&&(h=c.at(0)),h!=null||(h=c.find(ne=>"isDefault"in ne&&ne.isDefault)),ve.features.userVideoPrefs&&i){let ne=_u(ve.userSalt,String(i));if(ne!=null&&ne.audioTrackId){let Pe=c.find(Ze=>Ze.id===ne.audioTrackId);h=Pe!=null?Pe:h}}let V=Yh();return V&&(h!=null||(h=c.find(({language:ne})=>V===ne))),h!=null||(h=c.at(0)),h},Dr=c=>{Z.log("change audio stream",{id:c});let h=O.info.availableAudioStreams$.getValue().find(V=>V.id===c);h&&Xt(h,!0)},Nr=!1;Te.add(O.info.availableAudioStreams$.subscribe(c=>{if(!Nr&&c.length){let h=$r(c);h&&(O.setAudioStream(h),Nr=!0)}})),Bi.subscribe(c=>{var h;(h=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||h.call(s,c.map(({label:V="",id:ne="",language:Pe=""})=>({label:V,language:Pe,id:ne})))}),Ln.subscribe(c=>{var h;return c&&((h=s==null?void 0:s.onAudioStreamChanged)==null?void 0:h.call(s,c.id))});let Mn=!1;Te.add(O.info.availableVideoStreams$.subscribe(c=>{if(!Mn&&c.length){let h=$r(c);h&&(O.setVideoStream(h),Mn=!0)}}));let Vn=se(void 0),Mo=ti(O.info.isAutoQualityEnabled$,c=>c&&Vn.set(void 0)),Rn=ti(O.info.currentQuality$,()=>Vn.set(void 0)),Jn=pi([Vn,Rn],([c,h])=>c!=null?c:h),en=pi(Yn,c=>c!==Gd.MPEG),vn=pi([Jr,Mr,Mo,Jn,en],([c,h,V,ne,Pe])=>{let Ze=[];Pe&&Ze.push({value:"auto",displayValue:ge("auto_quality_option"),selected:V});let It=c.filter(Nt=>!Ex(Nt));for(let Nt of It){let Wt=h[Nt];Ze.push({value:Nt,displayValue:`${Nt}${Wt?D_(Wt):""}`,selected:V?!1:Nt===ne})}return Ze}),er=ti(O.info.currentPlaybackRate$),gn=pi([er,hr,Xn],([c,h,V])=>{let ne=V||x?1:ve.controls.playbackRateMin,Pe=h?1:ve.controls.playbackRateMax,Ze=ve.controls.playbackRateStep,It=[];for(let Nt=ne;Nt<=Pe;Nt+=Ze)It.push({value:Nt,displayValue:Nt===1?ge("playback_rate_1"):ge("playback_rate",{multiplier:Nt.toString(10)}),selected:c===Nt});return It}),tn=()=>({displayValue:ge("subtitles_off"),value:En,language:""}),Pi=se(tn()),io=pi([Pi,Se],([c],h)=>{c.value===En?h(tn()):h(c)}),on=ve.features.subtitles?ti(O.info.availableTextTracks$):Ar([]),tr=Nh(),yr=pi([on,io],([c,h],V)=>{var Ze;let ne=[],Pe=c.find(({id:It})=>It===h.value);if(Pe!=null&&Pe.url){let[,It]=(Ze=tr.find(Pe.url))!=null?Ze:[];if(It){V(It);return}Ae.download(Pe.url).then(Nt=>{if(!Nt||Ae.isDestroyed())return;let Wt=new N_,Ks=Pe.language;if(Ks){let Yb=!!Pe.isAuto,jb=Wt.parse(Nt,Ks);ne.push({lang:Ks,subtitles:jb,isAuto:Yb,id:Pe.id})}tr.add(Pe.url,ne),$e(io).value===h.value&&V(ne)}).catch(Bx).catch(Nt=>{var Wt;(Wt=X==null?void 0:X.oneStat)==null||Wt.logError({errorType:"Subtitles download",fatal:!1}),de==null||de.error({category:G_.WTF,id:"Subtitles download",message:String(Nt),thrown:Nt},{severity:"warning"})})}V(ne)}),hn=pi([er,jn,io],([c,h,V],ne)=>{let It;if(O.info.isLive$.getValue()&&h&&V.value!==En){let Wt=()=>{let Ks=1e3/(3*c);It=setTimeout(Wt,Ks),ne(Date.now())};return Wt(),()=>clearTimeout(It)}}),ir=pi([on,io],([c,h])=>{if(!c.length)return[];let V=[];for(let{language:ne,isAuto:Pe,id:Ze}of c){let It=ne&&Qd(ne);ne&&It&&V.push({displayValue:Pe?ge("subtitles_auto",{language:It}):It,value:Ze,selected:(h==null?void 0:h.value)===Ze,isAuto:Pe,language:ne})}return V.length?(V.unshift({...tn(),selected:(h==null?void 0:h.value)===En}),V):[]}),je={available:[],prev:[]},ai=()=>{var h,V;let c=O.experimental.getCurrentTime$.getValue();return(V=(h=c==null?void 0:c())!=null?h:Ee==null?void 0:Ee.currentTime)!=null?V:0},Vo=pi([st,io,yr,hn],([c,h,V,ne])=>{var Ze;let Pe=O.info.isLive$.getValue();if(Pe&&je.prev!==V){let It=V.find(({id:Wt})=>Wt===h.value),Nt=je.prev.find(({id:Wt})=>Wt===h.value);if(It){let Wt={...It,subtitles:[...(Ze=Nt==null?void 0:Nt.subtitles)!=null?Ze:[],...It.subtitles]};je.available=[Wt],je.prev=V}}if(h&&h.value!==En){let It=Pe?ai():c,Nt=Pe?je.available:V;return H_(It,h,Nt,Pe)}}),Ro=pi([Vo],([c])=>c!=null&&c.texts?c.texts:[]);Te.add(io.subscribe(c=>{var h,V;if(c.value===En)(h=s==null?void 0:s.onSubtitleOff)==null||h.call(s);else{let ne=Object.entries(Du).find(([Pe,Ze])=>Ze===c.displayValue);(V=s==null?void 0:s.onSubtitleOn)==null||V.call(s,ne?ne[0]:"",c.value)}}));let nn=se(!0),ho=pi([An,mn,Zn,vo],([c,h,V,ne])=>{var Nt;let Pe=(Nt=c==null?void 0:c.end)!=null?Nt:0;if(!ne)return Pe/h;let It=-V+ne-h;return(Pe-It)/h}),_o=ti(O.info.availableSources$),Ai=pi([_o],([c])=>Object.keys((c==null?void 0:c[Gd.MPEG])||{}).length>0),bo=()=>{var V,ne,Pe;let c=Object.keys(((ne=(V=O.info.availableSources$)==null?void 0:V.getValue())==null?void 0:ne[Gd.MPEG])||{}),h=Tx(c)||Vx.Q_144P;return(Pe=we.sources[Gd.MPEG])==null?void 0:Pe[h]},Or=()=>{var h;let c=bo();if(c)Z.log("download video",{url:c}),Vh(c,((h=we==null?void 0:we.meta)==null?void 0:h.title)||"video");else{let V="There is no URL for download video";Z.log("download video",{message:V}),ce({message:V})}},xr=()=>{ce({message:"toggle muted"});let c=O.info.muted$.getValue();O.info.volume$.getValue()===0&&!c?Br(wr(),!1):rn(!c,!1)},_s=()=>{var c;if(zt.ui.settingsMenu.visible$.set(!1),!$e(zt.ui.settingsSubMenu.visible$)){let h=$e(zt.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&h){let ne=Ol(h),Pe={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:ne,position:Pe,name:"settings"})}}Z.log("close settings menu")},Hi=async(c,h=()=>Promise.resolve())=>{var Pe;zt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),zt.ui.settingsMenu.visible$.set(!0),await h();let V=$e(zt.ui.settingsMenu.ref$),ne=ha();if((Pe=s==null?void 0:s.uiInfo)!=null&&Pe.onSettingsMenu&&V&&ne){let It=Ol(V),Nt=Os(V,ne);s.uiInfo.onSettingsMenu({visible:!0,size:It,position:Nt,name:"settings"})}Z.log("open settings menu",{wasOpenedByKeyboard:c})},bs=(c,h=!1)=>{var Ze;zt.ui.settingsSubMenu.visible$.set(!1);let V=$e(zt.ui.settingsMenu.ref$),ne=ha(),Pe=$e(zt.ui.settingsMenu.visible$);if((Ze=s==null?void 0:s.uiInfo)!=null&&Ze.onSettingsMenu&&V&&ne)if(Pe&&!h){let Nt=Ol(V),Wt=Os(V,ne);s.uiInfo.onSettingsMenu({visible:!0,size:Nt,position:Wt,name:"settings"})}else{let Nt=Ol(c),Wt={top:0,left:0,bottom:0,right:0},Ks=$e(zt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:Nt,position:Wt,name:Ks})}Z.log("close settings sub menu")},os=(c,h)=>{var ne;zt.ui.settingsSubMenu.visible$.set(!0),zt.ui.settingsSubMenu.ref$.set(h),zt.ui.settingsSubMenu.name$.set(c);let V=ha();if((ne=s==null?void 0:s.uiInfo)!=null&&ne.onSettingsMenu&&h&&V){let Ze=Ol(h),It=Os(h,V);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:Ze,position:It})}Z.log("open settings sub menu",{name:c})},wr=()=>{var h;let c=Math.max(ve.volumeMinRestore,(h=mu())!=null?h:0);return c===0?ve.volumeDefault:c},Do=c=>{let h=ve.features.savePreferredStatesOnUserActionOnly;return!h||h&&!c},Br=(c,h)=>{let V=c===0?wr():c,ne=O.info.muted$.getValue();ce({message:`set volume, volume: ${c}, preferredVolume: ${V}`});let Pe=!l||Ge.is("ads");ne&&c>0&&Pe&&(ne=!1,Do(h)&&bf(!1)),O.setVolume(c,ne),le.setVolume(c),Do(h)&&vf(V)},rn=(c,h)=>{let V=O.info.volume$.getValue();ce({message:`set muted, currentVolume: ${V}, mute: ${c}`});let ne=Ge.is("ads");if(O.setMuted(c,ne),le.setVolume(c?0:V),Do(h)&&(!ne||!c)&&bf(c),!c&&V===0){let Pe=wr();O.setVolume(Pe),Do(h)&&vf(Pe),le.setVolume(Pe)}},ki=se(!1),Qe=c=>{var h,V;Z.log("set looped",{isLooped:c}),ki.set(c),O.setLooped(c),(V=(h=s==null?void 0:s.uiInfo)==null?void 0:h.onLoopedChanged)==null||V.call(h,c)};Qe(oe);let At=()=>{var c,h;(h=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||h.call(c)},ui=(c,h=!1)=>{var V;ce({message:`set autoplayNextEnabled, value: ${c}`}),Z.log("set autoplay next enabled",{autoplayNextEnabled:c}),zt.ui.autoplayNextEnabled$.set(c),Zh(c),h&&((V=s==null?void 0:s.onSetAutoplayNextEnabled)==null||V.call(s,c))},No=c=>{ce({message:`set timerNextVideoRunning, value: ${c}`}),Z.log("set timer next video running",{timerNextVideoRunning:c}),zt.ui.timerNextVideoRunning$.set(c)},$o=(c=!0)=>{var V;let h=!0;if(c&&(s!=null&&s.onPrevVideoClick))try{h=(V=s==null?void 0:s.onPrevVideoClick)==null?void 0:V.call(s)}catch(ne){ce({message:"onPrevVideoClick callback failed to execute"})}G(!0),h&&j()},yo=(c=!0)=>{var V;let h=!0;if(c&&(s!=null&&s.onNextVideoClick))try{h=(V=s==null?void 0:s.onNextVideoClick)==null?void 0:V.call(s)}catch(ne){ce({message:"onNextVideoClick callback failed to execute"})}G(!1),h&&re()},Fi=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},Oo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},Dn=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},Sr=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},xo=()=>{O.prepare()},oo=()=>{mr(zt);let c=$e(zt.ui.controls.disabledControls$),h=$e(zt.playerPhase),V={playerPhase:h,isInteractive:x,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(hi.set(!1),ce({message:"toggle play"}),h==="ads"){V.action="play",Z.log("toggle adman play",V),le.togglePlay();return}let ne=()=>{var Ze;ce({message:"toggle play, call player.play"}),V.action="play",O.play(),(Ze=s==null?void 0:s.onPlay)==null||Ze.call(s)},Pe=()=>{var Ze;ce({message:"toggle play, call player.pause"}),V.action="pause",O.pause(),(Ze=s==null?void 0:s.onPause)==null||Ze.call(s)};if(O.info.isEnded$.getValue()){if(ce({message:"toggle play, video ended, seek to 0"}),Yi.next(),ct.next(Bs.REWIND),x){R==null||R();return}O.seekTime(0),ne()}else O.info.playbackState$.getValue()!==Hl.PLAYING?ne():Pe();Z.log("toggle play",V)},_n=(c,{changeReason:h="default",appliesTo:V="to-video",byUser:ne=!1}={},Pe)=>{ce({message:`set quality, quality: ${c}`}),Z.log("set quality",{quality:c}),ne&&Ti.next(c),O.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Ze}=ve.features;vu(),c!=="auto"?(Ze?(gu({type:"exact_quality",quality:c,videoId:i},V),O.setPredefinedQualityLimits(hs.UNKNOWN)):gf(i,c),Vn.set(c),O.setQuality(c)):Ze&&h==="default"&&(Fr("auto_quality",V,Pe),$e(Lo)&&Bo(!1,void 0,Pe),$e(fo)&&Nn(!1,void 0,Pe))},Bo=(c,h="as-default",V)=>{ce({message:`set trafficSavingEnabled, value: ${c}`}),Z.log("set traffic saving enabled",{trafficSavingEnabled:c});let ne=c?hs.TRAFFIC_SAVING:hs.UNKNOWN;ve.features.qualityDetailsSubMenuEnabled?(Hr(ne,h,V),Sd(!1)):(O.setPredefinedQualityLimits(ne),Do(V)&&Sd(c))},Nn=(c,h="as-default",V)=>{ce({message:`set highQualityEnabled, value: ${c}`}),Z.log("set high quality enabled",{highQualityEnabled:c}),Hr(c?hs.HIGH_QUALITY:hs.UNKNOWN,h,V)},Hr=(c,h,V)=>{c!==hs.UNKNOWN&&($e(pn)&&!$e(Mo)&&_n("auto",{appliesTo:h,changeReason:"limit-changed"},V),Fr(c,h,V)),O.setPredefinedQualityLimits(c)},Fr=(c,h,V)=>{Do(V)&&(gu({type:c,videoId:i},h),h==="as-default"&&gu({type:c,videoId:i},"to-video"))},On=(c,h=!0)=>{Z.log("set playback rate",{playbackRate:c}),O.setPlaybackRate(c),ve.features.saveRate&&Ie&&!O.info.isLive$.getValue()&&h&&jh(c)},tt=()=>{let c=$e(kn),h=$e(gn),V=h.findIndex(({selected:Pe})=>Pe);if(V===h.length-1||!c)return h[V];let ne=h[V+1];return On(ne.value),ne},Gt=()=>{let c=$e(kn),h=$e(gn),V=h.findIndex(({selected:Pe})=>Pe);if(V===0||!c)return h[V];let ne=h[V-1];return On(ne.value),ne},yi=(c={...tn(),selected:!1},h)=>{Z.log("set subtitles",{...c}),c.value!==En&&Dt.next(c.isAuto?c.value+"_auto":c.value),nt.next({enabled:c.value!==En,lang:c.language,auto:!!c.isAuto}),Pi.set(c),Do(h)&&(wf(c.value===En?void 0:c.language),ve.features.userVideoPrefs&&i&&Sf(ve.userSalt,String(i),{subtitleTrackId:c.value===En?void 0:c.value}))},wo=c=>{Z.log("toggle subtitles");let h=$e(io);(h==null?void 0:h.value)===En?Bn(c):Ho(c)},bn=(c,h)=>{Z.log("change subtitle",{enabled:c}),c?Bn(!0,h):Ho(!0)},Bn=(c,h)=>{Z.log("subtitle on");let V=$e(ir),ne=$e(Ue),Pe=Fe!=null?Fe:ne,Ze;h&&(Ze=V.find(It=>It.value===h)),Ze!=null||(Ze=V.filter(It=>It.value!==En).find(It=>It.language===Pe)),yi(Ze!=null?Ze:V[1],c)},Ho=c=>{Z.log("subtitle off"),yi(void 0,c)};Te.add(O.info.availableTextTracks$.subscribe(c=>{var V;function h(){let ne=[];for(let{language:Pe,isAuto:Ze,id:It}of c){let Nt=Pe&&Qd(Pe);Pe&&Nt&&ne.push({id:It,language:Pe,title:Ze?ge("subtitles_auto",{language:Nt}):Nt})}return ne}(V=s==null?void 0:s.onAvailableSubtitlesChanged)==null||V.call(s,h())}));let or=se(!0),ns=c=>{or.set(c)},Cr=(c,h,V=!0)=>{var ne;if(ce({message:`seek to time, time: ${c}`}),Z.log("seek to time",{time:c,action:h,forcePrecise:V}),ct.next(h),O.info.isLive$.getValue()){let Pe=O.info.duration$.getValue(),Ze=Math.min(0,Pe+c);O.seekTime(Ze,V)}else{if(T!=null&&T.getValue())return;O.info.isEnded$.getValue()&&(ce({message:"seek after ended, call callbacks.onPlay"}),(ne=s==null?void 0:s.onPlay)==null||ne.call(s)),O.seekTime(Lv(c),V)}},$s=c=>{ce({message:`seek to episode start time: ${c}`}),Z.log("seek to episode start time",{time:c}),Cr(c,Bs.EPISODE,!0)},zs=(c,h,V=!1)=>{ce({message:`seek to percent, percent: ${c}`}),Z.log("seek to percent",{percent:c,action:h});let ne=$e(mn)*c;Cr(ne,h,V)},pa=c=>{ce({message:`seek external, time: ${c}`}),Z.log("seek external",{time:c}),ct.next(Bs.UNKNOWN),O.seekTime(O.info.isLive$.getValue()?-c:c)},ut=c=>{var ne,Pe;let h=(ne=c.max)!=null?ne:"none",V=(Pe=c.min)!=null?Pe:"none";ce({message:`set auto quality limitation. Max: ${h}. Min: ${V}`}),Z.log("set auto quality limits",{max:h,min:V}),O.setAutoQualityLimits(c)},ni=c=>{ce({message:`seek external to episode start time: ${c}`}),Z.log("seek external to episode start time",{time:c}),Cr(c,Bs.EPISODE,!0)},So=c=>{ce({message:`set playback rate to: ${c}`}),Z.log("set playback rate external",{playbackRate:c}),O.setPlaybackRate(c)},hi=se(!1),Xi=se(!1),ys=pi([mn],([c])=>!!p&&c>=ve.suitableDurationForUsingRichSeek&&ve.features.useRichSeek&&!x&&ee!=="preview"),xs=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),ws=pi([Ot],([c])=>{let h=Bl(c);return xs?!h:h});Te.add(Ge.subscribe(c=>{c!=="video"&&hi.set(!1)})),hi.subscribe(c=>{var h;(h=s==null?void 0:s.onRichSeekActiveChanged)==null||h.call(s,c)});let Ui=se(void 0),Ii=se(!1),_e=c=>{ce({message:`start scrubbing, progress: ${c}`}),Z.log("start scrubbing",{progress:c}),Ii.set(!0),xt(c)},xt=c=>{Ui.set(c)},Yt,Zt,Fo=()=>{Ui.set(void 0),Ii.set(!1)},no=()=>{clearTimeout(Zt),clearTimeout(Yt),Yt=window.setTimeout(()=>{Fo()},500),Ee==null||Ee.removeEventListener("seeked",no)},ro=(c,h=!1,V=Hx.ActionSeekType.SLIDER)=>{ce({message:`complete scrubbing, progress: ${c}`}),Z.log("complete scrubbing",{progress:c}),zs(c,V,h),$e(zt.ui.isMobile)&&$e(zt.state.currentFormat$)===Gd.HLS?(Ee==null||Ee.addEventListener("seeked",no),Zt=window.setTimeout(()=>{no()},300)):Fo()},rs=pi([st,mn,Ui],([c,h,V],ne)=>{ne(Px(V)?V*h:c)}),$n=se(!1),Ss=()=>{$n.set(!0)},fa=()=>{$n.set(!1)},ma=pi([si],([{width:c}],h)=>{let V=L_(c);h(V)}),Ur=W.filter(c=>Rh(c)),ss=pi([ma,gt],([c,h])=>h?Ur.filter(V=>!V.hideOnMobile):Ur.filter(V=>{var ne;return!((ne=V.hideOnDesktopGridTypes)!=null&&ne.includes(c))})),nr=se(W.filter(c=>Dh(c))),Za=pi([nr,ma],([c,h])=>c.filter(V=>{var ne;return!((ne=V.hideOnDesktopGridTypes)!=null&&ne.includes(h))})),Ja=pi([Za,ss],([c,h])=>[...ve.features.additionalButtonsDesktopControlPanelRight?c.filter(V=>V.type==="desktop-control-panel-right"):[],...ve.features.additionalButtons?h.map((V,ne)=>{var Pe;return{id:ne,weight:ne,type:"desktop-control-panel-right",testId:V.testId,icon:V.iconUrl,onClick:V.onClick,ariaLabel:(Pe=V.ariaLabel)!=null?Pe:V.tooltip,tooltipText:V.tooltip}}):[]].filter(V=>!v.disabledAdditionalButtonIds.includes(V.id))),zr=se(F),el=pi([zr],([c])=>ve.features.additionalSettingsMenuItems?c.map(h=>h.type==="SWITCH"?{...h,onClick:h.onChangeEnabled}:h):[]),tl=(c,h)=>{let V=$e(nr).map(ne=>ne.id!==c?ne:{...ne,...h});nr.set(V)},il=c=>{let h=$e(nr);if(h.some(V=>V.id===c.id)){ce({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),nr.set(h)},ql=c=>{let h=$e(nr);if(!h.some(V=>V.id===c)){ce({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),nr.set(h)},va=c=>{ct.next(Bs.LIVE),ce({message:"live switch to low latency "+c}),Z.log("live switch to low latency "+c),O.setLiveLowLatency(c)},ol=(c,h)=>{let V=$e(zr).map(ne=>ne.id!==c?ne:{...ne,...h});zr.set(V)},pt=c=>{let h=$e(zr);if(h.some(V=>V.id===c.id)){ce({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),zr.set(h)},vt=c=>{let h=$e(zr);if(!h.some(V=>V.id===c)){ce({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),zr.set(h)},_i=se(U),Uo=pi([_i],([c])=>ve.features.additionalContextMenuItems?c:[]),zi=(c,h)=>{let V=$e(_i).map(ne=>ne.id!==c?ne:{...ne,...h});_i.set(V)},vi=c=>{let h=$e(_i);if(h.some(V=>V.id===c.id)){ce({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}h.push(c),_i.set(h)},Vi=c=>{let h=$e(_i);if(!h.some(V=>V.id===c)){ce({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),_i.set(h)},ga=pi([gt,Ve],([c,h],V)=>{V(c&&h)}),nl=()=>{ct.next(Bs.LIVE),ce({message:"switch to active live"}),Z.log("switch to active live"),O.seekTime(0),O.info.playbackState$.getValue()!==Hl.PLAYING&&zt.actions.internal.togglePlay()},lp=()=>{Z.log("skip adman"),le.skip()},Cc=(c=!0)=>{var ne;mr(zt),ce({message:`switch from ads to video, callPlay: ${c}`}),Z.log("switch from ads to video",{callPlay:c}),Oe.set("video"),c&&O.play(),l&&rn(!0,!0);let h=(ne=$e(at))==null?void 0:ne.muted,V=!O.info.muted$.getValue();h!==void 0&&!V&&rn(h,!0),at.set(void 0)},dp=()=>{mr(zt),ce({message:"switch from video to ads"}),Z.log("switch from video to ads"),zt.actions.internal.pause(),Ao(),Oe.set("ads")},Tc=c=>{mr(zt);let h=c?"LiveWaitingStart":"thumb";Z.log("set live waiting start",{state:c,playerPhase:h}),Oe.set(h)},cp=c=>{mr(zt);let h=c?"LiveWaitingRecover":"thumb";Z.log("set live waiting recover",{state:c,playerPhase:h}),Oe.set(h)},Ic=c=>{mr(zt);let h=c?"LiveWaitingRecord":"thumb";Z.log("set live waiting record",{state:c,playerPhase:h}),Oe.set(h)},up=()=>(mr(zt),Z.log("get debug text data"),Lh(O,we,zt,me.getTraceId(),Ce)),Ec=()=>(mr(zt),JSON.stringify(me.getFinishedSpans())),pp=()=>(mr(zt),Mh(O,we,zt)),ha=()=>Ee,Pc=()=>{ce({message:"toggle chromecast"}),Z.log("toggle chromecast"),O.toggleChromecast()},Ws=c=>{var V;if(mr(zt),O.info.isEnded$.getValue())return;let h=!c;if($e(zt.playerPhase)==="ads"){ce({message:`pause ads, internalCall: ${h}`}),Z.log("pause ads",{internalCall:h}),le.pause();return}ce({message:`pause video, internalCall: ${h}`}),Z.log("pause video",{internalCall:h}),h&&((V=s==null?void 0:s.onPause)==null||V.call(s)),O.pause()},rl=c=>{var V;mr(zt);let h=!c;if($e(zt.playerPhase)==="ads"){ce({message:`play ads, internalCall: ${h}`}),Z.log("play ads",{internalCall:h}),le.play();return}ce({message:`play video, internalCall: ${h}`}),Z.log("play video",{internalCall:h}),h&&((V=s==null?void 0:s.onPlay)==null||V.call(s)),O.play()},Ac=c=>{mr(zt);let h=!c;if($e(zt.playerPhase)==="ads"){ce({message:"player cannot be stopped during ads via external method"});return}ce({message:`player will be stopped, internalCall: ${h}`}),k==null||k()},kc=(c,h)=>{mr(zt),ce({message:`first start, show ads: ${c}, internalCall: ${!h}`}),Z.log("first start",{showAds:c,external:h}),c?Oe.set("ads"):(Oe.set("video"),h?O.play():zt.actions.internal.togglePlay())},sl=()=>(ce({message:"getting time codes"}),m),Lc=()=>{let c=sl();if(!c||[0,1].includes(c.length))return;let h=O.info.position$.getValue();return c.find(V=>V.time>h)},fp=c=>{let h=c;h||(h=Lc());let V=O.info.position$.getValue();Z.log("seek to next episode",{currentTime:V,...h}),h&&(ce({message:"seek to next episode"}),Cr(h.time,Bs.EPISODE,!0))},Mc=()=>{let c=sl();if(!c||[0,1].includes(c.length))return;let h=O.info.position$.getValue(),V=c.findIndex(Pe=>Pe.time>h),ne=V===-1?c.length-2:V-2;if(!(ne<0))return c[ne]},qe=c=>{let h=c;h||(h=Mc());let V=O.info.position$.getValue();Z.log("seek to prev episode",{currentTime:V,...h}),h&&(ce({message:"seek to prev episode"}),Cr(h.time,Bs.EPISODE,!0))},mi=()=>(ce({message:"getting preview thumbs data"}),Z.log("get preview thumbs data",{...p}),p),zo=async()=>{let c=ue==null?void 0:ue.isActive(),h="none";ue!=null&&ue.isActive()?(h="exit",await(ue==null?void 0:ue.exit())):(h="request",await(ue==null?void 0:ue.request())),Z.log("toggle picture in picture",{isActive:c,action:h})},Tr=(c=-90)=>{Z.log("rotate video",{alphaDiff:c}),Ot.update(h=>h+c)},Co=se([]);I==null||I.subscribe(c=>{let h=[];for(let V=0;V<c.length;V++){let{range:[ne,Pe],subjects:Ze}=c[V];V===0&&ne!==0&&h.push({time:0,text:"",interactive:!1,completed:!0}),h.push({time:ne/1e3,text:"",interactive:!0,completed:ve.features.interactiveTimeOpenUri?!Ze.length||Ze.every(It=>It.isRemoved):!Ze.length}),Pe!==1/0&&h.push({time:Pe/1e3,text:"",interactive:!1,completed:!0})}Co.set(h)});let Fb=se(!1);T==null||T.subscribe(c=>{c&&$e(Ii)&&Fo()});let Lv=c=>{if(!x)return c;let h=$e(Co),V=$e(mn),Pe=$e(Zn)/V,Ze=h.find(It=>It.interactive&&!It.completed&&It.time>Pe);return typeof(Ze==null?void 0:Ze.time)=="number"?Math.min(c,Ze.time-.05):c},Ub=()=>{zt.ui.episodes.panelOpened$.set(!1)},zb=()=>{Z.log("destroy store"),clearTimeout(Zt),clearTimeout(Yt),Te.unsubscribe(),_t.unsubscribe(),O.destroy(),le.destroy(),X==null||X.destroy(),Me.unsubscribe(),fi==null||fi.disconnect(),fi=null,Ae.destroy(),de==null||de.destroy()},Wb=pi([hr,Ge,kn],([c,h,V])=>v.features.doubleForwardAvailable&&!c&&h==="video"&&V),mp=se(!1),Mv=2,Vc=null,Vv=c=>{if(!$e(jn)&&c)return;let h=O.info.currentPlaybackRate$.getValue();c?h!==Mv&&(Vc=h,On(Mv,!1),mp.set(!0)):(Vc&&On(Vc,!1),mp.set(!1),Vc=null)};Ge.subscribe(c=>{c!=="video"&&Vv(!1)});let Kb=()=>{Ws(!1),hi.set(!0)},Qb=()=>{rl(!1),hi.set(!1)},vp=!1,qb=()=>{Xi.set(!0),vp=O.info.playbackState$.getValue()===Hl.PLAYING,Ws(!1)},Gb=()=>{Xi.set(!1),!$e(hi)&&vp&&rl(!1),vp=!1};O.events.playing$.subscribe(()=>{$e(hi)&&Ws(!1)});let zt={interfaceLanguage$:Ue,isCyrillicRelatedInterface$:wt,initVideo:di,videoId:i,isClip:o,playerPhase:Ge,vsid:Mt,state:{positionExact$:st,positionWithScrubbing$:rs,duration$:mn,playbackState$:Oi,playbackStateRealistic$:Pn,isPlaying$:jn,isLoaderVisible:uo,bufferedProgress$:ho,isLive$:ji,canChangePlaybackSpeed$:kn,isActiveLive$:hr,isOldestAvailableLive$:Xn,isRewindableLive$:is,isEnded$:wi,muted$:ko,volume$:$i,trafficSavingEnabled$:Lo,highQualityEnabled$:fo,autoQualityLimitingAvailable$:pn,availableVideoStreams$:_r,availableAudioStreams$:Bi,videoStream$:br,audioStream$:Ln,currentQuality$:Jn,isAutoQualityEnabled$:Mo,availableQualities$:vn,currentPlaybackRate$:er,availablePlaybackRates$:gn,currentSubtitle$:io,availableTextTracks$:on,availableSubtitlesList$:ir,currentSubtitleCaptions$:Ro,isAutoSubtitleCaptionVisible$:nn,chromecastState$:es,chromecastDeviceName$:Vr,chromecastConnected$:go,currentFormat$:Yn,throughputEstimation$:ts,videoBitrate$:Rr,videoSize$:Jo,errorLog$:Q,crashed$:Ve,isAudioAvailable$:vr,isAudioDisabled:!!l,canDownload:ve.features.download&&!!d,availableSources$:_o,hasMpegSources$:Ai,isInteractive:x,showInteractiveGraph:ve.features.interactiveGraph,showSeekToInteractive:ve.features.seekToInteractive,showPlayPrevChapter:ve.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:ve.features.interactiveTimeIndicator&&!!$e(Co).length,interactiveEpisodes$:Co,isInteractiveTime$:T?ti(T):se(!1),isInteractiveExpectation$:Fb,hasInteractiveBranches:P,playPrevChapterDisabledTooltip:E,looped$:ki,loadedMetadata$:Rt,isAutoQualityAvailable$:en,previewTrackActive:hi,previewTrackDragInProgress:Xi},ui:{t:ge,controlsVisible:se(!1),touched:se(!1),controls:{prevButton:se(void 0),playButton:se(void 0),replayButton:se(void 0),nextButton:se(void 0),playPrevChapterButton:se(void 0),seekToInteractiveButton:se(void 0),interactiveGraphButton:se(void 0),liveButton:se(void 0),time:se(void 0),episodes:se(void 0),volume:se(void 0),subtitles:se(void 0),settings:se(void 0),context:se(void 0),chromecast:se(void 0),pip:se(void 0),"theater-mode-button":se(void 0),fullscreen:se(void 0),vkLogo:se(void 0),interactiveTimeIndicator:se(void 0),timeline:se(void 0),autoplayNextToggle:se(void 0),additionalButtons:W.length?W.reduce(c=>[...c,se(void 0)],[]):[],disabledControls$:Et},modals:{hotKeyMap:{show:se(!1),data:se({title:"",closeBtnText:"",groups:[]})}},isFullscreen:Ct,isFullscreenOpenedByKeyboard:dt,rotateAlpha:Ot,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:si,isMobile:gt,mobileNotReportControlHidden$:ga,icon3DVideoVisible:se(!1),scrubbingInProgress:Ii,volumeChangingInProgress:$n,is3DVideo:Ut,currentGridType$:ma,additionalButtonsDeprecated$:ss,additionalDesktopControlPanelRightButtons$:Ja,additionalSettingsMenuItems$:el,additionalContextMenuItems$:Uo,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:or,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$:mp,doubleForwardAvailable$:Wb,previewTrackActive:hi,previewTrackDragInProgress:Xi,previewTrackAvailable:ys,isPreviewTrackHorizontallyAligned:ws},ads:{position:se(0),duration:se(0),playbackState:se("inactive"),canSkip:se(!1),secondsToWatchBeforeSkip:se(0),postrollPassed:se(!1)},webApi:{pictureInPictureApi:ue,annotationsApi:Le,slotsApi:ze,focusManager:te},actions:{internal:{preload:xo,firstStart:c=>kc(c,!1),play:()=>rl(!1),pause:()=>Ws(!1),togglePlay:oo,toggleMuted:xr,openSettingsMenu:Hi,closeSettingsMenu:_s,openSettingsSubMenu:os,closeSettingsSubMenu:bs,setVolume:c=>Br(c,!1),setMuted:c=>rn(c,!1),startVolumeChanging:Ss,stopVolumeChanging:fa,setVideoStream:mt,setAudioStream:c=>Xt(c,!1),setQuality:(c,h)=>_n(c,h,!1),setTrafficSavingEnabled:(c,h)=>Bo(c,h,!1),setHighQualityEnabled:(c,h)=>Nn(c,h,!1),setPlaybackRate:On,incrementPlaybackRate:tt,decrementPlaybackRate:Gt,setSubtitle:c=>yi(c,!1),toggleSubtitle:()=>wo(!1),togglePictureInPicture:zo,startScrubbing:_e,progressScrubbing:xt,completeScrubbing:ro,toggleChromecast:Pc,switchToActiveLive:nl,switchFromAdsToVideo:Cc,switchFromVideoToAds:dp,skipAd:lp,setLiveWaitingStart:Tc,setLiveWaitingRecover:cp,setLiveWaitingRecord:Ic,getDebugTextData:up,getTraceTextData:Ec,getDebugPanelData:pp,getVideoElement:ha,seekTime:(c,h,V)=>Cr(c,h,V),clearDelayedBufferingCheckTimeout:gr,seekEpisodeStartTime:$s,seekToPercent:zs,getNextEpisode:Lc,seekToNextEpisode:fp,getPrevEpisode:Mc,seekToPrevEpisode:qe,startLogging:Bt,stopLogging:z,startCameraManualRotation:Pt,stopCameraManualRotation:lt,moveCameraFocusPX:gi,holdCamera:jt,releaseCamera:yt,getVideoEpisodes:sl,getPreviewThumbsData:mi,downloadVideo:Or,addLanguage:Cf,setLanguage:xe,nextMovie:ci,videoRotate:Tr,correctSeekTimeToInteractive:Lv,replayInteractive:R,setLooped:Qe,reportProblem:At,setAutoplayNextEnabled:ui,setTimerNextVideoRunning:No,prevVideoClick:$o,nextVideoClick:yo,nextVideoAnnouncementShow:Fi,nextVideoAnnouncementClick:Oo,nextVideoAnnouncementAuto:Dn,nextVideoAnnouncementCancel:Sr,checkFullscreenSupport:St,changeDoubleForwardOn:Vv,closePreviewTrack:Qb,previewTrackOpened:Kb,previewTrackDragStarted:qb,previewTrackDragFinished:Gb},external:{firstStart:c=>kc(c,!0),play:()=>rl(!0),pause:()=>Ws(!0),stop:()=>Ac(!0),seekTime:c=>pa(c),seekEpisodeStartTime:c=>ni(c),setPlaybackRate:c=>So(c),setAutoQualityLimits:c=>ut(c),setMuted:c=>rn(c,!0),toggleSubtitle:()=>wo(!0),changeSubtitle:bn,setVolume:c=>Br(c,!0),returnFocusToEpisodes:Ub,updateAdditionalSettingsItem:ol,addAdditionalSettingsItem:pt,removeAdditionalSettingsItem:vt,updateAdditionalContextItem:zi,addAdditionalContextItem:vi,removeAdditionalContextItem:Vi,updateAdditionalButton:tl,addAdditionalButton:il,removeAdditionalButton:ql,setLiveLowLatency:va,hideControls:()=>ns(!1),showControls:()=>ns(!0),setQuality:c=>_n(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>Bo(c,"to-video",!0),setHighQualityEnabled:c=>Nn(c,"to-video",!0),changeAudioStream:Dr}},callbacks:s,setUiCallbacks:c=>{Ye={...c}},getAdmanWrapper:()=>le,getLogger:()=>pe,getPlayer:()=>O,destroy:zb};return zt};function qn(t,e,i,o){var m;let r=(m=e[i])==null?void 0:m.getBoundingClientRect(),a=o&&!!r&&!!(r.right-r.left),{top:l,left:d,bottom:s,right:u}=Os(e[i],t||void 0);return{left:a?d:0,right:a?u:0,top:a?l:0,bottom:a?s:0,isDisplayed:a}}var Fx=["disabledControls$","additionalButtons"],Ux=["interactiveTimeIndicator"],Ul=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!Fx.includes(r)){let l=o||Ux.includes(r);a.set(qn(t,i,r,l))}}};var Uu=async(t,e,i)=>{await co(),e&&i&&(i.focus(),t.set(!1))};var zx=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 vm(t){Xe(t,{children:(e,i)=>{var o=zx();b(e,o)},$$slots:{default:!0}})}function gm(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(s,"$contextMenuVisible$",i),a=g(e,"disabled",3,!1),l=g(e,"ariaLabel",3,""),d=ye(),s=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,m=d.ui.contextMenu.showContextMenuBtn$,p=d.ui.contextMenu.position$,v=d.ui.contextMenu.btnRef$,_=K(void 0);He(()=>{n(_)&&Tt(()=>{v.set(n(_))})});let $=T=>{let R=ra(T),k=C_(n(_));p.set(k),u.set(R),s.set(!r())},y=()=>{m.set(!0)},x=()=>{m.set(!1)},I=f(()=>r()?"opened":"");Ft(t,{get className(){return n(I)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:$,focus:y,blur:x,get ariaExpanded(){return r()},get ref(){return n(_)},set ref(T){D(_,T,!0)},children:(T,R)=>{vm(T,{})},$$slots:{default:!0}}),H(),o()}var Wx=t=>{t.stopPropagation()},Kx=L("<div><!> <div></div> <div></div></div>"),Qx={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 jd(t,e){var pe;B(e,!0),q(t,Qx);let[i,o]=Be(),r=()=>w(x,"$isMobile",i),a=()=>w(k,"$areControlsVisible",i),l=()=>w(E,"$currentGridType$",i),d=()=>w(T,"$isInteractiveTime$",i),s=()=>w(y,"$interactiveControlsOpacity$",i),u=()=>w(R,"$showInteractiveTimeIndicatorTooltip$",i),m=()=>w(I,"$isFullscreen",i),p=g(e,"ref",15,void 0),v=K(void 0),_=ye(),$=mo(),{interactiveControlsOpacity$:y}=$,x=_.ui.isMobile,I=_.ui.isFullscreen,T=_.state.isInteractiveTime$,R=$.showInteractiveTimeIndicatorTooltip$,k=_.ui.controlsVisible,P=(pe=_.callbacks)==null?void 0:pe.onInteractiveTimeIndicatorClick,E=_.ui.currentGridType$,W=f(()=>!r()&&a()),F=f(()=>Ds(l(),"s")),U=f(()=>!d()||!!s()||n(W)),j=K(!1);He(()=>{D(j,n(U),!0)});let re=()=>{D(j,!0)},G=()=>{var le;oe(),(le=n(v))==null||le.addEventListener("animationiteration",re,{once:!0})},oe=()=>{var le;D(j,!1),(le=n(v))==null||le.removeEventListener("animationiteration",re)},X=le=>{R.set(le)},Ie=f(()=>u()&&!n(U));He(()=>{u()?G():oe()});let fe=()=>{n(U)||(R.set(!0),P==null||P())};ln(()=>{R.clearTimeout(),oe()});let ee=()=>{R.set(!1)},be=Y("tooltip_interactive_interaction_time_indicator");var Ce=Kx();let de;Ce.__mousemove=[Wx],Ce.__click=fe;var We=C(Ce);Po(We,{get tooltipContent(){return be},get tooltipVisible(){return n(Ie)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:X,get ref(){return p()},set ref(le){p(le)},children:(le,ue)=>{Hd(le,{completed:!0})},$$slots:{default:!0}});var ve=A(We,2);let me;et(ve,le=>p(le),()=>p());var Z=A(ve,2);let O;et(Z,le=>D(v,le),()=>n(v)),S(Ce),N((le,ue,Le)=>{de=ie(Ce,1,"interactive-episode-icon-animated s-24",null,de,le),me=ie(ve,1,"ref-block s-24",null,me,ue),O=ie(Z,1,"pulse s-24",null,O,Le)},[()=>({mobile:r(),fullscreen:m(),invisible:n(U),"icon-small":n(F)}),()=>({hidden:n(U)}),()=>({paused:n(j)})]),ft("mouseleave",Ce,ee),b(t,Ce),H(),o()}Je(["mousemove","click"]);function zu(t,e){B(e,!0);let i=g(e,"tooltipEnabled",3,!0),o=g(e,"disabled",3,!1),r=g(e,"className",3,void 0),a=g(e,"ref",15),l=g(e,"tooltipVisible",3,!1);Po(t,{get disabled(){return o()},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},get hasTooltip(){return i()},get mouseEnter(){return e.mouseEnter},get mouseLeave(){return e.mouseLeave},get tooltipVisible(){return l()},get className(){return r()},get ref(){return a()},set ref(d){a(d)},children:(d,s)=>{var u=De();let m=f(()=>e.buttonComponent);var p=ae(u);Ni(p,()=>n(m),(v,_)=>{_(v,jr(()=>{var $;return($=e.buttonComponentProps)!=null?$:{}}))}),b(d,u)},$$slots:{default:!0}}),H()}var Hs={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var Gx=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 da(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=f(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),r=f(()=>`${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(r)},get testId(){return n(a)},get shadow(){return e.shadow},children:(l,d)=>{var s=Gx();b(l,s)},$$slots:{default:!0}}),H()}var Yx=L('<div class="icon-background-mobile s-20"><!></div>'),jx={hash:"s-20",code:".icon-background-mobile.s-20{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:100%;justify-content:space-around;left:0;position:absolute;top:0;width:100%}"};function Fa(t,e){B(e,!0),q(t,jx);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"disabled",3,!1),l=ye().ui.t,d=f(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),s=f(()=>e.type==="prev"?l("hotkey_map_item_prev_video_value"):l("hotkey_map_item_next_video_value")),u=f(()=>`btn-${o()?"m":"d"}--${e.type}`);Ft(t,{get className(){return n(u)},get testId(){var m;return`btn-${(m=e.type)!=null?m:""}`},get disabled(){return r()},get ariaLabel(){return n(d)},get click(){return e.click},get ariaKeyShortCut(){return n(s)},get ref(){return i()},set ref(m){i(m)},children:(m,p)=>{var v=De(),_=ae(v);{var $=x=>{var I=Yx(),T=C(I);let R=f(()=>e.type==="prev");da(T,{get size(){return"32"},get reversed(){return n(R)}}),S(I),b(x,I)},y=x=>{let I=f(()=>e.type==="prev");da(x,{get size(){return"24"},get reversed(){return n(I)}})};M(_,x=>{o()?x($):x(y,!1)})}b(m,v)},$$slots:{default:!0}}),H()}var Xx=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 Xd(t,e){B(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,r)=>{var a=Xx();b(o,a)},$$slots:{default:!0}}),H()}import{noop as Zx}from"@vkontakte/videoplayer-shared/es2018";var Jx=L('<div class="icon-background-mobile s-21"></div>'),e2=L("<!> <div><!></div>",1),t2={hash:"s-21",code:".mobile.s-21{align-items:center;display:flex;justify-content:center;position:relative}.icon-background-mobile.s-21{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);height:calc(100% - 32px);left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function zl(t,e){B(e,!0),q(t,t2);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"disabled",3,!1),a=g(e,"className",3,""),l=g(e,"click",3,Zx),d=Y("tooltip_restart"),s=f(()=>`${o()?"btn-m--play":""} ${a()}`);Ft(t,{get className(){return n(s)},testId:"replay-btn",get ariaLabel(){return d},get disabled(){return r()},get click(){return l()},get ariaKeyShortCut(){return fs.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,m)=>{var p=e2(),v=ae(p);{var _=T=>{var R=Jx();b(T,R)};M(v,T=>{o()&&T(_)})}var $=A(v,2);let y;var x=C($);let I=f(()=>o()?"48":"24");Xd(x,{get size(){return n(I)}}),S($),N(T=>y=ie($,1,"s-21",null,y,T),[()=>({mobile:o()})]),b(u,p)},$$slots:{default:!0}}),H()}var i2=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 Fs(t,e){B(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,r)=>{var a=i2();b(o,a)},$$slots:{default:!0}}),H()}import{noop as o2}from"@vkontakte/videoplayer-shared/es2018";var n2=L('<div class="icon-background-mobile s-1z"><!></div>'),r2={hash:"s-1z",code:".icon-background-mobile.s-1z{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:calc(100% - 32px);justify-content:space-around;left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function Wl(t,e){B(e,!0),q(t,r2);let[i,o]=Be(),r=()=>w(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=mo(),l=g(e,"ref",15,void 0),d=g(e,"isMobile",3,!1),s=g(e,"isPlaying",3,!1),u=g(e,"disabled",3,!1),m=g(e,"className",3,""),p=g(e,"click",3,o2),_=ye().ui.t,{toggle:$}=a,y=f(()=>$),x=f(()=>r()!==null),I=f(()=>n(x)?r():s()),T=f(()=>n(I)?_("tooltip_pause"):_("tooltip_play")),R=f(()=>n(I)?Fs:fr),k=f(()=>`${d()?"btn-m--play":""} ${m()}`),P=f(()=>n(x)?n(y):p());Ft(t,{get className(){return n(k)},testId:"play-btn",get click(){return n(P)},get disabled(){return u()},get ariaLabel(){return n(T)},get ariaKeyShortCut(){return fs.KeyK},get ref(){return l()},set ref(E){l(E)},children:(E,W)=>{var F=De();let U=f(()=>n(R));var j=ae(F);{var re=oe=>{var X=n2(),Ie=C(X);Ni(Ie,()=>n(U),(fe,ee)=>{ee(fe,{get size(){return"48"}})}),S(X),b(oe,X)},G=oe=>{var X=De(),Ie=ae(X);Ni(Ie,()=>n(U),(fe,ee)=>{ee(fe,{get size(){return"24"}})}),b(oe,X)};M(j,oe=>{d()?oe(re):oe(G,!1)})}b(E,F)},$$slots:{default:!0}}),H(),o()}var s2=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 hm(t){Xe(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=s2();b(e,o)},$$slots:{default:!0}})}function Zd(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),r=g(e,"disabled",3,!1),a=Y("tooltip_interactive_go_back"),l=f(()=>o()?"hidden":"");Ft(t,{get className(){return n(l)},testId:"play-prev-chapter-btn",get ariaLabel(){return a},get disabled(){return r()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,s)=>{hm(d,{})},$$slots:{default:!0}}),H()}var a2=L('<span class="gutter s-25"><span><!></span></span>'),l2={hash:"s-25",code:".gutter.s-25{--gutterWidth:32px;--gutterHeight:12px;--togglerWidth:18px;--togglerHeight:18px;--togglerGap:calc(var(--togglerWidth)/6);background-color:hsla(0,0%,100%,.3);border-radius:50px;height:var(--gutterHeight);position:relative;width:var(--gutterWidth)}.toggler.s-25{align-items:center;background-color:#626364;border-radius:50%;display:flex;height:var(--togglerHeight);justify-content:center;left:0;position:absolute;top:calc((var(--togglerHeight) - var(--gutterHeight))/2*-1);transform:translateX(calc(var(--togglerGap)*-1));transition-duration:.2s;transition-property:background-color,transform;transition-timing-function:ease;width:var(--togglerWidth)}.toggler.enabled.s-25{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function Jd(t,e){B(e,!0),q(t,l2);let[i,o]=Be(),r=()=>w(s,"$autoplayNextEnabled$",i),a=g(e,"ref",15,void 0),l=ye(),d=l.ui.t,s=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,m=()=>{u(!r(),!0)},p=d("aria_label_autoplay"),v="12",_="#000",$=f(()=>r()?"true":"false");Ft(t,{click:m,get ariaLabel(){return p},role:"switch",get areaChecked(){return n($)},get ref(){return a()},set ref(y){a(y)},children:(y,x)=>{var I=a2(),T=C(I);let R;var k=C(T);{var P=W=>{fr(W,{get size(){return v},fill:_})},E=W=>{Fs(W,{get size(){return v},fill:_})};M(k,W=>{r()?W(P):W(E,!1)})}S(T),S(I),N(W=>R=ie(T,1,"toggler s-25",null,R,W),[()=>({enabled:r()})]),b(y,I)},$$slots:{default:!0}}),H(),o()}var d2=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 _m(t){Xe(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=d2();Jt(),b(e,o)},$$slots:{default:!0}})}function ec(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),r=g(e,"disabled",3,!1),a=Y("tooltip_interactive_seek"),l=f(()=>o()?"hidden":"");Ft(t,{get className(){return n(l)},testId:"btn-seek-to-interactive",get ariaLabel(){return a},get disabled(){return r()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,s)=>{_m(d,{})},$$slots:{default:!0}}),H()}var c2=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>'),u2=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 bm(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:(r,a)=>{var l=u2(),d=A(ae(l));{var s=u=>{var m=c2();b(u,m)};M(d,u=>{i()&&u(s)})}b(r,l)},$$slots:{default:!0}})}function tc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),r=g(e,"disabled",3,!1),a=g(e,"graphIsOpened",3,!1),d=ye().ui.t,s=f(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=f(()=>o()?"hidden":"");Ft(t,{get className(){return n(u)},testId:"btn-graph",get disabled(){return r()},get ariaLabel(){return n(s)},get click(){return e.click},get ref(){return i()},set ref(m){i(m)},children:(m,p)=>{let v=f(()=>!!a());bm(m,{get isOpened(){return n(v)}})},$$slots:{default:!0}}),H()}import{PlaybackState as j_}from"@vkontakte/videoplayer-core/es2018";function ic(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(u,"$playbackState$",i),a=g(e,"isMobile",3,!1),l=g(e,"isLiveActive",3,!1),d=g(e,"ariaLabel",3,""),s=ye(),u=s.state.playbackState$,m=s.actions.internal.switchToActiveLive,p=s.actions.internal.togglePlay,v=f(()=>()=>{if(!l()){m();return}r()===j_.PAUSED&&p()}),_=f(()=>a()?"":"btn--live btn-full-opacity"),$=f(()=>l()?"btn-live":"btn-live-offset"),y=f(()=>l()&&r()===j_.PLAYING);Ft(t,{get className(){return n(_)},get testId(){return n($)},get disabled(){return n(y)},get ariaLabel(){return d()},get click(){return n(v)},children:(x,I)=>{Ed(x,{get isActive(){return l()}})},$$slots:{default:!0}}),H(),o()}import{noop as X_}from"@vkontakte/videoplayer-shared/es2018";var p2=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),f2=L('<img class="icon" aria-hidden="true"/>');function Ua(t,e){"use strict";let i=K(!1),o=()=>{D(i,!0)};var r=De(),a=ae(r);{var l=s=>{var u=p2();b(s,u)},d=s=>{var u=f2();N(()=>Ne(u,"src",e.icon)),ft("error",u,o),Pa(u),b(s,u)};M(a,s=>{n(i)?s(l):s(d,!1)})}b(t,r)}function $m(t,e){B(e,!0);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,X_),r=g(e,"ref",15),a=f(()=>o()===X_),l=f(()=>n(a)||i()),d=f(()=>n(a)?"btn-full-opacity":"");Po(t,{get disabled(){return n(l)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get tooltipVisible(){return e.tooltipVisible},get ref(){return r()},set ref(s){r(s)},children:(s,u)=>{let m=f(()=>{var p;return(p=e.testId)!=null?p:e.id});Ft(s,{get className(){return n(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(l)},get testId(){return n(m)},children:(p,v)=>{Ua(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),H()}var Z_=t=>!!t.buttonComponent;var Us={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var Wu=(t,e,i,o)=>{if(t)for(let[r,a]of Object.entries(e))a.set(qn(t,i,r,o))};import{interpolate as ym}from"@vkontakte/videoplayer-shared/es2018";var J_=10,eb=40,xm=.2,v2=.5,g2=65,h2=114,_2=4,tb=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=f(()=>i?g2:h2),r=K(!1),a=K(0),l=K(0),d=f(()=>n(o)+J_-eb-_2),s=f(()=>ym(n(a),[xm,1],[0,-n(d)])),u=f(()=>ym(n(a),[xm,1],[0,eb])),m=f(()=>ym(n(a),[xm,1],[0,n(o)+J_]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(m),onPointerDown:y=>{var x;D(l,((x=e())==null?void 0:x.getBoundingClientRect().bottom)||0,!0),D(r,!0)},onPointerMove:y=>{if(!n(r))return;let x=Math.max(Math.min(y.clientY-n(l),0),-n(d));D(a,Math.abs(x/n(d)),!0)},onPointerUp:()=>{D(r,!1),D(a,n(a)>=v2?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{D(a,0)}}};var b2=t=>t;function ca(t,{delay:e=0,duration:i=400,easing:o=b2}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var $2=L('<span class="root s-2c"> </span>'),y2={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 wm(t,e){q(t,y2);var i=$2(),o=C(i,!0);S(i),N(()=>he(o,e.time)),b(t,i)}var x2=L('<div class="tooltip-wrapper s-v"><div><!></div></div>'),w2={hash:"s-v",code:'.tooltip-wrapper.s-v{display:block;position:relative}.tooltip.s-v{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-v:after{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;left:50%;line-height:0;position:absolute;transform:translate(-50%,5px);width:0}.tooltip.active.s-v{opacity:1;visibility:visible}'};function Sm(t,e){q(t,w2);let i=g(e,"active",3,!1),o=g(e,"pointer",3,!1),r=g(e,"translateXPx",3,0),a=g(e,"translateYPx",3,0),l=g(e,"leftOffset",3,0),d=g(e,"rightOffset",3,0),s=K(void 0),u=K(void 0);function m(x){if(!n(u))return 0;let{width:I}=n(u).getBoundingClientRect(),T=I/2;return x<T?T+l():x>e.containerWidth-T?e.containerWidth-T-d():x}let p=f(()=>m(r()));var v=x2(),_=C(v);let $;var y=C(_);ei(y,()=>{var x;return(x=e.children)!=null?x:ht}),S(_),et(_,x=>D(u,x),()=>n(u)),S(v),et(v,x=>D(s,x),()=>n(s)),N(x=>{Ke(v,`transform: translate(${n(p)}px, ${a()}px);`),$=ie(_,1,"tooltip s-v",null,$,x),Ke(_,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,v)}var ib=t=>Math.abs(t)/90%4===1;var S2=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 Cm(t){Xe(t,{height:"20",width:"20",shadow:!0,children:(e,i)=>{var o=S2();Jt(),b(e,o)},$$slots:{default:!0}})}var C2=L('<div class="rich-seek-hint s-u"><span class="icon_wrapper s-u"><!></span> <span class="rich-seek-hint-text s-u"> </span></div>'),T2=L('<div class="preview s-u"><!></div>'),I2=L('<div class="time s-u"> </div>'),E2=L('<div><!> <div class="episode s-u"><!></div> <!></div>'),P2={hash:"s-u",code:".timeline-preview.s-u{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-u{bottom:72px}.preview.s-u{background-color:var(--timeline-preview-bg);border:1px solid var(--white);border-radius:8px;box-shadow:0 0 2px var(--timeline-preview-shadow),0 8px 24px var(--timeline-preview-shadow);display:flex;justify-content:center}.episode.s-u{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-u,.time.s-u{font-size:13px;font-weight:500;line-height:16px;text-align:center;text-shadow:0 8px 24px var(--timeline-preview-shadow),0 0 2px var(--timeline-preview-shadow)}.time.s-u{color:var(--white)}.rich-seek-hint.s-u{position:absolute;text-align:center;top:-12px;transform:translateY(-100%)}.icon_wrapper.s-u{display:inline-block;height:20px;margin-right:6px;vertical-align:top;width:20px}.rich-seek-hint-text.s-u{font-size:14px;line-height:18px;text-shadow:0 2px 4px rgba(0,0,0,.3),0 7px 16px rgba(0,0,0,.25);vertical-align:top}"};function Tm(t,e){B(e,!0),q(t,P2);let[i,o]=Be(),r=()=>w(y,"$rotateAlpha",i),a=()=>w(x,"$playerSize",i),l=()=>w(I,"$previewTrackAvailable",i),d={MOBILE:150,DESKTOP:278},s=g(e,"time",3,""),u=g(e,"isMobile",3,!1),m=g(e,"videoEpisodes",19,()=>[]),p=g(e,"progress",3,0),v=g(e,"duration",3,0),_=g(e,"isInteractive",3,!1),$=ye(),y=$.ui.rotateAlpha,x=$.ui.playerSize,I=$.ui.previewTrackAvailable,T=K(0),R=K(0),k=K(""),P=K(0),E=K(0),W=K(0),F=K(0),U=f(()=>Lu(p(),v(),m())),j=f(()=>Bl(r())),re=f(()=>ib(r())),G=f(Ie),oe=f(()=>(n(re)?1:-1)*(n(T)/2-n(R)/2)),X=f(()=>n(oe)*-1);He(()=>{(ue=>{D(T,ue.width,!0),D(R,ue.height,!0)})(ee())}),He(()=>{(ue=>{D(k,ue.imgSrc,!0),D(P,ue.imgWidth,!0),D(E,ue.imgHeight,!0),D(W,ue.imgOffsetX,!0),D(F,ue.imgOffsetY,!0)})(be(p()))});function Ie(){var te;let ue=u()?d.MOBILE:d.DESKTOP,{isVertical:Le}=fe(),ze=30;return(te=n(U))!=null&&te.text&&(ze+=16),(Le||n(j))&&(ze+=18,ze+=50),Math.min(Math.max(a().height-ze,0),ue)}function fe(){let ue=e.previewThumbsData.frameWidth,Le=e.previewThumbsData.frameHeight,ze=Le>ue;return{width:ue,height:Le,isHorizontal:!ze,isVertical:ze}}function ee(){let{height:ue,isHorizontal:Le,isVertical:ze,width:te}=fe();return Le&&(ue=ue/te*n(G),te=n(G)),ze&&(te=te/ue*n(G),ue=n(G)),{width:te,height:ue}}function be(ue){let Le;e.previewThumbsData.isUV?Le=Math.floor(v()*ue/e.previewThumbsData.frequency):Le=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*ue)));let ze=Math.floor(Le/e.previewThumbsData.countPerImage),te=Math.floor(Le%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),ce=Le%e.previewThumbsData.countPerRow,we=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&ze===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(we=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&we++);let Ee=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&ze===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(Ee=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let Ye=n(T)*Ee,Ae=n(R)*we,Te=-ce*n(T),Fe=-te*n(R);return{imgSrc:e.previewThumbsData.links[ze],imgWidth:Ye,imgHeight:Ae,imgOffsetX:Te,imgOffsetY:Fe}}var Ce=E2();let de;var We=C(Ce);{var ve=ue=>{var Le=T2(),ze=C(Le);{var te=ce=>{var we=C2(),Ee=C(we),Ye=C(Ee);Cm(Ye,{}),S(Ee);var Ae=A(Ee,2),Te=C(Ae,!0);S(Ae),S(we),N(Fe=>he(Te,Fe),[()=>Y("preview_track_notification_text")]),b(ce,we)};M(ze,ce=>{l()&&ce(te)})}S(Le),N(()=>Ke(Le,`width: ${n(T)}px; height: ${n(R)}px; background-image: url(${n(k)}); background-size: ${n(P)}px ${n(E)}px; background-position: ${n(W)}px ${n(F)}px;
59
- transform: rotate(${r()}deg) ${n(j)?`translate(${n(oe)}px, ${n(X)}px)`:""};
60
- `)),b(ue,Le)};M(We,ue=>{n(k)&&ue(ve)})}var me=A(We,2),Z=C(me);{var O=ue=>{var Le=De(),ze=ae(Le);{var te=we=>{var Ee=ps();N(Ye=>he(Ee,Ye),[()=>Y("tooltip_episode_unfinished")]),b(we,Ee)},ce=we=>{var Ee=ps();N(()=>he(Ee,n(U).text||"")),b(we,Ee)};M(ze,we=>{_()&&n(U).completed===!1?we(te):we(ce,!1)})}b(ue,Le)};M(Z,ue=>{n(U)&&ue(O)})}S(me);var pe=A(me,2);{var le=ue=>{var Le=I2(),ze=C(Le,!0);S(Le),N(()=>he(ze,s())),b(ue,Le)};M(pe,ue=>{_()||ue(le)})}S(Ce),N(ue=>{de=ie(Ce,1,"timeline-preview s-u",null,de,ue),Ke(Ce,`width: ${n(j)?n(R):n(T)}px;`)},[()=>({mobile:u()})]),b(t,Ce),H(),o()}var A2=L('<span class="time s-f"> </span>'),k2=L("<!> <!>",1),L2={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 Im(t,e){var Ve,xe,Ue,Se,wt;B(e,!0),q(t,L2);let[i,o]=Be(),r=()=>w(G,"$interactiveEpisodes$",i),a=()=>w(E,"$duration$",i),l=()=>w(P,"$position$",i),d=()=>w(Ie,"$isInteractiveExpectation$",i),s=()=>w(X,"$isInteractiveTime$",i),u=()=>w(Ce,"$previewTrackActive",i),m=()=>w(W,"$isLive$",i),p=()=>w(be,"$disabledControls$",i),v=()=>w(U,"$isMobile",i),_=()=>w(F,"$isActiveLive$",i),$=()=>w(k,"$bufferedProgress$",i),y=g(e,"showTimeline",3,!1),x=g(e,"withEpisodes",3,!0),I=g(e,"ref",15,void 0),T=ye(),R=Lt(),k=T.state.bufferedProgress$,P=T.state.positionWithScrubbing$,E=T.state.duration$,W=T.state.isLive$,F=T.state.isActiveLive$,U=T.ui.isMobile,j=R.features.episodes&&x()?T.actions.internal.getVideoEpisodes():void 0,re=T.actions.internal.getPreviewThumbsData(),G=T.state.interactiveEpisodes$,oe=T.state.isInteractive,X=T.state.isInteractiveTime$,Ie=T.state.isInteractiveExpectation$,fe=T.actions.internal.correctSeekTimeToInteractive,ee=(Ve=T.callbacks)==null?void 0:Ve.onDisabledTimelineClick,be=T.ui.controls.disabledControls$,Ce=T.ui.previewTrackActive,de=(Ue=(xe=T.callbacks)==null?void 0:xe.uiInfo)==null?void 0:Ue.onTimelineMouseEnter,We=(wt=(Se=T.callbacks)==null?void 0:Se.uiInfo)==null?void 0:wt.onTimelineMouseLeave,ve=T.ui.t,me=R.features.interactiveResponsiveUi,Z=f(()=>oe?r():j),O=f(()=>Xo(a())),pe=f(()=>Xo(l())),le=f(()=>l()/a()),ue=f(()=>d()||s()),Le=K(!1),ze=K(""),te=K(0),ce=K(0),we=K(0),Ee=f(()=>({containerWidth:n(ce),translateXPx:n(te),translateYPx:oe&&re?-36:-16,active:n(Le)&&y()&&!n(ue)&&!me&&!u(),pointer:!R.features.timelinePreview||!re||m()})),Ye=ve("aria_timeline"),Ae=f(()=>ve("aria_timeline_value",{position:n(pe),duration:n(O)}));function Te(ge){return!fe||!oe?ge:fe(ge*a())/a()}function Fe(ge,Oe){var Ge;(Ge=e.onSliderPointerDown)==null||Ge.call(e,Oe),T.actions.internal.startScrubbing(Te(ge))}function gt(ge){s()||T.actions.internal.progressScrubbing(Te(ge))}function Mt(ge){var Oe;T.actions.internal.completeScrubbing(Te(ge)),D(Le,!1),(Oe=e.onSliderPointerUp)==null||Oe.call(e)}function Ct(ge,Oe,Ge){var at;(at=e.onSliderPointerEnter)==null||at.call(e,ge),qt(ge,Oe,Ge),D(Le,!0)}function dt(ge,Oe,Ge,at){var Kt;(Kt=e.onSliderMove)==null||Kt.call(e,at,ge),qt(ge,Oe,Ge),D(Le,!0)}function St(){var ge;D(Le,!1),(ge=e.onSliderLeave)==null||ge.call(e)}function qt(ge,Oe,Ge){D(we,Te(ge),!0),D(te,Oe,!0),Ge&&D(ce,Ge,!0),D(ze,Ot(ge),!0)}function Ot(ge){let Oe=Xo((m()?1-ge:ge)*a());return m()?`-${Oe}`:Oe}let Rt=f(()=>p().has("TIMELINE"));var Ut=k2(),Q=ae(Ut);Sm(Q,jr(()=>n(Ee),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(ge,Oe)=>{var Ge=De(),at=ae(Ge);{var Kt=si=>{Tm(si,{get time(){return n(ze)},get isMobile(){return v()},get videoEpisodes(){return n(Z)},get previewThumbsData(){return re},get progress(){return n(we)},get duration(){return a()},get isInteractive(){return oe}})},Et=si=>{var li=A2(),Ei=C(li,!0);S(li),N(()=>he(Ei,n(ze))),b(si,li)};M(at,si=>{R.features.timelinePreview&&re&&!m()?si(Kt):si(Et,!1)})}b(ge,Ge)},$$slots:{default:!0}}));var Me=A(Q,2);Ba(Me,{className:"timeline-slider",get isActiveLive(){return _()},get isMobile(){return v()},get ariaLabel(){return Ye},ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return l()},get ariaValueText(){return n(Ae)},get loadedProgress(){return $()},get filledProgress(){return n(le)},get handleProgress(){return n(le)},get videoEpisodes(){return n(Z)},onPointerDown:Fe,onHandleMove:gt,onPointerMove:dt,onPointerUp:Mt,onPointerEnter:Ct,onPointerLeave:St,get onMouseEnter(){return de},get onMouseLeave(){return We},get onDisabledClick(){return ee},get isInteractive(){return oe},get disabled(){return n(Rt)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:Mt,get ref(){return I()},set ref(ge){I(ge)}}),b(t,Ut),H(),o()}var M2={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 oc(t,e){B(e,!0),q(t,M2);let[i,o]=Be(),r=()=>w(s,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"duration",3,0),d=ye(),s=d.ui.isMobile,u=d.ui.t,m=f(()=>Xo(l())),p=f(()=>Xo(a())),v=f(()=>a()/l()),_=f(()=>u("aria_timeline_value",{position:n(p),duration:n(m)})),$=f(()=>Math.round(n(v)*100));Ba(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n($)},get ariaValueText(){return n(_)},get filledProgress(){return n(v)},hideHandel:!0,get squareBorders(){return r()}}),H(),o()}var V2=L("<div><!></div>"),R2=L("<div></div>"),D2={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 za(t,e){B(e,!0),q(t,D2);let[i,o]=Be(),r=()=>w(x,"$isLive$",i),a=()=>w(R,"$isMobile",i),l=()=>w(k,"$disabled",i),d=()=>w(T,"$adPosition",i),s=()=>w(I,"$adDuration",i),u=g(e,"isAds",3,!1),m=g(e,"isHidden",3,!1),p=g(e,"timelineNotAvailable",3,!1),v=g(e,"needPadding",3,!0),_=g(e,"ref",15,void 0),$=ye(),y=Lt(),x=$.state.isLive$,I=$.ads.duration,T=$.ads.position,R=$.ui.isMobile,k=se(!1),P=f(()=>!p()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var E=De(),W=ae(E);{var F=j=>{var re=V2();let G;var oe=C(re);{var X=fe=>{oc(fe,{get position(){return d()},get duration(){return s()}})},Ie=fe=>{Im(fe,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return n(P)},get withEpisodes(){return e.withEpisodes},get onSliderMove(){return e.onSliderMove},get onSliderPointerDown(){return e.onSliderPointerDown},get onSliderPointerUp(){return e.onSliderPointerUp},get onSliderLeave(){return e.onSliderLeave},get onSliderPointerEnter(){return e.onSliderPointerEnter},get ref(){return _()},set ref(ee){_(ee)}})};M(oe,fe=>{u()?fe(X):fe(Ie,!1)})}S(re),Ls(re,()=>kl(m()&&y.features.usePerformanceFix,k,y.disableInvisibleComponentsTimeout)),N(fe=>G=ie(re,1,"timeline s-d",null,G,fe),[()=>({withoutPadding:!v(),mobile:a(),"out-of-flow":l()})]),b(j,re)},U=j=>{var re=R2();let G;N(oe=>G=ie(re,1,"timeline-stub s-d",null,G,oe),[()=>({mobile:a()})]),b(j,re)};M(W,j=>{n(P)?j(F):j(U,!1)})}b(t,E),H(),o()}import{getRangeAroundIndex as N2}from"@vkontakte/videoplayer-shared/es2018";import{ThinOneStat as O2}from"@vkontakte/videoplayer-statistics/es2018";var B2=(t,e,i,o,r,a,l)=>{D(e,!0),D(i,t.clientX,!0),D(o,n(r),!0),a(l())},H2=L("<div></div>"),F2=L('<div><div class="track s-2a"></div></div>'),U2={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 Pm(t,e){B(e,!0),q(t,U2);let[i,o]=Be(),r=()=>w(R,"$rotateAlpha",i),a=()=>w(y,"$position$",i),l=()=>w($,"$duration$",i),d=ye(),{countPerImage:s=0,countPerRow:u=0,countTotal:m=0,links:p=[],frameHeight:v=0,frameWidth:_=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:$,positionWithScrubbing$:y}=d.state,{startScrubbing:x,progressScrubbing:I,completeScrubbing:T}=d.actions.internal,R=d.ui.rotateAlpha,k=K(void 0),P=K(!1),E=K(0),W=K(0),F=K(0),U=K(0),j=f(()=>v<=_),re=f(()=>Bl(r())),G=f(()=>n(j)?!n(re):n(re)),oe=114,X=65,Ie=3,fe=f(()=>n(G)?oe:X),ee=f(()=>n(j)?oe:X),be=f(()=>n(j)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),Ce=f(()=>m*n(fe)),de=K(0);He(()=>{D(U,Math.ceil(-n(F)/n(fe))-1),D(F,-n(Ce)*a()/l())});let We=()=>{T(ve(),!0,O2.ActionSeekType.RICH)},ve=()=>l()*-n(F)/n(Ce)/l(),me=!1,Z=Ae=>{if(!n(P))return!1;let Te=Ae.clientX-n(E);D(F,n(W)+Te),D(F,Math.max(Math.min(n(F),0),-n(Ce)),!0),Math.abs(Te)>1&&(me=!0),I(ve())},O=Ae=>{n(P)&&(D(P,!1),!me&&Ae&&D(F,-(Ae.offsetX-n(de)/2)),me=!1,We())},pe=()=>{n(P)&&O()},le=f(()=>s/u),ue=(Ae,Te)=>{if(Ae!==p.length-1)return u;let Fe=0,gt=Te*u;for(let Mt=1;Mt<=u;Mt++)Ae*s+Fe+gt<m&&Fe++;return Fe},Le=f(()=>Math.floor(n(U)/s)),ze=f(()=>N2(3,n(Le),p.length-1)),te=(Ae,Te,Fe)=>{let gt=s*n(fe);return Ae*gt+Te*n(fe)*u+n(de)/2-Ie/2+Fe*n(fe)},ce=f(()=>[`--row-numbers: ${n(le)}`,`--column-numbers: ${u}`,`--frame-width: ${n(ee)}px`,`--frame-height: ${n(be)}`].join(";"));var we=F2();let Ee;var Ye=C(we);Ye.__pointerdown=[B2,P,E,W,F,x,ve],Ye.__pointermove=Z,Ye.__pointerup=O,bi(Ye,20,()=>n(ze),Ae=>Ae,(Ae,Te)=>{var Fe=De(),gt=ae(Fe);bi(gt,16,()=>Array.from({length:n(le)},(Mt,Ct)=>Ct),Mt=>Mt,(Mt,Ct)=>{var dt=De(),St=ae(dt);bi(St,16,()=>Array.from({length:ue(Te,Ct)},(qt,Ot)=>Ot),qt=>qt,(qt,Ot)=>{var Rt=H2();N((Ut,Q)=>{Ke(Rt,Ut),ie(Rt,1,Q,"s-2a")},[()=>`--row-index: ${Ct}; --column-index: ${Ot}; left: ${te(Te,Ct,Ot)}px; background-image: url(${p[Te]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),b(qt,Rt)}),b(Mt,dt)}),b(Ae,Fe)}),S(Ye),S(we),et(we,Ae=>D(k,Ae),()=>n(k)),N(Ae=>{Ee=ie(we,1,"root s-2a",null,Ee,Ae),Ke(we,n(ce)),Ke(Ye,`transform: translateX(${n(F)}px); width: ${n(Ce)}px;`)},[()=>({"is-vertical-video":!n(j),"vertically-rotated":n(re)})]),ft("mouseleave",Ye,pe),Tn(we,"clientWidth",Ae=>D(de,Ae)),b(t,we),H(),o()}Je(["pointerdown","pointermove","pointerup"]);var z2=L('<div class="notification s-2b"><span class="description s-2b"> </span></div>'),W2={hash:"s-2b",code:".notification.s-2b{background:var(--notification-bg);border-radius:var(--notification-radius);padding:9px 14px 10px 12px}.description.s-2b{font-size:14px;line-height:18px}"};function Am(t,e){B(e,!1),q(t,W2);let i=340,{ui:{t:o}}=ye();jo();var r=z2(),a=C(r),l=C(a,!0);S(a),S(r),N(d=>he(l,d),[()=>o("preview_track_close_tooltip")],yn),Ms(3,r,()=>ca,()=>({duration:i})),b(t,r),H()}import{getRangeAroundIndex as K2}from"@vkontakte/videoplayer-shared/es2018";var Q2=L('<div class="preview-track-close tooltip s-28"><!></div>'),q2=L('<div class="preview-track-control s-28"><!> <div class="preview-track-close s-28"><!></div> <!></div>'),G2=L('<div class="wrapper-preview-track s-28"><!></div>'),Y2=L('<div class="enriched-timeline s-28"><!> <!> <!></div>'),j2={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 km(t,e){B(e,!0),q(t,j2);let[i,o]=Be(),r=()=>w(y,"$playerSize",i),a=()=>w($,"$duration$",i),l=()=>w(x,"$previewTrackActive",i),d=()=>w(v,"$position$",i),s=()=>w(_,"$isRewindableLive$",i),u=g(e,"timelineRef",15,void 0),m=ye(),p=200,{positionWithScrubbing$:v,isRewindableLive$:_,duration$:$}=m.state,{playerSize:y,previewTrackActive:x}=m.ui,{countPerImage:I=0,links:T=[],frequency:R=0}=m.actions.internal.getPreviewThumbsData()||{},k=f(()=>r().width>100),P=K(!n_()),E=()=>{n(P)&&(o_(),D(P,!1))},W=fe=>{let ee=Math.floor(a()*fe/R),be=Math.floor(ee/I),Ce=K2(3,be,T.length-1);for(let de of Ce){let We=new Image;We.src=T[de]}},F=(fe,ee)=>{W(ee),!l()&&e.onTimelineMove(fe)};var U=Y2(),j=C(U);{var re=fe=>{var ee=q2(),be=C(ee);let Ce=f(()=>Xo(d()));wm(be,{get time(){return n(Ce)}});var de=A(be,2),We=C(de);Rs(We,{onClick:()=>m.actions.internal.closePreviewTrack()}),S(de);var ve=A(de,2);{var me=Z=>{var O=Q2(),pe=C(O);Am(pe,{}),S(O),b(Z,O)};M(ve,Z=>{n(P)&&Z(me)})}S(ee),ft("mouseleave",de,E),Ms(3,ee,()=>ca,()=>({duration:p})),b(fe,ee)};M(j,fe=>{l()&&fe(re)})}var G=A(j,2);let oe=f(()=>!n(k));za(G,{get isHidden(){return n(oe)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return s()},onSliderMove:F,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:W,get ref(){return u()},set ref(fe){u(fe)}});var X=A(G,2);{var Ie=fe=>{var ee=G2(),be=C(ee);Pm(be,{}),S(ee),N(()=>Ke(ee,`height: ${e.animatedPreviewTrackHeight}px;`)),b(fe,ee)};M(X,fe=>{e.previewTrackAvailable&&fe(Ie)})}S(U),N(()=>Ke(U,`transform: translateY(${e.animatedOffsetY}px);`)),b(t,U),H(),o()}var Z2=L('<div><!> <div class="controls s-13" data-testid="player_controls"><div class="controls-left s-13"><!> <!> <!></div> <div class="controls-right s-13"></div></div></div> <!>',1),J2={hash:"s-13",code:'.wrapper-bottom.s-13{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-13:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-13>:where(.s-13){pointer-events:auto}.controls.s-13{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-13,.controls-right.s-13{align-content:center;display:flex}.controls-left.s-13{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-13 >:not(:first-child),.controls-right.s-13 >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-13{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-13{transition:none}'};function Mm(t,e){var va,ol;B(e,!0),q(t,J2);let[i,o]=Be(),r=()=>w(Zo,"$disabledControls$",i),a=()=>w(yt,"$adPlaybackState",i),l=()=>w(Et,"$playbackState$",i),d=()=>w(Ti,"$currentSubtitle$",i),s=()=>w(Ei,"$isEnded$",i),u=()=>w(Mi,"$currentGridType$",i),m=()=>w(uo,"$isLive$",i),p=()=>w(ot,"$chromecastState$",i),v=()=>w(rt,"$isPictureInPictureActive",i),_=()=>w(ci,"$pictureInPictureType$",i),$=()=>w(nt,"$availableSubtitlesList$",i),y=()=>w(Bt,"$contextMenuOpenedByKeyboard$",i),x=()=>w(_t,"$showContextMenuBtn$",i),I=()=>w(di,"$isRewindableLive$",i),T=()=>w(po,"$isActiveLive$",i),R=()=>w(Vr,"$graphIsOpened$",i),k=()=>w(Ao,"$contextMenuVisible$",i),P=()=>w(st,"$isFullscreen",i),E=()=>w(An,"$autoplayNextEnabled",i),W=()=>w(n(Vo),"$prevButton",i),F=()=>w(n(Ro),"$replayButton",i),U=()=>w(n(nn),"$playButton",i),j=()=>w(n(ho),"$nextButton",i),re=()=>w(n(_o),"$playPrevChapterButton",i),G=()=>w(n(Ai),"$seekToInteractiveButton",i),oe=()=>w(n(bo),"$interactiveGraphButton",i),X=()=>w(n(Or),"$liveButton",i),Ie=()=>w(n(xr),"$time",i),fe=()=>w(n(_s),"$episodes",i),ee=()=>w(n(Hi),"$vkLogo",i),be=()=>w(n(bs),"$volume",i),Ce=()=>w(n(os),"$subtitles",i),de=()=>w(n(wr),"$settings",i),We=()=>w(n(Do),"$context",i),ve=()=>w(n(Br),"$fullscreen",i),me=()=>w(n(rn),"$chromecast",i),Z=()=>w(Pn,"$additionalDesktopControlPanelRightButtons$",i),O=()=>w(Oi,"$playerSize",i),pe=()=>w(ko,"$isInteractiveTime$",i),le=()=>w(ut,"$previewTrackActive",i),ue=()=>w(Yi,"$settingsMenuVisible",i),Le=()=>w(yo,"$settingButtonRef$",i),ze=()=>w(z,"$startedByKeyboard$",i),te=()=>w(si,"$isAudioAvailable$",i),ce=()=>w(Ut,"$fakeIsPlaying$",i),we=()=>w(es,"$seekToInteractiveDisabledTooltip$",i),Ee=()=>w(hi,"$isPreviewTrackHorizontallyAligned$",i),Ye=()=>w(So,"$previewTrackAvailable",i),Ae=()=>w(ni,"$previewTrackDragInProgress",i),Te=()=>w(jt,"$adPosition",i),Fe=()=>w(Kt,"$position$",i),gt=()=>w(gi,"$adDuration",i),Mt=()=>w(at,"$duration$",i),Ct=g(e,"playerControlsWrapperRef",15,void 0),dt=g(e,"playerControlsRef",15,void 0),St=g(e,"isAds",3,!1),qt=g(e,"logoTargetUrl",3,""),Ot=g(e,"isOneVideoPlaylist",3,!1),Rt=g(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:Ut}=mo(),Q=ye(),Me=mo(),Ve=Lt(),xe=Q.actions.internal.toggleMuted,Ue=Q.actions.internal.togglePlay,Se=Q.actions.internal.pause,wt=Q.actions.internal.toggleSubtitle,ge=Q.actions.internal.checkFullscreenSupport,Oe=(va=Q.callbacks)==null?void 0:va.onAudioDoesNotExistHint,Ge=(ol=Q.callbacks)==null?void 0:ol.onAudioDisabledHint,at=Q.state.duration$,Kt=Q.state.positionWithScrubbing$,Et=Q.state.playbackState$,si=Q.state.isAudioAvailable$,li=Q.state.isAudioDisabled,Ei=Q.state.isEnded$,uo=Q.state.isLive$,po=Q.state.isActiveLive$,di=Q.state.isRewindableLive$,{isActive$:rt,type$:ci}=Me.pictureInPicture$,Yi=Q.ui.settingsMenu.visible$,ct=Q.ui.settingsMenu.openedByBtnKeyboard$,Dt=Q.ui.controls,fi=Q.actions.internal.getVideoEpisodes(),ot=Q.state.chromecastState$,nt=Q.state.availableSubtitlesList$,Ti=Q.state.currentSubtitle$,Zo=Dt.disabledControls$,Ao=Q.ui.contextMenu.visible$,_t=Q.ui.contextMenu.showContextMenuBtn$,Bt=Q.ui.contextMenu.openedByBtnKeyboard$,z=Q.ui.startedByKeyboard$,Pt=Q.ui.controlBlocks,lt=Q.ui.t,gi=Q.ads.duration,jt=Q.ads.position,yt=Q.ads.playbackState,st=Q.ui.isFullscreen,Oi=Q.ui.playerSize,Mi=Q.ui.currentGridType$,Pn=Q.ui.additionalDesktopControlPanelRightButtons$,An=Q.ui.autoplayNextEnabled$,wi=Q.actions.internal.getVideoElement,ji=Q.actions.internal.replayInteractive,kn=Q.actions.internal.prevVideoClick,vo=Q.actions.internal.nextVideoClick,$i=Q.state.isInteractive,ko=Q.state.isInteractiveTime$,Lo=Q.state.showInteractiveGraph,fo=Q.state.showSeekToInteractive,pn=Q.state.showPlayPrevChapter,Jr=Q.state.showInteractiveTimeIndicator,Mr=Q.state.playPrevChapterDisabledTooltip,es=Me.seekToInteractiveDisabledTooltip$,Vr=Me.graphIsOpened$,Yn=Ve.features.interactiveResponsiveUi,ts=f(()=>r().has("EPISODE_BUTTON")),Rr=f(()=>r().has("GRAPH_BUTTON")),Jo=f(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),fn=f(()=>r().has("PLAY_BUTTON")),vr=f(()=>r().has("REPLAY_BUTTON")),gr=f(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),mn=()=>Q.actions.internal.toggleChromecast(),jn=f(()=>St()?a()==="playing":l()===Lm.PLAYING),hr=f(()=>d().value!=="off"),Xn=f(()=>s()&&!St()||$i),Zn=f(()=>Yn?n(Xn)&&eo(u(),"m"):n(Xn)),is=f(()=>!s()||$i||St()),go=f(()=>eo(u(),"m")),_r=f(()=>e.showNextPrevButtons&&eo(u(),"m")&&!St()&&e.nextButtonActive),Bi=f(()=>e.showNextPrevButtons&&eo(u(),"m")&&!St()&&e.prevButtonActive),br=f(()=>!St()&&!!m()),Ln=f(()=>p()!==ob.NOT_AVAILABLE&&!(v()&&_()===1)&&eo(u(),"m")&&!$i&&!St()),mt=f(()=>e.showAutoplayNext&&!Ot()&&eo(u(),"s")),Xt=f(()=>$().length>0&&eo(u(),"m")),$r=f(()=>y()||x()),Dr=f(()=>eo(u(),"s")&&!St()),Nr=f(()=>!e.logoHidden&&!St()),Mn=f(()=>Ve.features.fullscreen&&ge()&&(e.logoHidden||eo(u(),Yn?"xs":"s"))&&!(v()&&_()===1)&&($i?Rt():!0)),Vn=f(()=>(!m()||St())&&!(Ve.features.interactiveHideTime&&$i)),Mo=f(()=>Lo&&eo(u(),"m")),Rn=f(()=>Yn?fo&&eo(u(),"s"):fo),Jn=f(()=>Yn?pn&&eo(u(),"s"):pn),en=f(()=>!St()&&!m()&&!!(fi!=null&&fi.length)&&n(go)&&!n(ts)),vn=f(()=>!I()||!!T()),er=f(()=>R()?lt("tooltip_interactive_graph_on"):lt("tooltip_interactive_graph_off")),gn=f(()=>k()?lt("tooltip_context_menu_close"):lt("tooltip_context_menu_open")),tn=(pt,vt)=>pt?vt&&vt===Lm.PAUSED?lt("tooltip_play"):"":lt("tooltip_live"),Pi=f(()=>tn(n(vn),l())),io=f(()=>Ve.logoType==="vk_video"?lt("tooltip_vk_video_logo"):lt("tooltip_vk_logo")),on=f(()=>n(hr)?lt("tooltip_subtitles_on"):lt("tooltip_subtitles_off")),tr=f(()=>P()?lt("tooltip_fullscreen_on"):lt("tooltip_fullscreen_off")),yr=f(()=>p()===ob.CONNECTED?lt("tooltip_chromecast_on"):lt("tooltip_chromecast_off")),hn=f(()=>E()?lt("tooltip_autoplay_on"):lt("tooltip_autoplay_off")),ir=K(0),je=ri({}),ai=ri({}),Vo=f(()=>Dt.prevButton),Ro=f(()=>Dt.replayButton),nn=f(()=>Dt.playButton),ho=f(()=>Dt.nextButton),_o=f(()=>Dt.playPrevChapterButton),Ai=f(()=>Dt.seekToInteractiveButton),bo=f(()=>Dt.interactiveGraphButton),Or=f(()=>Dt.liveButton),xr=f(()=>Dt.time),_s=f(()=>Dt.episodes),Hi=f(()=>Dt.vkLogo),bs=f(()=>Dt.volume),os=f(()=>Dt.subtitles),wr=f(()=>Dt.settings),Do=f(()=>Dt.context),Br=f(()=>Dt.fullscreen),rn=f(()=>Dt.chromecast),ki=f(()=>({prevButton:W()?W().right-W().left:0,replayButton:F()?F().right-F().left:0,playButton:U()?U().right-U().left:0,nextButton:j()?j().right-j().left:0,playPrevChapterButton:re()?re().right-re().left:0,seekToInteractiveButton:G()?G().right-G().left:0,interactiveGraphButton:oe()?oe().right-oe().left:0,liveButton:X()?X().right-X().left:0,time:Ie()?Ie().right-Ie().left:0,episodes:fe()?fe().right-fe().left:0,vkLogo:ee()?ee().right-ee().left:0,volume:be()?be().right-be().left:0,subtitles:Ce()?Ce().right-Ce().left:0,settings:de()?de().right-de().left:0,context:We()?We().right-We().left:0,fullscreen:ve()?ve().right-ve().left:0,chromecast:me()?me().right-me().left:0,additionalButtons:Z().length?Z().reduce(pt=>[...pt,40],[]):[]})),Qe=K(0);He(()=>{(!n(Qe)||n(Qe)<n(ki).time)&&Tt(()=>D(Qe,n(ki).time,!0))});let At=K(!1);He(()=>{let pt=0;n(en)&&(eo(u(),"xl")?pt=n(ki).time:pt=60);let vt=n(ki).prevButton+n(ki).playButton+n(ki).nextButton+n(ki).seekToInteractiveButton+n(ki).interactiveGraphButton+n(ki).liveButton+n(Qe)+pt;D(At,n(Vn)&&n(ir)>=vt,!0)});let ui=f(()=>n(At)&&eo(u(),"m")),No=nb(Ul,260),$o=nb(Wu,260);He(()=>{O(),pe(),le(),No(wi(),Dt,je,e.showControls),$o(wi(),Pt,ai,e.showControls)}),He(()=>{ai.bottom=Ct()});let yo=se();He(()=>{ue(),Le()&&Tt(()=>Ml(Le(),ue(),ct))});let Fi;He(()=>{ze(),Tt(()=>Uu(z,ze(),Fi))});function Oo(){sa({isAudioDisabled:li,isAudioAvailable:te(),isAds:St(),audioIsNotExistHintCallback:Oe,audioDisabledHintCallback:Ge})&&xe()}let Dn=$i?ji:Ue,Sr=f(()=>ce()!==null),xo=f(()=>n(Sr)?ce():n(jn)),oo=f(()=>n(xo)?lt("tooltip_pause"):lt("tooltip_play")),_n=lt("tooltip_episodes"),Bo=f(()=>{var pt,vt,_i,Uo;return n(Bi)?{id:"prevButton",type:"desktop-control-panel-left",weight:Hs.prevButton,buttonComponent:Fa,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:kn.bind(null,!0)},tooltipEnabled:!((vt=(pt=Q.callbacks)==null?void 0:pt.uiInfo)!=null&&vt.onPrevButtonMouseEnter)&&!((Uo=(_i=Q.callbacks)==null?void 0:_i.uiInfo)!=null&&Uo.onPrevButtonMouseLeave),mouseEnter:()=>{var zi,vi,Vi;(Vi=(vi=(zi=Q.callbacks)==null?void 0:zi.uiInfo)==null?void 0:vi.onPrevButtonMouseEnter)==null||Vi.call(vi,qn(wi(),je,"prevButton",e.showControls))},mouseLeave:()=>{var zi,vi,Vi;(Vi=(vi=(zi=Q.callbacks)==null?void 0:zi.uiInfo)==null?void 0:vi.onPrevButtonMouseLeave)==null||Vi.call(vi,qn(wi(),je,"prevButton",e.showControls))},tooltipText:lt("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),Nn=f(()=>n(Zn)?{id:"replayButton",type:"desktop-control-panel-left",weight:Hs.replayButton,buttonComponent:zl,buttonComponentProps:{disabled:n(vr),click:Dn},tooltipText:lt("tooltip_restart"),disabled:n(vr)}:void 0),Hr=f(()=>n(is)?{id:"playButton",type:"desktop-control-panel-left",weight:Hs.playButton,buttonComponent:Wl,buttonComponentProps:{disabled:n(fn),isPlaying:n(jn),click:Ue},tooltipText:n(oo),disabled:n(fn)}:void 0),Fr=f(()=>{var pt,vt,_i,Uo;return n(_r)?{id:"nextButton",type:"desktop-control-panel-left",weight:Hs.nextButton,buttonComponent:Fa,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:vo.bind(null,!0)},tooltipEnabled:!((vt=(pt=Q.callbacks)==null?void 0:pt.uiInfo)!=null&&vt.onNextButtonMouseEnter)&&!((Uo=(_i=Q.callbacks)==null?void 0:_i.uiInfo)!=null&&Uo.onNextButtonMouseLeave),mouseEnter:()=>{var zi,vi,Vi;(Vi=(vi=(zi=Q.callbacks)==null?void 0:zi.uiInfo)==null?void 0:vi.onNextButtonMouseEnter)==null||Vi.call(vi,qn(wi(),je,"nextButton",e.showControls))},mouseLeave:()=>{var zi,vi,Vi;(Vi=(vi=(zi=Q.callbacks)==null?void 0:zi.uiInfo)==null?void 0:vi.onNextButtonMouseLeave)==null||Vi.call(vi,qn(wi(),je,"nextButton",e.showControls))},tooltipText:lt("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),On=f(()=>$i&&n(Jn)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Hs.playPrevChapterButton,buttonComponent:Zd,buttonComponentProps:{disabled:n(gr),click:e.playPrevChapter},tooltipText:lt("tooltip_interactive_go_back"),disabledTooltipContent:lt(Mr),disabled:n(gr)}:void 0),tt=f(()=>$i&&n(Rn)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Hs.seekToInteractiveButton,buttonComponent:ec,buttonComponentProps:{disabled:n(Jo),click:e.seekToInteractive},tooltipText:lt("tooltip_interactive_seek"),disabled:n(Jo),disabledTooltipContent:lt(we())}:void 0),Gt=f(()=>$i&&n(Mo)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Hs.interactiveGraphButton,buttonComponent:tc,buttonComponentProps:{disabled:n(Rr),click:Vr.toggle,graphIsOpened:R()},tooltipText:n(er)}:void 0),yi=f(()=>n(br)?{id:"liveButton",type:"desktop-control-panel-left",weight:Hs.liveButton,buttonComponent:ic,buttonComponentProps:{isLiveActive:n(vn),ariaLabel:n(Pi)},tooltipText:n(Pi),disabled:n(vn)&&l()===Lm.PLAYING}:void 0),wo=f(()=>[n(Bo),n(Nn),n(Hr),n(Fr),n(On),n(tt),n(Gt),n(yi)].filter(pt=>!!pt).sort(Ra)),bn=f(()=>n(Nr)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Us.vkLogo,buttonComponent:Ud,buttonComponentProps:{targetUrl:qt(),logoClickable:e.logoClickable,click:Se},tooltipText:n(io),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),Bn=f(()=>n(mt)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Us.autoplayNext,buttonComponent:Jd,tooltipText:n(hn)}:void 0),Ho=f(()=>({id:"volume",type:"desktop-control-panel-right",weight:Us.volume,buttonComponent:tm,buttonComponentProps:{click:Oo,isAds:St()}})),or=f(()=>n(Xt)?{id:"subtitles",type:"desktop-control-panel-right",weight:Us.subtitles,buttonComponent:jf,buttonComponentProps:{isSubtitlesEnabled:n(hr),click:wt},tooltipText:n(on)}:void 0),ns=f(()=>n(Dr)?{id:"settings",type:"desktop-control-panel-right",weight:Us.settings,buttonComponent:Nl,buttonComponentProps:{ref$:yo},tooltipText:ue()?void 0:lt("tooltip_settings_off")}:void 0),Cr=f(()=>Ve.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Us.context,buttonComponent:gm,buttonComponentProps:{ariaLabel:lt("aria_label_context_menu")},className:n($r)?"":"out-of-view",tooltipText:n(gn)}:void 0),$s=f(()=>n(Mn)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Us.fullscreen,buttonComponent:Fd,buttonComponentProps:{isFullscreen:P(),click:e.toggleFullscreen},tooltipText:n(tr)}:void 0),zs=f(()=>n(Ln)?{id:"chromecast",type:"desktop-control-panel-right",weight:Us.chromecast,buttonComponent:Wd,buttonComponentProps:{state:p(),click:mn},tooltipText:n(yr)}:void 0),pa=f(()=>[n(bn),n(Bn),n(Ho),n(or),n(ns),n(Cr),n($s),n(zs),...Z()].filter(pt=>!!pt).sort(Ra)),ut=Q.ui.previewTrackActive,ni=Q.ui.previewTrackDragInProgress,So=Q.ui.previewTrackAvailable,hi=Q.ui.isPreviewTrackHorizontallyAligned,Xi=f(()=>tb({onPreviewTrackOpened:Q.actions.internal.previewTrackOpened,getTimelineRef:()=>je.timeline,isHorizontal:Ee()})),ys=f(()=>n(Xi).progressBarY),xs=f(()=>n(Xi).controlsY),ws=f(()=>n(Xi).onPointerDown),Ui=f(()=>n(Xi).onPointerMove),Ii=f(()=>n(Xi).onPointerUp),_e=f(()=>n(Xi).calculatedHeight),xt=f(()=>n(Xi).closePreviewTrack);He(()=>{le()||n(xt)()});let Yt;kt(()=>()=>Yt&&clearTimeout(Yt));let Zt=pt=>{le()||!Ye()||(n(ws)(pt),Yt=setTimeout(()=>{Q.actions.internal.previewTrackDragStarted()},200))},Fo=()=>{le()||n(Ii)(),Yt&&clearTimeout(Yt),Ae()&&Q.actions.internal.previewTrackDragFinished()},no=pt=>{n(Ui)(pt)},ro=-(parseInt("24")/2+4);var rs=Z2(),$n=ae(rs);let Ss;var fa=C($n);{var ma=pt=>{let vt=f(()=>n(ys)()),_i=f(()=>n(_e)());km(pt,{get animatedOffsetY(){return n(vt)},get animatedPreviewTrackHeight(){return n(_i)},get canRewindLive(){return e.canRewindLive},get isAds(){return St()},onTimelineMove:no,onTimelinePointerDown:Zt,onTimelinePointerUp:Fo,get previewTrackAvailable(){return Ye()},get timelineRef(){return je.timeline},set timelineRef(Uo){je.timeline=Uo}})};M(fa,pt=>{e.showControls&&pt(ma)})}var Ur=A(fa,2),ss=C(Ur),nr=C(ss);bi(nr,17,()=>n(wo),pt=>pt.id,(pt,vt)=>{zu(pt,{get buttonComponent(){return n(vt).buttonComponent},get buttonComponentProps(){return n(vt).buttonComponentProps},get tooltipText(){return n(vt).tooltipText},get disabledTooltipContent(){return n(vt).disabledTooltipContent},get disabled(){return n(vt).disabled},get className(){return n(vt).className},get tooltipEnabled(){return n(vt).tooltipEnabled},get mouseEnter(){return n(vt).mouseEnter},get mouseLeave(){return n(vt).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return je[n(vt).id]},set ref(_i){je[n(vt).id]=_i}})});var Za=A(nr,2);{var Ja=pt=>{let vt=f(()=>!e.showControls),_i=f(()=>St()?Te():Fe()),Uo=f(()=>St()?gt():Mt());Bd(pt,{get isHidden(){return n(vt)},isMobile:!1,get showDuration(){return n(ui)},get position(){return n(_i)},get duration(){return n(Uo)},get ref(){return je.time},set ref(zi){je.time=zi}})};M(Za,pt=>{n(Vn)&&pt(Ja)})}var zr=A(Za,2);let el=f(()=>!n(en));Po(zr,{className:"w-max",get disabled(){return n(el)},get tooltipContent(){return _n},get tooltipVisible(){return e.showControls},tooltipPlacement:"top-left",get initialTranslateXPx(){return ro},get ref(){return je.episodes},set ref(pt){je.episodes=pt},children:(pt,vt)=>{var _i=De(),Uo=ae(_i);{var zi=vi=>{Kd(vi,{get position(){return Fe()},get duration(){return Mt()},get timeCodes(){return fi}})};M(Uo,vi=>{n(en)&&vi(zi)})}b(pt,_i)},$$slots:{default:!0}}),S(ss);var tl=A(ss,2);bi(tl,21,()=>n(pa),pt=>pt.id,(pt,vt)=>{var _i=De(),Uo=ae(_i);{var zi=Vi=>{zu(Vi,{get buttonComponent(){return n(vt).buttonComponent},get buttonComponentProps(){return n(vt).buttonComponentProps},get tooltipText(){return n(vt).tooltipText},get disabledTooltipContent(){return n(vt).disabledTooltipContent},get disabled(){return n(vt).disabled},get className(){return n(vt).className},get tooltipVisible(){return e.showControls},get ref(){return je[n(vt).id]},set ref(ga){je[n(vt).id]=ga}})},vi=Vi=>{let ga=f(()=>!!n(vt).disabled);$m(Vi,{get id(){return n(vt).id},get testId(){return n(vt).testId},get icon(){return n(vt).icon},get ariaLabel(){return n(vt).ariaLabel},get tooltipText(){return n(vt).tooltipText},get disabledTooltipContent(){return n(vt).disabledTooltipContent},get disabled(){return n(ga)},get onClick(){return n(vt).onClick},get disableMouseupTooltipShow(){return n(vt).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return je[n(vt).id]},set ref(nl){je[n(vt).id]=nl}})};M(Uo,Vi=>{Z_(n(vt))?Vi(zi):Vi(vi,!1)})}b(pt,_i)}),S(tl),S(Ur),et(Ur,pt=>dt(pt),()=>dt()),S($n),et($n,pt=>Ct(pt),()=>Ct());var il=A($n,2);{var ql=pt=>{jd(pt,{get ref(){return je.interactiveTimeIndicator},set ref(vt){je.interactiveTimeIndicator=vt}})};M(il,pt=>{Jr&&pt(ql)})}N((pt,vt)=>{Ss=ie($n,1,"wrapper-bottom s-13",null,Ss,pt),Ke($n,`transform: ${e.showControls?"translateY(0)":"translateY(100%)"}`),Ke(Ur,vt),Ur.inert=le()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||Ae()}),()=>`transform: translateY(${n(xs)()}px);`]),Tn(ss,"clientWidth",pt=>D(ir,pt)),b(t,rs),H(),o()}import{ChromecastState as sb,PlaybackState as ab}from"@vkontakte/videoplayer-core/es2018";import{noop as rb}from"@vkontakte/videoplayer-shared/es2018";var ew=L('<div class="icon icon-error-stub s-23"><div class="inner s-23"></div></div>'),tw=L('<img class="icon s-23" aria-hidden="true"/>'),iw={hash:"s-23",code:".icon.s-23{height:24px!important;width:24px!important}.inner.s-23{background-color:var(--white);height:16px;width:16px}"};function Vm(t,e){q(t,iw);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,rb),r=f(()=>o()===rb),a=f(()=>n(r)||i()),l=K(!1),d=()=>{D(l,!0)},s=f(()=>n(r)?"btn-full-opacity":"");Ft(t,{get className(){return n(s)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(a)},get testId(){return e.testId},children:(u,m)=>{var p=De(),v=ae(p);{var _=y=>{var x=ew();b(y,x)},$=y=>{var x=tw();N(()=>Ne(x,"src",e.iconUrl)),ft("error",x,d),Pa(x),b(y,x)};M(v,y=>{n(l)?y(_):y($,!1)})}b(u,p)},$$slots:{default:!0}})}var ow=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 Rm(t){Xe(t,{testId:"muted-icon",children:(e,i)=>{var o=ow();b(e,o)},$$slots:{default:!0}})}import{noop as nw}from"@vkontakte/videoplayer-shared/es2018";function Ku(t,e){B(e,!0);let i=g(e,"muted",3,!1),o=g(e,"click",3,nw),r=g(e,"ref",15,void 0),l=ye().ui.t,d=f(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),s=f(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");Ft(t,{get testId(){return n(s)},get click(){return o()},get ariaLabel(){return n(d)},role:"button",get ref(){return r()},set ref(u){r(u)},children:(u,m)=>{var p=De(),v=ae(p);{var _=y=>{Rm(y,{})},$=y=>{la(y,{get size(){return"24"}})};M(v,y=>{i()?y(_):y($,!1)})}b(u,p)},$$slots:{default:!0}}),H()}var rw=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>'),sw=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>'),aw=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 Dm(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:(r,a)=>{var l=aw(),d=A(ae(l));{var s=m=>{var p=rw();b(m,p)},u=m=>{var p=sw();b(m,p)};M(d,m=>{i()?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}})}import{noop as lw}from"@vkontakte/videoplayer-shared/es2018";function Nm(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isPictureInPictureActive",3,!1),r=g(e,"click",3,lw),a=Y("menu_pip");Ft(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return r()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{Dm(l,{get isActive(){return o()}})},$$slots:{default:!0}}),H()}import{debounceFn as lb}from"@vkontakte/videoplayer-shared/es2018";var dw=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},cw=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},uw=L("<div><!></div>"),pw=L("<div><!></div>"),fw=L("<div><!></div>"),mw=L("<!> <!> <!>",1),vw=L("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),gw=L('<div class="wrapper-middle s-12"><!></div>'),hw=L("<div><!></div> <!> <div><!></div>",1),_w=L('<div aria-hidden="true">·</div> <!>',1),bw=L('<!> <!> <div><div><div class="controls mobile s-12" data-testid="bottom-controls"><div class="controls-group contain s-12"><!> <!> <!> <!></div> <div class="controls-group s-12"><!> <!> <!></div></div> <!></div></div> <!>',1),$w={hash:"s-12",code:".wrapper-bottom.s-12{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-12>:where(.s-12){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-12{height:9px;padding:0 4px 4px}.wrapper-middle.s-12{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-12,.wrapper-top-right.s-12{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-12{right:8px;top:4px}.wrapper-top-left.s-12{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-12,.wrapper-middle-left-second.s-12,.wrapper-middle-right.s-12{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-12{left:12px}.wrapper-middle-left-second.s-12{left:64px}.wrapper-middle-right.s-12{right:12px}.controls.s-12{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-12,.controls-group.s-12{display:flex}.controls-group.contain.s-12{min-width:0}.controls-group.s-12 >:not(:first-child){margin-left:8px}.hidden.s-12{opacity:0;visibility:hidden}.controls-hidden.s-12{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-12{transition:none}.overlay-mobile.s-12{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-12,.wrapper-top-right.fullscreen.s-12{top:16px}.controls-wrapper.fullscreen.s-12{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-12{left:44px;top:12px}.wrapper-top-right.fullscreen.s-12{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-12{left:44px}.wrapper-middle-left-second.fullscreen.s-12{left:96px}.wrapper-middle-right.fullscreen.s-12{right:44px}.controls-wrapper.fullscreen.s-12{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function Om(t,e){var rn,ki;B(e,!0),q(t,$w);let[i,o]=Be(),r=()=>w(Mi,"$seekToInteractiveDisabledTooltip$",i),a=()=>w(Dt,"$disabledControls$",i),l=()=>w(Ot,"$playbackState$",i),d=()=>w(Zo,"$adPlaybackState",i),s=()=>w(Q,"$isEnded$",i),u=()=>w(_t,"$playerSize",i),m=()=>w(wt,"$scrubbingInProgress",i),p=()=>w(Yi,"$chromecastState$",i),v=()=>w(Oe,"$isPictureInPictureActive",i),_=()=>w(Ge,"$pictureInPictureType$",i),$=()=>w(ge,"$mobileNotReportControlHidden$",i),y=()=>w(di,"$chromecastHidden",i),x=()=>w(dt,"$playerPhase",i),I=()=>w(uo,"$pipHidden",i),T=()=>w(ot,"$currentGridType$",i),R=()=>w(li,"$vkLogoHidden",i),k=()=>w(si,"$volumeHidden",i),P=()=>w(Me,"$isLive$",i),E=()=>w(at,"$settingsMenuVisible",i),W=()=>w(Se,"$isRewindableLive$",i),F=()=>w(Ue,"$isActiveLive$",i),U=()=>w(Rt,"$isAudioAvailable$",i),j=()=>w(xe,"$muted$",i),re=()=>w(Ve,"$volume$",i),G=()=>w(gi,"$isInteractiveTime$",i),oe=()=>w(Jn,"$settingButtonRef$",i),X=()=>w(fi,"$startedByKeyboard$",i),Ie=()=>w(Ao,"$isFullscreen",i),fe=()=>w(Bt,"$additionalButtons$",i),ee=()=>w(Ei,"$autoplayNextToggleHidden",i),be=()=>w(ct,"$crashed$",i),Ce=()=>w(po,"$settingsHidden",i),de=()=>w(Pn,"$graphIsOpened$",i),We=()=>w(Ti,"$adPosition",i),ve=()=>w(nt,"$adDuration",i),me=()=>w(qt,"$position$",i),Z=()=>w(St,"$duration$",i),O=g(e,"playerControlsWrapperRef",15,void 0),pe=g(e,"playerControlsRef",15,void 0),le=g(e,"isAds",3,!1),ue=g(e,"logoTargetUrl",3,""),Le=g(e,"isOneVideoPlaylist",3,!1),ze=g(e,"customFullscreenSupported",3,!0),te=ye(),ce=mo(),we=Lt(),Ee=te.actions.internal.toggleMuted,Ye=te.actions.internal.togglePlay,Ae=te.actions.internal.pause,Te=te.actions.internal.prevVideoClick,Fe=te.actions.internal.nextVideoClick,gt=te.actions.internal.checkFullscreenSupport,Mt=(rn=te.callbacks)==null?void 0:rn.onAudioDoesNotExistHint,Ct=(ki=te.callbacks)==null?void 0:ki.onAudioDisabledHint,dt=te.playerPhase,St=te.state.duration$,qt=te.state.positionWithScrubbing$,Ot=te.state.playbackState$,Rt=te.state.isAudioAvailable$,Ut=te.state.isAudioDisabled,Q=te.state.isEnded$,Me=te.state.isLive$,Ve=te.state.volume$,xe=te.state.muted$,Ue=te.state.isActiveLive$,Se=te.state.isRewindableLive$,wt=te.ui.scrubbingInProgress,ge=te.ui.mobileNotReportControlHidden$,{isActive$:Oe,type$:Ge}=ce.pictureInPicture$,at=te.ui.settingsMenu.visible$,Kt=te.ui.settingsMenu.openedByBtnKeyboard$,Et=te.ui.controls,{volume:si,vkLogo:li,autoplayNextToggle:Ei,pip:uo,settings:po,chromecast:di}=te.ui.hiddenControls,rt=te.actions.internal.getVideoEpisodes(),ci=te.webApi.pictureInPictureApi,Yi=te.state.chromecastState$,ct=te.state.crashed$,Dt=Et.disabledControls$,fi=te.ui.startedByKeyboard$,ot=te.ui.currentGridType$,nt=te.ads.duration,Ti=te.ads.position,Zo=te.ads.playbackState,Ao=te.ui.isFullscreen,_t=te.ui.playerSize,Bt=te.ui.additionalButtonsDeprecated$,z=te.actions.internal.getVideoElement,Pt=te.actions.internal.replayInteractive,lt=te.state.isInteractive,gi=te.state.isInteractiveTime$,jt=te.state.showInteractiveGraph,yt=te.state.showSeekToInteractive,st=te.state.showPlayPrevChapter,Oi=te.state.showInteractiveTimeIndicator,Mi=ce.seekToInteractiveDisabledTooltip$,Pn=ce.graphIsOpened$,An=te.ui.controlBlocks,wi=f(()=>Y(te.state.playPrevChapterDisabledTooltip)),ji=f(()=>Y(r())),kn=f(()=>a().has("EPISODE_BUTTON")),vo=f(()=>a().has("GRAPH_BUTTON")),$i=f(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),ko=f(()=>a().has("PLAY_BUTTON")),Lo=f(()=>a().has("REPLAY_BUTTON")),fo=f(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),pn=f(()=>l()===ab.PLAYING),Jr=f(()=>d()==="paused"),Mr=f(()=>s()&&!le()&&!lt),es=f(()=>!s()||le()),Vr=f(()=>e.showNextPrevButtons&&!le()&&e.prevButtonActive),Yn=f(()=>e.showNextPrevButtons&&!le()&&e.nextButtonActive),ts=f(()=>u().width>300),Rr=f(()=>u().width>400),Jo=f(m),fn=f(()=>p()!==sb.NOT_AVAILABLE&&!(v()&&_()===1)&&!$()&&!lt&&!y()),vr=f(()=>x()==="LiveWaitingStart"),gr=f(()=>!!ci&&p()!==sb.CONNECTED&&!$()&&(_()===1&&n(vr)||!n(vr))&&!n(Jo)&&!lt&&!I()),mn=K(!1);kt(()=>{let Qe=ci==null?void 0:ci.info.isActive$.subscribe(At=>D(mn,At,!0));return()=>Qe==null?void 0:Qe.unsubscribe()});let jn=f(()=>!n(Jo)&&eo(T(),"s")),hr=f(()=>!e.logoHidden&&u().width>350&&!R()),Xn=f(()=>we.features.fullscreen&&gt()&&!(v()&&_()===1)&&(lt?ze():!0)&&!n(Jo)&&!n(mn)),Zn=f(()=>!k()&&!n(Jo)),is=f(()=>(!P()||le())&&u().width>260&&!n(Jo)&&!(we.features.interactiveHideTime&&lt)),go=f(()=>E()||e.showControls),_r=f(()=>!le()&&!P()&&!!(rt!=null&&rt.length)&&n(ts)&&!n(kn)&&!n(Jo)),Bi=f(()=>!W()||!!F()),br=f(()=>jt&&eo(T(),"m")),Ln=f(()=>!U()||j()||re()===0),mt=ri({}),Xt=ri({}),$r=lb(Ul,260),Dr=lb(Wu,260);He(()=>{u(),G(),$r(z(),Et,mt,e.showControls),Dr(z(),An,Xt,e.showControls)});let Nr=()=>te.actions.internal.toggleChromecast();async function Mn(){ci!=null&&ci.isActive()?await(ci==null?void 0:ci.exit()):await(ci==null?void 0:ci.request())}function Vn(){sa({isAudioDisabled:Ut,audioDisabledHintCallback:Ct,isAudioAvailable:U(),audioIsNotExistHintCallback:Mt,isAds:le()})&&Ee()}let Mo=K(""),Rn=(Qe,At)=>{if(!Qe){D(Mo,Y("tooltip_live"),!0);return}At&&At===ab.PAUSED&&D(Mo,Y("tooltip_play"),!0)};He(()=>{Rn(n(Bi),l())});let Jn=se();He(()=>{oe()&&Ml(oe(),E(),Kt)}),He(()=>{Uu(fi,X(),mt.playButton)});var en=bw(),vn=ae(en);{var er=Qe=>{var At=vw(),ui=ae(At);let No;var $o=A(ui,2);let yo;et($o,ut=>Xt.topLeft=ut,()=>Xt==null?void 0:Xt.topLeft);var Fi=A($o,2);let Oo;var Dn=C(Fi);bi(Dn,1,fe,({iconUrl:ut,ariaLabel:ni,testId:So,onClick:hi,tooltip:Xi})=>ut,(ut,ni)=>{let So=()=>n(ni).iconUrl,hi=()=>n(ni).ariaLabel,Xi=()=>n(ni).testId,ys=()=>n(ni).onClick,xs=()=>n(ni).tooltip,ws=f(()=>{var Ui;return(Ui=hi())!=null?Ui:xs()});Vm(ut,{get iconUrl(){return So()},get ariaLabel(){return n(ws)},get testId(){return Xi()},get onClick(){return ys()}})});var Sr=A(Dn,2);{var xo=ut=>{Jd(ut,{get ref(){return mt.autoplayNextToggle},set ref(ni){mt.autoplayNextToggle=ni}})};M(Sr,ut=>{e.showAutoplayNext&&!Le()&&!ee()&&ut(xo)})}var oo=A(Sr,2);{var _n=ut=>{Wd(ut,{isMobile:!0,click:Nr,get state(){return p()},get ref(){return mt.chromecast},set ref(ni){mt.chromecast=ni}})};M(oo,ut=>{n(fn)&&ut(_n)})}var Bo=A(oo,2);{var Nn=ut=>{Nm(ut,{click:Mn,get isPictureInPictureActive(){return v()},get ref(){return mt.pip},set ref(ni){mt.pip=ni}})};M(Bo,ut=>{n(gr)&&ut(Nn)})}var Hr=A(Bo,2);{var Fr=ut=>{Nl(ut,{get ref$(){return Jn}})};M(Hr,ut=>{be()&&!Ce()&&ut(Fr)})}var On=A(Hr,2);{var tt=ut=>{Ud(ut,{get click(){return Ae},get targetUrl(){return ue()},get logoClickable(){return e.logoClickable},get ref(){return mt.vkLogo},set ref(ni){mt.vkLogo=ni}})};M(On,ut=>{n(hr)&&ut(tt)})}S(Fi),et(Fi,ut=>Xt.topRight=ut,()=>Xt==null?void 0:Xt.topRight);var Gt=A(Fi,2);let yi;var wo=C(Gt);{var bn=ut=>{let ni=f(()=>Te.bind(null,!0));Fa(ut,{get click(){return n(ni)},type:"prev",isMobile:!0,get ref(){return mt.prevButton},set ref(So){mt.prevButton=So}})};M(wo,ut=>{n(Vr)&&ut(bn)})}var Bn=A(wo,2);{var Ho=ut=>{Wl(ut,{get disabled(){return n(ko)},get click(){return Ye},isMobile:!0,get isPlaying(){return n(pn)},get ref(){return mt.playButton},set ref(ni){mt.playButton=ni}})};M(Bn,ut=>{n(es)&&ut(Ho)})}var or=A(Bn,2);{var ns=ut=>{zl(ut,{get disabled(){return n(Lo)},get click(){return Ye},isMobile:!0,get ref(){return mt.replayButton},set ref(ni){mt.replayButton=ni}})};M(or,ut=>{n(Mr)&&ut(ns)})}var Cr=A(or,2);{var $s=ut=>{let ni=f(()=>Fe.bind(null,!0));Fa(ut,{get click(){return n(ni)},type:"next",isMobile:!0,get ref(){return mt.nextButton},set ref(So){mt.nextButton=So}})};M(Cr,ut=>{n(Yn)&&ut($s)})}S(Gt),et(Gt,ut=>Xt.middle=ut,()=>Xt==null?void 0:Xt.middle);var zs=A(Gt,2);{var pa=ut=>{var ni=mw(),So=ae(ni);{var hi=Ui=>{var Ii=uw();let _e;Ii.__click=[dw,fo,e,wi];var xt=C(Ii);let Yt=f(()=>!e.showControls);Zd(xt,{get hidden(){return n(Yt)},get disabled(){return n(fo)},get click(){return e.playPrevChapter},get ref(){return mt.playPrevChapterButton},set ref(Zt){mt.playPrevChapterButton=Zt}}),S(Ii),N(Zt=>_e=ie(Ii,1,"wrapper-middle-left s-12",null,_e,Zt),[()=>({fullscreen:Ie(),hidden:!e.showControls})]),b(Ui,Ii)};M(So,Ui=>{st&&Ui(hi)})}var Xi=A(So,2);{var ys=Ui=>{var Ii=pw();let _e;var xt=C(Ii);let Yt=f(()=>!e.showControls&&!de());tc(xt,{get hidden(){return n(Yt)},get disabled(){return n(vo)},get click(){return Pn.toggle},get graphIsOpened(){return de()},get ref(){return mt.interactiveGraphButton},set ref(Zt){mt.interactiveGraphButton=Zt}}),S(Ii),N(Zt=>_e=ie(Ii,1,gd(st?"wrapper-middle-left-second":"wrapper-middle-left"),"s-12",_e,Zt),[()=>({fullscreen:Ie(),hidden:!e.showControls&&!de()})]),b(Ui,Ii)};M(Xi,Ui=>{n(br)&&Ui(ys)})}var xs=A(Xi,2);{var ws=Ui=>{var Ii=fw();let _e;Ii.__click=[cw,$i,e,ji];var xt=C(Ii);let Yt=f(()=>!e.showControls);ec(xt,{get hidden(){return n(Yt)},get disabled(){return n($i)},get click(){return e.seekToInteractive},get ref(){return mt.seekToInteractiveButton},set ref(Zt){mt.seekToInteractiveButton=Zt}}),S(Ii),N(Zt=>_e=ie(Ii,1,"wrapper-middle-right s-12",null,_e,Zt),[()=>({fullscreen:Ie(),hidden:!e.showControls})]),b(Ui,Ii)};M(xs,Ui=>{yt&&Ui(ws)})}b(ut,ni)};M(zs,ut=>{lt&&!m()&&ut(pa)})}N((ut,ni,So,hi)=>{No=ie(ui,1,"overlay-mobile s-12",null,No,ut),yo=ie($o,1,"wrapper-top-left s-12",null,yo,ni),Oo=ie(Fi,1,"wrapper-top-right s-12",null,Oo,So),yi=ie(Gt,1,"wrapper-middle s-12",null,yi,hi)},[()=>({hidden:!n(go)}),()=>({hidden:!e.showControls,fullscreen:Ie()}),()=>({hidden:!e.showControls&&!$(),fullscreen:Ie()}),()=>({hidden:!e.showControls||m()||e.endScreenShown&&e.showNextPrevButtons})]),b(Qe,At)};M(vn,Qe=>{le()||Qe(er)})}var gn=A(vn,2);{var tn=Qe=>{var At=hw(),ui=ae(At);let No;var $o=C(ui);Ku($o,{get muted(){return j()},click:Vn,get ref(){return mt.volume},set ref(xo){mt.volume=xo}}),S(ui);var yo=A(ui,2);{var Fi=xo=>{var oo=gw(),_n=C(oo);let Bo=f(()=>!n(Jr));Wl(_n,{get disabled(){return n(ko)},get click(){return Ye},isMobile:!0,get isPlaying(){return n(Bo)},get ref(){return mt.playButton},set ref(Nn){mt.playButton=Nn}}),S(oo),b(xo,oo)};M(yo,xo=>{n(Jr)&&xo(Fi)})}var Oo=A(yo,2);let Dn;var Sr=C(Oo);oc(Sr,{get position(){return We()},get duration(){return ve()}}),S(Oo),N((xo,oo)=>{No=ie(ui,1,"wrapper-top-right s-12",null,No,xo),Dn=ie(Oo,1,"wrapper-bottom ads-timeline-mobile s-12",null,Dn,oo)},[()=>({fullscreen:Ie()}),()=>({fullscreen:Ie()})]),b(Qe,At)};M(gn,Qe=>{le()&&d()!=="inactive"&&Qe(tn)})}var Pi=A(gn,2);let io;var on=C(Pi);let tr;var yr=C(on),hn=C(yr),ir=C(hn);{var je=Qe=>{Po(Qe,{get disabled(){return n(Lo)},get ref(){return mt.replayButton},set ref(At){mt.replayButton=At},children:(At,ui)=>{zl(At,{get disabled(){return n(Lo)},get click(){return Pt}})},$$slots:{default:!0}})};M(ir,Qe=>{lt&&Qe(je)})}var ai=A(ir,2);{var Vo=Qe=>{Po(Qe,{get ref(){return mt.liveButton},set ref(At){mt.liveButton=At},children:(At,ui)=>{ic(At,{get isLiveActive(){return n(Bi)},isMobile:!0,get ariaLabel(){return n(Mo)}})},$$slots:{default:!0}})};M(ai,Qe=>{!le()&&P()&&Qe(Vo)})}var Ro=A(ai,2);{var nn=Qe=>{let At=f(()=>le()?We():me()),ui=f(()=>le()?ve():Z()),No=f(()=>!e.showControls);Bd(Qe,{get showDuration(){return n(Rr)},get position(){return n(At)},get duration(){return n(ui)},isMobile:!0,get isHidden(){return n(No)},get ref(){return mt.time},set ref($o){mt.time=$o}})};M(Ro,Qe=>{n(is)&&Qe(nn)})}var ho=A(Ro,2);let _o=f(()=>!n(_r));Po(ho,{className:"w-max",get disabled(){return n(_o)},get ref(){return mt.episodes},set ref(Qe){mt.episodes=Qe},children:(Qe,At)=>{var ui=De(),No=ae(ui);{var $o=yo=>{var Fi=_w(),Oo=A(ae(Fi),2);Kd(Oo,{get position(){return me()},get duration(){return Z()},get timeCodes(){return rt}}),b(yo,Fi)};M(No,yo=>{n(_r)&&yo($o)})}b(Qe,ui)},$$slots:{default:!0}}),S(hn),et(hn,Qe=>Xt.bottomLeft=Qe,()=>Xt==null?void 0:Xt.bottomLeft);var Ai=A(hn,2),bo=C(Ai);{var Or=Qe=>{Po(Qe,{get ref(){return mt.volume},set ref(At){mt.volume=At},children:(At,ui)=>{Ku(At,{get muted(){return n(Ln)},click:Vn})},$$slots:{default:!0}})};M(bo,Qe=>{n(Zn)&&Qe(Or)})}var xr=A(bo,2);{var _s=Qe=>{Po(Qe,{get ref(){return mt.settings},set ref(At){mt.settings=At},children:(At,ui)=>{Nl(At,{get ref$(){return Jn}})},$$slots:{default:!0}})};M(xr,Qe=>{n(jn)&&Qe(_s)})}var Hi=A(xr,2);{var bs=Qe=>{Po(Qe,{get ref(){return mt.fullscreen},set ref(At){mt.fullscreen=At},children:(At,ui)=>{Fd(At,{get click(){return e.toggleFullscreen},get isFullscreen(){return Ie()}})},$$slots:{default:!0}})};M(Hi,Qe=>{n(Xn)&&Qe(bs)})}S(Ai),et(Ai,Qe=>Xt.bottomRight=Qe,()=>Xt==null?void 0:Xt.bottomRight),S(yr),et(yr,Qe=>pe(Qe),()=>pe());var os=A(yr,2);let wr=f(()=>!e.showControls);za(os,{get isHidden(){return n(wr)},get isAds(){return le()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return W()},get ref(){return mt.timeline},set ref(Qe){mt.timeline=Qe}}),S(on),et(on,Qe=>Xt.bottom=Qe,()=>Xt==null?void 0:Xt.bottom),S(Pi),et(Pi,Qe=>O(Qe),()=>O());var Do=A(Pi,2);{var Br=Qe=>{jd(Qe,{get ref(){return mt.interactiveTimeIndicator},set ref(At){mt.interactiveTimeIndicator=At}})};M(Do,Qe=>{Oi&&Qe(Br)})}N((Qe,At)=>{io=ie(Pi,1,"wrapper-bottom mobile s-12",null,io,Qe),Ke(Pi,`transform: ${e.showControls?"translateY(0)":"translateY(100%)"}`),tr=ie(on,1,"controls-wrapper s-12",null,tr,At)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:Ie()})]),b(t,en),H(),o()}Je(["click"]);function nc(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(I,"$isMobile",i),a=g(e,"bottomNoSmooth",3,!1),l=g(e,"playerControlsWrapperRef",15,void 0),d=g(e,"playerControlsRef",15,void 0),s=g(e,"isAds",3,!1),u=g(e,"logoTargetUrl",3,""),m=g(e,"showAutoplayNext",3,!1),p=g(e,"isOneVideoPlaylist",3,!1),v=g(e,"customFullscreenSupported",3,!0),_=g(e,"endScreenShown",3,!1),$=g(e,"onDisabledPlayPrevChapterClick",3,db),y=g(e,"onDisabledSeekToInteractiveClick",3,db),I=ye().ui.isMobile,T=K(!1);kt(()=>{let E=setTimeout(()=>D(T,!0),0);return()=>clearTimeout(E)});var R=De(),k=ae(R);{var P=E=>{var W=De(),F=ae(W);{var U=re=>{Om(re,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get showAutoplayNext(){return m()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return p()},get customFullscreenSupported(){return v()},get endScreenShown(){return _()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return $()},get onDisabledSeekToInteractiveClick(){return y()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(G){l(G)},get playerControlsRef(){return d()},set playerControlsRef(G){d(G)}})},j=re=>{Mm(re,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get isOneVideoPlaylist(){return p()},get showAutoplayNext(){return m()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return v()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(G){l(G)},get playerControlsRef(){return d()},set playerControlsRef(G){d(G)}})};M(F,re=>{r()?re(U):re(j,!1)})}b(E,W)};M(k,E=>{n(T)&&E(P)})}b(t,R),H(),o()}var yw=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 rc(t,e){B(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:(r,a)=>{var l=yw();b(r,l)},$$slots:{default:!0}}),H()}var xw=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 Bm(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=f(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),r=f(()=>`seek-icon-${i()?"backward":"forward"}`);Xe(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(r)},get shadow(){return e.shadow},children:(a,l)=>{var d=xw();b(a,d)},$$slots:{default:!0}}),H()}var ww=L('<span class="hot-key-helpers-text s-1e"> </span>'),Sw=L('<div data-testid="hotkey-helper-icon" class="s-1e"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),Cw=L("<div><!></div>"),Tw={hash:"s-1e",code:'.hot-key-helpers-container.s-1e{align-items:center;animation:s-1e-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-1e{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-1e{left:calc(75% - 100px)}.hot-key-helpers-text.s-1e{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-1e{animation:s-1e-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-1e-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-1e-fadeOut{0%{opacity:1}to{opacity:0}}'};function Hm(t,e){B(e,!0),q(t,Tw);let[i,o]=Be(),r=()=>w(e.data,"$data",i),a=ye(),{features:l}=Lt(),d=a.ui.t,s=f(()=>!r()),u=f(()=>{var I;return((I=r())==null?void 0:I.type)==="BACKWARD_SEEK"}),m=f(()=>{var I;return((I=r())==null?void 0:I.type)==="FORWARD_SEEK"}),p=f(()=>{var I;return(I=r())==null?void 0:I.type}),v=f(()=>{var I,T;return(I=r())!=null&&I.t?d(r().t.key,{value:r().t.value||""}):(T=r())==null?void 0:T.text});var _=Cw();let $;var y=C(_);{var x=I=>{var T=Sw(),R=ae(T),k=C(R);{var P=pe=>{let le=f(()=>n(p)==="BACKWARD_SEEK");Bm(pe,{get reversed(){return n(le)},shadow:!0})};M(k,pe=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&pe(P)})}var E=A(k,2);{var W=pe=>{Fs(pe,{get size(){return"48"},shadow:!0})};M(E,pe=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&pe(W)})}var F=A(E,2);{var U=pe=>{fr(pe,{get size(){return"48"},shadow:!0})};M(F,pe=>{n(p)==="PLAY"&&!l.playbackStatusShow&&pe(U)})}var j=A(F,2);{var re=pe=>{Xd(pe,{get size(){return"48"},shadow:!0})};M(j,pe=>{n(p)==="REPLAY"&&!l.playbackStatusShow&&pe(re)})}var G=A(j,2);{var oe=pe=>{aa(pe,{get size(){return"48"},type:"off",shadow:!0})};M(G,pe=>{n(p)==="SUBTITLES_OFF"&&pe(oe)})}var X=A(G,2);{var Ie=pe=>{aa(pe,{get size(){return"48"},shadow:!0})};M(X,pe=>{n(p)==="SUBTITLES_ON"&&pe(Ie)})}var fe=A(X,2);{var ee=pe=>{let le=f(()=>n(p)==="RATE_DOWN");rc(pe,{get size(){return"48"},get reversed(){return n(le)},testId:"rate-change-icon",shadow:!0})};M(fe,pe=>{["RATE_DOWN","RATE_UP"].includes(n(p))&&pe(ee)})}var be=A(fe,2);{var Ce=pe=>{let le=f(()=>n(p)==="EPISODE_PREV");da(pe,{get size(){return"48"},get reversed(){return n(le)},shadow:!0})};M(be,pe=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(p))&&pe(Ce)})}var de=A(be,2);{var We=pe=>{la(pe,{get size(){return"48"},volume:0,shadow:!0})};M(de,pe=>{n(p)==="MUTE"&&pe(We)})}var ve=A(de,2);{var me=pe=>{la(pe,{get size(){return"48"},volume:1,shadow:!0})};M(ve,pe=>{n(p)==="VOLUME"&&pe(me)})}S(R);var Z=A(R,2);{var O=pe=>{var le=ww(),ue=C(le,!0);S(le),N(()=>he(ue,n(v))),b(pe,le)};M(Z,pe=>{n(v)&&pe(O)})}N(()=>Ne(R,"data-type",n(p))),b(I,T)};M(y,I=>{!n(s)&&n(p)&&I(x)})}S(_),N(I=>$=ie(_,1,"hot-key-helpers-container s-1e",null,$,I),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(m)})]),b(t,_),H(),o()}var Iw=(t,e,i,o,r,a)=>{if(e.has(t.code))switch(t.preventDefault(),t.stopPropagation(),t.code){case"ArrowUp":i();break;case"ArrowDown":o();break;case"ArrowLeft":r();break;case"ArrowRight":a();break}},Ew=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},Pw=L('<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>'),Aw={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 sc(t,e){B(e,!0),q(t,Aw);let i=g(e,"isShifted",3,!1),o=ye(),r=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},l=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},s=()=>{o.actions.internal.startCameraManualRotation(-1,0)},u=()=>(o.actions.internal.stopCameraManualRotation(),null),m=Y("aria_label_spherical_control");var p=Pw();let v;p.__keydown=[Iw,r,a,l,s,d],p.__keyup=[Ew,r,u];var _=C(p),$=C(_),y=C($);y.__mousedown=a,y.__mouseup=u;var x=C(y);kr(x,{direction:"up",useBtnColor:!0}),S(y);var I=A(y,2);I.__mousedown=d,I.__mouseup=u;var T=C(I);kr(T,{direction:"up",useBtnColor:!0}),S(I),S($);var R=A($,2),k=C(R);k.__mousedown=s,k.__mouseup=u;var P=C(k);kr(P,{direction:"up",useBtnColor:!0}),S(k);var E=A(k,2);E.__mousedown=l,E.__mouseup=u;var W=C(E);kr(W,{direction:"up",useBtnColor:!0}),S(E),S(R),S(_),S(p),N(F=>{v=ie(p,1,"immersive-controls s-o",null,v,F),Ne(p,"aria-label",m)},[()=>({"m-shifted":i()})]),ft("mouseleave",y,u),ft("mouseleave",I,u),ft("mouseleave",k,u),ft("mouseleave",E,u),b(t,p),H()}Je(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as ub,Subscription as kw,filterChanged as Lw,filter as Mw}from"@vkontakte/videoplayer-shared/es2018";var cb=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var Qu=class{constructor(){this.flickeringTimeout=cb(1e3);this.subscriptions=new kw;this.isAuto=!1;this.isLive=!1;this.captions$=new ub([]);this.captionsPrepared$=new ub([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(Mw(()=>this.isEnabled()),Lw()).subscribe(e=>{this.processCaptions(e)})),this}setIsAuto(e){this.isAuto=e}setIsLive(e){this.isLive=e}setCaptions(e){this.captions$.next(e)}destroy(){this.subscriptions.unsubscribe(),this.flickeringTimeout.clear()}isEnabled(){return this.isAuto&&!this.isLive}processCaptions(e){if(!e.length){this.flickeringTimeout.add(()=>{this.captionsPrepared$.next([])});return}this.flickeringTimeout.clear();let i=[],o=e.length>1&&e[0].type!=="timestamp"&&e[1].type!=="timestamp";o&&i.push([{value:String(e[0].value),timeAppeared:null}]),i.push(e.reduce((r,{type:a,value:l},d)=>(o&&!d||(a==="timestamp"?r.push({timeAppeared:Number(l),value:""}):r.length===0?r.push({value:String(l)}):r[r.length-1].value=String(l)),r),[])),this.captionsPrepared$.next(i)}};var Vw=L('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),Rw=L('<span class="caption-line s-a"><span class="caption-segment s-a"></span></span>'),Dw=L('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),Nw=L('<div><span class="caption s-a"><!></span></div>'),Ow=L("<div><!></div>"),Bw={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 Ka(t,e){B(e,!0),q(t,Bw);let[i,o]=Be(),r=()=>w(v,"$currentSubtitle$",i),a=()=>w($,"$isLive$",i),l=()=>w(y,"$isFullscreen",i),d=()=>w(x,"$previewTrackActive",i),s=()=>w(_,"$isAutoSubtitleCaptionVisible$",i),u=g(e,"isMobile",3,!1),m=ye(),p=Lt(),v=m.state.currentSubtitle$,_=m.state.isAutoSubtitleCaptionVisible$,$=m.state.isLive$,y=m.ui.isFullscreen,x=m.ui.previewTrackActive,I=f(()=>!!r().isAuto),T=f(()=>!!a()),R=f(()=>e.playerSize.width*.02),k=f(()=>u()&&!l()||n(R)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(R)),P=K(null);He(()=>{var G,oe,X;(G=n(P))==null||G.setIsAuto(n(I)),(oe=n(P))==null||oe.setIsLive(n(T)),(X=n(P))==null||X.setCaptions(e.captions)});let E=K(ri([[]]));kt(()=>{D(P,new Qu().subscribe(),!0);let G=n(P).captionsPrepared$.subscribe(oe=>{D(E,oe,!0)});return()=>{var oe;(oe=n(P))==null||oe.destroy(),G.unsubscribe()}}),kt(()=>{if(n(I)){let G=window.setTimeout(()=>{_.set(!1)},p.autoSubtitlesTimeout);return()=>{window.clearTimeout(G)}}else _.set(!1)});let W=f(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var F=Ow();let U;var j=C(F);{var re=G=>{var oe=Nw();let X;var Ie=C(oe),fe=C(Ie);{var ee=Ce=>{var de=Vw(),We=C(de),ve=C(We,!0);S(We),S(de),N(me=>{var Z;Ke(We,`font-size: ${(Z=n(k))!=null?Z:""}px`),he(ve,me)},[()=>Y("subtitles_auto_caption")]),b(Ce,de)},be=(Ce,de)=>{{var We=me=>{var Z=De(),O=ae(Z);bi(O,17,()=>n(E),md,(pe,le)=>{var ue=Rw(),Le=C(ue);bi(Le,21,()=>n(le),({value:ze,timeAppeared:te})=>te,(ze,te)=>{let ce=()=>n(te).value,we=()=>n(te).timeAppeared;var Ee=De(),Ye=ae(Ee);{var Ae=Te=>{var Fe=ps();N(()=>he(Fe,ce())),b(Te,Fe)};M(Ye,Te=>{(!we()||we()<=e.position)&&Te(Ae)})}b(ze,Ee)}),S(Le),S(ue),N(()=>{var ze;return Ke(Le,`font-size: ${(ze=n(k))!=null?ze:""}px`)}),b(pe,ue)}),b(me,Z)},ve=me=>{var Z=De(),O=ae(Z);bi(O,17,()=>e.captions,({value:pe})=>pe,(pe,le)=>{let ue=()=>n(le).value;var Le=Dw(),ze=C(Le),te=C(ze,!0);S(ze),S(Le),N(()=>{var ce;Ke(ze,`font-size: ${(ce=n(k))!=null?ce:""}px`),he(te,ue())}),b(pe,Le)}),b(me,Z)};M(Ce,me=>{var Z;n(I)&&((Z=n(E))!=null&&Z.length)?me(We):me(ve,!1)},de)}};M(fe,Ce=>{n(I)&&s()?Ce(ee):Ce(be,!1)})}S(Ie),S(oe),N(Ce=>{var de;X=ie(oe,1,"subtitles-caption s-a",null,X,Ce),Ke(oe,`--subtitles-caption-margin: ${(de=n(W))!=null?de:""}%`)},[()=>({mobile:u()})]),b(G,oe)};M(j,G=>{var oe;(e.captions.length||(oe=n(E))!=null&&oe.length)&&G(re)})}S(F),N(G=>U=ie(F,1,"subtitles-container s-a",null,U,G),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(I)&&!n(T)&&!s()})]),b(t,F),H(),o()}import{ChromecastState as Hw}from"@vkontakte/videoplayer-core/es2018";var Fw=L('<div class="text s-p"> </div>'),Uw=L('<div><div class="icon_wrapper s-p"><!></div> <!></div>'),zw={hash:"s-p",code:".wrapper.s-p{align-items:center;background-position:50%;background-repeat:no-repeat;background-size:contain;display:flex;flex-direction:column;font-size:16px;height:100%;justify-content:center}.wrapper.bgCover.s-p{background-size:cover}.icon_wrapper.s-p{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-p{margin-top:20px}"};function ac(t,e){B(e,!0),q(t,zw);let i=g(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Lt();var r=Uw();let a;r.__contextmenu=function(...m){var p;(p=e.onContextMenu)==null||p.apply(this,m)},r.__click=function(...m){var p;(p=e.onClick)==null||p.apply(this,m)},r.__dblclick=function(...m){var p;(p=e.onDblClick)==null||p.apply(this,m)};var l=C(r),d=C(l);zd(d,{get size(){return"48"},get iconState(){return Hw.CONNECTED}}),S(l);var s=A(l,2);{var u=m=>{var p=Fw(),v=C(p);S(p),N(()=>{var _;return he(v,`Видео воспроизводится на ${(_=i())!=null?_:""}`)}),b(m,p)};M(s,m=>{i()&&m(u)})}S(r),N(m=>{a=ie(r,1,"wrapper s-p",null,a,m),Ke(r,`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e.thumbUrl||""}')`)},[()=>({bgCover:o.features.previewNoEmptySpace})]),b(t,r),H()}Je(["contextmenu","click","dblclick"]);var Ww=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 Fm(t){Xe(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=Ww();b(e,o)},$$slots:{default:!0}})}var Kw=L('<div class="container s-4"><!></div>'),Qw={hash:"s-4",code:".container.s-4{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function Qa(t){q(t,Qw);var e=Kw(),i=C(e);Fm(i,{}),S(e),b(t,e)}var qw=L('<div class="playButton s-b" tabindex="0" role="button"><div class="playButtonBackground s-b"></div> <!></div>'),Gw=L('<div data-testid="unstarted-thumb"><!></div>'),Yw={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 qa(t,e){B(e,!0),q(t,Yw);let i=g(e,"iconVisible",3,!0),o=ye(),r=Lt(),a=o.ui.startedByKeyboard$,l=Y("tooltip_play"),d=_=>{var y;let $=_.code;["Enter","Space"].includes($)&&(_.stopPropagation(),_.preventDefault(),a.set(!0),(y=e.startVideo)==null||y.call(e))},s=_=>{var $,y;_.stopPropagation(),($=e.startVideo)==null||$.call(e),(y=e.onClick)==null||y.call(e,_)};var u=Gw();let m;u.__click=s,u.__contextmenu=function(..._){var $;($=e.onContextMenu)==null||$.apply(this,_)};var p=C(u);{var v=_=>{var $=qw();$.__keydown=d;var y=A(C($),2);fr(y,{get size(){return"48"}}),S($),N(()=>Ne($,"aria-label",l)),b(_,$)};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:r.features.previewNoEmptySpace})]),b(t,u),H({handlePressKey:d,handleClick:s})}Je(["click","contextmenu","keydown"]);var jw=L('<span class="text s-1c"> </span>'),Xw=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},Zw=L('<a target="_blank" class="link s-1c"><!></a>'),Jw=(t,e)=>e.onTitleClicked(),eS=L("<button><!></button>"),tS=L('<div data-testid="video_title"><!></div>'),iS={hash:"s-1c",code:".title.s-1c{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-1c,.title.s-1c{color:var(--white)}.link.s-1c{pointer-events:auto;text-decoration:none}.link.s-1c:hover{text-decoration:underline}.text.s-1c{pointer-events:auto}.size-sm.s-1c{font-size:14px;font-weight:500;line-height:18px}.hidden.s-1c{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function Um(t,e){B(e,!0),q(t,iS);let i=_=>{var $=jw(),y=C($,!0);S($),et($,x=>l(x),()=>l()),N(()=>he(y,o())),ft("mouseenter",$,function(...x){var I;(I=e.onMouseEnter)==null||I.apply(this,x)}),ft("mouseleave",$,function(...x){var I;(I=e.onMouseLeave)==null||I.apply(this,x)}),b(_,$)},o=g(e,"title",3,""),r=g(e,"isHidden",3,!1),a=g(e,"size",3,"md"),l=g(e,"ref",15),d=K(void 0);kt(()=>{var $;requestAnimationFrame(()=>{var y;(y=e.onVisibilityChanged)==null||y.call(e,!0)});function _(y){var x;y.propertyName==="transform"&&((x=e.onVisibilityChanged)==null||x.call(e,!r()))}return($=n(d))==null||$.addEventListener("transitionend",_),()=>{var y;return(y=n(d))==null?void 0:y.removeEventListener("transitionend",_)}});var s=tS();let u;var m=C(s);{var p=_=>{var $=Zw();$.__click=[Xw,e];var y=C($);i(y),S($),N(()=>Ne($,"href",e.titleLinkHref)),b(_,$)},v=(_,$)=>{{var y=I=>{var T=eS();T.__click=[Jw,e];var R=C(T);i(R),S(T),b(I,T)},x=I=>{i(I)};M(_,I=>{e.onTitleClicked?I(y):I(x,!1)},$)}};M(m,_=>{e.titleLinkHref?_(p):_(v,!1)})}S(s),et(s,_=>D(d,_),()=>n(d)),N(_=>u=ie(s,1,`title size-${a()}`,"s-1c",u,_),[()=>({hidden:r()})]),b(t,s),H()}Je(["click"]);import{throttleFn as dS}from"@vkontakte/videoplayer-shared/es2018";var oS=L('<div class="timer__cell cell s-11"><span class="cell__value s-11"> </span> <span class="cell__unit s-11"> </span></div> <span class="timer__points s-11"> </span>',1),nS=L('<div class="timer__cell cell s-11"><span class="cell__value s-11"> </span> <span class="cell__unit s-11"> </span></div> <span class="timer__points s-11"> </span>',1),rS=L('<div class="timer__cell cell s-11"><span class="cell__value s-11"> </span> <span class="cell__unit s-11"> </span></div> <span class="timer__points s-11"> </span>',1),sS=L('<div class="timer__cell cell s-11"><span class="cell__value s-11"> </span> <span class="cell__unit s-11"> </span></div>'),aS=L("<div><!> <!> <!> <!></div>"),lS={hash:"s-11",code:".timer__container.s-11{align-items:flex-start;display:flex;justify-content:center}.cell.s-11{align-items:center;display:flex;flex-direction:column}.cell__value.s-11{font-size:48px;font-weight:600;line-height:1.2}.small.s-11 .cell__value:where(.s-11){font-size:24px}.cell__unit.s-11{font-size:14px;font-weight:400;line-height:1.2}.small.s-11 .cell__unit:where(.s-11){font-size:12px}.timer__points.s-11{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-11 .timer__points:where(.s-11){font-size:20px}"};function zm(t,e){B(e,!0),q(t,lS);let i=K(""),o=K(""),r=K(""),a=K(""),l,d=32,s=d/2,u=F=>String(F).padStart(2,"0"),m=F=>Math.max(F.length,1),p=F=>`${(e.isSmallSize?s:d)*m(F)}px`,v=F=>{let U=Math.floor(F/86400);U&&(F-=U*86400,D(i,u(U),!0));let j=Math.floor(F/3600);D(o,u(j),!0);let re=Math.floor(F/60)%60;D(r,u(re),!0);let G=F%60;D(a,u(G),!0)},_=()=>{let F=Math.floor(Date.now()/1e3),U=e.startTime-F;v(U),U>=1?l=requestAnimationFrame(_):e.onTimerOver()};kt(()=>{l=requestAnimationFrame(_)}),ln(()=>{cancelAnimationFrame(l)});var $=aS();let y;var x=C($);{var I=F=>{var U=oS(),j=ae(U);let re;var G=C(j),oe=C(G,!0);S(G);var X=A(G,2),Ie=C(X,!0);S(X),S(j);var fe=A(j,2),ee=C(fe,!0);S(fe),N((be,Ce,de)=>{re=Ke(j,"",re,{width:be}),he(oe,n(i)),he(Ie,Ce),he(ee,de)},[()=>p(n(i)),()=>Y("waiting_live_day_value"),()=>Y("waiting_live_colon")]),b(F,U)};M(x,F=>{n(i)&&F(I)})}var T=A(x,2);{var R=F=>{var U=nS(),j=ae(U);let re;var G=C(j),oe=C(G,!0);S(G);var X=A(G,2),Ie=C(X,!0);S(X),S(j);var fe=A(j,2),ee=C(fe,!0);S(fe),N((be,Ce,de)=>{re=Ke(j,"",re,{width:be}),he(oe,n(o)),he(Ie,Ce),he(ee,de)},[()=>p(n(o)),()=>Y("waiting_live_hour_value"),()=>Y("waiting_live_colon")]),b(F,U)};M(T,F=>{n(o)&&F(R)})}var k=A(T,2);{var P=F=>{var U=rS(),j=ae(U);let re;var G=C(j),oe=C(G,!0);S(G);var X=A(G,2),Ie=C(X,!0);S(X),S(j);var fe=A(j,2),ee=C(fe,!0);S(fe),N((be,Ce,de)=>{re=Ke(j,"",re,{width:be}),he(oe,n(r)),he(Ie,Ce),he(ee,de)},[()=>p(n(r)),()=>Y("waiting_live_minute_value"),()=>Y("waiting_live_colon")]),b(F,U)};M(k,F=>{n(r)&&F(P)})}var E=A(k,2);{var W=F=>{var U=sS();let j;var re=C(U),G=C(re,!0);S(re);var oe=A(re,2),X=C(oe,!0);S(oe),S(U),N((Ie,fe)=>{j=Ke(U,"",j,{width:Ie}),he(G,n(a)),he(X,fe)},[()=>p(n(a)),()=>Y("waiting_live_second_value")]),b(F,U)};M(E,F=>{n(a)&&F(W)})}S($),N(F=>y=ie($,1,"timer__container s-11",null,y,F),[()=>({small:e.isSmallSize})]),b(t,$),H()}var cS=L('<div class="waiting s-r"><span> </span></div>'),uS=L('<div class="upcoming-timer timer s-r"><span> </span> <!></div>'),pS=L('<div class="waiting-container s-r"><!></div>'),fS={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 lc(t,e){B(e,!0),q(t,fS);let i=g(e,"startTime",3,0),o=f(()=>i()<Math.floor(Date.now()/1e3)),r=K(void 0),a=K(void 0),l=0,d=K(void 0),s=K(void 0),u=f(()=>{var x,I;return((x=n(d))!=null?x:1/0)<=509||((I=n(s))!=null?I:1/0)<=320}),m=f(()=>{var x,I;return!n(u)&&(((x=n(d))!=null?x:1/0)<=699||((I=n(s))!=null?I:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?dS(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let x={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"},I=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(x,I)})},300):void 0;He(()=>{n(s),n(d),n(o),p==null||p()}),ln(()=>{if(cancelAnimationFrame(l),p==null||p.cancel(),e.onUpcomingLiveViewStateChanged){let x={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"};e.onUpcomingLiveViewStateChanged(x)}});var v=pS();v.__contextmenu=function(...x){var I;(I=e.onContextMenu)==null||I.apply(this,x)},v.__click=function(...x){var I;(I=e.onClick)==null||I.apply(this,x)};var _=C(v);{var $=x=>{var I=cS(),T=C(I);let R;var k=C(T,!0);S(T),S(I),et(I,P=>D(r,P),()=>n(r)),N((P,E)=>{R=ie(T,1,"waiting__title s-r",null,R,P),he(k,E)},[()=>({medium:n(m),small:n(u)}),()=>Y("waiting_live_upcoming_title")]),b(x,I)},y=x=>{var I=uS(),T=C(I);let R;var k=C(T,!0);S(T);var P=A(T,2);let E=f(()=>n(u)||n(m)),W=f(()=>i()||0);zm(P,{get isSmallSize(){return n(E)},get startTime(){return n(W)},onTimerOver:()=>D(o,!0)}),S(I),et(I,F=>D(a,F),()=>n(a)),N((F,U)=>{R=ie(T,1,"timer__title s-r",null,R,F),he(k,U)},[()=>({medium:n(m),small:n(u)}),()=>Y("waiting_live_timer_title")]),b(x,I)};M(_,x=>{n(o)?x($):x(y,!1)})}S(v),N(()=>Ke(v,`background-image: url(${e.thumbUrl})`)),Tn(v,"clientWidth",x=>D(d,x)),Tn(v,"clientHeight",x=>D(s,x)),b(t,v),H()}Je(["contextmenu","click"]);var mS=L('<div class="waiting-container s-s"><div class="waiting-caption s-s"><!> <p class="waiting-title s-s"> </p></div></div>'),vS={hash:"s-s",code:'.waiting-container.s-s{align-items:center;background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;justify-content:center}.waiting-container.s-s,.waiting-container.s-s:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-s:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-s{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-s{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function Ga(t,e){B(e,!0),q(t,vS);let i=g(e,"thumbUrl",3,""),o={recover:Y("waiting_live_recover_title"),record:Y("waiting_record_title")},r=f(()=>o[e.kind]||"");var a=mS();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);Na(d,{style:"position: static; transform: translate(0, 0)"});var s=A(d,2),u=C(s,!0);S(s),S(l),S(a),N(()=>{Ke(a,`background-image: url('${i()}')`),he(u,n(r))}),b(t,a),H()}Je(["contextmenu","click"]);var gS=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 Wm(t){Xe(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=gS();b(e,o)},$$slots:{default:!0}})}var hS=L('<div class="select-icon s-1w"><!></div>'),_S={hash:"s-1w",code:".select-icon.s-1w{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function dc(t){q(t,_S);var e=hS(),i=C(e);Wm(i,{}),S(e),b(t,e)}var bS=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},$S=(t,e)=>{Vl(t,()=>e.item.selectItem(e.item.value))},yS=L("<p> </p>"),xS=L('<p class="sublabel s-1p"> </p>'),wS=L('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),SS={hash:"s-1p",code:".menu-item-value.s-1p{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1p{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1p,.sublabel.s-1p{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1p{opacity:.5}"};function Km(t,e){B(e,!0),q(t,SS);let i=g(e,"isMobile",3,!1);var o=wS();let r;o.__click=[bS,e],o.__keydown=[$S,e];var a=C(o);{var l=$=>{dc($,{})};M(a,$=>{e.item.selected&&$(l)})}var d=A(a,2);let s;var u=C(d);{var m=$=>{var y=De(),x=ae(y);Ni(x,()=>e.item.valueComponent,(I,T)=>{T(I,jr(()=>{var R;return(R=e.item.valueComponentParams)!=null?R:{}}))}),b($,y)},p=$=>{var y=yS();let x;var I=C(y,!0);S(y),N(T=>{var R;x=ie(y,1,"label s-1p",null,x,T),he(I,(R=e.item.label)!=null?R:e.item.value)},[()=>({mobile:i()})]),b($,y)};M(u,$=>{e.item.valueComponent?$(m):$(p,!1)})}var v=A(u,2);{var _=$=>{var y=xS(),x=C(y,!0);S(y),N(()=>he(x,e.item.sublabel)),b($,y)};M(v,$=>{e.item.sublabel&&$(_)})}S(d),S(o),N(($,y,x)=>{var I;r=ie(o,1,"item",null,r,$),Ne(o,"data-value",(I=e.item.dataValue)!=null?I:e.item.value),Ne(o,"aria-label",y),Ne(o,"data-testid",e.item.dataTestid),s=ie(d,1,"menu-item-value s-1p",null,s,x),Ne(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var $,y;return(y=($=e.item.ariaLabel)!=null?$:e.item.label)!=null?y:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),b(t,o),H()}Je(["click","keydown"]);var CS=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function Qm(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"refMenuItems",15),r=f(()=>()=>e.openSubMenuList(e.item.children)),a=f(()=>y=>Su(y,n(r)));var l=CS();let d;l.__click=function(...y){var x;(x=n(r))==null||x.apply(this,y)},l.__keydown=function(...y){var x;(x=n(a))==null||x.apply(this,y)};var s=C(l);{var u=y=>{dc(y,{})};M(s,y=>{e.item.selected&&y(u)})}var m=A(s,2);let p;var v=C(m);{var _=y=>{var x=De();let I=f(()=>e.item.valueComponent);var T=ae(x);Ni(T,()=>n(I),(R,k)=>{k(R,jr(()=>{var P;return(P=e.item.valueComponentParams)!=null?P:{}}))}),b(y,x)},$=y=>{var x=ps();N(()=>he(x,e.item.label)),b(y,x)};M(v,y=>{e.item.valueComponent?y(_):y($,!1)})}S(m),S(l),et(l,y=>o(o()[e.item.id]=y,!0),()=>{var y;return(y=o())==null?void 0:y[e.item.id]}),N((y,x)=>{var I;d=ie(l,1,"item",null,d,y),Ne(l,"aria-label",(I=e.item.ariaLabel)!=null?I:e.item.label),Ne(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),H()}Je(["click","keydown"]);var Zr={"quality-settings":100,"audio-language-settings":200,"playback-rate-settings":300,"subtitles-settings":400,"traffic-saving-settings":500,download:600,report:700,"copy-data":800,"save-trace-info":900,"debug-info":1e3};var IS=(t,e)=>{w_(t,e.returnFromSubMenu,e.closeSettingsMenu)},ES=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},PS=(t,e)=>{kd(t)&&(Lr(t),e.returnFromSubMenu())},AS=L('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1j"> </p></li> <!></ul></div>'),kS={hash:"s-1j",code:".sub-menu.s-1j{--item-padding-vertical-mobile:16px;--item-padding-vertical:7px;--item-label-line-height:18px;--edge-item-padding-vertical-mobile:calc(6px + var(--item-padding-vertical-mobile));--edge-item-padding-vertical:calc(8px + var(--item-padding-vertical))}.sub-menu.s-1j .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1j{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1j{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1j .items:where(.s-1j) .item.header:where(.s-1j){border-bottom:var(--divider-border);display:flex;justify-content:space-between;left:0;min-width:max-content;position:absolute;right:0;top:0}.header.s-1j .title:where(.s-1j){margin-left:8px}.sub-menu.s-1j .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1j .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1j .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1j .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1j .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1j .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1j .item .sublabel{font-size:12px;line-height:14px}.item.s-1j:not(.mobile) p:where(.s-1j),.sub-menu.s-1j .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function Gm(t,e){B(e,!0),q(t,kS);let[i,o]=Be(),r=()=>w(p,"$isFullscreen",i),a=()=>w(v,"$playerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"playerControlsHeight",3,0),s=g(e,"ariaLabelReturnFromSubMenu",19,()=>Y("aria_label_submenu_back")),u=g(e,"listRef",15);kt(()=>{let G=e.items.findIndex(oe=>oe.selected);u().children[G+1].focus()});let m=ye(),p=m.ui.isFullscreen,v=m.ui.playerSize,_=K(void 0),$=K(0),y=K(0),x=f(()=>l()&&r()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n(y)-d()}px; overflow: auto;`),I=f(()=>Math.max(e.minWidth,n($)));var T=AS();let R;var k=C(T);let P;k.__keydown=[IS,e];var E=C(k);let W;E.__click=[ES,e],E.__keydown=[PS,e];var F=C(E);kr(F,{direction:"left"});var U=A(F,2),j=C(U,!0);S(U),S(E),et(E,G=>D(_,G),()=>n(_));var re=A(E,2);bi(re,17,()=>e.items,md,(G,oe)=>{var X=De(),Ie=ae(X);{var fe=be=>{Km(be,{get item(){return n(oe)},get isMobile(){return l()}})},ee=(be,Ce)=>{{var de=We=>{Qm(We,{get isMobile(){return l()},get item(){return n(oe)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};M(be,We=>{n(oe).type==="OPEN_SUB_MENU"&&We(de)},Ce)}};M(Ie,be=>{n(oe).type==="SELECT_VALUE"?be(fe):be(ee,!1)})}b(G,X)}),S(k),et(k,G=>u(G),()=>u()),S(T),N((G,oe,X)=>{R=ie(T,1,"sub-menu menu s-1j",null,R,G),Ne(T,"data-testid",`${e.id}-sub-menu`),Ke(T,`min-width: ${n(I)}px`),P=ie(k,1,"items s-1j",null,P,oe),Ke(k,n(x)),W=ie(E,1,"item header back s-1j",null,W,X),Ne(E,"aria-label",s()),he(j,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),Tn(E,"clientWidth",G=>D($,G)),Tn(E,"clientHeight",G=>D(y,G)),b(t,T),H(),o()}Je(["keydown","click"]);import{noop as LS}from"@vkontakte/videoplayer-shared/es2018";var MS=(t,e)=>Su(t,e()),VS=(t,e)=>{t.stopPropagation(),e()()},RS=L('<div class="value s-1i"> </div>'),DS=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),NS={hash:"s-1i",code:".value.s-1i{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function Ym(t,e){B(e,!0),q(t,NS);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,LS),r=g(e,"valueComponent",3,void 0),a=g(e,"iconProps",19,()=>({})),l=g(e,"ref",15);var d=DS();let s;d.__click=[VS,o],d.__keydown=[MS,o];var u=C(d),m=C(u);{var p=T=>{Ua(T,{get icon(){return e.icon}})},v=T=>{var R=De();let k=f(()=>e.icon);var P=ae(R);Ni(P,()=>n(k),(E,W)=>{W(E,jr(a))}),b(T,R)};M(m,T=>{typeof e.icon=="string"?T(p):T(v,!1)})}S(u);var _=A(u,2),$=C(_,!0);S(_);var y=A(_,2);{var x=T=>{var R=De();let k=f(r);var P=ae(R);Ni(P,()=>n(k),(E,W)=>{W(E,{})}),b(T,R)},I=T=>{var R=RS(),k=C(R,!0);S(R),N(()=>he(k,e.value)),b(T,R)};M(y,T=>{r()?T(x):T(I,!1)})}S(d),et(d,T=>l(T),()=>l()),N(T=>{s=ie(d,1,"item",null,s,T),Ne(d,"aria-label",e.ariaLabel),Ne(d,"data-testid",e.id),he($,e.label)},[()=>({mobile:i()})]),b(t,d),H()}Je(["click","keydown"]);import{noop as fb}from"@vkontakte/videoplayer-shared/es2018";var OS=(t,e)=>{Vl(t,()=>e())},BS=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),HS=L('<img class="icon" aria-hidden="true"/>'),FS=L('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1k"> </div></li>'),US={hash:"s-1k",code:".label.s-1k{overflow:hidden;text-overflow:ellipsis}"};function jm(t,e){B(e,!0),q(t,US);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,fb),r=g(e,"closeSettings",3,fb),a=K(!1),l=()=>{D(a,!0)},d=x=>{x==null||x.stopPropagation(),o()(),r()()};var s=FS();let u;s.__click=d,s.__keydown=[OS,d];var m=C(s),p=C(m);{var v=x=>{var I=De(),T=ae(I);{var R=P=>{var E=BS();b(P,E)},k=P=>{var E=HS();N(()=>Ne(E,"src",e.icon)),ft("error",E,l),Pa(E),b(P,E)};M(T,P=>{n(a)?P(R):P(k,!1)})}b(x,I)},_=x=>{var I=De();let T=f(()=>e.icon);var R=ae(I);Ni(R,()=>n(T),(k,P)=>{P(k,{})}),b(x,I)};M(p,x=>{typeof e.icon=="string"?x(v):x(_,!1)})}S(m);var $=A(m,2),y=C($,!0);S($),S(s),N(x=>{var I;u=ie(s,1,"item",null,u,x),Ne(s,"aria-label",(I=e.ariaLabel)!=null?I:e.label),Ne(s,"data-testid",e.id),he(y,e.label)},[()=>({mobile:i()})]),b(t,s),H()}Je(["click","keydown"]);import{noop as KS}from"@vkontakte/videoplayer-shared/es2018";var zS=L('<div class="toggle_wrap s-1o"><div></div> <div class="toggle-label s-1o"></div></div>'),WS={hash:"s-1o",code:'.toggle_wrap.s-1o{cursor:pointer;font-size:12px;line-height:15px;min-height:15px;padding:0;user-select:none}.toggle.s-1o{background-color:var(--toggle-color-separator);border-radius:45px;cursor:pointer;float:right;height:9px;margin-top:3px;width:28px}.toggle.s-1o:after{background-color:var(--toggle-color-off);border-radius:50%;content:"";float:left;height:15px;left:0;position:relative;top:-3px;transition:left .1s ease;width:15px}.toggle.on.s-1o:after{background-color:var(--toggle-color-on);left:13px}.toggle-label.s-1o{overflow:hidden}'};function Xm(t,e){q(t,WS);let i=g(e,"enabled",3,!1);var o=zS(),r=C(o);let a;Jt(2),S(o),N(l=>a=ie(r,1,"toggle s-1o",null,a,l),[()=>({on:i()})]),b(t,o)}var QS=(t,e,i)=>{S_(t,e(),o=>i()(o))},qS=(t,e,i)=>{t.stopPropagation(),e()(!i())},GS=L('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),YS=L('<li role="menuitem" tabindex="0"><!></li>');function Zm(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,KS),r=g(e,"enabled",3,!1),a=g(e,"tooltipText",3,void 0),l=g(e,"maxTooltipWidth",3,void 0);var d=YS();let s;d.__click=[qS,o,r],d.__keydown=[QS,r,o];var u=C(d);Oa(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(m,p)=>{var v=GS();let _;var $=C(v),y=C($);{var x=P=>{Ua(P,{get icon(){return e.icon}})},I=P=>{var E=De();let W=f(()=>e.icon);var F=ae(E);Ni(F,()=>n(W),(U,j)=>{j(U,{})}),b(P,E)};M(y,P=>{typeof e.icon=="string"?P(x):P(I,!1)})}S($);var T=A($,2),R=C(T,!0);S(T);var k=A(T,2);Xm(k,{get enabled(){return r()}}),S(v),N(P=>{_=ie(v,1,"switch-wrapper",null,_,P),he(R,e.label)},[()=>({mobile:i()})]),b(m,v)},$$slots:{default:!0}}),S(d),N(m=>{var p;s=ie(d,1,"item switch-item",null,s,m),Ne(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),Ne(d,"data-testid",e.id)},[()=>({mobile:i()})]),b(t,d),H()}Je(["click","keydown"]);import{isValidURL as $C,VideoQuality as Sb}from"@vkontakte/videoplayer-shared/es2018";var mb=()=>{let t=K(ri([])),e=f(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{D(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{D(t,[],!0)}}};import{getVideoQualityLabel as jS}from"@vkontakte/videoplayer-shared/es2018";var XS=L('<div class="quality-icon s-1n"><!></div>'),ZS=L('<div class="quality-label s-1n"><span> </span> <!></div>'),JS={hash:"s-1n",code:".quality-label.s-1n{position:relative}.quality.s-1n{font-size:13px;line-height:18px}.quality.sub.s-1n{opacity:.7}.quality-icon.s-1n{display:flex;padding-left:2px;position:absolute;right:0;top:0;transform:translateX(100%)}.quality-icon.s-1n svg{color:var(--blue-light)}"};function Ya(t,e){B(e,!0),q(t,JS);let i=g(e,"isSubCase",3,!1),o=f(()=>e.quality?jS(e.quality):""),r=f(()=>Au(e.quality));var a=ZS(),l=C(a);let d;var s=C(l,!0);S(l);var u=A(l,2);{var m=p=>{var v=XS();let _=f(()=>n(r));var $=C(v);Ni($,()=>n(_),(y,x)=>{x(y,{})}),S(v),N(()=>Ne(v,"data-testid",`${n(o)}-icon`)),b(p,v)};M(u,p=>{n(r)&&!e.isMobile&&p(m)})}S(a),N(p=>{d=ie(l,1,"s-1n",null,d,p),he(s,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),b(t,a),H()}import{VideoQuality as eC}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as vb}from"@vkontakte/videoplayer-core/es2018";var gb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},hb=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=gb({quality:t,availableQualities:e});return i?t===vb.INVARIANT?Y("auto_quality_invariant"):Y("auto_quality",{actual:o}):o},_b=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===vb.INVARIANT?i:`${i}${gb({quality:t,availableQualities:e})}`:"...";var tC=L('<div class="menu-item-value-wrapper s-1r"><!></div>'),iC={hash:"s-1r",code:".menu-item-value-wrapper.s-1r{line-height:normal}"};function Kl(t,e){B(e,!0),q(t,iC);let[i,o]=Be(),r=()=>w(s,"$currentQuality$",i),a=()=>w(u,"$availableQualities$",i),l=()=>w(m,"$isMobile$",i),d=ye(),s=d.state.currentQuality$,u=d.state.availableQualities$,m=d.ui.isMobile,p=" · ",v=f(()=>e.prefix+(e.selected&&r()!==eC.INVARIANT?p:"")),_=f(()=>_b({prefix:n(v),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var $=tC(),y=C($);let x=f(()=>e.selected?r():void 0);Ya(y,{get quality(){return n(x)},get label(){return n(_)},get isMobile(){return l()},isSubCase:!0}),S($),b(t,$),H(),o()}var oC=t=>{let e=t.join("|"),i="<(?<keyhtml>.*?)(?<propshtml> .*?)?>(?<childrenhtml>.*?)</\\k<keyhtml>>",o=`{(?<keyi18n>${e})}(?<childreni18n>.*?){/\\k<keyi18n>}`,r="<(?<keyhtmlself>.*?)(?<propshtmlself> .*?)?/?>",a=`{(?<keyi18nself>${e})}`;return new RegExp(`${i}|${o}|${r}|${a}`,"g")},nC={br:!0,span:!0},Jm=(t,e={})=>{var d,s,u,m,p,v,_;if(!t)return t;let i={...nC,...e},o=Object.keys(i);if(!o.length)return t;let r=oC(o),a=[],l=0;for(let $ of t.matchAll(r)){let y=$[0],x=((d=$.groups)==null?void 0:d.keyhtml)||((s=$.groups)==null?void 0:s.keyi18n)||((u=$.groups)==null?void 0:u.keyhtmlself)||((m=$.groups)==null?void 0:m.keyi18nself)||"",{index:I}=$;if(!i[x]){a.push(t.slice(l,I)),l=I+y.length;continue}let T=(p=$.groups)!=null&&p.childrenhtml?Jm($.groups.childrenhtml,i):"",R=(v=$.groups)!=null&&v.childrenhtml?y.replace(new RegExp((_=$.groups)==null?void 0:_.childrenhtml),()=>T||""):y;a.push(t.slice(l,I),R),l=I+y.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function cc(t,e){B(e,!1);let i=g(e,"message",8),o=Jm(i());jo();var r=De(),a=ae(r);{var l=d=>{var s=De(),u=ae(s);vd(u,()=>o),b(d,s)};M(a,d=>{o&&d(l)})}b(t,r),H()}var rC=L('<p class="quality-applies sublabel s-1q"><!></p>'),sC={hash:"s-1q",code:".quality-applies.s-1q{color:hsla(0,0%,100%,.5);display:flex;justify-content:end;padding:3px 0}.quality-applies span{color:#70c1ff}"};function ev(t,e){B(e,!1),q(t,sC),jo();var i=rC(),o=C(i);let r=yn(()=>Y("quality_applience",{action:`<span>${Y("quality_applience_action")}</span>`}));cc(o,{get message(){return n(r)}}),S(i),b(t,i),H()}var $b=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",label:Y("other_quality"),selected:o,valueComponent:Kl,valueComponentParams:{prefix:Y("other_quality"),selected:o},children:"quality-other-settings"}},tv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:Y("auto_quality_limit"),valueComponent:e?Kl:void 0,valueComponentParams:{prefix:Y("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),yb=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:ev,bottomBordered:!0,children:"quality-appliance"}),iv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"quality-high",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:Y("high_quality"),valueComponent:t?Kl:void 0,valueComponentParams:{prefix:Y("high_quality"),selected:i},sublabel:Y("high_quality_description")}),ov=({labelWithQuality:t,appliesTo:e,selected:i},{toggleTrafficSaving:o})=>({id:"quality-traffic-saving",type:"SELECT_VALUE",value:"save_traffic",selectItem:()=>o(!0,e),selected:i,label:Y("traffic_saving_quality"),valueComponent:t?Kl:void 0,valueComponentParams:{prefix:Y("traffic_saving_quality"),selected:i},sublabel:Y("traffic_saving_quality_description")});var qu=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),Gu=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,r;if(i==="und"?r=void 0:i&&(r=(l=Qd(i))!=null?l:i),o&&i&&r){let d=e.filter(s=>s.label===o&&s.language===i);if(d.length===1)return Y("audio_stream_display_language_label",{language:r,label:o});{let s=qu(t,d);return Y("audio_stream_display_language_label_index",{language:r,label:o,index:s})}}if(o){let d=e.filter(s=>s.label===o);if(d.length===1)return o;{let s=qu(t,d);return Y("audio_stream_display_label_index",{label:o,index:s})}}if(i&&r){let d=e.filter(s=>s.language===i);if(d.length===1)return r;{let s=qu(t,d);return Y("audio_stream_display_language_index",{language:r,index:s})}}let a=qu(t,e);return Y("audio_stream_display_unknown",{index:a})};var aC={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:r}=t,a=[];return i&&a.push({handler:tv,selected:e&&!o&&!r||!1}),a.push({handler:ov,selected:o},{handler:iv,selected:r}),{title:Y("submenu_quality"),id:"quality-settings",items:[yb(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),$b(t)]}},"quality-other-settings":({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"quality-other-settings",title:Y("submenu_quality"),closeSettingsMenu:t,items:i.map(r=>({type:"SELECT_VALUE",value:r.value,valueComponent:Ya,valueComponentParams:{quality:r.value,label:r.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:r.selected,label:r.displayValue}))}),"quality-appliance":t=>{var i,o,r;let{closeSettingsMenu:e}=t;return{id:"quality-appliance",title:Y("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:tv,selected:((i=hu())==null?void 0:i.type)==="auto_quality"},{handler:ov,selected:((o=hu())==null?void 0:o.type)==="traffic_saving"},{handler:iv,selected:((r=hu())==null?void 0:r.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-tracks":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-tracks",title:Y("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(r=>({type:"SELECT_VALUE",value:r,dataValue:r.id,selectItem:o,selected:r.id===(i==null?void 0:i.id),label:Gu(r,e)}))}),"playback-rate":({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"playback-rate",title:Y("submenu_playback_rate"),closeSettingsMenu:t,items:e.map(o=>({type:"SELECT_VALUE",value:o.value,selectItem:i,selected:o.selected,label:o.displayValue}))}),subtitles:({availableSubtitlesList:t,selectSubtitle:e})=>({id:"subtitles",minWidth:164,title:Y("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i.value,selectItem:()=>e(i),selected:i.selected,label:i.displayValue,dataTestid:i.value===En?"sub_off":void 0}))})},xb=({subMenuId:t,context:e})=>t?[aC[t](e)]:[];var lC=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 nv(t){Xe(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=lC();b(e,o)},$$slots:{default:!0}})}var dC=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 rv(t){Xe(t,{width:"18",height:"15",children:(e,i)=>{var o=dC();b(e,o)},$$slots:{default:!0}})}var cC=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 sv(t){Xe(t,{testId:"play-speed-icon",children:(e,i)=>{var o=cC();b(e,o)},$$slots:{default:!0}})}var uC=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 av(t){Xe(t,{testId:"download-icon",children:(e,i)=>{var o=uC();b(e,o)},$$slots:{default:!0}})}var pC=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 lv(t){Xe(t,{testId:"report-icon",children:(e,i)=>{var o=pC();b(e,o)},$$slots:{default:!0}})}var fC=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 Yu(t){Xe(t,{children:(e,i)=>{var o=fC();b(e,o)},$$slots:{default:!0}})}var mC=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 dv(t){Xe(t,{testId:"info-icon",children:(e,i)=>{var o=mC();b(e,o)},$$slots:{default:!0}})}var vC=L('<div class="menu-item-value-wrapper s-1u"><!></div>'),gC={hash:"s-1u",code:".menu-item-value-wrapper.s-1u{line-height:normal}"};function cv(t,e){B(e,!0),q(t,gC);let[i,o]=Be(),r=()=>w(u,"$currentQuality$",i),a=()=>w(m,"$availableQualities$",i),l=()=>w(p,"$isAutoQualityEnabled$",i),d=()=>w(v,"$isMobile$",i),s=ye(),u=s.state.currentQuality$,m=s.state.availableQualities$,p=s.state.isAutoQualityEnabled$,v=s.ui.isMobile,_=f(()=>hb({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var $=vC(),y=C($);Ya(y,{get quality(){return r()},get label(){return n(_)},get isMobile(){return d()}}),S($),b(t,$),H(),o()}var _C={"quality-settings":({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?Y("auto_quality_option"):e)||"";return{id:"quality-settings",type:"OPEN_SUB_MENU",ariaLabel:Y("aria_label_menu_quality",{actual:o}),icon:Od,label:Y("menu_quality"),value:e,valueComponent:cv,weight:Zr["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:Zr["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:Y("aria_label_submenu_traffic_saving"),icon:nv,label:Y("menu_traffic_saving"),enabled:t,tooltipText:Y("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-tracks-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=Gu(t,e);return{id:"audio-tracks-settings",weight:Zr["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:Y("aria_label_menu_audio_languages",{actual:i}),icon:rv,label:Y("menu_audio_languages"),value:i,children:"audio-tracks"}},"playback-rate-settings":({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(r=>r.value===e))==null?void 0:o.displayValue)||"";return{id:"playback-rate-settings",weight:Zr["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:Y("aria_label_menu_rate",{actual:i}),icon:sv,label:Y("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:Zr["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:Y("aria_label_menu_subtitle",{actual:t.displayValue}),icon:aa,iconProps:{type:"outline"},label:Y("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:Zr.download,type:"CLICK",onClick:t,label:Y("download_video_caption"),ariaLabel:Y("aria_label_menu_download"),icon:av}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:Zr.report,type:"CLICK",onClick:t,label:Y("menu_report"),ariaLabel:`${Y("menu_report")}. ${Y("aria_label_new_tab_alert")}`,icon:lv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:Zr["copy-data"],type:"CLICK",onClick:t,label:Y("menu_copy_debug"),ariaLabel:Y("menu_copy_debug"),icon:Yu,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:Zr["save-trace-info"],type:"CLICK",onClick:t,label:Y("menu_save_debug"),ariaLabel:Y("menu_save_debug"),icon:Yu,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:Zr["debug-info"],type:"CLICK",onClick:t,ariaLabel:Y("aria_label_menu_debug_overlay"),label:Y("menu_debug_overlay"),icon:dv,isHiddenFor:["desktop"]})},wb=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>_C[r](e)),...i.map(r=>({...r,isAdditional:!0}))].filter(r=>{var a,l,d;return!((a=r==null?void 0:r.isHiddenFor)!=null&&a.length)||!((l=r==null?void 0:r.isHiddenFor)!=null&&l.includes("desktop"))&&!o||!((d=r==null?void 0:r.isHiddenFor)!=null&&d.includes("mobile"))&&o}).sort(Ra)};var yC=(t,e)=>{wu(t,e)},xC=L('<div><div> </div> <div class="close s-t" data-testid="close-settings-menu"></div></div>'),wC=L('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),SC=L("<div><!> <!></div>"),CC={hash:"s-t",code:'.settings-menu-container.mobile.s-t{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-t ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-t .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-t .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-t .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-t .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-t .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-t .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-t{line-height:40px}.settings-menu.desktop.s-t{min-width:300px}.settings-menu-container.s-t .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-t .menu.mobile.hidden{display:none}.settings-menu-container.s-t .menu .item:not(.switch-item),.settings-menu-container.s-t .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-t .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-t .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-t .item:not(.switch-item),.settings-menu.s-t .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-t .item.mobile:not(.switch-item),.settings-menu.s-t .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-t .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-t .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-t .item.header.mobile:where(.s-t){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-t .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-t .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-t .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-t .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-t .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-t{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-t:after,.close.s-t:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-t:before{transform:rotate(45deg)}.close.s-t:after{transform:rotate(-45deg)}'};function uc(t,e){B(e,!0),q(t,CC);let[i,o]=Be(),r=()=>w(Le,"$settingsMenuVisible",i),a=()=>w(ze,"$settingsMenuOpenedByKeyboard",i),l=()=>w(Fe,"$debugPanelVisible",i),d=()=>w(ce,"$isMobile",i),s=()=>w(Te,"$playerSize",i),u=()=>w(ue,"$hasMpegSources$",i),m=()=>w(we,"$mobileNotReportControlHidden$",i),p=()=>w(de,"$autoQualityLimitingAvailable$",i),v=()=>w(pe,"$availableSubtitlesList$",i),_=()=>w(Ee,"$isLiveWithPlaybackSpeed",i),$=()=>w(ee,"$availableAudioStreams$",i),y=()=>w(Z,"$availablePlaybackRates$",i),x=()=>w(fe,"$currentAudioStream$",i),I=()=>w(me,"$currentPlaybackRate$",i),T=()=>w(Ye,"$trafficSavingEnabled",i),R=()=>w(be,"$currentQuality$",i),k=()=>w(We,"$isAutoQualityEnabled$",i),P=()=>w(O,"$currentSubtitle$",i),E=()=>w(Mt,"$additionalSettingsMenuItems$",i),W=()=>w(ve,"$isAutoQualityAvailable$",i),F=()=>w(Ce,"$availableQualities$",i),U=()=>w(Ae,"$highQualityEnabled",i),j=g(e,"ref",15,void 0),re=g(e,"playerControlsHeight",3,0),G=ri({}),oe=ri({}),X=ye(),Ie=Lt(),fe=X.state.audioStream$,ee=X.state.availableAudioStreams$,be=X.state.currentQuality$,Ce=X.state.availableQualities$,de=X.state.autoQualityLimitingAvailable$,We=X.state.isAutoQualityEnabled$,ve=X.state.isAutoQualityAvailable$,me=X.state.currentPlaybackRate$,Z=X.state.availablePlaybackRates$,O=X.state.currentSubtitle$,pe=X.state.availableSubtitlesList$,le=X.state.canDownload,ue=X.state.hasMpegSources$,Le=X.ui.settingsMenu.visible$,ze=X.ui.settingsMenu.openedByBtnKeyboard$,te=X.ui.settingsMenu.ref$,ce=X.ui.isMobile,we=X.ui.mobileNotReportControlHidden$,Ee=X.state.canChangePlaybackSpeed$,Ye=X.state.trafficSavingEnabled$,Ae=X.state.highQualityEnabled$,Te=X.ui.playerSize,Fe=X.ui.debugPanelVisible,gt=X.state.isInteractiveTime$,Mt=X.ui.additionalSettingsMenuItems$,Ct=X.ui.t,dt=X.actions.internal.downloadVideo,St=X.actions.internal.closeSettingsMenu,qt=X.actions.internal.openSettingsSubMenu,Ot=X.actions.internal.closeSettingsSubMenu,Rt=K(!1),Ut=K(void 0),Q=mb();He(()=>{!r()&&Q.current&&(Ot(oe[Q.current]),Q.popAllSubMenus())}),He(()=>{r()||D(Ut,void 0)}),He(()=>{!Q.current&&n(Ut)&&x_(G,n(Ut))}),He(()=>{j()&&te.set(j())});async function Me(_t){var z;Q.pushSubMenu(_t),await co(),qt(_t,oe[_t]);let Bt=(z=j())==null?void 0:z.firstElementChild;Bt&&Lf(Bt)}function Ve(_t){var Bt;_t==null||_t.stopPropagation(),a()||(Bt=e.returnFocus)==null||Bt.call(e),St(),D(Rt,!1)}function xe(_t,Bt){X.actions.internal.setQuality(_t,{appliesTo:Bt,byUser:!0}),Ve()}function Ue(_t){X.actions.internal.setAudioStream(_t),Ve()}function Se(_t,Bt){X.actions.internal.setTrafficSavingEnabled(_t,Bt),Ie.features.qualityDetailsSubMenuEnabled&&Ve()}function wt(_t,Bt){X.actions.internal.setHighQualityEnabled(_t,Bt),Ve()}function ge(_t){X.actions.internal.setPlaybackRate(_t),Ve()}function Oe(_t){X.actions.internal.setSubtitle(_t),Ve()}function Ge(){dt()}function at(){$C(e.supportLink)&&window.open(e.supportLink,"_blank"),X.actions.internal.reportProblem(),X.actions.internal.pause()}function Kt(){Ll(X.actions.internal.getDebugTextData())}let Et=()=>{let _t=X.actions.internal.getTraceTextData(),Bt=new Blob([..._t],{type:"application/json"}),z=window.URL.createObjectURL(Bt);Ma(z,"vk_player_trace_info","json")};function si(){Fe.set(!l())}function li(){D(Rt,!0)}function Ei(){D(Rt,!1)}function uo(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-re()}px; overflow: auto;`}let po=f(()=>le&&u()&&!m()),di=f(()=>Ie.features.trafficSaving&&!m()&&p()&&!Ie.features.qualityDetailsSubMenuEnabled),rt=f(()=>v().length>0&&!m()),ci=f(()=>!!_()&&!m()),Yi=f(()=>Ie.features.audioLanguages&&$().length>=2&&!m()),ct=f(()=>!m());kt(()=>gt.subscribe(_t=>{_t&&!d()&&!n(Rt)&&!a()&&Ve()}));let Dt=f(()=>{let _t=[n(ct)&&"quality-settings",n(Yi)&&"audio-tracks-settings",n(ci)&&"playback-rate-settings",n(rt)&&"subtitles-settings",n(di)&&"traffic-saving-switch",n(po)&&"download",Ie.showSupport&&"show-support","copy-data",Ie.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(Bt=>!!Bt);return wb({items:_t,context:{qualityDetailsSubMenuEnabled:Ie.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:y(),currentAudioStream:x(),availableAudioStreams:$(),currentPlaybackRate:I(),selectPlaybackRate:ge,trafficSavingEnabled:T(),toggleTrafficSaving:Se,currentQuality:R()||Sb.INVARIANT,isAutoQualityEnabled:k()||!1,currentSubtitle:P(),isMobile:d(),onDownloadClick:Ge,onCopyDataClick:Kt,onReportProblemClick:at,onSaveTraceDataClick:Et,toggleShowDebugInfo:si},additionalSettingsMenuItems:E()})}),fi=f(()=>xb({subMenuId:Q.current,context:{availablePlaybackRates:y(),selectPlaybackRate:ge,trafficSavingEnabled:T(),toggleTrafficSaving:Se,currentQuality:R()||Sb.INVARIANT,isAutoQualityEnabled:k()||!1,isAutoQualityAvailable:W()||!1,availableQualities:F(),highQualityEnabled:U(),toggleHighQuality:wt,availableAudioStreams:$(),availableSubtitlesList:v(),closeSettingsMenu:St,currentAudioStream:x(),isMobile:d(),selectAudioLanguage:Ue,selectQuality:xe,selectSubtitle:Oe}}));var ot=SC();let nt;var Ti=C(ot);{var Zo=_t=>{var Bt=wC();let z;Bt.__keydown=[yC,St];var Pt=C(Bt);{var lt=yt=>{var st=xC();let Oi;var Mi=C(st),Pn=C(Mi,!0);S(Mi);var An=A(Mi,2);An.__click=Ve,S(st),N((wi,ji)=>{Oi=ie(st,1,"item header s-t",null,Oi,wi),he(Pn,ji)},[()=>({mobile:d()}),()=>Ct("submenu_settings")]),b(yt,st)};M(Pt,yt=>{d()&&yt(lt)})}var gi=A(Pt,2);let jt;bi(gi,21,()=>n(Dt),yt=>yt.id,(yt,st)=>{var Oi=De(),Mi=ae(Oi);{var Pn=wi=>{Ym(wi,{get isMobile(){return d()},get id(){return n(st).id},get icon(){return n(st).icon},get iconProps(){return n(st).iconProps},get label(){return n(st).label},get ariaLabel(){return n(st).ariaLabel},get value(){return n(st).value},get valueComponent(){return n(st).valueComponent},onClick:()=>{Me(n(st).children),D(Ut,n(st).id,!0)},get ref(){return G[n(st).id]},set ref(ji){G[n(st).id]=ji}})},An=(wi,ji)=>{{var kn=$i=>{let ko=f(()=>`${n(st).id}-menu-item`);jm($i,{get isMobile(){return d()},get id(){return n(ko)},get onClick(){return n(st).onClick},get icon(){return n(st).icon},get label(){return n(st).label},get ariaLabel(){return n(st).ariaLabel},closeSettings:Ve})},vo=($i,ko)=>{{var Lo=fo=>{let pn=f(()=>`${n(st).id}-menu-item`);Zm(fo,{get isMobile(){return d()},get id(){return n(pn)},get onClick(){return n(st).onClick},get icon(){return n(st).icon},get label(){return n(st).label},get ariaLabel(){return n(st).ariaLabel},get enabled(){return n(st).enabled},get tooltipText(){return n(st).tooltipText},get maxTooltipWidth(){return n(st).maxTooltipWidth}})};M($i,fo=>{n(st).type==="SWITCH"&&fo(Lo)},ko)}};M(wi,$i=>{n(st).type==="CLICK"?$i(kn):$i(vo,!1)},ji)}};M(Mi,wi=>{n(st).type==="OPEN_SUB_MENU"?wi(Pn):wi(An,!1)})}b(yt,Oi)}),S(gi),et(gi,yt=>j(yt),()=>j()),S(Bt),N((yt,st,Oi)=>{z=ie(Bt,1,"settings-menu menu s-t",null,z,yt),jt=ie(gi,1,"items",null,jt,st),Ke(gi,Oi)},[()=>({desktop:!d(),mobile:d(),hidden:!!Q.current}),()=>({mobile:d()}),uo]),ft("mouseenter",Bt,li),ft("mouseleave",Bt,Ei),b(_t,Bt)};M(Ti,_t=>{r()&&_t(Zo)})}var Ao=A(Ti,2);bi(Ao,17,()=>n(fi),_t=>_t.id,(_t,Bt)=>{let z=f(()=>{var Pt;return(Pt=n(Bt).minWidth)!=null?Pt:137});Gm(_t,{get isMobile(){return d()},get playerControlsHeight(){return re()},get returnFromSubMenu(){return Q.popSubMenu},get id(){return n(Bt).id},get title(){return n(Bt).title},get closeSettingsMenu(){return St},openSubMenuList:Me,get items(){return n(Bt).items},get minWidth(){return n(z)},get refMenuItems(){return G},get listRef(){return oe[n(Bt).id]},set listRef(Pt){oe[n(Bt).id]=Pt}})}),S(ot),N(_t=>nt=ie(ot,1,"settings-menu-container s-t",null,nt,_t),[()=>({mobile:d(),hidden:!r()})]),b(t,ot),H(),o()}Je(["keydown","click"]);var TC=L('<button class="btn s-17"> </button>'),IC={hash:"s-17",code:"button.btn.s-17{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function uv(t,e){q(t,IC);var i=TC();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=C(i,!0);S(i),N(()=>he(o,e.label)),b(t,i)}Je(["click"]);var EC=L('<div class="container s-q"><div class="notification s-q"><div><p class="description s-q"><!></p> <!></div> <!></div></div>'),PC={hash:"s-q",code:".container.s-q{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-q{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-q{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function pc(t,e){B(e,!0),q(t,PC);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Lt(),{ui:{t:r}}=ye(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=EC(),d=C(l),s=C(d),u=C(s),m=C(u);cc(m,{get message(){return a}}),S(u);var p=A(u,2);{var v=$=>{let y=f(()=>r("slow_video_notification_button"));uv($,{get label(){return n(y)},get onClick(){return e.onSelectAutoQuality}})};M(p,$=>{o||$(v)})}S(s);var _=A(s,2);Rs(_,{get onClick(){return e.onClose}}),S(d),S(l),Ms(3,d,()=>ca,()=>({duration:i})),b(t,l),H()}import{isIntersecting as Cb,Subscription as AC}from"@vkontakte/videoplayer-shared/es2018";var ja="annotation",ju=class{constructor(e){this.slots=new Map;this.disabledIds=new Set(e)}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var s;let{overlay:o,id:r,controlsBehaviour:a,hideAllControls:l}=i;if(this.disabledIds.has(r))return{success:!1,message:"current slotId is disabled via config"};let d=typeof e=="function"?e():e;return d.setAttribute("slot",ja),this.setupSlotStyles(d,o),this.shadowRootContainer.append(d),this.slots.set(r,{rootElement:d,options:i}),a&&this.runHidingControlsWhenIntersected(r,a),l&&((s=this.store)==null||s.ui.isControlsAvailable.set(!1)),{success:!0}}setupSlotStyles(e,i){switch(e.style.position="absolute",i){case"over_video":e.style.zIndex="calc(var(--video-container-z-index) + 1)";break;case"over_controls":e.style.zIndex="calc(var(--controls-container-z-index) + 1)";break;default:e.style.zIndex="0"}}async runHidingControlsWhenIntersected(e,{observedSlotElementId:i,controlsToObserve:o}){var m;let r=this.slots.get(e);if(!r)return;let a=await this.findSlotElement(r.rootElement,i,e),{controls:l,hiddenControls:d}=((m=this.store)==null?void 0:m.ui)||{},s=new MutationObserver(p=>p.forEach(()=>{let v=Os(a,this.shadowRootContainer);o.forEach(_=>{let $=l==null?void 0:l[_],y=$?$e($):null,x=d==null?void 0:d[_];y&&(x==null||x.set(Cb(y,v)))})}));s.observe(a,{childList:!0,subtree:!0}),r.observer=s;let u=new AC;o.forEach(p=>{l&&u.add(l[p].subscribe(v=>{let _=d==null?void 0:d[p];v&&v.isDisplayed?_==null||_.set(Cb(v,Os(a,this.shadowRootContainer))):_==null||_.set(!1)}))}),r.subs=u}async findSlotElement(e,i,o){return new Promise(r=>{let a=null,l=new MutationObserver(()=>{if(a=e.querySelector(`#${i}`),a){l.disconnect();let s=this.slots.get(o);s&&(s.observerForFindingSlotElement=void 0),r(a)}});l.observe(e,{childList:!0,subtree:!0});let d=this.slots.get(o);d&&(d.observerForFindingSlotElement=l)})}remove(e){var u,m;let i=this.slots.get(e);if(!i)return;let{rootElement:o,observer:r,observerForFindingSlotElement:a,subs:l,options:{controlsBehaviour:d,hideAllControls:s}}=i;o&&o.remove(),[r,a].forEach(p=>p==null?void 0:p.disconnect()),l==null||l.unsubscribe(),this.slots.delete(e),s&&((u=this.store)==null||u.ui.isControlsAvailable.set(!0)),(m=d==null?void 0:d.controlsToObserve)==null||m.forEach(p=>{var v,_;(_=(v=this.store)==null?void 0:v.ui.hiddenControls[p])==null||_.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var kC=L('<div class="container s-5"><!></div>'),LC={hash:"s-5",code:".container.s-5{align-items:center;animation-fill-mode:forwards;animation-name:s-5-videoPlayerStatusIconPopup;background-color:#00000073;border-radius:100%;display:flex;height:64px;justify-content:center;width:64px;will-change:opacity,scale}@keyframes s-5-videoPlayerStatusIconPopup{0%{opacity:0;scale:.6}10%{animation-timing-function:ease-in;opacity:1;scale:1}75%{opacity:1;scale:1}90%{animation-timing-function:ease-out;opacity:0;scale:.4}to{opacity:0;scale:0}}"};function fc(t,e){B(e,!0),q(t,LC);let i=g(e,"reversed",3,!1);var o=De(),r=ae(o);As(r,()=>e.Icon,a=>{var l=kC(),d=C(l);Ni(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),S(l),N(()=>Ke(l,`animation-duration: ${e.duration}ms`)),b(a,l)}),b(t,o),H()}import{PlaybackState as Tb}from"@vkontakte/videoplayer-core/es2018";var MC=L('<div class="container s-1f"><!></div>'),VC={hash:"s-1f",code:".container.s-1f{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function pv(t,e){B(e,!0),q(t,VC);let[i,o]=Be(),r=()=>w(s,"$playbackState$",i),a=()=>w(m,"$previewTrackActive",i),l=()=>w(p,"$previewTrackDragInProgress",i),d=()=>w(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:m,previewTrackDragInProgress:p}}=ye(),{features:{playbackStatusShow:v},playbackStatusAnimationDuration:_}=Lt(),$=0,y=K(null),x=K(!1);He(()=>{r()===Tb.PLAYING?D(y,fr,!0):r()===Tb.PAUSED?D(y,Fs,!0):D(y,null)}),He(()=>{if(!(!v||a()||l()))return $=window.setTimeout(()=>{$=0,D(y,null)},_),()=>{$&&(window.clearTimeout($),$=0)}}),He(()=>{d()&&!n(x)&&(D(x,!0),D(y,null))});var I=De(),T=ae(I);{var R=k=>{var P=MC(),E=C(P);fc(E,{get duration(){return _},get Icon(){return n(y)}}),S(P),b(k,P)};M(T,k=>{n(y)&&v&&k(R)})}b(t,I),H(),o()}var RC=L('<div><div data-testid="video-container"></div></div>'),DC={hash:"s-e",code:".video-container.s-e,.video-wrapper.s-e{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-e{background:var(--black)}.video-container.s-e,.video-wrapper.s-e{z-index:var(--video-container-z-index)}.video-container.s-e{transition:var(--rotate-transition-duration) ease all}.video-container.fast-rotate.s-e{transition:none}.nocursor.s-e{cursor:none}"};function Xa(t,e){B(e,!0),q(t,DC);let[i,o]=Be(),r=()=>w(p,"$rotateAlpha",i),a=()=>w(v,"$playerSize",i),l=()=>w(m,"$playerPhase",i),d=()=>w($,"$chromecastConnected$",i),s=()=>w(_,"$isPlaying$",i),u=g(e,"videoContainer",15),{playerPhase:m,ui:{rotateAlpha:p,playerSize:v},state:{isPlaying$:_,chromecastConnected$:$}}=ye(),{isSmoothVideoRotate:y}=Lt(),x=f(()=>u()&&r()%180?a().height/a().width:1);var I=RC();let T;I.__contextmenu=function(...P){var E;(E=e.onContextMenu)==null||E.apply(this,P)},I.__mousedown=function(...P){var E;(E=e.onMouseDown)==null||E.apply(this,P)},I.__mouseup=function(...P){var E;(E=e.onMouseUp)==null||E.apply(this,P)},I.__click=function(...P){var E;(E=e.onClick)==null||E.apply(this,P)},I.__dblclick=function(...P){var E;(E=e.onDblClick)==null||E.apply(this,P)};var R=C(I);let k;et(R,P=>u(P),()=>u()),S(I),N((P,E)=>{T=ie(I,1,"video-wrapper s-e",null,T,P),k=ie(R,1,"video-container s-e",null,k,E),Ke(R,`transform: rotate(${r()}deg) scale(${n(x)})`),Ne(R,"data-is-playing",s())},[()=>({hidden:l()!=="video"||d(),nocursor:e.hideCursor}),()=>({"fast-rotate":!y})]),b(t,I),H(),o()}Je(["contextmenu","mousedown","mouseup","click","dblclick"]);var NC=L('<div><span class="text s-1g"> </span> <!></div>'),OC={hash:"s-1g",code:".root.s-1g{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-1g,.root.visible.s-1g{transform:translateX(-50%)}.root.visible.s-1g{opacity:1;visibility:visible}.text.s-1g{font-size:13px;font-weight:600;line-height:16px}"};function fv(t,e){B(e,!0),q(t,OC);let{ui:{t:i}}=ye();var o=NC();let r;var a=C(o),l=C(a,!0);S(a);var d=A(a,2);rc(d,{get size(){return"16"},fill:"currentColor"}),S(o),N((s,u)=>{r=ie(o,1,"root s-1g",null,r,s),he(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),b(t,o),H()}var BC=L('<div class="container s-19" role="button" data-testid="preview-track-overlay"></div>'),HC={hash:"s-19",code:".container.s-19{align-items:center;background-color:rgba(0,0,0,.48);cursor:pointer;display:flex;height:100%;justify-content:center;position:absolute;width:100%}"};function mv(t,e){B(e,!1),q(t,HC);let i=ye(),o=i.actions.internal.closePreviewTrack,r=i.ui.t,a=200,l=s=>{s.stopPropagation(),o()};jo();var d=BC();return d.__click=l,N(s=>Ne(d,"aria-label",s),[()=>r("tooltip_play")],yn),Ms(3,d,()=>ca,()=>({duration:a})),b(t,d),nf(e,"handleClick",l),H({handleClick:l})}Je(["click"]);var FC=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},UC=L("<div><!></div>"),zC=L('<div class="spherical-video-icon s-9"><!></div>'),WC=L("<div><!></div>"),KC=L('<div class="settings-menu s-9"><!></div>'),QC=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),qC=L("<!> <!> <!>",1),GC=L('<div class="blocked s-9"></div>'),YC=L('<div class="player-wrapper s-9"><!> <div class="overlay-container"></div></div> <!>',1),jC={hash:"s-9",code:".blocked.s-9,.player-wrapper.s-9{height:100%;position:absolute;width:100%}.blocked.s-9{z-index:var(--overlay-container-z-index)}.player-wrapper.s-9 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-9{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-9{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-menu.s-9{bottom:57px;left:0;position:absolute;right:18px;transition:opacity .2s;z-index:var(--settings-menu-z-index)}"};function vv(t,e){B(e,!0),q(t,jC);let[i,o]=Be(),r=()=>w(Dr,"$notificationsToShow$",i),a=()=>w(di,"$playerPhase",i),l=()=>w(Zo,"$isLoaderVisible",i),d=()=>w(Ei,"$adPlaybackState",i),s=()=>w(gi,"$crashed",i),u=()=>w(kn,"$isInteractiveTime$",i),m=()=>w(ct,"$settingsMenuVisible",i),p=()=>w(vo,"$isInteractiveExpectation$",i),v=()=>w(Yi,"$controlsVisible",i),_=()=>w(ko,"$touched",i),$=()=>w(is,"$graphIsOpened$",i),y=()=>w(rt,"$isFullscreen",i),x=()=>w(Rr,"$autoplayNextEnabled$",i),I=()=>w(z,"$postrollPassed",i),T=()=>w(Ao,"$isEnded$",i),R=()=>w(er,"$cursorInside",i),k=()=>w(fn,"$isControlsAvailable",i),P=()=>w(gr,"$doubleForwardOn$",i),E=()=>w(Xn,"$fakeIsPlaying$",i),W=()=>w(Rn,"$bottomNoSmooth",i),F=()=>w(Mr,"$interactiveTimeIndicator",i),U=()=>w(Mi,"$playerSize",i),j=()=>w(An,"$is3DVideo",i),re=()=>w(mn,"$doubleForwardAvailable$",i),G=()=>w(nt,"$contextMenuVisible$",i),oe=()=>w(li,"$playbackState$",i),X=()=>w(Lo,"$hotKeyMapData",i),Ie=()=>w(fi,"$scrubbingInProgress",i),fe=()=>w(ot,"$volumeChangingInProgress",i),ee=()=>w(_t,"$chromecastConnected$",i),be=()=>w(en,"$controlsTimeoutActive",i),Ce=()=>w(Pn,"$adsPlaybackState",i),de=()=>w(Dt,"$settingsMenuOpenedByKeyboard",i),We=()=>w(wo,"$contextMenuOpenedByKeyboard$",i),ve=()=>w(Ho,"$contextMenuOpenedByHotKey$",i),me=()=>w(bn,"$contextMenuButtonRef$",i),Z=()=>w(or,"$contextMenuLastActiveElem$",i),O=()=>w(ci,"$isFullscreenOpenedByKeyboard",i),pe=()=>w(pn,"$positionExact$",i),le=()=>w(si,"$language$",i),ue=()=>w(Cr,"$previewTrackActive$",i),Le=()=>w(wi,"$icon3DVideoVisible",i),ze=()=>w(Bt,"$chromecastDeviceName$",i),te=()=>w(st,"$currentSubtitle$",i),ce=()=>w(Oi,"$currentSubtitleCaptions$",i),we=()=>w(uo,"$position$",i),Ee=()=>w(po,"$duration$",i),Ye=()=>w(Pt,"$isLive$",i),Ae=()=>w(lt,"$isPlaying$",i),Te=()=>w(Vr,"$contextMenuPosition$",i),Fe=()=>w(fo,"$showHotKeyMap",i),gt=()=>w(Ti,"$debugPanelVisible",i),Mt=()=>w(Jo,"$userActionsDisabled$",i),Ct=g(e,"videoContainer",15),dt=g(e,"adsSlotId",3,void 0),St=g(e,"adsParams",3,void 0),qt=g(e,"adsAutoplayParam",3,void 0),Ot=g(e,"duration",3,void 0),Rt=g(e,"logoTargetUrl",3,""),Ut=g(e,"showNextPrevButtons",3,!1),Q=g(e,"nextButtonActive",3,!1),Me=g(e,"prevButtonActive",3,!1),Ve=g(e,"endScreenVideoTitle",3,void 0),xe=g(e,"endScreenVideoThumb",3,void 0),Ue=g(e,"isOneVideoPlaylist",3,!1),Se=g(e,"shadowRootContainer",3,void 0),wt=g(e,"outerContainerRef",3,void 0),ge=g(e,"playerStarted",3,!1),Oe=g(e,"fullScreenTarget",3,void 0),Ge=g(e,"showMiniTimer",3,!1),at=g(e,"showEndScreen",3,!0),Kt=g(e,"keyboardControls",15),Et=e.store.getLogger().createComponentLog("Root component"),si=e.store.interfaceLanguage$,li=e.store.state.playbackState$,Ei=e.store.ads.playbackState,uo=e.store.state.positionWithScrubbing$,po=e.store.state.duration$,di=e.store.playerPhase,rt=e.store.ui.isFullscreen,ci=e.store.ui.isFullscreenOpenedByKeyboard,Yi=e.store.ui.controlsVisible,ct=e.store.ui.settingsMenu.visible$,Dt=e.store.ui.settingsMenu.openedByBtnKeyboard$,fi=e.store.ui.scrubbingInProgress,ot=e.store.ui.volumeChangingInProgress,nt=e.store.ui.contextMenu.visible$,Ti=e.store.ui.debugPanelVisible,Zo=e.store.state.isLoaderVisible,Ao=e.store.state.isEnded$,_t=e.store.state.chromecastConnected$,Bt=e.store.state.chromecastDeviceName$,z=e.store.ads.postrollPassed,Pt=e.store.state.isLive$,lt=e.store.state.isPlaying$,gi=e.store.state.crashed$,jt=e.store.webApi.annotationsApi,yt=e.store.webApi.pictureInPictureApi,st=e.store.state.currentSubtitle$,Oi=e.store.state.currentSubtitleCaptions$,Mi=e.store.ui.playerSize,Pn=e.store.ads.playbackState,An=e.store.ui.is3DVideo,wi=e.store.ui.icon3DVideoVisible,ji=e.store.state.isInteractive,kn=e.store.state.isInteractiveTime$,vo=e.store.state.isInteractiveExpectation$,$i=e.store.state.hasInteractiveBranches,ko=e.store.ui.touched,Lo=e.store.ui.modals.hotKeyMap.data,fo=e.store.ui.modals.hotKeyMap.show,pn=e.store.state.positionExact$,Jr=e.store.ui.overlayContainer$,Mr=e.store.ui.controls.interactiveTimeIndicator,es=e.store.state.showInteractiveTimeIndicator,Vr=e.store.ui.contextMenu.position$,Yn=e.store.actions.internal.setQuality,ts=e.store.actions.internal.closeSettingsMenu,Rr=e.store.ui.autoplayNextEnabled$,Jo=e.store.ui.userActionsDisabled,fn=e.store.ui.isControlsAvailable,vr=e.store.ui.videoTitleInfo,gr=e.store.ui.doubleForwardOn$,mn=e.store.ui.doubleForwardAvailable$,jn=e.store.actions.internal.getVideoElement,hr=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:Xn,notifications$:Zn,graphIsOpened$:is}=mo(),go=K(void 0),_r=K(void 0),Bi=K(void 0),br=K(void 0),Ln,mt,Xt;Lo.set(m_());let{closeNotification:$r,notificationsToShow$:Dr}=Zn,Nr=f(()=>!!r().slow_video),Mn=()=>$r("slow_video"),Vn=f(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),Mo=K(void 0),Rn=se(!1),Jn,en=se(!1),vn=se(),er=se(!1),gn=K(!1),tn=K(!1),Pi=K(!1),io=K(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),on=f(()=>u()&&!m()&&!(n(gn)||n(tn))&&!(n(Pi)&&!p())),tr=!0,yr=f(()=>e.uiConfig.features.thumbTimer&&Ge()&&a()==="video"&&!v()&&!s()&&!ji&&(e.uiConfig.hideThumbTimerAfterTouch&&!_()||!e.uiConfig.hideThumbTimerAfterTouch)),hn=e.uiConfig.titleShowBehaviour,ir=f(()=>!["video","thumb"].includes(a())||hn==="never"||$()?!1:hn==="fullscreen"?y():!0),je=f(()=>hn==="always"||a()==="thumb"?!1:!v()),ai=K(!1),Vo=f(()=>(at()||e.showAutoplayNext&&x())&&!!Ve()&&!!xe()&&(e.showAds&&I()||!e.showAds)&&T()&&!s()&&!n(ai)&&!$i),Ro=f(()=>R()&&!(v()||n(Vo))&&!u()&&k()&&!P()),nn=K(!1),ho=f(()=>E()!==null),{toggle:_o}=Xn,Ai=!1,bo=null;yt==null||yt.setContext(Zl());let Or=()=>{e.autoplay&&!ji&&e.uiConfig.controls.showOnStartupAtAutoplay&&Hi(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:Or});let xr=()=>{window.clearTimeout(Ln),en.set(!1)},_s=()=>{window.clearTimeout(mt),vn.set(null)},Hi=_e=>{xr(),en.set(!0),Ln=window.setTimeout(()=>en.set(!1),_e);let xt=_e-100;Jn=window.setTimeout(()=>{W()&&Rn.set(!1)},xt>0?xt:_e)},bs=(_e,xt)=>{_s(),vn.set(xt),mt=window.setTimeout(()=>vn.set(null),_e)},os=An.subscribe(_e=>{wi.set(_e),_e&&(window.clearTimeout(Xt),Xt=window.setTimeout(()=>wi.set(!1),e.uiConfig.controls.hide360IconTimeout))}),wr=async()=>{var xt,Yt,Zt,Fo;let _e=ia();if(_e){let no=Td(),ro=rn();_e=no===ro||no===Se()}if(_e){Hi(e.uiConfig.controls.hideTimeoutFullscreen);try{await(yt==null?void 0:yt.exit())}catch(no){Et({message:String(no)})}}rt.set(_e),e.store.getAdmanWrapper().setFullscreen(_e),y()?(Yt=(xt=e.store.callbacks)==null?void 0:xt.onFullscreenEnter)==null||Yt.call(xt):(Fo=(Zt=e.store.callbacks)==null?void 0:Zt.onFullscreenExit)==null||Fo.call(Zt)},Do=_e=>{Mi.set(_e)},Br=()=>{if(n(go)){let{width:_e,height:xt}=n(go).getBoundingClientRect();Mi.set({width:_e,height:xt})}};kt(()=>{var xt;return yu(wr),e.uiConfig.features.annotationsInside&&(jt==null||jt.init(n(go))),yt==null||yt.assignPlayerContainer(n(go)),e.uiConfig.disablePiPResizeHandling||yt==null||yt.setExternalEventHandlers({resize:Do,leavepictureinpicture:Br}),e.interactiveContainer&&((xt=Ct().parentElement)==null||xt.insertBefore(e.interactiveContainer,Ct().nextSibling)),()=>{window.clearTimeout(Ln),window.clearTimeout(Jn),window.clearTimeout(mt),window.clearTimeout(Xt),os(),yt==null||yt.dispose().catch(Yt=>{Et({message:String(Yt)})}),xu(wr)}});let rn=()=>{let _e=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!wt()?n(go):wt(),xt=_e.getRootNode(),Yt=xt instanceof ShadowRoot?xt.host:xt,Zt=Oe()instanceof HTMLElement&&Oe().contains(Yt);return e.uiConfig.allowChangingFullscreenTarget&&Oe()&&Zt?Oe():_e},ki=()=>{nt.set(!1)},Qe=()=>{ts(),ki()},At=async()=>{if(!hr()){Et({message:"fullscreen disabled"});return}ki(),ia()?(await $u(document),Et({message:"exit fullscreen"})):(Et({message:"request fullscreen"}),await bu(rn()))},ui=_e=>{$()||(_e.preventDefault(),nt.set(!0),Vr.set({left:_e.clientX,top:_e.clientY}))};function No(){er.set(!0),ji||Hi(e.uiConfig.controls.hideTimeoutCursor)}function $o(_e){var no,ro;let{relatedTarget:xt}=_e,Zt=!!(xt&&((no=n(Bi))!=null&&no.contains(xt)))&&((ro=Kt())==null?void 0:ro.isFocused()),Fo=e.uiConfig.controls.showOnStartupAtAutoplay||!!xt;!ji&&!Zt&&Fo&&(Rn.set(!0),Hi(e.uiConfig.controls.hideTimeoutCursor))}function yo(){er.set(!1),D(tn,!1),D(gn,!1),Ai=!1,e.store.actions.internal.releaseCamera(),Hi(e.uiConfig.controls.hideTimeout),P()&&Bo()}function Fi(_e){return _e?_e.offsetTop+Fi(_e.offsetParent):0}function Oo(_e){return _e?_e.offsetLeft+Oo(_e.offsetParent):0}function Dn(_e){if(F()&&es){let xt=_e.currentTarget,Yt=Fi(xt),Zt=Oo(xt),Fo=_e.pageX-Zt,no=_e.pageY-Yt,{left:ro,bottom:rs,right:$n}=F(),Ss=$n-ro;return Fo>=ro-Ss&&no<=rs+Ss}}function Sr(_e){if(n(go)){let xt=Fi(_e.currentTarget),Yt=U().height,Zt=_e.pageY-xt;if(Dn(_e)){D(tn,!1);return}Zt<40?D(tn,!0):Zt>Yt-40?D(gn,!0):(D(tn,!1),m()||D(gn,!1))}}function xo(_e){Sr(_e),!n(on)&&!P()&&Hi(e.uiConfig.controls.hideTimeoutCursor),j()&&Ai&&bo&&e.store.actions.internal.moveCameraFocusPX(bo.clientX-_e.clientX,bo.clientY-_e.clientY,_e.timeStamp-bo.timeStamp),bo=_e}let oo=null,_n=()=>{oo=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),xr()},e.uiConfig.doubleForwardActivationTime)},Bo=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),oo&&clearTimeout(oo),oo=null},Nn=_e=>{_e.preventDefault(),_e.button===0&&(Ai=!0,e.store.actions.internal.holdCamera(),re()&&_n()),!Ai&&Hi(e.uiConfig.controls.hideTimeoutCursor)},Hr=_e=>{_e.preventDefault(),_e.button===0&&(bo=_e,Ai=!1,e.store.actions.internal.releaseCamera()),!P()&&Hi(e.uiConfig.controls.hideTimeoutCursor)},Fr=_e=>{_e.preventDefault(),tr&&(Et({message:"double click on video"}),At(),Hi(e.uiConfig.controls.hideTimeoutCursor))},On=_e=>{var xt;if(_e.preventDefault(),P()){Bo();return}if(oo&&Bo(),G()||m()){Qe();return}if(!(T()&&!$i)){if(n(ho))return _o();if((xt=Kt())==null||xt.focus(),!ge()){e.firstStart(),Hi(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||oe()!==Eb.PLAYING)&&e.store.actions.internal.togglePlay(),Hi(e.uiConfig.controls.hideTimeoutCursor)}},tt=_e=>{Qe(),ko.set(!0),Hi(e.uiConfig.controls.hideTimeout),_e&&bs(e.uiConfig.controls.hideHotKeyHelpers,_e)},Gt=()=>{var _e,xt;Qe(),(_e=e.store.callbacks)!=null&&_e.onOpenHotKeyMap?(xt=e.store.callbacks)==null||xt.onOpenHotKeyMap(X()):fo.update(Yt=>!Yt)},yi=()=>{ko.set(!0)},wo=e.store.ui.contextMenu.openedByBtnKeyboard$,bn=e.store.ui.contextMenu.btnRef$,Bn=K(void 0),Ho=e.store.ui.contextMenu.openedByHotKey$,or=e.store.ui.contextMenu.lastActiveElem$,ns=K(!1),Cr=e.store.ui.previewTrackActive;He(()=>{Jr.set(n(Mo))}),He(()=>{D(Pi,n(io)&&oe()!==Eb.PLAYING,!0),n(io)||Tt(()=>D(io,!0))}),He(()=>{var xt,Yt;let _e=(n(Pi)||T()||m()||Ie()||fe()||ee()||be()||n(ns))&&!n(on)&&(a()==="video"||a()==="ads"&&(e.uiConfig.controls.showOnStartupAtAutoplay||Ce()!=="inactive"))&&!s()&&k();Yi.set(_e),!_e&&!be()&&((xt=n(Bi))!=null&&xt.contains(Pu()))&&((Yt=Kt())==null||Yt.focus())}),He(()=>{!Ie()&&n(nn)&&!u()&&Hi(e.uiConfig.controls.hideTimeoutCursor),Tt(()=>D(nn,Ie(),!0))}),He(()=>{n(br),m(),de(),Tt(()=>Ld(n(br),m(),de()))}),He(()=>{n(Bn),G(),We(),ve(),Tt(()=>{let _e=We()||ve();Ld(n(Bn),G(),_e)})}),He(()=>{let _e=me();_e&&(G(),Tt(()=>Ml(_e,G(),wo)))}),He(()=>{let _e=Z();_e&&(G(),Tt(()=>y_(_e,G(),Ho)))}),He(()=>{var _e;!O()&&y()&&(Tt(()=>ci.set(!1)),(_e=Kt())==null||_e.focus())}),He(()=>{$()&&Qe()});let $s=K(void 0),zs=_e=>{vr.set(qn(jn(),{title:n($s)},"title",_e))},pa=(_e,xt)=>{var no,ro;let Yt=(ro=(no=e.store.callbacks)==null?void 0:no.uiInfo)==null?void 0:ro.onUpcomingLiveViewStateChanged;if(!Yt)return;let Zt=!!xt,Fo={...qn(n(go),{upcomingLiveScreen:xt},"upcomingLiveScreen",Zt),..._e};Yt(Fo)},ut="",ni=f(()=>{var _e;return n(je)?ut:(_e=e.getVideoDeeplink)==null?void 0:_e.call(e,pe())});He(()=>{ut=n(ni)});var So=YC();ft("blur",Ca,Qe);var hi=ae(So);hi.__mousemove=xo;var Xi=C(hi);let ys=f(()=>a()==="ads"),xs=f(()=>n(ho)?_o:void 0);et(Of(Xi,{startDoubleForwardActivationTimer:_n,stopDoubleForward:Bo,toggleFullscreen:At,hideContextMenu:Qe,showHotKeyHelpers:tt,showKeyMap:Gt,get isAds(){return n(ys)},get fakePlayButtonHandler(){return n(xs)},get nextButtonActive(){return Q()},get prevButtonActive(){return Me()},children:(_e,xt)=>{var Yt=qC(),Zt=ae(Yt);Xa(Zt,{get hideCursor(){return n(Ro)},onClick:On,onContextMenu:ui,onMouseDown:Nn,onMouseUp:Hr,onDblClick:Fr,get videoContainer(){return Ct()},set videoContainer(ro){Ct(ro)}});var Fo=A(Zt,2);ka(Fo,()=>"slot",!1,(ro,rs)=>{Ji(ro,()=>({name:ja}))});var no=A(Fo,2);As(no,le,ro=>{var rs=QC(),$n=ae(rs);let Ss=f(()=>a()!=="thumb"||s()||ji&&e.autoplay);qa($n,{get hidden(){return n(Ss)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:ui,onClick:ki});var fa=A($n,2);{var ma=qe=>{mv(qe,{})};M(fa,qe=>{ue()&&qe(ma)})}var Ur=A(fa,2);pv(Ur,{});var ss=A(Ur,2);fv(ss,{get isVisible(){return P()}});var nr=A(ss,2);{var Za=qe=>{let mi=f(()=>{var zo;return(zo=e.live)==null?void 0:zo.startTime});lc(qe,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(mi)},onUpcomingLiveViewStateChanged:pa,onContextMenu:ui,onClick:ki})};M(nr,qe=>{a()==="LiveWaitingStart"&&qe(Za)})}var Ja=A(nr,2);{var zr=qe=>{Ga(qe,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:ui,onClick:ki})};M(Ja,qe=>{a()==="LiveWaitingRecover"&&qe(zr)})}var el=A(Ja,2);{var tl=qe=>{Ga(qe,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:ui,onClick:ki})};M(el,qe=>{a()==="LiveWaitingRecord"&&qe(tl)})}var il=A(el,2);{var ql=qe=>{var mi=UC();let zo;var Tr=C(mi);Id(Tr,{get adsSlotId(){return dt()},get adsParams(){return St()},get adsAutoplayParam(){return qt()},get duration(){return Ot()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson}}),S(mi),N(Co=>zo=ie(mi,1,"ads-container s-9",null,zo,Co),[()=>({hidden:a()!=="ads"})]),b(qe,mi)};M(il,qe=>{e.showAds&&ge()&&qe(ql)})}var va=A(il,2);{var ol=qe=>{let mi=f(()=>!at()&&e.showAutoplayNext&&x());Rf(qe,{get title(){return Ve()},get thumb(){return xe()},get isHide(){return n(mi)},clickCloseIcon:()=>D(ai,!0)})};M(va,qe=>{n(Vo)&&Ve()&&xe()&&qe(ol)})}var pt=A(va,2);{var vt=qe=>{let mi=f(()=>y()?"md":"sm"),zo=f(()=>{var Tr;return(Tr=e.store.callbacks)==null?void 0:Tr.onTitleClicked});Um(qe,{get title(){return e.title},get isHidden(){return n(je)},onVisibilityChanged:zs,get titleLinkHref(){return n(ni)},onMouseEnter:()=>{D(ns,!0)},onMouseLeave:()=>{D(ns,!1)},get size(){return n(mi)},get onTitleClicked(){return n(zo)},get ref(){return n($s)},set ref(Tr){D($s,Tr,!0)}})};M(pt,qe=>{n(ir)&&qe(vt)})}var _i=A(pt,2);{var Uo=qe=>{let mi=f(()=>a()==="video"&&v());sc(qe,{get isShifted(){return n(mi)}})};M(_i,qe=>{j()&&qe(Uo)})}var zi=A(_i,2);{var vi=qe=>{var mi=zC(),zo=C(mi);Cd(zo,{}),S(mi),b(qe,mi)};M(zi,qe=>{Le()&&qe(vi)})}var Vi=A(zi,2);{var ga=qe=>{ac(qe,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return ze()},onClick:On,onContextMenu:ui,onDblClick:Fr})};M(Vi,qe=>{ee()&&qe(ga)})}var nl=A(Vi,2);{var lp=qe=>{Ka(qe,{get shifted(){return v()},get captions(){return ce()},get position(){return we()},get playerSize(){return U()}})};M(nl,qe=>{te().value!=="off"&&a()==="video"&&qe(lp)})}var Cc=A(nl,2);{var dp=qe=>{var mi=WC();mi.__contextmenu=ui,mi.__click=[FC,G,nt,m,ct,Qe];var zo=C(mi);Qa(zo,{}),S(mi),b(qe,mi)};M(Cc,qe=>{s()&&qe(dp)})}var Tc=A(Cc,2);{var cp=qe=>{let mi=f(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),zo=f(()=>a()==="ads"),Tr=f(()=>e.canRewindLive&&Ee()!==0);nc(qe,{get bottomHidden(){return n(mi)},get bottomNoSmooth(){return W()},get showControls(){return v()},get isAds(){return n(zo)},get canRewindLive(){return n(Tr)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Rt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Ut()},get nextButtonActive(){return Q()},get prevButtonActive(){return Me()},get isOneVideoPlaylist(){return Ue()},customFullscreenSupported:tr,toggleFullscreen:At,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(_r)},set playerControlsWrapperRef(Co){D(_r,Co,!0)},get playerControlsRef(){return n(Bi)},set playerControlsRef(Co){D(Bi,Co,!0)}})};M(Tc,qe=>{ge()&&qe(cp)})}var Ic=A(Tc,2);{var up=qe=>{var mi=KC(),zo=C(mi);let Tr=f(()=>{var Co;return(Co=n(Bi))==null?void 0:Co.clientHeight});uc(zo,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(Tr)},returnFocus:()=>{var Co;return(Co=Kt())==null?void 0:Co.focus()},get ref(){return n(br)},set ref(Co){D(br,Co,!0)}}),S(mi),b(qe,mi)};M(Ic,qe=>{!ee()&&a()!=="ads"&&qe(up)})}var Ec=A(Ic,2);let pp=f(()=>!n(yr));Ad(Ec,{get isLive(){return Ye()},get isHidden(){return n(pp)},get isPlaying(){return Ae()},get position(){return we()},get duration(){return Ee()}});var ha=A(Ec,2);Hm(ha,{get data(){return vn}});var Pc=A(ha,2);Vf(Pc,{get supportLink(){return e.supportLink},returnFocus:()=>{var qe;return(qe=Kt())==null?void 0:qe.focus()},get visible(){return G()},get playerContainerRef(){return n(go)},get position(){return Te()},get menuElementRef(){return n(Bn)},set menuElementRef(qe){D(Bn,qe,!0)}});var Ws=A(Pc,2);{var rl=qe=>{pc(qe,{onClose:Mn,onSelectAutoQuality:()=>{Yn("auto"),Mn()}})};M(Ws,qe=>{n(Nr)&&qe(rl)})}var Ac=A(Ws,2);{var kc=qe=>{Na(qe,{})};M(Ac,qe=>{n(Vn)&&qe(kc)})}var sl=A(Ac,2);{var Lc=qe=>{Ff(qe,{})};M(sl,qe=>{Fe()&&qe(Lc)})}var fp=A(sl,2);{var Mc=qe=>{Rd(qe,{})};M(fp,qe=>{gt()&&qe(Mc)})}b(ro,rs)}),b(_e,Yt)},$$slots:{default:!0}}),_e=>Kt(_e),()=>Kt());var ws=A(Xi,2);et(ws,_e=>D(Mo,_e),()=>n(Mo)),S(hi),et(hi,_e=>D(go,_e),()=>n(go));var Ui=A(hi,2);{var Ii=_e=>{var xt=GC();b(_e,xt)};M(Ui,_e=>{Mt()&&_e(Ii)})}ft("mouseenter",hi,No),ft("mouseleave",hi,yo),ft("click",hi,yi,!0),ft("focusin",hi,$o,!0),b(t,So),H(),o()}Je(["mousemove","contextmenu","click"]);import{clientChecker as mc,PlaybackState as sT}from"@vkontakte/videoplayer-core/es2018";import{noop as aT}from"@vkontakte/videoplayer-shared/es2018";var XC=L('<div></div> <div class="info s-n"><div class="triangles-wrapper s-n"><div></div> <div></div> <div></div></div> <p class="step-caption s-n"> </p></div>',1),ZC=L("<div><!></div>"),JC={hash:"s-n",code:".double-click-area.s-n{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-n{left:0}.double-click-area.right.s-n{right:0}.semicircle.s-n{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-n{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-n{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-n{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-n,.triangles-wrapper.s-n{display:flex;justify-content:center}.triangles-wrapper.s-n{margin-bottom:10px;position:relative}.triangle.s-n{animation:s-n-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-n:nth-child(3),.triangle.right.s-n:first-child{animation-delay:0s}.triangle.left.s-n:nth-child(2),.triangle.right.s-n:nth-child(2){animation-delay:.1s}.triangle.left.s-n:first-child,.triangle.right.s-n:nth-child(3){animation-delay:.2s}@keyframes s-n-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-n{border-right:8px solid var(--white)}.triangle.right.s-n{border-left:8px solid var(--white)}.triangle.s-n:not(:last-child){margin-right:5px}.step-caption.s-n{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function Xu(t,e){B(e,!0),q(t,JC);let i=g(e,"seekStep",3,0),o=K(!1),r=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(r),r=window.setTimeout(()=>{a=0,D(o,!1)},300)};ln(()=>{window.clearTimeout(r)});var s=ZC();s.__click=d;var u=C(s);{var m=p=>{var v=XC(),_=ae(v),$=A(_,2),y=C($),x=C(y),I=A(x,2),T=A(I,2);S(y);var R=A(y,2),k=C(R,!0);S(R),S($),N(P=>{var E,W,F,U;ie(_,1,`semicircle ${(E=e.side)!=null?E:""}`,"s-n"),ie(x,1,`triangle ${(W=e.side)!=null?W:""}`,"s-n"),ie(I,1,`triangle ${(F=e.side)!=null?F:""}`,"s-n"),ie(T,1,`triangle ${(U=e.side)!=null?U:""}`,"s-n"),he(k,P)},[()=>Y("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),b(p,v)};M(u,p=>{n(o)&&p(m)})}S(s),N(()=>{var p;return ie(s,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-n")}),b(t,s),H()}Je(["click"]);var eT=(t,e,i)=>{e(!1),i()},tT=L('<div class="overlay s-m"></div> <div class="next-video s-m"><div class="top s-m"><div class="caption s-m"> </div> <!></div> <div class="row s-m"><div class="column s-m"><div class="thumb s-m"><div></div> <!></div></div> <div class="column s-m"><div class="title s-m"> </div></div></div></div>',1),iT={hash:"s-m",code:".overlay.s-m{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-m{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-m{display:flex;justify-content:space-between}.caption.s-m{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-m{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-m{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-m{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-m,.thumb-overlay.s-m{height:100%;width:100%}.thumb-overlay.s-m{position:absolute}.thumb-overlay.withOpacity.s-m{background:var(--black);opacity:.3}.title.s-m{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function gv(t,e){B(e,!0),q(t,iT);let[i,o]=Be(),r=()=>w(d,"$autoplayNextEnabled$",i),a=()=>w(s,"$timerNextVideoRunning$",i),l=ye(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,m=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,_=l.actions.internal.nextVideoAnnouncementCancel,$=()=>{u(!1),v()},y=()=>{e.clickCloseIcon(),_()};kt(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),v())});var x=De(),I=ae(x);{var T=R=>{var k=tT(),P=A(ae(k),2),E=C(P),W=C(E),F=C(W,!0);S(W);var U=A(W,2);Rs(U,{onClick:y}),S(E);var j=A(E,2);j.__click=[eT,u,p];var re=C(j),G=C(re),oe=C(G);let X;var Ie=A(oe,2);{var fe=de=>{Dd(de,{get isRunning(){return a()},onTimerEnded:$})};M(Ie,de=>{r()&&de(fe)})}S(G),S(re);var ee=A(re,2),be=C(ee),Ce=C(be,!0);S(be),S(ee),S(j),S(P),N((de,We)=>{he(F,de),Ke(G,`background-image: url('${e.thumb}')`),X=ie(oe,1,"thumb-overlay s-m",null,X,We),he(Ce,e.title)},[()=>r()?Y("end_screen_next_video"):Y("end_screen_recommended_video"),()=>({withOpacity:r()})]),b(R,k)};M(I,R=>{e.isHide||R(T)})}b(t,x),H(),o()}Je(["click"]);import{clientChecker as oT}from"@vkontakte/videoplayer-core/es2018";var Pb=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;kt(()=>{oT.device.isIOS&&(o=setTimeout(()=>{let a=t().querySelector("video");if(!a)return;let l=()=>e(!0),d=()=>e(!1);a.addEventListener("webkitbeginfullscreen",l),a.addEventListener("webkitendfullscreen",d),i=()=>{a.removeEventListener("webkitbeginfullscreen",l),a.removeEventListener("webkitendfullscreen",d)}},0))}),ln(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as nT}from"@vkontakte/videoplayer-core/es2018";var Zu=class{constructor(e){this.video=e}getTracksArray(){return Array.from(this.video.getElementsByTagName("track"))}attach(e,i=!1){let o=document.createElement("track");o.setAttribute("src",e.url),o.setAttribute("id",e.id),e.label&&o.setAttribute("label",e.label),e.language&&o.setAttribute("srclang",e.language),i&&(o.track.mode="showing"),this.video.appendChild(o)}detachAll(){for(let e of this.getTracksArray())this.video.removeChild(e)}updateSrc(e){let i=this.getTracksArray().find(o=>o.id===e.id);i&&(i.src=e.url)}getCurrentShowingId(){var e,i;return(i=(e=this.getTracksArray().find(o=>o.track.mode==="showing"))==null?void 0:e.id)!=null?i:null}};import{clientChecker as rT}from"@vkontakte/videoplayer-core/es2018";var Ab=({store:t,getFullscreenTarget:e})=>{let{isFullscreen:i}=t.ui,{setSubtitle:o}=t.actions.internal,{currentSubtitle$:r,availableSubtitlesList$:a,currentFormat$:l,availableTextTracks$:d}=t.state,s=null,u=()=>e().querySelector("video"),m=()=>rT.device.isIOS&&$e(l)===nT.DASH_LIVE_CMAF,p=()=>{s==null||s(),s=null},v=_=>{if(p(),!m()||!_)return;let $=u();if(!$)return;let y=new Zu($),x=$e(d),I=$e(a),T=$e(r);for(let P of x)I.some(W=>W.value===P.id)&&y.attach(P,T.value===P.id);let R=d.subscribe(P=>{for(let E of P)y.updateSrc(E)}),k=()=>{let P=y.getCurrentShowingId();o($e(a).find(E=>E.value===P))};$.textTracks.addEventListener("change",k),s=()=>{R(),y.detachAll(),$.textTracks.removeEventListener("change",k)}};kt(()=>i.subscribe(v)),ln(p)};var lT=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},dT=L("<!> <!>",1),cT=L("<div><!></div>"),uT=L('<div class="spherical-video-icon s-8"><!></div>'),pT=L("<div><!></div>"),fT=L('<div class="settings-mobile s-8"><!></div>'),mT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),vT=L('<div class="player-wrapper s-8" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),gT={hash:"s-8",code:".player-wrapper.s-8{height:100%;position:absolute;width:100%}.player-wrapper.s-8 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-8{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-8{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-mobile.s-8{align-items:center;display:flex;left:50%;max-width:320px;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);width:90%;z-index:var(--settings-menu-z-index)}"};function hv(t,e){var hn,ir;B(e,!0),q(t,gT);let[i,o]=Be(),r=()=>w(Ue,"$playerPhase",i),a=()=>w(li,"$isLoaderVisible",i),l=()=>w(Me,"$adPlaybackState",i),d=()=>w(Dt,"$crashed",i),s=()=>w(Vr,"$notificationsToShow$",i),u=()=>w(Q,"$playbackState$",i),m=()=>w(Ot,"$graphIsOpened$",i),p=()=>w(Oe,"$interactiveHideMobileControls",i),v=()=>w(Ei,"$isEnded$",i),_=()=>w(gi,"$isInteractiveExpectation$",i),$=()=>w(wt,"$controlsVisible",i),y=()=>w(st,"$touched",i),x=()=>w(Mi,"$autoplayNextEnabled$",i),I=()=>w(di,"$postrollPassed",i),T=()=>w(Rr,"$bottomNoSmooth",i),R=()=>w(nt,"$videoSize",i),k=()=>w(_t,"$playerSize",i),P=()=>w(Se,"$isFullscreen",i),E=()=>w(Ve,"$position$",i),W=()=>w(xe,"$duration$",i),F=()=>w(Pn,"$loadedMetadata",i),U=()=>w(Ge,"$settingsMenuVisible",i),j=()=>w(Kt,"$scrubbingInProgress",i),re=()=>w(Et,"$volumeChangingInProgress",i),G=()=>w(uo,"$chromecastConnected$",i),oe=()=>w(ge,"$isControlsAvailable",i),X=()=>w(lt,"$isInteractiveTime$",i),Ie=()=>w(Yi,"$isActiveLive",i),fe=()=>w(at,"$settingsMenuOpenedByKeyboard",i),ee=()=>w(Ut,"$language$",i),be=()=>w(yt,"$disabledControls$",i),Ce=()=>w(Bt,"$is3DVideo",i),de=()=>w(z,"$icon3DVideoVisible",i),We=()=>w(po,"$chromecastDeviceName$",i),ve=()=>w(Ti,"$currentSubtitle$",i),me=()=>w(Zo,"$currentSubtitleCaptions$",i),Z=()=>w(Ao,"$realDuration$",i),O=()=>w(rt,"$isLive$",i),pe=()=>w(ci,"$isPlaying$",i),le=()=>w(si,"$debugPanelVisible",i),ue=g(e,"videoContainer",15),Le=g(e,"adsSlotId",3,void 0),ze=g(e,"adsParams",3,void 0),te=g(e,"adsAutoplayParam",3,void 0),ce=g(e,"duration",3,void 0),we=g(e,"logoTargetUrl",3,""),Ee=g(e,"showNextPrevButtons",3,!1),Ye=g(e,"nextButtonActive",3,!1),Ae=g(e,"prevButtonActive",3,!1),Te=g(e,"endScreenVideoTitle",3,void 0),Fe=g(e,"endScreenVideoThumb",3,void 0),gt=g(e,"isOneVideoPlaylist",3,!1),Mt=g(e,"showMiniTimer",3,!1),Ct=g(e,"fullScreenTarget",3,void 0),dt=g(e,"playerStarted",3,!1),St=g(e,"showEndScreen",3,!0),{notifications$:qt,graphIsOpened$:Ot}=mo(),Rt=e.store.getLogger().createComponentLog("Root component"),Ut=e.store.interfaceLanguage$,Q=e.store.state.playbackState$,Me=e.store.ads.playbackState,Ve=e.store.state.positionWithScrubbing$,xe=e.store.state.duration$,Ue=e.store.playerPhase,Se=e.store.ui.isFullscreen,wt=e.store.ui.controlsVisible,ge=e.store.ui.isControlsAvailable,Oe=e.store.ui.interactiveHideMobileControls,Ge=e.store.ui.settingsMenu.visible$,at=e.store.ui.settingsMenu.openedByBtnKeyboard$,Kt=e.store.ui.scrubbingInProgress,Et=e.store.ui.volumeChangingInProgress,si=e.store.ui.debugPanelVisible,li=e.store.state.isLoaderVisible,Ei=e.store.state.isEnded$,uo=e.store.state.chromecastConnected$,po=e.store.state.chromecastDeviceName$,di=e.store.ads.postrollPassed,rt=e.store.state.isLive$,ci=e.store.state.isPlaying$,Yi=e.store.state.isActiveLive$,ct=e.store.state.isRewindableLive$,Dt=e.store.state.crashed$,fi=e.store.webApi.annotationsApi,ot=e.store.webApi.pictureInPictureApi,nt=e.store.state.videoSize$,Ti=e.store.state.currentSubtitle$,Zo=e.store.state.currentSubtitleCaptions$,Ao=e.store.state.duration$,_t=e.store.ui.playerSize,Bt=e.store.ui.is3DVideo,z=e.store.ui.icon3DVideoVisible,Pt=e.store.state.isInteractive,lt=e.store.state.isInteractiveTime$,gi=e.store.state.isInteractiveExpectation$,jt=e.store.state.hasInteractiveBranches,yt=e.store.ui.controls.disabledControls$,st=e.store.ui.touched,Oi=e.store.ui.overlayContainer$,Mi=e.store.ui.autoplayNextEnabled$,Pn=e.store.state.loadedMetadata$,An=e.store.actions.internal.closeSettingsMenu,wi=(hn=e.store.callbacks)==null?void 0:hn.onDisabledPlayPrevChapterClick,ji=(ir=e.store.callbacks)==null?void 0:ir.onDisabledSeekToInteractiveClick,kn=e.store.actions.internal.setQuality,vo=K(void 0),$i=K(void 0),ko=K(void 0),Lo=K(void 0),fo,pn,Jr=f(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),Mr=K(void 0),{closeNotification:es,notificationsToShow$:Vr}=qt,Yn=f(()=>!!s().slow_video),ts=()=>es("slow_video"),Rr=se(!1),Jo,fn=K(!1),vr=f(()=>u()!==sT.PLAYING),gr=K(!1),mn=f(()=>m()||p()||!n(fn)&&(v()&&!!jt||n(vr)&&_())),jn=K(!0),hr=f(()=>e.uiConfig.features.thumbTimer&&Mt()&&r()==="video"&&!$()&&!d()&&!Pt&&(e.uiConfig.hideThumbTimerAfterTouch&&!y()||!e.uiConfig.hideThumbTimerAfterTouch)),Xn=K(!1),Zn=f(()=>(St()||e.showAutoplayNext&&x())&&!!Te()&&!!Fe()&&(e.showAds&&I()||!e.showAds)&&v()&&!d()&&!n(Xn)),is=K(!1);ot==null||ot.setContext(Zl());let go=je=>{je&&!Pt&&e.uiConfig.controls.showOnStartupAtAutoplay&&Bi(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:go});let _r=()=>{clearTimeout(fo),D(fn,!1),p()&&Oe.set(!1)},Bi=je=>{_r(),D(fn,!0),fo=setTimeout(()=>D(fn,!1),je);let ai=je-100;Jo=setTimeout(()=>{T()&&Rr.set(!1)},ai>0?ai:je)},br=Bt.subscribe(je=>{z.set(je),je&&(clearTimeout(pn),pn=setTimeout(()=>z.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Ln=async(je=ia())=>{var ai,Vo,Ro,nn,ho,_o;if(je&&!mc.device.isIOS){let Ai=Td(),bo=Mn(),Or=mc.browser.isSamsungBrowser&&Ai===e.shadowRootContainer;je=Ai===bo||Or}if(je){Bi(e.uiConfig.controls.hideTimeoutFullscreen);try{await(ot==null?void 0:ot.exit())}catch(Ai){Rt({message:String(Ai)})}try{let Ai=(ai=R())!=null&&ai.width&&((Vo=R())!=null&&Vo.height)?R():k();await p_(Ai)}catch(Ai){Rt({message:String(Ai)})}}Se.set(je),e.store.getAdmanWrapper().setFullscreen(je),P()?(nn=(Ro=e.store.callbacks)==null?void 0:Ro.onFullscreenEnter)==null||nn.call(Ro):(_o=(ho=e.store.callbacks)==null?void 0:ho.onFullscreenExit)==null||_o.call(ho)},mt=je=>{_t.set(je)},Xt=()=>{if(n(vo)){let{width:je,height:ai}=n(vo).getBoundingClientRect();_t.set({width:je,height:ai})}};kt(()=>{var je;return yu(Ln),e.uiConfig.features.annotationsInside&&(fi==null||fi.init(n(vo))),ot==null||ot.assignPlayerContainer(n(vo)),e.uiConfig.disablePiPResizeHandling||ot==null||ot.setExternalEventHandlers({resize:mt,leavepictureinpicture:Xt}),D(jn,!mc.device.isIphoneOrOldIpad),e.interactiveContainer&&((je=ue().parentElement)==null||je.insertBefore(e.interactiveContainer,ue().nextSibling)),()=>{clearTimeout(fo),clearTimeout(Jo),clearTimeout(pn),br(),ot==null||ot.dispose().catch(ai=>{Rt({message:String(ai)})}),xu(Ln)}});let $r=K(!0),Dr=K(!0),Nr=je=>{let ai=E()+(je==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;ai<0?(D($r,!1),ai=0):ai>=W()&&(D(Dr,!1),ai=W()),D(gr,!0),e.seekTime(ai)},Mn=()=>mc.device.isIOS?n(vo):!e.uiConfig.allowChangingFullscreenTarget||!Ct()?e.outerContainerRef:Ct().contains(e.outerContainerRef)?Ct():e.outerContainerRef,Vn=async()=>{try{if(ia())await $u(document),Rt({message:"exit fullscreen"});else{if(Rt({message:"request fullscreen"}),mc.device.isIOS&&!F())return;await bu(Mn())}}catch(je){Rt({message:String(je)})}},Mo=()=>{An()},Rn=je=>{if(je.preventDefault(),U()){Mo();return}if(!dt()){e.firstStart(),Bi(e.uiConfig.controls.hideTimeoutCursor);return}D(gr,!1),$()?_r():Bi(e.uiConfig.controls.hideTimeoutMobile)},Jn=()=>{st.set(!0)},en=()=>{Pt||(Rr.set(!0),Bi(e.uiConfig.controls.hideTimeoutCursor))},vn=je=>{wi&&(wi(je),Bi(e.uiConfig.controls.hideTimeoutMobile))},er=je=>{ji&&(ji(je),Bi(e.uiConfig.controls.hideTimeoutMobile))};He(()=>{Oi.set(n(Mr))}),He(()=>{wt.set((n(vr)||U()||j()||re()||G()||!n(Zn)&&(v()||n(fn)&&!n(gr)))&&!n(mn)&&r()==="video"&&!d()&&oe())}),He(()=>{!j()&&n(is)&&!X()&&Bi(e.uiConfig.controls.hideTimeoutMobile),D(is,j(),!0)}),He(()=>{D($r,E()>0),D(Dr,!Ie()&&E()<W(),!0)}),He(()=>{Ld(n(Lo),U(),fe(),!0)});let gn=Y("aria_label_video_player");Pb({fullScreenChangeHandler:Ln,getFullscreenTarget:Mn}),Ab({store:e.store,getFullscreenTarget:Mn});let tn=(je,ai)=>{var ho,_o;let Vo=(_o=(ho=e.store.callbacks)==null?void 0:ho.uiInfo)==null?void 0:_o.onUpcomingLiveViewStateChanged;if(!Vo)return;let Ro=!!ai,nn={...qn(n(vo),{upcomingLiveScreen:ai},"upcomingLiveScreen",Ro),...je};Vo(nn)};var Pi=vT();ft("blur",Ca,Mo);var io=C(Pi);Xa(io,{onClick:Rn,get videoContainer(){return ue()},set videoContainer(je){ue(je)}});var on=A(io,2);ka(on,()=>"slot",!1,(je,ai)=>{Ji(je,()=>({name:ja}))});var tr=A(on,2);As(tr,ee,je=>{var ai=mT(),Vo=ae(ai);let Ro=f(()=>r()!=="thumb"||d()||Pt&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);qa(Vo,{get hidden(){return n(Ro)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var nn=A(Vo,2);{var ho=tt=>{var Gt=dT(),yi=ae(Gt);{var wo=Ho=>{let or=f(()=>e.uiConfig.controls.seekStepMobile/1e3);Xu(Ho,{side:"left",get seekStep(){return n(or)},handleSingleFirstClick:Rn,handleSecondClick:()=>Nr("backward")})};M(yi,Ho=>{n($r)&&Ho(wo)})}var bn=A(yi,2);{var Bn=Ho=>{let or=f(()=>e.uiConfig.controls.seekStepMobile/1e3);Xu(Ho,{side:"right",get seekStep(){return n(or)},handleSingleFirstClick:Rn,handleSecondClick:()=>Nr("forward")})};M(bn,Ho=>{n(Dr)&&Ho(Bn)})}b(tt,Gt)};M(nn,tt=>{e.canRewindLive&&ct&&!be().has("TIMELINE")&&tt(ho)})}var _o=A(nn,2);{var Ai=tt=>{let Gt=f(()=>{var yi;return(yi=e.live)==null?void 0:yi.startTime});lc(tt,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(Gt)},onUpcomingLiveViewStateChanged:tn})};M(_o,tt=>{r()==="LiveWaitingStart"&&tt(Ai)})}var bo=A(_o,2);{var Or=tt=>{Ga(tt,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};M(bo,tt=>{r()==="LiveWaitingRecover"&&tt(Or)})}var xr=A(bo,2);{var _s=tt=>{Ga(tt,{kind:"record",get thumbUrl(){return e.thumbUrl}})};M(xr,tt=>{r()==="LiveWaitingRecord"&&tt(_s)})}var Hi=A(xr,2);{var bs=tt=>{var Gt=cT();let yi;var wo=C(Gt);Id(wo,{get adsSlotId(){return Le()},get adsParams(){return ze()},get adsAutoplayParam(){return te()},get duration(){return ce()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson}}),S(Gt),N(bn=>yi=ie(Gt,1,"ads-container s-8",null,yi,bn),[()=>({hidden:r()!=="ads"})]),b(tt,Gt)};M(Hi,tt=>{e.showAds&&dt()&&tt(bs)})}var os=A(Hi,2);{var wr=tt=>{let Gt=f(()=>!St()&&e.showAutoplayNext&&x());gv(tt,{get title(){return Te()},get thumb(){return Fe()},get isHide(){return n(Gt)},clickCloseIcon:()=>D(Xn,!0)})};M(os,tt=>{n(Zn)&&Te()&&Fe()&&tt(wr)})}var Do=A(os,2);{var Br=tt=>{sc(tt,{})};M(Do,tt=>{Ce()&&tt(Br)})}var rn=A(Do,2);{var ki=tt=>{var Gt=uT(),yi=C(Gt);Cd(yi,{}),S(Gt),b(tt,Gt)};M(rn,tt=>{de()&&tt(ki)})}var Qe=A(rn,2);{var At=tt=>{ac(tt,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return We()},onClick:Rn})};M(Qe,tt=>{G()&&tt(At)})}var ui=A(Qe,2);{var No=tt=>{Ka(tt,{get shifted(){return $()},get captions(){return me()},get position(){return E()},get playerSize(){return k()},isMobile:!0})};M(ui,tt=>{ve().value!=="off"&&tt(No)})}var $o=A(ui,2);{var yo=tt=>{var Gt=pT();Gt.__click=[lT,U,Ge,Mo];var yi=C(Gt);Qa(yi,{}),S(Gt),b(tt,Gt)};M($o,tt=>{d()&&tt(yo)})}var Fi=A($o,2);{var Oo=tt=>{let Gt=f(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),yi=f(()=>r()==="ads"),wo=f(()=>e.canRewindLive&&Z()!==0);nc(tt,{get bottomHidden(){return n(Gt)},get showControls(){return $()},get bottomNoSmooth(){return T()},get isAds(){return n(yi)},get canRewindLive(){return n(wo)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return we()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Ee()},get nextButtonActive(){return Ye()},get prevButtonActive(){return Ae()},get isOneVideoPlaylist(){return gt()},get customFullscreenSupported(){return n(jn)},get endScreenShown(){return n(Zn)},toggleFullscreen:Vn,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:vn,onDisabledSeekToInteractiveClick:er,get playerControlsWrapperRef(){return n($i)},set playerControlsWrapperRef(bn){D($i,bn,!0)},get playerControlsRef(){return n(ko)},set playerControlsRef(bn){D(ko,bn,!0)}})};M(Fi,tt=>{dt()&&tt(Oo)})}var Dn=A(Fi,2);{var Sr=tt=>{var Gt=fT(),yi=C(Gt);uc(yi,{get supportLink(){return e.supportLink},get returnFocus(){return aT},get ref(){return n(Lo)},set ref(wo){D(Lo,wo,!0)}}),S(Gt),b(tt,Gt)};M(Dn,tt=>{U()&&tt(Sr)})}var xo=A(Dn,2);let oo=f(()=>!n(hr));Ad(xo,{get isLive(){return O()},get isHidden(){return n(oo)},get isPlaying(){return pe()},get position(){return E()},get duration(){return W()}});var _n=A(xo,2);{var Bo=tt=>{Na(tt,{})};M(_n,tt=>{n(Jr)&&tt(Bo)})}var Nn=A(_n,2);{var Hr=tt=>{Rd(tt,{})};M(Nn,tt=>{le()&&tt(Hr)})}var Fr=A(Nn,2);{var On=tt=>{pc(tt,{onClose:ts,onSelectAutoQuality:()=>{kn("auto"),ts()}})};M(Fr,tt=>{n(Yn)&&tt(On)})}b(je,ai)});var yr=A(tr,2);et(yr,je=>D(Mr,je),()=>n(Mr)),S(Pi),et(Pi,je=>D(vo,je),()=>n(vo)),N(()=>Ne(Pi,"aria-label",gn)),ft("click",Pi,Jn,!0),ft("focusin",Pi,en,!0),b(t,Pi),H(),o()}Je(["click"]);function Ju(t){let e="";return to(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),to(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),to(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),to(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),to(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),to(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),to(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),to(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),to(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),to(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),to(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),to(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),to(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),to(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),to(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),to(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),to(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),to(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),to(t.font)&&(e+=`--font:${t.font};`),to(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),to(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function to(t){return typeof t=="string"&&!t.includes(";")}import{debounceFn as hT}from"@vkontakte/videoplayer-shared/es2018";var _T=L('<div class="time-container s-7"><!></div>'),bT=L('<div class="player-wrapper s-7" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),$T={hash:"s-7",code:".player-wrapper.s-7{height:100%;position:absolute;width:100%}.player-wrapper.s-7 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.timeline.s-7{bottom:0;left:0;opacity:0;opacity:1;position:absolute;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.visible.s-7{opacity:1}.time-container.s-7{bottom:8px;position:absolute;right:8px;z-index:var(--thumb-timer-z-index)}"};function _v(t,e){B(e,!0),q(t,$T);let[i,o]=Be(),r=()=>w(X,"$scrubbingInProgress",i),a=()=>w(G,"$playerSize",i),l=()=>w(E,"$isPlaying$",i),d=()=>w(k,"$duration$",i),s=()=>w(U,"$positionWithScrubbing$",i),u=()=>w(T,"$playerPhase",i),m=()=>w(R,"$crashed$",i),p=()=>w(W,"$currentSubtitle$",i),v=()=>w(F,"$currentSubtitleCaptions$",i),_=()=>w(P,"$positionExact$",i),$=()=>w(j,"$isLive$",i),y=()=>w(re,"$isRewindableLive$",i),x=g(e,"outsideDuration",3,0),I=g(e,"videoContainer",15),{playerPhase:T,state:{crashed$:R,duration$:k,positionExact$:P,isPlaying$:E,currentSubtitle$:W,currentSubtitleCaptions$:F,positionWithScrubbing$:U,isLive$:j,isRewindableLive$:re},ui:{playerSize:G,controls:oe,scrubbingInProgress:X},actions:{internal:{getVideoElement:Ie}}}=ye(),fe=8,ee=K(!1),be=ri({}),Ce=K(!1),de=f(()=>!r()&&!n(Ce)),We=()=>{D(ee,!0)},ve=()=>{D(ee,!1)},me=hT(Ul,260);He(()=>{a(),me(Ie(),oe,be,n(ee))});let Z=f(()=>l()?Xo(d()-s()):Xo(isFinite(d())?d():x()));var O=bT(),pe=C(O);Xa(pe,{hideCursor:!1,get videoContainer(){return I()},set videoContainer(Te){I(Te)}});var le=A(pe,2);ka(le,()=>"slot",!1,(Te,Fe)=>{Ji(Te,()=>({name:ja}))});var ue=A(le,2);let Le=f(()=>u()!=="thumb"||m());qa(ue,{get hidden(){return n(Le)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var ze=A(ue,2);{var te=Te=>{Ka(Te,{shifted:!1,get captions(){return v()},get position(){return _()},get playerSize(){return a()}})};M(ze,Te=>{p().value!=="off"&&n(de)&&Te(te)})}var ce=A(ze,2);{var we=Te=>{var Fe=_T(),gt=C(Fe);Pd(gt,{get isLive(){return $()},get isPlaying(){return l()},get time(){return n(Z)}}),S(Fe),b(Te,Fe)};M(ce,Te=>{n(de)&&Te(we)})}var Ee=A(ce,2);let Ye;var Ae=C(Ee);za(Ae,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return y()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:fe,tooltipRightOffset:fe,get ref(){return be.timeline},set ref(Te){be.timeline=Te}}),S(Ee),S(O),N(Te=>Ye=ie(Ee,1,"timeline s-7",null,Ye,Te),[()=>({visible:n(ee)})]),ft("mouseenter",O,We),ft("mouseleave",O,ve),ft("mouseenter",Ee,()=>D(Ce,!0)),ft("mouseleave",Ee,()=>D(Ce,!1)),b(t,O),H(),o()}var CT=L("<div><!></div>"),TT={hash:"s-2",code:'.vk-vp-root.s-2{--white:#fff;--black:#000;--red:#ff3347;--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--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-horizontal) + var(--preview-track-bottom-offset));--preview-track-controls-top-offset:calc(var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height));--settings-bg:rgba(0,0,0,.72);--settings-item-bg-hover:hsla(0,0%,100%,.08);--settings-radius:8px;--mobile-settings-bg:#2c2d2e;--divider-border:1px solid var(--white-alpha-24);--toggle-color-separator:#363738;--toggle-color-off:#656565;--toggle-color-on:#71aaeb;--toggle-color-autoplay-on:var(--white);--notification-bg:#2c2d2e;--notification-radius:8px;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--controls-container-z-index:1;--ads-container-z-index:1;--end-screen-mobile-z-index:1;--notification-z-index:1;--thumb-timer-z-index:2;--debug-panel-z-index:2;--modal-z-index:2;--settings-menu-z-index:2;--context-menu-z-index:3;--hot-key-helpers-container-z-index:3;--overlay-container-z-index:4;--rotate-transition-duration:0.25s;--btn-color:var(--white);--double-forward-bg:rgba(0,0,0,.6);background:var(--black);color:var(--white);font-family:var(--vk-vp-custom-font,var(--font));font-size:12px;height:100%;line-height:normal;outline:0;overflow:hidden;position:relative;user-select:none;width:100%}.vk-vp-root.visible-outside.s-2{overflow:visible}.vk-vp-root.s-2 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-2 button{background:transparent;border:none;color:inherit;font:inherit;line-height:normal;margin:0;overflow:visible;padding:0;width:auto;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}.vk-vp-root.s-2 p{margin:0}.vk-vp-root.s-2 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-2 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-2 :focus,.vk-vp-root.s-2 :focus-visible{outline:none}.vk-vp-root.s-2 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-2 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-2 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-2 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-2 .overlay-container{height:100%;left:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:var(--overlay-container-z-index)}.vk-vp-root.s-2 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-2 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function $v(t,e){B(e,!0),q(t,TT);let[i,o]=Be(),r=()=>w(dt,"$isLive$",i),a=()=>w(fi,"$availableSubtitlesList$",i),l=()=>w(ot,"$isPreviewTrackHorizontallyAligned$",i),d=g(e,"sources",7),s=g(e,"store",7),u=g(e,"microStoresRoot",7),m=g(e,"videoConfig",7),p=g(e,"uiConfig",7),v=g(e,"title",7),_=g(e,"thumbUrl",7),$=g(e,"interactiveContainer",7),y=g(e,"interactiveController",7),x=g(e,"subtitles",7),I=g(e,"subtitlesForcedLanguage",7),T=g(e,"live",7),R=g(e,"preload",7),k=g(e,"autoplay",7),P=g(e,"volume",7,void 0),E=g(e,"muted",7,void 0),W=g(e,"fromTime",7),F=g(e,"canRewindLive",7),U=g(e,"showAds",7),j=g(e,"adsSlotId",7,void 0),re=g(e,"adsParams",7,void 0),G=g(e,"adsAutoplayParam",7,void 0),oe=g(e,"duration",7,void 0),X=g(e,"logoClickable",7),Ie=g(e,"logoHidden",7),fe=g(e,"isMobile",7),ee=g(e,"showNextPrevButtons",7,!1),be=g(e,"nextButtonActive",7,!1),Ce=g(e,"prevButtonActive",7,!1),de=g(e,"endScreenVideoTitle",7,void 0),We=g(e,"endScreenVideoThumb",7,void 0),ve=g(e,"isOneVideoPlaylist",7,!1),me=g(e,"supportLink",7),Z=g(e,"shadowRootContainer",7),O=g(e,"outerContainerRef",7),pe=g(e,"fullScreenTarget",7,void 0),le=g(e,"failoverHosts",7,void 0),ue=g(e,"showMiniTimer",7,!1),Le=g(e,"saveRate",7),ze=g(e,"seekToInteractive",7,kb),te=g(e,"playPrevChapter",7,kb),ce=g(e,"volumeMultiplier",7),we=g(e,"showAutoplayNext",7),Ee=g(e,"showEndScreen",7,!0),Ye=g(e,"keyboardControls",15,void 0),{subscribers:Ae,stores:Te}=u();yh(p());let Fe=Lt(),gt=p().logoLink,Mt=s().ui.debugPanelVisible,Ct=s().ui.playerSize,dt=s().state.isLive$,qt=s().state.isInteractive&&bv.device.isAndroid,Ot=K(void 0),Rt=null,Ut=K(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{vsid:s().vsid}),kh(s(),Te),He(()=>{var z,Pt;s().ui.isMobile.set(fe()),(Pt=(z=m().callbacks)==null?void 0:z.onDomReady)==null||Pt.call(z)});let Q=(z=!1)=>{D(Ut,!0),z?s().actions.external.firstStart(U()):s().actions.internal.firstStart(U())},Me=()=>{if(Fe.features.qualityDetailsSubMenuEnabled){let z=e_(s().videoId);if(z)switch(z.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,z.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,z.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(z.quality);break}}else{t_(s().videoId),$f()&&s().actions.internal.setTrafficSavingEnabled(!0);let Pt=hf(s().videoId);Pt&&s().actions.internal.setQuality(Pt)}};function Ve(z){var yt,st,Oi;let Pt=d()||z;Pt&&s().initVideo({container:n(Ot),sources:Pt,failoverHosts:le(),subtitles:x(),subtitlesForcedLanguage:I(),volumeMultiplier:ce()});let lt=xT.get($d)==="true";Mt.set(lt),W()>0&&s().actions.external.seekTime(W());let gi=fe()?Fe.volumeDefault:(st=(yt=P())!=null?yt:mu())!=null?st:Fe.volumeDefault,jt=(Oi=E())!=null?Oi:Gh();if(s().actions.external.setVolume(gi),s().actions.external.setMuted(jt),s().getAdmanWrapper().setInitialVolume(jt?0:gi),Me(),Fe.features.saveRate&&Le()){let Mi=Xh();Mi&&!r()&&s().actions.internal.setPlaybackRate(Mi)}if(we()){let Mi=Jh();Mi&&s().actions.internal.setAutoplayNextEnabled(Mi)}s().ui.isAutoplay.set(k()),k()&&Q(),R()&&Fe.features.preload&&s().actions.internal.preload()}let xe=z=>{if(window.ResizeObserver){let Pt,lt;Rt=new ResizeObserver(wT(gi=>{let jt=gi[0];if(jt.contentBoxSize){let yt=Array.isArray(jt.contentBoxSize)?jt.contentBoxSize[0]:jt.contentBoxSize;Pt=yt.inlineSize,lt=yt.blockSize}else jt.contentRect&&(Pt=jt.contentRect.width,lt=jt.contentRect.height);Ct.set({width:Pt,height:lt})},300)),Rt.observe(z)}z.clientWidth&&z.clientHeight&&Ct.set({width:z.clientWidth,height:z.clientHeight})},Ue=()=>{document.hidden&&s().actions.external.stop()};kt(()=>{var lt,gi,jt,yt;qt&&document.addEventListener("visibilitychange",Ue),Fe.debugLog&&s().actions.internal.startLogging(),xe(n(Ot));let z=Ae.map(st=>st.init({store:s(),microStores:Te,config:m(),interactiveController:y(),uiConfig:p()})),Pt=()=>{qt&&document.removeEventListener("visibilitychange",Ue),Rt==null||Rt.disconnect(),z.forEach(st=>st.unsubscribe()),s().destroy()};return((lt=T())==null?void 0:lt.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),Pt):((gi=T())==null?void 0:gi.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),Pt):(((jt=T())==null?void 0:jt.status)==="finished"||((yt=T())==null?void 0:yt.status)==="postlive")&&!(d()&&yT(d()))?(s().actions.internal.setLiveWaitingRecord(!0),Pt):(Ve(),Pt)});function Se(){n(Ut)?s().actions.external.play():Q(!0)}function wt(){s().actions.external.pause()}function ge(z){s().actions.external.setMuted(z)}function Oe(){s().actions.external.toggleSubtitle()}function Ge(z,Pt){s().actions.external.changeSubtitle(z,Pt)}function at(z){s().actions.external.changeAudioStream(z)}function Kt(){var z;(z=s().webApi.slotsApi)!=null&&z.haveSlots()&&s().actions.external.hideControls()}function Et(){var z;(z=s().webApi.slotsApi)!=null&&z.haveSlots()&&s().actions.external.showControls()}function si(z){fe()||z>=0&&z<=1&&s().actions.external.setVolume(z)}function li(z){s().actions.internal.seekTime(z,ST.UNKNOWN)}function Ei(z){s().actions.external.seekEpisodeStartTime(z)}function uo(){s().actions.external.returnFocusToEpisodes()}function po(z){s().actions.external.setPlaybackRate(z)}function di(z){s().actions.external.setAutoQualityLimits(z)}function rt(){s().actions.external.setQuality("auto")}function ci(z){s().actions.external.setTrafficSavingEnabled(z)}function Yi(z){s().actions.external.setHighQualityEnabled(z)}let ct=Ju(Fe.view),Dt=m().playerView==="preview",fi=s().state.availableSubtitlesList$;if(Fe.features.initSubtitles){let z=!1;He(()=>{var Pt;if(!z&&a().length){z=!0;let lt;if(Fe.features.userVideoPrefs&&s().videoId){let jt=_u(Fe.userSalt,String(s().videoId));jt!=null&&jt.subtitleTrackId&&(lt=a().find(yt=>yt.value===jt.subtitleTrackId))}let gi=(Pt=I())!=null?Pt:xf();gi&&(lt=a().find(jt=>jt.language===gi)),s().actions.internal.setSubtitle(lt)}})}let ot=s().ui.isPreviewTrackHorizontallyAligned;var nt=CT();let Ti;var Zo=C(nt);{var Ao=z=>{hv(z,{get store(){return s()},get uiConfig(){return Fe},get thumbUrl(){return _()},get interactiveContainer(){return $()},get live(){return T()},get autoplay(){return k()},get canRewindLive(){return F()},get showAds(){return U()},get adsSlotId(){return j()},get adsParams(){return re()},get adsAutoplayParam(){return G()},get duration(){return oe()},get logoClickable(){return X()},get logoHidden(){return Ie()},get logoTargetUrl(){return gt},get nextButtonActive(){return be()},get prevButtonActive(){return Ce()},get endScreenVideoTitle(){return de()},get endScreenVideoThumb(){return We()},get isOneVideoPlaylist(){return ve()},get supportLink(){return me()},get shadowRootContainer(){return Z()},get outerContainerRef(){return O()},get fullScreenTarget(){return pe()},get showMiniTimer(){return ue()},get playerStarted(){return n(Ut)},get seekToInteractive(){return ze()},get playPrevChapter(){return te()},firstStart:Q,seekTime:li,get showEndScreen(){return Ee()},get showAutoplayNext(){return we()},get showNextPrevButtons(){return ee()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson},get videoContainer(){return n(Ot)},set videoContainer(Pt){D(Ot,Pt,!0)}})},_t=z=>{var Pt=De(),lt=ae(Pt);{var gi=yt=>{_v(yt,{get thumbUrl(){return _()},get outsideDuration(){return oe()},get canRewindLive(){return F()},get videoContainer(){return n(Ot)},set videoContainer(st){D(Ot,st,!0)}})},jt=yt=>{vv(yt,{get store(){return s()},get uiConfig(){return Fe},get title(){return v()},get thumbUrl(){return _()},get interactiveContainer(){return $()},get live(){return T()},get autoplay(){return k()},get canRewindLive(){return F()},get showAds(){return U()},get adsSlotId(){return j()},get adsParams(){return re()},get adsAutoplayParam(){return G()},get duration(){return oe()},get logoClickable(){return X()},get logoHidden(){return Ie()},get logoTargetUrl(){return gt},get nextButtonActive(){return be()},get prevButtonActive(){return Ce()},get endScreenVideoTitle(){return de()},get endScreenVideoThumb(){return We()},get isOneVideoPlaylist(){return ve()},get supportLink(){return me()},get shadowRootContainer(){return Z()},get outerContainerRef(){return O()},get fullScreenTarget(){return pe()},get showMiniTimer(){return ue()},get playerStarted(){return n(Ut)},get seekToInteractive(){return ze()},get playPrevChapter(){return te()},firstStart:Q,get showEndScreen(){return Ee()},get showAutoplayNext(){return we()},get showNextPrevButtons(){return ee()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(Ot)},set videoContainer(st){D(Ot,st,!0)},get keyboardControls(){return Ye()},set keyboardControls(st){Ye(st)}})};M(lt,yt=>{Dt?yt(gi):yt(jt,!1)})}b(z,Pt)};M(Zo,z=>{fe()?z(Ao):z(_t,!1)})}S(nt),N(z=>{Ti=ie(nt,1,"vk-vp-root s-2",null,Ti,z),Ke(nt,ct)},[()=>({"root--miui-browser":bv.device.isMobile&&bv.browser.isMiuiBrowser,"visible-outside":Dt,"preview-track-horizontally-alinged":l()})]),b(t,nt);var Bt=H({initVideo:Ve,play:Se,pause:wt,setMuted:ge,toggleSubtitle:Oe,changeSubtitle:Ge,changeAudioStream:at,hideControls:Kt,showControls:Et,setVolume:si,seekTime:li,seekEpisodeStartTime:Ei,returnFocusToEpisodes:uo,setPlaybackRate:po,setAutoQualityLimits:di,setAutoQuality:rt,toggleTrafficSaving:ci,toggleHighQuality:Yi,get sources(){return d()},set sources(z){d(z)},get store(){return s()},set store(z){s(z)},get microStoresRoot(){return u()},set microStoresRoot(z){u(z)},get videoConfig(){return m()},set videoConfig(z){m(z)},get uiConfig(){return p()},set uiConfig(z){p(z)},get title(){return v()},set title(z){v(z)},get thumbUrl(){return _()},set thumbUrl(z){_(z)},get interactiveContainer(){return $()},set interactiveContainer(z){$(z)},get interactiveController(){return y()},set interactiveController(z){y(z)},get subtitles(){return x()},set subtitles(z){x(z)},get subtitlesForcedLanguage(){return I()},set subtitlesForcedLanguage(z){I(z)},get live(){return T()},set live(z){T(z)},get preload(){return R()},set preload(z){R(z)},get autoplay(){return k()},set autoplay(z){k(z)},get volume(){return P()},set volume(z){P(z)},get muted(){return E()},set muted(z){E(z)},get fromTime(){return W()},set fromTime(z){W(z)},get canRewindLive(){return F()},set canRewindLive(z){F(z)},get showAds(){return U()},set showAds(z){U(z)},get adsSlotId(){return j()},set adsSlotId(z){j(z)},get adsParams(){return re()},set adsParams(z){re(z)},get adsAutoplayParam(){return G()},set adsAutoplayParam(z){G(z)},get duration(){return oe()},set duration(z){oe(z)},get logoClickable(){return X()},set logoClickable(z){X(z)},get logoHidden(){return Ie()},set logoHidden(z){Ie(z)},get isMobile(){return fe()},set isMobile(z){fe(z)},get showNextPrevButtons(){return ee()},set showNextPrevButtons(z){ee(z)},get nextButtonActive(){return be()},set nextButtonActive(z){be(z)},get prevButtonActive(){return Ce()},set prevButtonActive(z){Ce(z)},get endScreenVideoTitle(){return de()},set endScreenVideoTitle(z){de(z)},get endScreenVideoThumb(){return We()},set endScreenVideoThumb(z){We(z)},get isOneVideoPlaylist(){return ve()},set isOneVideoPlaylist(z){ve(z)},get supportLink(){return me()},set supportLink(z){me(z)},get shadowRootContainer(){return Z()},set shadowRootContainer(z){Z(z)},get outerContainerRef(){return O()},set outerContainerRef(z){O(z)},get fullScreenTarget(){return pe()},set fullScreenTarget(z){pe(z)},get failoverHosts(){return le()},set failoverHosts(z){le(z)},get showMiniTimer(){return ue()},set showMiniTimer(z){ue(z)},get saveRate(){return Le()},set saveRate(z){Le(z)},get showAutoplayNext(){return we()},set showAutoplayNext(z){we(z)},get seekToInteractive(){return ze()},set seekToInteractive(z){ze(z)},get playPrevChapter(){return te()},set playPrevChapter(z){te(z)},get volumeMultiplier(){return ce()},set volumeMultiplier(z){ce(z)},get showEndScreen(){return Ee()},set showEndScreen(z){Ee(z)},get keyboardControls(){return Ye()},set keyboardControls(z){Ye(z)}});return o(),Bt}var IT=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 yv(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:(r,a)=>{var l=IT();Jt(9),b(r,l)},$$slots:{default:!0}})}var ET=L('<div class="title s-0"> </div>'),PT=L('<div class="playerStub s-0"><!> <!></div>'),AT={hash:"s-0",code:".playerStub.s-0{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}.title.s-0{box-sizing:border-box;color:#fff;font-size:15px;left:0;overflow:hidden;padding:18px 20px 10px;position:absolute;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}"};function xv(t,e){q(t,AT);var i=PT(),o=C(i);{var r=d=>{var s=ET(),u=C(s,!0);S(s),N(()=>he(u,e.title)),b(d,s)};M(o,d=>{e.title&&d(r)})}var a=A(o,2);{var l=d=>{let s=f(()=>!!e.thumbUrl);yv(d,{get isWhite(){return n(s)}})};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 kT=L('<div class="playerError s-1"><!></div>'),LT={hash:"s-1",code:".playerError.s-1{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}"};function wv(t){q(t,LT);var e=kT(),i=C(e);Qa(i,{}),S(e),b(t,e)}import{AppTracer as aI,now as lI,ValueSubject as dI,withoutNullable as cI}from"@vkontakte/videoplayer-shared/es2018";import{cloneDeepWith as uI,InterfaceLanguage as pI,isNonNullable as Av,Logger as fI,Observable as mI,Subscription as Bb,once as vI,InternalsExposure as gI,skip as hI,getPlayerId as _I}from"@vkontakte/videoplayer-shared/es2018";import{clientChecker as Hb,isMobile as bI}from"@vkontakte/videoplayer-core/es2018";import{OneStat as $I,ThinOneStat as yI,MediascopePixel as xI}from"@vkontakte/videoplayer-statistics/es2018";import{Logger as MT,Subscription as VT}from"@vkontakte/videoplayer-shared/es2018";var ep=class{constructor(){this.subscription=new VT,this.logger=new MT,this.log=this.logger.createComponentLog("MediaSessionApi")}isSupported(){return"mediaSession"in navigator}setMetaData({title:e,artist:i="",thumbUrl:o=""}){this.isSupported()&&(navigator.mediaSession.metadata=new MediaMetadata({title:e,artist:i,artwork:[{src:o,sizes:"96x96",type:"image/png"},{src:o,sizes:"128x128",type:"image/png"},{src:o,sizes:"192x192",type:"image/png"},{src:o,sizes:"256x256",type:"image/png"},{src:o,sizes:"384x384",type:"image/png"},{src:o,sizes:"512x512",type:"image/png"}]}))}updateActionHandlers(e){this.resetActionHandlers(),this.setActionHandlers(e)}resetActionHandlers(){let e=[["play",null],["pause",null],["stop",null],["nexttrack",null],["previoustrack",null],["seekto",null],["seekbackward",null],["seekforward",null]];this.setActionHandlers(e)}setActionHandlers(e){var i,o;if(this.isSupported())for(let[r,a]of e)try{(o=(i=navigator.mediaSession).setActionHandler)==null||o.call(i,r,a)}catch(l){throw new Error(`The media session action "${r}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{var a,l;let o=$e(e.state.currentPlaybackRate$),r=$e(e.state.duration$);if(!(!isFinite(i)||!isFinite(r)))try{(l=(a=navigator.mediaSession).setPositionState)==null||l.call(a,{position:i,playbackRate:o,duration:r})}catch(d){this.log({message:`MediaSession setPositionState can't call with position: ${i} and duration: ${r}`})}})))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};import{ValueSubject as Cv,detectEmbed as HT}from"@vkontakte/videoplayer-shared/es2018";var RT=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),DT=L('<div><div><!></div> <span class="title s-6"> </span></div>'),NT={hash:"s-6",code:".player-pip-dummy.s-6{align-items:center;background-color:#19191a;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;width:100%}.player-pip-dummy.is-pip-api.s-6{position:relative}.dummy-image.s-6 svg{transform:scale(1.07143)}.dummy-image.desktop.s-6{transform:scale(1.07143) rotate(-90deg) rotateY(180deg)}.title.s-6{color:#fff;font-size:16px;padding:18px 20px 10px;text-align:center}"};function Sv(t,e){B(e,!0),q(t,NT);let[i,o]=Be(),r=()=>w(u,"$interfaceLanguage$",i),a=()=>w(m,"$isMobile$",i),l=ye(),d=Lt(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,m=l.ui.isMobile,p=l.ui.t,v=f(()=>r()&&p("pip_dummy_title")),_=Ju(d.view);var $=DT();let y;var x=C($);let I;var T=C(x);Xe(T,{width:"57",height:"56",testId:"pip-dummy-icon",children:(P,E)=>{var W=RT();Jt(),b(P,W)},$$slots:{default:!0}}),S(x);var R=A(x,2),k=C(R,!0);S(R),S($),N((P,E)=>{y=ie($,1,"player-pip-dummy s-6",null,y,P),Ke($,_),I=ie(x,1,"dummy-image s-6",null,I,E),he(k,n(v))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),b(t,$),H(),o()}var OT=Object.defineProperty,BT=(t,e,i)=>e in t?OT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,ua=(t,e,i)=>BT(t,typeof e!="symbol"?e+"":e,i),FT=460,UT=280,vc=class{constructor({enabled:e=!0}={enabled:!0}){ua(this,"playerDomElement"),ua(this,"playerParentShadowRoot"),ua(this,"playerDummyElement"),ua(this,"svelteContext"),ua(this,"pipWindow"),ua(this,"info",{isActive$:new Cv(!1),isEnabled$:new Cv(!1),type:1}),ua(this,"pipActive",!1),ua(this,"pipApi"),this.info.isEnabled$=new Cv(e),Nu()&&(this.pipApi=new Ns({enabled:e}),this.pipApi.info.isActive$.subscribe(i=>{(i&&!this.info.isActive$.getValue()||!i&&this.pipActive)&&this.info.isActive$.next(i),this.pipActive=i}))}isSupported(){let{isEmbed:e}=HT();return"documentPictureInPicture"in window&&!e}isActive(){return this.info.isActive$.getValue()}setPlayerDomElement(e,i){this.playerDomElement=e,this.playerParentShadowRoot=i}setContext(e){this.svelteContext=e}async request(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=await documentPictureInPicture.requestWindow({width:FT,height:UT,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let o=[...this.playerParentShadowRoot.styleSheets].map(s=>[...s.cssRules].map(u=>u.cssText).join(" ")).filter(Boolean).join(`
61
- `),r=document.createElement("style");r.textContent=o;let a=this.createStretchedContainer(),l=a.attachShadow({mode:"open"});l.append(r),l.append(this.playerDomElement);let d={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=Gr(Sv,d),(e=this.pipWindow)==null||e.document.body.append(a),this.info.isActive$.next(!0),(i=this.pipWindow)==null||i.addEventListener("unload",s=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(Aa(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})}async exit(){return new Promise(e=>{var i,o,r;this.pipWindow?(i=documentPictureInPicture.window)==null||i.close():(o=this.pipApi)!=null&&o.isActive()&&((r=this.pipApi)==null||r.exit()),e()})}async dispose(){await this.exit()}setEnabled(e){var i;this.info.isEnabled$.next(e),(i=this.pipApi)==null||i.setEnabled(e)}assignPlayerContainer(e){var i;(i=this.pipApi)==null||i.assignPlayerContainer(e)}updateVideoElement(){var e;(e=this.pipApi)==null||e.updateVideoElement()}setExternalEventHandlers(e){var i;(i=this.pipApi)==null||i.setExternalEventHandlers(e)}createStretchedContainer(){let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e}};function Lb(t){return t instanceof vc}var tp=class{static getLatestSupportedVersion(e){let i=new Ns(e),o=new vc(e);if(o.isSupported())return o;if(i.isSupported())return i}};function gc(t,e){var r,a;let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let l of i)o[l]=(a=(r=e[l])!=null?r:t[l])!=null?a:void 0;return o}var Mb="Inner error. Unexpectedly root annotation container null reference exception",Vb="Annotation with such name already exists",Rb="Annotation with such name does not exist";var Ql=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as zT,Subscription as WT,throttleFn as KT}from"@vkontakte/videoplayer-shared/es2018";var QT="1",qT=100,ip=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new WT}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=KT(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},qT);this.subscriptions.add(zT(this.rootAnnotationsContainer).subscribe(({width:o,height:r})=>{this.playerSize={width:o,height:r},i()})),this.mutationObserver=new MutationObserver(i),this.mutationObserver.observe(this.rootAnnotationsContainer,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}add(e,i){var o;if(!this.rootAnnotationsContainer)throw new Ql(Mb);if(this.annotations.has(e))throw new Ql(Vb);i.style.zIndex=(o=i.style.zIndex)!=null?o:QT,i.style.position="absolute",this.rootAnnotationsContainer.append(i),this.annotations.set(e,i)}get(e){let i=this.annotations.get(e);if(!i)throw new Ql(Rb);return i}remove(e){let i=this.get(e);this.annotations.delete(e)&&i.remove()}clear(){for(let e in this.annotations.keys())this.remove(e)}destroy(){var e;this.annotations.clear(),this.subscriptions.unsubscribe(),(e=this.mutationObserver)==null||e.disconnect(),this.rootAnnotationsContainer=null}isElementExceedsBoundaries(e,i,o){let r=e.offsetTop,a=e.offsetLeft,l=e.offsetWidth,d=e.offsetHeight;return r<0||a<0||a+l>i||r+d>o}registryRootContainer(e){}addLayer(e){return document.createElement("div")}getLayer(e){}removeLayer(e){}clearLayer(e){}detach(){}reattach(){}};import{assertNonNullable as op,Subscription as GT}from"@vkontakte/videoplayer-shared/es2018";var un=class{init({store:e,microStores:i,interactiveController:o,config:r}){return op(e),op(i),op(r),r.interactiveData&&op(o),this.subscription=new GT,this.subscription}};var hc=class extends un{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$={...se(null),toggle:()=>this.state$.update(i=>!i)}}init(i){let o=super.init(i),{isInteractiveExpectation$:r}=i.store.state;return o.add(r.subscribe(a=>{this.state$.set(a?!0:null)})),o}};var _c=class extends un{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$={...se(null),toggle:()=>this.state$.update(i=>!i)}}init(i){let o=super.init(i),{microStores:r,store:a}=i,{fakeIsPlaying$:l}=r,{isInteractiveExpectation$:d,isPlaying$:s}=a.state,{controlsVisible:u,isMobile:m}=a.ui,p=$e(m),v=()=>p&&$e(u);return o.add(u.subscribe(_=>{if(!p)return;let $=$e(l);$e(s)?this.state$.set(_):$!==null&&this.state$.set(!$||_)})),o.add(s.subscribe(_=>{this.state$.set(!_||v())})),o.add(l.subscribe(_=>{if(_===null)return;let $=$e(d);if(v()){this.state$.set(!0);return}$&&this.state$.set(!_)})),o}};var bc=class extends un{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=se("tooltip_chapter_without_interactive")}init(i){let o=super.init(i),{store:r}=i;return o.add(r.state.interactiveEpisodes$.subscribe(a=>{a.length&&(a.every(l=>l.completed)?this.state$.set("tooltip_interactive_of_chapter_completed"):this.state$.set("tooltip_disabled_when_interactive"))})),o}};import{combine as YT}from"@vkontakte/videoplayer-shared/es2018";var Tv=se(!1),np=null,$c=class extends un{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$={...Tv,set:(i,o=!1)=>{i!==$e(Tv)&&(this.clearTimeout(),Tv.set(i),!i&&np&&(np=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()}}init(i){let o=super.init(i),{store:r,config:a}=i,{isInteractiveTime$:l,isPlaying$:d}=r.state,s=r.ui.controlsVisible,{interactiveTimeIndicator:u}=r.ui.controls;o.add(s.subscribe(p=>{$e(l)&&p&&this.state$.set(!1)}));let m=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(YT({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:v,interactiveTimeIndicator:_})=>{var $,y;if(!(!p||!(_!=null&&_.isDisplayed))){if(!v)return this.state$.set(!1);m.tooltipHelpHintActive&&np===null&&(np=!0,m.tooltipHelpHintActive=!1,this.state$.set(!0),(y=($=r.callbacks)==null?void 0:$.onInteractiveTimeIndicatorHintDeactivated)==null||y.call($))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as jT,noop as XT}from"@vkontakte/videoplayer-shared/es2018";var yc=class extends un{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$={...se(null),toggle:XT};this.checkIfShouldHide=i=>Ds(i,"s")}init(i){let o=super.init(i),{store:r,interactiveController:a}=i,l=r.ui.currentGridType$,d=r.getLogger().createComponentLog("GraphIsOpened microStore");return this.state$.toggle=async()=>{if(this.checkIfShouldHide($e(l)))return;let s=$e(this.state$),{isEnded$:u,playbackState$:m}=r.state,{disabledControls$:p}=r.ui.controls,v=$e(u),_=$e(m);if(s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1),p.remove(df),!v&&this.graphMadePause&&r.actions.internal.play()}catch($){d({message:"Cant hide graph"})}else{this.graphMadePause=_==="playing";try{await(a==null?void 0:a.toggleGraphView(!0)),this.state$.set(!0),p.add(df),!v&&this.graphMadePause&&r.actions.internal.pause()}catch($){d({message:"Cant show graph"})}}},o.add(jT({graphIsOpened:this.state$,currentGridType:l}).subscribe(async({graphIsOpened:s,currentGridType:u})=>{if(this.checkIfShouldHide(u)&&s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1)}catch(p){d({message:"Cant hide graph"})}})),o}};import{ValueSubject as Db}from"@vkontakte/videoplayer-shared/es2018";var xc=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:r}=i,{info:{isActive$:a,isEnabled$:l,type:d}}=r.webApi.pictureInPictureApi||{info:{isActive$:new Db(!1),isEnabled$:new Db(!1)}};return o.add(a.subscribe(s=>{this.state$.isActive$.set(s)})),o.add(l.subscribe(s=>{this.state$.isEnabled$.set(s)})),this.state$.type$.set(d),o}};import{filter as eI,filterChanged as tI}from"@vkontakte/videoplayer-shared/es2018";import{safeStorage as Iv}from"@vkontakte/videoplayer-shared/es2018";var Nb=({maxShowCount:t,timeout:e})=>{let i=[t!==0?ZT({maxCount:t}):void 0,e!==0?JT({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},ZT=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Iv.set("videoplayer_notifications_manager_count",JSON.stringify((r=e[i])!=null?r:0))},canShowNotification:i=>{var o;return((o=e[i])!=null?o:0)<t}}},JT=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Iv.get(e)||"{}")}catch(a){return{}}},o=a=>Iv.set(e,JSON.stringify(a)),r=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o({...i(),[a]:{timeout:t,launchTime:Date.now()}})},canShowNotification:a=>{let l=i()[a];if(l){let d=Date.now()-l.launchTime>t;return d&&r(a),d}else return!0}}};var wc=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:r,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:l,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:s}}}=i;this.notificationManager=Nb({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe(tI(),eI(m=>m)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(s&&r.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var Ob=()=>[hc,_c,bc,$c,yc,xc,wc].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:{...e,[o.stateName]:o.state$}}},{subscribers:[],stores:{}});import{devNull as Sc}from"@vkontakte/videoplayer-shared/es2018";var rp=class{constructor(e){this.getActiveElement=e;this.focusableElements=[];this.isActive=!1;this.handleTabKey=e=>{if(this.updateFocusableElements(),!this.focusableElements.length)return;let i=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1],r=this.getActiveElement();e.shiftKey&&r===i?(e.preventDefault(),o.focus()):!e.shiftKey&&r===o&&(e.preventDefault(),i.focus())}}activate(){this.isActive||(document.addEventListener("keydown",this.handleTabKey),this.isActive=!0)}deactivate(){this.isActive&&(document.removeEventListener("keydown",this.handleTabKey),this.isActive=!1,this.focusableElements=[])}updateFocusableElements(){this.isActive&&(this.focusableElements=this.getFocusableElements())}getFocusableElements(){let e=["button:not([disabled])","[href]:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"]):not([disabled])'].join(", ");return Array.from(this.container.querySelectorAll(e)).filter(i=>!i.disabled&&i.offsetParent!==null)}destroy(){this.deactivate()}setContainer(e){this.container=e}};var sp=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 rp(()=>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>'),oI={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 Ev(t,e){B(e,!0),q(t,oI);let i=null,o=K(null);He(()=>(n(o)&&(i=window.setTimeout(()=>{D(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function r(s){e.playbackStatusShow&&D(o,s?"prev":"next",!0)}var a=De(),l=ae(a);{var d=s=>{var u=De(),m=ae(u);As(m,()=>n(o),p=>{var v=iI(),_=C(v);let $=f(()=>n(o)==="prev");fc(_,{get duration(){return e.animationDuration},get Icon(){return da},get reversed(){return n($)}}),S(v),b(p,v)}),b(s,u)};M(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return b(t,a),H({startVideoChangedAnimation:r})}import{getWindow as nI}from"@vkontakte/videoplayer-shared/es2018";var Pv=nI().HTMLElement||class{constructor(){this.isConnected=!1}};var rI=Object.defineProperty,sI=(t,e,i)=>e in t?rI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Qt=(t,e,i)=>sI(t,typeof e!="symbol"?e+"":e,i),wI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:pI.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:bI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},Gn=K(void 0),kv=ri({animationDuration:0,playbackStatusShow:!1}),ap=class extends Pv{constructor(){super(),Qt(this,"svelteStubComponent"),Qt(this,"svelteRootComponent"),Qt(this,"sveltePersistentLayerComponent"),Qt(this,"svelteErrorComponent"),Qt(this,"store"),Qt(this,"microStoresRoot"),Qt(this,"statistics"),Qt(this,"_shadowRoot"),Qt(this,"playerContainer"),Qt(this,"rootContainer"),Qt(this,"stateContainer"),Qt(this,"shadowRootContainer"),Qt(this,"playerId"),Qt(this,"uiConfig"),Qt(this,"coreConfig"),Qt(this,"statisticsConfig"),Qt(this,"metaConfig"),Qt(this,"interactiveController"),Qt(this,"interactiveContainer"),Qt(this,"graphMadePause"),Qt(this,"currentPlayingVideoIndex",0),Qt(this,"needToRepeatPlaylist",!1),Qt(this,"videoConfig"),Qt(this,"pictureInPictureApi"),Qt(this,"mediaSessionApi"),Qt(this,"unsubscribePlayerPhaseSubscription"),Qt(this,"logger"),Qt(this,"log"),Qt(this,"subscription"),Qt(this,"interactiveSubscription"),Qt(this,"annotationsApi"),Qt(this,"slotsApi"),Qt(this,"focusManager"),Qt(this,"prevIsid"),Qt(this,"isInited",!1),Qt(this,"postponedInitParams",null),Qt(this,"internalsExposure",null),Qt(this,"shadowDOMCallbacksDisabled",!1),Qt(this,"fatalError$",new dI(null)),Qt(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:m,statVKAppId:p,refreshStatAuthToken:v,autoplay:_,isMobile:$,isTouch:y,refDomain:x,deviceId:I,interactiveData:T}=gc(this.videoConfig,i),R=(o=T==null?void 0:T.projectInfo)==null?void 0:o.pid,k=(a=(r=this.interactiveController)==null?void 0:r.state.isReplay$.getValue())!=null?a:!1;k&&(this.prevIsid=void 0);let{unitedVideoId:P,isClip:E=!1}=e;if(this.uiConfig.features.statistics&&P)try{return new $I({movieId:P,albumId:d,place:s,trackCode:m,vkAppId:p,autoplay:(l=_&&!this.interactiveController)!=null?l:!1,mobile:y!=null?y:$,clip:E,refDomain:x,deviceId:I,isPreviewPlayerView:this.videoConfig.playerView==="preview",...R&&(!this.isInited||k)&&{projectId:Number(R)}},{refreshAuthToken:v,userSalt:u,config:this.statisticsConfig,...this.interactiveController&&{useIsid:!0,isid:this.prevIsid}})}catch(F){console.error(F),this.log({message:F.message})}}),Sc.create("ui"),this.logger=new fI,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Bb,this.interactiveSubscription=new Bb,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Gr(wv,{target:this.playerContainer}))})}connectedCallback(){var e,i;if(this.rootContainer)return;this.initPlayerRootContainers();let o=(e=this.getAttribute("stub-title"))!=null?e:void 0,r=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=ri({title:o,thumbUrl:r}),l={target:this.playerContainer,props:a};this.svelteStubComponent=Gr(xv,l),this.sveltePersistentLayerComponent=Gr(Ev,{target:this.playerContainer,props:kv}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;kv.animationDuration=e,kv.playbackStatusShow=i&&o}disconnectedCallback(){var e,i,o,r,a,l,d;this.shadowDOMCallbacksDisabled||((e=this.annotationsApi)==null||e.destroy(),(i=this.slotsApi)==null||i.destroy(),(o=this.focusManager)==null||o.destroy(),(r=this.mediaSessionApi)==null||r.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteErrorComponent),this.unmountComponent(this.sveltePersistentLayerComponent),this.subscription.unsubscribe(),(a=this.unsubscribePlayerPhaseSubscription)==null||a.call(this),(l=this.interactiveController)==null||l.destroy(),this.interactiveSubscription.unsubscribe(),(d=this.internalsExposure)==null||d.destroy(),Sc.destroy("ui"))}initPlayerRootContainers(){this.rootContainer=document.createElement("div"),this.rootContainer.style.position="relative",this.rootContainer.className="root-container",this.rootContainer.style.width="100%",this.rootContainer.style.height="100%",this.rootContainer.style.minHeight="206px",this.shadowRootContainer=document.createElement("div"),this.shadowRootContainer.style.position="absolute",this.shadowRootContainer.className="shadow-root-container",this.shadowRootContainer.style.width="100%",this.shadowRootContainer.style.height="100%",this._shadowRoot=this.shadowRootContainer.attachShadow({mode:"open"}),this.playerContainer=document.createElement("div"),this.playerContainer.style.all="initial",this.playerContainer.style.display="block",this.playerContainer.style.contain="strict",this.playerContainer.style.width="100%",this.playerContainer.style.height="100%",this._shadowRoot.append(this.playerContainer),this.rootContainer.append(this.shadowRootContainer),this.stateContainer=document.createElement("div"),this.stateContainer.className="state-container",this.stateContainer.style.width="1px",this.stateContainer.style.height="1px",this.stateContainer.style.position="absolute",this.stateContainer.style.backgroundColor="transparent",this.stateContainer.style.left="-100000px",this.append(this.rootContainer),this.append(this.stateContainer)}needToShowNextPrevButtons(){return this.videoConfig?this.videoConfig.videos.length>1&&this.videoConfig.showNextPrevButtons:!1}isNextButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1||this.needToRepeatPlaylist):!1}isPrevButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex>0||this.needToRepeatPlaylist):!1}isControlDisabled(e){var i;let o=(i=this.store)==null?void 0:i.ui.controls.disabledControls$;return(o==null?void 0:o.includes(e))||!1}getNextVideoInfo(){if(!this.videoConfig)return{nextVideoTitle:void 0,nextVideoThumb:void 0};let e=this.videoConfig.videos[this.currentPlayingVideoIndex+1]||{};return{nextVideoTitle:e.title,nextVideoThumb:e.thumbUrl}}createThinOneStat(e,i={}){if(!this.videoConfig)return;let{deviceId:o,preload:r,refreshStatAuthToken:a}=gc(this.videoConfig,i),{unitedVideoId:l}=e;if(this.uiConfig.features.thinStatistics&&l)return new yI.ThinOneStat({deviceId:o,movieId:l,preload:r,isPreviewPlayerView:this.videoConfig.playerView==="preview"},{config:this.statisticsConfig,refreshAuthToken:a})}createPlayer(e,i={},o){var r,a,l,d,s,u,m,p,v,_;if(!this.videoConfig)return;let{albumId:$,statPlace:y,statAuthToken:x,preload:I,autoplay:T,volume:R,muted:k,fromTime:P,canRewindLive:E,supportLink:W,showAds:F,adsSlotId:U,adsParams:j={},adsAutoplayParam:re,interfaceLanguage:G,isCyrillicRelatedInterface:oe,logoClickable:X,logoHidden:Ie,isMobile:fe,isTouch:ee,isAudioDisabled:be,isLiveCatchUpMode:Ce,fullScreenTarget:de,failoverHosts:We,canDownload:ve,callbacks:me,interactiveData:Z,showThumbTimer:O,additionalButtons:pe=[],additionalSettingsMenuItems:le=[],additionalContextMenuItems:ue=[],repeat:Le,loop:ze,saveRate:te,volumeMultiplier:ce,showEndScreen:we,showAutoplayNext:Ee,mediascopePixels:Ye}=gc(this.videoConfig,i),{sources:Ae,title:Te,thumbUrl:Fe,unitedVideoId:gt,isClip:Mt=!1,duration:Ct,adsParams:dt={},videoEpisodes:St,previewThumbsData:qt,subtitles:Ot,subtitlesForcedLanguage:Rt,live:Ut,adsExternalApi:Q,adsJson:Me}=e;if(!Ae&&!Ut){let di=new Error("empty sources and live");this.fatalError$.next(di),(r=me.onCrashed)==null||r.call(me,di.message);return}let Ve={...j,...dt},xe=this.getNextVideoInfo(),Ue={sources:Ae,title:Te,thumbUrl:Fe,subtitles:Ot,subtitlesForcedLanguage:Rt,unitedVideoId:gt,isClip:Mt,live:Ut,albumId:$,statPlace:y,autoplay:T,muted:k,volume:R,fromTime:P,canRewindLive:E,showAds:F,adsSlotId:U,adsParams:Ve,adsAutoplayParam:re,duration:Ct,logoClickable:X,logoHidden:Ie,isTouch:ee!=null?ee:fe,repeat:Le,loop:ze,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:xe.nextVideoTitle,endScreenVideoThumb:xe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},Se={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(Ue)}`});let wt=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),ge=(wt==null?void 0:wt.oneStat)||this.createOneStat(e,i),Oe=this.createThinOneStat(e,i),Ge;Ye&&(Ge=new xI({pixels:Ye})),(ge||Oe)&&(this.statistics=new Bu(ge,Oe,Ge,wt==null?void 0:wt.statSubscription));let at=this.uiConfig.features.apptracer.enabled?new aI("videoplayer",this.uiConfig.features.apptracer,{version:Al,env:uu},cI({movieId:gt,albumId:$,place:y,autoplay:(l=T&&!this.interactiveController)!=null?l:!1,mobile:ee!=null?ee:fe,clip:Mt})):void 0;this.interactiveController&&((u=this.prevIsid)!=null||(this.prevIsid=(s=(d=this.statistics)==null?void 0:d.oneStat)==null?void 0:s.isid$.getValue()));let Kt=!!Z,Et=[],si="tooltip_interactive_go_back_disabled_first";if(Kt&&this.interactiveController){let di=this.interactiveController.state.isInitialChapter$.getValue(),rt=this.interactiveController.getHistoryState();di&&Et.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Et.push("SEEK_TO_INTERACTIVE_BUTTON"),rt.hasPrevChapter$.getValue()||(Et.push("PLAY_PREV_CHAPTER_BUTTON"),di||(rt.isGoBackLimited$.getValue()?si="tooltip_interactive_go_back_disabled_limit":si="tooltip_interactive_go_back_disabled"))}let li=()=>{var di;this.isInited=!1,this.prevIsid=void 0;let rt=(o==null?void 0:o.info.isEnded$.getValue())&&((di=this.interactiveController)==null?void 0:di.state.isEndChapter$.getValue());me.onReplayInteractiveVideo&&!rt?me.onReplayInteractiveVideo():this.replayInteractiveVideo()},Ei=Le&&this.videoConfig.videos.length===1;this.store=Y_({player:o,interfaceLanguage:G,isCyrillicRelatedInterface:oe,videoId:gt,isClip:Mt,isLiveCatchUpMode:Ce,isAudioDisabled:be,statAuthToken:x,callbacks:me,webApi:Se,videoEpisodes:St,previewThumbsData:qt,canDownload:ve,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,disabledControls:Et,isInteractive:Kt,saveRate:te,interactiveRanges$:(m=this.interactiveController)==null?void 0:m.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:li,playPrevChapterDisabledTooltip:si,hasInteractiveBranches:!!((_=(v=this.interactiveController)==null?void 0:v.getChapterBranches())!=null&&_.length),additionalButtons:this.uiConfig.features.additionalButtons?pe:[],additionalSettingsMenuItems:le!=null?le:[],additionalContextMenuItems:ue!=null?ue:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:di=>{var rt;return(rt=this.sveltePersistentLayerComponent)==null?void 0:rt.startVideoChangedAnimation(di)},looped:this.uiConfig.features.useLoopSetting?ze:Ei,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId,appTracer:at});let{stores:uo}=this.microStoresRoot=Ob(),po=()=>{var di,rt,ci,Yi,ct,Dt;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(ot=>{var nt;return(nt=me==null?void 0:me.onCurrentFormatChanged)==null?void 0:nt.call(me,ot)})),this.subscription.add(uo.interactiveControlsOpacity$.subscribe(ot=>{var nt;ot!==null&&((nt=this==null?void 0:this.interactiveController)==null||nt.setDisabledControls(ot))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(ot=>{var nt;return(nt=me==null?void 0:me.onThroughputEstimationChanged)==null?void 0:nt.call(me,ot)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(ot=>{var nt;return(nt=me==null?void 0:me.onTrafficSavingEnabledChanged)==null?void 0:nt.call(me,ot)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(ot=>{var nt;return(nt=me==null?void 0:me.onHighQualityEnabledChanged)==null?void 0:nt.call(me,ot)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(ot=>{var nt;return(nt=me==null?void 0:me.onAutoQualityEnabledChanged)==null?void 0:nt.call(me,!!ot)})),this.subscription.add(new mI(ot=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(nt=>ot.next(nt)))}).pipe(hI(1)).subscribe(ot=>{var nt;return(nt=me==null?void 0:me.onCurrentPlaybackRateChanged)==null?void 0:nt.call(me,ot)})),this.subscription.add(this.store.state.volume$.subscribe(ot=>{var nt;return(nt=me==null?void 0:me.onVolumeChange)==null?void 0:nt.call(me,ot)})),this.subscription.add(this.store.state.muted$.subscribe(ot=>{var nt,Ti,Zo,Ao;if(ot)(nt=me==null?void 0:me.onMute)==null||nt.call(me);else{let _t=(Zo=((Ti=this.store)==null?void 0:Ti.state.volume$)&&$e(this.store.state.volume$))!=null?Zo:0;(Ao=me==null?void 0:me.onUnmute)==null||Ao.call(me,_t)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(ot=>{var nt;return(nt=me==null?void 0:me.onVideoBitrateChanged)==null?void 0:nt.call(me,ot)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(ot=>{var nt;let Ti=(nt=this.store)==null?void 0:nt.ui.controls.disabledControls$;Ti&&(ot&&!Ti.includes(yd)&&Ti.add(yd),ot||Ti.remove(yd))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(async ot=>{var nt;if(!Hb.browser.isSamsungBrowser||!ot||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&await this.replayInteractiveChapter((nt=this.videoConfig)==null?void 0:nt.callbacks.onExternalFullscreenExit)})),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(ot=>{var nt;return(nt=me==null?void 0:me.onVSIDChanged)==null?void 0:nt.call(me,ot)})),this.initMediaSession(),D(Gn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:Ae,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Te,thumbUrl:Fe,subtitles:Ot,subtitlesForcedLanguage:Rt,live:Ut,preload:I,autoplay:T,muted:k,volume:R,fromTime:P,canRewindLive:E,supportLink:W,showAds:F,adsSlotId:U,adsParams:Ve,adsAutoplayParam:re,duration:Ct,logoClickable:X,logoHidden:Ie,isMobile:ee!=null?ee:fe,failoverHosts:We,fullScreenTarget:de,saveRate:te,shadowRootContainer:this.shadowRootContainer,showMiniTimer:O,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:xe.nextVideoTitle,endScreenVideoThumb:xe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:ce,showEndScreen:we,showAutoplayNext:Ee,adsExternalApi:Q,adsJson:Me,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let fi={target:this.playerContainer,props:n(Gn)};this.svelteRootComponent=Gr($v,fi),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(ci=(rt=(di=this.videoConfig)==null?void 0:di.callbacks)==null?void 0:rt.onInited)==null||ci.call(rt)),(Yi=this.internalsExposure)==null||Yi.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((Dt=(ct=this.videoConfig)==null?void 0:ct.callbacks)!=null&&Dt.onDevNullLog)?Sc.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Sc.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Hb.isInited$.subscribe(di=>{di&&(console.log("UI SDK async start"),po())}):po()}addPlayerInfoSubscriptions(){var e,i;let o=this.store,r=(e=this.microStoresRoot)==null?void 0:e.stores;if(!o||!r)return;let a=(i=this.videoConfig)==null?void 0:i.callbacks;a&&this.subscription.add(o.playerPhase.subscribe(d=>{var s;return(s=a.onPlayerPhaseChanged)==null?void 0:s.call(a,d)})).add(o.state.playbackState$.subscribe(d=>{var s;return d&&((s=a.onPlaybackStateChanged)==null?void 0:s.call(a,d))})).add(o.state.playbackStateRealistic$.subscribe(d=>{d?this.stateContainer.setAttribute("data-playback-state",d):this.stateContainer.removeAttribute("data-playback-state")})).add(o.state.isLive$.subscribe(d=>{var s;return(s=a.onIsLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isActiveLive$.subscribe(d=>{var s;return(s=a.onIsActiveLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isAudioAvailable$.subscribe(d=>{var s;return(s=a.onIsAudioAvailableChanged)==null?void 0:s.call(a,d)})).add(o.state.currentQuality$.subscribe(d=>{var s;return(s=a.onCurrentQualityChanged)==null?void 0:s.call(a,d)})).add(o.state.availableQualities$.subscribe(d=>{var s;return(s=a.onAvailableQualitiesChanged)==null?void 0:s.call(a,d.map(({value:u})=>u).filter(u=>u!=="auto"))})).add(o.state.availableAudioStreams$.subscribe(d=>{d.length>1&&a.onAudioLanguagesAvailable&&a.onAudioLanguagesAvailable()})).add(r.pictureInPicture$.isActive$.subscribe(d=>{var s,u;return d?(s=a.onPiPEnter)==null?void 0:s.call(a):(u=a.onPiPExit)==null?void 0:u.call(a)}));let l=a==null?void 0:a.uiInfo;l&&this.subscription.add(o.ui.controlsVisible.subscribe(d=>{var s;return(s=l.onControlsVisibleChanged)==null?void 0:s.call(l,d)})).add(o.ui.isMobile.subscribe(d=>{var s;return(s=l.onIsMobileChanged)==null?void 0:s.call(l,d)})).add(o.ui.playerSize.subscribe(d=>{var s;return(s=l.onPlayerSizeChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.prevButton.subscribe(d=>{var s;return(s=l.onPrevButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playButton.subscribe(d=>{var s;return(s=l.onPlayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.replayButton.subscribe(d=>{var s;return(s=l.onReplayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.nextButton.subscribe(d=>{var s;return(s=l.onNextButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playPrevChapterButton.subscribe(d=>{var s;return(s=l.onPlayPrevChapterChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.seekToInteractiveButton.subscribe(d=>{var s;return(s=l.onSeekToInteractiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveGraphButton.subscribe(d=>{var s;return(s=l.onGraphButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.liveButton.subscribe(d=>{var s;return(s=l.onLiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.time.subscribe(d=>{var s;return(s=l.onTimeUpdateChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.episodes.subscribe(d=>{var s;return(s=l.onEpisodesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.subtitles.subscribe(d=>{var s;return(s=l.onSubtitlesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topLeft.subscribe(d=>{var s;return(s=l.onTopLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topRight.subscribe(d=>{var s;return(s=l.onTopRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomLeft.subscribe(d=>{var s;return(s=l.onBottomLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomRight.subscribe(d=>{var s;return(s=l.onBottomRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.middle.subscribe(d=>{var s;return(s=l.onMiddleControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottom.subscribe(d=>{var s;return(s=l.onBottomControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.videoTitleInfo.subscribe(d=>{var s;return(s=l.onTitleChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.settings.subscribe(d=>{var s;return(s=l.onSettingsChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.fullscreen.subscribe(d=>{var s;return(s=l.onFullscreenChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.chromecast.subscribe(d=>{var s;return(s=l.onChromecastChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.pip.subscribe(d=>{var s;return(s=l.onPipChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls["theater-mode-button"].subscribe(d=>{var s;return(s=l.onTheaterModeChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.vkLogo.subscribe(d=>{var s;return(s=l.onVkLogoChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveTimeIndicator.subscribe(d=>{var s;return(s=l.onInteractiveTimeIndicatorChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.timeline.subscribe(d=>{var s;return(s=l.onTimelineChanged)==null?void 0:s.call(l,d)}))}playNextVideo(){this.videoConfig&&(this.currentPlayingVideoIndex++,this.currentPlayingVideoIndex>=this.videoConfig.videos.length&&(this.currentPlayingVideoIndex=0),this.log({message:`play next video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}playPrevVideo(){this.videoConfig&&(this.currentPlayingVideoIndex--,this.currentPlayingVideoIndex<0&&(this.currentPlayingVideoIndex=this.videoConfig.videos.length-1),this.log({message:`play prev video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}createPlayerWithCurrentVideo(e,i=!0){var o;if(!this.videoConfig)return;let r=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!r){this.log({message:"no next video"});return}this.isInited&&Av(r.unitedVideoId)&&((o=this.store)==null||o.actions.internal.nextMovie(r.unitedVideoId)),this.unmountComponent(this.svelteRootComponent),this.createPlayer(r,{autoplay:i,fromTime:0},e)}playPrevChapter(){var e;(e=this.interactiveController)==null||e.playPrevChapter()}seekToInteractive(){var e;let i=(e=this.interactiveController)==null?void 0:e.getNextInteractiveStartTime();typeof i=="number"&&this.seekTime(i/1e3)}async initInteractives(){var e,i,o,r,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=await import("@vkontakte/videoplayer-interactive/es2018");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let s=(i=this.store)==null?void 0:i.interfaceLanguage$,u=s?$e(s):this.videoConfig.interfaceLanguage,{projectInfo:m,initChapterId:p,historyApi:v,videoLoader:_}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:m,initChapterId:p,historyApi:v,vkVideoLoader:_,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,isTouch:this.videoConfig.isTouch,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation,controlsTapPlace:this.uiConfig.features.interactiveControlsTapPlace,controlsFillAnimation:this.uiConfig.features.interactiveControlsFillAnimation,controlsHideAnimation:this.uiConfig.features.interactiveControlsHideAnimation},endChapterHistoryFix:this.uiConfig.features.interactiveHistoryEndChapterFix});let{isInteractiveExpectation$:$,isSeekable$:y}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(y.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($.subscribe(I=>{this.store&&this.store.state.isInteractiveExpectation$.set(I)}));let x=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(I=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]={...I.config,title:(m==null?void 0:m.title)||I.config.title};let T=x?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(I.player,T),x&&(x=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:I,actionType:T})=>{var R,k,P,E,W,F;if(!this.store||!this.microStoresRoot)return;let U=$.getValue();if(I==="action-choice"&&T==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(xd)),I==="action-choice-canceled"){let j=$e(this.store.state.isPlaying$)||U;if(((P=(R=this.videoConfig)==null?void 0:R.isTouch)!=null?P:(k=this.videoConfig)!=null&&k.isMobile)&&j){this.store.ui.interactiveHideMobileControls.set(!0);return}(F=(E=this.videoConfig)==null?void 0:(W=E.callbacks).onDisabledInteractiveClick)==null||F.call(W)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:I,removeAllOpenURI:T})=>{this.store&&I==="container-fake-removed"&&T&&this.store.ui.controls.disabledControls$.remove(xd)})),await this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(r=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&r.onInteractiveHistoryChanged){let I=this.interactiveController.getHistoryState();this.subscription.add(I.history$.subscribe(T=>{var R,k,P;T.length&&((P=(k=(R=this.videoConfig)==null?void 0:R.callbacks)==null?void 0:k.onInteractiveHistoryChanged)==null||P.call(k,T))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(I=>{var T,R,k;(k=(T=this.videoConfig)==null?void 0:(R=T.callbacks).onInteractiveChapterChanged)==null||k.call(R,I.chapter,I.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var I,T,R,k;(I=this.microStoresRoot)==null||I.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(k=(T=this.videoConfig)==null?void 0:(R=T.callbacks).onInteractiveTimeIndicatorClick)==null||k.call(R)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(I=>{this.log({message:I.toString()})}))}catch(d){this.log({message:d.message})}}initPlayer(e,i={}){var o,r,a,l,d,s,u,m,p,v,_,$,y,x,I,T,R,k,P,E,W,F,U,j,re;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let G=new Error("empty videos");this.fatalError$.next(G),(r=(o=e.callbacks)==null?void 0:o.onCrashed)==null||r.call(o,G.message);return}else this.fatalError$.next(null);if(this.videoConfig=gc(wI,uI(e,G=>G instanceof Pv?G:void 0)),(a=this.playerId)!=null||(this.playerId=_I(e.playerId)),this.uiConfig=$h((l=i.ui)!=null?l:{}),this.updatePersistentLayerProps(),this.coreConfig=(d=i.core)!=null?d:{},this.statisticsConfig=(s=i.statistics)!=null?s:{},this.metaConfig=i.meta,this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer&&(this.rootContainer.style.minHeight="unset"),this.style.display="block",this.style.width="100%",this.style.height="100%"),this.videoConfig.playerView==="preview"&&(this.playerContainer.style.contain="none"),this.uiConfig.features.exposeInternalsToGlobal&&((u=this.internalsExposure)!=null||(this.internalsExposure=new gI("ui",this.playerId))),Sc.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:[lI()]}),Av(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(v=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?v:!0),Av(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=($=(_=this.uiConfig.features.pip)!=null?_:this.videoConfig.isPictureInPictureEnabled)!=null?$:!0,this.uiConfig.features.dpip=(x=(y=this.uiConfig.features.dpip)!=null?y:this.videoConfig.isPictureInPictureEnabled)!=null?x:!0),this.uiConfig.ads.paramsOverride={preview:(I=this.uiConfig.ads.preview)!=null?I:this.videoConfig.adsPreviewParam,...this.uiConfig.ads.paramsOverride},this.videoConfig.isTouch=(R=(T=this.uiConfig.isMobile)!=null?T:this.videoConfig.isTouch)!=null?R:this.videoConfig.isMobile,(k=this.videoConfig).autoplay&&(k.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(P=this.uiConfig.ads.enable)!=null?P:this.videoConfig.showAds,this.videoConfig.adsSlotId=(E=this.uiConfig.ads.slot)!=null?E:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((W=this.uiConfig.showLogo)!=null?W:!this.videoConfig.logoHidden),(F=this.videoConfig).canRewindLive&&(F.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(U=this.videoConfig.supportLink)!=null?U:this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=this.uiConfig.features.autoplayNext&&this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=this.uiConfig.features.nextPrevButtons&&this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((j=this.videoConfig.videos)!=null&&j[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let G={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=tp.getLatestSupportedVersion(G):this.pictureInPictureApi=new Ns(G)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new ep:void 0,this.slotsApi=this.uiConfig.features.slots?new ju(this.uiConfig.disabledSlotIds):void 0,this.annotationsApi=this.uiConfig.features.annotations?new ip(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new sp(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]),Lb(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(re=this.slotsApi)==null||re.init(this.shadowRootContainer,this.store)}isOneVideoPlaylist(){return this.videoConfig?this.videoConfig.videos.length===1:!1}updateVideos(e,i){if(!this.videoConfig)return;this.log({message:`update ${i} videos, videos: ${JSON.stringify(e)}`}),i==="prev"?(this.videoConfig.videos.splice(0,this.currentPlayingVideoIndex),this.videoConfig.videos.unshift(...e),this.currentPlayingVideoIndex=e.length):i==="next"&&(this.videoConfig.videos.splice(this.currentPlayingVideoIndex+1),this.videoConfig.videos.push(...e));let o=this.getNextVideoInfo();n(Gn)&&(n(Gn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Gn).nextButtonActive=this.isNextButtonActive(),n(Gn).prevButtonActive=this.isPrevButtonActive(),n(Gn).endScreenVideoTitle=o.nextVideoTitle,n(Gn).endScreenVideoThumb=o.nextVideoThumb,n(Gn).isOneVideoPlaylist=this.isOneVideoPlaylist())}updatePrevVideos(e){this.updateVideos(e,"prev")}updateNextVideos(e){this.updateVideos(e,"next")}initMediaSession(){var e,i;this.mediaSessionApi&&((e=this.unsubscribePlayerPhaseSubscription)==null||e.call(this),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=(i=this.store)==null?void 0:i.playerPhase.subscribe(o=>{o==="video"?this.setupMediaSessionForVideo():o==="ads"&&this.setupMediaSessionForAds()}))}setupMediaSessionForVideo(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let{title:e,thumbUrl:i}={...this.videoConfig.videos[this.currentPlayingVideoIndex]},o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",r=>this.seekTime(r.seekTime)]];this.videoConfig.videos.length>1&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1&&o.push(["nexttrack",()=>{var r,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(r=this.videoConfig)==null?void 0:r.callbacks)==null?void 0:a.onNextVideoClick)==null||l.call(a)}catch(d){this.log({message:"onNextVideoClick callback failed to execute"})}else this.playNextVideo()}]),this.currentPlayingVideoIndex>0&&o.push(["previoustrack",()=>{var r,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(r=this.videoConfig)==null?void 0:r.callbacks)==null?void 0:a.onPrevVideoClick)==null||l.call(a)}catch(d){this.log({message:"onPrevVideoClick callback failed to execute"})}else this.playPrevVideo()}])),this.mediaSessionApi.setMetaData({title:e,thumbUrl:i}),this.mediaSessionApi.updateActionHandlers(o),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}setupMediaSessionForAds(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let e="Реклама",i=[["play",()=>this.play()],["pause",()=>this.pause()]];this.mediaSessionApi.setMetaData({title:e}),this.mediaSessionApi.updateActionHandlers(i),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}moveTo(e){this.shadowDOMCallbacksDisabled=!0,e.append(this),this.shadowDOMCallbacksDisabled=!1}play(){var e,i,o,r;this.isControlDisabled("PLAY_BUTTON")||(e=this.store)!=null&&e.playerPhase.is("LiveWaitingStart")||(i=this.store)!=null&&i.playerPhase.is("LiveWaitingRecover")||(o=this.store)!=null&&o.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),(r=this.svelteRootComponent)==null||r.play())}pause(){var e;this.log({message:"pause"}),(e=this.svelteRootComponent)==null||e.pause()}stop(){var e;if(!this.videoConfig)return;this.log({message:"stop"});let i=!!this.interactiveController;i&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveContainer=void 0,this.interactiveSubscription.unsubscribe()),this.unmountComponent(this.svelteStubComponent),(e=this.mediaSessionApi)==null||e.destroy();let o=this.videoConfig.videos[0];o&&(this.unmountComponent(this.svelteRootComponent),i?(this.videoConfig.autoplay=!1,this.initInteractives()):this.createPlayer(o))}setMuted(e){var i;this.log({message:`set muted, muted: ${e}`}),(i=this.svelteRootComponent)==null||i.setMuted(e)}toggleSubtitle(){var e;this.log({message:"toggle subtitle"}),(e=this.svelteRootComponent)==null||e.toggleSubtitle()}changeSubtitle(e,i){var o;this.log({message:"change subtitle"}),(o=this.svelteRootComponent)==null||o.changeSubtitle(e,i)}hideControls(){var e;this.log({message:"hide controls"}),(e=this.svelteRootComponent)==null||e.hideControls()}showControls(){var e;this.log({message:"show controls"}),(e=this.svelteRootComponent)==null||e.showControls()}setPiPEnabled(e){var i,o;(o=(i=this.store)==null?void 0:i.webApi.pictureInPictureApi)==null||o.setEnabled(e)}setVolume(e){var i;this.log({message:`set volume, volume: ${e}`}),(i=this.svelteRootComponent)==null||i.setVolume(e)}setRepeat(e){this.log({message:`set repeat, repeat: ${e}`}),this.needToRepeatPlaylist=e,n(Gn)&&(n(Gn).needToRepeatPlaylist=this.needToRepeatPlaylist,n(Gn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Gn).nextButtonActive=this.isNextButtonActive(),n(Gn).prevButtonActive=this.isPrevButtonActive())}seekTime(e){var i;this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekTime(e))}seekEpisodeStartTime(e){var i;this.log({message:`seek episode start time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekEpisodeStartTime(e)}returnFocusToEpisodes(){var e;this.log({message:"return focus to episodes button"}),(e=this.svelteRootComponent)==null||e.returnFocusToEpisodes()}setPlaybackRate(e){var i;this.log({message:`set playback rate to: ${e}`}),(i=this.svelteRootComponent)==null||i.setPlaybackRate(e)}setAutoQualityLimits(e){var i,o,r;this.log({message:`set auto quality limitation. Max: ${(i=e.max)!=null?i:"none"}. Min: ${(o=e.min)!=null?o:"none"}`}),(r=this.svelteRootComponent)==null||r.setAutoQualityLimits(e)}setAutoQuality(){var e;(e=this.svelteRootComponent)==null||e.setAutoQuality()}toggleTrafficSaving(e){var i;(i=this.svelteRootComponent)==null||i.toggleTrafficSaving(e)}toggleHighQuality(e){var i;(i=this.svelteRootComponent)==null||i.toggleHighQuality(e)}changeAudioStream(e){var i;(i=this.svelteRootComponent)==null||i.changeAudioStream(e)}addLanguage(e){var i;(i=this.store)==null||i.actions.internal.addLanguage(e)}async setLanguage(e){var i;await((i=this.store)==null?void 0:i.actions.internal.setLanguage(e))}setLiveStart(e){var i,o;let r=this.isLiveTailPlaying();this.log({message:`live started: liveTailPlaying = ${r}`}),r||((i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!1),(o=this.store)==null||o.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){var e;this.log({message:"live waiting"}),(e=this.store)==null||e.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){var e;let i=(e=this.store)==null?void 0:e.getPlayer();if(!i)return!1;let{info:o}=i;return o.canPlayLiveTailBuffer$.getValue()&&!o.isStalled$.getValue()&&!o.atLiveEdge$.getValue()}setLiveWaitingRecover(e=!1){var i;let o=this.isLiveTailPlaying(),r=e||!o;this.log({message:`live waiting recover: forceImmediate = ${e}, liveTailPlaying = ${o}`});let a=()=>{var l;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!0)};r&&a(),(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var l;r||a(),(l=this.store)==null||l.destroy()})}setLiveWaitingRecord(){var e;let i=this.isLiveTailPlaying(),o=!i;this.log({message:`live waiting record: liveTailPlaying = ${i}`});let r=()=>{var a;(a=this.store)==null||a.actions.internal.setLiveWaitingRecord(!0)};o&&r(),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var a;o||r(),(a=this.store)==null||a.destroy()})}setLiveEnd(e){var i;let o=this.isLiveTailPlaying(),r=!o;this.log({message:`live ended: liveTailPlaying = ${o}`});let a=()=>{var l,d;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!1),(d=this.store)==null||d.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};if(r){a();return}(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=a)}setLiveLowLatency(e){var i;this.log({message:"live switch to low latency "+e}),(i=this.store)==null||i.actions.external.setLiveLowLatency(e)}setLooped(e){var i;(i=this.store)==null||i.actions.internal.setLooped(e)}getDebugData(){var e,i;return(i=(e=this.store)==null?void 0:e.actions.internal.getDebugTextData())!=null?i:""}getDeviceId(){var e,i,o;return(o=(i=(e=this.statistics)==null?void 0:e.oneStat)==null?void 0:i.getDeviceId())!=null?o:void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}async replayInteractiveChapter(e){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let r=$e(this.store.state.positionExact$),l=$e(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe(vI()).subscribe(()=>{l&&r>=l.time?this.seekTime(l.time):this.seekTime(r),e==null||e()});let d=this.interactiveController.getCurrentChapter();await this.interactiveController.setChapter({chapterId:(o=d==null?void 0:d.chapter)==null?void 0:o.id,pushToHistory:!1})}}showInteractiveIndicatorTooltip(e,i=!1){var o;(o=this.microStoresRoot)==null||o.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){var e;(e=this.store)==null||e.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}handleTimerNextVideo(e){var i;(i=this.store)==null||i.actions.internal.setTimerNextVideoRunning(e)}togglePictureInPicture(){var e;(e=this.store)==null||e.actions.internal.togglePictureInPicture()}focus(){var e,i,o;(o=(i=(e=this.svelteRootComponent)==null?void 0:e.keyboardControls)==null?void 0:i.focus)==null||o.call(i)}restoreFocus(){var e;(e=this.focusManager)==null||e.restoreFocus()}handleExternalKeyboardEvent(e){var i,o;return!!((o=(i=this.svelteRootComponent)==null?void 0:i.keyboardControls)!=null&&o.handleExternalKeyboardEvent(e))}setAutoplayNext(e){var i;(i=this.store)==null||i.actions.internal.setAutoplayNextEnabled(e)}getTotalViewTime(){var e,i;return(i=(e=this.statistics)==null?void 0:e.thinOneStat)==null?void 0:i.getTotalViewTime()}unmountComponent(e){e&&Aa(e)}};import{InterfaceLanguage as moe,VKNumericLanguage as voe,loadVKLangPack as goe}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as _oe,VideoFormat as boe}from"@vkontakte/videoplayer-core/es2018";var soe=()=>{window.customElements.define("vk-video-player",ap)};export{Hu as ControlButtonType,ms as GridTypes,moe as InterfaceLanguage,Md as MenuItemType,vs as PlayerPhase,Al as VERSION,voe as VKNumericLanguage,boe as VideoFormat,_oe as VideoQuality,goe as loadVKLangPack,soe 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(f,p)};M(d,f=>{e.type==="off"?f(s):f(u,!1)})}b(r,l)},$$slots:{default:!0}}),H()}function em(t,e){B(e,!0);let i=g(e,"isSubtitlesEnabled",3,!1),r=xe().ui.t,a=m(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));Ot(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 s=m(()=>i()?void 0:"outline");ua(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),H()}var Sy=L('<span class="duration s-23" data-testid="video_duration"> </span>'),Cy=L('<div data-testid="time"><span class="current s-23" data-testid="current_time"> </span> <!></div>'),Ty={hash:"s-23",code:'.time.s-23{align-items:center;color:var(--controls-time);display:flex;font-variant-numeric:tabular-nums;font-weight:500;padding:12px 6px}.time.mobile.s-23{padding:0 0 0 8px}.current.s-23{position:relative}.duration.s-23{opacity:.7}.duration.s-23:before{content:" / ";white-space:pre}'};function Qd(t,e){B(e,!0),Q(t,Ty);let i=g(e,"isMobile",3,!1),o=g(e,"isHidden",3,!1),r=g(e,"showDuration",3,!0),a=g(e,"ref",15),l=At(),d=se(!1),s=m(()=>Ko(e.duration)),u=m(()=>Ko(e.position));var f=Cy();let p;var v=C(f),_=C(v,!0);S(v);var y=A(v,2);{var $=x=>{var I=Sy(),T=C(I,!0);S(I),N(()=>he(T,n(s))),b(x,I)};M(y,x=>{r()&&x($)})}S(f),Vs(f,()=>Ml(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),tt(f,x=>a(x),()=>a()),N(x=>{p=te(f,1,"time s-23",null,p,x),he(_,n(u))},[()=>({mobile:i()})]),b(t,f),H()}import{noop as Ru}from"@vkontakte/videoplayer-shared/es2018";var Iy=Ae('<path d="M21.8632 10.0832C22.2147 9.73171 22.7852 9.73171 23.1367 10.0832C23.4881 10.4347 23.4881 11.0051 23.1367 11.3566L18.6367 15.8566C18.2852 16.2081 17.7147 16.2081 17.3632 15.8566C17.0117 15.5051 17.0117 14.9347 17.3632 14.5832L21.8632 10.0832Z"></path><path d="M17.3632 11.3566C17.0117 11.0051 17.0117 10.4347 17.3632 10.0832C17.7147 9.73171 18.2852 9.73171 18.6367 10.0832L23.1367 14.5832C23.4881 14.9347 23.4881 15.5051 23.1367 15.8566C22.7852 16.2081 22.2147 16.2081 21.8632 15.8566L17.3632 11.3566Z"></path>',1),Ey=Ae("<path></path>"),Py=Ae('<path d="M14 3C14.5523 3 15 3.44772 15 4V20C15 20.5523 14.5523 21 14 21C13.3585 21 12.7422 20.7509 12.2808 20.3052L6.79013 15H4C2.89543 15 2 14.1046 2 13V11C2 9.89543 2.89543 9 4 9H6.765L12.2794 3.6934C12.7418 3.24852 13.3584 3 14 3Z"></path><!>',1);function pa(t,e){B(e,!0);let i=g(e,"volume",3,1),o=g(e,"muted",3,!1),r=(u,f)=>f?"off":u>.5?"max":u>.2?"mid":u>0?"min":"off",a=m(()=>r(i(),o())),l=m(()=>sn(e.size)),d="M16.8748 8.85259C17.2324 8.50731 17.8021 8.51726 18.1474 8.87481C18.5465 9.28803 18.8614 9.77691 19.0757 10.3128C19.2901 10.8486 19.4 11.4218 19.4 12C19.4 12.5782 19.2901 13.1514 19.0757 13.6872C18.8614 14.2231 18.5465 14.712 18.1474 15.1252C17.8021 15.4827 17.2324 15.4927 16.8748 15.1474C16.5173 14.8021 16.5073 14.2324 16.8526 13.8748C17.0876 13.6314 17.2757 13.3408 17.4045 13.0187C17.5333 12.6966 17.6 12.3504 17.6 12C17.6 11.6496 17.5333 11.3034 17.4045 10.9813C17.2757 10.6592 17.0876 10.3686 16.8526 10.1252C16.5073 9.76764 16.5173 9.19788 16.8748 8.85259Z",s="M19.2636 6.2636C19.6151 5.91213 20.1849 5.91213 20.5364 6.2636C21.2516 6.97878 21.9929 7.99659 22.3989 8.97678C22.7959 9.93525 23.0003 10.9625 23.0003 12C23.0003 13.0374 22.7959 14.0647 22.3989 15.0232C21.9929 16.0034 21.2516 17.0212 20.5364 17.7364C20.1849 18.0879 19.6151 18.0879 19.2636 17.7364C18.9121 17.3849 18.9121 16.8151 19.2636 16.4636C19.8484 15.8788 20.4384 15.0527 20.7359 14.3343C21.0425 13.5943 21.2003 12.801 21.2003 12C21.2003 11.1989 21.0425 10.4057 20.7359 9.66561C20.4384 8.94724 19.8484 8.12124 19.2636 7.5364C18.9121 7.18492 18.9121 6.61508 19.2636 6.2636Z";Ye(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=Py(),v=A(le(p));{var _=$=>{var x=Iy();Yt(),b($,x)},y=$=>{var x=Ey();N(()=>De(x,"d",`${d}${n(a)==="max"?s:""}`)),b($,x)};M(v,$=>{n(a)==="off"?$(_):$(y,!1)})}b(u,p)},$$slots:{default:!0}}),H()}import{isNonNullable as D_,noop as jn}from"@vkontakte/videoplayer-shared/es2018";import{noop as im}from"@vkontakte/videoplayer-shared/es2018";import{noop as ky}from"@vkontakte/videoplayer-shared/es2018";var Ay=L('<div class="overlay"><!></div>');function tm(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(l,"$overlayContainer$",i),l=xe().ui.overlayContainer$,d=K(void 0),s=v=>{!v||!n(d)||!v.contains(n(d))||v.removeChild(n(d))},u=v=>{!v||!n(d)||v.contains(n(d))||v.appendChild(n(d))};He(()=>{u(r())}),Pt(()=>(u(r()),()=>s(r())));var f=Ay(),p=C(f);Xt(p,()=>{var v;return(v=e.children)!=null?v:_t}),S(f),tt(f,v=>D(d,v),()=>n(d)),b(t,f),H(),o()}var Ly=L('<div class="tooltip s-1o"><div class="content s-1o"> </div> <div class="tooltip-pointer s-1o"></div></div>'),My=L("<div><!></div> <!>",1),Vy={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 Fa(t,e){B(e,!0),Q(t,Vy);let[i,o]=Be(),r=()=>w(Y,"$overlayContainer$",i),a=()=>w(z,"$containerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"content",3,""),s=g(e,"active",15,!1),u=g(e,"translateX",3,0),f=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,ky),$=5,x=K(void 0),I=K(void 0),T,R=K(0),k=K(0),P=K(0),E=K(0),W=At(),U=xe(),z=U.ui.playerSize,Y=U.ui.overlayContainer$;He(()=>{Tt(()=>{y()(s())})});let ie=U.getLogger().createComponentLog("Tooltip component"),J=j=>{if(!r()||!n(I)||!n(x))return;D(k,$);let ne=r().getBoundingClientRect(),Se=n(x).getBoundingClientRect(),Le=Se.width,ze=n(I).clientWidth,Ce=a().width,we=(Le-ze)/2,Fe=Se.left+u()-ne.left,nt=Fe+we,ct=Se.top+f()-ne.top,kt=ze/2-$,at=nt<8,ti=nt+ze>Ce-8;j==="top-left"&&(nt=Fe),at&&(nt=8,kt=Fe+Se.width/2-2.5*$),ti&&(nt=Ce-8-ze,kt=Se.left-ne.left+Se.width/2-nt-$),D(P,nt,!0),D(E,ct),D(R,kt,!0)},oe=()=>{!r()||!n(I)||!n(x)||D(k,-$)},de=()=>{if(!r()||!n(I)||!n(x))return;D(R,$);let j=r().getBoundingClientRect(),ne=n(x).getBoundingClientRect(),Se=ne.height,Le=n(I).clientHeight,ze=(Se-Le)/2+Le,Ce=ne.left+u()-j.left-n(I).clientWidth,we=2,Fe=Ce-$;Fe<8&&(Fe=8);let ct=ne.top+f()-j.top+ze,kt=we-ze/2,at=we-$;D(P,Fe,!0),D(E,ct),D(k,kt),D(R,at)},ae=()=>{!r()||!n(I)||!n(x)||D(R,-$)},pe=()=>{switch(_()){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(!r()||!n(x))return;pe(),s(!0)}catch(j){ie({message:String(j)})}},$e=()=>{s(!1)},Ee=()=>{n(I)&&(T||(T=window.setTimeout(ee,W.controls.hideTimeoutTooltips)),s()&&ee())},ce=()=>{$e(),window.clearTimeout(T),T=void 0},Qe=(j,ne,Se)=>{let Le="";switch(_()){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(_()){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),s())),X=m(()=>fe(n(R),n(k)));Pt(pe),rn(()=>window.clearTimeout(T));var O=My(),me=le(O);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);Xt(Re,()=>{var j;return(j=e.children)!=null?j:_t}),S(me),tt(me,j=>D(x,j),()=>n(x));var Ze=A(me,2);{var ke=j=>{tm(j,{children:(ne,Se)=>{var Le=Ly(),ze=C(Le),Ce=C(ze,!0);S(ze);var we=A(ze,2);S(Le),tt(Le,Fe=>D(I,Fe),()=>n(I)),N(()=>{Ke(Le,n(ve)),he(Ce,d()),Ke(we,n(X))}),b(ne,Le)},$$slots:{default:!0}})};M(Ze,j=>{d()&&!l()&&j(ke)})}N(j=>ue=te(me,1,"tooltip-wrapper s-1o",null,ue,j),[()=>({"full-width":p()})]),mt("pointerenter",me,Ee),mt("pointerleave",me,ce),b(t,O),H(),o()}Xe(["pointermove","pointerdown","pointerup"]);var R_=t=>{t.stopPropagation()},Ry=L("<div><!></div>"),Dy={hash:"s-1k",code:".btn-container.s-1k{align-items:center;display:flex;height:100%;position:relative;transition:var(--button-hover-transition);will-change:opacity;-webkit-tap-highlight-color:transparent}.w-max.s-1k{min-width:0;width:100%}"};function Co(t,e){B(e,!0),Q(t,Dy);let[i,o]=Be(),r=()=>w(u,"$isGraphOpened$",i),a=()=>w(s,"$isMobile",i),l=xe(),d=go(),s=l.ui.isMobile,u=d.graphIsOpened$,f=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),$=g(e,"width",15,void 0),x=g(e,"isFullWidthTooltip",3,!0),I=g(e,"tooltipContent",3,""),T=g(e,"tooltipVisible",3,!1),R=g(e,"tooltipPlacement",3,"top"),k=g(e,"disabledTooltipContent",19,()=>f("tooltip_button_disabled")),P=g(e,"isAriaHidden",3,!1),E=g(e,"onTooltipVisibilityChange",3,im),W=g(e,"initialTranslateXPx",3,0),U=g(e,"initialTranslateYPx",19,()=>-18),z=g(e,"mouseEnter",3,im),Y=g(e,"mouseLeave",3,im),ie=m(()=>v()?r()?f("tooltip_disabled_when_graph_on"):k():I()),J=K(!1);He(()=>{T()||D(J,!1)});var oe=Ry();oe.__pointerdown=[R_],oe.__click=[R_];var de=C(oe);{var ae=ee=>{Fa(ee,{get content(){return n(ie)},get translateX(){return W()},get translateY(){return U()},get isFullWidthWrapper(){return x()},get placement(){return R()},get onVisibilityChange(){return E()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(J)},set active($e){D(J,$e,!0)},children:($e,Ee)=>{var ce=Ve(),Qe=le(ce);Xt(Qe,()=>{var fe;return(fe=e.children)!=null?fe:_t}),b($e,ce)},$$slots:{default:!0}})},pe=ee=>{var $e=Ve(),Ee=le($e);Xt(Ee,()=>{var ce;return(ce=e.children)!=null?ce:_t}),b(ee,$e)};M(de,ee=>{_()&&n(ie)&&!a()?ee(ae):ee(pe,!1)})}S(oe),tt(oe,ee=>y(ee),()=>y()),N(()=>{var ee;te(oe,1,`btn-container ${(ee=p())!=null?ee:""}`,"s-1k"),De(oe,"aria-hidden",P()||null)}),mt("mouseenter",oe,function(...ee){var $e;($e=z())==null||$e.apply(this,ee)}),mt("mouseleave",oe,function(...ee){var $e;($e=Y())==null||$e.apply(this,ee)}),kn(oe,"clientWidth",$),b(t,oe),H(),o()}Xe(["pointerdown","click"]);var Ny=Ae('<rect width="20" height="20" rx="10"></rect><path d="m12.53 8.69.06.19-.22-.64a.83.83 0 0 0-1.6.47l.13.48-.23-.85a.82.82 0 0 0-1.6.24l-.73-2.93a.85.85 0 0 0-1.65.4L8 11.34l-1.12-1.16a.8.8 0 0 0-1.21 1.03l2.23 2.94s1.23 1.83 4.3 1.23c2.43-.48 3.25-2.67 2.58-4.88l-.55-2.3a.88.88 0 1 0-1.7.49"></path>',1);function qd(t,e){let i=m(()=>(e.completed,"interactive-episode-completed-icon"));Ye(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,r)=>{var a=Ny(),l=le(a),d=A(l);N(()=>{De(l,"fill",ra),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 Oy=L("<div><!></div>"),By={hash:"s-15",code:".interactive-episode-icon.s-15{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-15{opacity:.4;pointer-events:none}"};function om(t,e){B(e,!0),Q(t,By);let o=xe().ui.t,r=K(0),a=m(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Co(t,{get tooltipContent(){return n(a)},initialTranslateXPx:-10,initialTranslateYPx:-10,get disabled(){return e.disabled},get width(){return n(r)},isAriaHidden:!0,isFullWidthTooltip:!1,children:(l,d)=>{var s=Oy();let u;var f=C(s);let p=m(()=>!!e.videoEpisode.completed);qd(f,{get completed(){return n(p)}}),S(s),N(v=>{u=te(s,1,"interactive-episode-icon s-15",null,u,v),Ke(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),kn(s,"clientWidth",v=>D(r,v)),b(l,s)},$$slots:{default:!0}}),H()}var Hy=L('<div><div class="video-episode-inner s-16"><div class="video-episode-loaded s-16"></div> <div></div></div></div>'),Fy=L('<div class="video-episodes-wrap s-16"></div>'),Uy={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 nm(t,e){Q(t,Uy);let i=g(e,"videoEpisodes",19,()=>[]);var o=Fy();_i(o,21,i,r=>r.from,(r,a)=>{var l=Hy();let d;var s=C(l),u=C(s),f=A(u,2);let p;S(s),S(l),N((v,_)=>{d=te(l,1,"video-episode s-16",null,d,v),Ke(l,`left: ${n(a).from}%; width: ${n(a).width}%`),Ke(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),p=te(f,1,"video-episode-filled s-16",null,p,_),Ke(f,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),b(r,l)}),S(o),b(t,o)}function zy(t,e,i,o,r,a,l){if(t.preventDefault(),e()&&D(i,e().getBoundingClientRect(),!0),o()||n(r)||!e())return;D(r,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function Wy(t,e,i,o,r,a,l,d){if(t.preventDefault(),e())return;let s=i(t.clientX,t.clientY),u=o(t.clientX);r()(s,u,n(a).width,t),n(l)&&d()(s)}function Ky(t,e,i,o,r){if(t.preventDefault(),e()||!n(i))return;D(i,!1);let a=o(t.clientX,t.clientY);r()(a,t)}function Qy(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function qy(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),D(r,!1),a()(l)}var Gy=L("<div></div>"),Yy=L('<div class="bars s-t"><div class="loaded s-t"></div> <div></div></div>'),jy=L('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),Xy={hash:"s-t",code:'.interactive-icons.s-t{position:absolute;top:-28px;width:calc(100% - 20px)}.interactive-icons.mobile.s-t{top:-10px}.slider.s-t{border-radius:var(--slider-radius);cursor:pointer;height:var(--slider-height);position:relative;touch-action:none;transition:opacity .2s;width:100%;will-change:opacity,transform;-webkit-tap-highlight-color:transparent}.no-handle.s-t{cursor:default}.slider.s-t:before{content:"";height:calc(var(--controls-height)/2);left:0;position:absolute;right:0;top:calc((var(--controls-height)/2 - var(--slider-height))*-1/2)}.bars.s-t{background:var(--slider-bg);overflow:hidden}.bars.s-t,.loaded.s-t{border-radius:var(--slider-radius);height:100%;position:absolute;width:100%}.loaded.s-t{background:var(--slider-loaded-bg);left:-100%;transition:transform .2s;will-change:transform}.filled.s-t{background-color:var(--slider-filled-bg);border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.slider.square.s-t,.slider.square.s-t .filled:where(.s-t),.slider.square.s-t .loaded:where(.s-t),.slider.square.s-t>.bars:where(.s-t){border-radius:unset}.filled.active-live.s-t{background-color:var(--timeline-slider-filled-active-live-bg)}.filled.ads.s-t{background-color:var(--slider-filled-ads)}.handleWrap.s-t{left:-100%;position:absolute;width:100%}.handle.s-t{background-color:var(--slider-handle-bg);border-radius:50%;height:var(--slider-handle-size);opacity:0;position:absolute;right:calc(var(--slider-handle-size)*-1/2);top:calc((var(--slider-height) - var(--slider-handle-size))/2);transform:scale(0);transition:opacity .2s,transform .2s;visibility:hidden;width:var(--slider-handle-size);will-change:opacity,transform}.handle.active-live.s-t{background-color:var(--timeline-slider-handle-active-live-bg)}.handle-always-visible.s-t .handle:where(.s-t),.slider-dragging.s-t .handle:where(.s-t),.slider.s-t:hover .handle:where(.s-t){opacity:1;transform:scale(1);visibility:visible}.slider-dragging.s-t .handle:where(.s-t){transform:scale(1.3)}.slider-vertical.s-t{left:-8px;position:absolute;top:-18px;transform:rotate(-90deg);transform-origin:0 0}.slider.disabled.s-t{cursor:default;opacity:.4}'};function Ua(t,e){B(e,!0),Q(t,Xy);let i=g(e,"ref",15,void 0),o=g(e,"className",3,""),r=g(e,"testId",3,void 0),a=g(e,"isHidden",3,!1),l=g(e,"isVertical",3,!1),d=g(e,"isActiveLive",3,!1),s=g(e,"isMobile",3,!1),u=g(e,"squareBorders",3,!1),f=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),$=g(e,"onPointerDown",3,jn),x=g(e,"onHandleMove",3,jn),I=g(e,"onPointerUp",3,jn),T=g(e,"onPointerEnter",3,jn),R=g(e,"onPointerMove",3,jn),k=g(e,"onPointerLeave",3,jn),P=g(e,"onMouseEnter",3,jn),E=g(e,"onMouseLeave",3,jn),W=g(e,"onWheelUp",3,jn),U=g(e,"onWheelDown",3,jn),z=g(e,"onWheelLeft",3,jn),Y=g(e,"onWheelRight",3,jn),ie=g(e,"onDisabledClick",3,jn),J=g(e,"loadedProgress",3,0),oe=g(e,"filledProgress",3,0),de=g(e,"handleProgress",3,0),ae=g(e,"ariaLabel",3,""),pe=g(e,"ariaValueMin",3,void 0),ee=g(e,"ariaValueMax",3,void 0),$e=g(e,"ariaValueNow",3,void 0),Ee=g(e,"ariaValueText",3,""),ce=g(e,"onContextMenu",3,jn),Qe=g(e,"handleAlwaysVisible",3,!1),fe=At(),ve=K(void 0),X=K(!1),O=m(()=>{var be;return(be=ee())!=null?be:0}),me=m(()=>{var be;return D_(f())&&((be=f()[f().length-1])==null?void 0:be.time)<n(O)}),ue=m(()=>D_(f())&&f().length&&n(me)&&n(O)?ze(J()*100,oe()*100):[]);function Re(be){if(be.preventDefault(),i()&&D(ve,i().getBoundingClientRect(),!0),_())return;let Ne=Se(be.clientX,be.clientY),Ie=Le(be.clientX);T()(Ne,Ie,n(ve).width)}function Ze(be){be.preventDefault(),!_()&&k()()}function ke(){P()()}function j(){E()()}function ne(be){_()||p()&&(be.preventDefault(),be.deltaY<0?W()():be.deltaY>0?U()():be.deltaX>0?Y()():z()())}function Se(be,Ne){return l()?Math.max(0,Math.min(1,(n(ve).height-(Ne-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,Ne){let Ie=fe.features.episodesClustering&&!v()?fe.episodeMinWidthPc:0,gt=[],ye=f()[0].time/n(O)*100,qe=0,Ue=0;for(let It=1;It<f().length;It++)qe=f()[It].time/n(O)*100,qe-ye>Ie&&(gt.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,Ne)-ye),interactive:f()[It-1].interactive,completed:f()[It-1].completed}),ye=f()[It].time/n(O)*100,Ue++);let rt={from:ye,width:Math.max(0,100-ye),loadedWidth:Math.max(0,Math.min(be,100)-ye),filledWidth:Math.max(0,Math.min(Ne,100)-ye),interactive:f()[Ue].interactive,completed:f()[Ue].completed};100-ye<Ie?(Ue-=1,gt[Ue].width+=100-ye,gt[Ue].loadedWidth+=Math.max(0,Math.min(be,100)-ye),gt[Ue].filledWidth+=Math.max(0,Math.min(Ne,100)-ye)):gt[Ue]=rt;let Kt=f()[0].time;if(Kt!==0){let It=Kt/n(O)*100;gt.unshift({from:0,width:It,loadedWidth:Math.min(It,be),filledWidth:Math.min(It,Ne)})}return gt}function Ce(be){return Math.max(0,Math.min(100,be*100))}let we=m(()=>Ce(J())),Fe=m(()=>Ce(oe()));var nt=jy(),ct=le(nt);{var kt=be=>{var Ne=Gy();let Ie;_i(Ne,21,()=>n(ue),gt=>gt.from,(gt,ye)=>{var qe=Ve(),Ue=le(qe);{var rt=Kt=>{om(Kt,{get videoEpisode(){return n(ye)},get disabled(){return _()}})};M(Ue,Kt=>{n(ye).interactive&&Kt(rt)})}b(gt,qe)}),S(Ne),N(gt=>Ie=te(Ne,1,"interactive-icons s-t",null,Ie,gt),[()=>({mobile:s(),hidden:s()&&!n(X)})]),b(be,Ne)};M(ct,be=>{v()&&be(kt)})}var at=A(ct,2);let ti;at.__pointerdown=[zy,i,ve,_,X,Se,$],at.__pointermove=[Wy,_,Se,Le,R,ve,X,x],at.__pointerup=[Ky,_,X,Se,I],at.__click=[Qy,_,ie,Se],at.__contextmenu=[qy,Se,_,ie,X,ce];var yt=C(at);{var Mt=be=>{nm(be,{get videoEpisodes(){return n(ue)},get disabled(){return _()},get isMobile(){return s()}})},Vt=be=>{var Ne=Yy(),Ie=C(Ne),gt=A(Ie,2);let ye;S(Ne),N(qe=>{De(Ie,"data-value",n(we)),Ke(Ie,`transform: translateX(${n(we)}%);`),ye=te(gt,1,"filled s-t",null,ye,qe),De(gt,"data-value",n(Fe)),Ke(gt,`transform: translateX(${n(Fe)}%);`)},[()=>({"active-live":d()})]),b(be,Ne)};M(yt,be=>{n(ue).length?be(Mt):be(Vt,!1)})}var Wt=A(yt,2);let Te;var G=C(Wt);let Oe;S(Wt),S(at),tt(at,be=>i(be),()=>i()),N((be,Ne,Ie,gt)=>{var ye,qe;ti=te(at,1,`slider ${(ye=o())!=null?ye:""}`,"s-t",ti,be),De(at,"aria-label",ae()),De(at,"aria-valuemin",pe()),De(at,"aria-valuemax",ee()),De(at,"aria-valuenow",$e()),De(at,"aria-valuetext",Ee()),De(at,"data-testid",(qe=r())!=null?qe:null),Te=te(Wt,1,"handleWrap s-t",null,Te,Ne),Ke(Wt,Ie),Oe=te(G,1,"handle s-t",null,Oe,gt)},[()=>({disabled:_(),"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()})]),mt("pointerenter",at,Re),mt("pointerleave",at,Ze),mt("mouseenter",at,ke),mt("mouseleave",at,j),mt("wheel",at,ne),b(t,nt),H()}Xe(["pointerdown","pointermove","pointerup","click","contextmenu"]);var io=(t,e)=>Ad[t]>=Ad[e];var Os=(t,e)=>Ad[t]<=Ad[e],N_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var Jy=L("<div><!></div>"),ex=L("<div><!> <!></div>"),tx={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 rm(t,e){var Le,ze;B(e,!0),Q(t,tx);let[i,o]=Be(),r=()=>w(R,"$isAudioAvailable$",i),a=()=>w(v,"$muted$",i),l=()=>w(p,"$volume$",i),d=()=>w(x,"$currentGridType$",i),s=()=>w(Re,"$controlsVisible",i),u=xe(),f=At(),p=u.state.volume$,v=u.state.muted$,{setVolume:_,startVolumeChanging:y,stopVolumeChanging:$}=u.actions.internal,x=u.ui.currentGridType$,I=(Le=u.callbacks)==null?void 0:Le.onAudioDoesNotExistHint,T=(ze=u.callbacks)==null?void 0:ze.onAudioDisabledHint,R=u.state.isAudioAvailable$,k=u.state.isAudioDisabled,P=u.ui.t,E=K(!1),W,U=m(()=>e.isAds||r()),z=m(()=>!n(U)||a()||l()===0),Y=m(()=>Os(d(),"l")),ie=m(()=>n(Y)?"":n(z)?!r()||k?P("tooltip_sound_unavailable"):P("tooltip_volume"):P("tooltip_volume_muted")),J=m(()=>n(z)?P("tooltip_volume"):P("tooltip_volume_muted")),oe=m(()=>n(z)?0:l()),de=!1,ae=m(()=>e.isAds?!1:k?!T:r()?!1:!I);function pe(Ce){y(),_(Ce)}function ee(){ku(u,l(),f.controls.volumeStepWheel)}function $e(){Lu(u,l(),f.controls.volumeStepWheel)}function Ee(Ce){_(Ce)}function ce(Ce){_(Ce),$()}function Qe(){de=!0}function fe(){de=!1,O()}function ve(){clearTimeout(W),D(E,!0)}function X(){O()}function O(){W=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;He(()=>{s()||D(ue,!1)});var Ze=ex();let ke;var j=C(Ze);Fa(j,{get content(){return n(ie)},translateY:-18,get active(){return n(ue)},set active(Ce){D(ue,Ce,!0)},children:(Ce,we)=>{let Fe=m(()=>n(Y)?"btn-volume-vertical":"btn-volume-horizontal");Ot(Ce,{className:"btn-full-opacity",get disabled(){return n(ae)},get testId(){return n(Fe)},get ariaLabel(){return n(J)},get click(){return e.click},get ariaKeyShortCut(){return hs.KeyM},role:"button",children:(nt,ct)=>{pa(nt,{get size(){return"24"},get volume(){return l()},get muted(){return n(z)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var ne=A(j,2);{var Se=Ce=>{var we=Jy();let Fe;var nt=C(we);let ct=m(()=>n(Y)?"volumeBar-slider-vertical":""),kt=m(()=>n(Y)&&!n(E)),at=m(()=>n(Y)?Qe:Ru),ti=m(()=>n(Y)?fe:Ru),yt=m(()=>Math.round(n(oe)*100)),Mt=m(()=>`${Math.round(n(oe)*100)}%`),Vt=m(()=>n(Y)?"volume-slider-vertical":"volume-slider");Ua(nt,{get className(){return n(ct)},get isHidden(){return n(kt)},get isVertical(){return n(Y)},withWheelHandler:!0,onWheelUp:ee,onWheelDown:$e,onPointerDown:pe,onHandleMove:Ee,onPointerUp:ce,get onPointerEnter(){return n(at)},get onPointerLeave(){return n(ti)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(yt)},get ariaValueText(){return n(Mt)},get filledProgress(){return n(oe)},get handleProgress(){return n(oe)},get testId(){return n(Vt)}}),S(we),N(Wt=>Fe=te(we,1,"volumeBar s-27",null,Fe,Wt),[()=>({"volumeBar-vertical":n(Y)})]),b(Ce,we)};M(ne,Ce=>{n(U)&&Ce(Se)})}S(Ze),N(Ce=>ke=te(Ze,1,"volumeBar-container s-27",null,ke,Ce),[()=>({vertical:n(Y)})]),mt("mouseenter",Ze,function(...Ce){var we;(we=n(Y)?ve:Ru)==null||we.apply(this,Ce)}),mt("mouseleave",Ze,function(...Ce){var we;(we=n(Y)?X:Ru)==null||we.apply(this,Ce)}),mt("wheel",Ze,me),b(t,Ze),H(),o()}import{noop as nx}from"@vkontakte/videoplayer-shared/es2018";var ix=Ae('<path d="M4.58 13.98a1 1 0 0 1 .99-1h4.45a1 1 0 0 1 1 1v4.45a.99.99 0 0 1-1.99 0v-2.05L5.71 19.7a1 1 0 1 1-1.41-1.4l3.32-3.32H5.57a1 1 0 0 1-.99-1m10.39-6.36 3.32-3.32a1 1 0 1 1 1.41 1.4l-3.32 3.32h2.05a.99.99 0 0 1 0 1.98H14a1 1 0 0 1-1-1V5.57a.99.99 0 1 1 1.98 0z"></path>'),ox=Ae('<path d="M10.5 19a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-4.5a1 1 0 0 1 2 0v2.07l3.36-3.36a1 1 0 0 1 1.42 0l.01.01a1 1 0 0 1 0 1.42L7.43 18H9.5a1 1 0 0 1 1 1M18 7.43l-3.36 3.36a1 1 0 0 1-1.42 0l-.01-.01a1 1 0 0 1 0-1.42L16.57 6H14.5a1 1 0 0 1 0-2H19a1 1 0 0 1 1 1v4.5a1 1 0 0 1-2 0z"></path>');function sm(t,e){let i=g(e,"isFullscreen",8,!1),o=mr(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");Ye(t,{get testId(){return n(o)},children:(r,a)=>{var l=Ve(),d=le(l);{var s=f=>{var p=ix();b(f,p)},u=f=>{var p=ox();b(f,p)};M(d,f=>{i()?f(s):f(u,!1)})}b(r,l)},$$slots:{default:!0}})}function Gd(t,e){B(e,!0);let i=g(e,"isFullscreen",3,!1),o=g(e,"click",3,nx),r=xe(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=m(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));Ot(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let f=da(u);a.set(f),o()()},get ariaKeyShortCut(){return hs.KeyF},role:"button",children:(u,f)=>{sm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),H()}var rx=Ae('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.26 4.26C3 5.54 3 7.57 3 11.65v.72c0 4.07 0 6.11 1.26 7.38C5.54 21 7.57 21 11.65 21h.72c4.07 0 6.11 0 7.38-1.26C21 18.47 21 16.43 21 12.36v-.72c0-4.07 0-6.11-1.26-7.38C18.47 3 16.43 3 12.36 3h-.72C7.57 3 5.53 3 4.26 4.26M6 8.5c.1 4.68 2.56 7.5 6.61 7.5h.24v-2.68c1.47.15 2.57 1.25 3.02 2.68H18a6 6 0 0 0-3-3.76 5.7 5.7 0 0 0 2.55-3.74h-1.94c-.4 1.49-1.61 2.84-2.77 2.97V8.5h-1.96v5.2c-1.2-.3-2.76-1.76-2.83-5.2z" clip-rule="evenodd"></path></svg>');function am(t,e){let i=Ln(e,["$$slots","$$events","$$legacy","children"]);var o=rx();to(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"vk-logo-icon",role:"img",...i}));var r=C(o);Xt(r,()=>{var a;return(a=e.children)!=null?a:_t}),Yt(),S(o),b(t,o)}var sx=Ae('<svg><!><svg data-logo="vk_video"><path d="M7 8.6c0-1.96 0-2.94.38-3.69a3.5 3.5 0 0 1 1.53-1.53C9.66 3 10.64 3 12.6 3h1.36c2.46 0 3.7 0 4.64.48a4.4 4.4 0 0 1 1.92 1.92c.48.94.48 2.18.48 4.64v3.92c0 2.46 0 3.7-.48 4.64a4.4 4.4 0 0 1-1.92 1.92c-.94.48-2.18.48-4.64.48H12.6c-1.96 0-2.94 0-3.69-.38a3.5 3.5 0 0 1-1.53-1.53C7 18.34 7 17.36 7 15.4zm9.26 1.74c.9.54 1.36.81 1.51 1.16.13.3.13.65 0 .96-.15.34-.6.61-1.5 1.15l-2.4 1.43c-.93.56-1.4.84-1.8.8-.33-.03-.64-.2-.84-.48-.23-.31-.23-.86-.23-1.96v-2.85c0-1.1 0-1.64.23-1.96q.31-.42.85-.48c.38-.04.86.25 1.8.8zM5 9.04c0-2.46 0-3.7.48-4.64q.37-.71.95-1.25-.58.1-1.03.33A4.4 4.4 0 0 0 3.48 5.4C3 6.34 3 7.58 3 10.04v3.92c0 2.46 0 3.7.48 4.64a4.4 4.4 0 0 0 1.92 1.92q.45.23 1.03.33a4 4 0 0 1-.95-1.25C5 18.66 5 17.42 5 14.96z"></path></svg><svg x="4" y="3" data-logo="play_market"><path d="M0 1.26v15.47q0 .66.34 1L9.52 9 .33.28C.08.53 0 .92 0 1.26"></path><path d="M.33.28.38.23c.34-.3.89-.32 1.49 0l10.75 5.81-2.6 2.48zm10.29 8.75 2.88 2.45-.53.29-.34.18-2.58-2.44-9.71 8.22c.33.34.9.37 1.53.04l11.1-6 .53-.29 2.73-1.47c1.03-.56 1.03-1.47 0-2.02l-2.77-1.5-.84-.45.84.45.1.05z"></path></svg><svg x="3" data-logo="app_store"><path d="M17.62 16.37q-.48 1.09-1.15 2.03-.9 1.27-1.48 1.75-.88.8-1.9.83-.72 0-1.76-.42a5 5 0 0 0-1.89-.4q-.9 0-1.94.4a5 5 0 0 1-1.68.44q-.98.04-1.95-.85-.62-.53-1.55-1.82a13 13 0 0 1-1.63-3.2 12 12 0 0 1-.69-3.8q0-2.1.93-3.64A5.4 5.4 0 0 1 5.5 5.03q.77 0 2.03.46t1.62.47q.26 0 1.79-.55a6 6 0 0 1 2.43-.42 5.2 5.2 0 0 1 4.05 2.09q-2.4 1.44-2.4 4.02a4.4 4.4 0 0 0 1.49 3.34q.66.61 1.48.95-.18.5-.38.98M13.5.42q0 1.58-1.17 2.94c-.94 1.08-2.07 1.7-3.3 1.6L9 4.56c0-1 .45-2.08 1.24-2.96q.6-.67 1.5-1.12.93-.44 1.74-.48z"></path></svg><path d="M32.55 17.04h2.5L38.7 7h-1.8l-2.94 8.28h-.28L30.84 7H29zm15.52 0-4.61-5.2L47.72 7H45.6l-3.56 4.09h-.42V7h-1.7v10.04h1.7v-4.3h.43l3.76 4.3z"></path><path d="M57.89 11.89a2.2 2.2 0 0 0 1.44-2.16C59.33 8.14 58 7 56.06 7h-3.92v10.04h4.2c1.96 0 3.29-1.14 3.29-2.8 0-1.17-.66-2.04-1.74-2.35m-4.04-3.4h2.21c.92 0 1.54.56 1.54 1.39 0 .8-.62 1.36-1.54 1.36h-2.2zm2.5 7.06h-2.5v-2.81h2.5c.9 0 1.52.57 1.52 1.4 0 .84-.62 1.4-1.52 1.4m4.84 1.5h2.32l2.77-5.5h.22v5.5h1.57v-7.4h-2.32l-2.77 5.5h-.22v-5.5h-1.57zm7.96 2.21h1.64v-2.2h5.33v2.2h1.64v-3.7h-1.29V9.64h-5.43l-.37 3.78c-.13 1.34-.53 2.13-1.34 2.13h-.18zm2.49-3.7c.4-.39.57-1.04.68-2.15l.23-2.27h2.28v4.42zm14.38-2.3a3.7 3.7 0 0 0-3.84-3.76 3.7 3.7 0 0 0-3.85 3.85 3.7 3.7 0 0 0 3.85 3.84c1.54 0 2.99-.72 3.55-2.13l-1.54-.26c-.36.53-1.04.9-1.91.9-1.26 0-2.09-.77-2.24-1.91H86zm-3.84-2.33c1.02 0 1.8.65 2.06 1.58h-4.1a2.1 2.1 0 0 1 2.04-1.58m8.66 6.26c2.32 0 3.96-1.6 3.96-3.84 0-2.25-1.64-3.85-3.96-3.85s-3.97 1.6-3.97 3.85 1.64 3.84 3.97 3.84m0-1.5c-1.34 0-2.25-.95-2.25-2.34 0-1.4.9-2.35 2.25-2.35 1.34 0 2.25.95 2.25 2.35s-.91 2.35-2.25 2.35" class="_ru"></path><path d="M35.02 17.36h-2.48L29 7.42h1.83l2.83 8.2h.28l2.93-8.2h1.8zm8.41-5.15 4.6 5.15h-2.24l-3.75-4.26h-.43v4.26h-1.7V7.42h1.7v4.05h.41l3.55-4.05h2.1zm13.37 5.15h-2.48L50.8 7.42h1.83l2.82 8.2h.29l2.92-8.2h1.8zm6.46 0h-1.64v-7.33h1.64zm-.81-8.37q-.45 0-.74-.27a1 1 0 0 1-.28-.72q0-.44.28-.72.3-.28.74-.28t.72.28q.3.29.29.72 0 .44-.29.72t-.72.27m5.93 8.51q-1.03 0-1.86-.48a3.5 3.5 0 0 1-1.29-1.35 4 4 0 0 1-.45-1.98q0-1.1.45-1.95.46-.88 1.3-1.36.81-.5 1.85-.5.9 0 1.6.38.68.35 1.13.88V7.42h1.63v9.94h-1.22l-.34-1.18q-.46.54-1.17.94a3.4 3.4 0 0 1-1.63.38m.4-1.45q1.04 0 1.68-.65.65-.66.65-1.7t-.65-1.7a2.2 2.2 0 0 0-1.68-.66 2.2 2.2 0 0 0-1.66.66q-.64.66-.64 1.7t.64 1.7q.64.65 1.66.65m13.15-2.44-.03.52h-5.94q.12.86.71 1.38.6.51 1.52.51.63 0 1.13-.24.51-.24.78-.65l1.53.26q-.39 1.01-1.38 1.56-.96.55-2.16.55-1.1 0-1.98-.48a3.6 3.6 0 0 1-1.85-3.33q0-1.1.48-1.95.5-.88 1.37-1.36a4 4 0 0 1 1.98-.5q1.11 0 1.98.5.88.48 1.36 1.34.5.86.5 1.89m-3.84-2.31q-.73 0-1.29.42-.53.42-.74 1.14h4.1a2.2 2.2 0 0 0-2.07-1.56m8.66 6.2q-1.14 0-2.04-.48a3.7 3.7 0 0 1-1.4-1.35 4 4 0 0 1-.5-1.98q0-1.1.5-1.95.5-.88 1.4-1.36.9-.5 2.04-.5t2.03.5q.91.48 1.4 1.36.52.86.52 1.95 0 1.11-.51 1.98-.5.86-1.4 1.35-.9.48-2.04.48m0-1.48q.99 0 1.62-.63.63-.66.63-1.7t-.63-1.67a2.2 2.2 0 0 0-1.62-.65q-.99 0-1.62.65-.62.63-.62 1.67 0 1.05.62 1.7.63.63 1.62.63" class="_en"></path></svg>');function lm(t,e){let i=Ln(e,["$$slots","$$events","$$legacy","children"]);var o=sx();to(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"95",height:"24",fill:"var(--btn-color, #fff)","fill-rule":"evenodd","aria-hidden":"true","clip-rule":"evenodd",viewBox:"0 0 95 24",role:"img",...i}));var r=C(o);Xt(r,()=>{var a;return(a=e.children)!=null?a:_t}),Yt(6),S(o),b(t,o)}var ax={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 dm(t,e){B(e,!0),Q(t,ax);let i=g(e,"short",3,!1),o=g(e,"isCyrillic",3,!0),r=g(e,"logo",19,()=>"vk_video"),a="vk-video-logo-icon--short",l=24,d=m(()=>!o()&&!i()?91:i()?l:95),s=m(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=m(()=>`0 0 ${n(d)} 24`);lm(t,{get width(){return n(d)},height:"24",get viewBox(){return n(u)},get"data-testid"(){return n(s)},get"data-logo"(){return r()}}),H()}function Yd(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(_,"$isMobile",i),a=()=>w(v,"$currentGridType$",i),l=()=>w($,"$isCyrillicRelatedInterface$",i),d=g(e,"ref",15,void 0),s=g(e,"logoClickable",3,!1),u=g(e,"targetUrl",3,""),f=At(),p=xe(),v=p.ui.currentGridType$,_=p.ui.isMobile,y=p.ui.t,$=p.isCyrillicRelatedInterface$,x=m(()=>f.logoType!=="vk"),I=m(()=>n(x)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),T=m(()=>(r()&&Os(a(),"m")||Os(a(),"l"))&&n(x)),R=()=>{var E,W;e.click(),(E=p.callbacks)!=null&&E.onLogoClicked?(W=p.callbacks)==null||W.onLogoClicked():u()&&window.open(u(),"_blank")},k=m(()=>!s()),P=m(()=>n(x)?"btn-vk-video-logo":"btn-vk-logo");Ot(t,{className:"btn-full-opacity",get disabled(){return n(k)},click:R,get testId(){return n(P)},get ariaLabel(){return n(I)},get ref(){return d()},set ref(E){d(E)},children:(E,W)=>{var U=Ve(),z=le(U);{var Y=J=>{dm(J,{get logo(){return f.logoType},get short(){return n(T)},get isCyrillic(){return l()}})},ie=J=>{am(J,{})};M(z,J=>{n(x)?J(Y):J(ie,!1)})}b(E,U)},$$slots:{default:!0}}),H(),o()}import{ChromecastState as ux}from"@vkontakte/videoplayer-core/es2018";import{ChromecastState as B_}from"@vkontakte/videoplayer-core/es2018";var lx=Ae('<path d="M3.6 13.3a5.1 5.1 0 0 1 5.05 5.83.9.9 0 0 1-1.78-.26 3.3 3.3 0 0 0-3.74-3.74.9.9 0 0 1-.26-1.78c.24-.03.49-.05.73-.05Z" class="s-10"></path><path d="M3.6 9.7a8.7 8.7 0 0 1 8.68 9.37.9.9 0 0 1-1.8-.14c.02-.17.02-.35.02-.53a6.9 6.9 0 0 0-7.43-6.88.9.9 0 0 1-.14-1.8l.67-.02ZM3.6 16.9a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z" class="s-10"></path><path d="M16.24 4.1c.8 0 1.47 0 2 .04a4 4 0 0 1 1.53.38 3.9 3.9 0 0 1 1.7 1.71 4 4 0 0 1 .39 1.53c.04.53.04 1.2.04 2v4.48c0 .8 0 1.47-.04 2a4 4 0 0 1-.38 1.53 3.9 3.9 0 0 1-1.7 1.7 4 4 0 0 1-1.54.39c-.53.04-1.2.04-2 .04H15a.9.9 0 0 1 0-1.8h1.2c.85 0 1.44 0 1.9-.04.44-.03.68-.1.85-.19.4-.2.72-.52.92-.92.09-.17.16-.4.2-.85.03-.46.03-1.05.03-1.9V9.8c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2.1 2.1 0 0 0-.92-.92 2.25 2.25 0 0 0-.85-.2 25.9 25.9 0 0 0-1.9-.03H5.83a2.1 2.1 0 0 0-1.81 1.4.9.9 0 1 1-1.7-.6A3.9 3.9 0 0 1 6 4.1h10.24Z" class="s-10"></path>',1),dx=Ae('<path d="M3.60219 13.2993C6.41858 13.2995 8.70256 15.5835 8.70278 18.3999C8.70277 18.6469 8.68424 18.8909 8.65004 19.1294C8.57937 19.6212 8.12333 19.9625 7.63149 19.8921C7.13968 19.8213 6.79823 19.3654 6.86879 18.8735C6.89087 18.7195 6.90199 18.5611 6.902 18.3999C6.90178 16.5776 5.42447 15.1003 3.60219 15.1001C3.441 15.1001 3.28267 15.1112 3.12856 15.1333C2.63666 15.2039 2.18077 14.8624 2.11 14.3706C2.03966 13.8788 2.38091 13.4227 2.8727 13.3521C3.11125 13.3178 3.35516 13.2993 3.60219 13.2993Z"></path><path d="M3.60219 9.69971C8.40682 9.69977 12.3021 13.5953 12.3024 18.3999C12.3024 18.6248 12.2938 18.8489 12.277 19.0698C12.239 19.5651 11.8065 19.9365 11.3112 19.8989C10.8157 19.8611 10.4445 19.4286 10.4821 18.9331C10.4954 18.7576 10.5026 18.5791 10.5026 18.3999C10.5023 14.5894 7.41271 11.5005 3.60219 11.5005C3.42268 11.5005 3.24474 11.5066 3.06899 11.52C2.57352 11.5578 2.14115 11.1863 2.10317 10.6909C2.06587 10.1957 2.43694 9.76287 2.93227 9.7251C3.15348 9.70823 3.37699 9.69971 3.60219 9.69971Z"></path><path d="M3.60219 16.8999C4.43047 16.8999 5.10198 17.5717 5.10219 18.3999C5.10209 19.2282 4.43054 19.8999 3.60219 19.8999C2.77383 19.8999 2.10229 19.2282 2.10219 18.3999C2.10241 17.5717 2.7739 16.8999 3.60219 16.8999Z"></path><path d="M16.2379 4.1001C17.0459 4.10009 17.7067 4.10017 18.2438 4.14404C18.7997 4.18946 19.3022 4.28599 19.7711 4.5249C20.5049 4.89882 21.1014 5.49623 21.4752 6.22998C21.714 6.69873 21.8107 7.20063 21.8561 7.75635C21.9 8.29338 21.9001 8.95424 21.9 9.76221V14.2378C21.9001 15.0458 21.9 15.7066 21.8561 16.2437C21.8107 16.7996 21.7141 17.3021 21.4752 17.771C21.1014 18.5046 20.5048 19.1012 19.7711 19.4751C19.3022 19.714 18.7997 19.8105 18.2438 19.856C17.7067 19.8998 17.0459 19.8999 16.2379 19.8999H14.9997C14.503 19.8996 14.1005 19.4972 14.1002 19.0005C14.1002 18.5036 14.5028 18.1004 14.9997 18.1001H16.1998C17.0548 18.1001 17.6422 18.0992 18.0973 18.062C18.5419 18.0257 18.7809 17.9596 18.9538 17.8716C19.3489 17.6702 19.6704 17.3487 19.8717 16.9536C19.9598 16.7808 20.0258 16.5417 20.0622 16.0972C20.0993 15.6421 20.1002 15.0546 20.1002 14.1997V9.80029C20.1002 8.94536 20.0993 8.35794 20.0622 7.90283C20.0258 7.45834 19.9598 7.21921 19.8717 7.04639C19.6704 6.6514 19.3487 6.33073 18.9538 6.12939C18.7809 6.04133 18.5419 5.97431 18.0973 5.93799C17.6422 5.9008 17.0548 5.8999 16.1998 5.8999H6.00063L5.83071 5.90674C4.99191 5.97398 4.28981 6.53462 4.01918 7.30029C3.85342 7.76872 3.33928 8.01472 2.87075 7.84912C2.40214 7.68346 2.15628 7.16833 2.32192 6.69971C2.85696 5.18632 4.30125 4.1001 6.00063 4.1001H16.2379Z"></path><path d="M2.95114 7.11345C2.42394 7.1914 1.90399 6.78569 2.00995 6.2634C2.05777 6.0277 2.12517 5.82449 2.22018 5.63803C2.5078 5.07354 2.96674 4.6146 3.53123 4.32698C4.17296 4 5.01304 4 6.6932 4H17.2001C18.8803 4 19.7204 4 20.3621 4.32698C20.9266 4.6146 21.3855 5.07354 21.6731 5.63803C22.0001 6.27976 22.0001 7.11984 22.0001 8.8V15.2C22.0001 16.8802 22.0001 17.7202 21.6731 18.362C21.3855 18.9265 20.9266 19.3854 20.3621 19.673C19.7204 20 18.8803 20 17.2001 20H15.7196C15.2009 20 14.8203 19.5134 14.8938 19C14.9638 18.5101 15.0001 18.0093 15.0001 17.5C15.0001 11.701 10.2991 7 4.5001 7C3.97384 7 3.45662 7.03872 2.95114 7.11345Z"></path>',1),cx={hash:"s-10",code:".animated.s-10{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-10{animation-name:s-10-wave1}.wave2.animated.s-10{animation-name:s-10-wave2}.wave3.animated.s-10{animation-name:s-10-wave3}@keyframes s-10-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-10-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-10-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function jd(t,e){B(e,!0),Q(t,cx);let i=g(e,"isMobile",3,!1),o=m(()=>e.iconState===B_.CONNECTED),r=m(()=>e.iconState===B_.CONNECTING),a=m(()=>n(o)?"#2688EB":ra),l=m(()=>e.size?sn(e.size):void 0);var d=Ve(),s=le(d);{var u=p=>{Ye(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(v,_)=>{var y=lx();Yt(2),b(v,y)},$$slots:{default:!0}})},f=p=>{Ye(p,{get style(){return n(l)},testId:"chromecast-icon",children:(v,_)=>{var y=dx(),$=le(y);let x;var I=A($);let T;var R=A(I);let k;var P=A(R);let E;var W=A(P);let U;N((z,Y,ie,J,oe)=>{x=te($,0,"wave2 s-10",null,x,z),T=te(I,0,"wave3 s-10",null,T,Y),k=te(R,0,"wave1 s-10",null,k,ie),E=te(P,0,"s-10",null,E,J),U=te(W,0,"s-10",null,U,oe)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:n(o)}),()=>({hidden:!n(o)})]),b(v,y)},$$slots:{default:!0}})};M(s,p=>{i()?p(u):p(f,!1)})}b(t,d),H()}import{noop as px}from"@vkontakte/videoplayer-shared/es2018";function Xd(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"click",3,px),l=xe().ui.t,d=m(()=>e.state===ux.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));Ot(t,{get ariaLabel(){return n(d)},get click(){return r()},testId:"btn-chromecast",get ref(){return i()},set ref(s){i(s)},children:(s,u)=>{jd(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),H()}import{noop as mx}from"@vkontakte/videoplayer-shared/es2018";var fx=Ae('<path d="m21.62 16.5-.02.07q-.22 1.27-.42 2.09a5 5 0 0 1-.64 1.5 4.4 4.4 0 0 1-2.51 1.73q-.77.18-1.63.07t-2.11-.34l-4.34-.8q-1.27-.22-2.1-.42a5 5 0 0 1-1.5-.65 4.4 4.4 0 0 1-1.72-2.5 5 5 0 0 1-.07-1.63q.1-.84.34-2.11l.01-.07q.22-1.27.43-2.1a5 5 0 0 1 .64-1.5 4.4 4.4 0 0 1 2.5-1.73 5 5 0 0 1 1.64-.07q.83.1 2.1.35l4.34.8q1.28.21 2.1.42a5 5 0 0 1 1.5.64 4.4 4.4 0 0 1 1.73 2.5q.18.78.07 1.64-.1.83-.34 2.1m-1.45-2.3c.05-.49.03-.77-.02-1a2.6 2.6 0 0 0-1.02-1.48 3 3 0 0 0-.93-.37c-.48-.13-1.1-.24-2-.4l-4.26-.79c-.9-.16-1.52-.27-2.01-.33a3 3 0 0 0-1 .03 2.6 2.6 0 0 0-1.48 1.02 3 3 0 0 0-.37.92c-.13.48-.24 1.1-.4 2s-.28 1.51-.33 2c-.06.5-.04.78.02 1 .15.6.51 1.13 1.02 1.48.19.13.45.25.92.37.48.13 1.1.25 2 .4l4.27.79c.9.16 1.52.28 2.01.33s.77.03 1-.02a2.6 2.6 0 0 0 1.47-1.03c.14-.19.25-.45.38-.92.12-.48.24-1.1.4-2s.28-1.51.33-2"></path><path d="M18.19 7.49a.9.9 0 0 1-1.05-.73c-.14-.8-.2-1.08-.28-1.3A2.6 2.6 0 0 0 14.5 3.8c-.22 0-.5.04-1.31.17l-5.85.96a8 8 0 0 0-2.17.5 2.6 2.6 0 0 0-1.33 1.75c-.08.38-.04.85.11 2.23l.01.1a.9.9 0 1 1-1.78.2l-.01-.1-.02-.17a9 9 0 0 1-.07-2.64 4.4 4.4 0 0 1 2.25-2.97c.63-.33 1.42-.46 2.56-.65l.16-.03 5.85-.96.1-.01c.67-.11 1.13-.19 1.55-.18a4.4 4.4 0 0 1 4 2.82c.14.39.23.85.35 1.53l.01.1a.9.9 0 0 1-.72 1.04"></path><path d="M12.72 12.41a.42.42 0 0 0-.69.23l-.72 4.18a.4.4 0 0 0 .03.23c.08.2.33.3.54.22l3.67-1.47a.4.4 0 0 0 .12-.68z"></path>',1);function cm(t){Ye(t,{testId:"episodes-icon",children:(e,i)=>{var o=fx();Yt(2),b(e,o)},$$slots:{default:!0}})}var Du=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var vx=L('<span class="text mobile s-21"> </span> <div class="chevron-episodes s-21" data-testid="btn-episodes_icon"><!></div>',1),gx=L('<span class="text s-21"> </span>'),hx=L('<span class="text count s-21"> </span>'),_x=L('<span class="icon s-21"><!></span> <!>',1),bx={hash:"s-21",code:".icon.s-21{flex-shrink:0}.text.s-21{overflow:hidden;padding:0 8px;text-overflow:ellipsis;white-space:nowrap}.text.count.s-21{overflow:visible}.text.mobile.s-21{padding:0 3px 0 4px}.chevron-episodes.s-21{margin-bottom:-6px;opacity:.7;transform:scale(.8)}"};function Zd(t,e){var de,ae,pe;B(e,!0),Q(t,bx);let[i,o]=Be(),r=()=>w(y,"$currentGridType$",i),a=()=>w($,"$openedByKeyboard$",i),l=()=>w(x,"$panelOpened$",i),d=()=>w(I,"$isMobile",i),s=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:mx,_=!!((pe=p.callbacks)!=null&&pe.onEpisodeClicked),y=p.ui.currentGridType$,$=p.ui.episodes.openedByKeyboard$,x=p.ui.episodes.panelOpened$,I=p.ui.isMobile,T=p.ui.t,R=K(void 0),k=ee=>{var Ee,ce,Qe;if(!!((Ee=p.callbacks)!=null&&Ee.onEpisodeClicked)){let fe=da(ee);$.set(fe),x.set(!0),(Qe=(ce=p.callbacks)==null?void 0:ce.onEpisodeClicked)==null||Qe.call(ce,fe)}},P=K(null),E=m(()=>s()/u());He(()=>{var $e;let ee=Du(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 W=m(()=>{var ee;return((ee=n(P))==null?void 0:ee.text)||""}),U=m(()=>io(r(),"xl")?"FULL":io(r(),"m")?"COUNT":"SHORT"),z=m(()=>`${T("tooltip_episodes")}: ${n(W)}`),Y=async(ee,$e,Ee)=>{await uo(),(ee==null?void 0:ee.getAttribute("aria-expanded"))==="false"&&$e&&!Ee&&Tt(()=>{$.set(!1),ee.focus()})};He(()=>{Y(n(R),a(),l())});var ie=Ve(),J=le(ie);{var oe=ee=>{let $e=m(()=>d()?"px-0":""),Ee=m(()=>!_);Ot(ee,{get className(){var ce;return`w-max btn-full-opacity btn-jc-l ${(ce=n($e))!=null?ce:""}`},testId:"btn-episodes",click:k,get disabled(){return n(Ee)},get ariaExpanded(){return l()},get ariaLabel(){return n(z)},get ref(){return n(R)},set ref(ce){D(R,ce,!0)},children:(ce,Qe)=>{var fe=Ve(),ve=le(fe);{var X=me=>{var ue=vx(),Re=le(ue),Ze=C(Re,!0);S(Re);var ke=A(Re,2),j=C(ke);Vr(j,{direction:"right"}),S(ke),N(()=>he(Ze,n(W))),b(me,ue)},O=me=>{var ue=_x(),Re=le(ue),Ze=C(Re);cm(Ze,{}),S(Re);var ke=A(Re,2);{var j=Se=>{var Le=gx(),ze=C(Le,!0);S(Le),N(()=>he(ze,n(W))),b(Se,Le)},ne=(Se,Le)=>{{var ze=Ce=>{var we=hx(),Fe=C(we,!0);S(we),N(()=>he(Fe,f().length)),b(Ce,we)};M(Se,Ce=>{n(U)==="COUNT"&&Ce(ze)},Le)}};M(ke,Se=>{n(U)==="FULL"?Se(j):Se(ne,!1)})}b(me,ue)};M(ve,me=>{d()?me(X):me(O,!1)})}b(ce,fe)},$$slots:{default:!0}})};M(J,ee=>{n(P)&&ee(oe)})}b(t,ie),H(),o()}import{debounceFn as cb}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as Dx,PlaybackState as zl,Player as Nx,PredefinedQualityLimits as ys,VideoFormat as ic,clientChecker as j_}from"@vkontakte/videoplayer-core/es2018";import{assertNonNullable as _r,getHighestQuality as Ox,InterfaceLanguage as Bx,isInvariantQuality as Hx,isNonNullable as Fx,loadVKLangPack as Ux,Logger as zx,map as X_,merge as Wx,Observable as Qu,Subject as oc,Subscription as Z_,TracerFactory as Kx,ValueSubject as J_,VideoQuality as Qx,devNull as qx,now as Gx,filter as Yx,once as jx,ErrorCategory as eb,suppressAbort as Xx}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as Fs,ThinOneStat as Zx}from"@vkontakte/videoplayer-statistics/es2018";import{detectEmbed as $x,devNull as Jt,now as ei,withoutNullable as H_}from"@vkontakte/videoplayer-shared/es2018";import{addScript as yx,Subject as an,clearVideoElement as xx}from"@vkontakte/videoplayer-shared/es2018";var wx="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Nu=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 an,loadStarted$:new an,loadEnded$:new an,loadError$:new an,ready$:new an,slotRequested$:new an,started$:new an,timeRemained$:new an,paused$:new an,resumed$:new an,ended$:new an,empty$:new an,skipped$:new an,clicked$:new an,closed$:new an,error$:new an};this.loadAdman=e=>(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[ei()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));this.loadAdmanMailRu=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[ei()]}),i(),this.events.loadEnded$.next()):(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[ei()]}),o())};yx(wx,e,this.loadTimeout).then(()=>{Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[ei()]}),window.AdmanHTML?(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[ei()]}),i(),this.events.loadEnded$.next()):(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[ei()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[ei()]}),o(),clearTimeout(r)})});this.loadAdmanNPM=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[ei()]}),i(),this.events.loadEnded$.next()):(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[ei()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[ei()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[ei()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[ei()]}),!d&&(window.AdmanHTML?(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[ei()]}),i(),this.events.loadEnded$.next()):(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[ei()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[ei()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[ei(),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;Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[ei()]}),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;Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[ei()]}),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(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[ei()]}),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;Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[ei()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[ei()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[ei()]}),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;Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[ei()]}),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")=>{Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[ei()]}),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"),Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[ei()]}),this.loadTimeout=i.loadTimeout,this.initTimeout=i.initTimeout,this.runtimeTimeout=i.runtimeTimeout,this.useAdmanFromNPM=i.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(i.volumeMultiplier,1)),this.isVsidOriginal=i.isVsidOriginal}init(e,i,o){this.actions=e,this.adsState=i,this.playerState=o}onAdmanLoadingError(){this.onAdError("adman loading error")}async initAdman(e){var k,P;if(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[ei(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:o,isAutoplay:r,adsContainer:a,adsVideoElement:l,slotId:d,params:s={},paramsOverride:u={},duration:f,externalApi:p,json:v}=e;this.externalApi=p;let _,y=this.playerState&&_e(this.playerState.vsid);y&&(this.isVsidOriginal?_=y:_=parseInt(y,36));let{isEmbed:$,immediateOrigin:x}=$x(),I=(k=$?x:window.location.href)!=null?k:window.location.href,T=H_({...s,dl:encodeURIComponent(I),autoplay:r?1:0,player_width:i,player_height:o,..._?{request_id:_}:{},duration:f,...u}),R=H_({slot:v?void 0:d,wrapper:a,videoEl:l,videoQuality:o,params:v?void 0:T,browser:{mobile:!1},json:v});try{let E=new window.AdmanHTML;if(E.onReady(this.onAdsReady),E.onStarted(this.onAdStarted),E.onPlayed(this.onAdPlayed),E.onPaused(this.onAdPaused),E.adMidrollPoint(this.onAdMidrollPoint),E.onClosed(this.onAdClosed),E.onSkipped(this.onAdSkipped),E.onClicked(this.onAdClicked),E.onTimeRemained(this.onAdTimeRemained),E.onCompleted(this.onAdCompleted),E.onError(this.onAdError),E.setDebug(!1),!v&&((P=this.externalApi)!=null&&P.videoGetAds)){let W=await this.safeExternalCall(this.externalApi.videoGetAds,T);W&&(delete R.slot,delete R.params,Object.assign(R,{json:W}))}E.init(R),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(R)}`})}catch(E){Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[ei()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){var o,r,a;if(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[ei()]}),this.currentAdSection===null&&!e){this.log({message:"switch to video, no currentAdSection. can't switch"});return}let i=this.currentAdSection==="postroll";if(this.actions){if(this.adsState&&this.playerState)this.adsState.playbackState.set("inactive"),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${i}`});else{let l="Switch to video: Adman state was not updated correctly";this.log({message:l}),this.events.error$.next(l)}(a=(r=this.actions).switchFromAdsToVideo)==null||a.call(r,!i)}}setPostrollPassed(e){var i;(i=this.adsState)==null||i.postrollPassed.set(e),this.log({message:"postroll passed"})}togglePlay(){var e;if(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[ei()]}),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(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[ei()]}),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(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[ei()]}),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(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[ei()]}),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(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[ei()]}),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(Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[ei()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(i){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){var o;(o=this.adman)==null||o.setPosition(Math.floor(e),Math.floor(i))}destroy(){var e,i,o,r,a,l,d,s,u,f,p,v;Jt.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[ei()]}),this.log({message:"destroy"}),this.stopWatchDog(),(e=this.adman)==null||e.onReady(void 0),(i=this.adman)==null||i.onStarted(void 0),(o=this.adman)==null||o.onPlayed(void 0),(r=this.adman)==null||r.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(l=this.adman)==null||l.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(s=this.adman)==null||s.onClicked(void 0),(u=this.adman)==null||u.onTimeRemained(void 0),(f=this.adman)==null||f.onCompleted(void 0),(p=this.adman)==null||p.onError(void 0),(v=this.adman)==null||v.destroy(),this.videoElement&&xx(this.videoElement),this.isDestroyed=!0}async safeExternalCall(e,...i){var o;try{return await e(...i)}catch(r){return this.onAdError((o=r==null?void 0:r.message)!=null?o:"External call failed"),null}}};var F_=t=>{let e=Math.round(t);return isNaN(e)||e<40?"":e>=40&&e<55?50:e>=55&&e<90?60:e>=90&&e<180?120:e>=180?240:""};var um=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(e,i){let o=[],r=e.split(this.twoLinesRegExp);for(let a of r){let l={startTime:0,endTime:0,texts:[],lang:i},d=a.split(this.oneLineRegExp);for(let s of d)if(!l.startTime&&!l.endTime){let u=new Ou,{startTime:f,endTime:p}=u.parse(s);l.startTime=f,l.endTime=p}else if(s.trim()!==""){let u=new pm,{texts:f}=u.parse(s);l.texts=[...l.texts,...f]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},Ou=class{constructor(){this.timeRegExp=/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/;this.timingRegExp=new RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`)}parse(e){let i={startTime:0,endTime:0},o=this.timingRegExp.exec(e);return o&&(i.startTime=this.calcTime(o[1],o[2],o[3],o[4]),i.endTime=this.calcTime(o[6],o[7],o[8],o[9])),i}parseTime(e){let i=this.timeRegExp.exec(e);return i?this.calcTime(i[1],i[2],i[3],i[4]):0}isTime(e){return this.timeRegExp.test(e)}calcTime(e="0",i="0",o="0",r="0"){let a=Number(e)*60*60,l=Number(i)*60,d=Number(o),s=+`0.${r}`;return a+l+d+s}},pm=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},r=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](l){let d=0,s=[];for(;d<l.length;){let u=["<",">"].reduce((f,p)=>{let v=l.indexOf(p,d);return f===-1||f>v?v:f},-1);if(u===-1){s.push(l.substring(d));break}s.push(l.substring(d,u)),d=u+1}return s}}),a=new Ou;for(let l of r)a.isTime(l)?i.texts.push({type:"timestamp",value:a.parseTime(l)}):i.texts.push({type:"text",value:l});return i}},U_=um;import{isNonNullable as fm}from"@vkontakte/videoplayer-shared/es2018";var za,Vi,mm=0,vm=!1,z_="",W_=(t,e=0,i=0)=>t<e&&t<i,Bu=(t,e=0,i=0)=>t>=e&&t<=i,Sx=(t,e=0,i=0)=>t>e&&t>i,K_=(t,e,i,o=!1)=>{var d;let r=(d=i.find(({id:s})=>s===e.value))==null?void 0:d.subtitles;if(o)return r==null?void 0:r.find(({startTime:u,endTime:f})=>Bu(t,u,f));let a=t>=mm,l=t<mm;if(mm=t,l&&(vm=!1),fm(za)&&Bu(t,za.startTime,za.endTime)&&z_===e.value)return za;if(!fm(Vi)&&(r!=null&&r.length)&&!vm){Vi=r.find(({startTime:u,endTime:f})=>Bu(t,u,f)||a&&W_(t,u,f)),za=void 0,!fm(Vi)&&r[r.length-1].endTime<t&&(vm=!0);return}else{if(Bu(t,Vi==null?void 0:Vi.startTime,Vi==null?void 0:Vi.endTime))return za=Vi,Vi=void 0,z_=e.value,za;(a&&Sx(t,Vi==null?void 0:Vi.startTime,Vi==null?void 0:Vi.endTime)||l&&W_(t,Vi==null?void 0:Vi.startTime,Vi==null?void 0:Vi.endTime))&&(Vi=void 0)}};var Hu={ru:"Русский",en:"English",uk:"Українська",be:"Беларуская (тарашкевiца)",es:"Español",fi:"Suomi",de:"Deutsch",it:"Italiano",bg:"Български",hr:"Hrvatski",hu:"Magyar",sr:"Српски",pt:"Português",el:"Ελληνικά",pl:"Polski",fr:"Français",ko:"한국어","zh-CN":"汉语",lt:"Lietuvių",ja:"日本語",cs:"Čeština",et:"Eesti",tt:"Татарча",ba:"Башҡортса",cv:"Чăвашла",sk:"Slovenčina",ro:"Română",no:"Norsk",lv:"Latviešu",az:"Azərbaycan dili",hy:"Հայերեն",sv:"Svenska",nl:"Nederlands",tk:"Türkmen",ka:"ქართული",da:"Dansk",uz:"O‘zbek",th:"ภาษาไทย",id:"Bahasa Indonesia",tg:"Тоҷикӣ",sl:"Slovenščina",bs:"Bosanski","pt-BR":"Português brasileiro",fa:"فارسی",vi:"Tiếng Việt",hi:"हिन्दी",si:"සිංහල",bn:"বাংলা",tl:"Tagalog",mn:"Монгол",my:"ဗမာစာ",tr:"Türkçe",ne:"नेपाली",ur:"اردو",ky:"Кыргыз тили",pa:"پنجابی",os:"Ирон",kn:"ಕನ್ನಡ",sw:"Kiswahili",kk:"Қазақша",ar:"العربية",he:"עברית",ab:"Аҧсшәа",eu:"Euskara",eo:"Esperanto"},Cx={abk:"as",ara:"ar",aze:"az",bak:"ba",bel:"be",ben:"bn",bos:"bs",bul:"bg",ces:"cs",chv:"cv",dan:"da",deu:"de",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",fas:"fa",fin:"fi",fra:"fr",heb:"he",hin:"hi",hrv:"hr",hun:"hu",hye:"hy",ind:"id",ita:"it",jpn:"ja",kan:"kn",kat:"ka",kaz:"kk",kir:"ky",kor:"ko",lav:"lv",lit:"lt",mon:"mn",mya:"my",nep:"ne",nld:"nl",nor:"no",oss:"os",pan:"pa",pol:"pl",por:"pt",ron:"ro",rus:"ru",sin:"si",slk:"sk",slv:"sl",spa:"es",srp:"sr",swa:"sw",swe:"sv",tat:"tt",tgk:"tg",tgl:"tl",tha:"th",tuk:"tk",tur:"tr",ukr:"uk",urd:"ur",uzb:"uz",vie:"vi"},Jd=t=>{var e,i;return(i=(e=Hu[t])!=null?e:Hu[Cx[t]])!=null?i:void 0};import{ValueSubject as ym}from"@vkontakte/videoplayer-shared/es2018";function Fu(t){let e="";return qi(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),qi(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),qi(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),qi(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),qi(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),qi(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),qi(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),qi(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),qi(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),qi(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),qi(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),qi(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),qi(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),qi(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),qi(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),qi(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),qi(t.controlsDesktopPaddingHorizontalMinimalView)&&(e+=`--controls-desktop-padding-horizontal-minimal-view:${t.controlsDesktopPaddingHorizontalMinimalView};`),qi(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),qi(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),qi(t.font)&&(e+=`--font:${t.font};`),qi(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),qi(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function qi(t){return typeof t=="string"&&!t.includes(";")}var Tx=Ae('<path d="M31.257 3.998c3.037.01 4.52.39 6.13 1.24a9 9 0 013.47 3.35l.17.31.15.3c.78 1.55 1.07 3.18 1.09 6.25v9.04a1.5 1.5 0 01-3 .02v-9.65c-.05-2.04-.24-3.12-.64-4.04l-.12-.27-.13-.25A6 6 0 0036.2 7.9c-1.19-.64-2.34-.88-5.11-.9h-8.84c-2.73 0-4 .2-5.07.7l-.25.13a6 6 0 00-2.4 2.41c-.64 1.19-.88 2.34-.9 5.11v20.83c0 2.74.2 4 .7 5.08l.13.25a6 6 0 002.41 2.4c1.1.6 2.13.83 4.44.89H26a1.5 1.5 0 010 3h-4.47c-3-.05-4.53-.38-6.14-1.24a9 9 0 01-3.48-3.35l-.15-.3c-.73-1.47-1.04-3.01-1.08-5.8V15c.05-2.98.39-4.52 1.25-6.12a9 9 0 013.293-3.582c1.85-.871 2.623-1.27 5.747-1.27z"></path><path d="M30.5 33.8c0-1.68 0-2.52.33-3.16a3 3 0 0 1 1.3-1.31c.65-.33 1.49-.33 3.17-.33h6.4c1.68 0 2.52 0 3.16.33a3 3 0 0 1 1.31 1.3c.33.65.33 1.49.33 3.17v13.4c0 1.68 0 2.52-.33 3.16a3 3 0 0 1-1.3 1.31c-.65.33-1.49.33-3.17.33h-6.4c-1.68 0-2.52 0-3.16-.33a3 3 0 0 1-1.31-1.3c-.33-.65-.33-1.49-.33-3.17z"></path>',1),Ix=L('<div><div><!></div> <span class="title s-0"> </span></div>'),Ex={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 gm(t,e){B(e,!0),Q(t,Ex);let[i,o]=Be(),r=()=>w(u,"$interfaceLanguage$",i),a=()=>w(f,"$isMobile$",i),l=xe(),d=At(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,f=l.ui.isMobile,p=l.ui.t,v=m(()=>r()&&p("pip_dummy_title")),_=Fu(d.view);var y=Ix();let $;var x=C(y);let I;var T=C(x);Ye(T,{width:"57",height:"56",testId:"pip-dummy-icon",children:(P,E)=>{var W=Tx();Yt(),b(P,W)},$$slots:{default:!0}}),S(x);var R=A(x,2),k=C(R,!0);S(R),S(y),N((P,E)=>{$=te(y,1,"player-pip-dummy s-0",null,$,P),Ke(y,_),I=te(x,1,"dummy-image s-0",null,I,E),he(k,n(v))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),b(t,y),H(),o()}import{clientChecker as Y_}from"@vkontakte/videoplayer-core/es2018";import{debounceFn as Ax,getWindow as hm,ValueSubject as _m}from"@vkontakte/videoplayer-shared/es2018";import{detectEmbed as Px,getWindow as Q_}from"@vkontakte/videoplayer-shared/es2018";var fa=()=>{var t;return(t=Q_().document)==null?void 0:t.pictureInPictureEnabled},Hl=()=>{let{isEmbed:t}=Px();return"documentPictureInPicture"in Q_()&&!t},Uu=t=>!!t.pictureInPictureWindow,q_=t=>!!t.target&&"height"in t.target&&"width"in t.target,G_=t=>typeof t=="boolean"?t:t!==void 0;var Wa=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:Ax(this.onResize.bind(this),300)};this.info={isActive$:new _m(!1),isEnabled$:new _m(!1),type:0};this.info.isEnabled$=new _m(e)}isSupported(){return fa()}isActive(){return this.info.isActive$.getValue()}setContext(e){this.svelteContext=e}async revealPictureInPicture(){this.isRequested&&(this.removeEventHandlers(),await this.request(),this.addEventHandlers())}async request(){var e;if(!(!this.isSupported()||this.isActive()))try{await((e=this.videoElement)==null?void 0:e.requestPictureInPicture())}catch(i){this.isRequested=!1}}async exit(){let{document:e}=hm();!this.isSupported()||!this.isActive()||!this.videoElement||!e.pictureInPictureElement||(await e.exitPictureInPicture(),Y_.browser.isYandex&&!this.videoElement.isConnected&&this.onLeavePictureInPicture())}assignPlayerContainer(e){this.isSupported()&&(this.playerContainer=e)}updateVideoElement(){this.isSupported()&&this.exit().finally(()=>{var i;this.removeEventHandlers();let e=this.videoElement;this.videoElement=(i=this.playerContainer)==null?void 0:i.querySelector("video"),this.waitForSafariLeavePictureInPicture(e,this.videoElement),this.addEventHandlers()})}addEventHandlers(){var e,i;(e=this.videoElement)==null||e.addEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.addEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}setExternalEventHandlers(e){this.externalEventHandlers={...e}}removeEventHandlers(){var e,i;(e=this.videoElement)==null||e.removeEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.removeEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}async dispose(){this.removeEventHandlers(),await this.exit(),this.info.isActive$.next(!1),this.isRequested=!1}onEnterPictureInPicture(e){var o,r;let i=Uu(e)?e.pictureInPictureWindow:void 0;this.info.isActive$.next(!0),this.isRequested=!0,i==null||i.addEventListener("resize",this.eventHandlers.resize),(r=(o=this.externalEventHandlers).enterpictureinpicture)==null||r.call(o)}onLeavePictureInPicture(e){var i,o;if(e){let r=Uu(e)?e.pictureInPictureWindow:void 0;r==null||r.removeEventListener("resize",this.eventHandlers.resize)}this.info.isActive$.next(!1),this.isRequested=!1,this.eventHandlers.resize.cancel(),(o=(i=this.externalEventHandlers).leavepictureinpicture)==null||o.call(i)}onResize(e){var o,r;let i=q_(e)?e.target:Uu(e)?e.pictureInPictureWindow:void 0;i&&((r=(o=this.externalEventHandlers).resize)==null||r.call(o,{width:i.width,height:i.height}))}setEnabled(e){this.info.isEnabled$.next(e)}waitForSafariLeavePictureInPicture(e,i){if(Y_.browser.isSafari&&e&&e!==i){let r=this.eventHandlers.leavepictureinpicture,a=0,l=()=>{hm().clearTimeout(a),e.removeEventListener("leavepictureinpicture",d)},d=s=>(r(s),l());e.addEventListener("leavepictureinpicture",d),a=hm().setTimeout(l,1e3)}}};function $m(t){return t instanceof Wa}var kx=Object.defineProperty,Lx=(t,e,i)=>e in t?kx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Bs=(t,e,i)=>Lx(t,typeof e!="symbol"?e+"":e,i),Mx=400,Vx=225,tc=class{constructor({enabled:e=!0,initialSize:i={width:Mx,height:Vx}}){Bs(this,"initialSize"),Bs(this,"playerDomElement"),Bs(this,"playerParentShadowRoot"),Bs(this,"playerDummyElement"),Bs(this,"svelteContext"),Bs(this,"pipWindow"),Bs(this,"info",{isActive$:new ym(!1),isEnabled$:new ym(!1),type:1}),Bs(this,"pipActive",!1),Bs(this,"pipApi"),this.initialSize=i,this.info.isEnabled$=new ym(e),fa()&&(this.pipApi=new Wa({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}async request(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=await documentPictureInPicture.requestWindow({...this.initialSize,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let o=[...this.playerParentShadowRoot.styleSheets].map(s=>[...s.cssRules].map(u=>u.cssText).join(" ")).filter(Boolean).join(`
59
+ `),r=document.createElement("style");r.textContent=o;let a=this.createStretchedContainer(),l=a.attachShadow({mode:"open"});l.append(r),l.append(this.playerDomElement);let d={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=Zr(gm,d),(e=this.pipWindow)==null||e.document.body.append(a),this.info.isActive$.next(!0),(i=this.pipWindow)==null||i.addEventListener("unload",s=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(Ma(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})}async exit(){return new Promise(e=>{var i,o,r;this.pipWindow?((i=documentPictureInPicture.window)==null||i.close(),window.focus()):(o=this.pipApi)!=null&&o.isActive()&&((r=this.pipApi)==null||r.exit()),e()})}async dispose(){await this.exit()}setEnabled(e){var i;this.info.isEnabled$.next(e),(i=this.pipApi)==null||i.setEnabled(e)}assignPlayerContainer(e){var i;(i=this.pipApi)==null||i.assignPlayerContainer(e)}updateVideoElement(){var e;(e=this.pipApi)==null||e.updateVideoElement()}setExternalEventHandlers(e){var i;(i=this.pipApi)==null||i.setExternalEventHandlers(e)}createStretchedContainer(){let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e}};function zu(t){return t instanceof tc}var xm=(t,e)=>{if(G_(e)&&Hl())return new tc({enabled:t,...typeof e!="boolean"&&e});if(fa())return new Wa({enabled:t})};import{Subscription as Rx}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-statistics/es2018";var Wu=class{constructor(e,i,o,r=new Rx){this.oneStat=e;this.thinOneStat=i;this.mediascopePixel=o;this.statSubscription=r}destroy(){var e,i,o;(e=this.oneStat)==null||e.destroy(),(i=this.thinOneStat)==null||i.destroy(),(o=this.mediascopePixel)==null||o.destroy(),this.statSubscription.unsubscribe()}};var Ku=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(Ku||{});var $s=t=>t!=null?t:0,Hs=(t,e)=>{var r,a;let i=(r=t==null?void 0:t.getBoundingClientRect)==null?void 0:r.call(t),o=(a=e==null?void 0:e.getBoundingClientRect)==null?void 0:a.call(e);return{top:Math.round($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))}},Fl=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 Vn="off";var Ul=t=>!!(Math.round(Math.abs(t)/90)%2);var tb=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:f,previewThumbsData:p,uiConfig:v,coreConfig:_,player:y,disabledControls:$,isInteractive:x,interactiveRanges$:I,isInteractiveTime$:T,replayInteractive:R,stopPlayer:k,hasInteractiveBranches:P,playPrevChapterDisabledTooltip:E,additionalButtons:W,additionalSettingsMenuItems:U,additionalContextMenuItems:z,playPrevVideo:Y,playNextVideo:ie,onVideoChanged:J,looped:oe=!1,statistics:de,saveRate:ae,internalsExposure:pe,playerView:ee,playerId:$e,metaConfig:Ee,appTracer:ce})=>{var Hv,Fv;let Qe={..._,isAudioDisabled:l,live:{...(Hv=_.live)!=null?Hv:{},isLiveCatchUpMode:!!r}},fe=v,ve=Kx.createRootTracer(fe.features.tracer),X=ve.createComponentTracer("Store"),O=y||new Nx(Qe,ve,{playerId:$e,onDevNullLog:s==null?void 0:s.onDevNullLog});pe==null||pe.expose({corePlayer:O});let me=new zx,ue=new Nu(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,Ze=u==null?void 0:u.annotationsApi,ke=u==null?void 0:u.slotsApi,j=u==null?void 0:u.focusManager,ne=me.createComponentLog("Store"),Se,Le,ze={},Ce=new gu,we=new Z_,Fe="",nt=se(!1),ct=se(ee==="minimal"),kt=de&&de.oneStat?Zt(de.oneStat.vsid$):Mr(void 0),at=se(sa()),ti=se(!1),yt=()=>v_(document,j_.device.isIOS),Mt=(Fv=Re==null?void 0:Re.info.isActive$)!=null?Fv:new J_(!1),Vt=se(0),Wt=se(!1),Te=se(!1),G=se([]),Oe=Wx(O.events.fatalError$,O.events.managedError$).subscribe(c=>G.update(h=>[...h,c])),be=Mr(!1,c=>{let h=O.events.fatalError$.subscribe(()=>c(!0));return()=>h.unsubscribe()}),Ne=c=>{ct.set(c)},Ie=async c=>{var re;let h=Object.values(Bx).includes(c);if(fe.downloadVKLanguages&&(h&&fe.updateBuiltinLanguages||!Af(c))){let Pe;try{Pe=await Ux(c,Ih,Eh)}catch(je){(re=de==null?void 0:de.oneStat)==null||re.logError({errorType:"VKLangPack",fatal:!1}),ce==null||ce.error({category:eb.WTF,id:"VKLangPack",message:String(je),thrown:je},{severity:"warning"})}Pe&&(Pf({language:c,pack:Pe,fallback:fe.defaultLanguage}),gt.set(c),ye.update(je=>je+1))}Af(c)&&gt.set(c)},gt=se(t),ye=se(0),qe=se(e);Ie(t);let Ue=(c,h)=>{let V=_e(gt);return kf(V,c,h,fe.defaultLanguage)},rt=se("thumb");rt.subscribe(c=>{c==="ads"&&O.info.playbackState$.getValue()&&qt()});let Kt=(()=>{let c=li([be,rt],([h,V])=>h?"crashed":V);return{...c,is:h=>_e(c)===h}})(),It=se(),qt=()=>{It.set({muted:O.info.muted$.getValue()})},gi=(()=>{let c=se(new Set($));return{...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)}}})(),Ai=se({width:0,height:0}),Ii=null,Gi=O.info.isBuffering$,oi=Mr(Gi.getValue(),c=>{let h=Gi.subscribe(V=>{V&&Ii===null?Ii=window.setTimeout(()=>{c(Gi.getValue()),Ii=null},fe.loaderDelay):c(V)});return()=>{h.unsubscribe(),Ii&&clearTimeout(Ii)}});X.log("create store"),ne({message:"create store"});let ut=c=>{let h=c.container,V=()=>{st=new MutationObserver(Pe=>{let{removedNodes:je}=Pe[0];je.length&&h.append(O.experimental.element$.getValue())}),st.observe(h,{childList:!0})},re=O.experimental.element$.getValue();if(re)h.append(re),V();else{let Pe=O.experimental.element$.pipe(Yx(je=>!!je),jx()).subscribe(je=>{h.append(je),V()});we.add(Pe)}},ai=c=>{ne({message:`init video, config: ${JSON.stringify(c)}`}),x?ut(c):(qx.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[Gx()]}),O.initVideo(c)),X.log("init video",{isInteractive:x}),c.subtitles&&O.setExternalTextTracks(c.subtitles),Se=c,Fe=c.subtitlesForcedLanguage||""},Yi=new oc,Ct=c=>Yi.next(c),fi=new oc,di=new J_(Fs.UNKNOWN),We=new oc,st=null,yi={actionRewind$:fi,actionSeek$:di,inPiP$:Mt,inFullscreen$:new Qu(c=>at.subscribe(h=>c.next(h))),actionSetSubtitle$:We,nextMovie$:Yi},ji=new oc,ho=new oc,To={actionSeek$:di,actionSubtitlesSwitched$:ji,actionQuality$:ho,playerSize$:new Qu(c=>Ai.subscribe(h=>c.next(h))),inPiP$:Mt,inFullscreen$:new Qu(c=>at.subscribe(h=>c.next(h))),isLoaderVisible$:new Qu(c=>oi.subscribe(h=>c.next(h)))};if(de){let{oneStat:c,thinOneStat:h,mediascopePixel:V,statSubscription:re}=de;c&&(x||re.add(c.attachTo(O)),re.add(c.attachToUi(yi)),re.add(c.attachToAds(ue.events)),c.authorize(a).catch(Pe=>{ne({message:`onestat auth error ${String(Pe)}`})}),V&&V.attachTo(O)),h&&(re.add(h.attachTo(O,ue.events)),re.add(h.attachToUi(To)),re.add(h.attachToAds(ue.events)),h.updateContext({isMobile:_e(nt)}),h.authorize(a))}ce&&(ce.addSubscription(O.events.managedError$.subscribe(c=>{ce.error(c,{severity:"debug"})})),ce.addSubscription(O.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 dn=()=>{if(j_.device.isIOS&&Le)try{g_(Le)}catch(c){ne({message:`exitIosSafariFullscreen failed: ${c}`})}};we.add(O.experimental.element$.subscribe(c=>{c&&(Le=c,c.classList.add("player-media"),Re==null||Re.updateVideoElement(),x&&c.setAttribute("pip","false"),(ee==="preview"||!fe.features.pip&&!fe.features.dpip)&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(O.events.ended$.subscribe(()=>{var c;dn(),(c=s==null?void 0:s.onEnded)==null||c.call(s)})).add(O.events.looped$.subscribe(()=>{var c;(c=s==null?void 0:s.onLooped)==null||c.call(s)})).add(O.events.started$.subscribe(async()=>{var h,V;$m(Re)&&await(Re==null?void 0:Re.revealPictureInPicture());let c=O.info.muted$.getValue();(h=s==null?void 0:s.onStarted)==null||h.call(s),(V=ze.onStarted)==null||V.call(ze,c)})).add(O.events.willSeek$.subscribe(({from:c,to:h})=>{var V;(V=s==null?void 0:s.onSeek)==null||V.call(s,c,h,di.getValue())})).add(O.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=s==null?void 0:s.onAutoplaySoundProhibited)==null||c.call(s)})).add(O.info.position$.subscribe(c=>{var V;let h=O.info.duration$.getValue();isFinite(h)&&h>0&&((V=s==null?void 0:s.onTimeupdate)==null||V.call(s,h,c),ue.setPosition(c,h))})).add(O.events.fatalError$.subscribe(c=>{var h;(h=s==null?void 0:s.onCrashed)==null||h.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(O.events.fetcherRecoverableError$.subscribe(c=>{var h;(h=s==null?void 0:s.onRecoverableError)==null||h.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(O.events.loadedMetadata$.subscribe(()=>{Wt.set(!0)})).add(O.info.is3DVideo$.subscribe(c=>{Te.set(c)})).add(O.info.isEnded$.subscribe(c=>{x&&(c?(T!=null&&T.getValue()&&gi.add(Pd),gi.add("PLAY_BUTTON")):gi.remove("PLAY_BUTTON"))})).add(O.info.liveTime$.subscribe(c=>{var h;(h=s==null?void 0:s.onLiveTime)==null||h.call(s,c)})).add(O.info.isStalled$.subscribe(c=>{var h;(h=s==null?void 0:s.onStalledChanged)==null||h.call(s,c)})).add(O.info.isLiveEnded$.subscribe(c=>{var h;return c&&((h=s==null?void 0:s.onLiveEnded)==null?void 0:h.call(s))})).add(ue.events.loadStarted$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:h.call(c)})).add(ue.events.loadEnded$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:h.call(c)})).add(ue.events.loadError$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadError)==null?void 0:h.call(c)})).add(ue.events.init$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onInit)==null?void 0:h.call(c)})).add(ue.events.ready$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onReady)==null?void 0:h.call(c)})).add(ue.events.started$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onStarted)==null?void 0:V.call(h,c)})).add(ue.events.timeRemained$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onTimeRemained)==null?void 0:V.call(h,c)})).add(ue.events.ended$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onCompleted)==null?void 0:V.call(h,c)})).add(ue.events.empty$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onEmpty)==null?void 0:h.call(c)})).add(ue.events.clicked$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onClicked)==null?void 0:V.call(h,c)})).add(ue.events.closed$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onClosed)==null?void 0:V.call(h,c)})).add(ue.events.error$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onError)==null?void 0:V.call(h,c)})).add(ue.events.paused$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onPaused)==null?void 0:h.call(c)})).add(ue.events.resumed$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onResumed)==null?void 0:h.call(c)}));let F=new Z_,it=()=>{var je,Et,Rt;let{debugLog:c}=fe,h,V="#9df7b7",re="#efd169";if(c&&c!==!0){let{colors:Ft}=c;h=c.tag,V=(je=Ft==null?void 0:Ft[0])!=null?je:V,re=(Rt=(Et=Ft==null?void 0:Ft[1])!=null?Et:Ft==null?void 0:Ft[0])!=null?Rt:re}let Pe=h?`: ${h}`:"";F.add(O.events.log$.subscribe(Ft=>{console.debug(`%c sdk${Pe} `,`background:${V};`,`sdk component: ${Ft.component}`,Ft.message)})).add(me.log$.subscribe(Ft=>{console.debug(`%c ui${Pe} `,`background:${re};`,`ui component: ${Ft.component}.`,Ft.message)}))},Ht=()=>{F.unsubscribe()},ci=(c,h)=>{X.log("start camera manual rotation",{mx:c,my:h}),O.startCameraManualRotation(c,h)},dt=(c=!1)=>{X.log("stop camera manual rotation",{immediate:c}),O.stopCameraManualRotation(c)},ni=(c,h,V)=>{X.log("move camera focus px",{xpx:c,ypx:h,dt:V}),O.moveCameraFocusPX(c,h,V)},ui=()=>{O.holdCamera()},Qt=()=>{O.releaseCamera()},wt=Mr(O.info.position$.getValue(),c=>{let h,V,re=()=>{let Pe=O.info.playbackState$.getValue(),je=O.info.isLive$.getValue(),Et=O.info.duration$.getValue(),Rt=O.info.position$.getValue();if(Pe&&[zl.PLAYING,zl.PAUSED].includes(Pe)){let Ft=je?Rt-Et:O.getExactTime();Ft!==V&&c(Ft),V=Ft}h=requestAnimationFrame(re)};return re(),()=>cancelAnimationFrame(h)}),oo=Zt(O.info.playbackState$),Io=Zt(O.info.isBuffering$),Rn=li([oo,Io],([c,h])=>h?"buffering":c),cn=Zt(O.info.currentBuffer$),Ei=Zt(O.info.isEnded$),bi=Zt(O.info.isLive$),Qo=fe.features.playbackRate?Zt(O.info.canChangePlaybackSpeed$):Mr(!1),Jn=Zt(O.info.liveBufferTime$),mi=Zt(O.info.volume$),_o=Zt(O.info.muted$),un=hu(O.info.predefinedQualityLimitType$.pipe(X_(c=>c===ys.TRAFFIC_SAVING)),O.info.predefinedQualityLimitType$.getValue()===ys.TRAFFIC_SAVING),Eo=hu(O.info.predefinedQualityLimitType$.pipe(X_(c=>c===ys.HIGH_QUALITY)),O.info.predefinedQualityLimitType$.getValue()===ys.HIGH_QUALITY),pn=Zt(O.info.autoQualityLimitingAvailable$),xs=Zt(O.info.availableQualities$),ws=Zt(O.info.availableQualitiesFps$),os=Zt(O.info.chromecastState$),br=Zt(O.info.chromecastDeviceName$),fn=Zt(O.info.currentFormat$),mn=Zt(O.info.throughputEstimation$),er=Zt(O.info.videoBitrate$),$r=Zt(O.info.intrinsicVideoSize$),tr=Zt(O.info.duration$),Dr=Zt(O.info.isAudioAvailable$),Nr=()=>{Ii&&clearTimeout(Ii),Ii=null},Dn=li([tr,bi],([c,h])=>h?-c:c),ir=li([oo],([c])=>c===zl.PLAYING),Nn=Zt(O.info.atLiveEdge$),or=Zt(O.info.atLiveDurationEdge$),Or=Zt(O.info.position$),Br=li([Or,tr],([c,h])=>isFinite(c)&&isFinite(h)&&!!h),xi=li([os],([c])=>c===Dx.CONNECTED),ns=Zt(O.info.availableVideoStreams$),qo=fe.features.audioLanguages?Zt(O.info.availableAudioStreams$):Mr([]),vt=Zt(O.info.currentVideoStream$),Gt=Zt(O.info.currentAudioStream$),nr=c=>{c.language&&Cf(c.language),O.setVideoStream(c)},On=(c,h)=>{O.setAudioStream(c),fo(h)&&(c.language&&Cf(c.language),fe.features.userVideoPrefs&&i&&Ef(fe.userSalt,String(i),{audioTrackId:c.id}))},Hr=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=xu(fe.userSalt,String(i));if(re!=null&&re.audioTrackId){let Pe=c.find(je=>je.id===re.audioTrackId);h=Pe!=null?Pe:h}}let V=e_();return V&&(h!=null||(h=c.find(({language:re})=>V===re))),h!=null||(h=c.at(0)),h},yr=c=>{X.log("change audio stream",{id:c});let h=O.info.availableAudioStreams$.getValue().find(V=>V.id===c);h&&On(h,!0)},Fr=!1;we.add(O.info.availableAudioStreams$.subscribe(c=>{if(!Fr&&c.length){let h=Hr(c);h&&(O.setAudioStream(h),Fr=!0)}})),qo.subscribe(c=>{var h;(h=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||h.call(s,c.map(({label:V="",id:re="",language:Pe=""})=>({label:V,language:Pe,id:re})))}),Gt.subscribe(c=>{var h;return c&&((h=s==null?void 0:s.onAudioStreamChanged)==null?void 0:h.call(s,c.id))});let vn=!1;we.add(O.info.availableVideoStreams$.subscribe(c=>{if(!vn&&c.length){let h=Hr(c);h&&(O.setVideoStream(h),vn=!0)}}));let Go=se(void 0),gn=Zt(O.info.isAutoQualityEnabled$,c=>c&&Go.set(void 0)),xr=Zt(O.info.currentQuality$,()=>Go.set(void 0)),wr=li([Go,xr],([c,h])=>c!=null?c:h),hn=li(fn,c=>c!==ic.MPEG),_n=li([xs,ws,gn,wr,hn],([c,h,V,re,Pe])=>{let je=[];Pe&&je.push({value:"auto",displayValue:Ue("auto_quality_option"),selected:V});let Et=c.filter(Rt=>!Hx(Rt));for(let Rt of Et){let Ft=h[Rt];je.push({value:Rt,displayValue:`${Rt}${Ft?F_(Ft):""}`,selected:V?!1:Rt===re})}return je}),rr=Zt(O.info.currentPlaybackRate$),Pi=li([rr,Nn,or],([c,h,V])=>{let re=V||x?1:fe.controls.playbackRateMin,Pe=h?1:fe.controls.playbackRateMax,je=fe.controls.playbackRateStep,Et=[];for(let Rt=re;Rt<=Pe;Rt+=je)Et.push({value:Rt,displayValue:Rt===1?Ue("playback_rate_1"):Ue("playback_rate",{multiplier:Rt.toString(10)}),selected:c===Rt});return Et}),bo=()=>({displayValue:Ue("subtitles_off"),value:Vn,language:""}),Po=se(bo()),no=li([Po,ye],([c],h)=>{c.value===Vn?h(bo()):h(c)}),bn=fe.features.subtitles?Zt(O.info.availableTextTracks$):Mr([]),$n=Uh(),Ur=li([bn,no],([c,h],V)=>{var je;let re=[],Pe=c.find(({id:Et})=>Et===h.value);if(Pe!=null&&Pe.url){let[,Et]=(je=$n.find(Pe.url))!=null?je:[];if(Et){V(Et);return}Ce.download(Pe.url).then(Rt=>{if(!Rt||Ce.isDestroyed())return;let Ft=new U_,Ys=Pe.language;if(Ys){let e$=!!Pe.isAuto,t$=Ft.parse(Rt,Ys);re.push({lang:Ys,subtitles:t$,isAuto:e$,id:Pe.id})}$n.add(Pe.url,re),_e(no).value===h.value&&V(re)}).catch(Xx).catch(Rt=>{var Ft;(Ft=de==null?void 0:de.oneStat)==null||Ft.logError({errorType:"Subtitles download",fatal:!1}),ce==null||ce.error({category:eb.WTF,id:"Subtitles download",message:String(Rt),thrown:Rt},{severity:"warning"})})}V(re)}),xt=li([rr,ir,no],([c,h,V],re)=>{let Et;if(O.info.isLive$.getValue()&&h&&V.value!==Vn){let Ft=()=>{let Ys=1e3/(3*c);Et=setTimeout(Ft,Ys),re(Date.now())};return Ft(),()=>clearTimeout(Et)}}),ri=li([bn,no],([c,h])=>{if(!c.length)return[];let V=[];for(let{language:re,isAuto:Pe,id:je}of c){let Et=re&&Jd(re);re&&Et&&V.push({displayValue:Pe?Ue("subtitles_auto",{language:Et}):Et,value:je,selected:(h==null?void 0:h.value)===je,isAuto:Pe,language:re})}return V.length?(V.unshift({...bo(),selected:(h==null?void 0:h.value)===Vn}),V):[]}),Ut={available:[],prev:[]},po=()=>{var h,V;let c=O.experimental.getCurrentTime$.getValue();return(V=(h=c==null?void 0:c())!=null?h:Le==null?void 0:Le.currentTime)!=null?V:0},Yo=li([wt,no,Ur,xt],([c,h,V,re])=>{var je;let Pe=O.info.isLive$.getValue();if(Pe&&Ut.prev!==V){let Et=V.find(({id:Ft})=>Ft===h.value),Rt=Ut.prev.find(({id:Ft})=>Ft===h.value);if(Et){let Ft={...Et,subtitles:[...(je=Rt==null?void 0:Rt.subtitles)!=null?je:[],...Et.subtitles]};Ut.available=[Ft],Ut.prev=V}}if(h&&h.value!==Vn){let Et=Pe?po():c,Rt=Pe?Ut.available:V;return K_(Et,h,Rt,Pe)}}),Ao=li([Yo],([c])=>c!=null&&c.texts?c.texts:[]);we.add(no.subscribe(c=>{var h,V;if(c.value===Vn)(h=s==null?void 0:s.onSubtitleOff)==null||h.call(s);else{let re=Object.entries(Hu).find(([Pe,je])=>je===c.displayValue);(V=s==null?void 0:s.onSubtitleOn)==null||V.call(s,re?re[0]:"",c.value)}}));let jo=se(!0),Xi=li([cn,Dn,Or,Jn],([c,h,V,re])=>{var Rt;let Pe=(Rt=c==null?void 0:c.end)!=null?Rt:0;if(!re)return Pe/h;let Et=-V+re-h;return(Pe-Et)/h}),yn=Zt(O.info.availableSources$),Sr=li([yn],([c])=>Object.keys((c==null?void 0:c[ic.MPEG])||{}).length>0),xn=()=>{var V,re,Pe;let c=Object.keys(((re=(V=O.info.availableSources$)==null?void 0:V.getValue())==null?void 0:re[ic.MPEG])||{}),h=Ox(c)||Qx.Q_144P;return(Pe=Se.sources[ic.MPEG])==null?void 0:Pe[h]},Bn=()=>{var h;let c=xn();if(c)X.log("download video",{url:c}),Bh(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})}},rs=()=>{ne({message:"toggle muted"});let c=O.info.muted$.getValue();O.info.volume$.getValue()===0&&!c?Cr(zr(),!1):Je(!c,!1)},ss=()=>{var c;if(Bt.ui.settingsMenu.visible$.set(!1),!_e(Bt.ui.settingsSubMenu.visible$)){let h=_e(Bt.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&h){let re=Fl(h),Pe={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:re,position:Pe,name:"settings"})}}X.log("close settings menu")},as=async(c,h=()=>Promise.resolve())=>{var Pe;Bt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Bt.ui.settingsMenu.visible$.set(!0),await h();let V=_e(Bt.ui.settingsMenu.ref$),re=ll();if((Pe=s==null?void 0:s.uiInfo)!=null&&Pe.onSettingsMenu&&V&&re){let Et=Fl(V),Rt=Hs(V,re);s.uiInfo.onSettingsMenu({visible:!0,size:Et,position:Rt,name:"settings"})}X.log("open settings menu",{wasOpenedByKeyboard:c})},Zi=(c,h=!1)=>{var je;Bt.ui.settingsSubMenu.visible$.set(!1);let V=_e(Bt.ui.settingsMenu.ref$),re=ll(),Pe=_e(Bt.ui.settingsMenu.visible$);if((je=s==null?void 0:s.uiInfo)!=null&&je.onSettingsMenu&&V&&re)if(Pe&&!h){let Rt=Fl(V),Ft=Hs(V,re);s.uiInfo.onSettingsMenu({visible:!0,size:Rt,position:Ft,name:"settings"})}else{let Rt=Fl(c),Ft={top:0,left:0,bottom:0,right:0},Ys=_e(Bt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:Rt,position:Ft,name:Ys})}X.log("close settings sub menu")},ls=(c,h)=>{var re;Bt.ui.settingsSubMenu.visible$.set(!0),Bt.ui.settingsSubMenu.ref$.set(h),Bt.ui.settingsSubMenu.name$.set(c);let V=ll();if((re=s==null?void 0:s.uiInfo)!=null&&re.onSettingsMenu&&h&&V){let je=Fl(h),Et=Hs(h,V);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:je,position:Et})}X.log("open settings sub menu",{name:c})},zr=()=>{var h;let c=Math.max(fe.volumeMinRestore,(h=_u())!=null?h:0);return c===0?fe.volumeDefault:c},fo=c=>{let h=fe.features.savePreferredStatesOnUserActionOnly;return!h||h&&!c},Cr=(c,h)=>{let V=c===0?zr():c,re=O.info.muted$.getValue();ne({message:`set volume, volume: ${c}, preferredVolume: ${V}`});let Pe=!l||Kt.is("ads");re&&c>0&&Pe&&(re=!1,fo(h)&&wf(!1)),O.setVolume(c,re),ue.setVolume(c),fo(h)&&bf(V)},Je=(c,h)=>{let V=O.info.volume$.getValue();ne({message:`set muted, currentVolume: ${V}, mute: ${c}`});let re=Kt.is("ads");if(O.setMuted(c,re),ue.setVolume(c?0:V),fo(h)&&(!re||!c)&&wf(c),!c&&V===0){let Pe=zr();O.setVolume(Pe),fo(h)&&bf(Pe),ue.setVolume(Pe)}},ht=se(!1),jt=c=>{var h,V;X.log("set looped",{isLooped:c}),ht.set(c),O.setLooped(c),(V=(h=s==null?void 0:s.uiInfo)==null?void 0:h.onLoopedChanged)==null||V.call(h,c)};jt(oe);let ki=()=>{var c,h;(h=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||h.call(c)},ro=(c,h=!1)=>{var V;ne({message:`set autoplayNextEnabled, value: ${c}`}),X.log("set autoplay next enabled",{autoplayNextEnabled:c}),Bt.ui.autoplayNextEnabled$.set(c),o_(c),h&&((V=s==null?void 0:s.onSetAutoplayNextEnabled)==null||V.call(s,c))},Ri=c=>{ne({message:`set timerNextVideoRunning, value: ${c}`}),X.log("set timer next video running",{timerNextVideoRunning:c}),Bt.ui.timerNextVideoRunning$.set(c)},mo=(c=!0)=>{var V;let h=!0;if(c&&(s!=null&&s.onPrevVideoClick))try{h=(V=s==null?void 0:s.onPrevVideoClick)==null?void 0:V.call(s)}catch(re){ne({message:"onPrevVideoClick callback failed to execute"})}J(!0),h&&Y()},ko=(c=!0)=>{var V;let h=!0;if(c&&(s!=null&&s.onNextVideoClick))try{h=(V=s==null?void 0:s.onNextVideoClick)==null?void 0:V.call(s)}catch(re){ne({message:"onNextVideoClick callback failed to execute"})}J(!1),h&&ie()},wn=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},Hn=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},vo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},Xo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},Tr=()=>{O.prepare()},Ir=()=>{_r(Bt);let c=_e(Bt.ui.controls.disabledControls$),h=_e(Bt.playerPhase),V={playerPhase:h,isInteractive:x,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 je;ne({message:"toggle play, call player.play"}),V.action="play",O.play(),(je=s==null?void 0:s.onPlay)==null||je.call(s)},Pe=()=>{var je;ne({message:"toggle play, call player.pause"}),V.action="pause",O.pause(),(je=s==null?void 0:s.onPause)==null||je.call(s)};if(O.info.isEnded$.getValue()){if(ne({message:"toggle play, video ended, seek to 0"}),fi.next(),di.next(Fs.REWIND),x){R==null||R();return}O.seekTime(0),re()}else O.info.playbackState$.getValue()!==zl.PLAYING?re():Pe();X.log("toggle play",V)},$o=(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&&ho.next(c),O.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:je}=fe.features;bu(),c!=="auto"?(je?($u({type:"exact_quality",quality:c,videoId:i},V),O.setPredefinedQualityLimits(ys.UNKNOWN)):$f(i,c),Go.set(c),O.setQuality(c)):je&&h==="default"&&(et("auto_quality",V,Pe),_e(un)&&sr(!1,void 0,Pe),_e(Eo)&&Fn(!1,void 0,Pe))},sr=(c,h="as-default",V)=>{ne({message:`set trafficSavingEnabled, value: ${c}`}),X.log("set traffic saving enabled",{trafficSavingEnabled:c});let re=c?ys.TRAFFIC_SAVING:ys.UNKNOWN;fe.features.qualityDetailsSubMenuEnabled?(ds(re,h,V),kd(!1)):(O.setPredefinedQualityLimits(re),fo(V)&&kd(c))},Fn=(c,h="as-default",V)=>{ne({message:`set highQualityEnabled, value: ${c}`}),X.log("set high quality enabled",{highQualityEnabled:c}),ds(c?ys.HIGH_QUALITY:ys.UNKNOWN,h,V)},ds=(c,h,V)=>{c!==ys.UNKNOWN&&(_e(pn)&&!_e(gn)&&$o("auto",{appliesTo:h,changeReason:"limit-changed"},V),et(c,h,V)),O.setPredefinedQualityLimits(c)},et=(c,h,V)=>{fo(V)&&($u({type:c,videoId:i},h),h==="as-default"&&$u({type:c,videoId:i},"to-video"))},Dt=(c,h=!0)=>{X.log("set playback rate",{playbackRate:c}),O.setPlaybackRate(c),fe.features.saveRate&&ae&&!O.info.isLive$.getValue()&&h&&t_(c)},wi=()=>{let c=_e(Qo),h=_e(Pi),V=h.findIndex(({selected:Pe})=>Pe);if(V===h.length-1||!c)return h[V];let re=h[V+1];return Dt(re.value),re},Zo=()=>{let c=_e(Qo),h=_e(Pi),V=h.findIndex(({selected:Pe})=>Pe);if(V===0||!c)return h[V];let re=h[V-1];return Dt(re.value),re},Lo=(c={...bo(),selected:!1},h)=>{X.log("set subtitles",{...c}),c.value!==Vn&&We.next(c.isAuto?c.value+"_auto":c.value),ji.next({enabled:c.value!==Vn,lang:c.language,auto:!!c.isAuto}),Po.set(c),fo(h)&&(If(c.value===Vn?void 0:c.language),fe.features.userVideoPrefs&&i&&Ef(fe.userSalt,String(i),{subtitleTrackId:c.value===Vn?void 0:c.value}))},Wr=c=>{X.log("toggle subtitles");let h=_e(no);(h==null?void 0:h.value)===Vn?ar(c):Kr(c)},Jo=(c,h)=>{X.log("change subtitle",{enabled:c}),c?ar(!0,h):Kr(!0)},ar=(c,h)=>{if(_e(ct))return;X.log("subtitle on");let V=_e(ri),re=_e(gt),Pe=Fe!=null?Fe:re,je;h&&(je=V.find(Et=>Et.value===h)),je!=null||(je=V.filter(Et=>Et.value!==Vn).find(Et=>Et.language===Pe)),Lo(je!=null?je:V[1],c)},Kr=c=>{X.log("subtitle off"),Lo(void 0,c)};we.add(O.info.availableTextTracks$.subscribe(c=>{var V;function h(){let re=[];for(let{language:Pe,isAuto:je,id:Et}of c){let Rt=Pe&&Jd(Pe);Pe&&Rt&&re.push({id:Et,language:Pe,title:je?Ue("subtitles_auto",{language:Rt}):Rt})}return re}(V=s==null?void 0:s.onAvailableSubtitlesChanged)==null||V.call(s,h())}));let Ss=se(!0),Ks=c=>{Ss.set(c)},Un=(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}),di.next(h),O.info.isLive$.getValue()){let Pe=O.info.duration$.getValue(),je=Math.min(0,Pe+c);O.seekTime(je,V)}else{if(T!=null&&T.getValue())return;O.info.isEnded$.getValue()&&(ne({message:"seek after ended, call callbacks.onPlay"}),(re=s==null?void 0:s.onPlay)==null||re.call(s)),O.seekTime(Nv(c),V)}},ga=c=>{ne({message:`seek to episode start time: ${c}`}),X.log("seek to episode start time",{time:c}),Un(c,Fs.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(Dn)*c;Un(re,h,V)},si=c=>{ne({message:`seek external, time: ${c}`}),X.log("seek external",{time:c}),di.next(Fs.UNKNOWN),O.seekTime(O.info.isLive$.getValue()?-c:c)},Mo=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}),O.setAutoQualityLimits(c)},lr=c=>{ne({message:`seek external to episode start time: ${c}`}),X.log("seek external to episode start time",{time:c}),Un(c,Fs.EPISODE,!0)},Er=c=>{ne({message:`set playback rate to: ${c}`}),X.log("set playback rate external",{playbackRate:c}),O.setPlaybackRate(c)},Vo=se(!1),Si=se(!1),cs=li([Dn,ct],([c,h])=>!!p&&c>=fe.suitableDurationForUsingRichSeek&&fe.features.useRichSeek&&!x&&ee!=="preview"&&!h),so=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),Fi=li([Vt],([c])=>{let h=Ul(c);return so?!h:h});we.add(Kt.subscribe(c=>{c!=="video"&&Vo.set(!1)})),Vo.subscribe(c=>{var h;(h=s==null?void 0:s.onRichSeekActiveChanged)==null||h.call(s,c)});let en=se(void 0),zn=se(!1),Qr=c=>{ne({message:`start scrubbing, progress: ${c}`}),X.log("start scrubbing",{progress:c}),zn.set(!0),ge(c)},ge=c=>{en.set(c)},St,hi,Li=()=>{en.set(void 0),zn.set(!1)},Ro=()=>{clearTimeout(hi),clearTimeout(St),St=window.setTimeout(()=>{Li()},500),Le==null||Le.removeEventListener("seeked",Ro)},yo=(c,h=!1,V=Zx.ActionSeekType.SLIDER)=>{ne({message:`complete scrubbing, progress: ${c}`}),X.log("complete scrubbing",{progress:c}),pt(c,V,h),_e(Bt.ui.isMobile)&&_e(Bt.state.currentFormat$)===ic.HLS?(Le==null||Le.addEventListener("seeked",Ro),hi=window.setTimeout(()=>{Ro()},300)):Li()},Ji=li([wt,Dn,en],([c,h,V],re)=>{re(Fx(V)?V*h:c)}),tn=se(!1),Cs=()=>{tn.set(!0)},Ts=()=>{tn.set(!1)},Qs=li([Ai],([{width:c}],h)=>{let V=N_(c);h(V)}),qr=W.filter(c=>Hh(c)),qs=li([Qs,nt],([c,h])=>h?qr.filter(V=>!V.hideOnMobile):qr.filter(V=>{var re;return!((re=V.hideOnDesktopGridTypes)!=null&&re.includes(c))})),Sn=se(W.filter(c=>Fh(c))),ha=li([Sn,Qs],([c,h])=>c.filter(V=>{var re;return!((re=V.hideOnDesktopGridTypes)!=null&&re.includes(h))})),il=li([ha,qs],([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))),Pr=se(U),jl=li([Pr],([c])=>fe.features.additionalSettingsMenuItems?c.map(h=>h.type==="SWITCH"?{...h,onClick:h.onChangeEnabled}:h):[]),ol=(c,h)=>{let V=_e(Sn).map(re=>re.id!==c?re:{...re,...h});Sn.set(V)},nl=c=>{let h=_e(Sn);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),Sn.set(h)},rl=c=>{let h=_e(Sn);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),Sn.set(h)},Xl=c=>{di.next(Fs.LIVE),ne({message:"live switch to low latency "+c}),X.log("live switch to low latency "+c),O.setLiveLowLatency(c)},_a=(c,h)=>{let V=_e(Pr).map(re=>re.id!==c?re:{...re,...h});Pr.set(V)},sl=c=>{let h=_e(Pr);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),Pr.set(h)},ft=c=>{let h=_e(Pr);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),Pr.set(h)},lt=se(z),Mi=li([lt],([c])=>fe.features.additionalContextMenuItems?c:[]),Do=(c,h)=>{let V=_e(lt).map(re=>re.id!==c?re:{...re,...h});lt.set(V)},Ui=c=>{let h=_e(lt);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),lt.set(h)},vi=c=>{let h=_e(lt);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),lt.set(h)},Di=li([nt,be],([c,h],V)=>{V(c&&h)}),ba=()=>{di.next(Fs.LIVE),ne({message:"switch to active live"}),X.log("switch to active live"),O.seekTime(0),O.info.playbackState$.getValue()!==zl.PLAYING&&Bt.actions.internal.togglePlay()},al=()=>{X.log("skip adman"),ue.skip()},up=(c=!0)=>{var re;_r(Bt),ne({message:`switch from ads to video, callPlay: ${c}`}),X.log("switch from ads to video",{callPlay:c}),rt.set("video"),c&&O.play(),l&&Je(!0,!0);let h=(re=_e(It))==null?void 0:re.muted,V=!O.info.muted$.getValue();h!==void 0&&!V&&Je(h,!0),It.set(void 0)},Lc=()=>{_r(Bt),ne({message:"switch from video to ads"}),X.log("switch from video to ads"),Bt.actions.internal.pause(),dn(),rt.set("ads")},pp=c=>{_r(Bt);let h=c?"LiveWaitingStart":"thumb";X.log("set live waiting start",{state:c,playerPhase:h}),rt.set(h)},Mc=c=>{_r(Bt);let h=c?"LiveWaitingRecover":"thumb";X.log("set live waiting recover",{state:c,playerPhase:h}),rt.set(h)},fp=c=>{_r(Bt);let h=c?"LiveWaitingRecord":"thumb";X.log("set live waiting record",{state:c,playerPhase:h}),rt.set(h)},Vc=()=>(_r(Bt),X.log("get debug text data"),Nh(O,Se,Bt,ve.getTraceId(),Ee)),mp=()=>(_r(Bt),JSON.stringify(ve.getFinishedSpans())),Rc=()=>(_r(Bt),Oh(O,Se,Bt)),ll=()=>Le,Dc=()=>{ne({message:"toggle chromecast"}),X.log("toggle chromecast"),O.toggleChromecast()},Gs=c=>{var V;if(_r(Bt),O.info.isEnded$.getValue())return;let h=!c;if(_e(Bt.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=s==null?void 0:s.onPause)==null||V.call(s)),O.pause()},$a=c=>{var V;_r(Bt);let h=!c;if(_e(Bt.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=s==null?void 0:s.onPlay)==null||V.call(s)),O.play()},vp=c=>{_r(Bt);let h=!c;if(_e(Bt.playerPhase)==="ads"){ne({message:"player cannot be stopped during ads via external method"});return}ne({message:`player will be stopped, internalCall: ${h}`}),k==null||k()},Zl=(c,h)=>{_r(Bt),ne({message:`first start, show ads: ${c}, internalCall: ${!h}`}),X.log("first start",{showAds:c,external:h}),c?rt.set("ads"):(rt.set("video"),h?O.play():Bt.actions.internal.togglePlay())},Jl=()=>(ne({message:"getting time codes"}),f),ed=()=>{let c=Jl();if(!c||[0,1].includes(c.length))return;let h=O.info.position$.getValue();return c.find(V=>V.time>h)},gp=c=>{let h=c;h||(h=ed());let V=O.info.position$.getValue();X.log("seek to next episode",{currentTime:V,...h}),h&&(ne({message:"seek to next episode"}),Un(h.time,Fs.EPISODE,!0))},Nc=()=>{let c=Jl();if(!c||[0,1].includes(c.length))return;let h=O.info.position$.getValue(),V=c.findIndex(Pe=>Pe.time>h),re=V===-1?c.length-2:V-2;if(!(re<0))return c[re]},hp=c=>{let h=c;h||(h=Nc());let V=O.info.position$.getValue();X.log("seek to prev episode",{currentTime:V,...h}),h&&(ne({message:"seek to prev episode"}),Un(h.time,Fs.EPISODE,!0))},Ge=()=>(ne({message:"getting preview thumbs data"}),X.log("get preview thumbs data",{...p}),p),pi=async()=>{let c=Re==null?void 0:Re.isActive(),h="none";Re!=null&&Re.isActive()?(h="exit",await(Re==null?void 0:Re.exit())):(h="request",await(Re==null?void 0:Re.request())),X.log("toggle picture in picture",{isActive:c,action:h})},No=(c=-90)=>{X.log("rotate video",{alphaDiff:c}),Vt.update(h=>h+c)},Cn=se([]);I==null||I.subscribe(c=>{let h=[];for(let V=0;V<c.length;V++){let{range:[re,Pe],subjects:je}=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?!je.length||je.every(Et=>Et.isRemoved):!je.length}),Pe!==1/0&&h.push({time:Pe/1e3,text:"",interactive:!1,completed:!0})}Cn.set(h)});let Tn=se(!1);T==null||T.subscribe(c=>{c&&_e(zn)&&Li()});let Nv=c=>{if(!x)return c;let h=_e(Cn),V=_e(Dn),Pe=_e(Or)/V,je=h.find(Et=>Et.interactive&&!Et.completed&&Et.time>Pe);return typeof(je==null?void 0:je.time)=="number"?Math.min(c,je.time-.05):c},qb=()=>{Bt.ui.episodes.panelOpened$.set(!1)},Gb=()=>{X.log("destroy store"),clearTimeout(hi),clearTimeout(St),we.unsubscribe(),F.unsubscribe(),O.destroy(),ue.destroy(),de==null||de.destroy(),Oe.unsubscribe(),st==null||st.disconnect(),st=null,Ce.destroy(),ce==null||ce.destroy()},Yb=li([Nn,Kt,Qo],([c,h,V])=>v.features.doubleForwardAvailable&&!c&&h==="video"&&V),_p=se(!1),Ov=2,Oc=null,Bv=c=>{if(!_e(ir)&&c)return;let h=O.info.currentPlaybackRate$.getValue();c?h!==Ov&&(Oc=h,Dt(Ov,!1),_p.set(!0)):(Oc&&Dt(Oc,!1),_p.set(!1),Oc=null)};Kt.subscribe(c=>{c!=="video"&&Bv(!1)});let jb=()=>{Gs(!1),Vo.set(!0)},Xb=()=>{$a(!1),Vo.set(!1)},bp=!1,Zb=()=>{Si.set(!0),bp=O.info.playbackState$.getValue()===zl.PLAYING,Gs(!1)},Jb=()=>{Si.set(!1),!_e(Vo)&&bp&&$a(!1),bp=!1};O.events.playing$.subscribe(()=>{_e(Vo)&&Gs(!1)});let Bt={interfaceLanguage$:gt,isCyrillicRelatedInterface$:qe,initVideo:ai,videoId:i,isClip:o,playerPhase:Kt,vsid:kt,state:{positionExact$:wt,positionWithScrubbing$:Ji,duration$:Dn,playbackState$:oo,playbackStateRealistic$:Rn,isPlaying$:ir,isLoaderVisible:oi,bufferedProgress$:Xi,isLive$:bi,canChangePlaybackSpeed$:Qo,isActiveLive$:Nn,isOldestAvailableLive$:or,isRewindableLive$:Br,isEnded$:Ei,muted$:_o,volume$:mi,trafficSavingEnabled$:un,highQualityEnabled$:Eo,autoQualityLimitingAvailable$:pn,availableVideoStreams$:ns,availableAudioStreams$:qo,videoStream$:vt,audioStream$:Gt,currentQuality$:wr,isAutoQualityEnabled$:gn,availableQualities$:_n,currentPlaybackRate$:rr,availablePlaybackRates$:Pi,currentSubtitle$:no,availableTextTracks$:bn,availableSubtitlesList$:ri,currentSubtitleCaptions$:Ao,isAutoSubtitleCaptionVisible$:jo,chromecastState$:os,chromecastDeviceName$:br,chromecastConnected$:xi,currentFormat$:fn,throughputEstimation$:mn,videoBitrate$:er,videoSize$:$r,errorLog$:G,crashed$:be,isAudioAvailable$:Dr,isAudioDisabled:!!l,canDownload:fe.features.download&&!!d,availableSources$:yn,hasMpegSources$:Sr,isInteractive:x,showInteractiveGraph:fe.features.interactiveGraph,showSeekToInteractive:fe.features.seekToInteractive,showPlayPrevChapter:fe.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:fe.features.interactiveTimeIndicator&&!!_e(Cn).length,interactiveEpisodes$:Cn,isInteractiveTime$:T?Zt(T):se(!1),isInteractiveExpectation$:Tn,hasInteractiveBranches:P,playPrevChapterDisabledTooltip:E,looped$:ht,loadedMetadata$:Wt,isAutoQualityAvailable$:hn,previewTrackActive:Vo,previewTrackDragInProgress:Si},ui:{t:Ue,isMinimalView$: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:W.length?W.reduce(c=>[...c,se(void 0)],[]):[],disabledControls$:gi},modals:{hotKeyMap:{show:se(!1),data:se({title:"",closeBtnText:"",groups:[]})}},isFullscreen:at,isFullscreenOpenedByKeyboard:ti,rotateAlpha:Vt,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:Ai,isMobile:nt,mobileNotReportControlHidden$:Di,icon3DVideoVisible:se(!1),scrubbingInProgress:zn,volumeChangingInProgress:tn,is3DVideo:Te,currentGridType$:Qs,additionalButtonsDeprecated$:qs,additionalDesktopControlPanelRightButtons$:il,additionalSettingsMenuItems$:jl,additionalContextMenuItems$:Mi,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:Ss,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$:_p,doubleForwardAvailable$:Yb,previewTrackActive:Vo,previewTrackDragInProgress:Si,previewTrackAvailable:cs,isPreviewTrackHorizontallyAligned:Fi},ads:{position:se(0),duration:se(0),playbackState:se("inactive"),canSkip:se(!1),secondsToWatchBeforeSkip:se(0),postrollPassed:se(!1)},webApi:{pictureInPictureApi:Re,annotationsApi:Ze,slotsApi:ke,focusManager:j},actions:{internal:{preload:Tr,firstStart:c=>Zl(c,!1),play:()=>$a(!1),pause:()=>Gs(!1),togglePlay:Ir,toggleMuted:rs,openSettingsMenu:as,closeSettingsMenu:ss,openSettingsSubMenu:ls,closeSettingsSubMenu:Zi,setVolume:c=>Cr(c,!1),setMuted:c=>Je(c,!1),startVolumeChanging:Cs,stopVolumeChanging:Ts,setVideoStream:nr,setAudioStream:c=>On(c,!1),setQuality:(c,h)=>$o(c,h,!1),setTrafficSavingEnabled:(c,h)=>sr(c,h,!1),setHighQualityEnabled:(c,h)=>Fn(c,h,!1),setPlaybackRate:Dt,incrementPlaybackRate:wi,decrementPlaybackRate:Zo,setSubtitle:c=>Lo(c,!1),toggleSubtitle:()=>Wr(!1),togglePictureInPicture:pi,startScrubbing:Qr,progressScrubbing:ge,completeScrubbing:yo,toggleChromecast:Dc,switchToActiveLive:ba,switchFromAdsToVideo:up,switchFromVideoToAds:Lc,skipAd:al,setLiveWaitingStart:pp,setLiveWaitingRecover:Mc,setLiveWaitingRecord:fp,getDebugTextData:Vc,getTraceTextData:mp,getDebugPanelData:Rc,getVideoElement:ll,seekTime:(c,h,V)=>Un(c,h,V),clearDelayedBufferingCheckTimeout:Nr,seekEpisodeStartTime:ga,seekToPercent:pt,getNextEpisode:ed,seekToNextEpisode:gp,getPrevEpisode:Nc,seekToPrevEpisode:hp,startLogging:it,stopLogging:Ht,startCameraManualRotation:ci,stopCameraManualRotation:dt,moveCameraFocusPX:ni,holdCamera:ui,releaseCamera:Qt,getVideoEpisodes:Jl,getPreviewThumbsData:Ge,downloadVideo:Bn,addLanguage:Pf,setLanguage:Ie,nextMovie:Ct,videoRotate:No,correctSeekTimeToInteractive:Nv,replayInteractive:R,setLooped:jt,reportProblem:ki,setAutoplayNextEnabled:ro,setTimerNextVideoRunning:Ri,prevVideoClick:mo,nextVideoClick:ko,nextVideoAnnouncementShow:wn,nextVideoAnnouncementClick:Hn,nextVideoAnnouncementAuto:vo,nextVideoAnnouncementCancel:Xo,checkFullscreenSupport:yt,changeDoubleForwardOn:Bv,closePreviewTrack:Xb,previewTrackOpened:jb,previewTrackDragStarted:Zb,previewTrackDragFinished:Jb},external:{firstStart:c=>Zl(c,!0),play:()=>$a(!0),pause:()=>Gs(!0),stop:()=>vp(!0),seekTime:c=>si(c),seekEpisodeStartTime:c=>lr(c),setPlaybackRate:c=>Er(c),setAutoQualityLimits:c=>Mo(c),setMuted:c=>Je(c,!0),toggleSubtitle:()=>Wr(!0),changeSubtitle:Jo,setVolume:c=>Cr(c,!0),returnFocusToEpisodes:qb,updateAdditionalSettingsItem:_a,addAdditionalSettingsItem:sl,removeAdditionalSettingsItem:ft,updateAdditionalContextItem:Do,addAdditionalContextItem:Ui,removeAdditionalContextItem:vi,updateAdditionalButton:ol,addAdditionalButton:nl,removeAdditionalButton:rl,setLiveLowLatency:Xl,hideControls:()=>Ks(!1),showControls:()=>Ks(!0),setQuality:c=>$o(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>sr(c,"to-video",!0),setHighQualityEnabled:c=>Fn(c,"to-video",!0),changeAudioStream:yr,setMinimalView:Ne}},callbacks:s,setUiCallbacks:c=>{ze={...c}},getAdmanWrapper:()=>ue,getLogger:()=>me,getPlayer:()=>O,destroy:Gb};return Bt};function Xn(t,e,i,o){var f;let r=(f=e[i])==null?void 0:f.getBoundingClientRect(),a=o&&!!r&&!!(r.right-r.left),{top:l,left:d,bottom:s,right:u}=Hs(e[i],t||void 0);return{left:a?d:0,right:a?u:0,top:a?l:0,bottom:a?s:0,isDisplayed:a}}var Jx=["disabledControls$","additionalButtons"],e2=["interactiveTimeIndicator"],Kl=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!Jx.includes(r)){let l=o||e2.includes(r);a.set(Xn(t,i,r,l))}}};var qu=async(t,e,i)=>{await uo(),e&&i&&(i.focus(),t.set(!1))};var t2=Ae('<path d="M18 10c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2Zm-6 4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Zm-6 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Z"></path>');function wm(t){Ye(t,{children:(e,i)=>{var o=t2();b(e,o)},$$slots:{default:!0}})}function Sm(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(s,"$contextMenuVisible$",i),a=g(e,"disabled",3,!1),l=g(e,"ariaLabel",3,""),d=xe(),s=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,f=d.ui.contextMenu.showContextMenuBtn$,p=d.ui.contextMenu.position$,v=d.ui.contextMenu.btnRef$,_=K(void 0);He(()=>{n(_)&&Tt(()=>{v.set(n(_))})});let y=T=>{let R=da(T),k=A_(n(_));p.set(k),u.set(R),s.set(!r())},$=()=>{f.set(!0)},x=()=>{f.set(!1)},I=m(()=>r()?"opened":"");Ot(t,{get className(){return n(I)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:$,blur:x,get ariaExpanded(){return r()},get ref(){return n(_)},set ref(T){D(_,T,!0)},children:(T,R)=>{wm(T,{})},$$slots:{default:!0}}),H(),o()}var i2=t=>{t.stopPropagation()},o2=L("<div><!> <div></div> <div></div></div>"),n2={hash:"s-26",code:'.interactive-episode-icon-animated.s-26{height:32px;opacity:1;position:absolute;right:16px;top:16px;transition:.3s;width:32px}.interactive-episode-icon-animated.icon-small.s-26{height:28px;width:28px}.invisible.s-26{opacity:0;visibility:hidden}.fullscreen.s-26:not(.mobile){height:40px;right:23px;top:19px;width:40px}.mobile.s-26{height:28px;right:14px;top:12px;width:28px}.fullscreen.mobile.s-26{height:32px;width:32px}@media screen and (orientation:portrait){.interactive-episode-icon-animated.mobile.fullscreen.s-26{right:16px;top:40px}}@keyframes s-26-pulse{0%{border-width:1px;opacity:0;transform:scale(1)}10%{opacity:1}50%{border-width:1px;opacity:.5;transform:scale(1.5)}to{border-width:.5px;opacity:0;transform:scale(1.5)}}.pulse.s-26{animation:s-26-pulse 1s infinite;border:1px solid #fff;border-radius:100%;bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;transform:scale(1.8);transition:.3s}.pulse.paused.s-26{animation-play-state:paused}.interactive-episode-icon-animated svg{height:100%;width:100%}.ref-block.s-26{height:100%;position:absolute;top:0;visibility:hidden;width:100%}.hidden.s-26{display:none}'};function nc(t,e){var me;B(e,!0),Q(t,n2);let[i,o]=Be(),r=()=>w(x,"$isMobile",i),a=()=>w(k,"$areControlsVisible",i),l=()=>w(E,"$currentGridType$",i),d=()=>w(T,"$isInteractiveTime$",i),s=()=>w($,"$interactiveControlsOpacity$",i),u=()=>w(R,"$showInteractiveTimeIndicatorTooltip$",i),f=()=>w(I,"$isFullscreen",i),p=g(e,"ref",15,void 0),v=K(void 0),_=xe(),y=go(),{interactiveControlsOpacity$:$}=y,x=_.ui.isMobile,I=_.ui.isFullscreen,T=_.state.isInteractiveTime$,R=y.showInteractiveTimeIndicatorTooltip$,k=_.ui.controlsVisible,P=(me=_.callbacks)==null?void 0:me.onInteractiveTimeIndicatorClick,E=_.ui.currentGridType$,W=m(()=>!r()&&a()),U=m(()=>Os(l(),"s")),z=m(()=>!d()||!!s()||n(W)),Y=K(!1);He(()=>{D(Y,n(z),!0)});let ie=()=>{D(Y,!0)},J=()=>{var ue;oe(),(ue=n(v))==null||ue.addEventListener("animationiteration",ie,{once:!0})},oe=()=>{var ue;D(Y,!1),(ue=n(v))==null||ue.removeEventListener("animationiteration",ie)},de=ue=>{R.set(ue)},ae=m(()=>u()&&!n(z));He(()=>{u()?J():oe()});let pe=()=>{n(z)||(R.set(!0),P==null||P())};rn(()=>{R.clearTimeout(),oe()});let ee=()=>{R.set(!1)},$e=q("tooltip_interactive_interaction_time_indicator");var Ee=o2();let ce;Ee.__mousemove=[i2],Ee.__click=pe;var Qe=C(Ee);Co(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)=>{qd(ue,{completed:!0})},$$slots:{default:!0}});var fe=A(Qe,2);let ve;tt(fe,ue=>p(ue),()=>p());var X=A(fe,2);let O;tt(X,ue=>D(v,ue),()=>n(v)),S(Ee),N((ue,Re,Ze)=>{ce=te(Ee,1,"interactive-episode-icon-animated s-26",null,ce,ue),ve=te(fe,1,"ref-block s-26",null,ve,Re),O=te(X,1,"pulse s-26",null,O,Ze)},[()=>({mobile:r(),fullscreen:f(),invisible:n(z),"icon-small":n(U)}),()=>({hidden:n(z)}),()=>({paused:n(Y)})]),mt("mouseleave",Ee,ee),b(t,Ee),H(),o()}Xe(["mousemove","click"]);function Gu(t,e){B(e,!0);let i=g(e,"tooltipEnabled",3,!0),o=g(e,"disabled",3,!1),r=g(e,"className",3,void 0),a=g(e,"ref",15),l=g(e,"tooltipVisible",3,!1);Co(t,{get disabled(){return o()},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},get hasTooltip(){return i()},get mouseEnter(){return e.mouseEnter},get mouseLeave(){return e.mouseLeave},get tooltipVisible(){return l()},get className(){return r()},get ref(){return a()},set ref(d){a(d)},children:(d,s)=>{var u=Ve();let f=m(()=>e.buttonComponent);var p=le(u);Bi(p,()=>n(f),(v,_)=>{_(v,es(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),b(d,u)},$$slots:{default:!0}}),H()}var Us={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var s2=Ae('<path d="M32 21.68V15a2 2 90 114 0v18a2 2 90 01-4 0v-6.66l-16.3 9.32A2.48 2.48 90 0112 33.56V14.46c0-1.9 2.06-3.08 3.7-2.12z"></path>');function ma(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=m(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),r=m(()=>`${sn(e.size)}${n(o)}`),a=m(()=>i()?"prev-icon":"next-icon");Ye(t,{get width(){return"48"},get height(){return"48"},get style(){return n(r)},get testId(){return n(a)},get shadow(){return e.shadow},children:(l,d)=>{var s=s2();b(l,s)},$$slots:{default:!0}}),H()}var a2=L('<div class="icon-background-mobile s-20"><!></div>'),l2={hash:"s-20",code:".icon-background-mobile.s-20{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:100%;justify-content:space-around;left:0;position:absolute;top:0;width:100%}"};function Ka(t,e){B(e,!0),Q(t,l2);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"disabled",3,!1),l=xe().ui.t,d=m(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),s=m(()=>e.type==="prev"?l("hotkey_map_item_prev_video_value"):l("hotkey_map_item_next_video_value")),u=m(()=>`btn-${o()?"m":"d"}--${e.type}`);Ot(t,{get className(){return n(u)},get testId(){var f;return`btn-${(f=e.type)!=null?f:""}`},get disabled(){return r()},get ariaLabel(){return n(d)},get click(){return e.click},get ariaKeyShortCut(){return n(s)},get ref(){return i()},set ref(f){i(f)},children:(f,p)=>{var v=Ve(),_=le(v);{var y=x=>{var I=a2(),T=C(I);let R=m(()=>e.type==="prev");ma(T,{get size(){return"32"},get reversed(){return n(R)}}),S(I),b(x,I)},$=x=>{let I=m(()=>e.type==="prev");ma(x,{get size(){return"24"},get reversed(){return n(I)}})};M(_,x=>{o()?x(y):x($,!1)})}b(f,v)},$$slots:{default:!0}}),H()}var d2=Ae('<path d="M24 21.2a.8.8 90 01-1.34.6L14.08 14a1.34 1.34 90 010-2l8.6-7.8a.8.8 90 011.32.6V11a16 16 90 11-16 16 2 2 90 114 0 12 12 90 1012-12z"></path>');function rc(t,e){B(e,!0);let i=m(()=>sn(e.size));Ye(t,{get width(){return"48"},get height(){return"48"},get style(){return n(i)},testId:"replay-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=d2();b(o,a)},$$slots:{default:!0}}),H()}import{noop as c2}from"@vkontakte/videoplayer-shared/es2018";var u2=L('<div class="icon-background-mobile s-25"></div>'),p2=L("<!> <div><!></div>",1),f2={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,f2);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"disabled",3,!1),a=g(e,"className",3,""),l=g(e,"click",3,c2),d=q("tooltip_restart"),s=m(()=>`${o()?"btn-m--play":""} ${a()}`);Ot(t,{get className(){return n(s)},testId:"replay-btn",get ariaLabel(){return d},get disabled(){return r()},get click(){return l()},get ariaKeyShortCut(){return hs.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,f)=>{var p=p2(),v=le(p);{var _=T=>{var R=u2();b(T,R)};M(v,T=>{o()&&T(_)})}var y=A(v,2);let $;var x=C(y);let I=m(()=>o()?"48":"24");rc(x,{get size(){return n(I)}}),S(y),N(T=>$=te(y,1,"s-25",null,$,T),[()=>({mobile:o()})]),b(u,p)},$$slots:{default:!0}}),H()}var m2=Ae('<path d="m17.4 10 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h3.801zm16 0 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h4z"></path>');function zs(t,e){B(e,!0);let i=m(()=>sn(e.size));Ye(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"pause-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=m2();b(o,a)},$$slots:{default:!0}}),H()}import{noop as v2}from"@vkontakte/videoplayer-shared/es2018";var g2=L('<div class="icon-background-mobile s-22"><!></div>'),h2={hash:"s-22",code:".icon-background-mobile.s-22{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:calc(100% - 32px);justify-content:space-around;left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function ql(t,e){B(e,!0),Q(t,h2);let[i,o]=Be(),r=()=>w(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=go(),l=g(e,"ref",15,void 0),d=g(e,"isMobile",3,!1),s=g(e,"isPlaying",3,!1),u=g(e,"disabled",3,!1),f=g(e,"className",3,""),p=g(e,"click",3,v2),_=xe().ui.t,{toggle:y}=a,$=m(()=>y),x=m(()=>r()!==null),I=m(()=>n(x)?r():s()),T=m(()=>n(I)?_("tooltip_pause"):_("tooltip_play")),R=m(()=>n(I)?zs:Mn),k=m(()=>`${d()?"btn-m--play":""} ${f()}`),P=m(()=>n(x)?n($):p());Ot(t,{get className(){return n(k)},testId:"play-btn",get click(){return n(P)},get disabled(){return u()},get ariaLabel(){return n(T)},get ariaKeyShortCut(){return hs.KeyK},get ref(){return l()},set ref(E){l(E)},children:(E,W)=>{var U=Ve();let z=m(()=>n(R));var Y=le(U);{var ie=oe=>{var de=g2(),ae=C(de);Bi(ae,()=>n(z),(pe,ee)=>{ee(pe,{get size(){return"48"}})}),S(de),b(oe,de)},J=oe=>{var de=Ve(),ae=le(de);Bi(ae,()=>n(z),(pe,ee)=>{ee(pe,{get size(){return"24"}})}),b(oe,de)};M(Y,oe=>{d()?oe(ie):oe(J,!1)})}b(E,U)},$$slots:{default:!0}}),H(),o()}var _2=Ae('<path d="M12.58 12.92v2.5a1 1 0 0 1-1.52.85l-5.58-3.42a1 1 0 0 1 0-1.7l5.58-3.42a1 1 0 0 1 1.52.86v2.5l5.48-3.36a1 1 0 0 1 1.52.86v6.82a1 1 0 0 1-1.52.86z"></path>');function Cm(t){Ye(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=_2();b(e,o)},$$slots:{default:!0}})}function sc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),r=g(e,"disabled",3,!1),a=q("tooltip_interactive_go_back"),l=m(()=>o()?"hidden":"");Ot(t,{get className(){return n(l)},testId:"play-prev-chapter-btn",get ariaLabel(){return a},get disabled(){return r()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,s)=>{Cm(d,{})},$$slots:{default:!0}}),H()}var b2=L('<span class="gutter s-24"><span><!></span></span>'),$2={hash:"s-24",code:".gutter.s-24{--gutterWidth:32px;--gutterHeight:12px;--togglerWidth:18px;--togglerHeight:18px;--togglerGap:calc(var(--togglerWidth)/6);background-color:hsla(0,0%,100%,.3);border-radius:50px;height:var(--gutterHeight);position:relative;width:var(--gutterWidth)}.toggler.s-24{align-items:center;background-color:#626364;border-radius:50%;display:flex;height:var(--togglerHeight);justify-content:center;left:0;position:absolute;top:calc((var(--togglerHeight) - var(--gutterHeight))/2*-1);transform:translateX(calc(var(--togglerGap)*-1));transition-duration:.2s;transition-property:background-color,transform;transition-timing-function:ease;width:var(--togglerWidth)}.toggler.enabled.s-24{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function ac(t,e){B(e,!0),Q(t,$2);let[i,o]=Be(),r=()=>w(s,"$autoplayNextEnabled$",i),a=g(e,"ref",15,void 0),l=xe(),d=l.ui.t,s=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,f=()=>{u(!r(),!0)},p=d("aria_label_autoplay"),v="12",_="#000",y=m(()=>r()?"true":"false");Ot(t,{click:f,get ariaLabel(){return p},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref($){a($)},children:($,x)=>{var I=b2(),T=C(I);let R;var k=C(T);{var P=W=>{Mn(W,{get size(){return v},fill:_})},E=W=>{zs(W,{get size(){return v},fill:_})};M(k,W=>{r()?W(P):W(E,!1)})}S(T),S(I),N(W=>R=te(T,1,"toggler s-24",null,R,W),[()=>({enabled:r()})]),b($,I)},$$slots:{default:!0}}),H(),o()}var y2=Ae('<path d="M16.73 4.85c-.54-.05-1.23-.05-2.23-.05H7.9a.9.9 0 1 1 0-1.8h6.64q1.41-.01 2.33.05c.64.05 1.2.16 1.73.43a4.4 4.4 0 0 1 1.92 1.92c.27.52.38 1.09.43 1.73q.06.92.05 2.33v5.08q.01 1.41-.05 2.33a5 5 0 0 1-.43 1.73 4.4 4.4 0 0 1-1.92 1.92 5 5 0 0 1-1.73.43q-.92.06-2.33.05H7.9a.9.9 0 1 1 0-1.8h6.6c1 0 1.69 0 2.23-.04.52-.05.82-.13 1.05-.24a2.6 2.6 0 0 0 1.14-1.14c.11-.23.2-.53.24-1.06s.04-1.23.04-2.22v-5c0-1 0-1.69-.04-2.23a3 3 0 0 0-.24-1.05 2.6 2.6 0 0 0-1.14-1.14c-.23-.11-.53-.2-1.05-.24"></path><path d="M7.76 11.17V8.9c0-.71.7-1.15 1.25-.78l4.6 3.1a.96.96 0 0 1 0 1.54L9 15.87c-.55.37-1.25-.07-1.25-.78v-2.26l-4.5 3.04C2.7 16.24 2 15.8 2 15.09V8.91c0-.71.7-1.15 1.25-.78z "></path>',1);function Tm(t){Ye(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=y2();Yt(),b(e,o)},$$slots:{default:!0}})}function lc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),r=g(e,"disabled",3,!1),a=q("tooltip_interactive_seek"),l=m(()=>o()?"hidden":"");Ot(t,{get className(){return n(l)},testId:"btn-seek-to-interactive",get ariaLabel(){return a},get disabled(){return r()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,s)=>{Tm(d,{})},$$slots:{default:!0}}),H()}var x2=Ae('<path d="M15.2 5.9v1.2c0 .6 0 .9.12 1.12q.15.3.46.46c.23.12.52.12 1.12.12h1.2c.6 0 .9 0 1.12-.12q.3-.15.46-.46c.12-.23.12-.52.12-1.12V5.9c0-.6 0-.9-.12-1.12a1 1 0 0 0-.46-.46c-.23-.12-.52-.12-1.12-.12h-1.2c-.6 0-.9 0-1.12.12q-.3.15-.47.46c-.11.23-.11.53-.11 1.12m-.05 11.03v1.14c0 .6 0 .91.12 1.14q.15.31.47.47c.23.12.53.12 1.14.12h1.22c.6 0 .9 0 1.14-.12a1 1 0 0 0 .47-.47c.12-.23.12-.53.12-1.14v-1.14c0-.6 0-.9-.12-1.14a1 1 0 0 0-.47-.47c-.23-.12-.54-.12-1.14-.12h-1.22c-.6 0-.91 0-1.14.12a1 1 0 0 0-.47.47c-.12.23-.12.53-.12 1.14"></path>'),w2=Ae('<path d="M16.78 3h1.42q.47 0 .83.02.4.02.82.21.61.31.92.92.2.41.21.81.03.36.02.83v1.4q0 .47-.02.83-.02.4-.21.81a2 2 0 0 1-.92.92 2 2 0 0 1-.82.21q-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.2 2 2 0 0 1-.93-.93 2 2 0 0 1-.2-.8l-.03-.64h-2.2c-.49 0-.8 0-1.04.02a1 1 0 0 0-.35.06 1 1 0 0 0-.35.35 1 1 0 0 0-.07.35c-.02.24-.02.55-.02 1.04v5.57c0 .5 0 .8.02 1.04s.05.31.07.34q.12.23.35.35c.03.02.11.05.34.07s.56.02 1.05.02h2.2q0-.34.02-.62.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02h1.42q.47 0 .83.02.4.01.82.2.61.31.92.93.2.41.21.8.03.37.02.84v1.4q0 .47-.02.83-.02.39-.21.81a2 2 0 0 1-.92.92q-.43.2-.82.21-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.21 2 2 0 0 1-.93-.92 2 2 0 0 1-.2-.81l-.03-.63h-2.24q-.68 0-1.16-.03a3 3 0 0 1-1.01-.26 2.6 2.6 0 0 1-1.14-1.14 3 3 0 0 1-.26-1q-.04-.5-.03-1.16v-1.93H2.9A.9.9 0 0 1 2 12c0-.5.4-.9.9-.9h5.23V9.18q0-.68.03-1.16.02-.51.26-1.02a2.6 2.6 0 0 1 1.14-1.13q.5-.24 1.02-.26.48-.04 1.16-.02h2.23q0-.34.02-.63.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02m-.84 1.84.15-.02c.16-.02.37-.02.72-.02h1.35c.36 0 .57 0 .72.02l.15.02a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.13l-.15.02-.72.01h-1.35l-.72-.01-.15-.03a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71V5.82q0-.5.02-.71l.02-.15a.3.3 0 0 1 .12-.12m0 11.02.15-.03.72-.01h1.35l.72.01.15.03a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.12l-.15.02c-.15.02-.36.02-.72.02h-1.35c-.35 0-.56 0-.72-.02l-.15-.02a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71v-1.34c0-.35 0-.56.02-.71l.02-.15a.3.3 0 0 1 .12-.13"></path><!>',1);function Im(t,e){let i=g(e,"isOpened",3,!1),o=m(()=>i()?"graph-close-icon":"graph-open-icon");Ye(t,{get testId(){return n(o)},children:(r,a)=>{var l=w2(),d=A(le(l));{var s=u=>{var f=x2();b(u,f)};M(d,u=>{i()&&u(s)})}b(r,l)},$$slots:{default:!0}})}function dc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),r=g(e,"disabled",3,!1),a=g(e,"graphIsOpened",3,!1),d=xe().ui.t,s=m(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=m(()=>o()?"hidden":"");Ot(t,{get className(){return n(u)},testId:"btn-graph",get disabled(){return r()},get ariaLabel(){return n(s)},get click(){return e.click},get ref(){return i()},set ref(f){i(f)},children:(f,p)=>{let v=m(()=>!!a());Im(f,{get isOpened(){return n(v)}})},$$slots:{default:!0}}),H()}import{PlaybackState as ib}from"@vkontakte/videoplayer-core/es2018";function cc(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(u,"$playbackState$",i),a=g(e,"isMobile",3,!1),l=g(e,"isLiveActive",3,!1),d=g(e,"ariaLabel",3,""),s=xe(),u=s.state.playbackState$,f=s.actions.internal.switchToActiveLive,p=s.actions.internal.togglePlay,v=m(()=>()=>{if(!l()){f();return}r()===ib.PAUSED&&p()}),_=m(()=>a()?"":"btn--live btn-full-opacity"),y=m(()=>l()?"btn-live":"btn-live-offset"),$=m(()=>l()&&r()===ib.PLAYING);Ot(t,{get className(){return n(_)},get testId(){return n(y)},get disabled(){return n($)},get ariaLabel(){return d()},get click(){return n(v)},children:(x,I)=>{Rd(x,{get isActive(){return l()}})},$$slots:{default:!0}}),H(),o()}import{noop as ob}from"@vkontakte/videoplayer-shared/es2018";var S2=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),C2=L('<img class="icon" aria-hidden="true"/>');function Qa(t,e){"use strict";let i=K(!1),o=()=>{D(i,!0)};var r=Ve(),a=le(r);{var l=s=>{var u=S2();b(s,u)},d=s=>{var u=C2();N(()=>De(u,"src",e.icon)),mt("error",u,o),La(u),b(s,u)};M(a,s=>{n(i)?s(l):s(d,!1)})}b(t,r)}function Em(t,e){B(e,!0);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,ob),r=g(e,"ref",15),a=m(()=>o()===ob),l=m(()=>n(a)||i()),d=m(()=>n(a)?"btn-full-opacity":"");Co(t,{get disabled(){return n(l)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get tooltipVisible(){return e.tooltipVisible},get ref(){return r()},set ref(s){r(s)},children:(s,u)=>{let f=m(()=>{var p;return(p=e.testId)!=null?p:e.id});Ot(s,{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)=>{Qa(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),H()}var nb=t=>!!t.buttonComponent;var Ws={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var Yu=(t,e,i,o)=>{if(t)for(let[r,a]of Object.entries(e))a.set(Xn(t,i,r,o))};import{interpolate as Pm}from"@vkontakte/videoplayer-shared/es2018";var rb=10,sb=40,Am=.2,I2=.5,E2=65,P2=114,A2=4,ab=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=m(()=>i?E2:P2),r=K(!1),a=K(0),l=K(0),d=m(()=>n(o)+rb-sb-A2),s=m(()=>Pm(n(a),[Am,1],[0,-n(d)])),u=m(()=>Pm(n(a),[Am,1],[0,sb])),f=m(()=>Pm(n(a),[Am,1],[0,n(o)+rb]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(f),onPointerDown:$=>{var x;D(l,((x=e())==null?void 0:x.getBoundingClientRect().bottom)||0,!0),D(r,!0)},onPointerMove:$=>{if(!n(r))return;let x=Math.max(Math.min($.clientY-n(l),0),-n(d));D(a,Math.abs(x/n(d)),!0)},onPointerUp:()=>{D(r,!1),D(a,n(a)>=I2?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{D(a,0)}}};var k2=t=>t;function va(t,{delay:e=0,duration:i=400,easing:o=k2}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var L2=L('<span class="root s-2c"> </span>'),M2={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 km(t,e){Q(t,M2);var i=L2(),o=C(i,!0);S(i),N(()=>he(o,e.time)),b(t,i)}var V2=L('<div class="tooltip-wrapper s-v"><div><!></div></div>'),R2={hash:"s-v",code:'.tooltip-wrapper.s-v{display:block;position:relative}.tooltip.s-v{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-v:after{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;left:50%;line-height:0;position:absolute;transform:translate(-50%,5px);width:0}.tooltip.active.s-v{opacity:1;visibility:visible}'};function Lm(t,e){Q(t,R2);let i=g(e,"active",3,!1),o=g(e,"pointer",3,!1),r=g(e,"translateXPx",3,0),a=g(e,"translateYPx",3,0),l=g(e,"leftOffset",3,0),d=g(e,"rightOffset",3,0),s=K(void 0),u=K(void 0);function f(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=m(()=>f(r()));var v=V2(),_=C(v);let y;var $=C(_);Xt($,()=>{var x;return(x=e.children)!=null?x:_t}),S(_),tt(_,x=>D(u,x),()=>n(u)),S(v),tt(v,x=>D(s,x),()=>n(s)),N(x=>{Ke(v,`transform: translate(${n(p)}px, ${a()}px);`),y=te(_,1,"tooltip s-v",null,y,x),Ke(_,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,v)}var lb=t=>Math.abs(t)/90%4===1;var D2=Ae('<path xmlns="http://www.w3.org/2000/svg" d="M15.782 10.152a.75.75 0 0 1-1.06 0L9.999 5.438l-4.72 4.716a.75.75 0 0 1-1.061-1.061l5.251-5.246a.75.75 0 0 1 1.06 0l5.253 5.246a.75.75 0 0 1 0 1.06Z"></path><path xmlns="http://www.w3.org/2000/svg" d="M15.782 16.152a.75.75 0 0 1-1.06 0l-4.723-4.715-4.72 4.716a.75.75 0 0 1-1.061-1.061l5.251-5.246a.75.75 0 0 1 1.06 0l5.253 5.245a.75.75 0 0 1 0 1.061Z"></path>',1);function Mm(t){Ye(t,{height:"20",width:"20",shadow:!0,children:(e,i)=>{var o=D2();Yt(),b(e,o)},$$slots:{default:!0}})}var N2=L('<div class="rich-seek-hint s-u"><span class="icon_wrapper s-u"><!></span> <span class="rich-seek-hint-text s-u"> </span></div>'),O2=L('<div class="preview s-u"><!></div>'),B2=L('<div class="episode s-u"><!></div>'),H2=L('<div class="time s-u"> </div>'),F2=L("<div><!> <!> <!></div>"),U2={hash:"s-u",code:".timeline-preview.s-u{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-u{bottom:72px}.preview.s-u{background-color:var(--timeline-preview-bg);border:1px solid var(--white);border-radius:8px;box-shadow:0 0 2px var(--timeline-preview-shadow),0 8px 24px var(--timeline-preview-shadow);display:flex;justify-content:center}.episode.s-u{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-u,.time.s-u{font-size:13px;font-weight:500;line-height:16px;text-align:center;text-shadow:0 8px 24px var(--timeline-preview-shadow),0 0 2px var(--timeline-preview-shadow)}.time.s-u{color:var(--white)}.rich-seek-hint.s-u{position:absolute;text-align:center;top:-12px;transform:translateY(-100%)}.icon_wrapper.s-u{display:inline-block;height:20px;margin-right:6px;vertical-align:top;width:20px}.rich-seek-hint-text.s-u{font-size:14px;line-height:18px;text-shadow:0 2px 4px rgba(0,0,0,.3),0 7px 16px rgba(0,0,0,.25);vertical-align:top}"};function Vm(t,e){B(e,!0),Q(t,U2);let[i,o]=Be(),r=()=>w(x,"$isMinimalView$",i),a=()=>w(I,"$rotateAlpha",i),l=()=>w(T,"$playerSize",i),d=()=>w(R,"$previewTrackAvailable",i),s={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),_=g(e,"duration",3,0),y=g(e,"isInteractive",3,!1),$=xe(),x=$.ui.isMinimalView$,I=$.ui.rotateAlpha,T=$.ui.playerSize,R=$.ui.previewTrackAvailable,k=K(0),P=K(0),E=K(""),W=K(0),U=K(0),z=K(0),Y=K(0),ie=m(()=>Du(v(),_(),p())),J=m(()=>!r()),oe=m(()=>Ul(a())),de=m(()=>lb(a())),ae=m($e),pe=m(()=>(n(de)?1:-1)*(n(k)/2-n(P)/2)),ee=m(()=>n(pe)*-1);He(()=>{(ke=>{D(k,ke.width,!0),D(P,ke.height,!0)})(ce())}),He(()=>{(ke=>{D(E,ke.imgSrc,!0),D(W,ke.imgWidth,!0),D(U,ke.imgHeight,!0),D(z,ke.imgOffsetX,!0),D(Y,ke.imgOffsetY,!0)})(Qe(v()))});function $e(){var Se;let ke=f()?s.MOBILE:s.DESKTOP,{isVertical:j}=Ee(),ne=30;return(Se=n(ie))!=null&&Se.text&&(ne+=16),(j||n(oe))&&(ne+=18,ne+=50),Math.min(Math.max(l().height-ne,0),ke)}function Ee(){let ke=e.previewThumbsData.frameWidth,j=e.previewThumbsData.frameHeight,ne=j>ke;return{width:ke,height:j,isHorizontal:!ne,isVertical:ne}}function ce(){let{height:ke,isHorizontal:j,isVertical:ne,width:Se}=Ee();return j&&(ke=ke/Se*n(ae),Se=n(ae)),ne&&(Se=Se/ke*n(ae),ke=n(ae)),{width:Se,height:ke}}function Qe(ke){let j;e.previewThumbsData.isUV?j=Math.floor(_()*ke/e.previewThumbsData.frequency):j=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*ke)));let ne=Math.floor(j/e.previewThumbsData.countPerImage),Se=Math.floor(j%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),Le=j%e.previewThumbsData.countPerRow,ze=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&ne===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(ze=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&ze++);let Ce=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&ne===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(Ce=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let we=n(k)*Ce,Fe=n(P)*ze,nt=-Le*n(k),ct=-Se*n(P);return{imgSrc:e.previewThumbsData.links[ne],imgWidth:we,imgHeight:Fe,imgOffsetX:nt,imgOffsetY:ct}}var fe=F2();let ve;var X=C(fe);{var O=ke=>{var j=O2(),ne=C(j);{var Se=Le=>{var ze=N2(),Ce=C(ze),we=C(Ce);Mm(we,{}),S(Ce);var Fe=A(Ce,2),nt=C(Fe,!0);S(Fe),S(ze),N(ct=>he(nt,ct),[()=>q("preview_track_notification_text")]),b(Le,ze)};M(ne,Le=>{d()&&Le(Se)})}S(j),N(()=>Ke(j,`width: ${n(k)}px; height: ${n(P)}px; background-image: url(${n(E)}); background-size: ${n(W)}px ${n(U)}px; background-position: ${n(z)}px ${n(Y)}px;
60
+ transform: rotate(${a()}deg) ${n(oe)?`translate(${n(pe)}px, ${n(ee)}px)`:""};
61
+ `)),b(ke,j)};M(X,ke=>{n(E)&&ke(O)})}var me=A(X,2);{var ue=ke=>{var j=B2(),ne=C(j);{var Se=Le=>{var ze=Ve(),Ce=le(ze);{var we=nt=>{var ct=gs();N(kt=>he(ct,kt),[()=>q("tooltip_episode_unfinished")]),b(nt,ct)},Fe=nt=>{var ct=gs();N(()=>he(ct,n(ie).text||"")),b(nt,ct)};M(Ce,nt=>{y()&&n(ie).completed===!1?nt(we):nt(Fe,!1)})}b(Le,ze)};M(ne,Le=>{n(ie)&&Le(Se)})}S(j),b(ke,j)};M(me,ke=>{n(J)&&ke(ue)})}var Re=A(me,2);{var Ze=ke=>{var j=H2(),ne=C(j,!0);S(j),N(()=>he(ne,u())),b(ke,j)};M(Re,ke=>{y()||ke(Ze)})}S(fe),N(ke=>{ve=te(fe,1,"timeline-preview s-u",null,ve,ke),Ke(fe,`width: ${n(oe)?n(P):n(k)}px;`)},[()=>({mobile:f()})]),b(t,fe),H(),o()}var z2=L('<span class="time s-g"> </span>'),W2=L("<!> <!>",1),K2={hash:"s-g",code:".time.s-g{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.timeline-slider{--slider-bg:var(--timeline-slider-bg);--slider-filled-bg:var(--timeline-slider-filled-bg);--slider-handle-bg:var(--timeline-slider-handle-bg);--slider-loaded-bg:var(--timeline-slider-loaded-bg)}"};function Rm(t,e){var Oe,be,Ne,Ie,gt;B(e,!0),Q(t,K2);let[i,o]=Be(),r=()=>w(J,"$interactiveEpisodes$",i),a=()=>w(E,"$duration$",i),l=()=>w(P,"$position$",i),d=()=>w(ae,"$isInteractiveExpectation$",i),s=()=>w(de,"$isInteractiveTime$",i),u=()=>w(Ee,"$previewTrackActive",i),f=()=>w(W,"$isLive$",i),p=()=>w($e,"$disabledControls$",i),v=()=>w(z,"$isMobile",i),_=()=>w(U,"$isActiveLive$",i),y=()=>w(k,"$bufferedProgress$",i),$=g(e,"showTimeline",3,!1),x=g(e,"withEpisodes",3,!0),I=g(e,"ref",15,void 0),T=xe(),R=At(),k=T.state.bufferedProgress$,P=T.state.positionWithScrubbing$,E=T.state.duration$,W=T.state.isLive$,U=T.state.isActiveLive$,z=T.ui.isMobile,Y=R.features.episodes&&x()?T.actions.internal.getVideoEpisodes():void 0,ie=T.actions.internal.getPreviewThumbsData(),J=T.state.interactiveEpisodes$,oe=T.state.isInteractive,de=T.state.isInteractiveTime$,ae=T.state.isInteractiveExpectation$,pe=T.actions.internal.correctSeekTimeToInteractive,ee=(Oe=T.callbacks)==null?void 0:Oe.onDisabledTimelineClick,$e=T.ui.controls.disabledControls$,Ee=T.ui.previewTrackActive,ce=(Ne=(be=T.callbacks)==null?void 0:be.uiInfo)==null?void 0:Ne.onTimelineMouseEnter,Qe=(gt=(Ie=T.callbacks)==null?void 0:Ie.uiInfo)==null?void 0:gt.onTimelineMouseLeave,fe=T.ui.t,ve=R.features.interactiveResponsiveUi,X=m(()=>oe?r():Y),O=m(()=>Ko(a())),me=m(()=>Ko(l())),ue=m(()=>l()/a()),Re=m(()=>d()||s()),Ze=K(!1),ke=K(""),j=K(0),ne=K(0),Se=K(0),Le=m(()=>({containerWidth:n(ne),translateXPx:n(j),translateYPx:oe&&ie?-36:-16,active:n(Ze)&&$()&&!n(Re)&&!ve&&!u(),pointer:!R.features.timelinePreview||!ie||f()})),ze=fe("aria_timeline"),Ce=m(()=>fe("aria_timeline_value",{position:n(me),duration:n(O)}));function we(ye){return!pe||!oe?ye:pe(ye*a())/a()}function Fe(ye,qe){var Ue;(Ue=e.onSliderPointerDown)==null||Ue.call(e,qe),T.actions.internal.startScrubbing(we(ye))}function nt(ye){s()||T.actions.internal.progressScrubbing(we(ye))}function ct(ye){var qe;T.actions.internal.completeScrubbing(we(ye)),D(Ze,!1),(qe=e.onSliderPointerUp)==null||qe.call(e)}function kt(ye,qe,Ue){var rt;(rt=e.onSliderPointerEnter)==null||rt.call(e,ye),yt(ye,qe,Ue),D(Ze,!0)}function at(ye,qe,Ue,rt){var Kt;(Kt=e.onSliderMove)==null||Kt.call(e,rt,ye),yt(ye,qe,Ue),D(Ze,!0)}function ti(){var ye;D(Ze,!1),(ye=e.onSliderLeave)==null||ye.call(e)}function yt(ye,qe,Ue){D(Se,we(ye),!0),D(j,qe,!0),Ue&&D(ne,Ue,!0),D(ke,Mt(ye),!0)}function Mt(ye){let qe=Ko((f()?1-ye:ye)*a());return f()?`-${qe}`:qe}let Vt=m(()=>p().has("TIMELINE"));var Wt=W2(),Te=le(Wt);Lm(Te,es(()=>n(Le),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(ye,qe)=>{var Ue=Ve(),rt=le(Ue);{var Kt=qt=>{Vm(qt,{get time(){return n(ke)},get isMobile(){return v()},get videoEpisodes(){return n(X)},get previewThumbsData(){return ie},get progress(){return n(Se)},get duration(){return a()},get isInteractive(){return oe}})},It=qt=>{var gi=z2(),Ai=C(gi,!0);S(gi),N(()=>he(Ai,n(ke))),b(qt,gi)};M(rt,qt=>{R.features.timelinePreview&&ie&&!f()?qt(Kt):qt(It,!1)})}b(ye,Ue)},$$slots:{default:!0}}));var G=A(Te,2);Ua(G,{className:"timeline-slider",get isActiveLive(){return _()},get isMobile(){return v()},get ariaLabel(){return ze},ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return l()},get ariaValueText(){return n(Ce)},get loadedProgress(){return y()},get filledProgress(){return n(ue)},get handleProgress(){return n(ue)},get videoEpisodes(){return n(X)},onPointerDown:Fe,onHandleMove:nt,onPointerMove:at,onPointerUp:ct,onPointerEnter:kt,onPointerLeave:ti,get onMouseEnter(){return ce},get onMouseLeave(){return Qe},get onDisabledClick(){return ee},get isInteractive(){return oe},get disabled(){return n(Vt)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:ct,get ref(){return I()},set ref(ye){I(ye)}}),b(t,Wt),H(),o()}var Q2={hash:"s-f",code:".timeline-ads-slider{--slider-bg:var(--timeline-slider-bg);--slider-filled-bg:var(--timeline-slider-filled-bg);--slider-handle-bg:var(--timeline-slider-handle-bg);--slider-loaded-bg:var(--timeline-slider-loaded-bg)}"};function uc(t,e){B(e,!0),Q(t,Q2);let[i,o]=Be(),r=()=>w(s,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"duration",3,0),d=xe(),s=d.ui.isMobile,u=d.ui.t,f=m(()=>Ko(l())),p=m(()=>Ko(a())),v=m(()=>a()/l()),_=m(()=>u("aria_timeline_value",{position:n(p),duration:n(f)})),y=m(()=>Math.round(n(v)*100));Ua(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n(_)},get filledProgress(){return n(v)},hideHandel:!0,get squareBorders(){return r()}}),H(),o()}var q2=L("<div><!></div>"),G2=L("<div></div>"),Y2={hash:"s-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 qa(t,e){B(e,!0),Q(t,Y2);let[i,o]=Be(),r=()=>w(x,"$isLive$",i),a=()=>w(R,"$isMobile",i),l=()=>w(k,"$disabled",i),d=()=>w(T,"$adPosition",i),s=()=>w(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),_=g(e,"ref",15,void 0),y=xe(),$=At(),x=y.state.isLive$,I=y.ads.duration,T=y.ads.position,R=y.ui.isMobile,k=se(!1),P=m(()=>!p()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var E=Ve(),W=le(E);{var U=Y=>{var ie=q2();let J;var oe=C(ie);{var de=pe=>{uc(pe,{get position(){return d()},get duration(){return s()}})},ae=pe=>{Rm(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 _()},set ref(ee){_(ee)}})};M(oe,pe=>{u()?pe(de):pe(ae,!1)})}S(ie),Vs(ie,()=>Ml(f()&&$.features.usePerformanceFix,k,$.disableInvisibleComponentsTimeout)),N(pe=>J=te(ie,1,"timeline s-d",null,J,pe),[()=>({withoutPadding:!v(),mobile:a(),"out-of-flow":l()})]),b(Y,ie)},z=Y=>{var ie=G2();let J;N(oe=>J=te(ie,1,"timeline-stub s-d",null,J,oe),[()=>({mobile:a()})]),b(Y,ie)};M(W,Y=>{n(P)?Y(U):Y(z,!1)})}b(t,E),H(),o()}import{getRangeAroundIndex as j2}from"@vkontakte/videoplayer-shared/es2018";import{ThinOneStat as X2}from"@vkontakte/videoplayer-statistics/es2018";var Z2=(t,e,i,o,r,a,l)=>{D(e,!0),D(i,t.clientX,!0),D(o,n(r),!0),a(l())},J2=L("<div></div>"),ew=L('<div><div class="track s-2b"></div></div>'),tw={hash:"s-2b",code:'.root.s-2b{display:flex;height:var(--preview-track-frame-height-horizontal);overflow:hidden;position:relative;width:100%}.root.is-vertical-video.s-2b,.root.vertically-rotated.s-2b{height:var(--preview-track-frame-height-vertical)}.root.s-2b:after{background-color:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.12);box-shadow:0 0 2px 0 rgba(0,0,0,.06);content:"";height:100%;margin:0 auto;pointer-events:none;width:3px;z-index:1}.track.s-2b{bottom:0;display:flex;left:0;padding:0 50%;top:0}.frame.s-2b,.track.s-2b{position:absolute}.frame.s-2b{background-position-x:calc(var(--column-index)*-1*var(--frame-width));background-position-y:calc(var(--frame-height)*-1*var(--row-index));background-size:calc(var(--frame-width)*var(--column-numbers)) calc(var(--frame-height)*var(--row-numbers));flex-shrink:0;height:var(--frame-height);pointer-events:none;transform-origin:center;width:var(--frame-width)}.vertically-rotated.s-2b .frame:where(.s-2b){transform-origin:0 0}.rotate-1.s-2b{transform:rotate(-90deg) translateX(-100%)}.rotate-2.s-2b{transform:rotate(-180deg)}.rotate-3.s-2b{transform:rotate(-270deg) translateY(-100%)}'};function Nm(t,e){B(e,!0),Q(t,tw);let[i,o]=Be(),r=()=>w(R,"$rotateAlpha",i),a=()=>w($,"$position$",i),l=()=>w(y,"$duration$",i),d=xe(),{countPerImage:s=0,countPerRow:u=0,countTotal:f=0,links:p=[],frameHeight:v=0,frameWidth:_=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:$}=d.state,{startScrubbing:x,progressScrubbing:I,completeScrubbing:T}=d.actions.internal,R=d.ui.rotateAlpha,k=K(void 0),P=K(!1),E=K(0),W=K(0),U=K(0),z=K(0),Y=m(()=>v<=_),ie=m(()=>Ul(r())),J=m(()=>n(Y)?!n(ie):n(ie)),oe=114,de=65,ae=3,pe=m(()=>n(J)?oe:de),ee=m(()=>n(Y)?oe:de),$e=m(()=>n(Y)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),Ee=m(()=>f*n(pe)),ce=K(0);He(()=>{D(z,Math.ceil(-n(U)/n(pe))-1),D(U,-n(Ee)*a()/l())});let Qe=()=>{T(fe(),!0,X2.ActionSeekType.RICH)},fe=()=>l()*-n(U)/n(Ee)/l(),ve=!1,X=Ce=>{if(!n(P))return!1;let we=Ce.clientX-n(E);D(U,n(W)+we),D(U,Math.max(Math.min(n(U),0),-n(Ee)),!0),Math.abs(we)>1&&(ve=!0),I(fe())},O=Ce=>{n(P)&&(D(P,!1),!ve&&Ce&&D(U,-(Ce.offsetX-n(ce)/2)),ve=!1,Qe())},me=()=>{n(P)&&O()},ue=m(()=>s/u),Re=(Ce,we)=>{if(Ce!==p.length-1)return u;let Fe=0,nt=we*u;for(let ct=1;ct<=u;ct++)Ce*s+Fe+nt<f&&Fe++;return Fe},Ze=m(()=>Math.floor(n(z)/s)),ke=m(()=>j2(3,n(Ze),p.length-1)),j=(Ce,we,Fe)=>{let nt=s*n(pe);return Ce*nt+we*n(pe)*u+n(ce)/2-ae/2+Fe*n(pe)},ne=m(()=>[`--row-numbers: ${n(ue)}`,`--column-numbers: ${u}`,`--frame-width: ${n(ee)}px`,`--frame-height: ${n($e)}`].join(";"));var Se=ew();let Le;var ze=C(Se);ze.__pointerdown=[Z2,P,E,W,U,x,fe],ze.__pointermove=X,ze.__pointerup=O,_i(ze,20,()=>n(ke),Ce=>Ce,(Ce,we)=>{var Fe=Ve(),nt=le(Fe);_i(nt,16,()=>Array.from({length:n(ue)},(ct,kt)=>kt),ct=>ct,(ct,kt)=>{var at=Ve(),ti=le(at);_i(ti,16,()=>Array.from({length:Re(we,kt)},(yt,Mt)=>Mt),yt=>yt,(yt,Mt)=>{var Vt=J2();N((Wt,Te)=>{Ke(Vt,Wt),te(Vt,1,Te,"s-2b")},[()=>`--row-index: ${kt}; --column-index: ${Mt}; left: ${j(we,kt,Mt)}px; background-image: url(${p[we]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),b(yt,Vt)}),b(ct,at)}),b(Ce,Fe)}),S(ze),S(Se),tt(Se,Ce=>D(k,Ce),()=>n(k)),N(Ce=>{Le=te(Se,1,"root s-2b",null,Le,Ce),Ke(Se,n(ne)),Ke(ze,`transform: translateX(${n(U)}px); width: ${n(Ee)}px;`)},[()=>({"is-vertical-video":!n(Y),"vertically-rotated":n(ie)})]),mt("mouseleave",ze,me),kn(Se,"clientWidth",Ce=>D(ce,Ce)),b(t,Se),H(),o()}Xe(["pointerdown","pointermove","pointerup"]);var iw=L('<div class="notification s-2a"><span class="description s-2a"> </span></div>'),ow={hash:"s-2a",code:".notification.s-2a{background:var(--notification-bg);border-radius:var(--notification-radius);padding:9px 14px 10px 12px}.description.s-2a{font-size:14px;line-height:18px}"};function Om(t,e){B(e,!1),Q(t,ow);let i=340,{ui:{t:o}}=xe();Wo();var r=iw(),a=C(r),l=C(a,!0);S(a),S(r),N(d=>he(l,d),[()=>o("preview_track_close_tooltip")],mr),Rs(3,r,()=>va,()=>({duration:i})),b(t,r),H()}import{getRangeAroundIndex as nw}from"@vkontakte/videoplayer-shared/es2018";var rw=L('<div class="preview-track-close tooltip s-28"><!></div>'),sw=L('<div class="preview-track-control s-28"><!> <div class="preview-track-close s-28"><!></div> <!></div>'),aw=L('<div class="wrapper-preview-track s-28"><!></div>'),lw=L('<div class="enriched-timeline s-28"><!> <!> <!></div>'),dw={hash:"s-28",code:".enriched-timeline.s-28{padding:var(--timeline-padding-vertical-top) var(--timeline-padding-horizontal) var(--timeline-padding-vertical-bottom);pointer-events:auto;position:relative}.preview-track-control.s-28{align-items:center;display:flex;justify-content:center;left:0;padding:0 calc(var(--timeline-padding-horizontal));pointer-events:none;position:absolute;right:0;top:calc((var(--timeline-height) + var(--preview-track-controls-top))*-1)}.preview-track-close.s-28{pointer-events:auto;position:absolute;right:calc(var(--timeline-padding-horizontal))}.preview-track-close.tooltip.s-28{bottom:32px;opacity:0;transition:opacity .2s}.preview-track-close.s-28:hover+.tooltip:where(.s-28){opacity:1}.wrapper-preview-track.s-28{box-sizing:border-box;left:0;overflow:hidden;padding:0 calc(var(--timeline-padding-horizontal));position:absolute;right:0;z-index:-1}"};function Bm(t,e){B(e,!0),Q(t,dw);let[i,o]=Be(),r=()=>w($,"$playerSize",i),a=()=>w(y,"$duration$",i),l=()=>w(x,"$previewTrackActive",i),d=()=>w(v,"$position$",i),s=()=>w(_,"$isRewindableLive$",i),u=g(e,"timelineRef",15,void 0),f=xe(),p=200,{positionWithScrubbing$:v,isRewindableLive$:_,duration$:y}=f.state,{playerSize:$,previewTrackActive:x}=f.ui,{countPerImage:I=0,links:T=[],frequency:R=0}=f.actions.internal.getPreviewThumbsData()||{},k=m(()=>r().width>100),P=K(!d_()),E=()=>{n(P)&&(l_(),D(P,!1))},W=pe=>{let ee=Math.floor(a()*pe/R),$e=Math.floor(ee/I),Ee=nw(3,$e,T.length-1);for(let ce of Ee){let Qe=new Image;Qe.src=T[ce]}},U=(pe,ee)=>{W(ee),!l()&&e.onTimelineMove(pe)};var z=lw(),Y=C(z);{var ie=pe=>{var ee=sw(),$e=C(ee);let Ee=m(()=>Ko(d()));km($e,{get time(){return n(Ee)}});var ce=A($e,2),Qe=C(ce);Ns(Qe,{onClick:()=>f.actions.internal.closePreviewTrack()}),S(ce);var fe=A(ce,2);{var ve=X=>{var O=rw(),me=C(O);Om(me,{}),S(O),b(X,O)};M(fe,X=>{n(P)&&X(ve)})}S(ee),mt("mouseleave",ce,E),Rs(3,ee,()=>va,()=>({duration:p})),b(pe,ee)};M(Y,pe=>{l()&&pe(ie)})}var J=A(Y,2);let oe=m(()=>!n(k));qa(J,{get isHidden(){return n(oe)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return s()},onSliderMove:U,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:W,get ref(){return u()},set ref(pe){u(pe)}});var de=A(J,2);{var ae=pe=>{var ee=aw(),$e=C(ee);Nm($e,{}),S(ee),N(()=>Ke(ee,`height: ${e.animatedPreviewTrackHeight}px;`)),b(pe,ee)};M(de,pe=>{e.previewTrackAvailable&&pe(ae)})}S(z),N(()=>Ke(z,`transform: translateY(${e.animatedOffsetY}px);`)),b(t,z),H(),o()}var uw=L('<div><!> <div data-testid="player_controls"><div class="controls-left s-w"><!> <!> <!></div> <div class="controls-right s-w"></div></div></div> <!>',1),pw={hash:"s-w",code:'.wrapper-bottom.s-w{bottom:0;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;left:0;pointer-events:none;position:absolute;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);width:100%;will-change:transform;z-index:var(--controls-container-z-index)}.wrapper-bottom.s-w:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-w>:where(.s-w){pointer-events:auto}.controls.s-w{align-items:center;box-sizing:border-box;display:flex;font-size:13px;height:var(--controls-height);justify-content:space-between;padding:0 var(--controls-desktop-padding-horizontal) 4px;white-space:nowrap;width:100%}.controls.minimal-view.s-w{padding:0 var(--controls-desktop-padding-horizontal-minimal-view) 8px}.controls-left.s-w,.controls-right.s-w{align-content:center;display:flex}.controls-left.s-w{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-w >:not(:first-child),.controls-right.s-w >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-w{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-w{transition:none}'};function Fm(t,e){var _a,sl;B(e,!0),Q(t,pw);let[i,o]=Be(),r=()=>w(To,"$disabledControls$",i),a=()=>w(Qt,"$adPlaybackState",i),l=()=>w(gi,"$playbackState$",i),d=()=>w(ho,"$currentSubtitle$",i),s=()=>w(Gi,"$isEnded$",i),u=()=>w(Io,"$currentGridType$",i),f=()=>w(Kt,"$isMinimalView$",i),p=()=>w(oi,"$isLive$",i),v=()=>w(yi,"$chromecastState$",i),_=()=>w(Yi,"$isPictureInPictureActive",i),y=()=>w(Ct,"$pictureInPictureType$",i),$=()=>w(ji,"$availableSubtitlesList$",i),x=()=>w(it,"$contextMenuOpenedByKeyboard$",i),I=()=>w(F,"$showContextMenuBtn$",i),T=()=>w(ai,"$isRewindableLive$",i),R=()=>w(ut,"$isActiveLive$",i),k=()=>w(br,"$graphIsOpened$",i),P=()=>w(dn,"$contextMenuVisible$",i),E=()=>w(wt,"$isFullscreen",i),W=()=>w(cn,"$autoplayNextEnabled",i),U=()=>w(n(Yo),"$prevButton",i),z=()=>w(n(Ao),"$replayButton",i),Y=()=>w(n(jo),"$playButton",i),ie=()=>w(n(Xi),"$nextButton",i),J=()=>w(n(yn),"$playPrevChapterButton",i),oe=()=>w(n(Sr),"$seekToInteractiveButton",i),de=()=>w(n(xn),"$interactiveGraphButton",i),ae=()=>w(n(Bn),"$liveButton",i),pe=()=>w(n(rs),"$time",i),ee=()=>w(n(ss),"$episodes",i),$e=()=>w(n(as),"$vkLogo",i),Ee=()=>w(n(Zi),"$volume",i),ce=()=>w(n(ls),"$subtitles",i),Qe=()=>w(n(zr),"$settings",i),fe=()=>w(n(fo),"$context",i),ve=()=>w(n(Cr),"$fullscreen",i),X=()=>w(n(Je),"$chromecast",i),O=()=>w(Rn,"$additionalDesktopControlPanelRightButtons$",i),me=()=>w(oo,"$playerSize",i),ue=()=>w(_o,"$isInteractiveTime$",i),Re=()=>w(Mo,"$previewTrackActive",i),Ze=()=>w(fi,"$settingsMenuVisible",i),ke=()=>w(ko,"$settingButtonRef$",i),j=()=>w(Ht,"$startedByKeyboard$",i),ne=()=>w(Ai,"$isAudioAvailable$",i),Se=()=>w(Te,"$fakeIsPlaying$",i),Le=()=>w(os,"$seekToInteractiveDisabledTooltip$",i),ze=()=>w(Vo,"$isPreviewTrackHorizontallyAligned$",i),Ce=()=>w(Er,"$previewTrackAvailable",i),we=()=>w(lr,"$previewTrackDragInProgress",i),Fe=()=>w(ui,"$adPosition",i),nt=()=>w(qt,"$position$",i),ct=()=>w(ni,"$adDuration",i),kt=()=>w(It,"$duration$",i),at=g(e,"playerControlsWrapperRef",15,void 0),ti=g(e,"playerControlsRef",15,void 0),yt=g(e,"isAds",3,!1),Mt=g(e,"logoTargetUrl",3,""),Vt=g(e,"isOneVideoPlaylist",3,!1),Wt=g(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:Te}=go(),G=xe(),Oe=go(),be=At(),Ne=G.actions.internal.toggleMuted,Ie=G.actions.internal.togglePlay,gt=G.actions.internal.pause,ye=G.actions.internal.toggleSubtitle,qe=G.actions.internal.checkFullscreenSupport,Ue=(_a=G.callbacks)==null?void 0:_a.onAudioDoesNotExistHint,rt=(sl=G.callbacks)==null?void 0:sl.onAudioDisabledHint,Kt=G.ui.isMinimalView$,It=G.state.duration$,qt=G.state.positionWithScrubbing$,gi=G.state.playbackState$,Ai=G.state.isAudioAvailable$,Ii=G.state.isAudioDisabled,Gi=G.state.isEnded$,oi=G.state.isLive$,ut=G.state.isActiveLive$,ai=G.state.isRewindableLive$,{isActive$:Yi,type$:Ct}=Oe.pictureInPicture$,fi=G.ui.settingsMenu.visible$,di=G.ui.settingsMenu.openedByBtnKeyboard$,We=G.ui.controls,st=G.actions.internal.getVideoEpisodes(),yi=G.state.chromecastState$,ji=G.state.availableSubtitlesList$,ho=G.state.currentSubtitle$,To=We.disabledControls$,dn=G.ui.contextMenu.visible$,F=G.ui.contextMenu.showContextMenuBtn$,it=G.ui.contextMenu.openedByBtnKeyboard$,Ht=G.ui.startedByKeyboard$,ci=G.ui.controlBlocks,dt=G.ui.t,ni=G.ads.duration,ui=G.ads.position,Qt=G.ads.playbackState,wt=G.ui.isFullscreen,oo=G.ui.playerSize,Io=G.ui.currentGridType$,Rn=G.ui.additionalDesktopControlPanelRightButtons$,cn=G.ui.autoplayNextEnabled$,Ei=G.actions.internal.getVideoElement,bi=G.actions.internal.replayInteractive,Qo=G.actions.internal.prevVideoClick,Jn=G.actions.internal.nextVideoClick,mi=G.state.isInteractive,_o=G.state.isInteractiveTime$,un=G.state.showInteractiveGraph,Eo=G.state.showSeekToInteractive,pn=G.state.showPlayPrevChapter,xs=G.state.showInteractiveTimeIndicator,ws=G.state.playPrevChapterDisabledTooltip,os=Oe.seekToInteractiveDisabledTooltip$,br=Oe.graphIsOpened$,fn=be.features.interactiveResponsiveUi,mn=m(()=>r().has("EPISODE_BUTTON")),er=m(()=>r().has("GRAPH_BUTTON")),$r=m(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),tr=m(()=>r().has("PLAY_BUTTON")),Dr=m(()=>r().has("REPLAY_BUTTON")),Nr=m(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),Dn=()=>G.actions.internal.toggleChromecast(),ir=m(()=>yt()?a()==="playing":l()===Hm.PLAYING),Nn=m(()=>d().value!=="off"),or=m(()=>s()&&!yt()||mi),Or=m(()=>fn?n(or)&&io(u(),"m"):n(or)),Br=m(()=>!s()||mi||yt()),xi=m(()=>!f()&&io(u(),"m")),ns=m(()=>e.showNextPrevButtons&&!f()&&io(u(),"m")&&!yt()&&e.nextButtonActive),qo=m(()=>e.showNextPrevButtons&&!f()&&io(u(),"m")&&!yt()&&e.prevButtonActive),vt=m(()=>!yt()&&!!p()),Gt=m(()=>!f()&&v()!==db.NOT_AVAILABLE&&!(_()&&y()===1)&&io(u(),"m")&&!mi&&!yt()),nr=m(()=>e.showAutoplayNext&&!f()&&!Vt()&&io(u(),"s")),On=m(()=>!f()&&$().length>0&&io(u(),"m")),Hr=m(()=>x()||I()),yr=m(()=>io(u(),"s")&&!yt()),Fr=m(()=>!e.logoHidden&&!yt()&&!f()),vn=m(()=>be.features.fullscreen&&qe()&&(e.logoHidden||io(u(),fn?"xs":"s"))&&!(_()&&y()===1)&&(mi?Wt():!0)),Go=m(()=>(!p()||yt())&&!(be.features.interactiveHideTime&&mi)),gn=m(()=>un&&io(u(),"m")),xr=m(()=>fn?Eo&&io(u(),"s"):Eo),wr=m(()=>fn?pn&&io(u(),"s"):pn),hn=m(()=>!f()&&!yt()&&!p()&&!!(st!=null&&st.length)&&n(xi)&&!n(mn)),_n=m(()=>!T()||!!R()),rr=m(()=>k()?dt("tooltip_interactive_graph_on"):dt("tooltip_interactive_graph_off")),Pi=m(()=>P()?dt("tooltip_context_menu_close"):dt("tooltip_context_menu_open")),bo=(ft,lt)=>ft?lt&&lt===Hm.PAUSED?dt("tooltip_play"):"":dt("tooltip_live"),Po=m(()=>bo(n(_n),l())),no=m(()=>be.logoType==="vk_video"?dt("tooltip_vk_video_logo"):dt("tooltip_vk_logo")),bn=m(()=>n(Nn)?dt("tooltip_subtitles_on"):dt("tooltip_subtitles_off")),$n=m(()=>E()?dt("tooltip_fullscreen_on"):dt("tooltip_fullscreen_off")),Ur=m(()=>v()===db.CONNECTED?dt("tooltip_chromecast_on"):dt("tooltip_chromecast_off")),xt=m(()=>W()?dt("tooltip_autoplay_on"):dt("tooltip_autoplay_off")),ri=K(0),Ut=ii({}),po=ii({}),Yo=m(()=>We.prevButton),Ao=m(()=>We.replayButton),jo=m(()=>We.playButton),Xi=m(()=>We.nextButton),yn=m(()=>We.playPrevChapterButton),Sr=m(()=>We.seekToInteractiveButton),xn=m(()=>We.interactiveGraphButton),Bn=m(()=>We.liveButton),rs=m(()=>We.time),ss=m(()=>We.episodes),as=m(()=>We.vkLogo),Zi=m(()=>We.volume),ls=m(()=>We.subtitles),zr=m(()=>We.settings),fo=m(()=>We.context),Cr=m(()=>We.fullscreen),Je=m(()=>We.chromecast),ht=m(()=>({prevButton:U()?U().right-U().left:0,replayButton:z()?z().right-z().left:0,playButton:Y()?Y().right-Y().left:0,nextButton:ie()?ie().right-ie().left:0,playPrevChapterButton:J()?J().right-J().left:0,seekToInteractiveButton:oe()?oe().right-oe().left:0,interactiveGraphButton:de()?de().right-de().left:0,liveButton:ae()?ae().right-ae().left:0,time:pe()?pe().right-pe().left:0,episodes:ee()?ee().right-ee().left:0,vkLogo:$e()?$e().right-$e().left:0,volume:Ee()?Ee().right-Ee().left:0,subtitles:ce()?ce().right-ce().left:0,settings:Qe()?Qe().right-Qe().left:0,context:fe()?fe().right-fe().left:0,fullscreen:ve()?ve().right-ve().left:0,chromecast:X()?X().right-X().left:0,additionalButtons:O().length?O().reduce(ft=>[...ft,40],[]):[]})),jt=K(0);He(()=>{(!n(jt)||n(jt)<n(ht).time)&&Tt(()=>D(jt,n(ht).time,!0))});let ki=K(!1);He(()=>{let ft=0;n(hn)&&(io(u(),"xl")?ft=n(ht).time:ft=60);let lt=n(ht).prevButton+n(ht).playButton+n(ht).nextButton+n(ht).seekToInteractiveButton+n(ht).interactiveGraphButton+n(ht).liveButton+n(jt)+ft;D(ki,n(Go)&&n(ri)>=lt,!0)});let ro=m(()=>n(ki)&&io(u(),"m")),Ri=cb(Kl,260),mo=cb(Yu,260);He(()=>{me(),ue(),Re(),Ri(Ei(),We,Ut,e.showControls),mo(Ei(),ci,po,e.showControls)}),He(()=>{po.bottom=at()});let ko=se();He(()=>{Ze(),ke()&&Tt(()=>Rl(ke(),Ze(),di))});let wn;He(()=>{j(),Tt(()=>qu(Ht,j(),wn))});function Hn(){ca({isAudioDisabled:Ii,isAudioAvailable:ne(),isAds:yt(),audioIsNotExistHintCallback:Ue,audioDisabledHintCallback:rt})&&Ne()}let vo=mi?bi:Ie,Xo=m(()=>Se()!==null),Tr=m(()=>n(Xo)?Se():n(ir)),Ir=m(()=>n(Tr)?dt("tooltip_pause"):dt("tooltip_play")),$o=dt("tooltip_episodes"),sr=m(()=>{var ft,lt,Mi,Do;return n(qo)?{id:"prevButton",type:"desktop-control-panel-left",weight:Us.prevButton,buttonComponent:Ka,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:Qo.bind(null,!0)},tooltipEnabled:!((lt=(ft=G.callbacks)==null?void 0:ft.uiInfo)!=null&&lt.onPrevButtonMouseEnter)&&!((Do=(Mi=G.callbacks)==null?void 0:Mi.uiInfo)!=null&&Do.onPrevButtonMouseLeave),mouseEnter:()=>{var Ui,vi,Di;(Di=(vi=(Ui=G.callbacks)==null?void 0:Ui.uiInfo)==null?void 0:vi.onPrevButtonMouseEnter)==null||Di.call(vi,Xn(Ei(),Ut,"prevButton",e.showControls))},mouseLeave:()=>{var Ui,vi,Di;(Di=(vi=(Ui=G.callbacks)==null?void 0:Ui.uiInfo)==null?void 0:vi.onPrevButtonMouseLeave)==null||Di.call(vi,Xn(Ei(),Ut,"prevButton",e.showControls))},tooltipText:dt("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),Fn=m(()=>n(Or)?{id:"replayButton",type:"desktop-control-panel-left",weight:Us.replayButton,buttonComponent:Ql,buttonComponentProps:{disabled:n(Dr),click:vo},tooltipText:dt("tooltip_restart"),disabled:n(Dr)}:void 0),ds=m(()=>n(Br)?{id:"playButton",type:"desktop-control-panel-left",weight:Us.playButton,buttonComponent:ql,buttonComponentProps:{disabled:n(tr),isPlaying:n(ir),click:Ie},tooltipText:n(Ir),disabled:n(tr)}:void 0),et=m(()=>{var ft,lt,Mi,Do;return n(ns)?{id:"nextButton",type:"desktop-control-panel-left",weight:Us.nextButton,buttonComponent:Ka,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:Jn.bind(null,!0)},tooltipEnabled:!((lt=(ft=G.callbacks)==null?void 0:ft.uiInfo)!=null&&lt.onNextButtonMouseEnter)&&!((Do=(Mi=G.callbacks)==null?void 0:Mi.uiInfo)!=null&&Do.onNextButtonMouseLeave),mouseEnter:()=>{var Ui,vi,Di;(Di=(vi=(Ui=G.callbacks)==null?void 0:Ui.uiInfo)==null?void 0:vi.onNextButtonMouseEnter)==null||Di.call(vi,Xn(Ei(),Ut,"nextButton",e.showControls))},mouseLeave:()=>{var Ui,vi,Di;(Di=(vi=(Ui=G.callbacks)==null?void 0:Ui.uiInfo)==null?void 0:vi.onNextButtonMouseLeave)==null||Di.call(vi,Xn(Ei(),Ut,"nextButton",e.showControls))},tooltipText:dt("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Dt=m(()=>mi&&n(wr)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Us.playPrevChapterButton,buttonComponent:sc,buttonComponentProps:{disabled:n(Nr),click:e.playPrevChapter},tooltipText:dt("tooltip_interactive_go_back"),disabledTooltipContent:dt(ws),disabled:n(Nr)}:void 0),wi=m(()=>mi&&n(xr)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Us.seekToInteractiveButton,buttonComponent:lc,buttonComponentProps:{disabled:n($r),click:e.seekToInteractive},tooltipText:dt("tooltip_interactive_seek"),disabled:n($r),disabledTooltipContent:dt(Le())}:void 0),Zo=m(()=>mi&&n(gn)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Us.interactiveGraphButton,buttonComponent:dc,buttonComponentProps:{disabled:n(er),click:br.toggle,graphIsOpened:k()},tooltipText:n(rr)}:void 0),Lo=m(()=>n(vt)?{id:"liveButton",type:"desktop-control-panel-left",weight:Us.liveButton,buttonComponent:cc,buttonComponentProps:{isLiveActive:n(_n),ariaLabel:n(Po)},tooltipText:n(Po),disabled:n(_n)&&l()===Hm.PLAYING}:void 0),Wr=m(()=>[n(sr),n(Fn),n(ds),n(et),n(Dt),n(wi),n(Zo),n(Lo)].filter(ft=>!!ft).sort(Oa)),Jo=m(()=>n(Fr)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Ws.vkLogo,buttonComponent:Yd,buttonComponentProps:{targetUrl:Mt(),logoClickable:e.logoClickable,click:gt},tooltipText:n(no),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),ar=m(()=>n(nr)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Ws.autoplayNext,buttonComponent:ac,tooltipText:n(xt)}:void 0),Kr=m(()=>({id:"volume",type:"desktop-control-panel-right",weight:Ws.volume,buttonComponent:rm,buttonComponentProps:{click:Hn,isAds:yt()}})),Ss=m(()=>n(On)?{id:"subtitles",type:"desktop-control-panel-right",weight:Ws.subtitles,buttonComponent:em,buttonComponentProps:{isSubtitlesEnabled:n(Nn),click:ye},tooltipText:n(bn)}:void 0),Ks=m(()=>n(yr)?{id:"settings",type:"desktop-control-panel-right",weight:Ws.settings,buttonComponent:Bl,buttonComponentProps:{ref$:ko},tooltipText:Ze()?void 0:dt("tooltip_settings_off")}:void 0),Un=m(()=>be.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Ws.context,buttonComponent:Sm,buttonComponentProps:{ariaLabel:dt("aria_label_context_menu")},className:n(Hr)?"":"out-of-view",tooltipText:n(Pi)}:void 0),ga=m(()=>n(vn)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Ws.fullscreen,buttonComponent:Gd,buttonComponentProps:{isFullscreen:E(),click:e.toggleFullscreen},tooltipText:n($n)}:void 0),pt=m(()=>n(Gt)?{id:"chromecast",type:"desktop-control-panel-right",weight:Ws.chromecast,buttonComponent:Xd,buttonComponentProps:{state:v(),click:Dn},tooltipText:n(Ur)}:void 0),si=m(()=>[n(Jo),n(ar),n(Kr),n(Ss),n(Ks),n(Un),n(ga),n(pt),...O()].filter(ft=>!!ft).sort(Oa)),Mo=G.ui.previewTrackActive,lr=G.ui.previewTrackDragInProgress,Er=G.ui.previewTrackAvailable,Vo=G.ui.isPreviewTrackHorizontallyAligned,Si=m(()=>ab({onPreviewTrackOpened:G.actions.internal.previewTrackOpened,getTimelineRef:()=>Ut.timeline,isHorizontal:ze()})),cs=m(()=>n(Si).progressBarY),so=m(()=>n(Si).controlsY),Fi=m(()=>n(Si).onPointerDown),en=m(()=>n(Si).onPointerMove),zn=m(()=>n(Si).onPointerUp),Qr=m(()=>n(Si).calculatedHeight),ge=m(()=>n(Si).closePreviewTrack);He(()=>{Re()||n(ge)()});let St;Pt(()=>()=>St&&clearTimeout(St));let hi=ft=>{Re()||!Ce()||(n(Fi)(ft),St=setTimeout(()=>{G.actions.internal.previewTrackDragStarted()},200))},Li=()=>{Re()||n(zn)(),St&&clearTimeout(St),we()&&G.actions.internal.previewTrackDragFinished()},Ro=ft=>{n(en)(ft)},yo=-(parseInt("24")/2+4);var Ji=uw(),tn=le(Ji);let Cs;var Ts=C(tn);{var Qs=ft=>{let lt=m(()=>n(cs)()),Mi=m(()=>n(Qr)());Bm(ft,{get animatedOffsetY(){return n(lt)},get animatedPreviewTrackHeight(){return n(Mi)},get canRewindLive(){return e.canRewindLive},get isAds(){return yt()},onTimelineMove:Ro,onTimelinePointerDown:hi,onTimelinePointerUp:Li,get previewTrackAvailable(){return Ce()},get timelineRef(){return Ut.timeline},set timelineRef(Do){Ut.timeline=Do}})};M(Ts,ft=>{e.showControls&&ft(Qs)})}var qr=A(Ts,2);let qs;var Sn=C(qr),ha=C(Sn);_i(ha,17,()=>n(Wr),ft=>ft.id,(ft,lt)=>{Gu(ft,{get buttonComponent(){return n(lt).buttonComponent},get buttonComponentProps(){return n(lt).buttonComponentProps},get tooltipText(){return n(lt).tooltipText},get disabledTooltipContent(){return n(lt).disabledTooltipContent},get disabled(){return n(lt).disabled},get className(){return n(lt).className},get tooltipEnabled(){return n(lt).tooltipEnabled},get mouseEnter(){return n(lt).mouseEnter},get mouseLeave(){return n(lt).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return Ut[n(lt).id]},set ref(Mi){Ut[n(lt).id]=Mi}})});var il=A(ha,2);{var Pr=ft=>{let lt=m(()=>!e.showControls),Mi=m(()=>yt()?Fe():nt()),Do=m(()=>yt()?ct():kt());Qd(ft,{get isHidden(){return n(lt)},isMobile:!1,get showDuration(){return n(ro)},get position(){return n(Mi)},get duration(){return n(Do)},get ref(){return Ut.time},set ref(Ui){Ut.time=Ui}})};M(il,ft=>{n(Go)&&ft(Pr)})}var jl=A(il,2);let ol=m(()=>!n(hn));Co(jl,{className:"w-max",get disabled(){return n(ol)},get tooltipContent(){return $o},get tooltipVisible(){return e.showControls},tooltipPlacement:"top-left",get initialTranslateXPx(){return yo},get ref(){return Ut.episodes},set ref(ft){Ut.episodes=ft},children:(ft,lt)=>{var Mi=Ve(),Do=le(Mi);{var Ui=vi=>{Zd(vi,{get position(){return nt()},get duration(){return kt()},get timeCodes(){return st}})};M(Do,vi=>{n(hn)&&vi(Ui)})}b(ft,Mi)},$$slots:{default:!0}}),S(Sn);var nl=A(Sn,2);_i(nl,21,()=>n(si),ft=>ft.id,(ft,lt)=>{var Mi=Ve(),Do=le(Mi);{var Ui=Di=>{Gu(Di,{get buttonComponent(){return n(lt).buttonComponent},get buttonComponentProps(){return n(lt).buttonComponentProps},get tooltipText(){return n(lt).tooltipText},get disabledTooltipContent(){return n(lt).disabledTooltipContent},get disabled(){return n(lt).disabled},get className(){return n(lt).className},get tooltipVisible(){return e.showControls},get ref(){return Ut[n(lt).id]},set ref(ba){Ut[n(lt).id]=ba}})},vi=Di=>{let ba=m(()=>!!n(lt).disabled);Em(Di,{get id(){return n(lt).id},get testId(){return n(lt).testId},get icon(){return n(lt).icon},get ariaLabel(){return n(lt).ariaLabel},get tooltipText(){return n(lt).tooltipText},get disabledTooltipContent(){return n(lt).disabledTooltipContent},get disabled(){return n(ba)},get onClick(){return n(lt).onClick},get disableMouseupTooltipShow(){return n(lt).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return Ut[n(lt).id]},set ref(al){Ut[n(lt).id]=al}})};M(Do,Di=>{nb(n(lt))?Di(Ui):Di(vi,!1)})}b(ft,Mi)}),S(nl),S(qr),tt(qr,ft=>ti(ft),()=>ti()),S(tn),tt(tn,ft=>at(ft),()=>at());var rl=A(tn,2);{var Xl=ft=>{nc(ft,{get ref(){return Ut.interactiveTimeIndicator},set ref(lt){Ut.interactiveTimeIndicator=lt}})};M(rl,ft=>{xs&&ft(Xl)})}N((ft,lt,Mi)=>{Cs=te(tn,1,"wrapper-bottom s-w",null,Cs,ft),Ke(tn,`transform: ${e.showControls?"translateY(0)":"translateY(100%)"}`),qs=te(qr,1,"controls s-w",null,qs,lt),Ke(qr,Mi),qr.inert=Re()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||we()}),()=>({"minimal-view":f()}),()=>`transform: translateY(${n(so)()}px);`]),kn(Sn,"clientWidth",ft=>D(ri,ft)),b(t,Ji),H(),o()}import{ChromecastState as pb,PlaybackState as fb}from"@vkontakte/videoplayer-core/es2018";import{noop as ub}from"@vkontakte/videoplayer-shared/es2018";var fw=L('<div class="icon icon-error-stub s-1y"><div class="inner s-1y"></div></div>'),mw=L('<img class="icon s-1y" aria-hidden="true"/>'),vw={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 Um(t,e){Q(t,vw);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,ub),r=m(()=>o()===ub),a=m(()=>n(r)||i()),l=K(!1),d=()=>{D(l,!0)},s=m(()=>n(r)?"btn-full-opacity":"");Ot(t,{get className(){return n(s)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(a)},get testId(){return e.testId},children:(u,f)=>{var p=Ve(),v=le(p);{var _=$=>{var x=fw();b($,x)},y=$=>{var x=mw();N(()=>De(x,"src",e.iconUrl)),mt("error",x,d),La(x),b($,x)};M(v,$=>{n(l)?$(_):$(y,!1)})}b(u,p)},$$slots:{default:!0}})}var gw=Ae('<path d="M8.7 8.1 5.3 4.72A1 1 0 0 1 6.72 3.3L20.7 17.29a1 1 0 0 1-1.41 1.41L16 15.41V20a1 1 0 0 1-1 1c-.64 0-1.26-.25-1.72-.7L7.79 15H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2.77zm2.88-2.76 1.7-1.65A2.5 2.5 0 0 1 15 3a1 1 0 0 1 1 1v5.76z"></path>');function zm(t){Ye(t,{testId:"muted-icon",children:(e,i)=>{var o=gw();b(e,o)},$$slots:{default:!0}})}import{noop as hw}from"@vkontakte/videoplayer-shared/es2018";function ju(t,e){B(e,!0);let i=g(e,"muted",3,!1),o=g(e,"click",3,hw),r=g(e,"ref",15,void 0),l=xe().ui.t,d=m(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),s=m(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");Ot(t,{get testId(){return n(s)},get click(){return o()},get ariaLabel(){return n(d)},role:"button",get ref(){return r()},set ref(u){r(u)},children:(u,f)=>{var p=Ve(),v=le(p);{var _=$=>{zm($,{})},y=$=>{pa($,{get size(){return"24"}})};M(v,$=>{i()?$(_):$(y,!1)})}b(u,p)},$$slots:{default:!0}}),H()}var _w=Ae('<path d="M11.64 12.37 9.07 9.8h1.03a.9.9 0 1 0 0-1.8H6.9a.9.9 0 0 0-.9.9v3.2a.9.9 0 0 0 1.8 0v-1.02l2.53 2.52.13.14a.9.9 0 0 0 1.28-1.28z"></path>'),bw=Ae('<path d="m6.36 9.63 2.57 2.57H7.9a.9.9 0 1 0 0 1.8h3.2a.9.9 0 0 0 .9-.9V9.9a.9.9 0 0 0-1.8 0v1.02L7.67 8.4l-.13-.14a.9.9 0 0 0-1.28 1.28z"></path>'),$w=Ae('<path d="M7.66 4h6.68q1.2-.01 2 .04.83.06 1.53.38a4 4 0 0 1 1.7 1.7c.24.48.34.98.39 1.54q.05.8.04 2v1.44a.9.9 0 0 1-1.8 0V9.7c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2 2 0 0 0-.92-.92 2 2 0 0 0-.85-.2c-.46-.03-1.04-.03-1.9-.03H7.7c-.85 0-1.44 0-1.9.04-.44.03-.68.1-.85.19a2 2 0 0 0-.92.92c-.09.17-.16.4-.2.85-.03.46-.03 1.05-.03 1.9v2.65c0 .85 0 1.44.04 1.9.03.44.1.68.19.85a2 2 0 0 0 .92.92c.17.08.4.15.85.19.46.03 1.04.04 1.9.04h2.4a.9.9 0 0 1 0 1.8H7.66q-1.2.01-2-.05a4 4 0 0 1-1.53-.38 4 4 0 0 1-1.7-1.7 4 4 0 0 1-.39-1.53q-.05-.8-.04-2V9.65q-.01-1.2.04-2c.05-.56.15-1.06.39-1.53a4 4 0 0 1 1.7-1.7c.47-.24.97-.34 1.53-.39q.8-.05 2-.04M13 16.8c0-.98 0-1.47.19-1.84a2 2 0 0 1 .77-.77c.37-.19.86-.19 1.84-.19h3.4c.98 0 1.47 0 1.85.19q.5.27.76.77c.19.37.19.86.19 1.84v.4c0 .98 0 1.47-.19 1.85a2 2 0 0 1-.77.76c-.37.19-.86.19-1.84.19h-3.4c-.98 0-1.47 0-1.85-.19a2 2 0 0 1-.76-.76c-.19-.38-.19-.87-.19-1.85z"></path><!>',1);function Wm(t,e){let i=g(e,"isActive",3,!1),o=m(()=>i()?"pip-icon--active":"pip-icon");Ye(t,{get testId(){return n(o)},children:(r,a)=>{var l=$w(),d=A(le(l));{var s=f=>{var p=_w();b(f,p)},u=f=>{var p=bw();b(f,p)};M(d,f=>{i()?f(s):f(u,!1)})}b(r,l)},$$slots:{default:!0}})}import{noop as yw}from"@vkontakte/videoplayer-shared/es2018";function Km(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isPictureInPictureActive",3,!1),r=g(e,"click",3,yw),a=q("menu_pip");Ot(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return r()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{Wm(l,{get isActive(){return o()}})},$$slots:{default:!0}}),H()}import{debounceFn as mb}from"@vkontakte/videoplayer-shared/es2018";var xw=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},ww=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},Sw=L("<div><!></div>"),Cw=L("<div><!></div>"),Tw=L("<div><!></div>"),Iw=L("<!> <!> <!>",1),Ew=L("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),Pw=L('<div class="wrapper-middle s-z"><!></div>'),Aw=L("<div><!></div> <!> <div><!></div>",1),kw=L('<div aria-hidden="true">·</div> <!>',1),Lw=L('<!> <!> <div><div><div class="controls mobile s-z" data-testid="bottom-controls"><div class="controls-group contain s-z"><!> <!> <!> <!></div> <div class="controls-group s-z"><!> <!> <!></div></div> <!></div></div> <!>',1),Mw={hash:"s-z",code:".wrapper-bottom.s-z{background:var(--controls-gradient);bottom:0;box-sizing:border-box;display:flex;flex-direction:column;height:var(--controls-gradient-height);justify-content:flex-end;left:0;padding:0 4px 8px;pointer-events:none;position:absolute;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.wrapper-bottom.s-z>:where(.s-z){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-z{height:9px;padding:0 4px 4px}.wrapper-middle.s-z{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-z,.wrapper-top-right.s-z{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-z{right:8px;top:4px}.wrapper-top-left.s-z{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-z,.wrapper-middle-left-second.s-z,.wrapper-middle-right.s-z{align-items:center;background-color:rgba(0,0,0,.56);border-radius:12px;display:flex;height:44px;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}.wrapper-middle-left.s-z{left:12px}.wrapper-middle-left-second.s-z{left:64px}.wrapper-middle-right.s-z{right:12px}.controls.s-z{align-items:center;box-sizing:border-box;font-size:13px;height:var(--controls-height);justify-content:space-between;padding:0 4px;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);white-space:nowrap;width:100%;will-change:transform}.controls.s-z,.controls-group.s-z{display:flex}.controls-group.contain.s-z{min-width:0}.controls-group.s-z >:not(:first-child){margin-left:8px}.hidden.s-z{opacity:0;visibility:hidden}.controls-hidden.s-z{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-z{transition:none}.overlay-mobile.s-z{background-color:rgba(0,0,0,.3);height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:opacity var(--controls-transition-duration);width:100%}@media screen and (orientation:portrait){.wrapper-top-left.fullscreen.s-z,.wrapper-top-right.fullscreen.s-z{top:16px}.controls-wrapper.fullscreen.s-z{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-z{left:44px;top:12px}.wrapper-top-right.fullscreen.s-z{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-z{left:44px}.wrapper-middle-left-second.fullscreen.s-z{left:96px}.wrapper-middle-right.fullscreen.s-z{right:44px}.controls-wrapper.fullscreen.s-z{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function Qm(t,e){var fo,Cr;B(e,!0),Q(t,Mw);let[i,o]=Be(),r=()=>w(wt,"$seekToInteractiveDisabledTooltip$",i),a=()=>w(fi,"$disabledControls$",i),l=()=>w(Mt,"$playbackState$",i),d=()=>w(ji,"$adPlaybackState",i),s=()=>w(Te,"$isEnded$",i),u=()=>w(To,"$playerSize",i),f=()=>w(gt,"$scrubbingInProgress",i),p=()=>w(Yi,"$chromecastState$",i),v=()=>w(qe,"$isPictureInPictureActive",i),_=()=>w(Ue,"$pictureInPictureType$",i),y=()=>w(ye,"$mobileNotReportControlHidden$",i),$=()=>w(oi,"$chromecastHidden",i),x=()=>w(at,"$playerPhase",i),I=()=>w(Ii,"$pipHidden",i),T=()=>w(We,"$currentGridType$",i),R=()=>w(gi,"$vkLogoHidden",i),k=()=>w(qt,"$volumeHidden",i),P=()=>w(G,"$isLive$",i),E=()=>w(rt,"$settingsMenuVisible",i),W=()=>w(Ie,"$isRewindableLive$",i),U=()=>w(Ne,"$isActiveLive$",i),z=()=>w(Vt,"$isAudioAvailable$",i),Y=()=>w(be,"$muted$",i),ie=()=>w(Oe,"$volume$",i),J=()=>w(ci,"$isInteractiveTime$",i),oe=()=>w(gn,"$settingButtonRef$",i),de=()=>w(di,"$startedByKeyboard$",i),ae=()=>w(ho,"$isFullscreen",i),pe=()=>w(dn,"$additionalButtons$",i),ee=()=>w(Ai,"$autoplayNextToggleHidden",i),$e=()=>w(Ct,"$crashed$",i),Ee=()=>w(Gi,"$settingsHidden",i),ce=()=>w(oo,"$graphIsOpened$",i),Qe=()=>w(yi,"$adPosition",i),fe=()=>w(st,"$adDuration",i),ve=()=>w(yt,"$position$",i),X=()=>w(ti,"$duration$",i),O=g(e,"playerControlsWrapperRef",15,void 0),me=g(e,"playerControlsRef",15,void 0),ue=g(e,"isAds",3,!1),Re=g(e,"logoTargetUrl",3,""),Ze=g(e,"isOneVideoPlaylist",3,!1),ke=g(e,"customFullscreenSupported",3,!0),j=xe(),ne=go(),Se=At(),Le=j.actions.internal.toggleMuted,ze=j.actions.internal.togglePlay,Ce=j.actions.internal.pause,we=j.actions.internal.prevVideoClick,Fe=j.actions.internal.nextVideoClick,nt=j.actions.internal.checkFullscreenSupport,ct=(fo=j.callbacks)==null?void 0:fo.onAudioDoesNotExistHint,kt=(Cr=j.callbacks)==null?void 0:Cr.onAudioDisabledHint,at=j.playerPhase,ti=j.state.duration$,yt=j.state.positionWithScrubbing$,Mt=j.state.playbackState$,Vt=j.state.isAudioAvailable$,Wt=j.state.isAudioDisabled,Te=j.state.isEnded$,G=j.state.isLive$,Oe=j.state.volume$,be=j.state.muted$,Ne=j.state.isActiveLive$,Ie=j.state.isRewindableLive$,gt=j.ui.scrubbingInProgress,ye=j.ui.mobileNotReportControlHidden$,{isActive$:qe,type$:Ue}=ne.pictureInPicture$,rt=j.ui.settingsMenu.visible$,Kt=j.ui.settingsMenu.openedByBtnKeyboard$,It=j.ui.controls,{volume:qt,vkLogo:gi,autoplayNextToggle:Ai,pip:Ii,settings:Gi,chromecast:oi}=j.ui.hiddenControls,ut=j.actions.internal.getVideoEpisodes(),ai=j.webApi.pictureInPictureApi,Yi=j.state.chromecastState$,Ct=j.state.crashed$,fi=It.disabledControls$,di=j.ui.startedByKeyboard$,We=j.ui.currentGridType$,st=j.ads.duration,yi=j.ads.position,ji=j.ads.playbackState,ho=j.ui.isFullscreen,To=j.ui.playerSize,dn=j.ui.additionalButtonsDeprecated$,F=j.actions.internal.getVideoElement,it=j.actions.internal.replayInteractive,Ht=j.state.isInteractive,ci=j.state.isInteractiveTime$,dt=j.state.showInteractiveGraph,ni=j.state.showSeekToInteractive,ui=j.state.showPlayPrevChapter,Qt=j.state.showInteractiveTimeIndicator,wt=ne.seekToInteractiveDisabledTooltip$,oo=ne.graphIsOpened$,Io=j.ui.controlBlocks,Rn=m(()=>q(j.state.playPrevChapterDisabledTooltip)),cn=m(()=>q(r())),Ei=m(()=>a().has("EPISODE_BUTTON")),bi=m(()=>a().has("GRAPH_BUTTON")),Qo=m(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),Jn=m(()=>a().has("PLAY_BUTTON")),mi=m(()=>a().has("REPLAY_BUTTON")),_o=m(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),un=m(()=>l()===fb.PLAYING),Eo=m(()=>d()==="paused"),pn=m(()=>s()&&!ue()&&!Ht),xs=m(()=>!s()||ue()),ws=m(()=>e.showNextPrevButtons&&!ue()&&e.prevButtonActive),os=m(()=>e.showNextPrevButtons&&!ue()&&e.nextButtonActive),br=m(()=>u().width>300),fn=m(()=>u().width>400),mn=m(f),er=m(()=>p()!==pb.NOT_AVAILABLE&&!(v()&&_()===1)&&!y()&&!Ht&&!$()),$r=m(()=>x()==="LiveWaitingStart"),tr=m(()=>!!ai&&p()!==pb.CONNECTED&&!y()&&(_()===1&&n($r)||!n($r))&&!n(mn)&&!Ht&&!I()),Dr=K(!1);Pt(()=>{let Je=ai==null?void 0:ai.info.isActive$.subscribe(ht=>D(Dr,ht,!0));return()=>Je==null?void 0:Je.unsubscribe()});let Nr=m(()=>!n(mn)&&io(T(),"s")),Dn=m(()=>!e.logoHidden&&u().width>350&&!R()),ir=m(()=>Se.features.fullscreen&&nt()&&!(v()&&_()===1)&&(Ht?ke():!0)&&!n(mn)&&!n(Dr)),Nn=m(()=>!k()&&!n(mn)),or=m(()=>(!P()||ue())&&u().width>260&&!n(mn)&&!(Se.features.interactiveHideTime&&Ht)),Or=m(()=>E()||e.showControls),Br=m(()=>!ue()&&!P()&&!!(ut!=null&&ut.length)&&n(br)&&!n(Ei)&&!n(mn)),xi=m(()=>!W()||!!U()),ns=m(()=>dt&&io(T(),"m")),qo=m(()=>!z()||Y()||ie()===0),vt=ii({}),Gt=ii({}),nr=mb(Kl,260),On=mb(Yu,260);He(()=>{u(),J(),nr(F(),It,vt,e.showControls),On(F(),Io,Gt,e.showControls)});let Hr=()=>j.actions.internal.toggleChromecast();async function yr(){ai!=null&&ai.isActive()?await(ai==null?void 0:ai.exit()):await(ai==null?void 0:ai.request())}function Fr(){ca({isAudioDisabled:Wt,audioDisabledHintCallback:kt,isAudioAvailable:z(),audioIsNotExistHintCallback:ct,isAds:ue()})&&Le()}let vn=K(""),Go=(Je,ht)=>{if(!Je){D(vn,q("tooltip_live"),!0);return}ht&&ht===fb.PAUSED&&D(vn,q("tooltip_play"),!0)};He(()=>{Go(n(xi),l())});let gn=se();He(()=>{oe()&&Rl(oe(),E(),Kt)}),He(()=>{qu(di,de(),vt.playButton)});var xr=Lw(),wr=le(xr);{var hn=Je=>{var ht=Ew(),jt=le(ht);let ki;var ro=A(jt,2);let Ri;tt(ro,pt=>Gt.topLeft=pt,()=>Gt==null?void 0:Gt.topLeft);var mo=A(ro,2);let ko;var wn=C(mo);_i(wn,1,pe,({iconUrl:pt,ariaLabel:si,testId:Mo,onClick:lr,tooltip:Er})=>pt,(pt,si)=>{let Mo=()=>n(si).iconUrl,lr=()=>n(si).ariaLabel,Er=()=>n(si).testId,Vo=()=>n(si).onClick,Si=()=>n(si).tooltip,cs=m(()=>{var so;return(so=lr())!=null?so:Si()});Um(pt,{get iconUrl(){return Mo()},get ariaLabel(){return n(cs)},get testId(){return Er()},get onClick(){return Vo()}})});var Hn=A(wn,2);{var vo=pt=>{ac(pt,{get ref(){return vt.autoplayNextToggle},set ref(si){vt.autoplayNextToggle=si}})};M(Hn,pt=>{e.showAutoplayNext&&!Ze()&&!ee()&&pt(vo)})}var Xo=A(Hn,2);{var Tr=pt=>{Xd(pt,{isMobile:!0,click:Hr,get state(){return p()},get ref(){return vt.chromecast},set ref(si){vt.chromecast=si}})};M(Xo,pt=>{n(er)&&pt(Tr)})}var Ir=A(Xo,2);{var $o=pt=>{Km(pt,{click:yr,get isPictureInPictureActive(){return v()},get ref(){return vt.pip},set ref(si){vt.pip=si}})};M(Ir,pt=>{n(tr)&&pt($o)})}var sr=A(Ir,2);{var Fn=pt=>{Bl(pt,{get ref$(){return gn}})};M(sr,pt=>{$e()&&!Ee()&&pt(Fn)})}var ds=A(sr,2);{var et=pt=>{Yd(pt,{get click(){return Ce},get targetUrl(){return Re()},get logoClickable(){return e.logoClickable},get ref(){return vt.vkLogo},set ref(si){vt.vkLogo=si}})};M(ds,pt=>{n(Dn)&&pt(et)})}S(mo),tt(mo,pt=>Gt.topRight=pt,()=>Gt==null?void 0:Gt.topRight);var Dt=A(mo,2);let wi;var Zo=C(Dt);{var Lo=pt=>{let si=m(()=>we.bind(null,!0));Ka(pt,{get click(){return n(si)},type:"prev",isMobile:!0,get ref(){return vt.prevButton},set ref(Mo){vt.prevButton=Mo}})};M(Zo,pt=>{n(ws)&&pt(Lo)})}var Wr=A(Zo,2);{var Jo=pt=>{ql(pt,{get disabled(){return n(Jn)},get click(){return ze},isMobile:!0,get isPlaying(){return n(un)},get ref(){return vt.playButton},set ref(si){vt.playButton=si}})};M(Wr,pt=>{n(xs)&&pt(Jo)})}var ar=A(Wr,2);{var Kr=pt=>{Ql(pt,{get disabled(){return n(mi)},get click(){return ze},isMobile:!0,get ref(){return vt.replayButton},set ref(si){vt.replayButton=si}})};M(ar,pt=>{n(pn)&&pt(Kr)})}var Ss=A(ar,2);{var Ks=pt=>{let si=m(()=>Fe.bind(null,!0));Ka(pt,{get click(){return n(si)},type:"next",isMobile:!0,get ref(){return vt.nextButton},set ref(Mo){vt.nextButton=Mo}})};M(Ss,pt=>{n(os)&&pt(Ks)})}S(Dt),tt(Dt,pt=>Gt.middle=pt,()=>Gt==null?void 0:Gt.middle);var Un=A(Dt,2);{var ga=pt=>{var si=Iw(),Mo=le(si);{var lr=so=>{var Fi=Sw();let en;Fi.__click=[xw,_o,e,Rn];var zn=C(Fi);let Qr=m(()=>!e.showControls);sc(zn,{get hidden(){return n(Qr)},get disabled(){return n(_o)},get click(){return e.playPrevChapter},get ref(){return vt.playPrevChapterButton},set ref(ge){vt.playPrevChapterButton=ge}}),S(Fi),N(ge=>en=te(Fi,1,"wrapper-middle-left s-z",null,en,ge),[()=>({fullscreen:ae(),hidden:!e.showControls})]),b(so,Fi)};M(Mo,so=>{ui&&so(lr)})}var Er=A(Mo,2);{var Vo=so=>{var Fi=Cw();let en;var zn=C(Fi);let Qr=m(()=>!e.showControls&&!ce());dc(zn,{get hidden(){return n(Qr)},get disabled(){return n(bi)},get click(){return oo.toggle},get graphIsOpened(){return ce()},get ref(){return vt.interactiveGraphButton},set ref(ge){vt.interactiveGraphButton=ge}}),S(Fi),N(ge=>en=te(Fi,1,wd(ui?"wrapper-middle-left-second":"wrapper-middle-left"),"s-z",en,ge),[()=>({fullscreen:ae(),hidden:!e.showControls&&!ce()})]),b(so,Fi)};M(Er,so=>{n(ns)&&so(Vo)})}var Si=A(Er,2);{var cs=so=>{var Fi=Tw();let en;Fi.__click=[ww,Qo,e,cn];var zn=C(Fi);let Qr=m(()=>!e.showControls);lc(zn,{get hidden(){return n(Qr)},get disabled(){return n(Qo)},get click(){return e.seekToInteractive},get ref(){return vt.seekToInteractiveButton},set ref(ge){vt.seekToInteractiveButton=ge}}),S(Fi),N(ge=>en=te(Fi,1,"wrapper-middle-right s-z",null,en,ge),[()=>({fullscreen:ae(),hidden:!e.showControls})]),b(so,Fi)};M(Si,so=>{ni&&so(cs)})}b(pt,si)};M(Un,pt=>{Ht&&!f()&&pt(ga)})}N((pt,si,Mo,lr)=>{ki=te(jt,1,"overlay-mobile s-z",null,ki,pt),Ri=te(ro,1,"wrapper-top-left s-z",null,Ri,si),ko=te(mo,1,"wrapper-top-right s-z",null,ko,Mo),wi=te(Dt,1,"wrapper-middle s-z",null,wi,lr)},[()=>({hidden:!n(Or)}),()=>({hidden:!e.showControls,fullscreen:ae()}),()=>({hidden:!e.showControls&&!y(),fullscreen:ae()}),()=>({hidden:!e.showControls||f()||e.endScreenShown&&e.showNextPrevButtons})]),b(Je,ht)};M(wr,Je=>{ue()||Je(hn)})}var _n=A(wr,2);{var rr=Je=>{var ht=Aw(),jt=le(ht);let ki;var ro=C(jt);ju(ro,{get muted(){return Y()},click:Fr,get ref(){return vt.volume},set ref(vo){vt.volume=vo}}),S(jt);var Ri=A(jt,2);{var mo=vo=>{var Xo=Pw(),Tr=C(Xo);let Ir=m(()=>!n(Eo));ql(Tr,{get disabled(){return n(Jn)},get click(){return ze},isMobile:!0,get isPlaying(){return n(Ir)},get ref(){return vt.playButton},set ref($o){vt.playButton=$o}}),S(Xo),b(vo,Xo)};M(Ri,vo=>{n(Eo)&&vo(mo)})}var ko=A(Ri,2);let wn;var Hn=C(ko);uc(Hn,{get position(){return Qe()},get duration(){return fe()}}),S(ko),N((vo,Xo)=>{ki=te(jt,1,"wrapper-top-right s-z",null,ki,vo),wn=te(ko,1,"wrapper-bottom ads-timeline-mobile s-z",null,wn,Xo)},[()=>({fullscreen:ae()}),()=>({fullscreen:ae()})]),b(Je,ht)};M(_n,Je=>{ue()&&d()!=="inactive"&&Je(rr)})}var Pi=A(_n,2);let bo;var Po=C(Pi);let no;var bn=C(Po),$n=C(bn),Ur=C($n);{var xt=Je=>{Co(Je,{get disabled(){return n(mi)},get ref(){return vt.replayButton},set ref(ht){vt.replayButton=ht},children:(ht,jt)=>{Ql(ht,{get disabled(){return n(mi)},get click(){return it}})},$$slots:{default:!0}})};M(Ur,Je=>{Ht&&Je(xt)})}var ri=A(Ur,2);{var Ut=Je=>{Co(Je,{get ref(){return vt.liveButton},set ref(ht){vt.liveButton=ht},children:(ht,jt)=>{cc(ht,{get isLiveActive(){return n(xi)},isMobile:!0,get ariaLabel(){return n(vn)}})},$$slots:{default:!0}})};M(ri,Je=>{!ue()&&P()&&Je(Ut)})}var po=A(ri,2);{var Yo=Je=>{let ht=m(()=>ue()?Qe():ve()),jt=m(()=>ue()?fe():X()),ki=m(()=>!e.showControls);Qd(Je,{get showDuration(){return n(fn)},get position(){return n(ht)},get duration(){return n(jt)},isMobile:!0,get isHidden(){return n(ki)},get ref(){return vt.time},set ref(ro){vt.time=ro}})};M(po,Je=>{n(or)&&Je(Yo)})}var Ao=A(po,2);let jo=m(()=>!n(Br));Co(Ao,{className:"w-max",get disabled(){return n(jo)},get ref(){return vt.episodes},set ref(Je){vt.episodes=Je},children:(Je,ht)=>{var jt=Ve(),ki=le(jt);{var ro=Ri=>{var mo=kw(),ko=A(le(mo),2);Zd(ko,{get position(){return ve()},get duration(){return X()},get timeCodes(){return ut}}),b(Ri,mo)};M(ki,Ri=>{n(Br)&&Ri(ro)})}b(Je,jt)},$$slots:{default:!0}}),S($n),tt($n,Je=>Gt.bottomLeft=Je,()=>Gt==null?void 0:Gt.bottomLeft);var Xi=A($n,2),yn=C(Xi);{var Sr=Je=>{Co(Je,{get ref(){return vt.volume},set ref(ht){vt.volume=ht},children:(ht,jt)=>{ju(ht,{get muted(){return n(qo)},click:Fr})},$$slots:{default:!0}})};M(yn,Je=>{n(Nn)&&Je(Sr)})}var xn=A(yn,2);{var Bn=Je=>{Co(Je,{get ref(){return vt.settings},set ref(ht){vt.settings=ht},children:(ht,jt)=>{Bl(ht,{get ref$(){return gn}})},$$slots:{default:!0}})};M(xn,Je=>{n(Nr)&&Je(Bn)})}var rs=A(xn,2);{var ss=Je=>{Co(Je,{get ref(){return vt.fullscreen},set ref(ht){vt.fullscreen=ht},children:(ht,jt)=>{Gd(ht,{get click(){return e.toggleFullscreen},get isFullscreen(){return ae()}})},$$slots:{default:!0}})};M(rs,Je=>{n(ir)&&Je(ss)})}S(Xi),tt(Xi,Je=>Gt.bottomRight=Je,()=>Gt==null?void 0:Gt.bottomRight),S(bn),tt(bn,Je=>me(Je),()=>me());var as=A(bn,2);let Zi=m(()=>!e.showControls);qa(as,{get isHidden(){return n(Zi)},get isAds(){return ue()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return W()},get ref(){return vt.timeline},set ref(Je){vt.timeline=Je}}),S(Po),tt(Po,Je=>Gt.bottom=Je,()=>Gt==null?void 0:Gt.bottom),S(Pi),tt(Pi,Je=>O(Je),()=>O());var ls=A(Pi,2);{var zr=Je=>{nc(Je,{get ref(){return vt.interactiveTimeIndicator},set ref(ht){vt.interactiveTimeIndicator=ht}})};M(ls,Je=>{Qt&&Je(zr)})}N((Je,ht)=>{bo=te(Pi,1,"wrapper-bottom mobile s-z",null,bo,Je),Ke(Pi,`transform: ${e.showControls?"translateY(0)":"translateY(100%)"}`),no=te(Po,1,"controls-wrapper s-z",null,no,ht)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:ae()})]),b(t,xr),H(),o()}Xe(["click"]);function pc(t,e){B(e,!0);let[i,o]=Be(),r=()=>w(I,"$isMobile",i),a=g(e,"bottomNoSmooth",3,!1),l=g(e,"playerControlsWrapperRef",15,void 0),d=g(e,"playerControlsRef",15,void 0),s=g(e,"isAds",3,!1),u=g(e,"logoTargetUrl",3,""),f=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,vb),$=g(e,"onDisabledSeekToInteractiveClick",3,vb),I=xe().ui.isMobile,T=K(!1);Pt(()=>{let E=setTimeout(()=>D(T,!0),0);return()=>clearTimeout(E)});var R=Ve(),k=le(R);{var P=E=>{var W=Ve(),U=le(W);{var z=ie=>{Qm(ie,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get showAutoplayNext(){return 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 _()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return y()},get onDisabledSeekToInteractiveClick(){return $()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(J){l(J)},get playerControlsRef(){return d()},set playerControlsRef(J){d(J)}})},Y=ie=>{Fm(ie,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get isOneVideoPlaylist(){return p()},get showAutoplayNext(){return 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,ie=>{r()?ie(z):ie(Y,!1)})}b(E,W)};M(k,E=>{n(T)&&E(P)})}b(t,R),H(),o()}var Vw=Ae('<path d="M23.75 31.2v-5.45l-11.84 6.7a1.45 1.45 180 01-2.16-1.25v-14.4a1.45 1.45 180 012.16-1.26l11.84 6.7v-5.44a1.45 1.45 180 012.16-1.26l12.7 7.19a1.45 1.45 180 010 2.52l-12.7 7.2a1.45 1.45 180 01-2.16-1.27Z"></path>');function fc(t,e){B(e,!0);let i=m(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=m(()=>`${sn(e.size)}${n(i)}`);Ye(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(o)},get testId(){return e.testId},get shadow(){return e.shadow},children:(r,a)=>{var l=Vw();b(r,l)},$$slots:{default:!0}}),H()}var Rw=Ae('<path d="M32.46 9.53a1.16 1.16 90 010 1.96l-7.66 4.83c-.78.49-1.8-.07-1.8-.98v-3.3a14 14 90 1014.1 18.93 1.5 1.5 90 012.8 1.06 17 17 90 11-16.9-23V5.66c0-.91 1.03-1.47 1.8-.98z"></path>');function qm(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=m(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),r=m(()=>`seek-icon-${i()?"backward":"forward"}`);Ye(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(r)},get shadow(){return e.shadow},children:(a,l)=>{var d=Rw();b(a,d)},$$slots:{default:!0}}),H()}var Dw=L('<span class="hot-key-helpers-text s-1d"> </span>'),Nw=L('<div data-testid="hotkey-helper-icon" class="s-1d"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),Ow=L("<div><!></div>"),Bw={hash:"s-1d",code:'.hot-key-helpers-container.s-1d{align-items:center;animation:s-1d-fadeIn ease var(--controls-transition-duration);box-sizing:border-box;display:flex;flex-direction:column;height:120px;left:calc(50% - 100px);padding-top:14px;position:absolute;top:calc(50% - 40px);width:200px;z-index:var(--hot-key-helpers-container-z-index)}.hot-key-helpers-container--left.s-1d{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-1d{left:calc(75% - 100px)}.hot-key-helpers-text.s-1d{display:-webkit-box;font-feature-settings:"clig" off,"liga" off;font-size:15px;font-style:normal;font-weight:600;letter-spacing:-.105px;-webkit-line-clamp:2;line-height:20px;margin-top:4px;max-height:40px;overflow:hidden;text-align:center;text-overflow:ellipsis;text-shadow:0 0 5px rgba(0,0,0,.16);white-space:pre-wrap;width:100%;-webkit-box-orient:vertical}.hidden.s-1d{animation:s-1d-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-1d-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-1d-fadeOut{0%{opacity:1}to{opacity:0}}'};function Gm(t,e){B(e,!0),Q(t,Bw);let[i,o]=Be(),r=()=>w(e.data,"$data",i),a=xe(),{features:l}=At(),d=a.ui.t,s=m(()=>!r()),u=m(()=>{var I;return((I=r())==null?void 0:I.type)==="BACKWARD_SEEK"}),f=m(()=>{var I;return((I=r())==null?void 0:I.type)==="FORWARD_SEEK"}),p=m(()=>{var I;return(I=r())==null?void 0:I.type}),v=m(()=>{var I,T;return(I=r())!=null&&I.t?d(r().t.key,{value:r().t.value||""}):(T=r())==null?void 0:T.text});var _=Ow();let y;var $=C(_);{var x=I=>{var T=Nw(),R=le(T),k=C(R);{var P=me=>{let ue=m(()=>n(p)==="BACKWARD_SEEK");qm(me,{get reversed(){return n(ue)},shadow:!0})};M(k,me=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&me(P)})}var E=A(k,2);{var W=me=>{zs(me,{get size(){return"48"},shadow:!0})};M(E,me=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&me(W)})}var U=A(E,2);{var z=me=>{Mn(me,{get size(){return"48"},shadow:!0})};M(U,me=>{n(p)==="PLAY"&&!l.playbackStatusShow&&me(z)})}var Y=A(U,2);{var ie=me=>{rc(me,{get size(){return"48"},shadow:!0})};M(Y,me=>{n(p)==="REPLAY"&&!l.playbackStatusShow&&me(ie)})}var J=A(Y,2);{var oe=me=>{ua(me,{get size(){return"48"},type:"off",shadow:!0})};M(J,me=>{n(p)==="SUBTITLES_OFF"&&me(oe)})}var de=A(J,2);{var ae=me=>{ua(me,{get size(){return"48"},shadow:!0})};M(de,me=>{n(p)==="SUBTITLES_ON"&&me(ae)})}var pe=A(de,2);{var ee=me=>{let ue=m(()=>n(p)==="RATE_DOWN");fc(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=A(pe,2);{var Ee=me=>{let ue=m(()=>n(p)==="EPISODE_PREV");ma(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=A($e,2);{var Qe=me=>{pa(me,{get size(){return"48"},volume:0,shadow:!0})};M(ce,me=>{n(p)==="MUTE"&&me(Qe)})}var fe=A(ce,2);{var ve=me=>{pa(me,{get size(){return"48"},volume:1,shadow:!0})};M(fe,me=>{n(p)==="VOLUME"&&me(ve)})}S(R);var X=A(R,2);{var O=me=>{var ue=Dw(),Re=C(ue,!0);S(ue),N(()=>he(Re,n(v))),b(me,ue)};M(X,me=>{n(v)&&me(O)})}N(()=>De(R,"data-type",n(p))),b(I,T)};M($,I=>{!n(s)&&n(p)&&I(x)})}S(_),N(I=>y=te(_,1,"hot-key-helpers-container s-1d",null,y,I),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(f)})]),b(t,_),H(),o()}var Hw=(t,e,i,o,r,a)=>{if(e.has(t.code))switch(t.preventDefault(),t.stopPropagation(),t.code){case"ArrowUp":i();break;case"ArrowDown":o();break;case"ArrowLeft":r();break;case"ArrowRight":a();break}},Fw=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},Uw=L('<div tabindex="0" role="button"><div class="button-block s-i" aria-hidden="true"><div class="button-row s-i"><div class="button button-up s-i"><!></div> <div class="button button-right s-i"><!></div></div> <div class="button-row s-i"><div class="button button-left s-i"><!></div> <div class="button button-down s-i"><!></div></div></div></div>'),zw={hash:"s-i",code:".immersive-controls.s-i{background-color:rgba(0,0,0,.56);border-radius:8px;display:flex;flex-direction:row;height:56px;left:10px;position:absolute;top:10px;transition-duration:var(--controls-transition-duration);transition-property:top,left;transition-timing-function:var(--controls-transition-fn);width:56px}.immersive-controls.m-shifted.s-i{left:20px;top:50px}.button-block.s-i{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-i{display:flex;flex-direction:row;position:relative}.button.s-i{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-i svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-i svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-i svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-i svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-i svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-i:hover svg{opacity:1}"};function mc(t,e){B(e,!0),Q(t,zw);let i=g(e,"isShifted",3,!1),o=xe(),r=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},l=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},s=()=>{o.actions.internal.startCameraManualRotation(-1,0)},u=()=>(o.actions.internal.stopCameraManualRotation(),null),f=q("aria_label_spherical_control");var p=Uw();let v;p.__keydown=[Hw,r,a,l,s,d],p.__keyup=[Fw,r,u];var _=C(p),y=C(_),$=C(y);$.__mousedown=a,$.__mouseup=u;var x=C($);Vr(x,{direction:"up",useBtnColor:!0}),S($);var I=A($,2);I.__mousedown=d,I.__mouseup=u;var T=C(I);Vr(T,{direction:"up",useBtnColor:!0}),S(I),S(y);var R=A(y,2),k=C(R);k.__mousedown=s,k.__mouseup=u;var P=C(k);Vr(P,{direction:"up",useBtnColor:!0}),S(k);var E=A(k,2);E.__mousedown=l,E.__mouseup=u;var W=C(E);Vr(W,{direction:"up",useBtnColor:!0}),S(E),S(R),S(_),S(p),N(U=>{v=te(p,1,"immersive-controls s-i",null,v,U),De(p,"aria-label",f)},[()=>({"m-shifted":i()})]),mt("mouseleave",$,u),mt("mouseleave",I,u),mt("mouseleave",k,u),mt("mouseleave",E,u),b(t,p),H()}Xe(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as hb,Subscription as Ww,filterChanged as Kw,filter as Qw}from"@vkontakte/videoplayer-shared/es2018";var gb=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var Xu=class{constructor(){this.flickeringTimeout=gb(1e3);this.subscriptions=new Ww;this.isAuto=!1;this.isLive=!1;this.captions$=new hb([]);this.captionsPrepared$=new hb([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(Qw(()=>this.isEnabled()),Kw()).subscribe(e=>{this.processCaptions(e)})),this}setIsAuto(e){this.isAuto=e}setIsLive(e){this.isLive=e}setCaptions(e){this.captions$.next(e)}destroy(){this.subscriptions.unsubscribe(),this.flickeringTimeout.clear()}isEnabled(){return this.isAuto&&!this.isLive}processCaptions(e){if(!e.length){this.flickeringTimeout.add(()=>{this.captionsPrepared$.next([])});return}this.flickeringTimeout.clear();let i=[],o=e.length>1&&e[0].type!=="timestamp"&&e[1].type!=="timestamp";o&&i.push([{value:String(e[0].value),timeAppeared:null}]),i.push(e.reduce((r,{type:a,value:l},d)=>(o&&!d||(a==="timestamp"?r.push({timeAppeared:Number(l),value:""}):r.length===0?r.push({value:String(l)}):r[r.length-1].value=String(l)),r),[])),this.captionsPrepared$.next(i)}};var qw=L('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),Gw=L('<span class="caption-line s-a"><span class="caption-segment s-a"></span></span>'),Yw=L('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),jw=L('<div><span class="caption s-a"><!></span></div>'),Xw=L("<div><!></div>"),Zw={hash:"s-a",code:".subtitles-container.s-a{height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:transform var(--controls-transition-duration);width:100%}.subtitles-container.shifted.s-a{transform:translateY(calc(var(--controls-height)*-1))}.subtitles-container.preview-track-active.s-a{transform:translateY(calc(var(--preview-track-height)*-1))}.preview-track-active.s-a .subtitles-caption:where(.s-a){bottom:var(--preview-track-controls-top-offset)}.subtitles-caption.s-a{bottom:4%;display:flex;justify-content:center;left:4%;position:absolute;right:4%}.subtitles-caption.mobile.s-a{bottom:8%}.subtitles-container.auto.s-a .subtitles-caption:where(.s-a){left:var(--subtitles-caption-margin);right:var(--subtitles-caption-margin)}.caption.s-a{background:rgba(0,0,0,.4);border-radius:4px;display:block;overflow-wrap:normal;padding:4px 8px}.subtitles-container.auto.s-a .caption:where(.s-a){width:100%}.caption-line.s-a{display:block;text-align:center}.subtitles-container.auto.s-a .caption-line:where(.s-a){text-align:left}.caption-segment.s-a{color:var(--white);display:inline-block;font-size:13px;line-height:1.2;white-space:pre-wrap}"};function Ya(t,e){B(e,!0),Q(t,Zw);let[i,o]=Be(),r=()=>w(v,"$currentSubtitle$",i),a=()=>w(y,"$isLive$",i),l=()=>w($,"$isFullscreen",i),d=()=>w(x,"$previewTrackActive",i),s=()=>w(_,"$isAutoSubtitleCaptionVisible$",i),u=g(e,"isMobile",3,!1),f=xe(),p=At(),v=f.state.currentSubtitle$,_=f.state.isAutoSubtitleCaptionVisible$,y=f.state.isLive$,$=f.ui.isFullscreen,x=f.ui.previewTrackActive,I=m(()=>!!r().isAuto),T=m(()=>!!a()),R=m(()=>e.playerSize.width*.02),k=m(()=>u()&&!l()||n(R)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(R)),P=K(null);He(()=>{var J,oe,de;(J=n(P))==null||J.setIsAuto(n(I)),(oe=n(P))==null||oe.setIsLive(n(T)),(de=n(P))==null||de.setCaptions(e.captions)});let E=K(ii([[]]));Pt(()=>{D(P,new Xu().subscribe(),!0);let J=n(P).captionsPrepared$.subscribe(oe=>{D(E,oe,!0)});return()=>{var oe;(oe=n(P))==null||oe.destroy(),J.unsubscribe()}}),Pt(()=>{if(n(I)){let J=window.setTimeout(()=>{_.set(!1)},p.autoSubtitlesTimeout);return()=>{window.clearTimeout(J)}}else _.set(!1)});let W=m(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var U=Xw();let z;var Y=C(U);{var ie=J=>{var oe=jw();let de;var ae=C(oe),pe=C(ae);{var ee=Ee=>{var ce=qw(),Qe=C(ce),fe=C(Qe,!0);S(Qe),S(ce),N(ve=>{var X;Ke(Qe,`font-size: ${(X=n(k))!=null?X:""}px`),he(fe,ve)},[()=>q("subtitles_auto_caption")]),b(Ee,ce)},$e=(Ee,ce)=>{{var Qe=ve=>{var X=Ve(),O=le(X);_i(O,17,()=>n(E),yd,(me,ue)=>{var Re=Gw(),Ze=C(Re);_i(Ze,21,()=>n(ue),({value:ke,timeAppeared:j})=>j,(ke,j)=>{let ne=()=>n(j).value,Se=()=>n(j).timeAppeared;var Le=Ve(),ze=le(Le);{var Ce=we=>{var Fe=gs();N(()=>he(Fe,ne())),b(we,Fe)};M(ze,we=>{(!Se()||Se()<=e.position)&&we(Ce)})}b(ke,Le)}),S(Ze),S(Re),N(()=>{var ke;return Ke(Ze,`font-size: ${(ke=n(k))!=null?ke:""}px`)}),b(me,Re)}),b(ve,X)},fe=ve=>{var X=Ve(),O=le(X);_i(O,17,()=>e.captions,({value:me})=>me,(me,ue)=>{let Re=()=>n(ue).value;var Ze=Yw(),ke=C(Ze),j=C(ke,!0);S(ke),S(Ze),N(()=>{var ne;Ke(ke,`font-size: ${(ne=n(k))!=null?ne:""}px`),he(j,Re())}),b(me,Ze)}),b(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)&&s()?Ee(ee):Ee($e,!1)})}S(ae),S(oe),N(Ee=>{var ce;de=te(oe,1,"subtitles-caption s-a",null,de,Ee),Ke(oe,`--subtitles-caption-margin: ${(ce=n(W))!=null?ce:""}%`)},[()=>({mobile:u()})]),b(J,oe)};M(Y,J=>{var oe;(e.captions.length||(oe=n(E))!=null&&oe.length)&&J(ie)})}S(U),N(J=>z=te(U,1,"subtitles-container s-a",null,z,J),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(I)&&!n(T)&&!s()})]),b(t,U),H(),o()}import{ChromecastState as Jw}from"@vkontakte/videoplayer-core/es2018";var eS=L('<div class="text s-p"> </div>'),tS=L('<div><div class="icon_wrapper s-p"><!></div> <!></div>'),iS={hash:"s-p",code:".wrapper.s-p{align-items:center;background-position:50%;background-repeat:no-repeat;background-size:contain;display:flex;flex-direction:column;font-size:16px;height:100%;justify-content:center}.wrapper.bgCover.s-p{background-size:cover}.icon_wrapper.s-p{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-p{margin-top:20px}"};function vc(t,e){B(e,!0),Q(t,iS);let i=g(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=At();var r=tS();let a;r.__contextmenu=function(...f){var p;(p=e.onContextMenu)==null||p.apply(this,f)},r.__click=function(...f){var p;(p=e.onClick)==null||p.apply(this,f)},r.__dblclick=function(...f){var p;(p=e.onDblClick)==null||p.apply(this,f)};var l=C(r),d=C(l);jd(d,{get size(){return"48"},get iconState(){return Jw.CONNECTED}}),S(l);var s=A(l,2);{var u=f=>{var p=eS(),v=C(p);S(p),N(()=>{var _;return he(v,`Видео воспроизводится на ${(_=i())!=null?_:""}`)}),b(f,p)};M(s,f=>{i()&&f(u)})}S(r),N(f=>{a=te(r,1,"wrapper s-p",null,a,f),Ke(r,`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e.thumbUrl||""}')`)},[()=>({bgCover:o.features.previewNoEmptySpace})]),b(t,r),H()}Xe(["contextmenu","click","dblclick"]);var oS=Ae('<path d="M460 194a4 4 0 0 1 4-4h122a4 4 0 0 1 4 4v82a4 4 0 0 1-4 4H464a4 4 0 0 1-4-4zm6 3a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm112-72a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm-71-37a6 6 0 1 0 0-12 6 6 0 0 0 0 12m36 0a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-18.05 15c6.05 0 11.62 4.45 11.94 4.65 2.11 1.35 3.26.77 3.96.16s1.15-2.81-1.04-4.66c-1.74-1.48-5.8-5.16-14.86-5.15s-12.95 3.5-14.8 5.18c-1.83 1.69-2.28 3.5-.96 4.66s2.31 1.16 4.35-.33c0 .01 5.36-4.51 11.41-4.51"></path>');function Ym(t){Ye(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=oS();b(e,o)},$$slots:{default:!0}})}var nS=L('<div class="container s-6"><!></div>'),rS={hash:"s-6",code:".container.s-6{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function ja(t){Q(t,rS);var e=nS(),i=C(e);Ym(i,{}),S(e),b(t,e)}var sS=L('<div class="playButton s-c" tabindex="0" role="button"><div class="playButtonBackground s-c"></div> <!></div>'),aS=L('<div data-testid="unstarted-thumb"><!></div>'),lS={hash:"s-c",code:".container.s-c{background-position:50%;background-repeat:no-repeat;background-size:contain;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:opacity .2s,visibility .2s;will-change:opacity}.container.hidden.s-c{opacity:0;visibility:hidden}.container.bgCover.s-c{background-size:cover}.playButton.s-c{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-c,.playButtonBackground.s-c{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-c{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);transition:background .2s,transform .2s;transition-timing-function:ease-out;will-change:background,transform}.container.s-c:hover .playButtonBackground:where(.s-c){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-c svg{position:relative}"};function Xa(t,e){B(e,!0),Q(t,lS);let i=g(e,"iconVisible",3,!0),o=xe(),r=At(),a=o.ui.startedByKeyboard$,l=q("tooltip_play"),d=_=>{var $;let y=_.code;["Enter","Space"].includes(y)&&(_.stopPropagation(),_.preventDefault(),a.set(!0),($=e.startVideo)==null||$.call(e))},s=_=>{var y,$;_.stopPropagation(),(y=e.startVideo)==null||y.call(e),($=e.onClick)==null||$.call(e,_)};var u=aS();let f;u.__click=s,u.__contextmenu=function(..._){var y;(y=e.onContextMenu)==null||y.apply(this,_)};var p=C(u);{var v=_=>{var y=sS();y.__keydown=d;var $=A(C(y),2);Mn($,{get size(){return"48"}}),S(y),N(()=>De(y,"aria-label",l)),b(_,y)};M(p,_=>{i()&&_(v)})}return S(u),N(_=>{f=te(u,1,"container s-c",null,f,_),Ke(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:r.features.previewNoEmptySpace})]),b(t,u),H({handlePressKey:d,handleClick:s})}Xe(["click","contextmenu","keydown"]);var dS=L('<span class="text s-1a"> </span>'),cS=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},uS=L('<a target="_blank" class="link s-1a"><!></a>'),pS=(t,e)=>e.onTitleClicked(),fS=L("<button><!></button>"),mS=L('<div data-testid="video_title"><!></div>'),vS={hash:"s-1a",code:".title.s-1a{background:linear-gradient(0deg,transparent,rgba(0,0,0,.02) 19%,rgba(0,0,0,.1) 34%,rgba(0,0,0,.4) 60%,rgba(0,0,0,.6));box-sizing:border-box;font-size:15px;height:var(--controls-gradient-height);left:0;overflow:hidden;padding:18px 20px 10px;pointer-events:none;position:absolute;text-overflow:ellipsis;top:0;transition-duration:var(--controls-transition-duration);transition-property:visibility,transform,opacity;transition-timing-function:var(--controls-transition-fn);white-space:nowrap;width:100%;will-change:transform,opacity;z-index:var(--controls-container-z-index)}.link.s-1a,.title.s-1a{color:var(--white)}.link.s-1a{pointer-events:auto;text-decoration:none}.link.s-1a:hover{text-decoration:underline}.text.s-1a{pointer-events:auto}.size-sm.s-1a{font-size:14px;font-weight:500;line-height:18px}.hidden.s-1a{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function jm(t,e){B(e,!0),Q(t,vS);let i=_=>{var y=dS(),$=C(y,!0);S(y),tt(y,x=>l(x),()=>l()),N(()=>he($,o())),mt("mouseenter",y,function(...x){var I;(I=e.onMouseEnter)==null||I.apply(this,x)}),mt("mouseleave",y,function(...x){var I;(I=e.onMouseLeave)==null||I.apply(this,x)}),b(_,y)},o=g(e,"title",3,""),r=g(e,"isHidden",3,!1),a=g(e,"size",3,"md"),l=g(e,"ref",15),d=K(void 0);Pt(()=>{var y;requestAnimationFrame(()=>{var $;($=e.onVisibilityChanged)==null||$.call(e,!0)});function _($){var x;$.propertyName==="transform"&&((x=e.onVisibilityChanged)==null||x.call(e,!r()))}return(y=n(d))==null||y.addEventListener("transitionend",_),()=>{var $;return($=n(d))==null?void 0:$.removeEventListener("transitionend",_)}});var s=mS();let u;var f=C(s);{var p=_=>{var y=uS();y.__click=[cS,e];var $=C(y);i($),S(y),N(()=>De(y,"href",e.titleLinkHref)),b(_,y)},v=(_,y)=>{{var $=I=>{var T=fS();T.__click=[pS,e];var R=C(T);i(R),S(T),b(I,T)},x=I=>{i(I)};M(_,I=>{e.onTitleClicked?I($):I(x,!1)},y)}};M(f,_=>{e.titleLinkHref?_(p):_(v,!1)})}S(s),tt(s,_=>D(d,_),()=>n(d)),N(_=>u=te(s,1,`title size-${a()}`,"s-1a",u,_),[()=>({hidden:r()})]),b(t,s),H()}Xe(["click"]);import{throttleFn as xS}from"@vkontakte/videoplayer-shared/es2018";var gS=L('<div class="timer__cell cell s-12"><span class="cell__value s-12"> </span> <span class="cell__unit s-12"> </span></div> <span class="timer__points s-12"> </span>',1),hS=L('<div class="timer__cell cell s-12"><span class="cell__value s-12"> </span> <span class="cell__unit s-12"> </span></div> <span class="timer__points s-12"> </span>',1),_S=L('<div class="timer__cell cell s-12"><span class="cell__value s-12"> </span> <span class="cell__unit s-12"> </span></div> <span class="timer__points s-12"> </span>',1),bS=L('<div class="timer__cell cell s-12"><span class="cell__value s-12"> </span> <span class="cell__unit s-12"> </span></div>'),$S=L("<div><!> <!> <!> <!></div>"),yS={hash:"s-12",code:".timer__container.s-12{align-items:flex-start;display:flex;justify-content:center}.cell.s-12{align-items:center;display:flex;flex-direction:column}.cell__value.s-12{font-size:48px;font-weight:600;line-height:1.2}.small.s-12 .cell__value:where(.s-12){font-size:24px}.cell__unit.s-12{font-size:14px;font-weight:400;line-height:1.2}.small.s-12 .cell__unit:where(.s-12){font-size:12px}.timer__points.s-12{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-12 .timer__points:where(.s-12){font-size:20px}"};function Xm(t,e){B(e,!0),Q(t,yS);let i=K(""),o=K(""),r=K(""),a=K(""),l,d=32,s=d/2,u=U=>String(U).padStart(2,"0"),f=U=>Math.max(U.length,1),p=U=>`${(e.isSmallSize?s:d)*f(U)}px`,v=U=>{let z=Math.floor(U/86400);z&&(U-=z*86400,D(i,u(z),!0));let Y=Math.floor(U/3600);D(o,u(Y),!0);let ie=Math.floor(U/60)%60;D(r,u(ie),!0);let J=U%60;D(a,u(J),!0)},_=()=>{let U=Math.floor(Date.now()/1e3),z=e.startTime-U;v(z),z>=1?l=requestAnimationFrame(_):e.onTimerOver()};Pt(()=>{l=requestAnimationFrame(_)}),rn(()=>{cancelAnimationFrame(l)});var y=$S();let $;var x=C(y);{var I=U=>{var z=gS(),Y=le(z);let ie;var J=C(Y),oe=C(J,!0);S(J);var de=A(J,2),ae=C(de,!0);S(de),S(Y);var pe=A(Y,2),ee=C(pe,!0);S(pe),N(($e,Ee,ce)=>{ie=Ke(Y,"",ie,{width:$e}),he(oe,n(i)),he(ae,Ee),he(ee,ce)},[()=>p(n(i)),()=>q("waiting_live_day_value"),()=>q("waiting_live_colon")]),b(U,z)};M(x,U=>{n(i)&&U(I)})}var T=A(x,2);{var R=U=>{var z=hS(),Y=le(z);let ie;var J=C(Y),oe=C(J,!0);S(J);var de=A(J,2),ae=C(de,!0);S(de),S(Y);var pe=A(Y,2),ee=C(pe,!0);S(pe),N(($e,Ee,ce)=>{ie=Ke(Y,"",ie,{width:$e}),he(oe,n(o)),he(ae,Ee),he(ee,ce)},[()=>p(n(o)),()=>q("waiting_live_hour_value"),()=>q("waiting_live_colon")]),b(U,z)};M(T,U=>{n(o)&&U(R)})}var k=A(T,2);{var P=U=>{var z=_S(),Y=le(z);let ie;var J=C(Y),oe=C(J,!0);S(J);var de=A(J,2),ae=C(de,!0);S(de),S(Y);var pe=A(Y,2),ee=C(pe,!0);S(pe),N(($e,Ee,ce)=>{ie=Ke(Y,"",ie,{width:$e}),he(oe,n(r)),he(ae,Ee),he(ee,ce)},[()=>p(n(r)),()=>q("waiting_live_minute_value"),()=>q("waiting_live_colon")]),b(U,z)};M(k,U=>{n(r)&&U(P)})}var E=A(k,2);{var W=U=>{var z=bS();let Y;var ie=C(z),J=C(ie,!0);S(ie);var oe=A(ie,2),de=C(oe,!0);S(oe),S(z),N((ae,pe)=>{Y=Ke(z,"",Y,{width:ae}),he(J,n(a)),he(de,pe)},[()=>p(n(a)),()=>q("waiting_live_second_value")]),b(U,z)};M(E,U=>{n(a)&&U(W)})}S(y),N(U=>$=te(y,1,"timer__container s-12",null,$,U),[()=>({small:e.isSmallSize})]),b(t,y),H()}var wS=L('<div class="waiting s-l"><span> </span></div>'),SS=L('<div class="upcoming-timer timer s-l"><span> </span> <!></div>'),CS=L('<div class="waiting-container s-l"><!></div>'),TS={hash:"s-l",code:'.waiting-container.s-l{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.waiting-container.s-l,.waiting-container.s-l:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-l:before{backdrop-filter:blur(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-l{align-items:center;display:flex;flex-direction:column;justify-content:center;left:0;position:absolute;top:50%;transform:translateY(-50%);width:100%;z-index:2}.waiting__title.s-l{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-l{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-l{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-l{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-l{font-size:15px}.medium.s-l{font-size:17px}'};function gc(t,e){B(e,!0),Q(t,TS);let i=g(e,"startTime",3,0),o=m(()=>i()<Math.floor(Date.now()/1e3)),r=K(void 0),a=K(void 0),l=0,d=K(void 0),s=K(void 0),u=m(()=>{var x,I;return((x=n(d))!=null?x:1/0)<=509||((I=n(s))!=null?I:1/0)<=320}),f=m(()=>{var x,I;return!n(u)&&(((x=n(d))!=null?x:1/0)<=699||((I=n(s))!=null?I:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?xS(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let x={type:n(o)?"expired":"default",size:n(u)?"s":n(f)?"m":"l"},I=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(x,I)})},300):void 0;He(()=>{n(s),n(d),n(o),p==null||p()}),rn(()=>{if(cancelAnimationFrame(l),p==null||p.cancel(),e.onUpcomingLiveViewStateChanged){let x={type:n(o)?"expired":"default",size:n(u)?"s":n(f)?"m":"l"};e.onUpcomingLiveViewStateChanged(x)}});var v=CS();v.__contextmenu=function(...x){var I;(I=e.onContextMenu)==null||I.apply(this,x)},v.__click=function(...x){var I;(I=e.onClick)==null||I.apply(this,x)};var _=C(v);{var y=x=>{var I=wS(),T=C(I);let R;var k=C(T,!0);S(T),S(I),tt(I,P=>D(r,P),()=>n(r)),N((P,E)=>{R=te(T,1,"waiting__title s-l",null,R,P),he(k,E)},[()=>({medium:n(f),small:n(u)}),()=>q("waiting_live_upcoming_title")]),b(x,I)},$=x=>{var I=SS(),T=C(I);let R;var k=C(T,!0);S(T);var P=A(T,2);let E=m(()=>n(u)||n(f)),W=m(()=>i()||0);Xm(P,{get isSmallSize(){return n(E)},get startTime(){return n(W)},onTimerOver:()=>D(o,!0)}),S(I),tt(I,U=>D(a,U),()=>n(a)),N((U,z)=>{R=te(T,1,"timer__title s-l",null,R,U),he(k,z)},[()=>({medium:n(f),small:n(u)}),()=>q("waiting_live_timer_title")]),b(x,I)};M(_,x=>{n(o)?x(y):x($,!1)})}S(v),N(()=>Ke(v,`background-image: url(${e.thumbUrl})`)),kn(v,"clientWidth",x=>D(d,x)),kn(v,"clientHeight",x=>D(s,x)),b(t,v),H()}Xe(["contextmenu","click"]);var IS=L('<div class="waiting-container s-s"><div class="waiting-caption s-s"><!> <p class="waiting-title s-s"> </p></div></div>'),ES={hash:"s-s",code:'.waiting-container.s-s{align-items:center;background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;justify-content:center}.waiting-container.s-s,.waiting-container.s-s:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-s:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-s{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-s{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function Za(t,e){B(e,!0),Q(t,ES);let i=g(e,"thumbUrl",3,""),o={recover:q("waiting_live_recover_title"),record:q("waiting_record_title")},r=m(()=>o[e.kind]||"");var a=IS();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);Ha(d,{style:"position: static; transform: translate(0, 0)"});var s=A(d,2),u=C(s,!0);S(s),S(l),S(a),N(()=>{Ke(a,`background-image: url('${i()}')`),he(u,n(r))}),b(t,a),H()}Xe(["contextmenu","click"]);var PS=Ae('<path d="M6 10.2 3.5 7.7a.99.99 0 0 0-1.4 1.4l3.2 3.2a1 1 0 0 0 1.4 0l7.6-7.6a.99.99 0 0 0-1.4-1.4z"></path>');function Zm(t){Ye(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=PS();b(e,o)},$$slots:{default:!0}})}var AS=L('<div class="select-icon s-1w"><!></div>'),kS={hash:"s-1w",code:".select-icon.s-1w{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function hc(t){Q(t,kS);var e=AS(),i=C(e);Zm(i,{}),S(e),b(t,e)}var LS=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},MS=(t,e)=>{Dl(t,()=>e.item.selectItem(e.item.value))},VS=L("<p> </p>"),RS=L('<p class="sublabel s-1r"> </p>'),DS=L('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),NS={hash:"s-1r",code:".menu-item-value.s-1r{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1r{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1r,.sublabel.s-1r{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1r{opacity:.5}"};function Jm(t,e){B(e,!0),Q(t,NS);let i=g(e,"isMobile",3,!1);var o=DS();let r;o.__click=[LS,e],o.__keydown=[MS,e];var a=C(o);{var l=y=>{hc(y,{})};M(a,y=>{e.item.selected&&y(l)})}var d=A(a,2);let s;var u=C(d);{var f=y=>{var $=Ve(),x=le($);Bi(x,()=>e.item.valueComponent,(I,T)=>{T(I,es(()=>{var R;return(R=e.item.valueComponentParams)!=null?R:{}}))}),b(y,$)},p=y=>{var $=VS();let x;var I=C($,!0);S($),N(T=>{var R;x=te($,1,"label s-1r",null,x,T),he(I,(R=e.item.label)!=null?R:e.item.value)},[()=>({mobile:i()})]),b(y,$)};M(u,y=>{e.item.valueComponent?y(f):y(p,!1)})}var v=A(u,2);{var _=y=>{var $=RS(),x=C($,!0);S($),N(()=>he(x,e.item.sublabel)),b(y,$)};M(v,y=>{e.item.sublabel&&y(_)})}S(d),S(o),N((y,$,x)=>{var I;r=te(o,1,"item",null,r,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),s=te(d,1,"menu-item-value s-1r",null,s,x),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()})]),b(t,o),H()}Xe(["click","keydown"]);var OS=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function ev(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"refMenuItems",15),r=m(()=>()=>e.openSubMenuList(e.item.children)),a=m(()=>$=>Eu($,n(r)));var l=OS();let d;l.__click=function(...$){var x;(x=n(r))==null||x.apply(this,$)},l.__keydown=function(...$){var x;(x=n(a))==null||x.apply(this,$)};var s=C(l);{var u=$=>{hc($,{})};M(s,$=>{e.item.selected&&$(u)})}var f=A(s,2);let p;var v=C(f);{var _=$=>{var x=Ve();let I=m(()=>e.item.valueComponent);var T=le(x);Bi(T,()=>n(I),(R,k)=>{k(R,es(()=>{var P;return(P=e.item.valueComponentParams)!=null?P:{}}))}),b($,x)},y=$=>{var x=gs();N(()=>he(x,e.item.label)),b($,x)};M(v,$=>{e.item.valueComponent?$(_):$(y,!1)})}S(f),S(l),tt(l,$=>o(o()[e.item.id]=$,!0),()=>{var $;return($=o())==null?void 0:$[e.item.id]}),N(($,x)=>{var I;d=te(l,1,"item",null,d,$),De(l,"aria-label",(I=e.item.ariaLabel)!=null?I:e.item.label),De(l,"data-testid",e.item.id),p=te(f,1,"menu-item-value",null,p,x)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),b(t,l),H()}Xe(["click","keydown"]);var is={"quality-settings":100,"audio-language-settings":200,"playback-rate-settings":300,"subtitles-settings":400,"traffic-saving-settings":500,download:600,report:700,"copy-data":800,"save-trace-info":900,"debug-info":1e3};var HS=(t,e)=>{E_(t,e.returnFromSubMenu,e.closeSettingsMenu)},FS=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},US=(t,e)=>{Od(t)&&(Rr(t),e.returnFromSubMenu())},zS=L('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1i"> </p></li> <!></ul></div>'),WS={hash:"s-1i",code:".sub-menu.s-1i{--item-padding-vertical-mobile:16px;--item-padding-vertical:7px;--item-label-line-height:18px;--edge-item-padding-vertical-mobile:calc(6px + var(--item-padding-vertical-mobile));--edge-item-padding-vertical:calc(8px + var(--item-padding-vertical))}.sub-menu.s-1i .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1i{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1i{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1i .items:where(.s-1i) .item.header:where(.s-1i){border-bottom:var(--divider-border);display:flex;justify-content:space-between;left:0;min-width:max-content;position:absolute;right:0;top:0}.header.s-1i .title:where(.s-1i){margin-left:8px}.sub-menu.s-1i .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1i .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1i .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1i .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1i .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1i .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1i .item .sublabel{font-size:12px;line-height:14px}.item.s-1i:not(.mobile) p:where(.s-1i),.sub-menu.s-1i .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function iv(t,e){B(e,!0),Q(t,WS);let[i,o]=Be(),r=()=>w(p,"$isFullscreen",i),a=()=>w(v,"$playerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"playerControlsHeight",3,0),s=g(e,"ariaLabelReturnFromSubMenu",19,()=>q("aria_label_submenu_back")),u=g(e,"listRef",15);Pt(()=>{let J=e.items.findIndex(oe=>oe.selected);u().children[J+1].focus()});let f=xe(),p=f.ui.isFullscreen,v=f.ui.playerSize,_=K(void 0),y=K(0),$=K(0),x=m(()=>l()&&r()?`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=zS();let R;var k=C(T);let P;k.__keydown=[HS,e];var E=C(k);let W;E.__click=[FS,e],E.__keydown=[US,e];var U=C(E);Vr(U,{direction:"left"});var z=A(U,2),Y=C(z,!0);S(z),S(E),tt(E,J=>D(_,J),()=>n(_));var ie=A(E,2);_i(ie,17,()=>e.items,yd,(J,oe)=>{var de=Ve(),ae=le(de);{var pe=$e=>{Jm($e,{get item(){return n(oe)},get isMobile(){return l()}})},ee=($e,Ee)=>{{var ce=Qe=>{ev(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)})}b(J,de)}),S(k),tt(k,J=>u(J),()=>u()),S(T),N((J,oe,de)=>{R=te(T,1,"sub-menu menu s-1i",null,R,J),De(T,"data-testid",`${e.id}-sub-menu`),Ke(T,`min-width: ${n(I)}px`),P=te(k,1,"items s-1i",null,P,oe),Ke(k,n(x)),W=te(E,1,"item header back s-1i",null,W,de),De(E,"aria-label",s()),he(Y,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),kn(E,"clientWidth",J=>D(y,J)),kn(E,"clientHeight",J=>D($,J)),b(t,T),H(),o()}Xe(["keydown","click"]);import{noop as KS}from"@vkontakte/videoplayer-shared/es2018";var QS=(t,e)=>Eu(t,e()),qS=(t,e)=>{t.stopPropagation(),e()()},GS=L('<div class="value s-1h"> </div>'),YS=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),jS={hash:"s-1h",code:".value.s-1h{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function ov(t,e){B(e,!0),Q(t,jS);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,KS),r=g(e,"valueComponent",3,void 0),a=g(e,"iconProps",19,()=>({})),l=g(e,"ref",15);var d=YS();let s;d.__click=[qS,o],d.__keydown=[QS,o];var u=C(d),f=C(u);{var p=T=>{Qa(T,{get icon(){return e.icon}})},v=T=>{var R=Ve();let k=m(()=>e.icon);var P=le(R);Bi(P,()=>n(k),(E,W)=>{W(E,es(a))}),b(T,R)};M(f,T=>{typeof e.icon=="string"?T(p):T(v,!1)})}S(u);var _=A(u,2),y=C(_,!0);S(_);var $=A(_,2);{var x=T=>{var R=Ve();let k=m(r);var P=le(R);Bi(P,()=>n(k),(E,W)=>{W(E,{})}),b(T,R)},I=T=>{var R=GS(),k=C(R,!0);S(R),N(()=>he(k,e.value)),b(T,R)};M($,T=>{r()?T(x):T(I,!1)})}S(d),tt(d,T=>l(T),()=>l()),N(T=>{s=te(d,1,"item",null,s,T),De(d,"aria-label",e.ariaLabel),De(d,"data-testid",e.id),he(y,e.label)},[()=>({mobile:i()})]),b(t,d),H()}Xe(["click","keydown"]);import{noop as bb}from"@vkontakte/videoplayer-shared/es2018";var XS=(t,e)=>{Dl(t,()=>e())},ZS=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),JS=L('<img class="icon" aria-hidden="true"/>'),eC=L('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1j"> </div></li>'),tC={hash:"s-1j",code:".label.s-1j{overflow:hidden;text-overflow:ellipsis}"};function nv(t,e){B(e,!0),Q(t,tC);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,bb),r=g(e,"closeSettings",3,bb),a=K(!1),l=()=>{D(a,!0)},d=x=>{x==null||x.stopPropagation(),o()(),r()()};var s=eC();let u;s.__click=d,s.__keydown=[XS,d];var f=C(s),p=C(f);{var v=x=>{var I=Ve(),T=le(I);{var R=P=>{var E=ZS();b(P,E)},k=P=>{var E=JS();N(()=>De(E,"src",e.icon)),mt("error",E,l),La(E),b(P,E)};M(T,P=>{n(a)?P(R):P(k,!1)})}b(x,I)},_=x=>{var I=Ve();let T=m(()=>e.icon);var R=le(I);Bi(R,()=>n(T),(k,P)=>{P(k,{})}),b(x,I)};M(p,x=>{typeof e.icon=="string"?x(v):x(_,!1)})}S(f);var y=A(f,2),$=C(y,!0);S(y),S(s),N(x=>{var I;u=te(s,1,"item",null,u,x),De(s,"aria-label",(I=e.ariaLabel)!=null?I:e.label),De(s,"data-testid",e.id),he($,e.label)},[()=>({mobile:i()})]),b(t,s),H()}Xe(["click","keydown"]);import{noop as nC}from"@vkontakte/videoplayer-shared/es2018";var iC=L('<div class="toggle_wrap s-1n"><div></div> <div class="toggle-label s-1n"></div></div>'),oC={hash:"s-1n",code:'.toggle_wrap.s-1n{cursor:pointer;font-size:12px;line-height:15px;min-height:15px;padding:0;user-select:none}.toggle.s-1n{background-color:var(--toggle-color-separator);border-radius:45px;cursor:pointer;float:right;height:9px;margin-top:3px;width:28px}.toggle.s-1n:after{background-color:var(--toggle-color-off);border-radius:50%;content:"";float:left;height:15px;left:0;position:relative;top:-3px;transition:left .1s ease;width:15px}.toggle.on.s-1n:after{background-color:var(--toggle-color-on);left:13px}.toggle-label.s-1n{overflow:hidden}'};function rv(t,e){Q(t,oC);let i=g(e,"enabled",3,!1);var o=iC(),r=C(o);let a;Yt(2),S(o),N(l=>a=te(r,1,"toggle s-1n",null,a,l),[()=>({on:i()})]),b(t,o)}var rC=(t,e,i)=>{P_(t,e(),o=>i()(o))},sC=(t,e,i)=>{t.stopPropagation(),e()(!i())},aC=L('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),lC=L('<li role="menuitem" tabindex="0"><!></li>');function sv(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,nC),r=g(e,"enabled",3,!1),a=g(e,"tooltipText",3,void 0),l=g(e,"maxTooltipWidth",3,void 0);var d=lC();let s;d.__click=[sC,o,r],d.__keydown=[rC,r,o];var u=C(d);Fa(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(f,p)=>{var v=aC();let _;var y=C(v),$=C(y);{var x=P=>{Qa(P,{get icon(){return e.icon}})},I=P=>{var E=Ve();let W=m(()=>e.icon);var U=le(E);Bi(U,()=>n(W),(z,Y)=>{Y(z,{})}),b(P,E)};M($,P=>{typeof e.icon=="string"?P(x):P(I,!1)})}S(y);var T=A(y,2),R=C(T,!0);S(T);var k=A(T,2);rv(k,{get enabled(){return r()}}),S(v),N(P=>{_=te(v,1,"switch-wrapper",null,_,P),he(R,e.label)},[()=>({mobile:i()})]),b(f,v)},$$slots:{default:!0}}),S(d),N(f=>{var p;s=te(d,1,"item switch-item",null,s,f),De(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),De(d,"data-testid",e.id)},[()=>({mobile:i()})]),b(t,d),H()}Xe(["click","keydown"]);import{isValidURL as MC,VideoQuality as Ab}from"@vkontakte/videoplayer-shared/es2018";var $b=()=>{let t=K(ii([])),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 dC}from"@vkontakte/videoplayer-shared/es2018";var cC=L('<div class="quality-icon s-1m"><!></div>'),uC=L('<div class="quality-label s-1m"><span> </span> <!></div>'),pC={hash:"s-1m",code:".quality-label.s-1m{position:relative}.quality.s-1m{font-size:13px;line-height:18px}.quality.sub.s-1m{opacity:.7}.quality-icon.s-1m{display:flex;padding-left:2px;position:absolute;right:0;top:0;transform:translateX(100%)}.quality-icon.s-1m svg{color:var(--blue-light)}"};function Ja(t,e){B(e,!0),Q(t,pC);let i=g(e,"isSubCase",3,!1),o=m(()=>e.quality?dC(e.quality):""),r=m(()=>Vu(e.quality));var a=uC(),l=C(a);let d;var s=C(l,!0);S(l);var u=A(l,2);{var f=p=>{var v=cC();let _=m(()=>n(r));var y=C(v);Bi(y,()=>n(_),($,x)=>{x($,{})}),S(v),N(()=>De(v,"data-testid",`${n(o)}-icon`)),b(p,v)};M(u,p=>{n(r)&&!e.isMobile&&p(f)})}S(a),N(p=>{d=te(l,1,"s-1m",null,d,p),he(s,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),b(t,a),H()}import{VideoQuality as fC}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as yb}from"@vkontakte/videoplayer-core/es2018";var xb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},wb=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=xb({quality:t,availableQualities:e});return i?t===yb.INVARIANT?q("auto_quality_invariant"):q("auto_quality",{actual:o}):o},Sb=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===yb.INVARIANT?i:`${i}${xb({quality:t,availableQualities:e})}`:"...";var mC=L('<div class="menu-item-value-wrapper s-1p"><!></div>'),vC={hash:"s-1p",code:".menu-item-value-wrapper.s-1p{line-height:normal}"};function Gl(t,e){B(e,!0),Q(t,vC);let[i,o]=Be(),r=()=>w(s,"$currentQuality$",i),a=()=>w(u,"$availableQualities$",i),l=()=>w(f,"$isMobile$",i),d=xe(),s=d.state.currentQuality$,u=d.state.availableQualities$,f=d.ui.isMobile,p=" · ",v=m(()=>e.prefix+(e.selected&&r()!==fC.INVARIANT?p:"")),_=m(()=>Sb({prefix:n(v),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=mC(),$=C(y);let x=m(()=>e.selected?r():void 0);Ja($,{get quality(){return n(x)},get label(){return n(_)},get isMobile(){return l()},isSubCase:!0}),S(y),b(t,y),H(),o()}var gC=t=>{let e=t.join("|"),i="<(?<keyhtml>.*?)(?<propshtml> .*?)?>(?<childrenhtml>.*?)</\\k<keyhtml>>",o=`{(?<keyi18n>${e})}(?<childreni18n>.*?){/\\k<keyi18n>}`,r="<(?<keyhtmlself>.*?)(?<propshtmlself> .*?)?/?>",a=`{(?<keyi18nself>${e})}`;return new RegExp(`${i}|${o}|${r}|${a}`,"g")},hC={br:!0,span:!0},av=(t,e={})=>{var d,s,u,f,p,v,_;if(!t)return t;let i={...hC,...e},o=Object.keys(i);if(!o.length)return t;let r=gC(o),a=[],l=0;for(let y of t.matchAll(r)){let $=y[0],x=((d=y.groups)==null?void 0:d.keyhtml)||((s=y.groups)==null?void 0:s.keyi18n)||((u=y.groups)==null?void 0:u.keyhtmlself)||((f=y.groups)==null?void 0:f.keyi18nself)||"",{index:I}=y;if(!i[x]){a.push(t.slice(l,I)),l=I+$.length;continue}let T=(p=y.groups)!=null&&p.childrenhtml?av(y.groups.childrenhtml,i):"",R=(v=y.groups)!=null&&v.childrenhtml?$.replace(new RegExp((_=y.groups)==null?void 0:_.childrenhtml),()=>T||""):$;a.push(t.slice(l,I),R),l=I+$.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function _c(t,e){B(e,!1);let i=g(e,"message",8),o=av(i());Wo();var r=Ve(),a=le(r);{var l=d=>{var s=Ve(),u=le(s);xd(u,()=>o),b(d,s)};M(a,d=>{o&&d(l)})}b(t,r),H()}var _C=L('<p class="quality-applies sublabel s-1q"><!></p>'),bC={hash:"s-1q",code:".quality-applies.s-1q{color:hsla(0,0%,100%,.5);display:flex;justify-content:end;padding:3px 0}.quality-applies span{color:#70c1ff}"};function lv(t,e){B(e,!1),Q(t,bC),Wo();var i=_C(),o=C(i);let r=mr(()=>q("quality_applience",{action:`<span>${q("quality_applience_action")}</span>`}));_c(o,{get message(){return n(r)}}),S(i),b(t,i),H()}var Tb=({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:Gl,valueComponentParams:{prefix:q("other_quality"),selected:o},children:"quality-other-settings"}},dv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:q("auto_quality_limit"),valueComponent:e?Gl:void 0,valueComponentParams:{prefix:q("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),Ib=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:lv,bottomBordered:!0,children:"quality-appliance"}),cv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"quality-high",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:q("high_quality"),valueComponent:t?Gl:void 0,valueComponentParams:{prefix:q("high_quality"),selected:i},sublabel:q("high_quality_description")}),uv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleTrafficSaving:o})=>({id:"quality-traffic-saving",type:"SELECT_VALUE",value:"save_traffic",selectItem:()=>o(!0,e),selected:i,label:q("traffic_saving_quality"),valueComponent:t?Gl:void 0,valueComponentParams:{prefix:q("traffic_saving_quality"),selected:i},sublabel:q("traffic_saving_quality_description")});var Zu=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),Ju=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,r;if(i==="und"?r=void 0:i&&(r=(l=Jd(i))!=null?l:i),o&&i&&r){let d=e.filter(s=>s.label===o&&s.language===i);if(d.length===1)return q("audio_stream_display_language_label",{language:r,label:o});{let s=Zu(t,d);return q("audio_stream_display_language_label_index",{language:r,label:o,index:s})}}if(o){let d=e.filter(s=>s.label===o);if(d.length===1)return o;{let s=Zu(t,d);return q("audio_stream_display_label_index",{label:o,index:s})}}if(i&&r){let d=e.filter(s=>s.language===i);if(d.length===1)return r;{let s=Zu(t,d);return q("audio_stream_display_language_index",{language:r,index:s})}}let a=Zu(t,e);return q("audio_stream_display_unknown",{index:a})};var $C={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:r}=t,a=[];return i&&a.push({handler:dv,selected:e&&!o&&!r||!1}),a.push({handler:uv,selected:o},{handler:cv,selected:r}),{title:q("submenu_quality"),id:"quality-settings",items:[Ib(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),Tb(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(r=>({type:"SELECT_VALUE",value:r.value,valueComponent:Ja,valueComponentParams:{quality:r.value,label:r.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:r.selected,label:r.displayValue}))}),"quality-appliance":t=>{var i,o,r;let{closeSettingsMenu:e}=t;return{id:"quality-appliance",title:q("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:dv,selected:((i=yu())==null?void 0:i.type)==="auto_quality"},{handler:uv,selected:((o=yu())==null?void 0:o.type)==="traffic_saving"},{handler:cv,selected:((r=yu())==null?void 0:r.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-tracks":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-tracks",title:q("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(r=>({type:"SELECT_VALUE",value:r,dataValue:r.id,selectItem:o,selected:r.id===(i==null?void 0:i.id),label:Ju(r,e)}))}),"playback-rate":({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"playback-rate",title: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===Vn?"sub_off":void 0}))})},Eb=({subMenuId:t,context:e})=>t?[$C[t](e)]:[];var yC=Ae('<path d="M3.1 9.5c0-2.24 0-3.36.44-4.22A4 4 0 015.28 3.54C6.14 3.1 7.26 3.1 9.5 3.1h5c2.24 0 3.36 0 4.22.44a4 4 0 011.74 1.74c.44.86.44 1.98.44 4.22s0 3.36-.44 4.22a4 4 0 01-1.74 1.74c-.84.43-1.93.44-4.07.44l.55 2.2h1.9a.9.9 0 010 1.8H6.9a.9.9 0 110-1.8h1.9l.55-2.2c-2.14 0-3.23-.01-4.07-.44a4 4 0 01-1.74-1.74C3.1 12.86 3.1 11.74 3.1 9.5m11.4-4.6h-5c-1.15 0-1.9 0-2.48.05-.56.04-.79.12-.92.19a2.2 2.2 0 00-.96.96 2 2 0 00-.2.92C4.9 7.6 4.9 8.35 4.9 9.5s0 1.9.05 2.48c.04.56.12.79.19.92q.33.63.96.96c.13.07.36.15.92.2.58.04 1.33.04 2.48.04h5c1.15 0 1.9 0 2.48-.05.56-.04.79-.12.92-.19a2.2 2.2 0 00.96-.96c.07-.13.15-.36.2-.92.04-.58.04-1.33.04-2.48s0-1.9-.05-2.48a3 3 0 00-.19-.92 2.2 2.2 0 00-.96-.96 2 2 0 00-.92-.2c-.58-.04-1.33-.04-2.48-.04m-3.3 11-.55 2.2h2.7l-.55-2.2z"></path>');function pv(t){Ye(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=yC();b(e,o)},$$slots:{default:!0}})}var xC=Ae('<path d="M8.3 14.25c1.86 1.9 5.5.02 5.5-3.55V5.64l2.4-.7A2.74 2.74 0 0 0 18 2.37V.64a.75.75 0 0 0-.92-.62l-.26.06C15.88.3 14.93.51 14 .8c-1.33.45-2.03 1.62-2.01 3.08V9c-3.89.2-5.64 3.29-3.7 5.25ZM.9.1a.9.9 0 0 0 0 1.8h8.2a.9.9 0 0 0 0-1.8H.9ZM.9 5.1a.9.9 0 1 0 0 1.8h7.2a.9.9 0 0 0 0-1.8H.9ZM0 11c0-.5.4-.9.9-.9h4.18a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 11Z"></path>');function fv(t){Ye(t,{width:"18",height:"15",children:(e,i)=>{var o=xC();b(e,o)},$$slots:{default:!0}})}var wC=Ae('<path d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69A8 8 0 0 1 11 4.07M5.69 7.1 4.26 5.68A10 10 0 0 0 2.05 11h2.02a8 8 0 0 1 1.62-3.9M2.05 13c.2 2.01 1 3.84 2.21 5.32l1.43-1.43A8 8 0 0 1 4.07 13zM11 21.95v-2.02a8 8 0 0 1-3.9-1.62l-1.42 1.43A10 10 0 0 0 11 21.95M22 12c0 5.16-3.92 9.42-8.95 9.95v-2.02C16.97 19.41 20 16.05 20 12s-3.03-7.41-6.95-7.93V2.05C18.08 2.58 22 6.84 22 12M10.69 8.58l4.74 2.73a.8.8 0 0 1 0 1.37l-4.74 2.74a.8.8 0 0 1-1.19-.68V9.26a.8.8 0 0 1 1.19-.68"></path>');function mv(t){Ye(t,{testId:"play-speed-icon",children:(e,i)=>{var o=wC();b(e,o)},$$slots:{default:!0}})}var SC=Ae('<path d="M12 2a.9.9 0 01.9.9v10.93l4.56-4.57a.9.9 0 011.28 1.28l-6.1 6.1a.9.9 0 01-1.28 0l-6.1-6.1a.9.9 0 111.28-1.28l4.56 4.57V2.9A.9.9 0 0112 2M4 20a.9.9 0 01.9-.9h14.2a.9.9 0 110 1.8H4.9A.9.9 0 014 20"></path>');function vv(t){Ye(t,{testId:"download-icon",children:(e,i)=>{var o=SC();b(e,o)},$$slots:{default:!0}})}var CC=Ae('<path d="M8.86 2.1h6.28c.67 0 1.2.21 1.68.7l4.38 4.38c.48.48.7 1 .7 1.68v6.28c0 .68-.22 1.2-.7 1.68l-4.38 4.38c-.48.48-1 .7-1.68.7H8.86c-.68 0-1.2-.22-1.68-.7L2.8 16.82c-.48-.48-.7-1-.7-1.68V8.86c0-.68.22-1.2.7-1.68L7.18 2.8c.48-.49 1-.7 1.68-.7m-.44 2L4.1 8.43c-.18.18-.21.24-.21.5v6.17c0 .25.03.31.2.5l4.32 4.3c.18.18.24.21.5.21h6.17c.25 0 .31-.03.5-.2l4.3-4.32c.18-.18.21-.24.21-.5V8.92c0-.25-.03-.31-.2-.5l-4.32-4.3c-.18-.18-.24-.21-.5-.21H8.92c-.25 0-.32.03-.5.2M13 16a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-.1-8.1a.9.9 0 0 0-1.8 0v5.2a.9.9 0 1 0 1.8 0z"></path>');function gv(t){Ye(t,{testId:"report-icon",children:(e,i)=>{var o=CC();b(e,o)},$$slots:{default:!0}})}var TC=Ae('<path d="M4 12.3V12c0-1.47 0-2.55.08-3.4.07-.9.21-1.48.45-1.95a4.85 4.85 0 0 1 2.12-2.12 5.1 5.1 0 0 1 1.95-.45C9.5 4 10.68 4 12.3 4h4.51c-.03-.16-.09-.33-.17-.49a2.4 2.4 0 0 0-1.05-1.05c-.3-.16-.63-.21-.93-.24-.29-.02-.64-.02-1.03-.02h-1.37c-1.58 0-2.81 0-3.81.08a6.84 6.84 0 0 0-2.62.64 6.65 6.65 0 0 0-2.9 2.91c-.4.76-.57 1.6-.65 2.62-.08 1-.08 2.23-.08 3.81v1.37c0 .4 0 .74.02 1.03.03.3.08.62.24.93A2.4 2.4 0 0 0 4 16.8V12.3ZM10.08 6h-.03c-.53 0-.97 0-1.33.03-.39.03-.76.1-1.12.28a2.9 2.9 0 0 0-1.3 1.3c-.17.35-.24.72-.27 1.1C6 9.09 6 9.53 6 10.06v7.9c0 .53 0 .97.03 1.33.03.39.1.76.28 1.12a2.9 2.9 0 0 0 1.3 1.3c.35.17.72.24 1.1.27.37.03.81.03 1.33.03h6.91c.53 0 .97 0 1.33-.03.39-.03.76-.1 1.12-.28a2.9 2.9 0 0 0 1.3-1.3c.17-.35.24-.72.27-1.1.03-.37.03-.81.03-1.34v-7.9c0-.53 0-.97-.03-1.33-.03-.39-.1-.76-.28-1.12a2.9 2.9 0 0 0-1.3-1.3 2.96 2.96 0 0 0-1.1-.27C17.91 6 17.47 6 16.94 6h-6.87ZM8.41 7.92c.06-.04.18-.07.45-.1.28-.02.65-.02 1.22-.02h6.84c.57 0 .94 0 1.22.02.27.03.39.06.45.1.21.1.39.28.5.49.03.06.06.18.09.45.02.28.02.65.02 1.22v7.84c0 .57 0 .94-.02 1.22-.03.27-.06.39-.1.45-.1.21-.28.39-.49.5-.06.03-.18.06-.45.09-.28.02-.65.02-1.22.02h-6.84c-.57 0-.94 0-1.22-.02a1.23 1.23 0 0 1-.45-.1 1.1 1.1 0 0 1-.5-.49 1.23 1.23 0 0 1-.09-.45c-.02-.28-.02-.65-.02-1.22v-7.84c0-.57 0-.94.02-1.22.03-.27.06-.39.1-.45.1-.21.28-.39.49-.5Z"></path>');function ep(t){Ye(t,{children:(e,i)=>{var o=TC();b(e,o)},$$slots:{default:!0}})}var IC=Ae('<path d="M12 20.1a8.1 8.1 0 1 0 0-16.2 8.1 8.1 0 0 0 0 16.2m0 1.9a10 10 0 1 1 0-20 10 10 0 0 1 0 20m0-12.37A1.32 1.32 0 1 1 12 7a1.32 1.32 0 0 1 0 2.63m-.95 2.82c0-.54.43-.98.95-.98s.95.44.95.98v3.83c0 .54-.43.98-.95.98a.96.96 0 0 1-.95-.98z"></path>');function hv(t){Ye(t,{testId:"info-icon",children:(e,i)=>{var o=IC();b(e,o)},$$slots:{default:!0}})}var EC=L('<div class="menu-item-value-wrapper s-1u"><!></div>'),PC={hash:"s-1u",code:".menu-item-value-wrapper.s-1u{line-height:normal}"};function _v(t,e){B(e,!0),Q(t,PC);let[i,o]=Be(),r=()=>w(u,"$currentQuality$",i),a=()=>w(f,"$availableQualities$",i),l=()=>w(p,"$isAutoQualityEnabled$",i),d=()=>w(v,"$isMobile$",i),s=xe(),u=s.state.currentQuality$,f=s.state.availableQualities$,p=s.state.isAutoQualityEnabled$,v=s.ui.isMobile,_=m(()=>wb({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=EC(),$=C(y);Ja($,{get quality(){return r()},get label(){return n(_)},get isMobile(){return d()}}),S(y),b(t,y),H(),o()}var kC={"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:Kd,label:q("menu_quality"),value:e,valueComponent:_v,weight:is["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:is["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:q("aria_label_submenu_traffic_saving"),icon:pv,label:q("menu_traffic_saving"),enabled:t,tooltipText:q("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-tracks-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=Ju(t,e);return{id:"audio-tracks-settings",weight:is["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:q("aria_label_menu_audio_languages",{actual:i}),icon:fv,label:q("menu_audio_languages"),value:i,children:"audio-tracks"}},"playback-rate-settings":({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(r=>r.value===e))==null?void 0:o.displayValue)||"";return{id:"playback-rate-settings",weight:is["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:q("aria_label_menu_rate",{actual:i}),icon:mv,label:q("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:is["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:q("aria_label_menu_subtitle",{actual:t.displayValue}),icon:ua,iconProps:{type:"outline"},label:q("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:is.download,type:"CLICK",onClick:t,label:q("download_video_caption"),ariaLabel:q("aria_label_menu_download"),icon:vv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:is.report,type:"CLICK",onClick:t,label:q("menu_report"),ariaLabel:`${q("menu_report")}. ${q("aria_label_new_tab_alert")}`,icon:gv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:is["copy-data"],type:"CLICK",onClick:t,label:q("menu_copy_debug"),ariaLabel:q("menu_copy_debug"),icon:ep,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:is["save-trace-info"],type:"CLICK",onClick:t,label:q("menu_save_debug"),ariaLabel:q("menu_save_debug"),icon:ep,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:is["debug-info"],type:"CLICK",onClick:t,ariaLabel:q("aria_label_menu_debug_overlay"),label:q("menu_debug_overlay"),icon:hv,isHiddenFor:["desktop"]})},Pb=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>kC[r](e)),...i.map(r=>({...r,isAdditional:!0}))].filter(r=>{var a,l,d;return!((a=r==null?void 0:r.isHiddenFor)!=null&&a.length)||!((l=r==null?void 0:r.isHiddenFor)!=null&&l.includes("desktop"))&&!o||!((d=r==null?void 0:r.isHiddenFor)!=null&&d.includes("mobile"))&&o}).sort(Oa)};var VC=(t,e)=>{Iu(t,e)},RC=L('<div><div> </div> <div class="close s-m" data-testid="close-settings-menu"></div></div>'),DC=L('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),NC=L("<div><!> <!></div>"),OC={hash:"s-m",code:'.settings-menu-container.mobile.s-m{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-m ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-m .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-m .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-m .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-m .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-m .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-m .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-m{line-height:40px}.settings-menu.desktop.s-m{min-width:300px}.settings-menu-container.s-m .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-m .menu.mobile.hidden{display:none}.settings-menu-container.s-m .menu .item:not(.switch-item),.settings-menu-container.s-m .menu .switch-wrapper{align-items:center;color:var(--white);cursor:pointer;display:flex;justify-content:flex-end;position:relative;white-space:nowrap}.settings-menu-container.s-m .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-m .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-m .item:not(.switch-item),.settings-menu.s-m .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-m .item.mobile:not(.switch-item),.settings-menu.s-m .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-m .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-m .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-m .item.header.mobile:where(.s-m){border-bottom:var(--divider-border);color:var(--white);column-gap:12px;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:4px}.settings-menu-container.s-m .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-m .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-m .items::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.settings-menu-container.s-m .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-m .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-m{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-m:after,.close.s-m:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-m:before{transform:rotate(45deg)}.close.s-m:after{transform:rotate(-45deg)}'};function bc(t,e){B(e,!0),Q(t,OC);let[i,o]=Be(),r=()=>w(j,"$settingsMenuVisible",i),a=()=>w(ne,"$settingsMenuOpenedByKeyboard",i),l=()=>w(ct,"$debugPanelVisible",i),d=()=>w(Le,"$isMobile",i),s=()=>w(nt,"$playerSize",i),u=()=>w(ke,"$hasMpegSources$",i),f=()=>w(ze,"$mobileNotReportControlHidden$",i),p=()=>w(fe,"$autoQualityLimitingAvailable$",i),v=()=>w(ee,"$isMinimalView$",i),_=()=>w(Re,"$availableSubtitlesList$",i),y=()=>w(Ce,"$isLiveWithPlaybackSpeed",i),$=()=>w(Ee,"$availableAudioStreams$",i),x=()=>w(me,"$availablePlaybackRates$",i),I=()=>w($e,"$currentAudioStream$",i),T=()=>w(O,"$currentPlaybackRate$",i),R=()=>w(we,"$trafficSavingEnabled",i),k=()=>w(ce,"$currentQuality$",i),P=()=>w(ve,"$isAutoQualityEnabled$",i),E=()=>w(ue,"$currentSubtitle$",i),W=()=>w(at,"$additionalSettingsMenuItems$",i),U=()=>w(X,"$isAutoQualityAvailable$",i),z=()=>w(Qe,"$availableQualities$",i),Y=()=>w(Fe,"$highQualityEnabled",i),ie=g(e,"ref",15,void 0),J=g(e,"playerControlsHeight",3,0),oe=ii({}),de=ii({}),ae=xe(),pe=At(),ee=ae.ui.isMinimalView$,$e=ae.state.audioStream$,Ee=ae.state.availableAudioStreams$,ce=ae.state.currentQuality$,Qe=ae.state.availableQualities$,fe=ae.state.autoQualityLimitingAvailable$,ve=ae.state.isAutoQualityEnabled$,X=ae.state.isAutoQualityAvailable$,O=ae.state.currentPlaybackRate$,me=ae.state.availablePlaybackRates$,ue=ae.state.currentSubtitle$,Re=ae.state.availableSubtitlesList$,Ze=ae.state.canDownload,ke=ae.state.hasMpegSources$,j=ae.ui.settingsMenu.visible$,ne=ae.ui.settingsMenu.openedByBtnKeyboard$,Se=ae.ui.settingsMenu.ref$,Le=ae.ui.isMobile,ze=ae.ui.mobileNotReportControlHidden$,Ce=ae.state.canChangePlaybackSpeed$,we=ae.state.trafficSavingEnabled$,Fe=ae.state.highQualityEnabled$,nt=ae.ui.playerSize,ct=ae.ui.debugPanelVisible,kt=ae.state.isInteractiveTime$,at=ae.ui.additionalSettingsMenuItems$,ti=ae.ui.t,yt=ae.actions.internal.downloadVideo,Mt=ae.actions.internal.closeSettingsMenu,Vt=ae.actions.internal.openSettingsSubMenu,Wt=ae.actions.internal.closeSettingsSubMenu,Te=K(!1),G=K(void 0),Oe=$b();He(()=>{!r()&&Oe.current&&(Wt(de[Oe.current]),Oe.popAllSubMenus())}),He(()=>{r()||D(G,void 0)}),He(()=>{!Oe.current&&n(G)&&I_(oe,n(G))}),He(()=>{ie()&&Se.set(ie())});async function be(F){var Ht;Oe.pushSubMenu(F),await uo(),Vt(F,de[F]);let it=(Ht=ie())==null?void 0:Ht.firstElementChild;it&&Df(it)}function Ne(F){var it;F==null||F.stopPropagation(),a()||(it=e.returnFocus)==null||it.call(e),Mt(),D(Te,!1)}function Ie(F,it){ae.actions.internal.setQuality(F,{appliesTo:it,byUser:!0}),Ne()}function gt(F){ae.actions.internal.setAudioStream(F),Ne()}function ye(F,it){ae.actions.internal.setTrafficSavingEnabled(F,it),pe.features.qualityDetailsSubMenuEnabled&&Ne()}function qe(F,it){ae.actions.internal.setHighQualityEnabled(F,it),Ne()}function Ue(F){ae.actions.internal.setPlaybackRate(F),Ne()}function rt(F){ae.actions.internal.setSubtitle(F),Ne()}function Kt(){yt()}function It(){MC(e.supportLink)&&window.open(e.supportLink,"_blank"),ae.actions.internal.reportProblem(),ae.actions.internal.pause()}function qt(){Vl(ae.actions.internal.getDebugTextData())}let gi=()=>{let F=ae.actions.internal.getTraceTextData(),it=new Blob([...F],{type:"application/json"}),Ht=window.URL.createObjectURL(it);Da(Ht,"vk_player_trace_info","json")};function Ai(){ct.set(!l())}function Ii(){D(Te,!0)}function Gi(){D(Te,!1)}function oi(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-J()}px; overflow: auto;`}let ut=m(()=>Ze&&u()&&!f()),ai=m(()=>pe.features.trafficSaving&&!f()&&p()&&!pe.features.qualityDetailsSubMenuEnabled),Yi=m(()=>!v()&&_().length>0&&!f()),Ct=m(()=>!!y()&&!f()),fi=m(()=>pe.features.audioLanguages&&$().length>=2&&!f()),di=m(()=>!f());Pt(()=>kt.subscribe(F=>{F&&!d()&&!n(Te)&&!a()&&Ne()}));let We=m(()=>{let F=[n(di)&&"quality-settings",n(fi)&&"audio-tracks-settings",n(Ct)&&"playback-rate-settings",n(Yi)&&"subtitles-settings",n(ai)&&"traffic-saving-switch",n(ut)&&"download",pe.showSupport&&"show-support","copy-data",pe.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(it=>!!it);return Pb({items:F,context:{qualityDetailsSubMenuEnabled:pe.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:x(),currentAudioStream:I(),availableAudioStreams:$(),currentPlaybackRate:T(),selectPlaybackRate:Ue,trafficSavingEnabled:R(),toggleTrafficSaving:ye,currentQuality:k()||Ab.INVARIANT,isAutoQualityEnabled:P()||!1,currentSubtitle:E(),isMobile:d(),onDownloadClick:Kt,onCopyDataClick:qt,onReportProblemClick:It,onSaveTraceDataClick:gi,toggleShowDebugInfo:Ai},additionalSettingsMenuItems:W()})}),st=m(()=>Eb({subMenuId:Oe.current,context:{availablePlaybackRates:x(),selectPlaybackRate:Ue,trafficSavingEnabled:R(),toggleTrafficSaving:ye,currentQuality:k()||Ab.INVARIANT,isAutoQualityEnabled:P()||!1,isAutoQualityAvailable:U()||!1,availableQualities:z(),highQualityEnabled:Y(),toggleHighQuality:qe,availableAudioStreams:$(),availableSubtitlesList:_(),closeSettingsMenu:Mt,currentAudioStream:I(),isMobile:d(),selectAudioLanguage:gt,selectQuality:Ie,selectSubtitle:rt}}));var yi=NC();let ji;var ho=C(yi);{var To=F=>{var it=DC();let Ht;it.__keydown=[VC,Mt];var ci=C(it);{var dt=Qt=>{var wt=RC();let oo;var Io=C(wt),Rn=C(Io,!0);S(Io);var cn=A(Io,2);cn.__click=Ne,S(wt),N((Ei,bi)=>{oo=te(wt,1,"item header s-m",null,oo,Ei),he(Rn,bi)},[()=>({mobile:d()}),()=>ti("submenu_settings")]),b(Qt,wt)};M(ci,Qt=>{d()&&Qt(dt)})}var ni=A(ci,2);let ui;_i(ni,21,()=>n(We),Qt=>Qt.id,(Qt,wt)=>{var oo=Ve(),Io=le(oo);{var Rn=Ei=>{ov(Ei,{get isMobile(){return d()},get id(){return n(wt).id},get icon(){return n(wt).icon},get iconProps(){return n(wt).iconProps},get label(){return n(wt).label},get ariaLabel(){return n(wt).ariaLabel},get value(){return n(wt).value},get valueComponent(){return n(wt).valueComponent},onClick:()=>{be(n(wt).children),D(G,n(wt).id,!0)},get ref(){return oe[n(wt).id]},set ref(bi){oe[n(wt).id]=bi}})},cn=(Ei,bi)=>{{var Qo=mi=>{let _o=m(()=>`${n(wt).id}-menu-item`);nv(mi,{get isMobile(){return d()},get id(){return n(_o)},get onClick(){return n(wt).onClick},get icon(){return n(wt).icon},get label(){return n(wt).label},get ariaLabel(){return n(wt).ariaLabel},closeSettings:Ne})},Jn=(mi,_o)=>{{var un=Eo=>{let pn=m(()=>`${n(wt).id}-menu-item`);sv(Eo,{get isMobile(){return d()},get id(){return n(pn)},get onClick(){return n(wt).onClick},get icon(){return n(wt).icon},get label(){return n(wt).label},get ariaLabel(){return n(wt).ariaLabel},get enabled(){return n(wt).enabled},get tooltipText(){return n(wt).tooltipText},get maxTooltipWidth(){return n(wt).maxTooltipWidth}})};M(mi,Eo=>{n(wt).type==="SWITCH"&&Eo(un)},_o)}};M(Ei,mi=>{n(wt).type==="CLICK"?mi(Qo):mi(Jn,!1)},bi)}};M(Io,Ei=>{n(wt).type==="OPEN_SUB_MENU"?Ei(Rn):Ei(cn,!1)})}b(Qt,oo)}),S(ni),tt(ni,Qt=>ie(Qt),()=>ie()),S(it),N((Qt,wt,oo)=>{Ht=te(it,1,"settings-menu menu s-m",null,Ht,Qt),ui=te(ni,1,"items",null,ui,wt),Ke(ni,oo)},[()=>({desktop:!d(),mobile:d(),hidden:!!Oe.current}),()=>({mobile:d()}),oi]),mt("mouseenter",it,Ii),mt("mouseleave",it,Gi),b(F,it)};M(ho,F=>{r()&&F(To)})}var dn=A(ho,2);_i(dn,17,()=>n(st),F=>F.id,(F,it)=>{let Ht=m(()=>{var ci;return(ci=n(it).minWidth)!=null?ci:137});iv(F,{get isMobile(){return d()},get playerControlsHeight(){return J()},get returnFromSubMenu(){return Oe.popSubMenu},get id(){return n(it).id},get title(){return n(it).title},get closeSettingsMenu(){return Mt},openSubMenuList:be,get items(){return n(it).items},get minWidth(){return n(Ht)},get refMenuItems(){return oe},get listRef(){return de[n(it).id]},set listRef(ci){de[n(it).id]=ci}})}),S(yi),N(F=>ji=te(yi,1,"settings-menu-container s-m",null,ji,F),[()=>({mobile:d(),hidden:!r()})]),b(t,yi),H(),o()}Xe(["keydown","click"]);var BC=L('<button class="btn s-11"> </button>'),HC={hash:"s-11",code:"button.btn.s-11{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function bv(t,e){Q(t,HC);var i=BC();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=C(i,!0);S(i),N(()=>he(o,e.label)),b(t,i)}Xe(["click"]);var FC=L('<div class="container s-h"><div class="notification s-h"><div><p class="description s-h"><!></p> <!></div> <!></div></div>'),UC={hash:"s-h",code:".container.s-h{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px;z-index:var(--controls-container-z-index)}.notification.s-h{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-h{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function $c(t,e){B(e,!0),Q(t,UC);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=At(),{ui:{t:r}}=xe(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=FC(),d=C(l),s=C(d),u=C(s),f=C(u);_c(f,{get message(){return a}}),S(u);var p=A(u,2);{var v=y=>{let $=m(()=>r("slow_video_notification_button"));bv(y,{get label(){return n($)},get onClick(){return e.onSelectAutoQuality}})};M(p,y=>{o||y(v)})}S(s);var _=A(s,2);Ns(_,{get onClick(){return e.onClose}}),S(d),S(l),Rs(3,d,()=>va,()=>({duration:i})),b(t,l),H()}import{isIntersecting as kb,Subscription as zC}from"@vkontakte/videoplayer-shared/es2018";var el="annotation",tp=class{constructor(e){this.slots=new Map;this.disabledIds=new Set(e)}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var s;let{overlay:o,id:r,controlsBehaviour:a,hideAllControls:l}=i;if(this.disabledIds.has(r))return{success:!1,message:"current slotId is disabled via config"};let d=typeof e=="function"?e():e;return d.setAttribute("slot",el),this.setupSlotStyles(d,o),this.shadowRootContainer.append(d),this.slots.set(r,{rootElement:d,options:i}),a&&this.runHidingControlsWhenIntersected(r,a),l&&((s=this.store)==null||s.ui.isControlsAvailable.set(!1)),{success:!0}}setupSlotStyles(e,i){switch(e.style.position="absolute",i){case"over_video":e.style.zIndex="calc(var(--video-container-z-index) + 1)";break;case"over_controls":e.style.zIndex="calc(var(--controls-container-z-index) + 1)";break;default:e.style.zIndex="0"}}async runHidingControlsWhenIntersected(e,{observedSlotElementId:i,controlsToObserve:o}){var f;let r=this.slots.get(e);if(!r)return;let a=await this.findSlotElement(r.rootElement,i,e),{controls:l,hiddenControls:d}=((f=this.store)==null?void 0:f.ui)||{},s=new MutationObserver(p=>p.forEach(()=>{let v=Hs(a,this.shadowRootContainer);o.forEach(_=>{let y=l==null?void 0:l[_],$=y?_e(y):null,x=d==null?void 0:d[_];$&&(x==null||x.set(kb($,v)))})}));s.observe(a,{childList:!0,subtree:!0}),r.observer=s;let u=new zC;o.forEach(p=>{l&&u.add(l[p].subscribe(v=>{let _=d==null?void 0:d[p];v&&v.isDisplayed?_==null||_.set(kb(v,Hs(a,this.shadowRootContainer))):_==null||_.set(!1)}))}),r.subs=u}async findSlotElement(e,i,o){return new Promise(r=>{let a=null,l=new MutationObserver(()=>{if(a=e.querySelector(`#${i}`),a){l.disconnect();let s=this.slots.get(o);s&&(s.observerForFindingSlotElement=void 0),r(a)}});l.observe(e,{childList:!0,subtree:!0});let d=this.slots.get(o);d&&(d.observerForFindingSlotElement=l)})}remove(e){var u,f;let i=this.slots.get(e);if(!i)return;let{rootElement:o,observer:r,observerForFindingSlotElement:a,subs:l,options:{controlsBehaviour:d,hideAllControls:s}}=i;o&&o.remove(),[r,a].forEach(p=>p==null?void 0:p.disconnect()),l==null||l.unsubscribe(),this.slots.delete(e),s&&((u=this.store)==null||u.ui.isControlsAvailable.set(!0)),(f=d==null?void 0:d.controlsToObserve)==null||f.forEach(p=>{var v,_;(_=(v=this.store)==null?void 0:v.ui.hiddenControls[p])==null||_.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var WC=L('<div class="container s-5"><!></div>'),KC={hash:"s-5",code:".container.s-5{align-items:center;animation-fill-mode:forwards;animation-name:s-5-videoPlayerStatusIconPopup;background-color:#00000073;border-radius:100%;display:flex;height:64px;justify-content:center;width:64px;will-change:opacity,scale}@keyframes s-5-videoPlayerStatusIconPopup{0%{opacity:0;scale:.6}10%{animation-timing-function:ease-in;opacity:1;scale:1}75%{opacity:1;scale:1}90%{animation-timing-function:ease-out;opacity:0;scale:.4}to{opacity:0;scale:0}}"};function yc(t,e){B(e,!0),Q(t,KC);let i=g(e,"reversed",3,!1);var o=Ve(),r=le(o);Ls(r,()=>e.Icon,a=>{var l=WC(),d=C(l);Bi(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),S(l),N(()=>Ke(l,`animation-duration: ${e.duration}ms`)),b(a,l)}),b(t,o),H()}import{PlaybackState as Lb}from"@vkontakte/videoplayer-core/es2018";var QC=L('<div class="container s-1g"><!></div>'),qC={hash:"s-1g",code:".container.s-1g{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function $v(t,e){B(e,!0),Q(t,qC);let[i,o]=Be(),r=()=>w(s,"$playbackState$",i),a=()=>w(f,"$previewTrackActive",i),l=()=>w(p,"$previewTrackDragInProgress",i),d=()=>w(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:f,previewTrackDragInProgress:p}}=xe(),{features:{playbackStatusShow:v},playbackStatusAnimationDuration:_}=At(),y=0,$=K(null),x=K(!1);He(()=>{r()===Lb.PLAYING?D($,Mn,!0):r()===Lb.PAUSED?D($,zs,!0):D($,null)}),He(()=>{if(!(!v||a()||l()))return y=window.setTimeout(()=>{y=0,D($,null)},_),()=>{y&&(window.clearTimeout(y),y=0)}}),He(()=>{d()&&!n(x)&&(D(x,!0),D($,null))});var I=Ve(),T=le(I);{var R=k=>{var P=QC(),E=C(P);yc(E,{get duration(){return _},get Icon(){return n($)}}),S(P),b(k,P)};M(T,k=>{n($)&&v&&k(R)})}b(t,I),H(),o()}var GC=L('<div><div data-testid="video-container"></div></div>'),YC={hash:"s-e",code:".video-container.s-e,.video-wrapper.s-e{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-e{background:var(--black)}.video-container.s-e,.video-wrapper.s-e{z-index:var(--video-container-z-index)}.video-container.s-e{transition:var(--rotate-transition-duration) ease all}.video-container.fast-rotate.s-e{transition:none}.nocursor.s-e{cursor:none}"};function tl(t,e){B(e,!0),Q(t,YC);let[i,o]=Be(),r=()=>w(p,"$rotateAlpha",i),a=()=>w(v,"$playerSize",i),l=()=>w(f,"$playerPhase",i),d=()=>w(y,"$chromecastConnected$",i),s=()=>w(_,"$isPlaying$",i),u=g(e,"videoContainer",15),{playerPhase:f,ui:{rotateAlpha:p,playerSize:v},state:{isPlaying$:_,chromecastConnected$:y}}=xe(),{isSmoothVideoRotate:$}=At(),x=m(()=>u()&&r()%180?a().height/a().width:1);var I=GC();let T;I.__contextmenu=function(...P){var E;(E=e.onContextMenu)==null||E.apply(this,P)},I.__mousedown=function(...P){var E;(E=e.onMouseDown)==null||E.apply(this,P)},I.__mouseup=function(...P){var E;(E=e.onMouseUp)==null||E.apply(this,P)},I.__click=function(...P){var E;(E=e.onClick)==null||E.apply(this,P)},I.__dblclick=function(...P){var E;(E=e.onDblClick)==null||E.apply(this,P)};var R=C(I);let k;tt(R,P=>u(P),()=>u()),S(I),N((P,E)=>{T=te(I,1,"video-wrapper s-e",null,T,P),k=te(R,1,"video-container s-e",null,k,E),Ke(R,`transform: rotate(${r()}deg) scale(${n(x)})`),De(R,"data-is-playing",s())},[()=>({hidden:l()!=="video"||d(),nocursor:e.hideCursor}),()=>({"fast-rotate":!$})]),b(t,I),H(),o()}Xe(["contextmenu","mousedown","mouseup","click","dblclick"]);var jC=L('<div><span class="text s-1e"> </span> <!></div>'),XC={hash:"s-1e",code:".root.s-1e{background-color:var(--double-forward-bg);border-radius:100px;color:var(--white);display:flex;gap:4px;left:50%;opacity:0;padding:6px 12px;pointer-events:none;position:absolute;top:24px;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);visibility:hidden}.root.s-1e,.root.visible.s-1e{transform:translateX(-50%)}.root.visible.s-1e{opacity:1;visibility:visible}.text.s-1e{font-size:13px;font-weight:600;line-height:16px}"};function yv(t,e){B(e,!0),Q(t,XC);let{ui:{t:i}}=xe();var o=jC();let r;var a=C(o),l=C(a,!0);S(a);var d=A(a,2);fc(d,{get size(){return"16"},fill:"currentColor"}),S(o),N((s,u)=>{r=te(o,1,"root s-1e",null,r,s),he(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),b(t,o),H()}var ZC=L('<div class="container s-1c" role="button" data-testid="preview-track-overlay"><div class="icon s-1c"><!></div></div>'),JC={hash:"s-1c",code:".container.s-1c{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-1c,.icon.s-1c{align-items:center;display:flex;justify-content:center}.icon.s-1c{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-1c:hover .icon:where(.s-1c){transform:scale(1.15)}"};function xv(t,e){B(e,!1),Q(t,JC);let o=xe().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};Wo();var l=ZC();l.__click=a;var d=C(l),s=C(d);return Mn(s,{get size(){return"32"}}),S(d),S(l),Rs(3,l,()=>va,()=>({duration:r})),b(t,l),lf(e,"handleClick",a),H({handleClick:a})}Xe(["click"]);var eT=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},tT=L("<div><!></div>"),iT=L('<div class="spherical-video-icon s-9"><!></div>'),oT=L("<div><!></div>"),nT=L('<div class="settings-menu s-9"><!></div>'),rT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),sT=L("<!> <!> <!>",1),aT=L('<div class="blocked s-9"></div>'),lT=L('<div class="player-wrapper s-9"><!> <div class="overlay-container"></div></div> <!>',1),dT={hash:"s-9",code:".blocked.s-9,.player-wrapper.s-9{height:100%;position:absolute;width:100%}.blocked.s-9{z-index:var(--overlay-container-z-index)}.player-wrapper.s-9 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-9{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-9{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-menu.s-9{bottom:57px;left:0;position:absolute;right:18px;transition:opacity .2s;z-index:var(--settings-menu-z-index)}"};function wv(t,e){B(e,!0),Q(t,dT);let[i,o]=Be(),r=()=>w(yr,"$notificationsToShow$",i),a=()=>w(ai,"$playerPhase",i),l=()=>w(To,"$isLoaderVisible",i),d=()=>w(Gi,"$adPlaybackState",i),s=()=>w(ni,"$crashed",i),u=()=>w(Qo,"$isInteractiveTime$",i),f=()=>w(di,"$settingsMenuVisible",i),p=()=>w(Jn,"$isInteractiveExpectation$",i),v=()=>w(Ai,"$isMinimalView$",i),_=()=>w(fi,"$controlsVisible",i),y=()=>w(_o,"$touched",i),$=()=>w(Br,"$graphIsOpened$",i),x=()=>w(Yi,"$isFullscreen",i),I=()=>w(er,"$autoplayNextEnabled$",i),T=()=>w(Ht,"$postrollPassed",i),R=()=>w(dn,"$isEnded$",i),k=()=>w(wt,"$currentSubtitle$",i),P=()=>w(rr,"$cursorInside",i),E=()=>w(tr,"$isControlsAvailable",i),W=()=>w(Nr,"$doubleForwardOn$",i),U=()=>w(or,"$fakeIsPlaying$",i),z=()=>w(xr,"$bottomNoSmooth",i),Y=()=>w(ws,"$interactiveTimeIndicator",i),ie=()=>w(Io,"$playerSize",i),J=()=>w(cn,"$is3DVideo",i),oe=()=>w(Dn,"$doubleForwardAvailable$",i),de=()=>w(ji,"$contextMenuVisible$",i),ae=()=>w(Ii,"$playbackState$",i),pe=()=>w(un,"$hotKeyMapData",i),ee=()=>w(st,"$scrubbingInProgress",i),$e=()=>w(yi,"$volumeChangingInProgress",i),Ee=()=>w(F,"$chromecastConnected$",i),ce=()=>w(hn,"$controlsTimeoutActive",i),Qe=()=>w(Rn,"$adsPlaybackState",i),fe=()=>w(We,"$settingsMenuOpenedByKeyboard",i),ve=()=>w(Jo,"$contextMenuOpenedByKeyboard$",i),X=()=>w(Ss,"$contextMenuOpenedByHotKey$",i),O=()=>w(ar,"$contextMenuButtonRef$",i),me=()=>w(Ks,"$contextMenuLastActiveElem$",i),ue=()=>w(Ct,"$isFullscreenOpenedByKeyboard",i),Re=()=>w(pn,"$positionExact$",i),Ze=()=>w(gi,"$language$",i),ke=()=>w(ga,"$previewTrackActive$",i),j=()=>w(Ei,"$icon3DVideoVisible",i),ne=()=>w(it,"$chromecastDeviceName$",i),Se=()=>w(oo,"$currentSubtitleCaptions$",i),Le=()=>w(oi,"$position$",i),ze=()=>w(ut,"$duration$",i),Ce=()=>w(ci,"$isLive$",i),we=()=>w(dt,"$isPlaying$",i),Fe=()=>w(br,"$contextMenuPosition$",i),nt=()=>w(Eo,"$showHotKeyMap",i),ct=()=>w(ho,"$debugPanelVisible",i),kt=()=>w($r,"$userActionsDisabled$",i),at=g(e,"videoContainer",15),ti=g(e,"adsSlotId",3,void 0),yt=g(e,"adsParams",3,void 0),Mt=g(e,"adsAutoplayParam",3,void 0),Vt=g(e,"duration",3,void 0),Wt=g(e,"logoTargetUrl",3,""),Te=g(e,"showNextPrevButtons",3,!1),G=g(e,"nextButtonActive",3,!1),Oe=g(e,"prevButtonActive",3,!1),be=g(e,"endScreenVideoTitle",3,void 0),Ne=g(e,"endScreenVideoThumb",3,void 0),Ie=g(e,"isOneVideoPlaylist",3,!1),gt=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),rt=g(e,"showMiniTimer",3,!1),Kt=g(e,"showEndScreen",3,!0),It=g(e,"keyboardControls",15),qt=e.store.getLogger().createComponentLog("Root component"),gi=e.store.interfaceLanguage$,Ai=e.store.ui.isMinimalView$,Ii=e.store.state.playbackState$,Gi=e.store.ads.playbackState,oi=e.store.state.positionWithScrubbing$,ut=e.store.state.duration$,ai=e.store.playerPhase,Yi=e.store.ui.isFullscreen,Ct=e.store.ui.isFullscreenOpenedByKeyboard,fi=e.store.ui.controlsVisible,di=e.store.ui.settingsMenu.visible$,We=e.store.ui.settingsMenu.openedByBtnKeyboard$,st=e.store.ui.scrubbingInProgress,yi=e.store.ui.volumeChangingInProgress,ji=e.store.ui.contextMenu.visible$,ho=e.store.ui.debugPanelVisible,To=e.store.state.isLoaderVisible,dn=e.store.state.isEnded$,F=e.store.state.chromecastConnected$,it=e.store.state.chromecastDeviceName$,Ht=e.store.ads.postrollPassed,ci=e.store.state.isLive$,dt=e.store.state.isPlaying$,ni=e.store.state.crashed$,ui=e.store.webApi.annotationsApi,Qt=e.store.webApi.pictureInPictureApi,wt=e.store.state.currentSubtitle$,oo=e.store.state.currentSubtitleCaptions$,Io=e.store.ui.playerSize,Rn=e.store.ads.playbackState,cn=e.store.ui.is3DVideo,Ei=e.store.ui.icon3DVideoVisible,bi=e.store.state.isInteractive,Qo=e.store.state.isInteractiveTime$,Jn=e.store.state.isInteractiveExpectation$,mi=e.store.state.hasInteractiveBranches,_o=e.store.ui.touched,un=e.store.ui.modals.hotKeyMap.data,Eo=e.store.ui.modals.hotKeyMap.show,pn=e.store.state.positionExact$,xs=e.store.ui.overlayContainer$,ws=e.store.ui.controls.interactiveTimeIndicator,os=e.store.state.showInteractiveTimeIndicator,br=e.store.ui.contextMenu.position$,fn=e.store.actions.internal.setQuality,mn=e.store.actions.internal.closeSettingsMenu,er=e.store.ui.autoplayNextEnabled$,$r=e.store.ui.userActionsDisabled,tr=e.store.ui.isControlsAvailable,Dr=e.store.ui.videoTitleInfo,Nr=e.store.ui.doubleForwardOn$,Dn=e.store.ui.doubleForwardAvailable$,ir=e.store.actions.internal.getVideoElement,Nn=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:or,notifications$:Or,graphIsOpened$:Br}=go(),xi=K(void 0),ns=K(void 0),qo=K(void 0),vt=K(void 0),Gt,nr,On;un.set(b_());let{closeNotification:Hr,notificationsToShow$:yr}=Or,Fr=m(()=>!!r().slow_video),vn=()=>Hr("slow_video"),Go=m(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),gn=K(void 0),xr=se(!1),wr,hn=se(!1),_n=se(),rr=se(!1),Pi=K(!1),bo=K(!1),Po=K(!1),no=K(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),bn=m(()=>u()&&!f()&&!(n(Pi)||n(bo))&&!(n(Po)&&!p())),$n=!0,Ur=m(()=>e.uiConfig.features.thumbTimer&&!v()&&rt()&&a()==="video"&&!_()&&!s()&&!bi&&(e.uiConfig.hideThumbTimerAfterTouch&&!y()||!e.uiConfig.hideThumbTimerAfterTouch)),xt=e.uiConfig.titleShowBehaviour,ri=m(()=>!["video","thumb"].includes(a())||xt==="never"||$()?!1:xt==="fullscreen"?x():!0),Ut=m(()=>xt==="always"||a()==="thumb"?!1:!_()),po=K(!1),Yo=m(()=>(Kt()||e.showAutoplayNext&&I())&&!!be()&&!!Ne()&&(e.showAds&&T()||!e.showAds)&&R()&&!s()&&!n(po)&&!mi),Ao=m(()=>!v()&&k().value!=="off"&&a()==="video"),jo=m(()=>P()&&!(_()||n(Yo))&&!u()&&E()&&!W()),Xi=K(!1),yn=m(()=>U()!==null),{toggle:Sr}=or,xn=!1,Bn=null;Qt==null||Qt.setContext(rd());let rs=()=>{e.autoplay&&!bi&&e.uiConfig.controls.showOnStartupAtAutoplay&&Zi(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:rs});let ss=()=>{window.clearTimeout(Gt),hn.set(!1)},as=()=>{window.clearTimeout(nr),_n.set(null)},Zi=ge=>{ss(),hn.set(!0),Gt=window.setTimeout(()=>hn.set(!1),ge);let St=ge-100;wr=window.setTimeout(()=>{z()&&xr.set(!1)},St>0?St:ge)},ls=(ge,St)=>{as(),_n.set(St),nr=window.setTimeout(()=>_n.set(null),ge)},zr=cn.subscribe(ge=>{Ei.set(ge),ge&&(window.clearTimeout(On),On=window.setTimeout(()=>Ei.set(!1),e.uiConfig.controls.hide360IconTimeout))}),fo=async()=>{var St,hi,Li,Ro;let ge=sa();if(ge){let yo=Md(),Ji=ht();ge=yo===Ji||yo===gt()}if(ge){Zi(e.uiConfig.controls.hideTimeoutFullscreen);try{await(Qt==null?void 0:Qt.exit())}catch(yo){qt({message:String(yo)})}}Yi.set(ge),e.store.getAdmanWrapper().setFullscreen(ge),x()?(hi=(St=e.store.callbacks)==null?void 0:St.onFullscreenEnter)==null||hi.call(St):(Ro=(Li=e.store.callbacks)==null?void 0:Li.onFullscreenExit)==null||Ro.call(Li)},Cr=ge=>{Io.set(ge)},Je=()=>{if(n(xi)){let{width:ge,height:St}=n(xi).getBoundingClientRect();Io.set({width:ge,height:St})}};Pt(()=>{var St;return Cu(fo),e.uiConfig.features.annotationsInside&&(ui==null||ui.init(n(xi))),Qt==null||Qt.assignPlayerContainer(n(xi)),e.uiConfig.disablePiPResizeHandling||Qt==null||Qt.setExternalEventHandlers({resize:Cr,leavepictureinpicture:Je}),e.interactiveContainer&&((St=at().parentElement)==null||St.insertBefore(e.interactiveContainer,at().nextSibling)),()=>{window.clearTimeout(Gt),window.clearTimeout(wr),window.clearTimeout(nr),window.clearTimeout(On),zr(),Qt==null||Qt.dispose().catch(hi=>{qt({message:String(hi)})}),Tu(fo)}});let ht=()=>{let ge=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!ye()?n(xi):ye(),St=ge.getRootNode(),hi=St instanceof ShadowRoot?St.host:St,Li=Ue()instanceof HTMLElement&&Ue().contains(hi);return e.uiConfig.allowChangingFullscreenTarget&&Ue()&&Li?Ue():ge},jt=()=>{ji.set(!1)},ki=()=>{mn(),jt()},ro=async()=>{if(!Nn()){qt({message:"fullscreen disabled"});return}jt(),sa()?(await Su(document),qt({message:"exit fullscreen"})):(qt({message:"request fullscreen"}),await wu(ht()))},Ri=ge=>{$()||(ge.preventDefault(),ji.set(!0),br.set({left:ge.clientX,top:ge.clientY}))};function mo(){rr.set(!0),bi||Zi(e.uiConfig.controls.hideTimeoutCursor)}function ko(ge){var yo,Ji;let{relatedTarget:St}=ge,Li=!!(St&&((yo=n(qo))!=null&&yo.contains(St)))&&((Ji=It())==null?void 0:Ji.isFocused()),Ro=e.uiConfig.controls.showOnStartupAtAutoplay||!!St;!bi&&!Li&&Ro&&(xr.set(!0),Zi(e.uiConfig.controls.hideTimeoutCursor))}function wn(){rr.set(!1),D(bo,!1),D(Pi,!1),xn=!1,e.store.actions.internal.releaseCamera(),Zi(e.uiConfig.controls.hideTimeout),W()&&Fn()}function Hn(ge){return ge?ge.offsetTop+Hn(ge.offsetParent):0}function vo(ge){return ge?ge.offsetLeft+vo(ge.offsetParent):0}function Xo(ge){if(Y()&&os){let St=ge.currentTarget,hi=Hn(St),Li=vo(St),Ro=ge.pageX-Li,yo=ge.pageY-hi,{left:Ji,bottom:tn,right:Cs}=Y(),Ts=Cs-Ji;return Ro>=Ji-Ts&&yo<=tn+Ts}}function Tr(ge){if(n(xi)){let St=Hn(ge.currentTarget),hi=ie().height,Li=ge.pageY-St;if(Xo(ge)){D(bo,!1);return}Li<40?D(bo,!0):Li>hi-40?D(Pi,!0):(D(bo,!1),f()||D(Pi,!1))}}function Ir(ge){Tr(ge),!n(bn)&&!W()&&Zi(e.uiConfig.controls.hideTimeoutCursor),J()&&xn&&Bn&&e.store.actions.internal.moveCameraFocusPX(Bn.clientX-ge.clientX,Bn.clientY-ge.clientY,ge.timeStamp-Bn.timeStamp),Bn=ge}let $o=null,sr=()=>{$o=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),ss()},e.uiConfig.doubleForwardActivationTime)},Fn=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),$o&&clearTimeout($o),$o=null},ds=ge=>{ge.preventDefault(),ge.button===0&&(xn=!0,e.store.actions.internal.holdCamera(),oe()&&sr()),!xn&&Zi(e.uiConfig.controls.hideTimeoutCursor)},et=ge=>{ge.preventDefault(),ge.button===0&&(Bn=ge,xn=!1,e.store.actions.internal.releaseCamera()),!W()&&Zi(e.uiConfig.controls.hideTimeoutCursor)},Dt=ge=>{ge.preventDefault(),$n&&(qt({message:"double click on video"}),ro(),Zi(e.uiConfig.controls.hideTimeoutCursor))},wi=ge=>{var St;if(ge.preventDefault(),W()){Fn();return}if($o&&Fn(),de()||f()){ki();return}if(!(R()&&!mi)){if(n(yn))return Sr();if((St=It())==null||St.focus(),!qe()){e.firstStart(),Zi(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||ae()!==Vb.PLAYING)&&e.store.actions.internal.togglePlay(),Zi(e.uiConfig.controls.hideTimeoutCursor)}},Zo=ge=>{ki(),_o.set(!0),Zi(e.uiConfig.controls.hideTimeout),ge&&ls(e.uiConfig.controls.hideHotKeyHelpers,ge)},Lo=()=>{var ge,St;v()||(ki(),(ge=e.store.callbacks)!=null&&ge.onOpenHotKeyMap?(St=e.store.callbacks)==null||St.onOpenHotKeyMap(pe()):Eo.update(hi=>!hi))},Wr=()=>{_o.set(!0)},Jo=e.store.ui.contextMenu.openedByBtnKeyboard$,ar=e.store.ui.contextMenu.btnRef$,Kr=K(void 0),Ss=e.store.ui.contextMenu.openedByHotKey$,Ks=e.store.ui.contextMenu.lastActiveElem$,Un=K(!1),ga=e.store.ui.previewTrackActive;He(()=>{xs.set(n(gn))}),He(()=>{D(Po,n(no)&&ae()!==Vb.PLAYING,!0),n(no)||Tt(()=>D(no,!0))}),He(()=>{var St,hi;let ge=(n(Po)||R()||f()||ee()||$e()||Ee()||ce()||n(Un))&&!n(bn)&&(a()==="video"||a()==="ads"&&(e.uiConfig.controls.showOnStartupAtAutoplay||Qe()!=="inactive"))&&!s()&&E();fi.set(ge),!ge&&!ce()&&((St=n(qo))!=null&&St.contains(Mu()))&&((hi=It())==null||hi.focus())}),He(()=>{!ee()&&n(Xi)&&!u()&&Zi(e.uiConfig.controls.hideTimeoutCursor),Tt(()=>D(Xi,ee(),!0))}),He(()=>{n(vt),f(),fe(),Tt(()=>Bd(n(vt),f(),fe()))}),He(()=>{n(Kr),de(),ve(),X(),Tt(()=>{let ge=ve()||X();Bd(n(Kr),de(),ge)})}),He(()=>{let ge=O();ge&&(de(),Tt(()=>Rl(ge,de(),Jo)))}),He(()=>{let ge=me();ge&&(de(),Tt(()=>T_(ge,de(),Ss)))}),He(()=>{var ge;!ue()&&x()&&(Tt(()=>Ct.set(!1)),(ge=It())==null||ge.focus())}),He(()=>{$()&&ki()});let pt=K(void 0),si=ge=>{Dr.set(Xn(ir(),{title:n(pt)},"title",ge))},Mo=(ge,St)=>{var yo,Ji;let hi=(Ji=(yo=e.store.callbacks)==null?void 0:yo.uiInfo)==null?void 0:Ji.onUpcomingLiveViewStateChanged;if(!hi)return;let Li=!!St,Ro={...Xn(n(xi),{upcomingLiveScreen:St},"upcomingLiveScreen",Li),...ge};hi(Ro)},lr="",Er=m(()=>{var ge;return n(Ut)?lr:(ge=e.getVideoDeeplink)==null?void 0:ge.call(e,Re())});He(()=>{lr=n(Er)});var Vo=lT();mt("blur",Ea,ki);var Si=le(Vo);Si.__mousemove=Ir;var cs=C(Si);let so=m(()=>a()==="ads"),Fi=m(()=>n(yn)?Sr:void 0);tt(Uf(cs,{startDoubleForwardActivationTimer:sr,stopDoubleForward:Fn,toggleFullscreen:ro,hideContextMenu:ki,showHotKeyHelpers:Zo,showKeyMap:Lo,get isAds(){return n(so)},get fakePlayButtonHandler(){return n(Fi)},get nextButtonActive(){return G()},get prevButtonActive(){return Oe()},children:(ge,St)=>{var hi=sT(),Li=le(hi);tl(Li,{get hideCursor(){return n(jo)},onClick:wi,onContextMenu:Ri,onMouseDown:ds,onMouseUp:et,onDblClick:Dt,get videoContainer(){return at()},set videoContainer(Ji){at(Ji)}});var Ro=A(Li,2);Va(Ro,()=>"slot",!1,(Ji,tn)=>{to(Ji,()=>({name:el}))});var yo=A(Ro,2);Ls(yo,Ze,Ji=>{var tn=rT(),Cs=le(tn);let Ts=m(()=>a()!=="thumb"||s()||bi&&e.autoplay);Xa(Cs,{get hidden(){return n(Ts)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:Ri,onClick:jt});var Qs=A(Cs,2);{var qr=Ge=>{xv(Ge,{})};M(Qs,Ge=>{ke()&&Ge(qr)})}var qs=A(Qs,2);$v(qs,{});var Sn=A(qs,2);yv(Sn,{get isVisible(){return W()}});var ha=A(Sn,2);{var il=Ge=>{let pi=m(()=>{var No;return(No=e.live)==null?void 0:No.startTime});gc(Ge,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(pi)},onUpcomingLiveViewStateChanged:Mo,onContextMenu:Ri,onClick:jt})};M(ha,Ge=>{a()==="LiveWaitingStart"&&Ge(il)})}var Pr=A(ha,2);{var jl=Ge=>{Za(Ge,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:Ri,onClick:jt})};M(Pr,Ge=>{a()==="LiveWaitingRecover"&&Ge(jl)})}var ol=A(Pr,2);{var nl=Ge=>{Za(Ge,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:Ri,onClick:jt})};M(ol,Ge=>{a()==="LiveWaitingRecord"&&Ge(nl)})}var rl=A(ol,2);{var Xl=Ge=>{var pi=tT();let No;var Cn=C(pi);Vd(Cn,{get adsSlotId(){return ti()},get adsParams(){return yt()},get adsAutoplayParam(){return Mt()},get duration(){return Vt()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson}}),S(pi),N(Tn=>No=te(pi,1,"ads-container s-9",null,No,Tn),[()=>({hidden:a()!=="ads"})]),b(Ge,pi)};M(rl,Ge=>{e.showAds&&qe()&&Ge(Xl)})}var _a=A(rl,2);{var sl=Ge=>{let pi=m(()=>!Kt()&&e.showAutoplayNext&&I());Bf(Ge,{get title(){return be()},get thumb(){return Ne()},get isHide(){return n(pi)},clickCloseIcon:()=>D(po,!0)})};M(_a,Ge=>{n(Yo)&&be()&&Ne()&&Ge(sl)})}var ft=A(_a,2);{var lt=Ge=>{let pi=m(()=>x()?"md":"sm"),No=m(()=>{var Cn;return(Cn=e.store.callbacks)==null?void 0:Cn.onTitleClicked});jm(Ge,{get title(){return e.title},get isHidden(){return n(Ut)},onVisibilityChanged:si,get titleLinkHref(){return n(Er)},onMouseEnter:()=>{D(Un,!0)},onMouseLeave:()=>{D(Un,!1)},get size(){return n(pi)},get onTitleClicked(){return n(No)},get ref(){return n(pt)},set ref(Cn){D(pt,Cn,!0)}})};M(ft,Ge=>{n(ri)&&Ge(lt)})}var Mi=A(ft,2);{var Do=Ge=>{let pi=m(()=>a()==="video"&&_());mc(Ge,{get isShifted(){return n(pi)}})};M(Mi,Ge=>{J()&&Ge(Do)})}var Ui=A(Mi,2);{var vi=Ge=>{var pi=iT(),No=C(pi);Ld(No,{}),S(pi),b(Ge,pi)};M(Ui,Ge=>{j()&&Ge(vi)})}var Di=A(Ui,2);{var ba=Ge=>{vc(Ge,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return ne()},onClick:wi,onContextMenu:Ri,onDblClick:Dt})};M(Di,Ge=>{Ee()&&Ge(ba)})}var al=A(Di,2);{var up=Ge=>{Ya(Ge,{get shifted(){return _()},get captions(){return Se()},get position(){return Le()},get playerSize(){return ie()}})};M(al,Ge=>{n(Ao)&&Ge(up)})}var Lc=A(al,2);{var pp=Ge=>{var pi=oT();pi.__contextmenu=Ri,pi.__click=[eT,de,ji,f,di,ki];var No=C(pi);ja(No,{}),S(pi),b(Ge,pi)};M(Lc,Ge=>{s()&&Ge(pp)})}var Mc=A(Lc,2);{var fp=Ge=>{let pi=m(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),No=m(()=>a()==="ads"),Cn=m(()=>e.canRewindLive&&ze()!==0);pc(Ge,{get bottomHidden(){return n(pi)},get bottomNoSmooth(){return z()},get showControls(){return _()},get isAds(){return n(No)},get canRewindLive(){return n(Cn)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Wt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Te()},get nextButtonActive(){return G()},get prevButtonActive(){return Oe()},get isOneVideoPlaylist(){return Ie()},customFullscreenSupported:$n,toggleFullscreen:ro,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(ns)},set playerControlsWrapperRef(Tn){D(ns,Tn,!0)},get playerControlsRef(){return n(qo)},set playerControlsRef(Tn){D(qo,Tn,!0)}})};M(Mc,Ge=>{qe()&&Ge(fp)})}var Vc=A(Mc,2);{var mp=Ge=>{var pi=nT(),No=C(pi);let Cn=m(()=>{var Tn;return(Tn=n(qo))==null?void 0:Tn.clientHeight});bc(No,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(Cn)},returnFocus:()=>{var Tn;return(Tn=It())==null?void 0:Tn.focus()},get ref(){return n(vt)},set ref(Tn){D(vt,Tn,!0)}}),S(pi),b(Ge,pi)};M(Vc,Ge=>{!Ee()&&a()!=="ads"&&Ge(mp)})}var Rc=A(Vc,2);let ll=m(()=>!n(Ur));Nd(Rc,{get isLive(){return Ce()},get isHidden(){return n(ll)},get isPlaying(){return we()},get position(){return Le()},get duration(){return ze()}});var Dc=A(Rc,2);Gm(Dc,{get data(){return _n}});var Gs=A(Dc,2);Of(Gs,{get supportLink(){return e.supportLink},returnFocus:()=>{var Ge;return(Ge=It())==null?void 0:Ge.focus()},get visible(){return de()},get playerContainerRef(){return n(xi)},get position(){return Fe()},get menuElementRef(){return n(Kr)},set menuElementRef(Ge){D(Kr,Ge,!0)}});var $a=A(Gs,2);{var vp=Ge=>{$c(Ge,{onClose:vn,onSelectAutoQuality:()=>{fn("auto"),vn()}})};M($a,Ge=>{n(Fr)&&Ge(vp)})}var Zl=A($a,2);{var Jl=Ge=>{Ha(Ge,{})};M(Zl,Ge=>{n(Go)&&Ge(Jl)})}var ed=A(Zl,2);{var gp=Ge=>{Kf(Ge,{})};M(ed,Ge=>{nt()&&Ge(gp)})}var Nc=A(ed,2);{var hp=Ge=>{Ud(Ge,{})};M(Nc,Ge=>{ct()&&Ge(hp)})}b(Ji,tn)}),b(ge,hi)},$$slots:{default:!0}}),ge=>It(ge),()=>It());var en=A(cs,2);tt(en,ge=>D(gn,ge),()=>n(gn)),S(Si),tt(Si,ge=>D(xi,ge),()=>n(xi));var zn=A(Si,2);{var Qr=ge=>{var St=aT();b(ge,St)};M(zn,ge=>{kt()&&ge(Qr)})}mt("mouseenter",Si,mo),mt("mouseleave",Si,wn),mt("click",Si,Wr,!0),mt("focusin",Si,ko,!0),b(t,Vo),H(),o()}Xe(["mousemove","contextmenu","click"]);import{clientChecker as xc,PlaybackState as bT}from"@vkontakte/videoplayer-core/es2018";import{noop as $T}from"@vkontakte/videoplayer-shared/es2018";var cT=L('<div></div> <div class="info s-j"><div class="triangles-wrapper s-j"><div></div> <div></div> <div></div></div> <p class="step-caption s-j"> </p></div>',1),uT=L("<div><!></div>"),pT={hash:"s-j",code:".double-click-area.s-j{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-j{left:0}.double-click-area.right.s-j{right:0}.semicircle.s-j{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-j{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-j{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-j{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-j,.triangles-wrapper.s-j{display:flex;justify-content:center}.triangles-wrapper.s-j{margin-bottom:10px;position:relative}.triangle.s-j{animation:s-j-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-j:nth-child(3),.triangle.right.s-j:first-child{animation-delay:0s}.triangle.left.s-j:nth-child(2),.triangle.right.s-j:nth-child(2){animation-delay:.1s}.triangle.left.s-j:first-child,.triangle.right.s-j:nth-child(3){animation-delay:.2s}@keyframes s-j-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-j{border-right:8px solid var(--white)}.triangle.right.s-j{border-left:8px solid var(--white)}.triangle.s-j:not(:last-child){margin-right:5px}.step-caption.s-j{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function ip(t,e){B(e,!0),Q(t,pT);let i=g(e,"seekStep",3,0),o=K(!1),r=0,a=0,l=K(ii(i())),d=p=>{p.stopPropagation(),a+=1,D(l,i()*(a-1)),a===1?e.handleSingleFirstClick(p):(D(o,!0),e.handleSecondClick()),window.clearTimeout(r),r=window.setTimeout(()=>{a=0,D(o,!1)},300)};rn(()=>{window.clearTimeout(r)});var s=uT();s.__click=d;var u=C(s);{var f=p=>{var v=cT(),_=le(v),y=A(_,2),$=C(y),x=C($),I=A(x,2),T=A(I,2);S($);var R=A($,2),k=C(R,!0);S(R),S(y),N(P=>{var E,W,U,z;te(_,1,`semicircle ${(E=e.side)!=null?E:""}`,"s-j"),te(x,1,`triangle ${(W=e.side)!=null?W:""}`,"s-j"),te(I,1,`triangle ${(U=e.side)!=null?U:""}`,"s-j"),te(T,1,`triangle ${(z=e.side)!=null?z:""}`,"s-j"),he(k,P)},[()=>q("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),b(p,v)};M(u,p=>{n(o)&&p(f)})}S(s),N(()=>{var p;return te(s,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-j")}),b(t,s),H()}Xe(["click"]);var fT=(t,e,i)=>{e(!1),i()},mT=L('<div class="overlay s-k"></div> <div class="next-video s-k"><div class="top s-k"><div class="caption s-k"> </div> <!></div> <div class="row s-k"><div class="column s-k"><div class="thumb s-k"><div></div> <!></div></div> <div class="column s-k"><div class="title s-k"> </div></div></div></div>',1),vT={hash:"s-k",code:".overlay.s-k{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-k{display:flex;flex-direction:column;left:50%;margin:0 auto;max-width:362px;min-width:320px;padding-bottom:12px;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:var(--end-screen-mobile-z-index)}.top.s-k{display:flex;justify-content:space-between}.caption.s-k{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-k{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-k{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-k{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-k,.thumb-overlay.s-k{height:100%;width:100%}.thumb-overlay.s-k{position:absolute}.thumb-overlay.withOpacity.s-k{background:var(--black);opacity:.3}.title.s-k{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Sv(t,e){B(e,!0),Q(t,vT);let[i,o]=Be(),r=()=>w(d,"$autoplayNextEnabled$",i),a=()=>w(s,"$timerNextVideoRunning$",i),l=xe(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,f=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,_=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),v()},$=()=>{e.clickCloseIcon(),_()};Pt(()=>{e.isHide||f(),e.isHide&&r()&&(u(!1),v())});var x=Ve(),I=le(x);{var T=R=>{var k=mT(),P=A(le(k),2),E=C(P),W=C(E),U=C(W,!0);S(W);var z=A(W,2);Ns(z,{onClick:$}),S(E);var Y=A(E,2);Y.__click=[fT,u,p];var ie=C(Y),J=C(ie),oe=C(J);let de;var ae=A(oe,2);{var pe=ce=>{zd(ce,{get isRunning(){return a()},onTimerEnded:y})};M(ae,ce=>{r()&&ce(pe)})}S(J),S(ie);var ee=A(ie,2),$e=C(ee),Ee=C($e,!0);S($e),S(ee),S(Y),S(P),N((ce,Qe)=>{he(U,ce),Ke(J,`background-image: url('${e.thumb}')`),de=te(oe,1,"thumb-overlay s-k",null,de,Qe),he(Ee,e.title)},[()=>r()?q("end_screen_next_video"):q("end_screen_recommended_video"),()=>({withOpacity:r()})]),b(R,k)};M(I,R=>{e.isHide||R(T)})}b(t,x),H(),o()}Xe(["click"]);import{clientChecker as gT}from"@vkontakte/videoplayer-core/es2018";var Rb=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Pt(()=>{gT.device.isIOS&&(o=setTimeout(()=>{let a=t().querySelector("video");if(!a)return;let l=()=>e(!0),d=()=>e(!1);a.addEventListener("webkitbeginfullscreen",l),a.addEventListener("webkitendfullscreen",d),i=()=>{a.removeEventListener("webkitbeginfullscreen",l),a.removeEventListener("webkitendfullscreen",d)}},0))}),rn(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as hT}from"@vkontakte/videoplayer-core/es2018";var op=class{constructor(e){this.video=e}getTracksArray(){return Array.from(this.video.getElementsByTagName("track"))}attach(e,i=!1){let o=document.createElement("track");o.setAttribute("src",e.url),o.setAttribute("id",e.id),e.label&&o.setAttribute("label",e.label),e.language&&o.setAttribute("srclang",e.language),i&&(o.track.mode="showing"),this.video.appendChild(o)}detachAll(){for(let e of this.getTracksArray())this.video.removeChild(e)}updateSrc(e){let i=this.getTracksArray().find(o=>o.id===e.id);i&&(i.src=e.url)}getCurrentShowingId(){var e,i;return(i=(e=this.getTracksArray().find(o=>o.track.mode==="showing"))==null?void 0:e.id)!=null?i:null}};import{clientChecker as _T}from"@vkontakte/videoplayer-core/es2018";var Db=({store:t,getFullscreenTarget:e})=>{let{isFullscreen:i}=t.ui,{setSubtitle:o}=t.actions.internal,{currentSubtitle$:r,availableSubtitlesList$:a,currentFormat$:l,availableTextTracks$:d}=t.state,s=null,u=()=>e().querySelector("video"),f=()=>_T.device.isIOS&&_e(l)===hT.DASH_LIVE_CMAF,p=()=>{s==null||s(),s=null},v=_=>{if(p(),!f()||!_)return;let y=u();if(!y)return;let $=new op(y),x=_e(d),I=_e(a),T=_e(r);for(let P of x)I.some(W=>W.value===P.id)&&$.attach(P,T.value===P.id);let R=d.subscribe(P=>{for(let E of P)$.updateSrc(E)}),k=()=>{let P=$.getCurrentShowingId();o(_e(a).find(E=>E.value===P))};y.textTracks.addEventListener("change",k),s=()=>{R(),$.detachAll(),y.textTracks.removeEventListener("change",k)}};Pt(()=>i.subscribe(v)),rn(p)};var yT=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},xT=L("<!> <!>",1),wT=L("<div><!></div>"),ST=L('<div class="spherical-video-icon s-8"><!></div>'),CT=L("<div><!></div>"),TT=L('<div class="settings-mobile s-8"><!></div>'),IT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),ET=L('<div class="player-wrapper s-8" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),PT={hash:"s-8",code:".player-wrapper.s-8{height:100%;position:absolute;width:100%}.player-wrapper.s-8 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-8{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-8{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-mobile.s-8{align-items:center;display:flex;left:50%;max-width:320px;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);width:90%;z-index:var(--settings-menu-z-index)}"};function Cv(t,e){var $n,Ur;B(e,!0),Q(t,PT);let[i,o]=Be(),r=()=>w(Ne,"$playerPhase",i),a=()=>w(gi,"$isLoaderVisible",i),l=()=>w(G,"$adPlaybackState",i),d=()=>w(fi,"$crashed",i),s=()=>w(ws,"$notificationsToShow$",i),u=()=>w(Te,"$playbackState$",i),f=()=>w(Mt,"$graphIsOpened$",i),p=()=>w(qe,"$interactiveHideMobileControls",i),v=()=>w(Ai,"$isEnded$",i),_=()=>w(ci,"$isInteractiveExpectation$",i),y=()=>w(gt,"$controlsVisible",i),$=()=>w(ui,"$touched",i),x=()=>w(wt,"$autoplayNextEnabled$",i),I=()=>w(oi,"$postrollPassed",i),T=()=>w(fn,"$bottomNoSmooth",i),R=()=>w(st,"$videoSize",i),k=()=>w(To,"$playerSize",i),P=()=>w(Ie,"$isFullscreen",i),E=()=>w(Oe,"$position$",i),W=()=>w(be,"$duration$",i),U=()=>w(oo,"$loadedMetadata",i),z=()=>w(Ue,"$settingsMenuVisible",i),Y=()=>w(Kt,"$scrubbingInProgress",i),ie=()=>w(It,"$volumeChangingInProgress",i),J=()=>w(Ii,"$chromecastConnected$",i),oe=()=>w(ye,"$isControlsAvailable",i),de=()=>w(Ht,"$isInteractiveTime$",i),ae=()=>w(Yi,"$isActiveLive",i),pe=()=>w(rt,"$settingsMenuOpenedByKeyboard",i),ee=()=>w(Wt,"$language$",i),$e=()=>w(ni,"$disabledControls$",i),Ee=()=>w(dn,"$is3DVideo",i),ce=()=>w(F,"$icon3DVideoVisible",i),Qe=()=>w(Gi,"$chromecastDeviceName$",i),fe=()=>w(yi,"$currentSubtitle$",i),ve=()=>w(ji,"$currentSubtitleCaptions$",i),X=()=>w(ho,"$realDuration$",i),O=()=>w(ut,"$isLive$",i),me=()=>w(ai,"$isPlaying$",i),ue=()=>w(qt,"$debugPanelVisible",i),Re=g(e,"videoContainer",15),Ze=g(e,"adsSlotId",3,void 0),ke=g(e,"adsParams",3,void 0),j=g(e,"adsAutoplayParam",3,void 0),ne=g(e,"duration",3,void 0),Se=g(e,"logoTargetUrl",3,""),Le=g(e,"showNextPrevButtons",3,!1),ze=g(e,"nextButtonActive",3,!1),Ce=g(e,"prevButtonActive",3,!1),we=g(e,"endScreenVideoTitle",3,void 0),Fe=g(e,"endScreenVideoThumb",3,void 0),nt=g(e,"isOneVideoPlaylist",3,!1),ct=g(e,"showMiniTimer",3,!1),kt=g(e,"fullScreenTarget",3,void 0),at=g(e,"playerStarted",3,!1),ti=g(e,"showEndScreen",3,!0),{notifications$:yt,graphIsOpened$:Mt}=go(),Vt=e.store.getLogger().createComponentLog("Root component"),Wt=e.store.interfaceLanguage$,Te=e.store.state.playbackState$,G=e.store.ads.playbackState,Oe=e.store.state.positionWithScrubbing$,be=e.store.state.duration$,Ne=e.store.playerPhase,Ie=e.store.ui.isFullscreen,gt=e.store.ui.controlsVisible,ye=e.store.ui.isControlsAvailable,qe=e.store.ui.interactiveHideMobileControls,Ue=e.store.ui.settingsMenu.visible$,rt=e.store.ui.settingsMenu.openedByBtnKeyboard$,Kt=e.store.ui.scrubbingInProgress,It=e.store.ui.volumeChangingInProgress,qt=e.store.ui.debugPanelVisible,gi=e.store.state.isLoaderVisible,Ai=e.store.state.isEnded$,Ii=e.store.state.chromecastConnected$,Gi=e.store.state.chromecastDeviceName$,oi=e.store.ads.postrollPassed,ut=e.store.state.isLive$,ai=e.store.state.isPlaying$,Yi=e.store.state.isActiveLive$,Ct=e.store.state.isRewindableLive$,fi=e.store.state.crashed$,di=e.store.webApi.annotationsApi,We=e.store.webApi.pictureInPictureApi,st=e.store.state.videoSize$,yi=e.store.state.currentSubtitle$,ji=e.store.state.currentSubtitleCaptions$,ho=e.store.state.duration$,To=e.store.ui.playerSize,dn=e.store.ui.is3DVideo,F=e.store.ui.icon3DVideoVisible,it=e.store.state.isInteractive,Ht=e.store.state.isInteractiveTime$,ci=e.store.state.isInteractiveExpectation$,dt=e.store.state.hasInteractiveBranches,ni=e.store.ui.controls.disabledControls$,ui=e.store.ui.touched,Qt=e.store.ui.overlayContainer$,wt=e.store.ui.autoplayNextEnabled$,oo=e.store.state.loadedMetadata$,Io=e.store.actions.internal.closeSettingsMenu,Rn=($n=e.store.callbacks)==null?void 0:$n.onDisabledPlayPrevChapterClick,cn=(Ur=e.store.callbacks)==null?void 0:Ur.onDisabledSeekToInteractiveClick,Ei=e.store.actions.internal.setQuality,bi=K(void 0),Qo=K(void 0),Jn=K(void 0),mi=K(void 0),_o,un,Eo=m(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),pn=K(void 0),{closeNotification:xs,notificationsToShow$:ws}=yt,os=m(()=>!!s().slow_video),br=()=>xs("slow_video"),fn=se(!1),mn,er=K(!1),$r=m(()=>u()!==bT.PLAYING),tr=K(!1),Dr=m(()=>f()||p()||!n(er)&&(v()&&!!dt||n($r)&&_())),Nr=K(!0),Dn=m(()=>e.uiConfig.features.thumbTimer&&ct()&&r()==="video"&&!y()&&!d()&&!it&&(e.uiConfig.hideThumbTimerAfterTouch&&!$()||!e.uiConfig.hideThumbTimerAfterTouch)),ir=K(!1),Nn=m(()=>(ti()||e.showAutoplayNext&&x())&&!!we()&&!!Fe()&&(e.showAds&&I()||!e.showAds)&&v()&&!d()&&!n(ir)),or=K(!1);We==null||We.setContext(rd());let Or=xt=>{xt&&!it&&e.uiConfig.controls.showOnStartupAtAutoplay&&xi(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:Or});let Br=()=>{clearTimeout(_o),D(er,!1),p()&&qe.set(!1)},xi=xt=>{Br(),D(er,!0),_o=setTimeout(()=>D(er,!1),xt);let ri=xt-100;mn=setTimeout(()=>{T()&&fn.set(!1)},ri>0?ri:xt)},ns=dn.subscribe(xt=>{F.set(xt),xt&&(clearTimeout(un),un=setTimeout(()=>F.set(!1),e.uiConfig.controls.hide360IconTimeout))}),qo=async(xt=sa())=>{var ri,Ut,po,Yo,Ao,jo;if(xt&&!xc.device.isIOS){let Xi=Md(),yn=yr(),Sr=xc.browser.isSamsungBrowser&&Xi===e.shadowRootContainer;xt=Xi===yn||Sr}if(xt){xi(e.uiConfig.controls.hideTimeoutFullscreen);try{await(We==null?void 0:We.exit())}catch(Xi){Vt({message:String(Xi)})}try{let Xi=(ri=R())!=null&&ri.width&&((Ut=R())!=null&&Ut.height)?R():k();await h_(Xi)}catch(Xi){Vt({message:String(Xi)})}}Ie.set(xt),e.store.getAdmanWrapper().setFullscreen(xt),P()?(Yo=(po=e.store.callbacks)==null?void 0:po.onFullscreenEnter)==null||Yo.call(po):(jo=(Ao=e.store.callbacks)==null?void 0:Ao.onFullscreenExit)==null||jo.call(Ao)},vt=xt=>{To.set(xt)},Gt=()=>{if(n(bi)){let{width:xt,height:ri}=n(bi).getBoundingClientRect();To.set({width:xt,height:ri})}};Pt(()=>{var xt;return Cu(qo),e.uiConfig.features.annotationsInside&&(di==null||di.init(n(bi))),We==null||We.assignPlayerContainer(n(bi)),e.uiConfig.disablePiPResizeHandling||We==null||We.setExternalEventHandlers({resize:vt,leavepictureinpicture:Gt}),D(Nr,!xc.device.isIphoneOrOldIpad),e.interactiveContainer&&((xt=Re().parentElement)==null||xt.insertBefore(e.interactiveContainer,Re().nextSibling)),()=>{clearTimeout(_o),clearTimeout(mn),clearTimeout(un),ns(),We==null||We.dispose().catch(ri=>{Vt({message:String(ri)})}),Tu(qo)}});let nr=K(!0),On=K(!0),Hr=xt=>{let ri=E()+(xt==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;ri<0?(D(nr,!1),ri=0):ri>=W()&&(D(On,!1),ri=W()),D(tr,!0),e.seekTime(ri)},yr=()=>xc.device.isIOS?n(bi):!e.uiConfig.allowChangingFullscreenTarget||!kt()?e.outerContainerRef:kt().contains(e.outerContainerRef)?kt():e.outerContainerRef,Fr=async()=>{try{if(sa())await Su(document),Vt({message:"exit fullscreen"});else{if(Vt({message:"request fullscreen"}),xc.device.isIOS&&!U())return;await wu(yr())}}catch(xt){Vt({message:String(xt)})}},vn=()=>{Io()},Go=xt=>{if(xt.preventDefault(),z()){vn();return}if(!at()){e.firstStart(),xi(e.uiConfig.controls.hideTimeoutCursor);return}D(tr,!1),y()?Br():xi(e.uiConfig.controls.hideTimeoutMobile)},gn=()=>{ui.set(!0)},xr=()=>{it||(fn.set(!0),xi(e.uiConfig.controls.hideTimeoutCursor))},wr=xt=>{Rn&&(Rn(xt),xi(e.uiConfig.controls.hideTimeoutMobile))},hn=xt=>{cn&&(cn(xt),xi(e.uiConfig.controls.hideTimeoutMobile))};He(()=>{Qt.set(n(pn))}),He(()=>{gt.set((n($r)||z()||Y()||ie()||J()||!n(Nn)&&(v()||n(er)&&!n(tr)))&&!n(Dr)&&r()==="video"&&!d()&&oe())}),He(()=>{!Y()&&n(or)&&!de()&&xi(e.uiConfig.controls.hideTimeoutMobile),D(or,Y(),!0)}),He(()=>{D(nr,E()>0),D(On,!ae()&&E()<W(),!0)}),He(()=>{Bd(n(mi),z(),pe(),!0)});let _n=q("aria_label_video_player");Rb({fullScreenChangeHandler:qo,getFullscreenTarget:yr}),Db({store:e.store,getFullscreenTarget:yr});let rr=(xt,ri)=>{var Ao,jo;let Ut=(jo=(Ao=e.store.callbacks)==null?void 0:Ao.uiInfo)==null?void 0:jo.onUpcomingLiveViewStateChanged;if(!Ut)return;let po=!!ri,Yo={...Xn(n(bi),{upcomingLiveScreen:ri},"upcomingLiveScreen",po),...xt};Ut(Yo)};var Pi=ET();mt("blur",Ea,vn);var bo=C(Pi);tl(bo,{onClick:Go,get videoContainer(){return Re()},set videoContainer(xt){Re(xt)}});var Po=A(bo,2);Va(Po,()=>"slot",!1,(xt,ri)=>{to(xt,()=>({name:el}))});var no=A(Po,2);Ls(no,ee,xt=>{var ri=IT(),Ut=le(ri);let po=m(()=>r()!=="thumb"||d()||it&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);Xa(Ut,{get hidden(){return n(po)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var Yo=A(Ut,2);{var Ao=et=>{var Dt=xT(),wi=le(Dt);{var Zo=Jo=>{let ar=m(()=>e.uiConfig.controls.seekStepMobile/1e3);ip(Jo,{side:"left",get seekStep(){return n(ar)},handleSingleFirstClick:Go,handleSecondClick:()=>Hr("backward")})};M(wi,Jo=>{n(nr)&&Jo(Zo)})}var Lo=A(wi,2);{var Wr=Jo=>{let ar=m(()=>e.uiConfig.controls.seekStepMobile/1e3);ip(Jo,{side:"right",get seekStep(){return n(ar)},handleSingleFirstClick:Go,handleSecondClick:()=>Hr("forward")})};M(Lo,Jo=>{n(On)&&Jo(Wr)})}b(et,Dt)};M(Yo,et=>{e.canRewindLive&&Ct&&!$e().has("TIMELINE")&&et(Ao)})}var jo=A(Yo,2);{var Xi=et=>{let Dt=m(()=>{var wi;return(wi=e.live)==null?void 0:wi.startTime});gc(et,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(Dt)},onUpcomingLiveViewStateChanged:rr})};M(jo,et=>{r()==="LiveWaitingStart"&&et(Xi)})}var yn=A(jo,2);{var Sr=et=>{Za(et,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};M(yn,et=>{r()==="LiveWaitingRecover"&&et(Sr)})}var xn=A(yn,2);{var Bn=et=>{Za(et,{kind:"record",get thumbUrl(){return e.thumbUrl}})};M(xn,et=>{r()==="LiveWaitingRecord"&&et(Bn)})}var rs=A(xn,2);{var ss=et=>{var Dt=wT();let wi;var Zo=C(Dt);Vd(Zo,{get adsSlotId(){return Ze()},get adsParams(){return ke()},get adsAutoplayParam(){return j()},get duration(){return ne()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson}}),S(Dt),N(Lo=>wi=te(Dt,1,"ads-container s-8",null,wi,Lo),[()=>({hidden:r()!=="ads"})]),b(et,Dt)};M(rs,et=>{e.showAds&&at()&&et(ss)})}var as=A(rs,2);{var Zi=et=>{let Dt=m(()=>!ti()&&e.showAutoplayNext&&x());Sv(et,{get title(){return we()},get thumb(){return Fe()},get isHide(){return n(Dt)},clickCloseIcon:()=>D(ir,!0)})};M(as,et=>{n(Nn)&&we()&&Fe()&&et(Zi)})}var ls=A(as,2);{var zr=et=>{mc(et,{})};M(ls,et=>{Ee()&&et(zr)})}var fo=A(ls,2);{var Cr=et=>{var Dt=ST(),wi=C(Dt);Ld(wi,{}),S(Dt),b(et,Dt)};M(fo,et=>{ce()&&et(Cr)})}var Je=A(fo,2);{var ht=et=>{vc(et,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Qe()},onClick:Go})};M(Je,et=>{J()&&et(ht)})}var jt=A(Je,2);{var ki=et=>{Ya(et,{get shifted(){return y()},get captions(){return ve()},get position(){return E()},get playerSize(){return k()},isMobile:!0})};M(jt,et=>{fe().value!=="off"&&et(ki)})}var ro=A(jt,2);{var Ri=et=>{var Dt=CT();Dt.__click=[yT,z,Ue,vn];var wi=C(Dt);ja(wi,{}),S(Dt),b(et,Dt)};M(ro,et=>{d()&&et(Ri)})}var mo=A(ro,2);{var ko=et=>{let Dt=m(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),wi=m(()=>r()==="ads"),Zo=m(()=>e.canRewindLive&&X()!==0);pc(et,{get bottomHidden(){return n(Dt)},get showControls(){return y()},get bottomNoSmooth(){return T()},get isAds(){return n(wi)},get canRewindLive(){return n(Zo)},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 nt()},get customFullscreenSupported(){return n(Nr)},get endScreenShown(){return n(Nn)},toggleFullscreen:Fr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:wr,onDisabledSeekToInteractiveClick:hn,get playerControlsWrapperRef(){return n(Qo)},set playerControlsWrapperRef(Lo){D(Qo,Lo,!0)},get playerControlsRef(){return n(Jn)},set playerControlsRef(Lo){D(Jn,Lo,!0)}})};M(mo,et=>{at()&&et(ko)})}var wn=A(mo,2);{var Hn=et=>{var Dt=TT(),wi=C(Dt);bc(wi,{get supportLink(){return e.supportLink},get returnFocus(){return $T},get ref(){return n(mi)},set ref(Zo){D(mi,Zo,!0)}}),S(Dt),b(et,Dt)};M(wn,et=>{z()&&et(Hn)})}var vo=A(wn,2);let Xo=m(()=>!n(Dn));Nd(vo,{get isLive(){return O()},get isHidden(){return n(Xo)},get isPlaying(){return me()},get position(){return E()},get duration(){return W()}});var Tr=A(vo,2);{var Ir=et=>{Ha(et,{})};M(Tr,et=>{n(Eo)&&et(Ir)})}var $o=A(Tr,2);{var sr=et=>{Ud(et,{})};M($o,et=>{ue()&&et(sr)})}var Fn=A($o,2);{var ds=et=>{$c(et,{onClose:br,onSelectAutoQuality:()=>{Ei("auto"),br()}})};M(Fn,et=>{n(os)&&et(ds)})}b(xt,ri)});var bn=A(no,2);tt(bn,xt=>D(pn,xt),()=>n(pn)),S(Pi),tt(Pi,xt=>D(bi,xt),()=>n(bi)),N(()=>De(Pi,"aria-label",_n)),mt("click",Pi,gn,!0),mt("focusin",Pi,xr,!0),b(t,Pi),H(),o()}Xe(["click"]);import{debounceFn as AT}from"@vkontakte/videoplayer-shared/es2018";var kT=L('<div class="time-container s-7"><!></div>'),LT=L('<div class="player-wrapper s-7" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),MT={hash:"s-7",code:".player-wrapper.s-7{height:100%;position:absolute;width:100%}.player-wrapper.s-7 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.timeline.s-7{bottom:0;left:0;opacity:0;opacity:1;position:absolute;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.visible.s-7{opacity:1}.time-container.s-7{bottom:8px;position:absolute;right:8px;z-index:var(--thumb-timer-z-index)}"};function Tv(t,e){B(e,!0),Q(t,MT);let[i,o]=Be(),r=()=>w(de,"$scrubbingInProgress",i),a=()=>w(J,"$playerSize",i),l=()=>w(E,"$isPlaying$",i),d=()=>w(k,"$duration$",i),s=()=>w(z,"$positionWithScrubbing$",i),u=()=>w(T,"$playerPhase",i),f=()=>w(R,"$crashed$",i),p=()=>w(W,"$currentSubtitle$",i),v=()=>w(U,"$currentSubtitleCaptions$",i),_=()=>w(P,"$positionExact$",i),y=()=>w(Y,"$isLive$",i),$=()=>w(ie,"$isRewindableLive$",i),x=g(e,"outsideDuration",3,0),I=g(e,"videoContainer",15),{playerPhase:T,state:{crashed$:R,duration$:k,positionExact$:P,isPlaying$:E,currentSubtitle$:W,currentSubtitleCaptions$:U,positionWithScrubbing$:z,isLive$:Y,isRewindableLive$:ie},ui:{playerSize:J,controls:oe,scrubbingInProgress:de},actions:{internal:{getVideoElement:ae}}}=xe(),pe=8,ee=K(!1),$e=ii({}),Ee=K(!1),ce=m(()=>!r()&&!n(Ee)),Qe=()=>{D(ee,!0)},fe=()=>{D(ee,!1)},ve=AT(Kl,260);He(()=>{a(),ve(ae(),oe,$e,n(ee))});let X=m(()=>l()?Ko(d()-s()):Ko(isFinite(d())?d():x()));var O=LT(),me=C(O);tl(me,{hideCursor:!1,get videoContainer(){return I()},set videoContainer(we){I(we)}});var ue=A(me,2);Va(ue,()=>"slot",!1,(we,Fe)=>{to(we,()=>({name:el}))});var Re=A(ue,2);let Ze=m(()=>u()!=="thumb"||f());Xa(Re,{get hidden(){return n(Ze)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var ke=A(Re,2);{var j=we=>{Ya(we,{shifted:!1,get captions(){return v()},get position(){return _()},get playerSize(){return a()}})};M(ke,we=>{p().value!=="off"&&n(ce)&&we(j)})}var ne=A(ke,2);{var Se=we=>{var Fe=kT(),nt=C(Fe);Dd(nt,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(X)}}),S(Fe),b(we,Fe)};M(ne,we=>{n(ce)&&we(Se)})}var Le=A(ne,2);let ze;var Ce=C(Le);qa(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(O),N(we=>ze=te(Le,1,"timeline s-7",null,ze,we),[()=>({visible:n(ee)})]),mt("mouseenter",O,Qe),mt("mouseleave",O,fe),mt("mouseenter",Le,()=>D(Ee,!0)),mt("mouseleave",Le,()=>D(Ee,!1)),b(t,O),H(),o()}var OT=L("<div><!></div>"),BT={hash:"s-2",code:'.vk-vp-root.s-2{--white:#fff;--black:#000;--red:#ff3347;--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--controls-desktop-padding-horizontal-minimal-view:8px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px;--interactive-episode-complete:#5c9ce6;--slider-bg:hsla(0,0%,100%,.4);--slider-filled-bg:var(--white);--slider-handle-bg:var(--white);--slider-loaded-bg:hsla(0,0%,100%,.4);--slider-height:3px;--slider-video-episode-gap:1.5px;--slider-radius:0px;--slider-handle-size:12px;--slider-filled-ads:#67a5eb;--slider-disabled-color:hsla(0,0%,97%,.31);--slider-volume-height:5px;--slider-volume-radius:calc(var(--slider-volume-height)/2);--slider-volume-handle-size:13px;--timeline-slider-filled-active-live-bg:var(--red);--timeline-slider-handle-active-live-bg:var(--red);--timeline-slider-bg:var(--slider-bg);--timeline-slider-filled-bg:var(--slider-filled-bg);--timeline-slider-handle-bg:var(--slider-handle-bg);--timeline-slider-loaded-bg:var(--slider-loaded-bg);--volume-slider-bg:var(--slider-bg);--volume-slider-filled-bg:var(--slider-filled-bg);--volume-slider-handle-bg:var(--slider-handle-bg);--controls-time:var(--white);--controls-gradient:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.005) 6.67%,rgba(0,0,0,.02) 13.33%,rgba(1,1,1,.04) 20%,rgba(1,1,1,.07) 26.67%,rgba(2,2,2,.11) 33.33%,rgba(3,3,3,.16) 40%,rgba(4,4,4,.22) 46.67%,rgba(6,6,6,.28) 53.33%,rgba(7,7,7,.33) 60%,rgba(8,8,8,.38) 66.67%,rgba(9,9,9,.42) 73.33%,rgba(9,9,9,.46) 80%,hsla(0,0%,4%,.48) 86.67%,hsla(0,0%,4%,.5));--timeline-preview-shadow:rgba(0,0,0,.08);--timeline-preview-bg:#222;--timeline-padding-horizontal:10px;--timeline-padding-vertical-top:3px;--timeline-padding-vertical-bottom:4px;--timeline-height:calc(var(--timeline-padding-vertical-bottom) + var(--timeline-padding-vertical-top) + var(--slider-height));--preview-track-frame-height-vertical:114px;--preview-track-frame-height-horizontal:65px;--preview-track-controls-top:16px;--preview-track-time-line-height:16px;--preview-track-bottom-offset:10px;--preview-track-height:calc(var(--preview-track-frame-height-vertical) + var(--preview-track-bottom-offset));--preview-track-controls-top-offset:calc(var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height));--settings-bg:rgba(0,0,0,.72);--settings-item-bg-hover:hsla(0,0%,100%,.08);--settings-radius:8px;--mobile-settings-bg:#2c2d2e;--divider-border:1px solid var(--white-alpha-24);--toggle-color-separator:#363738;--toggle-color-off:#656565;--toggle-color-on:#71aaeb;--toggle-color-autoplay-on:var(--white);--notification-bg:#2c2d2e;--notification-radius:8px;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--controls-container-z-index:1;--ads-container-z-index:1;--end-screen-mobile-z-index:1;--notification-z-index:1;--thumb-timer-z-index:2;--debug-panel-z-index:2;--modal-z-index:2;--settings-menu-z-index:2;--context-menu-z-index:3;--hot-key-helpers-container-z-index:3;--overlay-container-z-index:4;--rotate-transition-duration:0.25s;--btn-color:var(--white);--double-forward-bg:rgba(0,0,0,.6);background:var(--black);color:var(--white);font-family:var(--vk-vp-custom-font,var(--font));font-size:12px;height:100%;line-height:normal;outline:0;overflow:hidden;position:relative;user-select:none;width:100%}.vk-vp-root.visible-outside.s-2{overflow:visible}.vk-vp-root.s-2 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-2 button{background:transparent;border:none;color:inherit;font:inherit;line-height:normal;margin:0;overflow:visible;padding:0;width:auto;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}.vk-vp-root.s-2 p{margin:0}.vk-vp-root.s-2 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-2 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-2 :focus,.vk-vp-root.s-2 :focus-visible{outline:none}.vk-vp-root.s-2 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-2 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-2 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-2 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-2 .overlay-container{height:100%;left:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:var(--overlay-container-z-index)}.vk-vp-root.s-2 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-2 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function Ev(t,e){B(e,!0),Q(t,BT);let[i,o]=Be(),r=()=>w(at,"$isLive$",i),a=()=>w(di,"$availableSubtitlesList$",i),l=()=>w(We,"$isPreviewTrackHorizontallyAligned$",i),d=g(e,"sources",7),s=g(e,"store",7),u=g(e,"microStoresRoot",7),f=g(e,"videoConfig",7),p=g(e,"uiConfig",7),v=g(e,"title",7),_=g(e,"thumbUrl",7),y=g(e,"interactiveContainer",7),$=g(e,"interactiveController",7),x=g(e,"subtitles",7),I=g(e,"subtitlesForcedLanguage",7),T=g(e,"live",7),R=g(e,"preload",7),k=g(e,"autoplay",7),P=g(e,"volume",7,void 0),E=g(e,"muted",7,void 0),W=g(e,"fromTime",7),U=g(e,"canRewindLive",7),z=g(e,"showAds",7),Y=g(e,"adsSlotId",7,void 0),ie=g(e,"adsParams",7,void 0),J=g(e,"adsAutoplayParam",7,void 0),oe=g(e,"duration",7,void 0),de=g(e,"logoClickable",7),ae=g(e,"logoHidden",7),pe=g(e,"isMobile",7),ee=g(e,"showNextPrevButtons",7,!1),$e=g(e,"nextButtonActive",7,!1),Ee=g(e,"prevButtonActive",7,!1),ce=g(e,"endScreenVideoTitle",7,void 0),Qe=g(e,"endScreenVideoThumb",7,void 0),fe=g(e,"isOneVideoPlaylist",7,!1),ve=g(e,"supportLink",7),X=g(e,"shadowRootContainer",7),O=g(e,"outerContainerRef",7),me=g(e,"fullScreenTarget",7,void 0),ue=g(e,"failoverHosts",7,void 0),Re=g(e,"showMiniTimer",7,!1),Ze=g(e,"saveRate",7),ke=g(e,"seekToInteractive",7,Nb),j=g(e,"playPrevChapter",7,Nb),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();Th(p());let Fe=At(),nt=p().logoLink,ct=s().ui.debugPanelVisible,kt=s().ui.playerSize,at=s().state.isLive$,yt=s().state.isInteractive&&Iv.device.isAndroid,Mt=K(void 0),Vt=null,Wt=K(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{vsid:s().vsid}),Dh(s(),we),He(()=>{var F,it;s().ui.isMobile.set(pe()),(it=(F=f().callbacks)==null?void 0:F.onDomReady)==null||it.call(F)});let Te=(F=!1)=>{D(Wt,!0),F?s().actions.external.firstStart(z()):s().actions.internal.firstStart(z())},G=()=>{if(Fe.features.qualityDetailsSubMenuEnabled){let F=r_(s().videoId);if(F)switch(F.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,F.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,F.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(F.quality);break}}else{s_(s().videoId),Sf()&&s().actions.internal.setTrafficSavingEnabled(!0);let it=yf(s().videoId);it&&s().actions.internal.setQuality(it)}};function Oe(F){var ni,ui,Qt;let it=d()||F;it&&s().initVideo({container:n(Mt),sources:it,failoverHosts:ue(),subtitles:x(),subtitlesForcedLanguage:I(),volumeMultiplier:ne()});let Ht=RT.get(Id)==="true";ct.set(Ht),W()>0&&s().actions.external.seekTime(W());let ci=pe()?Fe.volumeDefault:(ui=(ni=P())!=null?ni:_u())!=null?ui:Fe.volumeDefault,dt=(Qt=E())!=null?Qt:Jh();if(s().actions.external.setVolume(ci),s().actions.external.setMuted(dt),s().getAdmanWrapper().setInitialVolume(dt?0:ci),G(),Fe.features.saveRate&&Ze()){let wt=i_();wt&&!r()&&s().actions.internal.setPlaybackRate(wt)}if(Se()){let wt=n_();wt&&s().actions.internal.setAutoplayNextEnabled(wt)}s().ui.isAutoplay.set(k()),k()&&Te(),R()&&Fe.features.preload&&s().actions.internal.preload()}let be=F=>{if(window.ResizeObserver){let it,Ht;Vt=new ResizeObserver(DT(ci=>{let dt=ci[0];if(dt.contentBoxSize){let ni=Array.isArray(dt.contentBoxSize)?dt.contentBoxSize[0]:dt.contentBoxSize;it=ni.inlineSize,Ht=ni.blockSize}else dt.contentRect&&(it=dt.contentRect.width,Ht=dt.contentRect.height);kt.set({width:it,height:Ht})},300)),Vt.observe(F)}F.clientWidth&&F.clientHeight&&kt.set({width:F.clientWidth,height:F.clientHeight})},Ne=()=>{document.hidden&&s().actions.external.stop()};Pt(()=>{var Ht,ci,dt,ni;yt&&document.addEventListener("visibilitychange",Ne),Fe.debugLog&&s().actions.internal.startLogging(),be(n(Mt));let F=Ce.map(ui=>ui.init({store:s(),microStores:we,config:f(),interactiveController:$(),uiConfig:p()})),it=()=>{yt&&document.removeEventListener("visibilitychange",Ne),Vt==null||Vt.disconnect(),F.forEach(ui=>ui.unsubscribe()),s().destroy()};return((Ht=T())==null?void 0:Ht.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),it):((ci=T())==null?void 0:ci.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),it):(((dt=T())==null?void 0:dt.status)==="finished"||((ni=T())==null?void 0:ni.status)==="postlive")&&!(d()&&VT(d()))?(s().actions.internal.setLiveWaitingRecord(!0),it):(Oe(),it)});function Ie(){n(Wt)?s().actions.external.play():Te(!0)}function gt(){s().actions.external.pause()}function ye(F){s().actions.external.setMuted(F)}function qe(){s().actions.external.toggleSubtitle()}function Ue(F,it){s().actions.external.changeSubtitle(F,it)}function rt(F){s().actions.external.changeAudioStream(F)}function Kt(){var F;(F=s().webApi.slotsApi)!=null&&F.haveSlots()&&s().actions.external.hideControls()}function It(){var F;(F=s().webApi.slotsApi)!=null&&F.haveSlots()&&s().actions.external.showControls()}function qt(F){pe()||F>=0&&F<=1&&s().actions.external.setVolume(F)}function gi(F){s().actions.internal.seekTime(F,NT.UNKNOWN)}function Ai(F){s().actions.external.seekEpisodeStartTime(F)}function Ii(){s().actions.external.returnFocusToEpisodes()}function Gi(F){s().actions.external.setPlaybackRate(F)}function oi(F){s().actions.external.setAutoQualityLimits(F)}function ut(){s().actions.external.setQuality("auto")}function ai(F){s().actions.external.setTrafficSavingEnabled(F)}function Yi(F){s().actions.external.setHighQualityEnabled(F)}let Ct=Fu(Fe.view),fi=f().playerView==="preview",di=s().state.availableSubtitlesList$;if(Fe.features.initSubtitles){let F=!1;He(()=>{var it;if(!F&&a().length){F=!0;let Ht;if(Fe.features.userVideoPrefs&&s().videoId){let dt=xu(Fe.userSalt,String(s().videoId));dt!=null&&dt.subtitleTrackId&&(Ht=a().find(ni=>ni.value===dt.subtitleTrackId))}let ci=(it=I())!=null?it:Tf();ci&&(Ht=a().find(dt=>dt.language===ci)),s().actions.internal.setSubtitle(Ht)}})}let We=s().ui.isPreviewTrackHorizontallyAligned;var st=OT();let yi;var ji=C(st);{var ho=F=>{Cv(F,{get store(){return s()},get uiConfig(){return Fe},get thumbUrl(){return _()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return k()},get canRewindLive(){return U()},get showAds(){return z()},get adsSlotId(){return Y()},get adsParams(){return ie()},get adsAutoplayParam(){return J()},get duration(){return oe()},get logoClickable(){return de()},get logoHidden(){return ae()},get logoTargetUrl(){return nt},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 O()},get fullScreenTarget(){return me()},get showMiniTimer(){return Re()},get playerStarted(){return n(Wt)},get seekToInteractive(){return ke()},get playPrevChapter(){return j()},firstStart:Te,seekTime:gi,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(Mt)},set videoContainer(it){D(Mt,it,!0)}})},To=F=>{var it=Ve(),Ht=le(it);{var ci=ni=>{Tv(ni,{get thumbUrl(){return _()},get outsideDuration(){return oe()},get canRewindLive(){return U()},get videoContainer(){return n(Mt)},set videoContainer(ui){D(Mt,ui,!0)}})},dt=ni=>{wv(ni,{get store(){return s()},get uiConfig(){return Fe},get title(){return v()},get thumbUrl(){return _()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return k()},get canRewindLive(){return U()},get showAds(){return z()},get adsSlotId(){return Y()},get adsParams(){return ie()},get adsAutoplayParam(){return J()},get duration(){return oe()},get logoClickable(){return de()},get logoHidden(){return ae()},get logoTargetUrl(){return nt},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 O()},get fullScreenTarget(){return me()},get showMiniTimer(){return Re()},get playerStarted(){return n(Wt)},get seekToInteractive(){return ke()},get playPrevChapter(){return j()},firstStart:Te,get showEndScreen(){return Le()},get showAutoplayNext(){return Se()},get showNextPrevButtons(){return ee()},get adsExternalApi(){return e.adsExternalApi},get adsJson(){return e.adsJson},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(Mt)},set videoContainer(ui){D(Mt,ui,!0)},get keyboardControls(){return ze()},set keyboardControls(ui){ze(ui)}})};M(Ht,ni=>{fi?ni(ci):ni(dt,!1)})}b(F,it)};M(ji,F=>{pe()?F(ho):F(To,!1)})}S(st),N(F=>{yi=te(st,1,"vk-vp-root s-2",null,yi,F),Ke(st,Ct)},[()=>({"root--miui-browser":Iv.device.isMobile&&Iv.browser.isMiuiBrowser,"visible-outside":fi,"preview-track-horizontally-alinged":l()})]),b(t,st);var dn=H({initVideo:Oe,play:Ie,pause:gt,setMuted:ye,toggleSubtitle:qe,changeSubtitle:Ue,changeAudioStream:rt,hideControls:Kt,showControls:It,setVolume:qt,seekTime:gi,seekEpisodeStartTime:Ai,returnFocusToEpisodes:Ii,setPlaybackRate:Gi,setAutoQualityLimits:oi,setAutoQuality:ut,toggleTrafficSaving:ai,toggleHighQuality:Yi,get sources(){return d()},set sources(F){d(F)},get store(){return s()},set store(F){s(F)},get microStoresRoot(){return u()},set microStoresRoot(F){u(F)},get videoConfig(){return f()},set videoConfig(F){f(F)},get uiConfig(){return p()},set uiConfig(F){p(F)},get title(){return v()},set title(F){v(F)},get thumbUrl(){return _()},set thumbUrl(F){_(F)},get interactiveContainer(){return y()},set interactiveContainer(F){y(F)},get interactiveController(){return $()},set interactiveController(F){$(F)},get subtitles(){return x()},set subtitles(F){x(F)},get subtitlesForcedLanguage(){return I()},set subtitlesForcedLanguage(F){I(F)},get live(){return T()},set live(F){T(F)},get preload(){return R()},set preload(F){R(F)},get autoplay(){return k()},set autoplay(F){k(F)},get volume(){return P()},set volume(F){P(F)},get muted(){return E()},set muted(F){E(F)},get fromTime(){return W()},set fromTime(F){W(F)},get canRewindLive(){return U()},set canRewindLive(F){U(F)},get showAds(){return z()},set showAds(F){z(F)},get adsSlotId(){return Y()},set adsSlotId(F){Y(F)},get adsParams(){return ie()},set adsParams(F){ie(F)},get adsAutoplayParam(){return J()},set adsAutoplayParam(F){J(F)},get duration(){return oe()},set duration(F){oe(F)},get logoClickable(){return de()},set logoClickable(F){de(F)},get logoHidden(){return ae()},set logoHidden(F){ae(F)},get isMobile(){return pe()},set isMobile(F){pe(F)},get showNextPrevButtons(){return ee()},set showNextPrevButtons(F){ee(F)},get nextButtonActive(){return $e()},set nextButtonActive(F){$e(F)},get prevButtonActive(){return Ee()},set prevButtonActive(F){Ee(F)},get endScreenVideoTitle(){return ce()},set endScreenVideoTitle(F){ce(F)},get endScreenVideoThumb(){return Qe()},set endScreenVideoThumb(F){Qe(F)},get isOneVideoPlaylist(){return fe()},set isOneVideoPlaylist(F){fe(F)},get supportLink(){return ve()},set supportLink(F){ve(F)},get shadowRootContainer(){return X()},set shadowRootContainer(F){X(F)},get outerContainerRef(){return O()},set outerContainerRef(F){O(F)},get fullScreenTarget(){return me()},set fullScreenTarget(F){me(F)},get failoverHosts(){return ue()},set failoverHosts(F){ue(F)},get showMiniTimer(){return Re()},set showMiniTimer(F){Re(F)},get saveRate(){return Ze()},set saveRate(F){Ze(F)},get showAutoplayNext(){return Se()},set showAutoplayNext(F){Se(F)},get seekToInteractive(){return ke()},set seekToInteractive(F){ke(F)},get playPrevChapter(){return j()},set playPrevChapter(F){j(F)},get volumeMultiplier(){return ne()},set volumeMultiplier(F){ne(F)},get showEndScreen(){return Le()},set showEndScreen(F){Le(F)},get keyboardControls(){return ze()},set keyboardControls(F){ze(F)}});return o(),dn}var HT=Ae('<defs><path id="rect" d="m2.72 0c.45 0 .6.05.77.13a1 1 0 01.38.38c.09.16.13.33.13.77v1.44c0 .44-.04.6-.13.77a1 1 0 01-.38.38c-.16.08-.32.13-.77.13h-1.44c-.44 0-.6-.05-.77-.13a1 1 0 01-.37-.38c-.1-.16-.14-.33-.14-.77v-1.44c0-.44.05-.6.13-.77a1 1 0 01.38-.38c.17-.08.33-.13.77-.13z"></path></defs><path d="M38.24 6c3.57 0 4.86.37 6.17 1.07a7.3 7.3 0 0 1 3.02 3.02c.7 1.3 1.07 2.6 1.07 6.17v23.49c0 3.56-.37 4.85-1.07 6.16a7.3 7.3 0 0 1-3.02 3.02c-1.3.7-2.6 1.07-6.16 1.07h-19.5c-3.56 0-4.85-.37-6.16-1.07a7.3 7.3 0 0 1-3.02-3.02c-.7-1.3-1.07-2.6-1.07-6.16v-23.5c0-3.56.37-4.85 1.07-6.16a7.3 7.3 0 0 1 3.02-3.02C13.9 6.37 15.2 6 18.76 6zm.32 3h-19.8c-2.8 0-3.77.19-4.75.71a4.3 4.3 0 0 0-1.8 1.8c-.5.95-.7 1.87-.7 4.43l-.01 23.8c0 2.8.19 3.76.71 4.75a4.3 4.3 0 0 0 1.8 1.8c.98.52 1.95.71 4.75.71h19.49c2.8 0 3.76-.19 4.74-.71a4.3 4.3 0 0 0 1.8-1.8c.52-.98.71-1.95.71-4.74v-23.5c0-2.8-.19-3.75-.71-4.74a4.3 4.3 0 0 0-1.8-1.8c-.95-.5-1.87-.7-4.43-.7z"></path><use xlink:href="#rect" x="16.5" y="14"></use><use xlink:href="#rect" x="16.5" y="22"></use><use xlink:href="#rect" x="16.5" y="30"></use><use xlink:href="#rect" x="16.5" y="38"></use><use xlink:href="#rect" x="37" y="14"></use><use xlink:href="#rect" x="37" y="22"></use><use xlink:href="#rect" x="37" y="30"></use><use xlink:href="#rect" x="37" y="38"></use>',1);function Pv(t,e){let i=g(e,"isWhite",3,!1),o=m(()=>i()?"#fff":"#909499");Ye(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(r,a)=>{var l=HT();Yt(9),b(r,l)},$$slots:{default:!0}})}var FT=L('<div class="title s-1"> </div>'),UT=L('<div class="playerStub s-1"><!> <!></div>'),zT={hash:"s-1",code:".playerStub.s-1{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}.title.s-1{box-sizing:border-box;color:#fff;font-size:15px;left:0;overflow:hidden;padding:18px 20px 10px;position:absolute;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}"};function Av(t,e){Q(t,zT);var i=UT(),o=C(i);{var r=d=>{var s=FT(),u=C(s,!0);S(s),N(()=>he(u,e.title)),b(d,s)};M(o,d=>{e.title&&d(r)})}var a=A(o,2);{var l=d=>{let s=m(()=>!!e.thumbUrl);Pv(d,{get isWhite(){return n(s)}})};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 WT=L('<div class="playerError s-3"><!></div>'),KT={hash:"s-3",code:".playerError.s-3{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}"};function kv(t){Q(t,KT);var e=WT(),i=C(e);ja(i,{}),S(e),b(t,e)}import{AppTracer as pI,now as fI,ValueSubject as mI,withoutNullable as vI}from"@vkontakte/videoplayer-shared/es2018";import{cloneDeepWith as gI,InterfaceLanguage as hI,isNonNullable as Wb,Logger as _I,Observable as bI,Subscription as Kb,once as $I,InternalsExposure as yI,skip as xI,getPlayerId as wI}from"@vkontakte/videoplayer-shared/es2018";import{clientChecker as Qb,isMobile as SI}from"@vkontakte/videoplayer-core/es2018";import{OneStat as CI,ThinOneStat as TI,MediascopePixel as II}from"@vkontakte/videoplayer-statistics/es2018";import{Logger as QT,Subscription as qT}from"@vkontakte/videoplayer-shared/es2018";var np=class{constructor(){this.subscription=new qT,this.logger=new QT,this.log=this.logger.createComponentLog("MediaSessionApi")}isSupported(){return"mediaSession"in navigator}setMetaData({title:e,artist:i="",thumbUrl:o=""}){this.isSupported()&&(navigator.mediaSession.metadata=new MediaMetadata({title:e,artist:i,artwork:[{src:o,sizes:"96x96",type:"image/png"},{src:o,sizes:"128x128",type:"image/png"},{src:o,sizes:"192x192",type:"image/png"},{src:o,sizes:"256x256",type:"image/png"},{src:o,sizes:"384x384",type:"image/png"},{src:o,sizes:"512x512",type:"image/png"}]}))}updateActionHandlers(e){this.resetActionHandlers(),this.setActionHandlers(e)}resetActionHandlers(){let e=[["play",null],["pause",null],["stop",null],["nexttrack",null],["previoustrack",null],["seekto",null],["seekbackward",null],["seekforward",null]];this.setActionHandlers(e)}setActionHandlers(e){var i,o;if(this.isSupported())for(let[r,a]of e)try{(o=(i=navigator.mediaSession).setActionHandler)==null||o.call(i,r,a)}catch(l){throw new Error(`The media session action "${r}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{var a,l;let o=_e(e.state.currentPlaybackRate$),r=_e(e.state.duration$);if(!(!isFinite(i)||!isFinite(r)))try{(l=(a=navigator.mediaSession).setPositionState)==null||l.call(a,{position:i,playbackRate:o,duration:r})}catch(d){this.log({message:`MediaSession setPositionState can't call with position: ${i} and duration: ${r}`})}})))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};function wc(t,e){var r,a;let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let l of i)o[l]=(a=(r=e[l])!=null?r:t[l])!=null?a:void 0;return o}var Ob="Inner error. Unexpectedly root annotation container null reference exception",Bb="Annotation with such name already exists",Hb="Annotation with such name does not exist";var Yl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as GT,Subscription as YT,throttleFn as jT}from"@vkontakte/videoplayer-shared/es2018";var XT="1",ZT=100,rp=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new YT}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=jT(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},ZT);this.subscriptions.add(GT(this.rootAnnotationsContainer).subscribe(({width:o,height:r})=>{this.playerSize={width:o,height:r},i()})),this.mutationObserver=new MutationObserver(i),this.mutationObserver.observe(this.rootAnnotationsContainer,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}add(e,i){var o;if(!this.rootAnnotationsContainer)throw new Yl(Ob);if(this.annotations.has(e))throw new Yl(Bb);i.style.zIndex=(o=i.style.zIndex)!=null?o:XT,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 Yl(Hb);return i}remove(e){let i=this.get(e);this.annotations.delete(e)&&i.remove()}clear(){for(let e in this.annotations.keys())this.remove(e)}destroy(){var e;this.annotations.clear(),this.subscriptions.unsubscribe(),(e=this.mutationObserver)==null||e.disconnect(),this.rootAnnotationsContainer=null}isElementExceedsBoundaries(e,i,o){let r=e.offsetTop,a=e.offsetLeft,l=e.offsetWidth,d=e.offsetHeight;return r<0||a<0||a+l>i||r+d>o}registryRootContainer(e){}addLayer(e){return document.createElement("div")}getLayer(e){}removeLayer(e){}clearLayer(e){}detach(){}reattach(){}};import{assertNonNullable as sp,Subscription as JT}from"@vkontakte/videoplayer-shared/es2018";var ln=class{init({store:e,microStores:i,interactiveController:o,config:r}){return sp(e),sp(i),sp(r),r.interactiveData&&sp(o),this.subscription=new JT,this.subscription}};var Sc=class extends ln{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$={...se(null),toggle:()=>this.state$.update(i=>!i)}}init(i){let o=super.init(i),{isInteractiveExpectation$:r}=i.store.state;return o.add(r.subscribe(a=>{this.state$.set(a?!0:null)})),o}};var Cc=class extends ln{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$={...se(null),toggle:()=>this.state$.update(i=>!i)}}init(i){let o=super.init(i),{microStores:r,store:a}=i,{fakeIsPlaying$:l}=r,{isInteractiveExpectation$:d,isPlaying$:s}=a.state,{controlsVisible:u,isMobile:f}=a.ui,p=_e(f),v=()=>p&&_e(u);return o.add(u.subscribe(_=>{if(!p)return;let y=_e(l);_e(s)?this.state$.set(_):y!==null&&this.state$.set(!y||_)})),o.add(s.subscribe(_=>{this.state$.set(!_||v())})),o.add(l.subscribe(_=>{if(_===null)return;let y=_e(d);if(v()){this.state$.set(!0);return}y&&this.state$.set(!_)})),o}};var Tc=class extends ln{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=se("tooltip_chapter_without_interactive")}init(i){let o=super.init(i),{store:r}=i;return o.add(r.state.interactiveEpisodes$.subscribe(a=>{a.length&&(a.every(l=>l.completed)?this.state$.set("tooltip_interactive_of_chapter_completed"):this.state$.set("tooltip_disabled_when_interactive"))})),o}};import{combine as eI}from"@vkontakte/videoplayer-shared/es2018";var Lv=se(!1),ap=null,Ic=class extends ln{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$={...Lv,set:(i,o=!1)=>{i!==_e(Lv)&&(this.clearTimeout(),Lv.set(i),!i&&ap&&(ap=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()}}init(i){let o=super.init(i),{store:r,config:a}=i,{isInteractiveTime$:l,isPlaying$:d}=r.state,s=r.ui.controlsVisible,{interactiveTimeIndicator:u}=r.ui.controls;o.add(s.subscribe(p=>{_e(l)&&p&&this.state$.set(!1)}));let f=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(eI({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:v,interactiveTimeIndicator:_})=>{var y,$;if(!(!p||!(_!=null&&_.isDisplayed))){if(!v)return this.state$.set(!1);f.tooltipHelpHintActive&&ap===null&&(ap=!0,f.tooltipHelpHintActive=!1,this.state$.set(!0),($=(y=r.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||$.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as tI,noop as iI}from"@vkontakte/videoplayer-shared/es2018";var Ec=class extends ln{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$={...se(null),toggle:iI};this.checkIfShouldHide=i=>Os(i,"s")}init(i){let o=super.init(i),{store:r,interactiveController:a}=i,l=r.ui.currentGridType$,d=r.getLogger().createComponentLog("GraphIsOpened microStore");return this.state$.toggle=async()=>{if(this.checkIfShouldHide(_e(l)))return;let s=_e(this.state$),{isEnded$:u,playbackState$:f}=r.state,{disabledControls$:p}=r.ui.controls,v=_e(u),_=_e(f);if(s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1),p.remove(ff),!v&&this.graphMadePause&&r.actions.internal.play()}catch(y){d({message:"Cant hide graph"})}else{this.graphMadePause=_==="playing";try{await(a==null?void 0:a.toggleGraphView(!0)),this.state$.set(!0),p.add(ff),!v&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}},o.add(tI({graphIsOpened:this.state$,currentGridType:l}).subscribe(async({graphIsOpened:s,currentGridType:u})=>{if(this.checkIfShouldHide(u)&&s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1)}catch(p){d({message:"Cant hide graph"})}})),o}};import{ValueSubject as Fb}from"@vkontakte/videoplayer-shared/es2018";var Pc=class extends ln{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:se(!1),isEnabled$:se(!1),type$:se(void 0)}}init(i){let o=super.init(i),{store:r}=i,{info:{isActive$:a,isEnabled$:l,type:d}}=r.webApi.pictureInPictureApi||{info:{isActive$:new Fb(!1),isEnabled$:new Fb(!1)}};return o.add(a.subscribe(s=>{this.state$.isActive$.set(s)})),o.add(l.subscribe(s=>{this.state$.isEnabled$.set(s)})),this.state$.type$.set(d),o}};import{filter as rI,filterChanged as sI}from"@vkontakte/videoplayer-shared/es2018";import{safeStorage as Mv}from"@vkontakte/videoplayer-shared/es2018";var Ub=({maxShowCount:t,timeout:e})=>{let i=[t!==0?oI({maxCount:t}):void 0,e!==0?nI({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},oI=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Mv.set("videoplayer_notifications_manager_count",JSON.stringify((r=e[i])!=null?r:0))},canShowNotification:i=>{var o;return((o=e[i])!=null?o:0)<t}}},nI=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Mv.get(e)||"{}")}catch(a){return{}}},o=a=>Mv.set(e,JSON.stringify(a)),r=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o({...i(),[a]:{timeout:t,launchTime:Date.now()}})},canShowNotification:a=>{let l=i()[a];if(l){let d=Date.now()-l.launchTime>t;return d&&r(a),d}else return!0}}};var Ac=class extends ln{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:se({}),showNotification:i=>{this.state$.notificationsToShow$.update(o=>(o[i]=!0,o)),this.notificationManager.notificationShowed(i)},closeNotification:i=>{this.state$.notificationsToShow$.update(o=>(delete o[i],o))}}}init(i){let o=super.init(i),{store:r,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:l,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:s}}}=i;this.notificationManager=Ub({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe(sI(),rI(f=>f)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(s&&r.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var zb=()=>[Sc,Cc,Tc,Ic,Ec,Pc,Ac].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:{...e,[o.stateName]:o.state$}}},{subscribers:[],stores:{}});import{devNull as kc}from"@vkontakte/videoplayer-shared/es2018";var lp=class{constructor(e){this.getActiveElement=e;this.focusableElements=[];this.isActive=!1;this.handleTabKey=e=>{if(this.updateFocusableElements(),!this.focusableElements.length)return;let i=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1],r=this.getActiveElement();e.shiftKey&&r===i?(e.preventDefault(),o.focus()):!e.shiftKey&&r===o&&(e.preventDefault(),i.focus())}}activate(){this.isActive||(document.addEventListener("keydown",this.handleTabKey),this.isActive=!0)}deactivate(){this.isActive&&(document.removeEventListener("keydown",this.handleTabKey),this.isActive=!1,this.focusableElements=[])}updateFocusableElements(){this.isActive&&(this.focusableElements=this.getFocusableElements())}getFocusableElements(){let e=["button:not([disabled])","[href]:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"]):not([disabled])'].join(", ");return Array.from(this.container.querySelectorAll(e)).filter(i=>!i.disabled&&i.offsetParent!==null)}destroy(){this.deactivate()}setContainer(e){this.container=e}};var dp=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 lp(()=>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 aI=L('<div class="root s-4"><!></div>'),lI={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 Vv(t,e){B(e,!0),Q(t,lI);let i=null,o=K(null);He(()=>(n(o)&&(i=window.setTimeout(()=>{D(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function r(s){e.playbackStatusShow&&D(o,s?"prev":"next",!0)}var a=Ve(),l=le(a);{var d=s=>{var u=Ve(),f=le(u);Ls(f,()=>n(o),p=>{var v=aI(),_=C(v);let y=m(()=>n(o)==="prev");yc(_,{get duration(){return e.animationDuration},get Icon(){return ma},get reversed(){return n(y)}}),S(v),b(p,v)}),b(s,u)};M(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return b(t,a),H({startVideoChangedAnimation:r})}import{getWindow as dI}from"@vkontakte/videoplayer-shared/es2018";var Rv=dI().HTMLElement||class{constructor(){this.isConnected=!1}};var cI=Object.defineProperty,uI=(t,e,i)=>e in t?cI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,zt=(t,e,i)=>uI(t,typeof e!="symbol"?e+"":e,i),EI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:hI.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:SI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},Zn=K(void 0),Dv=ii({animationDuration:0,playbackStatusShow:!1}),cp=class extends Rv{constructor(){super(),zt(this,"svelteStubComponent"),zt(this,"svelteRootComponent"),zt(this,"sveltePersistentLayerComponent"),zt(this,"svelteErrorComponent"),zt(this,"store"),zt(this,"microStoresRoot"),zt(this,"statistics"),zt(this,"_shadowRoot"),zt(this,"playerContainer"),zt(this,"rootContainer"),zt(this,"stateContainer"),zt(this,"shadowRootContainer"),zt(this,"playerId"),zt(this,"uiConfig"),zt(this,"coreConfig"),zt(this,"statisticsConfig"),zt(this,"metaConfig"),zt(this,"interactiveController"),zt(this,"interactiveContainer"),zt(this,"graphMadePause"),zt(this,"currentPlayingVideoIndex",0),zt(this,"needToRepeatPlaylist",!1),zt(this,"videoConfig"),zt(this,"pictureInPictureApi"),zt(this,"mediaSessionApi"),zt(this,"unsubscribePlayerPhaseSubscription"),zt(this,"logger"),zt(this,"log"),zt(this,"subscription"),zt(this,"interactiveSubscription"),zt(this,"annotationsApi"),zt(this,"slotsApi"),zt(this,"focusManager"),zt(this,"prevIsid"),zt(this,"isInited",!1),zt(this,"postponedInitParams",null),zt(this,"internalsExposure",null),zt(this,"shadowDOMCallbacksDisabled",!1),zt(this,"fatalError$",new mI(null)),zt(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:f,statVKAppId:p,refreshStatAuthToken:v,autoplay:_,isMobile:y,isTouch:$,refDomain:x,deviceId:I,interactiveData:T}=wc(this.videoConfig,i),R=(o=T==null?void 0:T.projectInfo)==null?void 0:o.pid,k=(a=(r=this.interactiveController)==null?void 0:r.state.isReplay$.getValue())!=null?a:!1;k&&(this.prevIsid=void 0);let{unitedVideoId:P,isClip:E=!1}=e;if(this.uiConfig.features.statistics&&P)try{return new CI({movieId:P,albumId:d,place:s,trackCode:f,vkAppId:p,autoplay:(l=_&&!this.interactiveController)!=null?l:!1,mobile:$!=null?$:y,clip:E,refDomain:x,deviceId:I,isPreviewPlayerView:this.videoConfig.playerView==="preview",...R&&(!this.isInited||k)&&{projectId:Number(R)}},{refreshAuthToken:v,userSalt:u,config:this.statisticsConfig,...this.interactiveController&&{useIsid:!0,isid:this.prevIsid}})}catch(U){console.error(U),this.log({message:U.message})}}),kc.create("ui"),this.logger=new _I,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Kb,this.interactiveSubscription=new Kb,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Zr(kv,{target:this.playerContainer}))})}connectedCallback(){var e,i;if(this.rootContainer)return;this.initPlayerRootContainers();let o=(e=this.getAttribute("stub-title"))!=null?e:void 0,r=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=ii({title:o,thumbUrl:r}),l={target:this.playerContainer,props:a};this.svelteStubComponent=Zr(Av,l),this.sveltePersistentLayerComponent=Zr(Vv,{target:this.playerContainer,props:Dv}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;Dv.animationDuration=e,Dv.playbackStatusShow=i&&o}disconnectedCallback(){var e,i,o,r,a,l,d;this.shadowDOMCallbacksDisabled||((e=this.annotationsApi)==null||e.destroy(),(i=this.slotsApi)==null||i.destroy(),(o=this.focusManager)==null||o.destroy(),(r=this.mediaSessionApi)==null||r.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteErrorComponent),this.unmountComponent(this.sveltePersistentLayerComponent),this.subscription.unsubscribe(),(a=this.unsubscribePlayerPhaseSubscription)==null||a.call(this),(l=this.interactiveController)==null||l.destroy(),this.interactiveSubscription.unsubscribe(),(d=this.internalsExposure)==null||d.destroy(),kc.destroy("ui"))}initPlayerRootContainers(){this.rootContainer=document.createElement("div"),this.rootContainer.style.position="relative",this.rootContainer.className="root-container",this.rootContainer.style.width="100%",this.rootContainer.style.height="100%",this.rootContainer.style.minHeight="206px",this.shadowRootContainer=document.createElement("div"),this.shadowRootContainer.style.position="absolute",this.shadowRootContainer.className="shadow-root-container",this.shadowRootContainer.style.width="100%",this.shadowRootContainer.style.height="100%",this._shadowRoot=this.shadowRootContainer.attachShadow({mode:"open"}),this.playerContainer=document.createElement("div"),this.playerContainer.style.all="initial",this.playerContainer.style.display="block",this.playerContainer.style.contain="strict",this.playerContainer.style.width="100%",this.playerContainer.style.height="100%",this._shadowRoot.append(this.playerContainer),this.rootContainer.append(this.shadowRootContainer),this.stateContainer=document.createElement("div"),this.stateContainer.className="state-container",this.stateContainer.style.width="1px",this.stateContainer.style.height="1px",this.stateContainer.style.position="absolute",this.stateContainer.style.backgroundColor="transparent",this.stateContainer.style.left="-100000px",this.append(this.rootContainer),this.append(this.stateContainer)}needToShowNextPrevButtons(){return this.videoConfig?this.videoConfig.videos.length>1&&this.videoConfig.showNextPrevButtons:!1}isNextButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1||this.needToRepeatPlaylist):!1}isPrevButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex>0||this.needToRepeatPlaylist):!1}isControlDisabled(e){var i;let o=(i=this.store)==null?void 0:i.ui.controls.disabledControls$;return(o==null?void 0:o.includes(e))||!1}getNextVideoInfo(){if(!this.videoConfig)return{nextVideoTitle:void 0,nextVideoThumb:void 0};let e=this.videoConfig.videos[this.currentPlayingVideoIndex+1]||{};return{nextVideoTitle:e.title,nextVideoThumb:e.thumbUrl}}createThinOneStat(e,i={}){if(!this.videoConfig)return;let{deviceId:o,preload:r,refreshStatAuthToken:a}=wc(this.videoConfig,i),{unitedVideoId:l}=e;if(this.uiConfig.features.thinStatistics&&l)return new TI.ThinOneStat({deviceId:o,movieId:l,preload:r,isPreviewPlayerView:this.videoConfig.playerView==="preview"},{config:this.statisticsConfig,refreshAuthToken:a})}createPlayer(e,i={},o){var r,a,l,d,s,u,f,p,v,_;if(!this.videoConfig)return;let{albumId:y,statPlace:$,statAuthToken:x,preload:I,autoplay:T,volume:R,muted:k,fromTime:P,canRewindLive:E,supportLink:W,showAds:U,adsSlotId:z,adsParams:Y={},adsAutoplayParam:ie,interfaceLanguage:J,isCyrillicRelatedInterface:oe,logoClickable:de,logoHidden:ae,isMobile:pe,isTouch:ee,isAudioDisabled:$e,isLiveCatchUpMode:Ee,fullScreenTarget:ce,failoverHosts:Qe,canDownload:fe,callbacks:ve,interactiveData:X,showThumbTimer:O,additionalButtons:me=[],additionalSettingsMenuItems:ue=[],additionalContextMenuItems:Re=[],repeat:Ze,loop:ke,saveRate:j,volumeMultiplier:ne,showEndScreen:Se,showAutoplayNext:Le,mediascopePixels:ze}=wc(this.videoConfig,i),{sources:Ce,title:we,thumbUrl:Fe,unitedVideoId:nt,isClip:ct=!1,duration:kt,adsParams:at={},videoEpisodes:ti,previewThumbsData:yt,subtitles:Mt,subtitlesForcedLanguage:Vt,live:Wt,adsExternalApi:Te,adsJson:G}=e;if(!Ce&&!Wt){let oi=new Error("empty sources and live");this.fatalError$.next(oi),(r=ve.onCrashed)==null||r.call(ve,oi.message);return}let Oe={...Y,...at},be=this.getNextVideoInfo(),Ne={sources:Ce,title:we,thumbUrl:Fe,subtitles:Mt,subtitlesForcedLanguage:Vt,unitedVideoId:nt,isClip:ct,live:Wt,albumId:y,statPlace:$,autoplay:T,muted:k,volume:R,fromTime:P,canRewindLive:E,showAds:U,adsSlotId:z,adsParams:Oe,adsAutoplayParam:ie,duration:kt,logoClickable:de,logoHidden:ae,isTouch:ee!=null?ee:pe,repeat:Ze,loop:ke,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:be.nextVideoTitle,endScreenVideoThumb:be.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},Ie={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(Ne)}`});let gt=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),ye=(gt==null?void 0:gt.oneStat)||this.createOneStat(e,i),qe=this.createThinOneStat(e,i),Ue;ze&&(Ue=new II({pixels:ze})),(ye||qe)&&(this.statistics=new Wu(ye,qe,Ue,gt==null?void 0:gt.statSubscription));let rt=this.uiConfig.features.apptracer.enabled?new pI("videoplayer",this.uiConfig.features.apptracer,{version:Ll,env:vu},vI({movieId:nt,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=(s=(d=this.statistics)==null?void 0:d.oneStat)==null?void 0:s.isid$.getValue()));let Kt=!!X,It=[],qt="tooltip_interactive_go_back_disabled_first";if(Kt&&this.interactiveController){let oi=this.interactiveController.state.isInitialChapter$.getValue(),ut=this.interactiveController.getHistoryState();oi&&It.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||It.push("SEEK_TO_INTERACTIVE_BUTTON"),ut.hasPrevChapter$.getValue()||(It.push("PLAY_PREV_CHAPTER_BUTTON"),oi||(ut.isGoBackLimited$.getValue()?qt="tooltip_interactive_go_back_disabled_limit":qt="tooltip_interactive_go_back_disabled"))}let gi=()=>{var oi;this.isInited=!1,this.prevIsid=void 0;let ut=(o==null?void 0:o.info.isEnded$.getValue())&&((oi=this.interactiveController)==null?void 0:oi.state.isEndChapter$.getValue());ve.onReplayInteractiveVideo&&!ut?ve.onReplayInteractiveVideo():this.replayInteractiveVideo()},Ai=Ze&&this.videoConfig.videos.length===1;this.store=tb({player:o,interfaceLanguage:J,isCyrillicRelatedInterface:oe,videoId:nt,isClip:ct,isLiveCatchUpMode:Ee,isAudioDisabled:$e,statAuthToken:x,callbacks:ve,webApi:Ie,videoEpisodes:ti,previewThumbsData:yt,canDownload:fe,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,disabledControls:It,isInteractive:Kt,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:gi,playPrevChapterDisabledTooltip:qt,hasInteractiveBranches:!!((_=(v=this.interactiveController)==null?void 0:v.getChapterBranches())!=null&&_.length),additionalButtons:this.uiConfig.features.additionalButtons?me:[],additionalSettingsMenuItems:ue!=null?ue:[],additionalContextMenuItems:Re!=null?Re:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:oi=>{var ut;return(ut=this.sveltePersistentLayerComponent)==null?void 0:ut.startVideoChangedAnimation(oi)},looped:this.uiConfig.features.useLoopSetting?ke:Ai,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId,appTracer:rt});let{stores:Ii}=this.microStoresRoot=zb(),Gi=()=>{var oi,ut,ai,Yi,Ct,fi;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(We=>{var st;return(st=ve==null?void 0:ve.onCurrentFormatChanged)==null?void 0:st.call(ve,We)})),this.subscription.add(Ii.interactiveControlsOpacity$.subscribe(We=>{var st;We!==null&&((st=this==null?void 0:this.interactiveController)==null||st.setDisabledControls(We))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(We=>{var st;return(st=ve==null?void 0:ve.onThroughputEstimationChanged)==null?void 0:st.call(ve,We)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(We=>{var st;return(st=ve==null?void 0:ve.onTrafficSavingEnabledChanged)==null?void 0:st.call(ve,We)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(We=>{var st;return(st=ve==null?void 0:ve.onHighQualityEnabledChanged)==null?void 0:st.call(ve,We)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(We=>{var st;return(st=ve==null?void 0:ve.onAutoQualityEnabledChanged)==null?void 0:st.call(ve,!!We)})),this.subscription.add(new bI(We=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(st=>We.next(st)))}).pipe(xI(1)).subscribe(We=>{var st;return(st=ve==null?void 0:ve.onCurrentPlaybackRateChanged)==null?void 0:st.call(ve,We)})),this.subscription.add(this.store.state.volume$.subscribe(We=>{var st;return(st=ve==null?void 0:ve.onVolumeChange)==null?void 0:st.call(ve,We)})),this.subscription.add(this.store.state.muted$.subscribe(We=>{var st,yi,ji,ho;if(We)(st=ve==null?void 0:ve.onMute)==null||st.call(ve);else{let To=(ji=((yi=this.store)==null?void 0:yi.state.volume$)&&_e(this.store.state.volume$))!=null?ji:0;(ho=ve==null?void 0:ve.onUnmute)==null||ho.call(ve,To)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(We=>{var st;return(st=ve==null?void 0:ve.onVideoBitrateChanged)==null?void 0:st.call(ve,We)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(We=>{var st;let yi=(st=this.store)==null?void 0:st.ui.controls.disabledControls$;yi&&(We&&!yi.includes(Ed)&&yi.add(Ed),We||yi.remove(Ed))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(async We=>{var st;if(!Qb.browser.isSamsungBrowser||!We||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&await this.replayInteractiveChapter((st=this.videoConfig)==null?void 0:st.callbacks.onExternalFullscreenExit)})),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(We=>{var st;return(st=ve==null?void 0:ve.onVSIDChanged)==null?void 0:st.call(ve,We)})),this.initMediaSession(),D(Zn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:Ce,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:we,thumbUrl:Fe,subtitles:Mt,subtitlesForcedLanguage:Vt,live:Wt,preload:I,autoplay:T,muted:k,volume:R,fromTime:P,canRewindLive:E,supportLink:W,showAds:U,adsSlotId:z,adsParams:Oe,adsAutoplayParam:ie,duration:kt,logoClickable:de,logoHidden:ae,isMobile:ee!=null?ee:pe,failoverHosts:Qe,fullScreenTarget:ce,saveRate:j,shadowRootContainer:this.shadowRootContainer,showMiniTimer:O,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 di={target:this.playerContainer,props:n(Zn)};this.svelteRootComponent=Zr(Ev,di),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(ai=(ut=(oi=this.videoConfig)==null?void 0:oi.callbacks)==null?void 0:ut.onInited)==null||ai.call(ut)),(Yi=this.internalsExposure)==null||Yi.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((fi=(Ct=this.videoConfig)==null?void 0:Ct.callbacks)!=null&&fi.onDevNullLog)?kc.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):kc.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Qb.isInited$.subscribe(oi=>{oi&&(console.log("UI SDK async start"),Gi())}):Gi()}addPlayerInfoSubscriptions(){var e,i;let o=this.store,r=(e=this.microStoresRoot)==null?void 0:e.stores;if(!o||!r)return;let a=(i=this.videoConfig)==null?void 0:i.callbacks;a&&this.subscription.add(o.playerPhase.subscribe(d=>{var s;return(s=a.onPlayerPhaseChanged)==null?void 0:s.call(a,d)})).add(o.state.playbackState$.subscribe(d=>{var s;return d&&((s=a.onPlaybackStateChanged)==null?void 0:s.call(a,d))})).add(o.state.playbackStateRealistic$.subscribe(d=>{d?this.stateContainer.setAttribute("data-playback-state",d):this.stateContainer.removeAttribute("data-playback-state")})).add(o.state.isLive$.subscribe(d=>{var s;return(s=a.onIsLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isActiveLive$.subscribe(d=>{var s;return(s=a.onIsActiveLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isAudioAvailable$.subscribe(d=>{var s;return(s=a.onIsAudioAvailableChanged)==null?void 0:s.call(a,d)})).add(o.state.currentQuality$.subscribe(d=>{var s;return(s=a.onCurrentQualityChanged)==null?void 0:s.call(a,d)})).add(o.state.availableQualities$.subscribe(d=>{var s;return(s=a.onAvailableQualitiesChanged)==null?void 0:s.call(a,d.map(({value:u})=>u).filter(u=>u!=="auto"))})).add(o.state.availableAudioStreams$.subscribe(d=>{d.length>1&&a.onAudioLanguagesAvailable&&a.onAudioLanguagesAvailable()})).add(r.pictureInPicture$.isActive$.subscribe(d=>{var s,u,f;zu(this.pictureInPictureApi)&&this.uiConfig.features.dpip&&!((s=this.videoConfig)!=null&&s.playerView)&&o.actions.external.setMinimalView(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 s;return(s=l.onControlsVisibleChanged)==null?void 0:s.call(l,d)})).add(o.ui.isMobile.subscribe(d=>{var s;return(s=l.onIsMobileChanged)==null?void 0:s.call(l,d)})).add(o.ui.playerSize.subscribe(d=>{var s;return(s=l.onPlayerSizeChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.prevButton.subscribe(d=>{var s;return(s=l.onPrevButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playButton.subscribe(d=>{var s;return(s=l.onPlayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.replayButton.subscribe(d=>{var s;return(s=l.onReplayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.nextButton.subscribe(d=>{var s;return(s=l.onNextButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playPrevChapterButton.subscribe(d=>{var s;return(s=l.onPlayPrevChapterChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.seekToInteractiveButton.subscribe(d=>{var s;return(s=l.onSeekToInteractiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveGraphButton.subscribe(d=>{var s;return(s=l.onGraphButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.liveButton.subscribe(d=>{var s;return(s=l.onLiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.time.subscribe(d=>{var s;return(s=l.onTimeUpdateChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.episodes.subscribe(d=>{var s;return(s=l.onEpisodesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.subtitles.subscribe(d=>{var s;return(s=l.onSubtitlesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topLeft.subscribe(d=>{var s;return(s=l.onTopLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topRight.subscribe(d=>{var s;return(s=l.onTopRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomLeft.subscribe(d=>{var s;return(s=l.onBottomLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomRight.subscribe(d=>{var s;return(s=l.onBottomRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.middle.subscribe(d=>{var s;return(s=l.onMiddleControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottom.subscribe(d=>{var s;return(s=l.onBottomControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.videoTitleInfo.subscribe(d=>{var s;return(s=l.onTitleChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.settings.subscribe(d=>{var s;return(s=l.onSettingsChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.fullscreen.subscribe(d=>{var s;return(s=l.onFullscreenChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.chromecast.subscribe(d=>{var s;return(s=l.onChromecastChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.pip.subscribe(d=>{var s;return(s=l.onPipChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls["theater-mode-button"].subscribe(d=>{var s;return(s=l.onTheaterModeChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.vkLogo.subscribe(d=>{var s;return(s=l.onVkLogoChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveTimeIndicator.subscribe(d=>{var s;return(s=l.onInteractiveTimeIndicatorChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.timeline.subscribe(d=>{var s;return(s=l.onTimelineChanged)==null?void 0:s.call(l,d)}))}playNextVideo(){this.videoConfig&&(this.currentPlayingVideoIndex++,this.currentPlayingVideoIndex>=this.videoConfig.videos.length&&(this.currentPlayingVideoIndex=0),this.log({message:`play next video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}playPrevVideo(){this.videoConfig&&(this.currentPlayingVideoIndex--,this.currentPlayingVideoIndex<0&&(this.currentPlayingVideoIndex=this.videoConfig.videos.length-1),this.log({message:`play prev video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}createPlayerWithCurrentVideo(e,i=!0){var o;if(!this.videoConfig)return;let r=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!r){this.log({message:"no next video"});return}this.isInited&&Wb(r.unitedVideoId)&&((o=this.store)==null||o.actions.internal.nextMovie(r.unitedVideoId)),this.unmountComponent(this.svelteRootComponent),this.createPlayer(r,{autoplay:i,fromTime:0},e)}playPrevChapter(){var e;(e=this.interactiveController)==null||e.playPrevChapter()}seekToInteractive(){var e;let i=(e=this.interactiveController)==null?void 0:e.getNextInteractiveStartTime();typeof i=="number"&&this.seekTime(i/1e3)}async initInteractives(){var e,i,o,r,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=await import("@vkontakte/videoplayer-interactive/es2018");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let s=(i=this.store)==null?void 0:i.interfaceLanguage$,u=s?_e(s):this.videoConfig.interfaceLanguage,{projectInfo:f,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:f,initChapterId:p,historyApi:v,vkVideoLoader:_,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,isTouch:this.videoConfig.isTouch,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation,controlsTapPlace:this.uiConfig.features.interactiveControlsTapPlace,controlsFillAnimation:this.uiConfig.features.interactiveControlsFillAnimation,controlsHideAnimation:this.uiConfig.features.interactiveControlsHideAnimation},endChapterHistoryFix:this.uiConfig.features.interactiveHistoryEndChapterFix});let{isInteractiveExpectation$:y,isSeekable$:$}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add($.subscribe(I=>{if(!this.isInited)return;let T=this.store;I?T.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):T.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(y.subscribe(I=>{this.store&&this.store.state.isInteractiveExpectation$.set(I)}));let x=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(I=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]={...I.config,title:(f==null?void 0:f.title)||I.config.title};let T=x?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(I.player,T),x&&(x=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:I,actionType:T})=>{var R,k,P,E,W,U;if(!this.store||!this.microStoresRoot)return;let z=y.getValue();if(I==="action-choice"&&T==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Pd)),I==="action-choice-canceled"){let Y=_e(this.store.state.isPlaying$)||z;if(((P=(R=this.videoConfig)==null?void 0:R.isTouch)!=null?P:(k=this.videoConfig)!=null&&k.isMobile)&&Y){this.store.ui.interactiveHideMobileControls.set(!0);return}(U=(E=this.videoConfig)==null?void 0:(W=E.callbacks).onDisabledInteractiveClick)==null||U.call(W)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:I,removeAllOpenURI:T})=>{this.store&&I==="container-fake-removed"&&T&&this.store.ui.controls.disabledControls$.remove(Pd)})),await this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(r=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&r.onInteractiveHistoryChanged){let I=this.interactiveController.getHistoryState();this.subscription.add(I.history$.subscribe(T=>{var R,k,P;T.length&&((P=(k=(R=this.videoConfig)==null?void 0:R.callbacks)==null?void 0:k.onInteractiveHistoryChanged)==null||P.call(k,T))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(I=>{var T,R,k;(k=(T=this.videoConfig)==null?void 0:(R=T.callbacks).onInteractiveChapterChanged)==null||k.call(R,I.chapter,I.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var I,T,R,k;(I=this.microStoresRoot)==null||I.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(k=(T=this.videoConfig)==null?void 0:(R=T.callbacks).onInteractiveTimeIndicatorClick)==null||k.call(R)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(I=>{this.log({message:I.toString()})}))}catch(d){this.log({message:d.message})}}initPlayer(e,i={}){var o,r,a,l,d,s,u,f,p,v,_,y,$,x,I,T,R,k,P,E,W;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let U=new Error("empty videos");this.fatalError$.next(U),(r=(o=e.callbacks)==null?void 0:o.onCrashed)==null||r.call(o,U.message);return}else this.fatalError$.next(null);this.videoConfig=wc(EI,gI(e,U=>U instanceof Rv?U:void 0)),(a=this.playerId)!=null||(this.playerId=wI(e.playerId)),this.uiConfig=Ch((l=i.ui)!=null?l:{}),this.updatePersistentLayerProps(),this.coreConfig=(d=i.core)!=null?d:{},this.statisticsConfig=(s=i.statistics)!=null?s:{},this.metaConfig=i.meta,this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer&&(this.rootContainer.style.minHeight="unset"),this.style.display="block",this.style.width="100%",this.style.height="100%"),this.videoConfig.playerView==="preview"&&(this.playerContainer.style.contain="none"),this.uiConfig.features.exposeInternalsToGlobal&&((u=this.internalsExposure)!=null||(this.internalsExposure=new yI("ui",this.playerId))),kc.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((f=this.videoConfig)==null?void 0:f.showAds)],numbers:[fI()]}),Wb(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={preview:(_=this.uiConfig.ads.preview)!=null?_:this.videoConfig.adsPreviewParam,...this.uiConfig.ads.paramsOverride},this.videoConfig.isTouch=($=(y=this.uiConfig.isMobile)!=null?y:this.videoConfig.isTouch)!=null?$: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=!((R=this.uiConfig.showLogo)!=null?R:!this.videoConfig.logoHidden),(k=this.videoConfig).canRewindLive&&(k.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(P=this.videoConfig.supportLink)!=null?P:this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=this.uiConfig.features.autoplayNext&&this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=this.uiConfig.features.nextPrevButtons&&this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((E=this.videoConfig.videos)!=null&&E[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip&&(this.pictureInPictureApi=xm(this.videoConfig.pipEnabled!==!1,this.uiConfig.features.dpip)),this.mediaSessionApi=this.uiConfig.features.mediaSession?new np:void 0,this.slotsApi=this.uiConfig.features.slots?new tp(this.uiConfig.disabledSlotIds):void 0,this.annotationsApi=this.uiConfig.features.annotations?new rp(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new dp(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]),zu(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(W=this.slotsApi)==null||W.init(this.shadowRootContainer,this.store)}isOneVideoPlaylist(){return this.videoConfig?this.videoConfig.videos.length===1:!1}updateVideos(e,i){if(!this.videoConfig)return;this.log({message:`update ${i} videos, videos: ${JSON.stringify(e)}`}),i==="prev"?(this.videoConfig.videos.splice(0,this.currentPlayingVideoIndex),this.videoConfig.videos.unshift(...e),this.currentPlayingVideoIndex=e.length):i==="next"&&(this.videoConfig.videos.splice(this.currentPlayingVideoIndex+1),this.videoConfig.videos.push(...e));let o=this.getNextVideoInfo();n(Zn)&&(n(Zn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Zn).nextButtonActive=this.isNextButtonActive(),n(Zn).prevButtonActive=this.isPrevButtonActive(),n(Zn).endScreenVideoTitle=o.nextVideoTitle,n(Zn).endScreenVideoThumb=o.nextVideoThumb,n(Zn).isOneVideoPlaylist=this.isOneVideoPlaylist())}updatePrevVideos(e){this.updateVideos(e,"prev")}updateNextVideos(e){this.updateVideos(e,"next")}initMediaSession(){var e,i;this.mediaSessionApi&&((e=this.unsubscribePlayerPhaseSubscription)==null||e.call(this),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=(i=this.store)==null?void 0:i.playerPhase.subscribe(o=>{o==="video"?this.setupMediaSessionForVideo():o==="ads"&&this.setupMediaSessionForAds()}))}setupMediaSessionForVideo(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let{title:e,thumbUrl:i}={...this.videoConfig.videos[this.currentPlayingVideoIndex]},o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",r=>this.seekTime(r.seekTime)]];this.videoConfig.videos.length>1&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1&&o.push(["nexttrack",()=>{var r,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(r=this.videoConfig)==null?void 0:r.callbacks)==null?void 0:a.onNextVideoClick)==null||l.call(a)}catch(d){this.log({message:"onNextVideoClick callback failed to execute"})}else this.playNextVideo()}]),this.currentPlayingVideoIndex>0&&o.push(["previoustrack",()=>{var r,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(r=this.videoConfig)==null?void 0:r.callbacks)==null?void 0:a.onPrevVideoClick)==null||l.call(a)}catch(d){this.log({message:"onPrevVideoClick callback failed to execute"})}else this.playPrevVideo()}])),this.mediaSessionApi.setMetaData({title:e,thumbUrl:i}),this.mediaSessionApi.updateActionHandlers(o),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}setupMediaSessionForAds(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let e="Реклама",i=[["play",()=>this.play()],["pause",()=>this.pause()]];this.mediaSessionApi.setMetaData({title:e}),this.mediaSessionApi.updateActionHandlers(i),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}moveTo(e){this.shadowDOMCallbacksDisabled=!0,e.append(this),this.shadowDOMCallbacksDisabled=!1}play(){var e,i,o,r;this.isControlDisabled("PLAY_BUTTON")||(e=this.store)!=null&&e.playerPhase.is("LiveWaitingStart")||(i=this.store)!=null&&i.playerPhase.is("LiveWaitingRecover")||(o=this.store)!=null&&o.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),(r=this.svelteRootComponent)==null||r.play())}pause(){var e;this.log({message:"pause"}),(e=this.svelteRootComponent)==null||e.pause()}stop(){var e;if(!this.videoConfig)return;this.log({message:"stop"});let i=!!this.interactiveController;i&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveContainer=void 0,this.interactiveSubscription.unsubscribe()),this.unmountComponent(this.svelteStubComponent),(e=this.mediaSessionApi)==null||e.destroy();let o=this.videoConfig.videos[0];o&&(this.unmountComponent(this.svelteRootComponent),i?(this.videoConfig.autoplay=!1,this.initInteractives()):this.createPlayer(o))}setMuted(e){var i;this.log({message:`set muted, muted: ${e}`}),(i=this.svelteRootComponent)==null||i.setMuted(e)}toggleSubtitle(){var e;this.log({message:"toggle subtitle"}),(e=this.svelteRootComponent)==null||e.toggleSubtitle()}changeSubtitle(e,i){var o;this.log({message:"change subtitle"}),(o=this.svelteRootComponent)==null||o.changeSubtitle(e,i)}hideControls(){var e;this.log({message:"hide controls"}),(e=this.svelteRootComponent)==null||e.hideControls()}showControls(){var e;this.log({message:"show controls"}),(e=this.svelteRootComponent)==null||e.showControls()}setPiPEnabled(e){var i,o;(o=(i=this.store)==null?void 0:i.webApi.pictureInPictureApi)==null||o.setEnabled(e)}setVolume(e){var i;this.log({message:`set volume, volume: ${e}`}),(i=this.svelteRootComponent)==null||i.setVolume(e)}setRepeat(e){this.log({message:`set repeat, repeat: ${e}`}),this.needToRepeatPlaylist=e,n(Zn)&&(n(Zn).needToRepeatPlaylist=this.needToRepeatPlaylist,n(Zn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Zn).nextButtonActive=this.isNextButtonActive(),n(Zn).prevButtonActive=this.isPrevButtonActive())}seekTime(e){var i;this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekTime(e))}seekEpisodeStartTime(e){var i;this.log({message:`seek episode start time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekEpisodeStartTime(e)}returnFocusToEpisodes(){var e;this.log({message:"return focus to episodes button"}),(e=this.svelteRootComponent)==null||e.returnFocusToEpisodes()}setPlaybackRate(e){var i;this.log({message:`set playback rate to: ${e}`}),(i=this.svelteRootComponent)==null||i.setPlaybackRate(e)}setAutoQualityLimits(e){var i,o,r;this.log({message:`set auto quality limitation. Max: ${(i=e.max)!=null?i:"none"}. Min: ${(o=e.min)!=null?o:"none"}`}),(r=this.svelteRootComponent)==null||r.setAutoQualityLimits(e)}setAutoQuality(){var e;(e=this.svelteRootComponent)==null||e.setAutoQuality()}toggleTrafficSaving(e){var i;(i=this.svelteRootComponent)==null||i.toggleTrafficSaving(e)}toggleHighQuality(e){var i;(i=this.svelteRootComponent)==null||i.toggleHighQuality(e)}changeAudioStream(e){var i;(i=this.svelteRootComponent)==null||i.changeAudioStream(e)}addLanguage(e){var i;(i=this.store)==null||i.actions.internal.addLanguage(e)}async setLanguage(e){var i;await((i=this.store)==null?void 0:i.actions.internal.setLanguage(e))}setLiveStart(e){var i,o;let r=this.isLiveTailPlaying();this.log({message:`live started: liveTailPlaying = ${r}`}),r||((i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!1),(o=this.store)==null||o.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){var e;this.log({message:"live waiting"}),(e=this.store)==null||e.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){var e;let i=(e=this.store)==null?void 0:e.getPlayer();if(!i)return!1;let{info:o}=i;return o.canPlayLiveTailBuffer$.getValue()&&!o.isStalled$.getValue()&&!o.atLiveEdge$.getValue()}setLiveWaitingRecover(e=!1){var i;let o=this.isLiveTailPlaying(),r=e||!o;this.log({message:`live waiting recover: forceImmediate = ${e}, liveTailPlaying = ${o}`});let a=()=>{var l;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!0)};r&&a(),(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var l;r||a(),(l=this.store)==null||l.destroy()})}setLiveWaitingRecord(){var e;let i=this.isLiveTailPlaying(),o=!i;this.log({message:`live waiting record: liveTailPlaying = ${i}`});let r=()=>{var a;(a=this.store)==null||a.actions.internal.setLiveWaitingRecord(!0)};o&&r(),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var a;o||r(),(a=this.store)==null||a.destroy()})}setLiveEnd(e){var i;let o=this.isLiveTailPlaying(),r=!o;this.log({message:`live ended: liveTailPlaying = ${o}`});let a=()=>{var l,d;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!1),(d=this.store)==null||d.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};if(r){a();return}(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=a)}setLiveLowLatency(e){var i;this.log({message:"live switch to low latency "+e}),(i=this.store)==null||i.actions.external.setLiveLowLatency(e)}setLooped(e){var i;(i=this.store)==null||i.actions.internal.setLooped(e)}getDebugData(){var e,i;return(i=(e=this.store)==null?void 0:e.actions.internal.getDebugTextData())!=null?i:""}getDeviceId(){var e,i,o;return(o=(i=(e=this.statistics)==null?void 0:e.oneStat)==null?void 0:i.getDeviceId())!=null?o:void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}async replayInteractiveChapter(e){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let r=_e(this.store.state.positionExact$),l=_e(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe($I()).subscribe(()=>{l&&r>=l.time?this.seekTime(l.time):this.seekTime(r),e==null||e()});let d=this.interactiveController.getCurrentChapter();await this.interactiveController.setChapter({chapterId:(o=d==null?void 0:d.chapter)==null?void 0:o.id,pushToHistory:!1})}}showInteractiveIndicatorTooltip(e,i=!1){var o;(o=this.microStoresRoot)==null||o.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){var e;(e=this.store)==null||e.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}handleTimerNextVideo(e){var i;(i=this.store)==null||i.actions.internal.setTimerNextVideoRunning(e)}togglePictureInPicture(){var e;(e=this.store)==null||e.actions.internal.togglePictureInPicture()}focus(){var e,i,o;(o=(i=(e=this.svelteRootComponent)==null?void 0:e.keyboardControls)==null?void 0:i.focus)==null||o.call(i)}restoreFocus(){var e;(e=this.focusManager)==null||e.restoreFocus()}handleExternalKeyboardEvent(e){var i,o;return!!((o=(i=this.svelteRootComponent)==null?void 0:i.keyboardControls)!=null&&o.handleExternalKeyboardEvent(e))}setAutoplayNext(e){var i;(i=this.store)==null||i.actions.internal.setAutoplayNextEnabled(e)}getTotalViewTime(){var e,i;return(i=(e=this.statistics)==null?void 0:e.thinOneStat)==null?void 0:i.getTotalViewTime()}unmountComponent(e){e&&Ma(e)}};import{InterfaceLanguage as Toe,VKNumericLanguage as Ioe,loadVKLangPack as Eoe}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as Aoe,VideoFormat as koe}from"@vkontakte/videoplayer-core/es2018";var hoe=()=>{window.customElements.define("vk-video-player",cp)};export{Ku as ControlButtonType,_s as GridTypes,Toe as InterfaceLanguage,Hd as MenuItemType,bs as PlayerPhase,Ll as VERSION,Ioe as VKNumericLanguage,koe as VideoFormat,Aoe as VideoQuality,Hl as isDpipSupported,fa as isPiPSupported,Eoe as loadVKLangPack,hoe as registerPlayerWebComponent};